PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
osd_config.h File Reference
#include <tamtypes.h>
#include <rom0_info.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)
 
int configGetLanguageWithIODriver (_io_driver *driver)
 
void configSetLanguage (int language)
 
void configSetLanguageWithIODriver (int language, _io_driver *driver)
 
int configGetTvScreenType (void)
 
int configGetTvScreenTypeWithIODriver (_io_driver *driver)
 
void configSetTvScreenType (int screenType)
 
void configSetTvScreenTypeWithIODriver (int screenType, _io_driver *driver)
 
int configGetDateFormat (void)
 
int configGetDateFormatWithIODriver (_io_driver *driver)
 
void configSetDateFormat (int dateFormat)
 
void configSetDateFormatWithIODriver (int dateFormat, _io_driver *driver)
 
int configGetTimeFormat (void)
 
int configGetTimeFormatWithIODriver (_io_driver *driver)
 
void configSetTimeFormat (int timeFormat)
 
void configSetTimeFormatWithIODriver (int timeFormat, _io_driver *driver)
 
int configGetTimezone (void)
 
int configGetTimezoneWithIODriver (_io_driver *driver)
 
void configSetTimezone (int offset)
 
void configSetTimezoneWithIODriver (int timezoneOffset, _io_driver *driver, void(*finishedCallback)(void))
 
int configIsSpdifEnabled (void)
 
int configIsSpdifEnabledWithIODriver (_io_driver *driver)
 
void configSetSpdifEnabled (int enabled)
 
void configSetSpdifEnabledWithIODriver (int enabled, _io_driver *driver)
 
int configIsDaylightSavingEnabled (void)
 
int configIsDaylightSavingEnabledWithIODriver (_io_driver *driver)
 
void configSetDaylightSavingEnabled (int enabled)
 
void configSetDaylightSavingEnabledWithIODriver (int daylightSaving, _io_driver *driver, void(*finishedCallback)(void))
 
void configConvertToGmtTime (sceCdCLOCK *time)
 
void configConvertToLocalTimeWithIODriver (sceCdCLOCK *time, _io_driver *driver)
 
int IsEarlyJap (ConfigParam config)
 

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.


Data Structure Documentation

◆ ConfigParam

struct ConfigParam

parameter struct as used by GetOsdConfigParam/SetOsdConfigParam

Definition at line 82 of file osd_config.h.

Data Fields
u32 spdifMode: 1

0=enabled, 1=disabled

u32 screenType: 2

0=4:3, 1=fullscreen, 2=16:9

u32 videoOutput: 1

0=rgb(scart), 1=component

u32 japLanguage: 1

0=japanese, 1=english(non-japanese)

u32 ps1drvConfig: 8

Playstation driver settings.

u32 version: 3

0 = early Japanese OSD, 1 = OSD2, 2 = OSD2 with extended languages. Early kernels cannot retain the value set in this field (Hence always 0).

u32 language: 5

LANGUAGE_??? value

u32 timezoneOffset: 11

timezone minutes offset from gmt

◆ Config2Param

struct Config2Param

parameter struct as used by GetOsdConfigParam2/SetOsdConfigParam2 (Not supported by unpatched, early kernels. Do NOT invoke GetOsdConfigParam2 or SetOsdConfigParam2 on one!)

Definition at line 105 of file osd_config.h.

Data Fields
u8 format
u8 reserved: 4
u8 daylightSaving: 1

0=standard(winter), 1=daylight savings(summer)

u8 timeFormat: 1

0=24 hour, 1=12 hour

u8 dateFormat: 2

0=YYYYMMDD, 1=MMDDYYYY, 2=DDMMYYYY

u8 version

Set to 2

u8 language

The true language, unlike the one from ConfigParam

Enumeration Type Documentation

◆ OSD_LANGUAGES

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

Definition at line 34 of file osd_config.h.

◆ TV_SCREEN_TYPES

tv screen values returned by: int getTvScreenType(void)

Definition at line 56 of file osd_config.h.

◆ VIDEO_OUTPUT_TYPES

Video output type values

Definition at line 63 of file osd_config.h.

◆ DATE_FORMAT_TYPES

date format values returned by: int getDateFormat(void)

Definition at line 69 of file osd_config.h.

◆ TIME_FORMAT_TYPES

Time format values returned by: int getTimeFormat(void)

Definition at line 76 of file osd_config.h.

Function Documentation

◆ configGetLanguage()

int configGetLanguage ( void  )

get the language the ps2 is currently set to

Returns
Language value (See OSD_LANGUAGES above)

◆ configSetLanguage()

void configSetLanguage ( int  language)

sets the default language of the ps2

Parameters
languageLanguage value (See OSD_LANGUAGES above)

◆ 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().

◆ configSetTvScreenType()

void configSetTvScreenType ( int  screenType)

set the tv screen type

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

◆ configGetDateFormat()

int configGetDateFormat ( void  )

gets the date display format

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

◆ configSetDateFormat()

void configSetDateFormat ( int  dateFormat)

sets the date display format

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

◆ configGetTimeFormat()

int configGetTimeFormat ( void  )

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

Returns
0 = 24hour; 1 = 12hour

◆ configSetTimeFormat()

void configSetTimeFormat ( int  timeFormat)

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

Parameters
timeFormat0 = 24hour; 1 = 12hour

◆ configGetTimezone()

int configGetTimezone ( void  )

get timezone

Returns
offset in minutes from GMT

◆ configSetTimezone()

void configSetTimezone ( int  offset)

set timezone

Parameters
offsetoffset in minutes from GMT

◆ configIsSpdifEnabled()

int configIsSpdifEnabled ( void  )

checks whether the spdif is enabled or not

Returns
1 = on; 0 = off

◆ configSetSpdifEnabled()

void configSetSpdifEnabled ( int  enabled)

sets whether the spdif is enabled or not

Parameters
enabled1 = on; 0 = off

◆ configIsDaylightSavingEnabled()

int configIsDaylightSavingEnabled ( void  )

checks whether daylight saving is currently set

Returns
1 = on; 0 = off

◆ configSetDaylightSavingEnabled()

void configSetDaylightSavingEnabled ( int  enabled)

sets daylight saving

Parameters
enabled1 = on; 0 = off

◆ configConvertToGmtTime()

void configConvertToGmtTime ( sceCdCLOCK time)

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

◆ 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