summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2019-04-15 17:05:16 +0200
committer Ivan Vangelista <mesgnet@yahoo.it>2019-04-15 17:05:16 +0200
commitbf59d2f845e32698397e7f1e4a63a12ccaaa88d4 (patch)
tree76c2350c4db4b004dff36fdc2a949d2e6d9c9ce6
parent53d0ff30badee0d6244a74252ad610a3c2b8d4e7 (diff)
src/mame: some more MACHINE_CONFIG macros removal (nw)
-rw-r--r--src/mame/audio/cheekyms.cpp6
-rw-r--r--src/mame/drivers/1942.cpp7
-rw-r--r--src/mame/drivers/atarittl.cpp11
-rw-r--r--src/mame/drivers/cocoloco.cpp7
-rw-r--r--src/mame/drivers/hazeltin.cpp5
-rw-r--r--src/mame/drivers/palestra.cpp5
-rw-r--r--src/mame/drivers/pengo.cpp49
-rw-r--r--src/mame/drivers/pong.cpp33
-rw-r--r--src/mame/drivers/testpat.cpp10
9 files changed, 67 insertions, 66 deletions
diff --git a/src/mame/audio/cheekyms.cpp b/src/mame/audio/cheekyms.cpp
index 87f1cc3af1e..e0c777a3e30 100644
--- a/src/mame/audio/cheekyms.cpp
+++ b/src/mame/audio/cheekyms.cpp
@@ -37,7 +37,8 @@ WRITE_LINE_MEMBER(cheekyms_audio_device::pest_dies_w) { m_pest_dies->write_lin
WRITE_LINE_MEMBER(cheekyms_audio_device::coin_extra_w) { m_coin_extra->write_line(state); }
-MACHINE_CONFIG_START(cheekyms_audio_device::device_add_mconfig)
+void cheekyms_audio_device::device_add_mconfig(machine_config &config)
+{
SPEAKER(config, "mono").front_center();
NETLIST_SOUND(config, "sound_nl", 48000)
@@ -55,8 +56,7 @@ MACHINE_CONFIG_START(cheekyms_audio_device::device_add_mconfig)
NETLIST_LOGIC_INPUT(config, "sound_nl:coin_extra", "I_COIN_EXTRA.IN", 0);
NETLIST_STREAM_OUTPUT(config, "sound_nl:cout0", 0, "VR1.2").set_mult_offset(30000.0 * 10.0, 0.0);
-
-MACHINE_CONFIG_END
+}
void cheekyms_audio_device::device_start()
diff --git a/src/mame/drivers/1942.cpp b/src/mame/drivers/1942.cpp
index 77084c232ac..1b483ff8ed8 100644
--- a/src/mame/drivers/1942.cpp
+++ b/src/mame/drivers/1942.cpp
@@ -563,8 +563,8 @@ void _1942_state::machine_reset()
m_scroll[1] = 0;
}
-MACHINE_CONFIG_START(_1942_state::_1942)
-
+void _1942_state::_1942(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, MAIN_CPU_CLOCK); /* 4 MHz ??? */
m_maincpu->set_addrmap(AS_PROGRAM, &_1942_state::_1942_map);
@@ -623,8 +623,7 @@ MACHINE_CONFIG_START(_1942_state::_1942)
NETLIST_STREAM_OUTPUT(config, "snd_nl:cout0", 0, "R1.1").set_mult_offset(70000.0, 0.0);
//MCFG_NETLIST_STREAM_OUTPUT("snd_nl", 0, "VR.2")
-
-MACHINE_CONFIG_END
+}
void _1942p_state::_1942p(machine_config &config)
diff --git a/src/mame/drivers/atarittl.cpp b/src/mame/drivers/atarittl.cpp
index 0c678aa6937..9c463ed6ba6 100644
--- a/src/mame/drivers/atarittl.cpp
+++ b/src/mame/drivers/atarittl.cpp
@@ -343,7 +343,8 @@ void atarikee_state::atarikee(machine_config &config)
//#define STUNTCYC_NL_CLOCK (14318181*69)
#define STUNTCYC_NL_CLOCK (SC_HTOTAL*SC_VTOTAL*60*140)
-MACHINE_CONFIG_START(stuntcyc_state::stuntcyc)
+void stuntcyc_state::stuntcyc(machine_config &config)
+{
/* basic machine hardware */
NETLIST_CPU(config, m_maincpu, STUNTCYC_NL_CLOCK).set_source(netlist_stuntcyc);
@@ -367,9 +368,10 @@ MACHINE_CONFIG_START(stuntcyc_state::stuntcyc)
//m_video->set_vert_params(SC_VTOTAL-22,SC_VTOTAL-19,SC_VTOTAL-12,SC_VTOTAL);
//m_video->set_fieldcount(1);
//m_video->set_threshold(0.30);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(gtrak10_state::gtrak10)
+void gtrak10_state::gtrak10(machine_config &config)
+{
/* basic machine hardware */
NETLIST_CPU(config, "maincpu", NETLIST_CLOCK).set_source(netlist_gtrak10);
@@ -406,8 +408,7 @@ MACHINE_CONFIG_START(gtrak10_state::gtrak10)
m_video->set_fieldcount(2);
m_video->set_threshold(1.0);
//m_video->set_gain(1.50);
-
-MACHINE_CONFIG_END
+}
static INPUT_PORTS_START( gtrak10 )
// TODO
diff --git a/src/mame/drivers/cocoloco.cpp b/src/mame/drivers/cocoloco.cpp
index 5e7bcdaccd6..75e549760a8 100644
--- a/src/mame/drivers/cocoloco.cpp
+++ b/src/mame/drivers/cocoloco.cpp
@@ -511,8 +511,8 @@ INPUT_PORTS_END
* Machine Drivers *
***********************************/
-MACHINE_CONFIG_START(cocoloco_state::cocoloco)
-
+void cocoloco_state::cocoloco(machine_config &config)
+{
/* basic machine hardware */
M6502(config, m_maincpu, CPU_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &cocoloco_state::cocoloco_map);
@@ -546,8 +546,7 @@ MACHINE_CONFIG_START(cocoloco_state::cocoloco)
NETLIST_STREAM_INPUT(config, "snd_nl:cin2", 2, "R_AY1_3.R");
NETLIST_STREAM_OUTPUT(config, "snd_nl:cout0", 0, "RAMP.1").set_mult_offset(30000.0 * 1.5, 0);
-
-MACHINE_CONFIG_END
+}
/***********************************
diff --git a/src/mame/drivers/hazeltin.cpp b/src/mame/drivers/hazeltin.cpp
index c570e94aa67..2436ec53b7b 100644
--- a/src/mame/drivers/hazeltin.cpp
+++ b/src/mame/drivers/hazeltin.cpp
@@ -693,7 +693,8 @@ static GFXDECODE_START( gfx_hazl1500 )
GFXDECODE_ENTRY( CHAR_EPROM_TAG, 0x0000, hazl1500_charlayout, 0, 1 )
GFXDECODE_END
-MACHINE_CONFIG_START(hazl1500_state::hazl1500)
+void hazl1500_state::hazl1500(machine_config &config)
+{
/* basic machine hardware */
I8080(config, m_maincpu, XTAL(18'000'000)/9); // 18MHz crystal on schematics, using an i8224 clock gen/driver IC
m_maincpu->set_addrmap(AS_PROGRAM, &hazl1500_state::hazl1500_mem);
@@ -773,7 +774,7 @@ MACHINE_CONFIG_START(hazl1500_state::hazl1500)
m_kbdc->shift().set(FUNC(hazl1500_state::ay3600_shift_r));
m_kbdc->control().set(FUNC(hazl1500_state::ay3600_control_r));
m_kbdc->data_ready().set(FUNC(hazl1500_state::ay3600_data_ready_w));
-MACHINE_CONFIG_END
+}
ROM_START( hazl1500 )
diff --git a/src/mame/drivers/palestra.cpp b/src/mame/drivers/palestra.cpp
index 27db8cff291..a32abb73d92 100644
--- a/src/mame/drivers/palestra.cpp
+++ b/src/mame/drivers/palestra.cpp
@@ -71,7 +71,8 @@ static INPUT_PORTS_START(palestra)
INPUT_PORTS_END
-MACHINE_CONFIG_START(palestra_state::palestra)
+void palestra_state::palestra(machine_config &config)
+{
NETLIST_CPU(config, m_maincpu, NETLIST_CLOCK)
.set_source(netlist_palestra);
@@ -85,7 +86,7 @@ MACHINE_CONFIG_START(palestra_state::palestra)
m_video->set_fieldcount(1);
m_video->set_threshold(1);
m_video->set_gain(0.36);
-MACHINE_CONFIG_END
+}
ROM_START( palestra ) /* dummy to satisfy game entry*/
diff --git a/src/mame/drivers/pengo.cpp b/src/mame/drivers/pengo.cpp
index 2f4255d2496..fd39e442ac5 100644
--- a/src/mame/drivers/pengo.cpp
+++ b/src/mame/drivers/pengo.cpp
@@ -955,19 +955,7 @@ void pengo_state::decode_schick_extra(int size, uint8_t* rom)
// these are wrong
if (A & 0x1000) // might be more conditions too, but there's certainly a boundary at efff-f000 (jump table)
{
- // note, bit substitution tables, each value 0x00, 0x01, 0x10, 0x11, 0x40, 0x41, 0x50, 0x51 can only be used once.
-
- switch (srcdec & 0x51)
- {
- case 0x00: srcdec = (srcdec & ~0x51) | 0x10; break; // looks good for ld ops
- case 0x01: srcdec = (srcdec & ~0x51) | 0x50; break; // ok?
- case 0x10: srcdec = (srcdec & ~0x51) | 0x11; break; // ok?
- case 0x11: srcdec = (srcdec & ~0x51) | 0x51; break; // push/pull opcodes, see f1a1, f1a2, f1fd etc (d3 case too)
- case 0x40: srcdec = (srcdec & ~0x51) | 0x00; break; // ok for some NOPs? and jr ops
- case 0x41: srcdec = (srcdec & ~0x51) | 0x40; break; // maybe, ret z at f3be
- case 0x50: srcdec = (srcdec & ~0x51) | 0x01; break; // not 11, not 50, maybe 01? see fcc1
- case 0x51: srcdec = (srcdec & ~0x51) | 0x41; break; // jmp
- }
+ srcdec = bitswap<8>(srcdec ^ 0x40, 7, 0, 5, 6, 3, 2, 1, 4);
rom[A] = srcdec;
}
else
@@ -984,18 +972,7 @@ void pengo_state::decode_schick_extra(int size, uint8_t* rom)
// I wouldn't put it past Microhard to have an MCU supplying code too... (but why, there's already plenty of extra code for this pengo hack)
- switch (srcdec & 0x51)
- {
- case 0x00: srcdec = (srcdec & ~0x51) | 0x40; break;
- case 0x01: srcdec = (srcdec & ~0x51) | 0x01; break;
- case 0x10: srcdec = (srcdec & ~0x51) | 0x41; break; // JMP table EFA0
- case 0x11: srcdec = (srcdec & ~0x51) | 0x11; break;
- case 0x40: srcdec = (srcdec & ~0x51) | 0x00; break; // NOPs at e538
- case 0x41: srcdec = (srcdec & ~0x51) | 0x51; break;
- case 0x50: srcdec = (srcdec & ~0x51) | 0x50; break;
- case 0x51: srcdec = (srcdec & ~0x51) | 0x10; break;
- }
-
+ srcdec = bitswap<8>(srcdec ^ 0x40, 7, 4, 5, 0, 3, 2, 1, 6);
rom[A] = srcdec;
}
}
@@ -1020,6 +997,28 @@ void pengo_state::init_schick()
decode_schick_extra(0x10000, rom);
decode_schick_extra(0x10000, m_decrypted_opcodes);
+
+ {
+ char filename[256];
+ sprintf(filename,"p_decrypted_%s", machine().system().name);
+ FILE *fp = fopen(filename, "w+b");
+ if (fp)
+ {
+ fwrite(rom, 0x10000, 1, fp);
+ fclose(fp);
+ }
+ }
+
+ {
+ char filename[256];
+ sprintf(filename,"p_decrypted_opcodes_%s", machine().system().name);
+ FILE *fp = fopen(filename, "w+b");
+ if (fp)
+ {
+ fwrite(m_decrypted_opcodes, 0x10000, 1, fp);
+ fclose(fp);
+ }
+ }
}
diff --git a/src/mame/drivers/pong.cpp b/src/mame/drivers/pong.cpp
index f1b80311843..a5cc5375c6d 100644
--- a/src/mame/drivers/pong.cpp
+++ b/src/mame/drivers/pong.cpp
@@ -463,8 +463,8 @@ static INPUT_PORTS_START( rebound )
INPUT_PORTS_END
-MACHINE_CONFIG_START(pong_state::pong)
-
+void pong_state::pong(machine_config &config)
+{
/* basic machine hardware */
//MCFG_DEVICE_ADD("maincpu", NETLIST_CPU, NETLIST_CLOCK)
//MCFG_NETLIST_SETUP(pong)
@@ -499,10 +499,10 @@ MACHINE_CONFIG_START(pong_state::pong)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(breakout_state::breakout)
+}
+void breakout_state::breakout(machine_config &config)
+{
/* basic machine hardware */
NETLIST_CPU(config, "maincpu", NETLIST_CLOCK).set_source(NETLIST_NAME(breakout));
@@ -553,20 +553,19 @@ MACHINE_CONFIG_START(breakout_state::breakout)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(pong_state::pongf)
+void pong_state::pongf(machine_config &config)
+{
pong(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_NETLIST_SETUP(pong_fast)
-
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(pong_state::pongd)
+ subdevice<netlist_mame_device>("maincpu")->set_setup_func(NETLIST_NAME(pong_fast));
+}
+void pong_state::pongd(machine_config &config)
+{
/* basic machine hardware */
NETLIST_CPU(config, "maincpu", NETLIST_CLOCK).set_source(NETLIST_NAME(pongdoubles));
@@ -601,10 +600,10 @@ MACHINE_CONFIG_START(pong_state::pongd)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(rebound_state::rebound)
+}
+void rebound_state::rebound(machine_config &config)
+{
/* basic machine hardware */
NETLIST_CPU(config, "maincpu", NETLIST_CLOCK).set_source(NETLIST_NAME(rebound_schematics));
@@ -644,7 +643,7 @@ MACHINE_CONFIG_START(rebound_state::rebound)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/testpat.cpp b/src/mame/drivers/testpat.cpp
index 555dca9d143..898f9dd5a1a 100644
--- a/src/mame/drivers/testpat.cpp
+++ b/src/mame/drivers/testpat.cpp
@@ -102,7 +102,8 @@ static INPUT_PORTS_START(tp1985)
INPUT_PORTS_END
-MACHINE_CONFIG_START(tp1983_state::tp1983)
+void tp1983_state::tp1983(machine_config &config)
+{
NETLIST_CPU(config, m_maincpu, NETLIST_CLOCK).set_source(netlist_tp1983);
NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0").set_params("videomix", FUNC(fixedfreq_device::update_composite_monochrome), "fixfreq");
@@ -115,9 +116,10 @@ MACHINE_CONFIG_START(tp1983_state::tp1983)
m_video->set_fieldcount(1);
m_video->set_threshold(1);
m_video->set_gain(0.36);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(tp1985_state::tp1985)
+void tp1985_state::tp1985(machine_config &config)
+{
NETLIST_CPU(config, m_maincpu, NETLIST_CLOCK).set_source(netlist_tp1985);
NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0").set_params("videomix", FUNC(tp1985_state::video_out_cb), "");
@@ -130,7 +132,7 @@ MACHINE_CONFIG_START(tp1985_state::tp1985)
m_video->set_fieldcount(1);
m_video->set_threshold(1);
m_video->set_gain(0.36);
-MACHINE_CONFIG_END
+}
ROM_START( tp1983 ) /* dummy to satisfy game entry*/