Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Code/tempest.asm
Original file line number Diff line number Diff line change
Expand Up @@ -4333,9 +4333,15 @@ loca7d2: lda $0115
lda #$00
sta $29

; There appears to be a loop beginning here
; for ($37=7;$37>=0;$37--) running from here through a827. I'm not sure
; just what goes on inside it, yet, though.
; Decrement animation timers for 8 slots at $03FE-$0405
; (likely sprite/effect states during level transitions)
; LOGIC: non zero values: subtract 7 (countdown), clamp based on $0115:
; $0115.7=1 (zoom active): expired timers reset to $F0 (full)
; $0115.7=0 (normal): expired timers clear to $00
; zero values: if $0115.7=1, inherit from next slot (circular,
; $03FE[0] wraps to $03FE[7]); values <$D5 become $F0, >=$D5 become $00
; $29 accumulates OR of all results; if zero after loop, clears $0115
; called during level transitions (zoom in/out effects).
Comment on lines +4336 to +4344

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new comment seems more specific than the code here supports. In particular, the $0115.7=1 claim looks inconsistent with nearby code that sets $0115 to $01, not a bit-7 value. The rest of the comment also assigns high-level meaning (“animation timers”, “zoom active”, “level transitions”) that may be plausible, but doesn’t look clearly established from this routine alone. I’d suggest rewriting it more conservatively unless those behaviors were verified from the full loop and its callers.

Phrased differently: please explain how you came to the conclusions your comment documents, and include specific references to the supporting source code.


ldx #$07
stx $37
Expand Down