# CHIP-8 core ## What this builds A classic CHIP-8 core in Verilog, enough to run test ROMs and a small original fixture program. A testbench loads a ROM, steps the core, and dumps the 64 by 32 framebuffer (and timers). Golden dumps are compared. No FPGA and no handheld are required. Test ROMs must be ones you have rights to (public tests, or originals in the repo). Read `spekkr.inputs.json` first. `cycles` caps a run. `scale` sizes the PNG. `super` is off unless a fixture needs it. `sound` dumps the timer. `sim` is the simulator. ## Out of scope - A real FPGA or a commercial handheld in the checks. - A copyrighted commercial game ROM. - A Super-CHIP or XO-CHIP in the default, unless a fixture and the option say so. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. Test ROMs and fixtures - A public or original test ROM listed in `fixtures/chip8-roms.json` (for example a logo or an opcode test you have rights to) produces the framebuffer hash or golden in the file, after the listed cycle count. - An original fixture program in the repo draws a documented sprite at a documented position, matching a golden. - A blank run (no ROM, or a ROM of zeros) stays blank, timers at 0 after reset. Accept when: each listed ROM or fixture matches its golden or hash, and the blank run is blank. ### R2. Files and rights - A licence or a rights note lists every ROM. A test fails if a known commercial dump name is present. - Renders: the logo or first test, the fixture sprite, a blank frame, and a timers readout. One command simulates, compares, and writes the renders. No FPGA. Accept when: the rights scan is clean, the command passes for both simulators, and a broken opcode fixture fails a listed test ROM. ### R3. Inputs - Inputs are read from `spekkr.inputs.json`. Values outside the ranges or choices in `design.md` are refused before a netlist, a board or a testbench is built. - Options turn the optional circuits, ports or features in the Inputs table on or off. Accept when: an illegal input is refused by name, and the default input set produces the measurements in `design.md`. ### R4. Checks and report - One command runs the simulation or the testbench, writes the plots or dumps, and compares them to the numbers in `design.md`. - The command works without a physical board, a lab instrument or a network. Accept when: the command passes at the defaults, and fails if a documented value in the netlist or the ROM is corrupted on purpose. ## Verification Test ROMs you have rights to, and an original fixture program, produce golden framebuffer dumps (or hashes) after a documented cycle count. A rights scan fails if a commercial dump is present. No FPGA and no handheld are required. ## Definition of done - Every acceptance check above runs from one command, and all pass at the person's inputs. - A README says how to run a ROM, how rights are listed, and that a board is optional.