mirror of https://github.com/n64decomp/mk64.git
269 lines
8.6 KiB
Plaintext
269 lines
8.6 KiB
Plaintext
/* Mario Kart 64 (U) linker script
|
|
* generated by n64split v0.4a - N64 ROM splitter */
|
|
|
|
OUTPUT_ARCH (mips)
|
|
|
|
#define BEGIN_SEG(name, addr) \
|
|
_##name##SegmentStart = ADDR(.name); \
|
|
_##name##SegmentRomStart = __romPos; \
|
|
.name addr : AT(__romPos)
|
|
|
|
#define END_SEG(name) \
|
|
_##name##SegmentEnd = ADDR(.name) + SIZEOF(.name); \
|
|
_##name##SegmentRomEnd = __romPos + SIZEOF(.name); \
|
|
__romPos += SIZEOF(.name);
|
|
|
|
#define MIO0_SEG(name) \
|
|
BEGIN_SEG(name##_mio0, 0x0) \
|
|
{ \
|
|
BUILD_DIR/bin/name.mio0.o(.data); \
|
|
. = ALIGN(0x10); \
|
|
} \
|
|
END_SEG(name##_mio0)
|
|
|
|
#define COURSE_OFFSETS_SEG(name, addr) \
|
|
BEGIN_SEG(name, addr) \
|
|
{ \
|
|
BUILD_DIR/src/name.o(.data); \
|
|
. = ALIGN(0x10); \
|
|
} \
|
|
END_SEG(name)
|
|
|
|
#define VERT_SEG(name, addr) \
|
|
BEGIN_SEG(name, addr) \
|
|
{ \
|
|
BUILD_DIR/data/courses/name.o(.data); \
|
|
. = ALIGN(0x10); \
|
|
} \
|
|
END_SEG(name)
|
|
|
|
SECTIONS
|
|
{
|
|
__romPos = 0;
|
|
|
|
BEGIN_SEG(boot, 0xA4000000)
|
|
{
|
|
BUILD_DIR/asm/rom_header.o(.text);
|
|
BUILD_DIR/asm/boot.o(.text);
|
|
}
|
|
END_SEG(boot)
|
|
|
|
/* 0x80000400 001000-0D9B70 [D8B70] */
|
|
BEGIN_SEG(main, 0x80000400) SUBALIGN(16)
|
|
{
|
|
BUILD_DIR/asm/entry.o(.text);
|
|
BUILD_DIR/src/main.o(.text);
|
|
BUILD_DIR/src/code_800029B0.o(.text);
|
|
BUILD_DIR/src/profiler.o(.text);
|
|
BUILD_DIR/asm/code_800040C0.o(.text);
|
|
BUILD_DIR/asm/code_80004740.o(.text);
|
|
BUILD_DIR/asm/code_80004EF0.o(.text);
|
|
BUILD_DIR/asm/code_80005FB0.o(.text);
|
|
BUILD_DIR/src/code_80005FD0.o(.text);
|
|
BUILD_DIR/asm/code_8001C4D0.o(.text);
|
|
BUILD_DIR/asm/code_8001F980.o(.text);
|
|
BUILD_DIR/asm/code_80027040.o(.text);
|
|
BUILD_DIR/asm/code_80027D00.o(.text);
|
|
BUILD_DIR/asm/code_800393C0.o(.text);
|
|
BUILD_DIR/asm/code_8003DC40.o(.text);
|
|
BUILD_DIR/asm/code_80040030.o(.text);
|
|
BUILD_DIR/asm/code_800400D0.o(.text);
|
|
BUILD_DIR/asm/code_800405D0.o(.text);
|
|
BUILD_DIR/asm/code_80040D00.o(.text);
|
|
BUILD_DIR/asm/code_80040E50.o(.text);
|
|
BUILD_DIR/asm/code_800431B0.o(.text);
|
|
BUILD_DIR/asm/code_80057C60.o(.text);
|
|
BUILD_DIR/asm/code_8006E9C0.o(.text);
|
|
BUILD_DIR/asm/code_80071F00.o(.text);
|
|
BUILD_DIR/asm/code_80086E70.o(.text);
|
|
BUILD_DIR/asm/code_8008C1D0.o(.text);
|
|
BUILD_DIR/asm/code_80091750.o(.text);
|
|
BUILD_DIR/src/code_800AF9B0.o(.text);
|
|
BUILD_DIR/asm/audio/synthesis.o(.text);
|
|
BUILD_DIR/asm/audio/heap.o(.text);
|
|
BUILD_DIR/asm/audio/load.o(.text);
|
|
BUILD_DIR/asm/audio/playback.o(.text);
|
|
BUILD_DIR/asm/audio/effects.o(.text);
|
|
BUILD_DIR/asm/audio/seqplayer.o(.text);
|
|
BUILD_DIR/asm/audio/external.o(.text);
|
|
BUILD_DIR/asm/audio/port_eu.o(.text);
|
|
BUILD_DIR/asm/libultra.o(.text);
|
|
BUILD_DIR/data/rsp.o(.text);
|
|
BUILD_DIR/data/data_0DD0A0.o(.data);
|
|
BUILD_DIR/data/rsp.o(.data);
|
|
BUILD_DIR/src/audio/data.o(.data);
|
|
}
|
|
END_SEG(main)
|
|
|
|
/* 0x8028DF00 0F7510-123640 [2C130] */
|
|
BEGIN_SEG(code_8028DF00, 0x8028DF00)
|
|
{
|
|
BUILD_DIR/asm/code_8028DF00.o(.text);
|
|
BUILD_DIR/asm/code_80290C20.o(.text);
|
|
BUILD_DIR/asm/code_80296A50.o(.text);
|
|
BUILD_DIR/asm/code_802A3730.o(.text);
|
|
BUILD_DIR/asm/code_802A7B70.o(.text);
|
|
BUILD_DIR/asm/code_802B0210.o(.text);
|
|
BUILD_DIR/asm/code_802B4F60.o(.text);
|
|
BUILD_DIR/data/data_121DA0.o(.data);
|
|
}
|
|
END_SEG(code_8028DF00)
|
|
|
|
/* 0x80280000 123640-12AAE0 [74A0] */
|
|
BEGIN_SEG(code_80280000, 0x80280000)
|
|
{
|
|
BUILD_DIR/asm/code_80280000.o(.text);
|
|
BUILD_DIR/asm/code_80280650.o(.text);
|
|
BUILD_DIR/asm/code_80281610.o(.text);
|
|
BUILD_DIR/src/code_80281780.o(.text);
|
|
BUILD_DIR/asm/code_80281C40.o(.text);
|
|
BUILD_DIR/asm/code_80281FA0.o(.text);
|
|
BUILD_DIR/data/data_128480.o(.data);
|
|
}
|
|
END_SEG(code_80280000)
|
|
|
|
/* 0x801978D0 12AAE0-132B50 [8070] */
|
|
/* texture tables and DLs, set as segment 0x02 */
|
|
BEGIN_SEG(data_segment2, 0x02000000)
|
|
{
|
|
BUILD_DIR/data/data_segment2.o(.data);
|
|
}
|
|
END_SEG(data_segment2)
|
|
|
|
/* 0x02000000 132B50-145470 [12920] (copied to 0x8027B5E0) */
|
|
/* common textures, decompressed and set as segment 0x0D */
|
|
BEGIN_SEG(common_textures, 0x0D000000)
|
|
{
|
|
BUILD_DIR/data/common_textures.mio0.o(.data);
|
|
. = ALIGN(0x10);
|
|
}
|
|
END_SEG(common_textures)
|
|
|
|
/* 0x0F000000 145470-63E278 [4F8E08] */
|
|
/* compressed kart textures and palettes */
|
|
BEGIN_SEG(kart_textures, 0x0F000000)
|
|
{
|
|
BUILD_DIR/data/kart_textures.o(.data);
|
|
BUILD_DIR/data/data_63E278.o(.data);
|
|
. = ALIGN(0x10);
|
|
}
|
|
END_SEG(kart_textures)
|
|
|
|
/* 0x0F000000: 641F70-724220 */
|
|
BEGIN_SEG(other_textures, 0x0F000000)
|
|
{
|
|
BUILD_DIR/data/other_textures.o(.data);
|
|
. = ALIGN(0x10);
|
|
}
|
|
END_SEG(other_textures)
|
|
|
|
/* 0x802BA370 724220-729A30 [0x5810] */
|
|
BEGIN_SEG(data_802BA370, 0x802BA370)
|
|
{
|
|
BUILD_DIR/data/game_data_802BA370.o(.data);
|
|
. = ALIGN(0x10);
|
|
}
|
|
END_SEG(data_802BA370)
|
|
|
|
/* 0x0A000000 729A30-7E684F [BCE20] */
|
|
BEGIN_SEG(textures_0a, 0x0A000000)
|
|
{
|
|
BUILD_DIR/data/course_player_selection.o(.data);
|
|
BUILD_DIR/data/texture_data_2.o(.data);
|
|
. = ALIGN(0x10);
|
|
}
|
|
END_SEG(textures_0a)
|
|
|
|
/* 0x0B000000 7FA3C0-821D10 [27950] */
|
|
BEGIN_SEG(textures_0b, 0x0B000000)
|
|
{
|
|
BUILD_DIR/data/texture_tkmk00.o(.data);
|
|
. = ALIGN(0x10);
|
|
}
|
|
END_SEG(textures_0b)
|
|
|
|
/* TODO: 0x825800 -> 0x8028B230 (0x100) ...
|
|
0x828400 -> 0x8028DE30 (0xD0) */
|
|
BEGIN_SEG(other_assets, 0x0C000000)
|
|
{
|
|
BUILD_DIR/data/other_assets.o(.data);
|
|
. = ALIGN(0x10);
|
|
}
|
|
END_SEG(other_assets)
|
|
|
|
MIO0_SEG(course_mario_raceway_dl)
|
|
MIO0_SEG(course_choco_mountain_dl)
|
|
MIO0_SEG(course_bowsers_castle_dl)
|
|
MIO0_SEG(course_banshee_boardwalk_dl)
|
|
MIO0_SEG(course_yoshi_valley_dl)
|
|
MIO0_SEG(course_frappe_snowland_dl)
|
|
MIO0_SEG(course_koopa_troopa_beach_dl)
|
|
MIO0_SEG(course_royal_raceway_dl)
|
|
MIO0_SEG(course_luigi_raceway_dl)
|
|
MIO0_SEG(course_moo_moo_farm_dl)
|
|
MIO0_SEG(course_toads_turnpike_dl)
|
|
MIO0_SEG(course_kalimari_desert_dl)
|
|
MIO0_SEG(course_sherbet_land_dl)
|
|
MIO0_SEG(course_rainbow_road_dl)
|
|
MIO0_SEG(course_wario_stadium_dl)
|
|
MIO0_SEG(course_block_fort_dl)
|
|
MIO0_SEG(course_skyscraper_dl)
|
|
MIO0_SEG(course_double_deck_dl)
|
|
MIO0_SEG(course_dks_jungle_parkway_dl)
|
|
MIO0_SEG(course_big_donut_dl)
|
|
|
|
COURSE_OFFSETS_SEG(course_mario_raceway_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_choco_mountain_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_bowsers_castle_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_banshee_boardwalk_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_yoshi_valley_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_frappe_snowland_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_koopa_troopa_beach_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_royal_raceway_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_luigi_raceway_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_moo_moo_farm_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_toads_turnpike_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_kalimari_desert_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_sherbet_land_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_rainbow_road_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_wario_stadium_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_block_fort_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_skyscraper_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_double_deck_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_dks_jungle_parkway_offsets, 0x09000000)
|
|
COURSE_OFFSETS_SEG(course_big_donut_offsets, 0x09000000)
|
|
|
|
VERT_SEG(mario_raceway_vertex, 0x0F000000)
|
|
VERT_SEG(choco_mountain_vertex, 0x0F000000)
|
|
VERT_SEG(bowsers_castle_vertex, 0x0F000000)
|
|
VERT_SEG(banshee_boardwalk_vertex, 0x0F000000)
|
|
VERT_SEG(yoshi_valley_vertex, 0x0F000000)
|
|
VERT_SEG(frappe_snowland_vertex, 0x0F000000)
|
|
VERT_SEG(koopa_troopa_beach_vertex, 0x0F000000)
|
|
VERT_SEG(royal_raceway_vertex, 0x0F000000)
|
|
VERT_SEG(luigi_raceway_vertex, 0x0F000000)
|
|
VERT_SEG(moo_moo_farm_vertex, 0x0F000000)
|
|
VERT_SEG(toads_turnpike_vertex, 0x0F000000)
|
|
VERT_SEG(kalimari_desert_vertex, 0x0F000000)
|
|
VERT_SEG(sherbet_land_vertex, 0x0F000000)
|
|
VERT_SEG(rainbow_road_vertex, 0x0F000000)
|
|
VERT_SEG(wario_stadium_vertex, 0x0F000000)
|
|
VERT_SEG(block_fort_vertex, 0x0F000000)
|
|
VERT_SEG(skyscraper_vertex, 0x0F000000)
|
|
VERT_SEG(double_deck_vertex, 0x0F000000)
|
|
VERT_SEG(dks_jungle_parkway_vertex, 0x0F000000)
|
|
VERT_SEG(big_donut_vertex, 0x0F000000)
|
|
|
|
BEGIN_SEG(sound_data, 0x0)
|
|
{
|
|
BUILD_DIR/data/sound_data.o(.data);
|
|
}
|
|
END_SEG(sound_data)
|
|
|
|
/* Discard everything not specifically mentioned above. */
|
|
/DISCARD/ :
|
|
{
|
|
*(*);
|
|
}
|
|
}
|