Port from MESS, nw

This commit is contained in:
Angelo Salese 2011-08-01 00:09:50 +00:00
parent ad84657450
commit 32217d762e
2 changed files with 15 additions and 10 deletions

View File

@ -693,6 +693,7 @@ static void cd_writeWord(running_machine &machine, UINT32 addr, UINT16 data)
{
cd_stat = CD_STAT_PAUSE;
cd_curfad = 150;
//cur_track = 1;
fadstoplay = 0;
in_buffer = 0;
buffull = 0;
@ -838,10 +839,17 @@ static void cd_writeWord(running_machine &machine, UINT32 addr, UINT16 data)
fadstoplay = (cdrom_get_track_start(cdrom, 0xaa)) - cd_curfad;
printf("track mode %08x %08x\n",cd_curfad,fadstoplay);
}
else /* Galaxy Fight calls 10ff ffff ffff ffff, resume/restart previously called track */
else
{
cd_curfad = cdrom_get_track_start(cdrom, cur_track-1);
fadstoplay = cdrom_get_track_start(cdrom, cur_track) - cd_curfad;
/* resume from a pause state */
/* TODO: Galaxy Fight calls 10ff ffff ffff ffff, but then it calls 0x04->0x02->0x06->0x11->0x04->0x02->0x06 command sequence
(and current implementation nukes start/end FAD addresses at 0x04). I'm sure that this doesn't work like this, but there could
be countless possible combinations ... */
if(fadstoplay == 0)
{
cd_curfad = cdrom_get_track_start(cdrom, cur_track-1);
fadstoplay = cdrom_get_track_start(cdrom, cur_track) - cd_curfad;
}
printf("track resume %08x %08x\n",cd_curfad,fadstoplay);
}
}

View File

@ -5416,10 +5416,8 @@ READ32_HANDLER ( saturn_vdp2_regs_r )
READ32_HANDLER ( saturn_vdp2_cram_r )
{
saturn_state *state = space->machine().driver_data<saturn_state>();
UINT8 cmode0;
cmode0 = ((STV_VDP2_CRMD & 3) == 0) || (STV_VDP2_CRMD & 2);
offset &= (0xfff) >> (cmode0+2);
offset &= (0xfff) >> (2);
return state->m_vdp2_cram[offset];
}
@ -5440,6 +5438,9 @@ WRITE32_HANDLER ( saturn_vdp2_cram_w )
cmode0 = (STV_VDP2_CRMD & 3) == 0;
offset &= (0xfff) >> (2);
COMBINE_DATA(&state->m_vdp2_cram[offset]);
switch( STV_VDP2_CRMD )
{
/*Mode 2/3*/
@ -5448,8 +5449,6 @@ WRITE32_HANDLER ( saturn_vdp2_cram_w )
{
offset &= (0xfff) >> 3;
COMBINE_DATA(&state->m_vdp2_cram[offset]);
b = ((state->m_vdp2_cram[offset] & 0x00ff0000) >> 16);
g = ((state->m_vdp2_cram[offset] & 0x0000ff00) >> 8);
r = ((state->m_vdp2_cram[offset] & 0x000000ff) >> 0);
@ -5462,8 +5461,6 @@ WRITE32_HANDLER ( saturn_vdp2_cram_w )
{
offset &= (0xfff) >> (cmode0+2);
COMBINE_DATA(&state->m_vdp2_cram[offset]);
b = ((state->m_vdp2_cram[offset] & 0x00007c00) >> 10);
g = ((state->m_vdp2_cram[offset] & 0x000003e0) >> 5);
r = ((state->m_vdp2_cram[offset] & 0x0000001f) >> 0);