** New Frontiers in VIC-Hires-Graphics, Part 5
Posted: Sun May 30, 2010 6:56 am
So, we had accomplished the 208x208 resolution, but it still nagged me that 208x240 didn't have BASIC-support, which lead to this:
Just a little in-between-update: Regarding the "slide-show" today i spent some time thinking about how to make the 208x240-bitmap useable from BASIC. I've done it now in way that doesn't use any IRQ - the assembler routine does the following:
- save lower 1K
- turn on graphics
- check for "Space"-keypress after each screen display cycle
- if pressed: turn off graphics, restore lower 1K
This way you can POKE the graphics-data from BASIC, then turn on the viewer and after pressing "Space" normal BASIC will continue. One can still use the top 16 lines of 22 chars in BASIC since the graphic-data start in memory at 4448.
The addressing-mode is hell-squared though. It isn't enough that you have to put the values into the unrolled loop at the LDA #xx-fields. A "bonus" is that due to timing the switch to the $0000-video- and char-RAM has to be in the middle of this loop. So at 2 places there is a jump of 10 instead of the normal 5 byte for the next graphics-data value. My solution for this would be to place the whole graphics-data (208x240) at $a000 and only when turning on the graphics-mode to copy it on need to the right places. This way only about 6K in the whole RAM would be free for your own programs, though.
My code isn't quite ready yet, I'll probably have something by tomorrow.
Just a little in-between-update: Regarding the "slide-show" today i spent some time thinking about how to make the 208x240-bitmap useable from BASIC. I've done it now in way that doesn't use any IRQ - the assembler routine does the following:
- save lower 1K
- turn on graphics
- check for "Space"-keypress after each screen display cycle
- if pressed: turn off graphics, restore lower 1K
This way you can POKE the graphics-data from BASIC, then turn on the viewer and after pressing "Space" normal BASIC will continue. One can still use the top 16 lines of 22 chars in BASIC since the graphic-data start in memory at 4448.
The addressing-mode is hell-squared though. It isn't enough that you have to put the values into the unrolled loop at the LDA #xx-fields. A "bonus" is that due to timing the switch to the $0000-video- and char-RAM has to be in the middle of this loop. So at 2 places there is a jump of 10 instead of the normal 5 byte for the next graphics-data value. My solution for this would be to place the whole graphics-data (208x240) at $a000 and only when turning on the graphics-mode to copy it on need to the right places. This way only about 6K in the whole RAM would be free for your own programs, though.
My code isn't quite ready yet, I'll probably have something by tomorrow.