diff --git a/src/emu/machine/stvcd.c b/src/emu/machine/stvcd.c index 461746f0e1e..ebb2820d579 100644 --- a/src/emu/machine/stvcd.c +++ b/src/emu/machine/stvcd.c @@ -1015,7 +1015,6 @@ void saturn_state::cd_exec_command( void ) if (partitions[bufnum].numblks < sectnum) { printf("CD: buffer is not full %08x %08x\n",partitions[bufnum].numblks,sectnum); - /* TODO: why this is happening? */ cr_standard_return(CD_STAT_REJECT); hirqreg |= (CMOK|EHST); return; @@ -1063,6 +1062,8 @@ void saturn_state::cd_exec_command( void ) for (int i = xfersectpos; i < xfersectpos+xfersectnum; i++) { transpart->blocks[i] = cd_alloc_block(&transpart->bnum[i]); + if(transpart->size == -1) + transpart->size = 0; transpart->size += transpart->blocks[i]->size; transpart->numblks++; } @@ -1091,6 +1092,8 @@ void saturn_state::cd_exec_command( void ) { // allocate the dst blocks partitions[dst_filter].blocks[i] = cd_alloc_block(&partitions[dst_filter].bnum[i]); + if(partitions[dst_filter].size == -1) + partitions[dst_filter].size = 0; partitions[dst_filter].size += partitions[dst_filter].blocks[i]->size; partitions[dst_filter].numblks++; @@ -2360,9 +2363,8 @@ saturn_state::partitionT *saturn_state::cd_filterdata(filterT *flt, int trktype, // update the status of the partition if (filterprt->size == -1) - { filterprt->size = 0; - } + filterprt->size += filterprt->blocks[filterprt->numblks]->size; filterprt->numblks++; diff --git a/src/emu/video/stvvdp2.c b/src/emu/video/stvvdp2.c index 974833baa68..a65da6a9a57 100644 --- a/src/emu/video/stvvdp2.c +++ b/src/emu/video/stvvdp2.c @@ -1721,7 +1721,7 @@ bit-> /----15----|----14----|----13----|----12----|----11----|----10----|----09 #define STV_VDP2_LWTA1U (m_vdp2_regs[0x0dc/2]) - #define STV_VDP2_W1LWE ((STV_VDP2_LWTA0U & 0x8000) >> 15) + #define STV_VDP2_W1LWE ((STV_VDP2_LWTA1U & 0x8000) >> 15) /* 1800de - Line Window Table Address (W1)