Port from MESS, nw

This commit is contained in:
Angelo Salese 2011-08-08 12:45:17 +00:00
parent 74f21eafd1
commit 391460af58
3 changed files with 11 additions and 9 deletions

View File

@ -455,18 +455,15 @@ static void cd_exec_command(running_machine &machine)
playtype = 0;
// and do the disc I/O
// make sure it doesn't come in too early
if (cdrom_get_track_type(cdrom, cur_track-1) == CD_TRACK_AUDIO)
// cdda
if(cdrom_get_track_type(cdrom, cdrom_get_track(cdrom, cd_curfad)) == CD_TRACK_AUDIO)
{
cdda_pause_audio( machine.device( "cdda" ), 0 );
cdda_start_audio( machine.device( "cdda" ), cd_curfad, fadstoplay );
cd_speed = 1;
}
else
{
cdda_stop_audio( machine.device( "cdda" ) ); //stop any pending CD-DA
cd_speed = 2; //TODO: previous setting
}
break;
@ -1010,7 +1007,7 @@ static void cd_exec_command(running_machine &machine)
xfersectnum = sectnum;
transpart = &partitions[bufnum];
cd_stat &= ~CD_STAT_TRANS;
cd_stat |= CD_STAT_TRANS;
cr_standard_return(cd_stat);
hirqreg |= (CMOK|EHST|DRDY);
}
@ -1219,7 +1216,10 @@ TIMER_DEVICE_CALLBACK( stv_sector_cb )
if (fadstoplay)
cd_playdata();
sector_timer->adjust(attotime::from_hz(75*cd_speed)); // 150 sectors / second = 300kBytes/second
if(cdrom_get_track_type(cdrom, cdrom_get_track(cdrom, cd_curfad)) == CD_TRACK_AUDIO)
sector_timer->adjust(attotime::from_hz(75)); // 75 sectors / second = 150kBytes/second (cdda track ignores cd_speed setting)
else
sector_timer->adjust(attotime::from_hz(75*cd_speed)); // 75 / 150 sectors / second = 150 / 300kBytes/second
}
// global functions

View File

@ -172,12 +172,14 @@ READ16_HANDLER( saturn_vdp1_regs_r )
switch(offset)
{
case 0x02/2:
return 0;
case 0x10/2:
break;
case 0x12/2: return state->m_vdp1.lopr;
case 0x14/2: return state->m_vdp1.copr;
/* MODR register, read register for the other VDP1 regs
(Shienryu SS version abuses of this during intro, otherwise you get vertical oriented VDP1 sprites on horizontal display) */
(Shienryu SS version abuses of this during intro) */
case 0x16/2:
UINT16 modr;

View File

@ -3082,7 +3082,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine &machine, bitmap_t *bitma
gfxdatalow = gfxdata + stv2_current_tilemap.bitmap_map * 0x20000;
gfxdata+=(
(stv2_current_tilemap.scrollx & (xlinesize-1)) +
((stv2_current_tilemap.scrolly) * (xlinesize)) + /* TODO: mask ysize, check me! */
((stv2_current_tilemap.scrolly & (ysize-1)) * (xlinesize)) + /* TODO: mask ysize, check me! */
(stv2_current_tilemap.bitmap_map * 0x20000)
);
gfxdatahigh = gfxdatalow + xlinesize*ysize;