Super Mario 64s source code (from a leak on 4chan so be careful)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.5 KiB

6 years ago
  1. #ifndef _SEGMENTS_H
  2. #define _SEGMENTS_H
  3. /*
  4. * Memory addresses for segments. Ideally, this header file would not be
  5. * needed, and the addresses would be defined in sm64.ld and linker-inserted
  6. * into C code. However, there are some cases where that would not match, where
  7. * addresses are loaded using lui/ori rather than lui/addiu.
  8. * To avoid duplication, this file is included from sm64.ld. We make sure not
  9. * to cast the addresses to pointers in this file, since that would be invalid
  10. * linker script syntax.
  11. */
  12. #ifndef USE_EXT_RAM /* Default: Runs out of memory quickly when import custom assets. */
  13. #define SEG_POOL_START 0x8005C000
  14. #define SEG_POOL_END SEG_STACK
  15. #define SEG_GODDARD 0x8016F000
  16. #define SEG_STACK 0x801C1000
  17. #define SEG_MAIN 0x80246000
  18. #define SEG_ENGINE 0x80378800
  19. #define SEG_FRAMEBUFFERS 0x8038F800
  20. #else /* Use Expansion Pak space for pool. */
  21. /*
  22. * Workaround for running out of pool space due to
  23. * importing large custom content.
  24. */
  25. #define SEG_STACK 0x8005C000 // 0x0085000 in size
  26. #define SEG_MAIN 0x800E1000 // 0x1328000 in size
  27. #define SEG_ENGINE 0x80213800 // 0x0017000 in size
  28. #define SEG_FRAMEBUFFERS 0x8022A800 // 0x0070800 in size
  29. #define SEG_POOL_START 0x8029B000 // 0x0165000 in size
  30. #define SEG_POOL_END 0x80800000
  31. #define SEG_POOL_END_4MB 0x80400000 // For the error message screen enhancement.
  32. #define SEG_GODDARD SEG_POOL_START + 0x113000
  33. #endif
  34. #endif // _SEGMENTS_H