Skip to content
This repository was archived by the owner on Sep 18, 2021. It is now read-only.

Commit 14e48f2

Browse files
author
angelosa
committed
Small bugfix
1 parent 5f76438 commit 14e48f2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/mame/machine/stvcd.c

+6-5
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ static void cd_writeWord(running_machine &machine, UINT32 addr, UINT16 data)
576576
case 0x0026:
577577
// CDROM_LOG(("WW CR4: %04x\n", data))
578578
cr4 = data;
579-
if(cr1 != 0 && 0)
579+
if(cr1 != 0 && 1)
580580
printf("CD: command exec %02x %02x %02x %02x %02x (stat %04x)\n", hirqreg, cr1, cr2, cr3, cr4, cd_stat);
581581

582582
if (!cdrom)
@@ -1142,22 +1142,23 @@ static void cd_writeWord(running_machine &machine, UINT32 addr, UINT16 data)
11421142

11431143
if (bufnum >= MAX_FILTERS)
11441144
{
1145-
CDROM_LOG(("CD: invalid buffer number\n"))
1146-
cd_stat = 0xff; // ERROR
1145+
printf("CD: invalid buffer number\n");
1146+
cd_stat = CD_STAT_REJECT; // ERROR
11471147
hirqreg |= (CMOK|EHST);
11481148
return;
11491149
}
11501150

11511151
if (partitions[bufnum].numblks == 0)
11521152
{
1153-
CDROM_LOG(("CD: buffer is empty\n"))
1154-
cd_stat = 0xff; // ERROR
1153+
printf("CD: buffer is empty\n");
1154+
cd_stat = CD_STAT_REJECT; // ERROR
11551155
hirqreg |= (CMOK|EHST);
11561156
return;
11571157
}
11581158

11591159
cd_getsectoroffsetnum(bufnum, &sectofs, &sectnum);
11601160

1161+
/* TODO: Cyber Doll crashes here with sectnum == 8*/
11611162
for (i = sectofs; i < (sectofs + sectnum); i++)
11621163
{
11631164
partitions[bufnum].size -= partitions[bufnum].blocks[i]->size;

0 commit comments

Comments
 (0)