# sim68xx: the MC6800 single-step harness A single-step harness around Arne Riiber's sim68xx (with Felix Erckenbrecht's additions), an independent C simulator of the 6800 family, for m6800-python's rung 5 cross-check. Moved here from `emu-tools-gpl` on 2026-11-24 (licence verdict in `../../docs/upstreams.md`). Not on the shared contract yet; command line and output are as they were. ## Path `$EMU_TOOLS_GPL2/tools/sim68xx/sim68xx_harness.c` (old location: `emu-tools-gpl/tools/m6800-python/sim68xx_harness.c`, now a link to this file). ## What it measures The registers and memory after one MC6800 instruction, as sim68xx computes them, from a given state. Cycle counts are printed but are not an independent opinion on MC6800 timing: sim68xx's MC6800 opcode table carries the Hitachi HD6301's counts (m6800-python's documents say so and do not compare them). **Every output is OBSERVED** (sim68xx at `d49c99a`, via this harness), overruled by the manuals and any hardware measurement. ## Build and command line m6800-python's `scripts/crosscheck/sim68xx.py` compiles the harness (gcc, `-O2 -std=gnu89 -w`, the MC6800 defines and sim68xx's include folders) and links it with the MC6800 objects of a sim68xx checkout built at the pin in that repository's git-ignored `third_party/`; it runs the binary as a separate program. The harness reads one case per line on standard input: the program counter, stack pointer, index register, accumulators A and B, the condition codes, a count N and N address and value pairs (decimal). For each it clears memory, loads the pairs, sets the registers, executes one instruction, and prints one line: the same registers, the cycle count, and the final value at each of the given addresses. The memory has no peripheral mapped: every address is plain memory. ## Upstream, licence and pin - **sim68xx** (Arne Riiber 1994-2004, Felix Erckenbrecht 2011), , pinned at **`d49c99a61e6437d84ec313b91511db23e02efb54`**. Its LICENSE is the GPL-2.0 text; the MC6800, 6800-family and base files the harness links carry a copyright line only, so by the family's rule of 2026-11-24 they are GPL-2.0-only, and so is the harness as built. (The "or later" grants in `src/base/main.c` and the HD6303 files cover files the harness does not use.) - **The harness:** our code (alewman), first published under MIT in m6800-python; it keeps that permission (`../../notices/MIT-emulator-family.txt`; an SPDX line saying MIT was added on moving here, nothing else changed). This repository is GPL-2.0-only (`../../LICENSE`). sim68xx is not committed here. - Checked against `emulator-lineage/docs/sources.md` (sim68xx: closed box only).