Pass 3 _wip: semantic ZP aliases for Sqoon (U) (FrameCounter, PpuCtrlShadow, NmiFrameFlag) and Elevator Action (U) (PpuCtrlShadow, NmiSaveA/X/Y) Pass 3 Slalom (U): semantic ZP aliases (PpuCtrlShadow, PpuMaskShadow) Pass 3 Kung Fu (U): semantic ZP alias (PpuCtrlShadow) Pass 3 Othello (U): semantic ZP alias (PpuCtrlShadow) Pass 3 1942 (JU): semantic ZP alias (PpuCtrlShadow) Pass 3 Galaga (U): semantic ZP aliases (PpuCtrlShadow, PpuMaskShadow) Docs: add power-on flow + data-table inventory to READMEs of 13 promoted NROM projects Pass 3 Elevator Action (U): add NmiFrameFlag alias Pass 3 Elevator Action (U): full ZP naming (23 aliases) + 25 named data tables, 59.4% coverage Pass 1/2/3 re-trace: recover unreached code in 7 NROM projects (Sqoon 56.4%, Elevator Action 59.3%, Kung Fu 52.1%, 1942 52.1%) Pass 3 Sqoon (U): full ZP naming (22 aliases) + 17 named data tables Pass 3 Kung Fu (U): full ZP naming (21 aliases) + 13 named data tables Pass 3 Othello (U): full ZP naming (18 aliases) + 27 named data tables Pass 3 1942 (JU): full ZP naming (14 aliases) + 19 named data tables Pass 3 Galaga (U): full ZP naming (15 aliases) + 14 named data tables Pass 3 Slalom (U): full ZP naming (16 aliases) + 16 named data tables Pass 2/3: re-apply naming to Slalom (U), Othello (U), Galaga (U) after re-seed Pass 1/2/3 re-trace: recover unreached code in 6 more promoted NROM projects Pass 3 Stack-Up (JU): full ZP naming (15 aliases) + 12 named data tables Pass 3 Tag Team Wrestling (U): full ZP naming (20 aliases) + 11 named data tables Pass 3 Kung Fu (U) (a1): full ZP naming (20 aliases) + 12 named data tables Pass 3 Magmax (U): full ZP naming (18 aliases) + 6 named data tables Pass 3 Soccer (JU): full ZP naming (18 aliases) + 9 named data tables Pass 3 Ms Pac-Man (Namco) (U): full ZP naming (18 aliases) + 8 named data tables Docs: refresh coverage numbers and data-table inventories for 13 promoted NROM projects
73 lines
2.6 KiB
Markdown
73 lines
2.6 KiB
Markdown
# Kung Fu (U)
|
|
|
|
## Status
|
|
|
|
**Pass 3 complete; promoted.** `prg.s` is a traced disassembly with all
|
|
address-derived labels replaced, all `jsr`/`jmp` operands symbolic, hardware
|
|
registers named via `symbols.inc`, and `apply_symbols.py` reporting 0 residue.
|
|
Code coverage: 17,068 / 32,768 bytes (52.1%).
|
|
`make` assembles and verifies byte-identical to `rom.nes`.
|
|
|
|
## ROM
|
|
|
|
| Property | Value |
|
|
|----------|-------|
|
|
| Format | iNES |
|
|
| Mapper | 0 (NROM) |
|
|
| PRG | 32 KB |
|
|
| CHR | 8 KB |
|
|
| Mirroring | Vertical |
|
|
| NMI vector | $82D6 |
|
|
| RESET vector | $8258 |
|
|
| IRQ vector | $FFF0 |
|
|
|
|
## Power-on flow
|
|
|
|
RESET enters at `$8258`:
|
|
|
|
sei ; CPU:$8258 PRG:0258 78
|
|
cld ; CPU:$8259 PRG:0259 D8
|
|
lda #$00 ; CPU:$825A PRG:025A A9 00
|
|
sta PPUCTRL ; CPU:$825C PRG:025C 8D 00 20
|
|
ldx #$FF ; CPU:$825F PRG:025F A2 FF
|
|
txs ; CPU:$8261 PRG:0261 9A
|
|
lda PPUSTATUS ; CPU:$8262 PRG:0262 AD 02 20
|
|
asl a ; CPU:$8265 PRG:0265 0A
|
|
bcc Reset_OnCarryClear ; CPU:$8266 PRG:0266 90 FA
|
|
lda PPUSTATUS ; CPU:$8268 PRG:0268 AD 02 20
|
|
asl a ; CPU:$826B PRG:026B 0A
|
|
bcc Reset_OnCarryClear2 ; CPU:$826C PRG:026C 90 FA
|
|
|
|
NMI handler at `$82D6`:
|
|
|
|
lda Zp10 ; CPU:$82D6 PRG:02D6 A5 10
|
|
and #$7F ; CPU:$82D8 PRG:02D8 29 7F
|
|
sta PPUCTRL ; CPU:$82DA PRG:02DA 8D 00 20
|
|
sta Zp10 ; CPU:$82DD PRG:02DD 85 10
|
|
lda #$00 ; CPU:$82DF PRG:02DF A9 00
|
|
sta PPUMASK ; CPU:$82E1 PRG:02E1 8D 01 20
|
|
lda #$00 ; CPU:$82E4 PRG:02E4 A9 00
|
|
sta OAMADDR ; CPU:$82E6 PRG:02E6 8D 03 20
|
|
|
|
## Data-table inventory (Pass 3)
|
|
|
|
- `$8000-$8257` (600 bytes) - `LevelHandlerPointerTable`
|
|
- `$841B-$8426` (12 bytes) - `LevelObjectDefinitionTable`
|
|
- `$8C8A-$8DCE` (325 bytes) - `SpriteOamEntryTable`
|
|
- `$9032-$9807` (2006 bytes) - `EnemyNameTextTable`
|
|
- `$9810-$A481` (3186 bytes) - `EnemySpritePatternTable`
|
|
- `$B6CD-$B713` (71 bytes) - `LevelObjectSpawnTable`
|
|
- `$BB6F-$BDC3` (597 bytes) - `SpriteOamAttributeTable`
|
|
- `$CDDD-$CFCB` (495 bytes) - `EnemyAnimationFrameTable`
|
|
- `$D386-$D3C5` (64 bytes) - `LevelSceneryData`
|
|
- `$DAE7-$DAE9` (3 bytes) - `LevelSceneryPadding`
|
|
- `$DB48-$F830` (7401 bytes) - `LevelGraphicData`
|
|
- `$F981-$F9B8` (56 bytes) - `EnemyMovementSpeedTable`
|
|
- `$FA36-$FA89` (84 bytes) - `EnemyMovementDeltaTable`
|
|
|
|
## Build
|
|
|
|
```
|
|
Byte-identical ROM verified.
|
|
```
|