Added 8MB SIMM build process

This commit is contained in:
Zane Kaminski 2020-07-31 17:04:20 -04:00
parent d2b17f293e
commit 55abebbd70
9 changed files with 46 additions and 17 deletions

View File

@ -8,7 +8,7 @@ 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/driver.s obj/entry_rel.sym obj/driver_abs.sym
all: bin/rom2M.bin bin/rom8M.bin obj/rdisk1M5.s obj/rdisk7M5.s obj/driver1M5.s obj/driver7M5.s obj/entry_rel.sym obj/driver_abs.sym
obj:
mkdir obj
@ -24,31 +24,46 @@ obj/entry_rel.sym: obj obj/entry.o
$(OBJDUMP) -t obj/entry.o > $@
obj/rdisk.o: rdisk.c obj
$(CC) -c -Os $< -o $@
obj/rdisk1M5.o: rdisk.c obj
$(CC) -DRDiskSize=1572864 -c -Os $< -o $@
obj/rdisk.s: obj obj/rdisk.o
$(OBJDUMP) -d obj/rdisk.o > $@
obj/rdisk7M5.o: rdisk.c obj
$(CC) -DRDiskSize=7864320 -c -Os $< -o $@
obj/rdisk1M5.s: obj obj/rdisk1M5.o
$(OBJDUMP) -d obj/rdisk1M5.o > $@
obj/rdisk7M5.s: obj obj/rdisk7M5.o
$(OBJDUMP) -d obj/rdisk1M5.o > $@
obj/driver.o: obj obj/entry.o obj/rdisk.o
$(LD) -Ttext=40851D70 -o $@ obj/entry.o obj/rdisk.o
obj/driver1M5.o: obj obj/entry.o obj/rdisk1M5.o
$(LD) -Ttext=40851D70 -o $@ obj/entry.o obj/rdisk1M5.o
obj/driver.s: obj obj/driver.o
$(OBJDUMP) -d obj/driver.o > $@
obj/driver7M5.o: obj obj/entry.o obj/rdisk7M5.o
$(LD) -Ttext=40851D70 -o $@ obj/entry.o obj/rdisk7M5.o
obj/driver_abs.sym: obj obj/driver.o
$(OBJDUMP) -t obj/driver.o > $@
obj/driver1M5.s: obj obj/driver1M5.o
$(OBJDUMP) -d obj/driver1M5.o > $@
obj/driver7M5.s: obj obj/driver7M5.o
$(OBJDUMP) -d obj/driver7M5.o > $@
obj/driver_abs.sym: obj obj/driver1M5.o
$(OBJDUMP) -t obj/driver1M5.o > $@
bin/driver.bin: bin obj/driver.o
$(OBJCOPY) -O binary obj/driver.o $@
bin/driver1M5.bin: bin obj/driver1M5.o
$(OBJCOPY) -O binary obj/driver1M5.o $@
bin/driver7M5.bin: bin obj/driver7M5.o
$(OBJCOPY) -O binary obj/driver7M5.o $@
bin/rom.bin: baserom.bin RDisk1M5-6.dsk bin bin/driver.bin obj/driver_abs.sym obj/entry_rel.sym
bin/rom2M.bin: baserom.bin RDisk1M5.dsk bin bin/driver1M5.bin obj/driver_abs.sym obj/entry_rel.sym
cp baserom.bin $@ # Copy base rom
# Patch driver
dd if=bin/driver.bin of=$@ bs=1 seek=335248 skip=32 conv=notrunc # Copy driver code
dd if=bin/driver1M5.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
@ -56,7 +71,21 @@ bin/rom.bin: baserom.bin RDisk1M5-6.dsk bin bin/driver.bin obj/driver_abs.sym ob
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-6.dsk of=$@ bs=1024 seek=512 count=1536 conv=notrunc # copy disk image
dd if=RDisk1M5.dsk of=$@ bs=1024 seek=512 count=1536 conv=notrunc # copy disk image
bin/rom8M.bin: baserom.bin RDisk7M5.dsk bin bin/driver7M5.bin obj/driver_abs.sym obj/entry_rel.sym
cp baserom.bin $@ # Copy base rom
# Patch driver
dd if=bin/driver7M5.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
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=RDisk7M5.dsk of=$@ bs=1024 seek=512 count=7680 conv=notrunc # copy disk image
.PHONY: clean
clean:

Binary file not shown.

BIN
RDisk7M5.dsk Normal file

Binary file not shown.

BIN
bin/driver7M5.bin Executable file

Binary file not shown.

BIN
bin/rom8M.bin Executable file

Binary file not shown.

View File

@ -1,7 +1,7 @@
#ifndef RDISK_H
#define RDISK_H
#define RDiskSize (0x00180000L)
//#define RDiskSize (0x00180000L)
#define RDiskBuf ((char*)0x40880000)
#define BufPtr ((Ptr*)0x10C)
#define MemTop ((Ptr*)0x108)