PS2SDK
PS2 Homebrew Libraries
scr_printf.c File Reference
#include <stdio.h>
#include <tamtypes.h>
#include <sifcmd.h>
#include <kernel.h>
#include <rom0_info.h>
#include <stdarg.h>
#include <debug.h>
#include <ee_regs.h>
+ Include dependency graph for scr_printf.c:

Go to the source code of this file.

Data Structures

struct  t_setupscr
 
struct  t_setupchar
 

Functions

static int debug_detect_signal ()
 
static void Init_GS (int interlace, int omode, int ffmd)
 
static void SetVideoMode (void)
 
static void Dma02Wait (void)
 
static void DmaReset (void)
 
static void progdma (const void *addr, int size)
 
void scr_setbgcolor (u32 color)
 
void scr_setfontcolor (u32 color)
 
void scr_setcursorcolor (u32 color)
 
void init_scr (void)
 
void scr_putchar (int x, int y, u32 color, int ch)
 
void scr_clearchar (int X, int Y)
 
void scr_clearline (int Y)
 
void scr_printf (const char *format,...)
 
void scr_vprintf (const char *format, va_list opt)
 
void scr_setXY (int x, int y)
 
int scr_getX ()
 
int scr_getY ()
 
void scr_clear ()
 
void scr_setCursor (int enable)
 

Variables

static short int X
 
static short int Y
 
static const short int MX = 80
 
static const short int MY = 40
 
static u32 bgcolor
 
static u32 fontcolor
 
static u32 cursorcolor
 
static short int cursor
 
static const struct t_setupscr g_setupscr_template
 
const u8 msx []
 
static const struct t_setupchar g_setupchar_template
 

Detailed Description

EE UGLY DEBUG ON SCREEN

Definition in file scr_printf.c.


Data Structure Documentation

◆ t_setupscr

struct t_setupscr

Definition at line 30 of file scr_printf.c.

Data Fields
u64 dd0[6]
u32 dw0[2]
u64 dd1[1]
u16 dh[4]
u64 dd2[21]

◆ t_setupchar

struct t_setupchar

Definition at line 39 of file scr_printf.c.

Data Fields
u64 dd0[4]
u32 dw0[1]
u16 x
u16 y
u64 dd1[1]
u32 dw1[2]
u64 dd2[5]

Function Documentation

◆ progdma()

static void progdma ( const void *  addr,
int  size 
)
inlinestatic

Initiates a normal-mode DMA transfer over the GIF.

Parameters
addrThe address of the data to be transfered, which must be 16 byte aligned.
sizeThe size (in 16 byte quads) of the data to be transfered.

Definition at line 114 of file scr_printf.c.

Variable Documentation

◆ g_setupscr_template

const struct t_setupscr g_setupscr_template
static
Initial value:
= {
{0x100000000000800E, 0xE, 0xA0000, 0x4C, 0x8C, 0x4E},
{27648, 30976},
{0x18},
{0, 639, 0, 223},
{0x40, 1, 0x1a, 1, 0x46, 0, 0x45, 0x70000,
0x47, 0x30000, 0x47, 6, 0, 0x3F80000000000000, 1, 0x79006C00, 5,
0x87009400, 5, 0x70000, 0x47}
}

Definition at line 136 of file scr_printf.c.

◆ g_setupchar_template

const struct t_setupchar g_setupchar_template
static
Initial value:
= {
{0x1000000000000004, 0xE, 0xA000000000000, 0x50},
{0},
100,
100,
{0x51},
{8, 8},
{0x52, 0, 0x53, 0x800000000008010, 0}
}

Definition at line 168 of file scr_printf.c.