sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
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
25#ifndef __OSD_CONFIG_H__
26#define __OSD_CONFIG_H__
27
28#include <tamtypes.h>
29#include <rom0_info.h>
30#ifndef OSD_CONFIG_NO_LIBCDVD
31#include <libcdvd.h>
32#endif
33
36 LANGUAGE_JAPANESE = 0,
37 LANGUAGE_ENGLISH,
38 LANGUAGE_FRENCH,
39 LANGUAGE_SPANISH,
40 LANGUAGE_GERMAN,
41 LANGUAGE_ITALIAN,
42 LANGUAGE_DUTCH,
43 LANGUAGE_PORTUGUESE,
44 /* Language values after here are not officially documented.
45 Are supported by neither this library nor the original Sony libscf library,
46 but can be found in the MECHACON's NVRAM and are used exclusively by the OSDs of consoles that support these languages.
47 However, these consoles will always specify English within ConfigParam.
48
49 When ConfigParam.version is 2, the true language can be found in Config2Param.language. */
50 LANGUAGE_RUSSIAN,
51 LANGUAGE_KOREAN,
52 LANGUAGE_TRAD_CHINESE,
53 LANGUAGE_SIMPL_CHINESE
54};
55
58 TV_SCREEN_43 = 0,
59 TV_SCREEN_FULL,
60 TV_SCREEN_169
61};
62
65 VIDEO_OUTPUT_RGB = 0,
66 VIDEO_OUTPUT_COMPONENT
67};
68
71 DATE_YYYYMMDD = 0,
72 DATE_MMDDYYYY,
73 DATE_DDMMYYYY
74};
75
78 TIME_24H = 0,
79 TIME_12H,
80};
81
83typedef struct
84{
86 /*00*/ u32 spdifMode : 1;
88 /*01*/ u32 screenType : 2;
90 /*03*/ u32 videoOutput : 1;
92 /*04*/ u32 japLanguage : 1;
94 /*05*/ u32 ps1drvConfig : 8;
96 /*13*/ u32 version : 3;
98 /*16*/ u32 language : 5;
100 /*21*/ u32 timezoneOffset : 11;
102
106typedef struct
107{
108 /*00*/ u8 format;
109
110 /*00*/ u8 reserved : 4;
112 /*04*/ u8 daylightSaving : 1;
114 /*05*/ u8 timeFormat : 1;
116 /*06*/ u8 dateFormat : 2;
117
118 // Only used if ConfigParam.version = 2
120 /*00*/ u8 version;
122 /*00*/ u8 language;
124
125#ifdef __cplusplus
126extern "C" {
127#endif
128
132extern int configGetLanguage(void);
133static inline int configGetLanguageWithIODriver(const _io_driver *driver) { return configGetLanguage(); }
134
138extern void configSetLanguage(int language);
139static inline void configSetLanguageWithIODriver(int language, const _io_driver *driver) { configSetLanguage(language); }
140
144extern int configGetTvScreenType(void);
145static inline int configGetTvScreenTypeWithIODriver(const _io_driver *driver) { return configGetTvScreenType(); }
146
150extern void configSetTvScreenType(int screenType);
151static inline void configSetTvScreenTypeWithIODriver(int screenType, const _io_driver *driver) { configSetTvScreenType(screenType); }
152
156extern int configGetDateFormat(void);
157static inline int configGetDateFormatWithIODriver(const _io_driver *driver) { return configGetDateFormat(); }
158
162extern void configSetDateFormat(int dateFormat);
163static inline void configSetDateFormatWithIODriver(int dateFormat, const _io_driver *driver) { configSetDateFormat(dateFormat); }
164
169extern int configGetTimeFormat(void);
170static inline int configGetTimeFormatWithIODriver(const _io_driver *driver) { return configGetTimeFormat(); }
171
176extern void configSetTimeFormat(int timeFormat);
177static inline void configSetTimeFormatWithIODriver(int timeFormat, const _io_driver *driver) { configSetTimeFormat(timeFormat); }
178
182extern int configGetTimezone(void);
183static inline int configGetTimezoneWithIODriver(const _io_driver *driver) { return configGetTimezone(); }
184
188extern void configSetTimezone(int offset);
189static inline void configSetTimezoneWithIODriver(int offset, const _io_driver *driver, void *finishedCallback) { configSetTimezone(offset); }
190
194extern int configIsSpdifEnabled(void);
195static inline int configIsSpdifEnabledWithIODriver(const _io_driver *driver) { return configIsSpdifEnabled(); }
196
200extern void configSetSpdifEnabled(int enabled);
201static inline void configSetSpdifEnabledWithIODriver(int enabled, const _io_driver *driver) { configSetSpdifEnabled(enabled); }
202
206extern int configIsDaylightSavingEnabled(void);
207static inline int configIsDaylightSavingEnabledWithIODriver(const _io_driver *driver) { return configIsDaylightSavingEnabled(); }
208
212extern void configSetDaylightSavingEnabled(int enabled);
213static inline void configSetDaylightSavingEnabledWithIODriver(int enabled, const _io_driver *driver, void *finishedCallback) { configSetDaylightSavingEnabled(enabled); }
214
215#ifndef OSD_CONFIG_NO_LIBCDVD
219extern void configConvertToGmtTime(sceCdCLOCK *time);
220
224extern void configConvertToLocalTime(sceCdCLOCK *time);
225static inline void configConvertToLocalTimeWithIODriver(sceCdCLOCK *time, const _io_driver *driver) { configConvertToLocalTime(time); }
226#endif
227
228// Internal functions.
234extern int IsEarlyJap(ConfigParam config);
235
236#ifdef __cplusplus
237}
238#endif
239
240#endif /* __OSD_CONFIG_H__ */
int IsEarlyJap(ConfigParam config)
Definition osd_config.c:180
void configSetSpdifEnabled(int enabled)
Definition osd_config.c:395
int configGetTvScreenType(void)
Definition osd_config.c:217
void configSetTimeFormat(int timeFormat)
Definition osd_config.c:294
void configSetTimezone(int offset)
Definition osd_config.c:348
int configGetTimezone(void)
Definition osd_config.c:314
int configGetLanguage(void)
Definition osd_config.c:185
VIDEO_OUTPUT_TYPES
Definition osd_config.h:64
TV_SCREEN_TYPES
Definition osd_config.h:57
void configSetDateFormat(int dateFormat)
Definition osd_config.c:259
void configSetLanguage(int language)
Definition osd_config.c:198
DATE_FORMAT_TYPES
Definition osd_config.h:70
TIME_FORMAT_TYPES
Definition osd_config.h:77
int configGetDateFormat(void)
Definition osd_config.c:244
OSD_LANGUAGES
Definition osd_config.h:35
void configConvertToGmtTime(sceCdCLOCK *time)
Definition osd_config.c:439
int configIsSpdifEnabled(void)
Definition osd_config.c:384
void configSetDaylightSavingEnabled(int enabled)
Definition osd_config.c:423
int configGetTimeFormat(void)
Definition osd_config.c:279
void configSetTvScreenType(int screenType)
Definition osd_config.c:228
int configIsDaylightSavingEnabled(void)
Definition osd_config.c:407
void configConvertToLocalTime(sceCdCLOCK *time)
Definition osd_config.c:444
u32 ps1drvConfig
Definition osd_config.h:94
u32 timezoneOffset
Definition osd_config.h:100
u32 videoOutput
Definition osd_config.h:90
u32 japLanguage
Definition osd_config.h:92