Files
disasm/_wip/MUSCLE (U)/copilot/zero_page_names.tsv
T
tmerritt 4c644d2a20 Pass 3 for NES PowerPad Test Card (U): name all data tables and VramWrite streams
- Decoded the VramWrite ($E1CC) stream format: <addr hi> <addr lo> <count> <bytes>, $00 terminator
- Named all 9 payload streams ($E4CC-$E7C2, no gaps/overlaps) plus VramWriteSourcePointerTable at $F000
- Split PadBitTableLives into Player1TileTable ($E4B4) and Player2TileTable ($E4C0), 12 entries each (Y=0..11)
- Decoded CHR font (digits $30-$39, letters $3A-$52, space $5F; 'W' missing from the A-Z run)
  and recovered on-screen text including 'PRESS A TO TEST SIDE-A' / 'SIDE-B'
- Documented that the 16 KiB PRG is two byte-identical 8 KiB halves; $C000 copy is dead
- Documented 7 unreached subroutines inside the live code region (kept as .byte per Pass-1 policy)
- Fixed a stray duplicate sentence and stale _wip paths in root OVERVIEW.md

Byte-identical ROM verified.
2026-10-16 20:24:23 -04:00

113 lines
7.5 KiB
Plaintext

# MUSCLE (U) zero-page names - Pass 2
# kind<TAB>old<TAB>new<TAB>note
zp Zp10 SourcePointerLo Lo byte of the compressed VRAM/attribute stream pointer
zp Zp11 SourcePointerHi Hi byte of the compressed VRAM/attribute stream pointer
zp Zp12 DestinationPointerLo Lo byte of the VRAM destination pointer
zp Zp13 DestinationPointerHi Hi byte of the VRAM destination pointer
zp Zp1A BytecodeStreamPointerLo Lo byte of the token-stream pointer, loaded from the $8CEF table
zp Zp1B BytecodeStreamPointerHi Hi byte of the token-stream pointer
zp Zp1C BytecodeHandlerPointerLo Lo byte of the handler address consumed by jmp ($001C)
zp Zp1D BytecodeHandlerPointerHi Hi byte of the handler address consumed by jmp ($001C)
zp Zp1E ActorIndex Active player/actor slot (0 or 1) used as an array index
zp Zp21 ActorSlotOffset ActorIndex*4; byte offset into the per-actor record arrays
zp Zp22 ActorSlotOffsetHi High half of the per-actor record offset
zp Zp23 ActorFieldOffset Second per-actor offset used by the bytecode handlers
zp Zp24 FrameCounterLo Low byte of the 16-bit frame counter, incremented once per NMI
zp Zp25 FrameCounterHi High byte of the 16-bit frame counter
zp Zp26 PlayerSpriteIndex1 Per-player sprite slot table, first plane
zp Zp27 PlayerSpriteIndex2 Per-player sprite slot table, second plane
zp Zp28 PlayerSpriteIndex3 Per-player sprite slot table, third plane
zp Zp29 PlayerSpriteIndex4 Per-player sprite slot table, fourth plane
zp Zp2A PlayerPaletteIndex Per-player palette slot table
zp Zp2B PlayerTileIndex Per-player tile slot table
zp Zp34 ActorPosXLo Per-actor 16-bit X scratch, written by the bytecode handlers
zp Zp35 ActorPosXHi Per-actor 16-bit X scratch, high byte
zp Zp36 ActorPosY Per-actor Y scratch
zp Zp3A PlayerPosXLo1 Player 1 X position, low byte
zp Zp3C PlayerPosYLo1 Player 1 Y position, low byte
zp Zp3E PlayerPosXLo2 Player 2 X position, low byte
zp Zp40 PlayerPosYLo2 Player 2 Y position, low byte
zp Zp41 ScriptFlags Script state byte selected by the bytecode SelectActorSlot handlers
zp Zp43 ScriptCounterA Per-actor bytecode counter A
zp Zp44 ScriptCounterB Per-actor bytecode counter B
zp Zp45 ScriptCounterC Per-actor bytecode counter C
zp Zp47 ScriptArgLo Per-actor bytecode argument, low byte
zp Zp48 ScriptArgHi Per-actor bytecode argument, high byte
zp Zp4D ScriptFlagsLo Low byte of the 16-bit script flag pair
zp Zp4E ScriptFlagsHi High byte; tested non-zero to gate several bytecode handlers
zp Zp65 ActionCooldown Frames to wait before the main loop resumes object updates
zp Zp68 ScreenTransitionState 0 = idle, negative = entering, positive = leaving
zp Zp6E PlayerBoxOriginX Player 1 hitbox origin used by the overlap test
zp Zp70 PlayerBoxOriginY Player 1 hitbox origin used by the overlap test
zp Zp78 PlayerActiveFlag Per-player "still alive / facing right" flag gating the overlap test
zp Zp80 SoundVolume1 APU channel 1 volume
zp Zp81 SoundVolume2 APU channel 2 volume
zp Zp82 SoundVolume3 APU channel 3 volume
zp Zp83 SoundVolume4 APU channel 4 volume
zp Zp8B PlayerFlashTimer Per-player damage-flash countdown
zp Zp8C PlayerFlashTimer2 Per-player damage-flash countdown, second half
zp Zp8D RoundTransitionTimer Decremented by the round-transition state
zp Zp91 PlayerPaletteIndexLo Low byte of the player palette index pair
zp Zp92 PlayerPaletteIndexHi High byte of the player palette index pair
zp Zp94 PlayerCount 0 = one player, 1 = two players
zp Zp96 SubModeFlag $FF entering a sub-mode, $01 leaving it, 0 idle
zp ZpC4 SoundEnvelopeMode1 APU channel 1 envelope/tone mode nibble
zp ZpC5 SoundEnvelopeMode2 APU channel 2 envelope/tone mode nibble
zp ZpC6 SoundEnvelopeMode3 APU channel 3 envelope/tone mode nibble
zp ZpC7 SoundEnvelopeMode4 APU channel 4 envelope/tone mode nibble
zp ZpC8 SoundNoteTimer1 APU channel 1 note duration countdown
zp ZpC9 SoundNoteTimer2 APU channel 2 note duration countdown
zp ZpCA SoundNoteTimer3 APU channel 3 note duration countdown
zp ZpCB SoundNoteTimer4 APU channel 4 note duration countdown
zp ZpCC SoundEnvelopeValue1 APU channel 1 envelope byte read from the sequence
zp ZpCD SoundEnvelopeValue2 APU channel 2 envelope byte read from the sequence
zp ZpCE SoundEnvelopeValue3 APU channel 3 envelope byte read from the sequence
zp ZpCF SoundEnvelopeValue4 APU channel 4 envelope byte read from the sequence
zp ZpD0 SoundChannelStep1 APU channel 1 step index into its note table
zp ZpD1 SoundChannelStep2 APU channel 2 step index into its note table
zp ZpD2 SoundChannelStep3 APU channel 3 step index into its note table
zp ZpD3 SoundChannelStep4 APU channel 4 step index into its note table
zp ZpD4 SoundSequencePtrLo1 APU channel 1 sequence pointer, low byte
zp ZpD5 SoundSequencePtrLo2 APU channel 2 sequence pointer, low byte
zp ZpD6 SoundSequencePtrLo3 APU channel 3 sequence pointer, low byte
zp ZpD7 SoundSequencePtrLo4 APU channel 4 sequence pointer, low byte
zp ZpD8 SoundSequencePtrHi1 APU channel 1 sequence pointer, high byte
zp ZpD9 SoundSequencePtrHi2 APU channel 2 sequence pointer, high byte
zp ZpDA SoundSequencePtrHi3 APU channel 3 sequence pointer, high byte
zp ZpDB SoundSequencePtrHi4 APU channel 4 sequence pointer, high byte
zp ZpDC SoundSustainCounter1 APU channel 1 sustain/release counter
zp ZpDD SoundSustainCounter2 APU channel 2 sustain/release counter
zp ZpDE SoundSustainCounter3 APU channel 3 sustain/release counter
zp ZpDF SoundSustainCounter4 APU channel 4 sustain/release counter
zp ZpE0 SoundLastCtrlWrite1 Last value written to $4000+4*channel, channel 1
zp ZpE1 SoundLastCtrlWrite2 Last value written to $4000+4*channel, channel 2
zp ZpE2 SoundLastCtrlWrite3 Last value written to $4000+4*channel, channel 3
zp ZpE3 SoundLastCtrlWrite4 Last value written to $4000+4*channel, channel 4
zp ZpE4 ApuRegisterOffset Channel*4, the offset added to $4000/$4001/$4002/$4003
zp ZpE8 ApuEnableMask Bit mask of currently enabled APU channels
zp ZpE9 SoundMuted Bit 7 set suppresses writes to $4015 (write during rendering)
zp ZpEA SoundTonePeriodLo Computed tone period, low byte
zp ZpEB SoundTonePeriodHi Computed tone period, high byte
zp ZpEC SoundEnvelopeMaskLo Computed envelope bits OR-ed into $4000, low part
zp ZpED SoundEnvelopeMaskHi Computed envelope bits OR-ed into $4000, high part
zp ZpEE SoundReadPointerLo Lo byte of the sound sequence read cursor
zp ZpEF SoundReadPointerHi Hi byte of the sound sequence read cursor
zp ZpF0 PlayerActionState Per-player action/animation state byte ($80..$FF)
zp ZpF1 PlayerActionState2 Per-player second action state byte
zp ZpF2 ControllerButtonMask Filtered button bits for this read, per player
zp ZpF3 ControllerButtonMask2 Filtered button bits, second player
zp ZpF4 ControllerButtonsPrev Previous read's button byte, for edge detection
zp ZpF5 ControllerButtonsPrev2 Previous read's button byte, second player
zp ZpF6 ControllerDPad1 Directional bits derived from the button byte
zp ZpF7 ControllerDPad2 Directional bits derived from the button byte
zp ZpF8 ControllerFaceButtons1 Face-button bits derived from the button byte
zp ZpF9 ControllerFaceButtons2 Face-button bits derived from the button byte
zp ZpFA ControllerButtons1 Raw button byte for player 1 (shadows $4010/$4011 at reset)
zp ZpFB ControllerButtons2 Raw button byte for player 2 (shadows $4010/$4011 at reset)
zp ZpFC PpuCtrlShadow Shadow of the last value written to $2000
zp ZpFD PpuMaskShadow Shadow of the last value written to $2001
zp ZpFE PpuScrollX Shadow of the first $2005 write
zp ZpFF PpuScrollY Shadow of the second $2005 write
zp Zp14 VramBlockCountLo Low byte of the 16-bit block counter advanced by AdvanceCountWord
zp Zp15 CollisionFlagBits Accumulator for the overlap bit flags OR-ed together by ComputePlayerOverlapBits