diff --git a/src/mame/includes/stv.h b/src/mame/includes/stv.h index f26121288a1..60412099cea 100644 --- a/src/mame/includes/stv.h +++ b/src/mame/includes/stv.h @@ -57,6 +57,7 @@ public: UINT8 *gfx_decode; UINT16 lopr; UINT16 copr; + UINT16 ewdr; int local_x; int local_y; diff --git a/src/mame/machine/stvcd.c b/src/mame/machine/stvcd.c index 189e0d370a2..97dffcd0ab0 100644 --- a/src/mame/machine/stvcd.c +++ b/src/mame/machine/stvcd.c @@ -321,7 +321,9 @@ static void cd_free_block(blockT *blktofree) CDROM_LOG(("cd_free_block: %x\n", (UINT32)(FPTR)blktofree)) if(blktofree == NULL) + { return; + } for (i = 0; i < 200; i++) { @@ -685,14 +687,18 @@ static void cd_writeWord(running_machine &machine, UINT32 addr, UINT16 data) // CR1 & 4 = don't confirm mode 2 subheader // CR1 & 8 = retry reading mode 2 sectors // CR1 & 10 = force single-speed + // CR1 & 80 = no change flag (done by Assault Suit Leynos 2) CDROM_LOG(("%s:CD: Initialize CD system\n", machine.describe_context())) - hirqreg &= 0xffe5; + if((cr1 & 0x80) == 0x00) + { + cd_stat = CD_STAT_PAUSE; + cd_curfad = 150; + fadstoplay = 0; + in_buffer = 0; + buffull = 0; + hirqreg &= 0xffe5; + } hirqreg |= (CMOK|ESEL); - cd_stat = CD_STAT_PAUSE; - cd_curfad = 150; - fadstoplay = 0; - in_buffer = 0; - buffull = 0; cr_standard_return(cd_stat); break; @@ -1049,12 +1055,14 @@ static void cd_writeWord(running_machine &machine, UINT32 addr, UINT16 data) break; case 0x4800: // Reset Selector + { + int i,j; + CDROM_LOG(("%s:CD: Reset Selector\n", machine.describe_context())) if((cr1 & 0xff) == 0x00) { UINT8 bufnum = cr3>>8; - int i; if(bufnum < MAX_FILTERS) { @@ -1078,9 +1086,59 @@ static void cd_writeWord(running_machine &machine, UINT32 addr, UINT16 data) return; } - // ... + /* reset false filter output conditions */ + if(cr1 & 0x80) + { + for(i=0;i(); if ( VDP1_LOG ) logerror( "Clearing %d framebuffer\n", state->m_vdp1.framebuffer_current_draw ); - memset( state->m_vdp1.framebuffer[ which_framebuffer ], 0, 1024 * 256 * sizeof(UINT16) * 2 ); + memset( state->m_vdp1.framebuffer[ which_framebuffer ], state->m_vdp1.ewdr, 1024 * 256 * sizeof(UINT16) * 2 ); } @@ -226,7 +226,6 @@ static void stv_prepare_framebuffers( running_machine &machine ) state->m_vdp1.framebuffer_draw_lines[i] = &state->m_vdp1.framebuffer[0][0]; state->m_vdp1.framebuffer_display_lines[i] = &state->m_vdp1.framebuffer[1][0]; } - } else { @@ -313,9 +312,7 @@ WRITE16_HANDLER( saturn_vdp1_regs_w ) case 0x06/2: if ( VDP1_LOG ) logerror( "VDP1: Erase data set %08X\n", data ); - if(data && data != 0x8000) - popmessage("EWDR set %08x, contact MAMEdev",STV_VDP1_EWDR); - + state->m_vdp1.ewdr = STV_VDP1_EWDR; break; case 0x08/2: if ( VDP1_LOG ) logerror( "VDP1: Erase upper-left coord set: %08X\n", data ); diff --git a/src/mame/video/stvvdp2.c b/src/mame/video/stvvdp2.c index 106bad9ec6c..53a61d3097c 100644 --- a/src/mame/video/stvvdp2.c +++ b/src/mame/video/stvvdp2.c @@ -3028,7 +3028,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; @@ -4172,7 +4172,7 @@ static void stv_vdp2_check_tilemap(running_machine &machine, bitmap_t *bitmap, c return; } -// window_applied = +// window_applied = stv_vdp2_apply_window_on_layer(machine,&mycliprect); if (stv2_current_tilemap.bitmap_enable) // this layer is a bitmap