mirror of
https://github.com/rdolbeau/VintageBusFPGA_Common.git
synced 2026-04-10 14:38:56 +00:00
Patch to Rev R Sun-2 boot rom to speed up booting in simulation
This commit is contained in:
41
RomPatcher/Sun2_FastBoot/Makefile
Normal file
41
RomPatcher/Sun2_FastBoot/Makefile
Normal file
@@ -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
|
||||
2
RomPatcher/Sun2_FastBoot/README.MD
Normal file
2
RomPatcher/Sun2_FastBoot/README.MD
Normal file
@@ -0,0 +1,2 @@
|
||||
loweritercount: reduce the count of iteration in the wite loop between LED value.
|
||||
Mconstop: skip memory testing
|
||||
3
RomPatcher/Sun2_FastBoot/input.txt
Normal file
3
RomPatcher/Sun2_FastBoot/input.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
0x0001b6, 0, diagret
|
||||
0x000b80, 2, loweritercount
|
||||
0x000e80, 4, Mconstop
|
||||
11
RomPatcher/Sun2_FastBoot/rompatch.s
Normal file
11
RomPatcher/Sun2_FastBoot/rompatch.s
Normal file
@@ -0,0 +1,11 @@
|
||||
.section .text.diagret
|
||||
diagret:
|
||||
|
||||
.section .text.loweritercount
|
||||
loweritercount:
|
||||
.short 2
|
||||
|
||||
.section .text.Mconstop
|
||||
Mconstop:
|
||||
jmp (%pc,diagret)
|
||||
|
||||
BIN
RomPatcher/Sun2_FastBoot/sun2-multi-rev-R.bin
Normal file
BIN
RomPatcher/Sun2_FastBoot/sun2-multi-rev-R.bin
Normal file
Binary file not shown.
Reference in New Issue
Block a user