diff --git a/Makefile b/Makefile index 3af92e8..3ca31a1 100644 --- a/Makefile +++ b/Makefile @@ -85,9 +85,12 @@ bin/GWSys6_4M.bin: bin bin/baserom_romdisk_noramtest.bin disks/RDisk3M5.dsk # Copy base rom with ROM disk driver cp bin/baserom_romdisk_noramtest.bin $@ # Patch ROM disk driver parameter table - printf '\xFF\xFF\xFF\xFF' | dd of=$@ bs=1 seek=335260 count=4 conv=notrunc # Patch CDR patch offset + printf '\x00\x00\x00\x00' | dd of=$@ bs=1 seek=335256 count=4 conv=notrunc # Patch MacsBug patch offset + printf '\x00\x00\x00\x00' | dd of=$@ bs=1 seek=335264 count=4 conv=notrunc # Patch MacsBug name address + printf '\x00' | dd of=$@ bs=1 seek=335272 count=1 conv=notrunc # Patch MacsBug disable byte + printf '\x00\x00\x00\x00' | dd of=$@ bs=1 seek=335260 count=4 conv=notrunc # Patch CDR patch offset printf '\x00\x00\x00\x00' | dd of=$@ bs=1 seek=335268 count=4 conv=notrunc # Patch CDR name address - printf '\x44' | dd of=$@ bs=1 seek=335273 count=1 conv=notrunc # Patch CDR disable byte + printf '\x00' | dd of=$@ bs=1 seek=335273 count=1 conv=notrunc # Patch CDR disable byte printf '\x00\x38\x00\x00' | dd of=$@ bs=1 seek=335276 count=4 conv=notrunc # Patch ROM disk size # Copy ROM disk image dd if=disks/RDisk3M5.dsk of=$@ bs=1024 seek=512 conv=notrunc @@ -101,9 +104,12 @@ bin/GWSys7Diagnostics_8M.bin: bin bin/baserom_romdisk_ramtest.bin disks/RDisk7M5 # Copy base rom with ROM disk driver cp bin/baserom_romdisk_ramtest.bin $@ # Patch ROM disk driver parameter table - printf '\xFF\xFF\xFF\xFF' | dd of=$@ bs=1 seek=335260 count=4 conv=notrunc # Patch CDR patch offset + printf '\x00\x00\x00\x00' | dd of=$@ bs=1 seek=335256 count=4 conv=notrunc # Patch MacsBug patch offset + printf '\x00\x00\x00\x00' | dd of=$@ bs=1 seek=335264 count=4 conv=notrunc # Patch MacsBug name address + printf '\x00' | dd of=$@ bs=1 seek=335272 count=1 conv=notrunc # Patch MacsBug disable byte + printf '\x00\x00\x00\x00' | dd of=$@ bs=1 seek=335260 count=4 conv=notrunc # Patch CDR patch offset printf '\x00\x00\x00\x00' | dd of=$@ bs=1 seek=335268 count=4 conv=notrunc # Patch CDR name address - printf '\x44' | dd of=$@ bs=1 seek=335273 count=1 conv=notrunc # Patch CDR disable byte + printf '\x00' | dd of=$@ bs=1 seek=335273 count=1 conv=notrunc # Patch CDR disable byte printf '\x00\x78\x00\x00' | dd of=$@ bs=1 seek=335276 count=4 conv=notrunc # Patch ROM disk size # Copy ROM disk image dd if=disks/RDisk7M5-diagnostics.dsk of=$@ bs=1024 seek=512 conv=notrunc diff --git a/bin/GWSys6_4M.bin b/bin/GWSys6_4M.bin index 8d84b2a..597eae8 100755 Binary files a/bin/GWSys6_4M.bin and b/bin/GWSys6_4M.bin differ diff --git a/bin/GWSys6_8M.bin b/bin/GWSys6_8M.bin index 6f83d9c..3408bc0 100644 Binary files a/bin/GWSys6_8M.bin and b/bin/GWSys6_8M.bin differ diff --git a/bin/GWSys71_8M.bin b/bin/GWSys71_8M.bin index a713104..8db9b63 100755 Binary files a/bin/GWSys71_8M.bin and b/bin/GWSys71_8M.bin differ diff --git a/bin/GWSys7Diagnostics_8M.bin b/bin/GWSys7Diagnostics_8M.bin index c979beb..63c0e7b 100755 Binary files a/bin/GWSys7Diagnostics_8M.bin and b/bin/GWSys7Diagnostics_8M.bin differ diff --git a/bin/baserom_romdisk_noramtest.bin b/bin/baserom_romdisk_noramtest.bin index 12c56ad..4fc6ac9 100755 Binary files a/bin/baserom_romdisk_noramtest.bin and b/bin/baserom_romdisk_noramtest.bin differ diff --git a/bin/baserom_romdisk_ramtest.bin b/bin/baserom_romdisk_ramtest.bin index cb6817a..fee3f48 100755 Binary files a/bin/baserom_romdisk_ramtest.bin and b/bin/baserom_romdisk_ramtest.bin differ diff --git a/bin/driver.bin b/bin/driver.bin index 148d639..3342791 100755 Binary files a/bin/driver.bin and b/bin/driver.bin differ diff --git a/entry.s b/entry.s index fdc14e9..8755771 100644 --- a/entry.s +++ b/entry.s @@ -14,7 +14,7 @@ RDiskSig: RDiskDBGDisPos: dc.l 0x00000031 RDiskCDRDisPos: -dc.l 0xFFFFFFFF +dc.l 0x00000000 RDiskDBGNameAddr: dc.l 0x4088002A RDiskCDRNameAddr: diff --git a/rdisk.c b/rdisk.c index 94a45a6..4349296 100644 --- a/rdisk.c +++ b/rdisk.c @@ -101,7 +101,7 @@ static void RDUnpatch(unsigned long pos, Ptr patch) { static void RDPatch(char enable, Ptr patch, Ptr ramdisk, unsigned long pos, char data) { if (!enable) { *patch = data; - if (ramdisk) { + if (ramdisk && pos) { void (*poke)(Ptr, char) = S24; poke(ramdisk + pos, data); } @@ -263,11 +263,13 @@ OSErr RDPrime(IOParamPtr p, DCtlPtr d) { // Read from disk into buffer. if (*MMU32bit) { BlockMove(disk, p->ioBuffer, p->ioReqCount); } else { copy24(disk, StripAddress(p->ioBuffer), p->ioReqCount); } - if (!c->ramdisk && RDiskDBGDisPos >= d->dCtlPosition && + if (!c->ramdisk && RDiskDBGDisPos != 0 && + RDiskDBGDisPos >= d->dCtlPosition && RDiskDBGDisPos < d->dCtlPosition + p->ioReqCount) { p->ioBuffer[RDiskDBGDisPos - d->dCtlPosition] = c->dbgDisByte; } - if (!c->ramdisk && RDiskCDRDisPos >= d->dCtlPosition && + if (!c->ramdisk && RDiskCDRDisPos != 0 && + RDiskCDRDisPos >= d->dCtlPosition && RDiskCDRDisPos < d->dCtlPosition + p->ioReqCount) { p->ioBuffer[RDiskCDRDisPos - d->dCtlPosition] = c->cdrDisByte; }