1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-28 07:46:18 +00:00

[PAL N64] Completely match pal-1.0 and pal-1.1 and add to CI (#2246)

* [PAL N64] Match pal-1.0 and pal-1.1 and add to CI

* bss fixes from Jenkins
This commit is contained in:
cadmic 2024-09-28 17:52:45 -07:00 committed by GitHub
parent 04498f808f
commit f7f38ff874
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 71 additions and 48 deletions

14
Jenkinsfile vendored
View file

@ -57,6 +57,13 @@ pipeline {
}
}
}
stage('Build pal-1.0') {
steps {
script {
build('pal-1.0', 'oot-pal-1.0.z64')
}
}
}
stage('Build gc-us') {
steps {
script {
@ -85,6 +92,13 @@ pipeline {
}
}
}
stage('Build pal-1.1') {
steps {
script {
build('pal-1.1', 'oot-pal-1.1.z64')
}
}
}
stage('Build gc-us-mq') {
steps {
script {

View file

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

View file

@ -1,7 +1,7 @@
#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" \
"ntsc-1.2:128"
"ntsc-1.2:128 pal-1.1:128"
ALIGNED(16) u8 sYaz0DataBuffer[0x400];
u8* sYaz0DataBufferEnd;

View file

@ -27,7 +27,7 @@
#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" \
"ntsc-1.2:96"
"ntsc-1.2:96 pal-1.0:94 pal-1.1:94"
StackEntry sDmaMgrStackInfo;
OSMesgQueue sDmaMgrMsgQueue;

View file

@ -1,6 +1,6 @@
#if PLATFORM_N64
#pragma increment_block_number "ntsc-1.2:128"
#pragma increment_block_number "ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
#include "global.h"
#include "fault.h"
@ -8,7 +8,7 @@
#include "stack.h"
#include "terminal.h"
#pragma increment_block_number "ntsc-1.2:96"
#pragma increment_block_number "ntsc-1.2:96 pal-1.0:96 pal-1.1:96"
typedef struct FaultMgr {
OSThread thread;

View file

@ -8,7 +8,7 @@
#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" \
"ntsc-1.2:192"
"ntsc-1.2:192 pal-1.0:192 pal-1.1:192"
/**
* The time at which the previous `Graph_Update` ended.

View file

@ -4,7 +4,7 @@
extern uintptr_t gSegments[NUM_SEGMENTS];
#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"
"ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
extern struct PreNmiBuff* gAppNmiBufferPtr;
extern struct Scheduler gScheduler;
@ -23,7 +23,7 @@ extern struct IrqMgr gIrqMgr;
#endif
#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160 gc-us-mq:160" \
"ntsc-1.2:156"
"ntsc-1.2:156 pal-1.0:154 pal-1.1:154"
extern u8 _buffersSegmentEnd[];

View file

@ -1,5 +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" \
"ntsc-1.2:128"
"ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
#include "global.h"
#include "terminal.h"

View file

@ -1,6 +1,7 @@
#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" \
"pal-1.1:128"
uintptr_t sSysCfbFbPtr[2];
uintptr_t sSysCfbEnd;

View file

@ -6,7 +6,7 @@
#include "sys_math3d.h"
#pragma increment_block_number "gc-eu:104 gc-eu-mq:104 gc-jp:104 gc-jp-ce:104 gc-jp-mq:104 gc-us:104 gc-us-mq:104" \
"ntsc-1.2:79"
"ntsc-1.2:79 pal-1.0:80 pal-1.1:80"
s32 Math3D_LineVsLineClosestTwoPoints(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB,
Vec3f* lineAClosestToB, Vec3f* lineBClosestToA);

View file

@ -19,7 +19,8 @@ MtxF gMtxFClear = {
};
// clang-format on
#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" \
"pal-1.1:128"
MtxF* sMatrixStack; // "Matrix_stack"
MtxF* sCurrentMatrix; // "Matrix_now"

View file

@ -12,7 +12,7 @@
#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" \
"ntsc-1.2:0"
"ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
static CollisionPoly* sCurCeilingPoly;
static s32 sCurCeilingBgId;
@ -2071,7 +2071,8 @@ s32 func_8002F9EC(PlayState* play, Actor* actor, CollisionPoly* poly, s32 bgId,
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 ntsc-1.2: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 pal-1.0:22 pal-1.1:22"
// Local data used for Farore's Wind light (stored in BSS)
LightInfo D_8015BC00;

View file

@ -5,7 +5,7 @@
#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" \
"ntsc-1.2:192"
"ntsc-1.2:192 pal-1.0:192 pal-1.1:192"
s16 Camera_RequestSettingImpl(Camera* camera, s16 requestedSetting, s16 flags);
s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange);
@ -3638,7 +3638,7 @@ s32 Camera_KeepOn3(Camera* camera) {
}
#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:98"
"ntsc-1.2:98 pal-1.0:96 pal-1.1:96"
s32 Camera_KeepOn4(Camera* camera) {
static Vec3f D_8015BD50;

View file

@ -5,7 +5,8 @@
#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 ntsc-1.2:208"
#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:208" \
"pal-1.0:208 pal-1.1:208"
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*);
@ -2201,7 +2202,7 @@ 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" \
"ntsc-1.2:252"
"ntsc-1.2:252 pal-1.0:252 pal-1.1:252"
void CollisionCheck_ATCylVsACQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) {
static TriNorm tri1;

View file

@ -3,7 +3,7 @@
#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" \
"ntsc-1.2:192"
"ntsc-1.2:192 pal-1.0:192 pal-1.1:192"
ALIGNED(16) SaveContext gSaveContext;
u32 D_8015FA88;

View file

@ -13,7 +13,7 @@ typedef struct InputCombo {
} 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" \
"ntsc-1.2:128"
"ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
RegEditor* gRegEditor;

View file

@ -125,7 +125,7 @@ u16 gCamEyePointAppliedFrame;
u16 gCamAtPointAppliedFrame;
#pragma increment_block_number "gc-eu:192 gc-eu-mq:176 gc-jp:192 gc-jp-ce:192 gc-jp-mq:176 gc-us:192 gc-us-mq:176" \
"ntsc-1.2:80"
"ntsc-1.2:80 pal-1.0:80 pal-1.1:80"
// Cam ID to return to when a scripted cutscene is finished
s16 sReturnToCamId;

View file

@ -1,5 +1,5 @@
#pragma increment_block_number "gc-eu:248 gc-eu-mq:248 gc-jp:240 gc-jp-ce:240 gc-jp-mq:240 gc-us:240 gc-us-mq:240" \
"ntsc-1.2:0"
"ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
#include "global.h"
#include "ultra64.h"
@ -214,7 +214,7 @@ s16 sSunDepthTestX;
s16 sSunDepthTestY;
#pragma increment_block_number "gc-eu:240 gc-eu-mq:240 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224 gc-us-mq:224" \
"ntsc-1.2:216"
"ntsc-1.2:216 pal-1.0:240 pal-1.1:240"
LightNode* sNGameOverLightNode;
LightInfo sNGameOverLightInfo;

View file

@ -4,7 +4,7 @@
(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" \
"ntsc-1.2:128"
"ntsc-1.2:128 pal-1.1:128"
void (*sPlayerCallInitFunc)(Actor* thisx, PlayState* play);
void (*sPlayerCallDestroyFunc)(Actor* thisx, PlayState* play);

View file

@ -1,6 +1,7 @@
#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" \
"pal-1.1:128"
MtxF gSkinLimbMatrices[60]; // holds matrices for each limb of the skeleton currently being drawn

View file

@ -6,7 +6,7 @@
#include "stack.h"
#include "versions.h"
#pragma increment_block_number "ntsc-1.2:128"
#pragma increment_block_number "ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
typedef struct struct_801D9C30 {
/* 0x000 */ s32 unk_000; // disk start

View file

@ -101,21 +101,22 @@ 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 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 ntsc-1.2: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" \
"pal-1.0:0 pal-1.1:0"
static EnGanonMant* sCape;
// 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.
#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"
"ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
static s32 sSeed1;
static s32 sSeed2;
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" \
"ntsc-1.2:128"
"ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
static BossGanon* sGanondorf;

View file

@ -10,7 +10,8 @@
#include "assets/objects/gameplay_keep/gameplay_keep.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" \
"pal-1.0:128 pal-1.1:128"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)

View file

@ -11,7 +11,8 @@
#include "overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.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" \
"pal-1.0:128 pal-1.1:128"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_10)

View file

@ -14,7 +14,8 @@
#include "assets/scenes/dungeons/ice_doukutu/ice_doukutu_scene.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 ntsc-1.2: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" \
"pal-1.0:0 pal-1.1:0"
#define FLAGS ACTOR_FLAG_4
@ -1395,7 +1396,8 @@ void func_80B3F3D8(void) {
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 ntsc-1.2: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 pal-1.0:64 pal-1.1:64"
void EnXc_PlayDiveSFX(Vec3f* src, PlayState* play) {
static Vec3f D_80B42DA0;

View file

@ -36,7 +36,7 @@
#endif
#pragma increment_block_number "gc-eu:199 gc-eu-mq:199 gc-jp:199 gc-jp-ce:199 gc-jp-mq:199 gc-us:199 gc-us-mq:199" \
"ntsc-1.2:128"
"ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
#define FLAGS ACTOR_FLAG_4

View file

@ -357,21 +357,21 @@ void Player_Action_CsAction(Player* this, PlayState* play);
// .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" \
"ntsc-1.2:128"
"ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
static s32 D_80858AA0;
// 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.
#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"
"ntsc-1.2:192 pal-1.0:192 pal-1.1:192"
static s32 sSavedCurrentMask;
static Vec3f sInteractWallCheckResult;
static Input* sControlInput;
#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"
"ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
// .data

View file

@ -634,6 +634,12 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
gDPPipeSync(POLY_OPA_DISP++);
#if PLATFORM_N64 && OOT_VERSION != NTSC_1_2
if (0) {
s32 pad[3];
}
#endif
#if OOT_DEBUG
if (HREG(15) == 0) {
gDPSetTextureFilter(POLY_OPA_DISP++, G_TF_POINT);
@ -726,12 +732,6 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
gSP1Quadrangle(POLY_OPA_DISP++, j, j + 2, j + 3, j + 1, 0);
#endif
#if PLATFORM_N64 && OOT_VERSION != NTSC_1_2
if (0) {
s32 pad[3];
}
#endif
if (ZREG(38) == 0) {
gDPPipeSync(POLY_OPA_DISP++);
gDPSetTextureFilter(POLY_OPA_DISP++, G_TF_BILERP);

View file

@ -16,7 +16,7 @@
#include "terminal.h"
#include "versions.h"
#pragma increment_block_number "ntsc-1.2:128"
#pragma increment_block_number "ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
#if !PLATFORM_GC
#define KALEIDO_PROMPT_CURSOR_R 100

View file

@ -611,7 +611,7 @@ def format_pragma(amounts: dict[str, int], max_line_length: int) -> list[str]:
first = True
for version, amount in sorted(amounts.items()):
part = f"{version}:{amount}"
if len(current_line) + len(part) + len('" \\') > max_line_length:
if len(current_line) + len(" ") + len(part) + len('" \\') > max_line_length:
lines.append(current_line + '" ')
current_line = " " * len(pragma_start) + '"'
first = True