Includes mount control call

This commit is contained in:
Zane Kaminski 2020-06-29 08:02:24 -04:00
parent 76d119898e
commit eb34dbb0a3
8 changed files with 12 additions and 10 deletions

View File

@ -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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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

15
rdisk.c
View File

@ -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;
}
}

View File

@ -40,6 +40,7 @@ typedef struct RDiskStorage_s {
unsigned long init_done;
char *ramdisk;
RDiskCopy_t copy24;
char mount;
} RDiskStorage_t;
#endif