From ce2c96c20a892fece6dfbd3a1bfa389d7229d368 Mon Sep 17 00:00:00 2001 From: hap Date: Tue, 11 Apr 2017 04:14:05 +0200 Subject: [PATCH] beathead: removed speedup hack (nw) --- src/mame/drivers/beathead.cpp | 56 +---------------------------------- src/mame/includes/beathead.h | 21 ++++++------- 2 files changed, 10 insertions(+), 67 deletions(-) diff --git a/src/mame/drivers/beathead.cpp b/src/mame/drivers/beathead.cpp index f8f5c0a89d0..cd57cc06e45 100644 --- a/src/mame/drivers/beathead.cpp +++ b/src/mame/drivers/beathead.cpp @@ -121,7 +121,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(beathead_state::scanline_callback) int scanline = param; /* update the video */ -// m_screen->update_now(); m_screen->update_partial(m_screen->vpos()); /* on scanline zero, clear any halt condition */ @@ -425,63 +424,10 @@ ROM_END -/************************************* - * - * Driver speedups - * - *************************************/ - -/* - In-game hotspot @ 0180F8D8 -*/ - - -READ32_MEMBER( beathead_state::speedup_r ) -{ - uint32_t result = *m_speedup_data; - if ((space.device().safe_pcbase() & 0xfffff) == 0x006f0 && result == space.device().state().state_int(ASAP_R3)) - space.device().execute().spin_until_interrupt(); - return result; -} - - -READ32_MEMBER( beathead_state::movie_speedup_r ) -{ - int result = *m_movie_speedup_data; - if ((space.device().safe_pcbase() & 0xfffff) == 0x00a88 && (space.device().state().state_int(ASAP_R28) & 0xfffff) == 0x397c0 && - m_movie_speedup_data[4] == space.device().state().state_int(ASAP_R1)) - { - uint32_t temp = (int16_t)result + m_movie_speedup_data[4] * 262; - if (temp - (uint32_t)space.device().state().state_int(ASAP_R15) < (uint32_t)space.device().state().state_int(ASAP_R23)) - space.device().execute().spin_until_interrupt(); - } - return result; -} - - - -/************************************* - * - * Driver initialization - * - *************************************/ - -DRIVER_INIT_MEMBER(beathead_state,beathead) -{ - /* prepare the speedups */ - m_maincpu->space(AS_PROGRAM).install_read_handler(0x00000ae8, 0x00000aeb, read32_delegate(FUNC(beathead_state::speedup_r), this)); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x00000804, 0x00000807, read32_delegate(FUNC(beathead_state::movie_speedup_r), this)); - - m_speedup_data = m_ram_base + 0xae8/4; - m_movie_speedup_data = m_ram_base + 0x804/4; -} - - - /************************************* * * Game driver(s) * *************************************/ -GAME( 1993, beathead, 0, beathead, beathead, beathead_state, beathead, ROT0, "Atari Games", "BeatHead (prototype)", 0 ) +GAME( 1993, beathead, 0, beathead, beathead, driver_device, 0, ROT0, "Atari Games", "BeatHead (prototype)", 0 ) diff --git a/src/mame/includes/beathead.h b/src/mame/includes/beathead.h index d1fb985052c..786cf7a9c6f 100644 --- a/src/mame/includes/beathead.h +++ b/src/mame/includes/beathead.h @@ -15,14 +15,15 @@ class beathead_state : public atarigen_state public: beathead_state(const machine_config &mconfig, device_type type, const char *tag) : atarigen_state(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_jsa(*this, "jsa"), - m_nvram(*this, "nvram"), - m_videoram(*this, "videoram"), - m_vram_bulk_latch(*this, "vram_bulk_latch"), - m_palette_select(*this, "palette_select"), - m_ram_base(*this, "ram_base"), - m_rom_base(*this, "rom_base") { } + m_maincpu(*this, "maincpu"), + m_jsa(*this, "jsa"), + m_nvram(*this, "nvram"), + m_videoram(*this, "videoram"), + m_vram_bulk_latch(*this, "vram_bulk_latch"), + m_palette_select(*this, "palette_select"), + m_ram_base(*this, "ram_base"), + m_rom_base(*this, "rom_base") + { } virtual void machine_reset() override; @@ -58,9 +59,6 @@ public: uint8_t m_eeprom_enabled; - uint32_t * m_speedup_data; - uint32_t * m_movie_speedup_data; - // in drivers/beathead.c virtual void update_interrupts() override; DECLARE_WRITE32_MEMBER( interrupt_control_w ); @@ -80,6 +78,5 @@ public: DECLARE_WRITE32_MEMBER( finescroll_w ); DECLARE_READ32_MEMBER( hsync_ram_r ); DECLARE_WRITE32_MEMBER( hsync_ram_w ); - DECLARE_DRIVER_INIT(beathead); TIMER_DEVICE_CALLBACK_MEMBER(scanline_callback); };