diff --git a/src/mame/drivers/saturn.c b/src/mame/drivers/saturn.c index 63135cb1f6f..06c423a913a 100644 --- a/src/mame/drivers/saturn.c +++ b/src/mame/drivers/saturn.c @@ -18,9 +18,9 @@ Notes: TODO: (Main issues) - decap the SH-1, used for CD block (needed especially for Sega Saturn) -- IRQs: some games have some issues with timing accurate IRQs,check/fix all of them. +- IRQs: some games have some issues with timing accurate IRQs, check/fix all of them. - The Cart-Dev mode hangs even with the -dev bios,I would like to see what it does on the real HW. -- IC13 games on the bios dev doesn't even load the cartridge / crashes the emulation at start-up, +- IC13 games on the dev bios doesn't even load the cartridge / crashes the emulation at start-up, rom rearrange needed? - SCU DSP still has its fair share of issues, it also needs to be converted to CPU structure; - Add the RS232c interface (serial port),needed by fhboxers. @@ -28,15 +28,14 @@ TODO: - Reimplement the idle skip if possible. - clean up the I/Os, by using per-game specific mapped ports and rewrite it by using 16-bit trampolines - Properly emulate the protection chips, used by several games (check stvprot.c for more info) -- Move SCU device into its respective files; +- Move SCU device into its respective file; - Split ST-V and Saturn files properly; -- completely rewrite IOGA for ST-V; (per-game issues) - stress: accesses the Sound Memory Expansion Area (0x05a80000-0x05afffff), unknown purpose; - smleague / finlarch: it randomly hangs / crashes,it works if you use a ridiculous MCFG_INTERLEAVE number,might need strict SH-2 synching. -- suikoenb/shanhigw + others: why do we get 2 credits on startup? Cause might be by a communication with the M68k +- groovef / myfairld: why do we get 2 credits on startup? Cause might be by a communication with the M68k - myfairld: Apparently this game gives a black screen (either test mode and in-game mode),but let it wait for about 10 seconds and the game will load everything. This is because of a hellishly slow m68k sub-routine located at 54c2. Likely to not be a bug but an in-game design issue. @@ -500,7 +499,7 @@ static READ32_HANDLER( saturn_scu_r ) saturn_state *state = space->machine().driver_data(); UINT32 res; - /*TODO: write only registers must return 0...*/ + /*TODO: write only registers must return 0 or open bus */ switch(offset) { case 0x5c/4: @@ -2038,9 +2037,6 @@ static TIMER_DEVICE_CALLBACK( saturn_scanline ) { video_update_vdp1(timer.machine()); - if(STV_VDP1_VBE) - state->m_vdp1.framebuffer_clear_on_next_frame = 1; - if(!(state->m_scu.ism & IRQ_VDP1_END)) { device_set_input_line_and_vector(state->m_maincpu, 0x2, HOLD_LINE, 0x4d); @@ -2070,6 +2066,9 @@ static TIMER_DEVICE_CALLBACK( saturn_scanline ) } else state->m_scu.ist |= (IRQ_VBLANK_IN); + + if(STV_VDP1_VBE) + state->m_vdp1.framebuffer_clear_on_next_frame = 1; } else if((scanline % y_step) == 0 && scanline < vblank_line*y_step) { diff --git a/src/mame/video/stvvdp1.c b/src/mame/video/stvvdp1.c index 586d05f68b9..80f2148f78b 100644 --- a/src/mame/video/stvvdp1.c +++ b/src/mame/video/stvvdp1.c @@ -1959,19 +1959,25 @@ static void stv_vdp1_process_list(running_machine &machine) switch (stv2_current_sprite.CMDCTRL & 0x000f) { case 0x0000: - if (VDP1_LOG) logerror ("Sprite List Normal Sprite\n"); + if (VDP1_LOG) logerror ("Sprite List Normal Sprite (%d %d)\n",stv2_current_sprite.CMDXA,stv2_current_sprite.CMDYA); stv2_current_sprite.ispoly = 0; stv_vpd1_draw_normal_sprite(machine, cliprect, 0); break; case 0x0001: - if (VDP1_LOG) logerror ("Sprite List Scaled Sprite\n"); + if (VDP1_LOG) logerror ("Sprite List Scaled Sprite (%d %d)\n",stv2_current_sprite.CMDXA,stv2_current_sprite.CMDYA); stv2_current_sprite.ispoly = 0; stv_vpd1_draw_scaled_sprite(machine, cliprect); break; case 0x0002: if (VDP1_LOG) logerror ("Sprite List Distorted Sprite\n"); + if (VDP1_LOG) logerror ("(A: %d %d)\n",stv2_current_sprite.CMDXA,stv2_current_sprite.CMDYA); + if (VDP1_LOG) logerror ("(B: %d %d)\n",stv2_current_sprite.CMDXB,stv2_current_sprite.CMDYB); + if (VDP1_LOG) logerror ("(C: %d %d)\n",stv2_current_sprite.CMDXC,stv2_current_sprite.CMDYC); + if (VDP1_LOG) logerror ("(D: %d %d)\n",stv2_current_sprite.CMDXD,stv2_current_sprite.CMDYD); + if (VDP1_LOG) logerror ("CMDPMOD = %04x\n",stv2_current_sprite.CMDPMOD); + stv2_current_sprite.ispoly = 0; stv_vpd1_draw_distorted_sprite(machine, cliprect); break; @@ -2011,7 +2017,7 @@ static void stv_vdp1_process_list(running_machine &machine) break; case 0x000a: - if (VDP1_LOG) logerror ("Sprite List Local Co-Ordinate Set\n"); + if (VDP1_LOG) logerror ("Sprite List Local Co-Ordinate Set (%d %d)\n",(INT16)stv2_current_sprite.CMDXA,(INT16)stv2_current_sprite.CMDYA); state->m_vdp1.local_x = (INT16)stv2_current_sprite.CMDXA; state->m_vdp1.local_y = (INT16)stv2_current_sprite.CMDYA; break; @@ -2112,7 +2118,7 @@ void video_update_vdp1(running_machine &machine) case 1:/*Draw by request*/ break; case 2:/*Automatic Draw*/ - if ( framebuffer_changed ) + if ( framebuffer_changed || VDP1_LOG ) { /*set CEF to 1*/ stv_vdp1_process_list(machine);