-
Notifications
You must be signed in to change notification settings - Fork 1k
Add debug mode to red
Colton G. Rushton edited this page Jun 28, 2022
·
4 revisions
This will create a pokemon red debug build to the build option. The reason this is not included in base pokered is because there is no Pokemon Red debug ROM to disassemble. Go to your Makefile and edit these lines.
- roms := pokered.gbc pokeblue.gbc pokeblue_debug.gbc
+ roms := pokered.gbc pokeblue.gbc pokered_debug.gbc pokeblue_debug.gbc
...
pokered_debug_obj := $(rom_obj:.o=_red_debug.o)
+ pokered_debug_obj := $(rom_obj:.o=_red_debug.o)
pokeblue_debug_obj := $(rom_obj:.o=_blue_debug.o)
...
blue: pokeblue.gbc
+ red_debug: pokered_debug.gbc
blue_debug: pokeblue_debug.gbc
...
tidy:
- rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(pokeblue_debug_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o
+ rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(pokeblue_debug_obj) $(pokered_debug_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o
$(MAKE) clean -C tools/
...
$(pokeblue_obj): RGBASMFLAGS += -D _BLUE
+ $(pokered_debug_obj): RGBASMFLAGS += -D _RED -D _DEBUG
$(pokeblue_debug_obj): RGBASMFLAGS += -D _BLUE -D _DEBUG
...
$(foreach obj, $(pokeblue_obj), $(eval $(call DEP,$(obj),$(obj:_blue.o=.asm))))
+ $(foreach obj, $(pokered_debug_obj), $(eval $(call DEP,$(obj),$(obj:_red_debug.o=.asm))))
$(foreach obj, $(pokeblue_debug_obj), $(eval $(call DEP,$(obj),$(obj:_blue_debug.o=.asm))))
...
pokeblue_pad = 0x00
+ pokered_debug_pad = 0xff
pokeblue_debug_pad = 0xff
pokered_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON RED"
pokeblue_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON BLUE"
+ pokered_debug_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON RED"
pokeblue_debug_opt = -jsv -n 0 -k 01 -l 0x33 -m 0x13 -r 03 -t "POKEMON BLUE"