Promotes Donkey Kong Jr
Adds remaining NROM as _wip Update gitignore to not keep object files Adds AGENTS.md as this is an AI helped project
This commit is contained in:
1 parent
a29b03b00b
commit
9aef410424
412 files changed
+33427
-221
No files matched your search
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
CA65 ?= ca65
|
||||
LD65 ?= ld65
|
||||
|
||||
all: reconstructed.nes verify
|
||||
|
||||
prg.o: prg.s symbols.inc locals.inc
|
||||
$(CA65) -g -o $@ $<
|
||||
|
||||
header.o: header.s
|
||||
$(CA65) -g -o $@ $<
|
||||
|
||||
chr.o: chr.s
|
||||
$(CA65) -g -o $@ $<
|
||||
|
||||
reconstructed.nes: header.o prg.o chr.o linker.cfg
|
||||
$(LD65) -C linker.cfg -m reconstructed.map -Ln reconstructed.lbl -o $@ header.o prg.o chr.o
|
||||
|
||||
verify: reconstructed.nes
|
||||
cmp reconstructed.nes rom.nes
|
||||
@echo "Byte-identical ROM verified."
|
||||
|
||||
clean:
|
||||
rm -f *.o reconstructed.nes reconstructed.map reconstructed.lbl
|
||||
|
||||
.PHONY: all verify clean
|
||||
verify-source:
|
||||
python3 verify_pass1.py
|
||||
|
||||
.PHONY: verify-source
|
||||
@@ -0,0 +1,8 @@
|
||||
; Donkey Kong Jr. (JU) - CHR-ROM
|
||||
.segment "CHR"
|
||||
|
||||
; iNES layout:
|
||||
; $0000-$000F 16-byte header
|
||||
; $0010-$400F 16 KiB PRG-ROM
|
||||
; $4010-$600F 8 KiB CHR-ROM
|
||||
.incbin "rom.nes", $4010, $2000
|
||||
@@ -0,0 +1,2 @@
|
||||
.segment "HEADER"
|
||||
.incbin "rom.nes", 0, 16
|
||||
@@ -0,0 +1,10 @@
|
||||
MEMORY {
|
||||
HEADER: start = $0000, size = $0010, fill = yes;
|
||||
PRG: start = $C000, size = $4000, fill = yes;
|
||||
CHR: start = $0000, size = $2000, fill = yes;
|
||||
}
|
||||
SEGMENTS {
|
||||
HEADER: load = HEADER, type = ro;
|
||||
PRG: load = PRG, type = ro;
|
||||
CHR: load = CHR, type = ro;
|
||||
}
|
||||
@@ -0,0 +1,272 @@
|
||||
; Donkey Kong Jr. (JU) - application-specific zero-page/RAM symbols
|
||||
; Pass 2 status:
|
||||
; Semantic names are used only where access tracing gives a stable role.
|
||||
; ZpXX names remain deliberately neutral where a byte is reused or unresolved.
|
||||
|
||||
; Shared scratch and indirect pointers
|
||||
Zp00 = $00
|
||||
Zp01 = $01
|
||||
Zp02 = $02
|
||||
Zp03 = $03
|
||||
Zp04 = $04
|
||||
Zp05 = $05
|
||||
Zp06 = $06
|
||||
Zp07 = $07
|
||||
Zp08 = $08
|
||||
Zp09 = $09
|
||||
Zp0A = $0A
|
||||
Zp0B = $0B
|
||||
Zp0C = $0C
|
||||
Zp0D = $0D
|
||||
Zp0E = $0E
|
||||
Zp0F = $0F
|
||||
|
||||
; PPU software shadows
|
||||
PPUControlShadow = $10
|
||||
PPUMaskShadow = $11
|
||||
PPUScrollXShadow = $12
|
||||
PPUScrollYShadow = $13
|
||||
|
||||
; Two controller records, selected with X = 0 or 2
|
||||
ControllerRawState = $14
|
||||
ControllerFilteredState = $15
|
||||
Controller2RawState = $16
|
||||
Controller2FilteredState = $17
|
||||
|
||||
; Eight-byte pseudo-random shift-register state
|
||||
RandomLfsr0 = $18
|
||||
RandomLfsr1 = $19
|
||||
RandomLfsr2 = $1A
|
||||
RandomLfsr3 = $1B
|
||||
RandomLfsr4 = $1C
|
||||
RandomLfsr5 = $1D
|
||||
RandomLfsr6 = $1E
|
||||
RandomLfsr7 = $1F
|
||||
|
||||
; General gameplay/audio work area
|
||||
CollisionBounds0 = $20
|
||||
CollisionBounds1 = $21
|
||||
CollisionBounds2 = $22
|
||||
CollisionBounds3 = $23
|
||||
BoundingBoxFlags = $24
|
||||
BoundingBoxCoord1 = $25
|
||||
BoundingBoxCoord2 = $26
|
||||
BoundingBoxCoord3 = $27
|
||||
Zp28 = $28
|
||||
Zp29 = $29
|
||||
Zp2A = $2A
|
||||
Zp2B = $2B
|
||||
PlayerVerticalFraction = $2C
|
||||
Zp2D = $2D
|
||||
PlayerVerticalPosition = $2E
|
||||
Zp2F = $2F
|
||||
Zp30 = $30
|
||||
Zp31 = $31
|
||||
Zp32 = $32
|
||||
Zp33 = $33
|
||||
SoundTimerDivider = $34
|
||||
SoundTimerArray = $35
|
||||
SharedActionTimer = $36
|
||||
Zp37 = $37
|
||||
PlayerSpriteVisibilityTimer = $38
|
||||
GameStateTimer = $39
|
||||
ObjectActiveArray = $3A
|
||||
Zp3B = $3B
|
||||
ActionCooldown = $3C
|
||||
Zp3D = $3D
|
||||
CollisionLeft = $3E
|
||||
CollisionTop = $3F
|
||||
|
||||
; State and gameplay bytes. Names are conservative pending deeper state tracing.
|
||||
CollisionRight = $40
|
||||
CollisionBottom = $41
|
||||
CollisionMatchX = $42
|
||||
CollisionMatchY = $43
|
||||
CollisionMatchRight = $44
|
||||
CollisionMatchBottom = $45
|
||||
GameMode = $46
|
||||
PendingGameMode = $47
|
||||
GameModeTimer = $48
|
||||
CurrentPlayerIndex = $49
|
||||
StageOrScreenIndex = $4A
|
||||
DifficultyOrRoundIndex = $4B
|
||||
PlayerLivesOrModeCount = $4C
|
||||
GameplaySubmode = $4D
|
||||
TwoPlayerModeFlag = $4E
|
||||
DemoInputIndex = $4F
|
||||
DemoInputTimer = $50
|
||||
DemoInputCode = $51
|
||||
TitleScreenInitialized = $52
|
||||
LevelObjectProgress = $53
|
||||
PlayerInputDirection = $54
|
||||
PreviousInputDirection = $55
|
||||
PlayerPositionFraction = $56
|
||||
ObjectPositionFraction = $57
|
||||
Zp58 = $58
|
||||
Zp59 = $59
|
||||
Zp5A = $5A
|
||||
Zp5B = $5B
|
||||
Zp5C = $5C
|
||||
Zp5D = $5D
|
||||
Zp5E = $5E
|
||||
Zp5F = $5F
|
||||
Zp60 = $60
|
||||
Zp61 = $61
|
||||
Zp62 = $62
|
||||
PlayerAuxSpritePending = $63
|
||||
BonusTickDivider = $64
|
||||
BonusCounter = $65
|
||||
DeathAnimationActive = $66
|
||||
DeathAnimationDirection = $67
|
||||
PlayerCollisionResult = $68
|
||||
CollidingObjectOamOffset = $69
|
||||
StartButtonLatch = $6A
|
||||
PlayerState = $6B
|
||||
PreviousPlayerState = $6C
|
||||
PlayerFacing = $6D
|
||||
PreviousPlayerFacing = $6E
|
||||
PlayerClimbPhase = $6F
|
||||
PlayerClimbDirection = $70
|
||||
PlayerMovementSubstate = $71
|
||||
MovementCollisionCode = $72
|
||||
PlayerCollisionAnchorLeft = $73
|
||||
PlayerCollisionAnchorRight = $74
|
||||
PlayerClimbOffset = $75
|
||||
PlayerStateReferenceY = $76
|
||||
PlayerLandingTile = $77
|
||||
PlayerStatePhase = $78
|
||||
PlayerStateTransitionActive = $79
|
||||
PlayerVerticalSpeedInteger = $7A
|
||||
PlayerFallThreshold = $7B
|
||||
PlayerVerticalAcceleration = $7C
|
||||
TitleInputRepeatTimer = $7D
|
||||
PlayerStateCounter = $7E
|
||||
PlayerVerticalVelocityFraction = $7F
|
||||
Zp80 = $80
|
||||
Zp81 = $81
|
||||
PlayerVerticalAccelerationFraction = $82
|
||||
PlayerVerticalAccelerationInteger = $83
|
||||
Zp84 = $84
|
||||
Zp85 = $85
|
||||
PlayerGravityFraction = $86
|
||||
PlayerGravityInteger = $87
|
||||
Zp88 = $88
|
||||
Zp89 = $89
|
||||
Zp8A = $8A
|
||||
Zp8B = $8B
|
||||
CarriedObjectActive = $8C
|
||||
CollectibleSpriteTileArray = $8D
|
||||
Zp8E = $8E
|
||||
Zp8F = $8F
|
||||
Zp90 = $90
|
||||
StageObjectDataPointer = $91
|
||||
CurrentStageObjectDataPointerHi = $92
|
||||
StageObjectDataLength = $93
|
||||
CollectedObjectVramRecord = $94
|
||||
CurrentCollectedObjectVramAddressHi = $95
|
||||
Zp96 = $96
|
||||
Zp97 = $97
|
||||
Zp98 = $98
|
||||
Zp99 = $99
|
||||
CollectibleActiveArray = $9A
|
||||
Zp9B = $9B
|
||||
Zp9C = $9C
|
||||
Zp9D = $9D
|
||||
CollectedObjectCount = $9E
|
||||
PreviousCollectedObjectCount = $9F
|
||||
StagePrimaryObjectCount = $A0
|
||||
ObjectMotionStep = $A1
|
||||
StageSecondaryObjectIndex = $A2
|
||||
EnemyStateArray = $A3
|
||||
ZpA4 = $A4
|
||||
ZpA5 = $A5
|
||||
EnemyAlternateStateArray = $A6
|
||||
ZpA7 = $A7
|
||||
EnemyDirectionInitializedArray = $A8
|
||||
EnemyRouteSelectorArray = $A9
|
||||
ZpAA = $AA
|
||||
ZpAB = $AB
|
||||
PlatformDirectionState = $AC
|
||||
PlayerPlatformContact = $AD
|
||||
PlatformEdgeContact = $AE
|
||||
ZpAF = $AF
|
||||
StageSecondaryObjectCount = $B0
|
||||
SpawnedEnemyCount = $B1
|
||||
StageObjectMode = $B2
|
||||
EnemySpawnPending = $B3
|
||||
EnemyDirectionArray = $B4
|
||||
ZpB5 = $B5
|
||||
ZpB6 = $B6
|
||||
ZpB7 = $B7
|
||||
ZpB8 = $B8
|
||||
EnemySpawnDelayArray = $B9
|
||||
ZpBA = $BA
|
||||
ZpBB = $BB
|
||||
PreviousPlatformContact = $BC
|
||||
CurrentPlatformContact = $BD
|
||||
PlatformTurnaroundFlag = $BE
|
||||
ZpBF = $BF
|
||||
ZpC0 = $C0
|
||||
ZpC1 = $C1
|
||||
ZpC2 = $C2
|
||||
SpecialObjectIndex = $C3
|
||||
SpecialObjectX = $C4
|
||||
ZpC5 = $C5
|
||||
ZpC6 = $C6
|
||||
ZpC7 = $C7
|
||||
ZpC8 = $C8
|
||||
ZpC9 = $C9
|
||||
ZpCA = $CA
|
||||
ZpCB = $CB
|
||||
ZpCC = $CC
|
||||
ZpCD = $CD
|
||||
StageObjectAnimationMode = $CE
|
||||
StageObjectOamOffset = $CF
|
||||
BonusSpriteActive = $D0
|
||||
VramMetatileBuffer = $D1
|
||||
ZpD2 = $D2
|
||||
ZpD3 = $D3
|
||||
ZpD4 = $D4
|
||||
ZpD5 = $D5
|
||||
ZpD6 = $D6
|
||||
ZpD7 = $D7
|
||||
ZpD8 = $D8
|
||||
ZpD9 = $D9
|
||||
StageRopeAddressHi = $DA
|
||||
StageRopeAddressLoArray = $DB
|
||||
ZpDC = $DC
|
||||
ZpDD = $DD
|
||||
ZpDE = $DE
|
||||
ZpDF = $DF
|
||||
ZpE0 = $E0
|
||||
ZpE1 = $E1
|
||||
ZpE2 = $E2
|
||||
ZpE3 = $E3
|
||||
ZpE4 = $E4
|
||||
ZpE5 = $E5
|
||||
ZpE6 = $E6
|
||||
PendingLevelObjectTask = $E7
|
||||
DemoInputActive = $E8
|
||||
GameplayInitializationPending = $E9
|
||||
MovementFrameCounter = $EA
|
||||
PauseActive = $EB
|
||||
PreviousStartButtonState = $EC
|
||||
TitleCursorY = $ED
|
||||
PauseDebounceTimer = $EE
|
||||
SelectedPlayerMode = $EF
|
||||
Pulse1EffectFlags = $F0
|
||||
Pulse1EffectTimer = $F1
|
||||
Pulse1PitchAccumulator = $F2
|
||||
AudioEffectTimer = $F3
|
||||
AudioPitchAccumulator = $F4
|
||||
TriangleEffectTimer = $F5
|
||||
TrianglePitchAccumulator = $F6
|
||||
MusicDataPointerLo = $F7
|
||||
MusicDataPointerHi = $F8
|
||||
MusicNoisePosition = $F9
|
||||
MusicPulsePosition = $FA
|
||||
AudioLfoPhase = $FB
|
||||
SoundRequestFlags = $FC
|
||||
SecondarySoundRequestFlags = $FD
|
||||
ObjectSoundRequestFlags = $FE
|
||||
GameplayEventFlags = $FF
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,32 @@
|
||||
Modules list:
|
||||
-------------
|
||||
header.o:
|
||||
HEADER Offs=000000 Size=000010 Align=00001 Fill=0000
|
||||
prg.o:
|
||||
PRG Offs=000000 Size=004000 Align=00001 Fill=0000
|
||||
chr.o:
|
||||
CHR Offs=000000 Size=002000 Align=00001 Fill=0000
|
||||
|
||||
|
||||
Segment list:
|
||||
-------------
|
||||
Name Start End Size Align
|
||||
----------------------------------------------------
|
||||
CHR 000000 001FFF 002000 00001
|
||||
HEADER 000000 00000F 000010 00001
|
||||
PRG 00C000 00FFFF 004000 00001
|
||||
|
||||
|
||||
Exports list by name:
|
||||
---------------------
|
||||
|
||||
|
||||
|
||||
Exports list by value:
|
||||
----------------------
|
||||
|
||||
|
||||
|
||||
Imports list:
|
||||
-------------
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,54 @@
|
||||
; Donkey Kong Jr. (JU) - PPU registers
|
||||
PPUCTRL = $2000
|
||||
PPUMASK = $2001
|
||||
PPUSTATUS = $2002
|
||||
OAMADDR = $2003
|
||||
OAMDATA = $2004
|
||||
PPUSCROLL = $2005
|
||||
PPUADDR = $2006
|
||||
PPUDATA = $2007
|
||||
OAMDMA = $4014
|
||||
JOY1 = $4016
|
||||
JOY2 = $4017
|
||||
|
||||
; APU registers
|
||||
APUPC1BASE = $4000
|
||||
APUPC1SWEEP = $4001
|
||||
APUPC1TLOW = $4002
|
||||
APUPC1THIGH = $4003
|
||||
|
||||
APUPC2BASE = $4004
|
||||
APUPC2SWEEP = $4005
|
||||
APUPC2LOW = $4006
|
||||
APUPC2HIGH = $4007
|
||||
|
||||
APUTRIBASE = $4008
|
||||
APUTRILOW = $400A
|
||||
APUTRIHIGH = $400B
|
||||
|
||||
APUNOISEBASE = $400C
|
||||
APUNOISELOOP = $400E
|
||||
APUNOISELENGTH = $400F
|
||||
|
||||
APUDMABASE = $4010
|
||||
APUDMALOAD = $4011
|
||||
APUDMAADDR = $4012
|
||||
APUDMALEN = $4013
|
||||
|
||||
APUCTRL = $4015
|
||||
APUSTATUS = $4015
|
||||
APUFRAMECNT = $4017
|
||||
|
||||
; Controller masks
|
||||
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_HORIZONTAL=PAD_LEFT|PAD_RIGHT
|
||||
PAD_VERTICAL=PAD_UP|PAD_DOWN
|
||||
PAD_DPAD=PAD_HORIZONTAL|PAD_VERTICAL
|
||||
PAD_MENU_INPUT=PAD_SELECT|PAD_START|PAD_VERTICAL
|
||||
Reference in new issue
Block a user