stop SMS VDP timers in systems that don't need them. nw.

This commit is contained in:
Fabio Priuli 2014-03-28 12:09:31 +00:00
parent 78caedf58a
commit bbc6e8fb9d
10 changed files with 39 additions and 13 deletions

View File

@ -1698,6 +1698,21 @@ UINT32 sega315_5124_device::screen_update( screen_device &screen, bitmap_rgb32 &
}
// MegaDrive/Genesis VDP (315-5313) is currently coded as superset of the 315-5124
// To support properly SMS VDP in MegaTech and MegaPlay, we start the 315-5124
// in all systems using MegaDrive/Genesis VDP, but this affects the performance
// of the emulator hence we stop it in systems that don't need it
// Proper way to handle this would be implement the 315-5124 modes in the 315-5313
// device instead of running the two chips separately...
void sega315_5124_device::stop_timers()
{
m_display_timer->adjust(attotime::never);
m_check_hint_timer->adjust(attotime::never);
m_check_vint_timer->adjust(attotime::never);
m_draw_timer->adjust(attotime::never);
}
/*****************************************************************************
DEVICE INTERFACE
*****************************************************************************/

View File

@ -81,6 +81,7 @@ public:
void hcount_latch() { hcount_latch_at_hpos( m_screen->hpos() ); };
void hcount_latch_at_hpos( int hpos );
void stop_timers();
bitmap_rgb32 &get_bitmap() { return m_tmpbitmap; };
bitmap_ind8 &get_y1_bitmap() { return m_y1_bitmap; };

View File

@ -222,7 +222,8 @@ DRIVER_INIT_MEMBER(md_boot_state,hshavoc)
}
DRIVER_INIT_CALL(megadriv);
m_vdp->stop_timers();
}

View File

@ -648,11 +648,12 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( megadrvb, md_boot_state )
MCFG_FRAGMENT_ADD(md_ntsc)
MCFG_MACHINE_START_OVERRIDE(md_boot_state, md_bootleg)
MACHINE_CONFIG_END
MACHINE_START_MEMBER(md_boot_state, md_6button)
{
MACHINE_START_CALL_MEMBER(megadriv);
MACHINE_START_CALL_MEMBER(md_bootleg);
m_io_pad_6b[0] = ioport("EXTRA1");
m_io_pad_6b[1] = ioport("EXTRA2");

View File

@ -280,6 +280,8 @@ static MACHINE_CONFIG_START( puckpkmn, md_boot_state )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(puckpkmn_map)
MCFG_MACHINE_START_OVERRIDE(md_boot_state, md_bootleg)
MCFG_DEVICE_REMOVE("genesis_snd_z80")
MCFG_OKIM6295_ADD("oki", XTAL_4MHz / 4, OKIM6295_PIN7_HIGH)

View File

@ -102,6 +102,8 @@ MACHINE_START_MEMBER(segac2_state,segac2)
save_item(NAME(m_misc_io_data));
save_item(NAME(m_prot_write_buf));
save_item(NAME(m_prot_read_buf));
m_vdp->stop_timers();
}

View File

@ -145,6 +145,7 @@ void segas18_state::init_generic(segas18_rom_board rom_board)
m_vdp->set_vdp_pal(FALSE);
m_vdp->set_framerate(60);
m_vdp->set_total_scanlines(262);
m_vdp->stop_timers(); // 315-5124 timers
// save state
save_item(NAME(m_mcu_data));

View File

@ -165,18 +165,19 @@ public:
DECLARE_DRIVER_INIT(topshoot);
DECLARE_DRIVER_INIT(puckpkmn);
DECLARE_DRIVER_INIT(hshavoc);
DECLARE_WRITE16_MEMBER( bl_710000_w );
DECLARE_READ16_MEMBER( bl_710000_r );
DECLARE_WRITE16_MEMBER( aladmdb_w );
DECLARE_READ16_MEMBER( aladmdb_r );
DECLARE_READ16_MEMBER( mk3mdb_dsw_r );
DECLARE_READ16_MEMBER( ssf2mdb_dsw_r );
DECLARE_READ16_MEMBER( srmdb_dsw_r );
DECLARE_READ16_MEMBER( topshoot_200051_r );
DECLARE_WRITE16_MEMBER(bl_710000_w);
DECLARE_READ16_MEMBER(bl_710000_r);
DECLARE_WRITE16_MEMBER(aladmdb_w);
DECLARE_READ16_MEMBER(aladmdb_r);
DECLARE_READ16_MEMBER(mk3mdb_dsw_r);
DECLARE_READ16_MEMBER(ssf2mdb_dsw_r);
DECLARE_READ16_MEMBER(srmdb_dsw_r);
DECLARE_READ16_MEMBER(topshoot_200051_r);
DECLARE_READ16_MEMBER(puckpkmna_70001c_r);
DECLARE_READ16_MEMBER(puckpkmna_4b2476_r);
DECLARE_MACHINE_START( md_6button );
DECLARE_MACHINE_START(md_bootleg) { MACHINE_START_CALL_MEMBER(megadriv); m_vdp->stop_timers(); }
DECLARE_MACHINE_START(md_6button);
};

View File

@ -288,6 +288,8 @@ MACHINE_START_MEMBER(md_cons_state, md_common)
// setup timers for 6 button pads
for (int i = 0; i < 3; i++)
m_io_timeout[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(md_base_state::io_timeout_timer_callback),this), (void*)(FPTR)i);
m_vdp->stop_timers();
}
MACHINE_START_MEMBER(md_cons_state, ms_megadriv)

View File

@ -342,8 +342,8 @@ MACHINE_START_MEMBER(pico_state,pico)
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a13),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a13),(base_md_cart_slot_device*)m_picocart));
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a15),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a15),(base_md_cart_slot_device*)m_picocart));
m_maincpu->space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16_delegate(FUNC(base_md_cart_slot_device::write_tmss_bank),(base_md_cart_slot_device*)m_picocart));
m_vdp->stop_timers();
}
static MACHINE_CONFIG_START( pico, pico_state )