2020-06-02 16:44:34 +00:00
|
|
|
#ifndef SEGMENTS_H
|
|
|
|
#define SEGMENTS_H
|
2019-08-25 04:46:40 +00:00
|
|
|
|
2022-04-06 15:40:22 +00:00
|
|
|
#ifndef LINKER
|
|
|
|
#include "segment_symbols.h"
|
2020-05-08 01:24:42 +00:00
|
|
|
#endif
|
|
|
|
|
2019-08-25 04:46:40 +00: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 15:40:22 +00:00
|
|
|
#ifndef USE_EXT_RAM
|
|
|
|
#define RAM_END 0x80400000
|
2019-08-25 04:46:40 +00:00
|
|
|
#else /* Use Expansion Pak space for pool. */
|
2022-04-06 15:40:22 +00:00
|
|
|
#define RAM_END 0x80800000
|
|
|
|
#endif
|
2019-08-25 04:46:40 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Workaround for running out of pool space due to
|
|
|
|
* importing large custom content.
|
|
|
|
*/
|
|
|
|
|
2020-05-08 01:24:42 +00:00
|
|
|
#define SEG_POOL_START 0x802AB000 // 0x0165000 in size
|
2019-08-25 04:46:40 +00:00
|
|
|
#define SEG_GODDARD SEG_POOL_START + 0x113000
|
2022-04-06 15:40:22 +00:00
|
|
|
#define POOL_SIZE RAM_END - SEG_POOL_START
|
2019-08-25 04:46:40 +00:00
|
|
|
|
2020-06-02 16:44:34 +00:00
|
|
|
#endif // SEGMENTS_H
|