RetroArch
Functions | Variables
console.c File Reference
#include <stdlib.h>
#include <string.h>
#include <reent.h>
#include <errno.h>
#include "asm.h"
#include "processor.h"
#include "color.h"
#include "cache.h"
#include "video.h"
#include "system.h"
#include "console.h"
#include "consol.h"
#include "usbgecko.h"
#include <stdio.h>
#include <sys/iosupport.h>
Include dependency graph for console.c:

Functions

void __console_vipostcb (u32 retraceCnt)
 
static void __console_drawc (int c)
 
static void __console_clear_line (int line, int from, int to)
 
static void __console_clear (void)
 
static void __console_clear_from_cursor ()
 
static void __console_clear_to_cursor ()
 
void __console_init (void *framebuffer, int xstart, int ystart, int xres, int yres, int stride)
 
void __console_init_ex (void *conbuffer, int tgt_xstart, int tgt_ystart, int tgt_stride, int con_xres, int con_yres, int con_stride)
 
static int __console_parse_escsequence (char *pchr)
 
int __console_write (struct _reent *r, void *fd, const char *ptr, size_t len)
 
void CON_Init (void *framebuffer, int xstart, int ystart, int xres, int yres, int stride)
 Initializes the console subsystem with given parameters. More...
 
s32 CON_InitEx (GXRModeObj *rmode, s32 conXOrigin, s32 conYOrigin, s32 conWidth, s32 conHeight)
 Initialize stdout console. More...
 
void CON_GetMetrics (int *cols, int *rows)
 retrieve the columns and rows of the current console More...
 
void CON_GetPosition (int *col, int *row)
 retrieve the current cursor position of the current console More...
 
void CON_EnableGecko (int channel, int safe)
 Enable or disable the USB gecko console. More...
 

Variables

const devoptab_t dotab_stdout
 
static const unsigned int color_table []
 
static u32 do_xfb_copy = FALSE
 
static struct _console_data_s stdcon
 
static struct _console_data_scurr_con = NULL
 
static void_console_buffer = NULL
 
static s32 __gecko_status = -1
 
static u32 __gecko_safe = 0
 
u8 console_font_8x16 []
 

Function Documentation

◆ __console_clear()

static void __console_clear ( void  )
static
Here is the caller graph for this function:

◆ __console_clear_from_cursor()

static void __console_clear_from_cursor ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __console_clear_line()

static void __console_clear_line ( int  line,
int  from,
int  to 
)
static
Here is the caller graph for this function:

◆ __console_clear_to_cursor()

static void __console_clear_to_cursor ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __console_drawc()

static void __console_drawc ( int  c)
static
Here is the caller graph for this function:

◆ __console_init()

void __console_init ( void framebuffer,
int  xstart,
int  ystart,
int  xres,
int  yres,
int  stride 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __console_init_ex()

void __console_init_ex ( void conbuffer,
int  tgt_xstart,
int  tgt_ystart,
int  tgt_stride,
int  con_xres,
int  con_yres,
int  con_stride 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __console_parse_escsequence()

static int __console_parse_escsequence ( char *  pchr)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __console_vipostcb()

void __console_vipostcb ( u32  retraceCnt)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __console_write()

int __console_write ( struct _reent *  r,
void fd,
const char *  ptr,
size_t  len 
)
Here is the call graph for this function:

◆ CON_EnableGecko()

void CON_EnableGecko ( int  channel,
int  safe 
)

Enable or disable the USB gecko console.

Parameters
[in]channelEXI channel, or -1 to disable the gecko console
[in]safeIf true, use safe mode (wait for peer)
Returns
none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CON_GetMetrics()

void CON_GetMetrics ( int *  cols,
int *  rows 
)

retrieve the columns and rows of the current console

Parameters
[out]cols,rowsnumber of columns and rows of the current console
Returns
none

◆ CON_GetPosition()

void CON_GetPosition ( int *  col,
int *  row 
)

retrieve the current cursor position of the current console

Parameters
[out]col,rowcurrent cursor position
Returns
none

◆ CON_Init()

void CON_Init ( void framebuffer,
int  xstart,
int  ystart,
int  xres,
int  yres,
int  stride 
)

Initializes the console subsystem with given parameters.

Parameters
[in]framebufferpointer to the framebuffer used for drawing the characters
[in]xstart,ystartstart position of the console output in pixel
[in]xres,yressize of the console in pixel
[in]stridesize of one line of the framebuffer in bytes
Returns
none
Here is the call graph for this function:

◆ CON_InitEx()

s32 CON_InitEx ( GXRModeObj rmode,
s32  conXOrigin,
s32  conYOrigin,
s32  conWidth,
s32  conHeight 
)

Initialize stdout console.

Parameters
[in]rmodepointer to the video/render mode configuration
[in]conXOriginstarting pixel in X direction of the console output on the external framebuffer
[in]conYOriginstarting pixel in Y direction of the console output on the external framebuffer
[in]conWidthwidth of the console output 'window' to be drawn
[in]conHeightheight of the console output 'window' to be drawn
Returns
0 on success, <0 on error
Here is the call graph for this function:

Variable Documentation

◆ __gecko_safe

u32 __gecko_safe = 0
static

◆ __gecko_status

s32 __gecko_status = -1
static

◆ _console_buffer

void* _console_buffer = NULL
static

◆ color_table

const unsigned int color_table[]
static
Initial value:
=
{
0x00800080,
0x246A24BE,
0x4856484B,
0x6D416D8A,
0x0DBE0D75,
0x32A932B4,
0x56955641,
0xC580C580,
0x7B807B80,
0x4C544CFF,
0x95299512,
0xE200E294,
0x1CFF1C6B,
0x69D669ED,
0xB2ABB200,
0xFF80FF80,
}

◆ console_font_8x16

u8 console_font_8x16[]

◆ curr_con

struct _console_data_s* curr_con = NULL
static

◆ do_xfb_copy

u32 do_xfb_copy = FALSE
static

◆ dotab_stdout

const devoptab_t dotab_stdout
Initial value:
= {
"stdout",
0,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
0,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
int __console_write(struct _reent *r, void *fd, const char *ptr, size_t len)
Definition: console.c:501
#define NULL
Pointer to 0.
Definition: gctypes.h:65

◆ stdcon

struct _console_data_s stdcon
static