diff --git a/src/mame/video/powervr2.c b/src/mame/video/powervr2.c index 2d29aeaf181..5d193630d9c 100644 --- a/src/mame/video/powervr2.c +++ b/src/mame/video/powervr2.c @@ -3170,7 +3170,6 @@ void powervr2_device::pvr_scanline_timer(int vpos) { int vbin_line = spg_vblank_int & 0x3ff; int vbout_line = (spg_vblank_int >> 16) & 0x3ff; - int spg_hblank_int & 0x3ff if(vbin_line == vpos) irq_cb(VBL_IN_IRQ); diff --git a/src/mess/includes/dccons.h b/src/mess/includes/dccons.h index a47332a1ce4..417c27b369f 100644 --- a/src/mess/includes/dccons.h +++ b/src/mess/includes/dccons.h @@ -56,4 +56,6 @@ private: UINT8 *atapi_data; int atapi_data_ptr, atapi_data_len, atapi_xferlen, atapi_xferbase, atapi_cdata_wait, atapi_xfermod; UINT8 xfer_mode; + int atapi_pio_ptr; + UINT8 pio_sector_buffer[2048]; }; diff --git a/src/mess/machine/dccons.c b/src/mess/machine/dccons.c index beb87c84e65..efb4869a645 100644 --- a/src/mess/machine/dccons.c +++ b/src/mess/machine/dccons.c @@ -452,8 +452,43 @@ READ32_MEMBER(dc_cons_state::dc_mess_gdrom_r) } else { + /* GD-Rom transfer via PIO, preliminary */ + UINT8 pio_tr_size; + + if(atapi_pio_ptr == 0) + { + gdrom->ReadData( pio_sector_buffer, 2048 ); + } data = 0; - printf("Read from empty SCSI queue\n"); + pio_tr_size = 0; + + for(int i=0;i<4;i++) + { + if(mem_mask & (0xff << i*8)) + { + data|= pio_sector_buffer[atapi_pio_ptr+pio_tr_size]<>8)&0xff; + if(atapi_pio_ptr == 0) + { + gdrom_set_status(ATAPI_STAT_DRDY,true); + gdrom_set_status(ATAPI_STAT_DRQ,false); + gdrom_set_status(ATAPI_STAT_BSY,false); + atapi_regs[ATAPI_REG_INTREASON] = ATAPI_INTREASON_IO | ATAPI_INTREASON_COMMAND; + atapi_regs[ATAPI_REG_SAMTAG] = GDROM_PAUSE_STATE | 0x80; + +// g1bus_regs[SB_GDST]=0; + gdrom_raise_irq(); + } } return data;