Skip to content

Commit 2485d2a

Browse files
committed
improvements support
- vic20 - nes-action53 - fds - bininfo: add disasm & hexdump
1 parent 0f860e5 commit 2485d2a

46 files changed

Lines changed: 881 additions & 101 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 14 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -61,52 +61,35 @@ jobs:
6161
run: zig build sdk-build --summary all
6262

6363
- name: Build NES examples and generate Mesen label files
64-
run: zig build nes-hello1 nes-hello2 nes-hello3 nes-zig-logo nes-fade nes-sprites nes-random nes-pads nes-color-cycle nes-fullbg nes-mappers nes-cnrom-hello nes-unrom-hello nes-unrom-512-hello nes-mmc1-hello nes-mmc3-hello nes-gtrom-hello gen-labels --summary all
64+
run: zig build nes-hello1 nes-hello2 nes-hello3 nes-zig-logo nes-fade nes-sprites nes-random nes-pads nes-color-cycle nes-fullbg nes-mappers nes-cnrom-hello nes-unrom-hello nes-unrom-512-hello nes-mmc1-hello nes-mmc3-hello nes-gtrom-hello nes-action53-hello fds-hello gen-labels --summary all
6565

66-
- name: Build C64 examples
67-
run: zig build c64-hello c64-fibonacci c64-plasma --summary all
66+
- name: Build Commodore examples (C64, VIC-20, CX16, GEOS)
67+
run: zig build c64-hello c64-fibonacci c64-plasma vic20-hello cx16-hello cx16-k-console-test geos-hello --summary all
6868

69-
- name: Build Commander X16 examples
70-
run: zig build cx16-hello cx16-k-console-test --summary all
69+
- name: Build Atari examples (Lynx, 2600, 8-bit)
70+
run: zig build lynx-hello atari2600-colorbar atari2600-3e-colorbar atari8dos-hello atari8-cart-hello --summary all
7171

72-
- name: Build Atari Lynx example
73-
run: zig build lynx-hello --summary all
74-
75-
- name: Build Atari 2600 examples
76-
run: zig build atari2600-colorbar atari2600-3e-colorbar --summary all
77-
78-
- name: Build Atari 8-bit examples
79-
run: zig build atari8dos-hello atari8-cart-hello --summary all
80-
81-
- name: Build PC Engine examples
82-
run: zig build pce-color-cycle pce-color-cycle-banked --summary all
83-
84-
- name: Build MEGA65 examples
85-
run: zig build mega65-hello mega65-plasma mega65-viciv --summary all
86-
87-
- name: Build Neo6502 example
88-
run: zig build neo6502-graphics --summary all
72+
- name: Build PC Engine, MEGA65, Neo6502 examples
73+
run: zig build pce-color-cycle pce-color-cycle-banked mega65-hello mega65-plasma mega65-viciv neo6502-graphics --summary all
8974

9075
- name: Build SNES examples
9176
run: zig build snes-hello snes-color-cycle snes-zig-logo snes-pi-test snes-pi-fastrom snes-hirom-hello snes-pads --summary all
9277

93-
- name: Build Apple IIe example
94-
run: zig build apple2-hello --summary all
95-
96-
- name: Build mos-sim from source and run sim-hello benchmark
97-
run: zig build run-sim-hello --summary all
98-
99-
- name: Check all outputs with bininfo
100-
run: zig build check-outputs --summary all
78+
- name: Build Apple IIe and mos-sim examples
79+
run: zig build apple2-hello run-sim-hello --summary all
10180

10281
- name: Verify outputs
10382
run: |
83+
zig build check-outputs --summary all
10484
ls -la zig-out/bin/
10585
for f in \
10686
hello1.nes hello2.nes hello3.nes zig-logo.nes fade.nes sprites.nes random.nes pads.nes color-cycle.nes \
10787
fullbg.nes mappers.nes cnrom-hello.nes unrom-hello.nes unrom-512-hello.nes mmc1-hello.nes mmc3-hello.nes gtrom-hello.nes \
88+
action53-hello.nes fds-hello.fds \
10889
c64-hello.prg fibonacci.prg plasma.prg \
90+
vic20-hello.prg \
10991
cx16-hello.prg cx16-k-console-test.prg \
92+
geos-hello.cvt \
11093
lynx-hello.bll \
11194
colorbar.a26 colorbar-3e.a26 \
11295
atari8dos-hello.xex atari8-cart-hello.rom \
@@ -249,7 +232,7 @@ jobs:
249232
- name: Make emutest executable
250233
run: chmod +x tt/emutest/emutest
251234

252-
- name: NES screenshot tests (Mesen-X)
235+
- name: NES and Atari 2600 screenshot tests
253236
run: |
254237
run_emutest() {
255238
local f=$1 core=$2 rc=0
@@ -266,18 +249,6 @@ jobs:
266249
gtrom-hello.nes; do
267250
run_emutest "$f" mesen_libretro.so
268251
done
269-
270-
- name: Atari 2600 screenshot tests (Stella2014)
271-
run: |
272-
run_emutest() {
273-
local f=$1 core=$2 rc=0
274-
tt/emutest/emutest -T \
275-
-L "tt/libretro/${core}" \
276-
-r "zig-out/bin/$f" \
277-
-t tools/emutest.lua || rc=$?
278-
if [ $rc -eq 1 ]; then echo "FAIL: $f"; exit 1; fi
279-
echo "OK: $f (rc=$rc)"
280-
}
281252
for f in colorbar.a26 colorbar-3e.a26; do
282253
run_emutest "$f" stella2014_libretro.so
283254
done

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,11 @@ Output files land in `zig-out/bin/`.
167167
| `nes-mmc3-hello` | NES MMC3 | mos6502 | `.nes` |
168168
| `nes-gtrom-hello` | NES GTROM | mos6502 | `.nes` |
169169
| `nes-unrom-512-hello` | NES UNROM-512 | mos6502 | `.nes` |
170+
| `nes-action53-hello` | NES Action53 (mapper 28) | mos6502 | `.nes` |
171+
| `fds-hello` | Famicom Disk System | mos6502 | `.fds` |
170172
| `c64-hello`, `c64-fibonacci` | Commodore 64 | mos6502 | `.prg` |
171173
| `c64-plasma` | Commodore 64 | mos6502 | `.prg` |
174+
| `vic20-hello` | Commodore VIC-20 (24K) | mos6502 | `.prg` |
172175
| `cx16-hello` | Commander X16 | mosw65c02 | `.prg` |
173176
| `cx16-k-console-test` | Commander X16 | mosw65c02 | `.prg` |
174177
| `lynx-hello` | Atari Lynx | mos6502 | `.bll` |
@@ -225,6 +228,9 @@ sieve<127>: 31 primes (6905 cycles)
225228
- **NES MMC3 hello** — uses translated `mapper.h`; calls `set_prg_bank(0)` to initialise MMC3 PRG bank. ROM: 512 KB PRG + 256 KB CHR ROM.
226229
- **NES GTROM hello** — uses translated `mapper.h`; GTROM (Codemasters) flash mapper. ROM: 512 KB PRG flash.
227230
- **NES UNROM-512 hello** — uses translated `mapper.h`; calls `set_prg_bank(0)` and `set_chr_bank(0)` to initialise mapper 30 registers. ROM: 512 KB PRG + 32 KB CHR RAM.
231+
- **NES Action53 hello** — uses translated `mapper.h`; mapper 28 (Action53 multicart). ROM: 128 KB PRG + 8 KB CHR RAM.
232+
- **FDS hello** — Famicom Disk System; uses raw PPU register writes via `nes/hardware.zig` (no neslib — FDS has no CHR ROM, raw PPU only). Writes dark-green backdrop (`$1A`) to palette `$3F00`.
233+
- **VIC-20 hello** — uses CBM KERNAL `cbm_k_chrout` to print "HELLO VIC20!", then cycles VIC chip background/border colour register (`$900F`). Targets 24K memory expansion, loads at `$1201`.
228234
- **C64 hello** — uses translated `c64.h` (VIC-II typed struct) via `b.addTranslateC`; cycles VIC-II border colour register.
229235
- **CX16 hello** — uses CBM KERNAL `cbm_k_chrout` to print "HELLO X16!", then cycles the border colour register.
230236
- **Lynx hello** — uses translated `_mikey.h` (MIKEY typed struct) via `b.addTranslateC`; animates all 32 palette entries.

0 commit comments

Comments
 (0)