ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
libosd_full.c File Reference
#include <kernel.h>
#include <syscallnr.h>
#include <osd_config.h>
+ Include dependency graph for libosd_full.c:

Go to the source code of this file.

Data Structures

struct  SyscallData
 

Functions

void InitOsd (void)
 

Variables

unsigned char osdsrc []
 
unsigned int size_osdsrc
 
static struct SyscallData SyscallPatchEntries []
 

Detailed Description

libosd - ExecPS2 + OSD configuration function update.

Applicable to only the SCPH-10000 and SCPH-15000. Both contain either boot ROM v1.00 or v1.01. This is the full libosd update will replace ExecPS2, SetOsdConfigParam, SetOsdConfigParam, SetOsdConfigParam2 and SetOsdConfigParam2, as done by the HDD Browser.

The code within this file was based on the code from the HDD Browser, not libosd. Originally, this was the version that I linked crt0 to, but I realized that SONY had a reason for only fully patching the protokernels within the HDD Browser: Only the HDD browser can change the new language setting, while the protokernel browser is not aware of the new language field. By fully patching the kernel, then new software will use the new language setting. However, if the user is not using the HDD Browser, then the user becomes unable to change the language setting.

Definition in file libosd_full.c.

Function Documentation

◆ InitOsd()

void InitOsd ( void  )

Definition at line 69 of file libosd_full.c.

69  {
70  unsigned int i;
71 
72  if(PatchIsNeeded()){
73  setup(SyscallPatchEntries[0].syscall_num, SyscallPatchEntries[0].function);
74  Copy((unsigned int*)0x80074000, (unsigned int*)osdsrc, size_osdsrc);
75 
76  FlushCache(0);
77  FlushCache(2);
78  setup(SyscallPatchEntries[1].syscall_num, SyscallPatchEntries[1].function);
79 
80  for(i=2; i<7; i++){
81  setup(SyscallPatchEntries[i].syscall_num, GetEntryAddress(SyscallPatchEntries[i].syscall_num));
82  }
83  }
84 }
int PatchIsNeeded(void)
Definition: libosd_common.c:20
void * GetEntryAddress(int syscall)
int Copy(void *dest, const void *src, int size)
void FlushCache(s32 operation)
void setup(int syscall_num, void *handler)
unsigned char osdsrc[]
unsigned int size_osdsrc
static struct SyscallData SyscallPatchEntries[]
Definition: libosd_full.c:37

References Copy(), FlushCache(), GetEntryAddress(), osdsrc, PatchIsNeeded(), setup(), size_osdsrc, SyscallData::syscall_num, and SyscallPatchEntries.

Variable Documentation

◆ osdsrc

unsigned char osdsrc[]
extern

Referenced by InitOsd().

◆ size_osdsrc

unsigned int size_osdsrc
extern

Referenced by InitOsd().

◆ SyscallPatchEntries

struct SyscallData SyscallPatchEntries[]
static

Definition at line 30 of file libosd_full.c.

Referenced by InitOsd().