This directory contains self-contained examples for the Rosetta-6502 emulator. Each example includes a small 6502 firmware, along with its linker and MMIO configuration, demonstrating how to run code on the emulator.
Each example must follow this structure:
examples/ <example-name>/
firmware.asm # 6502 firmware source
mmio.cfg # MMIO device configuration
none.cfg # Memory/linker configuration
To run an example, invoke build.sh and pass the example directory as the
argument:
./build.sh examples/00-minimal-helloIf you are already inside the examples directory:
../build.sh 00-minimal-helloThe build script will automatically:
- Assemble
firmware.asm - Link using
none.cfg - Load the MMIO configuration from
mmio.cfg - Execute the firmware on the Rosetta-6502 emulator
Depending on the example, you may see:
- MMIO output via
PRINTCHAR - Keyboard input via
KEYBOARD - Writes to VRAM-mapped memory regions
- Reset vectors and basic firmware flow
- Direct interaction with emulated hardware
To create a new example:
- Copy an existing example directory
- Rename the directory
- Modify
firmware.asm,mmio.cfg, andnone.cfg - Run it using:
./build.sh examples/<new-example>