[FYI] VGA, 100xH/P, dual cog, per cell colour (full/indexed)
kuroneko
Posts: 3,623
This driver has the same features as its [thread=136666]little brother[/thread]:
Note that while the colour attribute format is now a byte the colour buffer still needs to be word aligned (just half the size).
Important: You can't use bst & Co for compiling the demo. Also, you'll need at least rev 33 of the open source SPIN compiler. PropTool 1.3 will do just fine.
- per cell colour (foreground and background)
- monochrome mode (when you're short on hub memory)
'' mailbox layout (100xH, full colour) '' '' long[par][0]: screen: [!Z]:addr = 16:16 -> zero (accepted) '' long[par][1]: font: size:[!Z]:addr = 8:8:16 -> zero (accepted) '' long[par][2]: colours: c/a:[!Z]:addr = 1:15:16 -> zero (accepted), optional colour [buffer] '' long[par][3]: frame indicator/sync lock '' '' colour [buffer] format '' '' - (%0--//--0) address (full colour, word array) '' - (%1--//---) colour value (waitvid 2 colour VGA format)To save hub RAM an indexed version has been introduced. It reduces the colour attribute size to a byte rather than a word. The foreground colour can still be specified in full 6bit resolution, the remaining 2 bits select one out of four background colours (default: black(0), dark blue(1), dark gray(2), white(3)). The UI is the same. The only difference is that when setting the colour the blue component of the background colour is treated as colour index.
Note that while the colour attribute format is now a byte the colour buffer still needs to be word aligned (just half the size).
'' mailbox layout (100xP, full/indexed colour) '' '' long[par][0]: screen: [!Z]:addr = 16:16 -> zero (accepted) '' long[par][1]: font: size:[!Z]:addr = 8:8:16 -> zero (accepted) '' long[par][2]: colours: c/a:[!Z]:addr = 1:15:16 -> zero (accepted), optional colour [buffer] '' long[par][3]: frame indicator/sync lock '' [COLOR="orange"]long[par][4]: palette: colour:[!Z]*4 = (6:2)*4 -> zero (accepted), optional background palette[/COLOR] '' '' colour [buffer] format '' '' - (%0--//--0) address (full colour, [COLOR="blue"]word array[/COLOR]) '' - (%1--//---) colour value (waitvid 2 colour VGA format) '' '' [COLOR="orange"]background palette format[/COLOR] '' '' [COLOR="orange"]- %%RGB-RGB-RGB-RGB-, MSB holds index 0 (waitvid 4 colour VGA format)[/COLOR]If either screen or font buffer are not set when the drivers are initialised the default colour will change to black-on-black. After that you're on your own. The archives contain fonts for 100x50 (8x12) and 100x75 (8x8) changeable in the UI object(s). Both drivers now make sure that user colour values (full colour mode, direct access) don't affect the sync bits. So there is no need for masking & Co (this doesn't apply to the 50xH version though, we don't have the time).
Important: You can't use bst & Co for compiling the demo. Also, you'll need at least rev 33 of the open source SPIN compiler. PropTool 1.3 will do just fine.
Comments
Each character has individual foreground and background colors. Uses the regular, 5 MHz crystal without overclocking.
How many cogs does it use? I think two, right?
BTW: Any thoughts on making either one MIT and/or adding to OBEX?
Not particularly. But if me giving it away is not enough I may consider adding a/the license
However I think your approach might get me there without a whole lot of syncing, because in effect I could use a "half block" character (lines 0-5 of the cell = solid background, lines 6-11 of the cell =foreground solid) , set the foreground for the lower half of the block/character cell, set the background for the upper half of the block/character cell, effectively achieving 100*100 "pixels" which is getting close to Kye's driver, but could do text easily.
Of if you did an 8x8 version we'd be looking at 100H x150 V pixels
Thanks for the hard work. I better go and try it...
It didn't work with any of the Parallax 800x600 driver settings, so I think you figured out something they didn't with the timing...
It might be fun one day to set up 2 screen buffers and page flip them... Could get 3D depth with text that way, I think...
Or, maybe modify the driver so that every other update has certian lines shifted some # of pixels left or right...