From 8011d411fd9b91c5aa09d025f664f3308bcbbda0 Mon Sep 17 00:00:00 2001 From: Osso13 Date: Wed, 14 Jan 2015 18:32:38 +0100 Subject: eolith.c, eolith16.c, vegaseo.c: added save state support (nw) delete depend_mame.mak if you have it or it won't compile --- src/mame/drivers/eolith.c | 50 +++++++++++++++++++++----------------------- src/mame/drivers/eolith16.c | 14 ++++++++----- src/mame/drivers/eolithsp.c | 50 ++++++++++++++++++++++---------------------- src/mame/drivers/vegaeo.c | 22 +++++++++---------- src/mame/includes/eolith.h | 45 +++++++++++++++++++++++++-------------- src/mame/includes/eolithsp.h | 4 ---- src/mame/video/eolith.c | 9 ++++---- 7 files changed, 101 insertions(+), 93 deletions(-) delete mode 100644 src/mame/includes/eolithsp.h diff --git a/src/mame/drivers/eolith.c b/src/mame/drivers/eolith.c index dc8cfb7eb40..478a4a9e9b2 100644 --- a/src/mame/drivers/eolith.c +++ b/src/mame/drivers/eolith.c @@ -103,10 +103,6 @@ #include "machine/eepromser.h" #include "includes/eolith.h" -#include "includes/eolithsp.h" - - - /************************************* @@ -125,7 +121,7 @@ READ32_MEMBER(eolith_state::eolith_custom_r) bit 8 = ??? bit 9 = ??? */ - eolith_speedup_read(space); + speedup_read(); return (m_in0->read() & ~0x300) | (machine().rand() & 0x300); } @@ -165,7 +161,7 @@ WRITE32_MEMBER( eolith_state::sound_w ) m_sound_data = data; m_soundcpu->set_input_line(MCS51_INT0_LINE, ASSERT_LINE); - space.machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(250)); + machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(250)); } @@ -1491,13 +1487,15 @@ MACHINE_RESET_MEMBER(eolith_state,eolith) DRIVER_INIT_MEMBER(eolith_state,eolith) { - init_eolith_speedup(machine()); + init_speedup(); // Sound CPU -> QS1000 CPU serial link m_soundcpu->i8051_set_serial_tx_callback(write8_delegate(FUNC(eolith_state::soundcpu_to_qs1000),this)); // Configure the sound ROM banking membank("sound_bank")->configure_entries(0, 16, memregion("sounddata")->base(), 0x8000); + + save_item(NAME(m_sound_data)); } DRIVER_INIT_MEMBER(eolith_state,landbrk) @@ -1569,22 +1567,22 @@ DRIVER_INIT_MEMBER(eolith_state,hidctch3) * *************************************/ -GAME( 1998, linkypip, 0, eolith45, linkypip, eolith_state, eolith, ROT0, "Eolith", "Linky Pipe", GAME_IMPERFECT_SOUND ) -GAME( 1998, ironfort, 0, ironfort, ironfort, eolith_state, eolith, ROT0, "Eolith", "Iron Fortress", GAME_IMPERFECT_SOUND ) -GAME( 1998, ironfortj, ironfort, ironfort, ironfortj, eolith_state, eolith, ROT0, "Eolith", "Iron Fortress (Japan)", GAME_IMPERFECT_SOUND ) -GAME( 1998, hidnctch, 0, eolith45, hidnctch, eolith_state, eolith, ROT0, "Eolith", "Hidden Catch (World) / Tul Lin Gu Lim Chat Ki '98 (Korea) (pcb ver 3.03)", GAME_IMPERFECT_SOUND ) // or Teurrin Geurim Chajgi '98 -GAME( 1998, raccoon, 0, eolith45, raccoon, eolith_state, eolith, ROT0, "Eolith", "Raccoon World", GAME_IMPERFECT_SOUND ) -GAME( 1998, puzzlekg, 0, eolith45, puzzlekg, eolith_state, eolith, ROT0, "Eolith", "Puzzle King (Dance & Puzzle)", GAME_IMPERFECT_SOUND ) -GAME( 1999, candy, 0, eolith50, candy, eolith_state, eolith, ROT0, "Eolith", "Candy Candy", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) -GAME( 1999, hidctch2, 0, eolith50, hidctch2, eolith_state, hidctch2, ROT0, "Eolith", "Hidden Catch 2 (pcb ver 3.03) (Kor/Eng) (AT89c52 protected)", GAME_IMPERFECT_SOUND ) -GAME( 1999, hidctch2a, hidctch2, eolith50, hidctch2, eolith_state, eolith, ROT0, "Eolith", "Hidden Catch 2 (pcb ver 1.00) (Kor/Eng/Jpn/Chi)", GAME_IMPERFECT_SOUND ) -GAME( 1999, hidnc2k, 0, eolith50, hidctch2, eolith_state, hidnc2k, ROT0, "Eolith", "Hidden Catch 2000 (AT89c52 protected)", GAME_IMPERFECT_SOUND ) -GAME( 1999, landbrk, 0, eolith45, landbrk, eolith_state, landbrk, ROT0, "Eolith", "Land Breaker (World) / Miss Tang Ja Ru Gi (Korea) (pcb ver 3.02)", GAME_IMPERFECT_SOUND ) // or Miss Ttang Jjareugi -GAME( 1999, landbrka, landbrk, eolith45, landbrk, eolith_state, landbrka, ROT0, "Eolith", "Land Breaker (World) / Miss Tang Ja Ru Gi (Korea) (pcb ver 3.03) (AT89c52 protected)", GAME_IMPERFECT_SOUND ) // or Miss Ttang Jjareugi -GAME( 1999, nhidctch, 0, eolith45, hidctch2, eolith_state, eolith, ROT0, "Eolith", "New Hidden Catch (World) / New Tul Lin Gu Lim Chat Ki '98 (Korea) (pcb ver 3.02)", GAME_IMPERFECT_SOUND ) // or New Teurrin Geurim Chajgi '98 -GAME( 1999, penfan, 0, eolith45, penfan, eolith_state, eolith, ROT0, "Eolith", "Penfan Girls - Step1. Mild Mind (set 1)", GAME_IMPERFECT_SOUND ) // alt title of Ribbon -GAME( 1999, penfana, penfan, eolith45, penfan, eolith_state, eolith, ROT0, "Eolith", "Penfan Girls - Step1. Mild Mind (set 2)", GAME_IMPERFECT_SOUND ) -GAME( 2000, stealsee, 0, eolith45, stealsee, eolith_state, eolith, ROT0, "Moov Generation / Eolith", "Steal See", GAME_IMPERFECT_SOUND ) -GAME( 2000, hidctch3, 0, eolith50, hidctch3, eolith_state, hidctch3, ROT0, "Eolith", "Hidden Catch 3 (ver 1.00 / pcb ver 3.05)", GAME_IMPERFECT_SOUND ) -GAME( 2001, fort2b, 0, eolith50, common, eolith_state, eolith, ROT0, "Eolith", "Fortress 2 Blue Arcade (ver 1.01 / pcb ver 3.05)", GAME_IMPERFECT_SOUND ) -GAME( 2001, fort2ba, fort2b, eolith50, common, eolith_state, eolith, ROT0, "Eolith", "Fortress 2 Blue Arcade (ver 1.00 / pcb ver 3.05)", GAME_IMPERFECT_SOUND ) +GAME( 1998, linkypip, 0, eolith45, linkypip, eolith_state, eolith, ROT0, "Eolith", "Linky Pipe", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1998, ironfort, 0, ironfort, ironfort, eolith_state, eolith, ROT0, "Eolith", "Iron Fortress", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1998, ironfortj, ironfort, ironfort, ironfortj, eolith_state, eolith, ROT0, "Eolith", "Iron Fortress (Japan)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1998, hidnctch, 0, eolith45, hidnctch, eolith_state, eolith, ROT0, "Eolith", "Hidden Catch (World) / Tul Lin Gu Lim Chat Ki '98 (Korea) (pcb ver 3.03)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // or Teurrin Geurim Chajgi '98 +GAME( 1998, raccoon, 0, eolith45, raccoon, eolith_state, eolith, ROT0, "Eolith", "Raccoon World", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1998, puzzlekg, 0, eolith45, puzzlekg, eolith_state, eolith, ROT0, "Eolith", "Puzzle King (Dance & Puzzle)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1999, candy, 0, eolith50, candy, eolith_state, eolith, ROT0, "Eolith", "Candy Candy", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1999, hidctch2, 0, eolith50, hidctch2, eolith_state, hidctch2, ROT0, "Eolith", "Hidden Catch 2 (pcb ver 3.03) (Kor/Eng) (AT89c52 protected)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1999, hidctch2a, hidctch2, eolith50, hidctch2, eolith_state, eolith, ROT0, "Eolith", "Hidden Catch 2 (pcb ver 1.00) (Kor/Eng/Jpn/Chi)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1999, hidnc2k, 0, eolith50, hidctch2, eolith_state, hidnc2k, ROT0, "Eolith", "Hidden Catch 2000 (AT89c52 protected)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 1999, landbrk, 0, eolith45, landbrk, eolith_state, landbrk, ROT0, "Eolith", "Land Breaker (World) / Miss Tang Ja Ru Gi (Korea) (pcb ver 3.02)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // or Miss Ttang Jjareugi +GAME( 1999, landbrka, landbrk, eolith45, landbrk, eolith_state, landbrka, ROT0, "Eolith", "Land Breaker (World) / Miss Tang Ja Ru Gi (Korea) (pcb ver 3.03) (AT89c52 protected)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // or Miss Ttang Jjareugi +GAME( 1999, nhidctch, 0, eolith45, hidctch2, eolith_state, eolith, ROT0, "Eolith", "New Hidden Catch (World) / New Tul Lin Gu Lim Chat Ki '98 (Korea) (pcb ver 3.02)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // or New Teurrin Geurim Chajgi '98 +GAME( 1999, penfan, 0, eolith45, penfan, eolith_state, eolith, ROT0, "Eolith", "Penfan Girls - Step1. Mild Mind (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // alt title of Ribbon +GAME( 1999, penfana, penfan, eolith45, penfan, eolith_state, eolith, ROT0, "Eolith", "Penfan Girls - Step1. Mild Mind (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 2000, stealsee, 0, eolith45, stealsee, eolith_state, eolith, ROT0, "Moov Generation / Eolith", "Steal See", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 2000, hidctch3, 0, eolith50, hidctch3, eolith_state, hidctch3, ROT0, "Eolith", "Hidden Catch 3 (ver 1.00 / pcb ver 3.05)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 2001, fort2b, 0, eolith50, common, eolith_state, eolith, ROT0, "Eolith", "Fortress 2 Blue Arcade (ver 1.01 / pcb ver 3.05)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 2001, fort2ba, fort2b, eolith50, common, eolith_state, eolith, ROT0, "Eolith", "Fortress 2 Blue Arcade (ver 1.00 / pcb ver 3.05)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/eolith16.c b/src/mame/drivers/eolith16.c index cdf4e2069e2..cd152010b8f 100644 --- a/src/mame/drivers/eolith16.c +++ b/src/mame/drivers/eolith16.c @@ -15,7 +15,6 @@ #include "sound/okim6295.h" #include "includes/eolith.h" -#include "includes/eolithsp.h" class eolith16_state : public eolith_state @@ -26,13 +25,16 @@ public: UINT16 *m_vram; int m_vbuffer; + DECLARE_WRITE16_MEMBER(eeprom_w); DECLARE_READ16_MEMBER(eolith16_custom_r); DECLARE_WRITE16_MEMBER(vram_w); DECLARE_READ16_MEMBER(vram_r); + DECLARE_DRIVER_INIT(eolith16); DECLARE_VIDEO_START(eolith16); DECLARE_PALETTE_INIT(eolith16); + UINT32 screen_update_eolith16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -43,14 +45,14 @@ WRITE16_MEMBER(eolith16_state::eeprom_w) m_vbuffer = (data & 0x80) >> 7; coin_counter_w(machine(), 0, data & 1); - ioport("EEPROMOUT")->write(data, 0xff); + m_eepromoutport->write(data, 0xff); //data & 0x100 and data & 0x004 always set } READ16_MEMBER(eolith16_state::eolith16_custom_r) { - eolith_speedup_read(space); + speedup_read(); return ioport("SPECIAL")->read(); } @@ -113,6 +115,8 @@ INPUT_PORTS_END VIDEO_START_MEMBER(eolith16_state,eolith16) { m_vram = auto_alloc_array(machine(), UINT16, 0x10000); + save_pointer(NAME(m_vram), 0x10000); + save_item(NAME(m_vbuffer)); } UINT32 eolith16_state::screen_update_eolith16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) @@ -253,7 +257,7 @@ ROM_END DRIVER_INIT_MEMBER(eolith16_state,eolith16) { - init_eolith_speedup(machine()); + init_speedup(); } -GAME( 1999, klondkp, 0, eolith16, eolith16, eolith16_state, eolith16, ROT0, "Eolith", "KlonDike+", 0 ) +GAME( 1999, klondkp, 0, eolith16, eolith16, eolith16_state, eolith16, ROT0, "Eolith", "KlonDike+", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/eolithsp.c b/src/mame/drivers/eolithsp.c index 6a2be221534..f570d36395b 100644 --- a/src/mame/drivers/eolithsp.c +++ b/src/mame/drivers/eolithsp.c @@ -9,28 +9,22 @@ */ #include "emu.h" -#include "includes/eolithsp.h" #include "includes/eolith.h" -static int eolith_speedup_address; -static int eolith_speedup_address2; -static int eolith_speedup_resume_scanline; -static int eolith_vblank = 0; -static int eolith_scanline = 0; -void eolith_speedup_read(address_space &space) +void eolith_state::speedup_read() { /* for debug */ - //if ((space.device().safe_pc()!=eolith_speedup_address) && (eolith_vblank!=1) ) - // printf("%s:eolith speedup_read data %02x\n",space.machine().describe_context(), eolith_vblank); + //if ((space.device().safe_pc()!=m_speedup_address) && (m_speedup_vblank!=1) ) + // printf("%s:eolith speedup_read data %02x\n",space.machine().describe_context(), m_speedup_vblank); - if (eolith_vblank==0 && eolith_scanline < eolith_speedup_resume_scanline) + if (m_speedup_vblank==0 && m_speedup_scanline < m_speedup_resume_scanline) { - int pc = space.device().safe_pc(); + int pc = m_maincpu->pc(); - if ((pc==eolith_speedup_address) || (pc==eolith_speedup_address2)) + if ((pc==m_speedup_address) || (pc==m_speedup_address2)) { - space.device().execute().spin_until_trigger(1000); + m_maincpu->spin_until_trigger(1000); } } } @@ -71,22 +65,28 @@ static const struct }; -void init_eolith_speedup(running_machine &machine) +void eolith_state::init_speedup() { int n_game = 0; - eolith_speedup_address = 0; - eolith_speedup_resume_scanline = 0; + m_speedup_address = 0; + m_speedup_address2 = 0; + m_speedup_resume_scanline = 0; + m_speedup_vblank = 0; + m_speedup_scanline = 0; while( eolith_speedup_table[ n_game ].s_name != NULL ) { - if( strcmp( machine.system().name, eolith_speedup_table[ n_game ].s_name ) == 0 ) + if( strcmp( machine().system().name, eolith_speedup_table[ n_game ].s_name ) == 0 ) { - eolith_speedup_address = eolith_speedup_table[ n_game ].speedup_address; - eolith_speedup_address2 = eolith_speedup_table[ n_game ].speedup_address2; - eolith_speedup_resume_scanline = eolith_speedup_table[ n_game ].speedup_resume_scanline; + m_speedup_address = eolith_speedup_table[ n_game ].speedup_address; + m_speedup_address2 = eolith_speedup_table[ n_game ].speedup_address2; + m_speedup_resume_scanline = eolith_speedup_table[ n_game ].speedup_resume_scanline; } n_game++; } + + save_item(NAME(m_speedup_vblank)); + save_item(NAME(m_speedup_scanline)); } /* todo, use timers instead! */ @@ -94,23 +94,23 @@ TIMER_DEVICE_CALLBACK_MEMBER(eolith_state::eolith_speedup) { if (param==0) { - eolith_vblank = 0; + m_speedup_vblank = 0; } - if (param==eolith_speedup_resume_scanline) + if (param==m_speedup_resume_scanline) { machine().scheduler().trigger(1000); } if (param==240) { - eolith_vblank = 1; + m_speedup_vblank = 1; } } CUSTOM_INPUT_MEMBER(eolith_state::eolith_speedup_getvblank) { -// printf("%s:eolith speedup_read data %02x\n",machine().describe_context(), eolith_vblank); +// printf("%s:eolith speedup_read data %02x\n",machine().describe_context(), m_speedup_vblank); return (m_screen->vpos() >= 240); @@ -122,7 +122,7 @@ CUSTOM_INPUT_MEMBER(eolith_state::stealsee_speedup_getvblank) int pc = m_maincpu->pc(); if (pc==0x400081ec) - if(!eolith_vblank) + if(!m_speedup_vblank) m_maincpu->eat_cycles(500); return (m_screen->vpos() >= 240); diff --git a/src/mame/drivers/vegaeo.c b/src/mame/drivers/vegaeo.c index e91250ff0cf..2eb2f4edf36 100644 --- a/src/mame/drivers/vegaeo.c +++ b/src/mame/drivers/vegaeo.c @@ -16,7 +16,6 @@ #include "machine/at28c16.h" #include "sound/qs1000.h" #include "includes/eolith.h" -#include "includes/eolithsp.h" class vegaeo_state : public eolith_state @@ -27,19 +26,20 @@ public: UINT32 *m_vega_vram; UINT8 m_vega_vbuffer; + DECLARE_WRITE32_MEMBER(vega_vram_w); DECLARE_READ32_MEMBER(vega_vram_r); DECLARE_WRITE32_MEMBER(vega_misc_w); DECLARE_READ32_MEMBER(vegaeo_custom_read); DECLARE_WRITE32_MEMBER(soundlatch_w); - DECLARE_READ8_MEMBER(qs1000_p1_r); - DECLARE_WRITE8_MEMBER(qs1000_p1_w); DECLARE_WRITE8_MEMBER(qs1000_p2_w); DECLARE_WRITE8_MEMBER(qs1000_p3_w); + DECLARE_DRIVER_INIT(vegaeo); DECLARE_VIDEO_START(vega); + UINT32 screen_update_vega(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -62,12 +62,10 @@ WRITE8_MEMBER( vegaeo_state::qs1000_p3_w ) // ...x .... - ? // ..x. .... - /IRQ clear - qs1000_device *qs1000 = machine().device("qs1000"); - membank("qs1000:bank")->set_entry(data & 0x07); if (!BIT(data, 5)) - qs1000->set_irq(CLEAR_LINE); + m_qs1000->set_irq(CLEAR_LINE); } WRITE32_MEMBER(vegaeo_state::vega_vram_w) @@ -115,16 +113,14 @@ WRITE32_MEMBER(vegaeo_state::vega_misc_w) READ32_MEMBER(vegaeo_state::vegaeo_custom_read) { - eolith_speedup_read(space); + speedup_read(); return ioport("SYSTEM")->read(); } WRITE32_MEMBER(vegaeo_state::soundlatch_w) { - qs1000_device *qs1000 = space.machine().device("qs1000"); - soundlatch_byte_w(space, 0, data); - qs1000->set_irq(ASSERT_LINE); + m_qs1000->set_irq(ASSERT_LINE); machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); } @@ -180,6 +176,8 @@ INPUT_PORTS_END VIDEO_START_MEMBER(vegaeo_state,vega) { m_vega_vram = auto_alloc_array(machine(), UINT32, 0x14000*2/4); + save_pointer(NAME(m_vega_vram), 0x14000*2/4); + save_item(NAME(m_vega_vbuffer)); } UINT32 vegaeo_state::screen_update_vega(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) @@ -328,7 +326,7 @@ DRIVER_INIT_MEMBER(vegaeo_state,vegaeo) machine().device("qs1000:cpu")->memory().space(AS_IO).install_read_bank(0x0100, 0xffff, "bank"); membank("qs1000:bank")->configure_entries(0, 8, memregion("qs1000:cpu")->base()+0x100, 0x10000); - init_eolith_speedup(machine()); + init_speedup(); } -GAME( 2002, crazywar, 0, vega, crazywar, vegaeo_state, vegaeo, ROT0, "Eolith", "Crazy War", GAME_IMPERFECT_SOUND ) +GAME( 2002, crazywar, 0, vega, crazywar, vegaeo_state, vegaeo, ROT0, "Eolith", "Crazy War", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/includes/eolith.h b/src/mame/includes/eolith.h index e8fec69abb1..746a79a3bd6 100644 --- a/src/mame/includes/eolith.h +++ b/src/mame/includes/eolith.h @@ -10,36 +10,49 @@ public: m_maincpu(*this, "maincpu"), m_soundcpu(*this, "soundcpu"), m_qs1000(*this, "qs1000"), + m_screen(*this, "screen"), + m_palette(*this, "palette"), m_in0(*this, "IN0"), m_eepromoutport(*this, "EEPROMOUT"), m_penx1port(*this, "PEN_X_P1"), m_peny1port(*this, "PEN_Y_P1"), m_penx2port(*this, "PEN_X_P2"), m_peny2port(*this, "PEN_Y_P2"), - m_sndbank(*this, "sound_bank"), - m_screen(*this, "screen"), - m_palette(*this, "palette") + m_sndbank(*this, "sound_bank") { } - int m_coin_counter_bit; - int m_buffer; - UINT32 *m_vram; - - UINT8 m_sound_data; - UINT8 m_data_to_qs1000; required_device m_maincpu; optional_device m_soundcpu; optional_device m_qs1000; + required_device m_screen; + required_device m_palette; + optional_ioport m_in0; // klondkp doesn't have it optional_ioport m_eepromoutport; optional_ioport m_penx1port; optional_ioport m_peny1port; optional_ioport m_penx2port; optional_ioport m_peny2port; + optional_memory_bank m_sndbank; - required_device m_screen; - required_device m_palette; + + int m_coin_counter_bit; + int m_buffer; + UINT32 *m_vram; + + UINT8 m_sound_data; + + // speedups - see machine/eolithsp.c + int m_speedup_address; + int m_speedup_address2; + int m_speedup_resume_scanline; + int m_speedup_vblank; + int m_speedup_scanline; + void speedup_read(); + void init_speedup(); + DECLARE_CUSTOM_INPUT_MEMBER(eolith_speedup_getvblank); + DECLARE_CUSTOM_INPUT_MEMBER(stealsee_speedup_getvblank); DECLARE_READ32_MEMBER(eolith_custom_r); DECLARE_WRITE32_MEMBER(systemcontrol_w); @@ -48,23 +61,23 @@ public: DECLARE_READ32_MEMBER(hidctch3_pen2_r); DECLARE_WRITE32_MEMBER(eolith_vram_w); DECLARE_READ32_MEMBER(eolith_vram_r); - DECLARE_CUSTOM_INPUT_MEMBER(eolith_speedup_getvblank); - DECLARE_CUSTOM_INPUT_MEMBER(stealsee_speedup_getvblank); - DECLARE_READ8_MEMBER(sound_cmd_r); DECLARE_WRITE8_MEMBER(sound_p1_w); - DECLARE_READ8_MEMBER(qs1000_p1_r); DECLARE_WRITE8_MEMBER(qs1000_p1_w); + DECLARE_WRITE8_MEMBER(soundcpu_to_qs1000); + DECLARE_DRIVER_INIT(eolith); DECLARE_DRIVER_INIT(landbrk); DECLARE_DRIVER_INIT(hidctch3); DECLARE_DRIVER_INIT(hidctch2); DECLARE_DRIVER_INIT(hidnc2k); DECLARE_DRIVER_INIT(landbrka); + DECLARE_MACHINE_RESET(eolith); DECLARE_VIDEO_START(eolith); + UINT32 screen_update_eolith(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + TIMER_DEVICE_CALLBACK_MEMBER(eolith_speedup); - DECLARE_WRITE8_MEMBER(soundcpu_to_qs1000); }; diff --git a/src/mame/includes/eolithsp.h b/src/mame/includes/eolithsp.h deleted file mode 100644 index fb9dc0acf30..00000000000 --- a/src/mame/includes/eolithsp.h +++ /dev/null @@ -1,4 +0,0 @@ -/*----------- defined in drivers/eolithsp.c -----------*/ - -void eolith_speedup_read(address_space &space); -void init_eolith_speedup(running_machine &machine); diff --git a/src/mame/video/eolith.c b/src/mame/video/eolith.c index c504073a0b7..19f633f6006 100644 --- a/src/mame/video/eolith.c +++ b/src/mame/video/eolith.c @@ -33,19 +33,18 @@ READ32_MEMBER(eolith_state::eolith_vram_r) VIDEO_START_MEMBER(eolith_state,eolith) { m_vram = auto_alloc_array(machine(), UINT32, 0x40000*2/4); + save_pointer(NAME(m_vram), 0x40000*2/4); + save_item(NAME(m_buffer)); } UINT32 eolith_state::screen_update_eolith(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int y; - - for (y = 0; y < 240; y++) + for (int y = 0; y < 240; y++) { - int x; UINT32 *src = &m_vram[(m_buffer ? 0 : 0x10000) | (y * (336 / 2))]; UINT16 *dest = &bitmap.pix16(y); - for (x = 0; x < 320; x += 2) + for (int x = 0; x < 320; x += 2) { dest[0] = (*src >> 16) & 0x7fff; dest[1] = (*src >> 0) & 0x7fff; -- cgit v1.2.3