PS2SDK
PS2 Homebrew Libraries
osd_config.h
Go to the documentation of this file.
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
24 #ifndef __OSD_CONFIG_H__
25 #define __OSD_CONFIG_H__
26 
27 #include <tamtypes.h>
28 #include <rom0_info.h>
29 #ifndef OSD_CONFIG_NO_LIBCDVD
30 #include <libcdvd.h>
31 #endif
32 
35  LANGUAGE_JAPANESE = 0,
36  LANGUAGE_ENGLISH,
37  LANGUAGE_FRENCH,
38  LANGUAGE_SPANISH,
39  LANGUAGE_GERMAN,
40  LANGUAGE_ITALIAN,
41  LANGUAGE_DUTCH,
42  LANGUAGE_PORTUGUESE,
43  /* Language values after here are not officially documented.
44  Are supported by neither this library nor the original Sony libscf library,
45  but can be found in the MECHACON's NVRAM and are used exclusively by the OSDs of consoles that support these languages.
46  However, these consoles will always specify English within ConfigParam.
47 
48  When ConfigParam.version is 2, the true language can be found in Config2Param.language. */
49  LANGUAGE_RUSSIAN,
50  LANGUAGE_KOREAN,
51  LANGUAGE_TRAD_CHINESE,
52  LANGUAGE_SIMPL_CHINESE
53 };
54 
57  TV_SCREEN_43 = 0,
58  TV_SCREEN_FULL,
59  TV_SCREEN_169
60 };
61 
64  VIDEO_OUTPUT_RGB = 0,
65  VIDEO_OUTPUT_COMPONENT
66 };
67 
70  DATE_YYYYMMDD = 0,
71  DATE_MMDDYYYY,
72  DATE_DDMMYYYY
73 };
74 
77  TIME_24H = 0,
78  TIME_12H,
79 };
80 
82 typedef struct
83 {
85  /*00*/ u32 spdifMode : 1;
87  /*01*/ u32 screenType : 2;
89  /*03*/ u32 videoOutput : 1;
91  /*04*/ u32 japLanguage : 1;
93  /*05*/ u32 ps1drvConfig : 8;
95  /*13*/ u32 version : 3;
97  /*16*/ u32 language : 5;
99  /*21*/ u32 timezoneOffset : 11;
100 } ConfigParam;
101 
105 typedef struct
106 {
107  /*00*/ u8 format;
108 
109  /*00*/ u8 reserved : 4;
111  /*04*/ u8 daylightSaving : 1;
113  /*05*/ u8 timeFormat : 1;
115  /*06*/ u8 dateFormat : 2;
116 
117  // Only used if ConfigParam.version = 2
119  /*00*/ u8 version;
121  /*00*/ u8 language;
122 } Config2Param;
123 
124 #ifdef __cplusplus
125 extern "C" {
126 #endif
127 
131 extern int configGetLanguage(void);
132 extern int configGetLanguageWithIODriver(_io_driver *driver);
133 
137 extern void configSetLanguage(int language);
138 extern void configSetLanguageWithIODriver(int language, _io_driver *driver);
139 
140 
144 extern int configGetTvScreenType(void);
145 extern int configGetTvScreenTypeWithIODriver(_io_driver *driver);
146 
150 extern void configSetTvScreenType(int screenType);
151 extern void configSetTvScreenTypeWithIODriver(int screenType, _io_driver *driver);
152 
156 extern int configGetDateFormat(void);
157 extern int configGetDateFormatWithIODriver(_io_driver *driver);
158 
162 extern void configSetDateFormat(int dateFormat);
163 extern void configSetDateFormatWithIODriver(int dateFormat, _io_driver *driver);
164 
169 extern int configGetTimeFormat(void);
170 extern int configGetTimeFormatWithIODriver(_io_driver *driver);
171 
176 extern void configSetTimeFormat(int timeFormat);
177 extern void configSetTimeFormatWithIODriver(int timeFormat, _io_driver *driver);
178 
182 extern int configGetTimezone(void);
183 extern int configGetTimezoneWithIODriver(_io_driver *driver);
184 
188 extern void configSetTimezone(int offset);
189 extern void configSetTimezoneWithIODriver(int timezoneOffset, _io_driver *driver, void (*finishedCallback)(void));
190 
194 extern int configIsSpdifEnabled(void);
195 extern int configIsSpdifEnabledWithIODriver(_io_driver *driver);
196 
200 extern void configSetSpdifEnabled(int enabled);
201 extern void configSetSpdifEnabledWithIODriver(int enabled, _io_driver *driver);
202 
206 extern int configIsDaylightSavingEnabled(void);
207 extern int configIsDaylightSavingEnabledWithIODriver(_io_driver *driver);
208 
212 extern void configSetDaylightSavingEnabled(int enabled);
213 extern void configSetDaylightSavingEnabledWithIODriver(int daylightSaving, _io_driver *driver, void (*finishedCallback)(void));
214 
215 #ifndef OSD_CONFIG_NO_LIBCDVD
216 
219 extern void configConvertToGmtTime(sceCdCLOCK *time);
220 extern void configConvertToLocalTimeWithIODriver(sceCdCLOCK *time, _io_driver *driver);
221 #endif
222 
223 // Internal functions.
229 extern int IsEarlyJap(ConfigParam config);
230 
231 #ifdef __cplusplus
232 }
233 #endif
234 
235 #endif /* __OSD_CONFIG_H__ */
ConfigParam::videoOutput
u32 videoOutput
Definition: osd_config.h:89
OSD_LANGUAGES
OSD_LANGUAGES
Definition: osd_config.h:34
configSetTvScreenType
void configSetTvScreenType(int screenType)
Config2Param::timeFormat
u8 timeFormat
Definition: osd_config.h:113
IsEarlyJap
int IsEarlyJap(ConfigParam config)
ConfigParam::spdifMode
u32 spdifMode
Definition: osd_config.h:85
sceCdCLOCK
Definition: libcdvd-common.h:188
rom0_info.h
ConfigParam::language
u32 language
Definition: osd_config.h:97
configSetDaylightSavingEnabled
void configSetDaylightSavingEnabled(int enabled)
configGetTvScreenType
int configGetTvScreenType(void)
libcdvd.h
ConfigParam
Definition: osd_config.h:82
Config2Param::version
u8 version
Definition: osd_config.h:119
ConfigParam::version
u32 version
Definition: osd_config.h:95
ConfigParam::screenType
u32 screenType
Definition: osd_config.h:87
Config2Param::dateFormat
u8 dateFormat
Definition: osd_config.h:115
ConfigParam::timezoneOffset
u32 timezoneOffset
Definition: osd_config.h:99
configGetTimezone
int configGetTimezone(void)
configGetLanguage
int configGetLanguage(void)
configGetDateFormat
int configGetDateFormat(void)
_io_driver
Definition: rom0_info.h:24
configIsDaylightSavingEnabled
int configIsDaylightSavingEnabled(void)
ConfigParam::ps1drvConfig
u32 ps1drvConfig
Definition: osd_config.h:93
configGetTimeFormat
int configGetTimeFormat(void)
configSetTimeFormat
void configSetTimeFormat(int timeFormat)
configSetLanguage
void configSetLanguage(int language)
tamtypes.h
configConvertToGmtTime
void configConvertToGmtTime(sceCdCLOCK *time)
ConfigParam::japLanguage
u32 japLanguage
Definition: osd_config.h:91
configSetDateFormat
void configSetDateFormat(int dateFormat)
Config2Param
Definition: osd_config.h:105
Config2Param::language
u8 language
Definition: osd_config.h:121
TV_SCREEN_TYPES
TV_SCREEN_TYPES
Definition: osd_config.h:56
Config2Param::daylightSaving
u8 daylightSaving
Definition: osd_config.h:111
configSetSpdifEnabled
void configSetSpdifEnabled(int enabled)
VIDEO_OUTPUT_TYPES
VIDEO_OUTPUT_TYPES
Definition: osd_config.h:63
configSetTimezone
void configSetTimezone(int offset)
TIME_FORMAT_TYPES
TIME_FORMAT_TYPES
Definition: osd_config.h:76
configIsSpdifEnabled
int configIsSpdifEnabled(void)
DATE_FORMAT_TYPES
DATE_FORMAT_TYPES
Definition: osd_config.h:69