Blitter - VBXE FX core (rev >= $26) Blitter test
=================================================

Core 1.27 (rev >= $27): all 150 tests. Core 1.26 (rev $26): detected at start, only
Part 1 (tests 1-88) is run, Parts 2 and 3 are skipped.

blitter1.xex       ready-to-run Atari 8-bit executable (DOS .xex, loads at $2800):
                   runs all tests once, pauses after every screen (press any key),
                   waits for a key at the end
blitter2.xex       same tests (built with -DLOOP): repeats forever, never waits for a key,
                   halts at the first failure with the report on the screen;
                   after every pass prints "pass N: 150 tests OK" (88 on a core 1.26)
blitter.c          source (llvm-mos C)
blitter.ld         linker script: program in $2800..$7FFF, C stack at $8000 (growing down)
hostsim.c/.h       PC simulation of the FX blitter (transliteration of fx_core.v):
                   runs the test program on a PC
modeltest.c        wrapper that runs the software model of the test program on a
                   6502 simulator (mos-sim)

Memory: nothing below $2800 except zero page $80..$FF and the hardware stack;
MEMAC-A window (4 KB) at $8000..$8FFF (change with -DWIN_BASE=0x....).

Build for Atari (llvm-mos SDK):
  mos-atari8-dos-clang -Oz -T blitter.ld -o blitter1.xex blitter.c
  mos-atari8-dos-clang -Oz -DLOOP -T blitter.ld -o blitter2.xex blitter.c

Run on PC against the simulator (150 tests, expect "PASS 150  FAIL 0"):
  gcc -O1 -Wall -DHOST_SIM -DNO_PAUSE blitter.c hostsim.c -o t && ./t

Run the model on a 6502 simulator (only the model; hardware access is stubbed,
so FAIL lines are shown):
  mos-sim-clang -Oz -o mt modeltest.c && mos-sim mt

Test order (a header line is printed before each part):
  1. core 1.26 features (no MODE 7, containers, AUX) - tests 1-88
  2. 1.27: MODE 7, containers, MODE 2 AUX_CONTROL (no RSV) - tests 89-138
  3. RSV tests (reserved combinations)                - tests 139-150

Tests 86-88 take a real 6502 IRQ: a handler is installed in the OS IRQ vector VIMIRQ ($0216)
and restored afterwards (the OS must be active: standard Atari XL/XE with DOS).

Output: one line per test (OK / FAIL with details), pause after every screen
(press a key), summary at the end.
