From: Joost Y. D. <an...@us...> - 2001-12-31 15:45:23
|
Update of /cvsroot/openmsx/openMSX/src In directory usw-pr-cvs1:/tmp/cvs-serv7069/src Modified Files: MSXDiskRomPatch.cc Log Message: Joost: diskrom patch slot structure fix + other small fixes Index: MSXDiskRomPatch.cc =================================================================== RCS file: /cvsroot/openmsx/openMSX/src/MSXDiskRomPatch.cc,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- MSXDiskRomPatch.cc 2001/12/31 10:38:19 1.12 +++ MSXDiskRomPatch.cc 2001/12/31 15:45:18 1.13 @@ -224,8 +224,16 @@ << "s1:" << ((sec_slot & 0x0C)>>2) << " " << "s0:" << ((sec_slot & 0x03)>>0)); - motherboard->writeIO(0xA8, 0xFF, dummy); - cpu->writeMem(0xFFFF,0xFF); + int pri_slot_target = ((pri_slot & 0xC0)>>6); + pri_slot_target += pri_slot_target*4 + pri_slot_target*16 + pri_slot_target*64; + int sec_slot_target = ((sec_slot & 0xC0)>>6); + sec_slot_target += sec_slot_target*4 + sec_slot_target*16 + sec_slot_target*64; + PRT_DEBUG("Switching slots toward: pri:0x" << std::hex + << pri_slot_target + << " sec:0x" << sec_slot_target << std::dec); + + motherboard->writeIO(0xA8, pri_slot_target, dummy); + cpu->writeMem(0xFFFF,sec_slot_target); byte buffer[MSXDiskRomPatch::sector_size]; if (write) @@ -247,8 +255,8 @@ cpu->setCPURegs(regs); return; } + regs.BC.B.h--; } - regs.BC.B.h--; } else { @@ -269,8 +277,8 @@ cpu->writeMem(transfer_address, buffer[i]); transfer_address++; } + regs.BC.B.h--; } - regs.BC.B.h--; } motherboard->writeIO(0xA8, pri_slot, dummy); |