PS2SDK
PS2 Homebrew Libraries
libcdvd-common.h File Reference
#include <tamtypes.h>
+ Include dependency graph for libcdvd-common.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sceCdCLOCK
 
struct  sceCdlFILE
 
struct  sceCdlLOCCD
 
struct  sceCdRMode
 
struct  sceCdRChain
 

Macros

#define SCE_CdSTREAM   0x40000000
 
#define btoi(b)   ((b) / 16 * 10 + (b) % 16)
 
#define itob(i)   ((i) / 10 * 16 + (i) % 10)
 
#define CdlMAXTOC   100
 
#define CdlMAXFILE   64
 
#define CdlMAXDIR   128
 
#define CdlMAXLEVEL   8
 
#define CdlLEDPowerRed   1
 
#define CdlLEDPowerGreen   2
 
#define CdlLEDPowerYellow   4
 
#define CdlLEDEjectBlue   8
 
#define CdlRCDisablePowerReset   1
 
#define CdlRCDisablePowerOff   2
 
#define CdlRCDisableReset   4
 
#define CdlRCDisableEject   8
 
#define CdlRCDisablePowerOn   0x10
 
#define CdlRTCStatClockStopDetected   1
 
#define CdlRTCStatClockBatteryMonitoringVoltageProblem   2
 
#define CdlRTCStatCTLRegProblem   4
 
#define CdlRTCStatCommandError   128
 
#define CdlWakeUpReasonMainPowerOn   0
 
#define CdlWakeUpReasonMainReset   1
 
#define CdlWakeUpReasonMainTimer   2
 
#define CdlWakeUpReasonMainDevice   3
 
#define CdlWakeUpReasonExtraSupportHard   0
 
#define CdlWakeUpReasonExtraReset   1
 
#define CdlWakeUpReasonExtraGameReset   2
 
#define CdlWakeUpReasonExtraTimer   3
 
#define CdlWakeUpReasonExtraPowerOn   4
 
#define CdlWakeUpReasonExtraSlotIn   7
 
#define CdlWakeUpReasonExtraBackGround   8
 
#define SCECdNoCheckReady   0x00000001
 
#define SCECdNoWriteBackDCache   0x00000002
 
#define CdvdFileSpec_t   sceCdlFILE
 
#define cd_file_t   sceCdlFILE
 
#define CdvdReadMode_t   sceCdRMode
 
#define cd_read_mode_t   sceCdRMode
 
#define SCECdvdSectorTypes   SCECdvdSectorType
 
#define CdvdSectorType_t   SCECdvdSectorType
 
#define CDVD_SECTOR_2048   SCECdSecS2048
 
#define CDVD_SECTOR_2328   SCECdSecS2328
 
#define CDVD_SECTOR_2340   SCECdSecS2340
 
#define CDVD_SECTOR_2352   SCECdSecS2352
 
#define CDVD_SECTOR_2368   SCECdSecS2368
 
#define CDVD_SECTOR_2448   SCECdSecS2448
 
#define CdSecS2048   SCECdSecS2048
 
#define CdSecS2328   SCECdSecS2328
 
#define CdSecS2340   SCECdSecS2340
 
#define SCECdvdSpinValues   SCECdvdSpinValue
 
#define CDVD_SPIN_MAX   SCECdSpinMax
 
#define CDVD_SPIN_NORMAL   SCECdSpinNom
 
#define CDVD_SPIN_STREAM   SCECdSpinStm
 
#define CDVD_SPIN_DVD0   SCECdSpinDvdDL0
 
#define CdSpinMax   SCECdSpinMax
 
#define CdSpinNom   SCECdSpinNom
 
#define CdSpinStm   SCECdSpinStm
 
#define SCECdvdErrorCodes   SCECdvdErrorCode
 
#define CDVD_ERR_FAIL   SCECdErFAIL
 
#define CDVD_ERR_NO   SCECdErNO
 
#define CDVD_ERR_ABRT   SCECdErABRT
 
#define CDVD_ERR_CMD   SCECdErCMD
 
#define CDVD_ERR_OPENS   SCECdErOPENS
 
#define CDVD_ERR_NODISC   SCECdErNODISC
 
#define CDVD_ERR_NORDY   SCECdErNORDY
 
#define CDVD_ERR_CUD   SCECdErCUD
 
#define CDVD_ERR_IPI   SCECdErIPI
 
#define CDVD_ERR_ILI   SCECdErILI
 
#define CDVD_ERR_PRM   SCECdErPRM
 
#define CDVD_ERR_READ   SCECdErREAD
 
#define CDVD_ERR_TRMOPN   SCECdErTRMOPN
 
#define CDVD_ERR_EOM   SCECdErEOM
 
#define CDVD_ERR_READCF   SCECdErREADCF
 
#define CDVD_ERR_READCFR   SCECdErREADCFR
 
#define SCECdvdMediaTypes   SCECdvdMediaType
 
#define CdvdDiscType_t   SCECdvdMediaType
 
#define CDVD_TYPE_NODISK   SCECdNODISC
 
#define CDVD_TYPE_DETECT   SCECdDETCT
 
#define CDVD_TYPE_DETECT_CD   SCECdDETCTCD
 
#define CDVD_TYPE_DETECT_DVDSINGLE   SCECdDETCTDVDS
 
#define CDVD_TYPE_DETECT_DVDDUAL   SCECdDETCTDVDD
 
#define CDVD_TYPE_UNKNOWN   SCECdUNKNOWN
 
#define CDVD_TYPE_PS1CD   SCECdPSCD
 
#define CDVD_TYPE_PS1CDDA   SCECdPSCDDA
 
#define CDVD_TYPE_PS2CD   SCECdPS2CD
 
#define CDVD_TYPE_PS2CDDA   SCECdPS2CDDA
 
#define CDVD_TYPE_PS2DVD   SCECdPS2DVD
 
#define CDVD_TYPE_CDDA   SCECdCDDA
 
#define CDVD_TYPE_DVDVIDEO   SCECdDVDV
 
#define CDVD_TYPE_ILLEGAL   SCECdIllegalMedia
 
#define SCECdvdDriveStates   SCECdvdDriveState
 
#define CDVD_STAT_STOP   SCECdStatStop
 
#define CDVD_STAT_OPEN   SCECdStatShellOpen
 
#define CDVD_STAT_SPIN   SCECdStatSpin
 
#define CDVD_STAT_READ   SCECdStatRead
 
#define CDVD_STAT_PAUSE   SCECdStatPause
 
#define CDVD_STAT_SEEK   SCECdStatSeek
 
#define CDVD_STAT_ERROR   SCECdStatEmg
 
#define SCECdvdMModeMediaTypes   SCECdvdMModeMediaType
 
#define CdvdMediaMode_t   SCECdvdMModeMediaType
 
#define CDVD_MEDIA_MODE_CD   SCECdMmodeCd
 
#define CDVD_MEDIA_MODE_DVD   SCECdMmodeDvd
 
#define CdMmodeCd   SCECdMmodeCd
 
#define CdMmodeDvd   SCECdMmodeDvd
 
#define CdvdLocation_t   sceCdlLOCCD
 
#define cd_location_t   sceCdlLOCCD
 
#define SCECdvdInitModes   SCECdvdInitMode
 
#define CDVD_INIT_INIT   SCECdINIT
 
#define CDVD_INIT_NOCHECK   SCECdINoD
 
#define CDVD_INIT_EXIT   SCECdEXIT
 
#define SCECdvdInterruptCodes   SCECdvdInterruptCode
 
#define CDVD_READY_READY   SCECdComplete
 
#define CDVD_READY_NOTREADY   SCECdNotReady
 
#define CdvdClock_t   sceCdCLOCK
 
#define cd_clock_t   sceCdCLOCK
 
#define SCECdvdStreamModes   SCECdvdStreamMode
 
#define CDVD_STREAM_NONBLOCK   STMNBLK
 
#define CDVD_STREAM_BLOCK   STMBLK
 
#define SCECdvdTrayReqModes   SCECdvdTrayReqMode
 
#define CDVD_TRAY_OPEN   SCECdTrayOpen
 
#define CDVD_TRAY_CLOSE   SCECdTrayClose
 
#define CDVD_TRAY_CHECK   SCECdTrayCheck
 
#define CdCBFunc   sceCdCBFunc
 
#define SCECdvdCallbackReasons   SCECdvdCallbackReason
 
#define CdInit   sceCdInit
 
#define cdInit   sceCdInit
 
#define CdStandby   sceCdStandby
 
#define cdStandby   sceCdStandby
 
#define CdRead   sceCdRead
 
#define cdRead   sceCdRead
 
#define CdSeek   sceCdSeek
 
#define cdSeek   sceCdSeek
 
#define CdGetError   sceCdGetError
 
#define cdGetError   sceCdGetError
 
#define CdGetToc   sceCdGetToc
 
#define cdGetToc   sceCdGetToc
 
#define CdSearchFile   sceCdSearchFile
 
#define cdSearchFile   sceCdSearchFile
 
#define CdSync   sceCdSync
 
#define cdSync   sceCdSync
 
#define CdGetDiskType   sceCdGetDiskType
 
#define cdGetDiscType   sceCdGetDiskType
 
#define CdDiskReady   sceCdDiskReady
 
#define cdDiskReady   sceCdDiskReady
 
#define CdTrayReq   sceCdTrayReq
 
#define cdTrayReq   sceCdTrayReq
 
#define CdStop   sceCdStop
 
#define cdStop   sceCdStop
 
#define CdPosToInt   sceCdPosToInt
 
#define cdPosToInt   sceCdPosToInt
 
#define CdIntToPos   sceCdIntToPos
 
#define cdIntToPos   sceCdIntToPos
 
#define CdReadClock   sceCdReadClock
 
#define cdReadClock   sceCdReadClock
 
#define CdStatus   sceCdStatus
 
#define cdStatus   sceCdStatus
 
#define CdCallback   sceCdCallback
 
#define cdSetCallback   sceCdCallback
 
#define CdPause   sceCdPause
 
#define cdPause   sceCdPause
 
#define CdBreak   sceCdBreak
 
#define cdBreak   sceCdBreak
 
#define CdReadCdda   sceCdReadCdda
 
#define cdCddaRead   sceCdReadCdda
 
#define CdGetReadPos   sceCdGetReadPos
 
#define cdGetReadPos   sceCdGetReadPos
 
#define CdMmode   sceCdMmode
 
#define cdSetMediaMode   sceCdMmode
 
#define cdDvdRead   sceCdReadDVDV
 
#define cdApplyNCmd   sceCdApplyNCmd
 
#define cdReadIOPMem   sceCdReadIOPMem
 
#define cdNCmdDiskReady   sceCdNCmdDiskReady
 
#define cdReadChain   sceCdReadChain
 
#define cdWriteClock   sceCdWriteClock
 
#define cdApplySCmd   sceCdApplySCmd
 
#define cdCancelPowerOff   sceCdCancelPOffRdy
 
#define cdBlueLedCtrl   sceCdBlueLEDCtl
 
#define sceCdBlueLedCtrl   sceCdBlueLEDCtl
 
#define cdPowerOff   sceCdPowerOff
 
#define cdChangeThreadPriority   sceCdChangeThreadPriority
 
#define cdStStart   sceCdStStart
 
#define cdStRead   sceCdStRead
 
#define cdStStop   sceCdStStop
 
#define cdStSeek   sceCdStSeek
 
#define cdStInit   sceCdStInit
 
#define cdStStat   sceCdStStat
 
#define cdStPause   sceCdStPause
 
#define cdStResume   sceCdStResume
 
#define CdRC   sceCdRC
 

Typedefs

typedef void(* sceCdCBFunc) (int reason)
 

Enumerations

enum  SCECdvdSectorType {
  SCECdSecS2048 = 0, SCECdSecS2328, SCECdSecS2340, SCECdSecS2352 = 0,
  SCECdSecS2368, SCECdSecS2448
}
 
enum  SCECdvdSpinValue {
  SCECdSpinMax = 0, SCECdSpinStm = 0, SCECdSpinDvdDL0 = 0, SCECdSpinNom = 1,
  SCECdSpinX1, SCECdSpinX2, SCECdSpinX4, SCECdSpinX12,
  SCECdSpinNm2 = 10, SCECdSpin1p6, SCECdSpinMx = 20
}
 
enum  SCECdvdMModeMediaType { SCECdMmodeCd = 1, SCECdMmodeDvd }
 
enum  SCECdvdErrorCode {
  SCECdErFAIL = -1, SCECdErNO = 0x00, SCECdErABRT, SCECdErCMD = 0x10,
  SCECdErOPENS, SCECdErNODISC, SCECdErNORDY, SCECdErCUD,
  SCECdErIPI = 0x20, SCECdErILI, SCECdErPRM, SCECdErREAD = 0x30,
  SCECdErTRMOPN, SCECdErEOM, SCECdErSFRMTNG = 0x38, SCECdErREADCF = 0xFD,
  SCECdErREADCFR
}
 
enum  SCECdvdMediaType {
  SCECdGDTFUNCFAIL = -1, SCECdNODISC = 0x00, SCECdDETCT, SCECdDETCTCD,
  SCECdDETCTDVDS, SCECdDETCTDVDD, SCECdUNKNOWN, SCECdPSCD = 0x10,
  SCECdPSCDDA, SCECdPS2CD, SCECdPS2CDDA, SCECdPS2DVD,
  SCECdDVDVR = 0xFC, SCECdCDDA = 0xFD, SCECdDVDV, SCECdIllegalMedia
}
 
enum  SCECdvdInterruptCode {
  CdlNoIntr = 0x00, CdlDataReady, SCECdComplete, CdlAcknowledge,
  CdlDataEnd, CdlDiskError, SCECdNotReady
}
 
enum  SCECdvdTrayReqMode { SCECdTrayOpen = 0, SCECdTrayClose, SCECdTrayCheck }
 
enum  SCECdvdDriveState {
  SCECdStatStop = 0x00, SCECdStatShellOpen, SCECdStatSpin, SCECdStatRead = 0x06,
  SCECdStatPause = 0x0A, SCECdStatSeek = 0x12, SCECdStatEmg = 0x20
}
 
enum  SCECdvdCallbackReason {
  SCECdFuncRead = 1, SCECdFuncReadCDDA, SCECdFuncGetToc, SCECdFuncSeek,
  SCECdFuncStandby, SCECdFuncStop, SCECdFuncPause, SCECdFuncBreak
}
 
enum  SCECdvdInitMode { SCECdINIT = 0x00, SCECdINoD, SCECdEXIT = 0x05 }
 
enum  SCECdvdFanSpeed { SCECdvdFanSpeedMinimum = 0x00, SCECdvdFanSpeedMedium, SCECdvdFanSpeedMaximum }
 
enum  SCECdvdStreamMode { STMNBLK = 0, STMBLK }
 

Functions

int sceCdRead (u32 lbn, u32 sectors, void *buffer, sceCdRMode *mode)
 
int sceCdReadDVDV (u32 lbn, u32 sectors, void *buffer, sceCdRMode *mode)
 
int sceCdReadCDDA (u32 lbn, u32 sectors, void *buffer, sceCdRMode *mode)
 
int sceCdGetToc (u8 *toc)
 
int sceCdGetToc2 (u8 *toc, int param)
 
int sceCdSeek (u32 lbn)
 
int sceCdStandby (void)
 
int sceCdStop (void)
 
int sceCdPause (void)
 
int sceCdReadChain (sceCdRChain *tag, sceCdRMode *mode)
 
int sceCdApplyNCmd (u8 cmdNum, const void *inBuff, u16 inBuffSize)
 
int sceCdReadClock (sceCdCLOCK *clock)
 
int sceCdWriteClock (sceCdCLOCK *clock)
 
int sceCdGetDiskType (void)
 
int sceCdGetError (void)
 
int sceCdTrayReq (int param, u32 *traychk)
 
int sceCdStatus (void)
 
int sceCdBreak (void)
 
int sceCdCancelPOffRdy (u32 *result)
 
int sceCdBlueLEDCtl (u8 control, u32 *result)
 
int sceCdPowerOff (u32 *result)
 
int sceCdMmode (int media)
 
int sceCdChangeThreadPriority (int priority)
 
int sceCdApplySCmd (u8 cmdNum, const void *inBuff, u16 inBuffSize, void *outBuff)
 
int sceCdStStart (u32 lbn, sceCdRMode *mode)
 
int sceCdStRead (u32 sectors, u32 *buffer, u32 mode, u32 *error)
 
int sceCdStStop (void)
 
int sceCdStSeek (u32 lbn)
 
int sceCdStInit (u32 bufmax, u32 bankmax, void *buffer)
 
int sceCdStStat (void)
 
int sceCdStPause (void)
 
int sceCdStResume (void)
 
int sceCdInit (int mode)
 
int sceCdSync (int mode)
 
int sceCdSearchFile (sceCdlFILE *file, const char *name)
 
int sceCdDiskReady (int mode)
 
sceCdlLOCCDsceCdIntToPos (u32 i, sceCdlLOCCD *p)
 
u32 sceCdPosToInt (sceCdlLOCCD *p)
 
u32 sceCdGetReadPos (void)
 
int sceCdInitEeCB (int priority, void *stackAddr, int stackSize)
 
sceCdCBFunc sceCdCallback (sceCdCBFunc function)
 
int sceCdReadSUBQ (void *buffer, u32 *status)
 
int sceCdForbidDVDP (u32 *result)
 
int sceCdAutoAdjustCtrl (int mode, u32 *result)
 
int sceCdDecSet (unsigned char enable_xor, unsigned char enable_shift, unsigned char shiftval)
 
int sceCdReadKey (unsigned char arg1, unsigned char arg2, unsigned int command, unsigned char *key)
 
int sceCdDoesUniqueKeyExist (u32 *status)
 
int sceCdSetHDMode (u32 mode)
 
int sceCdOpenConfig (int block, int mode, int NumBlocks, u32 *status)
 
int sceCdCloseConfig (u32 *result)
 
int sceCdReadConfig (void *buffer, u32 *result)
 
int sceCdWriteConfig (const void *buffer, u32 *result)
 
int sceCdReadNVM (u32 address, u16 *data, u8 *result)
 
int sceCdWriteNVM (u32 address, u16 data, u8 *result)
 
int sceCdRI (u8 *buffer, u32 *result)
 
int sceCdWI (const u8 *buffer, u32 *result)
 
int sceCdReadConsoleID (u8 *buffer, u32 *result)
 
int sceCdWriteConsoleID (const u8 *buffer, u32 *status)
 
int sceCdCtrlADout (int mode, u32 *status)
 
int sceCdMV (u8 *buffer, u32 *status)
 
int sceCdBootCertify (const u8 *romname)
 
int sceCdRM (char *buffer, u32 *status)
 
int sceCdWM (const char *buffer, u32 *status)
 
int sceCdForbidRead (u32 *result)
 
int sceCdReadFull (unsigned int lsn, unsigned int sectors, void *buf, sceCdRMode *mode)
 
int sceCdStSeekF (unsigned int lsn)
 
void * sceCdPOffCallback (void(*func)(void *userdata), void *userdata)
 
int sceCdSetTimeout (int param, int timeout)
 
int sceCdReadModelID (unsigned int *id)
 
int sceCdReadDvdDualInfo (int *on_dual, unsigned int *layer1_start)
 
int sceCdLayerSearchFile (sceCdlFILE *fp, const char *path, int layer)
 
int sceCdStatus2 (void)
 
int sceCdRE (unsigned int lsn, unsigned int sectors, void *buf, sceCdRMode *mode)
 
int sceCdReadGUID (u64 *guid)
 
int sceCdRcBypassCtl (int mode, u32 *status)
 
int sceCdReadWakeUpTime (sceCdCLOCK *clock, u16 *userdata, u32 *wakeupreason, int *flags)
 
int sceCdWriteWakeUpTime (const sceCdCLOCK *clock, u16 userdata, int flags)
 
int sceRemote2_7 (u16 param, u32 *status)
 
int sceRemote2_7Get (u32 *param, u32 *status)
 
int sceCdSetLEDsMode (u32 param, u32 *result)
 
int sceCdReadPS1BootParam (u8 *out, u32 *result)
 
int sceCdSetFanProfile (u8 param, u32 *result)
 
int sceCdSendSCmd1D (int *arg1, unsigned int *arg2, unsigned int *arg3, u32 *status)
 
int sceCdChgSys (u32 arg1)
 
int sceCdNoticeGameStart (u8 arg1, u32 *result)
 
int sceCdXLEDCtl (u8 arg1, u8 arg2, u32 *result1, u32 *result2)
 
int sceCdBuzzerCtl (u32 *result)
 
int sceCdXBSPowerCtl (u8 arg1, u8 arg2, u32 *result1, u32 *result2)
 
int sceCdSetMediumRemoval (u8 arg1, u32 *result)
 
int sceCdGetMediumRemoval (u32 *result1, u32 *result2)
 
int sceCdXDVRPReset (u8 arg1, u32 *result)
 
int sceCdGetWakeUpReason (void)
 
int sceCdReadRegionParams (u32 *arg1, u32 *result)
 
int sceCdWriteRegionParams (u8 arg1, u32 *arg2, u8 *arg3, u32 *result)
 
int cdvdman_152_get_temperature (u32 *param, u32 *status)
 
int cdvdman_167_atapi2dragon (u8 *inbuf, u32 *status)
 
int cdvdman_169_dragon2atapi (u8 *outbuf, u32 *status)
 

Detailed Description

Common definitions for libcdvd on the EE and IOP

Definition in file libcdvd-common.h.


Data Structure Documentation

◆ sceCdCLOCK

struct sceCdCLOCK

Definition at line 188 of file libcdvd-common.h.

Data Fields
u8 stat

status

u8 second

second

u8 minute

minute

u8 hour

hour

u8 pad

padding

u8 day

day

u8 month

month

u8 year

year

◆ sceCdlFILE

struct sceCdlFILE

Definition at line 208 of file libcdvd-common.h.

Data Fields
u32 lsn

file location

u32 size

file size

char name[16]

file name (body)

u8 date[8]

date (1=secs, 2=mins, 3=hours, 4=day, 5=mon, 6,7=year, 0=iso file flags)

◆ sceCdlLOCCD

struct sceCdlLOCCD

Definition at line 221 of file libcdvd-common.h.

Data Fields
u8 minute

minute (BCD)

u8 second

second (BCD)

u8 sector

sector (BCD)

u8 track

track (void), aka "frame"

◆ sceCdRMode

struct sceCdRMode

Definition at line 233 of file libcdvd-common.h.

Data Fields
u8 trycount

number of times to retry reads when an error occurs

u8 spindlctrl

speed to read at SCECdvdSpinValue enumeration values (also speed to spin at)

u8 datapattern

sector size value SCECdvdSectorType enumeration values

u8 pad

padding

◆ sceCdRChain

struct sceCdRChain

Definition at line 245 of file libcdvd-common.h.

Data Fields
u32 lbn

sector location to start reading from

u32 sectors

number of sectors to read

u32 buffer

buffer address to read to ( bit0: 0=EE, 1=IOP ) (EE addresses must be on 64-byte alignment)

Macro Definition Documentation

◆ SCE_CdSTREAM

#define SCE_CdSTREAM   0x40000000

Open file for streaming

Definition at line 23 of file libcdvd-common.h.

◆ CdlMAXTOC

#define CdlMAXTOC   100

max number of toc entries for sceCdGetToc()

Definition at line 264 of file libcdvd-common.h.

◆ CdlMAXFILE

#define CdlMAXFILE   64

Maximum number of files in a directory.

Definition at line 291 of file libcdvd-common.h.

◆ CdlMAXDIR

#define CdlMAXDIR   128

Maximum number of total directories.

Definition at line 293 of file libcdvd-common.h.

◆ CdlMAXLEVEL

#define CdlMAXLEVEL   8

Maximum levels of directories.

Definition at line 295 of file libcdvd-common.h.

◆ CdlLEDPowerRed

#define CdlLEDPowerRed   1

Light up the red LED on the power button.

Definition at line 308 of file libcdvd-common.h.

◆ CdlLEDPowerGreen

#define CdlLEDPowerGreen   2

Light up the green LED on the power button.

Definition at line 310 of file libcdvd-common.h.

◆ CdlLEDPowerYellow

#define CdlLEDPowerYellow   4

Light up the yellow LED on the power button.

Definition at line 312 of file libcdvd-common.h.

◆ CdlLEDEjectBlue

#define CdlLEDEjectBlue   8

Light up the blue LED on the eject button.

Definition at line 314 of file libcdvd-common.h.

◆ CdlRCDisablePowerReset

#define CdlRCDisablePowerReset   1

Disable the power/reset functionalty. (RM_PS2_POWER)

Definition at line 318 of file libcdvd-common.h.

◆ CdlRCDisablePowerOff

#define CdlRCDisablePowerOff   2

Disable the power off functionality. (RM_PS2_POWEROFF)

Definition at line 320 of file libcdvd-common.h.

◆ CdlRCDisableReset

#define CdlRCDisableReset   4

Disable the reset functionalty. (RM_PS2_RESET)

Definition at line 322 of file libcdvd-common.h.

◆ CdlRCDisableEject

#define CdlRCDisableEject   8

Disable the eject functionalty. (RM_PS2_EJECT)

Definition at line 324 of file libcdvd-common.h.

◆ CdlRCDisablePowerOn

#define CdlRCDisablePowerOn   0x10

Disable the power on functionality. (RM_PS2_POWERON)

Definition at line 326 of file libcdvd-common.h.

◆ CdlRTCStatClockStopDetected

#define CdlRTCStatClockStopDetected   1

The RTC clock is stopped

Definition at line 330 of file libcdvd-common.h.

◆ CdlRTCStatClockBatteryMonitoringVoltageProblem

#define CdlRTCStatClockBatteryMonitoringVoltageProblem   2

There was an issue checking the RTC battery voltage

Definition at line 332 of file libcdvd-common.h.

◆ CdlRTCStatCTLRegProblem

#define CdlRTCStatCTLRegProblem   4

The Rohm RTC hardware returned an error

Definition at line 334 of file libcdvd-common.h.

◆ CdlRTCStatCommandError

#define CdlRTCStatCommandError   128

There was an error while preparing to send the command from Mechacon to RTC

Definition at line 336 of file libcdvd-common.h.

◆ CdlWakeUpReasonMainPowerOn

#define CdlWakeUpReasonMainPowerOn   0

The system was powered on using the front panel buttons or the remote

Definition at line 340 of file libcdvd-common.h.

◆ CdlWakeUpReasonMainReset

#define CdlWakeUpReasonMainReset   1

The system was reset using the front panel button, the remote, or the SCMD

Definition at line 342 of file libcdvd-common.h.

◆ CdlWakeUpReasonMainTimer

#define CdlWakeUpReasonMainTimer   2

The system was powered on because the timer set by sceCdWriteWakeUpTime expired

Definition at line 344 of file libcdvd-common.h.

◆ CdlWakeUpReasonMainDevice

#define CdlWakeUpReasonMainDevice   3

The system was powered on using the PON_REQ signal connected to the expansion bay port

Definition at line 346 of file libcdvd-common.h.

◆ CdlWakeUpReasonExtraReset

#define CdlWakeUpReasonExtraReset   1

The system was reset using the front panel button, the remote, or the SCMD

Definition at line 351 of file libcdvd-common.h.

◆ CdlWakeUpReasonExtraGameReset

#define CdlWakeUpReasonExtraGameReset   2

The system was reset using the "Quit Game" button

Definition at line 353 of file libcdvd-common.h.

◆ CdlWakeUpReasonExtraTimer

#define CdlWakeUpReasonExtraTimer   3

The system was powered on because the timer set by sceCdWriteWakeUpTime expired

Definition at line 355 of file libcdvd-common.h.

◆ CdlWakeUpReasonExtraPowerOn

#define CdlWakeUpReasonExtraPowerOn   4

The system was powered on using the front panel buttons or the remote

Definition at line 357 of file libcdvd-common.h.

◆ CdlWakeUpReasonExtraSlotIn

#define CdlWakeUpReasonExtraSlotIn   7

The system was powered on when an object was inserted into the disc slot

Definition at line 359 of file libcdvd-common.h.

Typedef Documentation

◆ sceCdCBFunc

typedef void(* sceCdCBFunc) (int reason)

sceCd callback function typedef for sceCdCallback()

Definition at line 278 of file libcdvd-common.h.

Enumeration Type Documentation

◆ SCECdvdSpinValue

Enumerator
SCECdSpinMax 

Spin at maximum speed

SCECdSpinStm 

Spins at the recommended speed for streaming data

SCECdSpinDvdDL0 

Spins at the DVD layer 0 speed

SCECdSpinNom 

Optimized speed. Starts reading at max speed, slows down as read errors occur.

SCECdSpinX1 

1x. For CDDA reading.

SCECdSpinX2 

2x

SCECdSpinX4 

4x

SCECdSpinX12 

12x

SCECdSpinNm2 

Optimized speed, based on current speed.

SCECdSpin1p6 

DVD x1.6 CLV

SCECdSpinMx 

Spin at maximum speed (Not sure what's the difference between this and SCECdSpinMax)

Definition at line 37 of file libcdvd-common.h.

◆ SCECdvdErrorCode

Enumerator
SCECdErFAIL 

Can't get error code

SCECdErNO 

No Error

SCECdErABRT 

Aborted

SCECdErCMD 

Unsupported command

SCECdErOPENS 

Tray is open

SCECdErNODISC 

No disc inserted

SCECdErNORDY 

Device not ready

SCECdErCUD 

Unsupported command for current disc

SCECdErIPI 

Illegal position/LSN

SCECdErILI 

Illegal length

SCECdErPRM 

Invalid parameter

SCECdErREAD 

Read error

SCECdErTRMOPN 

Tray was opened while reading

SCECdErEOM 

End Of Media

SCECdErREADCF 

Error setting command

SCECdErREADCFR 

Error setting command

Definition at line 69 of file libcdvd-common.h.

◆ SCECdvdMediaType

Enumerator
SCECdNODISC 

No Disc inserted

SCECdDETCT 

Detecting disc type

SCECdUNKNOWN 

Unknown disc type

SCECdPSCD 

PS1 CD with no CDDA tracks

SCECdPSCDDA 

PS1 CD with CDDA tracks

SCECdPS2CD 

PS2 CD with no CDDA tracks

SCECdPS2CDDA 

PS2 CD with CDDA tracks

SCECdPS2DVD 

PS2 DVD

SCECdDVDVR 

DVD-VR (Minimum mechacon firmware version: 50000)

SCECdCDDA 

CDDA

SCECdDVDV 

DVD Video

SCECdIllegalMedia 

Illegal disk type

Definition at line 109 of file libcdvd-common.h.

◆ SCECdvdInterruptCode

Enumerator
CdlNoIntr 

No interrupt

CdlDataReady 

Data Ready

SCECdComplete 

Command Complete

CdlAcknowledge 

Acknowledge (reserved)

CdlDataEnd 

End of Data Detected

CdlDiskError 

Error Detected

SCECdNotReady 

Drive Not Ready

Definition at line 142 of file libcdvd-common.h.

◆ SCECdvdTrayReqMode

Enumerator
SCECdTrayOpen 

Tray Open

SCECdTrayClose 

Tray Close

SCECdTrayCheck 

Tray Check

Definition at line 161 of file libcdvd-common.h.

◆ SCECdvdDriveState

Enumerator
SCECdStatStop 

disc has stopped spinning

SCECdStatShellOpen 

tray is open

SCECdStatSpin 

disc is spinning

SCECdStatRead 

reading from disc

SCECdStatPause 

disc is paused

SCECdStatSeek 

disc is seeking

SCECdStatEmg 

error occurred

Definition at line 171 of file libcdvd-common.h.

◆ SCECdvdInitMode

Enumerator
SCECdINIT 

Initializes library and waits until commands can be sent.

SCECdINoD 

Initialize only the library.

SCECdEXIT 

Deinitialize library.

Definition at line 280 of file libcdvd-common.h.

◆ SCECdvdFanSpeed

Enumerator
SCECdvdFanSpeedMinimum 

The fan will spin at the minimum speed.

SCECdvdFanSpeedMedium 

The fan will spin at a medium speed.

SCECdvdFanSpeedMaximum 

The fan will spin at the maximum speed.

Definition at line 297 of file libcdvd-common.h.

◆ SCECdvdStreamMode

Enumerator
STMNBLK 

Stream without blocking.

STMBLK 

Stream, but block.

Definition at line 363 of file libcdvd-common.h.

Function Documentation

◆ sceCdRead()

int sceCdRead ( u32  lbn,
u32  sectors,
void *  buffer,
sceCdRMode mode 
)

read data from disc non-blocking, requires sceCdSync() call

Parameters
lbnsector location to start reading from
sectorsnumber of sectors to read
bufferbuffer to read to
modemode to read as
Returns
1 on success, 0 on failure.

Definition at line 98 of file cdi.c.

◆ sceCdGetToc()

int sceCdGetToc ( u8 *  toc)

get toc from inserted disc

Parameters
tocbuffer to hold toc (1024 bytes)
Returns
1 on success, 0 on failure.

Definition at line 57 of file cdi.c.

References toc.

Referenced by process_toc().

◆ sceCdGetToc2()

int sceCdGetToc2 ( u8 *  toc,
int  param 
)

Alternate TOC retrieving function with parameter

Parameters
tocbuffer to hold toc (1024 bytes)
paramParameter
Returns
1 on success, 0 on failure.

◆ sceCdSeek()

int sceCdSeek ( u32  lbn)

seek to given sector on disc non-blocking, requires sceCdSync() call

Parameters
lbnsector to seek to on disc
Returns
1 on success, 0 on failure.

Definition at line 142 of file cdi.c.

◆ sceCdStandby()

int sceCdStandby ( void  )

puts ps2 sceCd drive into standby mode non-blocking, requires sceCdSync() call

Returns
1 on success, 0 on failure.

Definition at line 147 of file cdi.c.

◆ sceCdStop()

int sceCdStop ( void  )

stops ps2 sceCd drive from spinning non-blocking, requires sceCdSync() call

Returns
1 on success, 0 on failure.

Definition at line 157 of file cdi.c.

◆ sceCdPause()

int sceCdPause ( void  )

pauses ps2 sceCd drive non-blocking, requires sceCdSync() call

Returns
1 on success, 0 on failure.

Definition at line 93 of file cdi.c.

◆ sceCdReadChain()

int sceCdReadChain ( sceCdRChain tag,
sceCdRMode mode 
)

do a 'chain' of reads with one command last chain value must be all 0xFFFFFFFF (max of 64 reads can be set at once) non-blocking, requires sceCdSync() call

SUPPORTED IN XCDVDMAN/XCDVDFSV ONLY

Parameters
tagpointer to an array of read chain data
moderead mode
Returns
1 on success, 0 on failure.

Definition at line 7038 of file cdvdman.c.

◆ sceCdApplyNCmd()

int sceCdApplyNCmd ( u8  cmdNum,
const void *  inBuff,
u16  inBuffSize 
)

send an n-command by function number

Parameters
cmdNumcommand number
inBuffinput buffer (can be null)
inBuffSizesize of input buffer (0 - 16 bytes)
Returns
1 on success, 0 on failure.

Definition at line 6079 of file cdvdman.c.

References sceCdSync().

◆ sceCdReadClock()

int sceCdReadClock ( sceCdCLOCK clock)

Reads the PlayStation clock. (time value is in BCD)

NOTE: For the old CDVDMAN module, the month field will not have its most significant bit automatically filed off.

Parameters
clocktime/date struct
Returns
1 on success, 0 on failure.

Definition at line 7934 of file cdvdman.c.

◆ sceCdWriteClock()

int sceCdWriteClock ( sceCdCLOCK clock)

Sets the PlayStation 2 clock. (time value is in BCD)

NOTE: The normalized value will be written back to the buffer specified.

Parameters
clocktime/date struct to set clocks time with
Returns
1 on success, 0 on failure.

◆ sceCdGetDiskType()

int sceCdGetDiskType ( void  )

gets the type of the currently inserted disc

Returns
disk type (SCECdvdMediaTypes)

Definition at line 35 of file cdi.c.

◆ sceCdGetError()

int sceCdGetError ( void  )

gets the last error that occurred

Returns
error type (SCECdvdErrorCode)

Definition at line 40 of file cdi.c.

◆ sceCdTrayReq()

int sceCdTrayReq ( int  param,
u32 *  traychk 
)

open/close/check disk tray

Parameters
paramparam (SCECdvdTrayReqMode)
traychkaddress for returning tray state change
Returns
1 on success, 0 on failure.

Definition at line 162 of file cdi.c.

Referenced by sceCdPowerOff().

◆ sceCdStatus()

int sceCdStatus ( void  )

gets the state of the drive

Returns
status (SCECdvdDriveStates)

Definition at line 152 of file cdi.c.

Referenced by audsrv_get_cd_status(), and sceCdPowerOff().

◆ sceCdBreak()

int sceCdBreak ( void  )

'breaks' the currently executing command

Returns
1 on success, 0 on failure.

Definition at line 25 of file cdi.c.

◆ sceCdCancelPOffRdy()

int sceCdCancelPOffRdy ( u32 *  result)

cancel power off Minimum Mechacon firmware version: 20400 SUPPORTED IN XCDVDMAN/XCDVDFSV ONLY

Parameters
resultresult
Returns
1 on success, 0 on failure.

Definition at line 7531 of file cdvdman.c.

References SCECdErNO.

◆ sceCdBlueLEDCtl()

int sceCdBlueLEDCtl ( u8  control,
u32 *  result 
)

blue led control

SUPPORTED IN XCDVDMAN/XCDVDFSV ONLY

Parameters
controlcontrol value
resultresult
Returns
1 on success, 0 on failure.

◆ sceCdPowerOff()

int sceCdPowerOff ( u32 *  result)

power off

SUPPORTED IN XCDVDMAN/XCDVDFSV ONLY

Parameters
resultresult
Returns
1 on success, 0 on failure.

Definition at line 7560 of file cdvdman.c.

References SCECdErNO, SCECdStatShellOpen, sceCdStatus(), SCECdTrayClose, and sceCdTrayReq().

◆ sceCdMmode()

int sceCdMmode ( int  media)

set media mode

SUPPORTED IN XCDVDMAN/XCDVDFSV ONLY

Parameters
mediamedia mode (SCECdvdMModeMediaTypes)
Returns
1 on success, 0 on failure.

Definition at line 86 of file cdi.c.

◆ sceCdChangeThreadPriority()

int sceCdChangeThreadPriority ( int  priority)

change libcdvd thread priority

SUPPORTED IN XCDVDMAN/XCDVDFSV ONLY

Parameters
prioritypriority
Returns
1 on success, 0 on failure.

Definition at line 315 of file cdvdfsv.c.

◆ sceCdApplySCmd()

int sceCdApplySCmd ( u8  cmdNum,
const void *  inBuff,
u16  inBuffSize,
void *  outBuff 
)

send an s-command by function number

Parameters
commandnumber
inputbuffer (can be null)
sizeof input buffer (0 - 16 bytes)
outputbuffer (16 bytes, can be null)
Returns
1 if successful, 0 if error

Definition at line 5405 of file cdvdman.c.

Referenced by sceCdApplySCmd2().

◆ sceCdStStart()

int sceCdStStart ( u32  lbn,
sceCdRMode mode 
)

start streaming data

Parameters
lbnsector location to start streaming from
modemode to read in
Returns
1 on success, 0 on failure.

Definition at line 202 of file cdi.c.

◆ sceCdStRead()

int sceCdStRead ( u32  sectors,
u32 *  buffer,
u32  mode,
u32 *  error 
)

read stream data

Parameters
sectorsnumber of sectors to read
bufferread buffer address
modedata stream mode (STMNBLK or STMBLK)
errorerror value holder
Returns
number of sectors read if successful, 0 otherwise

Definition at line 179 of file cdi.c.

◆ sceCdStStop()

int sceCdStStop ( void  )

stop streaming

Returns
1 on success, 0 on failure.

Definition at line 214 of file cdi.c.

◆ sceCdStSeek()

int sceCdStSeek ( u32  lbn)

seek to a new stream position

Parameters
lbnsector location to start streaming from
Returns
1 on success, 0 on failure.

Definition at line 197 of file cdi.c.

◆ sceCdStInit()

int sceCdStInit ( u32  bufmax,
u32  bankmax,
void *  buffer 
)

init streaming

Parameters
bufmaxstream buffer size
bankmaxnumber of ring buffers
bufferbuffer address on iop
Returns
1 on success, 0 on failure.

Definition at line 167 of file cdi.c.

◆ sceCdStStat()

int sceCdStStat ( void  )

get stream read status

Returns
number of sectors read if successful, 0 otherwise

Definition at line 209 of file cdi.c.

◆ sceCdStPause()

int sceCdStPause ( void  )

pause streaming

Returns
1 on success, 0 on failure.

Definition at line 219 of file cdi.c.

◆ sceCdStResume()

int sceCdStResume ( void  )

continue streaming

Returns
1 on success, 0 on failure.

Definition at line 224 of file cdi.c.

◆ sceCdInit()

int sceCdInit ( int  mode)

initializes libcdvd

Parameters
modemode (SCECdvdInitModes)
Returns
1 on success, 0 on failure.

Definition at line 64 of file cdi.c.

◆ sceCdSync()

int sceCdSync ( int  mode)

waits/checks for completion of n-commands

Parameters
mode0 = wait for completion of command (blocking), 1 = check current status and return immediately
Returns
0 = completed, 1 = not completed

Definition at line 109 of file cdi.c.

Referenced by sceCdApplyNCmd().

◆ sceCdSearchFile()

int sceCdSearchFile ( sceCdlFILE file,
const char *  name 
)

search for a file on disc

Parameters
filefile structure to get file info in
namename of file to search for (no wildcard characters) (should be in the form '\SYSTEM.CNF;1')
Returns
1 on success, 0 on failure. (or no file found)

Definition at line 114 of file cdi.c.

◆ sceCdDiskReady()

int sceCdDiskReady ( int  mode)

checks if drive is ready

Parameters
modemode
Returns
SCECdComplete if ready, SCECdNotReady if busy

Definition at line 30 of file cdi.c.

◆ sceCdIntToPos()

sceCdlLOCCD* sceCdIntToPos ( u32  i,
sceCdlLOCCD p 
)

convert from sector number to minute:second:frame

Definition at line 2402 of file cdvdman.c.

◆ sceCdPosToInt()

u32 sceCdPosToInt ( sceCdlLOCCD p)

convert from minute:second:frame to sector number

Definition at line 2411 of file cdvdman.c.

◆ sceCdGetReadPos()

u32 sceCdGetReadPos ( void  )

get the current read position (when reading using sceCdRead)

Definition at line 45 of file cdi.c.

◆ sceCdInitEeCB()

int sceCdInitEeCB ( int  priority,
void *  stackAddr,
int  stackSize 
)

initialise EE callback thread

Parameters
prioritycallback thread priority
stackAddrcallback thread stack address
stackSizecallback thread stack size
Returns
1 if initialised callback, 0 if only priority was changed

◆ sceCdCallback()

sceCdCBFunc sceCdCallback ( sceCdCBFunc  function)

set sceCd callback function

Parameters
functionpointer to new callback function
Returns
pointer to old function

Definition at line 16 of file cdi.c.

◆ sceCdReadSUBQ()

int sceCdReadSUBQ ( void *  buffer,
u32 *  status 
)

Reads SUBQ data from the disc.

Parameters
bufferPointer to the buffer for storing the SUBQ data in.
statusResult code.
Returns
1 on success, 0 on failure.

◆ sceCdForbidDVDP()

int sceCdForbidDVDP ( u32 *  result)

Disables (Forbids) the DVD READ N-command, so that DVD video disc sectors cannot be read. Support for the DVD READ N-command is re-enabled when a DVD player is loaded.

Parameters
resultResult code.
Returns
1 on success, 0 on failure.

◆ sceCdAutoAdjustCtrl()

int sceCdAutoAdjustCtrl ( int  mode,
u32 *  result 
)

Controls automatic adjustment of the CD/DVD drive. This also causes the auto-tilt motor (on units that have one) to be activated.

Parameters
modeMode
resultResult code.
Returns
1 on success, 0 on failure.

◆ sceCdDecSet()

int sceCdDecSet ( unsigned char  enable_xor,
unsigned char  enable_shift,
unsigned char  shiftval 
)

Controls on-the-fly (hardware) data decryption. Setting all options to 0 will disable decryption. This is used for decrypting encrypted sectors like the PlayStation 2 logo.

Parameters
enable_xorSet to a non-zero value to enable xor by index 4 of the key argument in sceCdReadKey
enable_shiftSet to a non-zero value to enable rotate shift right by the amount specified by the "shiftval" argument
shiftvalShift amount enable_shift is enabled
Returns
1 on success, 0 on failure.

Definition at line 8468 of file cdvdman.c.

◆ sceCdReadKey()

int sceCdReadKey ( unsigned char  arg1,
unsigned char  arg2,
unsigned int  command,
unsigned char *  key 
)

Reads the requested key from the CD/DVD.

Parameters
arg1Unknown
arg2Unknown
commandCommand
keyBuffer to store the key in.
Returns
1 on success, 0 on failure.

◆ sceCdDoesUniqueKeyExist()

int sceCdDoesUniqueKeyExist ( u32 *  status)

Determines if unique disc key exists Unofficial name. SUPPORTED IN NEWER CDVDMAN MODULES INCLUDED WITHIN DNAS IOPRP ONLY

Parameters
statusCommand status
Returns
1 on success, 0 on failure.

◆ sceCdSetHDMode()

int sceCdSetHDMode ( u32  mode)

Blocks disc tray eject functionality and turns off the blue eject LED when enabled.

Parameters
modeSet to a non-zero value to enable the tray eject functionality
Returns
1 on success, 0 on failure.

◆ sceCdOpenConfig()

int sceCdOpenConfig ( int  block,
int  mode,
int  NumBlocks,
u32 *  status 
)

Opens a specified configuration block, within NVRAM. Each block is 15 bytes long.

Parameters
blockBlock number.
modeMode (0 = read, 1 = write).
NumBlocksNumber of blocks.
statusResult code.
Returns
1 on success, 0 on failure.

◆ sceCdCloseConfig()

int sceCdCloseConfig ( u32 *  result)

Closes the configuration block that is currently opened.

Parameters
resultResult code.
Returns
1 on success, 0 on failure.

◆ sceCdReadConfig()

int sceCdReadConfig ( void *  buffer,
u32 *  result 
)

Reads the configuration block(s) that was/were previously opened. Each block is 15 bytes long.

Parameters
bufferPointer to the buffer to store the configuration data in.
resultResult code.
Returns
1 on success, 0 on failure.

◆ sceCdWriteConfig()

int sceCdWriteConfig ( const void *  buffer,
u32 *  result 
)

Writes to the configuration block(s) that was/were previously opened. Each block is 15 bytes long.

Parameters
bufferPointer to the buffer that contains the new configuration data.
resultResult code.
Returns
1 on success, 0 on failure.

◆ sceCdReadNVM()

int sceCdReadNVM ( u32  address,
u16 *  data,
u8 *  result 
)

Reads a single word from the NVRAM storage.

Parameters
addressAddress in 2-byte words, of the word that will be read.
dataPointer to the buffer that will contain the data read.
resultResult code.
Returns
1 on success, 0 on failure.

◆ sceCdWriteNVM()

int sceCdWriteNVM ( u32  address,
u16  data,
u8 *  result 
)

Writes a single word to the NVRAM storage. Starting from Mechacon firmware version 50000, attempting to write to address values over 150 will error.

Parameters
addressAddress in 2-byte words, of the word that will be written to.
dataPointer to the buffer that contains the new data.
resultResult code.
Returns
1 on success, 0 on failure.

◆ sceCdRI()

int sceCdRI ( u8 *  buffer,
u32 *  result 
)

Reads the i.Link ID of the console. All consoles have an i.Link ID, including those that do not have a physical i.Link port.

Parameters
bufferPointer to the buffer that will contain the data read.
resultResult code.
Returns
1 on success, 0 on failure.

Definition at line 7268 of file cdvdman.c.

◆ sceCdWI()

int sceCdWI ( const u8 *  buffer,
u32 *  result 
)

Writes a new i.Link ID for the console. Starting from Mechacon firmware version 50000, a unlock combination (0x03 0x46 and 0x03 0x47) needs to be executed first.

Parameters
bufferPointer to the buffer that contains the new i.Link ID.
resultResult code.
Returns
1 on success, 0 on failure.

◆ sceCdReadConsoleID()

int sceCdReadConsoleID ( u8 *  buffer,
u32 *  result 
)

Reads the ID of the console. This is not the same as the i.Link ID.

Parameters
bufferPointer to the buffer that will contain the data read.
resultResult code.
Returns
1 on success, 0 on failure.

◆ sceCdWriteConsoleID()

int sceCdWriteConsoleID ( const u8 *  buffer,
u32 *  status 
)

Writes a new ID for the console. This is not the same as the i.Link ID. Starting from Mechacon firmware version 50000, a unlock combination (0x03 0x46 and 0x03 0x47) needs to be executed first.

Parameters
bufferPointer to the buffer that contains the new i.Link ID.
statusResult code.
Returns
1 on success, 0 on failure.

◆ sceCdCtrlADout()

int sceCdCtrlADout ( int  mode,
u32 *  status 
)

Controls Audio Digital output.

Parameters
modeSet to a non-zero value to enable digital output.
statusResult code.
Returns
1 on success, 0 on failure.

Definition at line 7592 of file cdvdman.c.

◆ sceCdMV()

int sceCdMV ( u8 *  buffer,
u32 *  status 
)

Reads MECHACON version data (RR MM mm TT): RR = Magicgate region, MM = major, mm = minor, TT = system type (00 = PS2, 01 = PSX) Magicgate region codes are: 00 = Japan, 01 = USA, 02 = Europe, 03 = Oceania, 04 = Asia, 05 = Russia, 06 = China, and 07 = Mexico.

NOTE: The old CDVDMAN module only returns MM mm TT instead. The region byte is made up of the lower 7 bits of the status/result code.

Parameters
bufferPointer to the buffer to store the version data in.
statusResult code.
Returns
1 on success, 0 on failure.

Definition at line 7386 of file cdvdman.c.

◆ sceCdBootCertify()

int sceCdBootCertify ( const u8 *  romname)

Performs bootup certification. SUPPORTED IN XCDVDMAN/XCDVDFSV ONLY

Parameters
romnameROM version - The ROM "name" of the console in this format: romname[0] - ROM major version number (In decimal). romname[1] - ROM minor version number (In decimal). romname[2] - ROM region. romname[3] - Console type (E.g. C, D or T).
Returns
1 on success, 0 on failure.

◆ sceCdRM()

int sceCdRM ( char *  buffer,
u32 *  status 
)

Reads the console's model "name": e.g. "SCPH-39000". SUPPORTED IN XCDVDMAN/XCDVDFSV ONLY

Parameters
bufferPointer to the buffer for storing the model name in.
statusResult code.
Returns
1 on success, 0 on failure.

Definition at line 7279 of file cdvdman.c.

◆ sceCdWM()

int sceCdWM ( const char *  buffer,
u32 *  status 
)

Sets the console's model name. Starting from Mechacon firmware version 50000, a unlock combination (0x03 0x46 and 0x03 0x47) needs to be executed first. SUPPORTED IN XCDVDMAN/XCDVDFSV ONLY

Parameters
bufferPointer to a buffer containing the new model name.
statusResult code.
Returns
1 on success, 0 on failure.

◆ sceCdForbidRead()

int sceCdForbidRead ( u32 *  result)

Disables (Forbids) the READ N-command, so that disc sectors cannot be read. Support for the READ N-command is re-enabled when the disc is replaced. SUPPORTED IN XCDVDMAN/XCDVDFSV ONLY

Parameters
resultResult code.
Returns
1 on success, 0 on failure.

◆ sceCdReadFull()

int sceCdReadFull ( unsigned int  lsn,
unsigned int  sectors,
void *  buf,
sceCdRMode mode 
)

Reads sectors to a buffer SUPPORTED IN NEWER CDVDMAN MODULES INCLUDED WITHIN NEWER IOPRP ONLY

Parameters
lsnsector location to start from
sectorsamount to sectors to read
bufpointer to a buffer
modemode to read in
Returns
1 on success, 0 on failure.

◆ sceCdStSeekF()

int sceCdStSeekF ( unsigned int  lsn)

Seeks to a given position SUPPORTED IN NEWER CDVDMAN MODULES INCLUDED WITHIN NEWER IOPRP ONLY

Parameters
lsnsector location to seek to
Returns
1 on success, 0 on failure.

Definition at line 2568 of file cdvdman.c.

◆ sceCdPOffCallback()

void* sceCdPOffCallback ( void(*)(void *userdata)  func,
void *  userdata 
)

Sets a handler for the power-off event which will be called before the console switches off. SUPPORTED IN NEWER CDVDMAN MODULES INCLUDED WITHIN NEWER IOPRP ONLY

Parameters
funcpointer of callback function to be called when power-off processing is activated
userdataan argument which will be passed to the callback function returns: a pointer to the previous handler function, or a null pointer if nothing has been set eariler

Definition at line 3870 of file cdvdman.c.

References CpuResumeIntr(), and CpuSuspendIntr().

◆ sceCdSetTimeout()

int sceCdSetTimeout ( int  param,
int  timeout 
)

Sets the timeout lengths for the certain CDVDMAN's operations. SUPPORTED IN NEWER CDVDMAN MODULES INCLUDED WITHIN NEWER IOPRP ONLY

Parameters
paramthe timeout type to set
timeouta timeout value
Returns
1 on success, 0 on failure.

Definition at line 2066 of file cdvdman.c.

◆ sceCdReadModelID()

int sceCdReadModelID ( unsigned int *  id)

Reads the Model ID. SUPPORTED IN NEWER CDVDMAN MODULES INCLUDED WITHIN DNAS IOPRP ONLY

Parameters
idinteger where the Model ID is stored.
Returns
1 on success, 0 on failure.

◆ sceCdReadDvdDualInfo()

int sceCdReadDvdDualInfo ( int *  on_dual,
unsigned int *  layer1_start 
)

Reads the information about DVD disk. SUPPORTED IN NEWER CDVDMAN MODULES INCLUDED WITHIN NEWER IOPRP ONLY

Parameters
on_dualpointer to variable where type of DVD disc is returned
layer1_startpointer to variable where the address of the second layer of a dual-layer DVD disc is returned.
Returns
1 on success, 0 on failure.

Definition at line 4517 of file cdvdman.c.

◆ sceCdLayerSearchFile()

int sceCdLayerSearchFile ( sceCdlFILE fp,
const char *  path,
int  layer 
)

Retrieves basic information about a file on CD or the specified layer of DVD media. SUPPORTED IN NEWER CDVDMAN MODULES INCLUDED WITHIN NEWER IOPRP ONLY

Parameters
fpfile structure to get file info in
pathname of file to search for (no wildcard characters) (should be in the form '\SYSTEM.CNF;1')
layerlayer to search (0 for the first layer, 1 for the second layer)
Returns
1 on success, 0 on failure.

Definition at line 2190 of file cdvdman.c.

◆ sceCdStatus2()

int sceCdStatus2 ( void  )

Returns the CD/DVD drive status. SUPPORTED IN NEWER CDVDMAN MODULES INCLUDED WITHIN NEWER IOPRP ONLY

Returns
status

◆ sceCdRE()

int sceCdRE ( unsigned int  lsn,
unsigned int  sectors,
void *  buf,
sceCdRMode mode 
)

Reads sectors from CD or DVD disc. SUPPORTED IN NEWER CDVDMAN MODULES INCLUDED WITHIN NEWER IOPRP ONLY

Parameters
lsnsector location to start from
sectorsamount to sectors to read
bufpointer to a buffer
modemode to read in
Returns
1 on success, 0 on failure.

Definition at line 6853 of file cdvdman.c.

◆ sceCdReadGUID()

int sceCdReadGUID ( u64 *  guid)

Reads a GUID. SUPPORTED IN NEWER CDVDMAN MODULES INCLUDED WITHIN DNAS IOPRP ONLY

Parameters
guidu64 integer where the GUID is stored.
Returns
1 on success, 0 on failure.

◆ sceCdRcBypassCtl()

int sceCdRcBypassCtl ( int  mode,
u32 *  status 
)

Controls whether SIRCS remote control input should be translated to SIO2 pad input. This corresponds to the "Remote Control" "Gameplay Function On/Off" option in OSDSYS. Minimum Mechacon firmware version: 50000 SUPPORTED BY ONLY NEWER CDVDMAN MODULES INCLUDED WITHIN OSD ONLY

Parameters
mode0 = SIRCS->SIO2 conversion enabled, 1 = SIRCS->SIO2 conversion disabled
statusResult code.
Returns
1 on success, 0 on failure

◆ sceCdReadWakeUpTime()

int sceCdReadWakeUpTime ( sceCdCLOCK clock,
u16 *  userdata,
u32 *  wakeupreason,
int *  flags 
)

Reads wake up time. Minimum Mechacon firmware version: 50000 SUPPORTED IN XCDVDMAN INCLUDED WITHIN NEWER BOOT ROMS ONLY

Parameters
clockThe time to wake up the system.
userdataAny arbitrary value (not used in timer processing)
wakeupreasonThe reason why the system woke up.
flagsbit 0 -> disable timer after expiration, bit 1 -> disable timer
Returns
1 on success, 0 on failure

◆ sceCdWriteWakeUpTime()

int sceCdWriteWakeUpTime ( const sceCdCLOCK clock,
u16  userdata,
int  flags 
)

Writes wake up time. Minimum Mechacon firmware version: 50000 Note: in newer Mechacon firmware versions (TODO: determine the range), the wake up timer function is removed. However, the storage for the parameters remain. Note: if there was a non-zero value in sceCdCLOCK.stat the last time sceCdReadClock was called, no data will be written/enabled. SUPPORTED IN XCDVDMAN INCLUDED WITHIN NEWER BOOT ROMS ONLY

Parameters
clockThe time to wake up the system.
userdataAny arbitrary value (not used in timer processing)
flagsWhen 1, disables the timer after it has expired. When 255, disables the timer and sets the seconds value to 0xFF.
Returns
1 on success, 0 on failure

◆ sceRemote2_7()

int sceRemote2_7 ( u16  param,
u32 *  status 
)

Disables Mechacon actions performed using the remote control. The actions that can be specified are poweron, poweroff, reset and eject. The action performed by RM_PS2_NOLIGHT cannot be disabled. Minimum Mechacon firmware version: 50000 SUPPORTED IN XCDVDMAN INCLUDED WITHIN NEWER BOOT ROMS ONLY

Returns
1 on success, 0 on failure

◆ sceRemote2_7Get()

int sceRemote2_7Get ( u32 *  param,
u32 *  status 
)

Retrieves the value set by sceRemote2_7. Minimum Mechacon firmware version: 50000 Unofficial name. SUPPORTED IN XCDVDMAN INCLUDED WITHIN NEWER BOOT ROMS ONLY

Parameters
paramThe value set by sceRemote2_7
statusCommand status
Returns
1 on success, 0 on failure.

◆ sceCdSetLEDsMode()

int sceCdSetLEDsMode ( u32  param,
u32 *  result 
)

Set the LED state of the face buttons of the console. The state of the buttons will be reset when the power or eject button is pressed. Minimum Mechacon firmware version: 50000 SUPPORTED IN XCDVDMAN INCLUDED WITHIN NEWER BOOT ROMS ONLY

Parameters
paramThe LED state to set.
Returns
1 on success, 0 on failure

◆ sceCdReadPS1BootParam()

int sceCdReadPS1BootParam ( u8 *  out,
u32 *  result 
)

Reads PS1 boot parameter. Minimum Mechacon firmware version: 50200 SUPPORTED IN XCDVDMAN INCLUDED WITHIN NEWER BOOT ROMS ONLY

Returns
1 on success, 0 on failure

◆ sceCdSetFanProfile()

int sceCdSetFanProfile ( u8  param,
u32 *  result 
)

Sets fan profile. Minimum Mechacon firmware version: 50400 SUPPORTED IN XCDVDMAN INCLUDED WITHIN NEWER BOOT ROMS ONLY

Parameters
paramparam (SCECdvdFanSpeed)
Returns
1 on success, 0 on failure

◆ sceCdSendSCmd1D()

int sceCdSendSCmd1D ( int *  arg1,
unsigned int *  arg2,
unsigned int *  arg3,
u32 *  status 
)

Sends SCMD 0x1D. Appears to be stubbed in Mechacon firmware 50000. Minimum Mechacon firmware version: 50000 Unofficial name. SUPPORTED IN XCDVDMAN INCLUDED WITHIN NEWER BOOT ROMS ONLY

Parameters
arg1Unknown
arg2Unknown
arg3Unknown
statusCommand status
Returns
1 on success, 0 on failure.

◆ sceCdChgSys()

int sceCdChgSys ( u32  arg1)

Change sys. SUPPORTED BY ONLY DESR/PSX DVR CDVDMAN MODULES

Returns
1 on success, 0 on failure

◆ sceCdNoticeGameStart()

int sceCdNoticeGameStart ( u8  arg1,
u32 *  result 
)

Notice game start. Minimum Mechacon firmware version: 50400 SUPPORTED BY ONLY DESR/PSX DVR CDVDMAN MODULES

Returns
1 on success, 0 on failure

◆ sceCdXLEDCtl()

int sceCdXLEDCtl ( u8  arg1,
u8  arg2,
u32 *  result1,
u32 *  result2 
)

Extended LED control. Minimum Mechacon firmware version: 50600 SUPPORTED BY ONLY DESR/PSX DVR CDVDMAN MODULES

Returns
1 on success, 0 on failure

◆ sceCdBuzzerCtl()

int sceCdBuzzerCtl ( u32 *  result)

Buzzer control. Minimum Mechacon firmware version: 50600 SUPPORTED BY ONLY DESR/PSX DVR CDVDMAN MODULES

Returns
1 on success, 0 on failure

◆ sceCdXBSPowerCtl()

int sceCdXBSPowerCtl ( u8  arg1,
u8  arg2,
u32 *  result1,
u32 *  result2 
)

XBS power control. Minimum Mechacon firmware version: 50600 SUPPORTED BY ONLY DESR/PSX DVR CDVDMAN MODULES

Returns
1 on success, 0 on failure

◆ sceCdSetMediumRemoval()

int sceCdSetMediumRemoval ( u8  arg1,
u32 *  result 
)

Set medium removal. Minimum Mechacon firmware version: 50600 SUPPORTED BY ONLY DESR/PSX DVR CDVDMAN MODULES

Returns
1 on success, 0 on failure

◆ sceCdGetMediumRemoval()

int sceCdGetMediumRemoval ( u32 *  result1,
u32 *  result2 
)

Get medium removal. Minimum Mechacon firmware version: 50600 SUPPORTED BY ONLY DESR/PSX DVR CDVDMAN MODULES

Returns
1 on success, 0 on failure

◆ sceCdXDVRPReset()

int sceCdXDVRPReset ( u8  arg1,
u32 *  result 
)

XDVRP reset. Minimum Mechacon firmware version: 50600 SUPPORTED BY ONLY DESR/PSX DVR CDVDMAN MODULES

Returns
1 on success, 0 on failure

◆ sceCdGetWakeUpReason()

int sceCdGetWakeUpReason ( void  )

Get wake up reason. SUPPORTED BY ONLY DESR/PSX DVR CDVDMAN MODULES

Returns
1 on success, 0 on failure

◆ sceCdReadRegionParams()

int sceCdReadRegionParams ( u32 *  arg1,
u32 *  result 
)

Reads region parameters. Minimum Mechacon firmware version: 60000 SUPPORTED IN XCDVDMAN INCLUDED WITHIN NEWER BOOT ROMS ONLY

Returns
1 on success, 0 on failure

◆ sceCdWriteRegionParams()

int sceCdWriteRegionParams ( u8  arg1,
u32 *  arg2,
u8 *  arg3,
u32 *  result 
)

Writes region parameters. Minimum Mechacon firmware version: 60600 SUPPORTED IN XCDVDMAN INCLUDED WITHIN NEWER BOOT ROMS ONLY

Returns
1 on success, 0 on failure

◆ cdvdman_152_get_temperature()

int cdvdman_152_get_temperature ( u32 *  param,
u32 *  status 
)

Gets temperature of the temperature sensor connected to Mechacon in Celsius Minimum Mechacon firmware version: 50400 SUPPORTED IN XCDVDMAN INCLUDED WITHIN NEWER BOOT ROMS ONLY

Returns
1 on success, 0 on failure

◆ cdvdman_167_atapi2dragon()

int cdvdman_167_atapi2dragon ( u8 *  inbuf,
u32 *  status 
)

Stores some sort of buffer from ATAPI drive to PS2 drive. Minimum Mechacon firmware version: 50400 SUPPORTED BY ONLY DESR/PSX DVR CDVDMAN MODULES

Returns
1 on success, 0 on failure

◆ cdvdman_169_dragon2atapi()

int cdvdman_169_dragon2atapi ( u8 *  outbuf,
u32 *  status 
)

Stores some sort of buffer from PS2 drive to ATAPI drive. Minimum Mechacon firmware version: 50400 SUPPORTED BY ONLY DESR/PSX DVR CDVDMAN MODULES

Returns
1 on success, 0 on failure