16#ifndef __LIBCDVD_COMMON_H__
17#define __LIBCDVD_COMMON_H__
23#define SCE_CdSTREAM 0x40000000
25enum SCECdvdSectorType {
64enum SCECdvdMModeMediaType {
101 SCECdErSFRMTNG = 0x38,
110 SCECdGDTFUNCFAIL = -1,
257#define btoi(b) ((b) / 16 * 10 + (b) % 16)
260#define itob(i) ((i) / 10 * 16 + (i) % 10)
266enum SCECdvdCallbackReason {
308#define CdlLEDPowerRed 1
310#define CdlLEDPowerGreen 2
312#define CdlLEDPowerYellow 4
314#define CdlLEDEjectBlue 8
318#define CdlRCDisablePowerReset 1
320#define CdlRCDisablePowerOff 2
322#define CdlRCDisableReset 4
324#define CdlRCDisableEject 8
326#define CdlRCDisablePowerOn 0x10
330#define CdlRTCStatClockStopDetected 1
332#define CdlRTCStatClockBatteryMonitoringVoltageProblem 2
334#define CdlRTCStatCTLRegProblem 4
336#define CdlRTCStatCommandError 128
340#define CdlWakeUpReasonMainPowerOn 0
342#define CdlWakeUpReasonMainReset 1
344#define CdlWakeUpReasonMainTimer 2
346#define CdlWakeUpReasonMainDevice 3
349#define CdlWakeUpReasonExtraSupportHard 0
351#define CdlWakeUpReasonExtraReset 1
353#define CdlWakeUpReasonExtraGameReset 2
355#define CdlWakeUpReasonExtraTimer 3
357#define CdlWakeUpReasonExtraPowerOn 4
359#define CdlWakeUpReasonExtraSlotIn 7
360#define CdlWakeUpReasonExtraBackGround 8
371#define SCECdNoCheckReady 0x00000001
372#define SCECdNoWriteBackDCache 0x00000002
390int sceCdReadDVDV(u32 lbn, u32 sectors,
void *buffer,
sceCdRMode *mode);
391int sceCdReadCDDA(u32 lbn, u32 sectors,
void *buffer,
sceCdRMode *mode);
587int sceCdStRead(u32 sectors, u32 *buffer, u32 mode, u32 *error);
609int sceCdStInit(u32 bufmax, u32 bankmax,
void *buffer);
720int sceCdDecSet(
unsigned char enable_xor,
unsigned char enable_shift,
unsigned char shiftval);
730int sceCdReadKey(
unsigned char arg1,
unsigned char arg2,
unsigned int command,
unsigned char *key);
1172#define CdvdFileSpec_t sceCdlFILE
1173#define cd_file_t sceCdlFILE
1177#define CdvdReadMode_t sceCdRMode
1178#define cd_read_mode_t sceCdRMode
1185#define SCECdvdSectorTypes SCECdvdSectorType
1186#define CdvdSectorType_t SCECdvdSectorType
1187#define CDVD_SECTOR_2048 SCECdSecS2048
1188#define CDVD_SECTOR_2328 SCECdSecS2328
1189#define CDVD_SECTOR_2340 SCECdSecS2340
1190#define CDVD_SECTOR_2352 SCECdSecS2352
1191#define CDVD_SECTOR_2368 SCECdSecS2368
1192#define CDVD_SECTOR_2448 SCECdSecS2448
1193#define CdSecS2048 SCECdSecS2048
1194#define CdSecS2328 SCECdSecS2328
1195#define CdSecS2340 SCECdSecS2340
1198#define SCECdvdSpinValues SCECdvdSpinValue
1199#define CDVD_SPIN_MAX SCECdSpinMax
1200#define CDVD_SPIN_NORMAL SCECdSpinNom
1201#define CDVD_SPIN_STREAM SCECdSpinStm
1202#define CDVD_SPIN_DVD0 SCECdSpinDvdDL0
1203#define CdSpinMax SCECdSpinMax
1204#define CdSpinNom SCECdSpinNom
1205#define CdSpinStm SCECdSpinStm
1208#define SCECdvdErrorCodes SCECdvdErrorCode
1209#define CDVD_ERR_FAIL SCECdErFAIL
1210#define CDVD_ERR_NO SCECdErNO
1211#define CDVD_ERR_ABRT SCECdErABRT
1212#define CDVD_ERR_CMD SCECdErCMD
1213#define CDVD_ERR_OPENS SCECdErOPENS
1214#define CDVD_ERR_NODISC SCECdErNODISC
1215#define CDVD_ERR_NORDY SCECdErNORDY
1216#define CDVD_ERR_CUD SCECdErCUD
1217#define CDVD_ERR_IPI SCECdErIPI
1218#define CDVD_ERR_ILI SCECdErILI
1219#define CDVD_ERR_PRM SCECdErPRM
1220#define CDVD_ERR_READ SCECdErREAD
1221#define CDVD_ERR_TRMOPN SCECdErTRMOPN
1222#define CDVD_ERR_EOM SCECdErEOM
1223#define CDVD_ERR_READCF SCECdErREADCF
1224#define CDVD_ERR_READCFR SCECdErREADCFR
1227#define SCECdvdMediaTypes SCECdvdMediaType
1228#define CdvdDiscType_t SCECdvdMediaType
1229#define CDVD_TYPE_NODISK SCECdNODISC
1230#define CDVD_TYPE_DETECT SCECdDETCT
1231#define CDVD_TYPE_DETECT_CD SCECdDETCTCD
1232#define CDVD_TYPE_DETECT_DVDSINGLE SCECdDETCTDVDS
1233#define CDVD_TYPE_DETECT_DVDDUAL SCECdDETCTDVDD
1234#define CDVD_TYPE_UNKNOWN SCECdUNKNOWN
1235#define CDVD_TYPE_PS1CD SCECdPSCD
1236#define CDVD_TYPE_PS1CDDA SCECdPSCDDA
1237#define CDVD_TYPE_PS2CD SCECdPS2CD
1238#define CDVD_TYPE_PS2CDDA SCECdPS2CDDA
1239#define CDVD_TYPE_PS2DVD SCECdPS2DVD
1240#define CDVD_TYPE_CDDA SCECdCDDA
1241#define CDVD_TYPE_DVDVIDEO SCECdDVDV
1242#define CDVD_TYPE_ILLEGAL SCECdIllegalMedia
1245#define SCECdvdDriveStates SCECdvdDriveState
1246#define CDVD_STAT_STOP SCECdStatStop
1247#define CDVD_STAT_OPEN SCECdStatShellOpen
1248#define CDVD_STAT_SPIN SCECdStatSpin
1249#define CDVD_STAT_READ SCECdStatRead
1250#define CDVD_STAT_PAUSE SCECdStatPause
1251#define CDVD_STAT_SEEK SCECdStatSeek
1252#define CDVD_STAT_ERROR SCECdStatEmg
1255#define SCECdvdMModeMediaTypes SCECdvdMModeMediaType
1256#define CdvdMediaMode_t SCECdvdMModeMediaType
1257#define CDVD_MEDIA_MODE_CD SCECdMmodeCd
1258#define CDVD_MEDIA_MODE_DVD SCECdMmodeDvd
1259#define CdMmodeCd SCECdMmodeCd
1260#define CdMmodeDvd SCECdMmodeDvd
1263#define CdvdLocation_t sceCdlLOCCD
1264#define cd_location_t sceCdlLOCCD
1268#define SCECdvdInitModes SCECdvdInitMode
1269#define CDVD_INIT_INIT SCECdINIT
1270#define CDVD_INIT_NOCHECK SCECdINoD
1271#define CDVD_INIT_EXIT SCECdEXIT
1274#define SCECdvdInterruptCodes SCECdvdInterruptCode
1275#define CDVD_READY_READY SCECdComplete
1276#define CDVD_READY_NOTREADY SCECdNotReady
1279#define CdvdClock_t sceCdCLOCK
1280#define cd_clock_t sceCdCLOCK
1286#define SCECdvdStreamModes SCECdvdStreamMode
1287#define CDVD_STREAM_NONBLOCK STMNBLK
1288#define CDVD_STREAM_BLOCK STMBLK
1291#define SCECdvdTrayReqModes SCECdvdTrayReqMode
1292#define CDVD_TRAY_OPEN SCECdTrayOpen
1293#define CDVD_TRAY_CLOSE SCECdTrayClose
1294#define CDVD_TRAY_CHECK SCECdTrayCheck
1297#define CdCBFunc sceCdCBFunc
1300#define SCECdvdCallbackReasons SCECdvdCallbackReason
1304#define CdInit sceCdInit
1305#define cdInit sceCdInit
1306#define CdStandby sceCdStandby
1307#define cdStandby sceCdStandby
1308#define CdRead sceCdRead
1309#define cdRead sceCdRead
1310#define CdSeek sceCdSeek
1311#define cdSeek sceCdSeek
1312#define CdGetError sceCdGetError
1313#define cdGetError sceCdGetError
1314#define CdGetToc sceCdGetToc
1315#define cdGetToc sceCdGetToc
1316#define CdSearchFile sceCdSearchFile
1317#define cdSearchFile sceCdSearchFile
1318#define CdSync sceCdSync
1319#define cdSync sceCdSync
1320#define CdGetDiskType sceCdGetDiskType
1321#define cdGetDiscType sceCdGetDiskType
1322#define CdDiskReady sceCdDiskReady
1323#define cdDiskReady sceCdDiskReady
1324#define CdTrayReq sceCdTrayReq
1325#define cdTrayReq sceCdTrayReq
1326#define CdStop sceCdStop
1327#define cdStop sceCdStop
1328#define CdPosToInt sceCdPosToInt
1329#define cdPosToInt sceCdPosToInt
1330#define CdIntToPos sceCdIntToPos
1331#define cdIntToPos sceCdIntToPos
1332#define CdReadClock sceCdReadClock
1333#define cdReadClock sceCdReadClock
1334#define CdStatus sceCdStatus
1335#define cdStatus sceCdStatus
1336#define CdCallback sceCdCallback
1337#define cdSetCallback sceCdCallback
1338#define CdPause sceCdPause
1339#define cdPause sceCdPause
1340#define CdBreak sceCdBreak
1341#define cdBreak sceCdBreak
1342#define CdReadCdda sceCdReadCdda
1343#define cdCddaRead sceCdReadCdda
1344#define CdGetReadPos sceCdGetReadPos
1345#define cdGetReadPos sceCdGetReadPos
1346#define CdMmode sceCdMmode
1347#define cdSetMediaMode sceCdMmode
1349#define cdDvdRead sceCdReadDVDV
1350#define cdApplyNCmd sceCdApplyNCmd
1351#define cdReadIOPMem sceCdReadIOPMem
1352#define cdNCmdDiskReady sceCdNCmdDiskReady
1353#define cdReadChain sceCdReadChain
1354#define cdWriteClock sceCdWriteClock
1355#define cdApplySCmd sceCdApplySCmd
1356#define cdCancelPowerOff sceCdCancelPOffRdy
1357#define cdBlueLedCtrl sceCdBlueLEDCtl
1358#define sceCdBlueLedCtrl sceCdBlueLEDCtl
1359#define cdPowerOff sceCdPowerOff
1360#define cdChangeThreadPriority sceCdChangeThreadPriority
1361#define cdStStart sceCdStStart
1362#define cdStRead sceCdStRead
1363#define cdStStop sceCdStStop
1364#define cdStSeek sceCdStSeek
1365#define cdStInit sceCdStInit
1366#define cdStStat sceCdStStat
1367#define cdStPause sceCdStPause
1368#define cdStResume sceCdStResume
int sceCdReadModelID(unsigned int *id)
int sceCdStSeekF(unsigned int lsn)
void * sceCdPOffCallback(void(*func)(void *), void *addr)
int sceCdSearchFile(sceCdlFILE *file, const char *name)
int sceCdXLEDCtl(u8 arg1, u8 arg2, u32 *result1, u32 *result2)
int sceCdRcBypassCtl(int mode, u32 *status)
int sceCdCancelPOffRdy(u32 *result)
int sceCdReadRegionParams(u32 *arg1, u32 *result)
int sceCdPowerOff(u32 *result)
int sceRemote2_7(u16 param, u32 *status)
int sceCdSetFanProfile(u8 param, u32 *result)
int sceCdDoesUniqueKeyExist(u32 *status)
int sceCdStRead(u32 sectors, u32 *buffer, u32 mode, u32 *error)
int sceCdGetMediumRemoval(u32 *result1, u32 *result2)
int sceCdReadSUBQ(void *buffer, u32 *status)
int sceCdSetHDMode(u32 mode)
int sceCdReadKey(unsigned char arg1, unsigned char arg2, unsigned int command, unsigned char *key)
int sceCdInitEeCB(int priority, void *stackAddr, int stackSize)
int sceCdReadNVM(u32 address, u16 *data, u8 *result)
sceCdCBFunc sceCdCallback(sceCdCBFunc function)
int sceCdReadPS1BootParam(u8 *out, u32 *result)
int sceCdXDVRPReset(u8 arg1, u32 *result)
int sceCdSetMediumRemoval(u8 arg1, u32 *result)
int sceCdSendSCmd1D(int *arg1, unsigned int *arg2, unsigned int *arg3, u32 *status)
int sceCdReadDvdDualInfo(int *on_dual, unsigned int *layer1_start)
int sceCdCloseConfig(u32 *result)
int sceCdStInit(u32 bufmax, u32 bankmax, void *buffer)
int sceCdGetToc2(u8 *toc, int param)
int sceCdReadGUID(u64 *guid)
int sceCdChangeThreadPriority(int priority)
int sceCdDiskReady(int mode)
int sceCdForbidRead(u32 *result)
int sceCdRM(char *buffer, u32 *status)
u32 sceCdPosToInt(sceCdlLOCCD *p)
int sceCdReadConsoleID(u8 *buffer, u32 *result)
int sceCdLayerSearchFile(sceCdlFILE *fp, const char *path, int layer)
int sceCdReadClock(sceCdCLOCK *clock)
int sceCdWriteConfig(const void *buffer, u32 *result)
int sceCdWM(const char *buffer, u32 *status)
int sceCdWriteConsoleID(const u8 *buffer, u32 *status)
u32 sceCdGetReadPos(void)
int sceCdGetDiskType(void)
sceCdlLOCCD * sceCdIntToPos(u32 i, sceCdlLOCCD *p)
int sceCdGetWakeUpReason(void)
int sceCdMmode(int media)
int sceCdWI(const u8 *buffer, u32 *result)
int sceCdAutoAdjustCtrl(int mode, u32 *result)
int sceCdApplySCmd(u8 cmdNum, const void *inBuff, u16 inBuffSize, void *outBuff)
int sceCdXBSPowerCtl(u8 arg1, u8 arg2, u32 *result1, u32 *result2)
int sceRemote2_7Get(u32 *param, u32 *status)
int sceCdSetTimeout(int param, int timeout)
int sceCdStStart(u32 lbn, sceCdRMode *mode)
int sceCdBootCertify(const u8 *romname)
int sceCdChgSys(u32 arg1)
int sceCdReadConfig(void *buffer, u32 *result)
int sceCdMV(u8 *buffer, u32 *status)
void(* sceCdCBFunc)(int reason)
int sceCdWriteNVM(u32 address, u16 data, u8 *result)
int sceCdReadFull(unsigned int lsn, unsigned int sectors, void *buf, sceCdRMode *mode)
int sceCdDecSet(unsigned char enable_xor, unsigned char enable_shift, unsigned char shiftval)
int sceCdBuzzerCtl(u32 *result)
int sceCdRI(u8 *buffer, u32 *result)
int sceCdNoticeGameStart(u8 arg1, u32 *result)
int sceCdReadWakeUpTime(sceCdCLOCK *clock, u16 *userdata, u32 *wakeupreason, int *flags)
int sceCdForbidDVDP(u32 *result)
int sceCdRead(u32 lbn, u32 sectors, void *buffer, sceCdRMode *mode)
int sceCdApplyNCmd(u8 cmdNum, const void *inBuff, u16 inBuffSize)
int sceCdWriteWakeUpTime(const sceCdCLOCK *clock, u16 userdata, int flags)
int sceCdRE(unsigned int lsn, unsigned int sectors, void *buf, sceCdRMode *mode)
int sceCdReadChain(sceCdRChain *tag, sceCdRMode *mode)
int sceCdOpenConfig(int block, int mode, int NumBlocks, u32 *status)
int sceCdTrayReq(int param, u32 *traychk)
int sceCdSetLEDsMode(u32 param, u32 *result)
int sceCdWriteClock(sceCdCLOCK *clock)
int sceCdWriteRegionParams(u8 arg1, u32 *arg2, u8 *arg3, u32 *result)
int sceCdBlueLEDCtl(u8 control, u32 *result)
int sceCdCtrlADout(int mode, u32 *status)