kuroneko
03-15-2012, 03:26 PM
This driver has the same features as its little brother:
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
'' long[par][4]: palette: colour:[!Z]*4 = (6:2)*4 -> zero (accepted), optional background palette
''
'' colour [buffer] format
''
'' - (%0--//--0) address (full colour, word array)
'' - (%1--//---) colour value (waitvid 2 colour VGA format)
''
'' background palette format
''
'' - %%RGB-RGB-RGB-RGB-, MSB holds index 0 (waitvid 4 colour VGA format)
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.
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
'' long[par][4]: palette: colour:[!Z]*4 = (6:2)*4 -> zero (accepted), optional background palette
''
'' colour [buffer] format
''
'' - (%0--//--0) address (full colour, word array)
'' - (%1--//---) colour value (waitvid 2 colour VGA format)
''
'' background palette format
''
'' - %%RGB-RGB-RGB-RGB-, MSB holds index 0 (waitvid 4 colour VGA format)
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.