PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
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
82typedef 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;
101
105typedef 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;
123
124#ifdef __cplusplus
125extern "C" {
126#endif
127
132int configGetLanguageWithIODriver(_io_driver *driver);
133
137void configSetLanguage(int language);
138void configSetLanguageWithIODriver(int language, _io_driver *driver);
139
140
145int configGetTvScreenTypeWithIODriver(_io_driver *driver);
146
150void configSetTvScreenType(int screenType);
151void configSetTvScreenTypeWithIODriver(int screenType, _io_driver *driver);
152
157int configGetDateFormatWithIODriver(_io_driver *driver);
158
162void configSetDateFormat(int dateFormat);
163void configSetDateFormatWithIODriver(int dateFormat, _io_driver *driver);
164
170int configGetTimeFormatWithIODriver(_io_driver *driver);
171
176void configSetTimeFormat(int timeFormat);
177void configSetTimeFormatWithIODriver(int timeFormat, _io_driver *driver);
178
183int configGetTimezoneWithIODriver(_io_driver *driver);
184
188void configSetTimezone(int offset);
189void configSetTimezoneWithIODriver(int timezoneOffset, _io_driver *driver, void (*finishedCallback)(void));
190
195int configIsSpdifEnabledWithIODriver(_io_driver *driver);
196
200void configSetSpdifEnabled(int enabled);
201void configSetSpdifEnabledWithIODriver(int enabled, _io_driver *driver);
202
207int configIsDaylightSavingEnabledWithIODriver(_io_driver *driver);
208
213void configSetDaylightSavingEnabledWithIODriver(int daylightSaving, _io_driver *driver, void (*finishedCallback)(void));
214
215#ifndef OSD_CONFIG_NO_LIBCDVD
220void configConvertToLocalTimeWithIODriver(sceCdCLOCK *time, _io_driver *driver);
221#endif
222
223// Internal functions.
230
231#ifdef __cplusplus
232}
233#endif
234
235#endif /* __OSD_CONFIG_H__ */
int IsEarlyJap(ConfigParam config)
void configSetSpdifEnabled(int enabled)
int configGetTvScreenType(void)
void configSetTimeFormat(int timeFormat)
void configSetTimezone(int offset)
int configGetTimezone(void)
int configGetLanguage(void)
VIDEO_OUTPUT_TYPES
Definition osd_config.h:63
TV_SCREEN_TYPES
Definition osd_config.h:56
void configSetDateFormat(int dateFormat)
void configSetLanguage(int language)
DATE_FORMAT_TYPES
Definition osd_config.h:69
TIME_FORMAT_TYPES
Definition osd_config.h:76
u32 ps1drvConfig
Definition osd_config.h:93
u32 timezoneOffset
Definition osd_config.h:99
int configGetDateFormat(void)
OSD_LANGUAGES
Definition osd_config.h:34
void configConvertToGmtTime(sceCdCLOCK *time)
int configIsSpdifEnabled(void)
void configSetDaylightSavingEnabled(int enabled)
int configGetTimeFormat(void)
void configSetTvScreenType(int screenType)
int configIsDaylightSavingEnabled(void)
u32 videoOutput
Definition osd_config.h:89
u32 japLanguage
Definition osd_config.h:91