This requires rewrite of BitmapUp and BitmapClip. BSW's version generates stream of bytes, consumed one by one. Bytes outside clipping region are ignored.
Unpacking with Beamracer means that consumer (drawing routine) is in one of three states:
ignore X initial bytes in a row (left of margin)
consume X bytes (draw)
ignore final X bytes in a row (right of margin) until end of line (bitmap's width)
In every state we need to keep track of repeated values:
this byte appears only 1 time - write to memory port
this byte repeats 1+n times - one write to memory port, and then another to repeat register for n copies
For this we need to compare and subtract number of bytes until left margin, until right margin, until bitmap end of line. BSW version has only counters that decrease always by one.
This requires rewrite of
BitmapUp
andBitmapClip
. BSW's version generates stream of bytes, consumed one by one. Bytes outside clipping region are ignored.Unpacking with Beamracer means that consumer (drawing routine) is in one of three states:
In every state we need to keep track of repeated values:
n
copiesFor this we need to compare and subtract number of bytes until left margin, until right margin, until bitmap end of line. BSW version has only counters that decrease always by one.