#ifndef SEGMENTS_H1#define SEGMENTS_H23#include "config.h"45/*6* Memory addresses for segments. Ideally, this header file would not be7* needed, and the addresses would be defined in sm64.ld and linker-inserted8* into C code. However, there are some cases where that would not match, where9* addresses are loaded using lui/ori rather than lui/addiu.10* To avoid duplication, this file is included from sm64.ld. We make sure not11* to cast the addresses to pointers in this file, since that would be invalid12* linker script syntax.13*/1415#ifndef USE_EXT_RAM /* Default: Runs out of memory quickly when importing custom assets. */1617#define SEG_POOL_START 0x8005C00018#define SEG_POOL_END SEG_BUFFERS1920#define SEG_GODDARD 0x8016F0002122#define SEG_BUFFERS 0x801C10002324#if defined(VERSION_SH) || ENABLE_RUMBLE25#define SEG_MAIN 0x8024900026#elif defined(VERSION_EU)27#define SEG_MAIN 0x80241800 // TODO: Investigate why it's different?28#else29#define SEG_MAIN 0x8024600030#endif3132#ifdef VERSION_EU33#define SEG_ENGINE 0x8036FF0034#else35#define SEG_ENGINE 0x8037880036#endif3738#define SEG_FRAMEBUFFERS 0x8038F8003940#else /* Use Expansion Pak space for pool. */4142/*43* Workaround for running out of pool space due to44* importing large custom content.45*/4647#define SEG_BUFFERS 0x8005C000 // 0x0085000 in size48#define SEG_MAIN 0x800E1000 // 0x0132800 in size49#define SEG_ENGINE 0x80213800 // 0x0017000 in size50#define SEG_FRAMEBUFFERS 0x8022A800 // 0x0070800 in size51#define SEG_POOL_START 0x8029B000 // 0x0165000 in size52#define SEG_POOL_END 0x8080000053#define SEG_POOL_END_4MB 0x80400000 // For the error message screen enhancement.54#define SEG_GODDARD SEG_POOL_START + 0x11300055#endif5657#endif // SEGMENTS_H585960