Standardized all 18 top-level projects to canonical audit comment format: ; CPU:$XXXX PRG:XXXX AA BB Changes per project: - CIRCUS: fixed 4,427 comments (CPU:XXXX -> CPU:$XXXX) - Excitebike (JU): fixed 48 double-semicolon comments (; state $XX ; CPU:...) - 9 projects received canonical comments via new audit_comment_tool.py: Balloon Fight, Baseball, Bomberman, Burger Time, Clu Clu Land, Defender 2, Donkey Kong 3, Donkey Kong Jr., Tennis New tool: _tools/audit_comment_tool.py - Uses nesdis.py tracer as ground truth for instruction bytes/addresses - Parses source while tracking PRG offset, emits canonical comments - Handles .byte/.word/.dword directives, instruction comments (short format) - Carves PRG from rom.nes when prg.bin missing Documentation updates: - TODO.md: Updated current state, item 3 (tool built), repo conventions, tool list - AGENTS.md: Added audit_comment_tool.py to _tools/, updated audit convention Verification: verify_pass1.py reports all 18 projects byte-identical with 'canoni' format.
267 lines
5.5 KiB
PHP
267 lines
5.5 KiB
PHP
; Excitebike-specific zero-page aliases used during Pass 1.
|
|
; These intentionally conservative names will be refined in Passes 2 and 3.
|
|
|
|
Zp00 = $00
|
|
WorkPtrLo = $01
|
|
WorkPtrHi = $02
|
|
Zp03 = $03
|
|
Zp04 = $04
|
|
Zp05 = $05
|
|
Zp06 = $06
|
|
SerialBitCountLo = $08
|
|
SerialBitCountHi = $09
|
|
PpuCtrlShadow = $09
|
|
PpuMaskShadow = $0A
|
|
Zp0C = $0C
|
|
Zp0D = $0D
|
|
SerialBlockLength = $0D
|
|
Zp0E = $0E
|
|
SerialBlockPtr = $0E
|
|
Zp10 = $10
|
|
Zp11 = $11
|
|
MathOperandLo = $12
|
|
MathOperandHi = $13
|
|
MathResultLo = $14
|
|
MathResultHi = $15
|
|
Zp16 = $16
|
|
Zp17 = $17
|
|
Zp18 = $18
|
|
ControllerHeld = $1A
|
|
Zp1B = $1B
|
|
Zp1D = $1D
|
|
Zp1E = $1E
|
|
Zp1F = $1F
|
|
Zp20 = $20
|
|
Zp21 = $21
|
|
Zp24 = $24
|
|
StateTimer = $25
|
|
Zp26 = $26
|
|
FrameCounter = $27
|
|
Zp28 = $28
|
|
NmiWorkComplete = $30
|
|
PpuBufferReady = $31
|
|
NmiUpdatesEnabled = $32
|
|
NmiTriggerFlag = $33
|
|
StartButtonLatch = $34
|
|
StateTransitionFlag = $35
|
|
GameActiveFlag = $38
|
|
GameMode = $39
|
|
Zp3A = $3A
|
|
Zp3B = $3B
|
|
PaletteUpdateMode = $3C
|
|
GameState = $3D
|
|
GameStateStep = $3E
|
|
DemoCounter = $3F
|
|
Zp40 = $40
|
|
PendingStateFlag = $43
|
|
StateSubstep = $44
|
|
PlayerCourtOrder = $46
|
|
ModeAnimTimerA = $48
|
|
ModeAnimFrameA = $49
|
|
ModeAnimTimerB = $4A
|
|
ModeAnimFrameB = $4B
|
|
ServingPlayer = $4C
|
|
ModeAnimSubframe = $4D
|
|
MessageTimer = $4E
|
|
MessagePlayerIndex = $4F
|
|
PointWinner = $50
|
|
PlayerPointScore = $51
|
|
Player2PointScore = $52
|
|
PlayerGameScore = $53
|
|
ScoreUpdatePhase = $57
|
|
ScoreLo = $58
|
|
ScoreHi = $59
|
|
ScoreAnimationStep = $5A
|
|
CourtMessageId = $5B
|
|
MatchResultType = $5C
|
|
ScoreDisplayState = $5D
|
|
PendingGameState = $5E
|
|
Player1MotionControl = $60
|
|
Player1XSubpixel = $61
|
|
Player1XPosition = $62
|
|
Player1YSubpixel = $63
|
|
Player1YPosition = $64
|
|
Player2MotionControl = $65
|
|
Player2XSubpixel = $66
|
|
Player2XPosition = $67
|
|
Player2YSubpixel = $68
|
|
Player2YPosition = $69
|
|
BallMotionControl = $6A
|
|
BallXSubpixel = $6B
|
|
BallXPosition = $6C
|
|
BallYSubpixel = $6D
|
|
BallYPosition = $6E
|
|
BallHeight = $6F
|
|
BallHeightReference = $70
|
|
BallTargetOffset = $71
|
|
BallVerticalVelocityLo = $72
|
|
BallVerticalVelocityHi = $73
|
|
PlayerAnimationFlags = $78
|
|
UmpireMessageId = $79
|
|
BallStateFlags = $7A
|
|
BallBounceState = $7B
|
|
PlayerTargetXLo = $80
|
|
PlayerTargetXHi = $81
|
|
PlayerTargetYLo = $82
|
|
PlayerTargetYHi = $83
|
|
PlayerActionType = $84
|
|
PlayerActionParameter = $85
|
|
PlayerActionState = $86
|
|
PlayerFacingDirection = $87
|
|
PlayerXPosition = $88
|
|
PlayerYPosition = $89
|
|
PlayerPreviousX = $8A
|
|
PlayerPreviousY = $8B
|
|
PlayerMovementFlags = $8C
|
|
BallTrajectoryFlags = $8D
|
|
BallCollisionFlags = $8E
|
|
BallContactState = $8F
|
|
MathCarryByte = $97
|
|
MathVectorXHi = $98
|
|
MathVectorXLo = $99
|
|
MathVectorXResult = $9A
|
|
MathVectorYHi = $9B
|
|
MathVectorYLo = $9C
|
|
ProjectedXLo = $9D
|
|
ProjectedXHi = $9E
|
|
ProjectedYLo = $9F
|
|
ProjectedYHi = $A0
|
|
SignedAimDelta = $A4
|
|
AimMagnitude = $A5
|
|
AimDirection = $A6
|
|
ObjectDataPointerLo = $A8
|
|
ObjectDataPointerHi = $A9
|
|
ObjectDataOffset = $AA
|
|
ActiveObjectIndex = $AB
|
|
AnimationFrame = $B0
|
|
AnimationTimer = $B1
|
|
PoseFrameTimer = $B3
|
|
PlayerAnimationId = $B4
|
|
PoseSequenceOffset = $B5
|
|
PlayerPoseId = $B6
|
|
PlayerPoseFlags = $B7
|
|
RacketTargetX = $B8
|
|
RacketTargetY = $B9
|
|
RacketContactFlags = $BA
|
|
RacketAimOffset = $BB
|
|
ContactPointX = $BC
|
|
ContactPointY = $BD
|
|
PlayerActionDuration = $BF
|
|
RallyFlags = $C0
|
|
RallyPhase = $C1
|
|
CourtSide = $C2
|
|
SignedMovementDelta = $C3
|
|
PlayerActionDelay = $C4
|
|
NetAnimationTimer = $C5
|
|
BallAnimationTimer = $C6
|
|
UmpireAnimationTimer = $C7
|
|
ObjectAnimationState = $C8
|
|
ObjectAnimationFrame = $C9
|
|
RacketContactState = $CA
|
|
BallContactTimer = $CB
|
|
BallContactFlags = $CC
|
|
PlayerMovementSpeed = $CD
|
|
ComputerActionState = $CE
|
|
PreviousPlayerState = $CF
|
|
SelectedGameMode = $E0
|
|
PendingAudioCue = $E6
|
|
DmcOutputLevel = $F0
|
|
AudioChannelControl = $F1
|
|
ActiveSoundEffect = $F2
|
|
SoundEffectTimer = $F3
|
|
SoundEffectPhase = $F4
|
|
Pulse2EffectTimer = $F5
|
|
PitchAdjustment = $F6
|
|
AudioSequencePtrLo = $F7
|
|
AudioSequencePtrHi = $F8
|
|
AudioSequenceIndex = $F9
|
|
AudioSequenceOffset = $FA
|
|
AudioStreamPosition = $FB
|
|
AudioEventPriority = $FC
|
|
AudioRequestFlags1 = $FD
|
|
AudioRequestFlags2 = $FE
|
|
AudioRequestFlags3 = $FF
|
|
|
|
|
|
|
|
|
|
|
|
MENU_HORIZONTAL_COUNT=$05
|
|
MENU_VERTICAL_COUNT=$06
|
|
MENU_ACTION_NONE=$00
|
|
MENU_ACTION_ACCEPTED=$04
|
|
NMI_SYNC_PENDING=$FF
|
|
NMI_SYNC_COMPLETE=$01
|
|
RESET_MAGIC_1=$A5
|
|
RESET_MAGIC_2=$5A
|
|
PPUCTRL_NMI_ENABLE=$80
|
|
|
|
WorkingBuffer = $05E0
|
|
PERSISTENT_BUFFER_SIZE = $0100
|
|
|
|
StateTargetCA85 = $CA85
|
|
|
|
; Serial I/O helpers using JOY1 (verified structure; peripheral identity unknown)
|
|
WriteSerialTiming = $C62D
|
|
WaitSerialPulse = $C639
|
|
TransmitPulseShort = $C64E
|
|
TransmitPulseLong = $C653
|
|
TransmitByte = $C66E
|
|
IncrementSerialCount = $C68A
|
|
ReceiveSerialBit = $C691
|
|
ReceiveByte = $C6A5
|
|
|
|
; Block protocol helpers
|
|
TransmitRuntimeData = $C6C8
|
|
TransmitDataBlock = $C6D1
|
|
SetupTransmitRamBlock = $C716
|
|
SetupTransmitWorkingBuffer = $C726
|
|
SetTransmitPreambleCounts = $C734
|
|
ReceiveRuntimeData = $C739
|
|
ReceiveDataBlock = $C792
|
|
|
|
; App Specific Variables
|
|
TMP00 = $00
|
|
TMP01 = $01
|
|
|
|
|
|
; App Specific Magic Values
|
|
RIDER_MOTION_DISABLED = $01
|
|
RIDER_MOTION_ACTIVE = $02
|
|
RIDER_MOTION_TRANSITION = $03
|
|
RIDER_MOTION_COMPLETE = $04
|
|
|
|
; Variables
|
|
PpuControlShadow = $10
|
|
Controller1Held = $14
|
|
Controller1Pressed = $15
|
|
Controller2Held = $16
|
|
Controller2Pressed = $17
|
|
ControllerState = Controller1Held
|
|
NmiDispatchMode = $40
|
|
NmiState = $41
|
|
MenuSelectionIndex = $42
|
|
NmiSequenceStep = $44
|
|
NmiSyncState = $48
|
|
InputActionLatch = $49
|
|
OamBuffer = $0200
|
|
PersistentRecord0 = $0580
|
|
PersistentRecord1 = $05A3
|
|
ResetMagic1 = $05CE
|
|
ResetMagic2 = $05CF
|
|
PersistentBuffer = $06E0
|
|
RiderMotionState = $A4
|
|
|
|
PAD_MENU_INPUT=PAD_SELECT|PAD_START|PAD_VERTICAL
|
|
PAD_HORIZONTAL=PAD_LEFT|PAD_RIGHT
|
|
PAD_VERTICAL=PAD_UP|PAD_DOWN
|
|
PAD_RIGHT=$01
|
|
PAD_LEFT=$02
|
|
PAD_DOWN=$04
|
|
PAD_UP=$08
|
|
PAD_START=$10
|
|
PAD_SELECT=$20
|
|
PAD_B=$40
|
|
PAD_A=$80
|
|
PAD_DPAD=PAD_HORIZONTAL|PAD_VERTICAL
|