$OpenBSD: patch-iodev_unmapped_cc,v 1.1 2001/02/02 16:59:12 todd Exp $
--- iodev/unmapped.cc.orig	Sat Mar 25 21:28:49 2000
+++ iodev/unmapped.cc	Tue Oct 17 12:04:02 2000
@@ -107,7 +107,7 @@ bx_unmapped_c::read(Bit32u address, unsi
 #endif
     case 0x03df:
 	  retval = 0xffffffff;
-      /* bx_printf("unsupported IO read from port %04x (CGA)\n", address);*/
+      /* bio->printf("unsupported IO read from port %04x (CGA)\n", address);*/
       break;
     case 0x023a:
     case 0x02f8: /* UART */
@@ -130,28 +130,28 @@ bx_unmapped_c::read(Bit32u address, unsi
     case 0x03fd: /* UART */
     case 0x17c6:
 	  retval = 0xffffffff;
-      /* bx_printf("unsupported IO read from port %04x\n", address); */
+      /* bio->printf("unsupported IO read from port %04x\n", address); */
       break;
     default:
 	  retval = 0xffffffff;
     }
 
   return_from_read:
-  if (bx_dbg.unsupported_io)
+  if (bio->getdbg().unsupported_io)
 	  switch (io_len) {
 	  case 1:
 		  retval = (Bit8u)retval;
-		  bx_printf("unmapped: 8-bit read from %04x = %02x\n", address, retval);
+		  bio->printf("unmapped: 8-bit read from %04x = %02x\n", address, retval);
 		  break;
 	  case 2:
 		  retval = (Bit16u)retval;
-		  bx_printf("unmapped: 16-bit read from %04x = %04x\n", address, retval);
+		  bio->printf("unmapped: 16-bit read from %04x = %04x\n", address, retval);
 		  break;
 	  case 4:
-		  bx_printf("unmapped: 32-bit read from %04x = %08x\n", address, retval);
+		  bio->printf("unmapped: 32-bit read from %04x = %08x\n", address, retval);
 		  break;
 	  default:
-		  bx_printf("unmapped: ??-bit read from %04x = %x\n", address, retval);
+		  bio->printf("unmapped: ??-bit read from %04x = %x\n", address, retval);
 	  }
   return retval;
 }
@@ -190,7 +190,7 @@ bx_unmapped_c::write(Bit32u address, Bit
 
   switch (address) {
     case 0x80: // diagnostic test port to display progress of POST
-      //bx_printf("Diagnostic port 80h: write = %02xh\n", (unsigned) value);
+      //bio->printf("Diagnostic port 80h: write = %02xh\n", (unsigned) value);
       BX_UM_THIS s.port80 = value;
       break;
 
@@ -229,12 +229,12 @@ bx_unmapped_c::write(Bit32u address, Bit
     case 0x3eb:
     case 0x3ec:
     case 0x3ed:
-	    // bx_printf("unsupported IO write to port %04x of %02x\n",
+	    // bio->printf("unsupported IO write to port %04x of %02x\n",
 	    // address, value);
       break;
     case 0xfedc:
-      bx_dbg.debugger = (value > 0);
-fprintf(stderr, "# DEBUGGER = %u\n", (unsigned) bx_dbg.debugger);
+      bio->getdbg().debugger = (value > 0);
+fprintf(stderr, "# DEBUGGER = %u\n", (unsigned) bio->getdbg().debugger);
       break;
 
     case 0xfff0:
@@ -244,12 +244,12 @@ fprintf(stderr, "# DEBUGGER = %u\n", (un
       if ( BX_UM_THIS s.bios_message_i >= BX_BIOS_MESSAGE_SIZE ) {
         BX_UM_THIS s.bios_message[ BX_BIOS_MESSAGE_SIZE - 1] = 0;
         BX_UM_THIS s.bios_message_i = 0;
-        bx_printf("BIOS message: %s\n", BX_UM_THIS s.bios_message);
+        bio->printf("BIOS message: %s\n", BX_UM_THIS s.bios_message);
         }
       else if ((value & 0xff) == '\n') {
         BX_UM_THIS s.bios_message[ BX_UM_THIS s.bios_message_i ] = 0;
         BX_UM_THIS s.bios_message_i = 0;
-        bx_printf("BIOS message: %s\n", BX_UM_THIS s.bios_message);
+        bio->printf("BIOS message: %s\n", BX_UM_THIS s.bios_message);
         }
       break;
 
@@ -257,19 +257,19 @@ fprintf(stderr, "# DEBUGGER = %u\n", (un
 	    break;
     }
   return_from_write:
-  if (bx_dbg.unsupported_io)
+  if (bio->getdbg().unsupported_io)
 	  switch (io_len) {
 	  case 1:
-		  bx_printf("unmapped: 8-bit write to %04x = %02x\n", address, value);
+		  bio->printf("unmapped: 8-bit write to %04x = %02x\n", address, value);
 		  break;
 	  case 2:
-		  bx_printf("unmapped: 16-bit write to %04x = %04x\n", address, value);
+		  bio->printf("unmapped: 16-bit write to %04x = %04x\n", address, value);
 		  break;
 	  case 4:
-		  bx_printf("unmapped: 32-bit write to %04x = %08x\n", address, value);
+		  bio->printf("unmapped: 32-bit write to %04x = %08x\n", address, value);
 		  break;
 	  default:
-		  bx_printf("unmapped: ??-bit write to %04x = %x\n", address, value);
+		  bio->printf("unmapped: ??-bit write to %04x = %x\n", address, value);
 		  break;
 	  }
 }
