2020-06-02 18:44:34 +02:00
|
|
|
#ifndef SEGMENTS_H
|
|
|
|
#define SEGMENTS_H
|
2019-08-25 06:46:40 +02:00
|
|
|
|
2022-04-06 17:40:22 +02:00
|
|
|
#ifndef LINKER
|
|
|
|
#include "segment_symbols.h"
|
2020-05-08 03:24:42 +02:00
|
|
|
#endif
|
|
|
|
|
2019-08-25 06:46:40 +02:00
|
|
|
/*
|
|
|
|
* Memory addresses for segments. Ideally, this header file would not be
|
|
|
|
* needed, and the addresses would be defined in sm64.ld and linker-inserted
|
|
|
|
* into C code. However, there are some cases where that would not match, where
|
|
|
|
* addresses are loaded using lui/ori rather than lui/addiu.
|
|
|
|
* To avoid duplication, this file is included from sm64.ld. We make sure not
|
|
|
|
* to cast the addresses to pointers in this file, since that would be invalid
|
|
|
|
* linker script syntax.
|
|
|
|
*/
|
|
|
|
|
2022-04-06 17:40:22 +02:00
|
|
|
#ifndef USE_EXT_RAM
|
|
|
|
#define RAM_END 0x80400000
|
2019-08-25 06:46:40 +02:00
|
|
|
#else /* Use Expansion Pak space for pool. */
|
2022-04-06 17:40:22 +02:00
|
|
|
#define RAM_END 0x80800000
|
|
|
|
#endif
|
2019-08-25 06:46:40 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Workaround for running out of pool space due to
|
|
|
|
* importing large custom content.
|
|
|
|
*/
|
|
|
|
|
2020-05-08 03:24:42 +02:00
|
|
|
#define SEG_POOL_START 0x802AB000 // 0x0165000 in size
|
2019-08-25 06:46:40 +02:00
|
|
|
#define SEG_GODDARD SEG_POOL_START + 0x113000
|
2022-04-06 17:40:22 +02:00
|
|
|
#define POOL_SIZE RAM_END - SEG_POOL_START
|
2019-08-25 06:46:40 +02:00
|
|
|
|
2020-06-02 18:44:34 +02:00
|
|
|
#endif // SEGMENTS_H
|