15 { 652, 26, 2560, 224, 0x02 },
16 { 680, 37, 2560, 256, 0x03 },
17 { 232, 35, 1440, 480, 0x50 },
18 { 320, 64, 1312, 576, 0x53 },
19 { 420, 40, 1280, 720, 0x52 },
20 { 300, 120, 1920, 540, 0x51 },
21 { 280, 18, 1280, 480, 0x1A },
22 { 330, 18, 1280, 480, 0x1B },
23 { 360, 18, 1280, 480, 0x1C },
24 { 260, 18, 1280, 480, 0x1D },
25 { 450, 25, 1600, 600, 0x2A },
26 { 465, 25, 1600, 600, 0x2B },
27 { 465, 25, 1600, 600, 0x2C },
28 { 510, 25, 1600, 600, 0x2D },
29 { 500, 25, 1600, 600, 0x2E },
30 { 580, 30, 2048, 768, 0x3B },
31 { 266, 30, 1024, 768, 0x3C },
32 { 260, 30, 1024, 768, 0x3D },
33 { 290, 30, 1024, 768, 0x3E },
34 { 350, 40, 1280, 1024, 0x4A },
35 { 350, 40, 1280, 1024, 0x4B },
59 GS_SET_SMODE1(4,32,1,0,2,0,1,1,0,0,4,0,0,0,0,0,1,1,1,1,0),
60 GS_SET_SMODE1(4,32,1,0,3,0,1,1,0,0,4,0,0,0,0,0,1,1,1,1,0),
61 GS_SET_SMODE1(4,32,1,0,0,0,1,1,0,0,2,0,0,0,0,0,1,1,1,1,1),
62 GS_SET_SMODE1(4,32,1,0,0,0,1,1,0,1,2,0,0,0,0,0,1,1,1,1,1),
63 GS_SET_SMODE1(2,22,1,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,1,0,1),
64 GS_SET_SMODE1(2,22,1,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,1,0,0),
65 GS_SET_SMODE1(2,15,1,0,0,0,0,1,0,0,2,0,0,0,0,0,1,1,1,0,1),
66 GS_SET_SMODE1(3,28,1,0,0,0,0,1,0,0,2,0,0,0,0,0,1,1,1,0,1),
67 GS_SET_SMODE1(3,28,1,0,0,0,0,1,0,0,2,0,0,0,0,0,1,1,1,0,1),
68 GS_SET_SMODE1(3,16,0,0,0,0,0,1,0,0,2,0,0,0,0,0,1,1,1,0,1),
69 GS_SET_SMODE1(3,16,0,0,0,0,0,1,0,0,2,0,0,0,0,0,1,1,1,0,1),
70 GS_SET_SMODE1(6,71,1,0,0,0,0,1,0,0,2,0,0,0,0,0,1,1,1,0,1),
71 GS_SET_SMODE1(5,74,1,0,0,0,0,1,0,0,2,0,0,0,0,0,1,1,1,0,1),
72 GS_SET_SMODE1(3,44,1,0,0,0,0,1,0,0,2,0,0,0,0,0,1,1,1,0,1),
73 GS_SET_SMODE1(3,25,0,0,0,0,0,1,0,0,2,0,0,0,0,0,1,1,1,0,1),
74 GS_SET_SMODE1(3,29,0,0,0,0,0,1,0,0,2,0,0,0,0,0,1,1,1,0,1),
75 GS_SET_SMODE1(6,67,1,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,1,0,1),
76 GS_SET_SMODE1(3,35,1,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,1,0,1),
77 GS_SET_SMODE1(1, 7,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,1,0,1),
78 GS_SET_SMODE1(1, 8,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,1,0,1),
79 GS_SET_SMODE1(1,10,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,1,0,1),
86 register unsigned int loops_total = 0;
87 register unsigned int loops_end = usecs * 148;
89 if (usecs > loops_end)
96 asm volatile (
".set noreorder\n\t"
105 :
"0" (loops_total),
"r" (loops_end));
118 if (romname[4] ==
'E')
136 *
GS_REG_CSR =
GS_SET_CSR(0,0,0,0,0,0,0,0,0,0,0,0);
142 asm volatile (
"sync.p\n\t"
301 void graph_set_output(
int rc1,
int rc2,
int alpha_select,
int alpha_output,
int blend_method,
unsigned char alpha)
358 smode1_val |= (
u64)(gcont & 1) << 25;
363 if ((
graph_crtmode < 0x04) && (cmod > 0x01) && (cmod < 0x04))
366 smode1_val |= (
u64)(cmod & 3) << 13;
376 asm volatile (
"sync.l; sync.p;");
393 asm volatile (
"sync.l; sync.p;");
437 *
GS_REG_CSR =
GS_SET_CSR(0,0,0,0,0,0,0,0,0,0,0,0);
#define GRAPH_MODE_NONINTERLACED
#define GRAPH_MODE_HDTV_576P
#define GRAPH_MODE_HDTV_1080I
#define GRAPH_MODE_INTERLACED
#define GRAPH_VALUE_ALPHA
int graph_make_config(int mode, int interlace, int ffmd, int x, int y, int flicker_filter, char *config)
int graph_set_screen(int x, int y, int width, int height)
static float graph_height
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)
static float graph_aspect
static int __udelay(unsigned int usecs)
void graph_enable_output(void)
int graph_get_config(char *config)
void graph_set_framebuffer_filtered(int fbp, int width, int psm, int x, int y)
int graph_get_region(void)
static int graph_interlace
void graph_set_smode1(char cmod, char gcont)
GRAPH_MODE graph_mode[22]
void graph_disable_output(void)
float graph_aspect_ratio(void)
int graph_set_mode(int interlace, int mode, int ffmd, int flicker_filter)
void graph_set_framebuffer(int context, int fbp, int width, int psm, int x, int y)
#define GS_SET_DISPFB(FBP, FBW, PSM, DBX, DBY)
#define GS_SET_DISPLAY(DX, DY, MAGH, MAGV, DW, DH)
void SetGsCrt(s16 interlace, s16 pal_ntsc, s16 field)
#define GS_SET_SMODE1(rc, lc, t1248, slck, cmod, ex, prst, sint, xpck, pck2, spml, gcont, phs, pvs, pehs, pevs, clksel, nvck, slck2, vcksel, vhp)
#define GS_SET_PMODE(enable_rc1, enable_rc2, mmod, amod, blend_style, blend_value)
#define GS_SET_CSR(signal_evnt, finish_evnt, hsync_intrupt, vsync_intrupt, write_terminate, flush, reset, nfield, current_field, fifo_status, gs_rev_number, gs_id)
#define GS_SET_BGCOLOR(r, g, b)
int configGetTvScreenType(void)
char * GetRomName(char *romname)