[Coco] Forground / Background

L. Curtis Boyle curtisboyle at sasktel.net
Mon Sep 2 17:59:36 EDT 2019


The $8D is the actual system call number (in this case, GetStat; with which, whatever you have in register B going into the call, is the specific GetStat function (sub-call) number. $96 is SS.Palet, for example.
If you have the level 2 manual (if you don’t please get it at the Color Computer Archive; it will be invaluable for these types of things), there is a section devoted to all the normal GetStat and SetStat calls, and what they do. Most graphics, joystick, mouse and joystick calls are all in there, amongst other things.

L. Curtis Boyle
curtisboyle at sasktel.net



> On Sep 2, 2019, at 2:09 PM, coco at jechar.ca wrote:
> 
> 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