diff --git a/Makefile b/Makefile index 31b9de2..55a73ac 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ bin/driver.bin: bin obj/driver.o bin/rom.bin: baserom.bin RDisk1M5.dsk bin bin/driver.bin obj/entry_rel.sym cp baserom.bin $@ # copy base rom - dd if=bin/driver.bin of=$@ bs=1 seek=335266 skip=50 conv=notrunc # Copy driver code + dd if=bin/driver.bin of=$@ bs=1 seek=335248 skip=32 conv=notrunc # Copy driver code printf '\x78' | dd of=$@ bs=1 seek=335168 count=1 conv=notrunc # Set resource flags printf '\x4F' | dd of=$@ bs=1 seek=335216 count=1 conv=notrunc # Set driver flags cat obj/entry_rel.sym | grep "DOpen" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335224 count=2 conv=notrunc diff --git a/RDisk1M5.dsk b/RDisk1M5.dsk index 6c0c155..a14c33d 100644 Binary files a/RDisk1M5.dsk and b/RDisk1M5.dsk differ diff --git a/baserom.bin b/baserom.bin index a95ac19..29aaac9 100755 Binary files a/baserom.bin and b/baserom.bin differ diff --git a/bin/driver.bin b/bin/driver.bin index a82fd2b..fb6f22e 100755 Binary files a/bin/driver.bin and b/bin/driver.bin differ diff --git a/bin/rom.bin b/bin/rom.bin index 9ae5a37..15d5f6d 100755 Binary files a/bin/rom.bin and b/bin/rom.bin differ diff --git a/entry.s b/entry.s index 110578e..57206af 100644 --- a/entry.s +++ b/entry.s @@ -1,7 +1,7 @@ dc.l 0x00000000, 0x00000000, 0x00000000, 0x00000000 dc.l 0x00000000, 0x00000000, 0x00000000, 0x00000000 -dc.l 0x00000000, 0x00000000, 0x00000000, 0x00000000 -dc.l 0x00000000, 0x00000000, 0x00000000, 0x00000000 +.ascii "\9GWROMDisk\0" +.align 4 .EQU killCode, 1 .EQU noQueueBit, 9 diff --git a/rdisk.c b/rdisk.c index cabaa03..ba9b783 100644 --- a/rdisk.c +++ b/rdisk.c @@ -30,13 +30,13 @@ const long RDiskIcon[65] = { 0b00000000000000000000000000000000, 0b00000000000000000000000000000000, 0b00000000000000000000000000000000, - 0b00000000000000000000000000000000, 0b11111111111111111111111111111111, 0b10000000000000000000000000000001, - 0b10001111001111000001111001111001, - 0b10001001001001000001001001001001, - 0b10001001001001000001001001001001, - 0b10001111001111000001111001111001, + 0b10001111000111100011110001111001, + 0b10001001000100100010010001001001, + 0b10001001000100100010010001001001, + 0b10001001000100100010010001001001, + 0b10001111000111100011110001111001, 0b11000000000000000000000000000001, 0b01010101010101011101010101010101, 0b01111111111111110111111111111111, @@ -63,7 +63,7 @@ const long RDiskIcon[65] = { 0b00000000000000000000000000000000, 0b00000000000000000000000000000000, 0b00000000000000000000000000000000, - 0b00000000000000000000000000000000, + 0b11111111111111111111111111111111, 0b11111111111111111111111111111111, 0b11111111111111111111111111111111, 0b11111111111111111111111111111111, @@ -153,7 +153,7 @@ OSErr RDiskInit(IOParamPtr p, DCtlPtr d, RDiskStorage_t *c) { // Set ROM disk attributes c->status.writeProt = -1; // Set write protected // If RAM disk set in PRAM or A pressed, enable RAM disk - if (ram || RDiskIsAPressed()) { + if (ram || RDiskIsAPressed() || c->mount) { // Try to allocate RAM disk buffer if (*MMU32bit) { // 32-bit mode unsigned long minBufPtr, newBufPtr; @@ -291,6 +291,7 @@ OSErr RDiskControl(CntrlParamPtr p, DCtlPtr d) { case 21: case 22: *(Ptr*)&p->csParam = (Ptr)&RDiskIcon; return noErr; + case 128: c->mount = 1; return noErr; default: return controlErr; } } diff --git a/rdisk.h b/rdisk.h index 213e4e6..b0ae4d5 100644 --- a/rdisk.h +++ b/rdisk.h @@ -40,6 +40,7 @@ typedef struct RDiskStorage_s { unsigned long init_done; char *ramdisk; RDiskCopy_t copy24; + char mount; } RDiskStorage_t; #endif