72typedef enum vid_pixel_mode {
93typedef enum vid_display_mode_generic {
108#define DM_MULTIBUFFER 0x2000
116typedef enum vid_display_mode {
143#define VID_INTERLACE 0x00000001
144#define VID_LINEDOUBLE 0x00000002
145#define VID_PIXELDOUBLE 0x00000004
146#define VID_PAL 0x00000008
int8_t vid_check_cable(void)
Retrieve the connected video cable type.
uint32_t vid_border_color(uint8_t r, uint8_t g, uint8_t b)
Set the border color of the display.
bool vid_get_enabled(void)
Get the state of video output.
void vid_set_enabled(bool val)
Enable/disable the display.
void vid_set_vram(uint32_t base)
Set the VRAM convenience pointers.
uint16_t * vram_s
16-bit size pointer to the current drawing area.
int vid_screen_shot(const char *destfn)
Take a screenshot.
void vid_set_fb(int32_t fb)
Set the current framebuffer in a multibuffered setup.
uint32_t * vram_l
32-bit size pointer to the current drawing area.
void vid_clear(uint8_t r, uint8_t g, uint8_t b)
Clear the framebuffer.
size_t vid_screen_shot_data(uint8_t **buffer)
Create image data from the current framebuffer.
uint32_t vid_get_start(int32_t fb)
Get the VRAM base of a framebuffer.
void vid_set_start(uint32_t base)
Set the VRAM base of the framebuffer.
void vid_empty(void)
Clear VRAM.
void vid_flip(int32_t fb)
Flip to a framebuffer in a multibuffered setup.
void vid_init(int disp_mode, vid_pixel_mode_t pixel_mode)
Initialize the video system.
void vid_shutdown(void)
Shut down the video system.
void vid_waitvbl(void)
Wait for VBlank.
vid_display_mode_generic_t
Generic Display Modes.
Definition video.h:93
vid_display_mode_t
Specific Display Modes.
Definition video.h:116
@ DM_GENERIC_LAST
Last valid generic mode.
Definition video.h:100
@ DM_GENERIC_FIRST
First valid generic mode.
Definition video.h:94
@ DM_640x480
640x480 resolution
Definition video.h:96
@ DM_768x576
768x576 resolution
Definition video.h:99
@ DM_320x240
320x240 resolution
Definition video.h:95
@ DM_768x480
768x480 resolution
Definition video.h:98
@ DM_256x256
256x256 resolution
Definition video.h:97
@ DM_640x480_NTSC_IL
640x480 NTSC Interlaced 60Hz
Definition video.h:122
@ DM_SENTINEL
Sentinel value, for counting.
Definition video.h:130
@ DM_640x480_VGA
640x480 VGA 60Hz
Definition video.h:121
@ DM_320x240_NTSC
320x240 NTSC 60Hz
Definition video.h:120
@ DM_256x256_PAL_IL
256x256 PAL Interlaced 50Hz
Definition video.h:124
@ DM_768x576_PAL_IL
768x576 PAL Interlaced 50Hz
Definition video.h:126
@ DM_320x240_PAL
320x240 PAL 50Hz
Definition video.h:128
@ DM_768x480_PAL_IL
768x480 PAL Interlaced 50Hz
Definition video.h:127
@ DM_640x480_PAL_IL
640x480 PAL Interlaced 50Hz
Definition video.h:123
@ DM_INVALID
Invalid display mode.
Definition video.h:117
@ DM_MODE_COUNT
Number of modes.
Definition video.h:131
@ DM_768x480_NTSC_IL
768x480 NTSC Interlaced 60Hz
Definition video.h:125
@ DM_320x240_VGA
320x240 VGA 60Hz
Definition video.h:119
static const uint8_t vid_pmode_bpp[4]
Video pixel mode depths.
Definition video.h:83
vid_mode_t * vid_mode
The current video mode.
void vid_set_mode(int dm, vid_pixel_mode_t pm)
Set the video mode.
void vid_set_mode_ex(vid_mode_t *mode)
Set the video mode.
vid_mode_t vid_builtin[DM_MODE_COUNT]
The list of builtin video modes.
Video mode structure.
Definition video.h:157
uint16_t scanint1
First scanline interrupt position.
Definition video.h:171
uint32_t flags
Combination of one or more VID_* flags.
Definition video.h:161
uint16_t height
Height of the display, in pixels.
Definition video.h:160
uint16_t scanlines
Number of scanlines.
Definition video.h:166
vid_pixel_mode_t pm
Pixel mode.
Definition video.h:164
uint16_t bitmapy
Bitmap window Y position (automatically increased for PAL)
Definition video.h:169
uint16_t scanint2
Second scanline interrupt position (automatically doubled for VGA)
Definition video.h:172
uint16_t clocks
Clocks per scanline.
Definition video.h:167
size_t fb_size
Size of each framebuffer.
Definition video.h:181
uint16_t fb_count
Number of framebuffers.
Definition video.h:180
uint16_t bitmapx
Bitmap window X position.
Definition video.h:168
uint16_t borderx2
Border X stop position.
Definition video.h:175
uint16_t fb_curr
Current framebuffer.
Definition video.h:179
int16_t cable_type
Allowed cable type.
Definition video.h:163
uint16_t bordery2
Border Y stop position.
Definition video.h:177
uint16_t width
Width of the display, in pixels.
Definition video.h:159
uint16_t bordery1
Border Y starting position.
Definition video.h:176
uint16_t borderx1
Border X starting position.
Definition video.h:174
vid_pixel_mode_t
Pixel mode values for the framebuffer.
Definition video.h:72
@ PM_RGB888P
RBG888 packed pixel mode (24-bit)
Definition video.h:75
@ PM_RGB565
RGB565 pixel mode (16-bit)
Definition video.h:74
@ PM_RGB555
RGB555 pixel mode (15-bit)
Definition video.h:73
@ PM_RGB0888
RGB0888 pixel mode (32-bit)
Definition video.h:76
@ PM_RGB888
Backwards compatibility support.
Definition video.h:77