1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 01:34:18 +00:00

[ntsc-1.2] Match ntsc-1.2 BSS and add to CI (#2187)

* Match ntsc-1.2

* Add ntsc-1.2 to CI

* Apply fixes from Jenkins

* Promote ntsc-1.2 to "supported" in Makefile

* Declare D_80858AD8 as a u64 array

* Tweak wording

* Hopefully make ntsc-1.2 bss more stable

* Restore segmented_address.h include
This commit is contained in:
cadmic 2024-09-12 11:10:43 -07:00 committed by GitHub
parent 09c1816e2d
commit f089adf20c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 191 additions and 142 deletions

38
Jenkinsfile vendored
View file

@ -26,71 +26,69 @@ pipeline {
} }
} }
} }
stage('Build ntsc-1.2, check disasm metadata') {
steps {
sh 'ln -s /usr/local/etc/roms/oot-ntsc-1.2-us.z64 baseroms/ntsc-1.2/baserom.z64'
sh 'make -j$(nproc) setup VERSION=ntsc-1.2'
sh 'make -j$(nproc) VERSION=ntsc-1.2'
sh '.venv/bin/python3 tools/check_disasm_metadata_unksyms.py -v ntsc-1.2'
sh 'make clean assetclean VERSION=ntsc-1.2'
}
}
// The ROMs are built in an order that maximizes compiler flags coverage in a "fail fast" approach. // The ROMs are built in an order that maximizes compiler flags coverage in a "fail fast" approach.
// Specifically we start with a retail ROM for BSS ordering, and make sure we cover all of // Specifically we start with a retail ROM for BSS ordering, and make sure we cover all of
// NTSC/PAL/MQ/DEBUG as quickly as possible. // N64/GC/NTSC/PAL/MQ/DEBUG as quickly as possible.
stage('Build ntsc-1.2') {
steps {
script {
build('ntsc-1.2', 'oot-ntsc-1.2-us.z64')
}
}
}
stage('Build gc-jp') { stage('Build gc-jp') {
steps { steps {
script { script {
build('gc-jp') build('gc-jp', 'oot-gc-jp.z64')
} }
} }
} }
stage('Build gc-eu-mq') { stage('Build gc-eu-mq') {
steps { steps {
script { script {
build('gc-eu-mq') build('gc-eu-mq', 'oot-gc-eu-mq.z64')
} }
} }
} }
stage('Build gc-eu-mq-dbg') { stage('Build gc-eu-mq-dbg') {
steps { steps {
script { script {
build('gc-eu-mq-dbg') build('gc-eu-mq-dbg', 'oot-gc-eu-mq-dbg.z64')
} }
} }
} }
stage('Build gc-us') { stage('Build gc-us') {
steps { steps {
script { script {
build('gc-us') build('gc-us', 'oot-gc-us.z64')
} }
} }
} }
stage('Build gc-jp-ce') { stage('Build gc-jp-ce') {
steps { steps {
script { script {
build('gc-jp-ce') build('gc-jp-ce', 'oot-gc-jp-ce.z64')
} }
} }
} }
stage('Build gc-eu') { stage('Build gc-eu') {
steps { steps {
script { script {
build('gc-eu') build('gc-eu', 'oot-gc-eu.z64')
} }
} }
} }
stage('Build gc-jp-mq') { stage('Build gc-jp-mq') {
steps { steps {
script { script {
build('gc-jp-mq') build('gc-jp-mq', 'oot-gc-jp-mq.z64')
} }
} }
} }
stage('Build gc-us-mq') { stage('Build gc-us-mq') {
steps { steps {
script { script {
build('gc-us-mq') build('gc-us-mq', 'oot-gc-us-mq.z64')
} }
} }
} }
@ -122,8 +120,8 @@ pipeline {
} }
} }
def build(String version) { def build(String version, String rom) {
sh "ln -s /usr/local/etc/roms/oot-${version}.z64 baseroms/${version}/baserom.z64" sh "ln -s /usr/local/etc/roms/${rom} baseroms/${version}/baserom.z64"
sh "make -j\$(nproc) setup VERSION=${version}" sh "make -j\$(nproc) setup VERSION=${version}"
try { try {
sh "make -j\$(nproc) VERSION=${version}" sh "make -j\$(nproc) VERSION=${version}"

View file

@ -18,6 +18,7 @@ ORIG_COMPILER ?= 0
# If COMPILER is "gcc", compile with GCC instead of IDO. # If COMPILER is "gcc", compile with GCC instead of IDO.
COMPILER ?= ido COMPILER ?= ido
# Target game version. Currently the following versions are supported: # Target game version. Currently the following versions are supported:
# ntsc-1.2 N64 NTSC 1.2 (Japan/US depending on REGION)
# gc-jp GameCube Japan # gc-jp GameCube Japan
# gc-jp-mq GameCube Japan Master Quest # gc-jp-mq GameCube Japan Master Quest
# gc-jp-ce GameCube Japan (Collector's Edition disc) # gc-jp-ce GameCube Japan (Collector's Edition disc)
@ -27,7 +28,7 @@ COMPILER ?= ido
# gc-eu-mq GameCube Europe/PAL Master Quest # gc-eu-mq GameCube Europe/PAL Master Quest
# gc-eu-mq-dbg GameCube Europe/PAL Master Quest Debug (default) # gc-eu-mq-dbg GameCube Europe/PAL Master Quest Debug (default)
# The following versions are work-in-progress and not yet matching: # The following versions are work-in-progress and not yet matching:
# ntsc-1.2 N64 NTSC 1.2 (Japan/US depending on REGION) # (none currently)
VERSION ?= gc-eu-mq-dbg VERSION ?= gc-eu-mq-dbg
# Number of threads to extract and compress with # Number of threads to extract and compress with
N_THREADS ?= $(shell nproc) N_THREADS ?= $(shell nproc)
@ -52,7 +53,6 @@ ifeq ($(VERSION),ntsc-1.2)
REGION ?= JP REGION ?= JP
PLATFORM := N64 PLATFORM := N64
DEBUG := 0 DEBUG := 0
COMPARE := 0
else ifeq ($(VERSION),gc-jp) else ifeq ($(VERSION),gc-jp)
REGION ?= JP REGION ?= JP
PLATFORM := GC PLATFORM := GC

View file

@ -91,7 +91,9 @@ s32 Fault_VPrintf(const char* fmt, va_list args);
#if PLATFORM_N64 #if PLATFORM_N64
extern vs32 gFaultExit;
extern vs32 gFaultMsgId; extern vs32 gFaultMsgId;
extern vs32 gFaultDisplayEnable;
extern volatile OSThread* gFaultFaultedThread; extern volatile OSThread* gFaultFaultedThread;
#define FAULT_MSG_ID gFaultMsgId #define FAULT_MSG_ID gFaultMsgId

View file

@ -1273,7 +1273,6 @@ u8 sFanfareStartTimer;
u16 sFanfareSeqId; u16 sFanfareSeqId;
#if PLATFORM_N64 #if PLATFORM_N64
// TODO: Unsure where in bss this is located
u16 sPrevAmbienceSeqId; u16 sPrevAmbienceSeqId;
#endif #endif

View file

@ -5,7 +5,8 @@
#include "cic6105.h" #include "cic6105.h"
#endif #endif
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:128"
StackEntry sBootThreadInfo; StackEntry sBootThreadInfo;
OSThread sIdleThread; OSThread sIdleThread;

View file

@ -1,3 +1,5 @@
#pragma increment_block_number "ntsc-1.2:128"
#include "global.h" #include "global.h"
#include "cic6105.h" #include "cic6105.h"
#include "fault.h" #include "fault.h"

View file

@ -2,7 +2,7 @@
#include "stack.h" #include "stack.h"
#include "terminal.h" #include "terminal.h"
#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64" #pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64 ntsc-1.2:64"
OSThread sMainThread; OSThread sMainThread;
STACK(sMainStack, 0x900); STACK(sMainStack, 0x900);

View file

@ -1,6 +1,7 @@
#include "global.h" #include "global.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:128"
ALIGNED(16) u8 sYaz0DataBuffer[0x400]; ALIGNED(16) u8 sYaz0DataBuffer[0x400];
u8* sYaz0DataBufferEnd; u8* sYaz0DataBufferEnd;

View file

@ -26,30 +26,32 @@
#include "n64dd.h" #include "n64dd.h"
#endif #endif
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:111"
StackEntry sDmaMgrStackInfo; StackEntry sDmaMgrStackInfo;
OSMesgQueue sDmaMgrMsgQueue; OSMesgQueue sDmaMgrMsgQueue;
OSMesg sDmaMgrMsgBuf[32]; OSMesg sDmaMgrMsgBuf[32];
OSThread sDmaMgrThread;
STACK(sDmaMgrStack, 0x500);
#if OOT_DEBUG
const char* sDmaMgrCurFileName;
s32 sDmaMgrCurFileLine;
#endif
u32 gDmaMgrVerbose = 0; u32 gDmaMgrVerbose = 0;
size_t gDmaMgrDmaBuffSize = DMAMGR_DEFAULT_BUFSIZE; size_t gDmaMgrDmaBuffSize = DMAMGR_DEFAULT_BUFSIZE;
u32 sDmaMgrIsRomCompressed = false; u32 sDmaMgrIsRomCompressed = false;
OSThread sDmaMgrThread;
STACK(sDmaMgrStack, 0x500);
#if OOT_DEBUG
const char* sDmaMgrCurFileName;
s32 sDmaMgrCurFileLine;
// dmadata filenames // dmadata filenames
#define DEFINE_DMA_ENTRY(_0, nameString) nameString, #define DEFINE_DMA_ENTRY(_0, nameString) nameString,
#if OOT_DEBUG
const char* sDmaMgrFileNames[] = { const char* sDmaMgrFileNames[] = {
#include "tables/dmadata_table.h" #include "tables/dmadata_table.h"
}; };
#endif #endif
#undef DEFINE_DMA_ENTRY #undef DEFINE_DMA_ENTRY

View file

@ -1,10 +1,14 @@
#if PLATFORM_N64
#pragma increment_block_number "ntsc-1.2:128"
#include "global.h" #include "global.h"
#include "fault.h" #include "fault.h"
#include "libc64/os_malloc.h" #include "libc64/os_malloc.h"
#include "stack.h" #include "stack.h"
#include "terminal.h" #include "terminal.h"
#if PLATFORM_N64 #pragma increment_block_number "ntsc-1.2:96"
typedef struct FaultMgr { typedef struct FaultMgr {
OSThread thread; OSThread thread;
@ -80,7 +84,7 @@ const char* sFpExceptionNames[] = {
}; };
u16 sFaultFontColor = GPACK_RGBA5551(255, 255, 255, 1); u16 sFaultFontColor = GPACK_RGBA5551(255, 255, 255, 1);
s32 D_800FF9C4[7] = { 0 }; // Unused (file padding?) s32 D_800FF9C4[7] = { 0 }; // Unused
Input sFaultInputs[MAXCONTROLLERS]; Input sFaultInputs[MAXCONTROLLERS];
@ -90,12 +94,10 @@ STACK(sFaultStack, 0x400);
StackEntry sFaultStackInfo; StackEntry sFaultStackInfo;
FaultCursorCoords sFaultCursorPos; FaultCursorCoords sFaultCursorPos;
vs32 sFaultExit; vs32 gFaultExit;
vs32 gFaultMsgId; vs32 gFaultMsgId;
vs32 sFaultDisplayEnable; vs32 gFaultDisplayEnable;
volatile OSThread* gFaultFaultedThread; volatile OSThread* gFaultFaultedThread;
s32 B_80122570[16];
s32 B_801225B0[8]; // Unused (file padding?)
void Fault_SleepImpl(u32 ms) { void Fault_SleepImpl(u32 ms) {
Sleep_Msec(ms); Sleep_Msec(ms);
@ -653,6 +655,8 @@ void Fault_DrawMemDumpSP(OSThread* thread) {
} }
void func_800AF3DC(void) { void func_800AF3DC(void) {
static s32 B_80122570[16];
static s32 B_801225B0[8]; // Unused
s32 i; s32 i;
Fault_DrawRecBlack(22, 16, 276, 208); Fault_DrawRecBlack(22, 16, 276, 208);
@ -773,8 +777,8 @@ void Fault_ThreadEntry(void* arg0) {
gFaultFaultedThread = faultedThread; gFaultFaultedThread = faultedThread;
Fault_LogThreadContext(faultedThread); Fault_LogThreadContext(faultedThread);
osSyncPrintf("%d %s %d:%s = %d\n", osGetThreadId(NULL), "fault.c", 1454, "fault_display_enable", osSyncPrintf("%d %s %d:%s = %d\n", osGetThreadId(NULL), "fault.c", 1454, "fault_display_enable",
sFaultDisplayEnable); gFaultDisplayEnable);
while (!sFaultDisplayEnable) { while (!gFaultDisplayEnable) {
Fault_SleepImpl(1000); Fault_SleepImpl(1000);
} }
Fault_SleepImpl(500); Fault_SleepImpl(500);
@ -793,8 +797,8 @@ void Fault_ThreadEntry(void* arg0) {
Fault_DrawMemDumpPC(faultedThread); Fault_DrawMemDumpPC(faultedThread);
Fault_WaitForInput(); Fault_WaitForInput();
Fault_ProcessClients(); Fault_ProcessClients();
} while (!sFaultExit); } while (!gFaultExit);
while (!sFaultExit) {} while (!gFaultExit) {}
Fault_ResumeThread(faultedThread); Fault_ResumeThread(faultedThread);
} }
} }
@ -806,7 +810,7 @@ void Fault_SetFrameBuffer(void* fb, u16 w, u16 h) {
} }
void Fault_Init(void) { void Fault_Init(void) {
sFaultDisplayEnable = 1; gFaultDisplayEnable = 1;
gFaultMgr.fb = (u16*)(PHYS_TO_K0(osMemSize) - sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH])); gFaultMgr.fb = (u16*)(PHYS_TO_K0(osMemSize) - sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH]));
gFaultMgr.fbWidth = SCREEN_WIDTH; gFaultMgr.fbWidth = SCREEN_WIDTH;
gFaultMgr.fbDepth = 16; gFaultMgr.fbDepth = 16;
@ -823,7 +827,7 @@ void Fault_AddHungupAndCrashImpl(const char* exp1, const char* exp2) {
osSyncPrintf("HungUp on Thread %d", osGetThreadId(NULL)); osSyncPrintf("HungUp on Thread %d", osGetThreadId(NULL));
osSyncPrintf("%s\n", exp1 != NULL ? exp1 : "(NULL)"); osSyncPrintf("%s\n", exp1 != NULL ? exp1 : "(NULL)");
osSyncPrintf("%s\n", exp2 != NULL ? exp2 : "(NULL)"); osSyncPrintf("%s\n", exp2 != NULL ? exp2 : "(NULL)");
while (sFaultDisplayEnable == 0) { while (gFaultDisplayEnable == 0) {
Fault_SleepImpl(1000); Fault_SleepImpl(1000);
} }
Fault_SleepImpl(500); Fault_SleepImpl(500);

View file

@ -5,7 +5,8 @@
#define GFXPOOL_HEAD_MAGIC 0x1234 #define GFXPOOL_HEAD_MAGIC 0x1234
#define GFXPOOL_TAIL_MAGIC 0x5678 #define GFXPOOL_TAIL_MAGIC 0x5678
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:223"
/** /**
* The time at which the previous `Graph_Update` ended. * The time at which the previous `Graph_Update` ended.
@ -19,12 +20,6 @@ OSTime sGraphPrevTaskTimeStart;
#if OOT_DEBUG #if OOT_DEBUG
FaultClient sGraphFaultClient; FaultClient sGraphFaultClient;
#endif
CfbInfo sGraphCfbInfos[3];
#if OOT_DEBUG
FaultClient sGraphUcodeFaultClient;
UCodeInfo D_8012D230[3] = { UCodeInfo D_8012D230[3] = {
{ UCODE_F3DZEX, gspF3DZEX2_NoN_PosLight_fifoTextStart }, { UCODE_F3DZEX, gspF3DZEX2_NoN_PosLight_fifoTextStart },
@ -165,11 +160,6 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
#if OOT_DEBUG #if OOT_DEBUG
static Gfx* sPrevTaskWorkBuffer = NULL; static Gfx* sPrevTaskWorkBuffer = NULL;
#endif #endif
static s32 sGraphCfbInfoIdx = 0;
OSTime timeNow;
OSTimer timer;
OSMesg msg;
OSTask_t* task = &gfxCtx->task.list.t; OSTask_t* task = &gfxCtx->task.list.t;
OSScTask* scTask = &gfxCtx->task; OSScTask* scTask = &gfxCtx->task;
@ -177,7 +167,8 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
osGetTime() - sGraphPrevTaskTimeStart - gAudioThreadUpdateTimeAcc; osGetTime() - sGraphPrevTaskTimeStart - gAudioThreadUpdateTimeAcc;
{ {
CfbInfo* cfb; OSTimer timer;
OSMesg msg;
// Schedule a message to be handled in 3 seconds, for RCP timeout // Schedule a message to be handled in 3 seconds, for RCP timeout
osSetTimer(&timer, OS_USEC_TO_CYCLES(3000000), 0, &gfxCtx->queue, (OSMesg)666); osSetTimer(&timer, OS_USEC_TO_CYCLES(3000000), 0, &gfxCtx->queue, (OSMesg)666);
@ -212,12 +203,15 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
#if OOT_DEBUG #if OOT_DEBUG
sPrevTaskWorkBuffer = gfxCtx->workBuffer; sPrevTaskWorkBuffer = gfxCtx->workBuffer;
#endif #endif
}
if (gfxCtx->callback != NULL) { if (gfxCtx->callback != NULL) {
gfxCtx->callback(gfxCtx, gfxCtx->callbackParam); gfxCtx->callback(gfxCtx, gfxCtx->callbackParam);
} }
{
OSTime timeNow = osGetTime();
timeNow = osGetTime();
if (gAudioThreadUpdateTimeStart != 0) { if (gAudioThreadUpdateTimeStart != 0) {
// The audio thread update is running // The audio thread update is running
// Add the time already spent to the accumulator and leave the rest for the next cycle // Add the time already spent to the accumulator and leave the rest for the next cycle
@ -229,41 +223,45 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
gAudioThreadUpdateTimeAcc = 0; gAudioThreadUpdateTimeAcc = 0;
sGraphPrevTaskTimeStart = osGetTime(); sGraphPrevTaskTimeStart = osGetTime();
}
task->type = M_GFXTASK; task->type = M_GFXTASK;
task->flags = OS_SC_DRAM_DLIST; task->flags = OS_SC_DRAM_DLIST;
task->ucode_boot = SysUcode_GetUCodeBoot(); task->ucode_boot = SysUcode_GetUCodeBoot();
task->ucode_boot_size = SysUcode_GetUCodeBootSize(); task->ucode_boot_size = SysUcode_GetUCodeBootSize();
task->ucode = SysUcode_GetUCode(); task->ucode = SysUcode_GetUCode();
task->ucode_data = SysUcode_GetUCodeData(); task->ucode_data = SysUcode_GetUCodeData();
task->ucode_size = SP_UCODE_SIZE; task->ucode_size = SP_UCODE_SIZE;
task->ucode_data_size = SP_UCODE_DATA_SIZE; task->ucode_data_size = SP_UCODE_DATA_SIZE;
task->dram_stack = gGfxSPTaskStack; task->dram_stack = gGfxSPTaskStack;
task->dram_stack_size = sizeof(gGfxSPTaskStack); task->dram_stack_size = sizeof(gGfxSPTaskStack);
task->output_buff = gGfxSPTaskOutputBuffer; task->output_buff = gGfxSPTaskOutputBuffer;
task->output_buff_size = gGfxSPTaskOutputBuffer + ARRAY_COUNT(gGfxSPTaskOutputBuffer); task->output_buff_size = gGfxSPTaskOutputBuffer + ARRAY_COUNT(gGfxSPTaskOutputBuffer);
task->data_ptr = (u64*)gfxCtx->workBuffer; task->data_ptr = (u64*)gfxCtx->workBuffer;
OPEN_DISPS(gfxCtx, "../graph.c", 828); OPEN_DISPS(gfxCtx, "../graph.c", 828);
task->data_size = (uintptr_t)WORK_DISP - (uintptr_t)gfxCtx->workBuffer; task->data_size = (uintptr_t)WORK_DISP - (uintptr_t)gfxCtx->workBuffer;
CLOSE_DISPS(gfxCtx, "../graph.c", 830); CLOSE_DISPS(gfxCtx, "../graph.c", 830);
task->yield_data_ptr = gGfxSPTaskYieldBuffer; task->yield_data_ptr = gGfxSPTaskYieldBuffer;
task->yield_data_size = sizeof(gGfxSPTaskYieldBuffer); task->yield_data_size = sizeof(gGfxSPTaskYieldBuffer);
scTask->next = NULL; scTask->next = NULL;
scTask->flags = OS_SC_NEEDS_RSP | OS_SC_NEEDS_RDP | OS_SC_SWAPBUFFER | OS_SC_LAST_TASK; scTask->flags = OS_SC_NEEDS_RSP | OS_SC_NEEDS_RDP | OS_SC_SWAPBUFFER | OS_SC_LAST_TASK;
if (R_GRAPH_TASKSET00_FLAGS & 1) { if (R_GRAPH_TASKSET00_FLAGS & 1) {
R_GRAPH_TASKSET00_FLAGS &= ~1; R_GRAPH_TASKSET00_FLAGS &= ~1;
scTask->flags &= ~OS_SC_SWAPBUFFER; scTask->flags &= ~OS_SC_SWAPBUFFER;
gfxCtx->fbIdx--; gfxCtx->fbIdx--;
} }
scTask->msgQueue = &gfxCtx->queue; scTask->msgQueue = &gfxCtx->queue;
scTask->msg = NULL; scTask->msg = NULL;
{ s16 pad; } {
static CfbInfo sGraphCfbInfos[3];
static s32 sGraphCfbInfoIdx = 0;
CfbInfo* cfb;
cfb = &sGraphCfbInfos[sGraphCfbInfoIdx]; cfb = &sGraphCfbInfos[sGraphCfbInfoIdx];
@ -279,14 +277,12 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
cfb->updateRate = R_UPDATE_RATE; cfb->updateRate = R_UPDATE_RATE;
scTask->framebuffer = cfb; scTask->framebuffer = cfb;
{ s16 pad2; }
gfxCtx->schedMsgQueue = &gScheduler.cmdQueue;
osSendMesg(&gScheduler.cmdQueue, (OSMesg)scTask, OS_MESG_BLOCK);
Sched_Notify(&gScheduler);
} }
gfxCtx->schedMsgQueue = &gScheduler.cmdQueue;
osSendMesg(&gScheduler.cmdQueue, (OSMesg)scTask, OS_MESG_BLOCK);
Sched_Notify(&gScheduler);
} }
void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
@ -339,6 +335,8 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
} }
if (R_HREG_MODE == HREG_MODE_UCODE_DISAS && R_UCODE_DISAS_TOGGLE != 0) { if (R_HREG_MODE == HREG_MODE_UCODE_DISAS && R_UCODE_DISAS_TOGGLE != 0) {
static FaultClient sGraphUcodeFaultClient;
if (R_UCODE_DISAS_LOG_MODE == 3) { if (R_UCODE_DISAS_LOG_MODE == 3) {
Fault_AddClient(&sGraphUcodeFaultClient, Graph_UCodeFaultClient, gfxCtx->workBuffer, "do_count_fault"); Fault_AddClient(&sGraphUcodeFaultClient, Graph_UCodeFaultClient, gfxCtx->workBuffer, "do_count_fault");
} }

View file

@ -1,18 +1,19 @@
#include "ultra64.h" #include "ultra64.h"
#pragma increment_block_number "gc-eu:80 gc-eu-mq:80 gc-jp:80 gc-jp-ce:80 gc-jp-mq:80 gc-us:80 gc-us-mq:80" // Declared before including other headers for BSS ordering
extern uintptr_t gSegments[NUM_SEGMENTS];
struct PreNmiBuff* gAppNmiBufferPtr; #pragma increment_block_number "gc-eu:252 gc-eu-mq:252 gc-jp:252 gc-jp-ce:252 gc-jp-mq:252 gc-us:252 gc-us-mq:252" \
"ntsc-1.2:128"
#include "segmented_address.h" extern struct PreNmiBuff* gAppNmiBufferPtr;
extern struct Scheduler gScheduler;
struct Scheduler gScheduler; extern struct PadMgr gPadMgr;
struct PadMgr gPadMgr; extern struct IrqMgr gIrqMgr;
struct IrqMgr gIrqMgr;
uintptr_t gSegments[NUM_SEGMENTS];
#include "global.h" #include "global.h"
#include "fault.h" #include "fault.h"
#include "segmented_address.h"
#include "stack.h" #include "stack.h"
#include "terminal.h" #include "terminal.h"
#include "versions.h" #include "versions.h"
@ -21,12 +22,21 @@ uintptr_t gSegments[NUM_SEGMENTS];
#include "n64dd.h" #include "n64dd.h"
#endif #endif
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.2:168"
extern u8 _buffersSegmentEnd[]; extern u8 _buffersSegmentEnd[];
s32 gScreenWidth = SCREEN_WIDTH; s32 gScreenWidth = SCREEN_WIDTH;
s32 gScreenHeight = SCREEN_HEIGHT; s32 gScreenHeight = SCREEN_HEIGHT;
u32 gSystemHeapSize = 0; u32 gSystemHeapSize = 0;
PreNmiBuff* gAppNmiBufferPtr;
Scheduler gScheduler;
PadMgr gPadMgr;
IrqMgr gIrqMgr;
uintptr_t gSegments[NUM_SEGMENTS];
OSThread sGraphThread; OSThread sGraphThread;
STACK(sGraphStack, 0x1800); STACK(sGraphStack, 0x1800);
STACK(sSchedStack, 0x600); STACK(sSchedStack, 0x600);
@ -38,7 +48,7 @@ StackEntry sSchedStackInfo;
StackEntry sAudioStackInfo; StackEntry sAudioStackInfo;
StackEntry sPadMgrStackInfo; StackEntry sPadMgrStackInfo;
StackEntry sIrqMgrStackInfo; StackEntry sIrqMgrStackInfo;
AudioMgr gAudioMgr; AudioMgr sAudioMgr;
OSMesgQueue sSerialEventQueue; OSMesgQueue sSerialEventQueue;
OSMesg sSerialMsgBuf[1]; OSMesg sSerialMsgBuf[1];
@ -130,12 +140,12 @@ void Main(void* arg) {
IrqMgr_AddClient(&gIrqMgr, &irqClient, &irqMgrMsgQueue); IrqMgr_AddClient(&gIrqMgr, &irqClient, &irqMgrMsgQueue);
StackCheck_Init(&sAudioStackInfo, sAudioStack, STACK_TOP(sAudioStack), 0, 0x100, "audio"); StackCheck_Init(&sAudioStackInfo, sAudioStack, STACK_TOP(sAudioStack), 0, 0x100, "audio");
AudioMgr_Init(&gAudioMgr, STACK_TOP(sAudioStack), THREAD_PRI_AUDIOMGR, THREAD_ID_AUDIOMGR, &gScheduler, &gIrqMgr); AudioMgr_Init(&sAudioMgr, STACK_TOP(sAudioStack), THREAD_PRI_AUDIOMGR, THREAD_ID_AUDIOMGR, &gScheduler, &gIrqMgr);
StackCheck_Init(&sPadMgrStackInfo, sPadMgrStack, STACK_TOP(sPadMgrStack), 0, 0x100, "padmgr"); StackCheck_Init(&sPadMgrStackInfo, sPadMgrStack, STACK_TOP(sPadMgrStack), 0, 0x100, "padmgr");
PadMgr_Init(&gPadMgr, &sSerialEventQueue, &gIrqMgr, THREAD_ID_PADMGR, THREAD_PRI_PADMGR, STACK_TOP(sPadMgrStack)); PadMgr_Init(&gPadMgr, &sSerialEventQueue, &gIrqMgr, THREAD_ID_PADMGR, THREAD_PRI_PADMGR, STACK_TOP(sPadMgrStack));
AudioMgr_WaitForInit(&gAudioMgr); AudioMgr_WaitForInit(&sAudioMgr);
StackCheck_Init(&sGraphStackInfo, sGraphStack, STACK_TOP(sGraphStack), 0, 0x100, "graph"); StackCheck_Init(&sGraphStackInfo, sGraphStack, STACK_TOP(sGraphStack), 0, 0x100, "graph");
osCreateThread(&sGraphThread, THREAD_ID_GRAPH, Graph_ThreadEntry, arg, STACK_TOP(sGraphStack), THREAD_PRI_GRAPH); osCreateThread(&sGraphThread, THREAD_ID_GRAPH, Graph_ThreadEntry, arg, STACK_TOP(sGraphStack), THREAD_PRI_GRAPH);

View file

@ -1,4 +1,5 @@
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:128"
#include "global.h" #include "global.h"
#include "terminal.h" #include "terminal.h"

View file

@ -5,7 +5,8 @@
#include "macros.h" #include "macros.h"
#include "sys_math3d.h" #include "sys_math3d.h"
#pragma increment_block_number "gc-eu:106 gc-eu-mq:106 gc-jp:106 gc-jp-ce:106 gc-jp-mq:106 gc-us:106 gc-us-mq:106" #pragma increment_block_number "gc-eu:106 gc-eu-mq:106 gc-jp:106 gc-jp-ce:106 gc-jp-mq:106 gc-us:106 gc-us-mq:106" \
"ntsc-1.2:79"
s32 Math3D_LineVsLineClosestTwoPoints(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB, s32 Math3D_LineVsLineClosestTwoPoints(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB,
Vec3f* lineAClosestToB, Vec3f* lineBClosestToA); Vec3f* lineAClosestToB, Vec3f* lineBClosestToA);

View file

@ -11,7 +11,8 @@
#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "assets/objects/object_bdoor/object_bdoor.h" #include "assets/objects/object_bdoor/object_bdoor.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:0"
static CollisionPoly* sCurCeilingPoly; static CollisionPoly* sCurCeilingPoly;
static s32 sCurCeilingBgId; static s32 sCurCeilingBgId;
@ -2019,7 +2020,7 @@ s32 func_8002F9EC(PlayState* play, Actor* actor, CollisionPoly* poly, s32 bgId,
return false; return false;
} }
#pragma increment_block_number "gc-eu:22 gc-eu-mq:22 gc-jp:22 gc-jp-ce:22 gc-jp-mq:22 gc-us:22 gc-us-mq:22" #pragma increment_block_number "gc-eu:22 gc-eu-mq:22 gc-jp:22 gc-jp-ce:22 gc-jp-mq:22 gc-us:22 gc-us-mq:22 ntsc-1.2:22"
// Local data used for Farore's Wind light (stored in BSS) // Local data used for Farore's Wind light (stored in BSS)
LightInfo D_8015BC00; LightInfo D_8015BC00;

View file

@ -1,6 +1,8 @@
#include "global.h" #include "global.h"
#include "terminal.h" #include "terminal.h"
#pragma increment_block_number "ntsc-1.2:152"
u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList); u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList);
void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector); void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector);
s32 BgCheck_PosInStaticBoundingBox(CollisionContext* colCtx, Vec3f* pos); s32 BgCheck_PosInStaticBoundingBox(CollisionContext* colCtx, Vec3f* pos);

View file

@ -4,7 +4,8 @@
#include "terminal.h" #include "terminal.h"
#include "overlays/actors/ovl_En_Horse/z_en_horse.h" #include "overlays/actors/ovl_En_Horse/z_en_horse.h"
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" #pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.2:192"
s16 Camera_RequestSettingImpl(Camera* camera, s16 requestedSetting, s16 flags); s16 Camera_RequestSettingImpl(Camera* camera, s16 requestedSetting, s16 flags);
s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange); s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange);
@ -3636,7 +3637,8 @@ s32 Camera_KeepOn3(Camera* camera) {
return 1; return 1;
} }
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:112"
s32 Camera_KeepOn4(Camera* camera) { s32 Camera_KeepOn4(Camera* camera) {
static Vec3f D_8015BD50; static Vec3f D_8015BD50;

View file

@ -5,7 +5,7 @@
#include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h" #include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0" #pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:224"
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*); typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*); typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*);
@ -2195,7 +2195,8 @@ void CollisionCheck_ATTrisVsACCyl(PlayState* play, CollisionCheckContext* colChk
} }
} }
#pragma increment_block_number "gc-eu:252 gc-eu-mq:252 gc-jp:252 gc-jp-ce:252 gc-jp-mq:252 gc-us:252 gc-us-mq:252" #pragma increment_block_number "gc-eu:252 gc-eu-mq:252 gc-jp:252 gc-jp-ce:252 gc-jp-mq:252 gc-us:252 gc-us-mq:252" \
"ntsc-1.2:252"
void CollisionCheck_ATCylVsACQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) { void CollisionCheck_ATCylVsACQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) {
static TriNorm tri1; static TriNorm tri1;

View file

@ -2,7 +2,8 @@
#include "region.h" #include "region.h"
#include "versions.h" #include "versions.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:192"
ALIGNED(16) SaveContext gSaveContext; ALIGNED(16) SaveContext gSaveContext;
u32 D_8015FA88; u32 D_8015FA88;

View file

@ -12,7 +12,8 @@ typedef struct InputCombo {
/* 0x2 */ u16 press; /* 0x2 */ u16 press;
} InputCombo; // size = 0x4 } InputCombo; // size = 0x4
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:128"
RegEditor* gRegEditor; RegEditor* gRegEditor;

View file

@ -123,7 +123,8 @@ u16 gCamAtSplinePointsAppliedFrame;
u16 gCamEyePointAppliedFrame; u16 gCamEyePointAppliedFrame;
u16 gCamAtPointAppliedFrame; u16 gCamAtPointAppliedFrame;
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" #pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.2:96"
// Cam ID to return to when a scripted cutscene is finished // Cam ID to return to when a scripted cutscene is finished
s16 sReturnToCamId; s16 sReturnToCamId;

View file

@ -1,7 +1,8 @@
#include "global.h" #include "global.h"
#include "terminal.h" #include "terminal.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:128"
void (*sKaleidoScopeUpdateFunc)(PlayState* play); void (*sKaleidoScopeUpdateFunc)(PlayState* play);
void (*sKaleidoScopeDrawFunc)(PlayState* play); void (*sKaleidoScopeDrawFunc)(PlayState* play);

View file

@ -7,7 +7,8 @@
#include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h" #include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:0"
typedef enum LightningBoltState { typedef enum LightningBoltState {
/* 0x00 */ LIGHTNING_BOLT_START, /* 0x00 */ LIGHTNING_BOLT_START,
@ -212,7 +213,8 @@ s16 sLightningFlashAlpha;
s16 sSunDepthTestX; s16 sSunDepthTestX;
s16 sSunDepthTestY; s16 sSunDepthTestY;
#pragma increment_block_number "gc-eu:112 gc-eu-mq:112 gc-jp:96 gc-jp-ce:96 gc-jp-mq:96 gc-us:96 gc-us-mq:96" #pragma increment_block_number "gc-eu:112 gc-eu-mq:112 gc-jp:96 gc-jp-ce:96 gc-jp-mq:96 gc-us:96 gc-us-mq:96" \
"ntsc-1.2:224"
LightNode* sNGameOverLightNode; LightNode* sNGameOverLightNode;
LightInfo sNGameOverLightInfo; LightInfo sNGameOverLightInfo;

View file

@ -8,7 +8,8 @@
#include "n64dd.h" #include "n64dd.h"
#endif #endif
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:112"
#if !PLATFORM_GC #if !PLATFORM_GC
#define OCARINA_BUTTON_A_PRIM_1_R 80 #define OCARINA_BUTTON_A_PRIM_1_R 80
@ -90,6 +91,9 @@
#define OCARINA_ICON_ENV_2_B 130 #define OCARINA_ICON_ENV_2_B 130
#endif #endif
s32 sCharTexSize;
s32 sCharTexScale;
s16 sTextFade = false; // original name: key_off_flag ? s16 sTextFade = false; // original name: key_off_flag ?
u8 D_8014B2F4 = 0; u8 D_8014B2F4 = 0;
@ -250,8 +254,6 @@ s16 gOcarinaSongItemMap[] = {
OCARINA_SONG_SARIAS, OCARINA_SONG_SUNS, OCARINA_SONG_TIME, OCARINA_SONG_STORMS, OCARINA_SONG_SARIAS, OCARINA_SONG_SUNS, OCARINA_SONG_TIME, OCARINA_SONG_STORMS,
}; };
s32 sCharTexSize;
s32 sCharTexScale;
s16 sOcarinaButtonAPrimR; s16 sOcarinaButtonAPrimR;
s16 sOcarinaButtonAPrimB; s16 sOcarinaButtonAPrimB;
s16 sOcarinaButtonAPrimG; s16 sOcarinaButtonAPrimG;

View file

@ -3,7 +3,8 @@
#define FLAGS \ #define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25 | ACTOR_FLAG_26) (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25 | ACTOR_FLAG_26)
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:128"
void (*sPlayerCallInitFunc)(Actor* thisx, PlayState* play); void (*sPlayerCallInitFunc)(Actor* thisx, PlayState* play);
void (*sPlayerCallDestroyFunc)(Actor* thisx, PlayState* play); void (*sPlayerCallDestroyFunc)(Actor* thisx, PlayState* play);

View file

@ -6,6 +6,8 @@
#include "stack.h" #include "stack.h"
#include "versions.h" #include "versions.h"
#pragma increment_block_number "ntsc-1.2:128"
typedef struct struct_801D9C30 { typedef struct struct_801D9C30 {
/* 0x000 */ s32 unk_000; // disk start /* 0x000 */ s32 unk_000; // disk start
/* 0x004 */ s32 unk_004; // disk end /* 0x004 */ s32 unk_004; // disk end

View file

@ -100,19 +100,21 @@ static ColliderCylinderInit sLightBallCylinderInit = {
static u8 D_808E4C58[] = { 0, 12, 10, 12, 14, 16, 12, 14, 16, 12, 14, 16, 12, 14, 16, 10, 16, 14 }; static u8 D_808E4C58[] = { 0, 12, 10, 12, 14, 16, 12, 14, 16, 12, 14, 16, 12, 14, 16, 10, 16, 14 };
static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f }; static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f };
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0" #pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:0"
static EnGanonMant* sCape; static EnGanonMant* sCape;
// TODO: There's probably a way to match BSS ordering with less padding by spreading the variables out and moving // TODO: There's probably a way to match BSS ordering with less padding by spreading the variables out and moving
// data around. It would be easier if we had more options for controlling BSS ordering in debug. // data around. It would be easier if we had more options for controlling BSS ordering in debug.
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" #pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.2:128"
static s32 sSeed1; static s32 sSeed1;
static s32 sSeed2; static s32 sSeed2;
static s32 sSeed3; static s32 sSeed3;
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" #pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.2:128"
static BossGanon* sGanondorf; static BossGanon* sGanondorf;

View file

@ -9,7 +9,7 @@
#include "overlays/actors/ovl_En_Boom/z_en_boom.h" #include "overlays/actors/ovl_En_Boom/z_en_boom.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/gameplay_keep/gameplay_keep.h"
#pragma increment_block_number "gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128 ntsc-1.2:128"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5) #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)

View file

@ -14,7 +14,7 @@
#include "assets/scenes/dungeons/ice_doukutu/ice_doukutu_scene.h" #include "assets/scenes/dungeons/ice_doukutu/ice_doukutu_scene.h"
#include "terminal.h" #include "terminal.h"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0" #pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:0"
#define FLAGS ACTOR_FLAG_4 #define FLAGS ACTOR_FLAG_4
@ -1395,7 +1395,8 @@ void func_80B3F3D8(void) {
Sfx_PlaySfxCentered2(NA_SE_PL_SKIP); Sfx_PlaySfxCentered2(NA_SE_PL_SKIP);
} }
#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64" #pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64" \
"ntsc-1.2:128"
void EnXc_PlayDiveSFX(Vec3f* src, PlayState* play) { void EnXc_PlayDiveSFX(Vec3f* src, PlayState* play) {
static Vec3f D_80B42DA0; static Vec3f D_80B42DA0;

View file

@ -354,19 +354,22 @@ void Player_Action_CsAction(Player* this, PlayState* play);
// .bss part 1 // .bss part 1
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:128"
static s32 D_80858AA0; static s32 D_80858AA0;
// TODO: There's probably a way to match BSS ordering with less padding by spreading the variables out and moving // TODO: There's probably a way to match BSS ordering with less padding by spreading the variables out and moving
// data around. It would be easier if we had more options for controlling BSS ordering in debug. // data around. It would be easier if we had more options for controlling BSS ordering in debug.
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" #pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.2:192"
static s32 D_80858AA4; static s32 D_80858AA4;
static Vec3f sInteractWallCheckResult; static Vec3f sInteractWallCheckResult;
static Input* sControlInput; static Input* sControlInput;
#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" #pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.2:128"
// .data // .data
@ -4744,7 +4747,7 @@ s32 func_80838FB8(PlayState* play, Player* this) {
* *
* Note: grottos and normal fairy fountains use `ENTR_RETURN_GROTTO` * Note: grottos and normal fairy fountains use `ENTR_RETURN_GROTTO`
*/ */
s16 sReturnEntranceGroupData[] = { static s16 sReturnEntranceGroupData[] = {
// ENTR_RETURN_GREAT_FAIRYS_FOUNTAIN_MAGIC // ENTR_RETURN_GREAT_FAIRYS_FOUNTAIN_MAGIC
/* 0 */ ENTR_DEATH_MOUNTAIN_TRAIL_4, // from Magic Fairy Fountain /* 0 */ ENTR_DEATH_MOUNTAIN_TRAIL_4, // from Magic Fairy Fountain
/* 1 */ ENTR_DEATH_MOUNTAIN_CRATER_3, // from Double Magic Fairy Fountain /* 1 */ ENTR_DEATH_MOUNTAIN_CRATER_3, // from Double Magic Fairy Fountain
@ -4775,7 +4778,7 @@ s16 sReturnEntranceGroupData[] = {
/** /**
* The values are indices into `sReturnEntranceGroupData` marking the start of each group * The values are indices into `sReturnEntranceGroupData` marking the start of each group
*/ */
u8 sReturnEntranceGroupIndices[] = { static u8 sReturnEntranceGroupIndices[] = {
11, // ENTR_RETURN_GREAT_FAIRYS_FOUNTAIN_SPELLS 11, // ENTR_RETURN_GREAT_FAIRYS_FOUNTAIN_SPELLS
9, // ENTR_RETURN_SHOOTING_GALLERY 9, // ENTR_RETURN_SHOOTING_GALLERY
3, // ENTR_RETURN_2 3, // ENTR_RETURN_2
@ -14262,7 +14265,12 @@ void Player_Action_80850AEC(Player* this, PlayState* play) {
void Player_Action_80850C68(Player* this, PlayState* play) { void Player_Action_80850C68(Player* this, PlayState* play) {
if ((this->av2.actionVar2 != 0) && ((this->unk_858 != 0.0f) || (this->unk_85C != 0.0f))) { if ((this->av2.actionVar2 != 0) && ((this->unk_858 != 0.0f) || (this->unk_85C != 0.0f))) {
static Vec3s D_80858AD8[25]; // 144-byte buffer, declared as a u64 array for 8-byte alignment. LinkAnimation_BlendToMorph will round up
// the buffer address to the nearest 16-byte alignment before passing it to AnimTaskQueue_AddLoadPlayerFrame,
// and AnimTaskQueue_AddLoadPlayerFrame requires space for `sizeof(Vec3s) * limbCount + 2` bytes. Link's
// skeleton has 22 limbs (including the root limb) so we need 134 bytes of space, plus 8 bytes of margin for
// the 16-byte alignment operation.
static u64 D_80858AD8[18];
f32 updateScale = R_UPDATE_RATE * 0.5f; f32 updateScale = R_UPDATE_RATE * 0.5f;
this->skelAnime.curFrame += this->skelAnime.playSpeed * updateScale; this->skelAnime.curFrame += this->skelAnime.playSpeed * updateScale;
@ -14277,7 +14285,7 @@ void Player_Action_80850C68(Player* this, PlayState* play) {
LinkAnimation_BlendToMorph(play, &this->skelAnime, &gPlayerAnim_link_fishing_wait, this->skelAnime.curFrame, LinkAnimation_BlendToMorph(play, &this->skelAnime, &gPlayerAnim_link_fishing_wait, this->skelAnime.curFrame,
(this->unk_85C < 0.0f) ? &gPlayerAnim_link_fishing_reel_up (this->unk_85C < 0.0f) ? &gPlayerAnim_link_fishing_reel_up
: &gPlayerAnim_link_fishing_reel_down, : &gPlayerAnim_link_fishing_reel_down,
5.0f, fabsf(this->unk_85C), D_80858AD8); 5.0f, fabsf(this->unk_85C), (Vec3s*)D_80858AD8);
LinkAnimation_InterpJointMorph(play, &this->skelAnime, 0.5f); LinkAnimation_InterpJointMorph(play, &this->skelAnime, 0.5f);
} else if (LinkAnimation_Update(play, &this->skelAnime)) { } else if (LinkAnimation_Update(play, &this->skelAnime)) {
this->unk_860 = 2; this->unk_860 = 2;

View file

@ -15,6 +15,8 @@
#include "assets/textures/icon_item_gameover_static/icon_item_gameover_static.h" #include "assets/textures/icon_item_gameover_static/icon_item_gameover_static.h"
#include "terminal.h" #include "terminal.h"
#pragma increment_block_number "ntsc-1.2:128"
#if !PLATFORM_GC #if !PLATFORM_GC
#define KALEIDO_PROMPT_CURSOR_R 100 #define KALEIDO_PROMPT_CURSOR_R 100
#define KALEIDO_PROMPT_CURSOR_G 100 #define KALEIDO_PROMPT_CURSOR_G 100

View file

@ -45,7 +45,7 @@ gScheduler = 0x8011D978; // size:0x258 type:Scheduler
gViConfigModeType = 0x80008350; // size:0x1 type:u8 gViConfigModeType = 0x80008350; // size:0x1 type:u8
sAudioStackInfo = 0x801214A8; sAudioStackInfo = 0x801214A8;
sAudioStack = 0x80120268; sAudioStack = 0x80120268;
gAudioMgr = 0x80121548; // size:0x298 type:AudioMgr sAudioMgr = 0x80121548; // size:0x298 type:AudioMgr
sPadMgrStackInfo = 0x801214C8; sPadMgrStackInfo = 0x801214C8;
sPadMgrStack = 0x80120A68; sPadMgrStack = 0x80120A68;
gPadMgr = 0x8011DBD0; // size:0x468 type:PadMgr gPadMgr = 0x8011DBD0; // size:0x468 type:PadMgr