* Build: check out scripts with LF line endings
* Build: replace the build scripts with Kazarov
* Port: rename PC_OVERRIDE to Kazarov's PORT_OVERRIDE
* Build: build the PS2 executables through Kazarov's CMake modules
* Scripts: remove unused tooling
* Build: update Kazarov
* Build: update Kazarov
* Build: run the port without a disc when its data exists, reject the old REGION variable, and lock the shared Windows dependencies
* Build: update Kazarov
* Port: serialise game data extraction across configurations
* Build: update Kazarov
* Port: hold a shared data lock while the game runs
* Port: refuse to start on data another configuration re-extracted
* Build: update Kazarov
scripts/host/mesa-macos.sh builds mesa-26.2.4, the newest tag found that
carries KosmicKrisp (it first ships in 26.0), with kosmickrisp and swrast
into a prefix and prints the VK_DRIVER_FILES lines for both. Reruns reuse a
prefix holding the tag's build.
The macos job runs on macos-26, since KosmicKrisp is built on Metal 4: it
builds Mesa through the script under a cache keyed by tag, builds the port
with the macos-arm64 preset, runs ctest on lavapipe, and runs darkcloud on
KosmicKrisp headless and in a window with vulkaninfo summaries, all kept as
artifacts. The KosmicKrisp steps report without failing the job until the
first green run. The Ubuntu job is unchanged.
* Name the discs by region and put every build input and output under a region directory
The disc images are rom/Dark Cloud (NTSC).iso and rom/Dark Cloud (PAL).iso;
each region's checksums and extracted files live under rom/ntsc and rom/pal.
scripts/build/region.py turns REGION (NTSC by default, or PAL) into the paths
every script and CMake use: config/<region> holds the split configuration,
symbol lists, fixups and linker script, splat writes asm/<region>, and CMake
builds into build/<region>. The overlay headers and pads are splat pad
segments, so no assets/ tree is written, and the unused config/reference_asm
and reference_asm.py are gone. overlay_private.sh places a private-repository
file still kept under rom/extracted/ in rom/ntsc/extracted/.
* Carry PR 40's PAL source differences; NTSC unchanged
The PAL prototype's small divergences sit inline under #ifdef PAL in 30
units; common.h gains the per-region screen geometry and GS Y offset,
clsmes.hpp the message window width and ClsMes size. The twenty PAL-only
functions stand as stubs at their retail positions, dataread's four
tree-building functions are NTSC-only, and PAL compiler-state pragma
blocks sit beside NTSC's. config/pal/splice.txt lists the 213 functions
whose PAL bytes are not yet expressed in C. Every unit compiles with
-DPAL; every NTSC object is byte-identical.
Co-authored-by: Alessandro Suha <plarpoon@zandark.eu>
* Generate the PAL split configuration from NTSC's
scripts/build/splat_config.py writes a release's symbol lists from its own
executable and carries NTSC's yaml, linker script and object fixups over to
another release by symbol and relocation pairing: the overlay entry points by
the retail name they note, _gp from .reginfo, @ORDER comments and the dun text
start, and function-local statics through the function that owns them. The
carried files are written once and maintained by hand; --check compares the
symbol lists and, on NTSC, proves the carry is the identity. region.paths()
names any release's files.
config/pal holds the PAL prototype's yaml, symbol lists, linker script, fixups
and expression-node overrides. NTSC unchanged.
Co-authored-by: Alessandro Suha <plarpoon@zandark.eu>
* Supply the PAL prototype's undecompiled functions from INCLUDE_ASM markers
Each PAL function not yet in C is `#ifdef PAL INCLUDE_ASM("asm/pal/nonmatchings/
<unit>", <symbol>)` beside its NTSC body (207 markers); include_asm.h and the
mwccgap marker path are back for PAL, with the name counter pinned where a
marker stands so later compiler constants keep their names. PAL-differing data
is C under #ifdef PAL in the owning units. datacheck.py reads a relocation's
target section from the REL entry's info field. docs/PAL.md describes the PAL
build. NTSC is byte-identical; PAL links with 120 functions and 2 data bytes
still to reconcile.
Co-authored-by: Alessandro Suha <plarpoon@zandark.eu>
* Carry PR 40's PAL data and layout; every PAL image verifies
The PAL linker script places EditGaijiTbl at 0x0025f02c, aligns _dun_end to
128, drops dngmessageman's small-data line (PAL's LanguageStr is in
hitvalue.cpp) and aligns editmapscript's .sbss to 16 over retail's unnamed
pad at 0x002a9f3c. title/op_c loads the Chara__3 entries NTSC does in
OpC_InitProcess2/5; battlemenu loads wepstatus and reloads DrawAallWeapon's
textures from BtlMenuExtBlock under PAL.
datacheck.py resolves retail's name__N spellings (Names), scores each voted
anchor on its own layout and resolves a pointer word by its exact name.
PAL: SCUS_971.11 3048 perfect / 154 asm, TITLE.BIN 126 / 44, DUN.BIN 52 / 9,
data perfect. NTSC unchanged.
Co-authored-by: Alessandro Suha <plarpoon@zandark.eu>
* PAL: 29 main-executable functions in C from PR 40; NTSC unchanged
battle_globals, battlemenu (9), memcard (2), menu_dungeon, shot_freefuncs,
clsmes, dataread (2), edit, editloop, fireomni, frame, mglib, texture (3),
stockitem, chararead, dungeonmap and spritetable express their PAL
differences under #ifdef PAL instead of INCLUDE_ASM markers; editloop's PAL
argument-flag indices follow. mglib.hpp declares PAL's mgTopVRAM and
mgZBufferAdr.
Co-authored-by: Alessandro Suha <plarpoon@zandark.eu>
* PAL: 10 title-overlay functions in C from PR 40; NTSC unchanged
op_a (2), op_b, op_c (2), op_d, opening, rushmovi (2) and title express their
PAL differences under #ifdef PAL. A string retail shares with a function
still supplied by a marker is reached through PAL_POOLED, so the compiled
function does not emit a second copy.
Co-authored-by: Alessandro Suha <plarpoon@zandark.eu>
* PAL: dun, gamepad, eastking, menu_draw and collisiondata functions in C from PR 40
dun/gameloop (2), gamepad (3), eastking (2), menu_draw (2) and collisiondata
express their PAL differences under #ifdef PAL; dun/gameloop takes PR 40's
PAL argument-flag block, InitEastKingEvent returns int under PAL, and the
PAL expression-node overrides carry PR 40's five entries. The PAL fixups
follow every unit's renumbered statics. All three PAL images verify with
158 functions still supplied by markers; NTSC unchanged.
Co-authored-by: Alessandro Suha <plarpoon@zandark.eu>
* Make decompile.sh's m2c context parse again
m2ctx.py spells a C++ template-id as a plain identifier, and now declares each
one it spells as an opaque struct, so CDataAlloc<1, 1690000> no longer breaks
m2c's C parser. decompile.sh generates a missing context with the container's
venv Python, which has libclang's bindings.
* Work on the PAL version
---------
Co-authored-by: Alessandro Suha <plarpoon@zandark.eu>
asm/ is splat's output and is now generated on every machine rather than
checked in. The exception is asm/data/main/parts, the hand-edited residual
data dumps, which cannot be regenerated and stay committed. The one
hand-written file moves to src/handwritten.
Without the disc image, the three binaries splat reads can be copied into
rom/extracted/iso from a private repository that mirrors this tree's layout,
with scripts/host/overlay_private.sh. They are checked against
rom/extracted.sha256 before every split.
The progress workflow does exactly that: it checks out the repository named
by the PRIVATE_REPOSITORY variable with the PRIVATE_REPO_SSH_KEY deploy key,
and skips when either is missing, as it is for pull requests from forks.
The reverse-engineering notes under re/ai are no longer tracked.