libws libws
WSwan hardware library for the Wonderful toolchain
Loading...
Searching...
No Matches
Display

Data Structures

struct  ws_display_tile_t
 A structure representing a 2 bit per pixel tile. More...
struct  ws_display_tile_4bpp_t
 A structure representing a 4 bit per pixel tile. More...
struct  ws_sprite_t

Macros

#define WS_DISPLAY_WIDTH_TILES   28
#define WS_DISPLAY_HEIGHT_TILES   18
#define WS_DISPLAY_WIDTH_PIXELS   (WS_DISPLAY_WIDTH_TILES * WS_DISPLAY_TILE_WIDTH)
#define WS_DISPLAY_HEIGHT_PIXELS   (WS_DISPLAY_HEIGHT_TILES * WS_DISPLAY_TILE_HEIGHT)
#define WS_DISPLAY_TILE_WIDTH   8
#define WS_DISPLAY_TILE_HEIGHT   8
#define WS_DISPLAY_TILE_SIZE   16
 Tile 2-bit-per-pixel graphic data size, in bytes.
#define WS_DISPLAY_TILE_SIZE_4BPP   32
 Tile 4-bit-per-pixel graphic data size, in bytes.
#define WS_DISPLAY_VTOTAL   159
 Number of vertical lines in a frame.
#define WS_SCREEN_ATTR_TILE(x)
 Attribute: tile index (0-511).
#define WS_SCREEN_ATTR_TILE_MASK   (0x1FF)
#define WS_SCREEN_ATTR_PALETTE(x)
 Attribute: palette (0-15).
#define WS_SCREEN_ATTR_PALETTE_MASK   (0xF << 9)
#define WS_SCREEN_ATTR_BANK(x)
 Attribute: tile bank (0-1).
#define WS_SCREEN_ATTR_BANK_MASK   (0x2000)
#define WS_SCREEN_ATTR_TILE_EX(x)
 Attribute: tile index (0-1023). Calculates both bank and index.
#define WS_SCREEN_ATTR_TILE_EX_MASK   (0x21FF)
#define WS_SCREEN_ATTR_FLIP_H   0x4000
 Attribute: flip tile graphic horizontally.
#define WS_SCREEN_ATTR_FLIP_V   0x8000
 Attribute: flip tile graphic vertically.
#define WS_SCREEN_ATTR_FLIP   0xC000
 Attribute: flip tile graphic in both axes (180-degree rotation).
#define WS_SCREEN_ATTR_FLIP_MASK   0xC000
#define WS_SCREEN_WIDTH_TILES   32
#define WS_SCREEN_HEIGHT_TILES   32
#define WS_SCREEN_WIDTH_PIXELS   (WS_SCREEN_WIDTH_TILES * WS_DISPLAY_TILE_WIDTH)
#define WS_SCREEN_HEIGHT_PIXELS   (WS_SCREEN_HEIGHT_TILES * WS_DISPLAY_TILE_HEIGHT)
#define WS_SPRITE_ATTR_PALETTE(x)
 Attribute: palette (0-7; corresponds to screen palettes 8-15).
#define WS_SPRITE_ATTR_PALETTE_MASK   (0x7 << 9)
#define WS_SPRITE_ATTR_OUTSIDE   0x1000
 Attribute: draw sprite outside instead of inside window, if window enabled.
#define WS_SPRITE_ATTR_PRIORITY   0x2000
 Attribute: draw sprite in front of instead of behind Screen 2.
#define WS_SPRITE_ATTR_FLIP_H   0x4000
 Attribute: flip tile graphic horizontally.
#define WS_SPRITE_ATTR_FLIP_V   0x8000
 Attribute: flip tile graphic vertically.
#define WS_SPRITE_ATTR_FLIP   0xC000
 Attribute: flip tile graphic in both axes (180-degree rotation).
#define WS_SPRITE_ATTR_FLIP_MASK   0xC000
#define WS_SPRITE_MAX_COUNT   128
#define WS_RGB(r, g, b)
 Create an RGB color.
#define WS_DISPLAY_MONO_PALETTE(c0, c1, c2, c3)
 Define a mono mode palette of four shades (0-7).
#define WS_TILE_MEM(i)
 Pointer to tile.
#define WS_TILE_4BPP_MEM(i)
 Pointer to 4bpp tile.
#define WS_TILE_BANKED_MEM(b, i)
 Pointer to tile, with bank specified separately.
#define WS_TILE_4BPP_BANKED_MEM(b, i)
 Pointer to 4bpp, tile, with bank specified separately.
#define WS_DISPLAY_COLOR_MEM(i)
 Pointer to color palette.
#define WS_SCREEN_COLOR_MEM   WS_DISPLAY_COLOR_MEM
 Pointer to screen color palette.
#define WS_SPRITE_COLOR_MEM(i)
 Pointer to sprite color palette.
#define WS_DISPLAY_SHADE_LUT(c0, c1, c2, c3, c4, c5, c6, c7)
#define WS_DISPLAY_SHADE_LUT_DEFAULT   WS_DISPLAY_SHADE_LUT(0, 2, 4, 6, 9, 11, 13, 15)
#define ws_sprite_load_palette_mono(data, first, count)
#define ws_sprite_load_palette_color_2bpp(data, first, count)
#define ws_sprite_load_palette_color_4bpp(data, first, count)
#define ws_display_set_screen1_address(address)
 Set the base addresses of screen 1.
#define ws_display_set_screen2_address(address)
 Set the base addresses of screen 2.
#define ws_display_scroll_screen1_to(x, y)
 Scroll screen 1 to a specified location.
#define ws_display_scroll_screen2_to(x, y)
 Scroll screen 2 to a specified location.
#define ws_display_set_shade_lut_default()
 Use the default shade LUT.

Functions

static void ws_display_load_palette_mono (const void __far *data, int first, int count)
 Load monochrome palette data (2 bytes per palette).
void ws_display_load_palette_color_2bpp (const void __far *data, int first, int count)
 Load 2BPP color palette data (4 words per palette).
static void ws_display_load_palette_color_4bpp (const void __far *data, int first, int count)
 Load 4BPP color palette data (16 words per palette).
static void ws_display_set_control (uint8_t value)
 Set which layers and windows are visible on the display.
static uint8_t ws_display_get_control (void)
 Query which layers and windows are visible on the display.
static void ws_display_set_screen_addresses (const void __wf_iram *scr1_addr, const void __wf_iram *scr2_addr)
 Set the base addresses of screens 1 and 2.
static void ws_display_set_screen_address (uint8_t screen, const void __wf_iram *address)
 Set the base addresses of the specified screen.
static void ws_display_set_sprite_address (const void __wf_iram *address)
 Set the base addresses of the sprite table.
static void ws_display_set_screen2_window (uint8_t x, uint8_t y, uint8_t width, uint8_t height)
 Set the position and size of the screen 2 window.
static void ws_display_set_screen2_window_corners (uint8_t left, uint8_t top, uint8_t right, uint8_t bottom)
 Set the corners of the screen 2 window.
static void ws_display_set_sprite_window (uint8_t x, uint8_t y, uint8_t width, uint8_t height)
 Set the position and size of the sprite window.
static void ws_display_set_sprite_window_corners (uint8_t left, uint8_t top, uint8_t right, uint8_t bottom)
 Set the corners of the sprite window.
static void ws_display_scroll_screen_to (uint8_t screen, uint8_t x, uint8_t y)
 Scroll the specified screen to a specified location.
void ws_display_scroll_screen_by (uint8_t screen, int16_t x, int16_t y)
 Scroll the specified screen by a specified number of pixels.
static uint8_t ws_display_get_current_line (void)
 Get the line currently being drawn to the line buffer.
static void ws_display_scroll_screen1_by (uint8_t x, uint8_t y)
 Scroll screen 1 by a specified number of pixels.
static void ws_display_scroll_screen2_by (uint8_t x, uint8_t y)
 Scroll screen 2 by a specified number of pixels.
static void ws_display_set_icons (uint8_t mask)
 Set the list of displayed LCD icons, clearing any unspecified icons.
static void ws_display_show_icons (uint8_t mask)
 Show specified LCD icons.
static void ws_display_hide_icons (uint8_t mask)
 Hide specified LCD icons.
static void ws_display_toggle_icons (uint8_t mask)
 Toggle specified LCD icons.
void ws_display_set_shade_lut (uint32_t lut)
 Configure the shade LUT.
static void ws_lcd_control_enable (void)
 Enable the LCD panel.
static void ws_lcd_control_disable (void)
 Disable the LCD panel.
static void ws_screen_put_tiles (void ws_iram *dest, const void __far *src, uint16_t x, uint16_t y, uint16_t width, uint16_t height)
 Place a map of tiles on the screen.
static void ws_screen_put_tiles_ex (void ws_iram *dest, const void __far *src, uint16_t sx, uint16_t sy, uint16_t pitch, uint16_t dx, uint16_t dy, uint16_t width, uint16_t height)
 Place a map of tiles on the screen. This varianta llows specifying the source X position, Y position and width.
void ws_screen_get_tiles (void __far *dest, const void ws_iram *src, uint16_t x, uint16_t y, uint16_t width, uint16_t height)
 Copy a map of tiles from the screen.
void ws_screen_fill_tiles (void ws_iram *dest, uint16_t src, uint16_t x, uint16_t y, uint16_t width, uint16_t height)
 Fill an area on the screen with a given tile.
void ws_screen_modify_tiles (void ws_iram *dest, uint16_t mask, uint16_t value, uint16_t x, uint16_t y, uint16_t width, uint16_t height)
 Modify an area on the screen with given data.
static void ws_screen_put_tile (void ws_iram *dest, uint16_t src, uint16_t x, uint16_t y)
 Put a tile on the screen.
static uint16_t ws_screen_get_tile (void ws_iram *src, uint16_t x, uint16_t y)
 Get a tile on the screen.

Detailed Description

Macro Definition Documentation

◆ WS_DISPLAY_COLOR_MEM

#define WS_DISPLAY_COLOR_MEM ( i)
Value:
((uint16_t ws_iram *) (0xFE00 + ((i) << 5)))
#define ws_iram
Definition memory.h:55

Pointer to color palette.

Parameters
iColor palette (0-15).

Definition at line 217 of file display.h.

◆ WS_DISPLAY_HEIGHT_PIXELS

#define WS_DISPLAY_HEIGHT_PIXELS   (WS_DISPLAY_HEIGHT_TILES * WS_DISPLAY_TILE_HEIGHT)

Definition at line 47 of file display.h.

◆ WS_DISPLAY_HEIGHT_TILES

#define WS_DISPLAY_HEIGHT_TILES   18

Definition at line 45 of file display.h.

◆ WS_DISPLAY_MONO_PALETTE

#define WS_DISPLAY_MONO_PALETTE ( c0,
c1,
c2,
c3 )
Value:
((c0) | ((c1) << 4) | ((c2) << 8) | ((c3) << 12))

Define a mono mode palette of four shades (0-7).

Definition at line 178 of file display.h.

◆ ws_display_scroll_screen1_to

#define ws_display_scroll_screen1_to ( x,
y )
Value:
static void ws_display_scroll_screen_to(uint8_t screen, uint8_t x, uint8_t y)
Scroll the specified screen to a specified location.
Definition display.h:399

Scroll screen 1 to a specified location.

Parameters
xLeft corner of area to show, in pixels.
yTop corner of area to show, in pixels.

Definition at line 409 of file display.h.

◆ ws_display_scroll_screen2_to

#define ws_display_scroll_screen2_to ( x,
y )
Value:

Scroll screen 2 to a specified location.

Parameters
xLeft corner of area to show, in pixels.
yTop corner of area to show, in pixels.

Definition at line 417 of file display.h.

◆ ws_display_set_screen1_address

#define ws_display_set_screen1_address ( address)
Value:
static void ws_display_set_screen_address(uint8_t screen, const void __wf_iram *address)
Set the base addresses of the specified screen.
Definition display.h:313

Set the base addresses of screen 1.

Parameters
addressPointer to screen data.

Definition at line 322 of file display.h.

◆ ws_display_set_screen2_address

#define ws_display_set_screen2_address ( address)
Value:

Set the base addresses of screen 2.

Parameters
addressPointer to screen data.

Definition at line 329 of file display.h.

◆ ws_display_set_shade_lut_default

#define ws_display_set_shade_lut_default ( )
Value:
#define WS_DISPLAY_SHADE_LUT_DEFAULT
Definition display.h:236
void ws_display_set_shade_lut(uint32_t lut)
Configure the shade LUT.

Use the default shade LUT.

Definition at line 538 of file display.h.

◆ WS_DISPLAY_SHADE_LUT

#define WS_DISPLAY_SHADE_LUT ( c0,
c1,
c2,
c3,
c4,
c5,
c6,
c7 )
Value:
(((uint32_t)(c0)) | (((uint32_t)(c1)) << 4) | (((uint32_t)(c2)) << 8) | (((uint32_t)(c3)) << 12) | \
(((uint32_t)(c4)) << 16) | (((uint32_t)(c5)) << 20) | (((uint32_t)(c6)) << 24) | (((uint32_t)(c7)) << 28))

Definition at line 233 of file display.h.

◆ WS_DISPLAY_SHADE_LUT_DEFAULT

#define WS_DISPLAY_SHADE_LUT_DEFAULT   WS_DISPLAY_SHADE_LUT(0, 2, 4, 6, 9, 11, 13, 15)

Definition at line 236 of file display.h.

◆ WS_DISPLAY_TILE_HEIGHT

#define WS_DISPLAY_TILE_HEIGHT   8

Definition at line 50 of file display.h.

◆ WS_DISPLAY_TILE_SIZE

#define WS_DISPLAY_TILE_SIZE   16

Tile 2-bit-per-pixel graphic data size, in bytes.

Definition at line 54 of file display.h.

◆ WS_DISPLAY_TILE_SIZE_4BPP

#define WS_DISPLAY_TILE_SIZE_4BPP   32

Tile 4-bit-per-pixel graphic data size, in bytes.

Definition at line 58 of file display.h.

◆ WS_DISPLAY_TILE_WIDTH

#define WS_DISPLAY_TILE_WIDTH   8

Definition at line 49 of file display.h.

◆ WS_DISPLAY_VTOTAL

#define WS_DISPLAY_VTOTAL   159

Number of vertical lines in a frame.

Definition at line 64 of file display.h.

◆ WS_DISPLAY_WIDTH_PIXELS

#define WS_DISPLAY_WIDTH_PIXELS   (WS_DISPLAY_WIDTH_TILES * WS_DISPLAY_TILE_WIDTH)

Definition at line 46 of file display.h.

◆ WS_DISPLAY_WIDTH_TILES

#define WS_DISPLAY_WIDTH_TILES   28

Definition at line 44 of file display.h.

◆ WS_RGB

#define WS_RGB ( r,
g,
b )
Value:
(((r) << 8) | ((g) << 4) | (b))

Create an RGB color.

Parameters
rThe red component (0-15).
gThe red component (0-15).
bThe red component (0-15).

Definition at line 173 of file display.h.

◆ WS_SCREEN_ATTR_BANK

#define WS_SCREEN_ATTR_BANK ( x)
Value:
((x) << 13)

Attribute: tile bank (0-1).

Definition at line 102 of file display.h.

◆ WS_SCREEN_ATTR_BANK_MASK

#define WS_SCREEN_ATTR_BANK_MASK   (0x2000)

Definition at line 103 of file display.h.

◆ WS_SCREEN_ATTR_FLIP

#define WS_SCREEN_ATTR_FLIP   0xC000

Attribute: flip tile graphic in both axes (180-degree rotation).

Definition at line 121 of file display.h.

◆ WS_SCREEN_ATTR_FLIP_H

#define WS_SCREEN_ATTR_FLIP_H   0x4000

Attribute: flip tile graphic horizontally.

Definition at line 113 of file display.h.

◆ WS_SCREEN_ATTR_FLIP_MASK

#define WS_SCREEN_ATTR_FLIP_MASK   0xC000

Definition at line 122 of file display.h.

◆ WS_SCREEN_ATTR_FLIP_V

#define WS_SCREEN_ATTR_FLIP_V   0x8000

Attribute: flip tile graphic vertically.

Definition at line 117 of file display.h.

◆ WS_SCREEN_ATTR_PALETTE

#define WS_SCREEN_ATTR_PALETTE ( x)
Value:
((x) << 9)

Attribute: palette (0-15).

Definition at line 97 of file display.h.

◆ WS_SCREEN_ATTR_PALETTE_MASK

#define WS_SCREEN_ATTR_PALETTE_MASK   (0xF << 9)

Definition at line 98 of file display.h.

◆ WS_SCREEN_ATTR_TILE

#define WS_SCREEN_ATTR_TILE ( x)
Value:
(x)

Attribute: tile index (0-511).

Definition at line 92 of file display.h.

◆ WS_SCREEN_ATTR_TILE_EX

#define WS_SCREEN_ATTR_TILE_EX ( x)
Value:
(((x) & 0x1FF) | (((x) >> 13) << 13))

Attribute: tile index (0-1023). Calculates both bank and index.

Definition at line 107 of file display.h.

◆ WS_SCREEN_ATTR_TILE_EX_MASK

#define WS_SCREEN_ATTR_TILE_EX_MASK   (0x21FF)

Definition at line 108 of file display.h.

◆ WS_SCREEN_ATTR_TILE_MASK

#define WS_SCREEN_ATTR_TILE_MASK   (0x1FF)

Definition at line 93 of file display.h.

◆ WS_SCREEN_COLOR_MEM

#define WS_SCREEN_COLOR_MEM   WS_DISPLAY_COLOR_MEM

Pointer to screen color palette.

Parameters
iColor palette (0-15).

Definition at line 224 of file display.h.

◆ WS_SCREEN_HEIGHT_PIXELS

#define WS_SCREEN_HEIGHT_PIXELS   (WS_SCREEN_HEIGHT_TILES * WS_DISPLAY_TILE_HEIGHT)

Definition at line 127 of file display.h.

◆ WS_SCREEN_HEIGHT_TILES

#define WS_SCREEN_HEIGHT_TILES   32

Definition at line 125 of file display.h.

◆ WS_SCREEN_WIDTH_PIXELS

#define WS_SCREEN_WIDTH_PIXELS   (WS_SCREEN_WIDTH_TILES * WS_DISPLAY_TILE_WIDTH)

Definition at line 126 of file display.h.

◆ WS_SCREEN_WIDTH_TILES

#define WS_SCREEN_WIDTH_TILES   32

Definition at line 124 of file display.h.

◆ WS_SPRITE_ATTR_FLIP

#define WS_SPRITE_ATTR_FLIP   0xC000

Attribute: flip tile graphic in both axes (180-degree rotation).

Definition at line 161 of file display.h.

◆ WS_SPRITE_ATTR_FLIP_H

#define WS_SPRITE_ATTR_FLIP_H   0x4000

Attribute: flip tile graphic horizontally.

Definition at line 153 of file display.h.

◆ WS_SPRITE_ATTR_FLIP_MASK

#define WS_SPRITE_ATTR_FLIP_MASK   0xC000

Definition at line 162 of file display.h.

◆ WS_SPRITE_ATTR_FLIP_V

#define WS_SPRITE_ATTR_FLIP_V   0x8000

Attribute: flip tile graphic vertically.

Definition at line 157 of file display.h.

◆ WS_SPRITE_ATTR_OUTSIDE

#define WS_SPRITE_ATTR_OUTSIDE   0x1000

Attribute: draw sprite outside instead of inside window, if window enabled.

Definition at line 145 of file display.h.

◆ WS_SPRITE_ATTR_PALETTE

#define WS_SPRITE_ATTR_PALETTE ( x)
Value:
((x) << 9)

Attribute: palette (0-7; corresponds to screen palettes 8-15).

Definition at line 140 of file display.h.

◆ WS_SPRITE_ATTR_PALETTE_MASK

#define WS_SPRITE_ATTR_PALETTE_MASK   (0x7 << 9)

Definition at line 141 of file display.h.

◆ WS_SPRITE_ATTR_PRIORITY

#define WS_SPRITE_ATTR_PRIORITY   0x2000

Attribute: draw sprite in front of instead of behind Screen 2.

Definition at line 149 of file display.h.

◆ WS_SPRITE_COLOR_MEM

#define WS_SPRITE_COLOR_MEM ( i)
Value:
((uint16_t ws_iram *) (0xFF00 + ((i) << 5)))

Pointer to sprite color palette.

Parameters
iColor palette (0-7).

Definition at line 231 of file display.h.

◆ ws_sprite_load_palette_color_2bpp

#define ws_sprite_load_palette_color_2bpp ( data,
first,
count )
Value:
ws_display_load_palette_color_2bpp((data), (first) + 8, (count))
void ws_display_load_palette_color_2bpp(const void __far *data, int first, int count)
Load 2BPP color palette data (4 words per palette).

Definition at line 272 of file display.h.

◆ ws_sprite_load_palette_color_4bpp

#define ws_sprite_load_palette_color_4bpp ( data,
first,
count )
Value:
ws_display_load_palette_color_4bpp((data), (first) + 8, (count))
static void ws_display_load_palette_color_4bpp(const void __far *data, int first, int count)
Load 4BPP color palette data (16 words per palette).
Definition display.h:267

Definition at line 273 of file display.h.

◆ ws_sprite_load_palette_mono

#define ws_sprite_load_palette_mono ( data,
first,
count )
Value:
ws_display_load_palette_mono((data), (first) + 8, (count))
static void ws_display_load_palette_mono(const void __far *data, int first, int count)
Load monochrome palette data (2 bytes per palette).
Definition display.h:247

Definition at line 271 of file display.h.

◆ WS_SPRITE_MAX_COUNT

#define WS_SPRITE_MAX_COUNT   128

Definition at line 164 of file display.h.

◆ WS_TILE_4BPP_BANKED_MEM

#define WS_TILE_4BPP_BANKED_MEM ( b,
i )
Value:
((ws_display_tile_4bpp_t ws_iram *) (0x4000 + (!!(b) << 14) + ((i) << 5)))
A structure representing a 4 bit per pixel tile.
Definition display.h:81

Pointer to 4bpp, tile, with bank specified separately.

Parameters
bTile bank (0-1).
iTile index (0-511).

Definition at line 210 of file display.h.

◆ WS_TILE_4BPP_MEM

#define WS_TILE_4BPP_MEM ( i)
Value:
((ws_display_tile_4bpp_t ws_iram *) (0x4000 + ((i) << 5)))

Pointer to 4bpp tile.

Parameters
iTile index (0-1023).

Definition at line 194 of file display.h.

◆ WS_TILE_BANKED_MEM

#define WS_TILE_BANKED_MEM ( b,
i )
Value:
((ws_display_tile_t ws_iram *) (0x2000 + (!!(b) << 13) + ((i) << 4)))
A structure representing a 2 bit per pixel tile.
Definition display.h:71

Pointer to tile, with bank specified separately.

Parameters
bTile bank (0-1).
iTile index (0-511).

Definition at line 202 of file display.h.

◆ WS_TILE_MEM

#define WS_TILE_MEM ( i)
Value:
((ws_display_tile_t ws_iram *) (0x2000 + ((i) << 4)))

Pointer to tile.

Parameters
iTile index (0-1023).

Definition at line 187 of file display.h.

Function Documentation

◆ ws_display_get_control()

uint8_t ws_display_get_control ( void )
inlinestatic

Query which layers and windows are visible on the display.

Definition at line 293 of file display.h.

◆ ws_display_get_current_line()

uint8_t ws_display_get_current_line ( void )
inlinestatic

Get the line currently being drawn to the line buffer.

This is one higher than the line currently being sent to the LCD display.

Returns
uint8_t Currently drawn line.

Definition at line 435 of file display.h.

◆ ws_display_hide_icons()

void ws_display_hide_icons ( uint8_t mask)
inlinestatic

Hide specified LCD icons.

Parameters
maskOne or more of the LCD icon segments.
See also
WS_LCD_ICON_SLEEP
WS_LCD_ICON_ORIENT_V
WS_LCD_ICON_ORIENT_H
WS_LCD_ICON_AUX1
WS_LCD_ICON_AUX2
WS_LCD_ICON_AUX3

Definition at line 506 of file display.h.

◆ ws_display_load_palette_color_2bpp()

void ws_display_load_palette_color_2bpp ( const void __far * data,
int first,
int count )

Load 2BPP color palette data (4 words per palette).

Parameters
dataPointer to palette data.
firstStarting palette index.
countNumber of palettes to load.

◆ ws_display_load_palette_color_4bpp()

void ws_display_load_palette_color_4bpp ( const void __far * data,
int first,
int count )
inlinestatic

Load 4BPP color palette data (16 words per palette).

Parameters
dataPointer to palette data.
firstStarting palette index.
countNumber of palettes to load.

Definition at line 267 of file display.h.

◆ ws_display_load_palette_mono()

void ws_display_load_palette_mono ( const void __far * data,
int first,
int count )
inlinestatic

Load monochrome palette data (2 bytes per palette).

Parameters
dataPointer to palette data.
firstStarting palette index.
countNumber of palettes to load.

Definition at line 247 of file display.h.

◆ ws_display_scroll_screen1_by()

void ws_display_scroll_screen1_by ( uint8_t x,
uint8_t y )
inlinestatic

Scroll screen 1 by a specified number of pixels.

Parameters
xLeft corner of area to show, in pixels.
yTop corner of area to show, in pixels.

Definition at line 445 of file display.h.

◆ ws_display_scroll_screen2_by()

void ws_display_scroll_screen2_by ( uint8_t x,
uint8_t y )
inlinestatic

Scroll screen 2 by a specified number of pixels.

Parameters
xLeft corner of area to show, in pixels.
yTop corner of area to show, in pixels.

Definition at line 458 of file display.h.

◆ ws_display_scroll_screen_by()

void ws_display_scroll_screen_by ( uint8_t screen,
int16_t x,
int16_t y )

Scroll the specified screen by a specified number of pixels.

Parameters
screenScreen ID (0 - Screen 1; 1 - Screen 2).
xPixels to scroll by in the X axis.
yPixels to scroll by in the Y axis.

◆ ws_display_scroll_screen_to()

void ws_display_scroll_screen_to ( uint8_t screen,
uint8_t x,
uint8_t y )
inlinestatic

Scroll the specified screen to a specified location.

Parameters
screenScreen ID (0 - Screen 1; 1 - Screen 2).
xLeft corner of area to show, in pixels.
yTop corner of area to show, in pixels.

Definition at line 399 of file display.h.

◆ ws_display_set_control()

void ws_display_set_control ( uint8_t value)
inlinestatic

◆ ws_display_set_icons()

void ws_display_set_icons ( uint8_t mask)
inlinestatic

Set the list of displayed LCD icons, clearing any unspecified icons.

Parameters
maskOne or more of the LCD icon segments.
See also
WS_LCD_ICON_SLEEP
WS_LCD_ICON_ORIENT_V
WS_LCD_ICON_ORIENT_H
WS_LCD_ICON_AUX1
WS_LCD_ICON_AUX2
WS_LCD_ICON_AUX3

Definition at line 476 of file display.h.

◆ ws_display_set_screen2_window()

void ws_display_set_screen2_window ( uint8_t x,
uint8_t y,
uint8_t width,
uint8_t height )
inlinestatic

Set the position and size of the screen 2 window.

Parameters
xX position
yY position
widthWidth
heightHeight

Definition at line 348 of file display.h.

◆ ws_display_set_screen2_window_corners()

void ws_display_set_screen2_window_corners ( uint8_t left,
uint8_t top,
uint8_t right,
uint8_t bottom )
inlinestatic

Set the corners of the screen 2 window.

Parameters
leftLeft corner
topTop corner
rightRight corner
bottomBottom corner

Definition at line 361 of file display.h.

◆ ws_display_set_screen_address()

void ws_display_set_screen_address ( uint8_t screen,
const void __wf_iram * address )
inlinestatic

Set the base addresses of the specified screen.

Parameters
screenScreen ID (0 - Screen 1; 1 - Screen 2).
addressPointer to screen data.

Definition at line 313 of file display.h.

◆ ws_display_set_screen_addresses()

void ws_display_set_screen_addresses ( const void __wf_iram * scr1_addr,
const void __wf_iram * scr2_addr )
inlinestatic

Set the base addresses of screens 1 and 2.

Parameters
scr1_addrPointer to screen 1 data.
scr2_addrPointer to screen 2 data.

Definition at line 303 of file display.h.

◆ ws_display_set_shade_lut()

void ws_display_set_shade_lut ( uint32_t lut)

Configure the shade LUT.

To learn more about the shade LUT, see video_pipeline.

Parameters
lutThe shade LUT configuration. Usage of the WS_DISPLAY_SHADE_LUT macro is recommended. A default configuration is provided via WS_DISPLAY_SHADE_LUT_DEFAULT .

◆ ws_display_set_sprite_address()

void ws_display_set_sprite_address ( const void __wf_iram * address)
inlinestatic

Set the base addresses of the sprite table.

Parameters
addressPointer to sprite table data.

Definition at line 336 of file display.h.

◆ ws_display_set_sprite_window()

void ws_display_set_sprite_window ( uint8_t x,
uint8_t y,
uint8_t width,
uint8_t height )
inlinestatic

Set the position and size of the sprite window.

Parameters
xX position
yY position
widthWidth
heightHeight

Definition at line 374 of file display.h.

◆ ws_display_set_sprite_window_corners()

void ws_display_set_sprite_window_corners ( uint8_t left,
uint8_t top,
uint8_t right,
uint8_t bottom )
inlinestatic

Set the corners of the sprite window.

Parameters
leftLeft corner
topTop corner
rightRight corner
bottomBottom corner

Definition at line 387 of file display.h.

◆ ws_display_show_icons()

void ws_display_show_icons ( uint8_t mask)
inlinestatic

Show specified LCD icons.

Parameters
maskOne or more of the LCD icon segments.
See also
WS_LCD_ICON_SLEEP
WS_LCD_ICON_ORIENT_V
WS_LCD_ICON_ORIENT_H
WS_LCD_ICON_AUX1
WS_LCD_ICON_AUX2
WS_LCD_ICON_AUX3

Definition at line 491 of file display.h.

◆ ws_display_toggle_icons()

void ws_display_toggle_icons ( uint8_t mask)
inlinestatic

Toggle specified LCD icons.

Parameters
maskOne or more of the LCD icon segments.
See also
WS_LCD_ICON_SLEEP
WS_LCD_ICON_ORIENT_V
WS_LCD_ICON_ORIENT_H
WS_LCD_ICON_AUX1
WS_LCD_ICON_AUX2
WS_LCD_ICON_AUX3

Definition at line 521 of file display.h.

◆ ws_lcd_control_disable()

void ws_lcd_control_disable ( void )
inlinestatic

Disable the LCD panel.

Definition at line 552 of file display.h.

◆ ws_lcd_control_enable()

void ws_lcd_control_enable ( void )
inlinestatic

Enable the LCD panel.

Done by the boot ROM on WS/WSC consoles; has to be done manually on PCv2 consoles and pinstrapped configurations.

Definition at line 545 of file display.h.

◆ ws_screen_fill_tiles()

void ws_screen_fill_tiles ( void ws_iram * dest,
uint16_t src,
uint16_t x,
uint16_t y,
uint16_t width,
uint16_t height )

Fill an area on the screen with a given tile.

Parameters
destPointer to the destination screen.
srcThe tile to fill the area with.
xDestination X position, in tiles.
yDestination Y position, in tiles.
widthWidth, in tiles.
heightHeight, in tiles.

◆ ws_screen_get_tile()

uint16_t ws_screen_get_tile ( void ws_iram * src,
uint16_t x,
uint16_t y )
inlinestatic

Get a tile on the screen.

Parameters
srcPointer to the source screen.
xDestination X position, in tiles.
yDestination Y position, in tiles.

Definition at line 646 of file display.h.

◆ ws_screen_get_tiles()

void ws_screen_get_tiles ( void __far * dest,
const void ws_iram * src,
uint16_t x,
uint16_t y,
uint16_t width,
uint16_t height )

Copy a map of tiles from the screen.

Parameters
destPointer to the destination area.
srcPointer to the source screen.
xSource X position, in tiles.
ySource Y position, in tiles.
widthWidth, in tiles.
heightHeight, in tiles.

◆ ws_screen_modify_tiles()

void ws_screen_modify_tiles ( void ws_iram * dest,
uint16_t mask,
uint16_t value,
uint16_t x,
uint16_t y,
uint16_t width,
uint16_t height )

Modify an area on the screen with given data.

Parameters
destPointer to the destination screen.
maskThe mask to AND the area with.
valueThe value to OR the area with.
xDestination X position, in tiles.
yDestination Y position, in tiles.
widthWidth, in tiles.
heightHeight, in tiles.

◆ ws_screen_put_tile()

void ws_screen_put_tile ( void ws_iram * dest,
uint16_t src,
uint16_t x,
uint16_t y )
inlinestatic

Put a tile on the screen.

Parameters
destPointer to the destination screen.
srcThe tile to put.
xDestination X position, in tiles.
yDestination Y position, in tiles.

Definition at line 635 of file display.h.

◆ ws_screen_put_tiles()

void ws_screen_put_tiles ( void ws_iram * dest,
const void __far * src,
uint16_t x,
uint16_t y,
uint16_t width,
uint16_t height )
inlinestatic

Place a map of tiles on the screen.

Parameters
destPointer to the destination screen.
srcPointer to the source map.
xDestination X position, in tiles.
yDestination Y position, in tiles.
widthDestination width, in tiles (1-32).
heightDestination height, in tiles (1-32).

Definition at line 566 of file display.h.

◆ ws_screen_put_tiles_ex()

void ws_screen_put_tiles_ex ( void ws_iram * dest,
const void __far * src,
uint16_t sx,
uint16_t sy,
uint16_t pitch,
uint16_t dx,
uint16_t dy,
uint16_t width,
uint16_t height )
inlinestatic

Place a map of tiles on the screen. This varianta llows specifying the source X position, Y position and width.

Parameters
destPointer to the destination screen.
srcPointer to the source map.
sxSource X position, in tiles.
sySource Y position, in tiles.
pitchSource width, in tiles.
dxDestination X position, in tiles.
dyDestination Y position, in tiles.
widthDestination width, in tiles (1-32).
heightDestination height, in tiles (1-32).

Definition at line 585 of file display.h.