diff --git a/.gitignore b/.gitignore index 5509140..c7e39e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.DS_Store +obj/ diff --git a/Makefile b/Makefile index 04e2366..31b9de2 100644 --- a/Makefile +++ b/Makefile @@ -2,12 +2,13 @@ RETRO68=/Users/zane/Retro68-build/toolchain PREFIX=$(RETRO68)/m68k-apple-macos +AS=$(RETRO68)/bin/m68k-apple-macos-as CC=$(RETRO68)/bin/m68k-apple-macos-gcc LD=$(RETRO68)/bin/m68k-apple-macos-ld OBJCOPY=$(RETRO68)/bin/m68k-apple-macos-objcopy OBJDUMP=$(RETRO68)/bin/m68k-apple-macos-objdump -all: bin/rom.bin obj/rdisk.s obj/rdisk_reloc.s obj/rdisk_rel.sym obj/rdisk_abs.sym bin/rdisk_nonreloc.bin bin/rom_braun.bin obj/rdisk_braun.s obj/rdisk_braun_reloc.s obj/rdisk_braun_rel.sym obj/rdisk_braun_abs.sym bin/rdisk_braun_nonreloc.bin bin/rom_braun_oldbin.bin +all: bin/rom.bin obj/rdisk.s obj/driver.s obj/entry_rel.sym obj/driver_abs.sym obj: mkdir obj @@ -15,83 +16,46 @@ obj: bin: mkdir bin + +obj/entry.o: entry.s obj + $(AS) $< -o $@ + +obj/entry_rel.sym: obj obj/entry.o + $(OBJDUMP) -t obj/entry.o > $@ + + obj/rdisk.o: rdisk.c obj $(CC) -c -O1 $< -o $@ -obj/rdisk_reloc.o: obj obj/rdisk.o - $(LD) -Ttext=40851D70 -o $@ obj/rdisk.o - obj/rdisk.s: obj obj/rdisk.o $(OBJDUMP) -d obj/rdisk.o > $@ -obj/rdisk_reloc.s: obj obj/rdisk_reloc.o - $(OBJDUMP) -d obj/rdisk_reloc.o > $@ -obj/rdisk_rel.sym: obj obj/rdisk.o - $(OBJDUMP) -t obj/rdisk.o > $@ +obj/driver.o: obj obj/entry.o obj/rdisk.o + $(LD) -Ttext=40851D70 -o $@ obj/entry.o obj/rdisk.o -obj/rdisk_abs.sym: obj obj/rdisk_reloc.o - $(OBJDUMP) -t obj/rdisk_reloc.o > $@ +obj/driver.s: obj obj/driver.o + $(OBJDUMP) -d obj/driver.o > $@ -bin/rdisk.bin: bin obj/rdisk_reloc.o - $(OBJCOPY) -O binary obj/rdisk_reloc.o $@ - -bin/rdisk_nonreloc.bin: bin obj/rdisk.o - $(OBJCOPY) -O binary obj/rdisk.o $@ +obj/driver_abs.sym: obj obj/driver.o + $(OBJDUMP) -t obj/driver.o > $@ -obj/rdisk_braun.o: rdisk_braun.c obj - $(CC) -c -O1 $< -o $@ - -obj/rdisk_braun_reloc.o: obj obj/rdisk_braun.o - $(LD) -Ttext=40851D70 -o $@ obj/rdisk_braun.o - -obj/rdisk_braun.s: obj obj/rdisk_braun.o - $(OBJDUMP) -d obj/rdisk_braun.o > $@ - -obj/rdisk_braun_reloc.s: obj obj/rdisk_braun_reloc.o - $(OBJDUMP) -d obj/rdisk_braun_reloc.o > $@ - -obj/rdisk_braun_rel.sym: obj obj/rdisk_braun.o - $(OBJDUMP) -t obj/rdisk_braun.o > $@ - -obj/rdisk_braun_abs.sym: obj obj/rdisk_braun_reloc.o - $(OBJDUMP) -t obj/rdisk_braun_reloc.o > $@ - -bin/rdisk_braun.bin: bin obj/rdisk_braun_reloc.o - $(OBJCOPY) -O binary obj/rdisk_braun_reloc.o $@ - -bin/rdisk_braun_nonreloc.bin: bin obj/rdisk_braun.o - $(OBJCOPY) -O binary obj/rdisk_braun.o $@ +bin/driver.bin: bin obj/driver.o + $(OBJCOPY) -O binary obj/driver.o $@ -bin/rom.bin: baserom.bin bin bin/rdisk.bin obj/rdisk_rel.sym +bin/rom.bin: baserom.bin RDisk1M5.dsk bin bin/driver.bin obj/entry_rel.sym cp baserom.bin $@ # copy base rom - cat bin/rdisk.bin | dd of=$@ bs=1 seek=335266 skip=50 conv=notrunc # Copy driver code + dd if=bin/driver.bin of=$@ bs=1 seek=335266 skip=50 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/rdisk_rel.sym | grep "Open" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335224 count=2 conv=notrunc - cat obj/rdisk_rel.sym | grep "Prime" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335226 count=2 conv=notrunc - cat obj/rdisk_rel.sym | grep "Control" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335228 count=2 conv=notrunc - cat obj/rdisk_rel.sym | grep "Status" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335230 count=2 conv=notrunc - cat obj/rdisk_rel.sym | grep "Close" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335232 count=2 conv=notrunc - dd if=RDisk1M5 of=$@ bs=1024 seek=512 count=1536 conv=notrunc # copy disk image - -bin/rom_braun.bin: bin bin/rdisk_braun.bin obj/rdisk_braun_rel.sym - cp baserom_braun_2m_0.9.bin $@ # copy base rom - cat bin/rdisk_braun.bin | dd of=$@ bs=1 seek=335266 skip=50 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/rdisk_braun_rel.sym | grep "Open" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335224 count=2 conv=notrunc - cat obj/rdisk_braun_rel.sym | grep "Prime" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335226 count=2 conv=notrunc - cat obj/rdisk_braun_rel.sym | grep "Control" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335228 count=2 conv=notrunc - cat obj/rdisk_braun_rel.sym | grep "Status" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335230 count=2 conv=notrunc - cat obj/rdisk_braun_rel.sym | grep "Close" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335232 count=2 conv=notrunc - dd if=RDisk1M5 of=$@ bs=1024 seek=512 count=1536 conv=notrunc # copy disk image - -bin/rom_braun_oldbin.bin: bin bin/rdisk_braun.bin obj/rdisk_braun_rel.sym - cp baserom_braun_2m_0.9.bin $@ # copy base rom - dd if=RDisk1M5 of=$@ bs=1024 seek=512 count=1536 conv=notrunc # copy disk image + cat obj/entry_rel.sym | grep "DOpen" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335224 count=2 conv=notrunc + cat obj/entry_rel.sym | grep "DPrime" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335226 count=2 conv=notrunc + cat obj/entry_rel.sym | grep "DControl" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335228 count=2 conv=notrunc + cat obj/entry_rel.sym | grep "DStatus" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335230 count=2 conv=notrunc + cat obj/entry_rel.sym | grep "DClose" | cut -c5-8 | xxd -r -p - | dd of=$@ bs=1 seek=335232 count=2 conv=notrunc + dd if=RDisk1M5.dsk of=$@ bs=1024 seek=512 count=1536 conv=notrunc # copy disk image .PHONY: clean clean: diff --git a/RDisk1M5 b/RDisk1M5.dsk similarity index 100% rename from RDisk1M5 rename to RDisk1M5.dsk diff --git a/bin/driver.bin b/bin/driver.bin new file mode 100755 index 0000000..6f6a189 Binary files /dev/null and b/bin/driver.bin differ diff --git a/bin/rdisk.bin b/bin/rdisk.bin deleted file mode 100755 index 6018587..0000000 Binary files a/bin/rdisk.bin and /dev/null differ diff --git a/bin/rdisk_braun.bin b/bin/rdisk_braun.bin deleted file mode 100755 index 7ae67e8..0000000 Binary files a/bin/rdisk_braun.bin and /dev/null differ diff --git a/bin/rdisk_braun_nonreloc.bin b/bin/rdisk_braun_nonreloc.bin deleted file mode 100644 index 46c65d2..0000000 Binary files a/bin/rdisk_braun_nonreloc.bin and /dev/null differ diff --git a/bin/rdisk_nonreloc.bin b/bin/rdisk_nonreloc.bin deleted file mode 100644 index afd565c..0000000 Binary files a/bin/rdisk_nonreloc.bin and /dev/null differ diff --git a/bin/rom.bin b/bin/rom.bin index 5cce988..3cca7d3 100755 Binary files a/bin/rom.bin and b/bin/rom.bin differ diff --git a/bin/rom_braun.bin b/bin/rom_braun.bin deleted file mode 100644 index 5af4825..0000000 Binary files a/bin/rom_braun.bin and /dev/null differ diff --git a/bin/rom_braun_oldbin.bin b/bin/rom_braun_oldbin.bin deleted file mode 100644 index 0299a1d..0000000 Binary files a/bin/rom_braun_oldbin.bin and /dev/null differ diff --git a/entry.s b/entry.s new file mode 100644 index 0000000..110578e --- /dev/null +++ b/entry.s @@ -0,0 +1,68 @@ +dc.l 0x00000000, 0x00000000, 0x00000000, 0x00000000 +dc.l 0x00000000, 0x00000000, 0x00000000, 0x00000000 +dc.l 0x00000000, 0x00000000, 0x00000000, 0x00000000 +dc.l 0x00000000, 0x00000000, 0x00000000, 0x00000000 + +.EQU killCode, 1 +.EQU noQueueBit, 9 + +.EQU kioTrap, 6 +.EQU kioResult, 16 +.EQU kcsCode, 26 + +.EQU JIODone, 0x08FC + +DOpen: + movem.l %A0-%A1,-(%SP) + bsr RDiskOpen + movem.l (%SP)+,%A0-%A1 + rts + +DClose: + movem.l %A0-%A1,-(%SP) + bsr RDiskClose + movem.l (%SP)+,%A0-%A1 + rts + +DPrime: + movem.l %A0-%A1,-(%SP) + bsr RDiskPrime + movem.l (%SP)+,%A0-%A1 + bra.b IOReturn + +DControl: + movem.l %A0-%A1,-(%SP) + bsr RDiskControl + movem.l (%SP)+,%A0-%A1 + cmpi.w #killCode, kcsCode(%A0) + bne.b IOReturn + rts + +DStatus: + movem.l %A0-%A1,-(%SP) + bsr RDiskStatus + movem.l (%SP)+,%A0-%A1 + +IOReturn: + move.w kioTrap(%A0),%D1 + btst #noQueueBit,%D1 + beq.b Queued + +NotQueued: + tst.w %D0 + ble.b ImmedRTS + clr.w %D0 + +ImmedRTS: + move.w %D0,kioResult(%A0) + rts + +Queued: + tst.w %D0 + ble.b MyIODone + clr.w %D0 + rts + +MyIODone: + move.l JIODone,-(%SP) + rts diff --git a/obj/rdisk.o b/obj/rdisk.o deleted file mode 100644 index 5383b6b..0000000 Binary files a/obj/rdisk.o and /dev/null differ diff --git a/obj/rdisk.s b/obj/rdisk.s deleted file mode 100644 index bdfc517..0000000 --- a/obj/rdisk.s +++ /dev/null @@ -1,272 +0,0 @@ - -obj/rdisk.o: file format elf32-m68k - - -Disassembly of section .text: - -00000000 : - ... - 30: 4e75 rts - 32: 8947 .short 0x8947 - 34: 5752 subqw #3,%a2@ - 36: 4f4d .short 0x4f4d - 38: 4469 736b negw %a1@(29547) - ... - -0000003e : - 3e: 4280 clrl %d0 - 40: 302f 0006 movew %sp@(6),%d0 - 44: 4840 swap %d0 - 46: 302f 0004 movew %sp@(4),%d0 - 4a: 206f 0008 moveal %sp@(8),%a0 - 4e: a04e .short 0xa04e - 50: 4e75 rts - 52: 8d52 orw %d6,%a2@ - 54: 4469 736b negw %a1@(29547) - 58: 4164 .short 0x4164 - 5a: 6444 bccs a0 - 5c: 7269 moveq #105,%d1 - 5e: 7665 moveq #101,%d3 - ... - -00000062 : - 62: 598f subql #4,%sp - 64: 1f7c 0001 0003 moveb #1,%sp@(3) - 6a: 41ef 0003 lea %sp@(3),%a0 - 6e: 1010 moveb %a0@,%d0 - 70: a05d .short 0xa05d - 72: 1080 moveb %d0,%a0@ - 74: 202f 0010 movel %sp@(16),%d0 - 78: 226f 000c moveal %sp@(12),%a1 - 7c: 206f 0008 moveal %sp@(8),%a0 - 80: a02e .short 0xa02e - 82: 41ef 0003 lea %sp@(3),%a0 - 86: 1010 moveb %a0@,%d0 - 88: a05d .short 0xa05d - 8a: 1080 moveb %d0,%a0@ - 8c: 588f addql #4,%sp - 8e: 4e75 rts - 90: 8b52 orw %d5,%a2@ - 92: 4469 736b negw %a1@(29547) - 96: 436f .short 0x436f - 98: 7079 moveq #121,%d0 - 9a: 3234 0000 movew %a4@(0000000000000000,%d0:w),%d1 - -0000009e : - 9e: 48e7 1030 moveml %d3/%a2-%a3,%sp@- - a2: 2649 moveal %a1,%a3 - a4: 4aa9 0014 tstl %a1@(20) - a8: 6708 beqs b2 - aa: 4240 clrw %d0 - ac: 4cdf 0c08 moveml %sp@+,%d3/%a2-%a3 - b0: 4e75 rts - b2: 203c 0000 0000 movel #0,%d0 - b8: a055 .short 0xa055 - ba: 598f subql #4,%sp - bc: 2ebc 0000 0308 movel #776,%sp@ - c2: 2057 moveal %sp@,%a0 - c4: 588f addql #4,%sp - c6: 2068 0002 moveal %a0@(2),%a0 - ca: b0fc 0000 cmpaw #0,%a0 - ce: 671a beqs ea - d0: 7601 moveq #1,%d3 - d2: 6008 bras dc - d4: 2050 moveal %a0@,%a0 - d6: b0fc 0000 cmpaw #0,%a0 - da: 6710 beqs ec - dc: 3468 0006 moveaw %a0@(6),%a2 - e0: b68a cmpl %a2,%d3 - e2: 6ef0 bgts d4 - e4: 260a movel %a2,%d3 - e6: 5283 addql #1,%d3 - e8: 60ea bras d4 - ea: 7601 moveq #1,%d3 - ec: 702a moveq #42,%d0 - ee: a722 .short 0xa722 - f0: 2748 0014 movel %a0,%a3@(20) - f4: 6752 beqs 148 - f6: a029 .short 0xa029 - f8: 206b 0014 moveal %a3@(20),%a0 - fc: 2050 moveal %a0@,%a0 - fe: 4228 001e clrb %a0@(30) - 102: 42a8 0020 clrl %a0@(32) - 106: 42a8 0024 clrl %a0@(36) - 10a: 4228 0028 clrb %a0@(40) - 10e: 91c8 subal %a0,%a0 - 110: 117c fff0 0002 moveb #-16,%a0@(2) - 116: 117c 0008 0003 moveb #8,%a0@(3) - 11c: 3143 000c movew %d3,%a0@(12) - 120: 302b 0018 movew %a3@(24),%d0 - 124: 3140 000e movew %d0,%a0@(14) - 128: 317c 0c00 0012 movew #3072,%a0@(18) - 12e: 4268 0014 clrw %a0@(20) - 132: 4878 0006 pea 6 - 136: 3f03 movew %d3,%sp@- - 138: 3f00 movew %d0,%sp@- - 13a: 4eb9 0000 0000 jsr 0 - 140: 508f addql #8,%sp - 142: 4240 clrw %d0 - 144: 6000 ff66 braw ac - 148: 70e9 moveq #-23,%d0 - 14a: 6000 ff60 braw ac - 14e: 4e75 rts - 150: 8952 orw %d4,%a2@ - 152: 4469 736b negw %a1@(29547) - 156: 4f70 .short 0x4f70 - 158: 656e bcss 1c8 - ... - -0000015c : - 15c: 206f 000c moveal %sp@(12),%a0 - 160: 117c 0001 001e moveb #1,%a0@(30) - 166: 50e8 0002 st %a0@(2) - 16a: 42a8 0020 clrl %a0@(32) - 16e: 42a8 0024 clrl %a0@(36) - 172: 4228 0028 clrb %a0@(40) - 176: 4240 clrw %d0 - 178: 4e75 rts - 17a: 8952 orw %d4,%a2@ - 17c: 4469 736b negw %a1@(29547) - 180: 496e .short 0x496e - 182: 6974 bvss 1f8 - ... - -00000186 : - 186: 48e7 1c30 moveml %d3-%d5/%a2-%a3,%sp@- - 18a: 2448 moveal %a0,%a2 - 18c: 2649 moveal %a1,%a3 - 18e: 2069 0014 moveal %a1@(20),%a0 - 192: b0fc 0000 cmpaw #0,%a0 - 196: 6700 00c6 beqw 25e - 19a: 2050 moveal %a0@,%a0 - 19c: 4a28 001e tstb %a0@(30) - 1a0: 6738 beqs 1da - 1a2: 322a 002c movew %a2@(44),%d1 - 1a6: 3001 movew %d1,%d0 - 1a8: 0240 000f andiw #15,%d0 - 1ac: 0c40 0001 cmpiw #1,%d0 - 1b0: 6746 beqs 1f8 - 1b2: 0c40 0003 cmpiw #3,%d0 - 1b6: 6746 beqs 1fe - 1b8: 4a40 tstw %d0 - 1ba: 6736 beqs 1f2 - 1bc: 7800 moveq #0,%d4 - 1be: 102a 0007 moveb %a2@(7),%d0 - 1c2: 0c00 0002 cmpib #2,%d0 - 1c6: 6740 beqs 208 - 1c8: 0c00 0003 cmpib #3,%d0 - 1cc: 6700 009c beqw 26a - 1d0: 4243 clrw %d3 - 1d2: 3003 movew %d3,%d0 - 1d4: 4cdf 0c38 moveml %sp@+,%d3-%d5/%a2-%a3 - 1d8: 4e75 rts - 1da: 117c 0001 001e moveb #1,%a0@(30) - 1e0: 50e8 0002 st %a0@(2) - 1e4: 42a8 0020 clrl %a0@(32) - 1e8: 42a8 0024 clrl %a0@(36) - 1ec: 4228 0028 clrb %a0@(40) - 1f0: 60b0 bras 1a2 - 1f2: 282b 0010 movel %a3@(16),%d4 - 1f6: 60c6 bras 1be - 1f8: 282a 002e movel %a2@(46),%d4 - 1fc: 60c0 bras 1be - 1fe: 282b 0010 movel %a3@(16),%d4 - 202: d8aa 002e addl %a2@(46),%d4 - 206: 60b6 bras 1be - 208: 3601 movew %d1,%d3 - 20a: 0243 0040 andiw #64,%d3 - 20e: 0801 0006 btst #6,%d1 - 212: 6650 bnes 264 - 214: 2a04 movel %d4,%d5 - 216: 0685 4088 0000 addil #1082654720,%d5 - 21c: 4a38 0cb2 tstb cb2 - 220: 6720 beqs 242 - 222: 202a 0024 movel %a2@(36),%d0 - 226: 226a 0020 moveal %a2@(32),%a1 - 22a: 2045 moveal %d5,%a0 - 22c: a02e .short 0xa02e - 22e: 202a 0024 movel %a2@(36),%d0 - 232: 2540 0028 movel %d0,%a2@(40) - 236: d880 addl %d0,%d4 - 238: 2744 0010 movel %d4,%a3@(16) - 23c: 2544 002e movel %d4,%a2@(46) - 240: 6090 bras 1d2 - 242: 202a 0020 movel %a2@(32),%d0 - 246: a055 .short 0xa055 - 248: a091 .short 0xa091 - 24a: 2f2a 0024 movel %a2@(36),%sp@- - 24e: 2f00 movel %d0,%sp@- - 250: 2f05 movel %d5,%sp@- - 252: 4eb9 0000 0000 jsr 0 - 258: 4fef 000c lea %sp@(12),%sp - 25c: 60d0 bras 22e - 25e: 76bf moveq #-65,%d3 - 260: 6000 ff70 braw 1d2 - 264: 4243 clrw %d3 - 266: 6000 ff6a braw 1d2 - 26a: 76d4 moveq #-44,%d3 - 26c: 6000 ff64 braw 1d2 - 270: 4e75 rts - 272: 8a52 orw %a2@,%d5 - 274: 4469 736b negw %a1@(29547) - 278: 5072 696d 6500 addqw #8,%a2@(0000000000006500)@(0000000000000000) - ... - -00000280 : - 280: 70ef moveq #-17,%d0 - 282: 4e75 rts - 284: 8c52 orw %a2@,%d6 - 286: 4469 736b negw %a1@(29547) - 28a: 436f .short 0x436f - 28c: 6e74 bgts 302 - 28e: 726f moveq #111,%d1 - 290: 6c00 0000 bgew 292 - -00000294 : - 294: 2f0a movel %a2,%sp@- - 296: 2469 0014 moveal %a1@(20),%a2 - 29a: b4fc 0000 cmpaw #0,%a2 - 29e: 6718 beqs 2b8 - 2a0: 0c68 0008 001a cmpiw #8,%a0@(26) - 2a6: 6614 bnes 2bc - 2a8: 701e moveq #30,%d0 - 2aa: 43e8 001c lea %a0@(28),%a1 - 2ae: 2052 moveal %a2@,%a0 - 2b0: a02e .short 0xa02e - 2b2: 4240 clrw %d0 - 2b4: 245f moveal %sp@+,%a2 - 2b6: 4e75 rts - 2b8: 70ee moveq #-18,%d0 - 2ba: 60f8 bras 2b4 - 2bc: 70ee moveq #-18,%d0 - 2be: 60f4 bras 2b4 - 2c0: 4e75 rts - 2c2: 8b52 orw %d5,%a2@ - 2c4: 4469 736b negw %a1@(29547) - 2c8: 5374 6174 7573 subqw #1,%a4@(0000000075730000)@(0000000000000000) - 2ce: 0000 - -000002d0 : - 2d0: 2f0a movel %a2,%sp@- - 2d2: 2449 moveal %a1,%a2 - 2d4: 2069 0014 moveal %a1@(20),%a0 - 2d8: b0fc 0000 cmpaw #0,%a0 - 2dc: 671a beqs 2f8 - 2de: 2050 moveal %a0@,%a0 - 2e0: 2068 0024 moveal %a0@(36),%a0 - 2e4: b0fc 0000 cmpaw #0,%a0 - 2e8: 6702 beqs 2ec - 2ea: a01f .short 0xa01f - 2ec: 206a 0014 moveal %a2@(20),%a0 - 2f0: a02a .short 0xa02a - 2f2: 206a 0014 moveal %a2@(20),%a0 - 2f6: a023 .short 0xa023 - 2f8: 42aa 0014 clrl %a2@(20) - 2fc: 4240 clrw %d0 - 2fe: 245f moveal %sp@+,%a2 - 300: 4e75 rts - 302: 8a52 orw %a2@,%d5 - 304: 4469 736b negw %a1@(29547) - 308: 436c .short 0x436c - 30a: 6f73 bles 37f - 30c: 6500 0000 bcsw 30e diff --git a/obj/rdisk_abs.sym b/obj/rdisk_abs.sym deleted file mode 100644 index cc61256..0000000 --- a/obj/rdisk_abs.sym +++ /dev/null @@ -1,22 +0,0 @@ - -obj/rdisk_reloc.o: file format elf32-m68k - -SYMBOL TABLE: -40851d70 l d .text 00000000 .text -00000000 l d .comment 00000000 .comment -00000000 l df *ABS* 00000000 rdisk.c -40851e0e g F .text 000000b0 RDiskOpen -40852004 g F .text 0000002c RDiskStatus -40851dd2 g F .text 0000002e RDiskCopy24 -40851ecc g F .text 0000001e RDiskInit -00000000 *UND* 00000000 _start -40852040 g F .text 00000032 RDiskClose -40851ff0 g F .text 00000004 RDiskControl -40851d70 g F .text 00000032 GWROMDisk -40854080 g .text 00000000 __bss_start -40854080 g .text 00000000 _edata -40854080 g .text 00000000 _end -40851dae g F .text 00000014 RDiskAddDrive -40851ef6 g F .text 000000ea RDiskPrime - - diff --git a/obj/rdisk_braun.o b/obj/rdisk_braun.o deleted file mode 100644 index 1e913eb..0000000 Binary files a/obj/rdisk_braun.o and /dev/null differ diff --git a/obj/rdisk_braun.s b/obj/rdisk_braun.s deleted file mode 100644 index 158a7c1..0000000 --- a/obj/rdisk_braun.s +++ /dev/null @@ -1,368 +0,0 @@ - -obj/rdisk_braun.o: file format elf32-m68k - - -Disassembly of section .text: - -00000000 : - ... - 30: 4e75 rts - 32: 8d42 .short 0x8d42 - 34: 4272 6175 6e52 clrw %a2@(000000006e524f4d)@(0000000000000000) - 3a: 4f4d - 3c: 4469 736b negw %a1@(29547) - ... - -00000042 : - 42: 598f subql #4,%sp - 44: 1f7c 0001 0003 moveb #1,%sp@(3) - 4a: 41ef 0003 lea %sp@(3),%a0 - 4e: 1010 moveb %a0@,%d0 - 50: a05d .short 0xa05d - 52: 1080 moveb %d0,%a0@ - 54: 202f 0010 movel %sp@(16),%d0 - 58: 226f 000c moveal %sp@(12),%a1 - 5c: 206f 0008 moveal %sp@(8),%a0 - 60: a02e .short 0xa02e - 62: 41ef 0003 lea %sp@(3),%a0 - 66: 1010 moveb %a0@,%d0 - 68: a05d .short 0xa05d - 6a: 1080 moveb %d0,%a0@ - 6c: 588f addql #4,%sp - 6e: 4e75 rts - 70: 8a52 orw %a2@,%d5 - 72: 6f6d bles e1 - 74: 4472 7643 negw %a2@(0000000000000043,%d7:w:8) - 78: 6f70 bles ea - 7a: 7900 .short 0x7900 - ... - -0000007e : - 7e: 4280 clrl %d0 - 80: 302f 0006 movew %sp@(6),%d0 - 84: 4840 swap %d0 - 86: 302f 0004 movew %sp@(4),%d0 - 8a: 206f 0008 moveal %sp@(8),%a0 - 8e: a04e .short 0xa04e - 90: 4e75 rts - 92: 8e52 orw %a2@,%d7 - 94: 6f6d bles 103 - 96: 4472 7641 negw %a2@(0000000000000041,%d7:w:8) - 9a: 6464 bccs 100 - 9c: -000000a4 : - a4: 48e7 1030 moveml %d3/%a2-%a3,%sp@- - a8: 2649 moveal %a1,%a3 - aa: 203c 0000 0000 movel #0,%d0 - b0: a055 .short 0xa055 - b2: 598f subql #4,%sp - b4: 2ebc 0000 0308 movel #776,%sp@ - ba: 2057 moveal %sp@,%a0 - bc: 588f addql #4,%sp - be: 2068 0002 moveal %a0@(2),%a0 - c2: b0fc 0000 cmpaw #0,%a0 - c6: 671a beqs e2 - c8: 7601 moveq #1,%d3 - ca: 6008 bras d4 - cc: 2050 moveal %a0@,%a0 - ce: b0fc 0000 cmpaw #0,%a0 - d2: 6710 beqs e4 - d4: 3468 0006 moveaw %a0@(6),%a2 - d8: b68a cmpl %a2,%d3 - da: 6ef0 bgts cc - dc: 260a movel %a2,%d3 - de: 5283 addql #1,%d3 - e0: 60ea bras cc - e2: 7601 moveq #1,%d3 - e4: 7032 moveq #50,%d0 - e6: a722 .short 0xa722 - e8: 2748 0014 movel %a0,%a3@(20) - ec: a029 .short 0xa029 - ee: 206b 0014 moveal %a3@(20),%a0 - f2: 2450 moveal %a0@,%a2 - f4: 7040 moveq #64,%d0 - f6: a51e .short 0xa51e - f8: 2248 moveal %a0,%a1 - fa: 2548 001e movel %a0,%a2@(30) - fe: 674e beqs 14e - 100: 7040 moveq #64,%d0 - 102: 41f9 0000 0000 lea 0 ,%a0 - 108: a02e .short 0xa02e - 10a: 202a 001e movel %a2@(30),%d0 - 10e: a055 .short 0xa055 - 110: 2540 0026 movel %d0,%a2@(38) - 114: 157c fff0 0002 moveb #-16,%a2@(2) - 11a: 157c 0008 0003 moveb #8,%a2@(3) - 120: 3543 000c movew %d3,%a2@(12) - 124: 302b 0018 movew %a3@(24),%d0 - 128: 3540 000e movew %d0,%a2@(14) - 12c: 357c 0c00 0012 movew #3072,%a2@(18) - 132: 426a 0014 clrw %a2@(20) - 136: 486a 0006 pea %a2@(6) - 13a: 3f03 movew %d3,%sp@- - 13c: 3f00 movew %d0,%sp@- - 13e: 4eb9 0000 0000 jsr 0 - 144: 508f addql #8,%sp - 146: 4240 clrw %d0 - 148: 4cdf 0c08 moveml %sp@+,%d3/%a2-%a3 - 14c: 4e75 rts - 14e: 70e9 moveq #-23,%d0 - 150: 60f6 bras 148 - 152: 4e75 rts - 154: 8a52 orw %a2@,%d5 - 156: 6f6d bles 1c5 - 158: 4472 764f negw %a2@(000000000000004f,%d7:w:8) - 15c: 7065 moveq #101,%d0 - 15e: 6e00 0000 bgtw 160 - -00000162 : - 162: 48e7 1c3a moveml %d3-%d5/%a2-%a4/%fp,%sp@- - 166: 2448 moveal %a0,%a2 - 168: 2849 moveal %a1,%a4 - 16a: 2069 0014 moveal %a1@(20),%a0 - 16e: b0fc 0000 cmpaw #0,%a0 - 172: 6700 0158 beqw 2cc - 176: 2650 moveal %a0@,%a3 - 178: 4a2b 002e tstb %a3@(46) - 17c: 6616 bnes 194 - 17e: 177c 0001 002e moveb #1,%a3@(46) - 184: 50eb 0002 st %a3@(2) - 188: 42ab 0022 clrl %a3@(34) - 18c: 277c 4088 0000 movel #1082654720,%a3@(42) - 192: 002a - 194: 322a 002c movew %a2@(44),%d1 - 198: 3001 movew %d1,%d0 - 19a: 0240 000f andiw #15,%d0 - 19e: 0c40 0001 cmpiw #1,%d0 - 1a2: 6766 beqs 20a - 1a4: 0c40 0003 cmpiw #3,%d0 - 1a8: 6766 beqs 210 - 1aa: 4a40 tstw %d0 - 1ac: 6756 beqs 204 - 1ae: 302a 0006 movew %a2@(6),%d0 - 1b2: 0240 00ff andiw #255,%d0 - 1b6: 0c40 0002 cmpiw #2,%d0 - 1ba: 6760 beqs 21c - 1bc: 0c40 0003 cmpiw #3,%d0 - 1c0: 6600 0116 bnew 2d8 - 1c4: 4a2b 0002 tstb %a3@(2) - 1c8: 6600 0114 bnew 2de - 1cc: 4a2b 0030 tstb %a3@(48) - 1d0: 6600 00d4 bnew 2a6 - 1d4: 202a 0024 movel %a2@(36),%d0 - 1d8: 226b 002a moveal %a3@(42),%a1 - 1dc: d3ce addal %fp,%a1 - 1de: 206a 0020 moveal %a2@(32),%a0 - 1e2: a22e .short 0xa22e - 1e4: 202a 0024 movel %a2@(36),%d0 - 1e8: 2540 0028 movel %d0,%a2@(40) - 1ec: d08e addl %fp,%d0 - 1ee: 2940 0010 movel %d0,%a4@(16) - 1f2: 202c 0010 movel %a4@(16),%d0 - 1f6: 2540 002e movel %d0,%a2@(46) - 1fa: 4243 clrw %d3 - 1fc: 3003 movew %d3,%d0 - 1fe: 4cdf 5c38 moveml %sp@+,%d3-%d5/%a2-%a4/%fp - 202: 4e75 rts - 204: 2c6c 0010 moveal %a4@(16),%fp - 208: 60a4 bras 1ae - 20a: 2c6a 002e moveal %a2@(46),%fp - 20e: 609e bras 1ae - 210: 202c 0010 movel %a4@(16),%d0 - 214: 2c40 moveal %d0,%fp - 216: ddea 002e addal %a2@(46),%fp - 21a: 6092 bras 1ae - 21c: 3601 movew %d1,%d3 - 21e: 0243 0040 andiw #64,%d3 - 222: 0801 0006 btst #6,%d1 - 226: 6600 00aa bnew 2d2 - 22a: 282a 0024 movel %a2@(36),%d4 - 22e: 4a2b 0002 tstb %a3@(2) - 232: 663c bnes 270 - 234: 4aab 0022 tstl %a3@(34) - 238: 6736 beqs 270 - 23a: 4a2b 0030 tstb %a3@(48) - 23e: 6610 bnes 250 - 240: 2004 movel %d4,%d0 - 242: 226a 0020 moveal %a2@(32),%a1 - 246: 206b 002a moveal %a3@(42),%a0 - 24a: d1ce addal %fp,%a0 - 24c: a22e .short 0xa22e - 24e: 603e bras 28e - 250: 2a2b 0026 movel %a3@(38),%d5 - 254: 202a 0020 movel %a2@(32),%d0 - 258: a055 .short 0xa055 - 25a: 2f04 movel %d4,%sp@- - 25c: 2f00 movel %d0,%sp@- - 25e: 202b 002a movel %a3@(42),%d0 - 262: d08e addl %fp,%d0 - 264: 2f00 movel %d0,%sp@- - 266: 2045 moveal %d5,%a0 - 268: 4e90 jsr %a0@ - 26a: 4fef 000c lea %sp@(12),%sp - 26e: 601e bras 28e - 270: 2a2b 0026 movel %a3@(38),%d5 - 274: 202a 0020 movel %a2@(32),%d0 - 278: a055 .short 0xa055 - 27a: 2f04 movel %d4,%sp@- - 27c: 2f00 movel %d0,%sp@- - 27e: 202b 002a movel %a3@(42),%d0 - 282: d08e addl %fp,%d0 - 284: 2f00 movel %d0,%sp@- - 286: 2045 moveal %d5,%a0 - 288: 4e90 jsr %a0@ - 28a: 4fef 000c lea %sp@(12),%sp - 28e: 2544 0028 movel %d4,%a2@(40) - 292: 200e movel %fp,%d0 - 294: d084 addl %d4,%d0 - 296: 2940 0010 movel %d0,%a4@(16) - 29a: 202c 0010 movel %a4@(16),%d0 - 29e: 2540 002e movel %d0,%a2@(46) - 2a2: 6000 ff58 braw 1fc - 2a6: 262b 0026 movel %a3@(38),%d3 - 2aa: 282a 0024 movel %a2@(36),%d4 - 2ae: 266b 002a moveal %a3@(42),%a3 - 2b2: d7ce addal %fp,%a3 - 2b4: 202a 0020 movel %a2@(32),%d0 - 2b8: a055 .short 0xa055 - 2ba: 2f04 movel %d4,%sp@- - 2bc: 2f0b movel %a3,%sp@- - 2be: 2f00 movel %d0,%sp@- - 2c0: 2043 moveal %d3,%a0 - 2c2: 4e90 jsr %a0@ - 2c4: 4fef 000c lea %sp@(12),%sp - 2c8: 6000 ff1a braw 1e4 - 2cc: 76bf moveq #-65,%d3 - 2ce: 6000 ff2c braw 1fc - 2d2: 4243 clrw %d3 - 2d4: 6000 ff26 braw 1fc - 2d8: 76d4 moveq #-44,%d3 - 2da: 6000 ff20 braw 1fc - 2de: 76d4 moveq #-44,%d3 - 2e0: 6000 ff1a braw 1fc - 2e4: 4e75 rts - 2e6: 8b52 orw %d5,%a2@ - 2e8: 6f6d bles 357 - 2ea: 4472 7650 negw %a2@(0000000000000050,%d7:w:8) - 2ee: 7269 moveq #105,%d1 - 2f0: 6d65 blts 357 - ... - -000002f4 : - 2f4: 2f0b movel %a3,%sp@- - 2f6: 2f0a movel %a2,%sp@- - 2f8: 2449 moveal %a1,%a2 - 2fa: 2069 0014 moveal %a1@(20),%a0 - 2fe: b0fc 0000 cmpaw #0,%a0 - 302: 6724 beqs 328 - 304: 2650 moveal %a0@,%a3 - 306: 206b 0022 moveal %a3@(34),%a0 - 30a: b0fc 0000 cmpaw #0,%a0 - 30e: 6702 beqs 312 - 310: a01f .short 0xa01f - 312: 206b 001e moveal %a3@(30),%a0 - 316: a01f .short 0xa01f - 318: 206a 0014 moveal %a2@(20),%a0 - 31c: a02a .short 0xa02a - 31e: 206a 0014 moveal %a2@(20),%a0 - 322: a023 .short 0xa023 - 324: 42aa 0014 clrl %a2@(20) - 328: 4240 clrw %d0 - 32a: 245f moveal %sp@+,%a2 - 32c: 265f moveal %sp@+,%a3 - 32e: 4e75 rts - 330: 8b52 orw %d5,%a2@ - 332: 6f6d bles 3a1 - 334: 4472 7643 negw %a2@(0000000000000043,%d7:w:8) - 338: 6c6f bges 3a9 - 33a: 7365 .short 0x7365 - ... - -0000033e : - 33e: 2f0b movel %a3,%sp@- - 340: 2f0a movel %a2,%sp@- - 342: 2449 moveal %a1,%a2 - 344: 0c68 0041 001a cmpiw #65,%a0@(26) - 34a: 6600 00a0 bnew 3ec - 34e: 2069 0014 moveal %a1@(20),%a0 - 352: b0fc 0000 cmpaw #0,%a0 - 356: 6700 0098 beqw 3f0 - 35a: 2650 moveal %a0@,%a3 - 35c: 4a2b 002f tstb %a3@(47) - 360: 6706 beqs 368 - 362: 4aab 0022 tstl %a3@(34) - 366: 6718 beqs 380 - 368: 426a 0022 clrw %a2@(34) - 36c: 302a 0004 movew %a2@(4),%d0 - 370: 0240 dfff andiw #-8193,%d0 - 374: 3540 0004 movew %d0,%a2@(4) - 378: 4240 clrw %d0 - 37a: 245f moveal %sp@+,%a2 - 37c: 265f moveal %sp@+,%a3 - 37e: 4e75 rts - 380: 4a38 0cb2 tstb cb2 - 384: 6730 beqs 3b6 - 386: 7018 moveq #24,%d0 - 388: 4840 swap %d0 - 38a: a51e .short 0xa51e - 38c: 2008 movel %a0,%d0 - 38e: 2748 0022 movel %a0,%a3@(34) - 392: 4a80 tstl %d0 - 394: 67d2 beqs 368 - 396: a055 .short 0xa055 - 398: 2740 002a movel %d0,%a3@(42) - 39c: 2f3c 0018 0000 movel #1572864,%sp@- - 3a2: 2f00 movel %d0,%sp@- - 3a4: 2f3c 4088 0000 movel #1082654720,%sp@- - 3aa: 206b 0026 moveal %a3@(38),%a0 - 3ae: 4e90 jsr %a0@ - 3b0: 4fef 000c lea %sp@(12),%sp - 3b4: 60b2 bras 368 - 3b6: 177c 0001 0030 moveb #1,%a3@(48) - 3bc: 7001 moveq #1,%d0 - 3be: a51e .short 0xa51e - 3c0: 2748 0022 movel %a0,%a3@(34) - 3c4: 277c 0080 0000 movel #8388608,%a3@(42) - 3ca: 002a - 3cc: 2f3c 0018 0000 movel #1572864,%sp@- - 3d2: 2f3c 0080 0000 movel #8388608,%sp@- - 3d8: 2f3c 4088 0000 movel #1082654720,%sp@- - 3de: 206b 0026 moveal %a3@(38),%a0 - 3e2: 4e90 jsr %a0@ - 3e4: 4fef 000c lea %sp@(12),%sp - 3e8: 6000 ff7e braw 368 - 3ec: 70ef moveq #-17,%d0 - 3ee: 608a bras 37a - 3f0: 4240 clrw %d0 - 3f2: 6086 bras 37a - 3f4: 4e75 rts - 3f6: 8c52 orw %a2@,%d6 - 3f8: 4469 736b negw %a1@(29547) - 3fc: 436f .short 0x436f - 3fe: 6e74 bgts 474 - 400: 726f moveq #111,%d1 - 402: 6c00 0000 bgew 404 - -00000406 : - 406: 2f0a movel %a2,%sp@- - 408: 2469 0014 moveal %a1@(20),%a2 - 40c: b4fc 0000 cmpaw #0,%a2 - 410: 6718 beqs 42a - 412: 0c68 0008 001a cmpiw #8,%a0@(26) - 418: 6614 bnes 42e - 41a: 701e moveq #30,%d0 - 41c: 43e8 001c lea %a0@(28),%a1 - 420: 2052 moveal %a2@,%a0 - 422: a02e .short 0xa02e - 424: 4240 clrw %d0 - 426: 245f moveal %sp@+,%a2 - 428: 4e75 rts - 42a: 70ee moveq #-18,%d0 - 42c: 60f8 bras 426 - 42e: 70ee moveq #-18,%d0 - 430: 60f4 bras 426 - 432: 4e75 rts - 434: 8b52 orw %d5,%a2@ - 436: 4469 736b negw %a1@(29547) - 43a: 5374 6174 7573 subqw #1,%a4@(0000000075730000)@(0000000000000000) - 440: 0000 diff --git a/obj/rdisk_braun_abs.sym b/obj/rdisk_braun_abs.sym deleted file mode 100644 index 91ba32d..0000000 --- a/obj/rdisk_braun_abs.sym +++ /dev/null @@ -1,21 +0,0 @@ - -obj/rdisk_braun_reloc.o: file format elf32-m68k - -SYMBOL TABLE: -40851d70 l d .text 00000000 .text -00000000 l d .comment 00000000 .comment -00000000 l df *ABS* 00000000 rdisk_braun.c -40852176 g F .text 0000002c RDiskStatus -40851dee g F .text 00000014 RomDrvAddDrive -40852064 g F .text 0000003c RomDrvClose -40851ed2 g F .text 00000182 RomDrvPrime -00000000 *UND* 00000000 _start -408520ae g F .text 000000b6 RDiskControl -408541b2 g .text 00000000 __bss_start -40851d70 g F .text 00000032 BBraunROMDisk -40851e14 g F .text 000000ae RomDrvOpen -408541b2 g .text 00000000 _edata -408541b4 g .text 00000000 _end -40851db2 g F .text 0000002e RomDrvCopy - - diff --git a/obj/rdisk_braun_rel.sym b/obj/rdisk_braun_rel.sym deleted file mode 100644 index 6607370..0000000 --- a/obj/rdisk_braun_rel.sym +++ /dev/null @@ -1,19 +0,0 @@ - -obj/rdisk_braun.o: file format elf32-m68k - -SYMBOL TABLE: -00000000 l df *ABS* 00000000 rdisk_braun.c -00000000 l d .text 00000000 .text -00000000 l d .data 00000000 .data -00000000 l d .bss 00000000 .bss -00000000 l d .comment 00000000 .comment -00000000 g F .text 00000032 BBraunROMDisk -00000042 g F .text 0000002e RomDrvCopy -0000007e g F .text 00000014 RomDrvAddDrive -000000a4 g F .text 000000ae RomDrvOpen -00000162 g F .text 00000182 RomDrvPrime -000002f4 g F .text 0000003c RomDrvClose -0000033e g F .text 000000b6 RDiskControl -00000406 g F .text 0000002c RDiskStatus - - diff --git a/obj/rdisk_braun_reloc.o b/obj/rdisk_braun_reloc.o deleted file mode 100755 index f5de767..0000000 Binary files a/obj/rdisk_braun_reloc.o and /dev/null differ diff --git a/obj/rdisk_braun_reloc.s b/obj/rdisk_braun_reloc.s deleted file mode 100644 index 7b6ae24..0000000 --- a/obj/rdisk_braun_reloc.s +++ /dev/null @@ -1,368 +0,0 @@ - -obj/rdisk_braun_reloc.o: file format elf32-m68k - - -Disassembly of section .text: - -40851d70 : - ... -40851da0: 4e75 rts -40851da2: 8d42 .short 0x8d42 -40851da4: 4272 6175 6e52 clrw %a2@(000000006e524f4d)@(0000000000000000) -40851daa: 4f4d -40851dac: 4469 736b negw %a1@(29547) - ... - -40851db2 : -40851db2: 598f subql #4,%sp -40851db4: 1f7c 0001 0003 moveb #1,%sp@(3) -40851dba: 41ef 0003 lea %sp@(3),%a0 -40851dbe: 1010 moveb %a0@,%d0 -40851dc0: a05d .short 0xa05d -40851dc2: 1080 moveb %d0,%a0@ -40851dc4: 202f 0010 movel %sp@(16),%d0 -40851dc8: 226f 000c moveal %sp@(12),%a1 -40851dcc: 206f 0008 moveal %sp@(8),%a0 -40851dd0: a02e .short 0xa02e -40851dd2: 41ef 0003 lea %sp@(3),%a0 -40851dd6: 1010 moveb %a0@,%d0 -40851dd8: a05d .short 0xa05d -40851dda: 1080 moveb %d0,%a0@ -40851ddc: 588f addql #4,%sp -40851dde: 4e75 rts -40851de0: 8a52 orw %a2@,%d5 -40851de2: 6f6d bles 40851e51 -40851de4: 4472 7643 negw %a2@(0000000000000043,%d7:w:8) -40851de8: 6f70 bles 40851e5a -40851dea: 7900 .short 0x7900 - ... - -40851dee : -40851dee: 4280 clrl %d0 -40851df0: 302f 0006 movew %sp@(6),%d0 -40851df4: 4840 swap %d0 -40851df6: 302f 0004 movew %sp@(4),%d0 -40851dfa: 206f 0008 moveal %sp@(8),%a0 -40851dfe: a04e .short 0xa04e -40851e00: 4e75 rts -40851e02: 8e52 orw %a2@,%d7 -40851e04: 6f6d bles 40851e73 -40851e06: 4472 7641 negw %a2@(0000000000000041,%d7:w:8) -40851e0a: 6464 bccs 40851e70 -40851e0c: -40851e14 : -40851e14: 48e7 1030 moveml %d3/%a2-%a3,%sp@- -40851e18: 2649 moveal %a1,%a3 -40851e1a: 203c 4085 1d70 movel #1082465648,%d0 -40851e20: a055 .short 0xa055 -40851e22: 598f subql #4,%sp -40851e24: 2ebc 0000 0308 movel #776,%sp@ -40851e2a: 2057 moveal %sp@,%a0 -40851e2c: 588f addql #4,%sp -40851e2e: 2068 0002 moveal %a0@(2),%a0 -40851e32: b0fc 0000 cmpaw #0,%a0 -40851e36: 671a beqs 40851e52 -40851e38: 7601 moveq #1,%d3 -40851e3a: 6008 bras 40851e44 -40851e3c: 2050 moveal %a0@,%a0 -40851e3e: b0fc 0000 cmpaw #0,%a0 -40851e42: 6710 beqs 40851e54 -40851e44: 3468 0006 moveaw %a0@(6),%a2 -40851e48: b68a cmpl %a2,%d3 -40851e4a: 6ef0 bgts 40851e3c -40851e4c: 260a movel %a2,%d3 -40851e4e: 5283 addql #1,%d3 -40851e50: 60ea bras 40851e3c -40851e52: 7601 moveq #1,%d3 -40851e54: 7032 moveq #50,%d0 -40851e56: a722 .short 0xa722 -40851e58: 2748 0014 movel %a0,%a3@(20) -40851e5c: a029 .short 0xa029 -40851e5e: 206b 0014 moveal %a3@(20),%a0 -40851e62: 2450 moveal %a0@,%a2 -40851e64: 7040 moveq #64,%d0 -40851e66: a51e .short 0xa51e -40851e68: 2248 moveal %a0,%a1 -40851e6a: 2548 001e movel %a0,%a2@(30) -40851e6e: 674e beqs 40851ebe -40851e70: 7040 moveq #64,%d0 -40851e72: 41f9 4085 1db2 lea 40851db2 ,%a0 -40851e78: a02e .short 0xa02e -40851e7a: 202a 001e movel %a2@(30),%d0 -40851e7e: a055 .short 0xa055 -40851e80: 2540 0026 movel %d0,%a2@(38) -40851e84: 157c fff0 0002 moveb #-16,%a2@(2) -40851e8a: 157c 0008 0003 moveb #8,%a2@(3) -40851e90: 3543 000c movew %d3,%a2@(12) -40851e94: 302b 0018 movew %a3@(24),%d0 -40851e98: 3540 000e movew %d0,%a2@(14) -40851e9c: 357c 0c00 0012 movew #3072,%a2@(18) -40851ea2: 426a 0014 clrw %a2@(20) -40851ea6: 486a 0006 pea %a2@(6) -40851eaa: 3f03 movew %d3,%sp@- -40851eac: 3f00 movew %d0,%sp@- -40851eae: 4eb9 4085 1dee jsr 40851dee -40851eb4: 508f addql #8,%sp -40851eb6: 4240 clrw %d0 -40851eb8: 4cdf 0c08 moveml %sp@+,%d3/%a2-%a3 -40851ebc: 4e75 rts -40851ebe: 70e9 moveq #-23,%d0 -40851ec0: 60f6 bras 40851eb8 -40851ec2: 4e75 rts -40851ec4: 8a52 orw %a2@,%d5 -40851ec6: 6f6d bles 40851f35 -40851ec8: 4472 764f negw %a2@(000000000000004f,%d7:w:8) -40851ecc: 7065 moveq #101,%d0 -40851ece: 6e00 0000 bgtw 40851ed0 - -40851ed2 : -40851ed2: 48e7 1c3a moveml %d3-%d5/%a2-%a4/%fp,%sp@- -40851ed6: 2448 moveal %a0,%a2 -40851ed8: 2849 moveal %a1,%a4 -40851eda: 2069 0014 moveal %a1@(20),%a0 -40851ede: b0fc 0000 cmpaw #0,%a0 -40851ee2: 6700 0158 beqw 4085203c -40851ee6: 2650 moveal %a0@,%a3 -40851ee8: 4a2b 002e tstb %a3@(46) -40851eec: 6616 bnes 40851f04 -40851eee: 177c 0001 002e moveb #1,%a3@(46) -40851ef4: 50eb 0002 st %a3@(2) -40851ef8: 42ab 0022 clrl %a3@(34) -40851efc: 277c 4088 0000 movel #1082654720,%a3@(42) -40851f02: 002a -40851f04: 322a 002c movew %a2@(44),%d1 -40851f08: 3001 movew %d1,%d0 -40851f0a: 0240 000f andiw #15,%d0 -40851f0e: 0c40 0001 cmpiw #1,%d0 -40851f12: 6766 beqs 40851f7a -40851f14: 0c40 0003 cmpiw #3,%d0 -40851f18: 6766 beqs 40851f80 -40851f1a: 4a40 tstw %d0 -40851f1c: 6756 beqs 40851f74 -40851f1e: 302a 0006 movew %a2@(6),%d0 -40851f22: 0240 00ff andiw #255,%d0 -40851f26: 0c40 0002 cmpiw #2,%d0 -40851f2a: 6760 beqs 40851f8c -40851f2c: 0c40 0003 cmpiw #3,%d0 -40851f30: 6600 0116 bnew 40852048 -40851f34: 4a2b 0002 tstb %a3@(2) -40851f38: 6600 0114 bnew 4085204e -40851f3c: 4a2b 0030 tstb %a3@(48) -40851f40: 6600 00d4 bnew 40852016 -40851f44: 202a 0024 movel %a2@(36),%d0 -40851f48: 226b 002a moveal %a3@(42),%a1 -40851f4c: d3ce addal %fp,%a1 -40851f4e: 206a 0020 moveal %a2@(32),%a0 -40851f52: a22e .short 0xa22e -40851f54: 202a 0024 movel %a2@(36),%d0 -40851f58: 2540 0028 movel %d0,%a2@(40) -40851f5c: d08e addl %fp,%d0 -40851f5e: 2940 0010 movel %d0,%a4@(16) -40851f62: 202c 0010 movel %a4@(16),%d0 -40851f66: 2540 002e movel %d0,%a2@(46) -40851f6a: 4243 clrw %d3 -40851f6c: 3003 movew %d3,%d0 -40851f6e: 4cdf 5c38 moveml %sp@+,%d3-%d5/%a2-%a4/%fp -40851f72: 4e75 rts -40851f74: 2c6c 0010 moveal %a4@(16),%fp -40851f78: 60a4 bras 40851f1e -40851f7a: 2c6a 002e moveal %a2@(46),%fp -40851f7e: 609e bras 40851f1e -40851f80: 202c 0010 movel %a4@(16),%d0 -40851f84: 2c40 moveal %d0,%fp -40851f86: ddea 002e addal %a2@(46),%fp -40851f8a: 6092 bras 40851f1e -40851f8c: 3601 movew %d1,%d3 -40851f8e: 0243 0040 andiw #64,%d3 -40851f92: 0801 0006 btst #6,%d1 -40851f96: 6600 00aa bnew 40852042 -40851f9a: 282a 0024 movel %a2@(36),%d4 -40851f9e: 4a2b 0002 tstb %a3@(2) -40851fa2: 663c bnes 40851fe0 -40851fa4: 4aab 0022 tstl %a3@(34) -40851fa8: 6736 beqs 40851fe0 -40851faa: 4a2b 0030 tstb %a3@(48) -40851fae: 6610 bnes 40851fc0 -40851fb0: 2004 movel %d4,%d0 -40851fb2: 226a 0020 moveal %a2@(32),%a1 -40851fb6: 206b 002a moveal %a3@(42),%a0 -40851fba: d1ce addal %fp,%a0 -40851fbc: a22e .short 0xa22e -40851fbe: 603e bras 40851ffe -40851fc0: 2a2b 0026 movel %a3@(38),%d5 -40851fc4: 202a 0020 movel %a2@(32),%d0 -40851fc8: a055 .short 0xa055 -40851fca: 2f04 movel %d4,%sp@- -40851fcc: 2f00 movel %d0,%sp@- -40851fce: 202b 002a movel %a3@(42),%d0 -40851fd2: d08e addl %fp,%d0 -40851fd4: 2f00 movel %d0,%sp@- -40851fd6: 2045 moveal %d5,%a0 -40851fd8: 4e90 jsr %a0@ -40851fda: 4fef 000c lea %sp@(12),%sp -40851fde: 601e bras 40851ffe -40851fe0: 2a2b 0026 movel %a3@(38),%d5 -40851fe4: 202a 0020 movel %a2@(32),%d0 -40851fe8: a055 .short 0xa055 -40851fea: 2f04 movel %d4,%sp@- -40851fec: 2f00 movel %d0,%sp@- -40851fee: 202b 002a movel %a3@(42),%d0 -40851ff2: d08e addl %fp,%d0 -40851ff4: 2f00 movel %d0,%sp@- -40851ff6: 2045 moveal %d5,%a0 -40851ff8: 4e90 jsr %a0@ -40851ffa: 4fef 000c lea %sp@(12),%sp -40851ffe: 2544 0028 movel %d4,%a2@(40) -40852002: 200e movel %fp,%d0 -40852004: d084 addl %d4,%d0 -40852006: 2940 0010 movel %d0,%a4@(16) -4085200a: 202c 0010 movel %a4@(16),%d0 -4085200e: 2540 002e movel %d0,%a2@(46) -40852012: 6000 ff58 braw 40851f6c -40852016: 262b 0026 movel %a3@(38),%d3 -4085201a: 282a 0024 movel %a2@(36),%d4 -4085201e: 266b 002a moveal %a3@(42),%a3 -40852022: d7ce addal %fp,%a3 -40852024: 202a 0020 movel %a2@(32),%d0 -40852028: a055 .short 0xa055 -4085202a: 2f04 movel %d4,%sp@- -4085202c: 2f0b movel %a3,%sp@- -4085202e: 2f00 movel %d0,%sp@- -40852030: 2043 moveal %d3,%a0 -40852032: 4e90 jsr %a0@ -40852034: 4fef 000c lea %sp@(12),%sp -40852038: 6000 ff1a braw 40851f54 -4085203c: 76bf moveq #-65,%d3 -4085203e: 6000 ff2c braw 40851f6c -40852042: 4243 clrw %d3 -40852044: 6000 ff26 braw 40851f6c -40852048: 76d4 moveq #-44,%d3 -4085204a: 6000 ff20 braw 40851f6c -4085204e: 76d4 moveq #-44,%d3 -40852050: 6000 ff1a braw 40851f6c -40852054: 4e75 rts -40852056: 8b52 orw %d5,%a2@ -40852058: 6f6d bles 408520c7 -4085205a: 4472 7650 negw %a2@(0000000000000050,%d7:w:8) -4085205e: 7269 moveq #105,%d1 -40852060: 6d65 blts 408520c7 - ... - -40852064 : -40852064: 2f0b movel %a3,%sp@- -40852066: 2f0a movel %a2,%sp@- -40852068: 2449 moveal %a1,%a2 -4085206a: 2069 0014 moveal %a1@(20),%a0 -4085206e: b0fc 0000 cmpaw #0,%a0 -40852072: 6724 beqs 40852098 -40852074: 2650 moveal %a0@,%a3 -40852076: 206b 0022 moveal %a3@(34),%a0 -4085207a: b0fc 0000 cmpaw #0,%a0 -4085207e: 6702 beqs 40852082 -40852080: a01f .short 0xa01f -40852082: 206b 001e moveal %a3@(30),%a0 -40852086: a01f .short 0xa01f -40852088: 206a 0014 moveal %a2@(20),%a0 -4085208c: a02a .short 0xa02a -4085208e: 206a 0014 moveal %a2@(20),%a0 -40852092: a023 .short 0xa023 -40852094: 42aa 0014 clrl %a2@(20) -40852098: 4240 clrw %d0 -4085209a: 245f moveal %sp@+,%a2 -4085209c: 265f moveal %sp@+,%a3 -4085209e: 4e75 rts -408520a0: 8b52 orw %d5,%a2@ -408520a2: 6f6d bles 40852111 -408520a4: 4472 7643 negw %a2@(0000000000000043,%d7:w:8) -408520a8: 6c6f bges 40852119 -408520aa: 7365 .short 0x7365 - ... - -408520ae : -408520ae: 2f0b movel %a3,%sp@- -408520b0: 2f0a movel %a2,%sp@- -408520b2: 2449 moveal %a1,%a2 -408520b4: 0c68 0041 001a cmpiw #65,%a0@(26) -408520ba: 6600 00a0 bnew 4085215c -408520be: 2069 0014 moveal %a1@(20),%a0 -408520c2: b0fc 0000 cmpaw #0,%a0 -408520c6: 6700 0098 beqw 40852160 -408520ca: 2650 moveal %a0@,%a3 -408520cc: 4a2b 002f tstb %a3@(47) -408520d0: 6706 beqs 408520d8 -408520d2: 4aab 0022 tstl %a3@(34) -408520d6: 6718 beqs 408520f0 -408520d8: 426a 0022 clrw %a2@(34) -408520dc: 302a 0004 movew %a2@(4),%d0 -408520e0: 0240 dfff andiw #-8193,%d0 -408520e4: 3540 0004 movew %d0,%a2@(4) -408520e8: 4240 clrw %d0 -408520ea: 245f moveal %sp@+,%a2 -408520ec: 265f moveal %sp@+,%a3 -408520ee: 4e75 rts -408520f0: 4a38 0cb2 tstb cb2 -408520f4: 6730 beqs 40852126 -408520f6: 7018 moveq #24,%d0 -408520f8: 4840 swap %d0 -408520fa: a51e .short 0xa51e -408520fc: 2008 movel %a0,%d0 -408520fe: 2748 0022 movel %a0,%a3@(34) -40852102: 4a80 tstl %d0 -40852104: 67d2 beqs 408520d8 -40852106: a055 .short 0xa055 -40852108: 2740 002a movel %d0,%a3@(42) -4085210c: 2f3c 0018 0000 movel #1572864,%sp@- -40852112: 2f00 movel %d0,%sp@- -40852114: 2f3c 4088 0000 movel #1082654720,%sp@- -4085211a: 206b 0026 moveal %a3@(38),%a0 -4085211e: 4e90 jsr %a0@ -40852120: 4fef 000c lea %sp@(12),%sp -40852124: 60b2 bras 408520d8 -40852126: 177c 0001 0030 moveb #1,%a3@(48) -4085212c: 7001 moveq #1,%d0 -4085212e: a51e .short 0xa51e -40852130: 2748 0022 movel %a0,%a3@(34) -40852134: 277c 0080 0000 movel #8388608,%a3@(42) -4085213a: 002a -4085213c: 2f3c 0018 0000 movel #1572864,%sp@- -40852142: 2f3c 0080 0000 movel #8388608,%sp@- -40852148: 2f3c 4088 0000 movel #1082654720,%sp@- -4085214e: 206b 0026 moveal %a3@(38),%a0 -40852152: 4e90 jsr %a0@ -40852154: 4fef 000c lea %sp@(12),%sp -40852158: 6000 ff7e braw 408520d8 -4085215c: 70ef moveq #-17,%d0 -4085215e: 608a bras 408520ea -40852160: 4240 clrw %d0 -40852162: 6086 bras 408520ea -40852164: 4e75 rts -40852166: 8c52 orw %a2@,%d6 -40852168: 4469 736b negw %a1@(29547) -4085216c: 436f .short 0x436f -4085216e: 6e74 bgts 408521e4 -40852170: 726f moveq #111,%d1 -40852172: 6c00 0000 bgew 40852174 - -40852176 : -40852176: 2f0a movel %a2,%sp@- -40852178: 2469 0014 moveal %a1@(20),%a2 -4085217c: b4fc 0000 cmpaw #0,%a2 -40852180: 6718 beqs 4085219a -40852182: 0c68 0008 001a cmpiw #8,%a0@(26) -40852188: 6614 bnes 4085219e -4085218a: 701e moveq #30,%d0 -4085218c: 43e8 001c lea %a0@(28),%a1 -40852190: 2052 moveal %a2@,%a0 -40852192: a02e .short 0xa02e -40852194: 4240 clrw %d0 -40852196: 245f moveal %sp@+,%a2 -40852198: 4e75 rts -4085219a: 70ee moveq #-18,%d0 -4085219c: 60f8 bras 40852196 -4085219e: 70ee moveq #-18,%d0 -408521a0: 60f4 bras 40852196 -408521a2: 4e75 rts -408521a4: 8b52 orw %d5,%a2@ -408521a6: 4469 736b negw %a1@(29547) -408521aa: 5374 6174 7573 subqw #1,%a4@(0000000075730000)@(0000000000000000) -408521b0: 0000 diff --git a/obj/rdisk_rel.sym b/obj/rdisk_rel.sym deleted file mode 100644 index 49753ab..0000000 --- a/obj/rdisk_rel.sym +++ /dev/null @@ -1,20 +0,0 @@ - -obj/rdisk.o: file format elf32-m68k - -SYMBOL TABLE: -00000000 l df *ABS* 00000000 rdisk.c -00000000 l d .text 00000000 .text -00000000 l d .data 00000000 .data -00000000 l d .bss 00000000 .bss -00000000 l d .comment 00000000 .comment -00000000 g F .text 00000032 GWROMDisk -0000003e g F .text 00000014 RDiskAddDrive -00000062 g F .text 0000002e RDiskCopy24 -0000009e g F .text 000000b0 RDiskOpen -0000015c g F .text 0000001e RDiskInit -00000186 g F .text 000000ea RDiskPrime -00000280 g F .text 00000004 RDiskControl -00000294 g F .text 0000002c RDiskStatus -000002d0 g F .text 00000032 RDiskClose - - diff --git a/obj/rdisk_reloc.o b/obj/rdisk_reloc.o deleted file mode 100755 index 4be5429..0000000 Binary files a/obj/rdisk_reloc.o and /dev/null differ diff --git a/obj/rdisk_reloc.s b/obj/rdisk_reloc.s deleted file mode 100644 index 9258e07..0000000 --- a/obj/rdisk_reloc.s +++ /dev/null @@ -1,272 +0,0 @@ - -obj/rdisk_reloc.o: file format elf32-m68k - - -Disassembly of section .text: - -40851d70 : - ... -40851da0: 4e75 rts -40851da2: 8947 .short 0x8947 -40851da4: 5752 subqw #3,%a2@ -40851da6: 4f4d .short 0x4f4d -40851da8: 4469 736b negw %a1@(29547) - ... - -40851dae : -40851dae: 4280 clrl %d0 -40851db0: 302f 0006 movew %sp@(6),%d0 -40851db4: 4840 swap %d0 -40851db6: 302f 0004 movew %sp@(4),%d0 -40851dba: 206f 0008 moveal %sp@(8),%a0 -40851dbe: a04e .short 0xa04e -40851dc0: 4e75 rts -40851dc2: 8d52 orw %d6,%a2@ -40851dc4: 4469 736b negw %a1@(29547) -40851dc8: 4164 .short 0x4164 -40851dca: 6444 bccs 40851e10 -40851dcc: 7269 moveq #105,%d1 -40851dce: 7665 moveq #101,%d3 - ... - -40851dd2 : -40851dd2: 598f subql #4,%sp -40851dd4: 1f7c 0001 0003 moveb #1,%sp@(3) -40851dda: 41ef 0003 lea %sp@(3),%a0 -40851dde: 1010 moveb %a0@,%d0 -40851de0: a05d .short 0xa05d -40851de2: 1080 moveb %d0,%a0@ -40851de4: 202f 0010 movel %sp@(16),%d0 -40851de8: 226f 000c moveal %sp@(12),%a1 -40851dec: 206f 0008 moveal %sp@(8),%a0 -40851df0: a02e .short 0xa02e -40851df2: 41ef 0003 lea %sp@(3),%a0 -40851df6: 1010 moveb %a0@,%d0 -40851df8: a05d .short 0xa05d -40851dfa: 1080 moveb %d0,%a0@ -40851dfc: 588f addql #4,%sp -40851dfe: 4e75 rts -40851e00: 8b52 orw %d5,%a2@ -40851e02: 4469 736b negw %a1@(29547) -40851e06: 436f .short 0x436f -40851e08: 7079 moveq #121,%d0 -40851e0a: 3234 0000 movew %a4@(0000000000000000,%d0:w),%d1 - -40851e0e : -40851e0e: 48e7 1030 moveml %d3/%a2-%a3,%sp@- -40851e12: 2649 moveal %a1,%a3 -40851e14: 4aa9 0014 tstl %a1@(20) -40851e18: 6708 beqs 40851e22 -40851e1a: 4240 clrw %d0 -40851e1c: 4cdf 0c08 moveml %sp@+,%d3/%a2-%a3 -40851e20: 4e75 rts -40851e22: 203c 4085 1d70 movel #1082465648,%d0 -40851e28: a055 .short 0xa055 -40851e2a: 598f subql #4,%sp -40851e2c: 2ebc 0000 0308 movel #776,%sp@ -40851e32: 2057 moveal %sp@,%a0 -40851e34: 588f addql #4,%sp -40851e36: 2068 0002 moveal %a0@(2),%a0 -40851e3a: b0fc 0000 cmpaw #0,%a0 -40851e3e: 671a beqs 40851e5a -40851e40: 7601 moveq #1,%d3 -40851e42: 6008 bras 40851e4c -40851e44: 2050 moveal %a0@,%a0 -40851e46: b0fc 0000 cmpaw #0,%a0 -40851e4a: 6710 beqs 40851e5c -40851e4c: 3468 0006 moveaw %a0@(6),%a2 -40851e50: b68a cmpl %a2,%d3 -40851e52: 6ef0 bgts 40851e44 -40851e54: 260a movel %a2,%d3 -40851e56: 5283 addql #1,%d3 -40851e58: 60ea bras 40851e44 -40851e5a: 7601 moveq #1,%d3 -40851e5c: 702a moveq #42,%d0 -40851e5e: a722 .short 0xa722 -40851e60: 2748 0014 movel %a0,%a3@(20) -40851e64: 6752 beqs 40851eb8 -40851e66: a029 .short 0xa029 -40851e68: 206b 0014 moveal %a3@(20),%a0 -40851e6c: 2050 moveal %a0@,%a0 -40851e6e: 4228 001e clrb %a0@(30) -40851e72: 42a8 0020 clrl %a0@(32) -40851e76: 42a8 0024 clrl %a0@(36) -40851e7a: 4228 0028 clrb %a0@(40) -40851e7e: 91c8 subal %a0,%a0 -40851e80: 117c fff0 0002 moveb #-16,%a0@(2) -40851e86: 117c 0008 0003 moveb #8,%a0@(3) -40851e8c: 3143 000c movew %d3,%a0@(12) -40851e90: 302b 0018 movew %a3@(24),%d0 -40851e94: 3140 000e movew %d0,%a0@(14) -40851e98: 317c 0c00 0012 movew #3072,%a0@(18) -40851e9e: 4268 0014 clrw %a0@(20) -40851ea2: 4878 0006 pea 6 -40851ea6: 3f03 movew %d3,%sp@- -40851ea8: 3f00 movew %d0,%sp@- -40851eaa: 4eb9 4085 1dae jsr 40851dae -40851eb0: 508f addql #8,%sp -40851eb2: 4240 clrw %d0 -40851eb4: 6000 ff66 braw 40851e1c -40851eb8: 70e9 moveq #-23,%d0 -40851eba: 6000 ff60 braw 40851e1c -40851ebe: 4e75 rts -40851ec0: 8952 orw %d4,%a2@ -40851ec2: 4469 736b negw %a1@(29547) -40851ec6: 4f70 .short 0x4f70 -40851ec8: 656e bcss 40851f38 - ... - -40851ecc : -40851ecc: 206f 000c moveal %sp@(12),%a0 -40851ed0: 117c 0001 001e moveb #1,%a0@(30) -40851ed6: 50e8 0002 st %a0@(2) -40851eda: 42a8 0020 clrl %a0@(32) -40851ede: 42a8 0024 clrl %a0@(36) -40851ee2: 4228 0028 clrb %a0@(40) -40851ee6: 4240 clrw %d0 -40851ee8: 4e75 rts -40851eea: 8952 orw %d4,%a2@ -40851eec: 4469 736b negw %a1@(29547) -40851ef0: 496e .short 0x496e -40851ef2: 6974 bvss 40851f68 - ... - -40851ef6 : -40851ef6: 48e7 1c30 moveml %d3-%d5/%a2-%a3,%sp@- -40851efa: 2448 moveal %a0,%a2 -40851efc: 2649 moveal %a1,%a3 -40851efe: 2069 0014 moveal %a1@(20),%a0 -40851f02: b0fc 0000 cmpaw #0,%a0 -40851f06: 6700 00c6 beqw 40851fce -40851f0a: 2050 moveal %a0@,%a0 -40851f0c: 4a28 001e tstb %a0@(30) -40851f10: 6738 beqs 40851f4a -40851f12: 322a 002c movew %a2@(44),%d1 -40851f16: 3001 movew %d1,%d0 -40851f18: 0240 000f andiw #15,%d0 -40851f1c: 0c40 0001 cmpiw #1,%d0 -40851f20: 6746 beqs 40851f68 -40851f22: 0c40 0003 cmpiw #3,%d0 -40851f26: 6746 beqs 40851f6e -40851f28: 4a40 tstw %d0 -40851f2a: 6736 beqs 40851f62 -40851f2c: 7800 moveq #0,%d4 -40851f2e: 102a 0007 moveb %a2@(7),%d0 -40851f32: 0c00 0002 cmpib #2,%d0 -40851f36: 6740 beqs 40851f78 -40851f38: 0c00 0003 cmpib #3,%d0 -40851f3c: 6700 009c beqw 40851fda -40851f40: 4243 clrw %d3 -40851f42: 3003 movew %d3,%d0 -40851f44: 4cdf 0c38 moveml %sp@+,%d3-%d5/%a2-%a3 -40851f48: 4e75 rts -40851f4a: 117c 0001 001e moveb #1,%a0@(30) -40851f50: 50e8 0002 st %a0@(2) -40851f54: 42a8 0020 clrl %a0@(32) -40851f58: 42a8 0024 clrl %a0@(36) -40851f5c: 4228 0028 clrb %a0@(40) -40851f60: 60b0 bras 40851f12 -40851f62: 282b 0010 movel %a3@(16),%d4 -40851f66: 60c6 bras 40851f2e -40851f68: 282a 002e movel %a2@(46),%d4 -40851f6c: 60c0 bras 40851f2e -40851f6e: 282b 0010 movel %a3@(16),%d4 -40851f72: d8aa 002e addl %a2@(46),%d4 -40851f76: 60b6 bras 40851f2e -40851f78: 3601 movew %d1,%d3 -40851f7a: 0243 0040 andiw #64,%d3 -40851f7e: 0801 0006 btst #6,%d1 -40851f82: 6650 bnes 40851fd4 -40851f84: 2a04 movel %d4,%d5 -40851f86: 0685 4088 0000 addil #1082654720,%d5 -40851f8c: 4a38 0cb2 tstb cb2 -40851f90: 6720 beqs 40851fb2 -40851f92: 202a 0024 movel %a2@(36),%d0 -40851f96: 226a 0020 moveal %a2@(32),%a1 -40851f9a: 2045 moveal %d5,%a0 -40851f9c: a02e .short 0xa02e -40851f9e: 202a 0024 movel %a2@(36),%d0 -40851fa2: 2540 0028 movel %d0,%a2@(40) -40851fa6: d880 addl %d0,%d4 -40851fa8: 2744 0010 movel %d4,%a3@(16) -40851fac: 2544 002e movel %d4,%a2@(46) -40851fb0: 6090 bras 40851f42 -40851fb2: 202a 0020 movel %a2@(32),%d0 -40851fb6: a055 .short 0xa055 -40851fb8: a091 .short 0xa091 -40851fba: 2f2a 0024 movel %a2@(36),%sp@- -40851fbe: 2f00 movel %d0,%sp@- -40851fc0: 2f05 movel %d5,%sp@- -40851fc2: 4eb9 4085 1dd2 jsr 40851dd2 -40851fc8: 4fef 000c lea %sp@(12),%sp -40851fcc: 60d0 bras 40851f9e -40851fce: 76bf moveq #-65,%d3 -40851fd0: 6000 ff70 braw 40851f42 -40851fd4: 4243 clrw %d3 -40851fd6: 6000 ff6a braw 40851f42 -40851fda: 76d4 moveq #-44,%d3 -40851fdc: 6000 ff64 braw 40851f42 -40851fe0: 4e75 rts -40851fe2: 8a52 orw %a2@,%d5 -40851fe4: 4469 736b negw %a1@(29547) -40851fe8: 5072 696d 6500 addqw #8,%a2@(0000000000006500)@(0000000000000000) - ... - -40851ff0 : -40851ff0: 70ef moveq #-17,%d0 -40851ff2: 4e75 rts -40851ff4: 8c52 orw %a2@,%d6 -40851ff6: 4469 736b negw %a1@(29547) -40851ffa: 436f .short 0x436f -40851ffc: 6e74 bgts 40852072 -40851ffe: 726f moveq #111,%d1 -40852000: 6c00 0000 bgew 40852002 - -40852004 : -40852004: 2f0a movel %a2,%sp@- -40852006: 2469 0014 moveal %a1@(20),%a2 -4085200a: b4fc 0000 cmpaw #0,%a2 -4085200e: 6718 beqs 40852028 -40852010: 0c68 0008 001a cmpiw #8,%a0@(26) -40852016: 6614 bnes 4085202c -40852018: 701e moveq #30,%d0 -4085201a: 43e8 001c lea %a0@(28),%a1 -4085201e: 2052 moveal %a2@,%a0 -40852020: a02e .short 0xa02e -40852022: 4240 clrw %d0 -40852024: 245f moveal %sp@+,%a2 -40852026: 4e75 rts -40852028: 70ee moveq #-18,%d0 -4085202a: 60f8 bras 40852024 -4085202c: 70ee moveq #-18,%d0 -4085202e: 60f4 bras 40852024 -40852030: 4e75 rts -40852032: 8b52 orw %d5,%a2@ -40852034: 4469 736b negw %a1@(29547) -40852038: 5374 6174 7573 subqw #1,%a4@(0000000075730000)@(0000000000000000) -4085203e: 0000 - -40852040 : -40852040: 2f0a movel %a2,%sp@- -40852042: 2449 moveal %a1,%a2 -40852044: 2069 0014 moveal %a1@(20),%a0 -40852048: b0fc 0000 cmpaw #0,%a0 -4085204c: 671a beqs 40852068 -4085204e: 2050 moveal %a0@,%a0 -40852050: 2068 0024 moveal %a0@(36),%a0 -40852054: b0fc 0000 cmpaw #0,%a0 -40852058: 6702 beqs 4085205c -4085205a: a01f .short 0xa01f -4085205c: 206a 0014 moveal %a2@(20),%a0 -40852060: a02a .short 0xa02a -40852062: 206a 0014 moveal %a2@(20),%a0 -40852066: a023 .short 0xa023 -40852068: 42aa 0014 clrl %a2@(20) -4085206c: 4240 clrw %d0 -4085206e: 245f moveal %sp@+,%a2 -40852070: 4e75 rts -40852072: 8a52 orw %a2@,%d5 -40852074: 4469 736b negw %a1@(29547) -40852078: 436c .short 0x436c -4085207a: 6f73 bles 408520ef -4085207c: 6500 0000 bcsw 4085207e diff --git a/rdisk.c b/rdisk.c index 7df6671..a33777d 100644 --- a/rdisk.c +++ b/rdisk.c @@ -6,34 +6,7 @@ #include #include -#include "rdtraps.h" - -// This function is here just to put padding at the -// beginning of the output file -void GWROMDisk() { - __asm__ __volatile__ - ( - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t":::); -} - -#define RDiskSize (0x00180000L) -#define RDiskBuf ((char*)0x40880000) -#define BufPtr ((Ptr*)0x10C) -#define MemTop ((Ptr*)0x108) -#define MMU32bit ((char*)0x0CB2) - -typedef void (*ROMDiskCopy_t)(char *, char *, unsigned long); +#include "rdisk.h" // Switch to 24-bit mode and copy. Call this with // PC==0x408XXXXX, not PC==0x008XXXXX @@ -46,7 +19,7 @@ void RDiskCopy24(char *sourcePtr, char *destPtr, unsigned long byteCount) { typedef struct RDiskStorage_s { DrvSts2 drvsts; - char init_done; + unsigned long init_done; char *ramdisk; Ptr ramdisk_alloc; char ramdisk_valid; @@ -62,10 +35,6 @@ OSErr RDiskOpen(IOParamPtr p, DCtlPtr d) { // Do nothing if already opened if (d->dCtlStorage) { return noErr; } - // Reference GWROMDisk() just so it ends up - // at the beginning of the output file - StripAddress(&GWROMDisk); - // Figure out first available drive number drvNum = 1; for (dq = (DrvQElPtr)(GetDrvQHdr())->qHead; dq; dq = (DrvQElPtr)dq->qLink) { @@ -87,6 +56,7 @@ OSErr RDiskOpen(IOParamPtr p, DCtlPtr d) { c->ramdisk_valid = 0; // Set drive status + status = &c->drvsts; status->writeProt = 0xF0; status->diskInPlace = 0x08; status->dQDrive = drvNum; @@ -111,11 +81,11 @@ OSErr RDiskInit(IOParamPtr p, DCtlPtr d, RDiskStorage_t *c) { c->init_done = 1; // Read PRAM - /*RDiskReadXPRam(1, 4, &startup); - RDiskReadXPRam(1, 5, &ram);*/ + RDiskReadXPRAM(1, 4, &startup); + RDiskReadXPRAM(1, 5, &ram); // Either enable ROM disk or remove ourselves from the drive queue - /*if (startup || RDiskIsRPressed()) { // If ROM disk boot set in PRAM or R pressed,*/ + if (startup || RDiskIsRPressed()) { // If ROM disk boot set in PRAM or R pressed,*/ // Set ROM disk attributes c->drvsts.writeProt = -1; // Set write protected // Clear disk fields (even though we used NewHandleSysClear) @@ -143,9 +113,9 @@ OSErr RDiskInit(IOParamPtr p, DCtlPtr d, RDiskStorage_t *c) { d->dCtlDelay = 0x10; }*/ return noErr; - /*} else { // Otherwise if R not held down and ROM boot not set in PRAM, + } else { // Otherwise if R not held down and ROM boot not set in PRAM, // Remove our driver from the drive queue - DrvQElPtr dq; + /*DrvQElPtr dq; QHdrPtr QHead = (QHdrPtr)0x308; // Loop through entire drive queue, searching for our device or stopping at the end. @@ -162,8 +132,8 @@ OSErr RDiskInit(IOParamPtr p, DCtlPtr d, RDiskStorage_t *c) { d->dCtlStorage = NULL; // Return disk offline error - return offLinErr; - }*/ + return offLinErr;*/ + } } #pragma parameter __D0 RDiskPrime(__A0, __A1) @@ -171,8 +141,8 @@ OSErr RDiskPrime(IOParamPtr p, DCtlPtr d) { RDiskStorage_t *c; char cmd; char *disk; - unsigned long offset; - ROMDiskCopy_t copy24 = RDiskCopy24; + long offset; + RDiskCopy_t copy24 = &RDiskCopy24; // Return disk offline error if dCtlStorage null if (!d->dCtlStorage) { return offLinErr; } @@ -190,40 +160,38 @@ OSErr RDiskPrime(IOParamPtr p, DCtlPtr d) { // Add offset to buffer pointer according to positioning mode switch (p->ioPosMode & 0x000F) { case fsAtMark: offset = d->dCtlPosition; break; - case fsFromStart: - offset = p->ioPosOffset; - //if (offset < 0) { return posErr; } - break; + case fsFromStart: offset = p->ioPosOffset; break; case fsFromMark: offset = d->dCtlPosition + p->ioPosOffset; break; - default: offset = 0; break; //FIXME: Error if unsupported ioPosMode? + default: break; } disk += offset; // Bounds checking - /*if (offset >= RDiskSize || p->ioReqCount >= RDiskSize || + if (offset >= RDiskSize || p->ioReqCount >= RDiskSize || offset + p->ioReqCount >= RDiskSize || - disk + offset < disk) { return posErr; }*/ + disk + offset < disk) { return posErr; } // Service read or write request cmd = p->ioTrap & 0x00FF; if (cmd == aRdCmd) { // Read // Return immediately if verify operation requested //FIXME: follow either old (verify) or new (read uncached) convention - if (p->ioPosMode & rdVerifyMask) { + /*if (p->ioPosMode & rdVerifyMask) { return noErr; - } + }*/ // Read from disk into buffer. - if (*MMU32bit) { BlockMove(disk, (char*)p->ioBuffer, p->ioReqCount); } + if (*MMU32bit) { BlockMove(disk, p->ioBuffer, p->ioReqCount); } else { // 24-bit addressing char *buffer = (char*)Translate24To32(StripAddress(p->ioBuffer)); copy24(disk, buffer, p->ioReqCount); } // Update count p->ioActCount = p->ioReqCount; - p->ioPosOffset = d->dCtlPosition = offset + p->ioReqCount; + d->dCtlPosition = offset + p->ioReqCount; + p->ioPosOffset = d->dCtlPosition; return noErr; } else if (cmd == aWrCmd) { // Write return wPrErr; - /*// Fail if write protected or RAM disk buffer not set up + // Fail if write protected or RAM disk buffer not set up if (c->drvsts.writeProt || !c->ramdisk || !c->ramdisk_valid) { return wPrErr; } // Write from buffer into disk. if (*MMU32bit) { BlockMove((char*)p->ioBuffer, disk, p->ioReqCount); } @@ -233,13 +201,14 @@ OSErr RDiskPrime(IOParamPtr p, DCtlPtr d) { } // Update count and position/offset p->ioActCount = p->ioReqCount; - p->ioPosOffset = d->dCtlPosition = offset + p->ioReqCount; - return noErr;*/ + d->dCtlPosition = offset + p->ioReqCount; + p->ioPosOffset = d->dCtlPosition; + return noErr; } else { return noErr; } //FIXME: Should we fail if cmd isn't read or write? } -/*OSErr RDiskAccRun(IOParamPtr p, DCtlPtr d, RDiskStorage_t *c) { +OSErr RDiskAccRun(CntrlParamPtr p, DCtlPtr d, RDiskStorage_t *c) { // Disable accRun d->dCtlDelay = 0; d->dCtlFlags &= ~dNeedTimeMask; @@ -269,7 +238,7 @@ OSErr RDiskPrime(IOParamPtr p, DCtlPtr d) { // Mark write protected if we couldn't allocate RAM buffer? c->drvsts.writeProt = -1; } else if (c->ramdisk && !c->ramdisk_valid) { // Else if buffer exists but is not valid, - ROMDiskCopy_t copy24 = RDiskCopy24; + RDiskCopy_t copy24 = RDiskCopy24; // Copy ROM disk to RAM disk buffer if not yet copied if (*MMU32bit) { BlockMove(RDiskBuf, c->ramdisk, RDiskSize); } else { copy24(RDiskBuf, c->ramdisk, RDiskSize); } @@ -277,32 +246,32 @@ OSErr RDiskPrime(IOParamPtr p, DCtlPtr d) { } return noErr; // Always return success -}*/ +} #pragma parameter __D0 RDiskControl(__A0, __A1) -OSErr RDiskControl(IOParamPtr p, DCtlPtr d) { +OSErr RDiskControl(CntrlParamPtr p, DCtlPtr d) { RDiskStorage_t *c; + // Fail if dCtlStorage null + if (!d->dCtlStorage) { return controlErr; } // Dereference dCtlStorage to get pointer to our context c = *(RDiskStorage_t**)d->dCtlStorage; - // Handle control request based on csCode - switch (((CntrlParamPtr)p)->csCode) { - /*case accRun: + switch (p->csCode) { + case accRun: if (!d->dCtlStorage) { return noErr; } - return RDiskAccRun(p, d, c);*/ + return RDiskAccRun(p, d, c); default: return controlErr; } } #pragma parameter __D0 RDiskStatus(__A0, __A1) -OSErr RDiskStatus(IOParamPtr p, DCtlPtr d) { - // Fail if dCtlStorage null or unsupported status call code - if (!d->dCtlStorage) { return statusErr; } //FIXME: Return offLinErr instead? - +OSErr RDiskStatus(CntrlParamPtr p, DCtlPtr d) { + // Fail if dCtlStorage null + if (!d->dCtlStorage) { return statusErr; } // Handle status request based on csCode - switch (((CntrlParamPtr)p)->csCode) { + switch (p->csCode) { case drvStsCode: - BlockMove(*d->dCtlStorage, &((CntrlParamPtr)p)->csParam, sizeof(DrvSts2)); + BlockMove(*d->dCtlStorage, &p->csParam, sizeof(DrvSts2)); return noErr; default: return statusErr; } @@ -311,12 +280,11 @@ OSErr RDiskStatus(IOParamPtr p, DCtlPtr d) { #pragma parameter __D0 RDiskClose(__A0, __A1) OSErr RDiskClose(IOParamPtr p, DCtlPtr d) { // If dCtlStorage not null, dispose of it and its contents - if (d->dCtlStorage) { - RDiskStorage_t *c = *(RDiskStorage_t**)d->dCtlStorage; - if (c->ramdisk_alloc) { DisposePtr(c->ramdisk_alloc); } - HUnlock(d->dCtlStorage); - DisposeHandle(d->dCtlStorage); - } + if (!d->dCtlStorage) { return noErr; } + RDiskStorage_t *c = *(RDiskStorage_t**)d->dCtlStorage; + if (c->ramdisk_alloc) { DisposePtr(c->ramdisk_alloc); } + HUnlock(d->dCtlStorage); + DisposeHandle(d->dCtlStorage); d->dCtlStorage = NULL; return noErr; } diff --git a/rdtraps.h b/rdisk.h similarity index 52% rename from rdtraps.h rename to rdisk.h index a745040..3feca3c 100644 --- a/rdtraps.h +++ b/rdisk.h @@ -1,6 +1,13 @@ #ifndef RDTRAPS_H #define RDTRAPS_H +#define RDiskSize (0x00180000L) +#define RDiskBuf ((char*)0x40880000) +#define BufPtr ((Ptr*)0x10C) +#define MemTop ((Ptr*)0x108) +#define MMU32bit ((char*)0xCB2) +#define JIODone ((char*)0x8FC) + #pragma parameter __D0 RDReadXPRAM(__D0, __D1, __A0) OSErr RDiskReadXPRAM(short numBytes, short whichByte, void *dest) = {0x4840, 0x3001, 0xA051}; @@ -9,20 +16,23 @@ OSErr RDiskReadXPRAM(short numBytes, short whichByte, void *dest) = {0x4840, 0x3 //OSErr RDiskAddDrive(short numBytes, short whichByte, void *dest) = {0x4840, 0x3001, 0xA04E}; OSErr RDiskAddDrive(short drvrRefNum, short drvNum, DrvQElPtr dq) { - __asm__ __volatile__ - ( - "clr.l %%D0 \n\t" - "move.w %1,%%D0 \n\t" - "swap %%D0 \n\t" - "move.w %0,%%D0 \n\t" - "movea.l %2,%%A0 \n\t" - ".word 0xA04E \n\t" - : /* outputs */ - : "g"(drvrRefNum), "g"(drvNum), "g"(dq) /* inputs */ - : /* clobbered */); + __asm__ __volatile__ ( + "clr.l %%D0 \n\t" + "move.w %1,%%D0 \n\t" + "swap %%D0 \n\t" + "move.w %0,%%D0 \n\t" + "movea.l %2,%%A0 \n\t" + ".word 0xA04E \n\t" + : /* outputs */ + : "g"(drvrRefNum), "g"(drvNum), "g"(dq) /* inputs */ + : /* clobbered */); } inline char RDiskIsRPressed() { return *((char*)0x175) & 0x80; } inline char RDiskIsAPressed() { return *((char*)0x174) & 0x01; } +void RDiskBreak() = { 0xA9FF }; + +typedef void (*RDiskCopy_t)(char *, char *, unsigned long); + #endif diff --git a/rdisk_braun.c b/rdisk_braun.c deleted file mode 100644 index e682431..0000000 --- a/rdisk_braun.c +++ /dev/null @@ -1,229 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#define NEED_DRVSTAT 1 -#define NEED_ACCRUN 1 - -/* If NEED_ACCRUN is set, the dNeedTime (0x60) flag should be set in the header, and the - * delayticks field in the header should be set to something sensible. - */ - -#define kRomDrvSize (0x00180000L) -#define kRomDrvLocation ((char*)0x40880000) -#define BufPtr ((Ptr*)0x10C) -#define MemTop ((Ptr*)0x108) - -// This function is here just to put padding at the -// beginning of the output file -void BBraunROMDisk() { - __asm__ __volatile__ - ( - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t" - ".long 0x00000000\n\t":::); -} - -typedef void (*RomDrvCopyFunc)(unsigned char *, unsigned char *, unsigned long); - -struct RomDrvContext { - DrvSts2 drvsts; - Ptr origcopyfunc; - Ptr origdisk; /* keep unstripped pointers for Dispose*/ - RomDrvCopyFunc copyfunc; - unsigned char * disk; - char initialized; - char useram; - char ram24; - char alreadyalloced; -}; -typedef struct RomDrvContext RomDrvContext; - -OSErr RomDrvAddDrive(short drvrRefNum, short drvNum, DrvQElPtr dq) { - __asm__ __volatile__ - ( - "clr.l %%D0 \n\t" - "move.w %1,%%D0 \n\t" - "swap %%D0 \n\t" - "move.w %0,%%D0 \n\t" - "movea.l %2,%%A0 \n\t" - ".word 0xA04E \n\t" - : /* outputs */ - : "g"(drvrRefNum), "g"(drvNum), "g"(dq) /* inputs */ - : /* clobbered */); -} - -void RomDrvCopy(unsigned char *source, unsigned char *dest, unsigned long count) { - signed char mode = true32b; - SwapMMUMode(&mode); - BlockMove(source, dest, count); - SwapMMUMode(&mode); -} - -#pragma parameter __D0 RomDrvOpen(__A0, __A1) -short RomDrvOpen(IOParamPtr p, DCtlPtr d) { - DrvSts2 *dsptr; - DrvQElPtr dq; - int drvnum = 1; - RomDrvContext *ctx; - - // Reference BBraunROMDisk() just so it ends up - // at the beginning of the output file - StripAddress(&BBraunROMDisk); - - for(dq = (DrvQElPtr)(GetDrvQHdr())->qHead; dq; dq = (DrvQElPtr)dq->qLink) { - if(dq->dQDrive >= drvnum) drvnum = dq->dQDrive+1; - } - - d->dCtlStorage = NewHandleSysClear(sizeof(RomDrvContext)); - HLock(d->dCtlStorage); - ctx = *(RomDrvContext**)d->dCtlStorage; - ctx->origcopyfunc = NewPtrSys(64); - if(!ctx->origcopyfunc) { - return openErr; - } - BlockMove(&RomDrvCopy, ctx->origcopyfunc, 64); - ctx->copyfunc = (RomDrvCopyFunc)StripAddress(ctx->origcopyfunc); - - dsptr = &ctx->drvsts; - dsptr->writeProt = 0xF0; - dsptr->diskInPlace = 8; - dsptr->dQDrive = drvnum; - dsptr->dQRefNum = d->dCtlRefNum; - dsptr->driveSize = (kRomDrvSize/512L) & 0xFFFF; - dsptr->driveS1 = ((kRomDrvSize/512L) & 0xFFFF0000) >> 16; - RomDrvAddDrive(dsptr->dQRefNum, drvnum, (DrvQElPtr)&dsptr->qLink); - - - return noErr; -} - -#pragma parameter __D0 RomDrvPrime(__A0, __A1) -short RomDrvPrime(IOParamPtr p, DCtlPtr d) { - long off; - RomDrvContext *ctx; - - if(!d->dCtlStorage) return offLinErr; - - ctx = *(RomDrvContext**)d->dCtlStorage; - - if(!ctx->initialized) { - ctx->initialized = 1; - - ctx->drvsts.writeProt = 0xFF; - ctx->origdisk = NULL; - ctx->disk = (unsigned char *)kRomDrvLocation; - - } - - switch(p->ioPosMode & 0x000F) { - case fsAtMark: off = d->dCtlPosition; break; - case fsFromStart: off = p->ioPosOffset; break; - case fsFromMark: off = d->dCtlPosition + p->ioPosOffset; break; - default: break; - } - - if((p->ioTrap & 0x00ff) == aRdCmd) { - /* bit 6 indicates this should be a verify operation */ - if(!(p->ioPosMode & 0x40)) { - unsigned long count = p->ioReqCount; - if(ctx->drvsts.writeProt == 0 && ctx->origdisk) { - // If the data is in RAM, we can access it in 24bit mode, and can - // avoid the overhead of the extra function call and 2 MMU switches. - if (!ctx->ram24) { - BlockMoveData(ctx->disk + off, p->ioBuffer, count); - } else { - ctx->copyfunc((unsigned char *)(ctx->disk + off), (unsigned char *)StripAddress(p->ioBuffer), count); - } - } else { - ctx->copyfunc((unsigned char *)(ctx->disk + off), (unsigned char*)StripAddress(p->ioBuffer), count); - } - p->ioActCount = count; - d->dCtlPosition = off + count; - p->ioPosOffset = d->dCtlPosition; - } - return noErr; - } else if(((p->ioTrap & 0x00ff) == aWrCmd) && (ctx->drvsts.writeProt == 0)) { - if (!ctx->ram24) { - BlockMoveData(p->ioBuffer, ctx->disk + off, p->ioReqCount); - } else { - ctx->copyfunc((unsigned char *)StripAddress(p->ioBuffer), (unsigned char *)(ctx->disk + off), p->ioReqCount); - } - p->ioActCount = p->ioReqCount; - d->dCtlPosition = off + p->ioReqCount; - p->ioPosOffset = d->dCtlPosition; - return noErr; - } - - return wPrErr; -} - -#pragma parameter __D0 RomDrvClose(__A0, __A1) -short RomDrvClose(IOParamPtr p, DCtlPtr d) { - RomDrvContext *ctx; - - if(!d->dCtlStorage) return noErr; - ctx = *(RomDrvContext**)d->dCtlStorage; - if(ctx->origdisk) DisposePtr(ctx->origdisk); - DisposePtr(ctx->origcopyfunc); - HUnlock(d->dCtlStorage); - DisposeHandle(d->dCtlStorage); - d->dCtlStorage = NULL; - - return noErr; -} - -#pragma parameter __D0 RDiskControl(__A0, __A1) -OSErr RDiskControl(IOParamPtr p, DCtlPtr d) { -#if NEED_ACCRUN - if(((CntrlParamPtr)p)->csCode == accRun) { - RomDrvContext *ctx; - if(!d->dCtlStorage) return noErr; - ctx = *(RomDrvContext**)d->dCtlStorage; - if(ctx->useram && !ctx->origdisk) { - if (*((unsigned char *)0x0CB2)) { /* if we're already in 32-bit mode, allocate like this */ - ctx->origdisk = NewPtrSys(kRomDrvSize); - if(ctx->origdisk) { - ctx->disk = (unsigned char *)StripAddress((Ptr)ctx->origdisk); - ctx->copyfunc((unsigned char *)kRomDrvLocation, ctx->disk, kRomDrvSize); - } - } else { - ctx->ram24 = 1; - ctx->origdisk = NewPtrSys(1); /* just a dummy pointer to make rest of code work */ - ctx->disk = (unsigned char *)(8*1048576); - ctx->copyfunc((unsigned char *)kRomDrvLocation, ctx->disk, kRomDrvSize); - } - } - d->dCtlDelay = 0; - d->dCtlFlags &= ~dNeedTimeMask; - return noErr; - } -#endif - return controlErr; -} - -#pragma parameter __D0 RDiskStatus(__A0, __A1) -OSErr RDiskStatus(IOParamPtr p, DCtlPtr d) { -#if NEED_DRVSTAT - if(!d->dCtlStorage) return statusErr; - - if(((CntrlParamPtr)p)->csCode == drvStsCode) { - BlockMove(*d->dCtlStorage, &((CntrlParamPtr)p)->csParam, sizeof(DrvSts2)); - return noErr; - } -#endif - return statusErr; -}