ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
|
#include <stdlib.h>
#include <kernel.h>
#include <osd_config.h>
#include <gs_privileged.h>
#include <graph.h>
#include <graph_config.h>
Go to the source code of this file.
Functions | |
static int | __udelay (unsigned int usecs) |
int | graph_get_region (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) |
void | graph_enable_output (void) |
void | graph_disable_output (void) |
void | graph_set_smode1 (char cmod, char gcont) |
float | graph_aspect_ratio (void) |
int | graph_get_config (char *config) |
int | graph_shutdown (void) |
Variables | |
GRAPH_MODE | graph_mode [22] |
static float | graph_width = 0.0f |
static float | graph_height = 0.0f |
static float | graph_aspect = 1.0f |
static int | graph_filter = 0 |
static int | graph_crtmode = 0 |
static int | graph_interlace = 0 |
static int | graph_ffmd = 0 |
static int | graph_x = 0 |
static int | graph_y = 0 |
static int | graph_magh = 0 |
static int | graph_magv = 0 |
static u64 | graph_pmode = 0 |
u64 | smode1_values [22] |
|
inlinestatic |
float graph_aspect_ratio | ( | void | ) |
Returns an aspect ratio calculated from system setting, width, and height
Definition at line 397 of file graph_mode.c.
References configGetTvScreenType(), graph_aspect, graph_height, graph_width, and TV_SCREEN_169.
Referenced by render().
void graph_disable_output | ( | void | ) |
Turns off the read circuits.
Definition at line 330 of file graph_mode.c.
References graph_set_output().
Referenced by graph_shutdown().
void graph_enable_output | ( | void | ) |
Sets a default output method.
Definition at line 312 of file graph_mode.c.
References GRAPH_BLEND_RC2, GRAPH_ENABLE, graph_filter, GRAPH_RC1_ALPHA, graph_set_output(), and GRAPH_VALUE_ALPHA.
Referenced by graph_initialize().
int graph_get_config | ( | char * | config | ) |
Gets the string made from the current mode.
Definition at line 421 of file graph_mode.c.
References graph_crtmode, graph_ffmd, graph_filter, graph_interlace, graph_make_config(), graph_x, and graph_y.
Referenced by graph_save_config().
int graph_get_region | ( | void | ) |
Retrieves the PS2's region for automatic mode selection.
Definition at line 111 of file graph_mode.c.
References GetRomName(), GRAPH_MODE_NTSC, and GRAPH_MODE_PAL.
Referenced by graph_initialize().
void graph_set_bgcolor | ( | unsigned char | r, |
unsigned char | g, | ||
unsigned char | b | ||
) |
Sets the background color for merge circuit.
Definition at line 294 of file graph_mode.c.
References GS_REG_BGCOLOR, and GS_SET_BGCOLOR.
Referenced by graph_initialize().
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 275 of file graph_mode.c.
References context, GS_REG_DISPFB1, GS_REG_DISPFB2, GS_SET_DISPFB, x, and y.
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 265 of file graph_mode.c.
References GS_REG_DISPFB1, GS_REG_DISPFB2, GS_SET_DISPFB, x, and y.
Referenced by graph_initialize(), and render().
int graph_set_mode | ( | int | interlace, |
int | mode, | ||
int | ffmd, | ||
int | flicker_filter | ||
) |
Sets the graphics mode.
Definition at line 127 of file graph_mode.c.
References GetRomName(), graph_crtmode, GRAPH_DISABLE, graph_ffmd, graph_filter, graph_interlace, graph_mode, GRAPH_MODE_HDTV_1080I, GRAPH_MODE_HDTV_576P, GRAPH_MODE_INTERLACED, GRAPH_MODE_NONINTERLACED, GRAPH_MODE_PAL, GS_REG_CSR, GS_SET_CSR, GsPutIMR(), mode, NULL, and SetGsCrt().
Referenced by graph_initialize(), and graph_set_config().
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 301 of file graph_mode.c.
References graph_pmode, GS_REG_PMODE, and GS_SET_PMODE.
Referenced by graph_disable_output(), and graph_enable_output().
int graph_set_screen | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) |
Sets the screen dimensions for the read circuits.
Definition at line 183 of file graph_mode.c.
References graph_crtmode, graph_ffmd, graph_filter, graph_height, graph_interlace, graph_magh, graph_magv, graph_mode, GRAPH_MODE_AUTO, GRAPH_MODE_FIELD, graph_width, graph_x, graph_y, GS_REG_DISPLAY1, GS_REG_DISPLAY2, GS_SET_DISPLAY, GRAPH_MODE::height, GRAPH_MODE::width, GRAPH_MODE::x, x, GRAPH_MODE::y, and y.
Referenced by graph_initialize().
void graph_set_smode1 | ( | char | cmod, |
char | gcont | ||
) |
Definition at line 337 of file graph_mode.c.
References __udelay(), graph_crtmode, graph_pmode, GS_REG_PMODE, GS_REG_SMODE1, and smode1_values.
int graph_shutdown | ( | void | ) |
Shut down the graphics library and hardware.
Definition at line 428 of file graph_mode.c.
References graph_aspect, graph_crtmode, graph_disable_output(), graph_ffmd, graph_filter, graph_height, graph_interlace, graph_magh, graph_magv, graph_width, graph_x, graph_y, GS_REG_CSR, and GS_SET_CSR.
Referenced by main().
|
static |
Definition at line 41 of file graph_mode.c.
Referenced by graph_aspect_ratio(), and graph_shutdown().
|
static |
Definition at line 44 of file graph_mode.c.
Referenced by graph_get_config(), graph_set_mode(), graph_set_screen(), graph_set_smode1(), and graph_shutdown().
|
static |
Definition at line 46 of file graph_mode.c.
Referenced by graph_get_config(), graph_set_mode(), graph_set_screen(), and graph_shutdown().
|
static |
Definition at line 43 of file graph_mode.c.
Referenced by graph_enable_output(), graph_get_config(), graph_set_mode(), graph_set_screen(), and graph_shutdown().
|
static |
Definition at line 40 of file graph_mode.c.
Referenced by graph_aspect_ratio(), graph_set_screen(), and graph_shutdown().
|
static |
Definition at line 45 of file graph_mode.c.
Referenced by graph_get_config(), graph_set_mode(), graph_set_screen(), and graph_shutdown().
|
static |
Definition at line 49 of file graph_mode.c.
Referenced by graph_set_screen(), and graph_shutdown().
|
static |
Definition at line 50 of file graph_mode.c.
Referenced by graph_set_screen(), and graph_shutdown().
GRAPH_MODE graph_mode[22] |
Definition at line 11 of file graph_mode.c.
Referenced by graph_set_mode(), and graph_set_screen().
|
static |
Definition at line 52 of file graph_mode.c.
Referenced by graph_set_output(), and graph_set_smode1().
|
static |
Definition at line 39 of file graph_mode.c.
Referenced by graph_aspect_ratio(), graph_set_screen(), and graph_shutdown().
|
static |
Definition at line 47 of file graph_mode.c.
Referenced by graph_get_config(), graph_set_screen(), and graph_shutdown().
|
static |
Definition at line 48 of file graph_mode.c.
Referenced by graph_get_config(), graph_set_screen(), and graph_shutdown().
u64 smode1_values[22] |
Definition at line 55 of file graph_mode.c.
Referenced by graph_set_smode1().