diff --git a/RomPatcher/Sun2_FastBoot/Makefile b/RomPatcher/Sun2_FastBoot/Makefile new file mode 100644 index 0000000..4fc61fa --- /dev/null +++ b/RomPatcher/Sun2_FastBoot/Makefile @@ -0,0 +1,41 @@ +RETRO68=/home/dolbeau/Retro68/build/toolchain +AS=${RETRO68}/bin/m68k-apple-macos-as +CC=${RETRO68}/bin/m68k-apple-macos-gcc +LD=${RETRO68}/bin/m68k-apple-macos-ld +STRIP=${RETRO68}/bin/m68k-apple-macos-strip +OBJCOPY=${RETRO68}/bin/m68k-apple-macos-objcopy +NM=${RETRO68}/bin/m68k-apple-macos-nm + +HOSTCC=gcc +HOSTCFLAGS=-O2 + +ARCHFLAGS=-march=68010 -mcpu=68010 +CFLAGS=-O2 -mpcrel + +GENLINK=../patcher/genlink +PATCHER=../patcher/patcher + +all: sun2-multi-rev-R.bin + +show: rompatch.elf + $(NM) $< | sort + +sun2-multi-rev-R.bin: ../ rompatch.raw input.txt + /bin/cp ../sun2-multi-rev-R.bin sun2-multi-rev-R.bin + ${PATCHER} -i rompatch.raw -p sun2-multi-rev-R.bin -d input.txt + +linker.ld: input.txt rompatch.s + ${GENLINK} -d $< >| $@ + echo $(shell for X in `grep .section rompatch.s | awk '{ print $$2 }' `; do grep -q $$X linker.ld || echo " $$X has no entry in linker.ld" && /bin/false; done) + +rompatch.o: rompatch.s + ${AS} ${ARCHFLAGS} $< -o $@ -a > rompatch.l + +rompatch.elf: linker.ld rompatch.o ${CSRC:.c=.o} # linker script must be first + ${LD} -o $@ -T $^ + +rompatch.raw: rompatch.elf + ${OBJCOPY} $^ $@ --input-target=elf32-m68k --output-target=binary + +clean: + rm -f res.inc ${CSRC_ASM} *.o rompatch.srec rompatch.raw rompatch.dir rompatch.l linker.ld rompatch.elf diff --git a/RomPatcher/Sun2_FastBoot/README.MD b/RomPatcher/Sun2_FastBoot/README.MD new file mode 100644 index 0000000..3921431 --- /dev/null +++ b/RomPatcher/Sun2_FastBoot/README.MD @@ -0,0 +1,2 @@ +loweritercount: reduce the count of iteration in the wite loop between LED value. +Mconstop: skip memory testing diff --git a/RomPatcher/Sun2_FastBoot/input.txt b/RomPatcher/Sun2_FastBoot/input.txt new file mode 100644 index 0000000..f9513f8 --- /dev/null +++ b/RomPatcher/Sun2_FastBoot/input.txt @@ -0,0 +1,3 @@ +0x0001b6, 0, diagret +0x000b80, 2, loweritercount +0x000e80, 4, Mconstop diff --git a/RomPatcher/Sun2_FastBoot/rompatch.s b/RomPatcher/Sun2_FastBoot/rompatch.s new file mode 100644 index 0000000..95c3107 --- /dev/null +++ b/RomPatcher/Sun2_FastBoot/rompatch.s @@ -0,0 +1,11 @@ + .section .text.diagret +diagret: + + .section .text.loweritercount +loweritercount: + .short 2 + + .section .text.Mconstop +Mconstop: + jmp (%pc,diagret) + diff --git a/RomPatcher/Sun2_FastBoot/sun2-multi-rev-R.bin b/RomPatcher/Sun2_FastBoot/sun2-multi-rev-R.bin new file mode 100644 index 0000000..6fa1476 Binary files /dev/null and b/RomPatcher/Sun2_FastBoot/sun2-multi-rev-R.bin differ