summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author ajrhacker <ajrhacker@users.noreply.github.com>2018-05-21 14:21:22 -0400
committer GitHub <noreply@github.com>2018-05-21 14:21:22 -0400
commit7629ebb831d6ec436e5ad6ac4ba3c783203d8fe8 (patch)
tree521304baaa13b033103f59fe643a0e79dd48c96c
parentd12b063f3a7a721997a30cd7e1086b1bb1c4034d (diff)
parent1914543a8d1282f8531cea857787c79677a4abd0 (diff)
Merge pull request #3594 from wilbertpol/funworld_seta2_fix_ledlamp
Funworld seta2 fix ledlamp
-rw-r--r--src/mame/drivers/funworld.cpp13
-rw-r--r--src/mame/drivers/seta2.cpp146
-rw-r--r--src/mame/includes/funworld.h18
-rw-r--r--src/mame/includes/seta2.h89
4 files changed, 148 insertions, 118 deletions
diff --git a/src/mame/drivers/funworld.cpp b/src/mame/drivers/funworld.cpp
index 51ec37a9822..48427f7ca3b 100644
--- a/src/mame/drivers/funworld.cpp
+++ b/src/mame/drivers/funworld.cpp
@@ -3046,13 +3046,14 @@ READ8_MEMBER(funworld_state::funquiz_ay8910_b_r)
* Machine Start & Reset *
********************************/
-MACHINE_START_MEMBER(funworld_state, lunapark)
+void lunapark_state::machine_start()
{
+ funworld_state::machine_start();
uint8_t *ROM = memregion("maincpu")->base();
membank("bank1")->configure_entries(0, 2, &ROM[0], 0x8000);
}
-MACHINE_RESET_MEMBER(funworld_state, lunapark)
+void lunapark_state::machine_reset()
{
uint8_t seldsw = (ioport("SELDSW")->read() );
popmessage("ROM Bank: %02X", seldsw);
@@ -3189,12 +3190,10 @@ MACHINE_CONFIG_START(funworld_state::witchryl)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(funworld_state::lunapark)
+MACHINE_CONFIG_START(lunapark_state::lunapark)
fw1stpal(config);
MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
MCFG_DEVICE_PROGRAM_MAP(lunapark_map) // mirrored video RAM (4000/5000 to 6000/7000).
- MCFG_MACHINE_START_OVERRIDE(funworld_state, lunapark)
- MCFG_MACHINE_RESET_OVERRIDE(funworld_state, lunapark)
MACHINE_CONFIG_END
@@ -7109,8 +7108,8 @@ GAMEL( 1997, tortufam, 0, cuoreuno, cuoreuno, funworld_state, empty_ini
GAMEL( 1996, potgame, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Pot Game (Italian)", 0, layout_jollycrd )
GAMEL( 1996, bottle10, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Bottle 10 (Italian, set 1)", 0, layout_jollycrd )
GAMEL( 1996, bottl10b, bottle10, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Bottle 10 (Italian, set 2)", 0, layout_jollycrd )
-GAMEL( 1998, lunapark, 0, lunapark, lunapark, funworld_state, empty_init, ROT0, "<unknown>", "Luna Park (set 1, dual program)", 0, layout_jollycrd ) // mirrored video RAM (4000/5000 to 6000/7000).
-GAMEL( 1998, lunaparkb, lunapark, lunapark, lunapark, funworld_state, empty_init, ROT0, "<unknown>", "Luna Park (set 2, dual program)", 0, layout_jollycrd ) // mirrored video RAM (4000/5000 to 6000/7000).
+GAMEL( 1998, lunapark, 0, lunapark, lunapark, lunapark_state, empty_init, ROT0, "<unknown>", "Luna Park (set 1, dual program)", 0, layout_jollycrd ) // mirrored video RAM (4000/5000 to 6000/7000).
+GAMEL( 1998, lunaparkb, lunapark, lunapark, lunapark, lunapark_state, empty_init, ROT0, "<unknown>", "Luna Park (set 2, dual program)", 0, layout_jollycrd ) // mirrored video RAM (4000/5000 to 6000/7000).
GAMEL( 1998, lunaparkc, lunapark, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "<unknown>", "Luna Park (set 3)", 0, layout_jollycrd ) // regular video RAM 6000/7000.
GAMEL( 1998, crystal, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "J.C.D. srl", "Crystal Colours (CMC hardware)", 0, layout_jollycrd )
diff --git a/src/mame/drivers/seta2.cpp b/src/mame/drivers/seta2.cpp
index 4d404082ae4..3b79cc77028 100644
--- a/src/mame/drivers/seta2.cpp
+++ b/src/mame/drivers/seta2.cpp
@@ -227,8 +227,9 @@ void seta2_state::gundamex_map(address_map &map)
Wakakusamonogatari Mahjong Yonshimai
***************************************************************************/
-MACHINE_START_MEMBER(seta2_state, mj4simai)
+void mj4simai_state::machine_start()
{
+ seta2_state::machine_start();
save_item(NAME(m_keyboard_row));
}
@@ -837,13 +838,13 @@ void funcube_touchscreen_device::tra_callback()
// Bus conversion functions:
// RAM shared with the sub CPU
-READ32_MEMBER(seta2_state::funcube_nvram_dword_r)
+READ32_MEMBER(funcube_state::funcube_nvram_dword_r)
{
uint16_t val = m_nvram[offset];
return ((val & 0xff00) << 8) | (val & 0x00ff);
}
-WRITE32_MEMBER(seta2_state::funcube_nvram_dword_w)
+WRITE32_MEMBER(funcube_state::funcube_nvram_dword_w)
{
if (ACCESSING_BITS_0_7)
{
@@ -868,7 +869,7 @@ READ16_MEMBER(seta2_state::spriteram16_word_r)
// Main CPU
-READ32_MEMBER(seta2_state::funcube_debug_r)
+READ32_MEMBER(funcube_state::funcube_debug_r)
{
uint32_t ret = ioport("DEBUG")->read();
@@ -897,12 +898,12 @@ WRITE32_MEMBER(seta2_state::oki_write)
}
}
-void seta2_state::funcube_map(address_map &map)
+void funcube_state::funcube_map(address_map &map)
{
map(0x00000000, 0x0007ffff).rom();
map(0x00200000, 0x0020ffff).ram();
- map(0x00400000, 0x00400003).r(this, FUNC(seta2_state::funcube_debug_r));
+ map(0x00400000, 0x00400003).r(this, FUNC(funcube_state::funcube_debug_r));
map(0x00400004, 0x00400007).r("watchdog", FUNC(watchdog_timer_device::reset32_r)).nopw();
map(0x00500000, 0x00500003).rw(this, FUNC(seta2_state::oki_read), FUNC(seta2_state::oki_write));
@@ -911,18 +912,18 @@ void seta2_state::funcube_map(address_map &map)
map(0x00840000, 0x0084ffff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette"); // Palette
map(0x00860000, 0x0086003f).w(this, FUNC(seta2_state::vregs_w)).share("vregs");
- map(0x00c00000, 0x00c002ff).rw(this, FUNC(seta2_state::funcube_nvram_dword_r), FUNC(seta2_state::funcube_nvram_dword_w));
+ map(0x00c00000, 0x00c002ff).rw(this, FUNC(funcube_state::funcube_nvram_dword_r), FUNC(funcube_state::funcube_nvram_dword_w));
map(0xf0000000, 0xf00001ff).rw("maincpu_onboard", FUNC(mcf5206e_peripheral_device::seta2_coldfire_regs_r), FUNC(mcf5206e_peripheral_device::seta2_coldfire_regs_w)); // technically this can be moved with MBAR
map(0xffffe000, 0xffffffff).ram(); // SRAM
}
-void seta2_state::funcube2_map(address_map &map)
+void funcube_state::funcube2_map(address_map &map)
{
map(0x00000000, 0x0007ffff).rom();
map(0x00200000, 0x0020ffff).ram();
- map(0x00500000, 0x00500003).r(this, FUNC(seta2_state::funcube_debug_r));
+ map(0x00500000, 0x00500003).r(this, FUNC(funcube_state::funcube_debug_r));
map(0x00500004, 0x00500007).r("watchdog", FUNC(watchdog_timer_device::reset32_r)).nopw();
map(0x00600000, 0x00600003).rw(this, FUNC(seta2_state::oki_read), FUNC(seta2_state::oki_write));
@@ -931,7 +932,7 @@ void seta2_state::funcube2_map(address_map &map)
map(0x00840000, 0x0084ffff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette");
map(0x00860000, 0x0086003f).w(this, FUNC(seta2_state::vregs_w)).share("vregs");
- map(0x00c00000, 0x00c002ff).rw(this, FUNC(seta2_state::funcube_nvram_dword_r), FUNC(seta2_state::funcube_nvram_dword_w));
+ map(0x00c00000, 0x00c002ff).rw(this, FUNC(funcube_state::funcube_nvram_dword_r), FUNC(funcube_state::funcube_nvram_dword_w));
map(0xf0000000, 0xf00001ff).rw("maincpu_onboard", FUNC(mcf5206e_peripheral_device::seta2_coldfire_regs_r), FUNC(mcf5206e_peripheral_device::seta2_coldfire_regs_w)); // technically this can be moved with MBAR
map(0xffffe000, 0xffffffff).ram(); // SRAM
@@ -939,7 +940,7 @@ void seta2_state::funcube2_map(address_map &map)
// Sub CPU
-void seta2_state::funcube_sub_map(address_map &map)
+void funcube_state::funcube_sub_map(address_map &map)
{
map(0x000000, 0x01ffff).rom();
map(0x200000, 0x20017f).ram().share("nvram");
@@ -952,7 +953,7 @@ void seta2_state::funcube_sub_map(address_map &map)
#define FUNCUBE_SUB_CPU_CLOCK (XTAL(14'745'600))
-READ16_MEMBER(seta2_state::funcube_coins_r)
+READ16_MEMBER(funcube_state::funcube_coins_r)
{
uint8_t ret = ioport("SWITCH")->read();
uint8_t coin_bit0 = 1; // active low
@@ -982,14 +983,14 @@ READ16_MEMBER(seta2_state::funcube_coins_r)
return (ret & ~7) | (hopper_bit << 2) | (coin_bit1 << 1) | coin_bit0;
}
-void seta2_state::funcube_debug_outputs()
+void funcube_state::funcube_debug_outputs()
{
#ifdef MAME_DEBUG
// popmessage("LED: %02x OUT: %02x", (int)*m_funcube_leds, (int)*m_funcube_outputs);
#endif
}
-WRITE16_MEMBER(seta2_state::funcube_leds_w)
+WRITE16_MEMBER(funcube_state::funcube_leds_w)
{
*m_funcube_leds = data;
@@ -1005,13 +1006,13 @@ WRITE16_MEMBER(seta2_state::funcube_leds_w)
funcube_debug_outputs();
}
-READ16_MEMBER(seta2_state::funcube_outputs_r)
+READ16_MEMBER(funcube_state::funcube_outputs_r)
{
// Bits 1,2,3 read
return *m_funcube_outputs;
}
-WRITE16_MEMBER(seta2_state::funcube_outputs_w)
+WRITE16_MEMBER(funcube_state::funcube_outputs_w)
{
*m_funcube_outputs = data;
@@ -1028,26 +1029,26 @@ WRITE16_MEMBER(seta2_state::funcube_outputs_w)
funcube_debug_outputs();
}
-READ16_MEMBER(seta2_state::funcube_battery_r)
+READ16_MEMBER(funcube_state::funcube_battery_r)
{
return ioport("BATTERY")->read() ? 0x40 : 0x00;
}
// cabinet linking on sci0
-void seta2_state::funcube_sub_io(address_map &map)
+void funcube_state::funcube_sub_io(address_map &map)
{
- map(h8_device::PORT_7, h8_device::PORT_7).r(this, FUNC(seta2_state::funcube_coins_r));
- map(h8_device::PORT_4, h8_device::PORT_4).r(this, FUNC(seta2_state::funcube_battery_r));
- map(h8_device::PORT_A, h8_device::PORT_A).rw(this, FUNC(seta2_state::funcube_outputs_r), FUNC(seta2_state::funcube_outputs_w)).share("funcube_outputs");
- map(h8_device::PORT_B, h8_device::PORT_B).w(this, FUNC(seta2_state::funcube_leds_w)).share("funcube_leds");
+ map(h8_device::PORT_7, h8_device::PORT_7).r(this, FUNC(funcube_state::funcube_coins_r));
+ map(h8_device::PORT_4, h8_device::PORT_4).r(this, FUNC(funcube_state::funcube_battery_r));
+ map(h8_device::PORT_A, h8_device::PORT_A).rw(this, FUNC(funcube_state::funcube_outputs_r), FUNC(funcube_state::funcube_outputs_w)).share("funcube_outputs");
+ map(h8_device::PORT_B, h8_device::PORT_B).w(this, FUNC(funcube_state::funcube_leds_w)).share("funcube_leds");
}
-void seta2_state::funcube2_sub_io(address_map &map)
+void funcube_state::funcube2_sub_io(address_map &map)
{
- map(h8_device::PORT_7, h8_device::PORT_7).r(this, FUNC(seta2_state::funcube_coins_r));
+ map(h8_device::PORT_7, h8_device::PORT_7).r(this, FUNC(funcube_state::funcube_coins_r));
map(h8_device::PORT_4, h8_device::PORT_4).noprw(); // unused
- map(h8_device::PORT_A, h8_device::PORT_A).rw(this, FUNC(seta2_state::funcube_outputs_r), FUNC(seta2_state::funcube_outputs_w)).share("funcube_outputs");
- map(h8_device::PORT_B, h8_device::PORT_B).w(this, FUNC(seta2_state::funcube_leds_w)).share("funcube_leds");
+ map(h8_device::PORT_A, h8_device::PORT_A).rw(this, FUNC(funcube_state::funcube_outputs_r), FUNC(funcube_state::funcube_outputs_w)).share("funcube_outputs");
+ map(h8_device::PORT_B, h8_device::PORT_B).w(this, FUNC(funcube_state::funcube_leds_w)).share("funcube_leds");
}
@@ -2581,13 +2582,6 @@ MACHINE_CONFIG_START(seta2_state::seta2)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(seta2_state::mj4simai)
- seta2(config);
- MCFG_MACHINE_START_OVERRIDE(seta2_state, mj4simai)
-
-MACHINE_CONFIG_END
-
-
MACHINE_CONFIG_START(seta2_state::gundamex)
seta2(config);
MCFG_DEVICE_MODIFY("maincpu")
@@ -2749,7 +2743,7 @@ MACHINE_CONFIG_END
Funcube series
***************************************************************************/
-TIMER_DEVICE_CALLBACK_MEMBER(seta2_state::funcube_interrupt)
+TIMER_DEVICE_CALLBACK_MEMBER(funcube_state::funcube_interrupt)
{
int scanline = param;
@@ -2760,23 +2754,24 @@ TIMER_DEVICE_CALLBACK_MEMBER(seta2_state::funcube_interrupt)
m_maincpu->set_input_line(2, HOLD_LINE);
}
-MACHINE_START_MEMBER(seta2_state, funcube)
+void funcube_state::machine_start()
{
+ seta2_state::machine_start();
save_item(NAME(m_funcube_coin_start_cycles));
save_item(NAME(m_funcube_hopper_motor));
}
-MACHINE_RESET_MEMBER(seta2_state, funcube)
+void funcube_state::machine_reset()
{
m_funcube_coin_start_cycles = 0;
m_funcube_hopper_motor = 0;
}
-MACHINE_CONFIG_START(seta2_state::funcube)
+MACHINE_CONFIG_START(funcube_state::funcube)
MCFG_DEVICE_ADD("maincpu", MCF5206E, XTAL(25'447'000))
MCFG_DEVICE_PROGRAM_MAP(funcube_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta2_state, funcube_interrupt, "screen", 0, 1)
+ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", funcube_state, funcube_interrupt, "screen", 0, 1)
MCFG_DEVICE_ADD("sub", H83007, FUNCUBE_SUB_CPU_CLOCK)
MCFG_DEVICE_PROGRAM_MAP(funcube_sub_map)
@@ -2791,9 +2786,6 @@ MACHINE_CONFIG_START(seta2_state::funcube)
MCFG_WATCHDOG_ADD("watchdog")
- MCFG_MACHINE_START_OVERRIDE(seta2_state, funcube)
- MCFG_MACHINE_RESET_OVERRIDE(seta2_state, funcube)
-
// video hardware
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
@@ -2818,7 +2810,7 @@ MACHINE_CONFIG_START(seta2_state::funcube)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(seta2_state::funcube2)
+MACHINE_CONFIG_START(funcube_state::funcube2)
funcube(config);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(funcube2_map)
@@ -2832,7 +2824,7 @@ MACHINE_CONFIG_START(seta2_state::funcube2)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(seta2_state::funcube3)
+MACHINE_CONFIG_START(funcube_state::funcube3)
funcube2(config);
// video hardware
MCFG_SCREEN_MODIFY("screen")
@@ -3072,7 +3064,7 @@ ROM_START( funcube5 )
ROM_LOAD( "fc51_snd-0.u47", 0x000000, 0x200000, CRC(2a504fe1) SHA1(911ad650bf48aa78d9cb3c64284aa526ceb519ba) )
ROM_END
-void seta2_state::init_funcube()
+void funcube_state::init_funcube()
{
uint32_t *main_cpu = (uint32_t *) memregion("maincpu")->base();
uint16_t *sub_cpu = (uint16_t *) memregion("sub")->base();
@@ -3083,7 +3075,7 @@ void seta2_state::init_funcube()
sub_cpu[0x506/2] = 0x5470; // rte -> rts
}
-void seta2_state::init_funcube2()
+void funcube_state::init_funcube2()
{
uint32_t *main_cpu = (uint32_t *) memregion("maincpu")->base();
uint16_t *sub_cpu = (uint16_t *) memregion("sub")->base();
@@ -3096,7 +3088,7 @@ void seta2_state::init_funcube2()
sub_cpu[0x4d4/2] = 0x5470; // rte -> rts
}
-void seta2_state::init_funcube3()
+void funcube_state::init_funcube3()
{
uint32_t *main_cpu = (uint32_t *) memregion("maincpu")->base();
uint16_t *sub_cpu = (uint16_t *) memregion("sub")->base();
@@ -4347,34 +4339,34 @@ ROM_START( telpacfl )
ROM_LOAD( "kc-002c.u52", 0x117, 0x117, NO_DUMP )
ROM_END
-GAME( 1994, gundamex, 0, gundamex, gundamex, seta2_state, empty_init, ROT0, "Banpresto", "Mobile Suit Gundam EX Revue", 0 )
-GAME( 1995, grdians, 0, grdians, grdians, seta2_state, empty_init, ROT0, "Winkysoft (Banpresto license)", "Guardians / Denjin Makai II", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1996, mj4simai, 0, mj4simai, mj4simai, seta2_state, empty_init, ROT0, "Maboroshi Ware", "Wakakusamonogatari Mahjong Yonshimai (Japan)", MACHINE_NO_COCKTAIL )
-GAME( 1996, myangel, 0, myangel, myangel, seta2_state, empty_init, ROT0, "MOSS / Namco", "Kosodate Quiz My Angel (Japan)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1997, myangel2, 0, myangel2, myangel2, seta2_state, empty_init, ROT0, "MOSS / Namco", "Kosodate Quiz My Angel 2 (Japan)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1996, telpacfl, 0, telpacfl, telpacfl, seta2_state, empty_init, ROT270, "Sunsoft", "TelePachi Fever Lion (V1.0)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1997, reelquak, 0, reelquak, reelquak, seta2_state, empty_init, ROT0, "<unknown>", "Reel'N Quake! (Version 1.05)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 199?, endrichs, 0, reelquak, endrichs, seta2_state, empty_init, ROT0, "E.N.Tiger", "Endless Riches (Ver 1.20)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1997, staraudi, 0, staraudi, staraudi, staraudi_state, empty_init, ROT0, "Namco", "Star Audition", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-GAME( 1999, pzlbowl, 0, pzlbowl, pzlbowl, seta2_state, empty_init, ROT0, "MOSS / Nihon System", "Puzzle De Bowling (Japan)", MACHINE_NO_COCKTAIL )
-GAME( 2000, penbros, 0, penbros, penbros, seta2_state, empty_init, ROT0, "Subsino", "Penguin Brothers (Japan)", MACHINE_NO_COCKTAIL )
-GAME( 2000, ablast, penbros, penbros, penbros, seta2_state, empty_init, ROT0, "Subsino", "Hong Tian Lei (A-Blast) (Japan)", MACHINE_NO_COCKTAIL ) // 轟天雷/Hōng tiān léi
-GAME( 2000, ablastb, penbros, ablastb, penbros, seta2_state, empty_init, ROT0, "bootleg", "Hong Tian Lei (A-Blast) (bootleg)", MACHINE_NO_COCKTAIL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // at least "tilemap sprite" scrolly flag differs, FPGA instead of x1-010
-GAME( 2000, namcostr, 0, namcostr, funcube, seta2_state, empty_init, ROT0, "Namco", "Namco Stars", MACHINE_NO_COCKTAIL | MACHINE_NOT_WORKING )
-GAME( 2000, deerhunt, 0, samshoot, deerhunt, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Deer Hunting USA V4.3", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 2000, deerhunta, deerhunt, samshoot, deerhunt, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Deer Hunting USA V4.2", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 2000, deerhuntb, deerhunt, samshoot, deerhunt, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Deer Hunting USA V4.0", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 2000, deerhuntc, deerhunt, samshoot, deerhunt, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Deer Hunting USA V3", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 2000, deerhuntd, deerhunt, samshoot, deerhunt, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Deer Hunting USA V2", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 2000, deerhunte, deerhunt, samshoot, deerhunt, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Deer Hunting USA V1", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 2001, turkhunt, 0, samshoot, turkhunt, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Turkey Hunting USA V1.0", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 2001, wschamp, 0, samshoot, wschamp, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Wing Shooting Championship V2.00", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 2001, wschampa, wschamp, samshoot, wschamp, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Wing Shooting Championship V1.01", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 2001, wschampb, wschamp, samshoot, wschamp, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Wing Shooting Championship V1.00", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 2002, trophyh, 0, samshoot, trophyh, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Trophy Hunting - Bear & Moose V1.0", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 2002, trophyht, trophyh, samshoot, trophyht, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Trophy Hunting - Bear & Moose V1.0 (Location Test)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 2000, funcube, 0, funcube, funcube, seta2_state, init_funcube, ROT0, "Namco", "Funcube (v1.5)", MACHINE_NO_COCKTAIL )
-GAME( 2001, funcube2, 0, funcube2, funcube, seta2_state, init_funcube2, ROT0, "Namco", "Funcube 2 (v1.1)", MACHINE_NO_COCKTAIL )
-GAME( 2001, funcube3, 0, funcube3, funcube, seta2_state, init_funcube3, ROT0, "Namco", "Funcube 3 (v1.1)", MACHINE_NO_COCKTAIL )
-GAME( 2001, funcube4, 0, funcube2, funcube, seta2_state, init_funcube2, ROT0, "Namco", "Funcube 4 (v1.0)", MACHINE_NO_COCKTAIL )
-GAME( 2002, funcube5, 0, funcube2, funcube, seta2_state, init_funcube2, ROT0, "Namco", "Funcube 5 (v1.0)", MACHINE_NO_COCKTAIL )
+GAME( 1994, gundamex, 0, gundamex, gundamex, seta2_state, empty_init, ROT0, "Banpresto", "Mobile Suit Gundam EX Revue", 0 )
+GAME( 1995, grdians, 0, grdians, grdians, seta2_state, empty_init, ROT0, "Winkysoft (Banpresto license)", "Guardians / Denjin Makai II", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1996, mj4simai, 0, seta2, mj4simai, mj4simai_state, empty_init, ROT0, "Maboroshi Ware", "Wakakusamonogatari Mahjong Yonshimai (Japan)", MACHINE_NO_COCKTAIL )
+GAME( 1996, myangel, 0, myangel, myangel, seta2_state, empty_init, ROT0, "MOSS / Namco", "Kosodate Quiz My Angel (Japan)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1997, myangel2, 0, myangel2, myangel2, seta2_state, empty_init, ROT0, "MOSS / Namco", "Kosodate Quiz My Angel 2 (Japan)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1996, telpacfl, 0, telpacfl, telpacfl, seta2_state, empty_init, ROT270, "Sunsoft", "TelePachi Fever Lion (V1.0)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1997, reelquak, 0, reelquak, reelquak, seta2_state, empty_init, ROT0, "<unknown>", "Reel'N Quake! (Version 1.05)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 199?, endrichs, 0, reelquak, endrichs, seta2_state, empty_init, ROT0, "E.N.Tiger", "Endless Riches (Ver 1.20)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1997, staraudi, 0, staraudi, staraudi, staraudi_state, empty_init, ROT0, "Namco", "Star Audition", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+GAME( 1999, pzlbowl, 0, pzlbowl, pzlbowl, seta2_state, empty_init, ROT0, "MOSS / Nihon System", "Puzzle De Bowling (Japan)", MACHINE_NO_COCKTAIL )
+GAME( 2000, penbros, 0, penbros, penbros, seta2_state, empty_init, ROT0, "Subsino", "Penguin Brothers (Japan)", MACHINE_NO_COCKTAIL )
+GAME( 2000, ablast, penbros, penbros, penbros, seta2_state, empty_init, ROT0, "Subsino", "Hong Tian Lei (A-Blast) (Japan)", MACHINE_NO_COCKTAIL ) // 轟天雷/Hōng tiān léi
+GAME( 2000, ablastb, penbros, ablastb, penbros, seta2_state, empty_init, ROT0, "bootleg", "Hong Tian Lei (A-Blast) (bootleg)", MACHINE_NO_COCKTAIL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // at least "tilemap sprite" scrolly flag differs, FPGA instead of x1-010
+GAME( 2000, namcostr, 0, namcostr, funcube, seta2_state, empty_init, ROT0, "Namco", "Namco Stars", MACHINE_NO_COCKTAIL | MACHINE_NOT_WORKING )
+GAME( 2000, deerhunt, 0, samshoot, deerhunt, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Deer Hunting USA V4.3", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 2000, deerhunta, deerhunt, samshoot, deerhunt, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Deer Hunting USA V4.2", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 2000, deerhuntb, deerhunt, samshoot, deerhunt, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Deer Hunting USA V4.0", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 2000, deerhuntc, deerhunt, samshoot, deerhunt, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Deer Hunting USA V3", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 2000, deerhuntd, deerhunt, samshoot, deerhunt, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Deer Hunting USA V2", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 2000, deerhunte, deerhunt, samshoot, deerhunt, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Deer Hunting USA V1", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 2001, turkhunt, 0, samshoot, turkhunt, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Turkey Hunting USA V1.0", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 2001, wschamp, 0, samshoot, wschamp, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Wing Shooting Championship V2.00", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 2001, wschampa, wschamp, samshoot, wschamp, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Wing Shooting Championship V1.01", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 2001, wschampb, wschamp, samshoot, wschamp, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Wing Shooting Championship V1.00", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 2002, trophyh, 0, samshoot, trophyh, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Trophy Hunting - Bear & Moose V1.0", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 2002, trophyht, trophyh, samshoot, trophyht, seta2_state, empty_init, ROT0, "Sammy USA Corporation", "Trophy Hunting - Bear & Moose V1.0 (Location Test)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 2000, funcube, 0, funcube, funcube, funcube_state, init_funcube, ROT0, "Namco", "Funcube (v1.5)", MACHINE_NO_COCKTAIL )
+GAME( 2001, funcube2, 0, funcube2, funcube, funcube_state, init_funcube2, ROT0, "Namco", "Funcube 2 (v1.1)", MACHINE_NO_COCKTAIL )
+GAME( 2001, funcube3, 0, funcube3, funcube, funcube_state, init_funcube3, ROT0, "Namco", "Funcube 3 (v1.1)", MACHINE_NO_COCKTAIL )
+GAME( 2001, funcube4, 0, funcube2, funcube, funcube_state, init_funcube2, ROT0, "Namco", "Funcube 4 (v1.0)", MACHINE_NO_COCKTAIL )
+GAME( 2002, funcube5, 0, funcube2, funcube, funcube_state, init_funcube2, ROT0, "Namco", "Funcube 5 (v1.0)", MACHINE_NO_COCKTAIL )
diff --git a/src/mame/includes/funworld.h b/src/mame/includes/funworld.h
index 7bc574e8422..36e203c13a6 100644
--- a/src/mame/includes/funworld.h
+++ b/src/mame/includes/funworld.h
@@ -40,8 +40,6 @@ public:
DECLARE_PALETTE_INIT(funworld);
DECLARE_VIDEO_START(magicrd2);
DECLARE_VIDEO_START(chinatow);
- DECLARE_MACHINE_START(lunapark);
- DECLARE_MACHINE_RESET(lunapark);
uint32_t screen_update_funworld(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void royalcd1(machine_config &config);
void royalcd2(machine_config &config);
@@ -49,7 +47,6 @@ public:
void chinatow(machine_config &config);
void magicrd2(machine_config &config);
void fw_a7_11(machine_config &config);
- void lunapark(machine_config &config);
void fw2ndpal(machine_config &config);
void saloon(machine_config &config);
void cuoreuno(machine_config &config);
@@ -79,3 +76,18 @@ protected:
required_device<palette_device> m_palette;
output_finder<8> m_lamp;
};
+
+
+class lunapark_state : public funworld_state
+{
+public:
+ lunapark_state(const machine_config &mconfig, device_type type, const char *tag)
+ : funworld_state(mconfig, type, tag)
+ { }
+
+ void lunapark(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+};
+
diff --git a/src/mame/includes/seta2.h b/src/mame/includes/seta2.h
index 39574b24600..825a8c904ca 100644
--- a/src/mame/includes/seta2.h
+++ b/src/mame/includes/seta2.h
@@ -38,8 +38,6 @@ public:
m_spriteram(*this, "spriteram", 0),
m_tileram(*this, "tileram", 0),
m_vregs(*this, "vregs", 0),
- m_funcube_outputs(*this, "funcube_outputs"),
- m_funcube_leds(*this, "funcube_leds"),
m_led(*this, "led%u", 0U),
m_lamp(*this, "lamp%u", 0U)
{ }
@@ -73,22 +71,6 @@ public:
DECLARE_READ16_MEMBER(gundamex_eeprom_r);
DECLARE_WRITE16_MEMBER(gundamex_eeprom_w);
- DECLARE_READ32_MEMBER(funcube_nvram_dword_r);
- DECLARE_WRITE32_MEMBER(funcube_nvram_dword_w);
- DECLARE_READ32_MEMBER(funcube_debug_r);
- DECLARE_READ16_MEMBER(funcube_coins_r);
- DECLARE_WRITE16_MEMBER(funcube_leds_w);
- DECLARE_READ16_MEMBER(funcube_outputs_r);
- DECLARE_WRITE16_MEMBER(funcube_outputs_w);
- DECLARE_READ16_MEMBER(funcube_battery_r);
-
- void init_funcube3();
- void init_funcube();
- void init_funcube2();
-
- DECLARE_MACHINE_START(mj4simai);
- DECLARE_MACHINE_START(funcube);
- DECLARE_MACHINE_RESET(funcube);
DECLARE_VIDEO_START(yoffset);
DECLARE_VIDEO_START(xoffset);
@@ -100,16 +82,10 @@ public:
INTERRUPT_GEN_MEMBER(seta2_interrupt);
INTERRUPT_GEN_MEMBER(samshoot_interrupt);
- TIMER_DEVICE_CALLBACK_MEMBER(funcube_interrupt);
- void funcube_debug_outputs();
void seta2(machine_config &config);
- void funcube(machine_config &config);
- void funcube3(machine_config &config);
- void funcube2(machine_config &config);
void grdians(machine_config &config);
void myangel(machine_config &config);
- void mj4simai(machine_config &config);
void penbros(machine_config &config);
void pzlbowl(machine_config &config);
void myangel2(machine_config &config);
@@ -120,11 +96,6 @@ public:
void samshoot(machine_config &config);
void namcostr(machine_config &config);
void ablastb_map(address_map &map);
- void funcube2_map(address_map &map);
- void funcube2_sub_io(address_map &map);
- void funcube_map(address_map &map);
- void funcube_sub_io(address_map &map);
- void funcube_sub_map(address_map &map);
void grdians_map(address_map &map);
void gundamex_map(address_map &map);
void mj4simai_map(address_map &map);
@@ -159,8 +130,6 @@ protected:
optional_shared_ptr<uint16_t> m_spriteram;
optional_shared_ptr<uint16_t> m_tileram;
optional_shared_ptr<uint16_t> m_vregs;
- optional_shared_ptr<uint16_t> m_funcube_outputs;
- optional_shared_ptr<uint16_t> m_funcube_leds;
output_finder<7> m_led;
output_finder<11> m_lamp;
@@ -169,6 +138,64 @@ protected:
int m_keyboard_row;
std::unique_ptr<uint16_t[]> m_buffered_spriteram;
+};
+
+
+class mj4simai_state : public seta2_state
+{
+public:
+ mj4simai_state(const machine_config &mconfig, device_type type, const char *tag)
+ : seta2_state(mconfig, type, tag)
+ { }
+
+protected:
+ virtual void machine_start() override;
+};
+
+
+class funcube_state : public seta2_state
+{
+public:
+ funcube_state(const machine_config &mconfig, device_type type, const char *tag)
+ : seta2_state(mconfig, type, tag)
+ , m_funcube_outputs(*this, "funcube_outputs")
+ , m_funcube_leds(*this, "funcube_leds")
+ { }
+
+ void funcube(machine_config &config);
+ void funcube3(machine_config &config);
+ void funcube2(machine_config &config);
+
+ void init_funcube3();
+ void init_funcube();
+ void init_funcube2();
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+private:
+ DECLARE_READ32_MEMBER(funcube_nvram_dword_r);
+ DECLARE_WRITE32_MEMBER(funcube_nvram_dword_w);
+ DECLARE_READ32_MEMBER(funcube_debug_r);
+ DECLARE_READ16_MEMBER(funcube_coins_r);
+ DECLARE_WRITE16_MEMBER(funcube_leds_w);
+ DECLARE_READ16_MEMBER(funcube_outputs_r);
+ DECLARE_WRITE16_MEMBER(funcube_outputs_w);
+ DECLARE_READ16_MEMBER(funcube_battery_r);
+
+ TIMER_DEVICE_CALLBACK_MEMBER(funcube_interrupt);
+
+ void funcube2_map(address_map &map);
+ void funcube2_sub_io(address_map &map);
+ void funcube_map(address_map &map);
+ void funcube_sub_io(address_map &map);
+ void funcube_sub_map(address_map &map);
+
+ void funcube_debug_outputs();
+
+ required_shared_ptr<uint16_t> m_funcube_outputs;
+ required_shared_ptr<uint16_t> m_funcube_leds;
uint64_t m_funcube_coin_start_cycles;
uint8_t m_funcube_hopper_motor;
};