diff --git a/spec b/spec index 8372b29ae8..419310744a 100644 --- a/spec +++ b/spec @@ -6,6 +6,9 @@ beginseg name "makerom" + // We set the address of the makerom segment as 0x80000400 - 0x1000, since the ROM header and IPL3 together + // are 0x1000 bytes long and we want the entry code to end up at address 0x80000400. + address 0x7FFFF400 include "$(BUILD_DIR)/src/makerom/rom_header.o" include "$(BUILD_DIR)/src/makerom/ipl3.o" include "$(BUILD_DIR)/src/makerom/entry.o" @@ -13,7 +16,6 @@ endseg beginseg name "boot" - address 0x80000460 include "$(BUILD_DIR)/src/boot/boot_main.o" include "$(BUILD_DIR)/src/boot/idle.o" #if OOT_VERSION >= PAL_1_0 diff --git a/src/makerom/rom_header.s b/src/makerom/rom_header.s index 6b6fe8aa3d..2edf871c40 100644 --- a/src/makerom/rom_header.s +++ b/src/makerom/rom_header.s @@ -6,7 +6,7 @@ /* 0x00 */ ENDIAN_IDENTIFIER /* 0x01 */ PI_DOMAIN_1_CFG(64, 18, 7, 3) /* 0x04 */ SYSTEM_CLOCK_RATE_SETTING(0xF) -/* 0x08 */ ENTRYPOINT(0x80000400) +/* 0x08 */ ENTRYPOINT(entrypoint) /* 0x0C */ OS_VERSION(2, 0, LIBULTRA_VERSION) /* 0x10 */ CHECKSUM()