! This repo is very out of date and I have not kept it up to date with any changes to the spec since February 2022 !
I have lost interest in this project and am unlikely to update it any time soon. The instruction set itself has changed and I believe there have been lots of changes to various devices in the interim. Take everything here with a grain of salt.
WIP test programs to help catch implementation errors when porting the Uxn virtual CPU spec. Each program contains the expected program output (as executed on the reference C implementation of Uxn/Varvara) as a hexdump string so it's easily readable in the compiled .rom files as well.
Some files have ASCII characters as markers embedded in the expected output to help diagnose which instruction has a problem (e.g. arithmetic.tal outputs +
, -
, /
, etc. before each section of tests.
Edit testheader.tal to change the output method. By default it writes raw result bytes to the console device, but this can be disabled to just leave values on the stack if the implementation doesn't have device output yet.
- Edit the Makefile and change
uxnemu
to point to your emulator - Run
make run
to build the uxn programs, run them, and hexdump the output. Then compare the output to the "expected" string for each rom.
- Load each rom into your emulator
- Copy output of console device and compare with the "expected" string for that rom
- Edit testheader.tal to redefine OUT/OUT2/OUTr as null operations
- Load each rom into your emulator
- Run the rom to completion
- Copy the contents of the working stack and compare with the "expected" string for that rom