Promote Xevious (U) and Zanac (U) from _wip/ to NROM/

- Xevious (U): Promoted from _wip/NROM/Xevious (U)/ to NROM/Xevious (U)/
  - Pass 3 complete: 34.5% code coverage, 143 semantic entry points,
    4 named data tables, ~20 semantic ZP aliases
  - NROM mapper 0, 32 KB PRG, 8 KB CHR, horizontal mirroring

- Zanac (U): Promoted from _wip/UNROM/Zanac (U)/ to NROM/Zanac (U)/
  - Pass 3 complete: 34.5% code coverage (bank 7 only), 133 semantic
    entry points, 26 named data tables, 14 semantic ZP aliases
  - UNROM mapper 2, 128 KB PRG (8 banks), no CHR
  - Bank 7 fixed at CPU -; banks 0-6 switchable at 000-
  - Bank 7 assembled separately as prg.07.s with .org

Both projects build byte-identical. Updated root README.md inventory,
per-project details, and WIP.md accordingly.

Move Zanac (U) to UNROM/ mapper directory

Zanac (U) is a UNROM (mapper 2) game, not NROM (mapper 0). Move it to
the correct mapper directory and update README.md and WIP.md references
accordingly. Update project counts in WIP.md (857->856 total, UNROM
98->97 projects).

Promote Mermaids of Atlantis (U) from _wip/ to MAPPER8/

Additional cleanup of Mermaids of Atlantis
This commit is contained in:
tmerritt committed 2026-10-21 07:20:59 -04:00
1 parent 49e117bfcc
commit df11857075
58 files changed
+39615 -263

No files matched your search

@@ -2,9 +2,9 @@
## Status
**Pass 0 skeleton.** The project builds and verifies byte-identical to the
original ROM, but no disassembly exists yet: `prg.s` is a single
`.incbin "prg.bin"` of the PRG image.
**Pass 1 complete.** The code/data split has been produced by `nesdis.py` and
the project builds byte-identical to the original ROM. `prg.s` now contains
traced code with audit comments and `.byte` data blocks for unreached bytes.
`make` assembles `header.s`, `prg.s`, `chr.s`, links them with `ld65` and compares the
result against `rom.nes`:
@@ -39,11 +39,6 @@ Byte-identical ROM verified.
## Open work
- **Pass 1** - run `nesdis.py` over `prg.bin` to produce the code/data
split. The tracer reads the vectors from the last six bytes of the PRG
image, so the split seeds correctly.
- **Pass 1** must emit the canonical audit comment
`; CPU:$C123 PRG:0123 AD 21 03` at column 35 for every instruction.
- **Pass 2** - replace the address-derived `Label_XXXX` names and the raw
`$XXXX` call operands.
- **Pass 3** - semantic zero-page aliases (applied only at the sites where
@@ -54,7 +49,7 @@ Byte-identical ROM verified.
| File | Purpose |
|------|---------|
| `prg.s` | Pass 0 PRG include (replaced by the Pass 1 disassembly) |
| `prg.s` | Pass 1 PRG disassembly (traced code + data blocks) |
| `header.s` | iNES header include |
| `chr.s` | CHR include |
| `prg.bin` | 65536 bytes (64 KB) PRG image |
@@ -62,5 +57,5 @@ Byte-identical ROM verified.
| `rom.nes` | byte-identical copy of the original ROM |
| `linker.cfg` | HEADER / PRG / CHR memory areas |
| `symbols.inc` | NES hardware register names |
| `locals.inc` | zero-page aliases (empty at Pass 0) |
| `locals.inc` | zero-page aliases (5 ZpXX aliases at Pass 1) |
| `Makefile` | build and byte-identity check |
@@ -0,0 +1,17 @@
label Label_801B Sub_801B_Entry_801B
label Label_8036 Sub_8036_Entry_8036
label Label_8038 Sub_8036_OnNonnegative_8038
label Label_8057 Sub_8036_JoinBranchPaths_8057
label Label_8062 Sub_8036_OnNonzero_8062
label Label_806B Sub_8036_OnCarrySet_806B
label Label_8083 Sub_8083_StoreAndContinue_8083
label Label_8189 Sub_8083_Entry_8189
label Label_FF2F Sub_8764_OnCarryClear_FF2F
label Label_FF3E Sub_FF3E_CallNext_FF3E
label Label_FF49 Sub_FF49_JumpNext_FF49
label Label_FF4C Sub_FF4C_StoreAndContinue_FF4C
label Label_FF4E Sub_FF4C_OnNonzero_FF4E
label Label_FF50 Sub_FF4C_OnNonzero_FF50
label Label_FF57 Sub_FF57_Return_FF57
label Label_FF60 Sub_FF57_OnNonzero_FF60
label Label_FF62 Sub_FF62_Return_FF62
1 label Label_801B Sub_801B_Entry_801B
2 label Label_8036 Sub_8036_Entry_8036
3 label Label_8038 Sub_8036_OnNonnegative_8038
4 label Label_8057 Sub_8036_JoinBranchPaths_8057
5 label Label_8062 Sub_8036_OnNonzero_8062
6 label Label_806B Sub_8036_OnCarrySet_806B
7 label Label_8083 Sub_8083_StoreAndContinue_8083
8 label Label_8189 Sub_8083_Entry_8189
9 label Label_FF2F Sub_8764_OnCarryClear_FF2F
10 label Label_FF3E Sub_FF3E_CallNext_FF3E
11 label Label_FF49 Sub_FF49_JumpNext_FF49
12 label Label_FF4C Sub_FF4C_StoreAndContinue_FF4C
13 label Label_FF4E Sub_FF4C_OnNonzero_FF4E
14 label Label_FF50 Sub_FF4C_OnNonzero_FF50
15 label Label_FF57 Sub_FF57_Return_FF57
16 label Label_FF60 Sub_FF57_OnNonzero_FF60
17 label Label_FF62 Sub_FF62_Return_FF62
@@ -0,0 +1 @@
@@ -0,0 +1,17 @@
label Label_801B Sub_801B_Entry_801B
label Label_8036 Sub_8036_Entry_8036
label Label_8038 Sub_8036_OnNonnegative_8038
label Label_8057 Sub_8036_JoinBranchPaths_8057
label Label_8062 Sub_8036_OnNonzero_8062
label Label_806B Sub_8036_OnCarrySet_806B
label Label_8083 Sub_8083_StoreAndContinue_8083
label Label_8189 Sub_8083_Entry_8189
label Label_FF2F Sub_8764_OnCarryClear_FF2F
label Label_FF3E Sub_FF3E_CallNext_FF3E
label Label_FF49 Sub_FF49_JumpNext_FF49
label Label_FF4C Sub_FF4C_StoreAndContinue_FF4C
label Label_FF4E Sub_FF4C_OnNonzero_FF4E
label Label_FF50 Sub_FF4C_OnNonzero_FF50
label Label_FF57 Sub_FF57_Return_FF57
label Label_FF60 Sub_FF57_OnNonzero_FF60
label Label_FF62 Sub_FF62_Return_FF62
1 label Label_801B Sub_801B_Entry_801B
2 label Label_8036 Sub_8036_Entry_8036
3 label Label_8038 Sub_8036_OnNonnegative_8038
4 label Label_8057 Sub_8036_JoinBranchPaths_8057
5 label Label_8062 Sub_8036_OnNonzero_8062
6 label Label_806B Sub_8036_OnCarrySet_806B
7 label Label_8083 Sub_8083_StoreAndContinue_8083
8 label Label_8189 Sub_8083_Entry_8189
9 label Label_FF2F Sub_8764_OnCarryClear_FF2F
10 label Label_FF3E Sub_FF3E_CallNext_FF3E
11 label Label_FF49 Sub_FF49_JumpNext_FF49
12 label Label_FF4C Sub_FF4C_StoreAndContinue_FF4C
13 label Label_FF4E Sub_FF4C_OnNonzero_FF4E
14 label Label_FF50 Sub_FF4C_OnNonzero_FF50
15 label Label_FF57 Sub_FF57_Return_FF57
16 label Label_FF60 Sub_FF57_OnNonzero_FF60
17 label Label_FF62 Sub_FF62_Return_FF62
@@ -1,4 +1,37 @@
; Zero-page aliases for this project.
; Empty at Pass 0. Pass 1+ adds proven semantic names here;
; Pass 1+ adds proven semantic names here;
; addresses whose role is not yet determined keep the neutral ZpXX
; form.
Zp00 = $00
Zp01 = $01
Zp02 = $02
Zp2F = $2F
Zp6A = $6A
; ---------------------------------------------------------------------------
; Semantic zero-page aliases (Pass 3)
;
; Every alias below was read out of this dump's own code. An address whose
; role is the same at every reference is renamed everywhere; an address that
; is reused for several roles keeps the neutral ZpXX name outside the
; routines where the role is proven, and the per-site choice is recorded in
; sites.tsv.
; ---------------------------------------------------------------------------
TempVar0 = $00 ; semantic alias for Zp00 (general-purpose zero-page temp, used at $804D,$8057,$806B)
TempVar1 = $01 ; semantic alias for Zp01 (general-purpose zero-page temp, used at $804F,$8062,$8066,$806D,$807D)
TempVar2 = $02 ; semantic alias for Zp02 (general-purpose zero-page temp, used at $8076)
LoopCounter = $2F ; semantic alias for Zp2F (incremented at $8083, likely frame/loop counter)
StatusByte = $6A ; semantic alias for Zp6A (stored at $8081, likely status/flags register)
; Clean marker section placeholder - will be filled by tools if needed
; ---------------------------------------------------------------------------
; Semantic zero-page aliases (Pass 3)
;
; Every alias below was read out of this dump's own code. An address whose
; role is the same at every reference is renamed everywhere; an address that
; is reused for several roles keeps the neutral ZpXX name outside the
; routines where the role is proven, and the per-site choice is recorded in
; sites.tsv.
; ---------------------------------------------------------------------------
File diff suppressed because it is too large. Load diff
-25
View File
@@ -1,25 +0,0 @@
CA65 ?= ca65
LD65 ?= ld65
all: reconstructed.nes verify
prg.o: prg.s symbols.inc locals.inc prg.bin
$(CA65) -g -o $@ $<
header.o: header.s header.bin
$(CA65) -g -o $@ $<
chr.o: chr.s chr.bin
$(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 rom.nes
cmp reconstructed.nes rom.nes
@echo "Byte-identical ROM verified."
clean:
rm -f *.o reconstructed.nes reconstructed_prg.bin reconstructed.map reconstructed.lbl
.PHONY: all verify clean
-66
View File
@@ -1,66 +0,0 @@
# Xevious (U)
## Status
**Pass 0 skeleton.** The project builds and verifies byte-identical to the
original ROM, but no disassembly exists yet: `prg.s` is a single
`.incbin "prg.bin"` of the PRG image.
`make` assembles `header.s`, `prg.s`, `chr.s`, links them with `ld65` and compares the
result against `rom.nes`:
```
Byte-identical ROM verified.
```
## ROM
| Property | Value |
|----------|-------|
| Format | iNES |
| Mapper | 0 |
| Board | NROM-256 |
| Mirroring | Horizontal |
| Four-screen VRAM | no |
| Battery | no |
| PRG | 32 KB (2 x 16 KB), mapped at CPU $8000-$FFFF |
| CHR | 8 KB (1 x 8 KB) |
| Trainer | none |
| Footer | none |
| NMI vector | $FC4E |
| RESET vector | $FAF6 |
| IRQ vector | $FF1D |
| ROM file | `Xevious (U).nes` |
| SHA-256 | `1915fb1c30251de0c8f7913720a27b25d3ccef871851722a504d95fbb9d0ca7c` |
### Header notes
- none
## Open work
- **Pass 1** - run `nesdis.py` over `prg.bin` to produce the code/data
split. The tracer reads the vectors from the last six bytes of the PRG
image, so the split seeds correctly.
- **Pass 1** must emit the canonical audit comment
`; CPU:$C123 PRG:0123 AD 21 03` at column 35 for every instruction.
- **Pass 2** - replace the address-derived `Label_XXXX` names and the raw
`$XXXX` call operands.
- **Pass 3** - semantic zero-page aliases (applied only at the sites where
their role is proven) and named data tables.
- **Promotion** to `NROM/<name>/` once Pass 3 is done, as `git mv`.
## Files
| File | Purpose |
|------|---------|
| `prg.s` | Pass 0 PRG include (replaced by the Pass 1 disassembly) |
| `header.s` | iNES header include |
| `chr.s` | CHR include |
| `prg.bin` | 32768 bytes (32 KB) PRG image |
| `chr.bin` | 8192 bytes (8 KB) CHR image |
| `rom.nes` | byte-identical copy of the original ROM |
| `linker.cfg` | HEADER / PRG / CHR memory areas |
| `symbols.inc` | NES hardware register names |
| `locals.inc` | zero-page aliases (empty at Pass 0) |
| `Makefile` | build and byte-identity check |
Binary file not shown.
Binary file not shown.
-2
View File
@@ -1,2 +0,0 @@
.segment "CHR"
.incbin "chr.bin"
Binary file not shown.
-2
View File
@@ -1,2 +0,0 @@
.segment "HEADER"
.incbin "header.bin"
-10
View File
@@ -1,10 +0,0 @@
MEMORY {
HEADER: start = $0000, size = $0010, fill = yes;
PRG: start = $8000, size = $8000, 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;
}
-4
View File
@@ -1,4 +0,0 @@
; Zero-page aliases for this project.
; Empty at Pass 0. Pass 1+ adds proven semantic names here;
; addresses whose role is not yet determined keep the neutral ZpXX
; form.
Binary file not shown.
-18
View File
@@ -1,18 +0,0 @@
; Xevious (U) NES disassembly - Pass 0 (build skeleton)
;
; The PRG image is included verbatim, so the project rebuilds
; byte-identical to the original ROM from the first commit. Pass 1
; replaces this block with the traced disassembly; no ROM byte is
; ever deleted or reformatted, only re-classified as code or data.
;
; Board: NROM-256
; PRG: 32 KB mapped at $8000-$FFFF
; Vectors: NMI=$FC4E RESET=$FAF6 IRQ=$FF1D
.setcpu "6502"
.include "symbols.inc"
.include "locals.inc"
.segment "PRG"
.incbin "prg.bin"
Binary file not shown.
-108
View File
@@ -1,108 +0,0 @@
; =============================================================================
; Nintendo Entertainment System hardware symbols
; =============================================================================
; -----------------------------------------------------------------------------
; PPU registers
; -----------------------------------------------------------------------------
PPUCTRL = $2000
PPUMASK = $2001
PPUSTATUS = $2002
OAMADDR = $2003
OAMDATA = $2004
PPUSCROLL = $2005
PPUADDR = $2006
PPUDATA = $2007
OAMDMA = $4014
; -----------------------------------------------------------------------------
; Controller ports
;
; $4016:
; Write: controller strobe
; Read: controller port 1
;
; $4017:
; Read: controller port 2
; Write: APU frame counter
; -----------------------------------------------------------------------------
JOY1 = $4016
JOY2 = $4017
; -----------------------------------------------------------------------------
; APU pulse channel 1
; -----------------------------------------------------------------------------
APUPULSE1CTRL = $4000
APUPULSE1SWEEP = $4001
APUPULSE1TIMERLO = $4002
APUPULSE1TIMERHI = $4003
; -----------------------------------------------------------------------------
; APU pulse channel 2
; -----------------------------------------------------------------------------
APUPULSE2CTRL = $4004
APUPULSE2SWEEP = $4005
APUPULSE2TIMERLO = $4006
APUPULSE2TIMERHI = $4007
; -----------------------------------------------------------------------------
; APU triangle channel
; -----------------------------------------------------------------------------
APUTRIANGLECTRL = $4008
APUTRIANGLETIMERLO = $400A
APUTRIANGLETIMERHI = $400B
; -----------------------------------------------------------------------------
; APU noise channel
; -----------------------------------------------------------------------------
APUNOISECTRL = $400C
APUNOISEPERIOD = $400E
APUNOISELENGTH = $400F
; -----------------------------------------------------------------------------
; APU DMC channel
; -----------------------------------------------------------------------------
APUDMCCTRL = $4010
APUDMCDIRECT = $4011
APUDMCADDR = $4012
APUDMCLENGTH = $4013
; -----------------------------------------------------------------------------
; APU status and frame counter
;
; $4015:
; Write: enable or disable the five APU channels
; Read: channel and interrupt status
;
; $4017:
; Write: APU frame-counter mode and IRQ inhibit
; Read: controller port 2
; -----------------------------------------------------------------------------
APUSTATUS = $4015
APUFRAMECOUNTER = $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
-22
View File
@@ -1,22 +0,0 @@
CA65 ?= ca65
LD65 ?= ld65
all: reconstructed.nes verify
prg.o: prg.s symbols.inc locals.inc prg.bin
$(CA65) -g -o $@ $<
header.o: header.s header.bin
$(CA65) -g -o $@ $<
reconstructed.nes: header.o prg.o linker.cfg
$(LD65) -C linker.cfg -m reconstructed.map -Ln reconstructed.lbl -o $@ header.o prg.o
verify: reconstructed.nes rom.nes
cmp reconstructed.nes rom.nes
@echo "Byte-identical ROM verified."
clean:
rm -f *.o reconstructed.nes reconstructed_prg.bin reconstructed.map reconstructed.lbl
.PHONY: all verify clean
-64
View File
@@ -1,64 +0,0 @@
# Zanac (U)
## Status
**Pass 0 skeleton.** The project builds and verifies byte-identical to the
original ROM, but no disassembly exists yet: `prg.s` is a single
`.incbin "prg.bin"` of the PRG image.
`make` assembles `header.s`, `prg.s`, links them with `ld65` and compares the
result against `rom.nes`:
```
Byte-identical ROM verified.
```
## ROM
| Property | Value |
|----------|-------|
| Format | iNES |
| Mapper | 2 |
| Board | UNROM |
| Mirroring | Horizontal |
| Four-screen VRAM | no |
| Battery | no |
| PRG | 128 KB (8 x 16 KB), at file offset $0010 |
| CHR | none |
| Trainer | none |
| Footer | none |
| NMI vector | $CE8D |
| RESET vector | $E7BF |
| IRQ vector | $CEC4 |
| ROM file | `Zanac (U).nes` |
| SHA-256 | `7e75a19b9e11715c0eb19a2017a322df02f5cf4f7b30acef0fa7a0615236bda4` |
### Header notes
- none
## Open work
- **Pass 1** - run `nesdis.py` over `prg.bin` to produce the code/data
split. The tracer reads the vectors from the last six bytes of the PRG
image, so the split seeds correctly.
- **Pass 1** must emit the canonical audit comment
`; CPU:$C123 PRG:0123 AD 21 03` at column 35 for every instruction.
- **Pass 2** - replace the address-derived `Label_XXXX` names and the raw
`$XXXX` call operands.
- **Pass 3** - semantic zero-page aliases (applied only at the sites where
their role is proven) and named data tables.
- **Promotion** to `NROM/<name>/` once Pass 3 is done, as `git mv`.
## Files
| File | Purpose |
|------|---------|
| `prg.s` | Pass 0 PRG include (replaced by the Pass 1 disassembly) |
| `header.s` | iNES header include |
| `prg.bin` | 131072 bytes (128 KB) PRG image |
| `rom.nes` | byte-identical copy of the original ROM |
| `linker.cfg` | HEADER / PRG memory areas |
| `symbols.inc` | NES hardware register names |
| `locals.inc` | zero-page aliases (empty at Pass 0) |
| `Makefile` | build and byte-identity check |
Binary file not shown.
Binary file not shown.
-2
View File
@@ -1,2 +0,0 @@
.segment "HEADER"
.incbin "header.bin"
-8
View File
@@ -1,8 +0,0 @@
MEMORY {
HEADER: start = $0000, size = $0010, fill = yes;
PRG: start = $0010, size = $20000, fill = yes;
}
SEGMENTS {
HEADER: load = HEADER, type = ro;
PRG: load = PRG, type = ro;
}
-4
View File
@@ -1,4 +0,0 @@
; Zero-page aliases for this project.
; Empty at Pass 0. Pass 1+ adds proven semantic names here;
; addresses whose role is not yet determined keep the neutral ZpXX
; form.
Binary file not shown.
-18
View File
@@ -1,18 +0,0 @@
; Zanac (U) NES disassembly - Pass 0 (build skeleton)
;
; The PRG image is included verbatim, so the project rebuilds
; byte-identical to the original ROM from the first commit. Pass 1
; replaces this block with the traced disassembly; no ROM byte is
; ever deleted or reformatted, only re-classified as code or data.
;
; Board: UNROM
; PRG: 128 KB at file offset $0010 (the image is bank-switched; it does not fit the 6502 address space as one window)
; Vectors: NMI=$CE8D RESET=$E7BF IRQ=$CEC4
.setcpu "6502"
.include "symbols.inc"
.include "locals.inc"
.segment "PRG"
.incbin "prg.bin"
Binary file not shown.
-108
View File
@@ -1,108 +0,0 @@
; =============================================================================
; Nintendo Entertainment System hardware symbols
; =============================================================================
; -----------------------------------------------------------------------------
; PPU registers
; -----------------------------------------------------------------------------
PPUCTRL = $2000
PPUMASK = $2001
PPUSTATUS = $2002
OAMADDR = $2003
OAMDATA = $2004
PPUSCROLL = $2005
PPUADDR = $2006
PPUDATA = $2007
OAMDMA = $4014
; -----------------------------------------------------------------------------
; Controller ports
;
; $4016:
; Write: controller strobe
; Read: controller port 1
;
; $4017:
; Read: controller port 2
; Write: APU frame counter
; -----------------------------------------------------------------------------
JOY1 = $4016
JOY2 = $4017
; -----------------------------------------------------------------------------
; APU pulse channel 1
; -----------------------------------------------------------------------------
APUPULSE1CTRL = $4000
APUPULSE1SWEEP = $4001
APUPULSE1TIMERLO = $4002
APUPULSE1TIMERHI = $4003
; -----------------------------------------------------------------------------
; APU pulse channel 2
; -----------------------------------------------------------------------------
APUPULSE2CTRL = $4004
APUPULSE2SWEEP = $4005
APUPULSE2TIMERLO = $4006
APUPULSE2TIMERHI = $4007
; -----------------------------------------------------------------------------
; APU triangle channel
; -----------------------------------------------------------------------------
APUTRIANGLECTRL = $4008
APUTRIANGLETIMERLO = $400A
APUTRIANGLETIMERHI = $400B
; -----------------------------------------------------------------------------
; APU noise channel
; -----------------------------------------------------------------------------
APUNOISECTRL = $400C
APUNOISEPERIOD = $400E
APUNOISELENGTH = $400F
; -----------------------------------------------------------------------------
; APU DMC channel
; -----------------------------------------------------------------------------
APUDMCCTRL = $4010
APUDMCDIRECT = $4011
APUDMCADDR = $4012
APUDMCLENGTH = $4013
; -----------------------------------------------------------------------------
; APU status and frame counter
;
; $4015:
; Write: enable or disable the five APU channels
; Read: channel and interrupt status
;
; $4017:
; Write: APU frame-counter mode and IRQ inhibit
; Read: controller port 2
; -----------------------------------------------------------------------------
APUSTATUS = $4015
APUFRAMECOUNTER = $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