- Save Editor (Gen 3):
- Added full support for EV, IV, Nature, Ability, and Ribbons editing for Gen 3 Pokémon.
- Implemented stat calculations, personality-based nature derivation, and Gen 3 save data structures.
- Added comprehensive unit test suite in tests/save_editor_gen3_ev_iv_tests.lua.
- GBA Extraction & Graphics:
- Added zero-copy ARM-safe ROM accessor and fast LZ77 string decompression.
- Fixed bag chrome decompression string-buffer indexing preventing solid-color renders.
- Fixed TM Case HM badge tile offset and palette mapping.
- Added builtin moves fallback in src/core/game3/battle/builtin_moves.lua.
- Improved parallel extraction resilience, desktop fallback search paths, and prefix handling.
- Android & Launchers:
- Added dynamic high-res app launcher shortcuts and color palettes for all supported games.
- Updated Android icon generator and intent dispatch handlers.
endFrame composites a world override mirrored on LOVE 12, because a
pipeline's own projection pre-flips Y. ctx.drawFx puts the standing
effects into that same canvas as ordinary 2D, so the mirror inverts them
instead of righting them: a trainer's "!" draws upside down, below its
feet, on the mirrored half of the screen.
The condition is now Renderer.mirrorsWorldOverride, named because it is
not only the blit's business, and ctx.drawFx runs its block under the
matching mirror about the bound canvas. project() is left alone: it
already answers in screen rows.
A Japanese glyph advances by its width plus the window's letter spacing,
which a Latin one ignores (pokefirered/src/text.c:853): 1 for the normal
font (new_menu_helpers.c:413, the field message printer), 0 for the small
one (gFontInfos, new_menu_helpers.c:65). The engine already adds that
spacing, but only to a string carrying the {JPN} control code a ROM-
extracted one does; a mod's Japanese text has none, so its kana ran a pixel
tighter per character than on the cart. A glyph drawn from a Japanese sheet
now takes the window's spacing either way, and only once, falling back to
the message printer's spacing when the window sets none.
Name limits count characters (PLAYER_NAME_LENGTH, POKEMON_NAME_LENGTH), but
the start menu, the continue screen and the PC's hovered-mon panel cut names
with string.sub, in bytes. A kana is three bytes, so a five-kana species name
lost two characters in the PC and a Japanese player name was cut inside a
character. FrlgFont.truncate cuts by UTF-8 character, and those sites use it;
Latin names are cut as before, and an accented Latin name, whose accented
letters are two bytes, is no longer cut short either.
game3 prints every string with the US cart's Latin font, and FrlgFont has
no glyph for a kana, so a Japanese translation of FireRed would print
blank. The US cart still carries its Japanese fonts, which its text
printer draws for a string in Japanese mode (pokefirered/src/text.c:141,
:227): pret builds them into the US ROM, with the normal font's width
table.
The font extractor now bakes both, the normal font from its eight-to-a-row
layout (DecompressGlyph_Normal, text.c:1452) with its widths and the small
one sixteen to a row (DecompressGlyph_Small, text.c:1372), as
chrome/fonts/japanese_{normal,small}_{fg,shadow}.rgba and
japanese_widths.lua. LeafGreen's addresses follow the same -0x24 shift as
the rest of text.o. Cache version 120 re-imports existing caches.
FrlgFont numbers a Japanese character by its byte in the Japanese block of
pokefirered/charmap.txt (kana 01-A0, the full-width space, !?。ー), plus
the symbols the font keeps at the Latin block's codes in their full-width
forms (digits, letters, 『』「」, 円, /, :), offset past the Latin
glyphs. A character with no Latin glyph draws from the Japanese sheet, at
the width the cart gives it (the table for the normal font, 8px for the
small one). Latin text is drawn as before.
Add a gated MODS row to the FireRed/LeafGreen start menu and an always-on
MODS row in the option menu. Both open a manager on the game3 stack that
reuses ManagerState behavior (list, detail, options, staged apply, profiles)
and draws with FRLG chrome. Nested name/quantity prompts route to the Gen 3
naming screen and a quantity dialog; APPLY & RESTART returns to the title.
- Preserve active track voices in Player.stopAt after fast-forward catchup
- Add start-from-0 fallback in Player.stopAt when at timestamp predates the retained snaps ring
- Mute m4a worker during stopAt pause so it does not synthesize empty buffers while fanfare plays
- Ensure Audio.resumeBgm calls Source:play on bgmSource if stopped
The wave-3 tint batch as its own commit, so the harness fold before it stays
reviewable on its own.
multichoice.lua: Multichoice.COUNTS is the live option-count source for the
cart - 65 of 65 entries match pret's src/script_menu.c, where
ScriptMenu_MultichoiceGrid reads sMultichoiceLists[id].list and .count
(:915-930). The table is load-bearing in a ROM-less run: with no import
cache present there is nothing else to ask how many options a list has.
adapters.lua: the multichoice operand reader no longer treats row[4] as an
option count. pret asm/macros/event.inc:893-899 lays the command out as
x, y, multichoiceId, ignoreBPress - four bytes and no count field - so the
old read shifted the operand stream and every later decode in the command
went wrong with it.
tests/game3_photo_tint_boundary_test.lua: pins the cache-miss arity fallback
and the yield behaviour it rests on, which is the BUG2 root cause. Run
twice green; the existing tint suite still passes 33/33 alongside it.
Ships the CI fix together with the test-harness work that supports it, so
every tier stays honest on every machine.
scripts/test.sh
- T6 records missing-artifact failures as skips when no imported game3 data
exists at all (empty CI identity, no data/generated): the data-driven
top-level suites assert instead of self-skipping on a fresh runner. The
skipped suite names are printed with that reason; with data present the
same failure gates exactly as before.
- The T3 content verdict now weighs the exit code and the FAIL-line allowlist
together. The exit code used to be discarded, so a mid-run crash
(unresolvable require under POKEPORT_DATA_DIR) printed green checks, zero
FAIL lines, and passed. A non-zero exit with no FAIL line is reported as a
crash with the error line captured - a crash is not a pass.
Test-suite fixes, each run green (several twice)
- tests/run_tests.lua: restore per-suite leaked state and add the Data seam,
so one suite's loaded data cannot leak into the next.
- tests/mod_runtime_tests.lua: save and restore the environment around each
case.
- tests/parity_ss_anne_rooms.lua: _loadModule raw-order fix (30/30).
- tests/parity_ss_anne_departure.lua: the Data seams plus the playMap stub.
- playMap stubs for parity_rival_walkoff, parity_tower_rival,
parity_silph_rival_bug2241 and parity_ss_anne_guard.
- Class-B seams in mod_registry_tests, mod_catalog_tests, mod_ui_tests,
parity_ball_shake_anim, parity_wavy_screen, parity_hidden_coins_bcd_bug1810,
parity_mart_stock and parity_rocket3_sight_bug1814.
Together these close the 57 failing checks that were on the content tier
(allowlist stays at 0), so a content run on a machine with imports ends
ALL TESTS PASSED.
Three follow-ups to the merge snapshot, kept as their own commit so the
review of the wave commit stays intact:
- The PC panel's left data panel broke in the merge: upstream inlines the
egg-aware species read into frontPic while the M8 dedup had removed the
duplicate local, so `sp` was referenced with no binding and the luacheck
gate failed. One shared local sp = Pokemon.speciesOrEgg(hoveredMon) serves
both the TV sprite and the stats card
(pokefirered/src/pokemon_storage_system_data.c:1034, :1057,
MON_DATA_SPECIES_OR_EGG).
- Trainer-card vars fall back to the stringified key: persist_sidecar and
Flags.serialize write tostring(id) keys into session.vars, so a numeric miss
used to read every var as 0.
- tests/game3_trainer_card_photo_tint_test.lua drives the whole Game Corner
photo -> card tint chain (setvar -> UpdateTrainerCardPhotoIcons ->
Flags.serialize/loadInto -> cardData) and pins c.monIconTint/c.monSpecies.
Second batch of the Gen 3 review work: the review lanes closed their queues
and the test gate grew with them.
Review census: 139 routed findings -- 118 fixed, 14 invalid (the report had
Gen 4+ semantics in more than one place), 6 struck as stale after
re-verification, 1 re-routed. Every fix carries its own pret citation in
docs/game3/review-v3-triage.md; the E10 opcode closure is itemised in
docs/game3/e10-opcode-spec.md (18 ops wired, 2 reclassified to the seam class).
Representative ROM-grounded changes:
- The POKéMON start-menu entry is now gated on FLAG_SYS_POKEMON_GET the way
retail does it (pokefirered/src/start_menu.c:217-218, flag 0x828).
- Money ops read their amount raw and gate the change on the disable byte
(pokefirered/src/scrcmd.c:1798-1830, pokefirered/asm/macros/event.inc:1166-1186);
random and the warp family VarGet theirs
(pokefirered/src/scrcmd.c:455-461, :719-731).
- The HM table matches FRLG: there is no Whirlpool HM
(pokefirered/include/constants/items.h:411-418).
- The day-care party-full guard follows src/daycare.c:525, :1081.
- Knock Off keeps its battle-scoped send-out mask
(pokefirered/src/battle_script_commands.c:2730-2752, :4489), carried from
the first batch.
Structural work: the I6/I9/J1 architecture items landed as seams (profile
selector, capability flags, font provider, virtual-object layer), the adopted
footprint register keeps a KEEP verdict, the quantizer target is met, and the
30 drain items plus carves 1-4 are folded in.
Tests: T6 now runs 282 top-level suites (273 + 9 new), the re-sweep ends at
267 pass / 0 fail, the engine tier is 634 suites, modkit 37, and the full
gate ran green twice with T3 active on an imported Red cache. Documented
skips are the lua5.4 oversize-save oracle where lua5.4 is absent and the
config-partials listed in docs/game3/game3-artifact-conversions-v3.md.
Docs shipped: review-v3-triage.md, e10-opcode-spec.md, rse-seams.md,
game3-suite-sweep-v113.md, game3-artifact-conversions-v3.md,
test-baseline-v3.md (plus the first-batch docs already on the branch).