Scenes: the Le Roof scenes reach their colour loops 7-8 frames early

Open
#595 4 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, reverse-engineering, rust
Domain
game-dev

Research direction

The issue names the Le Roof scene timing in Event_MeetingLeRoof and Cutscene_LeRoofAgain, the DMAPlanes_VInt/DmaPlanes frame handling, and the SceneOp::FadeOut transcription at $07845A. Read #546 first, since it may already cover the DmaPlanes frame class. Done when both scenes hit the colour loop on retail's counted frame and $07845A is a VariablePaletteFade out, mode 5.

Written by the indexing model from the issue text.

Description

claude priority: medium ready

Found while working on #591. Refs #589.

What happens

The Le Roof colour cycle (loc_70638) writes on frames whose Main_Frame_Count & 3 is zero. Its phase is therefore retail's only when the frames before the loop are. With the native frame count seeded to retail's at the event's start, the frames from event start to the fade-in's first pass are:

Scene Retail (counted frames) Native
Event_MeetingLeRoof 405 397
Cutscene_LeRoofAgain 337 330

By segment, each scene loses 6-7 counted frames before its first fade (event entry and Chaz's Event_MoveCharacter walk) and 1 between the black screen and the fade up. The second is DMAPlanes_VInt, which ends in VInt_Prepare (one frame) while the native DmaPlanes spends none. In Event_MeetingLeRoof the 8-frame offset happens to keep the cycle's phase, and words 0-31 match retail on all 371 frames of the loops. In Cutscene_LeRoofAgain the 7-frame offset moves the cycle by three frames, so words 11-12 differ.

Separately, Cutscene_LeRoofAgain's move.b #5,($FFFFED52) / jsr Pal_VariableFadeOut at $07845A is transcribed as SceneOp::FadeOut (PalFadeOut_ClrSpriteTbl).

Acceptance

Both scenes reach their first colour-loop pass on retail's counted frame from event start, and $07845A is a VariablePaletteFade out, mode 5. DMAPlanes_VInt's frame is probably a class fix for every DmaPlanes; check #546 first.

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.