Claim set · data/claims/clu-clu-land.yaml

Clu Clu Land (World) mechanics read in the ROM

Game: Clu Clu Land.

Between vertical blanks the main idle loop continuously advances an eight-byte shift register, XORing bit 1 of the first byte with bit 1 of the second byte into the carry flag and rotating all eight bytes right. At game start, the stage initializer partitions the 20 stage shapes into five groups of four and shuffles each group independently by stepping the shift register a count taken from its fifth byte until an unused two-bit slot in 0 through 3 is drawn. clu-clu-land/idle-loop-lfsr-and-shape-shuffle

Value: 8 bytes

CodeClu Clu Land (World) · 0x01FB-0x0200 — $C1EB-$C1F0: main idle loop calls AdvanceRandomState ($F58D) and jumps back to $C1EB between NMIsClu Clu Land (World) · 0x359D-0x35BD — $F58D-$F5AD (AdvanceRandomState): XORs ($10 & $02) with ($11 & $02) into Carry and RORs $0010-$0017 rightClu Clu Land (World) · 0x085B-0x08B9 — $C84B-$C8A9 (InitializeRandomizedGroups): populates $0720-$0733 as five 4-entry groups, stepping $F58D by $0014 iterations per draw and picking distinct 2-bit low indices from $0011 & $03Checked by claude, 2026-11-26 — disassembled $C1EB-$C1F0, $C84B-$C8A9, and $F58D-$F5AD directly from the World ROMChecked by a second AI model, 2026-11-30.

On every unpaused frame outside screen transitions, the timer routine decrements a sub-divider from 10 through 0, reloading 10 on underflow to form an 11-frame cycle: 31 fast timer slots decrement on every call while 16 slow timer slots decrement only on underflow. In two-player play, when both characters overlap after moving, the collision handler reverses each character's direction and writes 10 into a fast timer slot; because timers tick before player updates on each frame, the nonzero timer halts both linear movement and turn-post swing rotation for 9 frames (counts 9 down to 1). clu-clu-land/eleven-frame-timer-divider-and-bump-freeze

Value: 11 frames

CodeClu Clu Land (World) · 0x0363-0x0377 — $C353-$C367: game-start initialization writes #$01 to $0091 in 1P mode (leaving $0091 = 0 in 2P mode so both players are active)Clu Clu Land (World) · 0x0378-0x03CB — $C368-$C3BB (DispatchGameStateFrame): gates on transition state $0092 == 0 and pause flag $00B0 == 0 (toggled by Start at $C397-$C39C) before calling UpdateTimers ($F577 at $C370), then dispatches UpdateGameplayObjectsAndDisplay ($C245 at $C3B9)Clu Clu Land (World) · 0x03DD-0x03E0 — $C3CD-$C3D0: nonzero $0092 bypasses UpdateTimers and dispatches screen-transition handlersClu Clu Land (World) · 0x3587-0x359C — $F577-$F58C (UpdateTimers): decrements $0050 (10..0); while >= 0 scans X = $1E..0 ($0051-$006F), and on underflow reloads #$0A and scans X = $2E..0 ($0051-$007F)Clu Clu Land (World) · 0x029F-0x02A1 — $C28F-$C291 (UpdateGameplayObjectsAndDisplay): calls HandleObjectPairOverlap ($DB52) after both players have already moved on that frameClu Clu Land (World) · 0x1B62-0x1BD3 — $DB52-$DBC3 (HandleObjectPairOverlap / ReverseObjectDirectionAndQueuePalettes): checks cooldown $0067 and active 2P flags ($0090/$0091 == 0), tests P1/P2 overlap via $F71C, reverses both characters' directions, and writes #$0A to fast timer $0056 (decremented to 9 before the next frame's movement, yielding 9 frozen frames)Clu Clu Land (World) · 0x207A-0x2083 — $E06A-$E073 (AdvanceObjectCoordinate): skips linear coordinate updates while $0056 is nonzeroClu Clu Land (World) · 0x24A1-0x24AE — $E491-$E49E (UpdateObjectSwingPosition): zeroes the angular swing step while $0056 is nonzeroChecked by claude, 2026-11-26 — disassembled $C28F-$C291, $C353-$C3BB, $C3CD-$C3D0, $DB52-$DBC3, $E06A-$E073, $E491-$E49E, and $F577-$F58C directly from the World ROMChecked by a second AI model, 2026-11-30.

Swimming speed is selected from an eight-entry 8.8 fixed-point table covering 1.0, 1.5, 1.71875, 1.84375, 1.953125, 2.078125, 2.203125, and 2.328125 pixels per frame. Because the stage-step counter starts at 0 at game start (and is set to 1 on a fourth-cycle reset immediately before being decremented to 0 on the same transition), tier 0 lasts one cleared stage initially and after each reset, after which speed advances by one tier every three cleared stages until capping at tier 7. While swinging around a turn post, the swing angle steps each frame by the integer part of three times the current speed, added for counter-clockwise rotation and subtracted for clockwise rotation under downward screen coordinates. Releasing the directional pad detaches only when the angle modulo 64 meets an asymmetric threshold: strictly below 28 when spinning counter-clockwise versus at least 36 when spinning clockwise. clu-clu-land/speed-tiers-and-asymmetric-swing-release

Value: 2.328125 px/frame

CodeClu Clu Land (World) · 0x00E5-0x00F4 — $C0D5-$C0E4 (ObjectMotionLowValues / ObjectMotionHighValues): 8 integer bytes ($01,$01,$01,$01,$01,$02,$02,$02) and 8 fractional bytes ($00,$80,$B8,$D8,$F4,$14,$34,$54)Clu Clu Land (World) · 0x02D6-0x02DF — $C2C6-$C2CF: clears $0080-$009F to 0 at game start, setting initial stage-step counter $0084 = 0 (so tier 0 advances after 1 stage)Clu Clu Land (World) · 0x0707-0x0712 — $C6F7-$C702: on fourth-cycle wrap, resets speed tier $0082 = 0 and sets $0084 = 1 right before falling through to DEC $0084 at $C719, leaving $0084 = 0 (so tier 0 again lasts 1 stage)Clu Clu Land (World) · 0x0729-0x073D — $C719-$C72D (CoordinateGameState): decrements $0084 each stage clear, reloading 2 on underflow (every 3 stages thereafter) and incrementing speed tier $0082 up to 7Clu Clu Land (World) · 0x12B0-0x12C4 — $D2A0-$D2B4 (UpdateIndexedObjectInitialization): indexes $C0D5/$C0DD by $0082 to load player velocity fieldsClu Clu Land (World) · 0x2478-0x24B7 — $E468-$E4A7 (UpdateObjectSwingPosition): sums the 16-bit speed three times, negates the integer byte when state $06 == #$80 (CW), and adds to angle +$1B with Y = post_Y + dY - sin(angle) (NES +Y downward, so increasing angle spins CCW and decreasing spins CW)Clu Clu Land (World) · 0x253D-0x2576 — $E52D-$E566 (SwingDirectionTable / AlignObjectSwingDirection): reduces angle mod #$40; for CCW ($06 != #$80) requires remainder < #$1C (28) and increments quadrant indexClu Clu Land (World) · 0x25AB-0x25B1 — $E59B-$E5A1: for CW ($06 == #$80) compares remainder against #$24 (36), releasing only when >= 36Checked by claude, 2026-11-26 — disassembled $C0D5-$C0E4, $C2C6-$C2CF, $C6F7-$C702, $C719-$C72D, $D2A0-$D2B4, $E468-$E4A7, $E52D-$E566, and $E59B-$E5A1 directly from the World ROMChecked by a second AI model, 2026-11-30.

Colliding with a solid wall saves the character's cruising speed and computes an opposing deceleration step equal to one-eighth of that speed via three right shifts (rubber traps shift five times for one-thirty-second), subtracting that step each frame until the velocity crosses zero. On the frame after velocity reverses sign, the post-reversal acceleration check compares current speed magnitude against the saved cruising speed and takes a carry-clear branch when below target speed, snapping immediately back to full reversed cruising speed rather than accelerating gradually. clu-clu-land/wall-bounce-deceleration-and-instant-snap

Value: 8 divisor

CodeClu Clu Land (World) · 0x218F-0x21CE — $E17F-$E1BE (ClassifyTileValue): returns Y = #$31 for solid walls, Y = #$41 for rubber traps ($F9, $7C-$92), and Y = #$80 for black holes ($50-$5F)Clu Clu Land (World) · 0x21CF-0x2234 — $E1BF-$E224 (SetDirectionalObjectMotion): stores cruising speed via $E262, right-shifts 3 times (v/8) for Y < #$40 or 5 times (v/32) for Y >= #$40, stores signed step in +$17/$18, and enters #$70 bounce stateClu Clu Land (World) · 0x229F-0x22C9 — $E28F-$E2B9 (UpdateDirectionalObjectValue): in #$70 bounce state, adds +$17/$18 each frame until velocity sign matches the step sign, then copies +$1B (#$30 | reversed_dir) into +$10Clu Clu Land (World) · 0x22D7-0x2334 — $E2C7-$E324: in #$30 state, subtracts saved speed (+$15/$16) from |velocity| and takes BCC $E301 whenever |velocity| < saved speed, immediately restoring full reversed cruising speedChecked by claude, 2026-11-26 — disassembled $E17F-$E224, $E28F-$E2B9, and $E2C7-$E324 directly from the World ROMChecked by a second AI model, 2026-11-30.

Gameplay tile lookups go through a 30-byte cache holding 10 three-byte slots (two nametable address bytes and one tile byte): a matching address returns the cached tile immediately, while a changed address writes the new two-byte address into the slot and flags a cache miss. On the next vertical blank, the NMI handler refreshes all 10 slots from PPU memory using a dummy read followed by the live tile read, delaying newly queried tile lookups by one frame. clu-clu-land/one-frame-delayed-vram-collision-cache

Value: 10 slots

CodeClu Clu Land (World) · 0x20C2-0x20EE — $E0B2-$E0DE (UpdateCachedAddress): indexes slot * 3 in $00B2-$00CF; returns cached tile byte with Carry clear on address match, or stores new address bytes ($02/$03) and returns with Carry setClu Clu Land (World) · 0x0227-0x0229 — $C217-$C219 (ServiceNmiFrame): calls ReadCachedVramAddresses ($E113) during vblank right after FlushVramBufferClu Clu Land (World) · 0x2123-0x214E — $E113-$E13E (ReadCachedVramAddresses): loops X from 0 to $1E (10 slots x 3 bytes), writing each slot's two address bytes to PPUADDR ($2006), reading PPUDATA ($2007) twice (dummy + real), and storing the tile byteChecked by claude, 2026-11-26 — disassembled $C217-$C219, $E0B2-$E0DE, and $E113-$E13E directly from the World ROMRevised after a check by a second AI model, 2026-11-30: Dropped "never reads video memory directly"; another routine reads PPUDATA directly.

Stage progression steps a group index across five normal color groups (0 through 4) and a Bonus Stage at index 5. When the index reaches 6 after the Bonus Stage, the progression handler resets it to 1 rather than 0, so the first color group never returns in continuous play; every fourth cycle resets the speed tier to 0, and the first such reset turns on ingot flip-back for the rest of the game on non-Bonus stages (crossing a revealed gold ingot again takes it off the player's count and adds it back to the remaining ingot count). Between stages, score tallies run on fixed intervals gated by a fast frame timer: 4 frames per 10 remaining time units, 5 frames per gold ingot step, and 24 frames per crushed Unira step, stepping both players' nonzero counts toward zero in parallel. clu-clu-land/stage-group-wrap-and-post-stage-tallies

Value: 5 groups

CodeClu Clu Land (World) · 0x06CE-0x06D1 — $C6BE-$C6C1 (CoordinateGameState): skips all tally step handlers until fast timer $0051 reaches 0Clu Clu Land (World) · 0x3587-0x359C — $F577-$F58C (UpdateTimers): decrements fast timer $0051 by 1 on every unpaused frameClu Clu Land (World) · 0x06EA-0x0725 — $C6DA-$C715 (CoordinateGameState): increments $0087; sets BonusFlag $008F = 1 at 5; at 6 resets $0087 to 1 (skipping 0) and increments cycle counter $0088, enabling persistent flip-back flag $008C and resetting $0082 = 0 on cycle 3, then copies $008C into active-stage flag $008E when $008F == 0 ($C70B-$C715)Clu Clu Land (World) · 0x0E44-0x0E53 — $CE34-$CE43: when active flip-back flag $008E is nonzero, crossing an already-revealed ingot decrements the player's ingot count $00D4/$00D5 and calls $F40C with slot $01 = 6 to add 1 back to remaining ingotsClu Clu Land (World) · 0x341C-0x3468 — $F40C-$F458 (UpdateSignedPackedDecimalFromValue): maps slot $01 = 6 to X = $18, adding into packed BCD counter $0027+$18 ($003F, remaining ingots)Clu Clu Land (World) · 0x0F1C-0x0F30 — $CF0C-$CF20: when $02 is nonzero, writes tile state #$0D, or #$09 only when $008E is zero and $000E is 4Clu Clu Land (World) · 0x0594-0x05D7 — $C584-$C5C7: Time Bonus tally subtracts BCD #$10 from stage timer $002E/$002F per pass and jumps to SetStateAndObjectFlags ($C809, reloading timer $0051 = 4)Clu Clu Land (World) · 0x0607-0x0630 — $C5F7-$C620: Unira Kill tally decrements both players' nonzero $00D6/$00D7 counts in parallel and loads #$18 (24) into timer $0051 via $C80BClu Clu Land (World) · 0x0782-0x07BC — $C772-$C7AC: Ingot Count tally steps both players' nonzero $00D4/$00D5 counts toward zero in parallel (DEC if positive, INC if negative) and loads #$05 (5) into timer $0051 via $C80BClu Clu Land (World) · 0x0819-0x0825 — $C809-$C815 (SetStateAndObjectFlags): default entry loads #$04 into $0051; entry $C80B stores caller-supplied frame interval into $0051Checked by claude, 2026-11-26 — disassembled $C584-$C5C7, $C5F7-$C620, $C6BE-$C6C1, $C6DA-$C715, $C772-$C7AC, $C809-$C815, $CE34-$CE43, $CF0C-$CF20, $F40C-$F458, and $F577-$F58C directly from the World ROMRevised after a check by a second AI model, 2026-11-30: Flip-back stays on after the first fourth-cycle reset; ingot counts step toward zero; corrected an evidence note's branch.

Only the first two bytes of Clu Clu Land's eight-byte random register decide its new bits, and start-up gives the first of them a nonzero value, so the bit stream, and after it the whole register, repeats every 32,767 steps (computed). clu-clu-land/lfsr-period

About: Clu Clu Land Random number generator

Value: 32767 steps

CodeClu Clu Land (World) · 0x359D-0x35BD — $F58D-$F5AD: the new bit is bit 1 of $10 exclusive-ORed with bit 1 of $11; all of $10-$17 then rotate rightClu Clu Land (World) · 0x01D5-0x01D8 — $C1C5-$C1C8: start-up stores $55 to $10Checked by claude, 2026-11-30 — Disassembled the step and the seed store from the World ROM, and simulated the step: every 16-bit state with a bit set above bit 0 falls into a cycle of 32,767, and the eight-byte register repeats with the same period once the first bytes have been shifted through.Checked by a second AI model, 2026-11-30.

Cited by: Clu Clu Land