Page 1 of 1
BASIC drawing on something other than 320x200@256 color?
Posted: Thu Oct 24, 2024 10:47 pm
by Fruggs
Hi, thanks for looking at my questions.
Looking at SCREEN and the values listed in the Modes table in Chapter 3: Editor, it looks like BASIC can only access one bitmap mode, 320x200@256 color. Is the documentation outdated or is that really the only bitmap mode?
VERA has registers that look like I can set a 640x480 bitmap mode. For my use, I might want to mess around with 4 colors at this resolution, so I think I'll be okay with the VRAM limitations. If I poke in the values to set this mode, will BASIC drawing commands (FRAME, RECT, RING, OVAL, etc) work?
Re: BASIC drawing on something other than 320x200@256 color?
Posted: Fri Oct 25, 2024 9:00 am
by ahenry3068
Fruggs wrote: ↑Thu Oct 24, 2024 10:47 pm
Hi, thanks for looking at my questions.
Looking at SCREEN and the values listed in the Modes table in Chapter 3: Editor, it looks like BASIC can only access one bitmap mode, 320x200@256 color. Is the documentation outdated or is that really the only bitmap mode?
VERA has registers that look like I can set a 640x480 bitmap mode. For my use, I might want to mess around with 4 colors at this resolution, so I think I'll be okay with the VRAM limitations. If I poke in the values to set this mode, will BASIC drawing commands (FRAME, RECT, RING, OVAL, etc) work?
You can set other modes on VERA with BASIC Poke. At that point your on your own because the BASIC drawing commands only work in Mode $80. As a matter of fact even getting into the FB_ & GRAPH_ routines in ROM they are all 8 bit 320x240 specific.
As far as 640x480 4bpp. I made the same mistake. There is not quite the VRAM to handle that mode. You can do 640x480 in 1bpp or 2bpp. If you want a very interesting programming issue You could create a 640x400 4bpp graphics buffer but with no room left for sprites or tiles. Everything would have to be done in Graphics even your text (if any).
Re: BASIC drawing on something other than 320x200@256 color?
Posted: Fri Oct 25, 2024 3:11 pm
by kelli217
They do say 4
colors, so that is only 2 bits per pixel...
Re: BASIC drawing on something other than 320x200@256 color?
Posted: Fri Oct 25, 2024 3:57 pm
by ahenry3068
kelli217 wrote: ↑Fri Oct 25, 2024 3:11 pm
They do say 4
colors, so that is only 2 bits per pixel...
I guess I misread a little. The main point though is after you set the mode BASIC & the ROM has no builtin
support for other graphics modes.
Re: BASIC drawing on something other than 320x200@256 color?
Posted: Fri Oct 25, 2024 4:08 pm
by desertfish
@fruggs, where did you read it's 320x200? because that was a LONG time ago it has been 320x240 (x256 colors) for a pretty long while now. Talking about screen mode 128.
Re: BASIC drawing on something other than 320x200@256 color?
Posted: Fri Oct 25, 2024 6:58 pm
by DragWx
desertfish wrote: ↑Fri Oct 25, 2024 4:08 pm
@fruggs, where did you read it's 320x200? because that was a LONG time ago it has been 320x240 (x256 colors) for a pretty long while now. Talking about screen mode 128.
I'm not the OP, but it looks like the
Kernal page of the docs is out of date, and says 320x200 by mistake. I checked the latest revision of the ROM just to be sure.
Re: BASIC drawing on something other than 320x200@256 color?
Posted: Fri Oct 25, 2024 8:33 pm
by desertfish
I've created 2 github PR's to correct this in the documentation.
Re: BASIC drawing on something other than 320x200@256 color?
Posted: Fri Oct 25, 2024 10:34 pm
by Fruggs
Thanks for the info, cool insights