[Coco] Forground / Background

coco at jechar.ca coco at jechar.ca
Wed Sep 4 08:02:14 EDT 2019


Thanks Curtis.

  Charlie

On 2019-09-02 21:18, L. Curtis Boyle wrote:
> Using the $1b 31 prn clr sequences (or RUN GFX2(“Palette”,prn,clr))
> sets palettes for your local window/screen only, so you *should* be
> setting them yourself; otherwise, you are at the whim of whatever
> colors the user (or another program) set up, which can make
> combinations that are unreadable.
> 
> L. Curtis Boyle
> curtisboyle at sasktel.net
> 
> 
> 
>> On Sep 2, 2019, at 7:15 PM, coco at jechar.ca wrote:
>> 
>> 
>> This info must somehow be insufficient as I am getting
>> results that do not make sense, For the time being
>> I will just look at forcing a palette rather then
>> using the existing one not so polite for other programs
>> but I am getting impatient to get on to the next phase
>> of this project.
>> 
>> 
>> On 2019-09-02 18:40, Wayne Campbell wrote:
>>> I always use a BYTE variable I name call or callcode to hold the 
>>> system
>>> call number. It is handy for two reasons. First, $8D will be stored 
>>> as an
>>> integer. Since the value is in the range of a byte, using a BYTE 
>>> variable
>>> to hold it will save one byte. Second, if you have to use more than 
>>> one
>>> system call in your procedure, it's easier to copy and paste RUN
>>> SysCall(call,regs) and just make sure call is set to the appropriate 
>>> system
>>> call code.
>>> On Mon, Sep 2, 2019, 1: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
>>>> >>
>>>> --
>>>> Coco mailing list
>>>> Coco at maltedmedia.com
>>>> https://pairlist5.pair.net/mailman/listinfo/coco
>> 
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> https://pairlist5.pair.net/mailman/listinfo/coco
>> 


More information about the Coco mailing list