2021-12-27 19:23:03 +00:00
|
|
|
#pragma once
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-12-27 19:23:03 +00:00
|
|
|
#include "global.h"
|
|
|
|
#include "ultra64/types.h"
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
|
|
#define SCREEN_WIDTH 320
|
|
|
|
#define SCREEN_HEIGHT 240
|
|
|
|
|
|
|
|
#define REGION_NULL 0
|
|
|
|
#define REGION_US 1
|
|
|
|
#define REGION_JP 2
|
|
|
|
#define REGION_EU 3
|
|
|
|
|
2021-12-27 19:23:03 +00:00
|
|
|
/*
|
2020-10-03 15:22:44 +00:00
|
|
|
#define Z_PRIORITY_MAIN 10
|
|
|
|
#define Z_PRIORITY_GRAPH 11
|
|
|
|
#define Z_PRIORITY_AUDIOMGR 12
|
|
|
|
#define Z_PRIORITY_PADMGR 14
|
|
|
|
#define Z_PRIORITY_SCHED 15
|
|
|
|
#define Z_PRIORITY_DMAMGR 16
|
|
|
|
#define Z_PRIORITY_IRQMGR 17
|
2021-12-27 19:23:03 +00:00
|
|
|
*/
|
2020-10-03 15:22:44 +00:00
|
|
|
|
2020-03-17 04:31:30 +00:00
|
|
|
// NOTE: Once we start supporting other builds, this can be changed with an ifdef
|
|
|
|
#define REGION_NATIVE REGION_EU
|
|
|
|
|
|
|
|
|
2022-02-12 19:50:06 +00:00
|
|
|
struct SequenceContext {
|
2021-12-03 14:49:32 +00:00
|
|
|
/* 0x00 */ u8 seqId;
|
|
|
|
/* 0x01 */ u8 natureAmbienceId;
|
2022-02-12 19:50:06 +00:00
|
|
|
}; // size = 0x2
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
|
|
|
2020-03-22 16:37:38 +00:00
|
|
|
|
2022-02-12 19:50:06 +00:00
|
|
|
struct ElfMessage {
|
2020-03-30 20:29:51 +00:00
|
|
|
/* 0x00 */ u8 byte0;
|
|
|
|
/* 0x01 */ u8 byte1;
|
|
|
|
/* 0x02 */ u8 byte2;
|
|
|
|
/* 0x03 */ u8 byte3;
|
2022-02-12 19:50:06 +00:00
|
|
|
}; // size = 0x4
|
2020-03-30 20:29:51 +00:00
|
|
|
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-02-12 19:50:06 +00:00
|
|
|
struct StackEntry {
|
2020-03-17 04:31:30 +00:00
|
|
|
/* 0x00 */ struct StackEntry* next;
|
|
|
|
/* 0x04 */ struct StackEntry* prev;
|
2021-12-27 19:23:03 +00:00
|
|
|
/* 0x08 */ uintptr_t head;
|
|
|
|
/* 0x0C */ uintptr_t tail;
|
2020-03-17 04:31:30 +00:00
|
|
|
/* 0x10 */ u32 initValue;
|
|
|
|
/* 0x14 */ s32 minSpace;
|
|
|
|
/* 0x18 */ const char* name;
|
2022-02-12 19:50:06 +00:00
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-02-12 19:50:06 +00:00
|
|
|
enum StackStatus {
|
2020-03-17 04:31:30 +00:00
|
|
|
STACK_STATUS_OK = 0,
|
|
|
|
STACK_STATUS_WARNING = 1,
|
|
|
|
STACK_STATUS_OVERFLOW = 2
|
2022-02-12 19:50:06 +00:00
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-02-12 19:50:06 +00:00
|
|
|
struct ISVDbg {
|
2020-03-22 21:50:11 +00:00
|
|
|
/* 0x00 */ u32 magic; // IS64
|
2020-03-17 04:31:30 +00:00
|
|
|
/* 0x04 */ u32 get;
|
|
|
|
/* 0x08 */ u8 unk_08[0x14-0x08];
|
|
|
|
/* 0x14 */ u32 put;
|
|
|
|
/* 0x18 */ u8 unk_18[0x20-0x18];
|
|
|
|
/* 0x20 */ u8 data[0x10000-0x20];
|
2022-02-12 19:50:06 +00:00
|
|
|
};
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-03-22 21:50:11 +00:00
|
|
|
typedef struct {
|
2020-04-13 23:03:10 +00:00
|
|
|
/* 0x00 */ char name[0x18];
|
|
|
|
/* 0x18 */ u32 mediaFormat;
|
|
|
|
/* 0x1C */ union {
|
2020-03-22 21:50:11 +00:00
|
|
|
struct {
|
2020-03-17 04:31:30 +00:00
|
|
|
u16 cartId;
|
|
|
|
u8 countryCode;
|
|
|
|
u8 version;
|
|
|
|
};
|
|
|
|
u32 regionInfo;
|
|
|
|
};
|
2020-04-13 23:03:10 +00:00
|
|
|
} LocaleCartInfo; // size = 0x20
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-05-11 00:04:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
// ========================
|
|
|
|
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
|
|
|
2022-02-12 19:50:06 +00:00
|
|
|
struct OverlayRelocationSection {
|
2020-03-17 04:31:30 +00:00
|
|
|
/* 0x00 */ u32 textSize;
|
|
|
|
/* 0x04 */ u32 dataSize;
|
|
|
|
/* 0x08 */ u32 rodataSize;
|
|
|
|
/* 0x0C */ u32 bssSize;
|
|
|
|
/* 0x10 */ u32 nRelocations;
|
|
|
|
/* 0x14 */ u32 relocations[1];
|
2022-02-12 19:50:06 +00:00
|
|
|
}; // size >= 0x18
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-12-27 19:23:03 +00:00
|
|
|
#define NUM_SEGMENTS (16)
|
|
|
|
extern uintptr_t gSegments[NUM_SEGMENTS];
|