From 2f823aa2ecda1f703d82649c3b464012ab610167 Mon Sep 17 00:00:00 2001 From: Jaby Date: Wed, 30 Nov 2022 02:36:17 +0100 Subject: [PATCH] Implement Overlay generation --- lib/PSEXETarget.mk | 7 ++++++- src/Library/src/BootLoader/start_boot.cpp | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/PSEXETarget.mk b/lib/PSEXETarget.mk index 3e7f97ce..d851712f 100644 --- a/lib/PSEXETarget.mk +++ b/lib/PSEXETarget.mk @@ -8,7 +8,12 @@ $(TARGET).elf: $(OBJS) $(JABY_ENGINE_LIB_DIR)/lib$(JABY_ENGINE_LIB_NAME).a #Strips the psexe $(TARGET).psexe: $(TARGET).elf +#mipsel-linux-gnu-objcopy -R .main_area -O binary bin/PSX-release/JabyAdventure.elf bin/PSX-release/JabyAdventure.psexe $(PREFIX)-objcopy $(addprefix -R , $(OVERLAYSECTION)) -O binary $< $@ +$(foreach ovl, $(OVERLAYSECTION), $(OUTPUT_DIR)/Overlay$(ovl)): $(TARGET).elf +#mipsel-linux-gnu-objcopy -j bin/PSX-release/Overlay.main_area -O binary bin/PSX-release/JabyAdventure.elf bin/PSX-release/Overlaybin/PSX-release/Overlay.main_area + $(PREFIX)-objcopy -j $(suffix $@) -O binary $< $@ + #Rules section for default compilation and linking -all: $(TARGET).psexe $(foreach ovl, $(OVERLAYSECTION), $(OUTPUT_DIR)Overlay$(ovl)) \ No newline at end of file +all: $(TARGET).psexe $(foreach ovl, $(OVERLAYSECTION), $(OUTPUT_DIR)/Overlay$(ovl)) \ No newline at end of file diff --git a/src/Library/src/BootLoader/start_boot.cpp b/src/Library/src/BootLoader/start_boot.cpp index 641d115d..84cc4a0e 100644 --- a/src/Library/src/BootLoader/start_boot.cpp +++ b/src/Library/src/BootLoader/start_boot.cpp @@ -10,7 +10,7 @@ namespace JabyEngine { } void start() { - printf("Hello Planschbecken\n"); + printf("Starting Planschbecken\n"); enable_DMA(); SPU::stop_voices(); @@ -22,6 +22,7 @@ namespace JabyEngine { SPU::setup(); printf("Setup done!\n"); + printf("About to call: 0x%p\n", main); main(); } } \ No newline at end of file