Skip to content

Commit

Permalink
- Minor accuracy improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Apr 6, 2024
1 parent 7985e46 commit 45fc405
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cube/patches/base/emulator.c
Expand Up @@ -719,7 +719,7 @@ static void di_execute_command()
uint32_t offset = DVDRoundDown32KB(di.reg.cmdbuf1 << 2);
uint32_t length = DVDRoundDown32KB(di.reg.cmdbuf2);

if (!offset && !length) {
if (!length) {
dtk.stopping = true;
} else if (!dtk.stopping) {
dtk.next.start = offset;
Expand Down Expand Up @@ -756,7 +756,11 @@ static void di_execute_command()
case DI_CMD_REQUEST_AUDIO_STATUS:
{
switch ((di.reg.cmdbuf0 >> 16) & 0x03) {
#ifndef DTK
case 0x00: result = dtk.playing; break;
#else
case 0x00: result = dtk.playing | !!fifo_size(&dtk.fifo); break;
#endif
case 0x01: result = DVDRoundDown32KB(dtk.current.position) >> 2; break;
case 0x02: result = DVDRoundDown32KB(dtk.current.start) >> 2; break;
case 0x03: result = dtk.current.length; break;
Expand Down

0 comments on commit 45fc405

Please sign in to comment.