From e0e9d2183bb294b18d4655df51dc11ca836a5baa Mon Sep 17 00:00:00 2001 From: Bryce Denney Date: Wed, 12 Dec 2001 21:35:07 +0000 Subject: [PATCH] - check in a very broken floppy patch so I can work on it later --- bochs/patches/patch.floppy-mt0 | 77 ++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 bochs/patches/patch.floppy-mt0 diff --git a/bochs/patches/patch.floppy-mt0 b/bochs/patches/patch.floppy-mt0 new file mode 100644 index 000000000..8281fa2fb --- /dev/null +++ b/bochs/patches/patch.floppy-mt0 @@ -0,0 +1,77 @@ +---------------------------------------------------------------------- +Patch name: patch.floppy-mt0 +Author: Bryce Denney +Date: Wed Dec 12 16:34:42 EST 2001 + +Detailed description: +WARNING: THIS IS STILL VERY BROKEN! +I'm working on sourceforge bug +[ #431508 ] FD io write:3f5: unsupported case 0x45 +http://sourceforge.net/tracker/index.php?func=detail&aid=431508&group_id=12580&atid=112580 + +The code assumes MT=1, and fails when MT=0. I need an understanding +of what MT really does before I can go any further. + +Patch was created with: + cvs diff -u +Apply patch to what version: + cvs checked out on DATE, release version VER +Instructions: + To patch, go to main bochs directory. + Type "patch -p0 < THIS_PATCH_FILE". +---------------------------------------------------------------------- + +Index: iodev/floppy.cc +=================================================================== +RCS file: /cvsroot/bochs/bochs/iodev/floppy.cc,v +retrieving revision 1.26 +diff -u -r1.26 floppy.cc +--- iodev/floppy.cc 2001/10/07 03:28:45 1.26 ++++ iodev/floppy.cc 2001/12/12 21:31:40 +@@ -466,6 +466,9 @@ + case 0x4a: /* read ID */ + BX_FD_THIS s.command_size = 2; + break; ++ case 0x45: ++ BX_ERROR(("treating FDC command 0x45 just like 0xc5")); ++ // fall through into next case. + case 0xc5: /* write normal data */ + BX_FD_THIS s.command_size = 9; + break; +@@ -712,7 +715,9 @@ + + case 0xe6: // read normal data + //BX_INFO(("floppy_command read normal data")); +- case 0xc5: // write normal data ++ case 0x45: // write normal data, with MT=0. ++ BX_ERROR(("treat FDC command 0x45 like command 0xc5")); ++ case 0xc5: // write normal data, with MT=1. + //BX_INFO(("floppy_command write normal data")); + if ( (BX_FD_THIS s.DOR & 0x08) == 0 ) + BX_PANIC(("read/write command with DMA and int disabled")); +@@ -860,7 +865,7 @@ + BX_FD_THIS s.pending_command = BX_FD_THIS s.command[0]; + return; + } +- else if (BX_FD_THIS s.command[0] == 0xc5) { // write ++ else if (BX_FD_THIS s.command[0] == 0xc5 || BX_FD_THIS s.command[0] == 0x45) { // write + BX_FD_THIS s.floppy_buffer_index = 0; + + bx_pc_system.set_DRQ(FLOPPY_DMA_CHAN, 1); +@@ -871,7 +876,7 @@ + return; + } + else +- BX_PANIC(("floppy_command(): unknown read/write command")); ++ BX_PANIC(("floppy_command(): unknown read/write command 0x%02x", (Bit8u)BX_FD_THIS s.command[0])); + + return; + break; +@@ -980,6 +985,7 @@ + + + case 0x4a: /* read ID */ ++ case 0x45: + case 0xc5: // write normal data + case 0xe6: // read normal data + BX_FD_THIS s.pending_command = 0;