diff --git a/Makefile b/Makefile index dd75734..da996ac 100644 --- a/Makefile +++ b/Makefile @@ -6,14 +6,13 @@ ASFLAGS := -mregnames -mgekko OD := powerpc-eabi-objdump ODFLAGS := -EB -D -b binary -m powerpc:750 -M gekko -a -p -h -F --full-content - ODASMFLAGS := -EB -D -b binary -m powerpc:750 -M gekko --no-show-raw-insn --no-addresses LD := powerpc-eabi-ld LDFLAGS := --unresolved-symbols=ignore-in-object-files --enable-non-contiguous-regions -EB --nmagic OBJCOPY := powerpc-eabi-objcopy -PYTHON := python3 +OBJCOPYFLAGS := -O binary --add-gnu-debuglink=sms.ld --gap-fill 0x00 --pad-to 0x81800000 SRC_DIR := source INC_DIR := include @@ -50,7 +49,7 @@ $(OUT_DIR)/$(OUT_LST): $(OUT_DIR)/$(OUT_BIN) $(OD) $(ODFLAGS) $(OUT_DIR)/$(OUT_BIN) > $(OUT_DIR)/$(OUT_LST) $(OUT_DIR)/$(OUT_BIN): $(OUT_DIR)/$(OUT_MAIN) - $(OBJCOPY) -O binary $< $@ + $(OBJCOPY) $(OBJCOPYFLAGS) $< $@ $(OUT_DIR)/$(OUT_MAIN): $(OBJ_FILES) $(LD_FILE) $(OUT_DIR) $(LD) $(LDFLAGS) -o $@ -T $(LD_FILE) -Map $(OUT_DIR)/$(OUT_MAP) $(OBJ_FILES) diff --git a/include/gcn.h b/include/gcn.h index cc22ee2..e7c226b 100644 --- a/include/gcn.h +++ b/include/gcn.h @@ -21,13 +21,13 @@ typedef struct CARDFileInfo u16 iBlock; } CARDFileInfo; -// typedef void (*CARDCallback)(s32 chan, s32 result); - s32 CARDOpen(s32 slot, const char *fileName, CARDFileInfo *fileInfo); s32 CARDRead(CARDFileInfo *fileInfo, void *addr, s32 length, s32 offset); s32 CARDClose(CARDFileInfo *fileInfo); -// s32 CARDProbeEx(s32 chan, s32 *memSize, s32 *sectorSize); -// s32 CARDMount(s32 chan, void *workArea, CARDCallback detachCallback); s32 CARDUnmount(s32 chan); +// typedef void (*CARDCallback)(s32 chan, s32 result); +// s32 CARDProbeEx(s32 chan, s32 *memSize, s32 *sectorSize); +// s32 CARDMount(s32 chan, void *workArea, CARDCallback detachCallback); + #endif \ No newline at end of file diff --git a/sms.ld b/sms.ld index 81b5be2..5a75926 100644 --- a/sms.ld +++ b/sms.ld @@ -1,5 +1,5 @@ SECTIONS { - . = 0x80000000; /* TODO: Determine Address */ + . = 0x817FF000; /* TODO: Determine Best Address */ .text : { *(.text) } .rodata : { *(.rodata) } .data : { *(.data) }