@@ -25,7 +25,7 @@ extern struct irx_export_table _exp_dev9;
25
25
26
26
// internal functions prototypes
27
27
static void oplShutdown (int poff );
28
- static int cdvdman_writeSCmd (u8 cmd , void * in , u32 in_size , void * out , u32 out_size );
28
+ static int cdvdman_writeSCmd (u8 cmd , const void * in , u16 in_size , void * out , u16 out_size );
29
29
static unsigned int event_alarm_cb (void * args );
30
30
static void cdvdman_signal_read_end (void );
31
31
static void cdvdman_signal_read_end_intr (void );
@@ -75,7 +75,7 @@ void oplRegisterShutdownCallback(oplShutdownCb_t cb)
75
75
76
76
static void oplShutdown (int poff )
77
77
{
78
- int stat ;
78
+ u32 stat ;
79
79
80
80
DeviceLock ();
81
81
if (vmcShutdownCb != NULL )
@@ -107,7 +107,7 @@ void cdvdman_init(void)
107
107
#endif
108
108
109
109
if (!cdvdman_cdinited ) {
110
- cdvdman_stat .err = CDVD_ERR_NO ;
110
+ cdvdman_stat .err = SCECdErNO ;
111
111
112
112
cdvdman_fs_init ();
113
113
@@ -146,10 +146,10 @@ static int cdvdman_read_sectors(u32 lsn, unsigned int sectors, void *buf)
146
146
147
147
DPRINTF ("cdvdman_read lsn=%lu sectors=%u buf=%p\n" , lsn , sectors , buf );
148
148
149
- cdvdman_stat .err = CDVD_ERR_NO ;
149
+ cdvdman_stat .err = SCECdErNO ;
150
150
151
151
for (ptr = buf , remaining = sectors ; remaining > 0 ;) {
152
- if (cdvdman_stat .err != CDVD_ERR_NO )
152
+ if (cdvdman_stat .err != SCECdErNO )
153
153
break ;
154
154
155
155
SectorsToRead = remaining ;
@@ -168,7 +168,7 @@ static int cdvdman_read_sectors(u32 lsn, unsigned int sectors, void *buf)
168
168
}
169
169
170
170
if (DeviceReadSectors (lsn , ptr , SectorsToRead ) != 0 ) {
171
- cdvdman_stat .err = CDVD_ERR_READ ;
171
+ cdvdman_stat .err = SCECdErREAD ;
172
172
if (cdvdman_settings .common .flags & IOPCORE_COMPAT_ACCU_READS )
173
173
CancelAlarm (& cdvdemu_read_end_cb , NULL );
174
174
break ;
@@ -204,12 +204,12 @@ static int cdvdman_read_sectors(u32 lsn, unsigned int sectors, void *buf)
204
204
}
205
205
}
206
206
207
- return (cdvdman_stat .err == CDVD_ERR_NO ? 0 : 1 );
207
+ return (cdvdman_stat .err == SCECdErNO ? 0 : 1 );
208
208
}
209
209
210
210
static int cdvdman_read (u32 lsn , u32 sectors , void * buf )
211
211
{
212
- cdvdman_stat .status = CDVD_STAT_READ ;
212
+ cdvdman_stat .status = SCECdStatRead ;
213
213
214
214
buf = (void * )PHYSADDR (buf );
215
215
#ifdef HDD_DRIVER //As of now, only the ATA interface requires this. We do this here to share cdvdman_buf.
@@ -246,13 +246,13 @@ static int cdvdman_read(u32 lsn, u32 sectors, void *buf)
246
246
247
247
ReadPos = 0 ; /* Reset the buffer offset indicator. */
248
248
249
- cdvdman_stat .status = CDVD_STAT_PAUSE ;
249
+ cdvdman_stat .status = SCECdStatPause ;
250
250
251
251
return 1 ;
252
252
}
253
253
254
254
//-------------------------------------------------------------------------
255
- int sceCdGetReadPos (void )
255
+ u32 sceCdGetReadPos (void )
256
256
{
257
257
DPRINTF ("sceCdGetReadPos\n" );
258
258
@@ -331,16 +331,16 @@ int cdvdman_SyncRead(u32 lsn, u32 sectors, void *buf)
331
331
//-------------------------------------------------------------------------
332
332
static void cdvdman_initDiskType (void )
333
333
{
334
- cdvdman_stat .err = CDVD_ERR_NO ;
334
+ cdvdman_stat .err = SCECdErNO ;
335
335
336
336
cdvdman_stat .disc_type_reg = (int )cdvdman_settings .common .media ;
337
337
DPRINTF ("DiskType=0x%x\n" , cdvdman_settings .common .media );
338
338
}
339
339
340
340
//-------------------------------------------------------------------------
341
- int sceCdPosToInt (cd_location_t * p )
341
+ u32 sceCdPosToInt (sceCdlLOCCD * p )
342
342
{
343
- register int result ;
343
+ register u32 result ;
344
344
345
345
result = ((u32 )p -> minute >> 16 ) * 10 + ((u32 )p -> minute & 0xF );
346
346
result *= 60 ;
@@ -353,9 +353,9 @@ int sceCdPosToInt(cd_location_t *p)
353
353
}
354
354
355
355
//-------------------------------------------------------------------------
356
- cd_location_t * sceCdIntToPos (int i , cd_location_t * p )
356
+ sceCdlLOCCD * sceCdIntToPos (u32 i , sceCdlLOCCD * p )
357
357
{
358
- register int sc , se , mi ;
358
+ register u32 sc , se , mi ;
359
359
360
360
i += 150 ;
361
361
se = i / 75 ;
@@ -370,7 +370,7 @@ cd_location_t *sceCdIntToPos(int i, cd_location_t *p)
370
370
}
371
371
372
372
//-------------------------------------------------------------------------
373
- int * sceCdCallback (void * func )
373
+ sceCdCBFunc sceCdCallback (sceCdCBFunc func )
374
374
{
375
375
int oldstate ;
376
376
void * old_cb ;
@@ -387,7 +387,7 @@ int *sceCdCallback(void *func)
387
387
388
388
CpuResumeIntr (oldstate );
389
389
390
- return ( int * ) old_cb ;
390
+ return old_cb ;
391
391
}
392
392
393
393
//-------------------------------------------------------------------------
@@ -431,7 +431,7 @@ int sceCdSC(int code, int *param)
431
431
}
432
432
433
433
//-------------------------------------------------------------------------
434
- static int cdvdman_writeSCmd (u8 cmd , void * in , u32 in_size , void * out , u32 out_size )
434
+ static int cdvdman_writeSCmd (u8 cmd , const void * in , u16 in_size , void * out , u16 out_size )
435
435
{
436
436
int i ;
437
437
u8 * p ;
@@ -484,7 +484,7 @@ static int cdvdman_writeSCmd(u8 cmd, void *in, u32 in_size, void *out, u32 out_s
484
484
}
485
485
486
486
//--------------------------------------------------------------
487
- int cdvdman_sendSCmd (u8 cmd , void * in , u32 in_size , void * out , u32 out_size )
487
+ int cdvdman_sendSCmd (u8 cmd , const void * in , u16 in_size , void * out , u16 out_size )
488
488
{
489
489
int r , retryCount = 0 ;
490
490
@@ -575,8 +575,8 @@ static void cdvdman_startThreads(void)
575
575
{
576
576
iop_thread_t thread_param ;
577
577
578
- cdvdman_stat .status = CDVD_STAT_PAUSE ;
579
- cdvdman_stat .err = CDVD_ERR_NO ;
578
+ cdvdman_stat .status = SCECdStatPause ;
579
+ cdvdman_stat .err = SCECdErNO ;
580
580
581
581
thread_param .thread = & cdvdman_cdread_Thread ;
582
582
thread_param .stacksize = 0x1000 ;
0 commit comments