ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
ncmd.c File Reference
#include <stdio.h>
#include <kernel.h>
#include <sifrpc.h>
#include <libcdvd.h>
#include <libcdvd-rpc.h>
#include <string.h>
#include "internal.h"
+ Include dependency graph for ncmd.c:

Go to the source code of this file.

Data Structures

union  nCmdSendParams_t
 
struct  _cdvd_read_data
 

Macros

#define CD_SERVER_NCMD   0x80000595
 

Enumerations

enum  CdvdStCmd_t {
  CDVD_ST_CMD_START = 1 ,
  CDVD_ST_CMD_READ ,
  CDVD_ST_CMD_STOP ,
  CDVD_ST_CMD_SEEK ,
  CDVD_ST_CMD_INIT ,
  CDVD_ST_CMD_STAT ,
  CDVD_ST_CMD_PAUSE ,
  CDVD_ST_CMD_RESUME ,
  CDVD_ST_CMD_SEEKF
}
 
enum  CD_NCMD_CMDS {
  CD_NCMD_READ = 0x01 ,
  CD_NCMD_CDDAREAD ,
  CD_NCMD_DVDREAD ,
  CD_NCMD_GETTOC ,
  CD_NCMD_SEEK ,
  CD_NCMD_STANDBY ,
  CD_NCMD_STOP ,
  CD_NCMD_PAUSE ,
  CD_NCMD_STREAM ,
  CD_NCMD_CDDASTREAM ,
  CD_NCMD_READ_KEY ,
  CD_NCMD_NCMD ,
  CD_NCMD_READIOPMEM ,
  CD_NCMD_DISKREADY ,
  CD_NCMD_READCHAIN
}
 

Functions

int sceCdStream (u32 lbn, u32 nsectors, void *buf, CdvdStCmd_t cmd, sceCdRMode *rm)
 
int sceCdCddaStream (u32 lbn, u32 nsectors, void *buf, CdvdStCmd_t cmd, sceCdRMode *rm)
 
int _CdCheckNCmd (int cmd)
 
int sceCdNCmdDiskReady (void)
 
void _CdAlignReadBuffer (void *data)
 

Variables

int bindNcmd
 
SifRpcClientData_t clientNCmd
 
int nCmdSemaId
 
int nCmdNum
 
u32 readStreamData [5]
 
u32 readData [6]
 
sceCdRChain readChainData [66]
 
u32 getTocSendBuff [3]
 
u32 _rd_intr_data [64]
 
u32 curReadPos
 
u8 tocBuff [2064]
 
u8 nCmdRecvBuff [48]
 
nCmdSendParams_t nCmdSendBuff
 
int streamStatus
 
sceCdRMode dummyMode
 
u32 seekSector
 
u32 cdda_st_buf [64/sizeof(u32)]
 

Detailed Description

Function definitions for libsceCdvd (EE side calls to the iop module sceCdvdfsv).

NOTE: These functions will work with the CDVDMAN/CDVDFSV or XCDVDMAN/XCDVDFSV modules stored in rom0.

NOTE: not all functions work with each set of modules!

Definition in file ncmd.c.

Macro Definition Documentation

◆ CD_SERVER_NCMD

#define CD_SERVER_NCMD   0x80000595

non-blocking commands (Non-synchronous)

Definition at line 32 of file ncmd.c.

Enumeration Type Documentation

◆ CD_NCMD_CMDS

Enumerator
CD_NCMD_READ 
CD_NCMD_CDDAREAD 
CD_NCMD_DVDREAD 
CD_NCMD_GETTOC 
CD_NCMD_SEEK 
CD_NCMD_STANDBY 
CD_NCMD_STOP 
CD_NCMD_PAUSE 
CD_NCMD_STREAM 
CD_NCMD_CDDASTREAM 
CD_NCMD_READ_KEY 
CD_NCMD_NCMD 
CD_NCMD_READIOPMEM 
CD_NCMD_DISKREADY 
CD_NCMD_READCHAIN 

XCDVDFSV only

Definition at line 50 of file ncmd.c.

50  {
51  CD_NCMD_READ = 0x01,
67 };
@ CD_NCMD_DVDREAD
Definition: ncmd.c:53
@ CD_NCMD_GETTOC
Definition: ncmd.c:54
@ CD_NCMD_SEEK
Definition: ncmd.c:55
@ CD_NCMD_STANDBY
Definition: ncmd.c:56
@ CD_NCMD_PAUSE
Definition: ncmd.c:58
@ CD_NCMD_READ_KEY
Definition: ncmd.c:61
@ CD_NCMD_READIOPMEM
Definition: ncmd.c:63
@ CD_NCMD_READCHAIN
Definition: ncmd.c:66
@ CD_NCMD_STOP
Definition: ncmd.c:57
@ CD_NCMD_CDDAREAD
Definition: ncmd.c:52
@ CD_NCMD_CDDASTREAM
Definition: ncmd.c:60
@ CD_NCMD_DISKREADY
Definition: ncmd.c:64
@ CD_NCMD_STREAM
Definition: ncmd.c:59
@ CD_NCMD_READ
Definition: ncmd.c:51
@ CD_NCMD_NCMD
Definition: ncmd.c:62

◆ CdvdStCmd_t

Stream commands.

Enumerator
CDVD_ST_CMD_START 
CDVD_ST_CMD_READ 
CDVD_ST_CMD_STOP 
CDVD_ST_CMD_SEEK 
CDVD_ST_CMD_INIT 
CDVD_ST_CMD_STAT 
CDVD_ST_CMD_PAUSE 
CDVD_ST_CMD_RESUME 
CDVD_ST_CMD_SEEKF 

Definition at line 35 of file ncmd.c.

35  {
45 } CdvdStCmd_t;
CdvdStCmd_t
Definition: ncmd.c:35
@ CDVD_ST_CMD_STAT
Definition: ncmd.c:41
@ CDVD_ST_CMD_SEEKF
Definition: ncmd.c:44
@ CDVD_ST_CMD_START
Definition: ncmd.c:36
@ CDVD_ST_CMD_READ
Definition: ncmd.c:37
@ CDVD_ST_CMD_SEEK
Definition: ncmd.c:39
@ CDVD_ST_CMD_STOP
Definition: ncmd.c:38
@ CDVD_ST_CMD_INIT
Definition: ncmd.c:40
@ CDVD_ST_CMD_RESUME
Definition: ncmd.c:43
@ CDVD_ST_CMD_PAUSE
Definition: ncmd.c:42

Function Documentation

◆ _CdAlignReadBuffer()

void _CdAlignReadBuffer ( void *  data)

◆ _CdCheckNCmd()

int _CdCheckNCmd ( int  cmd)

◆ sceCdCddaStream()

int sceCdCddaStream ( u32  lbn,
u32  nsectors,
void *  buf,
CdvdStCmd_t  cmd,
sceCdRMode rm 
)

◆ sceCdNCmdDiskReady()

int sceCdNCmdDiskReady ( void  )

◆ sceCdStream()

int sceCdStream ( u32  lbn,
u32  nsectors,
void *  buf,
CdvdStCmd_t  cmd,
sceCdRMode rm 
)

Variable Documentation

◆ _rd_intr_data

u32 _rd_intr_data[64]
extern

◆ bindNcmd

int bindNcmd
extern

◆ cdda_st_buf

u32 cdda_st_buf[64/sizeof(u32)]
extern

◆ clientNCmd

SifRpcClientData_t clientNCmd
extern

◆ curReadPos

u32 curReadPos
extern

◆ dummyMode

sceCdRMode dummyMode
extern

◆ getTocSendBuff

u32 getTocSendBuff[3]
extern

◆ nCmdNum

int nCmdNum
extern

◆ nCmdRecvBuff

u8 nCmdRecvBuff[48]
extern

◆ nCmdSemaId

int nCmdSemaId
extern

◆ nCmdSendBuff

nCmdSendParams_t nCmdSendBuff
extern

◆ readChainData

sceCdRChain readChainData[66]
extern

◆ readData

u32 readData[6]
extern

◆ readStreamData

u32 readStreamData[5]
extern

◆ seekSector

u32 seekSector
extern

◆ streamStatus

int streamStatus
extern

◆ tocBuff

u8 tocBuff[2064]
extern