I'd like to be able to use 4-bit or 16-color with TGI. I have some existing line drawing functions, but the built-ins for TGI run approximately 3× faster, so would like to take advantage of them if possible.
In C, this will configure VERA to 4-bit mode, so enough for two screens, and have it display the second screen:
/* Set the bitmap to 16-color mode */
VERA.layer0.config = 6;
/* Set the offset */
VERA.layer0.tilebase = SCR_2_BASE;
However, tgi_line and other functions will plot expecting 8-bit / 256-color mode so the output won't be correct.
Are there any settings to let TGI know of the pixels / byte and screen base?
TGI functions and 4-bit or 16-color
- ahenry3068
- Posts: 1135
- Joined: Tue Apr 04, 2023 9:57 pm
Re: TGI functions and 4-bit or 16-color
TGI ?? T.he G.raphics I.nterface ? If you are talking about the FB and GRAPH routines present in ROM they are strictly for 8 bit mode. You'll have to write your own Graphics primitives for the 16 color mode. It's actually a project I'm looking at maybe doing in the future (writing the primitives). I'm not planning on doing them in the near future though.russell-s-harper wrote: ↑Thu Apr 04, 2024 11:56 pm I'd like to be able to use 4-bit or 16-color with TGI. I have some existing line drawing functions, but the built-ins for TGI run approximately 3× faster, so would like to take advantage of them if possible.
In C, this will configure VERA to 4-bit mode, so enough for two screens, and have it display the second screen:
/* Set the bitmap to 16-color mode */ VERA.layer0.config = 6; /* Set the offset */ VERA.layer0.tilebase = SCR_2_BASE;
However, tgi_line and other functions will plot expecting 8-bit / 256-color mode so the output won't be correct.
Are there any settings to let TGI know of the pixels / byte and screen base?
(By Graphics primitives I mean functions Such as PutPixel, Line, Rect... Maybe BitBlit or PutImage. etc...... )
Re: TGI functions and 4-bit or 16-color
I didn't know there was a Facebook routine.
- ahenry3068
- Posts: 1135
- Joined: Tue Apr 04, 2023 9:57 pm