
It's most likely a timing issue with BPLCON0 or BPLCON2 as the demo toggles graphics modes every other line.
The readme for the demo also states
Last thing to mention is the hiding of the HAM6 color-bleed with sprites.
But maybe the hiding is only being done on the left side (and not the right side)
Last thing to mention is the hiding of the HAM6 color-bleed with sprites.
This might be it! I'll check that...
If all sprites are drawn in front and both playfields are cutted out, it looks like this:

Assuming that I didn't do anything stupid in my experiment, you are right. Sprites are only used to cover the left border.
Alright. Then it's likely a timing issue as you suggested
I think I figured out the cause of this bug. It becomes clear when the border is highlighted in a different color (red):

The red border is missing for all HAM lines. The emulator does draw the border, but the color is overwritten later in function colorize() (only HAM mode is affected, because of the way drawBorder() works):
```C++
// Translate bitplane data to color register indices
translate();
// Draw sprites
drawSprites();
// Draw border pixels
drawBorder();
// Perform playfield-playfield collision check (if enabled)
if (config.clxPlfPlf) checkP2PCollisions();
// Synthesize RGBA values and write the result into the frame buffer
pixelEngine.colorize(vpos);
```
Fixed.

Sweet!
Sweet!
Using your voxel test case, it was easy to debug 馃憤.
Most helpful comment
Using your voxel test case, it was easy to debug 馃憤.