pTOS
pTOS copied to clipboard
Implement 8bpp chunky raster ops
The only major VDI feature missing still is rendering of raster blocks. In bitplane modes this is handled by complicated and optimized 68k assembly.
vro_cpyfm and vrt_cpyfm:
For our purposes the 8bpp packed pixel implementation can be implemented in straightforward C. We need to support the following situations:
- blit 1bpp source to 8bpp packed pixel with fg color.
- blit 8bpp to 8bpp
And we may need one or both of these (FVDI seems to not support these.)
- 4bpp (packed pixel - two pixels in a byte) to 8bpp.
- 2bpp (packed pixel - 4 pixels per byte) to 8bpp.
vr_trnfm:
For converting MFDBs from standard to device specific format (and vice versa), we need to support:
- 8 planes to/from 8bpp packed pixel
- 1bpp is the same in both packed and standard format, so it's a no-op/pure memcpy
In case we implement the 4 and 2bpp blits above, vr_trnfm needs to additionally support these:
- 4 planes to/from 4bpp packed pixel
- 2 planes to/from 2bpp packed pixel
Some of these may already be available in FVDI (no sure yet).
There are bitplane handling functions in XaAES (texture loaders) and Highwire (image handlers) sources. I also have a bunch of chunky functions that handle 256 colors to 32bit in various formats. ALL of these mentioned are coded in C not assembler.
Note that I also have some C code to handle VDI colors/palettes. Also, although handling 32bit color modes is faster (RPi native), you can set (force) as low as 2bit color mode. 2bit color in memory would look like a ST, but maybe RPi has enuf speed to convert that to or use 32bit mode with mono colors of ur choosing?