CALL PALETTE
This page was last modified 22:34, 30 December 2017 by Mars2000you.

This instruction is available in Hangul Basic, Kanji Basic and RMSX Basic.

Contents

CALL PALETTE in Hangul Basic and Kanji Basic

Effect

Alters MSX colors palette, just like the standard COLOR= command.

If you have activated one of the Japanese text screen modes with CALL KANJI, you need to use this command instead of COLOR= that is disabled in these modes.

Version 4 of Hangul BASIC developed by Korean MSX fan Plaire extends this command to non-Korean MSX2, MSX2+ and MSX Turbo R machines.

Syntax

CALL PALETTE (<color>,<red luminance>,<green luminance>,<blue luminance>)

Parameters

<color> is a number between 0 and 15. It can be a numerical constant variable, an array variable or an expression.

Note that color 0 is a transparent color, it means that border space is seen transparently - to handle it as a 'normal' color, you need to use VDP(9)=VDP(9) OR &H20 (back to transparent feature with VDP(9)=VDP(9) AND &HDF).

<red luminance>, <green luminance> and <blue luminance> are numbers between 0 and 7.

If you omit all parameters (execute simply CALL PALETTE), all palettes return to default.

Example

_PALETTE (7,4,3,5)

Default palette for Kanji text screens

Color R G B Color R G B Color R G B Color R G B
0 0 0 0 4 1 1 7 8 7 1 1 12 1 4 1
1 0 0 0 5 2 3 7 9 7 3 3 13 6 2 5
2 1 6 1 6 5 1 1 10 6 6 1 14 5 5 5
3 3 7 3 7 2 6 7 11 6 6 4 15 7 7 7


Storage of palette in VRAM for Kanji text screens

MSX-BASIC stores/restores palette to/from VRAM, but the address is different for each graphic mode used by the Kanji text screen. The palette is stored in VDP native format.

Used graphic SCREEN Decimal Hexadecimal
5 30336 7680
7 64128 FA80


Related to

CALL KANJI, COLOR, SCREEN, COLOR=

Compatibility

Hangul BASIC version 3 or higher, Kanji BASIC


CALL PALETTE in RMSX Basic

Effect

Selects the palette or monitor emulation to be used on the MSX1 computer emulated on a Turbo R machine by the rMSX emulator.

Note: This instruction has no effect on MSX2 emulation, but it will not cause an error, even if used in a BASIC listing.

Syntax

CALL PALETTE <palette/monitor emulation>

Parameters

<palette/monitor emulation> can be MSX1, MSX2, GREEN or GRAY.

When this parameter is not specified, the MSX1 palette will be used.'

Example

_PALETTE MSX2

Related to

CALL HZ

Compatibility

RMSX BASIC