mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-14 21:40:03 +00:00
Line up code segment for gc-eu-mq (#1918)
This commit is contained in:
parent
93642f97bc
commit
731fe6da82
2 changed files with 8 additions and 8 deletions
6
spec
6
spec
|
@ -318,6 +318,7 @@ beginseg
|
||||||
name "code"
|
name "code"
|
||||||
compress
|
compress
|
||||||
after "dmadata"
|
after "dmadata"
|
||||||
|
align 0x20
|
||||||
include "$(BUILD_DIR)/src/code/z_en_a_keep.o"
|
include "$(BUILD_DIR)/src/code/z_en_a_keep.o"
|
||||||
include "$(BUILD_DIR)/src/code/z_en_item00.o"
|
include "$(BUILD_DIR)/src/code/z_en_item00.o"
|
||||||
include "$(BUILD_DIR)/src/code/z_eff_blure.o"
|
include "$(BUILD_DIR)/src/code/z_eff_blure.o"
|
||||||
|
@ -455,7 +456,7 @@ beginseg
|
||||||
#if OOT_DEBUG
|
#if OOT_DEBUG
|
||||||
include "$(BUILD_DIR)/src/code/ucode_disas.o"
|
include "$(BUILD_DIR)/src/code/ucode_disas.o"
|
||||||
#endif
|
#endif
|
||||||
pad_text // audio library aligned to 32 bytes?
|
pad_text // on GameCube, NTSC 1.0 and "0.9" prerelease
|
||||||
include "$(BUILD_DIR)/src/audio/lib/data.o"
|
include "$(BUILD_DIR)/src/audio/lib/data.o"
|
||||||
include "$(BUILD_DIR)/src/audio/lib/synthesis.o"
|
include "$(BUILD_DIR)/src/audio/lib/synthesis.o"
|
||||||
include "$(BUILD_DIR)/src/audio/lib/heap.o"
|
include "$(BUILD_DIR)/src/audio/lib/heap.o"
|
||||||
|
@ -467,6 +468,9 @@ beginseg
|
||||||
include "$(BUILD_DIR)/src/audio/lib/effects.o"
|
include "$(BUILD_DIR)/src/audio/lib/effects.o"
|
||||||
include "$(BUILD_DIR)/src/audio/lib/seqplayer.o"
|
include "$(BUILD_DIR)/src/audio/lib/seqplayer.o"
|
||||||
include "$(BUILD_DIR)/src/audio/general.o"
|
include "$(BUILD_DIR)/src/audio/general.o"
|
||||||
|
#if !OOT_DEBUG
|
||||||
|
pad_text // on retail GameCube
|
||||||
|
#endif
|
||||||
include "$(BUILD_DIR)/src/audio/sfx_params.o"
|
include "$(BUILD_DIR)/src/audio/sfx_params.o"
|
||||||
include "$(BUILD_DIR)/src/audio/sfx.o"
|
include "$(BUILD_DIR)/src/audio/sfx.o"
|
||||||
include "$(BUILD_DIR)/src/audio/sequence.o"
|
include "$(BUILD_DIR)/src/audio/sequence.o"
|
||||||
|
|
|
@ -51,11 +51,13 @@ static void write_ld_script(FILE *fout)
|
||||||
" ..%s ", seg->name, seg->name, seg->name, seg->name);
|
" ..%s ", seg->name, seg->name, seg->name, seg->name);
|
||||||
|
|
||||||
if (seg->fields & (1 << STMT_after))
|
if (seg->fields & (1 << STMT_after))
|
||||||
fprintf(fout, "_%sSegmentEnd ", seg->after);
|
fprintf(fout, "(_%sSegmentEnd + %i) & ~ %i ", seg->after, seg->align - 1, seg->align - 1);
|
||||||
else if (seg->fields & (1 << STMT_number))
|
else if (seg->fields & (1 << STMT_number))
|
||||||
fprintf(fout, "0x%02X000000 ", seg->number);
|
fprintf(fout, "0x%02X000000 ", seg->number);
|
||||||
else if (seg->fields & (1 << STMT_address))
|
else if (seg->fields & (1 << STMT_address))
|
||||||
fprintf(fout, "0x%08X ", seg->address);
|
fprintf(fout, "0x%08X ", seg->address);
|
||||||
|
else
|
||||||
|
fprintf(fout, "ALIGN(0x%X) ", seg->align);
|
||||||
|
|
||||||
// (AT(_RomSize) isn't necessary, but adds useful "load address" lines to the map file)
|
// (AT(_RomSize) isn't necessary, but adds useful "load address" lines to the map file)
|
||||||
fprintf(fout, ": AT(_RomSize)\n {\n"
|
fprintf(fout, ": AT(_RomSize)\n {\n"
|
||||||
|
@ -64,9 +66,6 @@ static void write_ld_script(FILE *fout)
|
||||||
" _%sSegmentTextStart = .;\n",
|
" _%sSegmentTextStart = .;\n",
|
||||||
seg->name, seg->name);
|
seg->name, seg->name);
|
||||||
|
|
||||||
if (seg->fields & (1 << STMT_align))
|
|
||||||
fprintf(fout, " . = ALIGN(0x%X);\n", seg->align);
|
|
||||||
|
|
||||||
for (j = 0; j < seg->includesCount; j++)
|
for (j = 0; j < seg->includesCount; j++)
|
||||||
{
|
{
|
||||||
fprintf(fout, " %s (.text)\n", seg->includes[j].fpath);
|
fprintf(fout, " %s (.text)\n", seg->includes[j].fpath);
|
||||||
|
@ -166,9 +165,6 @@ static void write_ld_script(FILE *fout)
|
||||||
" _%sSegmentBssStart = .;\n",
|
" _%sSegmentBssStart = .;\n",
|
||||||
seg->name, seg->name, seg->name, seg->name);
|
seg->name, seg->name, seg->name, seg->name);
|
||||||
|
|
||||||
if (seg->fields & (1 << STMT_align))
|
|
||||||
fprintf(fout, " . = ALIGN(0x%X);\n", seg->align);
|
|
||||||
|
|
||||||
for (j = 0; j < seg->includesCount; j++)
|
for (j = 0; j < seg->includesCount; j++)
|
||||||
fprintf(fout, " %s (.sbss)\n"
|
fprintf(fout, " %s (.sbss)\n"
|
||||||
" . = ALIGN(0x10);\n", seg->includes[j].fpath);
|
" . = ALIGN(0x10);\n", seg->includes[j].fpath);
|
||||||
|
|
Loading…
Reference in a new issue