summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--hash/c2color_cart.xml31
-rw-r--r--hash/ekara_japan_m.xml2
-rw-r--r--hash/ekara_japan_p.xml2
-rw-r--r--hash/ekara_japan_s.xml4
-rw-r--r--hash/leapfrog_leappad_cart.xml28
-rw-r--r--hash/leapfrog_mfleappad_cart.xml20
-rw-r--r--hash/vsmile_cart.xml33
-rw-r--r--hash/vsmilem_cart.xml54
-rw-r--r--scripts/src/video.lua12
-rw-r--r--scripts/target/mame/arcade.lua1
-rw-r--r--scripts/target/mame/mess.lua10
-rw-r--r--src/devices/bus/bbc/1mhzbus/ieee488.cpp77
-rw-r--r--src/devices/bus/bbc/exp/mertec.cpp2
-rw-r--r--src/devices/bus/cbmiec/interpod.cpp17
-rw-r--r--src/devices/bus/electron/plus1.cpp10
-rw-r--r--src/devices/bus/electron/plus1.h2
-rw-r--r--src/devices/bus/hp9845_io/98034.cpp19
-rw-r--r--src/devices/bus/ieee488/ieee488.h116
-rw-r--r--src/devices/bus/ieee488/softbox.cpp27
-rw-r--r--src/devices/bus/imi7000/imi7000.h51
-rw-r--r--src/devices/bus/kc/d002.cpp60
-rw-r--r--src/devices/bus/kc/kc.h62
-rw-r--r--src/devices/bus/nasbus/nasbus.h30
-rw-r--r--src/devices/bus/s100/s100.h105
-rw-r--r--src/devices/bus/vsmile/rom.cpp11
-rw-r--r--src/devices/bus/vsmile/rom.h13
-rw-r--r--src/devices/bus/vsmile/vsmile_slot.cpp18
-rw-r--r--src/devices/bus/vsmile/vsmile_slot.h14
-rw-r--r--src/devices/cpu/mips/r4000.cpp8
-rw-r--r--src/devices/imagedev/harddriv.h5
-rw-r--r--src/devices/machine/adc0808.cpp14
-rw-r--r--src/devices/machine/adc0808.h8
-rw-r--r--src/devices/machine/adc0844.cpp6
-rw-r--r--src/devices/machine/adc0844.h6
-rw-r--r--src/devices/machine/netlist.cpp6
-rw-r--r--src/devices/machine/netlist.h1
-rw-r--r--src/devices/machine/spg2xx.cpp36
-rw-r--r--src/devices/machine/spg2xx.h1
-rw-r--r--src/devices/sound/rf5c68.cpp8
-rw-r--r--src/devices/sound/rf5c68.h8
-rw-r--r--src/devices/video/crt9028.cpp220
-rw-r--r--src/devices/video/crt9028.h127
-rw-r--r--src/frontend/mame/ui/menu.cpp11
-rw-r--r--src/lib/netlist/devices/nld_9310.cpp31
-rw-r--r--src/lib/netlist/devices/nld_9316.cpp34
-rw-r--r--src/lib/netlist/devices/nld_system.cpp23
-rw-r--r--src/lib/netlist/devices/nlid_system.h15
-rw-r--r--src/lib/netlist/devices/nlid_truthtable.h4
-rw-r--r--src/lib/netlist/nl_base.cpp68
-rw-r--r--src/lib/netlist/nl_base.h59
-rw-r--r--src/lib/netlist/nl_setup.cpp11
-rw-r--r--src/lib/netlist/nl_setup.h13
-rw-r--r--src/lib/netlist/plib/plists.h3
-rw-r--r--src/lib/netlist/plib/poptions.cpp6
-rw-r--r--src/lib/netlist/plib/poptions.h26
-rw-r--r--src/lib/netlist/plib/pparser.cpp14
-rw-r--r--src/lib/netlist/plib/pparser.h6
-rw-r--r--src/lib/netlist/plib/pstate.cpp4
-rw-r--r--src/lib/netlist/plib/pstate.h4
-rw-r--r--src/lib/netlist/plib/putil.h4
-rw-r--r--src/lib/netlist/prg/nltool.cpp21
-rw-r--r--src/lib/netlist/prg/nlwav.cpp10
-rw-r--r--src/mame/audio/nl_kidniki.cpp9
-rw-r--r--src/mame/drivers/atarig1.cpp4
-rw-r--r--src/mame/drivers/atarig42.cpp6
-rw-r--r--src/mame/drivers/atarigt.cpp4
-rw-r--r--src/mame/drivers/atarigx2.cpp4
-rw-r--r--src/mame/drivers/atarisy1.cpp4
-rw-r--r--src/mame/drivers/backfire.cpp2
-rw-r--r--src/mame/drivers/bbc.cpp4
-rw-r--r--src/mame/drivers/c2color.cpp127
-rw-r--r--src/mame/drivers/cardinal.cpp33
-rw-r--r--src/mame/drivers/eprom.cpp4
-rw-r--r--src/mame/drivers/gridcomp.cpp70
-rw-r--r--src/mame/drivers/horizon.cpp54
-rw-r--r--src/mame/drivers/hp64k.cpp48
-rw-r--r--src/mame/drivers/hp_ipc.cpp40
-rw-r--r--src/mame/drivers/kc.cpp101
-rw-r--r--src/mame/drivers/leapfrog_leappad.cpp130
-rw-r--r--src/mame/drivers/mcr3.cpp4
-rw-r--r--src/mame/drivers/mcr68.cpp4
-rw-r--r--src/mame/drivers/megadriv.cpp6
-rw-r--r--src/mame/drivers/midvunit.cpp4
-rw-r--r--src/mame/drivers/mpz80.cpp45
-rw-r--r--src/mame/drivers/multfish.cpp190
-rw-r--r--src/mame/drivers/multfish_boot.cpp24
-rw-r--r--src/mame/drivers/nascom1.cpp28
-rw-r--r--src/mame/drivers/nes_vt.cpp6
-rw-r--r--src/mame/drivers/sage2.cpp12
-rw-r--r--src/mame/drivers/softbox.cpp33
-rw-r--r--src/mame/drivers/ssv.cpp4
-rw-r--r--src/mame/drivers/tek405x.cpp150
-rw-r--r--src/mame/drivers/tomcat.cpp2
-rw-r--r--src/mame/drivers/vixen.cpp101
-rw-r--r--src/mame/drivers/vsmile.cpp69
-rw-r--r--src/mame/drivers/xor100.cpp35
-rw-r--r--src/mame/drivers/zorba.cpp18
-rw-r--r--src/mame/includes/multfish.h4
-rw-r--r--src/mame/includes/vsmile.h15
-rw-r--r--src/mame/machine/harddriv.cpp2
-rw-r--r--src/mame/machine/megacd.cpp71
-rw-r--r--src/mame/machine/megacd.h11
-rw-r--r--src/mame/machine/midyunit.cpp4
-rw-r--r--src/mame/machine/nl_breakout.cpp47
-rw-r--r--src/mame/machine/vertigo.cpp2
-rw-r--r--src/mame/mame.lst18
-rw-r--r--src/mame/mess.flt2
107 files changed, 2052 insertions, 1155 deletions
diff --git a/hash/c2color_cart.xml b/hash/c2color_cart.xml
new file mode 100644
index 00000000000..9fe84b05d65
--- /dev/null
+++ b/hash/c2color_cart.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
+<softwarelist name="c2color_cart" description="C2 Color cartridges">
+
+ <software name="game1" supported="no">
+ <description>untranslated title 1</description>
+ <year>20??</year>
+ <publisher>unknown</publisher>
+ <info name="alt_title" value="第4弹-暗黑势力再临"/>
+ <part name="cart" interface="c2color_cart">
+ <dataarea name="rom" size="0x800000">
+ <rom name="game1.bin" size="0x800000" crc="d2735c91" sha1="f71c1cd300893a22e52d046bc9c489e0236c6b88" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="game2" supported="no">
+ <description>untranslated title 2</description>
+ <year>20??</year>
+ <publisher>unknown</publisher>
+ <info name="alt_title" value="第5弹-神秘的龙族之王"/>
+ <part name="cart" interface="c2color_cart">
+ <dataarea name="rom" size="0x800000">
+ <rom name="game2.bin" size="0x800000" crc="1e20d906" sha1="323df1ce05ff4fc1aaefe3e0e2b929aec40cc230" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+</softwarelist>
+
+
diff --git a/hash/ekara_japan_m.xml b/hash/ekara_japan_m.xml
index 9f08af0b1e8..d339310a3e3 100644
--- a/hash/ekara_japan_m.xml
+++ b/hash/ekara_japan_m.xml
@@ -18,6 +18,8 @@
M-11
M-12
M-13 MC0013-KSM KSM Mini Volume 5
+ M-14
+ M-15 MC0015-TPM TV Pop Mini Volume 1
(more? what's the M highest number?)
diff --git a/hash/ekara_japan_p.xml b/hash/ekara_japan_p.xml
index 55f8c2fe06f..66698518502 100644
--- a/hash/ekara_japan_p.xml
+++ b/hash/ekara_japan_p.xml
@@ -15,7 +15,7 @@
*P-1 BHT Volume 4 (Best Artists?) (1,2,3, 5 in G series)
P-2 TV Pop Volume 2 (1,3,4 in G series)
*P-3 ENB Volume 1
- P-4 BHT Volume 7
+ *P-4 BHT Volume 7
-->
<software name="pc0001">
diff --git a/hash/ekara_japan_s.xml b/hash/ekara_japan_s.xml
index ead455a7582..86cc36ec1ce 100644
--- a/hash/ekara_japan_s.xml
+++ b/hash/ekara_japan_s.xml
@@ -30,8 +30,8 @@
S-18 SC0018- (unknown) Volume 1
S-19 *SC0019-SAI SAI (series 2) Volume 6 (same series as 5,6,9,21,22)
S-20 SC0020- (unknown) Volume 5
- S-21 *SC0021-SAI SAI (series 2) Volume 7 (same seires as 5,6,9,19,22)
- S-22 *SC0022-SAI SAI (series 2) Volume 8 (same seires as 5,6,9,19,21)
+ S-21 *SC0021-SAI SAI (series 2) Volume 7 (same series as 5,6,9,19,22)
+ S-22 *SC0022-SAI SAI (series 2) Volume 8 (same series as 5,6,9,19,21)
S-23 SC0023- (unknown)
(more? what's the S highest number?)
diff --git a/hash/leapfrog_leappad_cart.xml b/hash/leapfrog_leappad_cart.xml
new file mode 100644
index 00000000000..0287d2e81e5
--- /dev/null
+++ b/hash/leapfrog_leappad_cart.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
+<softwarelist name="leapfrog_leappad_cart" description="LeapFrog LeapPad cartridges">
+
+ <software name="abc" supported="no">
+ <description>LeapPad ABC</description>
+ <year>20??</year>
+ <publisher>LeapFrog</publisher>
+ <part name="cart" interface="leapfrog_leappad_cart">
+ <dataarea name="rom" size="0x200000">
+ <rom name="leappad_abc.bin" size="0x200000" crc="1f265010" sha1="a5fa878f5bcf92e80cb606d5f869d166d3805e05" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="dino" supported="no">
+ <description>LeapPad Dinosaur</description>
+ <year>20??</year>
+ <publisher>LeapFrog</publisher>
+ <part name="cart" interface="leapfrog_leappad_cart">
+ <dataarea name="rom" size="0x400000">
+ <rom name="leappad_dino.bin" size="0x400000" crc="5e306c92" sha1="7496f5b994a40ea07228b5ab27ec907fbcf603b4" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+</softwarelist>
+
+
diff --git a/hash/leapfrog_mfleappad_cart.xml b/hash/leapfrog_mfleappad_cart.xml
new file mode 100644
index 00000000000..fe5f94957af
--- /dev/null
+++ b/hash/leapfrog_mfleappad_cart.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
+<softwarelist name="leapfrog_mfleappad_cart" description="LeapFrog My First LeapPad cartridges">
+
+ <!--
+ <software name="nothing" supported="no">
+ <description>Nothing</description>
+ <year>20??</year>
+ <publisher>LeapFrog</publisher>
+ <part name="cart" interface="leapfrog_mfleappad_cart">
+ <dataarea name="rom" size="0x200000">
+ <rom name="nothing.bin" size="0x200000" crc="11111111" sha1="1111111111111111111111111111111111111111" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+ -->
+
+</softwarelist>
+
+
diff --git a/hash/vsmile_cart.xml b/hash/vsmile_cart.xml
index f097cf4ded7..63c018604a3 100644
--- a/hash/vsmile_cart.xml
+++ b/hash/vsmile_cart.xml
@@ -1205,6 +1205,23 @@ Game cartridges
<description>Disney's The Lion King - Simba's Big Adventure (USA)</description>
<year>200?</year>
<publisher>VTech</publisher>
+ <part name="cart" interface="vsmile_cart">
+ <feature name="slot" value="vsmile_rom" />
+ <feature name="pcb" value="92060" />
+ <feature name="u1" value="" /> <!-- EPOXY BLOB ROM --> <!-- 2 globs, uses /CS2 for 2nd glob -->
+ <feature name="u2" value="" /> <!-- EPOXY BLOB ROM -->
+ <dataarea name="rom" size="0x0800000">
+ <rom name="vsmile92100.blob1.bin" size="0x0400000" crc="8a2317fb" sha1="44d397ada00f1fedb48622e716189f4a129ff5a7" offset="0x0000000" />
+ <rom name="vsmile92100.blob2.bin" size="0x0200000" crc="dded069c" sha1="29f1f464f9f5c8fa06410d54538b984f3fc52f01" offset="0x0400000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <!-- where did the last 2MB in this come from? the cart is confirmed as having a 4MB blob and a 2MB blob -->
+ <software name="lionkinga" cloneof="lionking" supported="yes">
+ <description>Disney's The Lion King - Simba's Big Adventure (USA) (alt)</description>
+ <year>200?</year>
+ <publisher>VTech</publisher>
<info name="serial" value="80-092100(US)" />
<part name="cart" interface="vsmile_cart">
<feature name="slot" value="vsmile_rom" />
@@ -2111,6 +2128,22 @@ Game cartridges
</software>
<software name="pooh" supported="yes">
+ <description>Disneys Winnie the Pooh - The Honey Hunt (US)</description>
+ <year>2004?</year>
+ <publisher>VTech</publisher>
+ <part name="cart" interface="vsmile_cart">
+ <feature name="slot" value="vsmile_rom" />
+ <feature name="pcb" value="92060" />
+ <feature name="u1" value="" /> <!-- EPOXY BLOB ROM --> <!-- 2 globs, uses /CS2 for 2nd glob -->
+ <feature name="u2" value="" /> <!-- EPOXY BLOB ROM -->
+ <dataarea name="rom" size="0x0800000">
+ <rom name="vsmile92060.blob1.bin" size="0x0400000" crc="c34fd808" sha1="2800b89068e3c09a66223392e11982dd2193244b" offset="0x0000000" />
+ <rom name="vsmile92060.blob2.bin" size="0x0200000" crc="b7261f74" sha1="40bc8d9284a2f307023502ec67f8fc8e974966ea" offset="0x0400000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="poohg" cloneof="pooh" supported="yes">
<description>Disneys Winnie Puuh - Die Honigjagd (Ger)</description>
<year>2004?</year>
<publisher>VTech</publisher>
diff --git a/hash/vsmilem_cart.xml b/hash/vsmilem_cart.xml
index 2e6c63cecba..07bd9990595 100644
--- a/hash/vsmilem_cart.xml
+++ b/hash/vsmilem_cart.xml
@@ -160,7 +160,7 @@ Language:
| | (IT) | Toy Story 3 (EAN 8033836704196) GP470419? |
| | 80-084422(NL) | Toy Story 3 |
| | 80-084423(UK) | Toy Story 3 |
-| | 80-084424(GE) | Toy Story 3 |
+| XX | 80-084424(GE) | Toy Story 3 |
| | 80-084425(FR) | Toy Story 3 |
| | 80-084427(SP) | Toy Story 3 |
+========+===================+============================================================================+
@@ -184,10 +184,10 @@ Language:
| | 80-084485(FR) | La Princesse Et La Grenouille |
| | 80-084487(SP) | Tiana y el Sapo - El gran sueño de Tiana |
+========+===================+============================================================================+
-| | 80-084500(US) | Shrek Forever After |
+| XX | 80-084500(US) | Shrek Forever After |
| | 80-084502(NL) | Sjrek voor eeuwig en altijd |
| | 80-084503(UK) | Shrek Forever After |
-| | 80-084504(GE) | Fuer immer Shrek |
+| XX | 80-084504(GE) | Fuer immer Shrek |
| | 80-084505(FR) | Shrek 4 - Il Etait une Fin |
| | 80-084507(SP) | Shrek Felices para siempre |
+========+===================+============================================================================+
@@ -405,6 +405,38 @@ Smartbooks currently have no dumps available, hence they are temporarily listed
</part>
</software>
+ <software name="shrekfa" supported="no">
+ <description>Shrek Forever After (US)</description>
+ <year>200?</year>
+ <publisher>VTech</publisher>
+ <info name="serial" value="80-084500(US)" />
+ <part name="cart" interface="vsmile_cart">
+ <feature name="pcb" value="84500 E" />
+ <feature name="u1" value="" /> <!-- EPOXY BLOB ROM --> <!-- 2 globs, uses /CS2 for 2nd glob -->
+ <feature name="u2" value="" /> <!-- EPOXY BLOB ROM -->
+ <dataarea name="rom" size="0x1000000">
+ <rom name="vsmile84500.blob1.bin" size="0x0800000" crc="175117f1" sha1="48231caf853e27856eb033d14937b7eb7e74198c" offset="0x0000000" />
+ <rom name="vsmile84500.blob2.bin" size="0x0800000" crc="5dc681ea" sha1="1a3a2ff08bd52ad74183b09059082b492000e571" offset="0x0800000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="fimshrek" supported="no">
+ <description>Für immer Shrek (Ger)</description>
+ <year>2010</year>
+ <publisher>VTech</publisher>
+ <info name="serial" value="80-084504(GE)" />
+ <part name="cart" interface="vsmile_cart">
+ <feature name="pcb" value="710654-1" />
+ <feature name="u1" value="" /> <!-- EPOXY BLOB ROM --> <!-- 2 globs, uses /CS2 for 2nd glob -->
+ <feature name="u2" value="" /> <!-- EPOXY BLOB ROM -->
+ <dataarea name="rom" size="0x1000000">
+ <rom name="vsmile84504.blob1.bin" size="0x0800000" crc="3f1c79e2" sha1="1b12b9b379dd942356e6ee6594c8b80dbb9db781" offset="0x0000000" />
+ <rom name="vsmile84504.blob2.bin" size="0x0800000" crc="78cf731b" sha1="9b1d1eed7bd216f4feca3160c31912b7c81e4efd" offset="0x0800000" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="spidermn" supported="no">
<description>Spider-Man &amp; Freunde - Geheime Missionen (Ger)</description>
<year>2010</year>
@@ -462,6 +494,22 @@ Smartbooks currently have no dumps available, hence they are temporarily listed
</part>
</software>
+ <software name="toystor3g" supported="no">
+ <description>Toy Story 3 (Ger)</description>
+ <year>2010</year>
+ <publisher>VTech</publisher>
+ <info name="serial" value="80-084424(GE)" />
+ <part name="cart" interface="vsmile_cart">
+ <feature name="pcb" value="710654-2" />
+ <feature name="u1" value="" /> <!-- EPOXY BLOB ROM --> <!-- 2 globs, uses /CS2 for 2nd glob -->
+ <feature name="u2" value="" /> <!-- EPOXY BLOB ROM -->
+ <dataarea name="rom" size="0x1000000">
+ <rom name="vsmile84424.blob1.bin" size="0x0800000" crc="845bbb46" sha1="1b11bb1a119715073560b40d65b77894043dd67a" offset="0x0000000" />
+ <rom name="vsmile84424.blob2.bin" size="0x0800000" crc="c006e9b6" sha1="2f4b32ba578117caa53bb0bf9db717d8d9dd8a13" offset="0x0800000" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="wintrspt" supported="no">
<description>Wintersport (Ger)</description>
<year>2009?</year>
diff --git a/scripts/src/video.lua b/scripts/src/video.lua
index 3f78a2a154a..3508f260eff 100644
--- a/scripts/src/video.lua
+++ b/scripts/src/video.lua
@@ -115,6 +115,18 @@ end
--------------------------------------------------
--
+--@src/devices/video/crt9028.h,VIDEOS["CRT9028"] = true
+--------------------------------------------------
+
+if (VIDEOS["CRT9028"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/video/crt9028.cpp",
+ MAME_DIR .. "src/devices/video/crt9028.h",
+ }
+end
+
+--------------------------------------------------
+--
--@src/devices/video/crt9212.h,VIDEOS["CRT9212"] = true
--------------------------------------------------
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index e4c869bcce5..5466a7607ea 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -285,6 +285,7 @@ VIDEOS["BUFSPRITE"] = true
VIDEOS["CESBLIT"] = true
--VIDEOS["CRT9007"] = true
--VIDEOS["CRT9021"] = true
+--VIDEOS["CRT9028"] = true
--VIDEOS["CRT9212"] = true
VIDEOS["CRTC_EGA"] = true
--VIDEOS["DL1416"] = true
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index 0cae558030b..f3bd95d3a5a 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -297,6 +297,7 @@ VIDEOS["CDP1862"] = true
--VIDEOS["CESBLIT"] = true
VIDEOS["CRT9007"] = true
VIDEOS["CRT9021"] = true
+VIDEOS["CRT9028"] = true
VIDEOS["CRT9212"] = true
VIDEOS["CRTC_EGA"] = true
VIDEOS["DL1416"] = true
@@ -1093,6 +1094,7 @@ function linkProjects_mame_mess(_target, _subtarget)
"kontron",
"kurzweil",
"kyocera",
+ "leapfrog",
"luxor",
"magnavox",
"makerbot",
@@ -2414,6 +2416,12 @@ files {
MAME_DIR .. "src/mame/video/kyocera.cpp",
}
+createMESSProjects(_target, _subtarget, "leapfrog")
+files {
+ MAME_DIR .. "src/mame/drivers/leapster.cpp",
+ MAME_DIR .. "src/mame/drivers/leapfrog_leappad.cpp",
+}
+
createMESSProjects(_target, _subtarget, "luxor")
files {
MAME_DIR .. "src/mame/drivers/abc80.cpp",
@@ -3740,6 +3748,7 @@ files {
MAME_DIR .. "src/mame/drivers/busicom.cpp",
MAME_DIR .. "src/mame/includes/busicom.h",
MAME_DIR .. "src/mame/video/busicom.cpp",
+ MAME_DIR .. "src/mame/drivers/c2color.cpp",
MAME_DIR .. "src/mame/drivers/candela.cpp",
MAME_DIR .. "src/mame/drivers/cardinal.cpp",
MAME_DIR .. "src/mame/drivers/chaos.cpp",
@@ -3824,7 +3833,6 @@ files {
MAME_DIR .. "src/mame/drivers/jade.cpp",
MAME_DIR .. "src/mame/drivers/jonos.cpp",
MAME_DIR .. "src/mame/drivers/kron.cpp",
- MAME_DIR .. "src/mame/drivers/leapster.cpp",
MAME_DIR .. "src/mame/drivers/lee1214.cpp",
MAME_DIR .. "src/mame/drivers/learnwin.cpp",
MAME_DIR .. "src/mame/drivers/lft.cpp",
diff --git a/src/devices/bus/bbc/1mhzbus/ieee488.cpp b/src/devices/bus/bbc/1mhzbus/ieee488.cpp
index 383ceef537b..dc227a21729 100644
--- a/src/devices/bus/bbc/1mhzbus/ieee488.cpp
+++ b/src/devices/bus/bbc/1mhzbus/ieee488.cpp
@@ -54,7 +54,8 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(bbc_ieee488_device::device_add_mconfig)
+void bbc_ieee488_device::device_add_mconfig(machine_config &config)
+{
TMS9914(config, m_tms9914, 5_MHz_XTAL);
m_tms9914->int_write_cb().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::irq_w));
m_tms9914->dio_read_cb().set(IEEE488_TAG, FUNC(ieee488_device::dio_r));
@@ -67,23 +68,25 @@ MACHINE_CONFIG_START(bbc_ieee488_device::device_add_mconfig)
m_tms9914->srq_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_srq_w));
m_tms9914->atn_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w));
m_tms9914->ren_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_ren_w));
- MCFG_IEEE488_BUS_ADD()
- MCFG_IEEE488_EOI_CALLBACK(WRITELINE(m_tms9914, tms9914_device, eoi_w))
- MCFG_IEEE488_DAV_CALLBACK(WRITELINE(m_tms9914, tms9914_device, dav_w))
- MCFG_IEEE488_NRFD_CALLBACK(WRITELINE(m_tms9914, tms9914_device, nrfd_w))
- MCFG_IEEE488_NDAC_CALLBACK(WRITELINE(m_tms9914, tms9914_device, ndac_w))
- MCFG_IEEE488_IFC_CALLBACK(WRITELINE(m_tms9914, tms9914_device, ifc_w))
- MCFG_IEEE488_SRQ_CALLBACK(WRITELINE(m_tms9914, tms9914_device, srq_w))
- MCFG_IEEE488_ATN_CALLBACK(WRITELINE(m_tms9914, tms9914_device, atn_w))
- MCFG_IEEE488_REN_CALLBACK(WRITELINE(m_tms9914, tms9914_device, ren_w))
- MCFG_IEEE488_SLOT_ADD("ieee_dev", 0, cbm_ieee488_devices, nullptr)
+
+ IEEE488(config, m_ieee);
+ m_ieee->eoi_callback().set(m_tms9914, FUNC(tms9914_device::eoi_w));
+ m_ieee->dav_callback().set(m_tms9914, FUNC(tms9914_device::dav_w));
+ m_ieee->nrfd_callback().set(m_tms9914, FUNC(tms9914_device::nrfd_w));
+ m_ieee->ndac_callback().set(m_tms9914, FUNC(tms9914_device::ndac_w));
+ m_ieee->ifc_callback().set(m_tms9914, FUNC(tms9914_device::ifc_w));
+ m_ieee->srq_callback().set(m_tms9914, FUNC(tms9914_device::srq_w));
+ m_ieee->atn_callback().set(m_tms9914, FUNC(tms9914_device::atn_w));
+ m_ieee->ren_callback().set(m_tms9914, FUNC(tms9914_device::ren_w));
+ IEEE488_SLOT(config, "ieee_dev", 0, cbm_ieee488_devices, nullptr);
BBC_1MHZBUS_SLOT(config, m_1mhzbus, DERIVED_CLOCK(1, 1), bbc_1mhzbus_devices, nullptr);
m_1mhzbus->irq_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::irq_w));
m_1mhzbus->nmi_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::nmi_w));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(bbc_b488_device::device_add_mconfig)
+void bbc_b488_device::device_add_mconfig(machine_config &config)
+{
TMS9914(config, m_tms9914, 5_MHz_XTAL); // TODO: verify clock
m_tms9914->int_write_cb().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::irq_w));
m_tms9914->dio_read_cb().set(IEEE488_TAG, FUNC(ieee488_device::dio_r));
@@ -96,35 +99,37 @@ MACHINE_CONFIG_START(bbc_b488_device::device_add_mconfig)
m_tms9914->srq_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_srq_w));
m_tms9914->atn_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w));
m_tms9914->ren_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_ren_w));
- MCFG_IEEE488_BUS_ADD()
- MCFG_IEEE488_EOI_CALLBACK(WRITELINE(m_tms9914, tms9914_device, eoi_w))
- MCFG_IEEE488_DAV_CALLBACK(WRITELINE(m_tms9914, tms9914_device, dav_w))
- MCFG_IEEE488_NRFD_CALLBACK(WRITELINE(m_tms9914, tms9914_device, nrfd_w))
- MCFG_IEEE488_NDAC_CALLBACK(WRITELINE(m_tms9914, tms9914_device, ndac_w))
- MCFG_IEEE488_IFC_CALLBACK(WRITELINE(m_tms9914, tms9914_device, ifc_w))
- MCFG_IEEE488_SRQ_CALLBACK(WRITELINE(m_tms9914, tms9914_device, srq_w))
- MCFG_IEEE488_ATN_CALLBACK(WRITELINE(m_tms9914, tms9914_device, atn_w))
- MCFG_IEEE488_REN_CALLBACK(WRITELINE(m_tms9914, tms9914_device, ren_w))
- MCFG_IEEE488_SLOT_ADD("ieee_dev", 0, cbm_ieee488_devices, nullptr)
+
+ IEEE488(config, m_ieee);
+ m_ieee->eoi_callback().set(m_tms9914, FUNC(tms9914_device::eoi_w));
+ m_ieee->dav_callback().set(m_tms9914, FUNC(tms9914_device::dav_w));
+ m_ieee->nrfd_callback().set(m_tms9914, FUNC(tms9914_device::nrfd_w));
+ m_ieee->ndac_callback().set(m_tms9914, FUNC(tms9914_device::ndac_w));
+ m_ieee->ifc_callback().set(m_tms9914, FUNC(tms9914_device::ifc_w));
+ m_ieee->srq_callback().set(m_tms9914, FUNC(tms9914_device::srq_w));
+ m_ieee->atn_callback().set(m_tms9914, FUNC(tms9914_device::atn_w));
+ m_ieee->ren_callback().set(m_tms9914, FUNC(tms9914_device::ren_w));
+ IEEE488_SLOT(config, "ieee_dev", 0, cbm_ieee488_devices, nullptr);
// TODO: LED's for ATN, TALK, and DATA
-MACHINE_CONFIG_END
+}
-//MACHINE_CONFIG_START(bbc_procyon_device::device_add_mconfig)
+//void bbc_procyon_device::device_add_mconfig(machine_config &config)
+//{
// TODO: Implement MC68488
- //MCFG_IEEE488_BUS_ADD()
- //MCFG_IEEE488_EOI_CALLBACK(WRITELINE(m_mc68488, mc68488_device, eoi_w))
- //MCFG_IEEE488_DAV_CALLBACK(WRITELINE(m_mc68488, mc68488_device, dav_w))
- //MCFG_IEEE488_NRFD_CALLBACK(WRITELINE(m_mc68488, mc68488_device, nrfd_w))
- //MCFG_IEEE488_NDAC_CALLBACK(WRITELINE(m_mc68488, mc68488_device, ndac_w))
- //MCFG_IEEE488_IFC_CALLBACK(WRITELINE(m_mc68488, mc68488_device, ifc_w))
- //MCFG_IEEE488_SRQ_CALLBACK(WRITELINE(m_mc68488, mc68488_device, srq_w))
- //MCFG_IEEE488_ATN_CALLBACK(WRITELINE(m_mc68488, mc68488_device, atn_w))
- //MCFG_IEEE488_REN_CALLBACK(WRITELINE(m_mc68488, mc68488_device, ren_w))
- //MCFG_IEEE488_SLOT_ADD("ieee_dev", 0, cbm_ieee488_devices, nullptr)
+ //IEEE488(config, m_ieee);
+ //m_ieee->eoi_callback(m_mc68488, FUNC(mc68488_device::eoi_w));
+ //m_ieee->dav_callback(m_mc68488, FUNC(mc68488_device::dav_w));
+ //m_ieee->nrfd_callback(m_mc68488, FUNC(mc68488_device::nrfd_w));
+ //m_ieee->ndac_callback(m_mc68488, FUNC(mc68488_device::ndac_w));
+ //m_ieee->ifc_callback(m_mc68488, FUNC(mc68488_device::ifc_w));
+ //m_ieee->srq_callback(m_mc68488, FUNC(mc68488_device::srq_w));
+ //m_ieee->atn_callback(m_mc68488, FUNC(mc68488_device::atn_w));
+ //m_ieee->ren_callback(m_mc68488, FUNC(mc68488_device::ren_w));
+ //IEEE488_SLOT(config, "ieee_dev", 0, cbm_ieee488_devices, nullptr);
// TODO: LED's for Bus Active, Byte Out, and Byte In
-//MACHINE_CONFIG_END
+//}
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/devices/bus/bbc/exp/mertec.cpp b/src/devices/bus/bbc/exp/mertec.cpp
index 8f896da0359..3c8a110707a 100644
--- a/src/devices/bus/bbc/exp/mertec.cpp
+++ b/src/devices/bus/bbc/exp/mertec.cpp
@@ -52,7 +52,7 @@ void bbc_mertec_device::device_add_mconfig(machine_config &config)
//m_pia->irq_handler().set("irqs", FUNC(input_merger_device::in_w<0>));
/* adc */
- UPD7002(config, m_upd7002, 0);
+ UPD7002(config, m_upd7002, DERIVED_CLOCK(1, 8));
m_upd7002->set_get_analogue_callback(FUNC(bbc_mertec_device::get_analogue_input), this);
m_upd7002->set_eoc_callback(FUNC(bbc_mertec_device::upd7002_eoc), this);
diff --git a/src/devices/bus/cbmiec/interpod.cpp b/src/devices/bus/cbmiec/interpod.cpp
index d6111dafe4d..ac87a55cf21 100644
--- a/src/devices/bus/cbmiec/interpod.cpp
+++ b/src/devices/bus/cbmiec/interpod.cpp
@@ -123,16 +123,17 @@ void interpod_device::interpod_mem(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(interpod_device::device_add_mconfig)
- MCFG_DEVICE_ADD(R6502_TAG, M6502, 1000000)
- MCFG_DEVICE_PROGRAM_MAP(interpod_mem)
+void interpod_device::device_add_mconfig(machine_config &config)
+{
+ M6502(config, m_maincpu, 1000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &interpod_device::interpod_mem);
- MCFG_DEVICE_ADD(R6522_TAG, VIA6522, 1000000)
- MCFG_DEVICE_ADD(R6532_TAG, MOS6532_NEW, 1000000)
- MCFG_DEVICE_ADD(MC6850_TAG, ACIA6850, 0)
+ VIA6522(config, m_via, 1000000);
+ MOS6532_NEW(config, m_riot, 1000000);
+ ACIA6850(config, m_acia, 0);
- MCFG_CBM_IEEE488_ADD(nullptr)
-MACHINE_CONFIG_END
+ ieee488_device::add_cbm_devices(config, nullptr);
+}
//**************************************************************************
diff --git a/src/devices/bus/electron/plus1.cpp b/src/devices/bus/electron/plus1.cpp
index 608152c9e7a..3e395722bcd 100644
--- a/src/devices/bus/electron/plus1.cpp
+++ b/src/devices/bus/electron/plus1.cpp
@@ -202,11 +202,11 @@ uint8_t electron_plus1_device::expbus_r(address_space &space, offs_t offset)
if (offset == 0xfc70)
{
- data &= m_adc->read(space, 0);
+ data &= m_adc->read();
}
else if (offset == 0xfc72)
{
- data &= status_r(space, 0);
+ data &= status_r();
}
break;
@@ -255,7 +255,7 @@ void electron_plus1_device::expbus_w(address_space &space, offs_t offset, uint8_
if (offset == 0xfc70)
{
- m_adc->write(space, 0, data);
+ m_adc->write(data);
}
else if (offset == 0xfc71)
{
@@ -283,9 +283,9 @@ void electron_plus1_device::expbus_w(address_space &space, offs_t offset, uint8_
// IMPLEMENTATION
//**************************************************************************
-READ8_MEMBER(electron_plus1_device::status_r)
+u8 electron_plus1_device::status_r()
{
- uint8_t data = 0x0f;
+ u8 data = 0x0f;
// Status: b7: printer Busy
// b6: ADC conversion end
// b5: Fire Button 1
diff --git a/src/devices/bus/electron/plus1.h b/src/devices/bus/electron/plus1.h
index 23485acc10a..63e065446e5 100644
--- a/src/devices/bus/electron/plus1.h
+++ b/src/devices/bus/electron/plus1.h
@@ -41,7 +41,7 @@ protected:
virtual void expbus_w(address_space &space, offs_t offset, uint8_t data) override;
private:
- DECLARE_READ8_MEMBER(status_r);
+ u8 status_r();
DECLARE_WRITE_LINE_MEMBER(busy_w);
DECLARE_WRITE_LINE_MEMBER(ready_w);
diff --git a/src/devices/bus/hp9845_io/98034.cpp b/src/devices/bus/hp9845_io/98034.cpp
index b82935a9762..ab2985db6e2 100644
--- a/src/devices/bus/hp9845_io/98034.cpp
+++ b/src/devices/bus/hp9845_io/98034.cpp
@@ -363,9 +363,10 @@ const tiny_rom_entry *hp98034_io_card_device::device_rom_region() const
return ROM_NAME(hp98034);
}
-MACHINE_CONFIG_START(hp98034_io_card_device::device_add_mconfig)
-// Clock for NP is generated by a RC oscillator. Manual says its typical frequency
-// is around 2 MHz.
+void hp98034_io_card_device::device_add_mconfig(machine_config &config)
+{
+ // Clock for NP is generated by a RC oscillator. Manual says its typical frequency
+ // is around 2 MHz.
HP_NANOPROCESSOR(config, m_cpu, 2000000);
m_cpu->set_addrmap(AS_PROGRAM, &hp98034_io_card_device::np_program_map);
m_cpu->set_addrmap(AS_IO, &hp98034_io_card_device::np_io_map);
@@ -373,12 +374,12 @@ MACHINE_CONFIG_START(hp98034_io_card_device::device_add_mconfig)
m_cpu->read_dc().set(FUNC(hp98034_io_card_device::dc_r));
m_cpu->set_irq_acknowledge_callback(FUNC(hp98034_io_card_device::irq_callback));
- MCFG_IEEE488_SLOT_ADD("ieee_dev" , 0 , hp_ieee488_devices , nullptr)
- MCFG_IEEE488_SLOT_ADD("ieee_rem" , 0 , remote488_devices , nullptr)
- MCFG_IEEE488_BUS_ADD()
- MCFG_IEEE488_IFC_CALLBACK(WRITELINE(*this, hp98034_io_card_device , ieee488_ctrl_w))
- MCFG_IEEE488_ATN_CALLBACK(WRITELINE(*this, hp98034_io_card_device , ieee488_ctrl_w))
-MACHINE_CONFIG_END
+ IEEE488_SLOT(config , "ieee_dev" , 0 , hp_ieee488_devices , nullptr);
+ IEEE488_SLOT(config , "ieee_rem" , 0 , remote488_devices , nullptr);
+ IEEE488(config, m_ieee488);
+ m_ieee488->ifc_callback().set(FUNC(hp98034_io_card_device::ieee488_ctrl_w));
+ m_ieee488->atn_callback().set(FUNC(hp98034_io_card_device::ieee488_ctrl_w));
+}
// device type definition
DEFINE_DEVICE_TYPE(HP98034_IO_CARD, hp98034_io_card_device, "hp98034", "HP98034 card")
diff --git a/src/devices/bus/ieee488/ieee488.h b/src/devices/bus/ieee488/ieee488.h
index e734b356d5b..cb29783d294 100644
--- a/src/devices/bus/ieee488/ieee488.h
+++ b/src/devices/bus/ieee488/ieee488.h
@@ -12,8 +12,12 @@
#pragma once
+void cbm_ieee488_devices(device_slot_interface &device);
+void hp_ieee488_devices(device_slot_interface &device);
+void remote488_devices(device_slot_interface &device);
-
+DECLARE_DEVICE_TYPE(IEEE488, ieee488_device)
+DECLARE_DEVICE_TYPE(IEEE488_SLOT, ieee488_slot_device)
//**************************************************************************
// MACROS / CONSTANTS
@@ -24,65 +28,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_IEEE488_BUS_ADD() \
- MCFG_DEVICE_ADD(IEEE488_TAG, IEEE488, 0)
-
-
-#define MCFG_IEEE488_EOI_CALLBACK(_write) \
- downcast<ieee488_device *>(device)->set_eoi_callback(DEVCB_##_write);
-
-#define MCFG_IEEE488_DAV_CALLBACK(_write) \
- downcast<ieee488_device *>(device)->set_dav_callback(DEVCB_##_write);
-
-#define MCFG_IEEE488_NRFD_CALLBACK(_write) \
- downcast<ieee488_device *>(device)->set_nrfd_callback(DEVCB_##_write);
-
-#define MCFG_IEEE488_NDAC_CALLBACK(_write) \
- downcast<ieee488_device *>(device)->set_ndac_callback(DEVCB_##_write);
-
-#define MCFG_IEEE488_IFC_CALLBACK(_write) \
- downcast<ieee488_device *>(device)->set_ifc_callback(DEVCB_##_write);
-
-#define MCFG_IEEE488_SRQ_CALLBACK(_write) \
- downcast<ieee488_device *>(device)->set_srq_callback(DEVCB_##_write);
-
-#define MCFG_IEEE488_ATN_CALLBACK(_write) \
- downcast<ieee488_device *>(device)->set_atn_callback(DEVCB_##_write);
-
-#define MCFG_IEEE488_REN_CALLBACK(_write) \
- downcast<ieee488_device *>(device)->set_ren_callback(DEVCB_##_write);
-
-// This CB reports changes to the DIO lines on the bus (whose value comes from
-// ANDing the DIO lines of each device on the bus)
-// This CB is needed by those controllers that start a parallel poll and wait
-// for some condition to be set by devices on the DIO lines (e.g. PHI controller).
-#define MCFG_IEEE488_DIO_CALLBACK(_write) \
- downcast<ieee488_device *>(device)->set_dio_callback(DEVCB_##_write);
-
-#define MCFG_IEEE488_SLOT_ADD(_tag, _address, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, IEEE488_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
- downcast<ieee488_slot_device *>(device)->set_address(_address);
-
-
-#define MCFG_CBM_IEEE488_ADD(_default_drive) \
- MCFG_IEEE488_SLOT_ADD("ieee4", 4, cbm_ieee488_devices, nullptr) \
- MCFG_IEEE488_SLOT_ADD("ieee8", 8, cbm_ieee488_devices, _default_drive) \
- MCFG_IEEE488_SLOT_ADD("ieee9", 9, cbm_ieee488_devices, nullptr) \
- MCFG_IEEE488_SLOT_ADD("ieee10", 10, cbm_ieee488_devices, nullptr) \
- MCFG_IEEE488_SLOT_ADD("ieee11", 11, cbm_ieee488_devices, nullptr) \
- MCFG_IEEE488_SLOT_ADD("ieee12", 12, cbm_ieee488_devices, nullptr) \
- MCFG_IEEE488_SLOT_ADD("ieee13", 13, cbm_ieee488_devices, nullptr) \
- MCFG_IEEE488_SLOT_ADD("ieee14", 14, cbm_ieee488_devices, nullptr) \
- MCFG_IEEE488_SLOT_ADD("ieee15", 15, cbm_ieee488_devices, nullptr) \
- MCFG_IEEE488_BUS_ADD()
-
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -95,17 +40,7 @@ class ieee488_device : public device_t
{
public:
// construction/destruction
- ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
-
- template <class Object> devcb_base &set_eoi_callback(Object &&cb) { return m_write_eoi.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_dav_callback(Object &&cb) { return m_write_dav.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_nrfd_callback(Object &&cb) { return m_write_nrfd.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_ndac_callback(Object &&cb) { return m_write_ndac.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_ifc_callback(Object &&cb) { return m_write_ifc.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_srq_callback(Object &&cb) { return m_write_srq.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_atn_callback(Object &&cb) { return m_write_atn.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_ren_callback(Object &&cb) { return m_write_ren.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_dio_callback(Object &&cb) { return m_write_dio.set_callback(std::forward<Object>(cb)); }
+ ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
auto eoi_callback() { return m_write_eoi.bind(); }
auto dav_callback() { return m_write_dav.bind(); }
@@ -115,6 +50,11 @@ public:
auto srq_callback() { return m_write_srq.bind(); }
auto atn_callback() { return m_write_atn.bind(); }
auto ren_callback() { return m_write_ren.bind(); }
+
+ // This CB reports changes to the DIO lines on the bus (whose value comes from
+ // ANDing the DIO lines of each device on the bus)
+ // This CB is needed by those controllers that start a parallel poll and wait
+ // for some condition to be set by devices on the DIO lines (e.g. PHI controller).
auto dio_callback() { return m_write_dio.bind(); }
void add_device(ieee488_slot_device *slot, device_t *target);
@@ -154,6 +94,20 @@ public:
void atn_w(device_t *device, int state) { set_signal(device, ATN, state); }
void ren_w(device_t *device, int state) { set_signal(device, REN, state); }
+ // helper functions
+ static void add_cbm_devices(machine_config &config, const char *_default_drive)
+ {
+ IEEE488_SLOT(config, "ieee4", 4, cbm_ieee488_devices, nullptr);
+ IEEE488_SLOT(config, "ieee8", 8, cbm_ieee488_devices, _default_drive);
+ IEEE488_SLOT(config, "ieee9", 9, cbm_ieee488_devices, nullptr);
+ IEEE488_SLOT(config, "ieee10", 10, cbm_ieee488_devices, nullptr);
+ IEEE488_SLOT(config, "ieee11", 11, cbm_ieee488_devices, nullptr);
+ IEEE488_SLOT(config, "ieee12", 12, cbm_ieee488_devices, nullptr);
+ IEEE488_SLOT(config, "ieee13", 13, cbm_ieee488_devices, nullptr);
+ IEEE488_SLOT(config, "ieee14", 14, cbm_ieee488_devices, nullptr);
+ IEEE488_SLOT(config, "ieee15", 15, cbm_ieee488_devices, nullptr);
+ IEEE488(config, IEEE488_TAG);
+ }
protected:
enum
{
@@ -208,8 +162,6 @@ private:
uint8_t m_dio;
};
-DECLARE_DEVICE_TYPE(IEEE488, ieee488_device)
-
// ======================> ieee488_slot_device
@@ -218,6 +170,16 @@ class ieee488_slot_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ ieee488_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, int address, T &&opts, char const *dflt)
+ : ieee488_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ set_address(address);
+ }
ieee488_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
static void add_cbm_slot(machine_config &config, const char *_tag, int _address, const char *_def_slot);
@@ -244,8 +206,6 @@ protected:
int m_address;
};
-DECLARE_DEVICE_TYPE(IEEE488_SLOT, ieee488_slot_device)
-
// ======================> device_ieee488_interface
@@ -280,10 +240,4 @@ private:
device_ieee488_interface *m_next;
};
-
-void cbm_ieee488_devices(device_slot_interface &device);
-void hp_ieee488_devices(device_slot_interface &device);
-void remote488_devices(device_slot_interface &device);
-
-
#endif // MAME_BUS_IEEE488_IEEE488_H
diff --git a/src/devices/bus/ieee488/softbox.cpp b/src/devices/bus/ieee488/softbox.cpp
index 0c26dded7a3..e2041d3e4e2 100644
--- a/src/devices/bus/ieee488/softbox.cpp
+++ b/src/devices/bus/ieee488/softbox.cpp
@@ -232,11 +232,12 @@ DEVICE_INPUT_DEFAULTS_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(softbox_device::device_add_mconfig)
+void softbox_device::device_add_mconfig(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(Z80_TAG, Z80, XTAL(8'000'000)/2)
- MCFG_DEVICE_PROGRAM_MAP(softbox_mem)
- MCFG_DEVICE_IO_MAP(softbox_io)
+ Z80(config, m_maincpu, XTAL(8'000'000)/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &softbox_device::softbox_mem);
+ m_maincpu->set_addrmap(AS_IO, &softbox_device::softbox_io);
// devices
i8251_device &i8251(I8251(config, I8251_TAG, 0));
@@ -264,17 +265,13 @@ MACHINE_CONFIG_START(softbox_device::device_add_mconfig)
m_dbrg->fr_handler().set(I8251_TAG, FUNC(i8251_device::write_rxc));
m_dbrg->ft_handler().set(I8251_TAG, FUNC(i8251_device::write_txc));
- MCFG_DEVICE_ADD(m_hdc, CORVUS_HDC, 0)
- MCFG_HARDDISK_ADD("harddisk1")
- MCFG_HARDDISK_INTERFACE("corvus_hdd")
- MCFG_HARDDISK_ADD("harddisk2")
- MCFG_HARDDISK_INTERFACE("corvus_hdd")
- MCFG_HARDDISK_ADD("harddisk3")
- MCFG_HARDDISK_INTERFACE("corvus_hdd")
- MCFG_HARDDISK_ADD("harddisk4")
- MCFG_HARDDISK_INTERFACE("corvus_hdd")
- //MCFG_IMI7000_BUS_ADD("imi5000h", nullptr, nullptr, nullptr)
-MACHINE_CONFIG_END
+ CORVUS_HDC(config, m_hdc, 0);
+ HARDDISK(config, "harddisk1", "corvus_hdd");
+ HARDDISK(config, "harddisk2", "corvus_hdd");
+ HARDDISK(config, "harddisk3", "corvus_hdd");
+ HARDDISK(config, "harddisk4", "corvus_hdd");
+ //imi7000_bus_device::add_config(config, "imi5000h", nullptr, nullptr, nullptr);
+}
//-------------------------------------------------
diff --git a/src/devices/bus/imi7000/imi7000.h b/src/devices/bus/imi7000/imi7000.h
index 0559a565285..38de3341ae5 100644
--- a/src/devices/bus/imi7000/imi7000.h
+++ b/src/devices/bus/imi7000/imi7000.h
@@ -31,8 +31,10 @@
#pragma once
+void imi7000_devices(device_slot_interface &device);
-
+DECLARE_DEVICE_TYPE(IMI7000_BUS, imi7000_bus_device)
+DECLARE_DEVICE_TYPE(IMI7000_SLOT, imi7000_slot_device)
//**************************************************************************
// CONSTANTS
@@ -43,23 +45,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_IMI7000_BUS_ADD(_def_slot1, _def_slot2, _def_slot3, _def_slot4) \
- MCFG_DEVICE_ADD(IMI7000_BUS_TAG, IMI7000_BUS, 0) \
- MCFG_DEVICE_ADD(IMI7000_BUS_TAG":0", IMI7000_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(imi7000_devices, _def_slot1, false) \
- MCFG_DEVICE_ADD(IMI7000_BUS_TAG":1", IMI7000_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(imi7000_devices, _def_slot2, false) \
- MCFG_DEVICE_ADD(IMI7000_BUS_TAG":2", IMI7000_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(imi7000_devices, _def_slot3, false) \
- MCFG_DEVICE_ADD(IMI7000_BUS_TAG":3", IMI7000_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(imi7000_devices, _def_slot4, false)
-
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -73,7 +58,17 @@ class imi7000_bus_device : public device_t
{
public:
// construction/destruction
- imi7000_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ imi7000_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+
+ template <typename T, typename U, typename V, typename W>
+ static void add_config(machine_config &config, T &&_def_slot1, U &&_def_slot2, V &&_def_slot3, W &&_def_slot4)
+ {
+ IMI7000_BUS(config, IMI7000_BUS_TAG);
+ IMI7000_SLOT(config, IMI7000_BUS_TAG":0", imi7000_devices, std::forward<T>(_def_slot1));
+ IMI7000_SLOT(config, IMI7000_BUS_TAG":1", imi7000_devices, std::forward<U>(_def_slot2));
+ IMI7000_SLOT(config, IMI7000_BUS_TAG":2", imi7000_devices, std::forward<V>(_def_slot3));
+ IMI7000_SLOT(config, IMI7000_BUS_TAG":3", imi7000_devices, std::forward<W>(_def_slot4));
+ }
protected:
// device-level overrides
@@ -90,6 +85,15 @@ class imi7000_slot_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ imi7000_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : imi7000_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
imi7000_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
@@ -113,13 +117,4 @@ protected:
imi7000_slot_device *m_slot;
};
-
-// device type definition
-DECLARE_DEVICE_TYPE(IMI7000_BUS, imi7000_bus_device)
-DECLARE_DEVICE_TYPE(IMI7000_SLOT, imi7000_slot_device)
-
-
-// slot interface
-void imi7000_devices(device_slot_interface &device);
-
#endif // MAME_BUS_IMI7000_IMI7000_H
diff --git a/src/devices/bus/kc/d002.cpp b/src/devices/bus/kc/d002.cpp
index 24a361a8f2d..03dc9fb8f3b 100644
--- a/src/devices/bus/kc/d002.cpp
+++ b/src/devices/bus/kc/d002.cpp
@@ -109,40 +109,36 @@ void kc_d002_device::device_reset()
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(kc_d002_device::device_add_mconfig)
- MCFG_DEVICE_ADD("m0", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, nullptr, false)
- MCFG_KCCART_SLOT_NEXT_SLOT("m4")
- MCFG_KCCART_SLOT_OUT_IRQ_CB(WRITELINE(*this, kc_d002_device, out_irq_w))
- MCFG_KCCART_SLOT_OUT_NMI_CB(WRITELINE(*this, kc_d002_device, out_nmi_w))
- MCFG_KCCART_SLOT_OUT_HALT_CB(WRITELINE(*this, kc_d002_device, out_halt_w))
- MCFG_DEVICE_ADD("m4", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, nullptr, false)
- MCFG_KCCART_SLOT_NEXT_SLOT("m8")
- MCFG_KCCART_SLOT_OUT_IRQ_CB(WRITELINE(*this, kc_d002_device, out_irq_w))
- MCFG_KCCART_SLOT_OUT_NMI_CB(WRITELINE(*this, kc_d002_device, out_nmi_w))
- MCFG_KCCART_SLOT_OUT_HALT_CB(WRITELINE(*this, kc_d002_device, out_halt_w))
- MCFG_DEVICE_ADD("m8", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, nullptr, false)
- MCFG_KCCART_SLOT_NEXT_SLOT("mc")
- MCFG_KCCART_SLOT_OUT_IRQ_CB(WRITELINE(*this, kc_d002_device, out_irq_w))
- MCFG_KCCART_SLOT_OUT_NMI_CB(WRITELINE(*this, kc_d002_device, out_nmi_w))
- MCFG_KCCART_SLOT_OUT_HALT_CB(WRITELINE(*this, kc_d002_device, out_halt_w))
- MCFG_DEVICE_ADD("mc", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, nullptr, false)
- MCFG_KCCART_SLOT_NEXT_SLOT("exp")
- MCFG_KCCART_SLOT_OUT_IRQ_CB(WRITELINE(*this, kc_d002_device, out_irq_w))
- MCFG_KCCART_SLOT_OUT_NMI_CB(WRITELINE(*this, kc_d002_device, out_nmi_w))
- MCFG_KCCART_SLOT_OUT_HALT_CB(WRITELINE(*this, kc_d002_device, out_halt_w))
+void kc_d002_device::device_add_mconfig(machine_config &config)
+{
+ KCCART_SLOT(config, m_expansions[0], kc85_cart, nullptr);
+ m_expansions[0]->set_next_slot("m4");
+ m_expansions[0]->irq().set(FUNC(kc_d002_device::out_irq_w));
+ m_expansions[0]->nmi().set(FUNC(kc_d002_device::out_nmi_w));
+ m_expansions[0]->halt().set(FUNC(kc_d002_device::out_halt_w));
+ KCCART_SLOT(config, m_expansions[1], kc85_cart, nullptr);
+ m_expansions[1]->set_next_slot("m8");
+ m_expansions[1]->irq().set(FUNC(kc_d002_device::out_irq_w));
+ m_expansions[1]->nmi().set(FUNC(kc_d002_device::out_nmi_w));
+ m_expansions[1]->halt().set(FUNC(kc_d002_device::out_halt_w));
+ KCCART_SLOT(config, m_expansions[2], kc85_cart, nullptr);
+ m_expansions[2]->set_next_slot("mc");
+ m_expansions[2]->irq().set(FUNC(kc_d002_device::out_irq_w));
+ m_expansions[2]->nmi().set(FUNC(kc_d002_device::out_nmi_w));
+ m_expansions[2]->halt().set(FUNC(kc_d002_device::out_halt_w));
+ KCCART_SLOT(config, m_expansions[3], kc85_cart, nullptr);
+ m_expansions[3]->set_next_slot("exp");
+ m_expansions[3]->irq().set(FUNC(kc_d002_device::out_irq_w));
+ m_expansions[3]->nmi().set(FUNC(kc_d002_device::out_nmi_w));
+ m_expansions[3]->halt().set(FUNC(kc_d002_device::out_halt_w));
// expansion interface
- MCFG_DEVICE_ADD("exp", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_exp, nullptr, false)
- MCFG_KCEXP_SLOT_NEXT_SLOT(nullptr)
- MCFG_KCEXP_SLOT_OUT_IRQ_CB(WRITELINE(*this, kc_d002_device, out_irq_w))
- MCFG_KCEXP_SLOT_OUT_NMI_CB(WRITELINE(*this, kc_d002_device, out_nmi_w))
- MCFG_KCEXP_SLOT_OUT_HALT_CB(WRITELINE(*this, kc_d002_device, out_halt_w))
-MACHINE_CONFIG_END
+ KCCART_SLOT(config, m_expansions[4], kc85_exp, nullptr);
+ m_expansions[4]->set_next_slot(nullptr);
+ m_expansions[4]->irq().set(FUNC(kc_d002_device::out_irq_w));
+ m_expansions[4]->nmi().set(FUNC(kc_d002_device::out_nmi_w));
+ m_expansions[4]->halt().set(FUNC(kc_d002_device::out_halt_w));
+}
//-------------------------------------------------
// input_ports - device-specific input ports
diff --git a/src/devices/bus/kc/kc.h b/src/devices/bus/kc/kc.h
index 0689169c5ee..0c14a8ef5d3 100644
--- a/src/devices/bus/kc/kc.h
+++ b/src/devices/bus/kc/kc.h
@@ -48,12 +48,21 @@ class kcexp_slot_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ kcexp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : kcexp_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
kcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~kcexp_slot_device();
- template <class Object> devcb_base &set_out_irq_callback(Object &&cb) { return m_out_irq_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_nmi_callback(Object &&cb) { return m_out_nmi_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_halt_callback(Object &&cb) { return m_out_halt_cb.set_callback(std::forward<Object>(cb)); }
+ auto irq() { return m_out_irq_cb.bind(); }
+ auto nmi() { return m_out_nmi_cb.bind(); }
+ auto halt() { return m_out_halt_cb.bind(); }
// inline configuration
void set_next_slot(const char *next_module_tag) { m_next_slot_tag = next_module_tag; }
@@ -91,6 +100,15 @@ class kccart_slot_device : public kcexp_slot_device,
{
public:
// construction/destruction
+ template <typename T>
+ kccart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : kccart_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
kccart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~kccart_slot_device();
@@ -115,42 +133,4 @@ public:
DECLARE_DEVICE_TYPE(KCEXP_SLOT, kcexp_slot_device)
DECLARE_DEVICE_TYPE(KCCART_SLOT, kccart_slot_device)
-
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-
-#define MCFG_KCEXP_SLOT_OUT_IRQ_CB(_devcb) \
- downcast<kcexp_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
-
-#define MCFG_KCEXP_SLOT_OUT_NMI_CB(_devcb) \
- downcast<kcexp_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
-
-#define MCFG_KCEXP_SLOT_OUT_HALT_CB(_devcb) \
- downcast<kcexp_slot_device &>(*device).set_out_halt_callback(DEVCB_##_devcb);
-
-#define MCFG_KCEXP_SLOT_NEXT_SLOT(_next_slot_tag) \
- downcast<kcexp_slot_device &>(*device).set_next_slot(_next_slot_tag);
-
-
-#define MCFG_KCCART_SLOT_OUT_IRQ_CB(_devcb) \
- downcast<kccart_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
-
-#define MCFG_KCCART_SLOT_OUT_NMI_CB(_devcb) \
- downcast<kccart_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
-
-#define MCFG_KCCART_SLOT_OUT_HALT_CB(_devcb) \
- downcast<kccart_slot_device &>(*device).set_out_halt_callback(DEVCB_##_devcb);
-
-#define MCFG_KCCART_SLOT_NEXT_SLOT(_next_slot_tag) \
- downcast<kccart_slot_device &>(*device).set_next_slot(_next_slot_tag);
-
-// #define MCFG_KC85_EXPANSION_ADD(_tag,_next_slot_tag,_config,_slot_intf,_def_slot)
-// MCFG_DEVICE_ADD(_tag, KCEXP_SLOT, 0)
-// MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-// #define MCFG_KC85_CARTRIDGE_ADD(_tag,_next_slot_tag,_config,_slot_intf,_def_slot)
-// MCFG_DEVICE_ADD(_tag, KCCART_SLOT, 0)
-// MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
#endif // MAME_BUS_KC_KC_H
diff --git a/src/devices/bus/nasbus/nasbus.h b/src/devices/bus/nasbus/nasbus.h
index 8a0a1d3775f..4968f8d966b 100644
--- a/src/devices/bus/nasbus/nasbus.h
+++ b/src/devices/bus/nasbus/nasbus.h
@@ -102,22 +102,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_NASBUS_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, NASBUS, 0)
-
-#define MCFG_NASBUS_SLOT_ADD(_tag, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, NASBUS_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
- downcast<nasbus_slot_device &>(*device).set_nasbus_slot(this, NASBUS_TAG);
-
-#define MCFG_NASBUS_RAM_DISABLE_HANDLER(_devcb) \
- downcast<nasbus_device &>(*device).set_ram_disable_handler(DEVCB_##_devcb);
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -130,6 +114,16 @@ class nasbus_slot_device : public device_t, public device_slot_interface
{
public:
// construction/destruction
+ template <typename T>
+ nasbus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : nasbus_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ set_nasbus_slot(this, NASBUS_TAG);
+ }
nasbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration
void set_nasbus_slot(device_t *owner, const char *nasbus_tag) { m_owner = owner; m_nasbus_tag = nasbus_tag; }
@@ -154,10 +148,10 @@ class nasbus_device : public device_t
friend class device_nasbus_card_interface;
public:
// construction/destruction
- nasbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ nasbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~nasbus_device();
- template <class Object> devcb_base &set_ram_disable_handler(Object &&cb) { return m_ram_disable_handler.set_callback(std::forward<Object>(cb)); }
+ auto ram_disable() { return m_ram_disable_handler.bind(); }
void add_card(device_nasbus_card_interface *card);
diff --git a/src/devices/bus/s100/s100.h b/src/devices/bus/s100/s100.h
index 6336be291e4..ed97700bf5f 100644
--- a/src/devices/bus/s100/s100.h
+++ b/src/devices/bus/s100/s100.h
@@ -68,68 +68,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_S100_SLOT_ADD(_tag, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, S100_SLOT, DERIVED_CLOCK(1, 1)) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-
-#define MCFG_S100_IRQ_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_NMI_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_VI0_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_vi0_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_VI1_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_vi1_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_VI2_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_vi2_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_VI3_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_vi3_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_VI4_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_vi4_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_VI5_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_vi5_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_VI6_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_vi6_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_VI7_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_vi7_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_DMA0_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_dma0_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_DMA1_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_dma1_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_DMA2_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_dma2_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_DMA3_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_dma3_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_RDY_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_rdy_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_HOLD_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_hold_wr_callback(DEVCB_##_write);
-
-#define MCFG_S100_ERROR_CALLBACK(_write) \
- downcast<s100_bus_device &>(*device).set_error_wr_callback(DEVCB_##_write);
-
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -201,23 +139,23 @@ public:
s100_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~s100_bus_device() { m_device_list.detach_all(); }
- template <class Object> devcb_base &set_irq_wr_callback(Object &&cb) { return m_write_irq.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_nmi_wr_callback(Object &&cb) { return m_write_nmi.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_vi0_wr_callback(Object &&cb) { return m_write_vi0.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_vi1_wr_callback(Object &&cb) { return m_write_vi1.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_vi2_wr_callback(Object &&cb) { return m_write_vi2.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_vi3_wr_callback(Object &&cb) { return m_write_vi3.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_vi4_wr_callback(Object &&cb) { return m_write_vi4.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_vi5_wr_callback(Object &&cb) { return m_write_vi5.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_vi6_wr_callback(Object &&cb) { return m_write_vi6.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_vi7_wr_callback(Object &&cb) { return m_write_vi7.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_dma0_wr_callback(Object &&cb) { return m_write_dma0.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_dma1_wr_callback(Object &&cb) { return m_write_dma1.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_dma2_wr_callback(Object &&cb) { return m_write_dma2.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_dma3_wr_callback(Object &&cb) { return m_write_dma3.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_rdy_wr_callback(Object &&cb) { return m_write_rdy.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_hold_wr_callback(Object &&cb) { return m_write_hold.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_error_wr_callback(Object &&cb) { return m_write_error.set_callback(std::forward<Object>(cb)); }
+ auto irq() { return m_write_irq.bind(); }
+ auto nmi() { return m_write_nmi.bind(); }
+ auto vi0() { return m_write_vi0.bind(); }
+ auto vi1() { return m_write_vi1.bind(); }
+ auto vi2() { return m_write_vi2.bind(); }
+ auto vi3() { return m_write_vi3.bind(); }
+ auto vi4() { return m_write_vi4.bind(); }
+ auto vi5() { return m_write_vi5.bind(); }
+ auto vi6() { return m_write_vi6.bind(); }
+ auto vi7() { return m_write_vi7.bind(); }
+ auto dma0() { return m_write_dma0.bind(); }
+ auto dma1() { return m_write_dma1.bind(); }
+ auto dma2() { return m_write_dma2.bind(); }
+ auto dma3() { return m_write_dma3.bind(); }
+ auto rdy() { return m_write_rdy.bind(); }
+ auto hold() { return m_write_hold.bind(); }
+ auto error() { return m_write_error.bind(); }
void add_card(device_s100_card_interface *card);
@@ -279,6 +217,15 @@ class s100_slot_device : public device_t, public device_slot_interface
{
public:
// construction/destruction
+ template <typename T>
+ s100_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : s100_slot_device(mconfig, tag, owner, DERIVED_CLOCK(1, 1))
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
s100_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
diff --git a/src/devices/bus/vsmile/rom.cpp b/src/devices/bus/vsmile/rom.cpp
index 49740bc7f37..584a8cfe058 100644
--- a/src/devices/bus/vsmile/rom.cpp
+++ b/src/devices/bus/vsmile/rom.cpp
@@ -49,10 +49,12 @@ vsmile_rom_nvram_device::vsmile_rom_nvram_device(const machine_config &mconfig,
void vsmile_rom_device::device_start()
{
+ save_item(NAME(m_bank_offset));
}
void vsmile_rom_device::device_reset()
{
+ m_bank_offset = 0;
}
@@ -73,3 +75,12 @@ WRITE16_MEMBER(vsmile_rom_nvram_device::bank2_w)
if (!m_nvram.empty() && offset < m_nvram.size())
COMBINE_DATA(&m_nvram[offset]);
}
+
+/*-------------------------------------------------
+ CS2 bankswitching
+ -------------------------------------------------*/
+
+void vsmile_rom_device::set_cs2(bool cs2)
+{
+ m_bank_offset = cs2 ? 0x400000 : 0x000000;
+}
diff --git a/src/devices/bus/vsmile/rom.h b/src/devices/bus/vsmile/rom.h
index 5d93cb64109..ec39f1f743e 100644
--- a/src/devices/bus/vsmile/rom.h
+++ b/src/devices/bus/vsmile/rom.h
@@ -16,10 +16,13 @@ public:
vsmile_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
- virtual DECLARE_READ16_MEMBER(bank0_r) override { return m_rom[0x000000 + offset]; }
- virtual DECLARE_READ16_MEMBER(bank1_r) override { return m_rom[0x100000 + offset]; }
- virtual DECLARE_READ16_MEMBER(bank2_r) override { return m_rom[0x200000 + offset]; }
- virtual DECLARE_READ16_MEMBER(bank3_r) override { return m_rom[0x300000 + offset]; }
+ virtual DECLARE_READ16_MEMBER(bank0_r) override { return m_rom[m_bank_offset + 0x000000 + offset]; }
+ virtual DECLARE_READ16_MEMBER(bank1_r) override { return m_rom[m_bank_offset + 0x100000 + offset]; }
+ virtual DECLARE_READ16_MEMBER(bank2_r) override { return m_rom[m_bank_offset + 0x200000 + offset]; }
+ virtual DECLARE_READ16_MEMBER(bank3_r) override { return m_rom[m_bank_offset + 0x300000 + offset]; }
+
+ // banking
+ virtual void set_cs2(bool cs2) override;
protected:
vsmile_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
@@ -27,6 +30,8 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
+
+ uint32_t m_bank_offset;
};
diff --git a/src/devices/bus/vsmile/vsmile_slot.cpp b/src/devices/bus/vsmile/vsmile_slot.cpp
index f413a9aeb7e..e7b8546ea20 100644
--- a/src/devices/bus/vsmile/vsmile_slot.cpp
+++ b/src/devices/bus/vsmile/vsmile_slot.cpp
@@ -50,7 +50,7 @@ void device_vsmile_cart_interface::rom_alloc(uint32_t size, const char *tag)
if (m_rom == nullptr)
{
// We always alloc 8MB of ROM region
- m_rom = (uint16_t *)device().machine().memory().region_alloc(std::string(tag).append(VSMILE_SLOT_ROM_REGION_TAG).c_str(), 0x800000, 2, ENDIANNESS_BIG)->base();
+ m_rom = (uint16_t *)device().machine().memory().region_alloc(std::string(tag).append(VSMILE_SLOT_ROM_REGION_TAG).c_str(), size, 2, ENDIANNESS_BIG)->base();
m_rom_size = size;
}
}
@@ -138,9 +138,9 @@ image_init_result vsmile_cart_slot_device::call_load()
if (m_cart)
{
uint32_t size = loaded_through_softlist() ? get_software_region_length("rom") : length();
- if (size > 0x800000)
+ if (size > 0x1000000)
{
- seterror(IMAGE_ERROR_UNSPECIFIED, "Attempted loading a cart larger than 8MB");
+ seterror(IMAGE_ERROR_UNSPECIFIED, "Attempted loading a cart larger than 16MB");
return image_init_result::FAIL;
}
@@ -205,7 +205,7 @@ std::string vsmile_cart_slot_device::get_default_card_software(get_default_card_
/*-------------------------------------------------
- read
+ cart accessors
-------------------------------------------------*/
READ16_MEMBER(vsmile_cart_slot_device::bank0_r)
@@ -228,11 +228,6 @@ READ16_MEMBER(vsmile_cart_slot_device::bank3_r)
return m_cart->bank3_r(space, offset, mem_mask);
}
-
-/*-------------------------------------------------
- write
- -------------------------------------------------*/
-
WRITE16_MEMBER(vsmile_cart_slot_device::bank0_w)
{
m_cart->bank0_w(space, offset, data, mem_mask);
@@ -252,3 +247,8 @@ WRITE16_MEMBER(vsmile_cart_slot_device::bank3_w)
{
m_cart->bank3_w(space, offset, data, mem_mask);
}
+
+void vsmile_cart_slot_device::set_cs2(bool cs2)
+{
+ m_cart->set_cs2(cs2);
+} \ No newline at end of file
diff --git a/src/devices/bus/vsmile/vsmile_slot.h b/src/devices/bus/vsmile/vsmile_slot.h
index b50af088027..7d800677214 100644
--- a/src/devices/bus/vsmile/vsmile_slot.h
+++ b/src/devices/bus/vsmile/vsmile_slot.h
@@ -33,10 +33,13 @@ public:
virtual DECLARE_READ16_MEMBER(bank1_r) { return 0; }
virtual DECLARE_READ16_MEMBER(bank2_r) { return 0; }
virtual DECLARE_READ16_MEMBER(bank3_r) { return 0; }
- virtual DECLARE_WRITE16_MEMBER(bank0_w) { printf("0 %08x = %04x\n", offset, data); }
- virtual DECLARE_WRITE16_MEMBER(bank1_w) { printf("1 %08x = %04x\n", offset, data); }
- virtual DECLARE_WRITE16_MEMBER(bank2_w) { printf("2 %08x = %04x\n", offset, data); }
- virtual DECLARE_WRITE16_MEMBER(bank3_w) { printf("3 %08x = %04x\n", offset, data); }
+ virtual DECLARE_WRITE16_MEMBER(bank0_w) { }
+ virtual DECLARE_WRITE16_MEMBER(bank1_w) { }
+ virtual DECLARE_WRITE16_MEMBER(bank2_w) { }
+ virtual DECLARE_WRITE16_MEMBER(bank3_w) { }
+
+ // banking
+ virtual void set_cs2(bool cs2) = 0;
void rom_alloc(uint32_t size, const char *tag);
void nvram_alloc(uint32_t size);
@@ -111,6 +114,9 @@ public:
virtual DECLARE_WRITE16_MEMBER(bank2_w);
virtual DECLARE_WRITE16_MEMBER(bank3_w);
+ // banking
+ void set_cs2(bool cs2);
+
protected:
int m_type;
device_vsmile_cart_interface* m_cart;
diff --git a/src/devices/cpu/mips/r4000.cpp b/src/devices/cpu/mips/r4000.cpp
index 7fb28b10dce..b42180ae7e5 100644
--- a/src/devices/cpu/mips/r4000.cpp
+++ b/src/devices/cpu/mips/r4000.cpp
@@ -1610,15 +1610,15 @@ void r4000_base_device::cp0_update_timer(bool start)
if (start || m_cp0_timer->enabled())
{
u32 const count = (total_cycles() - m_cp0_timer_zero) / 2;
- u64 const delta = m_cp0[CP0_Compare] - count;
+ u32 const delta = m_cp0[CP0_Compare] - count;
- m_cp0_timer->adjust(cycles_to_attotime(delta * 2));
+ m_cp0_timer->adjust(cycles_to_attotime(u64(delta) * 2));
}
}
TIMER_CALLBACK_MEMBER(r4000_base_device::cp0_timer_callback)
{
- set_input_line(5, ASSERT_LINE);
+ m_cp0[CP0_Cause] |= CAUSE_IPEX5;
}
void r4000_base_device::cp0_mode_check()
@@ -2737,7 +2737,7 @@ r4000_base_device::translate_t r4000_base_device::translate(int intention, u64 &
// remember the last-used tlb entry
m_last[intention & TRANSLATE_TYPE_MASK] = index;
- return (pfn & EL_C) == C_2 ? UNCACHED : CACHED;
+ return ((pfn & EL_C) == C_2) ? UNCACHED : CACHED;
}
// tlb miss, invalid entry, or a store to a non-dirty entry
diff --git a/src/devices/imagedev/harddriv.h b/src/devices/imagedev/harddriv.h
index 92a6b733275..7b71d13d2c7 100644
--- a/src/devices/imagedev/harddriv.h
+++ b/src/devices/imagedev/harddriv.h
@@ -25,6 +25,11 @@ class harddisk_image_device : public device_t,
{
public:
// construction/destruction
+ harddisk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intf)
+ : harddisk_image_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ set_interface(intf);
+ }
harddisk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~harddisk_image_device();
diff --git a/src/devices/machine/adc0808.cpp b/src/devices/machine/adc0808.cpp
index 5f8aeb8f93c..11aafe276fb 100644
--- a/src/devices/machine/adc0808.cpp
+++ b/src/devices/machine/adc0808.cpp
@@ -156,7 +156,7 @@ void adc0808_device::device_timer(emu_timer &timer, device_timer_id id, int para
// INTERFACE
//**************************************************************************
-READ8_MEMBER( adc0808_device::data_r )
+u8 adc0808_device::data_r()
{
if (!machine().side_effects_disabled())
{
@@ -170,7 +170,7 @@ READ8_MEMBER( adc0808_device::data_r )
return m_sar;
}
-WRITE8_MEMBER( adc0808_device::address_w )
+void adc0808_device::address_w(u8 data)
{
m_address = data & 7;
}
@@ -198,22 +198,22 @@ READ_LINE_MEMBER( adc0808_device::eoc_r )
return m_eoc;
}
-WRITE8_MEMBER( adc0808_device::address_offset_start_w )
+void adc0808_device::address_offset_start_w(offs_t offset, u8 data)
{
if (VERBOSE)
logerror("address_offset_start_w %02x %02x\n", offset, data);
start_w(1);
- address_w(space, 0, offset);
+ address_w(offset);
start_w(0);
}
-WRITE8_MEMBER( adc0808_device::address_data_start_w )
+void adc0808_device::address_data_start_w(u8 data)
{
if (VERBOSE)
- logerror("address_data_start_w %02x %02x\n", offset, data);
+ logerror("address_data_start_w %02x\n", data);
start_w(1);
- address_w(space, 0, data);
+ address_w(data);
start_w(0);
}
diff --git a/src/devices/machine/adc0808.h b/src/devices/machine/adc0808.h
index 46943998dca..1fa97aff47e 100644
--- a/src/devices/machine/adc0808.h
+++ b/src/devices/machine/adc0808.h
@@ -51,14 +51,14 @@ public:
auto eoc_ff_callback() { return m_eoc_ff_cb.bind(); }
template <std::size_t Bit> auto in_callback() { return m_in_cb[Bit].bind(); }
- DECLARE_READ8_MEMBER(data_r);
- DECLARE_WRITE8_MEMBER(address_w);
+ u8 data_r();
+ void address_w(u8 data);
DECLARE_WRITE_LINE_MEMBER(start_w);
DECLARE_READ_LINE_MEMBER(eoc_r);
// common hookups
- DECLARE_WRITE8_MEMBER(address_offset_start_w); // start and ale connected, address to the address bus
- DECLARE_WRITE8_MEMBER(address_data_start_w); // start and ale connected, address to the data bus
+ void address_offset_start_w(offs_t offset, u8 data); // start and ale connected, address to the address bus
+ void address_data_start_w(u8 data); // start and ale connected, address to the data bus
protected:
adc0808_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/machine/adc0844.cpp b/src/devices/machine/adc0844.cpp
index 103702a8d14..c3616035927 100644
--- a/src/devices/machine/adc0844.cpp
+++ b/src/devices/machine/adc0844.cpp
@@ -182,14 +182,14 @@ void adc0848_device::device_timer(emu_timer &timer, device_timer_id id, int para
// INTERFACE
//**************************************************************************
-READ8_MEMBER( adc0844_device::read )
+u8 adc0844_device::read()
{
m_intr_cb(CLEAR_LINE);
return m_result;
}
-WRITE8_MEMBER( adc0844_device::write )
+void adc0844_device::write(u8 data)
{
m_intr_cb(CLEAR_LINE);
@@ -198,7 +198,7 @@ WRITE8_MEMBER( adc0844_device::write )
m_conversion_timer->adjust(attotime::from_usec(40));
}
-WRITE8_MEMBER( adc0848_device::write )
+void adc0848_device::write(u8 data)
{
m_intr_cb(CLEAR_LINE);
diff --git a/src/devices/machine/adc0844.h b/src/devices/machine/adc0844.h
index d20d9697a09..51dff681f16 100644
--- a/src/devices/machine/adc0844.h
+++ b/src/devices/machine/adc0844.h
@@ -43,8 +43,8 @@ public:
auto ch3_callback() { return m_ch3_cb.bind(); }
auto ch4_callback() { return m_ch4_cb.bind(); }
- DECLARE_READ8_MEMBER(read);
- virtual DECLARE_WRITE8_MEMBER(write);
+ u8 read();
+ virtual void write(u8 data);
protected:
adc0844_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
@@ -78,7 +78,7 @@ public:
auto ch7_callback() { return m_ch7_cb.bind(); }
auto ch8_callback() { return m_ch8_cb.bind(); }
- virtual DECLARE_WRITE8_MEMBER(write) override;
+ virtual void write(u8 data) override;
protected:
// device-level overrides
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp
index 6795dcb9d6a..fc76132a731 100644
--- a/src/devices/machine/netlist.cpp
+++ b/src/devices/machine/netlist.cpp
@@ -301,7 +301,7 @@ public:
{
int pos = (upto - m_last_buffer_time) / m_sample_time;
if (pos > m_bufsize)
- state().log().fatal("sound {1}: pos {2} exceeded bufsize {3}\n", name().c_str(), pos, m_bufsize);
+ throw emu_fatalerror("sound %s: pos %d exceeded bufsize %d\n", name().c_str(), pos, m_bufsize);
while (m_last_pos < pos )
{
m_buffer[m_last_pos++] = (stream_sample_t) m_cur;
@@ -1050,10 +1050,8 @@ ATTR_COLD uint64_t netlist_mame_cpu_device::execute_cycles_to_clocks(uint64_t cy
ATTR_HOT void netlist_mame_cpu_device::execute_run()
{
- bool check_debugger = ((device_t::machine().debug_flags & DEBUG_FLAG_ENABLED) != 0);
- // debugging
//m_ppc = m_pc; // copy PC to previous PC
- if (check_debugger)
+ if (debugger_enabled())
{
while (m_icount > 0)
{
diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h
index d79e9e298c2..06edb4beaa4 100644
--- a/src/devices/machine/netlist.h
+++ b/src/devices/machine/netlist.h
@@ -109,7 +109,6 @@ public:
ATTR_HOT inline netlist::setup_t &setup();
ATTR_HOT inline netlist_mame_t &netlist() { return *m_netlist; }
- ATTR_HOT inline const netlist::netlist_time last_time_update() { return m_old; }
ATTR_HOT void update_icount(netlist::netlist_time time);
ATTR_HOT void check_mame_abort_slice();
diff --git a/src/devices/machine/spg2xx.cpp b/src/devices/machine/spg2xx.cpp
index a5fef62486d..f03c3e4eb25 100644
--- a/src/devices/machine/spg2xx.cpp
+++ b/src/devices/machine/spg2xx.cpp
@@ -45,7 +45,7 @@ DEFINE_DEVICE_TYPE(SPG28X, spg28x_device, "spg28x", "SPG280-series System-on-a-C
#define LOG_SIO (1U << 26)
#define LOG_EXT_MEM (1U << 27)
#define LOG_EXTINT (1U << 28)
-#define LOG_IO (LOG_IO_READS | LOG_IO_WRITES | LOG_IRQS | LOG_GPIO | LOG_UART | LOG_I2C | LOG_DMA | LOG_TIMERS | LOG_UNKNOWN_IO)
+#define LOG_IO (LOG_IO_READS | LOG_IO_WRITES | LOG_IRQS | LOG_GPIO | LOG_UART | LOG_I2C | LOG_DMA | LOG_TIMERS | LOG_EXTINT | LOG_UNKNOWN_IO)
#define LOG_CHANNELS (LOG_CHANNEL_READS | LOG_CHANNEL_WRITES)
#define LOG_SPU (LOG_SPU_READS | LOG_SPU_WRITES | LOG_UNKNOWN_SPU | LOG_CHANNEL_READS | LOG_CHANNEL_WRITES \
| LOG_ENVELOPES | LOG_SAMPLES | LOG_RAMPDOWN | LOG_BEAT)
@@ -1587,6 +1587,11 @@ WRITE16_MEMBER(spg2xx_device::io_w)
const uint16_t old = IO_IRQ_STATUS;
IO_IRQ_STATUS &= ~data;
const uint16_t changed = (old & IO_IRQ_ENABLE) ^ (IO_IRQ_STATUS & IO_IRQ_ENABLE);
+ if (m_uart_rx_irq || m_uart_tx_irq)
+ {
+ LOGMASKED(LOG_IRQS | LOG_UART, "Re-setting UART IRQ due to still-unacknowledged Rx or Tx.\n");
+ IO_IRQ_STATUS |= 0x0100;
+ }
if (changed)
check_irqs(changed);
break;
@@ -2033,19 +2038,24 @@ void spg2xx_device::extint_w(int channel, bool state)
m_extint[channel] = state;
if (old != state)
{
- LOGMASKED(LOG_EXTINT, "extint state changed, so %sing interrupt\n", state ? "rais" : "lower");
- const uint16_t mask = (channel == 0) ? 0x0200 : 0x1000;
- const uint16_t old_irq = IO_IRQ_STATUS;
- if (state)
- IO_IRQ_STATUS |= mask;
- else
- IO_IRQ_STATUS &= ~mask;
+ check_extint_irq(channel);
+ }
+}
- if (old_irq != IO_IRQ_STATUS)
- {
- LOGMASKED(LOG_EXTINT, "extint IRQ changed, so checking interrupts\n");
- check_irqs(mask);
- }
+void spg2xx_device::check_extint_irq(int channel)
+{
+ LOGMASKED(LOG_EXTINT, "%sing extint %d interrupt\n", m_extint[channel] ? "rais" : "lower", channel + 1);
+ const uint16_t mask = (channel == 0) ? 0x0200 : 0x1000;
+ const uint16_t old_irq = IO_IRQ_STATUS;
+ if (m_extint[channel])
+ IO_IRQ_STATUS |= mask;
+ else
+ IO_IRQ_STATUS &= ~mask;
+
+ if (old_irq != IO_IRQ_STATUS)
+ {
+ LOGMASKED(LOG_EXTINT, "extint IRQ changed, so checking interrupts\n");
+ check_irqs(mask);
}
}
diff --git a/src/devices/machine/spg2xx.h b/src/devices/machine/spg2xx.h
index e8a006dc273..93b689a1ef9 100644
--- a/src/devices/machine/spg2xx.h
+++ b/src/devices/machine/spg2xx.h
@@ -384,6 +384,7 @@ protected:
virtual DECLARE_READ16_MEMBER(io_r);
virtual DECLARE_WRITE16_MEMBER(io_w);
+ void check_extint_irq(int channel);
void check_irqs(const uint16_t changed);
inline void check_video_irq();
diff --git a/src/devices/sound/rf5c68.cpp b/src/devices/sound/rf5c68.cpp
index 2af393c884b..9ec522b7d92 100644
--- a/src/devices/sound/rf5c68.cpp
+++ b/src/devices/sound/rf5c68.cpp
@@ -189,7 +189,7 @@ void rf5c68_device::sound_stream_update(sound_stream &stream, stream_sample_t **
// RF5C68 write register
//-------------------------------------------------
-READ8_MEMBER( rf5c68_device::rf5c68_r )
+u8 rf5c68_device::rf5c68_r(offs_t offset)
{
uint8_t shift;
@@ -201,7 +201,7 @@ READ8_MEMBER( rf5c68_device::rf5c68_r )
return (m_chan[(offset & 0x0e) >> 1].addr) >> (shift);
}
-WRITE8_MEMBER( rf5c68_device::rf5c68_w )
+void rf5c68_device::rf5c68_w(offs_t offset, u8 data)
{
pcm_channel &chan = m_chan[m_cbank];
int i;
@@ -266,7 +266,7 @@ WRITE8_MEMBER( rf5c68_device::rf5c68_w )
// RF5C68 read memory
//-------------------------------------------------
-READ8_MEMBER( rf5c68_device::rf5c68_mem_r )
+u8 rf5c68_device::rf5c68_mem_r(offs_t offset)
{
return m_cache->read_byte(m_wbank | offset);
}
@@ -276,7 +276,7 @@ READ8_MEMBER( rf5c68_device::rf5c68_mem_r )
// RF5C68 write memory
//-------------------------------------------------
-WRITE8_MEMBER( rf5c68_device::rf5c68_mem_w )
+void rf5c68_device::rf5c68_mem_w(offs_t offset, u8 data)
{
m_data->write_byte(m_wbank | offset, data);
}
diff --git a/src/devices/sound/rf5c68.h b/src/devices/sound/rf5c68.h
index 056d2c9c99c..262efb54286 100644
--- a/src/devices/sound/rf5c68.h
+++ b/src/devices/sound/rf5c68.h
@@ -38,11 +38,11 @@ public:
set_end_callback(sample_end_cb_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
}
- DECLARE_READ8_MEMBER( rf5c68_r );
- DECLARE_WRITE8_MEMBER( rf5c68_w );
+ u8 rf5c68_r(offs_t offset);
+ void rf5c68_w(offs_t offset, u8 data);
- DECLARE_READ8_MEMBER( rf5c68_mem_r );
- DECLARE_WRITE8_MEMBER( rf5c68_mem_w );
+ u8 rf5c68_mem_r(offs_t offset);
+ void rf5c68_mem_w(offs_t offset, u8 data);
protected:
rf5c68_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
diff --git a/src/devices/video/crt9028.cpp b/src/devices/video/crt9028.cpp
new file mode 100644
index 00000000000..342449a54d5
--- /dev/null
+++ b/src/devices/video/crt9028.cpp
@@ -0,0 +1,220 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/**********************************************************************
+
+ Standard Microsystems CRT9028/9128 Video Terminal Logic Controller
+
+ The CRT 9028 and CRT 9128 are single-chip terminal-oriented video
+ processors. The two differ from each other in their bus protocol
+ for accessing the address, data and status registers: the 9028 has
+ separate RD and WR strobes for an 8051 or similar microcontroller,
+ while the 9128 replaces these with DS and R/W inputs that are more
+ Z8-oriented. A separate address/data bus connects to a 2Kx8 static
+ RAM or similar as display memory.
+
+ The internal 128-character set is mask-programmed, as are all
+ screen timings, with alternate vertical timings to allow operation
+ at either 60 Hz or 50 Hz. Mask parameters also determine the
+ polarity of the sync signals, the positioning of the underline
+ attribute and cursor and the dot patterns used for 6-segment wide
+ (block) graphics and 4-segment thin (line) graphics.
+
+ TODO: implement timing and display functions
+
+**********************************************************************/
+
+#include "emu.h"
+#include "video/crt9028.h"
+#include "screen.h"
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+// device type definition
+DEFINE_DEVICE_TYPE(CRT9028_000, crt9028_000_device, "crt9028_000", "CRT9028-000 VTLC")
+
+//**************************************************************************
+// DEVICE IMPLEMENTATION
+//**************************************************************************
+
+//-------------------------------------------------
+// crt9028_device - constructor
+//-------------------------------------------------
+
+crt9028_device::crt9028_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock,
+ int dots_per_char, int chars_per_row, int horiz_blanking, int hsync_delay, int hsync_width, bool hsync_active,
+ int char_rows, int scans_per_char, bool vsync_active,
+ int vert_blanking, int vsync_delay, bool vsync_width,
+ int alt_vert_blanking, int alt_vsync_delay, bool alt_vsync_width,
+ int csync_delay, int csync_width, int underline,
+ u16 wide_gfx_seg1_4, u16 wide_gfx_seg2_5, u16 wide_gfx_seg3_6, u8 wide_gfx_pattern,
+ u16 thin_gfx_seg1, u16 thin_gfx_seg2, u16 thin_gfx_seg3, u16 thin_gfx_seg4,
+ u8 thin_gfx_dots1, u8 thin_gfx_dots2, u8 thin_gfx_dots3, u8 thin_gfx_dots4)
+ : device_t(mconfig, type, tag, owner, clock)
+ , device_memory_interface(mconfig, *this)
+ , device_video_interface(mconfig, *this)
+ , m_space_config("charram", ENDIANNESS_LITTLE, 8, 11, 0)
+ , m_charset(*this, "charset")
+ , m_hsync_callback(*this)
+ , m_vsync_callback(*this)
+ , m_dots_per_char(dots_per_char)
+ , m_chars_per_row(chars_per_row)
+ , m_horiz_blanking(horiz_blanking)
+ , m_hsync_delay(hsync_delay)
+ , m_hsync_width(hsync_width)
+ , m_hsync_active(hsync_active)
+ , m_char_rows(char_rows)
+ , m_scans_per_char(scans_per_char)
+ , m_vsync_active(vsync_active)
+ , m_vert_blanking{vert_blanking, alt_vert_blanking}
+ , m_vsync_delay{vsync_delay, alt_vsync_delay}
+ , m_vsync_width{vsync_width, alt_vsync_width}
+ , m_csync_delay(csync_delay)
+ , m_csync_width(csync_width)
+ , m_underline(underline)
+ , m_wide_gfx_seg{wide_gfx_seg1_4, wide_gfx_seg2_5, wide_gfx_seg3_6}
+ , m_wide_gfx_pattern(wide_gfx_pattern)
+ , m_thin_gfx_seg{thin_gfx_seg1, thin_gfx_seg2, thin_gfx_seg3, thin_gfx_seg4}
+ , m_thin_gfx_dots{thin_gfx_dots1, thin_gfx_dots2, thin_gfx_dots3, thin_gfx_dots4}
+{
+ // Mostly unused now
+ (void)m_hsync_delay;
+ (void)m_hsync_width;
+ (void)m_hsync_active;
+ (void)m_vsync_active;
+ (void)m_vsync_delay;
+ (void)m_vsync_width;
+ (void)m_csync_delay;
+ (void)m_csync_width;
+ (void)m_underline;
+ (void)m_wide_gfx_seg;
+ (void)m_wide_gfx_pattern;
+ (void)m_thin_gfx_seg;
+ (void)m_thin_gfx_dots;
+}
+
+
+//-------------------------------------------------
+// crt9028_000_device - constructor
+//-------------------------------------------------
+
+crt9028_000_device::crt9028_000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : crt9028_device(mconfig, CRT9028_000, tag, owner, clock,
+ 7, 80, 20, 4, 8, false,
+ 24, 10, false,
+ 20, 4, 8,
+ 72, 30, 10,
+ 2, 8, 9,
+ 0x3c0, 0x038, 0x007, 0x0f,
+ 0x3e0, 0x020, 0x03f, 0x020,
+ 0x10, 0xff, 0x10, 0xff)
+{
+}
+
+
+//-------------------------------------------------
+// device_config_complete - finalise device
+// configuration
+//-------------------------------------------------
+
+void crt9028_device::device_config_complete()
+{
+ if (!has_screen())
+ return;
+
+ if (screen().refresh_attoseconds() == 0)
+ {
+ int visible_scan_lines = m_char_rows * m_scans_per_char;
+ screen().set_raw(clock(), m_dots_per_char * (m_chars_per_row + m_horiz_blanking), 0, m_dots_per_char * m_chars_per_row,
+ visible_scan_lines + m_vert_blanking[0], 0, visible_scan_lines);
+ }
+
+ if (!screen().has_screen_update())
+ screen().set_screen_update(screen_update_rgb32_delegate(FUNC(crt9028_device::screen_update), this));
+}
+
+
+//-------------------------------------------------
+// memory_space_config - return the configuration
+// for the address spaces
+//-------------------------------------------------
+
+device_memory_interface::space_config_vector crt9028_device::memory_space_config() const
+{
+ return space_config_vector{std::make_pair(0, &m_space_config)};
+}
+
+
+//-------------------------------------------------
+// device_resolve_objects - resolve objects that
+// may be needed for other devices to set
+// initial conditions at start time
+//-------------------------------------------------
+
+void crt9028_device::device_resolve_objects()
+{
+ m_hsync_callback.resolve_safe();
+ m_vsync_callback.resolve_safe();
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void crt9028_device::device_start()
+{
+ m_space = &space(0);
+}
+
+
+//-------------------------------------------------
+// screen_update - screen update method
+//-------------------------------------------------
+
+u32 crt9028_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+{
+ return 0;
+}
+
+
+//-------------------------------------------------
+// read - read from data or status register
+//-------------------------------------------------
+
+u8 crt9028_device::read(offs_t offset)
+{
+ return 0xff;
+}
+
+
+//-------------------------------------------------
+// write - write to data or address register
+//-------------------------------------------------
+
+void crt9028_device::write(offs_t offset, u8 data)
+{
+ logerror("%s: Writing %02X to %s register\n", machine().describe_context(), data, BIT(offset, 0) ? "address" : "data");
+}
+
+
+//**************************************************************************
+// INTERNAL ROM
+//**************************************************************************
+
+ROM_START(crt9028_000)
+ ROM_REGION(0x400, "charset", 0)
+ ROM_LOAD("crt9028_000.bin", 0x000, 0x400, NO_DUMP)
+ROM_END
+
+
+//-------------------------------------------------
+// rom_region - return a pointer to the implicit
+// rom region description for this device
+//-------------------------------------------------
+
+const tiny_rom_entry *crt9028_000_device::device_rom_region() const
+{
+ return ROM_NAME(crt9028_000);
+}
diff --git a/src/devices/video/crt9028.h b/src/devices/video/crt9028.h
new file mode 100644
index 00000000000..723558859c6
--- /dev/null
+++ b/src/devices/video/crt9028.h
@@ -0,0 +1,127 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/**********************************************************************
+
+ Standard Microsystems CRT9028/9128 Video Terminal Logic Controller
+
+***********************************************************************
+ _____ _____
+ DA8 1 |* \__/ | 40 DA7
+ DA9 2 | | 39 DA6
+ DA10 3 | | 38 DA5
+ GND 4 | | 37 DA4
+ XTAL2 5 | | 36 DA3
+ XTAL1 6 | | 35 DA2
+ /VIDEO 7 | | 34 DA1
+ INTOUT 8 | | 33 DA0
+ /DWR 9 | | 32 DB7
+ DD0 10 | CRT 9028 | 31 DB6
+ DD1 11 | CRT 9128 | 30 DB5
+ DD2 12 | | 29 DB4
+ DD3 13 | | 28 DB3
+ DD4 14 | | 27 DB2
+ DD5 15 | | 26 DB1
+ DD6 16 | | 25 DB0
+ DD7 17 | | 24 A/D
+ HSYNC 18 | | 23 /RD or /DS
+ VSYNC 19 | | 22 /WR or R/W
+ CSYNC 20 |______________| 21 VCC
+
+**********************************************************************/
+
+#ifndef MAME_VIDEO_CRT9028_H
+#define MAME_VIDEO_CRT9028_H
+
+#pragma once
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> crt9028_device
+
+class crt9028_device : public device_t, public device_memory_interface, public device_video_interface
+{
+public:
+ // device configuration
+ auto hsync_callback() { return m_hsync_callback.bind(); }
+ auto vsync_callback() { return m_hsync_callback.bind(); }
+
+ // read/write handlers
+ u8 read(offs_t offset);
+ void write(offs_t offset, u8 data);
+
+ // screen update method
+ u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+
+protected:
+ // base type constructor
+ crt9028_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock,
+ int dots_per_char, int chars_per_row, int horiz_blanking, int hsync_delay, int hsync_width, bool hsync_active,
+ int char_rows, int scans_per_char, bool vsync_active,
+ int vert_blanking, int vsync_delay, bool vsync_width,
+ int alt_vert_blanking, int alt_vsync_delay, bool alt_vsync_width,
+ int csync_delay, int csync_width, int underline,
+ u16 wide_gfx_seg1_4, u16 wide_gfx_seg2_5, u16 wide_gfx_seg3_6, u8 wide_gfx_pattern,
+ u16 thin_gfx_seg1, u16 thin_gfx_seg2, u16 thin_gfx_seg3, u16 thin_gfx_seg4,
+ u8 thin_gfx_dots1, u8 thin_gfx_dots2, u8 thin_gfx_dots3, u8 thin_gfx_dots4);
+
+ // device-specific overrides
+ virtual void device_config_complete() override;
+ virtual void device_resolve_objects() override;
+ virtual void device_start() override;
+
+ // device_memory_interface overrides
+ virtual space_config_vector memory_space_config() const override;
+
+private:
+ // address space for display memory
+ const address_space_config m_space_config;
+ address_space *m_space;
+
+ // internal character set
+ required_region_ptr<u8> m_charset;
+
+ // timing callbacks
+ devcb_write_line m_hsync_callback;
+ devcb_write_line m_vsync_callback;
+
+ // mask parameters
+ const int m_dots_per_char;
+ const int m_chars_per_row;
+ const int m_horiz_blanking;
+ const int m_hsync_delay;
+ const int m_hsync_width;
+ const bool m_hsync_active;
+ const int m_char_rows;
+ const int m_scans_per_char;
+ const bool m_vsync_active;
+ const int m_vert_blanking[2];
+ const int m_vsync_delay[2];
+ const int m_vsync_width[2];
+ const int m_csync_delay;
+ const int m_csync_width;
+ const int m_underline;
+ const u16 m_wide_gfx_seg[3];
+ const u8 m_wide_gfx_pattern;
+ const u16 m_thin_gfx_seg[4];
+ const u8 m_thin_gfx_dots[4];
+};
+
+// ======================> crt9028_000_device
+
+class crt9028_000_device : public crt9028_device
+{
+public:
+ // device constructor
+ crt9028_000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+protected:
+ // device-specific overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+};
+
+// device type declarations
+DECLARE_DEVICE_TYPE(CRT9028_000, crt9028_000_device)
+
+#endif // MAME_VIDEO_CRT9028_H
diff --git a/src/frontend/mame/ui/menu.cpp b/src/frontend/mame/ui/menu.cpp
index 4bc6a13d81e..eecaab68978 100644
--- a/src/frontend/mame/ui/menu.cpp
+++ b/src/frontend/mame/ui/menu.cpp
@@ -162,8 +162,17 @@ void menu::global_state::stack_reset()
void menu::global_state::clear_free_list()
{
+ // free stack is in reverse order - unwind it properly
+ std::unique_ptr<menu> reversed;
while (m_free)
- m_free = std::move(m_free->m_parent);
+ {
+ std::unique_ptr<menu> menu(std::move(m_free));
+ m_free = std::move(menu->m_parent);
+ menu->m_parent = std::move(reversed);
+ reversed = std::move(menu);
+ }
+ while (reversed)
+ reversed = std::move(reversed->m_parent);
}
diff --git a/src/lib/netlist/devices/nld_9310.cpp b/src/lib/netlist/devices/nld_9310.cpp
index 4348de20417..cbc197a70d8 100644
--- a/src/lib/netlist/devices/nld_9310.cpp
+++ b/src/lib/netlist/devices/nld_9310.cpp
@@ -158,32 +158,35 @@ namespace netlist
NETLIB_UPDATE(9310_sub)
{
+ auto cnt(m_cnt);
+
if (m_loadq)
{
- if (m_cnt < MAXCNT - 1)
+ if (cnt < MAXCNT - 1)
{
- ++m_cnt;
- update_outputs(m_cnt);
+ ++cnt;
+ update_outputs(cnt);
}
- else if (m_cnt == MAXCNT - 1)
+ else if (cnt == MAXCNT - 1)
{
- m_cnt = MAXCNT;
+ cnt = MAXCNT;
m_RC.push(m_ent, NLTIME_FROM_NS(20));
m_QA.push(1, NLTIME_FROM_NS(20));
}
else // MAXCNT
{
m_RC.push(0, NLTIME_FROM_NS(20));
- m_cnt = 0;
- update_outputs_all(m_cnt, NLTIME_FROM_NS(20));
+ cnt = 0;
+ update_outputs_all(cnt, NLTIME_FROM_NS(20));
}
}
else
{
- m_cnt = m_ABCD->read_ABCD();
- m_RC.push(m_ent & (m_cnt == MAXCNT), NLTIME_FROM_NS(27));
- update_outputs_all(m_cnt, NLTIME_FROM_NS(22));
+ cnt = m_ABCD->read_ABCD();
+ m_RC.push(m_ent & (cnt == MAXCNT), NLTIME_FROM_NS(27));
+ update_outputs_all(cnt, NLTIME_FROM_NS(22));
}
+ m_cnt = cnt;
}
NETLIB_UPDATE(9310)
@@ -224,10 +227,10 @@ namespace netlist
#if 0
// for (int i=0; i<4; i++)
// m_Q[i], (cnt >> i) & 1, delay[i]);
- m_QA, (cnt >> 0) & 1, out_delay);
- m_QB, (cnt >> 1) & 1, out_delay);
- m_QC, (cnt >> 2) & 1, out_delay);
- m_QD, (cnt >> 3) & 1, out_delay);
+ m_QA.push((cnt >> 0) & 1, out_delay);
+ m_QB.push((cnt >> 1) & 1, out_delay);
+ m_QC.push((cnt >> 2) & 1, out_delay);
+ m_QD.push((cnt >> 3) & 1, out_delay);
#else
if ((cnt & 1) == 1)
m_QA.push(1, out_delay);
diff --git a/src/lib/netlist/devices/nld_9316.cpp b/src/lib/netlist/devices/nld_9316.cpp
index 20858ebc74f..69dd1c1c6ca 100644
--- a/src/lib/netlist/devices/nld_9316.cpp
+++ b/src/lib/netlist/devices/nld_9316.cpp
@@ -105,27 +105,15 @@ namespace netlist
NETLIB_HANDLER(9316, clk)
{
+ auto cnt(m_cnt);
if (m_LOADQ())
{
- ++m_cnt &= MAXCNT;
- //m_RC.push(m_ENT() && (m_cnt == MAXCNT), NLTIME_FROM_NS(27));
-#if 0
- if (m_cnt == MAXCNT)
- {
- m_RC.push(m_ENT(), NLTIME_FROM_NS(27));
- update_outputs_all(MAXCNT, NLTIME_FROM_NS(20));
- }
- else if (m_cnt == 0)
- {
- m_RC.push(0, NLTIME_FROM_NS(27));
- update_outputs_all(0, NLTIME_FROM_NS(20));
- }
- else
- update_outputs_all(m_cnt, NLTIME_FROM_NS(20));
-#else
- if (m_cnt > 0 && m_cnt < MAXCNT)
- update_outputs_all(m_cnt, NLTIME_FROM_NS(20));
- else if (m_cnt == 0)
+ ++cnt &= MAXCNT;
+ //m_RC.push(m_ENT() && (cnt == MAXCNT), NLTIME_FROM_NS(27));
+
+ if (cnt > 0 && cnt < MAXCNT)
+ update_outputs_all(cnt, NLTIME_FROM_NS(20));
+ else if (cnt == 0)
{
m_RC.push(0, NLTIME_FROM_NS(27));
update_outputs_all(0, NLTIME_FROM_NS(20));
@@ -135,14 +123,14 @@ namespace netlist
m_RC.push(m_ENT(), NLTIME_FROM_NS(27));
update_outputs_all(MAXCNT, NLTIME_FROM_NS(20));
}
-#endif
}
else
{
- m_cnt = m_abcd;
- m_RC.push(m_ENT() && (m_cnt == MAXCNT), NLTIME_FROM_NS(27));
- update_outputs_all(m_cnt, NLTIME_FROM_NS(22));
+ cnt = m_abcd;
+ m_RC.push(m_ENT() && (cnt == MAXCNT), NLTIME_FROM_NS(27));
+ update_outputs_all(cnt, NLTIME_FROM_NS(22));
}
+ m_cnt = cnt;
}
NETLIB_UPDATE(9316)
diff --git a/src/lib/netlist/devices/nld_system.cpp b/src/lib/netlist/devices/nld_system.cpp
index 24af4527a70..134017d06b0 100644
--- a/src/lib/netlist/devices/nld_system.cpp
+++ b/src/lib/netlist/devices/nld_system.cpp
@@ -40,15 +40,38 @@ namespace netlist
{
m_cnt = 0;
m_off = netlist_time::from_double(m_offset());
+ m_feedback.m_delegate = NETLIB_DELEGATE(extclock, update);
+
+ //m_feedback.m_delegate .set(&NETLIB_NAME(extclock)::update, this);
//m_Q.initial(0);
}
+ NETLIB_HANDLER(extclock, clk2)
+ {
+ m_Q.push((m_cnt & 1) ^ 1, m_inc[m_cnt]);
+ if (++m_cnt >= m_size)
+ m_cnt = 0;
+ }
+
+ NETLIB_HANDLER(extclock, clk2_pow2)
+ {
+ m_Q.push((m_cnt & 1) ^ 1, m_inc[m_cnt]);
+ m_cnt = (++m_cnt) & (m_size-1);
+ }
+
NETLIB_UPDATE(extclock)
{
m_Q.push((m_cnt & 1) ^ 1, m_inc[m_cnt] + m_off);
m_off = netlist_time::zero();
if (++m_cnt >= m_size)
m_cnt = 0;
+
+ // continue with optimized clock handlers ....
+
+ if ((m_size & (m_size-1)) == 0) // power of 2?
+ m_feedback.m_delegate.set(&NETLIB_NAME(extclock)::clk2_pow2, this);
+ else
+ m_feedback.m_delegate.set(&NETLIB_NAME(extclock)::clk2, this);
}
// -----------------------------------------------------------------------------
diff --git a/src/lib/netlist/devices/nlid_system.h b/src/lib/netlist/devices/nlid_system.h
index 3d878646549..7271084bbc1 100644
--- a/src/lib/netlist/devices/nlid_system.h
+++ b/src/lib/netlist/devices/nlid_system.h
@@ -52,7 +52,7 @@ namespace netlist
NETLIB_RESETI()
{
- m_Q.net().set_time(netlist_time::zero());
+ m_Q.net().set_next_scheduled_time(netlist_time::zero());
}
NETLIB_UPDATE_PARAMI()
@@ -65,7 +65,7 @@ namespace netlist
logic_net_t &net = m_Q.net();
// this is only called during setup ...
net.toggle_new_Q();
- net.set_time(exec().time() + m_inc);
+ net.set_next_scheduled_time(exec().time() + m_inc);
}
public:
@@ -73,13 +73,6 @@ namespace netlist
param_double_t m_freq;
netlist_time m_inc;
-
- static void mc_update(logic_net_t &net)
- {
- net.toggle_new_Q();
- net.update_devs();
- }
-
};
// -----------------------------------------------------------------------------
@@ -158,6 +151,10 @@ namespace netlist
NETLIB_UPDATEI();
NETLIB_RESETI();
//NETLIB_UPDATE_PARAMI();
+
+ NETLIB_HANDLERI(clk2);
+ NETLIB_HANDLERI(clk2_pow2);
+
protected:
param_double_t m_freq;
diff --git a/src/lib/netlist/devices/nlid_truthtable.h b/src/lib/netlist/devices/nlid_truthtable.h
index f0f85e037de..c633a6991a1 100644
--- a/src/lib/netlist/devices/nlid_truthtable.h
+++ b/src/lib/netlist/devices/nlid_truthtable.h
@@ -179,7 +179,7 @@ namespace devices
m_I[i].activate();
//nstate |= (m_I[i]() ? (1 << i) : 0);
nstate |= (m_I[i]() << i);
- mt = std::max(this->m_I[i].net().time(), mt);
+ mt = std::max(this->m_I[i].net().next_scheduled_time(), mt);
}
else
for (std::size_t i = 0; i < m_NI; i++)
@@ -208,7 +208,7 @@ namespace devices
{
//nstate |= (m_I[i]() ? (1 << i) : 0);
nstate |= (m_I[i]() << i);
- mt = std::max(this->m_I[i].net().time(), mt);
+ mt = std::max(this->m_I[i].net().next_scheduled_time(), mt);
}
else
for (std::size_t i = 0; i < m_NI; i++)
diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp
index 14807111ff2..4ce980dbba8 100644
--- a/src/lib/netlist/nl_base.cpp
+++ b/src/lib/netlist/nl_base.cpp
@@ -164,11 +164,9 @@ void detail::queue_t::register_state(plib::state_manager_t &manager, const pstri
manager.save_item(this, &m_net_ids[0], module + "." + "names", m_net_ids.size());
}
-void detail::queue_t::on_pre_save()
+void detail::queue_t::on_pre_save(plib::state_manager_t &manager)
{
- state().log().debug("on_pre_save\n");
m_qsize = this->size();
- state().log().debug("qsize {1}\n", m_qsize);
for (std::size_t i = 0; i < m_qsize; i++ )
{
m_times[i] = this->listptr()[i].m_exec_time.as_raw();
@@ -177,10 +175,9 @@ void detail::queue_t::on_pre_save()
}
-void detail::queue_t::on_post_load()
+void detail::queue_t::on_post_load(plib::state_manager_t &manager)
{
this->clear();
- state().log().debug("qsize {1}\n", m_qsize);
for (std::size_t i = 0; i < m_qsize; i++ )
{
detail::net_t *n = state().nets()[m_net_ids[i]].get();
@@ -247,11 +244,11 @@ detail::terminal_type detail::core_terminal_t::type() const
// ----------------------------------------------------------------------------------------
netlist_t::netlist_t(const pstring &aname, std::unique_ptr<callbacks_t> callbacks)
- : m_state(plib::make_unique<netlist_state_t>(aname,
+ : m_time(netlist_time::zero())
+ , m_mainclock(nullptr)
+ , m_state(plib::make_unique<netlist_state_t>(aname,
std::move(callbacks),
plib::make_unique<setup_t>(*this))) // FIXME, ugly but needed to have netlist_state_t constructed first
- , m_time(netlist_time::zero())
- , m_mainclock(nullptr)
, m_queue(*m_state)
, m_solver(nullptr)
{
@@ -272,8 +269,7 @@ netlist_t::~netlist_t()
netlist_state_t::netlist_state_t(const pstring &aname,
std::unique_ptr<callbacks_t> &&callbacks,
std::unique_ptr<setup_t> &&setup)
-: m_params(nullptr)
-, m_name(aname)
+: m_name(aname)
, m_state()
, m_callbacks(std::move(callbacks)) // Order is important here
, m_log(*m_callbacks)
@@ -339,7 +335,7 @@ void netlist_t::reset()
m_time = netlist_time::zero();
m_queue.clear();
if (m_mainclock != nullptr)
- m_mainclock->m_Q.net().set_time(netlist_time::zero());
+ m_mainclock->m_Q.net().set_next_scheduled_time(netlist_time::zero());
//if (m_solver != nullptr)
// m_solver->reset();
@@ -452,7 +448,7 @@ void netlist_t::process_queue(const netlist_time delta) NL_NOEXCEPT
{
logic_net_t &mc_net(m_mainclock->m_Q.net());
const netlist_time inc(m_mainclock->m_inc);
- netlist_time mc_time(mc_net.time());
+ netlist_time mc_time(mc_net.next_scheduled_time());
do
{
@@ -474,7 +470,7 @@ void netlist_t::process_queue(const netlist_time delta) NL_NOEXCEPT
else
break;
} while (true); //while (e.m_object != nullptr);
- mc_net.set_time(mc_time);
+ mc_net.set_next_scheduled_time(mc_time);
}
m_stat_mainloop.stop();
}
@@ -503,6 +499,9 @@ void netlist_t::print_stats() const
total_count += entry->m_stat_total_time.count();
}
+ log().verbose("Total calls : {1:12} {2:12} {3:12}", total_count,
+ total_time, total_time / total_count);
+
nperftime_t<NL_KEEP_STATISTICS> overhead;
nperftime_t<NL_KEEP_STATISTICS> test;
overhead.start();
@@ -531,10 +530,16 @@ void netlist_t::print_stats() const
/ static_cast<nperftime_t<NL_KEEP_STATISTICS>::type>(m_queue.m_prof_call());
log().verbose("Overhead per pop {1:11}", overhead_per_pop );
log().verbose("");
+
+ auto trigger = total_count * 200 / 1000000; // 200 ppm
for (auto &entry : m_state->m_devices)
{
- if (entry->m_stat_inc_active() > 3 * entry->m_stat_total_time.count())
- log().verbose("HINT({}, NO_DEACTIVATE)", entry->name());
+ // Factor of 3 offers best performace increase
+ if (entry->m_stat_inc_active() > 3 * entry->m_stat_total_time.count()
+ && entry->m_stat_inc_active() > trigger)
+ log().verbose("HINT({}, NO_DEACTIVATE) // {} {} {}", entry->name(),
+ static_cast<double>(entry->m_stat_inc_active()) / static_cast<double>(entry->m_stat_total_time.count()),
+ entry->m_stat_inc_active(), entry->m_stat_total_time.count());
}
}
}
@@ -687,7 +692,7 @@ detail::net_t::net_t(netlist_base_t &nl, const pstring &aname, core_terminal_t *
, m_new_Q(*this, "m_new_Q", 0)
, m_cur_Q (*this, "m_cur_Q", 0)
, m_in_queue(*this, "m_in_queue", QS_DELIVERED)
- , m_time(*this, "m_time", netlist_time::zero())
+ , m_next_scheduled_time(*this, "m_time", netlist_time::zero())
, m_railterminal(mr)
{
}
@@ -697,35 +702,6 @@ detail::net_t::~net_t()
state().run_state_manager().remove_save_items(this);
}
-void detail::net_t::add_to_active_list(core_terminal_t &term) NL_NOEXCEPT
-{
- const bool was_empty = m_list_active.empty();
- m_list_active.push_front(&term);
- if (was_empty)
- {
- railterminal().device().do_inc_active();
- if (m_in_queue == QS_DELAYED_DUE_TO_INACTIVE)
- {
- if (m_time > exec().time())
- {
- m_in_queue = QS_QUEUED; /* pending */
- exec().queue().push({m_time, this});
- }
- else
- {
- m_in_queue = QS_DELIVERED;
- m_cur_Q = m_new_Q;
- }
- }
- }
-}
-
-void detail::net_t::remove_from_active_list(core_terminal_t &term) NL_NOEXCEPT
-{
- m_list_active.remove(&term);
- if (m_list_active.empty())
- railterminal().device().do_dec_active();
-}
void detail::net_t::rebuild_list()
{
@@ -779,7 +755,7 @@ void detail::net_t::update_devs() NL_NOEXCEPT
void detail::net_t::reset()
{
- m_time = netlist_time::zero();
+ m_next_scheduled_time = netlist_time::zero();
m_in_queue = QS_DELIVERED;
m_new_Q = 0;
diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h
index ca75046b3e5..35ecc694cfd 100644
--- a/src/lib/netlist/nl_base.h
+++ b/src/lib/netlist/nl_base.h
@@ -732,8 +732,8 @@ namespace netlist
void update_devs() NL_NOEXCEPT;
- const netlist_time time() const noexcept { return m_time; }
- void set_time(netlist_time ntime) noexcept { m_time = ntime; }
+ const netlist_time next_scheduled_time() const noexcept { return m_next_scheduled_time; }
+ void set_next_scheduled_time(netlist_time ntime) noexcept { m_next_scheduled_time = ntime; }
bool isRailNet() const noexcept { return !(m_railterminal == nullptr); }
core_terminal_t & railterminal() const noexcept { return *m_railterminal; }
@@ -761,7 +761,7 @@ namespace netlist
state_var<netlist_sig_t> m_cur_Q;
state_var<queue_status> m_in_queue; /* 0: not in queue, 1: in queue, 2: last was taken */
- state_var<netlist_time> m_time;
+ state_var<netlist_time> m_next_scheduled_time;
private:
plib::linkedlist_t<core_terminal_t> m_list_active;
@@ -803,7 +803,7 @@ namespace netlist
if (newQ != m_new_Q)
{
m_in_queue = QS_DELAYED_DUE_TO_INACTIVE;
- m_time = at;
+ m_next_scheduled_time = at;
}
m_cur_Q = m_new_Q = newQ;
}
@@ -1204,8 +1204,8 @@ namespace netlist
protected:
void register_state(plib::state_manager_t &manager, const pstring &module) override;
- void on_pre_save() override;
- void on_post_load() override;
+ void on_pre_save(plib::state_manager_t &manager) override;
+ void on_post_load(plib::state_manager_t &manager) override;
private:
std::size_t m_qsize;
@@ -1272,8 +1272,6 @@ namespace netlist
template <typename T>
void register_net(plib::owned_ptr<T> &&net) { m_nets.push_back(std::move(net)); }
- devices::NETLIB_NAME(netlistparams) *m_params;
-
template<class device_class>
inline std::vector<device_class *> get_device_list()
{
@@ -1387,11 +1385,10 @@ namespace netlist
void print_stats() const;
private:
- std::unique_ptr<netlist_state_t> m_state;
-
/* mostly rw */
netlist_time m_time;
devices::NETLIB_NAME(mainclock) * m_mainclock;
+ std::unique_ptr<netlist_state_t> m_state;
detail::queue_t m_queue;
devices::NETLIB_NAME(solver) * m_solver;
@@ -1517,15 +1514,50 @@ namespace netlist
{
if ((num_cons() != 0))
{
+ auto &lexec(exec());
+ auto &q(lexec.queue());
+ auto nst(lexec.time() + delay);
+
if (is_queued())
- exec().queue().remove(this);
- m_time = exec().time() + delay;
+ q.remove(this);
m_in_queue = (!m_list_active.empty()) ? QS_QUEUED : QS_DELAYED_DUE_TO_INACTIVE; /* queued ? */
if (m_in_queue == QS_QUEUED)
- exec().queue().push(queue_t::entry_t(m_time, this));
+ q.push(queue_t::entry_t(nst, this));
+ m_next_scheduled_time = nst;
}
}
+ inline void detail::net_t::add_to_active_list(core_terminal_t &term) NL_NOEXCEPT
+ {
+ if (m_list_active.empty())
+ {
+ m_list_active.push_front(&term);
+ railterminal().device().do_inc_active();
+ if (m_in_queue == QS_DELAYED_DUE_TO_INACTIVE)
+ {
+ if (m_next_scheduled_time > exec().time())
+ {
+ m_in_queue = QS_QUEUED; /* pending */
+ exec().queue().push({m_next_scheduled_time, this});
+ }
+ else
+ {
+ m_in_queue = QS_DELIVERED;
+ m_cur_Q = m_new_Q;
+ }
+ }
+ }
+ else
+ m_list_active.push_front(&term);
+ }
+
+ inline void detail::net_t::remove_from_active_list(core_terminal_t &term) NL_NOEXCEPT
+ {
+ m_list_active.remove(&term);
+ if (m_list_active.empty())
+ railterminal().device().do_dec_active();
+ }
+
inline const analog_net_t & analog_t::net() const NL_NOEXCEPT
{
return static_cast<const analog_net_t &>(core_terminal_t::net());
@@ -1583,6 +1615,7 @@ namespace netlist
return m_device.exec();
}
+
inline const netlist_t &detail::device_object_t::exec() const NL_NOEXCEPT
{
return m_device.exec();
diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp
index 291e95add83..cef51f481db 100644
--- a/src/lib/netlist/nl_setup.cpp
+++ b/src/lib/netlist/nl_setup.cpp
@@ -27,6 +27,7 @@ namespace netlist
{
setup_t::setup_t(netlist_t &netlist)
: m_netlist(netlist)
+ , m_netlist_params(nullptr)
, m_factory(*this)
, m_proxy_cnt(0)
, m_frontier_cnt(0)
@@ -970,13 +971,13 @@ std::unique_ptr<plib::pistream> setup_t::get_data_stream(const pstring &name)
return std::unique_ptr<plib::pistream>(nullptr);
}
-void setup_t::register_define(const pstring &defstr)
+void setup_t::add_define(const pstring &defstr)
{
auto p = defstr.find("=");
if (p != pstring::npos)
- register_define(plib::left(defstr, p), defstr.substr(p+1));
+ add_define(plib::left(defstr, p), defstr.substr(p+1));
else
- register_define(defstr, "1");
+ add_define(defstr, "1");
}
// ----------------------------------------------------------------------------------------
@@ -1024,7 +1025,7 @@ void setup_t::prepare_to_run()
log().debug("Searching for solver and parameters ...\n");
auto solver = netlist().get_single_device<devices::NETLIB_NAME(solver)>("solver");
- netlist().m_params = netlist().get_single_device<devices::NETLIB_NAME(netlistparams)>("parameter");
+ m_netlist_params = netlist().get_single_device<devices::NETLIB_NAME(netlistparams)>("parameter");
/* create devices */
@@ -1039,7 +1040,7 @@ void setup_t::prepare_to_run()
}
}
- bool use_deactivate = (netlist().m_params->m_use_deactivate() ? true : false);
+ bool use_deactivate = m_netlist_params->m_use_deactivate() ? true : false;
for (auto &d : netlist().devices())
{
diff --git a/src/lib/netlist/nl_setup.h b/src/lib/netlist/nl_setup.h
index 4becfe1ee0c..25201bee1b5 100644
--- a/src/lib/netlist/nl_setup.h
+++ b/src/lib/netlist/nl_setup.h
@@ -123,6 +123,7 @@ namespace netlist
namespace devices {
class nld_base_proxy;
+ class nld_netlistparams;
}
class core_device_t;
@@ -274,8 +275,12 @@ namespace netlist
m_sources.push_back(std::move(src));
}
- void register_define(pstring def, pstring val) { m_defines.push_back(plib::ppreprocessor::define_t(def, val)); }
- void register_define(const pstring &defstr);
+ void add_define(pstring def, pstring val)
+ {
+ m_defines.insert({ def, plib::ppreprocessor::define_t(def, val)});
+ }
+
+ void add_define(const pstring &defstr);
factory::list_t &factory() { return m_factory; }
const factory::list_t &factory() const { return m_factory; }
@@ -337,14 +342,16 @@ namespace netlist
std::unordered_map<pstring, detail::core_terminal_t *> m_terminals;
netlist_t &m_netlist;
+ devices::nld_netlistparams *m_netlist_params;
std::unordered_map<pstring, param_ref_t> m_params;
+
std::vector<link_t> m_links;
factory::list_t m_factory;
std::unordered_map<pstring, pstring> m_models;
std::stack<pstring> m_namespace_stack;
source_t::list_t m_sources;
- std::vector<plib::ppreprocessor::define_t> m_defines;
+ plib::ppreprocessor::defines_map_type m_defines;
unsigned m_proxy_cnt;
unsigned m_frontier_cnt;
diff --git a/src/lib/netlist/plib/plists.h b/src/lib/netlist/plib/plists.h
index 5574f095484..d440d76de2a 100644
--- a/src/lib/netlist/plib/plists.h
+++ b/src/lib/netlist/plib/plists.h
@@ -152,9 +152,10 @@ public:
void remove(const LC *elem) noexcept
{
auto p = &m_head;
- for ( ; *p != elem; p = &((*p)->m_next))
+ while(*p != elem)
{
//nl_assert(*p != nullptr);
+ p = &((*p)->m_next);
}
(*p) = elem->m_next;
}
diff --git a/src/lib/netlist/plib/poptions.cpp b/src/lib/netlist/plib/poptions.cpp
index 43e992f9225..dcb8e3931f3 100644
--- a/src/lib/netlist/plib/poptions.cpp
+++ b/src/lib/netlist/plib/poptions.cpp
@@ -219,7 +219,7 @@ namespace plib {
}
pstring options::help(pstring description, pstring usage,
- unsigned width, unsigned indent)
+ unsigned width, unsigned indent) const
{
pstring ret;
@@ -293,7 +293,7 @@ namespace plib {
return ret;
}
- option *options::getopt_short(pstring arg)
+ option *options::getopt_short(pstring arg) const
{
for (auto & optbase : m_opts)
{
@@ -303,7 +303,7 @@ namespace plib {
}
return nullptr;
}
- option *options::getopt_long(pstring arg)
+ option *options::getopt_long(pstring arg) const
{
for (auto & optbase : m_opts)
{
diff --git a/src/lib/netlist/plib/poptions.h b/src/lib/netlist/plib/poptions.h
index 4a8e6d788d7..925329e80d4 100644
--- a/src/lib/netlist/plib/poptions.h
+++ b/src/lib/netlist/plib/poptions.h
@@ -27,7 +27,7 @@ public:
option_base(options &parent, pstring help);
virtual ~option_base();
- pstring help() { return m_help; }
+ pstring help() const { return m_help; }
private:
pstring m_help;
};
@@ -39,7 +39,7 @@ public:
: option_base(parent, help), m_group(group) { }
~option_group();
- pstring group() { return m_group; }
+ pstring group() const { return m_group; }
private:
pstring m_group;
};
@@ -51,7 +51,7 @@ public:
: option_base(parent, help), m_example(group) { }
~option_example();
- pstring example() { return m_example; }
+ pstring example() const { return m_example; }
private:
pstring m_example;
};
@@ -93,7 +93,7 @@ public:
: option(parent, ashort, along, help, true), m_val(defval)
{}
- pstring operator ()() { return m_val; }
+ pstring operator ()() const { return m_val; }
protected:
virtual int parse(const pstring &argument) override;
@@ -128,7 +128,7 @@ public:
{
}
- T operator ()() { return m_val; }
+ T operator ()() const { return m_val; }
pstring as_string() const { return limit()[m_val]; }
@@ -157,7 +157,7 @@ public:
: option(parent, ashort, along, help, false), m_val(false)
{}
- bool operator ()() { return m_val; }
+ bool operator ()() const { return m_val; }
protected:
virtual int parse(const pstring &argument) override;
@@ -180,7 +180,7 @@ public:
, m_max(maxval)
{}
- T operator ()() { return m_val; }
+ T operator ()() const { return m_val; }
protected:
virtual int parse(const pstring &argument) override
@@ -203,7 +203,7 @@ public:
: option(parent, ashort, along, help, true)
{}
- std::vector<pstring> operator ()() { return m_val; }
+ const std::vector<pstring> &operator ()() const { return m_val; }
protected:
virtual int parse(const pstring &argument) override;
@@ -233,9 +233,9 @@ public:
int parse(int argc, char *argv[]);
pstring help(pstring description, pstring usage,
- unsigned width = 72, unsigned indent = 20);
+ unsigned width = 72, unsigned indent = 20) const;
- pstring app() { return m_app; }
+ pstring app() const { return m_app; }
private:
static pstring split_paragraphs(pstring text, unsigned width, unsigned indent,
@@ -244,7 +244,7 @@ private:
void check_consistency();
template <typename T>
- T *getopt_type()
+ T *getopt_type() const
{
for (auto & optbase : m_opts )
{
@@ -254,8 +254,8 @@ private:
return nullptr;
}
- option *getopt_short(pstring arg);
- option *getopt_long(pstring arg);
+ option *getopt_short(pstring arg) const;
+ option *getopt_long(pstring arg) const;
std::vector<option_base *> m_opts;
pstring m_app;
diff --git a/src/lib/netlist/plib/pparser.cpp b/src/lib/netlist/plib/pparser.cpp
index 48e29570b4c..d666ad11054 100644
--- a/src/lib/netlist/plib/pparser.cpp
+++ b/src/lib/netlist/plib/pparser.cpp
@@ -268,7 +268,7 @@ void ptokenizer::error(const pstring &errs)
// A simple preprocessor
// ----------------------------------------------------------------------------------------
-ppreprocessor::ppreprocessor(std::vector<define_t> *defines)
+ppreprocessor::ppreprocessor(defines_map_type *defines)
: pistream()
, m_ifflag(0)
, m_level(0)
@@ -292,12 +292,7 @@ ppreprocessor::ppreprocessor(std::vector<define_t> *defines)
m_defines.insert({"__PLIB_PREPROCESSOR__", define_t("__PLIB_PREPROCESSOR__", "1")});
if (defines != nullptr)
- {
- for (auto & p : *defines)
- {
- m_defines.insert({p.m_name, p});
- }
- }
+ m_defines = *defines;
}
void ppreprocessor::error(const pstring &err)
@@ -524,7 +519,10 @@ pstring ppreprocessor::process_line(pstring line)
}
}
else
- error(pfmt("unknown directive on line {1}: {2}")(m_lineno)(line));
+ {
+ if (m_ifflag == 0)
+ error(pfmt("unknown directive on line {1}: {2}")(m_lineno)(replace_macros(line)));
+ }
}
else
{
diff --git a/src/lib/netlist/plib/pparser.h b/src/lib/netlist/plib/pparser.h
index 1eeb92d797b..3829e8cdcc8 100644
--- a/src/lib/netlist/plib/pparser.h
+++ b/src/lib/netlist/plib/pparser.h
@@ -163,7 +163,9 @@ public:
pstring m_replace;
};
- explicit ppreprocessor(std::vector<define_t> *defines = nullptr);
+ using defines_map_type = std::unordered_map<pstring, define_t>;
+
+ explicit ppreprocessor(defines_map_type *defines = nullptr);
virtual ~ppreprocessor() override {}
template <typename T>
@@ -214,7 +216,7 @@ private:
pstring process_line(pstring line);
pstring process_comments(pstring line);
- std::unordered_map<pstring, define_t> m_defines;
+ defines_map_type m_defines;
std::vector<pstring> m_expr_sep;
std::uint_least64_t m_ifflag; // 31 if levels
diff --git a/src/lib/netlist/plib/pstate.cpp b/src/lib/netlist/plib/pstate.cpp
index 3cab5dec127..a5465bfed46 100644
--- a/src/lib/netlist/plib/pstate.cpp
+++ b/src/lib/netlist/plib/pstate.cpp
@@ -48,13 +48,13 @@ void state_manager_t::remove_save_items(const void *owner)
void state_manager_t::pre_save()
{
for (auto & s : m_custom)
- s->m_callback->on_pre_save();
+ s->m_callback->on_pre_save(*this);
}
void state_manager_t::post_load()
{
for (auto & s : m_custom)
- s->m_callback->on_post_load();
+ s->m_callback->on_post_load(*this);
}
template<> void state_manager_t::save_item(const void *owner, callback_t &state, const pstring &stname)
diff --git a/src/lib/netlist/plib/pstate.h b/src/lib/netlist/plib/pstate.h
index 5b8acc92221..3a908cba2d2 100644
--- a/src/lib/netlist/plib/pstate.h
+++ b/src/lib/netlist/plib/pstate.h
@@ -56,8 +56,8 @@ public:
virtual ~callback_t();
virtual void register_state(state_manager_t &manager, const pstring &module) = 0;
- virtual void on_pre_save() = 0;
- virtual void on_post_load() = 0;
+ virtual void on_pre_save(state_manager_t &manager) = 0;
+ virtual void on_post_load(state_manager_t &manager) = 0;
protected:
};
diff --git a/src/lib/netlist/plib/putil.h b/src/lib/netlist/plib/putil.h
index 4212677c81c..023a0271ce2 100644
--- a/src/lib/netlist/plib/putil.h
+++ b/src/lib/netlist/plib/putil.h
@@ -14,6 +14,10 @@
#include <algorithm>
#include <vector> // <<= needed by windows build
+#define PSTRINGIFY_HELP(y) # y
+#define PSTRINGIFY(x) PSTRINGIFY_HELP(x)
+
+
namespace plib
{
diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp
index 3c9839a7845..984f8703079 100644
--- a/src/lib/netlist/prg/nltool.cpp
+++ b/src/lib/netlist/prg/nltool.cpp
@@ -17,6 +17,8 @@
#include <cstring>
+#define NLTOOL_VERSION 20190202
+
class tool_app_t : public plib::app
{
public:
@@ -36,7 +38,7 @@ public:
opt_name(*this, "n", "name", "", "the netlist in file specified by ""-f"" option to run; default is first one"),
opt_grp3(*this, "Options for run command", "These options are only used by the run command."),
- opt_ttr (*this, "t", "time_to_run", 1.0, "time to run the emulation (seconds)"),
+ opt_ttr (*this, "t", "time_to_run", 1.0, "time to run the emulation (seconds)\n\n abc def\n\n xyz"),
opt_logs(*this, "l", "log" , "define terminal to log. This option may be specified repeatedly."),
opt_inp(*this, "i", "input", "", "input file to process (default is none)"),
opt_loadstate(*this,"", "loadstate", "", "load state from file and continue from there"),
@@ -99,6 +101,8 @@ private:
void listdevices();
+ std::vector<pstring> m_options;
+
};
static NETLIST_START(dummy)
@@ -186,7 +190,7 @@ public:
// read the netlist ...
for (auto & d : defines)
- setup().register_define(d);
+ setup().add_define(d);
for (auto & r : roms)
setup().register_source(plib::make_unique_base<netlist::source_t, netlist_data_folder_t>(setup(), r));
@@ -347,7 +351,7 @@ void tool_app_t::run()
nt.read_netlist(opt_file(), opt_name(),
opt_logs(),
- opt_defines(), opt_rfolders());
+ m_options, opt_rfolders());
std::vector<input_t> inps = read_input(nt.setup(), opt_inp());
@@ -423,7 +427,7 @@ void tool_app_t::static_compile()
nt.read_netlist(opt_file(), opt_name(),
opt_logs(),
- opt_defines(), opt_rfolders());
+ m_options, opt_rfolders());
plib::putf8_writer w(&pout_strm);
std::map<pstring, pstring> mp;
@@ -543,9 +547,9 @@ void tool_app_t::create_header()
if (last_source != e->sourcefile())
{
last_source = e->sourcefile();
- pout("{1}\n", plib::rpad(pstring("// "), pstring("-"), 72));
+ pout("{1}\n", plib::rpad(pstring("// "), pstring("-"), opt_linewidth()));
pout("{1}{2}\n", pstring("// Source: "), plib::replace_all(e->sourcefile(), "../", ""));
- pout("{1}\n", plib::rpad(pstring("// "), pstring("-"), 72));
+ pout("{1}\n", plib::rpad(pstring("// "), pstring("-"), opt_linewidth()));
}
cmac(e.get());
}
@@ -697,7 +701,7 @@ int tool_app_t::execute()
if (opt_version())
{
pout(
- "nltool (netlist) 0.1\n"
+ "nltool (netlist) " PSTRINGIFY(NLTOOL_VERSION) "\n"
"Copyright (C) 2019 Couriersud\n"
"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.\n"
"This is free software: you are free to change and redistribute it.\n"
@@ -706,6 +710,9 @@ int tool_app_t::execute()
return 0;
}
+ m_options = opt_defines();
+ m_options.push_back("NLTOOL_VERSION=" PSTRINGIFY(NLTOOL_VERSION));
+
try
{
pstring cmd = opt_cmd.as_string();
diff --git a/src/lib/netlist/prg/nlwav.cpp b/src/lib/netlist/prg/nlwav.cpp
index 8116e48111a..c25330627b6 100644
--- a/src/lib/netlist/prg/nlwav.cpp
+++ b/src/lib/netlist/prg/nlwav.cpp
@@ -381,11 +381,11 @@ public:
nlwav_app() :
plib::app(),
opt_fmt(*this, "f", "format", 0, std::vector<pstring>({"wav","vcda","vcdd"}),
- "output format. Available options are wav|vcda|vcdd.\n"
- "wav : multichannel wav output\n"
- "vcda : analog VCD output\n"
- "vcdd : digital VCD output\n"
- "Digital signals are created using the high and low options"
+ "output format. Available options are wav|vcda|vcdd."
+ " wav : multichannel wav output"
+ " vcda : analog VCD output"
+ " vcdd : digital VCD output"
+ " Digital signals are created using the --high and --low options"
),
opt_out(*this, "o", "output", "-", "output file"),
opt_rate(*this, "r", "rate", 48000, "sample rate of output file"),
diff --git a/src/mame/audio/nl_kidniki.cpp b/src/mame/audio/nl_kidniki.cpp
index 7865ea40750..9e8c47247af 100644
--- a/src/mame/audio/nl_kidniki.cpp
+++ b/src/mame/audio/nl_kidniki.cpp
@@ -2,8 +2,17 @@
// copyright-holders:Andrew Gardner, Couriersud
#include "netlist/devices/net_lib.h"
+#ifdef NLBASE_H_
+#error Somehow nl_base.h made it into the include chain.
+#endif
+
+#ifndef NLTOOL_VERSION
#define USE_FRONTIERS 1
#define USE_FIXED_STV 1
+#else
+#define USE_FRONTIERS 0
+#define USE_FIXED_STV 1
+#endif
/* ----------------------------------------------------------------------------
* Library section header START
diff --git a/src/mame/drivers/atarig1.cpp b/src/mame/drivers/atarig1.cpp
index 4e360ca8267..5b74490ba52 100644
--- a/src/mame/drivers/atarig1.cpp
+++ b/src/mame/drivers/atarig1.cpp
@@ -78,14 +78,14 @@ WRITE16_MEMBER(atarig1_state::mo_command_w)
WRITE16_MEMBER(atarig1_state::a2d_select_w)
{
if (m_adc.found())
- m_adc->address_offset_start_w(space, offset, 0);
+ m_adc->address_offset_start_w(offset, 0);
}
READ16_MEMBER(atarig1_state::a2d_data_r)
{
if (m_adc.found())
- return m_adc->data_r(space, offset) << 8;
+ return m_adc->data_r() << 8;
else
return m_in1->read();
}
diff --git a/src/mame/drivers/atarig42.cpp b/src/mame/drivers/atarig42.cpp
index 520a76e39a8..e068a84576e 100644
--- a/src/mame/drivers/atarig42.cpp
+++ b/src/mame/drivers/atarig42.cpp
@@ -67,7 +67,7 @@ void atarig42_state::machine_reset()
WRITE8_MEMBER(atarig42_state::a2d_select_w)
{
if (m_adc.found())
- m_adc->address_offset_start_w(space, offset, 0);
+ m_adc->address_offset_start_w(offset, 0);
}
@@ -76,9 +76,9 @@ READ8_MEMBER(atarig42_state::a2d_data_r)
if (!m_adc.found())
return 0xff;
- uint8_t result = m_adc->data_r(space, 0);
+ uint8_t result = m_adc->data_r();
if (!machine().side_effects_disabled())
- m_adc->address_offset_start_w(space, offset, 0);
+ m_adc->address_offset_start_w(offset, 0);
return result;
}
diff --git a/src/mame/drivers/atarigt.cpp b/src/mame/drivers/atarigt.cpp
index 78ce47bb16a..05cbacb2387 100644
--- a/src/mame/drivers/atarigt.cpp
+++ b/src/mame/drivers/atarigt.cpp
@@ -185,9 +185,9 @@ READ8_MEMBER(atarigt_state::analog_port_r)
return 0xff;
}
#else
- uint8_t result = m_adc->data_r(space, 0);
+ uint8_t result = m_adc->data_r();
if (!machine().side_effects_disabled())
- m_adc->address_offset_start_w(space, offset, 0);
+ m_adc->address_offset_start_w(offset, 0);
return result;
#endif
}
diff --git a/src/mame/drivers/atarigx2.cpp b/src/mame/drivers/atarigx2.cpp
index 330245e37e5..eeff921d54e 100644
--- a/src/mame/drivers/atarigx2.cpp
+++ b/src/mame/drivers/atarigx2.cpp
@@ -77,9 +77,9 @@ READ32_MEMBER(atarigx2_state::special_port3_r)
READ8_MEMBER(atarigx2_state::a2d_data_r)
{
- uint8_t result = m_adc->data_r(space, 0);
+ uint8_t result = m_adc->data_r();
if (!machine().side_effects_disabled())
- m_adc->address_offset_start_w(space, offset, 0);
+ m_adc->address_offset_start_w(offset, 0);
return result;
}
diff --git a/src/mame/drivers/atarisy1.cpp b/src/mame/drivers/atarisy1.cpp
index 2c56c093bb1..b2fea90b635 100644
--- a/src/mame/drivers/atarisy1.cpp
+++ b/src/mame/drivers/atarisy1.cpp
@@ -261,7 +261,7 @@ READ8_MEMBER(atarisy1_state::adc_r)
if (!m_adc.found())
return 0xff;
- int value = m_adc->data_r(space, 0);
+ int value = m_adc->data_r();
if (!machine().side_effects_disabled())
adc_w(space, offset, 0);
@@ -275,7 +275,7 @@ WRITE8_MEMBER(atarisy1_state::adc_w)
if (!m_adc.found())
return;
- m_adc->address_offset_start_w(space, offset & 7, 0);
+ m_adc->address_offset_start_w(offset & 7, 0);
/* the A4 bit enables/disables joystick IRQs */
m_ajsint->in_w<0>(!BIT(offset, 3));
diff --git a/src/mame/drivers/backfire.cpp b/src/mame/drivers/backfire.cpp
index 7cc6d9a3bc7..10245224097 100644
--- a/src/mame/drivers/backfire.cpp
+++ b/src/mame/drivers/backfire.cpp
@@ -194,7 +194,7 @@ template<int Layer> WRITE32_MEMBER(backfire_state::pf_rowscroll_w){ data &= 0x00
READ32_MEMBER(backfire_state::pot_select_r)
{
if (!machine().side_effects_disabled())
- m_adc->address_offset_start_w(space, offset, 0);
+ m_adc->address_offset_start_w(offset, 0);
return 0;
}
diff --git a/src/mame/drivers/bbc.cpp b/src/mame/drivers/bbc.cpp
index c2ade862351..acf96cf8d42 100644
--- a/src/mame/drivers/bbc.cpp
+++ b/src/mame/drivers/bbc.cpp
@@ -946,7 +946,7 @@ void bbc_state::bbcb(machine_config &config)
m_via6522_1->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<2>));
/* adc */
- UPD7002(config, m_upd7002, 0);
+ UPD7002(config, m_upd7002, 16_MHz_XTAL / 16);
m_upd7002->set_get_analogue_callback(FUNC(bbc_state::get_analogue_input), this);
m_upd7002->set_eoc_callback(FUNC(bbc_state::upd7002_eoc), this);
@@ -1401,7 +1401,7 @@ void bbcm_state::bbcm(machine_config &config)
m_acia_clock->signal_handler().set(FUNC(bbc_state::write_acia_clock));
/* adc */
- UPD7002(config, m_upd7002, 0);
+ UPD7002(config, m_upd7002, 16_MHz_XTAL / 16);
m_upd7002->set_get_analogue_callback(FUNC(bbc_state::get_analogue_input), this);
m_upd7002->set_eoc_callback(FUNC(bbc_state::upd7002_eoc), this);
diff --git a/src/mame/drivers/c2color.cpp b/src/mame/drivers/c2color.cpp
new file mode 100644
index 00000000000..bb803d96e0a
--- /dev/null
+++ b/src/mame/drivers/c2color.cpp
@@ -0,0 +1,127 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+/******************************************************************************
+
+ basic information
+ https://gbatemp.net/threads/the-c2-color-game-console-an-obscure-chinese-handheld.509320/
+
+ "The C2 is a glorious console with a D-Pad, Local 2.4GHz WiFi, Cartridge slot, A, B, and C buttons,
+ and has micro usb power! Don't be fooled though, there is no lithium battery, so you have to put in
+ 3 AA batteries if you don't want to play with it tethered to a charger.
+
+ It comes with a built in game based on the roco kingdom characters.
+
+ In addition, there is a slot on the side of the console allowing cards to be swiped through. Those
+ cards can add characters to the game. The console scans the barcode and a new character or item appears in the game for you to use.
+
+ The C2 comes with 9 holographic game cards that will melt your eyes."
+
+ also includes a link to the following video
+ https://www.youtube.com/watch?v=D3XO4aTZEko
+
+ TODO:
+ identify CPU type, and if the system ROM is needed to run carts or not
+
+*******************************************************************************/
+
+#include "emu.h"
+
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
+
+#include "screen.h"
+#include "emupal.h"
+#include "softlist.h"
+#include "speaker.h"
+
+class c2_color_state : public driver_device
+{
+public:
+ c2_color_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_cart(*this, "cartslot")
+ , m_cart_region(nullptr)
+ , m_palette(*this, "palette")
+ , m_screen(*this, "screen")
+ { }
+
+ void c2_color(machine_config &config);
+ void leapfrog_mfleappad(machine_config &config);
+
+private:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart);
+
+ required_device<generic_slot_device> m_cart;
+ memory_region *m_cart_region;
+ required_device<palette_device> m_palette;
+ required_device<screen_device> m_screen;
+};
+
+uint32_t c2_color_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+{
+ return 0;
+}
+
+
+
+
+void c2_color_state::machine_start()
+{
+ // if there's a cart, override the standard mapping
+ if (m_cart && m_cart->exists())
+ {
+ std::string region_tag;
+ m_cart_region = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
+ }
+}
+
+void c2_color_state::machine_reset()
+{
+}
+
+DEVICE_IMAGE_LOAD_MEMBER(c2_color_state, cart)
+{
+ uint32_t size = m_cart->common_get_size("rom");
+
+ m_cart->rom_alloc(size, GENERIC_ROM16_WIDTH, ENDIANNESS_LITTLE);
+ m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
+
+ return image_init_result::PASS;
+}
+
+static INPUT_PORTS_START( c2_color )
+INPUT_PORTS_END
+
+void c2_color_state::c2_color(machine_config &config)
+{
+ // unknown CPU
+
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(64*8, 32*8);
+ m_screen->set_visarea(0*8, 40*8-1, 0*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(c2_color_state::screen_update));
+ m_screen->set_palette(m_palette);
+
+ PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x200);
+
+ GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "c2color_cart");
+ m_cart->set_width(GENERIC_ROM16_WIDTH);
+ m_cart->set_device_load(device_image_load_delegate(&c2_color_state::device_image_load_cart, this));
+
+ SOFTWARE_LIST(config, "cart_list").set_original("c2color_cart");
+}
+
+ROM_START( c2color )
+ ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_LOAD( "system.rom", 0x000000, 0x400000, NO_DUMP ) // must have an internal rom for the built in game, unknown size etc.
+ROM_END
+
+// year, name, parent, compat, machine, input, class, init, company, fullname, flags
+CONS( 201?, c2color, 0, 0, c2_color, c2_color, c2_color_state, empty_init, "<unknown>", "C2 Color", MACHINE_IS_SKELETON )
diff --git a/src/mame/drivers/cardinal.cpp b/src/mame/drivers/cardinal.cpp
index 36d553e1545..30890c3299f 100644
--- a/src/mame/drivers/cardinal.cpp
+++ b/src/mame/drivers/cardinal.cpp
@@ -19,7 +19,7 @@
#include "bus/rs232/rs232.h"
#include "machine/eepromser.h"
#include "sound/spkrdev.h"
-//#include "video/crt9028.h"
+#include "video/crt9028.h"
#include "screen.h"
#include "speaker.h"
@@ -29,6 +29,7 @@ public:
cardinal_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_eeprom(*this, "eeprom")
+ , m_vtlc(*this, "vtlc")
, m_speaker(*this, "speaker")
, m_rs232(*this, "rs232")
, m_address_select(false)
@@ -41,8 +42,6 @@ protected:
virtual void machine_start() override;
private:
- u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
-
u8 p1_r();
void p1_w(u8 data);
@@ -51,9 +50,10 @@ private:
void prog_map(address_map &map);
void ext_map(address_map &map);
+ void ram_map(address_map &map);
required_device<eeprom_serial_93cxx_device> m_eeprom;
- //required_device<crt9028_device> m_vtlc;
+ required_device<crt9028_device> m_vtlc;
required_device<speaker_sound_device> m_speaker;
required_device<rs232_port_device> m_rs232;
@@ -66,11 +66,6 @@ void cardinal_state::machine_start()
save_item(NAME(m_address_select));
}
-u32 cardinal_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
-{
- return 0;
-}
-
u8 cardinal_state::p1_r()
{
return 0x9f | (m_eeprom->do_read() << 5) | (0 /*m_rs232->cts_r()*/ << 6);
@@ -90,12 +85,12 @@ void cardinal_state::p1_w(u8 data)
u8 cardinal_state::vtlc_r()
{
- return 0xff;
+ return m_vtlc->read(m_address_select);
}
void cardinal_state::vtlc_w(u8 data)
{
- logerror("%s: Writing %02X to CRT9028 %s register\n", machine().describe_context(), data, m_address_select ? "address" : "data");
+ m_vtlc->write(m_address_select, data);
}
void cardinal_state::prog_map(address_map &map)
@@ -108,6 +103,11 @@ void cardinal_state::ext_map(address_map &map)
map(0, 0).mirror(0xffff).rw(FUNC(cardinal_state::vtlc_r), FUNC(cardinal_state::vtlc_w));
}
+void cardinal_state::ram_map(address_map &map)
+{
+ map(0x000, 0x7ff).ram();
+}
+
static INPUT_PORTS_START(cardinal)
PORT_START("P3")
@@ -133,13 +133,12 @@ void cardinal_state::cardinal(machine_config &config)
EEPROM_93C06_16BIT(config, m_eeprom);
- //CRT9028_000(config, m_vtlc, 10.92_MHz_XTAL);
- //m_vtlc->set_screen("screen");
- //m_vtlc->vsync_callback().set_inputline("maincpu", MCS51_INT0_LINE);
+ CRT9028_000(config, m_vtlc, 10.92_MHz_XTAL);
+ m_vtlc->set_screen("screen");
+ m_vtlc->set_addrmap(0, &cardinal_state::ram_map);
+ m_vtlc->vsync_callback().set_inputline("maincpu", MCS51_INT0_LINE).invert();
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_raw(10.92_MHz_XTAL, 700, 0, 560, 260, 0, 240);
- screen.set_screen_update(FUNC(cardinal_state::screen_update));
+ SCREEN(config, "screen", SCREEN_TYPE_RASTER);
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.05);
diff --git a/src/mame/drivers/eprom.cpp b/src/mame/drivers/eprom.cpp
index e79e96bd01e..8383a941b6a 100644
--- a/src/mame/drivers/eprom.cpp
+++ b/src/mame/drivers/eprom.cpp
@@ -83,9 +83,9 @@ READ8_MEMBER(eprom_state::adc_r)
if (!m_adc.found())
return 0xff;
- uint8_t result = m_adc->data_r(space, 0);
+ uint8_t result = m_adc->data_r();
if (!machine().side_effects_disabled())
- m_adc->address_offset_start_w(space, offset, 0);
+ m_adc->address_offset_start_w(offset, 0);
return result;
}
diff --git a/src/mame/drivers/gridcomp.cpp b/src/mame/drivers/gridcomp.cpp
index 6b3c59c609e..8eb04d479b9 100644
--- a/src/mame/drivers/gridcomp.cpp
+++ b/src/mame/drivers/gridcomp.cpp
@@ -367,11 +367,12 @@ INPUT_PORTS_END
* IRQ6 8087
* IRQ7 ring
*/
-MACHINE_CONFIG_START(gridcomp_state::grid1101)
- MCFG_DEVICE_ADD("maincpu", I8086, XTAL(15'000'000) / 3)
- MCFG_DEVICE_PROGRAM_MAP(grid1101_map)
- MCFG_DEVICE_IO_MAP(grid1101_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(gridcomp_state, irq_callback)
+void gridcomp_state::grid1101(machine_config &config)
+{
+ I8086(config, m_maincpu, XTAL(15'000'000) / 3);
+ m_maincpu->set_addrmap(AS_PROGRAM, &gridcomp_state::grid1101_map);
+ m_maincpu->set_addrmap(AS_IO, &gridcomp_state::grid1101_io);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(gridcomp_state::irq_callback));
MCFG_MACHINE_START_OVERRIDE(gridcomp_state, gridcomp)
MCFG_MACHINE_RESET_OVERRIDE(gridcomp_state, gridcomp)
@@ -380,14 +381,14 @@ MACHINE_CONFIG_START(gridcomp_state::grid1101)
m_osp->irq().set_inputline("maincpu", 0);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00);
- MCFG_SCREEN_ADD_MONOCHROME("screen", LCD, rgb_t::amber()) // actually a kind of EL display
- MCFG_SCREEN_UPDATE_DRIVER(gridcomp_state, screen_update_110x)
- MCFG_SCREEN_RAW_PARAMS(XTAL(15'000'000)/2, 424, 0, 320, 262, 0, 240) // XXX 66 Hz refresh
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(I80130_TAG, i80130_device, ir3_w))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); // actually a kind of EL display
+ screen.set_color(rgb_t::amber());
+ screen.set_screen_update(FUNC(gridcomp_state::screen_update_110x));
+ screen.set_raw(XTAL(15'000'000)/2, 424, 0, 320, 262, 0, 240); // XXX 66 Hz refresh
+ screen.screen_vblank().set(m_osp, FUNC(i80130_device::ir3_w));
+ screen.set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
@@ -411,23 +412,24 @@ MACHINE_CONFIG_START(gridcomp_state::grid1101)
hpib.srq_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_srq_w));
hpib.atn_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w));
hpib.ren_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_ren_w));
- MCFG_IEEE488_BUS_ADD()
- MCFG_IEEE488_EOI_CALLBACK(WRITELINE("hpib", tms9914_device, eoi_w))
- MCFG_IEEE488_DAV_CALLBACK(WRITELINE("hpib", tms9914_device, dav_w))
- MCFG_IEEE488_NRFD_CALLBACK(WRITELINE("hpib", tms9914_device, nrfd_w))
- MCFG_IEEE488_NDAC_CALLBACK(WRITELINE("hpib", tms9914_device, ndac_w))
- MCFG_IEEE488_IFC_CALLBACK(WRITELINE("hpib", tms9914_device, ifc_w))
- MCFG_IEEE488_SRQ_CALLBACK(WRITELINE("hpib", tms9914_device, srq_w))
- MCFG_IEEE488_ATN_CALLBACK(WRITELINE("hpib", tms9914_device, atn_w))
- MCFG_IEEE488_REN_CALLBACK(WRITELINE("hpib", tms9914_device, ren_w))
- MCFG_IEEE488_SLOT_ADD("ieee_rem", 0, remote488_devices, nullptr)
+
+ ieee488_device &ieee(IEEE488(config, IEEE488_TAG));
+ ieee.eoi_callback().set("hpib", FUNC(tms9914_device::eoi_w));
+ ieee.dav_callback().set("hpib", FUNC(tms9914_device::dav_w));
+ ieee.nrfd_callback().set("hpib", FUNC(tms9914_device::nrfd_w));
+ ieee.ndac_callback().set("hpib", FUNC(tms9914_device::ndac_w));
+ ieee.ifc_callback().set("hpib", FUNC(tms9914_device::ifc_w));
+ ieee.srq_callback().set("hpib", FUNC(tms9914_device::srq_w));
+ ieee.atn_callback().set("hpib", FUNC(tms9914_device::atn_w));
+ ieee.ren_callback().set("hpib", FUNC(tms9914_device::ren_w));
+ IEEE488_SLOT(config, "ieee_rem", 0, remote488_devices, nullptr);
I8274_NEW(config, m_uart8274, XTAL(4'032'000));
- MCFG_DEVICE_ADD("modem", I8255, 0)
+ I8255(config, "modem", 0);
RAM(config, m_ram).set_default_size("256K").set_default_value(0);
-MACHINE_CONFIG_END
+}
void gridcomp_state::grid1109(machine_config &config)
{
@@ -435,12 +437,12 @@ void gridcomp_state::grid1109(machine_config &config)
m_ram->set_default_size("512K");
}
-MACHINE_CONFIG_START(gridcomp_state::grid1121)
+void gridcomp_state::grid1121(machine_config &config)
+{
grid1101(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(XTAL(24'000'000) / 3) // XXX
- MCFG_DEVICE_PROGRAM_MAP(grid1121_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_clock(XTAL(24'000'000) / 3); // XXX
+ m_maincpu->set_addrmap(AS_PROGRAM, &gridcomp_state::grid1121_map);
+}
void gridcomp_state::grid1129(machine_config &config)
{
@@ -448,12 +450,12 @@ void gridcomp_state::grid1129(machine_config &config)
m_ram->set_default_size("512K");
}
-MACHINE_CONFIG_START(gridcomp_state::grid1131)
+void gridcomp_state::grid1131(machine_config &config)
+{
grid1121(config);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(gridcomp_state, screen_update_113x)
- MCFG_SCREEN_RAW_PARAMS(XTAL(15'000'000)/2, 720, 0, 512, 262, 0, 240) // XXX
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(gridcomp_state::screen_update_113x));
+ subdevice<screen_device>("screen")->set_raw(XTAL(15'000'000)/2, 720, 0, 512, 262, 0, 240); // XXX
+}
void gridcomp_state::grid1139(machine_config &config)
{
diff --git a/src/mame/drivers/horizon.cpp b/src/mame/drivers/horizon.cpp
index cd8eaeb8100..eb7f424f389 100644
--- a/src/mame/drivers/horizon.cpp
+++ b/src/mame/drivers/horizon.cpp
@@ -48,6 +48,7 @@ involves replacing the XTAL and reconnecting one jumper.
#define I8251_R_TAG "4a"
#define RS232_A_TAG "rs232a"
#define RS232_B_TAG "rs232b"
+#define S100_TAG "s100"
class horizon_state : public driver_device
{
@@ -57,6 +58,7 @@ public:
, m_maincpu(*this, Z80_TAG)
, m_usart_l(*this, I8251_L_TAG)
, m_usart_r(*this, I8251_R_TAG)
+ , m_s100(*this, S100_TAG)
{ }
void horizon(machine_config &config);
@@ -72,6 +74,7 @@ private:
required_device<cpu_device> m_maincpu;
required_device<i8251_device> m_usart_l;
required_device<i8251_device> m_usart_r;
+ required_device<s100_bus_device> m_s100;
};
@@ -179,11 +182,12 @@ static void horizon_s100_cards(device_slot_interface &device)
// MACHINE_CONFIG( horizon )
//-------------------------------------------------
-MACHINE_CONFIG_START(horizon_state::horizon)
+void horizon_state::horizon(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(Z80_TAG, Z80, XTAL(8'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(horizon_mem)
- MCFG_DEVICE_IO_MAP(horizon_io)
+ Z80(config, m_maincpu, XTAL(8'000'000) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &horizon_state::horizon_mem);
+ m_maincpu->set_addrmap(AS_IO, &horizon_state::horizon_io);
// devices
I8251(config, m_usart_l, 0);
@@ -206,33 +210,31 @@ MACHINE_CONFIG_START(horizon_state::horizon)
rs232b.dsr_handler().set(m_usart_r, FUNC(i8251_device::write_dsr));
// S-100
- MCFG_DEVICE_ADD("s100", S100_BUS, XTAL(8'000'000) / 4)
- MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT))
- //MCFG_S100_SLOT_ADD("s100:1", horizon_s100_cards, nullptr, nullptr) // CPU
- MCFG_S100_SLOT_ADD("s100:2", horizon_s100_cards, nullptr) // RAM
- MCFG_S100_SLOT_ADD("s100:3", horizon_s100_cards, "mdsad") // MDS
- MCFG_S100_SLOT_ADD("s100:4", horizon_s100_cards, nullptr) // FPB
- MCFG_S100_SLOT_ADD("s100:5", horizon_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD("s100:6", horizon_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD("s100:7", horizon_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD("s100:8", horizon_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD("s100:9", horizon_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD("s100:10", horizon_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD("s100:11", horizon_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD("s100:12", horizon_s100_cards, nullptr)
+ S100_BUS(config, m_s100, XTAL(8'000'000) / 4);
+ m_s100->rdy().set_inputline(m_maincpu, Z80_INPUT_LINE_BOGUSWAIT);
+ //S100_SLOT(config, S100_TAG":1", horizon_s100_cards, nullptr, nullptr); // CPU
+ S100_SLOT(config, "s100:2", horizon_s100_cards, nullptr); // RAM
+ S100_SLOT(config, "s100:3", horizon_s100_cards, "mdsad"); // MDS
+ S100_SLOT(config, "s100:4", horizon_s100_cards, nullptr); // FPB
+ S100_SLOT(config, "s100:5", horizon_s100_cards, nullptr);
+ S100_SLOT(config, "s100:6", horizon_s100_cards, nullptr);
+ S100_SLOT(config, "s100:7", horizon_s100_cards, nullptr);
+ S100_SLOT(config, "s100:8", horizon_s100_cards, nullptr);
+ S100_SLOT(config, "s100:9", horizon_s100_cards, nullptr);
+ S100_SLOT(config, "s100:10", horizon_s100_cards, nullptr);
+ S100_SLOT(config, "s100:11", horizon_s100_cards, nullptr);
+ S100_SLOT(config, "s100:12", horizon_s100_cards, nullptr);
// software list
SOFTWARE_LIST(config, "flop_list").set_original("horizon");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(horizon_state::horizon2mhz)
+void horizon_state::horizon2mhz(machine_config &config)
+{
horizon(config);
- MCFG_DEVICE_MODIFY("z80")
- MCFG_DEVICE_CLOCK(XTAL(4'000'000) / 2)
-
- MCFG_DEVICE_MODIFY("s100")
- MCFG_DEVICE_CLOCK(XTAL(4'000'000) / 2)
-MACHINE_CONFIG_END
+ m_maincpu->set_clock(XTAL(4'000'000) / 2);
+ m_s100->set_clock(XTAL(4'000'000) / 2);
+}
diff --git a/src/mame/drivers/hp64k.cpp b/src/mame/drivers/hp64k.cpp
index 93ae1412fe4..7dd4ce3f03a 100644
--- a/src/mame/drivers/hp64k.cpp
+++ b/src/mame/drivers/hp64k.cpp
@@ -1372,15 +1372,16 @@ INPUT_PORTS_END
static void hp64k_floppies(device_slot_interface &device)
{
- device.option_add("525dd" , FLOPPY_525_DD);
+ device.option_add("525dd", FLOPPY_525_DD);
}
-MACHINE_CONFIG_START(hp64k_state::hp64k)
- HP_5061_3011(config , m_cpu , 6250000);
+void hp64k_state::hp64k(machine_config &config)
+{
+ HP_5061_3011(config, m_cpu, 6250000);
m_cpu->set_rw_cycles(6 , 6);
m_cpu->set_relative_mode(true);
- m_cpu->set_addrmap(AS_PROGRAM , &hp64k_state::cpu_mem_map);
- m_cpu->set_addrmap(AS_IO , &hp64k_state::cpu_io_map);
+ m_cpu->set_addrmap(AS_PROGRAM, &hp64k_state::cpu_mem_map);
+ m_cpu->set_addrmap(AS_IO, &hp64k_state::cpu_io_map);
m_cpu->set_irq_acknowledge_callback(FUNC(hp64k_state::hp64k_irq_callback));
// Actual keyboard refresh rate should be between 1 and 2 kHz
@@ -1397,11 +1398,12 @@ MACHINE_CONFIG_START(hp64k_state::hp64k)
m_crtc->drq_wr_callback().set(FUNC(hp64k_state::hp64k_crtc_drq_w));
m_crtc->vrtc_wr_callback().set(FUNC(hp64k_state::hp64k_crtc_vrtc_w));
- MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green())
- MCFG_SCREEN_UPDATE_DEVICE("crtc", i8275_device, screen_update)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(720, 390)
- MCFG_SCREEN_VISIBLE_AREA(0, 720-1, 0, 390-1)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_color(rgb_t::green());
+ screen.set_screen_update("crtc", FUNC(i8275_device::screen_update));
+ screen.set_refresh_hz(60);
+ screen.set_size(720, 390);
+ screen.set_visarea(0, 720-1, 0, 390-1);
PALETTE(config, m_palette, palette_device::MONOCHROME_HIGHLIGHT);
FD1791(config, m_fdc, 4_MHz_XTAL / 4);
@@ -1463,21 +1465,21 @@ MACHINE_CONFIG_START(hp64k_state::hp64k)
m_phi->signal_write_cb<phi_device::PHI_488_ATN>().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w));
m_phi->signal_write_cb<phi_device::PHI_488_REN>().set(IEEE488_TAG, FUNC(ieee488_device::host_ren_w));
- MCFG_IEEE488_BUS_ADD()
- MCFG_IEEE488_EOI_CALLBACK(WRITELINE(m_phi, phi_device, eoi_w))
- MCFG_IEEE488_DAV_CALLBACK(WRITELINE(m_phi, phi_device, dav_w))
- MCFG_IEEE488_NRFD_CALLBACK(WRITELINE(m_phi, phi_device, nrfd_w))
- MCFG_IEEE488_NDAC_CALLBACK(WRITELINE(m_phi, phi_device, ndac_w))
- MCFG_IEEE488_IFC_CALLBACK(WRITELINE(m_phi, phi_device, ifc_w))
- MCFG_IEEE488_SRQ_CALLBACK(WRITELINE(m_phi, phi_device, srq_w))
- MCFG_IEEE488_ATN_CALLBACK(WRITELINE(m_phi, phi_device, atn_w))
- MCFG_IEEE488_REN_CALLBACK(WRITELINE(m_phi, phi_device, ren_w))
- MCFG_IEEE488_DIO_CALLBACK(WRITE8(m_phi, phi_device , bus_dio_w))
- MCFG_IEEE488_SLOT_ADD("ieee_rem" , 0 , remote488_devices , nullptr)
-MACHINE_CONFIG_END
+ ieee488_device &ieee(IEEE488(config, IEEE488_TAG));
+ ieee.eoi_callback().set(m_phi, FUNC(phi_device::eoi_w));
+ ieee.dav_callback().set(m_phi, FUNC(phi_device::dav_w));
+ ieee.nrfd_callback().set(m_phi, FUNC(phi_device::nrfd_w));
+ ieee.ndac_callback().set(m_phi, FUNC(phi_device::ndac_w));
+ ieee.ifc_callback().set(m_phi, FUNC(phi_device::ifc_w));
+ ieee.srq_callback().set(m_phi, FUNC(phi_device::srq_w));
+ ieee.atn_callback().set(m_phi, FUNC(phi_device::atn_w));
+ ieee.ren_callback().set(m_phi, FUNC(phi_device::ren_w));
+ ieee.dio_callback().set(m_phi, FUNC(phi_device::bus_dio_w));
+ IEEE488_SLOT(config, "ieee_rem", 0, remote488_devices, nullptr);
+}
ROM_START(hp64k)
- ROM_REGION(0x8000 , "cpu" , ROMREGION_16BIT | ROMREGION_BE | ROMREGION_INVERT)
+ ROM_REGION(0x8000, "cpu" , ROMREGION_16BIT | ROMREGION_BE | ROMREGION_INVERT)
ROM_LOAD16_BYTE("64100_80022.bin" , 0x0000 , 0x1000 , CRC(38b2aae5) SHA1(bfd0f126bfaf3724dc501979ad2d46afc41913aa))
ROM_LOAD16_BYTE("64100_80020.bin" , 0x0001 , 0x1000 , CRC(ac01b436) SHA1(be1e827ea1393a95abb02a52ab5cc35dc2cd96e4))
ROM_LOAD16_BYTE("64100_80023.bin" , 0x2000 , 0x1000 , CRC(6b4bc2ce) SHA1(00e6c58ccae9640dc81cb3e92db90a8c69b02a93))
diff --git a/src/mame/drivers/hp_ipc.cpp b/src/mame/drivers/hp_ipc.cpp
index 11ed4d2b7b0..098472e00ac 100644
--- a/src/mame/drivers/hp_ipc.cpp
+++ b/src/mame/drivers/hp_ipc.cpp
@@ -737,9 +737,10 @@ static void hp_ipc_floppies(device_slot_interface &device)
* 2 HP-HIL devices (keyboard, mouse)
* 1 Real-time clock
*/
-MACHINE_CONFIG_START(hp_ipc_state::hp_ipc_base)
- MCFG_DEVICE_ADD("maincpu", M68000, 15.92_MHz_XTAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(hp_ipc_mem_outer)
+void hp_ipc_state::hp_ipc_base(machine_config &config)
+{
+ M68000(config, m_maincpu, 15.92_MHz_XTAL / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &hp_ipc_state::hp_ipc_mem_outer);
HP1LL3(config , m_gpu , 24_MHz_XTAL / 8).set_screen("screen");
@@ -774,21 +775,23 @@ MACHINE_CONFIG_START(hp_ipc_state::hp_ipc_base)
hpib.srq_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_srq_w));
hpib.atn_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w));
hpib.ren_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_ren_w));
- MCFG_IEEE488_BUS_ADD()
- MCFG_IEEE488_EOI_CALLBACK(WRITELINE("hpib" , tms9914_device , eoi_w))
- MCFG_IEEE488_DAV_CALLBACK(WRITELINE("hpib" , tms9914_device , dav_w))
- MCFG_IEEE488_NRFD_CALLBACK(WRITELINE("hpib" , tms9914_device , nrfd_w))
- MCFG_IEEE488_NDAC_CALLBACK(WRITELINE("hpib" , tms9914_device , ndac_w))
- MCFG_IEEE488_IFC_CALLBACK(WRITELINE("hpib" , tms9914_device , ifc_w))
- MCFG_IEEE488_SRQ_CALLBACK(WRITELINE("hpib" , tms9914_device , srq_w))
- MCFG_IEEE488_ATN_CALLBACK(WRITELINE("hpib" , tms9914_device , atn_w))
- MCFG_IEEE488_REN_CALLBACK(WRITELINE("hpib" , tms9914_device , ren_w))
- MCFG_IEEE488_SLOT_ADD("ieee_rem" , 0 , remote488_devices , nullptr)
+
+ ieee488_device &ieee(IEEE488(config, IEEE488_TAG));
+ ieee.eoi_callback().set("hpib" , FUNC(tms9914_device::eoi_w));
+ ieee.dav_callback().set("hpib" , FUNC(tms9914_device::dav_w));
+ ieee.nrfd_callback().set("hpib" , FUNC(tms9914_device::nrfd_w));
+ ieee.ndac_callback().set("hpib" , FUNC(tms9914_device::ndac_w));
+ ieee.ifc_callback().set("hpib" , FUNC(tms9914_device::ifc_w));
+ ieee.srq_callback().set("hpib" , FUNC(tms9914_device::srq_w));
+ ieee.atn_callback().set("hpib" , FUNC(tms9914_device::atn_w));
+ ieee.ren_callback().set("hpib" , FUNC(tms9914_device::ren_w));
+ IEEE488_SLOT(config , "ieee_rem" , 0 , remote488_devices , nullptr);
RAM(config, RAM_TAG).set_default_size("512K").set_extra_options("768K,1M,1576K,2M,3M,4M,5M,6M,7M,7680K");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(hp_ipc_state::hp_ipc)
+void hp_ipc_state::hp_ipc(machine_config &config)
+{
hp_ipc_base(config);
ADDRESS_MAP_BANK(config, "bankdev").set_map(&hp_ipc_state::hp_ipc_mem_inner_9807a).set_options(ENDIANNESS_BIG, 16, 25, 0x1000000);
@@ -807,9 +810,10 @@ MACHINE_CONFIG_START(hp_ipc_state::hp_ipc)
m_screen->set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(hp_ipc_state::hp9808a)
+void hp_ipc_state::hp9808a(machine_config &config)
+{
hp_ipc_base(config);
ADDRESS_MAP_BANK(config, "bankdev").set_map(&hp_ipc_state::hp_ipc_mem_inner_9808a).set_options(ENDIANNESS_BIG, 16, 25, 0x1000000);
@@ -825,7 +829,7 @@ MACHINE_CONFIG_START(hp_ipc_state::hp9808a)
m_screen->set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
-MACHINE_CONFIG_END
+}
ROM_START(hp_ipc)
diff --git a/src/mame/drivers/kc.cpp b/src/mame/drivers/kc.cpp
index ca2328b74eb..47ea5426710 100644
--- a/src/mame/drivers/kc.cpp
+++ b/src/mame/drivers/kc.cpp
@@ -96,7 +96,8 @@ void kc85_exp(device_slot_interface &device)
}
-MACHINE_CONFIG_START(kc_state::kc85_3)
+void kc_state::kc85_3(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, KC85_3_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &kc_state::kc85_3_mem);
@@ -121,10 +122,10 @@ MACHINE_CONFIG_START(kc_state::kc85_3)
m_z80ctc->zc_callback<2>().set(FUNC(kc_state::video_toggle_blink_state));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(28'375'160)/2, 908, 0, 320, 312, 0, 256)
- MCFG_SCREEN_UPDATE_DRIVER(kc_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(28'375'160)/2, 908, 0, 320, 312, 0, 256);
+ m_screen->set_screen_update(FUNC(kc_state::screen_update));
+ m_screen->set_palette("palette");
TIMER(config, "scantimer").configure_scanline(FUNC(kc_state::kc_scanline), "screen", 0, 1);
PALETTE(config, "palette", FUNC(kc_state::kc85_palette), KC85_PALETTE_SIZE);
@@ -138,7 +139,8 @@ MACHINE_CONFIG_START(kc_state::kc85_3)
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);
/* devices */
- MCFG_QUICKLOAD_ADD("quickload", kc_state, kc, "kcc", 2)
+ quickload_image_device &quickload(QUICKLOAD(config, "quickload", 0));
+ quickload.set_handler(snapquick_load_delegate(&QUICKLOAD_LOAD_NAME(kc_state, kc), this), "kcc", 2);
CASSETTE(config, m_cassette);
m_cassette->set_formats(kc_cassette_formats);
@@ -146,26 +148,24 @@ MACHINE_CONFIG_START(kc_state::kc85_3)
m_cassette->set_interface("kc_cass");
/* cartridge slot */
- MCFG_DEVICE_ADD("m8", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, "m011", false)
- MCFG_KCCART_SLOT_NEXT_SLOT("mc")
- MCFG_KCCART_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
- MCFG_KCCART_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
- MCFG_KCCART_SLOT_OUT_HALT_CB(INPUTLINE("maincpu", INPUT_LINE_HALT))
- MCFG_DEVICE_ADD("mc", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, nullptr, false)
- MCFG_KCCART_SLOT_NEXT_SLOT("exp")
- MCFG_KCCART_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
- MCFG_KCCART_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
- MCFG_KCCART_SLOT_OUT_HALT_CB(INPUTLINE("maincpu", INPUT_LINE_HALT))
+ KCCART_SLOT(config, m_expansions[0], kc85_cart, "m011");
+ m_expansions[0]->set_next_slot("mc");
+ m_expansions[0]->irq().set_inputline(m_maincpu, 0);
+ m_expansions[0]->nmi().set_inputline(m_maincpu, INPUT_LINE_NMI);
+ m_expansions[0]->halt().set_inputline(m_maincpu, INPUT_LINE_HALT);
+
+ KCCART_SLOT(config, m_expansions[1], kc85_cart, nullptr);
+ m_expansions[1]->set_next_slot("exp");
+ m_expansions[1]->irq().set_inputline(m_maincpu, 0);
+ m_expansions[1]->nmi().set_inputline(m_maincpu, INPUT_LINE_NMI);
+ m_expansions[1]->halt().set_inputline(m_maincpu, INPUT_LINE_HALT);
/* expansion interface */
- MCFG_DEVICE_ADD("exp", KCEXP_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_exp, nullptr, false)
- MCFG_KCEXP_SLOT_NEXT_SLOT(nullptr)
- MCFG_KCEXP_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
- MCFG_KCEXP_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
- MCFG_KCEXP_SLOT_OUT_HALT_CB(INPUTLINE("maincpu", INPUT_LINE_HALT))
+ KCEXP_SLOT(config, m_expansions[2], kc85_exp, nullptr);
+ m_expansions[2]->set_next_slot(nullptr);
+ m_expansions[2]->irq().set_inputline(m_maincpu, 0);
+ m_expansions[2]->nmi().set_inputline(m_maincpu, INPUT_LINE_NMI);
+ m_expansions[2]->halt().set_inputline(m_maincpu, INPUT_LINE_HALT);
/* Software lists */
SOFTWARE_LIST(config, "cart_list").set_original("kc_cart");
@@ -174,10 +174,10 @@ MACHINE_CONFIG_START(kc_state::kc85_3)
/* internal ram */
RAM(config, m_ram).set_default_size("16K");
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(kc85_4_state::kc85_4)
+void kc85_4_state::kc85_4(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, KC85_4_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &kc85_4_state::kc85_4_mem);
@@ -201,10 +201,10 @@ MACHINE_CONFIG_START(kc85_4_state::kc85_4)
m_z80ctc->zc_callback<2>().set(FUNC(kc_state::video_toggle_blink_state));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(28'375'160)/2, 908, 0, 320, 312, 0, 256)
- MCFG_SCREEN_UPDATE_DRIVER(kc85_4_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(28'375'160)/2, 908, 0, 320, 312, 0, 256);
+ m_screen->set_screen_update(FUNC(kc85_4_state::screen_update));
+ m_screen->set_palette("palette");
TIMER(config, "scantimer").configure_scanline(FUNC(kc85_4_state::kc_scanline), "screen", 0, 1);
PALETTE(config, "palette", FUNC(kc85_4_state::kc85_palette), KC85_PALETTE_SIZE);
@@ -218,7 +218,8 @@ MACHINE_CONFIG_START(kc85_4_state::kc85_4)
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);
/* devices */
- MCFG_QUICKLOAD_ADD("quickload", kc_state, kc, "kcc", 2)
+ quickload_image_device &quickload(QUICKLOAD(config, "quickload", 0));
+ quickload.set_handler(snapquick_load_delegate(&QUICKLOAD_LOAD_NAME(kc_state, kc), this), "kcc", 2);
CASSETTE(config, m_cassette);
m_cassette->set_formats(kc_cassette_formats);
@@ -226,26 +227,24 @@ MACHINE_CONFIG_START(kc85_4_state::kc85_4)
m_cassette->set_interface("kc_cass");
/* cartridge slot */
- MCFG_DEVICE_ADD("m8", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, "m011", false)
- MCFG_KCCART_SLOT_NEXT_SLOT("mc")
- MCFG_KCCART_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
- MCFG_KCCART_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
- MCFG_KCCART_SLOT_OUT_HALT_CB(INPUTLINE("maincpu", INPUT_LINE_HALT))
- MCFG_DEVICE_ADD("mc", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, nullptr, false)
- MCFG_KCCART_SLOT_NEXT_SLOT("exp")
- MCFG_KCCART_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
- MCFG_KCCART_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
- MCFG_KCCART_SLOT_OUT_HALT_CB(INPUTLINE("maincpu", INPUT_LINE_HALT))
+ KCCART_SLOT(config, m_expansions[0], kc85_cart, "m011");
+ m_expansions[0]->set_next_slot("mc");
+ m_expansions[0]->irq().set_inputline(m_maincpu, 0);
+ m_expansions[0]->nmi().set_inputline(m_maincpu, INPUT_LINE_NMI);
+ m_expansions[0]->halt().set_inputline(m_maincpu, INPUT_LINE_HALT);
+
+ KCCART_SLOT(config, m_expansions[1], kc85_cart, nullptr);
+ m_expansions[1]->set_next_slot("exp");
+ m_expansions[1]->irq().set_inputline(m_maincpu, 0);
+ m_expansions[1]->nmi().set_inputline(m_maincpu, INPUT_LINE_NMI);
+ m_expansions[1]->halt().set_inputline(m_maincpu, INPUT_LINE_HALT);
/* expansion interface */
- MCFG_DEVICE_ADD("exp", KCEXP_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_exp, nullptr, false)
- MCFG_KCEXP_SLOT_NEXT_SLOT(nullptr)
- MCFG_KCEXP_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
- MCFG_KCEXP_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
- MCFG_KCEXP_SLOT_OUT_HALT_CB(INPUTLINE("maincpu", INPUT_LINE_HALT))
+ KCEXP_SLOT(config, m_expansions[2], kc85_exp, nullptr);
+ m_expansions[2]->set_next_slot(nullptr);
+ m_expansions[2]->irq().set_inputline(m_maincpu, 0);
+ m_expansions[2]->nmi().set_inputline(m_maincpu, INPUT_LINE_NMI);
+ m_expansions[2]->halt().set_inputline(m_maincpu, INPUT_LINE_HALT);
/* Software lists */
SOFTWARE_LIST(config, "cart_list").set_original("kc_cart");
@@ -254,7 +253,7 @@ MACHINE_CONFIG_START(kc85_4_state::kc85_4)
/* internal ram */
RAM(config, m_ram).set_default_size("64K");
-MACHINE_CONFIG_END
+}
void kc85_4_state::kc85_5(machine_config &config)
{
diff --git a/src/mame/drivers/leapfrog_leappad.cpp b/src/mame/drivers/leapfrog_leappad.cpp
new file mode 100644
index 00000000000..6a8e6e117a3
--- /dev/null
+++ b/src/mame/drivers/leapfrog_leappad.cpp
@@ -0,0 +1,130 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+/******************************************************************************
+
+ LEAPPAD:
+ Example-Video: https://www.youtube.com/watch?v=LtUhENu5TKc
+ The LEAPPAD is basically compareable to the SEGA PICO, but without
+ Screen-Output! Each "Game" consists of two parts (Book + Cartridge).
+ Insert the cartridge into the system and add the Book on the Top of the
+ "console" and you can click on each pages and hear sounds or
+ learning-stuff on each page...
+
+ MY FIRST LEAPPAD:
+ Basically the same as the LEAPPAD, but for even younger kids! (Cartridge
+ internal PCB's are identical to LEAPPAD)
+ Example Video: https://www.youtube.com/watch?v=gsf8XYV1Tpg
+
+ Don't get confused by the name "LEAPPAD", as it looks like Leapfrog
+ also released some kind of Tablet with this name, and they even released
+ a new "LEAPPAD" in around 2016:
+ https://www.youtube.com/watch?v=MXFSgj6xLTU , which nearly looks like the
+ same, but is most likely techically completely different..
+
+*******************************************************************************/
+
+#include "emu.h"
+
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
+
+#include "screen.h"
+#include "softlist.h"
+#include "speaker.h"
+
+class leapfrog_leappad_state : public driver_device
+{
+public:
+ leapfrog_leappad_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_cart(*this, "cartslot")
+ , m_cart_region(nullptr)
+ { }
+
+ void leapfrog_leappad(machine_config &config);
+ void leapfrog_mfleappad(machine_config &config);
+
+private:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart);
+
+ required_device<generic_slot_device> m_cart;
+ memory_region *m_cart_region;
+};
+
+
+
+void leapfrog_leappad_state::machine_start()
+{
+ // if there's a cart, override the standard mapping
+ if (m_cart && m_cart->exists())
+ {
+ std::string region_tag;
+ m_cart_region = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
+ }
+}
+
+void leapfrog_leappad_state::machine_reset()
+{
+}
+
+DEVICE_IMAGE_LOAD_MEMBER(leapfrog_leappad_state, cart)
+{
+ uint32_t size = m_cart->common_get_size("rom");
+
+ m_cart->rom_alloc(size, GENERIC_ROM16_WIDTH, ENDIANNESS_LITTLE);
+ m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
+
+ return image_init_result::PASS;
+}
+
+static INPUT_PORTS_START( leapfrog_leappad )
+INPUT_PORTS_END
+
+
+
+void leapfrog_leappad_state::leapfrog_leappad(machine_config &config)
+{
+ //ARCA5(config, m_maincpu, 96000000/10); // LeapPad Leapfrog 05-9-01 FS80A363 (doesn't appear to be Arcompact, what is it?)
+ //m_maincpu->set_addrmap(AS_PROGRAM, &leapfrog_leappad_state::map);
+
+ // screenless
+
+ GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "leapfrog_leappad_cart");
+ m_cart->set_width(GENERIC_ROM16_WIDTH);
+ m_cart->set_device_load(device_image_load_delegate(&leapfrog_leappad_state::device_image_load_cart, this));
+
+ SOFTWARE_LIST(config, "cart_list").set_original("leapfrog_leappad_cart");
+}
+
+void leapfrog_leappad_state::leapfrog_mfleappad(machine_config &config)
+{
+ //ARCA5(config, m_maincpu, 96000000/10); // LeapPad Leapfrog 05-9-01 FS80A363 (doesn't appear to be Arcompact, what is it?)
+ //m_maincpu->set_addrmap(AS_PROGRAM, &leapfrog_leappad_state::map);
+
+ // screenless
+
+ GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "leapfrog_mfleappad_cart");
+ m_cart->set_width(GENERIC_ROM16_WIDTH);
+ m_cart->set_device_load(device_image_load_delegate(&leapfrog_leappad_state::device_image_load_cart, this));
+
+ SOFTWARE_LIST(config, "cart_list").set_original("leapfrog_mfleappad_cart");
+}
+
+// both of these contain the string "Have you copied our ROM?" near the date codes
+
+ROM_START( leappad )
+ ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_LOAD( "leappadbios.bin", 0x000000, 0x100000, CRC(c886cddc) SHA1(f8a83b156feb28315d2321758678e141600a0d4e) ) // contains "Aug 06 2001.16:33:16.155-00450.LeapPad ILA2 Universal Base ROM" and "Copyright (c) 1998-2001 Knowledge Kids Enterprises, Inc."
+ROM_END
+
+ROM_START( mfleappad )
+ ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF )
+ ROM_LOAD( "myfirstleappadbios.bin", 0x000000, 0x400000, CRC(19174c16) SHA1(e0ba644fdf38fd5f91ab8c4b673c4a658cc3e612) ) // contains "Feb 13 2004.10:58:53.152-10573.MFLP US Base ROM - 2004" and "Copyright (c) 2004 LeapFrog Enterprises, Inc."
+ROM_END
+
+// year, name, parent, compat, machine, input, class, init, company, fullname, flags
+CONS( 2001, leappad, 0, 0, leapfrog_leappad, leapfrog_leappad, leapfrog_leappad_state, empty_init, "LeapFrog", "LeapPad", MACHINE_IS_SKELETON )
+CONS( 2004, mfleappad, 0, 0, leapfrog_mfleappad, leapfrog_leappad, leapfrog_leappad_state, empty_init, "LeapFrog", "My First LeapPad", MACHINE_IS_SKELETON )
diff --git a/src/mame/drivers/mcr3.cpp b/src/mame/drivers/mcr3.cpp
index a1bb1aadb9d..4a5cf4f5dfa 100644
--- a/src/mame/drivers/mcr3.cpp
+++ b/src/mame/drivers/mcr3.cpp
@@ -259,11 +259,11 @@ WRITE8_MEMBER(mcr3_state::maxrpm_op6_w)
/* when the read is toggled is when the ADC value is latched */
if (!(data & 0x80))
- m_latched_input = m_maxrpm_adc->read(space, 0);
+ m_latched_input = m_maxrpm_adc->read();
/* when both the write and the enable are low, it's a write to the ADC0844 */
if (!(data & 0x40) && !(data & 0x20))
- m_maxrpm_adc->write(space, 0, bitswap<4>(m_maxrpm_adc_control, 2, 3, 1, 0));
+ m_maxrpm_adc->write(bitswap<4>(m_maxrpm_adc_control, 2, 3, 1, 0));
/* low 5 bits control the turbo CS */
m_turbo_cheap_squeak->write(space, offset, data);
diff --git a/src/mame/drivers/mcr68.cpp b/src/mame/drivers/mcr68.cpp
index dd65f5ce8db..0116142792a 100644
--- a/src/mame/drivers/mcr68.cpp
+++ b/src/mame/drivers/mcr68.cpp
@@ -107,7 +107,7 @@ WRITE16_MEMBER(mcr68_state::blasted_control_w)
READ16_MEMBER(mcr68_state::spyhunt2_port_0_r)
{
int result = ioport("IN0")->read();
- int analog = m_adc->read(space, 0);
+ int analog = m_adc->read();
return result | ((m_sounds_good->read(space, 0) & 1) << 5) | (analog << 8);
}
@@ -130,7 +130,7 @@ WRITE16_MEMBER(mcr68_state::spyhunt2_control_w)
m_sounds_good->reset_write(~m_control_word & 0x2000);
m_sounds_good->write(space, offset, (m_control_word >> 8) & 0x001f);
- m_adc->write(space, 0, (m_control_word >> 3) & 0x0f);
+ m_adc->write((m_control_word >> 3) & 0x0f);
}
diff --git a/src/mame/drivers/megadriv.cpp b/src/mame/drivers/megadriv.cpp
index f909f554efd..60418caf1b3 100644
--- a/src/mame/drivers/megadriv.cpp
+++ b/src/mame/drivers/megadriv.cpp
@@ -750,6 +750,7 @@ MACHINE_CONFIG_START(md_cons_state::genesis_scd)
SEGA_SEGACD_US(config, m_segacd, 0);
m_segacd->set_palette("gen_vdp:palette");
+ m_segacd->set_hostcpu(m_maincpu);
CDROM(config, "cdrom").set_interface("scd_cdrom");
@@ -767,6 +768,7 @@ MACHINE_CONFIG_START(md_cons_state::md_scd)
SEGA_SEGACD_EUROPE(config, m_segacd, 0);
m_segacd->set_palette("gen_vdp:palette");
+ m_segacd->set_hostcpu(m_maincpu);
CDROM(config, "cdrom").set_interface("scd_cdrom");
@@ -784,6 +786,7 @@ MACHINE_CONFIG_START(md_cons_state::mdj_scd)
SEGA_SEGACD_JAPAN(config, m_segacd, 0);
m_segacd->set_palette("gen_vdp:palette");
+ m_segacd->set_hostcpu(m_maincpu);
CDROM(config, "cdrom").set_interface("scd_cdrom");
@@ -797,6 +800,7 @@ MACHINE_CONFIG_START(md_cons_state::genesis_32x_scd)
SEGA_SEGACD_US(config, m_segacd, 0);
m_segacd->set_palette("gen_vdp:palette");
+ m_segacd->set_hostcpu(m_maincpu);
CDROM(config, "cdrom").set_interface("scd_cdrom");
@@ -816,6 +820,7 @@ MACHINE_CONFIG_START(md_cons_state::md_32x_scd)
SEGA_SEGACD_EUROPE(config, m_segacd, 0);
m_segacd->set_palette("gen_vdp:palette");
+ m_segacd->set_hostcpu(m_maincpu);
CDROM(config, "cdrom").set_interface("scd_cdrom");
@@ -835,6 +840,7 @@ MACHINE_CONFIG_START(md_cons_state::mdj_32x_scd)
SEGA_SEGACD_JAPAN(config, m_segacd, 0);
m_segacd->set_palette("gen_vdp:palette");
+ m_segacd->set_hostcpu(m_maincpu);
CDROM(config, "cdrom").set_interface("scd_cdrom");
diff --git a/src/mame/drivers/midvunit.cpp b/src/mame/drivers/midvunit.cpp
index 53e18a7f9d3..c70bc8301d7 100644
--- a/src/mame/drivers/midvunit.cpp
+++ b/src/mame/drivers/midvunit.cpp
@@ -121,7 +121,7 @@ READ32_MEMBER(midvunit_state::port0_r)
READ32_MEMBER( midvunit_state::adc_r )
{
if (!(m_control_data & 0x40))
- return m_adc->read(space, 0) << m_adc_shift;
+ return m_adc->read() << m_adc_shift;
else
logerror("adc_r without enabling reads!\n");
@@ -131,7 +131,7 @@ READ32_MEMBER( midvunit_state::adc_r )
WRITE32_MEMBER( midvunit_state::adc_w )
{
if (!(m_control_data & 0x20))
- m_adc->write(space, 0, data >> m_adc_shift);
+ m_adc->write(data >> m_adc_shift);
else
logerror("adc_w without enabling writes!\n");
}
diff --git a/src/mame/drivers/mpz80.cpp b/src/mame/drivers/mpz80.cpp
index a070de8fde9..0ef8260530c 100644
--- a/src/mame/drivers/mpz80.cpp
+++ b/src/mame/drivers/mpz80.cpp
@@ -712,31 +712,32 @@ void mpz80_state::machine_reset()
// MACHINE_CONFIG( mpz80 )
//-------------------------------------------------
-MACHINE_CONFIG_START(mpz80_state::mpz80)
+void mpz80_state::mpz80(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(Z80_TAG, Z80, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(mpz80_mem)
- MCFG_DEVICE_IO_MAP(mpz80_io)
+ Z80(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &mpz80_state::mpz80_mem);
+ m_maincpu->set_addrmap(AS_IO, &mpz80_state::mpz80_io);
// S-100
- MCFG_DEVICE_ADD(S100_TAG, S100_BUS, XTAL(4'000'000) / 2)
- MCFG_S100_IRQ_CALLBACK(WRITELINE(*this, mpz80_state, s100_pint_w))
- MCFG_S100_NMI_CALLBACK(WRITELINE(*this, mpz80_state, s100_nmi_w))
- MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT))
- MCFG_S100_SLOT_ADD(S100_TAG ":1", mpz80_s100_cards, "mm65k16s")
- MCFG_S100_SLOT_ADD(S100_TAG ":2", mpz80_s100_cards, "wunderbus")
- MCFG_S100_SLOT_ADD(S100_TAG ":3", mpz80_s100_cards, "dj2db")
- MCFG_S100_SLOT_ADD(S100_TAG ":4", mpz80_s100_cards, nullptr)//"hdcdma")
- MCFG_S100_SLOT_ADD(S100_TAG ":5", mpz80_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":6", mpz80_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":7", mpz80_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":8", mpz80_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":9", mpz80_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":10", mpz80_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":11", mpz80_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":12", mpz80_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":13", mpz80_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":14", mpz80_s100_cards, nullptr)
+ S100_BUS(config, m_s100, XTAL(4'000'000) / 2);
+ m_s100->irq().set(FUNC(mpz80_state::s100_pint_w));
+ m_s100->nmi().set(FUNC(mpz80_state::s100_nmi_w));
+ m_s100->rdy().set_inputline(m_maincpu, Z80_INPUT_LINE_BOGUSWAIT);
+ S100_SLOT(config, S100_TAG ":1", mpz80_s100_cards, "mm65k16s");
+ S100_SLOT(config, S100_TAG ":2", mpz80_s100_cards, "wunderbus");
+ S100_SLOT(config, S100_TAG ":3", mpz80_s100_cards, "dj2db");
+ S100_SLOT(config, S100_TAG ":4", mpz80_s100_cards, nullptr);//"hdcdma")
+ S100_SLOT(config, S100_TAG ":5", mpz80_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":6", mpz80_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":7", mpz80_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":8", mpz80_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":9", mpz80_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":10", mpz80_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":11", mpz80_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":12", mpz80_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":13", mpz80_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":14", mpz80_s100_cards, nullptr);
// internal ram
RAM(config, RAM_TAG).set_default_size("65K"); // 65K???
diff --git a/src/mame/drivers/multfish.cpp b/src/mame/drivers/multfish.cpp
index 12bcbdf881f..792e9fee918 100644
--- a/src/mame/drivers/multfish.cpp
+++ b/src/mame/drivers/multfish.cpp
@@ -657,6 +657,31 @@ void igrosoft_gamble_state::init_fcockt2ent()
m_xor_paltype = 2;
ent_decode(machine(), 0x33, 0xcc, 0xaa, 0x88, 0x14140);
}
+void igrosoft_gamble_state::init_sweetlent()
+{
+ m_xor_palette = 0xeadb;
+ m_xor_paltype = 2;
+ ent_decode(machine(), 0x44, 0xdd, 0xdd, 0x22, 0x6c6c0);
+}
+void igrosoft_gamble_state::init_islandent()
+{
+ m_xor_palette = 0xdadb;
+ m_xor_paltype = 2;
+ ent_decode(machine(), 0x66, 0x22, 0x33, 0xcc, 0x64e40);
+}
+void igrosoft_gamble_state::init_pirateent()
+{
+ m_xor_palette = 0xbcdb;
+ m_xor_paltype = 2;
+ ent_decode(machine(), 0x99, 0x22, 0xee, 0x66, 0x54d40);
+}
+
+void igrosoft_gamble_state::init_rollfruit()
+{
+ // m_xor_palette = 0xbff7;
+ // needs gfx and palette descrambles
+ // encryption looks similar to Crazy Monkey 2
+}
void igrosoft_gamble_state::init_crzmon2()
{
@@ -952,8 +977,11 @@ void igrosoft_gamble_state::igrosoft_gamble_portmap(address_map &map)
map(0xb5, 0xb5).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Garage Ent banking
map(0xb6, 0xb6).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Resident Ent banking
map(0xb7, 0xb7).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Rock Climber Ent banking
+ map(0xb8, 0xb8).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Sweet Life Ent banking
map(0xb9, 0xb9).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Sweet Life 2 Ent banking
+ map(0xba, 0xba).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Island Ent banking
map(0xbb, 0xbb).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Island 2 Ent banking
+ map(0xbc, 0xbc).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Pirate Ent banking
map(0xbd, 0xbd).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Pirate 2 Ent banking
map(0xbe, 0xbe).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Keks Ent banking
map(0xbf, 0xbf).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Gnome Ent banking
@@ -963,7 +991,7 @@ void igrosoft_gamble_state::igrosoft_gamble_portmap(address_map &map)
map(0xcc, 0xcc).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Sweet Life 2 lottery banking
map(0xcd, 0xcd).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Island 2 lottery banking
map(0xce, 0xce).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Pirate 2 lottery banking
- map(0xd0, 0xd0).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // rollfr_4 banking
+ map(0xd0, 0xd0).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // rollfr_4 rollfr_5 banking
map(0xe1, 0xe1).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Island 2 banking
map(0xe5, 0xe5).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Gnome banking
map(0xe8, 0xe8).w(FUNC(igrosoft_gamble_state::igrosoft_gamble_bank_w)); // Sweet Life 2 banking
@@ -1962,6 +1990,24 @@ ROM_START( sweetl_2 ) // 070412
ROM_LOAD( "m48t35", 0x0000, 0x8000, CRC(b5deda35) SHA1(adc4dbbd73f9c4305abc594617218c32c31e0b8c) )
ROM_END
+ROM_START( sweetl_3 ) // 090720 entertainment
+ ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked
+ ROM_LOAD( "sl_e_090720.rom", 0x00000, 0x40000, CRC(97b2f1dd) SHA1(1c14dbeb35fe58f65c2a438e7443d3c37a00d48f) )
+
+ ROM_REGION( 0x400000, "gfx", 0 )
+ ROM_LOAD( "sweetlife_ent.001", 0x000000, 0x80000, CRC(954cec46) SHA1(1068cfe2d68f68db7523c4cd9aad67f9eba5f370) )
+ ROM_LOAD( "sweetlife_ent.002", 0x100000, 0x80000, CRC(39a4dfef) SHA1(2344aa37b4943777fa8276fe7c9829e4e6f5fe21) )
+ ROM_LOAD( "sweetlife_ent.003", 0x200000, 0x80000, CRC(5448a09a) SHA1(6c72e42094eeb9cbbc9e67d029376a31c01762dd) )
+ ROM_LOAD( "sweetlife_ent.004", 0x300000, 0x80000, CRC(b7a5f2cb) SHA1(75f9c9f031fc5c2f249020bafbed23caa233efcc) )
+ ROM_LOAD( "sweetlife_ent.005", 0x080000, 0x80000, CRC(b2b45395) SHA1(65b4516da1698ac6e02accd7b07b4e3ad55bcd17) )
+ ROM_LOAD( "sweetlife_ent.006", 0x180000, 0x80000, CRC(b9b5a8fe) SHA1(a985c59813cfba99abd5817c3bd9d3fe2c0ae38e) )
+ ROM_LOAD( "sweetlife_ent.007", 0x280000, 0x80000, CRC(28b33238) SHA1(3668fb0eed46c9cccc155246e4832fc902be597d) )
+ ROM_LOAD( "sweetlife_ent.008", 0x380000, 0x80000, CRC(7aa675a7) SHA1(9027b889d5370d9daf1f880d43b1252a381aade8) )
+
+ ROM_REGION( 0x8000, "m48t35", 0 ) // factory initialized defaults
+ ROM_LOAD( "m48t35", 0x0000, 0x8000, CRC(fd66d54b) SHA1(769cc41e1f3c25518aaf4c4d9ab3fe0a3e525bd7) )
+ROM_END
+
/*********************************************************
Sweet Life 2
@@ -2222,6 +2268,23 @@ ROM_START( rollfr_4 ) // 080331, bank D0
ROM_LOAD( "m48t35", 0x0000, 0x8000, CRC(8d69b6ab) SHA1(e4080e181acf1e84115efbd1de641256faf71c4d) )
ROM_END
+ROM_START( rollfr_5 ) // 100924, bank D0
+ ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked
+ ROM_LOAD( "rf1-100924.rom", 0x00000, 0x40000, CRC(27b68b41) SHA1(a98ddd9da2ec1d3dd235e8a14efa96fda3d13c05) )
+
+ ROM_REGION( 0x400000, "gfx", 0 )
+ ROM_LOAD( "rollfruit1.001", 0x000000, 0x80000, CRC(1e4e6cc7) SHA1(3c301094a0879c42dc93678a5504d6a1a3ca6f37) )
+ ROM_LOAD( "rollfruit1.002", 0x100000, 0x80000, CRC(5b744953) SHA1(2d140e3f4022c635c2ca3926b203e66ea618229e) )
+ ROM_LOAD( "rollfruit1.003", 0x200000, 0x80000, CRC(f169bbd2) SHA1(35115ae187206d81d121e8fa57ec3edc8581ec2b) )
+ ROM_LOAD( "rollfruit1.004", 0x300000, 0x80000, CRC(d877bd31) SHA1(254e6360ec56a99b103289850e585bd5f21621be) )
+ ROM_LOAD( "rollfruit1.005", 0x080000, 0x80000, CRC(a9c750ca) SHA1(630db2a329a520eb66e29f4520f6af7e3ac4ae53) )
+ ROM_LOAD( "rollfruit1.006", 0x180000, 0x80000, CRC(adfffc87) SHA1(5dc23e8af750639c1615d766dcc7d0133d683118) )
+ ROM_LOAD( "rollfruit1.007", 0x280000, 0x80000, CRC(04489de4) SHA1(b73e83475b10651db294788cac8cd5ff636c27f3) )
+ ROM_LOAD( "rollfruit1.008", 0x380000, 0x80000, CRC(8462b4ae) SHA1(6abac36f9466ecdf6761600b46bee33ea6e36270) )
+
+ ROM_REGION( 0x8000, "m48t35", 0 ) // factory initialized defaults
+ ROM_LOAD( "m48t35", 0x0000, 0x8000, CRC(8d69b6ab) SHA1(e4080e181acf1e84115efbd1de641256faf71c4d) )
+ROM_END
/*********************************************************
@@ -2264,6 +2327,24 @@ ROM_START( island_2 ) // 070409
ROM_LOAD( "m48t35", 0x0000, 0x8000, CRC(e606d0df) SHA1(25a31534a660abfc344b824a7c45595f4f9cf430) )
ROM_END
+ROM_START( island_3 ) // 090806 entertainment
+ ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked
+ ROM_LOAD( "is_e_090806.rom", 0x00000, 0x40000, CRC(144565f9) SHA1(8f5d335516a7ec8b7b3f64610258d589e7006d0a) )
+
+ ROM_REGION( 0x400000, "gfx", 0 )
+ ROM_LOAD( "island_ent.001", 0x000000, 0x80000, CRC(a5ba250e) SHA1(a7f61f770a1edd8802b1eaa1659a3dd857335c63) )
+ ROM_LOAD( "island_ent.002", 0x100000, 0x80000, CRC(453e9414) SHA1(fcdaf3895b5482445e9c73f2f27042276cd402ca) )
+ ROM_LOAD( "island_ent.003", 0x200000, 0x80000, CRC(29466f14) SHA1(a52d1189ec893bac81824af8e08050ef43a8e8e6) )
+ ROM_LOAD( "island_ent.004", 0x300000, 0x80000, CRC(a483d9b0) SHA1(6e1420ceca4975db3609ae8c3947a10a9869364b) )
+ ROM_LOAD( "island_ent.005", 0x080000, 0x80000, CRC(3f7ce2c0) SHA1(fc65c5d5f1f765684b118523c0b935b69e63c344) )
+ ROM_LOAD( "island_ent.006", 0x180000, 0x80000, CRC(17517ff8) SHA1(0b4945fb4c3c6e168d130629509eb26077a900d0) )
+ ROM_LOAD( "island_ent.007", 0x280000, 0x80000, CRC(99d3baac) SHA1(d45c54fa2ef54e0d472b16850fda012a0cdaf586) )
+ ROM_LOAD( "island_ent.008", 0x380000, 0x80000, CRC(ceecd2ef) SHA1(a2d810f690258519497303ac9bd37291661706a9) )
+
+ ROM_REGION( 0x8000, "m48t35", 0 ) // factory initialized defaults
+ ROM_LOAD( "m48t35", 0x0000, 0x8000, CRC(1be1d844) SHA1(7d02dd6414f08595178941440150c0d2b6ab45ad) )
+ROM_END
+
/*********************************************************
Island 2
@@ -2420,6 +2501,24 @@ ROM_START( pirate_4 ) // 070412
ROM_LOAD( "m48t35", 0x0000, 0x8000, CRC(85054f45) SHA1(4d9e86a23a5a521083b6faa3b1b3fd8e7b8c85b0) )
ROM_END
+ROM_START( pirate_5 ) // 090803 entertainment
+ ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked
+ ROM_LOAD( "pr_e_090803.rom", 0x00000, 0x40000, CRC(72a1260a) SHA1(84678a9a90ca795e4938d82945ce3c4d15c49ed1) )
+
+ ROM_REGION( 0x400000, "gfx", 0 )
+ ROM_LOAD( "pirate_ent.001", 0x000000, 0x80000, CRC(9b93cd27) SHA1(81cce41463322aa90866f5ac56b82fb73e191319) )
+ ROM_LOAD( "pirate_ent.002", 0x100000, 0x80000, CRC(5776a0dc) SHA1(2d81b7333ee418329ec0f0bb96b30dfaaf32cbf9) )
+ ROM_LOAD( "pirate_ent.003", 0x200000, 0x80000, CRC(bf91b15f) SHA1(933cde175e343c6e5511b023096aec43d49b8963) )
+ ROM_LOAD( "pirate_ent.004", 0x300000, 0x80000, CRC(5ad7299d) SHA1(d1246cd2b87a0b0b9e81083f1724d17fb69f64e5) )
+ ROM_LOAD( "pirate_ent.005", 0x080000, 0x80000, CRC(7af72c13) SHA1(c264c8a6eb8e4a6b22e9be7bc8bde05901d91c56) )
+ ROM_LOAD( "pirate_ent.006", 0x180000, 0x80000, CRC(9ea25f75) SHA1(0c8715b3f3fc5b875f3fbd80c79ae55ca9a32cb1) )
+ ROM_LOAD( "pirate_ent.007", 0x280000, 0x80000, CRC(dffa307e) SHA1(da231a501fe2cc2149fff9cc3370aa1766292091) )
+ ROM_LOAD( "pirate_ent.008", 0x380000, 0x80000, CRC(c9504ac4) SHA1(c8dc072b75348da02f5d811a580ba103728c2dd4) )
+
+ ROM_REGION( 0x8000, "m48t35", 0 ) // factory initialized defaults
+ ROM_LOAD( "m48t35", 0x0000, 0x8000, CRC(348f7ba9) SHA1(0f48481bf1c790760c7ee27f0caed45a833d3365) )
+ROM_END
+
/*********************************************************
Pirate 2
@@ -2597,6 +2696,42 @@ ROM_START( keks_5 ) // 090727 entertainment
ROM_LOAD( "m48t35", 0x0000, 0x8000, CRC(480de536) SHA1(bddc8269222ff3837c2924caf8ffac803e4aed18) )
ROM_END
+ROM_START( keks_6 ) // 110816
+ ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked
+ ROM_LOAD( "ks_m_110816.rom", 0x00000, 0x40000, CRC(9e244f5d) SHA1(49f8a2cdbef309b26bcc95bfc78e5b4a83c30583) )
+
+ ROM_REGION( 0x400000, "gfx", 0 )
+ ROM_LOAD( "keks_m.001", 0x000000, 0x80000, CRC(f4c20f66) SHA1(bed42ef01dfaa9d5d6ebb703e44ce7c11b8a373c) )
+ ROM_LOAD( "keks_m.002", 0x100000, 0x80000, CRC(b7ec3fac) SHA1(c3c62690487a6056415c46888bde8254efca836f) )
+ ROM_LOAD( "keks_m.003", 0x200000, 0x80000, CRC(5b6e8568) SHA1(003297e9cd080d91fe6751286eabd3a2f37ceb76) )
+ ROM_LOAD( "keks_m.004", 0x300000, 0x80000, CRC(9dc32736) SHA1(7b2091ae802431d1c959b859a58e0076d32abef0) )
+ ROM_LOAD( "keks_m.005", 0x080000, 0x80000, CRC(c5b09267) SHA1(7fd0988e63752fdbb31fde60b4726cfd63149622) )
+ ROM_LOAD( "keks_m.006", 0x180000, 0x80000, CRC(583da5fd) SHA1(645228db20cdaacb53bfc68731fd1a66a6a8cf56) )
+ ROM_LOAD( "keks_m.007", 0x280000, 0x80000, CRC(311c166a) SHA1(5f0ad8d755a6141964d818b98b3f156cbda8fb0d) )
+ ROM_LOAD( "keks_m.008", 0x380000, 0x80000, CRC(f69b0831) SHA1(75392349ef02a39cf883206938e2c615445065fc) )
+
+ ROM_REGION( 0x8000, "m48t35", 0 ) // factory initialized defaults
+ ROM_LOAD( "m48t35", 0x0000, 0x8000, CRC(99307739) SHA1(cfcf9cd9426a1a977c29f8825288064a561df28d) )
+ROM_END
+
+ROM_START( keks_7 ) // 110816
+ ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked
+ ROM_LOAD( "ks_110816.rom", 0x00000, 0x40000, CRC(be6b2642) SHA1(47ea80529da40d3260a84fa322dbaf5fb581dfbe) )
+
+ ROM_REGION( 0x400000, "gfx", 0 )
+ ROM_LOAD( "keks.001", 0x000000, 0x80000, CRC(fc399595) SHA1(037afd4a613cd58d4a28627b9e395d48c3fa866a) )
+ ROM_LOAD( "keks.002", 0x100000, 0x80000, CRC(474b36e7) SHA1(e1e62acd4a706b2654fc1249850806b612fc1419) )
+ ROM_LOAD( "keks.003", 0x200000, 0x80000, CRC(7f885e3d) SHA1(09bb4690e86ed4a29eef75ee4e5753ce40a164dd) )
+ ROM_LOAD( "keks.004", 0x300000, 0x80000, CRC(a0fc654b) SHA1(3354bdb7aa372816a766b0d36408543de7d3482f) )
+ ROM_LOAD( "keks_m.005", 0x080000, 0x80000, CRC(c5b09267) SHA1(7fd0988e63752fdbb31fde60b4726cfd63149622) )
+ ROM_LOAD( "keks_m.006", 0x180000, 0x80000, CRC(583da5fd) SHA1(645228db20cdaacb53bfc68731fd1a66a6a8cf56) )
+ ROM_LOAD( "keks_m.007", 0x280000, 0x80000, CRC(311c166a) SHA1(5f0ad8d755a6141964d818b98b3f156cbda8fb0d) )
+ ROM_LOAD( "keks_m.008", 0x380000, 0x80000, CRC(f69b0831) SHA1(75392349ef02a39cf883206938e2c615445065fc) )
+
+ ROM_REGION( 0x8000, "m48t35", 0 ) // factory initialized defaults
+ ROM_LOAD( "m48t35", 0x0000, 0x8000, CRC(1464bf6c) SHA1(5c1a984825dbd129e8295c3c6de6f82bfe5dc99e) )
+ROM_END
+
/*********************************************************
Gnome
@@ -2912,7 +3047,7 @@ ROM_END
ROM_START( crzmon2 ) // 100310
ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked
- ROM_LOAD( "cm2_100310.rom", 0x00000, 0x40000, CRC(c7fa01c8) SHA1(180b5ce0e456abe9178255b8ea09afb953986310) )
+ ROM_LOAD( "cm2_m_100310.rom", 0x00000, 0x40000, CRC(c7fa01c8) SHA1(180b5ce0e456abe9178255b8ea09afb953986310) )
ROM_REGION( 0x400000, "gfx", 0 )
ROM_LOAD( "crazymonkey2.001", 0x000000, 0x80000, CRC(8c8edfa7) SHA1(a68d4ebc370a09d588b906e5c254bccac4f53001) )
@@ -2964,6 +3099,24 @@ ROM_START( crzmon2_3 ) // 100315 entertainment
ROM_LOAD( "m48t35", 0x0000, 0x8000, CRC(84b6f391) SHA1(8ffc43ed73f614268c3d089b6f304e095ac21fe9) )
ROM_END
+ROM_START( crzmon2_4 ) // 100618
+ ROM_REGION( 0x40000, "maincpu", 0 ) // z80 code, banked
+ ROM_LOAD( "cm2_100618.rom", 0x00000, 0x40000, CRC(3519e933) SHA1(1dad2fa2084e4c25f5d75cba3b631c7f3a1bdce6) )
+
+ ROM_REGION( 0x400000, "gfx", 0 )
+ ROM_LOAD( "crazymonkey2.001", 0x000000, 0x80000, CRC(8c8edfa7) SHA1(a68d4ebc370a09d588b906e5c254bccac4f53001) )
+ ROM_LOAD( "crazymonkey2.002", 0x100000, 0x80000, CRC(6379769f) SHA1(3b3ffc3ce4436168db41f7e643b58dca94f250da) )
+ ROM_LOAD( "crazymonkey2.003", 0x200000, 0x80000, CRC(b12f8080) SHA1(218fd38c3c2b2886084a1c694ce181f497c54085) )
+ ROM_LOAD( "crazymonkey2.004", 0x300000, 0x80000, CRC(1da8ed1a) SHA1(9681e631eaeb26d242daba4d1c362302de6ca1bd) )
+ ROM_LOAD( "crazymonkey2.005", 0x080000, 0x80000, CRC(82bfb2d3) SHA1(ca4c4a8b105fbcb3e120fc2d89866f3e66624e96) )
+ ROM_LOAD( "crazymonkey2.006", 0x180000, 0x80000, CRC(e3dfdf6a) SHA1(67608c09d8c92f3278ddc11c27ddba8f3146c2c6) )
+ ROM_LOAD( "crazymonkey2.007", 0x280000, 0x80000, CRC(329f4c3d) SHA1(27e1ed25b7e11c604abcf435f87b165201918def) )
+ ROM_LOAD( "crazymonkey2.008", 0x380000, 0x80000, CRC(f7c8e613) SHA1(6dec3f6f27773cd0af83ca914d8481c8f17f1d3f) )
+
+ ROM_REGION( 0x8000, "m48t35", 0 ) // factory initialized defaults
+ ROM_LOAD( "m48t35", 0x0000, 0x8000, CRC(9849f5ec) SHA1(9d9bd0a85fe0214e254cb2f5817696b39cffe4a4) )
+ROM_END
+
/*
@@ -3024,6 +3177,7 @@ GAME( 2003, lhaunt_11, lhaunt_6, igrosoft_gamble, igrosoft_gamble, igrosoft_ga
GAME( 2003, rollfr_2, rollfr_4, rollfr, rollfr, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Roll Fruit (040318)", MACHINE_SUPPORTS_SAVE ) /* World */
GAME( 2003, rollfr_3, rollfr_4, rollfr, rollfr, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Roll Fruit (080327)", MACHINE_SUPPORTS_SAVE ) /* World */
GAME( 2003, rollfr_4, 0, rollfr, rollfr, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Roll Fruit (080331)", MACHINE_SUPPORTS_SAVE ) /* World */
+GAME( 2003, rollfr_5, rollfr_4, rollfr, rollfr, igrosoft_gamble_state, init_rollfruit, ROT0, "Igrosoft", "Roll Fruit (100924)", MACHINE_NOT_WORKING|MACHINE_SUPPORTS_SAVE ) /* World */
GAME( 2004, garage_4, garage_5, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Garage (040219 World)", MACHINE_SUPPORTS_SAVE ) /* World */
GAME( 2004, garage_5, 0, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Garage (050311 World)", MACHINE_SUPPORTS_SAVE ) /* World */
@@ -3037,8 +3191,9 @@ GAME( 2004, rclimb_4, rclimb_3, igrosoft_gamble, igrosoft_gamble, igrosoft_ga
GAME( 2004, rclimb_5, rclimb_3, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Rock Climber (070621 Russia)", MACHINE_SUPPORTS_SAVE ) /* Russia */
GAME( 2004, rclimb_7, rclimb_3, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_rclimbent, ROT0, "Igrosoft", "Rock Climber (090716 Entertainment)", MACHINE_SUPPORTS_SAVE ) /* Entertainment */
-GAME( 2004, sweetl, 0, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Sweet Life (041220 World)", MACHINE_SUPPORTS_SAVE ) /* World */
-GAME( 2004, sweetl_2, sweetl, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Sweet Life (070412 Russia)", MACHINE_SUPPORTS_SAVE ) /* Russia */
+GAME( 2004, sweetl, 0, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Sweet Life (041220 World)", MACHINE_SUPPORTS_SAVE ) /* World */
+GAME( 2004, sweetl_2, sweetl, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Sweet Life (070412 Russia)", MACHINE_SUPPORTS_SAVE ) /* Russia */
+GAME( 2004, sweetl_3, sweetl, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_sweetlent, ROT0, "Igrosoft", "Sweet Life (090720 Entertainment)", MACHINE_SUPPORTS_SAVE ) /* Entertainment */
GAME( 2004, resdnt, resdnt_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Resident (040415 World)", MACHINE_SUPPORTS_SAVE ) /* World */
GAME( 2004, resdnt_2, resdnt_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Resident (040513 World)", MACHINE_SUPPORTS_SAVE ) /* World */
@@ -3047,12 +3202,14 @@ GAME( 2004, resdnt_6, 0, igrosoft_gamble, igrosoft_gamble, igrosoft_ga
GAME( 2004, resdnt_8, resdnt_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_resdntent, ROT0, "Igrosoft", "Resident (100311 Entertainment)", MACHINE_SUPPORTS_SAVE ) /* Entertainment */
GAME( 2004, resdnt_9, resdnt_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Resident (100316 Russia)", MACHINE_SUPPORTS_SAVE ) /* Russia */
-GAME( 2005, island, 0, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Island (050713 World)", MACHINE_SUPPORTS_SAVE ) /* World */
-GAME( 2005, island_2, island, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Island (070409 Russia)", MACHINE_SUPPORTS_SAVE ) /* Russia */
+GAME( 2005, island, 0, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Island (050713 World)", MACHINE_SUPPORTS_SAVE ) /* World */
+GAME( 2005, island_2, island, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Island (070409 Russia)", MACHINE_SUPPORTS_SAVE ) /* Russia */
+GAME( 2005, island_3, island, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_islandent, ROT0, "Igrosoft", "Island (090806 Entertainment)", MACHINE_SUPPORTS_SAVE ) /* Entertainment */
-GAME( 2005, pirate_2, pirate_3, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Pirate (060210 World)", MACHINE_SUPPORTS_SAVE ) /* World */
-GAME( 2005, pirate_3, 0, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Pirate (060803 World)", MACHINE_SUPPORTS_SAVE ) /* World */
-GAME( 2005, pirate_4, pirate_3, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Pirate (070412 Russia)", MACHINE_SUPPORTS_SAVE ) /* Russia */
+GAME( 2005, pirate_2, pirate_3, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Pirate (060210 World)", MACHINE_SUPPORTS_SAVE ) /* World */
+GAME( 2005, pirate_3, 0, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Pirate (060803 World)", MACHINE_SUPPORTS_SAVE ) /* World */
+GAME( 2005, pirate_4, pirate_3, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Pirate (070412 Russia)", MACHINE_SUPPORTS_SAVE ) /* Russia */
+GAME( 2005, pirate_5, pirate_3, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_pirateent, ROT0, "Igrosoft", "Pirate (090803 Entertainment)", MACHINE_SUPPORTS_SAVE ) /* Entertainment */
GAME( 2006, island2, 0, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Island 2 (060529 World)", MACHINE_SUPPORTS_SAVE ) /* World */
GAME( 2006, island2_3, island2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Island 2 (061218 World)", MACHINE_SUPPORTS_SAVE ) /* World */
@@ -3065,11 +3222,13 @@ GAME( 2006, pirate2_2, pirate2, igrosoft_gamble, igrosoft_gamble, igrosoft_ga
GAME( 2006, pirate2_3, pirate2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_pirate2l, ROT0, "Igrosoft", "Pirate 2 (090528 Lottery)", MACHINE_SUPPORTS_SAVE ) /* Lottery */
GAME( 2006, pirate2_4, pirate2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_pirate2ent, ROT0, "Igrosoft", "Pirate 2 (090730 Entertainment)", MACHINE_SUPPORTS_SAVE ) /* Entertainment */
-GAME( 2006, keks, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Keks (060328 World)", MACHINE_SUPPORTS_SAVE ) /* World */
-GAME( 2006, keks_2, 0, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Keks (060403 World)", MACHINE_SUPPORTS_SAVE ) /* World */
-GAME( 2006, keks_3, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Keks (070119 Russia)", MACHINE_SUPPORTS_SAVE ) /* Russia */
-GAME( 2006, keks_4, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_keksl, ROT0, "Igrosoft", "Keks (090604 Lottery)", MACHINE_SUPPORTS_SAVE ) /* Lottery */
-GAME( 2006, keks_5, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_keksent, ROT0, "Igrosoft", "Keks (090727 Entertainment)", MACHINE_SUPPORTS_SAVE ) /* Entertainment */
+GAME( 2006, keks, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Keks (060328 World)", MACHINE_SUPPORTS_SAVE ) /* World */
+GAME( 2006, keks_2, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Keks (060403 World)", MACHINE_SUPPORTS_SAVE ) /* World */
+GAME( 2006, keks_3, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Keks (070119 Russia)", MACHINE_SUPPORTS_SAVE ) /* Russia */
+GAME( 2006, keks_4, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_keksl, ROT0, "Igrosoft", "Keks (090604 Lottery)", MACHINE_SUPPORTS_SAVE ) /* Lottery */
+GAME( 2006, keks_5, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_keksent, ROT0, "Igrosoft", "Keks (090727 Entertainment)", MACHINE_SUPPORTS_SAVE ) /* Entertainment */
+GAME( 2006, keks_6, 0, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Keks (110816 World)", MACHINE_SUPPORTS_SAVE ) /* World */
+GAME( 2006, keks_7, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Keks (110816 Russia)", MACHINE_SUPPORTS_SAVE ) /* Russia */
GAME( 2007, gnome, gnome_9, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Gnome (070906 Russia)", MACHINE_SUPPORTS_SAVE ) /* Russia */
GAME( 2007, gnome_2, gnome_9, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "Igrosoft", "Gnome (071115 Russia)", MACHINE_SUPPORTS_SAVE ) /* Russia */
@@ -3094,6 +3253,7 @@ GAME( 2008, fcockt2_5, fcockt2, igrosoft_gamble, igrosoft_gamble, igrosoft_ga
GAME( 2008, fcockt2_6, fcockt2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_fcockt2l, ROT0, "Igrosoft", "Fruit Cocktail 2 (090528 Lottery)", MACHINE_SUPPORTS_SAVE ) /* Lottery */
GAME( 2008, fcockt2_7, fcockt2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_fcockt2ent, ROT0, "Igrosoft", "Fruit Cocktail 2 (090813 Entertainment)", MACHINE_SUPPORTS_SAVE ) /* Entertainment */
-GAME( 2010, crzmon2, 0, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_crzmon2, ROT0, "Igrosoft", "Crazy Monkey 2 (100310)", MACHINE_NOT_WORKING|MACHINE_SUPPORTS_SAVE ) /* World */ // xored and bitswapped palette and gfx roms
+GAME( 2010, crzmon2, 0, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_crzmon2, ROT0, "Igrosoft", "Crazy Monkey 2 (100310 World)", MACHINE_NOT_WORKING|MACHINE_SUPPORTS_SAVE ) /* World */ // xored and bitswapped palette and gfx roms
GAME( 2010, crzmon2_2, crzmon2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_crzmon2lot, ROT0, "Igrosoft", "Crazy Monkey 2 (100311 Lottery)", MACHINE_NOT_WORKING|MACHINE_SUPPORTS_SAVE ) /* Lottery */
GAME( 2010, crzmon2_3, crzmon2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_crzmon2ent, ROT0, "Igrosoft", "Crazy Monkey 2 (100315 Entertainment)", MACHINE_NOT_WORKING|MACHINE_SUPPORTS_SAVE ) /* Entertainment */
+GAME( 2010, crzmon2_4, crzmon2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_crzmon2, ROT0, "Igrosoft", "Crazy Monkey 2 (100618 Russia)", MACHINE_NOT_WORKING|MACHINE_SUPPORTS_SAVE ) /* Russia */
diff --git a/src/mame/drivers/multfish_boot.cpp b/src/mame/drivers/multfish_boot.cpp
index 7ee95650bd3..28eaa3b1373 100644
--- a/src/mame/drivers/multfish_boot.cpp
+++ b/src/mame/drivers/multfish_boot.cpp
@@ -2117,18 +2117,18 @@ GAME( 2006, pirate2g, pirate2, igrosoft_gamble, igrosoft_gamble, igrosoft_ga
GAME( 2006, pirate2h, pirate2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_customl, ROT0, "bootleg", "Pirate 2 (bootleg, 061005, LOTOS PR01)", MACHINE_SUPPORTS_SAVE ) // custom alteras, modified graphics, many texts changed, changed version text to "LOTOS PR01"
GAME( 2006, pirate2_2a, pirate2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Pirate 2 (bootleg, 070126, banking address hack)", MACHINE_SUPPORTS_SAVE ) // bank F9
-GAME( 2006, keksa, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060328, banking address hack)", MACHINE_SUPPORTS_SAVE ) // bank F9
-GAME( 2006, keksb, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060328, backdoor)", MACHINE_SUPPORTS_SAVE ) // backdoor 1,1 1,3 1,5 1,7 3,3 3,4
-GAME( 2006, keksc, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060328, banking address hack, changed version text)", MACHINE_SUPPORTS_SAVE ) // bank F9, changed version text to 070119
-GAME( 2006, keks_2a, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060403, banking address hack)", MACHINE_SUPPORTS_SAVE ) // bank F9
-GAME( 2006, keks_2b, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060403, banking address hack, changed version text)", MACHINE_SUPPORTS_SAVE ) // bank F9, changed version text to 070119
-GAME( 2006, keks_2c, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_customl, ROT0, "bootleg", "Keks (bootleg, 060403, VIDEO GAME-1 KS01 set 1)", MACHINE_SUPPORTS_SAVE ) // custom alteras, modified graphics, bank F9, changed version text to "VIDEO GAME-1 KS01"
-GAME( 2006, keks_2d, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060403, VIDEO GAME-1 KS01 set 2)", MACHINE_SUPPORTS_SAVE ) // modified graphics, bank F9, changed version text to "VIDEO GAME-1 KS01" (keks_2c, decoded gfx)
-GAME( 2006, keks_2e, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060403, banking address hack, payout percentage 60)", MACHINE_SUPPORTS_SAVE ) // bank F9, payout percentage 60%
-GAME( 2006, keks_2f, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060403, LOTTOGAME (I))", MACHINE_SUPPORTS_SAVE ) // bank F9, modified graphics, changed version text to "MDS_is_the_best_ LOTTOGAME (I)"
-GAME( 2006, keks_2g, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_customl, ROT0, "bootleg", "Keks (bootleg, 060403, LOTOS KS01)", MACHINE_SUPPORTS_SAVE ) // custom alteras, modified graphics, bank F9, many texts changed, changed version text to "LOTOS KS01"
-GAME( 2006, keks_3a, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 070119, banking address hack set 1)", MACHINE_SUPPORTS_SAVE ) // bank F9
-GAME( 2006, keks_3b, keks_2, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 070119, banking address hack set 2)", MACHINE_SUPPORTS_SAVE ) // bank F9
+GAME( 2006, keksa, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060328, banking address hack)", MACHINE_SUPPORTS_SAVE ) // bank F9
+GAME( 2006, keksb, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060328, backdoor)", MACHINE_SUPPORTS_SAVE ) // backdoor 1,1 1,3 1,5 1,7 3,3 3,4
+GAME( 2006, keksc, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060328, banking address hack, changed version text)", MACHINE_SUPPORTS_SAVE ) // bank F9, changed version text to 070119
+GAME( 2006, keks_2a, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060403, banking address hack)", MACHINE_SUPPORTS_SAVE ) // bank F9
+GAME( 2006, keks_2b, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060403, banking address hack, changed version text)", MACHINE_SUPPORTS_SAVE ) // bank F9, changed version text to 070119
+GAME( 2006, keks_2c, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_customl, ROT0, "bootleg", "Keks (bootleg, 060403, VIDEO GAME-1 KS01 set 1)", MACHINE_SUPPORTS_SAVE ) // custom alteras, modified graphics, bank F9, changed version text to "VIDEO GAME-1 KS01"
+GAME( 2006, keks_2d, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060403, VIDEO GAME-1 KS01 set 2)", MACHINE_SUPPORTS_SAVE ) // modified graphics, bank F9, changed version text to "VIDEO GAME-1 KS01" (keks_2c, decoded gfx)
+GAME( 2006, keks_2e, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060403, banking address hack, payout percentage 60)", MACHINE_SUPPORTS_SAVE ) // bank F9, payout percentage 60%
+GAME( 2006, keks_2f, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 060403, LOTTOGAME (I))", MACHINE_SUPPORTS_SAVE ) // bank F9, modified graphics, changed version text to "MDS_is_the_best_ LOTTOGAME (I)"
+GAME( 2006, keks_2g, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, init_customl, ROT0, "bootleg", "Keks (bootleg, 060403, LOTOS KS01)", MACHINE_SUPPORTS_SAVE ) // custom alteras, modified graphics, bank F9, many texts changed, changed version text to "LOTOS KS01"
+GAME( 2006, keks_3a, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 070119, banking address hack set 1)", MACHINE_SUPPORTS_SAVE ) // bank F9
+GAME( 2006, keks_3b, keks_6, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Keks (bootleg, 070119, banking address hack set 2)", MACHINE_SUPPORTS_SAVE ) // bank F9
GAME( 2007, gnomea, gnome_9, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Gnome (bootleg, 070906, banking address hack set 1)", MACHINE_SUPPORTS_SAVE ) // bank F9
GAME( 2007, gnomeb, gnome_9, igrosoft_gamble, igrosoft_gamble, igrosoft_gamble_state, empty_init, ROT0, "bootleg", "Gnome (bootleg, 070906, banking address hack set 2)", MACHINE_SUPPORTS_SAVE ) // bank F9
diff --git a/src/mame/drivers/nascom1.cpp b/src/mame/drivers/nascom1.cpp
index ccab0c18afa..d6264e1087a 100644
--- a/src/mame/drivers/nascom1.cpp
+++ b/src/mame/drivers/nascom1.cpp
@@ -737,7 +737,8 @@ void nascom1_state::nascom1(machine_config &config)
SOFTWARE_LIST(config, "snap_list").set_original("nascom_snap").set_filter("NASCOM1");
}
-MACHINE_CONFIG_START(nascom2_state::nascom2)
+void nascom2_state::nascom2(machine_config &config)
+{
nascom(config);
Z80(config, m_maincpu, 16_MHz_XTAL / 4);
@@ -758,31 +759,30 @@ MACHINE_CONFIG_START(nascom2_state::nascom2)
m_socket2->set_device_load(device_image_load_delegate(&nascom2_state::device_image_load_socket2, this));
// nasbus expansion bus
- MCFG_NASBUS_ADD(NASBUS_TAG)
- MCFG_NASBUS_RAM_DISABLE_HANDLER(WRITELINE(*this, nascom2_state, ram_disable_w))
- MCFG_NASBUS_SLOT_ADD("nasbus1", nasbus_slot_cards, nullptr)
- MCFG_NASBUS_SLOT_ADD("nasbus2", nasbus_slot_cards, nullptr)
- MCFG_NASBUS_SLOT_ADD("nasbus3", nasbus_slot_cards, nullptr)
- MCFG_NASBUS_SLOT_ADD("nasbus4", nasbus_slot_cards, nullptr)
+ nasbus_device &nasbus(NASBUS(config, NASBUS_TAG));
+ nasbus.ram_disable().set(FUNC(nascom2_state::ram_disable_w));
+ NASBUS_SLOT(config, "nasbus1", nasbus_slot_cards, nullptr);
+ NASBUS_SLOT(config, "nasbus2", nasbus_slot_cards, nullptr);
+ NASBUS_SLOT(config, "nasbus3", nasbus_slot_cards, nullptr);
+ NASBUS_SLOT(config, "nasbus4", nasbus_slot_cards, nullptr);
// software
SOFTWARE_LIST(config, "snap_list").set_original("nascom_snap").set_filter("NASCOM2");
SOFTWARE_LIST(config, "socket_list").set_original("nascom_socket");
SOFTWARE_LIST(config, "floppy_list").set_original("nascom_flop");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nascom2_state::nascom2c)
+void nascom2_state::nascom2c(machine_config &config)
+{
nascom2(config);
m_maincpu->set_addrmap(AS_PROGRAM, &nascom2_state::nascom2c_mem);
m_ram->set_default_size("60K");
- MCFG_DEVICE_MODIFY(NASBUS_TAG)
- MCFG_NASBUS_RAM_DISABLE_HANDLER(WRITELINE(*this, nascom2_state, ram_disable_cpm_w))
- MCFG_DEVICE_MODIFY("nasbus1")
- MCFG_SLOT_DEFAULT_OPTION("floppy")
-MACHINE_CONFIG_END
+ subdevice<nasbus_device>(NASBUS_TAG)->ram_disable().set(FUNC(nascom2_state::ram_disable_cpm_w));
+ subdevice<nasbus_slot_device>("nasbus1")->set_default_option("floppy");
+}
//**************************************************************************
diff --git a/src/mame/drivers/nes_vt.cpp b/src/mame/drivers/nes_vt.cpp
index b7c17af5d7e..cce1fb30c9f 100644
--- a/src/mame/drivers/nes_vt.cpp
+++ b/src/mame/drivers/nes_vt.cpp
@@ -1586,6 +1586,11 @@ ROM_START( polmega )
ROM_LOAD( "megamax.bin", 0x00000, 0x400000, CRC(ef3aade3) SHA1(0c130080ace000cbe43e70a805d4301e05840294) )
ROM_END
+ROM_START( silv35 )
+ ROM_REGION( 0x400000, "mainrom", 0 )
+ ROM_LOAD( "silverlit35.bin", 0x00000, 0x400000, CRC(7540e350) SHA1(a0cb456136560fa4d8a365dd44d815ec0e9fc2e7) )
+ROM_END
+
ROM_START( pjoyn50 )
ROM_REGION( 0x400000, "mainrom", 0 )
ROM_LOAD( "power joy navigator 50-in-1.prg", 0x00000, 0x400000, CRC(d1bbadd4) SHA1(2186c71bcedf6c2eedf58233faa26fca9586aa40) )
@@ -1839,6 +1844,7 @@ CONS( 200?, mc_sp69, 0, 0, nes_vt_sp69, nes_vt, nes_vt_state, empty_init,
// CPU die is marked 'VH2009' There's also a 62256 RAM chip on the PCB, some scrambled opcodes?
CONS( 200?, polmega, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "Polaroid", "Megamax GPD001SDG", MACHINE_NOT_WORKING )
+CONS( 200?, silv35, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "SilverLit", "35 in 1 Super Twins", MACHINE_NOT_WORKING )
// Hummer systems, scrambled bank register
CONS( 200?, mc_sam60, 0, 0, nes_vt_hum, nes_vt, nes_vt_state, empty_init, "Hummer Technology Co., Ltd.", "Samuri (60 in 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
diff --git a/src/mame/drivers/sage2.cpp b/src/mame/drivers/sage2.cpp
index 50f80bca948..d3a6cd9f1e8 100644
--- a/src/mame/drivers/sage2.cpp
+++ b/src/mame/drivers/sage2.cpp
@@ -408,10 +408,11 @@ READ16_MEMBER(sage2_state::rom_r)
// MACHINE_CONFIG( sage2 )
//-------------------------------------------------
-MACHINE_CONFIG_START(sage2_state::sage2)
+void sage2_state::sage2(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(M68000_TAG, M68000, XTAL(16'000'000)/2)
- MCFG_DEVICE_PROGRAM_MAP(sage2_mem)
+ M68000(config, m_maincpu, XTAL(16'000'000)/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sage2_state::sage2_mem);
// devices
PIC8259(config, m_pic, 0);
@@ -482,14 +483,15 @@ MACHINE_CONFIG_START(sage2_state::sage2)
FLOPPY_CONNECTOR(config, UPD765_TAG ":0", sage2_floppies, "525qd", floppy_image_device::default_floppy_formats);
FLOPPY_CONNECTOR(config, UPD765_TAG ":1", sage2_floppies, "525qd", floppy_image_device::default_floppy_formats);
- MCFG_IEEE488_BUS_ADD()
+
+ IEEE488(config, m_ieee488);
// internal ram
RAM(config, RAM_TAG).set_default_size("512K");
// software list
SOFTWARE_LIST(config, "flop_list").set_original("sage2");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/softbox.cpp b/src/mame/drivers/softbox.cpp
index 7a37c671c02..634bb426a93 100644
--- a/src/mame/drivers/softbox.cpp
+++ b/src/mame/drivers/softbox.cpp
@@ -355,15 +355,12 @@ void softbox_state::ieee488_ifc(int state)
// MACHINE CONFIGURATION
//**************************************************************************
-//-------------------------------------------------
-// MACHINE_CONFIG( softbox )
-//-------------------------------------------------
-
-MACHINE_CONFIG_START(softbox_state::softbox)
+void softbox_state::softbox(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(Z80_TAG, Z80, XTAL(8'000'000)/2)
- MCFG_DEVICE_PROGRAM_MAP(softbox_mem)
- MCFG_DEVICE_IO_MAP(softbox_io)
+ Z80(config, m_maincpu, XTAL(8'000'000)/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &softbox_state::softbox_mem);
+ m_maincpu->set_addrmap(AS_IO, &softbox_state::softbox_io);
// devices
i8251_device &i8251(I8251(config, I8251_TAG, 0));
@@ -392,23 +389,19 @@ MACHINE_CONFIG_START(softbox_state::softbox)
dbrg.fr_handler().set(I8251_TAG, FUNC(i8251_device::write_rxc));
dbrg.ft_handler().set(I8251_TAG, FUNC(i8251_device::write_txc));
- MCFG_CBM_IEEE488_ADD("c8050")
+ ieee488_device::add_cbm_devices(config, "c8050");
- MCFG_DEVICE_ADD(CORVUS_HDC_TAG, CORVUS_HDC, 0)
- MCFG_HARDDISK_ADD("harddisk1")
- MCFG_HARDDISK_INTERFACE("corvus_hdd")
- MCFG_HARDDISK_ADD("harddisk2")
- MCFG_HARDDISK_INTERFACE("corvus_hdd")
- MCFG_HARDDISK_ADD("harddisk3")
- MCFG_HARDDISK_INTERFACE("corvus_hdd")
- MCFG_HARDDISK_ADD("harddisk4")
- MCFG_HARDDISK_INTERFACE("corvus_hdd")
+ CORVUS_HDC(config, m_hdc, 0);
+ HARDDISK(config, "harddisk1", "corvus_hdd");
+ HARDDISK(config, "harddisk2", "corvus_hdd");
+ HARDDISK(config, "harddisk3", "corvus_hdd");
+ HARDDISK(config, "harddisk4", "corvus_hdd");
- MCFG_IMI7000_BUS_ADD("imi5000h", nullptr, nullptr, nullptr)
+ imi7000_bus_device::add_config(config, "imi5000h", nullptr, nullptr, nullptr);
// software lists
SOFTWARE_LIST(config, "flop_list").set_original("softbox");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/ssv.cpp b/src/mame/drivers/ssv.cpp
index 1f6e65e7c1c..b3e49b25fe5 100644
--- a/src/mame/drivers/ssv.cpp
+++ b/src/mame/drivers/ssv.cpp
@@ -455,7 +455,7 @@ void ssv_state::drifto94_map(address_map &map)
READ16_MEMBER(ssv_state::gdfs_eeprom_r)
{
- return m_adc->data_r(space, 0) | (m_eeprom->do_read() << 8);
+ return m_adc->data_r() | (m_eeprom->do_read() << 8);
}
WRITE16_MEMBER(ssv_state::gdfs_eeprom_w)
@@ -477,7 +477,7 @@ WRITE16_MEMBER(ssv_state::gdfs_eeprom_w)
// clock line asserted: write latch or select next bit to read
m_eeprom->clk_write(BIT(data, 13) ? ASSERT_LINE : CLEAR_LINE);
- m_adc->address_w(space, 0, (data & 0x0700) >> 8);
+ m_adc->address_w((data & 0x0700) >> 8);
m_adc->start_w(BIT(data, 11));
}
}
diff --git a/src/mame/drivers/tek405x.cpp b/src/mame/drivers/tek405x.cpp
index 543b7834078..db9a2572ac1 100644
--- a/src/mame/drivers/tek405x.cpp
+++ b/src/mame/drivers/tek405x.cpp
@@ -48,15 +48,10 @@ enum {
};
-
//**************************************************************************
// INTERRUPTS
//**************************************************************************
-//-------------------------------------------------
-// update_irq -
-//-------------------------------------------------
-
void tek4051_state::update_irq()
{
int state = m_kb_pia_irqa | m_kb_pia_irqb | m_x_pia_irqa | m_x_pia_irqb | m_gpib_pia_irqa | m_gpib_pia_irqb | m_com_pia_irqa | m_com_pia_irqb | m_acia_irq;
@@ -64,11 +59,6 @@ void tek4051_state::update_irq()
m_maincpu->set_input_line(INPUT_LINE_IRQ0, state);
}
-
-//-------------------------------------------------
-// update_nmi -
-//-------------------------------------------------
-
void tek4051_state::update_nmi()
{
int state = m_y_pia_irqa | m_y_pia_irqb | m_tape_pia_irqa | m_tape_pia_irqb;
@@ -77,39 +67,24 @@ void tek4051_state::update_nmi()
}
-
//**************************************************************************
// KEYBOARD
//**************************************************************************
-//-------------------------------------------------
-// scan_keyboard - scan keyboard
-//-------------------------------------------------
-
void tek4051_state::scan_keyboard()
{
}
-
-//-------------------------------------------------
-// TIMER_DEVICE_CALLBACK_MEMBER( keyboard_tick )
-//-------------------------------------------------
-
TIMER_DEVICE_CALLBACK_MEMBER(tek4051_state::keyboard_tick)
{
scan_keyboard();
}
-
//**************************************************************************
// MEMORY BANKING
//**************************************************************************
-//-------------------------------------------------
-// bankswitch -
-//-------------------------------------------------
-
void tek4051_state::bankswitch(uint8_t data)
{
address_space &program = m_maincpu->space(AS_PROGRAM);
@@ -136,7 +111,6 @@ void tek4051_state::bankswitch(uint8_t data)
}
}
-
WRITE8_MEMBER( tek4051_state::lbs_w )
{
/*
@@ -160,15 +134,10 @@ WRITE8_MEMBER( tek4051_state::lbs_w )
}
-
//**************************************************************************
// ADDRESS MAPS
//**************************************************************************
-//-------------------------------------------------
-// ADDRESS_MAP( tek4051_mem )
-//-------------------------------------------------
-
void tek4051_state::tek4051_mem(address_map &map)
{
map(0x0000, 0x1fff).ram();
@@ -189,25 +158,15 @@ void tek4051_state::tek4051_mem(address_map &map)
map(0xa800, 0xffff).rom().region(MC6800_TAG, 0x2800);
}
-
-//-------------------------------------------------
-// ADDRESS_MAP( tek4052_mem )
-//-------------------------------------------------
-
void tek4052_state::tek4052_mem(address_map &map)
{
}
-
//**************************************************************************
// INPUT PORTS
//**************************************************************************
-//-------------------------------------------------
-// INPUT_PORTS( tek4051 )
-//-------------------------------------------------
-
static INPUT_PORTS_START( tek4051 )
PORT_START("Y0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
@@ -377,7 +336,6 @@ static INPUT_PORTS_START( tek4051 )
INPUT_PORTS_END
-
//**************************************************************************
// VIDEO
//**************************************************************************
@@ -392,7 +350,6 @@ void tek4052_state::video_start()
}
-
//**************************************************************************
// DEVICE CONFIGURATION
//**************************************************************************
@@ -721,7 +678,6 @@ WRITE_LINE_MEMBER( tek4051_state::tape_pia_irqb_w )
update_nmi();
}
-
WRITE8_MEMBER( tek4051_state::dio_w )
{
/*
@@ -842,7 +798,6 @@ WRITE_LINE_MEMBER( tek4051_state::gpib_pia_irqb_w )
update_irq();
}
-
WRITE8_MEMBER( tek4051_state::com_pia_pa_w )
{
/*
@@ -934,7 +889,6 @@ WRITE_LINE_MEMBER( tek4051_state::com_pia_irqb_w )
update_irq();
}
-
WRITE_LINE_MEMBER( tek4051_state::acia_irq_w )
{
m_acia_irq = state;
@@ -952,10 +906,6 @@ WRITE_LINE_MEMBER( tek4051_state::write_acia_clock )
// MACHINE INITIALIZATION
//**************************************************************************
-//-------------------------------------------------
-// MACHINE_START( tek4051 )
-//-------------------------------------------------
-
void tek4051_state::machine_start()
{
m_lamps.resolve();
@@ -981,45 +931,36 @@ void tek4051_state::machine_start()
// register for state saving
}
-
-//-------------------------------------------------
-// MACHINE_START( tek4052 )
-//-------------------------------------------------
-
void tek4052_state::machine_start()
{
}
-
//**************************************************************************
// MACHINE CONFIGURATION
//**************************************************************************
-//-------------------------------------------------
-// MACHINE_CONFIG( tek4051 )
-//-------------------------------------------------
-
-MACHINE_CONFIG_START(tek4051_state::tek4051)
+void tek4051_state::tek4051(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(MC6800_TAG, M6800, XTAL(12'500'000)/15)
- MCFG_DEVICE_PROGRAM_MAP(tek4051_mem)
+ M6800(config, m_maincpu, XTAL(12'500'000)/15);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tek4051_state::tek4051_mem);
// video hardware
VECTOR(config, "vector", 0);
- MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, VECTOR, rgb_t::green())
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate
- MCFG_SCREEN_SIZE(1024, 780)
- MCFG_SCREEN_VISIBLE_AREA(0, 1024-1, 0, 780-1)
- MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
+ screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_VECTOR));
+ screen.set_color(rgb_t::green());
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate
+ screen.set_size(1024, 780);
+ screen.set_visarea(0, 1024-1, 0, 780-1);
+ screen.set_screen_update("vector", FUNC(vector_device::screen_update));
PALETTE(config, "palette", palette_device::MONOCHROME);
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
// devices
TIMER(config, "keyboard").configure_periodic(FUNC(tek4051_state::keyboard_tick), attotime::from_hz(XTAL(12'500'000)/15/4));
@@ -1088,64 +1029,56 @@ MACHINE_CONFIG_START(tek4051_state::tek4051)
CLOCK(config, m_acia_clock, 38400);
m_acia_clock->signal_handler().set(FUNC(tek4051_state::write_acia_clock));
- MCFG_IEEE488_BUS_ADD()
- MCFG_IEEE488_EOI_CALLBACK(WRITELINE(MC6820_GPIB_TAG, pia6821_device, ca1_w))
- MCFG_IEEE488_SRQ_CALLBACK(WRITELINE(MC6820_GPIB_TAG, pia6821_device, cb1_w))
+ IEEE488(config, m_gpib);
+ m_gpib->eoi_callback().set(MC6820_GPIB_TAG, FUNC(pia6821_device::ca1_w));
+ m_gpib->srq_callback().set(MC6820_GPIB_TAG, FUNC(pia6821_device::cb1_w));
// internal ram
RAM(config, RAM_TAG).set_default_size("8K").set_extra_options("16K,24K,32K");
// cartridge
- MCFG_GENERIC_CARTSLOT_ADD("cartslot1", generic_plain_slot, "tek4050_cart")
- MCFG_GENERIC_CARTSLOT_ADD("cartslot2", generic_plain_slot, "tek4050_cart")
-MACHINE_CONFIG_END
-
-
-//-------------------------------------------------
-// MACHINE_CONFIG( tek4052 )
-//-------------------------------------------------
+ GENERIC_CARTSLOT(config, "cartslot1", generic_plain_slot, "tek4050_cart");
+ GENERIC_CARTSLOT(config, "cartslot2", generic_plain_slot, "tek4050_cart");
+}
-MACHINE_CONFIG_START(tek4052_state::tek4052)
+void tek4052_state::tek4052(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(AM2901A_TAG, M6800, 1000000) // should be 4x AM2901A + AM2911
- MCFG_DEVICE_PROGRAM_MAP(tek4052_mem)
+ m6800_cpu_device &cpu(M6800(config, AM2901A_TAG, 1000000)); // should be 4x AM2901A + AM2911
+ cpu.set_addrmap(AS_PROGRAM, &tek4052_state::tek4052_mem);
// video hardware
VECTOR(config, "vector", 0);
- MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, VECTOR, rgb_t::green())
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate
- MCFG_SCREEN_SIZE(1024, 780)
- MCFG_SCREEN_VISIBLE_AREA(0, 1024-1, 0, 780-1)
- MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
+ screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_VECTOR));
+ screen.set_color(rgb_t::green());
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate
+ screen.set_size(1024, 780);
+ screen.set_visarea(0, 1024-1, 0, 780-1);
+ screen.set_screen_update("vector", FUNC(vector_device::screen_update));
PALETTE(config, "palette", palette_device::MONOCHROME);
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.25);
// internal ram
RAM(config, RAM_TAG).set_default_size("32K").set_extra_options("64K");
// cartridge
- MCFG_GENERIC_CARTSLOT_ADD("cartslot1", generic_plain_slot, "tek4050_cart")
- MCFG_GENERIC_CARTSLOT_ADD("cartslot2", generic_plain_slot, "tek4050_cart")
+ GENERIC_CARTSLOT(config, "cartslot1", generic_plain_slot, "tek4050_cart");
+ GENERIC_CARTSLOT(config, "cartslot2", generic_plain_slot, "tek4050_cart");
// software lists
SOFTWARE_LIST(config, "cart_list").set_original("tek4052_cart");
-MACHINE_CONFIG_END
-
+}
-//-------------------------------------------------
-// MACHINE_CONFIG( tek4054 )
-//-------------------------------------------------
/*
-MACHINE_CONFIG_START(tek4054_state::tek4054)
- MCFG_SCREEN_SIZE(4096, 3125)
- MCFG_SCREEN_VISIBLE_AREA(0, 4096-1, 0, 3125-1)
-MACHINE_CONFIG_END
+void tek4054_state::tek4054(machine_config &config)
+{
+ // screen size: 4096, 3125
+}
*/
@@ -1154,10 +1087,6 @@ MACHINE_CONFIG_END
// ROMS
//**************************************************************************
-//-------------------------------------------------
-// ROM( tek4051 )
-//-------------------------------------------------
-
ROM_START( tek4051 )
ROM_REGION( 0x8000, MC6800_TAG, 0 )
ROM_LOAD( "156-0659-xx.u585", 0x0000, 0x0800, CRC(0017ba54) SHA1(533bfacb2e698c1df88a00acce6df6a8c536239d) ) // -01 or -02 ?
@@ -1202,11 +1131,6 @@ ROM_START( tek4051 )
*/
ROM_END
-
-//-------------------------------------------------
-// ROM( tek4052a )
-//-------------------------------------------------
-
ROM_START( tek4052a )
ROM_REGION( 0x3800, AM2901A_TAG, 0 ) // ALU 670-7705-00 microcode
ROM_LOAD( "160-1689-00.u340", 0x0000, 0x0800, CRC(97ff62d4) SHA1(e25b495fd1b3f8a5bfef5c8f20efacde8366e89c) )
diff --git a/src/mame/drivers/tomcat.cpp b/src/mame/drivers/tomcat.cpp
index af778e84c07..394b5a34553 100644
--- a/src/mame/drivers/tomcat.cpp
+++ b/src/mame/drivers/tomcat.cpp
@@ -97,7 +97,7 @@ private:
WRITE8_MEMBER(tomcat_state::adcon_w)
{
- m_adc->address_w(space, 0, data & 7);
+ m_adc->address_w(data & 7);
m_adc->start_w(BIT(data, 3));
}
diff --git a/src/mame/drivers/vixen.cpp b/src/mame/drivers/vixen.cpp
index 8a8184e20c4..2805320a2e3 100644
--- a/src/mame/drivers/vixen.cpp
+++ b/src/mame/drivers/vixen.cpp
@@ -65,10 +65,6 @@ Notes:
// INTERRUPTS
//**************************************************************************
-//-------------------------------------------------
-// update_interrupt -
-//-------------------------------------------------
-
void vixen_state::update_interrupt()
{
int state = (m_cmd_d1 && m_fdint) || m_vsync;// || (!m_enb_srq_int && !m_srq) || (!m_enb_atn_int && !m_atn) || (!m_enb_xmt_int && m_txrdy) || (!m_enb_rcv_int && m_rxrdy);
@@ -91,10 +87,6 @@ READ8_MEMBER( vixen_state::oprom_r )
return m_rom[offset];
}
-//-------------------------------------------------
-// status_r - status read
-//-------------------------------------------------
-
READ8_MEMBER( vixen_state::status_r )
{
/*
@@ -126,11 +118,6 @@ READ8_MEMBER( vixen_state::status_r )
return data;
}
-
-//-------------------------------------------------
-// cmd_w - command write
-//-------------------------------------------------
-
WRITE8_MEMBER( vixen_state::cmd_w )
{
/*
@@ -165,11 +152,6 @@ WRITE8_MEMBER( vixen_state::cmd_w )
update_interrupt();
}
-
-//-------------------------------------------------
-// ieee488_r - IEEE488 bus read
-//-------------------------------------------------
-
READ8_MEMBER( vixen_state::ieee488_r )
{
/*
@@ -255,10 +237,6 @@ READ8_MEMBER( vixen_state::port3_r )
// ADDRESS MAPS
//**************************************************************************
-//-------------------------------------------------
-// ADDRESS_MAP( vixen_mem )
-//-------------------------------------------------
-
// when M1 is inactive: read and write of data
void vixen_state::vixen_mem(address_map &map)
{
@@ -275,11 +253,6 @@ void vixen_state::bios_mem(address_map &map)
map(0xf000, 0xffff).r(FUNC(vixen_state::oprom_r));
}
-
-//-------------------------------------------------
-// ADDRESS_MAP( vixen_io )
-//-------------------------------------------------
-
void vixen_state::vixen_io(address_map &map)
{
map.unmap_value_high();
@@ -303,10 +276,6 @@ void vixen_state::vixen_io(address_map &map)
// INPUT PORTS
//**************************************************************************
-//-------------------------------------------------
-// INPUT_PORTS( vixen )
-//-------------------------------------------------
-
INPUT_PORTS_START( vixen )
PORT_START("KEY.0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(0x1B)
@@ -395,10 +364,6 @@ INPUT_PORTS_END
// VIDEO
//**************************************************************************
-//-------------------------------------------------
-// TIMER_DEVICE_CALLBACK_MEMBER( vsync_tick )
-//-------------------------------------------------
-
TIMER_DEVICE_CALLBACK_MEMBER(vixen_state::vsync_tick)
{
if (m_cmd_d0)
@@ -408,7 +373,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(vixen_state::vsync_tick)
}
}
-
void vixen_state::video_start()
{
// register for state saving
@@ -417,11 +381,6 @@ void vixen_state::video_start()
save_item(NAME(m_vsync));
}
-
-//-------------------------------------------------
-// SCREEN_UPDATE( vixen )
-//-------------------------------------------------
-
uint32_t vixen_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
const pen_t *pen = m_palette->pens();
@@ -481,10 +440,6 @@ uint32_t vixen_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
// SOUND
//**************************************************************************
-//-------------------------------------------------
-// DISCRETE_SOUND( vixen )
-//-------------------------------------------------
-
static DISCRETE_SOUND_START( vixen_discrete )
DISCRETE_INPUT_LOGIC(NODE_01)
DISCRETE_SQUAREWAVE(NODE_02, NODE_01, (23.9616_MHz_XTAL / 15360).dvalue(), 100, 50, 0, 90)
@@ -651,7 +606,7 @@ WRITE_LINE_MEMBER( vixen_state::txrdy_w )
}
//-------------------------------------------------
-// IEEE488_INTERFACE( ieee488_intf )
+// IEEE488 interface
//-------------------------------------------------
WRITE_LINE_MEMBER( vixen_state::srq_w )
@@ -683,21 +638,12 @@ WRITE_LINE_MEMBER( vixen_state::fdc_intrq_w )
// MACHINE INITIALIZATION
//**************************************************************************
-//-------------------------------------------------
-// IRQ_CALLBACK_MEMBER( vixen_int_ack )
-//-------------------------------------------------
-
IRQ_CALLBACK_MEMBER(vixen_state::vixen_int_ack)
{
// D0 is pulled low
return 0xfe;
}
-
-//-------------------------------------------------
-// MACHINE_START( vixen )
-//-------------------------------------------------
-
void vixen_state::machine_start()
{
// configure memory banking
@@ -714,7 +660,6 @@ void vixen_state::machine_start()
save_item(NAME(m_fdint));
}
-
void vixen_state::machine_reset()
{
membank("bank3")->set_entry(1);
@@ -736,22 +681,20 @@ void vixen_state::machine_reset()
// MACHINE CONFIGURATION
//**************************************************************************
-//-------------------------------------------------
-// MACHINE_CONFIG( vixen )
-//-------------------------------------------------
-
-MACHINE_CONFIG_START(vixen_state::vixen)
+void vixen_state::vixen(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(m_maincpu, Z80, 23.9616_MHz_XTAL / 6)
- MCFG_DEVICE_PROGRAM_MAP(vixen_mem)
- MCFG_DEVICE_OPCODES_MAP(bios_mem)
- MCFG_DEVICE_IO_MAP(vixen_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(vixen_state,vixen_int_ack)
+ Z80(config, m_maincpu, 23.9616_MHz_XTAL / 6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &vixen_state::vixen_mem);
+ m_maincpu->set_addrmap(AS_OPCODES, &vixen_state::bios_mem);
+ m_maincpu->set_addrmap(AS_IO, &vixen_state::vixen_io);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(vixen_state::vixen_int_ack));
// video hardware
- MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::amber())
- MCFG_SCREEN_UPDATE_DRIVER(vixen_state, screen_update)
- MCFG_SCREEN_RAW_PARAMS(23.9616_MHz_XTAL / 2, 96*8, 0*8, 81*8, 27*10, 0*10, 26*10)
+ screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
+ screen.set_color(rgb_t::amber());
+ screen.set_screen_update(FUNC(vixen_state::screen_update));
+ screen.set_raw(23.9616_MHz_XTAL / 2, 96*8, 0*8, 81*8, 27*10, 0*10, 26*10);
TIMER(config, "vsync").configure_scanline(FUNC(vixen_state::vsync_tick), SCREEN_TAG, 26*10, 27*10);
@@ -759,8 +702,7 @@ MACHINE_CONFIG_START(vixen_state::vixen)
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(DISCRETE_TAG, DISCRETE, vixen_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ DISCRETE(config, DISCRETE_TAG, vixen_discrete).add_route(ALL_OUTPUTS, "mono", 0.20);
// devices
i8155_device &i8155(I8155(config, P8155H_TAG, 23.9616_MHz_XTAL / 6));
@@ -789,16 +731,16 @@ MACHINE_CONFIG_START(vixen_state::vixen)
m_fdc->intrq_wr_callback().set(FUNC(vixen_state::fdc_intrq_w));
FLOPPY_CONNECTOR(config, FDC1797_TAG":0", vixen_floppies, "525dd", floppy_image_device::default_floppy_formats).enable_sound(true);
FLOPPY_CONNECTOR(config, FDC1797_TAG":1", vixen_floppies, "525dd", floppy_image_device::default_floppy_formats).enable_sound(true);
- MCFG_IEEE488_BUS_ADD()
- MCFG_IEEE488_SRQ_CALLBACK(WRITELINE(*this, vixen_state, srq_w))
- MCFG_IEEE488_ATN_CALLBACK(WRITELINE(*this, vixen_state, atn_w))
+ IEEE488(config, m_ieee488);
+ m_ieee488->srq_callback().set(FUNC(vixen_state::srq_w));
+ m_ieee488->atn_callback().set(FUNC(vixen_state::atn_w));
/* software lists */
SOFTWARE_LIST(config, "disk_list").set_original("vixen");
// internal ram
RAM(config, RAM_TAG).set_default_size("64K");
-MACHINE_CONFIG_END
+}
@@ -806,10 +748,6 @@ MACHINE_CONFIG_END
// ROMS
//**************************************************************************
-//-------------------------------------------------
-// ROM( vixen )
-//-------------------------------------------------
-
ROM_START( vixen )
ROM_REGION( 0x1000, Z8400A_TAG, 0 )
ROM_LOAD( "osborne 4 mon rom v1.04 3p40082-03 a0a9.4c", 0x0000, 0x1000, CRC(5f1038ce) SHA1(e6809fac23650bbb4689e58edc768d917d80a2df) ) // OSBORNE 4 MON ROM / V1.04 3P40082-03 / A0A9 (c) OCC 1985
@@ -827,11 +765,6 @@ ROM_END
// DRIVER INITIALIZATION
//**************************************************************************
-//-------------------------------------------------
-// DRIVER_INIT( vixen )
-//-------------------------------------------------
-
-
void vixen_state::init_vixen()
{
m_program = &m_maincpu->space(AS_PROGRAM);
diff --git a/src/mame/drivers/vsmile.cpp b/src/mame/drivers/vsmile.cpp
index 8c36fae0cdd..d498fe82653 100644
--- a/src/mame/drivers/vsmile.cpp
+++ b/src/mame/drivers/vsmile.cpp
@@ -50,18 +50,6 @@ READ16_MEMBER(vsmile_base_state::bank3_r)
return ((uint16_t*)m_system_region->base())[offset];
}
-void vsmile_base_state::mem_map(address_map &map)
-{
- map(0x000000, 0x3fffff).rw(m_bankdev, FUNC(address_map_bank_device::read16), FUNC(address_map_bank_device::write16));
- map(0x000000, 0x003fff).m(m_spg, FUNC(spg2xx_device::map));
-}
-
-/************************************
- *
- * V.Smile
- *
- ************************************/
-
void vsmile_state::machine_start()
{
vsmile_base_state::machine_start();
@@ -101,6 +89,12 @@ READ16_MEMBER(vsmile_state::portb_r)
return VSMILE_PORTB_OFF_SW | VSMILE_PORTB_ON_SW | VSMILE_PORTB_RESET;
}
+WRITE16_MEMBER(vsmile_state::portb_w)
+{
+ if (BIT(mem_mask, 4))
+ m_cart->set_cs2(BIT(data, 4));
+}
+
READ16_MEMBER(vsmile_state::portc_r)
{
uint16_t data = m_dsw_region->read();
@@ -128,6 +122,36 @@ WRITE16_MEMBER(vsmile_state::portc_w)
}
}
+/************************************
+ *
+ * V.Smile Motion-specific
+ *
+ ************************************/
+
+WRITE16_MEMBER(vsmilem_state::porta_w)
+{
+ //printf("Port A write: %04x & %04x\n", data, mem_mask);
+}
+
+READ16_MEMBER(vsmilem_state::porta_r)
+{
+ const uint16_t data = 0xc000;
+ //printf("Port A read: %04x & %04x\n", data, mem_mask);
+ return data;
+}
+
+/************************************
+ *
+ * Address Maps
+ *
+ ************************************/
+
+void vsmile_base_state::mem_map(address_map &map)
+{
+ map(0x000000, 0x3fffff).rw(m_bankdev, FUNC(address_map_bank_device::read16), FUNC(address_map_bank_device::write16));
+ map(0x000000, 0x003fff).m(m_spg, FUNC(spg2xx_device::map));
+}
+
void vsmile_state::banked_map(address_map &map)
{
map(0x0000000, 0x00fffff).rom().region("maincpu", 0);
@@ -249,6 +273,13 @@ void vsmile_state::vsmilep(machine_config &config)
m_spg->set_pal(true);
}
+void vsmilem_state::vsmilem(machine_config &config)
+{
+ vsmile(config);
+ m_spg->porta_out().set(FUNC(vsmilem_state::porta_w));
+ m_spg->porta_in().set(FUNC(vsmilem_state::porta_r));
+}
+
/************************************
*
* ROM Loading
@@ -271,7 +302,13 @@ ROM_START( vsmilef )
ROM_LOAD16_WORD_SWAP( "sysrom_france", 0x000000, 0x200000, CRC(0cd0bdf5) SHA1(5c8d1eada1b6b545555b8d2b09325d7127681af8) )
ROM_END
-// year, name, parent, compat, machine, input, class, init, company, fullname, flags
-CONS( 2005, vsmile, 0, 0, vsmile, vsmile, vsmile_state, empty_init, "VTech", "V.Smile (US)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
-CONS( 2005, vsmileg, vsmile, 0, vsmilep, vsmile, vsmile_state, empty_init, "VTech", "V.Smile (Germany)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
-CONS( 2005, vsmilef, vsmile, 0, vsmilep, vsmile, vsmile_state, empty_init, "VTech", "V.Smile (France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
+ROM_START( vsmilem )
+ ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_LOAD( "vsmilebios.bin", 0x000000, 0x200000, BAD_DUMP CRC(11f1b416) SHA1(11f77c4973d29c962567390e41879c86a759c93b) )
+ROM_END
+
+// year, name, parent, compat, machine, input, class, init, company, fullname, flags
+CONS( 2005, vsmile, 0, 0, vsmile, vsmile, vsmile_state, empty_init, "VTech", "V.Smile (US)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2005, vsmileg, vsmile, 0, vsmilep, vsmile, vsmile_state, empty_init, "VTech", "V.Smile (Germany)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2005, vsmilef, vsmile, 0, vsmilep, vsmile, vsmile_state, empty_init, "VTech", "V.Smile (France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2008, vsmilem, vsmile, 0, vsmilem, vsmile, vsmilem_state, empty_init, "VTech", "V.Smile Motion (US)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
diff --git a/src/mame/drivers/xor100.cpp b/src/mame/drivers/xor100.cpp
index f8c54041ebb..5392e0a0e2a 100644
--- a/src/mame/drivers/xor100.cpp
+++ b/src/mame/drivers/xor100.cpp
@@ -477,11 +477,12 @@ void xor100_state::post_load()
/* Machine Driver */
-MACHINE_CONFIG_START(xor100_state::xor100)
+void xor100_state::xor100(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(Z80_TAG, Z80, 8_MHz_XTAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(xor100_mem)
- MCFG_DEVICE_IO_MAP(xor100_io)
+ Z80(config, m_maincpu, 8_MHz_XTAL / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &xor100_state::xor100_mem);
+ m_maincpu->set_addrmap(AS_IO, &xor100_state::xor100_io);
/* devices */
I8251(config, m_uart_a, 0/*8_MHz_XTAL / 2,*/);
@@ -535,22 +536,22 @@ MACHINE_CONFIG_START(xor100_state::xor100)
m_centronics->set_output_latch(cent_data_out);
// S-100
- MCFG_DEVICE_ADD(S100_TAG, S100_BUS, 8_MHz_XTAL / 4)
- MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT))
- MCFG_S100_SLOT_ADD(S100_TAG ":1", xor100_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":2", xor100_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":3", xor100_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":4", xor100_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":5", xor100_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":6", xor100_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":7", xor100_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":8", xor100_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":9", xor100_s100_cards, nullptr)
- MCFG_S100_SLOT_ADD(S100_TAG ":10", xor100_s100_cards, nullptr)
+ S100_BUS(config, m_s100, 8_MHz_XTAL / 4);
+ m_s100->rdy().set_inputline(m_maincpu, Z80_INPUT_LINE_BOGUSWAIT);
+ S100_SLOT(config, S100_TAG ":1", xor100_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":2", xor100_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":3", xor100_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":4", xor100_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":5", xor100_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":6", xor100_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":7", xor100_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":8", xor100_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":9", xor100_s100_cards, nullptr);
+ S100_SLOT(config, S100_TAG ":10", xor100_s100_cards, nullptr);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("64K").set_extra_options("128K,192K,256K,320K,384K,448K,512K");
-MACHINE_CONFIG_END
+}
/* ROMs */
diff --git a/src/mame/drivers/zorba.cpp b/src/mame/drivers/zorba.cpp
index 23da8b27d5c..2103ab3ac06 100644
--- a/src/mame/drivers/zorba.cpp
+++ b/src/mame/drivers/zorba.cpp
@@ -132,17 +132,19 @@ GFXDECODE_END
} // anonymous namespace
-MACHINE_CONFIG_START(zorba_state::zorba)
+void zorba_state::zorba(machine_config &config)
+{
// basic machine hardware
Z80(config, m_maincpu, 24_MHz_XTAL / 6);
m_maincpu->set_addrmap(AS_PROGRAM, &zorba_state::zorba_mem);
m_maincpu->set_addrmap(AS_IO, &zorba_state::zorba_io);
/* video hardware */
- MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green())
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_UPDATE_DEVICE("crtc", i8275_device, screen_update)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_zorba)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_color(rgb_t::green());
+ screen.set_refresh_hz(50);
+ screen.set_screen_update("crtc", FUNC(i8275_device::screen_update));
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_zorba);
PALETTE(config, m_palette, palette_device::MONOCHROME_HIGHLIGHT);
/* sound hardware */
@@ -227,8 +229,8 @@ MACHINE_CONFIG_START(zorba_state::zorba)
FLOPPY_CONNECTOR(config, m_floppy1, zorba_floppies, "525dd", floppy_image_device::default_floppy_formats).enable_sound(true);
// J1 IEEE-488
- MCFG_IEEE488_BUS_ADD()
- MCFG_IEEE488_SRQ_CALLBACK(WRITELINE(m_pia1, pia6821_device, ca2_w)) // TODO: gated with PB1 from PIA
+ IEEE488(config, m_ieee);
+ m_ieee->srq_callback().set(m_pia1, FUNC(pia6821_device::ca2_w)); // TODO: gated with PB1 from PIA
// J2 EIA RS232/internal modem
// TODO: this has additional lines compared to a regular RS232 port (TxC in, RxC in, RxC out, speaker in, power)
@@ -255,7 +257,7 @@ MACHINE_CONFIG_START(zorba_state::zorba)
ZORBA_KEYBOARD(config, "keyboard").rxd_cb().set(m_uart2, FUNC(i8251_device::write_rxd));
SOFTWARE_LIST(config, "flop_list").set_original("zorba");
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
diff --git a/src/mame/includes/multfish.h b/src/mame/includes/multfish.h
index 72059e43003..1f0b5e28303 100644
--- a/src/mame/includes/multfish.h
+++ b/src/mame/includes/multfish.h
@@ -53,6 +53,10 @@ public:
void init_crzmon2();
void init_crzmon2lot();
void init_crzmon2ent();
+ void init_islandent();
+ void init_pirateent();
+ void init_sweetlent();
+ void init_rollfruit();
private:
DECLARE_WRITE8_MEMBER(igrosoft_gamble_vid_w);
diff --git a/src/mame/includes/vsmile.h b/src/mame/includes/vsmile.h
index defb83e106e..0069803295f 100644
--- a/src/mame/includes/vsmile.h
+++ b/src/mame/includes/vsmile.h
@@ -85,6 +85,7 @@ private:
template <int Which> DECLARE_WRITE_LINE_MEMBER(ctrl_rts_w);
DECLARE_READ16_MEMBER(portb_r);
+ DECLARE_WRITE16_MEMBER(portb_w);
DECLARE_READ16_MEMBER(portc_r);
DECLARE_WRITE16_MEMBER(portc_w);
@@ -115,6 +116,20 @@ private:
bool m_ctrl_select[2];
};
+class vsmilem_state : public vsmile_state
+{
+public:
+ vsmilem_state(const machine_config &mconfig, device_type type, const char *tag)
+ : vsmile_state(mconfig, type, tag)
+ { }
+
+ void vsmilem(machine_config &config);
+
+protected:
+ DECLARE_WRITE16_MEMBER(porta_w);
+ DECLARE_READ16_MEMBER(porta_r);
+};
+
class vsmileb_state : public vsmile_base_state
{
public:
diff --git a/src/mame/machine/harddriv.cpp b/src/mame/machine/harddriv.cpp
index fbae3bc7b54..f41f81b0c63 100644
--- a/src/mame/machine/harddriv.cpp
+++ b/src/mame/machine/harddriv.cpp
@@ -312,7 +312,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_adc_control_w )
COMBINE_DATA(&m_adc_control);
/* handle a write to the 8-bit ADC address select */
- m_adc8->address_w(space, 0, m_adc_control & 0x07);
+ m_adc8->address_w(m_adc_control & 0x07);
m_adc8->start_w(BIT(m_adc_control, 3));
/* handle a write to the 12-bit ADC address select */
diff --git a/src/mame/machine/megacd.cpp b/src/mame/machine/megacd.cpp
index 6b5b272c4c4..8b7e9f27574 100644
--- a/src/mame/machine/megacd.cpp
+++ b/src/mame/machine/megacd.cpp
@@ -292,19 +292,18 @@ static GFXDECODE_START( gfx_segacd )
GFXDECODE_END
-MACHINE_CONFIG_START(sega_segacd_device::device_add_mconfig)
-
- MCFG_DEVICE_ADD("segacd_68k", M68000, SEGACD_CLOCK ) /* 12.5 MHz */
- MCFG_DEVICE_PROGRAM_MAP(segacd_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE(DEVICE_SELF, sega_segacd_device, segacd_sub_int_callback)
+void sega_segacd_device::device_add_mconfig(machine_config &config)
+{
+ M68000(config, m_scdcpu, SEGACD_CLOCK); /* 12.5 MHz */
+ m_scdcpu->set_addrmap(AS_PROGRAM, &sega_segacd_device::segacd_map);
+ m_scdcpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(sega_segacd_device::segacd_sub_int_callback),this));
- MCFG_DEVICE_ADD("cdc", LC89510, 0) // cd controller
+ LC89510(config, "cdc", 0); // cd controller
// temporary until things are cleaned up
LC89510_TEMP(config, m_lc89510_temp, 0); // cd controller
m_lc89510_temp->set_cdc_do_dma_callback(FUNC(sega_segacd_device::SegaCD_CDC_Do_DMA), this); // hack
-
TIMER(config, m_stopwatch_timer).configure_generic(timer_device::expired_delegate()); //stopwatch timer
TIMER(config, m_stamp_timer).configure_generic(FUNC(sega_segacd_device::stamp_timer_callback));
TIMER(config, m_irq3_timer).configure_generic(FUNC(sega_segacd_device::irq3_timer_callback));
@@ -312,30 +311,31 @@ MACHINE_CONFIG_START(sega_segacd_device::device_add_mconfig)
config.set_default_layout(layout_megacd);
- MCFG_DEVICE_ADD("rfsnd", RF5C68, SEGACD_CLOCK) // RF5C164!
- MCFG_SOUND_ROUTE( 0, ":lspeaker", 0.50 )
- MCFG_SOUND_ROUTE( 1, ":rspeaker", 0.50 )
- MCFG_DEVICE_ADDRESS_MAP(0, segacd_pcm_map)
+ RF5C68(config, m_rfsnd, SEGACD_CLOCK); // RF5C164!
+ m_rfsnd->add_route( 0, ":lspeaker", 0.50 );
+ m_rfsnd->add_route( 1, ":rspeaker", 0.50 );
+ m_rfsnd->set_addrmap(0, &sega_segacd_device::segacd_pcm_map);
NVRAM(config, "backupram", nvram_device::DEFAULT_ALL_0);
config.m_perfect_cpu_quantum = subtag("segacd_68k"); // perfect sync to the fastest cpu
-MACHINE_CONFIG_END
+}
sega_segacd_device::sega_segacd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, type, tag, owner, clock),
- device_gfx_interface(mconfig, *this, gfx_segacd),
- m_scdcpu(*this, "segacd_68k"),
- m_rfsnd(*this, "rfsnd"),
- m_lc89510_temp(*this, "tempcdc"),
- m_stopwatch_timer(*this, "sw_timer"),
- m_stamp_timer(*this, "stamp_timer"),
- m_irq3_timer(*this, "irq3_timer"),
- m_dma_timer(*this, "dma_timer"),
- m_prgram(*this, "prgram"),
- m_dataram(*this, "dataram"),
- m_font_bits(*this, "font_bits")
+ : device_t(mconfig, type, tag, owner, clock)
+ , device_gfx_interface(mconfig, *this, gfx_segacd)
+ , m_scdcpu(*this, "segacd_68k")
+ , m_hostcpu(*this, finder_base::DUMMY_TAG)
+ , m_rfsnd(*this, "rfsnd")
+ , m_lc89510_temp(*this, "tempcdc")
+ , m_stopwatch_timer(*this, "sw_timer")
+ , m_stamp_timer(*this, "stamp_timer")
+ , m_irq3_timer(*this, "irq3_timer")
+ , m_dma_timer(*this, "dma_timer")
+ , m_prgram(*this, "prgram")
+ , m_dataram(*this, "dataram")
+ , m_font_bits(*this, "font_bits")
{
}
@@ -568,7 +568,7 @@ READ16_MEMBER( sega_segacd_device::scd_a12002_memory_mode_r )
// RET = Return access (bit 1)
-WRITE8_MEMBER( sega_segacd_device::scd_a12002_memory_mode_w_8_15 )
+void sega_segacd_device::scd_a12002_memory_mode_w_8_15(u8 data)
{
if (data & 0xff00)
{
@@ -579,7 +579,7 @@ WRITE8_MEMBER( sega_segacd_device::scd_a12002_memory_mode_w_8_15 )
}
-WRITE8_MEMBER( sega_segacd_device::scd_a12002_memory_mode_w_0_7 )
+void sega_segacd_device::scd_a12002_memory_mode_w_0_7(u8 data)
{
//printf("scd_a12002_memory_mode_w_0_7 %04x\n",data);
@@ -605,10 +605,10 @@ WRITE8_MEMBER( sega_segacd_device::scd_a12002_memory_mode_w_0_7 )
WRITE16_MEMBER( sega_segacd_device::scd_a12002_memory_mode_w )
{
if (ACCESSING_BITS_8_15)
- scd_a12002_memory_mode_w_8_15(space, 0, data>>8, mem_mask>>8);
+ scd_a12002_memory_mode_w_8_15(data>>8);
if (ACCESSING_BITS_0_7)
- scd_a12002_memory_mode_w_0_7(space, 0, data&0xff, mem_mask&0xff);
+ scd_a12002_memory_mode_w_0_7(data&0xff);
}
@@ -627,14 +627,14 @@ READ16_MEMBER( sega_segacd_device::segacd_sub_memory_mode_r )
}
-WRITE8_MEMBER( sega_segacd_device::segacd_sub_memory_mode_w_8_15 )
+void sega_segacd_device::segacd_sub_memory_mode_w_8_15(u8 data)
{
/* setting write protect bits from sub-cpu has no effect? */
}
-WRITE8_MEMBER( sega_segacd_device::segacd_sub_memory_mode_w_0_7 )
+void sega_segacd_device::segacd_sub_memory_mode_w_0_7(u8 data)
{
segacd_memory_priority_mode = (data&0x0018)>>3;
@@ -696,10 +696,10 @@ WRITE16_MEMBER( sega_segacd_device::segacd_sub_memory_mode_w )
if (ACCESSING_BITS_8_15)
- segacd_sub_memory_mode_w_8_15(space, 0, data>>8, mem_mask>>8);
+ segacd_sub_memory_mode_w_8_15(data>>8);
if (ACCESSING_BITS_0_7)
- segacd_sub_memory_mode_w_0_7(space, 0, data&0xff, mem_mask&0xff);
+ segacd_sub_memory_mode_w_0_7(data&0xff);
}
@@ -1724,7 +1724,7 @@ READ16_MEMBER( sega_segacd_device::font_converted_r )
void sega_segacd_device::device_start()
{
- address_space& space = machine().device("maincpu")->memory().space(AS_PROGRAM);
+ address_space& space = m_hostcpu->space(AS_PROGRAM);
m_backupram.resize(0x2000);
subdevice<nvram_device>("backupram")->set_base(&m_backupram[0], 0x2000);
@@ -1852,7 +1852,6 @@ void sega_segacd_device::SegaCD_CDC_Do_DMA(int &dmacount, uint8_t *CDC_BUFFER, u
uint16_t *dest;
int srcoffset = 0;
int dstoffset = 0;
- address_space& space = m_scdcpu->space(AS_PROGRAM);
bool PCM_DMA = false;
@@ -1890,8 +1889,8 @@ void sega_segacd_device::SegaCD_CDC_Do_DMA(int &dmacount, uint8_t *CDC_BUFFER, u
if (PCM_DMA)
{
- m_rfsnd->rf5c68_mem_w(space, dstoffset & 0xfff, data >> 8);
- m_rfsnd->rf5c68_mem_w(space, (dstoffset+1) & 0xfff, data);
+ m_rfsnd->rf5c68_mem_w(dstoffset & 0xfff, data >> 8);
+ m_rfsnd->rf5c68_mem_w((dstoffset+1) & 0xfff, data);
// printf("PCM_DMA writing %04x %04x\n",0xff2000+(dstoffset*2), data);
}
else
diff --git a/src/mame/machine/megacd.h b/src/mame/machine/megacd.h
index 6ae5df9e616..aacb18d56a9 100644
--- a/src/mame/machine/megacd.h
+++ b/src/mame/machine/megacd.h
@@ -14,6 +14,8 @@
class sega_segacd_device : public device_t, public device_gfx_interface
{
public:
+ template <typename T> void set_hostcpu(T &&tag) { m_hostcpu.set_tag(std::forward<T>(tag)); }
+
// set some variables at start, depending on region (shall be moved to a device interface?)
void set_framerate(int rate) { m_framerate = rate; }
void set_total_scanlines(int total) { m_base_total_scanlines = total; } // this gets set at start only
@@ -25,12 +27,12 @@ public:
DECLARE_WRITE16_MEMBER( scd_a12000_halt_reset_w );
DECLARE_READ16_MEMBER( scd_a12000_halt_reset_r );
DECLARE_READ16_MEMBER( scd_a12002_memory_mode_r );
- DECLARE_WRITE8_MEMBER( scd_a12002_memory_mode_w_8_15 );
- DECLARE_WRITE8_MEMBER( scd_a12002_memory_mode_w_0_7 );
+ void scd_a12002_memory_mode_w_8_15(u8 data);
+ void scd_a12002_memory_mode_w_0_7(u8 data);
DECLARE_WRITE16_MEMBER( scd_a12002_memory_mode_w );
DECLARE_READ16_MEMBER( segacd_sub_memory_mode_r );
- DECLARE_WRITE8_MEMBER( segacd_sub_memory_mode_w_8_15 );
- DECLARE_WRITE8_MEMBER( segacd_sub_memory_mode_w_0_7 );
+ void segacd_sub_memory_mode_w_8_15(u8 data);
+ void segacd_sub_memory_mode_w_0_7(u8 data);
DECLARE_WRITE16_MEMBER( segacd_sub_memory_mode_w );
DECLARE_READ16_MEMBER( segacd_comms_flags_r );
@@ -105,6 +107,7 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
required_device<cpu_device> m_scdcpu;
+ required_device<cpu_device> m_hostcpu;
required_device<rf5c68_device> m_rfsnd;
required_device<lc89510_temp_device> m_lc89510_temp;
required_device<timer_device> m_stopwatch_timer;
diff --git a/src/mame/machine/midyunit.cpp b/src/mame/machine/midyunit.cpp
index d622bd2af74..a959e493516 100644
--- a/src/mame/machine/midyunit.cpp
+++ b/src/mame/machine/midyunit.cpp
@@ -130,7 +130,7 @@ READ16_MEMBER(midyunit_state::term2_input_r)
if (offset != 2)
return m_ports[offset]->read();
- return m_term2_adc->read(space, 0) | 0xff00;
+ return m_term2_adc->read() | 0xff00;
}
WRITE16_MEMBER(midyunit_state::term2_sound_w)
@@ -160,7 +160,7 @@ WRITE16_MEMBER(midyunit_state::term2_sound_w)
}
if (offset == 0)
- m_term2_adc->write(space, 0, ((data >> 12) & 3) | 4);
+ m_term2_adc->write(((data >> 12) & 3) | 4);
m_adpcm_sound->reset_write((~data & 0x100) >> 1);
m_adpcm_sound->write(data);
diff --git a/src/mame/machine/nl_breakout.cpp b/src/mame/machine/nl_breakout.cpp
index 87426734036..0823df42350 100644
--- a/src/mame/machine/nl_breakout.cpp
+++ b/src/mame/machine/nl_breakout.cpp
@@ -1702,22 +1702,19 @@ CIRCUIT_LAYOUT( breakout )
NET_C(GND, D9.1, D9.2, D9.13, D9.3, D9.4, D9.5)
- HINT(A3.1.sub, NO_DEACTIVATE)
+#if 1
+ // 158% -- manually optimized
HINT(B6.s3, NO_DEACTIVATE)
HINT(C4.s3, NO_DEACTIVATE)
HINT(C4.s4, NO_DEACTIVATE)
HINT(C5.s3, NO_DEACTIVATE)
HINT(C5.s4, NO_DEACTIVATE)
- HINT(D3.2.sub, NO_DEACTIVATE)
HINT(E2.s2, NO_DEACTIVATE)
HINT(E3.s2, NO_DEACTIVATE)
HINT(E5.s4, NO_DEACTIVATE)
- HINT(E8.2.sub, NO_DEACTIVATE)
HINT(E9.s6, NO_DEACTIVATE)
- HINT(F5.2.sub, NO_DEACTIVATE)
HINT(H2.s1, NO_DEACTIVATE)
HINT(H3.s1, NO_DEACTIVATE)
- HINT(H6.sub, NO_DEACTIVATE)
HINT(J3.s4, NO_DEACTIVATE)
HINT(J5, NO_DEACTIVATE)
HINT(J6.sub, NO_DEACTIVATE)
@@ -1729,9 +1726,47 @@ CIRCUIT_LAYOUT( breakout )
HINT(M4.s2, NO_DEACTIVATE)
HINT(M6.sub, NO_DEACTIVATE)
HINT(M8.s1, NO_DEACTIVATE)
- HINT(N6.sub, NO_DEACTIVATE)
HINT(N7.s3, NO_DEACTIVATE)
+#else
+ // 152% hints provided by log output
+ HINT(M4.s2, NO_DEACTIVATE) // 29.001761 197676 6816
+ HINT(M3.s3, NO_DEACTIVATE) // inf 129571 0
+ HINT(N7.s3, NO_DEACTIVATE) // inf 7850387 0
+ HINT(M3.s2, NO_DEACTIVATE) // 23.234535 395870 17038
+ HINT(M3.s1, NO_DEACTIVATE) // 14.500880 197676 13632
+ HINT(L7.s3, NO_DEACTIVATE) // 122672.000000 122672 1
+ HINT(L7.s2, NO_DEACTIVATE) // 122672.000000 122672 1
+ HINT(K7.s4, NO_DEACTIVATE) // 122673.000000 122673 1
+ HINT(K7.s3, NO_DEACTIVATE) // 122672.000000 122672 1
+ HINT(K7.s2, NO_DEACTIVATE) // 122673.000000 122673 1
+ HINT(K7.s1, NO_DEACTIVATE) // 122673.000000 122673 1
+ HINT(K4.s4, NO_DEACTIVATE) // 1438.774735 4202661 2921
+ HINT(K4.s2, NO_DEACTIVATE) // 3.939380 847790 215209
+ HINT(E2.s2, NO_DEACTIVATE) // 108.050000 315506 2920
+ HINT(L7.s4, NO_DEACTIVATE) // 122672.000000 122672 1
+ HINT(E9.s6, NO_DEACTIVATE) // inf 129571 0
+ HINT(J2.s6, NO_DEACTIVATE) // 493.408951 959187 1944
+ HINT(C5.s3, NO_DEACTIVATE) // inf 195514 0
+ HINT(M3.s4, NO_DEACTIVATE) // 27.744898 418726 15092
+ HINT(J8.s1, NO_DEACTIVATE) // 40890.000000 122670 3
+ HINT(E3.s2, NO_DEACTIVATE) // 203581.000000 203581 1
+ HINT(M9.s4, NO_DEACTIVATE) // inf 323268 0
+ HINT(L4.s2, NO_DEACTIVATE) // 7.290053 1192536 163584
+ HINT(J3.s4, NO_DEACTIVATE) // 393.639951 957726 2433
+ HINT(L7.s1, NO_DEACTIVATE) // inf 122672 0
+ HINT(F2.s1, NO_DEACTIVATE) // 286289.000000 286289 1
+ HINT(M8.s1, NO_DEACTIVATE) // 129571.000000 129571 1
+ HINT(J7.s2, NO_DEACTIVATE) // inf 122672 0
+ HINT(H2.s1, NO_DEACTIVATE) // 393.839704 958212 2433
+ HINT(H3.s1, NO_DEACTIVATE) // 3.932473 850122 216180
+ HINT(J2.s5, NO_DEACTIVATE) // 26.140344 203581 7788
+ HINT(J7.s1, NO_DEACTIVATE) // inf 122672 0
+ HINT(J8.s3, NO_DEACTIVATE) // 40890.000000 122670 3
+
+
+#endif
+
CIRCUIT_LAYOUT_END
/*
diff --git a/src/mame/machine/vertigo.cpp b/src/mame/machine/vertigo.cpp
index da3ea2c1ef6..887b2a52fab 100644
--- a/src/mame/machine/vertigo.cpp
+++ b/src/mame/machine/vertigo.cpp
@@ -69,7 +69,7 @@ WRITE_LINE_MEMBER( vertigo_state::adc_eoc_w )
READ16_MEMBER(vertigo_state::vertigo_io_convert)
{
- m_adc->address_offset_start_w(space, offset, 0);
+ m_adc->address_offset_start_w(offset, 0);
return 0;
}
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 0c99cef0df8..1412d3d7017 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -9267,6 +9267,9 @@ c128dcrp //
c128dp //
c128p //
+@source:c2color.cpp
+c2color
+
@source:c64.cpp
c64 //
c64_jp // Commodore 64 (Japan)
@@ -18147,6 +18150,10 @@ lckydraw // (c) 1979 Mirco
@source:lcmate2.cpp
lcmate2 //
+@source:leapfrog_leappad.cpp
+leappad
+mfleappad
+
@source:leapster.cpp
leapster //
leapstertv //
@@ -28692,6 +28699,7 @@ mugsmash // (c) Electronic Devices (Italy) / 3D Games (En
crzmon2 // (c) 2010
crzmon2_2 // (c) 2010
crzmon2_3 // (c) 2010
+crzmon2_4 // (c) 2010
czmon_13 // (c) 2003
czmon_15 // (c) 2003
czmon_16 // (c) 2003
@@ -28733,6 +28741,7 @@ gnome_9 // (c) 2007
goldfish // (c) 2002 - Prototype of Multifish
island // (c) 2005
island_2 // (c) 2005
+island_3 // (c) 2005
island2 // (c) 2006
island2_3 // (c) 2006
island2_4 // (c) 2006
@@ -28743,6 +28752,8 @@ keks_2 // (c) 2006
keks_3 // (c) 2006
keks_4 // (c) 2006
keks_5 // (c) 2006
+keks_6 // (c) 2006
+keks_7 // (c) 2006
lhaunt_10 // (c) 2003
lhaunt_11 // (c) 2003
lhaunt_2 // (c) 2003
@@ -28760,6 +28771,7 @@ mfish_8 // (c) 2002
pirate_2 // (c) 2005
pirate_3 // (c) 2005
pirate_4 // (c) 2005
+pirate_5 // (c) 2005
pirate2 // (c) 2006
pirate2_2 // (c) 2006
pirate2_3 // (c) 2006
@@ -28777,9 +28789,11 @@ resdnt_8 // (c) 2004
resdnt_9 // (c) 2004
rollfr_2 // (c) 2003
rollfr_3 // (c) 2003
-rollfr_4 // (c) 2003 (bootleg?)
+rollfr_4 // (c) 2003
+rollfr_5 // (c) 2003
sweetl // (c) 2004
sweetl_2 // (c) 2004
+sweetl_3 // (c) 2004
sweetl2 // (c) 2007
sweetl2_2 // (c) 2007
sweetl2_3 // (c) 2007
@@ -30340,6 +30354,7 @@ mc_aa2
mc_105te
mc_sp69
polmega
+silv35
mc_dcat8
mc_dcat8a
pjoyn50
@@ -38663,6 +38678,7 @@ mattelcs //
vsmile //
vsmilef //
vsmileg //
+vsmilem //
@source:vsmileb.cpp
vsmileb //
diff --git a/src/mame/mess.flt b/src/mame/mess.flt
index fb17b5079e0..b509204d526 100644
--- a/src/mame/mess.flt
+++ b/src/mame/mess.flt
@@ -111,6 +111,7 @@ bw12.cpp
bw2.cpp
c10.cpp
c128.cpp
+c2color.cpp
c64.cpp
c64dtv.cpp
c65.cpp
@@ -378,6 +379,7 @@ laser3k.cpp
lb186.cpp
lc80.cpp
lcmate2.cpp
+leapfrog_leappad.cpp
leapster.cpp
learnwin.cpp
lee1214.cpp