mirror of
https://github.com/garrettsworkshop/MacIIROMDiskDriver.git
synced 2024-11-21 12:30:49 +00:00
Includes mount control call
This commit is contained in:
parent
76d119898e
commit
eb34dbb0a3
2
Makefile
2
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
|
||||
|
BIN
RDisk1M5.dsk
BIN
RDisk1M5.dsk
Binary file not shown.
BIN
baserom.bin
BIN
baserom.bin
Binary file not shown.
BIN
bin/driver.bin
BIN
bin/driver.bin
Binary file not shown.
BIN
bin/rom.bin
BIN
bin/rom.bin
Binary file not shown.
4
entry.s
4
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
|
||||
|
15
rdisk.c
15
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user