Fix JP build and add action to test all versions (#558)

* Fix JP build

* Add a script to verify all versions.

* symbol size udpate, and scratch link update

* Add support for diffing other regions and versions with custom flags
This commit is contained in:
Ryan Myers
2025-05-06 15:22:41 -04:00
committed by GitHub
parent 9427c0a5f4
commit 6217af0c38
11 changed files with 100 additions and 13 deletions
+65
View File
@@ -0,0 +1,65 @@
name: Verify All Versions
on:
pull_request_target:
branches: [master]
push:
branches: [master]
jobs:
verify-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y build-essential libssl-dev pkg-config git python3 python3-pip binutils-mips-linux-gnu python3-venv libpcre2-dev libpcre2-8-0
- name: Get US v77 ROM
run: wget -q -O baseroms/baserom.us.v77.z64 ${{secrets.ROMURL}}
- name: Get PAL v77 ROM
run: wget -q -O baseroms/baserom.pal.v77.z64 ${{secrets.ROMURL_PALv77}}
- name: Get JPN v79 ROM
run: wget -q -O baseroms/baserom.jpn.v79.z64 ${{secrets.ROMURL_JPNv79}}
- name: Get US v80 ROM
run: wget -q -O baseroms/baserom.us.v80.z64 ${{secrets.ROMURL_USv80}}
- name: Get PAL v80 ROM
run: wget -q -O baseroms/baserom.pal.v80.z64 ${{secrets.ROMURL_PALv80}}
- name: Verify US v77 ROM
run: if [[ $(echo "0cb115d8716dbbc2922fda38e533b9fe63bb9670 baseroms/baserom.us.v77.z64" | sha1sum -c --quiet -) = "" ]]; then echo "Signature OK"; else echo "Failed"; exit 1; fi
- name: Verify PAL v77 ROM
run: if [[ $(echo "dd5d64dd140cb7aa28404fa35abdcaba33c29260 baseroms/baserom.pal.v77.z64" | sha1sum -c --quiet -) = "" ]]; then echo "Signature OK"; else echo "Failed"; exit 1; fi
- name: Verify JPN v79 ROM
run: if [[ $(echo "23ba3d302025153d111416e751027cef11213a19 baseroms/baserom.jpn.v79.z64" | sha1sum -c --quiet -) = "" ]]; then echo "Signature OK"; else echo "Failed"; exit 1; fi
- name: Verify US v80 ROM
run: if [[ $(echo "6d96743d46f8c0cd0edb0ec5600b003c89b93755 baseroms/baserom.us.v80.z64" | sha1sum -c --quiet -) = "" ]]; then echo "Signature OK"; else echo "Failed"; exit 1; fi
- name: Verify PAL v80 ROM
run: if [[ $(echo "b7f628073237b3d211d40406aa0884ff8fdd70d5 baseroms/baserom.pal.v80.z64" | sha1sum -c --quiet -) = "" ]]; then echo "Signature OK"; else echo "Failed"; exit 1; fi
- name: Make Setup
run: make setup -j4
- name: Run Compile All Script
run: ./compile_all.sh
# We only need to verify the last one, as the compile all script will error out on any versions failing.
# So if this one passes, they all pass.
- name: Verify Final Build
run: if [[ $(sha1sum -c --quiet ver/verification/dkr.us.v77.sha1) = "" ]]; then echo "Signature OK"; else echo "Failed"; exit 1; fi
+1
View File
@@ -1,3 +1,4 @@
#!/bin/sh
# Allows custom diff arguments for the region and version being diffed. (ex. --REGION=us --VERSION=v80)
.venv/bin/python3 tools/asm-differ/diff.py "$@"
+22 -3
View File
@@ -1,7 +1,26 @@
def apply(config, args):
config["baseimg"] = "baseroms/baserom.us.v77.z64"
config["myimg"] = "build/dkr.us.v77.z64"
config["mapfile"] = "build/dkr.us.v77.map"
config["baseimg"] = f"baseroms/baserom." + args.region + "." + args.version + ".z64"
config["myimg"] = f"build/dkr." + args.region + "." + args.version + ".z64"
config["mapfile"] = f"build/dkr." + args.region + "." + args.version + ".map"
config["source_directories"] = ["src"]
config["show_line_numbers_default"] = True
config["expected_dir"] = "expected/"
config["makeflags"] = ["REGION=" + args.region, "VERSION=" + args.version]
def add_custom_arguments(parser):
parser.add_argument(
"-r",
"--REGION",
dest="region",
default="us",
type=str,
help="Set the region",
)
parser.add_argument(
"-v",
"--VERSION",
dest="version",
default="v77",
type=str,
help="Set the version",
)
+1
View File
@@ -1,3 +1,4 @@
#!/bin/sh
# Allows custom diff arguments for the region and version being diffed. (ex. --REGION=us --VERSION=v80)
.venv/bin/python3 tools/asm-differ/diff.py -smwo3 --line-numbers --max-lines 2048 "$@"
+5 -4
View File
@@ -145,7 +145,7 @@ u16 gGhostChecksumIDsPak[6];
u8 gGhostLevelIDsMenu[6];
u8 gGhostCharacterIDsMenu[6];
UNUSED s32 D_801282D2_EEA82;
AudioPoint *gMenuSoundMasks[MAXCONTROLLERS]; // Soundmask values
SoundHandle gMenuSoundMasks[MAXCONTROLLERS]; // Soundmask values
u8 gGhostVehicleIDsMenu[6];
UNUSED s8 sUnused_80126828; // Set to 0 in menu_init, and never used again.
u16 gGhostChecksumIDsMenu[6];
@@ -167,9 +167,9 @@ s16 gMenuStickY[5];
s16 D_8012683A;
s32 gCinematicSkipA;
s32 gPostraceScaleOut;
AudioPoint *gTrackTTSoundMask;
SoundHandle gTrackTTSoundMask;
s32 gCinematicSkipB;
AudioPoint *D_80126848;
SoundHandle D_80126848;
s32 gCinematicMusicChangeOff;
s32 gTitleDemoIndex;
s32 gTitleRevealTimer;
@@ -202,7 +202,7 @@ f32 gTrackSelectTargetY;
char *gTrackMenuHubName;
s32 gSelectedTrackX;
s32 gSelectedTrackY;
AudioPoint *gSoundOptionMask;
SoundHandle gSoundOptionMask;
s32 gSaveMenuOptionCountLower;
SaveFileData *gSaveMenuFilesDest;
s32 gSaveMenuOptionCountUpper;
@@ -3205,6 +3205,7 @@ void init_title_screen_variables(void) {
}
#ifdef NON_MATCHING
// Differs in v80
// Single regswap diff
void func_80083098(f32 updateRateF) {
f32 temp;
+1 -1
View File
@@ -1353,7 +1353,7 @@ void set_skydome_visbility(s32 renderSky) {
}
// init_skydome
// https://decomp.me/scratch/jmbc1
// https://decomp.me/scratch/80umh
#pragma GLOBAL_ASM("asm/nonmatchings/tracks/func_80028050.s")
/**
+1 -1
View File
@@ -4283,7 +4283,7 @@ gFFLUnlocked = 0x80128460;
gTrackSelectVertsFlip = 0x8012846C;
D_80126928 = 0x80128470;
D_8012692C = 0x80128474;
gTrackSelectRenderDetails = 0x80128478;
gTrackSelectRenderDetails = 0x80128478; // size:0x90
gPlayerSelectVehicle = 0x80128508; // size:0x4
gPlayerSelectConfirm = 0x8012850C; // size:0x4
gTrackSelectCursorX = 0x80128510; // size:0x4
+1 -1
View File
@@ -3955,7 +3955,7 @@ D_80126920 = 0x801269B0;
gTrackSelectVertsFlip = 0x801269B4;
D_80126928 = 0x801269B8;
D_8012692C = 0x801269BC;
gTrackSelectRenderDetails = 0x801269C0;
gTrackSelectRenderDetails = 0x801269C0; // size:0x90
gPlayerSelectVehicle = 0x80126A50; // size:0x4
gPlayerSelectConfirm = 0x80126A54; // size:0x4
gTrackSelectCursorX = 0x80126A58; // size:0x4
+1 -1
View File
@@ -3889,7 +3889,7 @@ D_80126920 = 0x80126F70;
gTrackSelectVertsFlip = 0x80126F74;
D_80126928 = 0x80126F78;
D_8012692C = 0x80126F7C;
gTrackSelectRenderDetails = 0x80126F80;
gTrackSelectRenderDetails = 0x80126F80; // size:0x90
gPlayerSelectVehicle = 0x80127010; // size:0x4
gPlayerSelectConfirm = 0x80127014; // size:0x4
gTrackSelectCursorX = 0x80127018; // size:0x4
+1 -1
View File
@@ -4384,7 +4384,7 @@ D_80126920 = 0x80126920;
gTrackSelectVertsFlip = 0x80126924;
D_80126928 = 0x80126928;
D_8012692C = 0x8012692C;
gTrackSelectRenderDetails = 0x80126930;
gTrackSelectRenderDetails = 0x80126930; // size:0x90
gPlayerSelectVehicle = 0x801269C0; // size:0x4
gPlayerSelectConfirm = 0x801269C4; // size:0x4
gTrackSelectCursorX = 0x801269C8; // size:0x4
+1 -1
View File
@@ -3884,7 +3884,7 @@ D_80126920 = 0x80126EE0;
gTrackSelectVertsFlip = 0x80126EE4;
D_80126928 = 0x80126EE8;
D_8012692C = 0x80126EEC;
gTrackSelectRenderDetails = 0x80126EF0;
gTrackSelectRenderDetails = 0x80126EF0; // size:0x90
gPlayerSelectVehicle = 0x80126F80; // size:0x4
gPlayerSelectConfirm = 0x80126F84; // size:0x4
gTrackSelectCursorX = 0x80126F88; // size:0x4