PS2SDK
PS2 Homebrew Libraries
|
#include <graph_vram.h>
Go to the source code of this file.
Data Structures | |
struct | GRAPH_MODE |
Functions | |
int | graph_initialize (int fbp, int width, int height, int psm, int x, int y) |
int | graph_get_region (void) |
float | graph_aspect_ratio (void) |
void | graph_enable_output (void) |
void | graph_disable_output (void) |
int | graph_set_mode (int interlace, int mode, int ffmd, int flicker_filter) |
int | graph_set_screen (int x, int y, int width, int height) |
void | graph_set_framebuffer_filtered (int fbp, int width, int psm, int x, int y) |
void | graph_set_framebuffer (int context, int fbp, int width, int psm, int x, int y) |
void | graph_set_bgcolor (unsigned char r, unsigned char g, unsigned char b) |
void | graph_set_output (int rc1, int rc2, int alpha_select, int alpha_output, int blend_method, unsigned char alpha) |
int | graph_add_vsync_handler (int(*vsync_callback)()) |
void | graph_remove_vsync_handler (int callback_id) |
void | graph_wait_hsync (void) |
void | graph_wait_vsync (void) |
int | graph_check_vsync (void) |
void | graph_start_vsync (void) |
int | graph_shutdown (void) |
Variables | |
GRAPH_MODE | graph_mode [] |
Graph library
Definition in file graph.h.
struct GRAPH_MODE |
#define GRAPH_MODE_AUTO 0 |
int graph_initialize | ( | int | fbp, |
int | width, | ||
int | height, | ||
int | psm, | ||
int | x, | ||
int | y | ||
) |
Initializes a default NTSC/PAL mode with default settings.
Definition at line 6 of file graph.c.
References graph_enable_output(), graph_get_region(), graph_initialize(), graph_set_bgcolor(), graph_set_framebuffer_filtered(), graph_set_mode(), and graph_set_screen().
Referenced by graph_initialize().
int graph_get_region | ( | void | ) |
Retrieves the PS2's region for automatic mode selection.
Definition at line 114 of file graph_mode.c.
References GetRomName(), graph_get_region(), GRAPH_MODE_NTSC, and GRAPH_MODE_PAL.
Referenced by graph_get_region(), and graph_initialize().
float graph_aspect_ratio | ( | void | ) |
Returns an aspect ratio calculated from system setting, width, and height
Definition at line 400 of file graph_mode.c.
References configGetTvScreenType(), and graph_aspect_ratio().
Referenced by graph_aspect_ratio().
void graph_enable_output | ( | void | ) |
Sets a default output method.
Definition at line 315 of file graph_mode.c.
References GRAPH_BLEND_RC2, graph_enable_output(), GRAPH_RC1_ALPHA, and graph_set_output().
Referenced by graph_enable_output(), and graph_initialize().
void graph_disable_output | ( | void | ) |
Turns off the read circuits.
Definition at line 333 of file graph_mode.c.
References graph_disable_output(), and graph_set_output().
Referenced by graph_disable_output(), and graph_shutdown().
int graph_set_mode | ( | int | interlace, |
int | mode, | ||
int | ffmd, | ||
int | flicker_filter | ||
) |
Sets the graphics mode.
Definition at line 130 of file graph_mode.c.
References GetRomName(), GRAPH_DISABLE, GRAPH_MODE_HDTV_1080I, GRAPH_MODE_HDTV_576P, GRAPH_MODE_PAL, graph_set_mode(), and GS_REG_CSR.
Referenced by graph_initialize(), graph_set_config(), and graph_set_mode().
int graph_set_screen | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) |
Sets the screen dimensions for the read circuits.
Definition at line 186 of file graph_mode.c.
References GRAPH_MODE_AUTO, graph_set_screen(), GS_REG_DISPLAY1, and GS_REG_DISPLAY2.
Referenced by graph_initialize(), and graph_set_screen().
void graph_set_framebuffer_filtered | ( | int | fbp, |
int | width, | ||
int | psm, | ||
int | x, | ||
int | y | ||
) |
Sets the framebuffer attributes for the read circuits with filter.
Definition at line 268 of file graph_mode.c.
References graph_set_framebuffer_filtered(), GS_REG_DISPFB1, and GS_REG_DISPFB2.
Referenced by graph_initialize(), and graph_set_framebuffer_filtered().
void graph_set_framebuffer | ( | int | context, |
int | fbp, | ||
int | width, | ||
int | psm, | ||
int | x, | ||
int | y | ||
) |
Sets the framebuffer attributes for the read circuits.
Definition at line 278 of file graph_mode.c.
References graph_set_framebuffer(), GS_REG_DISPFB1, and GS_REG_DISPFB2.
Referenced by graph_set_framebuffer().
void graph_set_bgcolor | ( | unsigned char | r, |
unsigned char | g, | ||
unsigned char | b | ||
) |
Sets the background color for merge circuit.
Definition at line 297 of file graph_mode.c.
References graph_set_bgcolor(), and GS_REG_BGCOLOR.
Referenced by graph_initialize(), and graph_set_bgcolor().
void graph_set_output | ( | int | rc1, |
int | rc2, | ||
int | alpha_select, | ||
int | alpha_output, | ||
int | blend_method, | ||
unsigned char | alpha | ||
) |
Sets the read circuits and merge cicuit.
Definition at line 304 of file graph_mode.c.
References graph_set_output(), and GS_REG_PMODE.
Referenced by graph_disable_output(), graph_enable_output(), and graph_set_output().
int graph_add_vsync_handler | ( | int(*)() | vsync_callback | ) |
Add a vsync interrupt handler
Definition at line 29 of file graph.c.
References graph_add_vsync_handler().
Referenced by graph_add_vsync_handler().
void graph_remove_vsync_handler | ( | int | callback_id | ) |
Remove a vsync interrupt handler
Definition at line 46 of file graph.c.
References graph_remove_vsync_handler().
Referenced by graph_remove_vsync_handler().
void graph_wait_hsync | ( | void | ) |
Starts a horizontal sync event and waits
Definition at line 74 of file graph.c.
References graph_wait_hsync(), and GS_REG_CSR.
Referenced by graph_wait_hsync().
void graph_wait_vsync | ( | void | ) |
Starts a vertical sync event and waits.
Definition at line 99 of file graph.c.
References graph_wait_vsync(), and GS_REG_CSR.
Referenced by graph_wait_vsync().
int graph_check_vsync | ( | void | ) |
Checks if a vertical sync event is currently generated.
Definition at line 85 of file graph.c.
References graph_check_vsync(), and GS_REG_CSR.
Referenced by graph_check_vsync().
void graph_start_vsync | ( | void | ) |
Starts a vertical sync event and returns immediately.
Definition at line 92 of file graph.c.
References graph_start_vsync(), and GS_REG_CSR.
Referenced by graph_start_vsync().
int graph_shutdown | ( | void | ) |
Shut down the graphics library and hardware.
Definition at line 431 of file graph_mode.c.
References graph_disable_output(), graph_shutdown(), and GS_REG_CSR.
Referenced by graph_shutdown().
|
extern |
Definition at line 12 of file graph_mode.c.