a few output cleanups

make windows not panic bochs when probing for ne2k, still doesn't work though
This commit is contained in:
Todd T.Fries 2001-10-02 18:38:03 +00:00
parent beca5d6e67
commit d5ecddc64c
5 changed files with 29 additions and 23 deletions

View File

@ -57,7 +57,7 @@ bx_keyb_c::bx_keyb_c(void)
memset( &s, 0, sizeof(s) );
BX_KEY_THIS put("KBD");
BX_KEY_THIS settype(KBDLOG);
BX_DEBUG(("Init $Id: keyboard.cc,v 1.32 2001-09-21 02:46:17 yakovlev Exp $"));
BX_DEBUG(("Init $Id: keyboard.cc,v 1.33 2001-10-02 18:38:02 fries Exp $"));
}
bx_keyb_c::~bx_keyb_c(void)
@ -92,7 +92,7 @@ bx_keyb_c::resetinternals(Boolean powerup)
void
bx_keyb_c::init(bx_devices_c *d, bx_cmos_c *cmos)
{
BX_DEBUG(("Init $Id: keyboard.cc,v 1.32 2001-09-21 02:46:17 yakovlev Exp $"));
BX_DEBUG(("Init $Id: keyboard.cc,v 1.33 2001-10-02 18:38:02 fries Exp $"));
Bit32u i;
BX_KEY_THIS devices = d;
@ -516,7 +516,7 @@ BX_PANIC(("kbd: OUTB set and command 0x%02x encountered", value));
case 0xd3: // write mouse output buffer
//FIXME: Why was this a panic?
BX_ERROR(("io write 0x64: command = 0xD3(write mouse outb)"));
BX_DEBUG(("io write 0x64: command = 0xD3(write mouse outb)"));
// following byte to port 60h written to output port as mouse write.
BX_KEY_THIS s.kbd_controller.expecting_port60h = 1;
break;
@ -1019,7 +1019,7 @@ bx_keyb_c::kbd_ctrl_to_kbd(Bit8u value)
break;
case 0xff: // reset: internal keyboard reset and afterwards the BAT
BX_INFO(("rest command received"));
BX_DEBUG(("rest command received"));
kbd_enQ(0xFA); // send ACK
kbd_enQ(0xAA); // BAT test passed
return;

View File

@ -37,7 +37,7 @@ bx_ne2k_c::bx_ne2k_c(void)
{
put("NE2K");
settype(NE2KLOG);
BX_DEBUG(("Init $Id: ne2k.cc,v 1.20 2001-09-29 19:16:34 bdenney Exp $"));
BX_DEBUG(("Init $Id: ne2k.cc,v 1.21 2001-10-02 18:38:03 fries Exp $"));
// nothing for now
}
@ -224,7 +224,7 @@ bx_ne2k_c::chipmem_read(Bit32u address, unsigned int io_len)
return (retval);
}
BX_ERROR(("out-of-bounds chipmem read, %04X", address));
BX_DEBUG(("out-of-bounds chipmem read, %04X", address));
return (0xff);
}
@ -240,7 +240,7 @@ bx_ne2k_c::chipmem_write(Bit32u address, Bit32u value, unsigned io_len)
if (io_len == 2)
BX_NE2K_THIS s.mem[address - BX_NE2K_MEMSTART + 1] = value >> 8;
} else
BX_ERROR(("out-of-bounds chipmem write, %04X", address));
BX_DEBUG(("out-of-bounds chipmem write, %04X", address));
}
//
@ -336,9 +336,12 @@ bx_ne2k_c::page0_read(Bit32u offset, unsigned int io_len)
{
BX_DEBUG(("page 0 read from port %04x, len=%u", (unsigned) offset,
(unsigned) io_len));
if (io_len > 1)
BX_PANIC(("bad length! page 0 read from port %04x, len=%u", (unsigned) offset,
(unsigned) io_len));
if (io_len > 1) {
BX_ERROR(("bad length! page 0 read from port %04x, len=%u", (unsigned) offset,
(unsigned) io_len)); /* encountered with win98 hardware probe */
return 0;
}
switch (offset) {
case 0x0: // CR
@ -439,9 +442,12 @@ bx_ne2k_c::page0_write(Bit32u offset, Bit32u value, unsigned io_len)
{
BX_DEBUG(("page 0 write to port %04x, len=%u", (unsigned) offset,
(unsigned) io_len));
if (io_len > 1)
BX_PANIC(("bad length! page 0 write to port %04x, len=%u", (unsigned) offset,
(unsigned) io_len));
if (io_len > 1) {
BX_ERROR(("bad length! page 0 write to port %04x, len=%u", (unsigned) offset,
(unsigned) io_len));
return;
}
switch (offset) {
case 0x0: // CR
@ -1160,7 +1166,7 @@ bx_ne2k_c::rx_frame(const void *buf, unsigned io_len)
void
bx_ne2k_c::init(bx_devices_c *d)
{
BX_DEBUG(("Init $Id: ne2k.cc,v 1.20 2001-09-29 19:16:34 bdenney Exp $"));
BX_DEBUG(("Init $Id: ne2k.cc,v 1.21 2001-10-02 18:38:03 fries Exp $"));
BX_NE2K_THIS devices = d;
@ -1192,9 +1198,9 @@ bx_ne2k_c::init(bx_devices_c *d)
addr,
"ne2000 NIC");
}
BX_INFO(("irq %d, ioport 0x%x, mac %02x:%02x:%02x:%02x:%02x:%02x",
BX_NE2K_THIS s.base_irq,
BX_INFO(("port 0x%x/32 irq %d mac %02x:%02x:%02x:%02x:%02x:%02x",
BX_NE2K_THIS s.base_address,
BX_NE2K_THIS s.base_irq,
BX_NE2K_THIS s.physaddr[0],
BX_NE2K_THIS s.physaddr[1],
BX_NE2K_THIS s.physaddr[2],

View File

@ -156,7 +156,7 @@ bx_pci_c::write(Bit32u address, Bit32u value, unsigned io_len)
switch (address) {
case 0xCF8:
BX_PCI_THIS s.i440fx.confAddr = value;
BX_ERROR(("440FX IO write to port %04x of %04x, len %02x ",
BX_DEBUG(("440FX IO write to port %04x of %04x, len %02x ",
address, value, io_len));
break;
@ -177,7 +177,7 @@ bx_pci_c::write(Bit32u address, Bit32u value, unsigned io_len)
if (BX_PCI_THIS s.i440fx.confAddr & 0x80000000) {
idx = (BX_PCI_THIS s.i440fx.confAddr & 0xFC);
BX_PCI_THIS s.i440fx.array[idx] = (BX_PCI_THIS s.i440fx.array[idx] & ~dMask) | (value & dMask);
BX_ERROR(("440FX IO write to port %04x of %04x, len %02x ",
BX_DEBUG(("440FX IO write to port %04x of %04x, len %02x ",
address, value, io_len));
}
}
@ -198,7 +198,7 @@ bx_pci_c::write(Bit32u address, Bit32u value, unsigned io_len)
if (BX_PCI_THIS s.i440fx.confAddr & 0x80000000) {
idx = (BX_PCI_THIS s.i440fx.confAddr & 0xFC);
BX_PCI_THIS s.i440fx.array[idx] = (BX_PCI_THIS s.i440fx.array[idx] & ~dMask) | ((value << 8) & dMask);
BX_ERROR(("440FX IO write to port %04x of %04x, len %02x ",
BX_DEBUG(("440FX IO write to port %04x of %04x, len %02x ",
address, value, io_len));
}
}
@ -219,7 +219,7 @@ bx_pci_c::write(Bit32u address, Bit32u value, unsigned io_len)
if (BX_PCI_THIS s.i440fx.confAddr & 0x80000000) {
idx = (BX_PCI_THIS s.i440fx.confAddr & 0xFC);
BX_PCI_THIS s.i440fx.array[idx] = (BX_PCI_THIS s.i440fx.array[idx] & ~dMask) | ((value << 16) & dMask);
BX_ERROR(("440FX IO write to port %04x of %04x, len %02x ",
BX_DEBUG(("440FX IO write to port %04x of %04x, len %02x ",
address, value, io_len));
}
}
@ -238,7 +238,7 @@ bx_pci_c::write(Bit32u address, Bit32u value, unsigned io_len)
if (BX_PCI_THIS s.i440fx.confAddr & 0x80000000) {
idx = (BX_PCI_THIS s.i440fx.confAddr & 0xFC);
BX_PCI_THIS s.i440fx.array[idx] = (BX_PCI_THIS s.i440fx.array[idx] & ~dMask) | ((value << 24) & dMask);
BX_ERROR(("440FX IO write to port %04x of %04x, len %02x ",
BX_DEBUG(("440FX IO write to port %04x of %04x, len %02x ",
address, value, io_len));
}
}

View File

@ -1340,7 +1340,7 @@ bx_vga_c::update(void)
MSL = bx_vga.s.CRTC.reg[0x09] & 0x1f;
rows = (VDE+1)/(MSL+1);
if (rows > BX_MAX_TEXT_LINES)
BX_PANIC(("text rows>50"));
BX_PANIC(("text rows>%d: %d",BX_MAX_TEXT_LINES,rows));
bx_gui.dimension_update(8*80, 16*rows); // ??? should use font size
// pass old text snapshot & new VGA memory contents
start_address = 2*((BX_VGA_THIS s.CRTC.reg[12] << 8) + BX_VGA_THIS s.CRTC.reg[13]);

View File

@ -31,7 +31,7 @@
// Support varying number of rows of text. This used to
// be limited to only 25 lines.
#define BX_MAX_TEXT_LINES 50
#define BX_MAX_TEXT_LINES 260
#if BX_USE_VGA_SMF
# define BX_VGA_SMF static