# Blitter bitmap and completion regression

Run `bash tests/blitter/run_graphics.sh`.

The test checks the current Blitter and original `a8c27a1` cycle by cycle,
and checks rendered memory against an independent bitmap reference. The
reference applies the first/last A masks before shifting, carries shifted
bits between words and rows, combines pixels with explicit Boolean
operations, and advances byte-addressed pointers using signed modulos.

Coverage includes:

- All 16 A/B shift values, both directions, one-/two-/three-/nine-word spans,
  multiple rows and masks that trim both sides of a single-word operation.
- Copy A/B, cookie-cut with memory or constant A, XOR, AND, OR and solid fill.
- Negative A/B modulos, repeated destination rows and overlapping copies
  traversed in the safe direction.
- Random DMA unavailability and blitter clock enables; exact destination
  write counts, untouched-memory guards and final zero flags.
- Busy assertion immediately after BLTSIZE, including delayed first DMA.
- Two chains of 64 jobs restarted by writing BLTSIZE in the first free
  register slot after busy clears, without an artificial final-D drain.

The current and original cores both clear busy before the final destination
pipeline flush. The test explicitly includes that tail and verifies the
last write and subsequent job. It tests component-level sequencing; it does
not replace a CPU/DMACONR bus timing test or physical SRAM timing analysis.

The expected bitmap behavior follows Commodore's Hardware Reference Manual:
[shifts and masks](https://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node011F.html),
[descending operation](https://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node0120.html),
[DMA channels and modulos](https://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node011B.html),
and [busy polling](https://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node0123.html).
The reference does not model area fill or Bresenham line drawing; the
existing whole-Blitter baseline comparison covers those modes separately.
