summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/funworld.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/funworld.cpp')
-rw-r--r--src/mame/drivers/funworld.cpp164
1 files changed, 75 insertions, 89 deletions
diff --git a/src/mame/drivers/funworld.cpp b/src/mame/drivers/funworld.cpp
index e1a7a37afcd..ea489963e5f 100644
--- a/src/mame/drivers/funworld.cpp
+++ b/src/mame/drivers/funworld.cpp
@@ -3067,11 +3067,10 @@ void lunapark_state::machine_reset()
* Machine Drivers *
**************************/
-void funworld_state::fw1stpal(machine_config &config)
-{
+MACHINE_CONFIG_START(funworld_state::fw1stpal)
/* basic machine hardware */
- M65SC02(config, m_maincpu, CPU_CLOCK); /* 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::funworld_map);
+ MCFG_DEVICE_ADD("maincpu", M65SC02, CPU_CLOCK) /* 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(funworld_map)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -3086,16 +3085,17 @@ void funworld_state::fw1stpal(machine_config &config)
/* video hardware */
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(60);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
- screen.set_size((124+1)*4, (30+1)*8); /* Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1) */
- screen.set_visarea(0*4, 96*4-1, 0*8, 29*8-1); /* Taken from MC6845 init, registers 01 & 06 */
- screen.set_screen_update(FUNC(funworld_state::screen_update_funworld));
- screen.set_palette(m_palette);
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
+ MCFG_SCREEN_SIZE((124+1)*4, (30+1)*8) /* Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1) */
+ MCFG_SCREEN_VISIBLE_AREA(0*4, 96*4-1, 0*8, 29*8-1) /* Taken from MC6845 init, registers 01 & 06 */
+ MCFG_SCREEN_UPDATE_DRIVER(funworld_state, screen_update_funworld)
+ MCFG_SCREEN_PALETTE("palette")
+
+ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_fw1stpal)
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_fw1stpal);
- PALETTE(config, m_palette, FUNC(funworld_state::funworld_palette), 0x200);
+ PALETTE(config, "palette", FUNC(funworld_state::funworld_palette), 0x200);
mc6845_device &crtc(MC6845(config, "crtc", CRTC_CLOCK)); /* 2MHz, verified on jollycrd & royalcrd */
crtc.set_screen("screen");
@@ -3110,36 +3110,33 @@ void funworld_state::fw1stpal(machine_config &config)
ay8910.port_a_write_callback().set(FUNC(funworld_state::funworld_lamp_a_w));
ay8910.port_b_write_callback().set(FUNC(funworld_state::funworld_lamp_b_w));
ay8910.add_route(ALL_OUTPUTS, "mono", 2.5); /* analyzed to avoid clips */
-}
+MACHINE_CONFIG_END
-void funworld_state::fw2ndpal(machine_config &config)
-{
+MACHINE_CONFIG_START(funworld_state::fw2ndpal)
fw1stpal(config);
- R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::funworld_map);
- m_gfxdecode->set_info(gfx_fw2ndpal);
-}
+ MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(funworld_map)
+ MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_fw2ndpal)
+MACHINE_CONFIG_END
-void funworld_state::funquiz(machine_config &config)
-{
+MACHINE_CONFIG_START(funworld_state::funquiz)
fw1stpal(config);
// fw2ndpal(config);
- R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::funquiz_map);
+ MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(funquiz_map)
subdevice<ay8910_device>("ay8910")->port_a_read_callback().set(FUNC(funworld_state::funquiz_ay8910_a_r));
subdevice<ay8910_device>("ay8910")->port_b_read_callback().set(FUNC(funworld_state::funquiz_ay8910_b_r));
-}
+MACHINE_CONFIG_END
-void magicrd2_state::magicrd2(machine_config &config)
-{
+MACHINE_CONFIG_START(magicrd2_state::magicrd2)
fw1stpal(config);
- R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &magicrd2_state::magicrd2_map);
+ MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(magicrd2_map)
subdevice<mc6845_device>("crtc")->set_visarea_adjust(0, -56, 0, 0);
@@ -3147,97 +3144,86 @@ void magicrd2_state::magicrd2(machine_config &config)
ay8910.port_a_write_callback().set(FUNC(magicrd2_state::funworld_lamp_a_w));
ay8910.port_b_write_callback().set(FUNC(magicrd2_state::funworld_lamp_b_w));
ay8910.add_route(ALL_OUTPUTS, "mono", 1.5); /* analyzed to avoid clips */
-}
+MACHINE_CONFIG_END
-void funworld_state::royalcd1(machine_config &config)
-{
+MACHINE_CONFIG_START(funworld_state::royalcd1)
fw1stpal(config);
- R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* (G65SC02P in pro version) 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::magicrd2_map);
-}
+ MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* (G65SC02P in pro version) 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(magicrd2_map)
+MACHINE_CONFIG_END
-void funworld_state::royalcd2(machine_config &config)
-{
+MACHINE_CONFIG_START(funworld_state::royalcd2)
fw2ndpal(config);
- R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::magicrd2_map);
-}
+ MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(magicrd2_map)
+MACHINE_CONFIG_END
-void funworld_state::cuoreuno(machine_config &config)
-{
+MACHINE_CONFIG_START(funworld_state::cuoreuno)
fw1stpal(config);
- R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::cuoreuno_map);
-}
+ MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(cuoreuno_map)
+MACHINE_CONFIG_END
-void funworld_state::saloon(machine_config &config)
-{
+MACHINE_CONFIG_START(funworld_state::saloon)
fw1stpal(config);
- R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::saloon_map);
-}
+ MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(saloon_map)
+MACHINE_CONFIG_END
-void funworld_state::witchryl(machine_config &config)
-{
+MACHINE_CONFIG_START(funworld_state::witchryl)
fw1stpal(config);
- R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::witchryl_map);
-}
+ MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(witchryl_map)
+MACHINE_CONFIG_END
-void lunapark_state::lunapark(machine_config &config)
-{
+MACHINE_CONFIG_START(lunapark_state::lunapark)
fw1stpal(config);
- R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &lunapark_state::lunapark_map); // mirrored video RAM (4000/5000 to 6000/7000).
-}
+ MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(lunapark_map) // mirrored video RAM (4000/5000 to 6000/7000).
+MACHINE_CONFIG_END
-void chinatow_state::chinatow(machine_config &config)
-{
+MACHINE_CONFIG_START(chinatow_state::chinatow)
fw2ndpal(config);
- R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &chinatow_state::chinatow_map);
-}
+ MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(chinatow_map)
+MACHINE_CONFIG_END
-void chinatow_state::rcdino4(machine_config &config)
-{
+MACHINE_CONFIG_START(chinatow_state::rcdino4)
fw1stpal(config);
- R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &chinatow_state::chinatow_map);
-}
+ MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(chinatow_map)
+MACHINE_CONFIG_END
-void funworld_state::intrgmes(machine_config &config)
-{
+MACHINE_CONFIG_START(funworld_state::intrgmes)
fw1stpal(config);
- R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::intergames_map);
- m_gfxdecode->set_info(gfx_fw2ndpal);
-}
+ MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(intergames_map)
+ MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_fw2ndpal)
+MACHINE_CONFIG_END
-void funworld_state::fw_brick_1(machine_config &config)
-{
+MACHINE_CONFIG_START(funworld_state::fw_brick_1)
fw1stpal(config);
- R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::fw_a7_11_map);
-// m_gfxdecode->set_info(gfx_fw2ndpal);
-}
+ MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(fw_a7_11_map)
+// MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_fw2ndpal)
+MACHINE_CONFIG_END
-void funworld_state::fw_brick_2(machine_config &config)
-{
+MACHINE_CONFIG_START(funworld_state::fw_brick_2)
fw2ndpal(config);
- R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */
- m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::fw_a7_11_map);
-// m_gfxdecode->set_info(gfx_fw2ndpal);
-}
+ MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
+ MCFG_DEVICE_PROGRAM_MAP(fw_a7_11_map)
+// MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_fw2ndpal)
+MACHINE_CONFIG_END
// TO-DO: clean up and relocate, when convenient, all the opcode-encryption stuff
@@ -7764,7 +7750,7 @@ GAME( 199?, mongolnw, 0, royalcd1, royalcrd, funworld_state, init_mong
GAME( 199?, soccernw, 0, royalcd1, royalcrd, funworld_state, init_soccernw, ROT0, "<unknown>", "Soccer New (Italian)", MACHINE_UNEMULATED_PROTECTION )
// Other games...
-GAME( 198?, funquiz, 0, funquiz, funquiz, funworld_state, empty_init, ROT0, "Fun World", "Fun World Quiz (Austrian)", 0 )
+GAME( 198?, funquiz, 0, funquiz, funquiz, funworld_state, empty_init, ROT0, "Fun World / Oehlinger", "Fun World Quiz (Austrian)", 0 )
GAMEL( 1986, novoplay, 0, fw2ndpal, novoplay, funworld_state, empty_init, ROT0, "Admiral/Novomatic","Novo Play Multi Card / Club Card", 0, layout_novoplay )
GAME( 1991, intrgmes, 0, intrgmes, funworld, funworld_state, empty_init, ROT0, "Inter Games", "unknown Inter Games poker", MACHINE_NOT_WORKING )
GAMEL( 1985, fw_a7_11, 0, fw_brick_2, funworld, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A7-11 game 1", MACHINE_NOT_WORKING, layout_jollycrd )