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

zx81-video-audit

Validate and implement Sinclair ZX81 video emulation in the EMULATORS repository for /mZX811, /mZX812, and /mZX813, including ULA character generation, Z80 display-file execution, M1/refresh/HALT/INT behavior, scanline timing, HSYNC/VSYNC, NMI generator and WAIT synchronization, SLOW and FAST modes, PAL/NTSC margins, collapsed display files, inverse video, high-resolution techniques, ROM-version interactions, and ULA revision boundaries. Use when Codex reviews or edits namespace ZX81 ULA, ULARegisters, MemoryVideoCode, Memory, PortManager, Screen, CPU interrupt timing, raster, ROM-specific video flow, or ZX81 video tests.

インストール方法を見る

含まれるファイル(3)

  • SKILL.md5.6 KB
  • agents/openai.yaml223 B
  • references/zx81-video.md13.3 KB

SKILL.md(原文)

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

ZX81 Video Audit

Core Workflow

Treat ZX81 video as cycle-sensitive work shared by the Z80, ROM, RAM, and ULA. Validate control flow and signal edges as well as pixels.

  1. Read references/zx81-video.md before judging behavior.
  2. Inspect .codex/docs/ZX81Video.pdf when circuit diagrams, /NMI-/WAIT gating, counter logic, oscilloscope traces, back porch, or pixel synchronization matter. Render relevant pages because the PDF contains no extractable text.
  3. Identify the selected model:
    • /mZX811 -> ZX81::Type::_ZX811, old ROM
    • /mZX812 -> ZX81::Type::_ZX812, rare/intermediate ROM
    • /mZX813 -> ZX81::Type::_ZX813, newest ROM
  4. Audit all three selectors when changing shared video behavior. Test ROM control flow separately when addresses, delays, margins, or system variables matter.
  5. Do not equate a ROM selector with a ULA silicon revision. ROM version, ULA revision, PAL/NTSC selection, and RAM expansion are independent axes unless repository configuration proves otherwise.
  6. Inspect the local implementation paths:
    • include/ZX81/ULA.hpp, src/ZX81/ULA.cpp
    • include/ZX81/ULARegisters.hpp, src/ZX81/ULARegisters.cpp
    • include/ZX81/Memory.hpp, src/ZX81/Memory.cpp
    • include/ZX81/ZX81.hpp, src/ZX81/ZX81.cpp
    • include/ZX81/PortManager.hpp, src/ZX81/PortManager.cpp
    • include/ZX81/Screen.hpp, src/ZX81/Screen.cpp
    • include/ZX81/Type.hpp, src/ZX81/ZX81Emulator.cpp
    • Z80 M1, refresh, HALT, WAIT, INT, NMI, and instruction-cycle code under include/FZ80 and src/FZ80
  7. When changing C++ code, also use $emulators-framework-cpp-style.

Audit Priorities

Prioritize correctness in this order:

  • 6.5 MHz ULA/pixel clock, 3.25 MHz CPU clock, horizontal counter, line reset source, and HSYNC edge placement.
  • Display-file echo, /M1 qualification, byte capture, forced NOP for bit-6-clear codes, and pass-through of bit-6-set opcodes.
  • HALT end-of-line behavior, R-register/A6 maskable interrupt timing, interrupt acknowledge, line completion, and scanline-counter increment.
  • Character address formation from I=0x1E, character bits 0-5, scanline counter 0-7, bit 7 inverse video, and eight-pixel shift output.
  • NMI-generator enable/disable I/O decoding, HSYNC-to-NMI relationship, /HALT-dependent /WAIT synchronization, NMI priority, and handler entry at 0x0066.
  • SLOW-mode task sequence: VSYNC/keyboard, top blank lines plus user code, 192 visible lines, bottom blank lines plus user code.
  • FAST mode: user code at full speed without a maintained display, while ROM display routines remain ZX80-compatible when invoked.
  • VSYNC start/stop side effects, line-counter reset/blocking, keyboard reads, cassette coupling, and 50/60 Hz sense.
  • PAL versus NTSC blank-line margins and effective CPU time. Do not infer timing solely from host refresh rate.
  • Collapsed/expanded display files, pseudo-hi-res and true-hi-res compatibility, and cycle-exact software that depends on undocumented behavior.
  • Early 2C184E versus later 2C210E/back-porch behavior when hardware revision is in scope.

Validation Matrix

Exercise each relevant combination:

AxisRequired cases
ROM selectorZX811, ZX812, ZX813
Video standardPAL; NTSC when supported by the path under review
Execution modeSLOW, FAST, ROM display while otherwise in FAST
Display fileEmpty/collapsed, short rows, fully expanded, inverse characters
Interrupt phaseVisible INT/HALT path, upper NMI blanking, lower NMI blanking, VSYNC with NMI off
RAM behaviorBase RAM and 16K expansion when address aliasing or hi-res is relevant

Use three kinds of evidence:

  1. Bus trace: PC, address, data before/after ULA interception, /M1, /MREQ, /RFSH, /HALT, /WAIT, /INT, /NMI, acknowledge cycles, I, R, and line counter.
  2. Signal trace: horizontal counter, HSYNC, VSYNC, NMI-enable latch, character latch, shift-register load/output, and video level.
  3. Rendered result: standard 32x24 text, collapsed rows, checkerboard patterns, inverse video, SLOW/FAST transitions, and representative hi-res software.

Report exact timing only after naming the convention: CPU T-states versus ULA clocks, whether a 0-based terminal count is described as 207 or 208 cycles, and which signal edge starts the line.

Change Guardrails

  • Keep behavior common to ZX811/ZX812/ZX813 shared unless ROM evidence requires a branch.
  • Preserve interrupt ordering when INT and NMI become eligible near the same CPU boundary.
  • Do not render directly from D_FILE if that bypasses bus-visible or cycle-visible effects.
  • Do not model standard-compliant porches as universal ZX81 behavior; distinguish ULA revisions and composite modifications.
  • Do not use ROM routine addresses from one ROM image as invariants across all three selectors.
  • When sources disagree, prefer measured behavior for the identified model/revision, document the counter/edge convention, and retain uncertainty rather than averaging values.

レビュー

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

同じリポジトリのスキル

概要と使いどころ

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 のスキルをすべて見る

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