22 #include <sys/cdefs.h>
39 #define CT_COMPOSITE 3
69 #define DM_MULTIBUFFER 0x2000
106 #define VID_MAX_FB 4 // <-- This should be enough
115 #define VID_INTERLACE 0x00000001
116 #define VID_LINEDOUBLE 0x00000002
117 #define VID_PIXELDOUBLE 0x00000004
118 #define VID_PAL 0x00000008
273 void vid_init(
int disp_mode,
int pixel_mode);
294 #endif // __DC_VIDEO_H
640x480 resolution
Definition: video.h:57
Last valid generic mode.
Definition: video.h:62
#define VID_MAX_FB
The maximum number of framebuffers available.
Definition: video.h:106
void vid_empty()
Clear VRAM.
void vid_flip(int fb)
Set the current framebuffer in a multibuffered setup.
uint16 borderx1
Border X starting position.
Definition: video.h:145
uint16 bordery2
Border Y stop position.
Definition: video.h:148
uint32 * vram_l
32-bit size pointer to the current drawing area.
320x240 resolution
Definition: video.h:56
uint32 flags
Combination of one or more VID_* flags.
Definition: video.h:132
int vid_screen_shot(const char *destfn)
Take a screenshot.
void vid_waitvbl()
Wait for VBlank.
768x480 NTSC Interlaced 60Hz
Definition: video.h:85
vid_mode_t vid_builtin[DM_MODE_COUNT]
The list of builtin video modes. Do not modify these!
256x256 PAL Interlaced 50Hz
Definition: video.h:84
Invalid display mode.
Definition: video.h:76
void vid_set_mode(int dm, int pm)
Set the video mode.
768x576 PAL Interlaced 50Hz
Definition: video.h:86
uint16 width
Width of the display, in pixels.
Definition: video.h:130
void vid_set_mode_ex(vid_mode_t *mode)
Set the video mode.
800x608 VGA 60Hz, 4FBs
Definition: video.h:93
uint32 vid_border_color(int r, int g, int b)
Set the border color of the display.
uint16 bitmapx
Bitmap window X position.
Definition: video.h:139
800x608 resolution
Definition: video.h:58
uint16 scanint2
Second scanline interrupt position (automatically doubled for VGA)
Definition: video.h:143
uint16 height
Height of the display, in pixels.
Definition: video.h:131
320x240 PAL 50Hz
Definition: video.h:88
uint16 clocks
Clocks per scanline.
Definition: video.h:138
uint16 bitmapy
Bitmap window Y position (automatically increased for PAL)
Definition: video.h:140
768x480 PAL Interlaced 50Hz
Definition: video.h:87
640x480 NTSC Interlaced 60Hz
Definition: video.h:81
768x480 NTSC IL 60Hz, 4FBs
Definition: video.h:96
uint16 bordery1
Border Y starting position.
Definition: video.h:147
Number of modes.
Definition: video.h:102
uint16 fb_curr
Current framebuffer.
Definition: video.h:150
short int16
16-bit signed integer
Definition: types.h:33
768x480 resolution
Definition: video.h:60
unsigned short uint16
16-bit unsigned integer
Definition: types.h:29
void vid_init(int disp_mode, int pixel_mode)
Initialize the video system.
uint16 pm
Pixel mode.
Definition: video.h:135
uint16 fb_count
Number of framebuffers.
Definition: video.h:151
320x240 PAL 50Hz, 4FBs
Definition: video.h:99
640x480 VGA 60Hz
Definition: video.h:80
uint16 borderx2
Border X stop position.
Definition: video.h:146
640x480 PAL Interlaced 50Hz
Definition: video.h:83
320x240 NTSC 60Hz
Definition: video.h:79
void vid_clear(int r, int g, int b)
Clear the display.
unsigned long uint32
32-bit unsigned integer
Definition: types.h:28
640x480 NTSC IL 60Hz, 4FBs
Definition: video.h:92
320x240 VGA 60Hz, 4FBs
Definition: video.h:89
First valid generic mode.
Definition: video.h:55
320x240 VGA 60Hz
Definition: video.h:78
768x576 PAL IL 50Hz, 4FBs
Definition: video.h:97
struct vid_mode vid_mode_t
Video mode structure.
void vid_shutdown()
Shut down the video system.
vid_mode_t * vid_mode
The current video mode. Do not modify directly!
uint16 scanint1
First scanline interrupt position.
Definition: video.h:142
768x480 PAL IL 50Hz, 4FBs
Definition: video.h:98
uint16 * vram_s
16-bit size pointer to the current drawing area.
int vid_check_cable()
Retrieve the connected video cable type.
256x256 resolution
Definition: video.h:59
uint32 fb_base[VID_MAX_FB]
Offset to framebuffers.
Definition: video.h:152
640x480 PAL IL 50Hz, 4FBs
Definition: video.h:94
640x480 VGA 60Hz, 4FBs
Definition: video.h:91
int16 cable_type
Allowed cable type.
Definition: video.h:134
void vid_set_start(uint32 base)
Set the VRAM base of the framebuffer.
Sentinel value, for counting.
Definition: video.h:101
256x256 PAL IL 50Hz, 4FBs
Definition: video.h:95
Video mode structure.
Definition: video.h:128
320x240 NTSC 60Hz, 4FBs
Definition: video.h:90
uint16 scanlines
Number of scanlines.
Definition: video.h:137
768x576 resolution
Definition: video.h:61
800x608 VGA 60Hz
Definition: video.h:82