Skip to content
cccskills
FreePublished on GitHub

emulators-debug-log-audit

Parse and interpret execution debug logs generated by the EMULATORS framework, correlating each CPU instruction block with its VIC-II, CIA, SID, interrupt, stop, raster, badline, and memory-access cycles. Use for .LOG traces from EMULATORS when diagnosing cycle timing, raster effects, CPU stalls, IRQ/NMI entry, instruction/chip synchronization, or when reconstructing execution around a PC or mapped register.

The English summary is being prepared. Showing the original description.

See how to install

Files included (4)

  • SKILL.md3.4 KB
  • agents/openai.yaml259 B
  • references/format.md2.7 KB
  • scripts/analyze_log.py5.9 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

EMULATORS Debug Log Audit

When compiling or executing an emulator on Windows to produce a log, use $emulators-windows-build-runtime.

Workflow

  1. Inspect the relevant debug... methods before assigning semantics to fields; the log format follows the current implementation.
  2. Run scripts/analyze_log.py LOG --summary first. It streams the file and is suitable for large traces.
  3. Locate relevant code with --match, for example --match 'PC:\$0bd|\$d011|Interrupt'.
  4. Use --before N --after N to preserve CPU-block context. A block is delimited by a line containing only +.
  5. Correlate the CPU header cycle with every chip cycle contained in that block. Expect the number of ordinary VIC-II/CIA cycles to equal the CPU instruction duration, except additional-info records.
  6. Distinguish observation from inference. Report absolute emulator cycles, PC, instruction, raster row/cycle, CPU state, IRQ source/reason, and relevant register values.
  7. For C64 video or CIA conclusions, also use the corresponding VIC-II or CIA audit skill and its reference.

Interpretation Rules

  • CPU <cycle> Info Cycle opens an instruction-level block. Because debugLastExecutionData runs before the new instruction, Last N cycles describes the preceding instruction, while the following PC line describes the instruction executed in the current block. Compare durations across consecutive instruction blocks, never within the same block.
  • PC is the instruction address; operand annotations show the effective address and observed/transferred value.
  • Read numeric CPU states from the current enum before naming them.
  • Each VICII <cycle> Info Cycle is one recovered cycle. Cross-check ROW/Cycle in Internal with Raster position.
  • debugVICIICycle records the VIC-II snapshot before that cycle is processed. VIC-II memory-access events occur in the VIC phase; an explicit VIC-II register write record occurs later in the CPU phase of the same absolute cycle. The resulting state normally appears in the next snapshot.
  • In full-instruction CPU mode, chip cycles are recovered after the CPU instruction has executed. Use the explicit VIC-II register write record to establish the physical bus-write cycle and phase; without that record, do not infer timing from block membership alone.
  • Treat badline fields, RC, VC, VCBASE, VLMI, DEN and CPU stops as one state machine.
  • Repeated Interrupt CPU requested records while IRQ remains asserted are not repeated edges. Pair them with wait, rejection and launch records.
  • Read debugCIACycle and timer accessors before naming every CIA tuple field.
  • A PC jump alone does not prove an interrupt; require explicit interrupt evidence or vector/stack reconstruction.

Required Output

Provide a compact event timeline, invariants that hold or fail, the earliest divergent cycle, ranked causes with log evidence, and conditional solutions. Do not edit emulator code without explicit authorization.

See references/format.md for provenance and checks.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

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.

The English summary is being prepared. Showing the original description.

Commnets/EMULATORS10Updated Oct 18, 2026

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.

The English summary is being prepared. Showing the original description.

Commnets/EMULATORS10Updated Oct 18, 2026

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.

The English summary is being prepared. Showing the original description.

Commnets/EMULATORS10Updated Oct 18, 2026

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.

The English summary is being prepared. Showing the original description.

Commnets/EMULATORS10Updated Oct 18, 2026

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.

The English summary is being prepared. Showing the original description.

Commnets/EMULATORS10Updated Oct 18, 2026

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.

The English summary is being prepared. Showing the original description.

Commnets/EMULATORS10Updated Oct 18, 2026

See all skills by Commnets

Report a problem with this skill