KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches

API for features of the LCD Maple Function. More...

Macros

#define VMU_SCREEN_WIDTH   48
 Pixel width of a standard VMU screen.
 
#define VMU_SCREEN_HEIGHT   32
 Pixel height of a standard VMU screen.
 

Functions

int vmu_draw_lcd (maple_device_t *dev, const void *bitmap)
 Display a 1bpp bitmap on a VMU screen.
 
int vmu_draw_lcd_rotated (maple_device_t *dev, const void *bitmap)
 Display a 1bpp bitmap on a VMU screen.
 
int vmu_draw_lcd_xbm (maple_device_t *dev, const char *vmu_icon)
 Display a Xwindows XBM image on a VMU screen.
 
void vmu_set_icon (const char *vmu_icon)
 Display a Xwindows XBM on all VMUs.
 

Detailed Description

API for features of the LCD Maple Function.

The LCD Maple function is for exposing a secondary LCD screen that gets attached to a controller, which can be used to display additional game information, or information you only want visible to a single player.

Macro Definition Documentation

◆ VMU_SCREEN_HEIGHT

#define VMU_SCREEN_HEIGHT   32

Pixel height of a standard VMU screen.

◆ VMU_SCREEN_WIDTH

#define VMU_SCREEN_WIDTH   48

Pixel width of a standard VMU screen.

Function Documentation

◆ vmu_draw_lcd()

int vmu_draw_lcd ( maple_device_t dev,
const void *  bitmap 
)

Display a 1bpp bitmap on a VMU screen.

This function sends a raw bitmap to a VMU to display on its screen. This bitmap is 1bpp, and is 48x32 in size.

Parameters
devThe device to draw to.
bitmapThe bitmap to show.
Return values
MAPLE_EOKOn success.
MAPLE_EAGAINIf the command couldn't be sent. Try again later.
MAPLE_ETIMEOUTIf the command timed out while blocking.
See also
vmu_draw_lcd_rotated, vmu_draw_lcd_xbm, vmu_set_icon

◆ vmu_draw_lcd_rotated()

int vmu_draw_lcd_rotated ( maple_device_t dev,
const void *  bitmap 
)

Display a 1bpp bitmap on a VMU screen.

This function sends a raw bitmap to a VMU to display on its screen. This bitmap is 1bpp, and is 48x32 in size. This function is equivalent to vmu_draw_lcd(), but the image is rotated 180° so that the first byte of the bitmap corresponds to the top-left corner, instead of the bottom-right one.

Warning
This function is optimized by an assembly routine which operates on 32 bits at a time. As such, the given bitmap must be 4-byte aligned.
Parameters
devThe device to draw to.
bitmapThe bitmap to show.
Return values
MAPLE_EOKOn success.
MAPLE_EAGAINIf the command couldn't be sent. Try again later.
MAPLE_ETIMEOUTIf the command timed out while blocking.
See also
vmu_draw_lcd, vmu_draw_lcd_xbm, vmu_set_icon

◆ vmu_draw_lcd_xbm()

int vmu_draw_lcd_xbm ( maple_device_t dev,
const char *  vmu_icon 
)

Display a Xwindows XBM image on a VMU screen.

This function takes in a Xwindows XBM, converts it to a raw bitmap, and sends it to a VMU to display on its screen. This XBM image is 48x32 in size.

Parameters
devThe device to draw to.
vmu_iconThe icon to set.
Return values
MAPLE_EOKOn success.
MAPLE_EAGAINIf the command couldn't be sent. Try again later.
MAPLE_ETIMEOUTIf the command timed out while blocking.
See also
vmu_draw_lcd, vmu_set_icon

◆ vmu_set_icon()

void vmu_set_icon ( const char *  vmu_icon)

Display a Xwindows XBM on all VMUs.

This function takes in a Xwindows XBM and displays the image on all VMUs.

Note
This is a convenience function for vmu_draw_lcd() to broadcast across all VMUs.
Todo:
Prevent this routine from broadcasting to rear VMUs.
Parameters
vmu_iconThe icon to set.
See also
vmu_draw_lcd_xbm