本文へ移動
cccskills
無料GitHub で公開

zx-spectrum-ula-audit

Validate and implement Sinclair ZX Spectrum 16K/48K ULA and board-level behavior in the EMULATORS repository, including PAL/NTSC raster timing, bitmap and attribute fetches, FLASH/BRIGHT/INK/PAPER rendering, CPU clock generation, lower-RAM and I/O contention, floating bus, snow effect, DRAM addressing and refresh, port FE keyboard/tape/border/sound behavior, interrupts, and ULA revision boundaries. Use when Codex reviews or edits namespace ZXSPECTRUM ULA, ULARegisters, Memory, PortManager, Screen, Sound, Datasette, Z80 bus timing, raster, contention, or ZX Spectrum hardware tests.

インストール方法を見る

含まれるファイル(3)

  • SKILL.md5.7 KB
  • agents/openai.yaml233 B
  • references/zx-spectrum-ula.md13.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

ZX Spectrum ULA Audit

Core Workflow

Treat the ULA as the timing owner of the original 16K/48K machine. Validate signal and bus behavior before judging the final framebuffer.

  1. Read references/zx-spectrum-ula.md completely before judging behavior.
  2. Inspect .codex/docs/ZXSpectrumULA.pdf for circuit diagrams, die logic, clock phases, RAS/CAS waveforms, fetch/latch relationships, analogue output, and ULA-version details. Use the printed-page to PDF-page locator in the reference and render the relevant pages.
  3. Identify the configuration axes explicitly:
    • 16K or 48K RAM.
    • PAL or NTSC.
    • ULA/board issue when revision-sensitive behavior matters.
    • T-state and raster-origin convention.
  4. Inspect the local implementation:
    • include/ZXSpectrum/ULA.hpp, src/ZXSpectrum/ULA.cpp
    • include/ZXSpectrum/ULARegisters.hpp, src/ZXSpectrum/ULARegisters.cpp
    • include/ZXSpectrum/Memory.hpp, src/ZXSpectrum/Memory.cpp
    • include/ZXSpectrum/ZXSpectrum.hpp, src/ZXSpectrum/ZXSpectrum.cpp
    • include/ZXSpectrum/PortManager.hpp, src/ZXSpectrum/PortManager.cpp
    • include/ZXSpectrum/Screen.hpp, src/ZXSpectrum/Screen.cpp
    • include/ZXSpectrum/Sound.hpp, src/ZXSpectrum/Sound.cpp
    • include/ZXSpectrum/Datasette*.hpp, src/ZXSpectrum/Datasette*.cpp
    • Z80 M-cycle, memory-access, I/O, refresh, WAIT/clock-stop, HALT, and interrupt code under include/FZ80 and src/FZ80
  5. Trace actual Z80 bus accesses within each instruction. Do not infer contention from only the final address, instruction length, or total elapsed cycles.
  6. When changing C++ code, also use $emulators-framework-cpp-style.

Audit Priorities

Prioritize correctness in this order:

  • Master, pixel, and CPU clocks; line length; frame length; raster origin; INT assertion width and phase.
  • ULA fetch cadence and exact bitmap/attribute addresses for all 192 display lines.
  • Shift-register and attribute-latch phasing, including prefetch, left/right edges, INK/PAPER, BRIGHT, and FLASH.
  • Contention for every contended M-cycle and I/O sub-cycle, with accumulated delays shifting later accesses.
  • Floating-bus value at the Z80 sampling edge, including idle 0xFF, bitmap, attribute, and model timing.
  • Port FE partial decoding, keyboard row combination, EAR input, MIC/EAR output mixing, border writes, and beeper edges.
  • DRAM row/column multiplexing, ULA priority, refresh, 16K open-bus behavior, and ROMCS/expansion interactions.
  • Snow effect and other revision-sensitive or electrically emergent behavior only after the normal path is correct.

Required Evidence

Use three synchronized views:

  1. CPU/bus trace: instruction, PC, M-cycle, T-state, address, data, /MREQ, /IORQ, /RD, /WR, /M1, /RFSH, /INT, and inserted delay.
  2. ULA trace: frame T-state, raster line/pixel, video-fetch phase, bitmap address/data, attribute address/data, latch/shift load, border, and floating-bus value.
  3. Rendered result: full screen and border, with deliberately adversarial byte and attribute patterns.

Always state whether frame T-state 0 means the first T-state with /INT low, the CPU's interrupt acknowledge, or another edge. Never compare bare timing numbers across different origins.

Validation Matrix

Exercise at least:

AxisCases
Memory16K; 48K
VideoPAL; NTSC when supported
Address accessopcode fetch, operand read, write, read-modify-write, stack, refresh, I/O
Display phasetop border, first fetch, active row, right border, last row, vertical blank
Porteven/uncontended high byte, even/contended high byte, odd/uncontended, odd/contended
Attributesall INK/PAPER, BRIGHT, FLASH phases, border changes
Bus quirksfloating bus, I in 0x40-0x7F, unmapped 16K upper memory

Prefer deterministic timing fixtures and known hardware test programs. Cross-check against the local Fuse and JSpeccy sources only as comparative implementations, never as the hardware authority.

Change Guardrails

  • Keep 16K/48K behavior separate from 128K, +2, +2A, and +3 timing unless the requested scope explicitly expands.
  • Do not implement contention by delaying an instruction only after it has completed if that loses the changed timing of later M-cycles, I/O phases, interrupts, or raster writes.
  • Do not treat every unused port read as the last attribute byte; derive the bus value at the exact sample time.
  • Do not model port FE as only literal 0x00FE; A0-low aliases and the full high byte matter.
  • Do not conflate EAR input with the MIC/EAR output network or the resulting speaker level.
  • Do not make analogue colour artifacts mandatory for a digital framebuffer unless the selected fidelity boundary includes composite encoding.
  • Preserve measured disagreements as named model/revision/convention differences.

Audit Report

Report:

  1. configuration and timing convention;
  2. findings ordered by compatibility impact;
  3. hardware or ROM evidence for each finding;
  4. exact affected paths and tests;
  5. whether the proposed change is cycle-visible, pixel-visible, audio-visible, or only an implementation cleanup;
  6. known fidelity boundaries that remain.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Validate Commodore 1540/1541/1541C/1541-II compatible disk-drive behavior in EMULATORS, including IEC serial bus protocol, device numbers, KERNAL traps, CBM DOS commands/status, D64 image parsing, BAM/directory/file chains, PETSCII filenames, 6502 drive CPU/ROM/RAM expectations, 6522 VIA wiring, GCR/track/sector geometry, motor/head timing, and compatibility boundaries for 1541-like devices. Use when Codex reviews or edits C64, VIC-20, C264, COMMODORE disk, serial I/O, D64, CBM DOS, IEC, VIA, GCR, or 1541 drive code.

日本語の概要は準備中です。原文の説明を表示しています。

Commnets/EMULATORS102026年10月9日 更新

Validate Commodore 64 CIA 6526 emulation in EMULATORS, including CIA1/CIA2 $DC00/$DD00 register behavior, ports, DDRs, keyboard/joystick matrix, IEC/user port, VIC bank selection, timers A/B, underflow timing, PB toggle/pulse output, TOD clock/alarm, serial shift register, FLAG, ICR masks and IRQ/NMI lines. Use when Codex reviews or edits C64 CIA, timers, ports, keyboard, joystick, serial bus, interrupts, TOD, or VIC bank control.

日本語の概要は準備中です。原文の説明を表示しています。

Commnets/EMULATORS102026年10月9日 更新

Validate Commodore 64 memory map, PLA/bank switching, 6510 port $0000/$0001 behavior, VIC bank selection, color RAM, ROM/RAM overlays, cartridge mapping, and mirrored I/O in the EMULATORS C64 namespace. Use when Codex reviews or edits C64 memory, PLA, CPU-visible address decoding, VIC-visible memory, color memory, char ROM, cartridge, expansion I/O, or mapped chip register behavior.

日本語の概要は準備中です。原文の説明を表示しています。

Commnets/EMULATORS102026年10月9日 更新

Validate Commodore MPS-801 serial dot matrix printer behavior in EMULATORS, including SerialPrinterMPS801 classes and their MatrixPrinterEmulation and SerialPrinterPeripheralSimulation hierarchy, IEC/KERNAL-trap printer routing, device numbers, secondary addresses, PETSCII/character sets, 6x7 glyphs, double width, graphics mode, reverse field, tab and dot positioning, line/page geometry, PostScript output, and fidelity boundaries. Use when Codex reviews or edits COMMODORE MPS801 printer code, generated printer output, PostScript printer templates, C64/VIC-20/C264 serial-printer behavior, or compares implementation against .codex/docs/MPS801.pdf and historical MPS-801 sources.

日本語の概要は準備中です。原文の説明を表示しています。

Commnets/EMULATORS102026年10月9日 更新

Validate Commodore MPS-802 and 1526 serial dot matrix printer behavior in EMULATORS, including SerialPrinterMPS802 classes and their MatrixPrinterEmulation and SerialPrinterPeripheralSimulation hierarchy, IEC/KERNAL-trap printer routing, device numbers, secondary-address functions, PETSCII/character sets, 8x8 glyphs, enhanced width, reverse and paging modes, formatter strings, programmable characters, line/page geometry, PostScript output, and fidelity boundaries. Use when Codex reviews or edits COMMODORE MPS802 printer code, generated printer output, PostScript printer templates, C64/VIC-20/C264 serial-printer behavior, or compares implementation against .codex/docs/MPS802.pdf, the MPS-802 user guide, and 1526/MPS-802/4023 service information.

日本語の概要は準備中です。原文の説明を表示しています。

Commnets/EMULATORS102026年10月9日 更新

Validate Commodore 64 SID 6581/8580 sound emulation in EMULATORS, including $D400-$D7FF register decoding, voices, frequency, pulse width, control bits, ADSR/envelope behavior, oscillator sync/ring/noise/test, filters, volume DAC/sample clicks, paddles, read-only registers, mirrors, and reSID integration. Use when Codex reviews or edits SID, Sound, audio wrapper, register, filter, waveform, envelope, or mapped SID behavior.

日本語の概要は準備中です。原文の説明を表示しています。

Commnets/EMULATORS102026年10月9日 更新

Commnets のスキルをすべて見る

このスキルの問題を報告する