Scenes: 13 scenes' InitVramAndCram/FadeIn/FadeOut ops differ from their retail calls

Open
#652 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
godot, rust

Research direction

Start with rust/psiv-core/src/scenes/fixed_fades_image.rs, which holds the byte check and the KNOWN list, then compare each listed scene's ops against the retail calls to InitVRAMAndCRAM ($05A658), Pal_FadeIn ($0421D4) and PalFadeOut_ClrSpriteTbl ($04223E). Done means each scene's ops match its calls or its documented ranges are corrected, the scene leaves KNOWN, and the affected scene tests are re-pinned.

Written by the indexing model from the issue text.

Description

presentation

Problem. Thirteen scenes record InitVramAndCram/FadeIn/FadeOut ops that are not the jsr/jmps their retail bytes make to InitVRAMAndCRAM ($05A658), Pal_FadeIn ($0421D4) and PalFadeOut_ClrSpriteTbl ($04223E). Since #637 each of these ops spends the cartridge's fade frames on the CRAM model, so a missing, extra or misplaced op now moves the scene's timing and draws a fade the cartridge does not (or skips one it does).

Evidence (the byte check #637 adds, rust/psiv-core/src/scenes/fixed_fades_image.rs, against each scene's documented ranges on the US image; retail calls, then the scene's ops):

  • Cutscene_Dorin: Init, In, In / Init, In
  • Cutscene_AlysWounded: Init, In, Init, In, In, Out, In / Init, In, Init, In, In
  • Cutscene_ZioDefeated: Init, In, Out, In, Out, Init, In, In, Out, Init, In, Init, In, In / Init, In, Out, In, Out, Init, In, In, In
  • Cutscene_InsideSpaceship: Init, In / Init, In, Out, Init, Out, Out
  • Cutscene_SpaceshipSabotage: Init, In, Out, In, Out, Init, In, Out / Init, In, Out
  • Cutscene_CrashLaanding: Init, In, Init, In, Out, In, Out, In, Init, In, In / Init, In, Init, In, Out, In, Out, Init, In, In
  • Cutscene_DarkForce1Defeated: Init, In, Init, Init, In / Init, In, Init, In
  • Cutscene_LeRoofAgain: Init, In, Init, In / Init, In, Init, In, Init, In, Out, Init, Out, Out
  • Cutscene_FindingAirCastle: Init, In / Init, In, Init, In, Out, Init, Out, Out
  • Cutscene_LashiecDefeated: Init, In, Out, Init, In, Out, Init, In / Init, In, Out, Init, In, Init
  • Event_DeVarsDefeated, Event_SaLewsDefeated: none / Out
  • Cutscene_Ending: Init, In, Init, In, Init, In, Init, Init, In / Init, In, Init, In, Init, In, Init

Some may be a documented range that misses or overlaps another scene's bytes (InsideSpaceship/SpaceshipSabotage, LeRoofAgain/FindingAirCastle) rather than a wrong op; Event_RidingElevator records these ops and documents no range.

Acceptance. Each scene's ops match its calls (or its ranges are corrected), it leaves KNOWN in fixed_fades_image.rs, and its scene tests and any certify pair it moves are re-pinned.

Related: #637, #596 (the same check for the variable fades).

Dominant language
Rust
Stars
1
Forks
0
Avg merge
8h 43m
Merged PRs (30d)
288

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TusanHomichi/PSIV

All issues in TusanHomichi/PSIV

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.