It is easy to create your own colour schemes - or themes - by using the excellent QCoCo app by Bob Spelten and Wolfgang Uhlig (http://members.upc.nl/b.spelten/ql/) The same format as produced by QCoCo can be used to change the inbuilt system palettes according to taste and to create bespoke palettes for specific programs.
You can test various system palettes from within QCoCo, and once satisfied, save them to disk and load them at boot time. I use the following routine, called from my stage 1 boot program:
Code: Select all
100 REMark Set all four Wman palettes
110 :
120 home$ = 'win2_util_col_coco_thms_'
130 ext$ = '_thm'
140 :
150 SetPal "grey", 0
160 SetPal "copper", 1
170 SetPal "meanie", 2
180 SetPal "blue", 3
190 QUIT
200 :
210 DEFine PROCedure SetPal(fnm$, palno%)
220 ch = FOP_IN(home$ & fnm$ & ext$): ERT ch
230 num = SP_GETCOUNT
240 mem = ALCHP(num * 2)
250 :
260 FOR adr = mem TO mem + (num - 1) * 2 STEP 2
270 INPUT#ch; col$
280 POKE_W adr, HEX(col$(2 TO))
290 END FOR adr
300 :
310 SP_SET palno%, mem, 0, num
320 RECHP mem
330 CLOSE#ch
340 END DEFine SetPal
350 :
$482
$DAAE
$0
$0
$5029
.. etc, SP_GETCOUNT (currently 57) items long in all.
This may be convenient, but not very efficient, as a list of 57 binary words may be loaded in a jiffy by LBYTES. Faster and consuming less space.
After discussion with Bob, I proposed the following additional format which, once finalised, will be supported by QCoCo too:
The file extension will be _thb - for theme binary
The proposed THB File Definition will be (described in assembler):
Code: Select all
dc.l 'TH01' ; Flag and version number
dc.w $200 ; sp_winbd% - Window border
.. ; etc
Code: Select all
100 DIM thv$(4): thv$(0) = 4
110 :
120 REMark Set all four Wman palettes
130 :
140 home$ = 'win2_util_col_coco_thms_'
150 ext$ = '_thb'
160 :
170 ERT SetPalB("grey", 0): REMark System palette 0
180 ERT SetPalB("copper", 1): REMark System palette 1
190 ERT SetPalB("meanie", 2): REMark etc
200 ERT SetPalB("blue", 3)
210 QUIT
220 :
230 DEFine FuNction SetPalB(fnm$, palno%)
240 thc = FOP_IN(home$ & fnm$ & ext$)
250 IF thc < 0: RETurn thc
260 BGET#thc; thv$(1 TO 4): thl = FLEN(#thc): CLOSE#thc
270 IF NOT (thv$ = 'TH01' AND thl = SP_GETCOUNT * 2 + 4): RETurn -12
280 tha = ALCHP(thl)
290 LBYTES home$ & fnm$ & ext$, tha
300 SP_SET palno%, tha + 4, 0, SP_GETCOUNT
310 RECHP tha
320 RETurn 0
330 END DEFine SetPalB
340 :
Code: Select all
DIM thv$(4): thv$(0) = 4
..
thc = FOP_IN(theme$)
BGET#thc; thv$(1 TO 4): thl = FLEN(#thc): CLOSE#thc
IF thv$ = 'TH01' AND thl = SP_GETCOUNT * 2 + 4 THEN
tha = ALCHP(thl)
LBYTES theme$, tha
SP_JOBOWNPAL -1, tha + 4
..
We thought it was a good idea to have the extras ID, but now I waiver..
Any views on this?