ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
osd_config.h File Reference
#include <tamtypes.h>
#include <libcdvd.h>
+ Include dependency graph for osd_config.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ConfigParam
 
struct  Config2Param
 

Enumerations

enum  OSD_LANGUAGES {
  LANGUAGE_JAPANESE = 0 ,
  LANGUAGE_ENGLISH ,
  LANGUAGE_FRENCH ,
  LANGUAGE_SPANISH ,
  LANGUAGE_GERMAN ,
  LANGUAGE_ITALIAN ,
  LANGUAGE_DUTCH ,
  LANGUAGE_PORTUGUESE ,
  LANGUAGE_RUSSIAN ,
  LANGUAGE_KOREAN ,
  LANGUAGE_TRAD_CHINESE ,
  LANGUAGE_SIMPL_CHINESE
}
 
enum  TV_SCREEN_TYPES {
  TV_SCREEN_43 = 0 ,
  TV_SCREEN_FULL ,
  TV_SCREEN_169
}
 
enum  VIDEO_OUTPUT_TYPES {
  VIDEO_OUTPUT_RGB = 0 ,
  VIDEO_OUTPUT_COMPONENT
}
 
enum  DATE_FORMAT_TYPES {
  DATE_YYYYMMDD = 0 ,
  DATE_MMDDYYYY ,
  DATE_DDMMYYYY
}
 
enum  TIME_FORMAT_TYPES {
  TIME_24H = 0 ,
  TIME_12H
}
 

Functions

int configGetLanguage (void)
 
void configSetLanguage (int language)
 
int configGetTvScreenType (void)
 
void configSetTvScreenType (int screenType)
 
int configGetDateFormat (void)
 
void configSetDateFormat (int dateFormat)
 
int configGetTimeFormat (void)
 
void configSetTimeFormat (int timeFormat)
 
int configGetTimezone (void)
 
void configSetTimezone (int offset)
 
int configIsSpdifEnabled (void)
 
void configSetSpdifEnabled (int enabled)
 
int configIsDaylightSavingEnabled (void)
 
void configSetDaylightSavingEnabled (int enabled)
 
void configConvertToGmtTime (sceCdCLOCK *time)
 
void configConvertToLocalTime (sceCdCLOCK *time)
 
int IsT10K (void)
 
int IsEarlyJap (ConfigParam config)
 
char * GetRomName (char *romname)
 

Detailed Description

PS2 Configuration settings Note: the 'set' methods are only valid till the ps2 gets turned off or reset!

Note 2: Early Japanese consoles (The SCPH-10000 and SCPH-15000) have kernels based on older specifications. The SCPH-18000 has the same kernel as the first expansion bay model (SCPH-30000). The early kernels can be modernized if patched. Newer games will automatically patch ExecPS2 of such a kernel when they detect one, although only HDDOSDs will fully patch kernel completely (causes the kernel to appear as a newer kernel to everything).

Definition in file osd_config.h.

Enumeration Type Documentation

◆ DATE_FORMAT_TYPES

date format values returned by: int getDateFormat(void)

Enumerator
DATE_YYYYMMDD 
DATE_MMDDYYYY 
DATE_DDMMYYYY 

Definition at line 68 of file osd_config.h.

68  {
69  DATE_YYYYMMDD = 0,
72 };
@ DATE_YYYYMMDD
Definition: osd_config.h:69
@ DATE_MMDDYYYY
Definition: osd_config.h:70
@ DATE_DDMMYYYY
Definition: osd_config.h:71

◆ OSD_LANGUAGES

language values returned and used by: configGetLanguage() and configSetLanguage()

Enumerator
LANGUAGE_JAPANESE 
LANGUAGE_ENGLISH 
LANGUAGE_FRENCH 
LANGUAGE_SPANISH 
LANGUAGE_GERMAN 
LANGUAGE_ITALIAN 
LANGUAGE_DUTCH 
LANGUAGE_PORTUGUESE 
LANGUAGE_RUSSIAN 
LANGUAGE_KOREAN 
LANGUAGE_TRAD_CHINESE 
LANGUAGE_SIMPL_CHINESE 

Definition at line 33 of file osd_config.h.

33  {
42  /* Language values after here are not officially documented.
43  Are supported by neither this library nor the original Sony libscf library,
44  but can be found in the MECHACON's NVRAM and are used exclusively by the OSDs of consoles that support these languages.
45  However, these consoles will always specify English within ConfigParam.
46 
47  When ConfigParam.version is 2, the true language can be found in Config2Param.language. */
52 };
@ LANGUAGE_DUTCH
Definition: osd_config.h:40
@ LANGUAGE_RUSSIAN
Definition: osd_config.h:48
@ LANGUAGE_ITALIAN
Definition: osd_config.h:39
@ LANGUAGE_JAPANESE
Definition: osd_config.h:34
@ LANGUAGE_SIMPL_CHINESE
Definition: osd_config.h:51
@ LANGUAGE_KOREAN
Definition: osd_config.h:49
@ LANGUAGE_ENGLISH
Definition: osd_config.h:35
@ LANGUAGE_PORTUGUESE
Definition: osd_config.h:41
@ LANGUAGE_GERMAN
Definition: osd_config.h:38
@ LANGUAGE_FRENCH
Definition: osd_config.h:36
@ LANGUAGE_SPANISH
Definition: osd_config.h:37
@ LANGUAGE_TRAD_CHINESE
Definition: osd_config.h:50

◆ TIME_FORMAT_TYPES

Time format values returned by: int getTimeFormat(void)

Enumerator
TIME_24H 
TIME_12H 

Definition at line 75 of file osd_config.h.

75  {
76  TIME_24H = 0,
77  TIME_12H,
78 };
@ TIME_24H
Definition: osd_config.h:76
@ TIME_12H
Definition: osd_config.h:77

◆ TV_SCREEN_TYPES

tv screen values returned by: int getTvScreenType(void)

Enumerator
TV_SCREEN_43 
TV_SCREEN_FULL 
TV_SCREEN_169 

Definition at line 55 of file osd_config.h.

55  {
56  TV_SCREEN_43 = 0,
59 };
@ TV_SCREEN_FULL
Definition: osd_config.h:57
@ TV_SCREEN_43
Definition: osd_config.h:56
@ TV_SCREEN_169
Definition: osd_config.h:58

◆ VIDEO_OUTPUT_TYPES

Video output type values

Enumerator
VIDEO_OUTPUT_RGB 
VIDEO_OUTPUT_COMPONENT 

Definition at line 62 of file osd_config.h.

62  {
63  VIDEO_OUTPUT_RGB = 0,
65 };
@ VIDEO_OUTPUT_RGB
Definition: osd_config.h:63
@ VIDEO_OUTPUT_COMPONENT
Definition: osd_config.h:64

Function Documentation

◆ configConvertToGmtTime()

void configConvertToGmtTime ( sceCdCLOCK time)

converts the time returned from the ps2's clock into GMT time (ps2 clock is in JST time)

◆ configConvertToLocalTime()

void configConvertToLocalTime ( sceCdCLOCK time)

converts the time returned from the ps2's clock into LOCAL time (ps2 clock is in JST time)

◆ configGetDateFormat()

int configGetDateFormat ( void  )

gets the date display format

Returns
0 = yyyy/mm/dd; 1 = mm/dd/yyyy; 2 = dd/mm/yyyy

◆ configGetLanguage()

int configGetLanguage ( void  )

get the language the ps2 is currently set to

Returns
Language value (See OSD_LANGUAGES above)

◆ configGetTimeFormat()

int configGetTimeFormat ( void  )

gets the time display format (whether 24hour time or not)

Returns
0 = 24hour; 1 = 12hour

◆ configGetTimezone()

int configGetTimezone ( void  )

get timezone

Returns
offset in minutes from GMT

Referenced by _ps2sdk_timezone_update().

◆ configGetTvScreenType()

int configGetTvScreenType ( void  )

get the tv screen type the ps2 is setup for

Returns
0 = 4:3; 1 = fullscreen; 2 = 16:9

Referenced by graph_aspect_ratio().

◆ configIsDaylightSavingEnabled()

int configIsDaylightSavingEnabled ( void  )

checks whether daylight saving is currently set

Returns
1 = on; 0 = off

Referenced by _ps2sdk_timezone_update().

◆ configIsSpdifEnabled()

int configIsSpdifEnabled ( void  )

checks whether the spdif is enabled or not

Returns
1 = on; 0 = off

◆ configSetDateFormat()

void configSetDateFormat ( int  dateFormat)

sets the date display format

Parameters
dateFormat0 = yyyy/mm/dd; 1 = mm/dd/yyyy; 2 = dd/mm/yyyy

◆ configSetDaylightSavingEnabled()

void configSetDaylightSavingEnabled ( int  enabled)

sets daylight saving

Parameters
enabled1 = on; 0 = off

◆ configSetLanguage()

void configSetLanguage ( int  language)

sets the default language of the ps2

Parameters
languageLanguage value (See OSD_LANGUAGES above)

◆ configSetSpdifEnabled()

void configSetSpdifEnabled ( int  enabled)

sets whether the spdif is enabled or not

Parameters
enabled1 = on; 0 = off

◆ configSetTimeFormat()

void configSetTimeFormat ( int  timeFormat)

sets the time display format (whether 24hour time or not)

Parameters
timeFormat0 = 24hour; 1 = 12hour

◆ configSetTimezone()

void configSetTimezone ( int  offset)

set timezone

Parameters
offsetoffset in minutes from GMT

◆ configSetTvScreenType()

void configSetTvScreenType ( int  screenType)

set the tv screen type

Parameters
screenType0 = 4:3; 1 = fullscreen; 2 = 16:9

◆ GetRomName()

char* GetRomName ( char *  romname)

gets the romname from the current ps2 14 chars - doesnt set a null terminator

Parameters
romnamebuffer to hold romname (14 chars long)
Returns
pointer to buffer containing romname

Referenced by debug_detect_signal(), graph_get_region(), and graph_set_mode().

◆ IsEarlyJap()

int IsEarlyJap ( ConfigParam  config)

check if ps2 has a 'Protokernel' (Really early Japanese models)

Parameters
configunsigned int config value from GetOsdConfigParam() syscall
Returns
1 if early jap model; 0 if not

◆ IsT10K()

int IsT10K ( void  )

check whether the PlayStation 2 is actually a TOOL DTL-T10000(H)

Returns
1 if DTL-T10000(H); 0 if not