RetroArch
Classes | Macros | Typedefs | Functions | Variables
hbl.c File Reference
#include <stdio.h>
#include <malloc.h>
#include <string.h>
#include <inttypes.h>
#include <wiiu/os.h>
#include "hbl.h"
Include dependency graph for hbl.c:

Classes

struct  _s_mem_area
 
struct  _memory_values_t
 

Macros

#define MEM_AREA_TABLE   ((s_mem_area*)(MEM_BASE + 0x1600))
 
#define ELF_DATA_ADDR   (*(volatile unsigned int*)(MEM_BASE + 0x1300 + 0x00))
 
#define ELF_DATA_SIZE   (*(volatile unsigned int*)(MEM_BASE + 0x1300 + 0x04))
 
#define RPX_MAX_SIZE   (*(volatile unsigned int*)(MEM_BASE + 0x1300 + 0x0C))
 
#define RPX_MAX_CODE_SIZE   (*(volatile unsigned int*)(MEM_BASE + 0x1300 + 0x10))
 
#define APP_BASE_MEM   ((unsigned char*)(MEM_BASE + 0x2000))
 

Typedefs

typedef struct _s_mem_area s_mem_area
 
typedef struct _memory_values_t memory_values_t
 

Functions

void SC0x25_KernelCopyData (unsigned int addr, unsigned int src, unsigned int len)
 
static void memoryAddArea (int start, int end, int cur_index)
 
voidgetApplicationEndAddr (void)
 
static void memoryInitAreaTable (u32 args_size)
 
static int HomebrewCopyMemory (u8 *address, u32 bytes, u32 args_size)
 
int HBL_loadToMemory (const char *filepath, u32 args_size)
 

Variables

static const memory_values_t mem_vals_540 []
 

Macro Definition Documentation

◆ APP_BASE_MEM

#define APP_BASE_MEM   ((unsigned char*)(MEM_BASE + 0x2000))

◆ ELF_DATA_ADDR

#define ELF_DATA_ADDR   (*(volatile unsigned int*)(MEM_BASE + 0x1300 + 0x00))

◆ ELF_DATA_SIZE

#define ELF_DATA_SIZE   (*(volatile unsigned int*)(MEM_BASE + 0x1300 + 0x04))

◆ MEM_AREA_TABLE

#define MEM_AREA_TABLE   ((s_mem_area*)(MEM_BASE + 0x1600))

◆ RPX_MAX_CODE_SIZE

#define RPX_MAX_CODE_SIZE   (*(volatile unsigned int*)(MEM_BASE + 0x1300 + 0x10))

◆ RPX_MAX_SIZE

#define RPX_MAX_SIZE   (*(volatile unsigned int*)(MEM_BASE + 0x1300 + 0x0C))

Typedef Documentation

◆ memory_values_t

◆ s_mem_area

typedef struct _s_mem_area s_mem_area

Function Documentation

◆ getApplicationEndAddr()

void* getApplicationEndAddr ( void  )
Here is the caller graph for this function:

◆ HBL_loadToMemory()

int HBL_loadToMemory ( const char *  filepath,
u32  args_size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HomebrewCopyMemory()

static int HomebrewCopyMemory ( u8 address,
u32  bytes,
u32  args_size 
)
static

if we load an ELF file

Here is the call graph for this function:
Here is the caller graph for this function:

◆ memoryAddArea()

static void memoryAddArea ( int  start,
int  end,
int  cur_index 
)
inlinestatic
Here is the caller graph for this function:

◆ memoryInitAreaTable()

static void memoryInitAreaTable ( u32  args_size)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SC0x25_KernelCopyData()

void SC0x25_KernelCopyData ( unsigned int  addr,
unsigned int  src,
unsigned int  len 
)
Here is the caller graph for this function:

Variable Documentation

◆ mem_vals_540

const memory_values_t mem_vals_540[]
static
Initial value:
=
{
{ 0x2E609EFC, 0x2FF82000 },
{ 0x29030800, 0x293F6000 },
{ 0x288EEC30, 0x28B06800 },
{ 0x2D3B966C, 0x2D894000 },
{ 0x2CB56370, 0x2D1EF000 },
{ 0x2D8AD3D8, 0x2E000000 },
{ 0x2970200C, 0x298B9800 },
{ 0x2A057B68, 0x2A1B9000 },
{ 0x2ABBCC4C, 0x2ACB9000 },
{0, 0}
}