Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MorsGames
GitHub Repository: MorsGames/sm64plus
Path: blob/master/src/buffers/buffers.c
7858 views
1
#include <ultra64.h>
2
3
#include "buffers.h"
4
#include "config.h"
5
6
ALIGNED8 u8 gDecompressionHeap[0xD000];
7
#if defined(VERSION_EU)
8
ALIGNED16 u8 gAudioHeap[DOUBLE_SIZE_ON_64_BIT(0x31200) - 0x3800];
9
#elif defined(VERSION_SH)
10
ALIGNED16 u8 gAudioHeap[DOUBLE_SIZE_ON_64_BIT(0x31200) - 0x4800];
11
#else
12
ALIGNED16 u8 gAudioHeap[DOUBLE_SIZE_ON_64_BIT(0x31200)];
13
#endif
14
15
ALIGNED8 u8 gIdleThreadStack[0x800];
16
ALIGNED8 u8 gThread3Stack[0x2000];
17
ALIGNED8 u8 gThread4Stack[0x2000];
18
ALIGNED8 u8 gThread5Stack[0x2000];
19
#if ENABLE_RUMBLE
20
ALIGNED8 u8 gThread6Stack[0x2000];
21
#endif
22
// 0x400 bytes
23
ALIGNED8 u8 gGfxSPTaskStack[SP_DRAM_STACK_SIZE8];
24
// 0xc00 bytes for f3dex, 0x900 otherwise
25
ALIGNED8 u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE];
26
// 0x200 bytes
27
ALIGNED8 struct SaveBuffer gSaveBuffer;
28
// 0x190a0 bytes
29
struct GfxPool gGfxPools[GFX_NUM_POOLS];
30
31
// Yield buffer for audio, 0x400 bytes. Stubbed out post-JP since the audio
32
// task never yields.
33
#ifdef VERSION_JP
34
ALIGNED8 u8 gAudioSPTaskYieldBuffer[OS_YIELD_AUDIO_SIZE];
35
#endif
36
37
// Probably Thread 2 stack space. Unreferenced, and stubbed out with f3dex to
38
// avoid an overflowing .buffers segment.
39
#if !defined(F3DEX_GBI_SHARED) && !defined(VERSION_EU)
40
ALIGNED8 u8 gUnusedThread2Stack[0x1400];
41
#endif
42
43