mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-27 19:51:48 +01:00
[Core/CD] minor changes to CDD status codes
This commit is contained in:
parent
9476daf1e9
commit
e0351dbf61
@ -1218,7 +1218,7 @@ void cdd_update(void)
|
|||||||
#ifdef LOG_CDD
|
#ifdef LOG_CDD
|
||||||
error("LBA = %d (track n°%d)(latency=%d)\n", cdd.lba, cdd.index, cdd.latency);
|
error("LBA = %d (track n°%d)(latency=%d)\n", cdd.lba, cdd.index, cdd.latency);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* seeking disc */
|
/* seeking disc */
|
||||||
if (cdd.status == CD_SEEK)
|
if (cdd.status == CD_SEEK)
|
||||||
{
|
{
|
||||||
@ -1230,7 +1230,7 @@ void cdd_update(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* drive is ready */
|
/* drive is ready */
|
||||||
cdd.status = CD_READY;
|
cdd.status = CD_PAUSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reading disc */
|
/* reading disc */
|
||||||
@ -1460,12 +1460,12 @@ void cdd_process(void)
|
|||||||
/* no audio track playing */
|
/* no audio track playing */
|
||||||
scd.regs[0x36>>1].byte.h = 0x01;
|
scd.regs[0x36>>1].byte.h = 0x01;
|
||||||
|
|
||||||
/* RS1-RS8 ignored, expects 0x0 (?) in RS0 once */
|
/* RS1-RS8 ignored, expects 0x0 (drive busy ?) in RS0 once */
|
||||||
scd.regs[0x38>>1].w = 0x0000;
|
scd.regs[0x38>>1].w = CD_BUSY << 8;
|
||||||
scd.regs[0x3a>>1].w = 0x0000;
|
scd.regs[0x3a>>1].w = 0x0000;
|
||||||
scd.regs[0x3c>>1].w = 0x0000;
|
scd.regs[0x3c>>1].w = 0x0000;
|
||||||
scd.regs[0x3e>>1].w = 0x0000;
|
scd.regs[0x3e>>1].w = 0x0000;
|
||||||
scd.regs[0x40>>1].w = 0x000f;
|
scd.regs[0x40>>1].w = ~CD_BUSY & 0x0f;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1765,7 +1765,7 @@ void cdd_process(void)
|
|||||||
scd.regs[0x36>>1].byte.h = 0x01;
|
scd.regs[0x36>>1].byte.h = 0x01;
|
||||||
|
|
||||||
/* update status (RS1-RS8 unchanged) */
|
/* update status (RS1-RS8 unchanged) */
|
||||||
cdd.status = scd.regs[0x38>>1].byte.h = CD_READY;
|
cdd.status = scd.regs[0x38>>1].byte.h = CD_PAUSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1808,7 +1808,7 @@ void cdd_process(void)
|
|||||||
scd.regs[0x36>>1].byte.h = 0x01;
|
scd.regs[0x36>>1].byte.h = 0x01;
|
||||||
|
|
||||||
/* update status (RS1-RS8 unchanged) */
|
/* update status (RS1-RS8 unchanged) */
|
||||||
cdd.status = scd.regs[0x38>>1].byte.h = CD_READY;
|
cdd.status = scd.regs[0x38>>1].byte.h = CD_PAUSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1820,12 +1820,12 @@ void cdd_process(void)
|
|||||||
/* update status */
|
/* update status */
|
||||||
cdd.status = cdd.loaded ? CD_STOP : NO_DISC;
|
cdd.status = cdd.loaded ? CD_STOP : NO_DISC;
|
||||||
|
|
||||||
/* RS1-RS8 ignored, expects 0x0 (?) in RS0 once */
|
/* RS1-RS8 ignored, expects 0x0 (drive busy ?) in RS0 once */
|
||||||
scd.regs[0x38>>1].w = 0x0000;
|
scd.regs[0x38>>1].w = CD_BUSY << 8;
|
||||||
scd.regs[0x3a>>1].w = 0x0000;
|
scd.regs[0x3a>>1].w = 0x0000;
|
||||||
scd.regs[0x3c>>1].w = 0x0000;
|
scd.regs[0x3c>>1].w = 0x0000;
|
||||||
scd.regs[0x3e>>1].w = 0x0000;
|
scd.regs[0x3e>>1].w = 0x0000;
|
||||||
scd.regs[0x40>>1].w = 0x000f;
|
scd.regs[0x40>>1].w = ~CD_BUSY & 0x0f;
|
||||||
|
|
||||||
#ifdef CD_TRAY_CALLBACK
|
#ifdef CD_TRAY_CALLBACK
|
||||||
CD_TRAY_CALLBACK
|
CD_TRAY_CALLBACK
|
||||||
|
@ -49,10 +49,11 @@
|
|||||||
#define cdd scd.cdd_hw
|
#define cdd scd.cdd_hw
|
||||||
|
|
||||||
/* CDD status */
|
/* CDD status */
|
||||||
|
#define CD_BUSY 0x00
|
||||||
#define CD_PLAY 0x01
|
#define CD_PLAY 0x01
|
||||||
#define CD_SEEK 0x02
|
#define CD_SEEK 0x02
|
||||||
#define CD_SCAN 0x03
|
#define CD_SCAN 0x03
|
||||||
#define CD_READY 0x04
|
#define CD_PAUSE 0x04
|
||||||
#define CD_OPEN 0x05
|
#define CD_OPEN 0x05
|
||||||
#define CD_STOP 0x09
|
#define CD_STOP 0x09
|
||||||
#define NO_DISC 0x0B
|
#define NO_DISC 0x0B
|
||||||
|
Loading…
Reference in New Issue
Block a user