Hi good afternoon.
two screens for graphics, is that possible?
I would like to draw graphics on the rear invisible screen and then copy them to the visible screen using move.
Thanks.
greeting
two screens for graphics, is that possible?
Re: two screens for graphics, is that possible?
This is called "double buffering", and it's only available on tile modes or screen modes with less than 256 colors.
The issue with doing this at 320x240 is that a single screen uses up 76KB of VRAM, which means there's not enough room in VERA (128K) to page flip. You can probably page flip at something like 320x180, if you mask the bottom of the screen, or you can use a 16-color mode or any tiled mode.
Check out the VERA Programmer's Reference at https://github.com/X16Community/x16-doc ... ference.md
The TILE_BASE registers are what you'd need to modify; pointing TILE_BASE to two different locations in memory will allow you to modify the back buffer, then swap it out to the front buffer. There's no need to "move" data; instead you just change which part of VRAM is visible on screen at any given time.
The issue with doing this at 320x240 is that a single screen uses up 76KB of VRAM, which means there's not enough room in VERA (128K) to page flip. You can probably page flip at something like 320x180, if you mask the bottom of the screen, or you can use a 16-color mode or any tiled mode.
Check out the VERA Programmer's Reference at https://github.com/X16Community/x16-doc ... ference.md
The TILE_BASE registers are what you'd need to modify; pointing TILE_BASE to two different locations in memory will allow you to modify the back buffer, then swap it out to the front buffer. There's no need to "move" data; instead you just change which part of VRAM is visible on screen at any given time.
- ahenry3068
- Posts: 1151
- Joined: Tue Apr 04, 2023 9:57 pm
Re: two screens for graphics, is that possible?
There is also the Rom routine graph_draw_image that will take image data stored in regular or banked memory and copy it to the screen in 256 color mode. But you couldn't use Graphics commands on the off screen buffer (unless you wrote your own routines to do this). But it can move rectangles to the screen pretty quickly.
Re: two screens for graphics, is that possible?
Hello, thanks for the help with the 2 screens.
I'm very happy that you answered my beginner questions
answered.
Thanks.
greeting
I'm very happy that you answered my beginner questions
answered.
Thanks.
greeting