[Coco] Forground / Background

coco at jechar.ca coco at jechar.ca
Mon Sep 2 16:09:20 EDT 2019


OK based on what you told me and a previous related example.

I came up with:

PROCEDURE fbb
TYPE registers=cc,a,b,dp:BYTE;x,y,u:INTEGER
DIM regs:registers
DIM i:INTEGER
PARAM fbbstatus(3):BYTE

(* Standard output path we are using *)
regs.a=1
(* SS.Palet GetStat call # *)
regs.b=$96
(* Point to place to hold all 16 current palette register settings *)
regs.x=ADDR(fbbstatus)
RUN syscall($8d,regs)
END

The only thing I am not sure of is RUN syscall($8d,regs)
I am not sure what the $8d means and if it is correct
in this case it is just taken from a different example
maybe it does not apply here?



On 2019-09-02 14:46, L. Curtis Boyle wrote:
> As I mentioned, 2 color modes use palette #’s 0 to1, all 4 color modes
> use palette #’s 0 to 3, and the 16 color modes use palette #’s 0 to 15
> (If I remember correctly, you can specify palette numbers 0 to 15 in
> every mode, but they just wrap over if you are in a mode with less
> colors (ie in a 4 color mode, palette 0-3, 4-7, 8-11, 12-15 are all
> the same thing).
> As for getting your current foreground, background (and border)
> colors, use the SS.FBRgs GetStat system call (call #$96).
> 
> L. Curtis Boyle
> curtisboyle at sasktel.net
> 
> TRS-80 Color Computer Games website
> http://www.lcurtisboyle.com/nitros9/coco_game_list.html
> 
> 
> 
>> On Sep 2, 2019, at 12:36 PM, coco at jechar.ca wrote:
>> 
>> 
>> OK and How does one know which registers are available in a particular
>> graphics mode and which registers are currently being used for 
>> foreground
>> and background ?
>> 
>> 
>> On 2019-09-02 13:05, L. Curtis Boyle wrote:
>>> It is always the lowest palette numbers used for lower color
>>> resolution modes (2 color mode uses palettes 0-1, 4 color mode uses
>>> palettes 0-3).
>>> Sent from my iPhone
>>>> On Sep 2, 2019, at 10:12 AM, coco at jechar.ca wrote:
>>>> A bit more background the previous question is for OS-9 and Basic09.
>>>> On 2019-09-02 12:08, coco at jechar.ca wrote:
>>>>> There are 16 Palette registers, bot some modes do not use all 16
>>>>> How does one know which registers are available in a particular
>>>>> graphics mode and which registers are currently being used for 
>>>>> forground
>>>>> and background ?
>>>>> Charlie
>>>> --
>>>> Coco mailing list
>>>> Coco at maltedmedia.com
>>>> https://pairlist5.pair.net/mailman/listinfo/coco
>> 


More information about the Coco mailing list