From 8267c0bc3b04b5a990809e851389d9f2bc65e81a Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Mon, 4 Jun 2018 19:02:13 +0200 Subject: Add workaround to rgbfix 0.3.7 checksum bug Please refer to zero_checksum.inc for details --- Makefile | 3 ++- zero_checksum.inc | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 zero_checksum.inc diff --git a/Makefile b/Makefile index bf7cf66..106d85d 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,8 @@ mostlyclean: rm -rf $(ROM) $(CORRECTEDROM) $(OBJS) $(OBJS:.o=.d) $(ROMS:.gb=.sym) $(ROMS:.gb=.map) $(CORRECTEDROM): %-correctheader.gb: %.gb - cp $< $@ + $(RGBASM) $(RGBASMFLAGS) -o zero_checksum.o zero_checksum.inc + $(RGBLINK) -O $< -o $@ zero_checksum.o $(RGBFIX) -f hg -m 0x10 $@ $(ROM): poke%-spaceworld.gb: $(OBJS) | $(BASEROM) diff --git a/zero_checksum.inc b/zero_checksum.inc new file mode 100644 index 0000000..c35e834 --- /dev/null +++ b/zero_checksum.inc @@ -0,0 +1,6 @@ + +; This is part of a workaround to RGBFIX 0.3.7, which does not compute the global checksum correctly +; if it's not 0 in the pre-fix ROM. See https://github.com/rednex/rgbds/issues/280 + +SECTION "RGBFIX 0.3.7 workaround", ROM0[$14E] + dw 0 \ No newline at end of file -- cgit v1.2.3