3#ifndef __LIBWW_SYS_DISP_H__
4#define __LIBWW_SYS_DISP_H__
16#define DCM_SPR_WIN 0x08
18#define DCM_SCR2_WIN_INSIDE 0x20
20#define DCM_SCR2_WIN_OUTSIDE 0x30
22#define DCM_BORDER_COLOR 0x0700
30#define CFM_FONT 0x01FF
32#define CFSFT_PALETTE 9
34#define CFM_SCR_PALETTE 0x1E00
36#define CFM_SPR_PALETTE 0x0E00
38#define CFM_SPRWIN_CLIP 0x1000
40#define CFM_SPR_UPPER 0x2000
42#define CFM_FLIP_H 0x4000
44#define CFM_FLIP_V 0x8000
48#define LCDSEG_SLEEP 0x01
50#define LCDSEG_VERTICAL 0x02
52#define LCDSEG_HORIZONTAL 0x04
54#define LCDSEG_AUX1 0x08
56#define LCDSEG_AUX2 0x10
58#define LCDSEG_AUX3 0x20
64#define LCD_SLEEP_OFF 1
66#define lcd_on() lcd_set_sleep(LCD_SLEEP_OFF)
67#define lcd_off() lcd_set_sleep(LCD_SLEEP_ON)
70#define LCD_PIXEL_WIDTH 224
71#define LCD_PIXEL_HEIGHT 144
72#define SCREEN_PIXEL_WIDTH 256
73#define SCREEN_PIXEL_HEIGHT 256
74#define SCREEN_CHAR_WIDTH 32
75#define SCREEN_CHAR_HEIGHT 32
82 :
"b" (value),
"Rah" ((uint8_t) 0x00)
92 :
"Rah" ((uint8_t) 0x01)
109 :
"b" (value),
"Rah" ((uint8_t) 0x05)
119 :
"Rah" ((uint8_t) 0x06)
125void screen_set_char(uint8_t screen_id, uint8_t x, uint8_t y, uint8_t width, uint8_t height,
const void __far* tiles);
127void screen_get_char(uint8_t screen_id, uint8_t x, uint8_t y, uint8_t width, uint8_t height,
void __far* tiles);
134 :
"a" ((uint16_t) (((0x08) << 8) | (screen_id & 0xFF))),
"b" (((y << 8) | x)),
"c" ((uint16_t) 0)
140static inline void screen_fill_char(uint8_t screen_id, uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint16_t tile) {
145 :
"a" ((uint16_t) (((0x09) << 8) | (screen_id & 0xFF))),
"d" (tile),
"b" (((y << 8) | x)),
"c" (((height << 8) | width))
150static inline void screen_fill_attr(uint8_t screen_id, uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint16_t tile, uint16_t mask) {
155 :
"a" ((uint16_t) (((0x0A) << 8) | (screen_id & 0xFF))),
"d" (tile),
"S" (mask),
"b" (((y << 8) | x)),
"c" (((height << 8) | width))
165 :
"b" (first),
"c" (count),
"Rah" ((uint8_t) 0x0B)
175 :
"b" (id),
"c" (tile),
"Rah" ((uint8_t) 0x0C)
185 :
"b" (id),
"Rah" ((uint8_t) 0x0D)
196 :
"b" (id),
"d" (((y << 8) | x)),
"Rah" ((uint8_t) 0x0E)
206 :
"b" (id),
"Rah" ((uint8_t) 0x0F)
217 :
"b" (id),
"c" (tile),
"d" (((y << 8) | x)),
"Rah" ((uint8_t) 0x10)
227 :
"b" (id),
"Rah" ((uint8_t) 0x11)
240 :
"a" ((uint16_t) (((0x13) << 8) | (
id & 0xFF))),
"b" (((y << 8) | x))
250 :
"a" ((uint16_t) (((0x14) << 8) | (
id & 0xFF)))
261 :
"b" (((y << 8) | x)),
"c" (((height << 8) | width)),
"Rah" ((uint8_t) 0x15)
271 :
"Rah" ((uint8_t) 0x16)
282 :
"b" (((y << 8) | x)),
"c" (((height << 8) | width)),
"Rah" ((uint8_t) 0x17)
292 :
"Rah" ((uint8_t) 0x18)
303 :
"b" (index),
"c" (colors),
"Rah" ((uint8_t) 0x19)
313 :
"b" (index),
"Rah" ((uint8_t) 0x1A)
324 :
"b" (low),
"c" (high),
"Rah" ((uint8_t) 0x1B)
334 :
"Rah" ((uint8_t) 0x1C)
345 :
"b" (flags),
"Rah" ((uint8_t) 0x1D)
355 :
"Rah" ((uint8_t) 0x1E)
366 :
"b" (flags),
"Rah" ((uint8_t) 0x1F)
376 :
"Rah" ((uint8_t) 0x20)
390 :
"a" ((uint16_t) (((0x21) << 8) | (
id & 0xFF))),
"b" (offset)
403 :
"b" (offset),
"Rah" ((uint8_t) 0x22)
static uint32_t screen2_get_window(void)
static void screen_set_scroll(uint8_t id, uint8_t x, uint8_t y)
void font_get_data(uint16_t start, uint16_t count, void __far *data)
void screen_get_char(uint8_t screen_id, uint8_t x, uint8_t y, uint8_t width, uint8_t height, void __far *tiles)
static uint32_t sprite_get_window(void)
static void sprite_set_char(uint16_t id, uint16_t tile)
void sprite_set_data(uint16_t first, uint16_t count, const void __far *data)
void font_set_colordata(uint16_t start, uint16_t count, const void __far *data)
void screen_set_char(uint8_t screen_id, uint8_t x, uint8_t y, uint8_t width, uint8_t height, const void __far *tiles)
static uint16_t screen_get_char1(uint8_t screen_id, uint8_t x, uint8_t y)
static void sprite_set_range(uint16_t first, uint16_t count)
static uint16_t lcd_get_sleep(void)
static uint16_t font_get_color(void)
static void screen2_set_window(uint8_t x, uint8_t y, uint8_t width, uint8_t height)
static uint16_t lcd_get_segments(void)
static void font_set_color(uint16_t value)
static uint16_t sprite_get_location(uint16_t id)
static uint16_t palette_get_color(uint16_t index)
static void sprite_set_location(uint16_t id, uint8_t x, uint8_t y)
static uint32_t lcd_get_color(void)
static void sprite_set_char_location(uint16_t id, uint16_t tile, uint8_t x, uint8_t y)
static void palette_set_color(uint16_t index, uint16_t colors)
static void screen_fill_attr(uint8_t screen_id, uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint16_t tile, uint16_t mask)
static void screen_set_vram(uint8_t id, uint8_t offset)
static void screen_fill_char(uint8_t screen_id, uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint16_t tile)
static uint16_t screen_get_scroll(uint8_t id)
static void display_control(uint16_t value)
static void lcd_set_color(uint16_t low, uint16_t high)
static void lcd_set_sleep(uint16_t flags)
static uint16_t sprite_get_char(uint16_t id)
static uint16_t display_status(void)
static void sprite_set_vram(uint8_t offset)
static void lcd_set_segments(uint16_t flags)
static void sprite_set_window(uint8_t x, uint8_t y, uint8_t width, uint8_t height)
static uint32_t sprite_get_char_location(uint16_t id)
void font_set_monodata(uint16_t start, uint16_t count, const void __far *data)