summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Antonio Giner <estudio@antonioginer.com>2016-03-17 22:50:29 +0100
committer Antonio Giner <estudio@antonioginer.com>2016-03-17 22:50:29 +0100
commit421656e108e7091ee9e1b14c84f0a3f6efc2ad2e (patch)
treeb71b32c3156abcdcc09f23a29586f7c8100ad6f9
parentda18057256726be42d096a427c3f2ebc4fd45546 (diff)
parent78ef0f037617e074692f687d13d111af9855cf2d (diff)
Merge remote-tracking branch 'refs/remotes/mamedev/master'
-rw-r--r--.gitignore8
-rw-r--r--doxygen/doxy-boot.js3
-rw-r--r--doxygen/doxygen.config4
-rw-r--r--hash/neogeo.xml293
-rw-r--r--hash/nes.xml96
-rw-r--r--language/Japanese/strings.po198
-rw-r--r--scripts/genie.lua2
-rw-r--r--scripts/src/bus.lua38
-rw-r--r--scripts/src/cpu.lua35
-rw-r--r--scripts/src/main.lua1
-rw-r--r--scripts/target/mame/arcade.lua2
-rw-r--r--scripts/target/mame/mess.lua4
-rw-r--r--src/devices/bus/gba/gba_slot.cpp12
-rw-r--r--src/devices/bus/isa/trident.cpp6
-rw-r--r--src/devices/bus/svi3x8/expander/expander.cpp151
-rw-r--r--src/devices/bus/svi3x8/expander/expander.h162
-rw-r--r--src/devices/bus/svi3x8/expander/modules.cpp13
-rw-r--r--src/devices/bus/svi3x8/expander/modules.h19
-rw-r--r--src/devices/bus/svi3x8/expander/sv601.cpp98
-rw-r--r--src/devices/bus/svi3x8/expander/sv601.h59
-rw-r--r--src/devices/bus/svi3x8/slot/cards.cpp16
-rw-r--r--src/devices/bus/svi3x8/slot/cards.h22
-rw-r--r--src/devices/bus/svi3x8/slot/slot.cpp284
-rw-r--r--src/devices/bus/svi3x8/slot/slot.h178
-rw-r--r--src/devices/bus/svi3x8/slot/sv801.cpp144
-rw-r--r--src/devices/bus/svi3x8/slot/sv801.h61
-rw-r--r--src/devices/bus/svi3x8/slot/sv803.cpp68
-rw-r--r--src/devices/bus/svi3x8/slot/sv803.h44
-rw-r--r--src/devices/bus/svi3x8/slot/sv806.cpp150
-rw-r--r--src/devices/bus/svi3x8/slot/sv806.h55
-rw-r--r--src/devices/bus/svi3x8/slot/sv807.cpp163
-rw-r--r--src/devices/bus/svi3x8/slot/sv807.h60
-rw-r--r--src/devices/cpu/tms0980/tms0980.cpp1514
-rw-r--r--src/devices/cpu/tms0980/tms0980.h518
-rw-r--r--src/devices/cpu/tms0980/tms0980d.cpp363
-rw-r--r--src/devices/cpu/tms1000/tms0270.cpp182
-rw-r--r--src/devices/cpu/tms1000/tms0270.h71
-rw-r--r--src/devices/cpu/tms1000/tms0970.cpp161
-rw-r--r--src/devices/cpu/tms1000/tms0970.h57
-rw-r--r--src/devices/cpu/tms1000/tms0980.cpp231
-rw-r--r--src/devices/cpu/tms1000/tms0980.h60
-rw-r--r--src/devices/cpu/tms1000/tms1000.cpp126
-rw-r--r--src/devices/cpu/tms1000/tms1000.h55
-rw-r--r--src/devices/cpu/tms1000/tms1100.cpp87
-rw-r--r--src/devices/cpu/tms1000/tms1100.h56
-rw-r--r--src/devices/cpu/tms1000/tms1400.cpp143
-rw-r--r--src/devices/cpu/tms1000/tms1400.h61
-rw-r--r--src/devices/cpu/tms1000/tms1k_base.cpp635
-rw-r--r--src/devices/cpu/tms1000/tms1k_base.h299
-rw-r--r--src/devices/cpu/tms1000/tms1k_dasm.cpp281
-rw-r--r--src/devices/cpu/tms1000/tp0320.cpp46
-rw-r--r--src/devices/cpu/tms1000/tp0320.h32
-rw-r--r--src/devices/machine/atapicdr.cpp12
-rw-r--r--src/devices/machine/atapicdr.h1
-rw-r--r--src/devices/video/pc_vga.cpp96
-rw-r--r--src/devices/video/pc_vga.h1
-rw-r--r--src/emu/attotime.h11
-rw-r--r--src/emu/debug/dvdisasm.cpp2
-rw-r--r--src/emu/fileio.cpp4
-rw-r--r--src/emu/mconfig.h79
-rw-r--r--src/emu/rendfont.cpp26
-rw-r--r--src/emu/rendfont.h6
-rw-r--r--src/emu/ui/custui.cpp65
-rw-r--r--src/emu/ui/custui.h29
-rw-r--r--src/emu/ui/selector.cpp25
-rw-r--r--src/emu/ui/selector.h3
-rw-r--r--src/lib/formats/ioprocs.cpp40
-rw-r--r--src/lib/formats/ioprocs.h10
-rw-r--r--src/lib/netlist/nl_base.cpp37
-rw-r--r--src/lib/netlist/nl_base.h5
-rw-r--r--src/lib/netlist/plib/plists.h8
-rw-r--r--src/lib/util/aviio.cpp2
-rw-r--r--src/lib/util/corefile.cpp1
-rw-r--r--src/lib/util/un7z.cpp2
-rw-r--r--src/mame/drivers/cclimber.cpp32
-rw-r--r--src/mame/drivers/gba.cpp4
-rw-r--r--src/mame/drivers/hh_tms1k.cpp18
-rw-r--r--src/mame/drivers/igs017.cpp5
-rw-r--r--src/mame/drivers/microvsn.cpp4
-rw-r--r--src/mame/drivers/n64.cpp5
-rw-r--r--src/mame/drivers/neogeo_noslot.cpp107
-rw-r--r--src/mame/drivers/ng_aes.cpp23
-rw-r--r--src/mame/drivers/notetaker.cpp104
-rw-r--r--src/mame/drivers/pcat_dyn.cpp12
-rw-r--r--src/mame/drivers/ssem.cpp1
-rw-r--r--src/mame/drivers/svi318.cpp197
-rw-r--r--src/mame/drivers/symbolics.cpp98
-rw-r--r--src/mame/drivers/vigilant.cpp82
-rw-r--r--src/mame/includes/hh_tms1k.h9
-rw-r--r--src/mame/includes/neogeo.h66
-rw-r--r--src/mame/layout/cnsector.lay235
-rw-r--r--src/mame/layout/lostreas.lay206
-rw-r--r--src/mame/layout/starwbc.lay200
-rw-r--r--src/mame/machine/n64.cpp9
-rw-r--r--src/mame/mame.lst2
-rw-r--r--src/osd/modules/file/posixsocket.cpp5
-rw-r--r--src/osd/modules/font/font_dwrite.cpp159
-rw-r--r--src/osd/modules/font/font_module.h17
-rw-r--r--src/osd/modules/font/font_none.cpp48
-rw-r--r--src/osd/modules/font/font_osx.cpp141
-rw-r--r--src/osd/modules/font/font_sdl.cpp357
-rw-r--r--src/osd/modules/font/font_windows.cpp116
-rw-r--r--src/osd/modules/lib/osdlib_unix.cpp4
-rw-r--r--src/osd/modules/lib/osdobj_common.cpp34
-rw-r--r--src/osd/modules/lib/osdobj_common.h14
-rw-r--r--src/osd/osdepend.h30
-rw-r--r--src/osd/strconv.h16
-rw-r--r--src/tools/unidasm.cpp2
108 files changed, 6631 insertions, 3623 deletions
diff --git a/.gitignore b/.gitignore
index f01c2c01e05..5256e5fea85 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,9 @@
*~
+.*.sw?
+*.pyc
+*.pyo
+.DS_Store
+
/*
/*/
!/3rdparty/
@@ -30,11 +35,10 @@
/.idea
regtests/chdman/temp
regtests/jedutil/output
-*.pyc
*.mo
/CMakeLists.txt
/src/devices/cpu/m68000/m68kops.cpp
/src/devices/cpu/m68000/m68kops.h
/src/devices/cpu/m68000/m68kmake.*
/src/devices/cpu/m68000/m68kmake
-!/src/devices/cpu/m68000/m68kmake.cpp \ No newline at end of file
+!/src/devices/cpu/m68000/m68kmake.cpp
diff --git a/doxygen/doxy-boot.js b/doxygen/doxy-boot.js
index 4b48553acc4..17fd6e11583 100644
--- a/doxygen/doxy-boot.js
+++ b/doxygen/doxy-boot.js
@@ -25,6 +25,7 @@ $( document ).ready(function() {
$("div#navrow5 > ul.tablist").addClass("pagination pagination-sm pagination-centered");
$("ul.tablist").css("margin-top", "0.5em");
$("ul.tablist").css("margin-bottom", "0.5em");
+ $("ul.tablist").css("padding-right", "50px");
$("li.current").addClass("active");
$("iframe").attr("scrolling", "yes");
@@ -58,7 +59,7 @@ $( document ).ready(function() {
$("div.ttname a").css("color", 'white');
$("div.ttdef,div.ttdoc,div.ttdeci").addClass("panel-body");
- $('#MSearchBox').parent().remove();
+ //$('#MSearchBox').parent().remove();
//$('div.fragment.well div.line:first').css('margin-top', '15px');
//$('div.fragment.well div.line:last').css('margin-bottom', '15px');
diff --git a/doxygen/doxygen.config b/doxygen/doxygen.config
index c78081f9f05..9cdc7792934 100644
--- a/doxygen/doxygen.config
+++ b/doxygen/doxygen.config
@@ -118,7 +118,7 @@ ABBREVIATE_BRIEF =
ALWAYS_DETAILED_SEC = YES
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-1# inherited members of a class in the documentation of that class as if those
+# inherited members of a class in the documentation of that class as if those
# members were ordinary class members. Constructors, destructors and assignment
# operators of the base classes will not be shown.
# The default value is: NO.
@@ -517,7 +517,7 @@ INLINE_INFO = YES
# name. If set to NO the members will appear in declaration order.
# The default value is: YES.
-SORT_MEMBER_DOCS = YES
+SORT_MEMBER_DOCS = NO
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
# descriptions of file, namespace and class members alphabetically by member
diff --git a/hash/neogeo.xml b/hash/neogeo.xml
index 43092413118..c351061f2aa 100644
--- a/hash/neogeo.xml
+++ b/hash/neogeo.xml
@@ -30,7 +30,6 @@
***************************************-->
<software name="nam1975">
- <!-- MVS AND AES VERSION -->
<description>NAM-1975 (NGM-001)(NGH-001)</description>
<year>1990</year>
<publisher>SNK</publisher>
@@ -90,7 +89,6 @@
<software name="bstars">
- <!-- MVS VERSION -->
<description>Baseball Stars Professional (NGM-002)</description>
<year>1990</year>
<publisher>SNK</publisher>
@@ -141,7 +139,6 @@
</software>
<software name="bstarsh" cloneof="bstars">
- <!-- AES VERSION -->
<description>Baseball Stars Professional (NGH-002)</description>
<year>1990</year>
<publisher>SNK</publisher>
@@ -200,7 +197,6 @@
***************************************-->
<software name="tpgolf">
- <!-- MVS AND AES VERSION -->
<description>Top Player's Golf (NGM-003)(NGH-003)</description>
<year>1990</year>
<publisher>SNK</publisher>
@@ -267,7 +263,6 @@
***************************************-->
<software name="mahretsu">
- <!-- MVS AND AES VERSION -->
<description>Mahjong Kyo Retsuden (NGM-004)(NGH-004)</description>
<year>1990</year>
<publisher>SNK</publisher>
@@ -322,7 +317,6 @@
***************************************-->
<software name="maglord">
- <!-- MVS VERSION -->
<description>Magician Lord (NGM-005)</description>
<year>1990</year>
<publisher>Alpha Denshi Co.</publisher>
@@ -369,7 +363,6 @@
</software>
<software name="maglordh" cloneof="maglord">
- <!-- AES VERSION -->
<description>Magician Lord (NGH-005)</description>
<year>1990</year>
<publisher>Alpha Denshi Co.</publisher>
@@ -424,7 +417,6 @@
***************************************-->
<software name="ridhero">
- <!-- MVS AND AES VERSION -->
<description>Riding Hero (NGM-006)(NGH-006)</description>
<year>1990</year>
<publisher>SNK</publisher>
@@ -438,7 +430,7 @@
<dataarea name="mcu" size="0x2000">
<!-- Hitachi HD6301V1 MCU -->
<rom offset="0x000000" size="0x02000" name="rhcom.bin" crc="e5cd6306" sha1="f6bbb8ae562804d67e137290c765c3589fa334c0" />
- <!-- dumped from a prototype with external ROM, not 100% confirmed as being the same on a final, or other games (lbowling, trally) -->
+ <!-- dumped from a prototype with external ROM, not 100% confirmed as being the same on a final, or other games (lbowling, trally) -->
</dataarea>
<dataarea name="fixed" size="0x040000">
<rom offset="0x000000" size="0x020000" name="006-s1.s1" crc="eb5189f0" sha1="0239c342ea62e73140a2306052f226226461a478" />
@@ -491,7 +483,7 @@
<dataarea name="mcu" size="0x2000">
<!-- Hitachi HD6301V1 MCU -->
<rom offset="0x000000" size="0x02000" name="rhcom.bin" crc="e5cd6306" sha1="f6bbb8ae562804d67e137290c765c3589fa334c0" />
- <!-- dumped from a prototype with external ROM, not 100% confirmed as being the same on a final, or other games (lbowling, trally) -->
+ <!-- dumped from a prototype with external ROM, not 100% confirmed as being the same on a final, or other games (lbowling, trally) -->
</dataarea>
<dataarea name="fixed" size="0x040000">
<rom offset="0x000000" size="0x020000" name="006-s1.s1" crc="eb5189f0" sha1="0239c342ea62e73140a2306052f226226461a478" />
@@ -536,10 +528,12 @@
NEO-MVS PROG42G / NEO-MVS CHA42G
. NGH-007
NEO-AEG PROG42G / NEO-AEG CHA42G
+ NEO-AEG PROG42G / NEO-AEG CHA-8M
+ . prototype
+ NEO-AEG PROG-EP / NEO-AEG CHA-EP
***************************************-->
<software name="alpham2">
- <!-- MVS AND AES VERSION -->
<description>Alpha Mission II / ASO II - Last Guardian (NGM-007)(NGH-007)</description>
<year>1991</year>
<publisher>SNK</publisher>
@@ -583,37 +577,37 @@
<description>Alpha Mission II / ASO II - Last Guardian (prototype)</description>
<year>1991</year>
<publisher>SNK</publisher>
- <sharedfeat name="release" value="MVS" />
+ <sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
- <rom loadflag="load16_byte" name="proto_007-p1.p1" offset="0x000001" size="0x080000" crc="c763e52a" sha1="b24acbac255c5ee1a2e92e77cdde6620a24081cf" />
- <rom loadflag="load16_byte" name="proto_007-p2.p2" offset="0x000000" size="0x080000" crc="7a0b435c" sha1="40e6f42a92001d9f4e51898dd7489da143b6b74b" />
+ <rom loadflag="load16_byte" name="007_p1_faac.p1" offset="0x000001" size="0x080000" crc="c763e52a" sha1="b24acbac255c5ee1a2e92e77cdde6620a24081cf" />
+ <rom loadflag="load16_byte" name="007_p2_1813.p2" offset="0x000000" size="0x080000" crc="7a0b435c" sha1="40e6f42a92001d9f4e51898dd7489da143b6b74b" />
</dataarea>
<dataarea name="fixed" size="0x040000">
- <rom offset="0x000000" size="0x020000" name="proto_007-s1.s1" crc="efc9ae2e" sha1="a594826b0082fe5a13191673e8d9aa42517230f5" />
+ <rom offset="0x000000" size="0x020000" name="007_s1_36f1.s1" crc="efc9ae2e" sha1="a594826b0082fe5a13191673e8d9aa42517230f5" />
</dataarea>
<dataarea name="audiocpu" size="0x020000">
- <rom offset="0x000000" size="0x020000" name="proto_007-m1.m1" crc="5976b464" sha1="ec824567ecc3579f6d86c9d9385710cbaeef16a3" />
+ <rom offset="0x000000" size="0x020000" name="007_m1_9384.m1" crc="5976b464" sha1="ec824567ecc3579f6d86c9d9385710cbaeef16a3" />
</dataarea>
<dataarea name="ymsnd" size="0x200000">
- <rom name="proto_007-v11.v11" offset="0x000000" size="0x080000" crc="18eaa9e1" sha1="85c94d8660f8a32e4ca8e015f0bd704208482d68" />
- <rom name="proto_007-v12.v12" offset="0x080000" size="0x080000" crc="2487d495" sha1="49af3c4dc6a38c5158d3641fd8f9a40041b42aa6" />
- <rom name="proto_007-v13.v13" offset="0x100000" size="0x080000" crc="25e60f25" sha1="d06b0df872372de38fcf90187195070ac5f8c651" />
+ <rom name="007_v11_1bb4.v11" offset="0x000000" size="0x080000" crc="18eaa9e1" sha1="85c94d8660f8a32e4ca8e015f0bd704208482d68" />
+ <rom name="007_v12_c8e8.v12" offset="0x080000" size="0x080000" crc="2487d495" sha1="49af3c4dc6a38c5158d3641fd8f9a40041b42aa6" />
+ <rom name="007_v13_09fa.v13" offset="0x100000" size="0x080000" crc="25e60f25" sha1="d06b0df872372de38fcf90187195070ac5f8c651" />
</dataarea>
<dataarea name="ymsnd.deltat" size="0x80000">
- <rom name="proto_007-v21.v21" offset="0x000000" size="0x080000" crc="ac44b75a" sha1="7399a05cd4e2c7ecde4a7323d3e189255afe5fc2" />
+ <rom name="007_v21_28c2.v21" offset="0x000000" size="0x080000" crc="ac44b75a" sha1="7399a05cd4e2c7ecde4a7323d3e189255afe5fc2" />
</dataarea>
<dataarea name="sprites" size="0x400000">
- <!-- note, ROM_LOAD32_BYTE -->
- <rom loadflag="load32_byte" name="proto_007-c1.c1" offset="0x000000" size="0x080000" crc="24841639" sha1="fcc2a349121dad86ffefc44b9f0e8ba616ce0d30" />
- <rom loadflag="load32_byte" name="proto_007-c2.c2" offset="0x000002" size="0x080000" crc="912763ab" sha1="cedf26d7d85ad140399ee62813c71f35e65498d6" />
- <rom loadflag="load32_byte" name="proto_007-c3.c3" offset="0x000001" size="0x080000" crc="0743bde2" sha1="0d13ad6333909ad3cf10f9ac360f9abf191318de" />
- <rom loadflag="load32_byte" name="proto_007-c4.c4" offset="0x000003" size="0x080000" crc="61240212" sha1="dee36f6604adaeb96e0d761a7256241c066b1cd2" />
- <rom loadflag="load32_byte" name="proto_007-c5.c5" offset="0x200000" size="0x080000" crc="cf9f4c53" sha1="f979c85f83d9f76e554c2617f85f6d4efca6799c" />
- <rom loadflag="load32_byte" name="proto_007-c6.c6" offset="0x200002" size="0x080000" crc="3d903b19" sha1="001a8c762336b855fe1df69fe2e605d30a3f00a1" />
- <rom loadflag="load32_byte" name="proto_007-c7.c7" offset="0x200001" size="0x080000" crc="e41e3875" sha1="730aceb8a66cb33d0194b096568f053ad7dc000a" />
- <rom loadflag="load32_byte" name="proto_007-c8.c8" offset="0x200003" size="0x080000" crc="4483e2cf" sha1="47c3364f5c36ae9dc3a49fe37ca60bcee0e73314" />
+ <!-- note, load32_byte -->
+ <rom loadflag="load32_byte" name="007_c1_210e.c11" offset="0x000000" size="0x080000" crc="24841639" sha1="fcc2a349121dad86ffefc44b9f0e8ba616ce0d30" />
+ <rom loadflag="load32_byte" name="007_c2_29ae.c12" offset="0x000002" size="0x080000" crc="912763ab" sha1="cedf26d7d85ad140399ee62813c71f35e65498d6" />
+ <rom loadflag="load32_byte" name="007_c3_c873.c13" offset="0x000001" size="0x080000" crc="0743bde2" sha1="0d13ad6333909ad3cf10f9ac360f9abf191318de" />
+ <rom loadflag="load32_byte" name="007_c4_2462.c14" offset="0x000003" size="0x080000" crc="61240212" sha1="dee36f6604adaeb96e0d761a7256241c066b1cd2" />
+ <rom loadflag="load32_byte" name="007_c5_5f16.c15" offset="0x200000" size="0x080000" crc="cf9f4c53" sha1="f979c85f83d9f76e554c2617f85f6d4efca6799c" />
+ <rom loadflag="load32_byte" name="007_c6_8abc.c16" offset="0x200002" size="0x080000" crc="3d903b19" sha1="001a8c762336b855fe1df69fe2e605d30a3f00a1" />
+ <rom loadflag="load32_byte" name="007_c7_c983.c17" offset="0x200001" size="0x080000" crc="e41e3875" sha1="730aceb8a66cb33d0194b096568f053ad7dc000a" />
+ <rom loadflag="load32_byte" name="007_c8_b599.c18" offset="0x200003" size="0x080000" crc="4483e2cf" sha1="47c3364f5c36ae9dc3a49fe37ca60bcee0e73314" />
</dataarea>
</part>
</software>
@@ -638,7 +632,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="009-p1.p1" offset="0x000000" size="0x080000" crc="b45fcfbf" sha1="3872147dda2d1ba905d35f4571065d87b1958b4a" />
<!-- TC534200 -->
@@ -687,7 +680,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="009-pg1.p1" offset="0x000000" size="0x080000" crc="8e9f0add" sha1="d0b908a86a58f2537eea73a431038f1cd74a5a2f" />
<!-- TC534200 -->
@@ -802,7 +794,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="011-p1.p1" offset="0x000000" size="0x080000" crc="c7f944b5" sha1="da7560e09187c68f1d9f7656218497b4464c56c9" />
<!-- MB834200 -->
@@ -865,7 +856,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="014-p1.p1" offset="0x000000" size="0x080000" crc="6f1699c8" sha1="87206f67a619dede7959230f9ff3701b8b78957a" />
<!-- CXK384500 -->
@@ -918,7 +908,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="016-p1.p1" offset="0x000000" size="0x080000" crc="1b818731" sha1="b98b1b33c0301fd79aac908f6b635dd00d1cb08d" />
<!-- TC534200 -->
@@ -959,7 +948,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="016-hp1.p1" offset="0x000000" size="0x080000" crc="b774621e" sha1="7684b2e07163aec68cd083ef1d8900f855f6cb42" />
<!-- TC534200 -->
@@ -1008,7 +996,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="017-p1.p1" offset="0x000000" size="0x080000" crc="f8a63983" sha1="7a10ecb2f0fd8315641374c065d2602107b09e72" />
<!-- TC534200 -->
@@ -1049,7 +1036,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION (US) -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="017-hp1.p1" offset="0x000000" size="0x080000" crc="33eccae0" sha1="000ccf9a9c73df75eeba3f2c367c3a1a9e0a3a6b" />
<!-- TC534200 -->
@@ -1091,6 +1077,8 @@
NEO-MVS PROG42G / NEO-MVS CHA42G
. NGH-018
NEO-AEG PROG42G / NEO-AEG CHA42G
+ . prototype
+ NEO-AEG PROG-EP / NEO-AEG CHA-EP
***************************************-->
<software name="burningf">
@@ -1100,7 +1088,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="018-p1.p1" offset="0x000000" size="0x080000" crc="4092c8db" sha1="df194a4ad2c35e0e18bc053ff9284183444a4666" />
<!-- HN62434 -->
@@ -1139,7 +1126,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION (US) -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="018-hp1.p1" offset="0x000000" size="0x080000" crc="ddffcbf4" sha1="c646c4bbdb4e9b32df76c90f582ccd69fcc9f8e7" />
<!-- HN62434 -->
@@ -1172,40 +1158,40 @@
</software>
<software name="burningfp" cloneof="burningf">
+ <!-- early prototype - all roms were hand labeled with CRCs, dumps verified against them -->
<description>Burning Fight (prototype)</description>
<year>1991</year>
<publisher>SNK</publisher>
- <sharedfeat name="release" value="MVS" />
+ <sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- early prototype - all roms were hand labeled with CRCs, dumps verified against them -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
- <rom loadflag="load16_byte" name="proto_018-p1.p1" offset="0x000001" size="0x080000" crc="5b4032e7" sha1="55df91dad6f484d3d49c28ab5972700bf71a8662" />
- <rom loadflag="load16_byte" name="proto_018-p2.p2" offset="0x000000" size="0x080000" crc="78762f68" sha1="12170fc6efe75cb5d32624033d3d341032c97548" />
+ <rom loadflag="load16_byte" name="018_p1_9397.p1" offset="0x000001" size="0x080000" crc="5b4032e7" sha1="55df91dad6f484d3d49c28ab5972700bf71a8662" />
+ <rom loadflag="load16_byte" name="018_p2_e335.p2" offset="0x000000" size="0x080000" crc="78762f68" sha1="12170fc6efe75cb5d32624033d3d341032c97548" />
</dataarea>
<dataarea name="fixed" size="0x040000">
- <rom offset="0x000000" size="0x020000" name="proto_018-s1.s1" crc="f3d130e8" sha1="2fdeb93f4bb2a60d391cac2822be41661b1e1795" />
+ <rom offset="0x000000" size="0x020000" name="018_s1_9899.s1" crc="f3d130e8" sha1="2fdeb93f4bb2a60d391cac2822be41661b1e1795" />
</dataarea>
<dataarea name="audiocpu" size="0x020000">
- <rom offset="0x000000" size="0x020000" name="proto_018-m1.m1" crc="470dd5d4" sha1="4291811b4aefe45261a1ae3631b6999fcd74fb3f" />
+ <rom offset="0x000000" size="0x020000" name="018_m1_4586.m1" crc="470dd5d4" sha1="4291811b4aefe45261a1ae3631b6999fcd74fb3f" />
</dataarea>
<dataarea name="ymsnd" size="0x200000">
- <rom name="proto_018-v11.v11" offset="0x000000" size="0x080000" crc="dc07ea3c" sha1="c3e71aaec44ead7ddc581565d16b90030e6db5fd" />
- <rom name="proto_018-v12.v12" offset="0x080000" size="0x080000" crc="f1ae637c" sha1="02a4c7d4a544350a314ab7b26d8c9d3baa8f5778" />
+ <rom name="018_v11_56ac.v11" offset="0x000000" size="0x080000" crc="dc07ea3c" sha1="c3e71aaec44ead7ddc581565d16b90030e6db5fd" />
+ <rom name="018_v12_db95.v12" offset="0x080000" size="0x080000" crc="f1ae637c" sha1="02a4c7d4a544350a314ab7b26d8c9d3baa8f5778" />
</dataarea>
<dataarea name="ymsnd.deltat" size="0x80000">
- <rom name="proto_018-v21.v21" offset="0x000000" size="0x080000" crc="9f3b4eda" sha1="7f516923d04daa483b4b99c9babba66505931a34" />
+ <rom name="018_v21_98dd.v21" offset="0x000000" size="0x080000" crc="9f3b4eda" sha1="7f516923d04daa483b4b99c9babba66505931a34" />
</dataarea>
<dataarea name="sprites" size="0x400000">
- <!-- note, ROM_LOAD32_BYTE -->
- <rom loadflag="load32_byte" name="proto_018-c1.c1" offset="0x000000" size="0x080000" crc="6569018b" sha1="25040e0a9c2b72900100a22a2a41de5f6c339d8a" />
- <rom loadflag="load32_byte" name="proto_018-c2.c2" offset="0x000002" size="0x080000" crc="6949b501" sha1="d8ee48837faff6cc849046ee8757b2b94d440303" />
- <rom loadflag="load32_byte" name="proto_018-c3.c3" offset="0x000001" size="0x080000" crc="410f653b" sha1="ce94667721baa7b2c318fc268e3bb9209671c9f5" />
- <rom loadflag="load32_byte" name="proto_018-c4.c4" offset="0x000003" size="0x080000" crc="d43bf2a5" sha1="c27985d8973611d02570f469a0d8cb4f5b63b614" />
- <rom loadflag="load32_byte" name="proto_018-c5.c5" offset="0x200000" size="0x080000" crc="837d09d3" sha1="d3b06931fca6123604549599544b04529ef34c53" />
- <rom loadflag="load32_byte" name="proto_018-c6.c6" offset="0x200002" size="0x080000" crc="5fee51e7" sha1="835c632fa12a1d5b4104cd80b8f686ac80b314a1" />
- <rom loadflag="load32_byte" name="proto_018-c7.c7" offset="0x200001" size="0x080000" crc="0f3f0823" sha1="ec1d681c1795de43d20f30f85956e2473ec39c95" />
- <rom loadflag="load32_byte" name="proto_018-c8.c8" offset="0x200003" size="0x080000" crc="67cc9e34" sha1="dc72a464c1456a4d2f7b992b416a984fb7885e99" />
+ <!-- note, load32_byte -->
+ <rom loadflag="load32_byte" name="018_c1_ba06.c11" offset="0x000000" size="0x080000" crc="6569018b" sha1="25040e0a9c2b72900100a22a2a41de5f6c339d8a" />
+ <rom loadflag="load32_byte" name="018_c2_d534.c12" offset="0x000002" size="0x080000" crc="6949b501" sha1="d8ee48837faff6cc849046ee8757b2b94d440303" />
+ <rom loadflag="load32_byte" name="018_c3_9d70.c13" offset="0x000001" size="0x080000" crc="410f653b" sha1="ce94667721baa7b2c318fc268e3bb9209671c9f5" />
+ <rom loadflag="load32_byte" name="018_c4_bf9d.c14" offset="0x000003" size="0x080000" crc="d43bf2a5" sha1="c27985d8973611d02570f469a0d8cb4f5b63b614" />
+ <rom loadflag="load32_byte" name="018_c5_ac9d.c15" offset="0x200000" size="0x080000" crc="837d09d3" sha1="d3b06931fca6123604549599544b04529ef34c53" />
+ <rom loadflag="load32_byte" name="018_c6_d2a5.c16" offset="0x200002" size="0x080000" crc="5fee51e7" sha1="835c632fa12a1d5b4104cd80b8f686ac80b314a1" />
+ <rom loadflag="load32_byte" name="018_c7_d568.c17" offset="0x200001" size="0x080000" crc="0f3f0823" sha1="ec1d681c1795de43d20f30f85956e2473ec39c95" />
+ <rom loadflag="load32_byte" name="018_c8_d256.c18" offset="0x200003" size="0x080000" crc="67cc9e34" sha1="dc72a464c1456a4d2f7b992b416a984fb7885e99" />
</dataarea>
</part>
</software>
@@ -1225,7 +1211,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="019-p1.p1" offset="0x000000" size="0x080000" crc="a2de8445" sha1="893d7ae72b4644123469de143fa35fac1cbcd61e" />
<!-- TC534200 -->
@@ -1276,7 +1261,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="020-p1.p1" offset="0x000000" size="0x080000" crc="e6f2fe64" sha1="50ab82517e077727d97668a4df2b9b96d2e78ab6" />
<!-- TC534200 -->
@@ -1321,7 +1305,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION (US) -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="020-hp1.p1" offset="0x000000" size="0x080000" crc="7cdb01ce" sha1="32cae2ddf5e26fb7e8a09132e600220db82df3b8" />
<!-- TC534200 -->
@@ -1374,7 +1357,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="021-p1.p1" offset="0x000000" size="0x080000" crc="39c3478f" sha1="06ebe54c9c4e14c5c31e770013d58b7162359ecc" />
<!-- MB834200 -->
@@ -1419,7 +1401,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="022-p1.p1" offset="0x000000" size="0x100000" crc="6a2f6d4a" sha1="b8ca548e56f1c7abcdce415ba7329e0cf698ee13" />
<!-- TC538200 -->
@@ -1466,7 +1447,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="023-p1.p1" offset="0x000000" size="0x100000" crc="c488fda3" sha1="4cdf2f1837fffd720efef42f81f933bdf2ef1402" />
<!-- TC538200 -->
@@ -1525,6 +1505,9 @@
. NGM-024
NEO-MVS PROG42G-1 / NEO-MVS CHA42G-1
. NGH-024
+
+ . prototype
+ NEO-MVS PROG-EP / NEO-MVS CHA-EPG
***************************************-->
<software name="lresort">
@@ -1565,6 +1548,44 @@
</part>
</software>
+ <software name="lresortp" cloneof="lresort">
+ <!-- prototype - all roms were hand labeled with CRCs -->
+ <description>Last Resort (prototype)</description>
+ <year>1992</year>
+ <publisher>SNK</publisher>
+ <sharedfeat name="release" value="MVS" />
+ <sharedfeat name="compatibility" value="MVS,AES" />
+ <part name="cart" interface="neo_cart">
+ <dataarea name="maincpu" width="16" endianness="big" size="0x100000">
+ <rom loadflag="load16_byte" name="024_p1_5937.podd" offset="0x000001" size="0x080000" crc="8e6008ee" sha1="6779663118782207156dc9fa9e24e81e30c6391c" />
+ <rom loadflag="load16_byte" name="024_p2_8d37.peven" offset="0x000000" size="0x080000" crc="6d9ee90f" sha1="ecd42182988092417bc96db8301ea408e47735f2" />
+ </dataarea>
+ <dataarea name="fixed" size="0x040000">
+ <rom offset="0x000000" size="0x020000" name="024_s1_22fe.s1" crc="5cef5cc6" sha1="9ec305007bdb356e9f8f279beae5e2bcb3f2cf7b" />
+ </dataarea>
+ <dataarea name="audiocpu" size="0x020000">
+ <rom offset="0x000000" size="0x020000" name="024_m1_fc7a.m1" crc="22122875" sha1="540c21559163381467679f836cb068adaf526659" />
+ </dataarea>
+ <dataarea name="ymsnd" size="0x200000">
+ <rom name="024_v11_b085.v11" offset="0x000000" size="0x080000" crc="0722da38" sha1="66a9b463d5277908b3a01c03de82b3de9118f2cb" />
+ <rom name="024_v12_d3b7.v12" offset="0x080000" size="0x080000" crc="670ce3ec" sha1="9004aa85d4a9b0ecf9cf9357b073ed55a98fdb02" />
+ <rom name="024_v13_a31e.v13" offset="0x100000" size="0x080000" crc="2e39462b" sha1="b0a9b1a3377bf0369f3020192505c46ca52927d6" />
+ <rom name="024_v24_2f0f.v24" offset="0x180000" size="0x080000" crc="7944754f" sha1="d42a46c5127c6c62041ebffb0007af8a24abd360" />
+ </dataarea>
+ <dataarea name="sprites" size="0x400000">
+ <!-- note, load32_byte -->
+ <rom loadflag="load32_byte" name="024_c1_b764.c1" offset="0x000000" size="0x080000" crc="677749ec" sha1="6f94675e037956a380652ab1056e6f1dec605bec" />
+ <rom loadflag="load32_byte" name="024_c2_1951.c2" offset="0x000002" size="0x080000" crc="104d7b59" sha1="404e8776ee8df4ca282eb7b747759af8628ddca1" />
+ <rom loadflag="load32_byte" name="024_c3_0f63.c3" offset="0x000001" size="0x080000" crc="b0965a74" sha1="e8026dd4f722ccab9c913261d09ab8843ef56a0e" />
+ <rom loadflag="load32_byte" name="024_c4_c5b5.c4" offset="0x000003" size="0x080000" crc="dcfc3860" sha1="8443b455ae8de656adab57f3b7e68919f22d3b9d" />
+ <rom loadflag="load32_byte" name="024_c5_dd03.c5" offset="0x200000" size="0x080000" crc="50322397" sha1="3308fbe48ad165b9894a52fc3a8d9898bbbc0c0e" />
+ <rom loadflag="load32_byte" name="024_c6_c81a.c6" offset="0x200002" size="0x080000" crc="c3c93894" sha1="f23b9d7e2b54d44c96370dde282bdf45cebd9cba" />
+ <rom loadflag="load32_byte" name="024_c7_5edc.c7" offset="0x200001" size="0x080000" crc="21faf72b" sha1="00bf257b06180ae6ede57744cea6257b3488d9f0" />
+ <rom loadflag="load32_byte" name="024_c8_0850.c8" offset="0x200003" size="0x080000" crc="fb57217b" sha1="607a98da754e8b1dd94a6432b21a36cc38e06a0f" />
+ </dataarea>
+ </part>
+ </software>
+
<!--***************************************
ID-0025
. NGM-025
@@ -1580,7 +1601,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="025-p1.p1" offset="0x000000" size="0x080000" crc="43344cb0" sha1="29dfd699f35b0a74e20fedd6c9174c289f0ef6e0" />
<!-- TC574200 -->
@@ -1632,7 +1652,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="027-p1.p1" offset="0x000000" size="0x080000" crc="c8381327" sha1="c8f8be0ba276c6d12ef13d05af3cf83a2b924894" />
<!-- HN62422PC -->
@@ -1766,7 +1785,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="030-epr.p1" offset="0x000000" size="0x080000" crc="c59be3dd" sha1="4fbd462c1c18e85a252c58b04b54fd3b82b46cb0" />
<!-- TC574200 -->
@@ -1852,7 +1870,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="031-pg1.p1" offset="0x000000" size="0x080000" crc="17f034a7" sha1="2e66c7bd93a08efe63c4894494db50bbf58f60e4" />
<!-- TC534200 -->
@@ -1891,7 +1908,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="031-p1.p1" offset="0x000000" size="0x080000" crc="a2801c24" sha1="627d76ff0740ca29586f37b268f47fb469822529" />
<!-- TC534200 -->
@@ -1985,7 +2001,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="033-p1.p1" offset="0x000000" size="0x080000" crc="47ebdc2f" sha1="d46786502920fb510f1999db00c5e09fb641c0bd" />
<!-- TC534200 -->
@@ -2036,7 +2051,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="034-p1.p1" offset="0x000000" size="0x080000" crc="cdef6b19" sha1="97482db0dffc6d625fb41fa38449c0a74d741a72" />
<!-- TC534200 -->
@@ -2088,7 +2102,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="036-p1.p1" offset="0x000000" size="0x080000" crc="1c66b6fa" sha1="6c50cc452971c46c763ae0b2def95792671a1798" />
<!-- CXK384500 -->
@@ -2135,7 +2148,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="037-p1.p1" offset="0x000000" size="0x080000" crc="e7f2553c" sha1="8469ecb900477feed05ae3311fe9515019bbec2a" />
<!-- TC534200 -->
@@ -2180,7 +2192,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="038-p1.p1" offset="0x000000" size="0x080000" crc="1e52a576" sha1="a1cb56354c3378e955b0cd482c3c41ae15add952" />
<!-- TC534200 -->
@@ -2233,7 +2244,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="039-p1.p1" offset="0x000000" size="0x080000" crc="b372d54c" sha1="b70fc6f72e16a66b6e144cc01370548e3398b8b8" />
<!-- TC534200 -->
@@ -2269,8 +2279,8 @@
</part>
</software>
- <!-- fairly late prototype release, only the code differs from the main set -->
<software name="kotm2p" cloneof="kotm2">
+ <!-- fairly late prototype release, only the code differs from the main set -->
<description>King of the Monsters 2 - The Next Thing (prototype)</description>
<year>1992</year>
<publisher>SNK</publisher>
@@ -2298,7 +2308,7 @@
</dataarea>
<!-- same data as main set, but prototype board layout -->
<dataarea name="sprites" size="0x600000">
- <!-- note, ROM_LOAD32_BYTE -->
+ <!-- note, load32_byte -->
<rom loadflag="load32_byte" name="proto_039-c1.c1" offset="0x000000" size="0x100000" crc="7192a787" sha1="7bef6ce79c618103485480aee3c6f856968eb51f" />
<rom loadflag="load32_byte" name="proto_039-c2.c2" offset="0x000002" size="0x100000" crc="7157eca1" sha1="65f36c6a3834775b04076d2c38a6047bffe9a8cf" />
<rom loadflag="load32_byte" name="proto_039-c3.c3" offset="0x000001" size="0x100000" crc="11d75727" sha1="5a4c7b5ca3f1195e7853b45c5e71c13fe74d16e9" />
@@ -2412,7 +2422,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="042-p1.p1" offset="0x000000" size="0x100000" crc="ed719dcf" sha1="12baf2601e86c0e4358517b9fa1c55f2f5835f1d" />
<!-- TC538200 -->
@@ -2459,7 +2468,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="043-p1.p1" offset="0x000000" size="0x100000" crc="ffbdd928" sha1="05b24655ca32723661adc5509b450824deb0c176" />
<!-- TC538200 -->
@@ -2511,7 +2519,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="044-p1.p1" offset="0x000000" size="0x080000" crc="ca9f7a6d" sha1="4d28ef86696f7e832510a66d3e8eb6c93b5b91a1" />
<!-- TC534200 -->
@@ -2562,7 +2569,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="045-p1.p1" offset="0x000000" size="0x100000" crc="dfe51bf0" sha1="2243af3770a516ae698b69bcd9daf53632d9128d" />
<!-- TC538200 -->
@@ -2607,7 +2613,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x180000">
<rom loadflag="load16_word_swap" name="045-p1.p1" offset="0x000000" size="0x100000" crc="dfe51bf0" sha1="2243af3770a516ae698b69bcd9daf53632d9128d" />
<!-- TC538200 -->
@@ -2660,7 +2665,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="046-p1.p1" offset="0x000000" size="0x100000" crc="69fa9e29" sha1="9a40a16163193bb506a32bd34f6323b25ec69622" />
<!-- mask rom TC538200 -->
@@ -2713,7 +2717,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="046-pg1.p1" offset="0x000000" size="0x100000" crc="771e39bc" sha1="c0e05fd1ca81926438bb75e2fa6894e40ab6521e" />
<!-- mask rom TC538200 -->
@@ -2774,7 +2777,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<feature name="slot" value="rom_fatfur2" />
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="047-p1.p1" offset="0x000000" size="0x100000" crc="ecfdbb69" sha1="59e2f137c6eaf043df4ddae865a9159a10265c60" />
@@ -2825,7 +2827,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="048-p1.p1" offset="0x000000" size="0x100000" crc="fa818cbb" sha1="afee2c897b766c84f13891fb52c574fb18df0951" />
<!-- mask rom TC538200 -->
@@ -2866,7 +2867,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="049-p1.p1" offset="0x000000" size="0x080000" crc="3b857da2" sha1="4dd86c739944696c16c3cdd85935d6dfa9fdc276" />
<!-- CXK384500 -->
@@ -3040,7 +3040,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="053-epr.p1" offset="0x000000" size="0x080000" crc="d42e1e9a" sha1="9d1911fe4bf6202466ec45557dd008cbf01ca9c6" />
<!-- D27C4000 -->
@@ -3084,7 +3083,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="053-p1.p1" offset="0x000000" size="0x080000" crc="95b574cb" sha1="b7b7af6a04c3d902e7f8852897741ecaf0b1062c" />
<!-- TC534200 -->
@@ -3181,7 +3179,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="055-p1.p1" offset="0x100000" size="0x100000" crc="f10a2042" sha1="d08a3f3c28be4b1793de7d362456281329fe1828" />
<!-- mask rom TC5316200 -->
@@ -3239,7 +3236,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="056-p1.p1" offset="0x000000" size="0x100000" crc="a3b1d021" sha1="ee42f3ca4516226b0088d0303ed28e3ecdabcd71" />
<!-- TC538200 -->
@@ -3289,7 +3285,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="056-p1.p1" offset="0x000000" size="0x100000" crc="a3b1d021" sha1="ee42f3ca4516226b0088d0303ed28e3ecdabcd71" />
<!-- TC538200 -->
@@ -3350,7 +3345,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="057-p1.p1" offset="0x100000" size="0x100000" crc="65a891d9" sha1="ff8d5ccb0dd22c523902bb3db3c645583a335056" />
<!-- TC5316200 -->
@@ -3402,7 +3396,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x180000">
<rom loadflag="load16_word_swap" name="058-p1.p1" offset="0x000000" size="0x100000" crc="2f585ba2" sha1="429b4bf43fb9b1082c15d645ca328f9d175b976b" />
<!-- mask rom TC538200 -->
@@ -3449,7 +3442,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x180000">
<rom loadflag="load16_word_swap" name="058-p1.p1" offset="0x000000" size="0x100000" crc="2f585ba2" sha1="429b4bf43fb9b1082c15d645ca328f9d175b976b" />
<!-- mask rom TC538200 -->
@@ -3560,9 +3552,9 @@
<year>1994</year>
<publisher>Viccom</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="060-p1.p1" offset="0x000000" size="0x100000" crc="2a104b50" sha1="3eb663d3df7074e1cdf4c0e450a35c9cf55d8979" />
<!-- VIC940800 -->
@@ -3599,9 +3591,9 @@
<year>1994</year>
<publisher>Viccom</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="060-p1.p1" offset="0x000000" size="0x100000" crc="2a104b50" sha1="3eb663d3df7074e1cdf4c0e450a35c9cf55d8979" />
<!-- VIC940800 -->
@@ -3651,7 +3643,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="061-p1.p1" offset="0x000000" size="0x100000" crc="5969e0dc" sha1="78abea880c125ec5a85bef6404478512a34b5513" />
<!-- mask rom TC538200 -->
@@ -3752,7 +3743,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="063-p1.p1" offset="0x100000" size="0x100000" crc="22368892" sha1="0997f8284aa0f57a333be8a0fdea777d0d01afd6" />
<!-- TC5316200 -->
@@ -3868,7 +3858,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="064-p1.p1" offset="0x100000" size="0x100000" crc="385a2e86" sha1="cfde4a1aeae038a3d6ca9946065624f097682d3d" />
<!-- TC5316200 -->
@@ -4016,9 +4005,9 @@
<year>1994</year>
<publisher>Face</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="067-p1.p1" offset="0x000000" size="0x080000" crc="4cea8a49" sha1="cea4a35db8de898e30eb40dd339b3cbe77ac0856" />
<!-- UM8303B -->
@@ -4055,9 +4044,9 @@
<year>1994</year>
<publisher>Video System Co.</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="068-pg1.p1" offset="0x000000" size="0x100000" crc="105a408f" sha1="2ee51defa1c24c66c63a6498ee542ac26de3cfbb" />
<!-- mask rom TC538200 -->
@@ -4110,7 +4099,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x300000">
<rom loadflag="load16_word_swap" name="069-p1.p1" offset="0x000000" size="0x100000" crc="a8bcfbbc" sha1="519c4861151797e5f4d4f33432b83dfabed8e7c4" />
<!-- TC538200 -->
@@ -4161,10 +4149,10 @@
<year>2001</year>
<publisher>SNK</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Original Version - Encrypted GFX -->
- <!-- MVS ONLY RELEASE -->
<feature name="slot" value="rom_cmc_zupapa" />
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="070-p1.p1" offset="0x000000" size="0x100000" crc="5a96203e" sha1="49cddec9ca6cc51e5ecf8a34e447a23e1f8a15a1" />
@@ -4223,9 +4211,9 @@
<year>1994</year>
<publisher>Eighting / Hudson</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="073-p1.p1" offset="0x000000" size="0x080000" crc="adc356ad" sha1="801e0a54b65d7a3500e6cef2d6bba40c6356dc1f" />
<!-- mask rom TC534200 -->
@@ -4268,7 +4256,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="074-p1.p1" offset="0x100000" size="0x100000" crc="62369553" sha1="ca4d561ee08d16fe6804249d1ba49188eb3bd606" />
<!-- TC5316200 -->
@@ -4366,9 +4353,9 @@
<year>1994</year>
<publisher>NMK</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="076-p1.p1" offset="0x000000" size="0x080000" crc="d7c1effd" sha1="485c2308a40baecd122be9ab4996044622bdcc7e" />
<!-- mask rom TC538200 -->
@@ -4478,7 +4465,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="079-p1.p1" offset="0x000000" size="0x100000" crc="5e78328e" sha1="7a00b096ed6dd77afc3008c5a4c83686e475f323" />
<!-- TC538200 -->
@@ -4526,7 +4512,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="080-p1.p1" offset="0x000000" size="0x100000" crc="4440315e" sha1="f4adba8e341d64a1f6280dfd98ebf6918c00608d" />
<!-- mask rom TC538200 -->
@@ -4715,11 +4700,11 @@
<year>1994</year>
<publisher>Taito</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
- <!-- This set uses CHA and PROG board from Power Spikes II. Six Power Spikes II prom's are replaced with
- Puzzle Bobble prom's. Confirmed on several original carts. Do other layouts also exist? -->
+ <!-- This set uses CHA and PROG board from Power Spikes II. Six Power Spikes II prom's are replaced with
+ Puzzle Bobble prom's. Confirmed on several original carts. Do other layouts also exist? -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="d96-07.ep1" offset="0x000000" size="0x080000" crc="6102ca14" sha1="328429d11de5b327a0654ae0548da4d0025a2ae6" />
<!-- 27C240 -->
@@ -4781,7 +4766,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="084-p1.p1" offset="0x100000" size="0x100000" crc="2cba2716" sha1="f6c2d0537c9c3e0938065c65b1797c47198fcff8" />
<!-- TC5316200 -->
@@ -4833,7 +4817,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<!-- There also exists a MVS version with 4x eprom (EP1~EP4); board used is NEO-MVS PROGSM -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="084-pg1.p1" offset="0x100000" size="0x100000" crc="5e54cf95" sha1="41abe2042fdbb1526e92a0789976a9b1ac5e60f0" />
@@ -4895,9 +4878,9 @@
<year>1996</year>
<publisher>Tecmo</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="086-p1.p1" offset="0x000000" size="0x100000" crc="03e20ab6" sha1="3a0a5a54649178ce7a6158980cb4445084b40fb5" />
<!-- mask rom TC538200 -->
@@ -4944,7 +4927,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x300000">
<rom loadflag="load16_word_swap" name="087-epr.ep1" offset="0x000000" size="0x080000" crc="23e09bb8" sha1="79da99fa50a639fce9d1266699b5e53c9ac55642" />
<!-- M27C4002 -->
@@ -5000,7 +4982,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x300000">
<rom loadflag="load16_word_swap" name="087-pg1.p1" offset="0x000000" size="0x100000" crc="282a336e" sha1="e062f1939d36a45f185b5dbd726cdd833dc7c28c" />
<!-- mask rom TC538200 -->
@@ -5314,9 +5295,9 @@
<year>1997</year>
<publisher>Hudson</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="093-p1.p1" offset="0x000000" size="0x100000" crc="a1a71d0d" sha1="059284c84f61a825923d86d2f29c91baa2c439cd" />
<!-- TC538200 -->
@@ -5419,7 +5400,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x300000">
<rom loadflag="load16_word_swap" name="095-p1.p1" offset="0x000000" size="0x100000" crc="63b4d8ae" sha1="03aa9f6bab6aee685d1b57a52823797704eea845" />
<!-- TC538200 -->
@@ -5470,7 +5450,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<!-- This is a bug fixed revision applied over the original cart. The original P1 and P2 stayed in the cart and this -->
<!-- 512k ROM was added to replace the first 512k of P1. -->
<dataarea name="maincpu" width="16" endianness="big" size="0x300000">
@@ -5805,9 +5784,9 @@
<year>1995</year>
<publisher>Taito (Visco license)</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="202-p1.p1" offset="0x000000" size="0x080000" crc="2b61415b" sha1="0e3e4faf2fd6e63407425e1ac788003e75aeeb4f" />
<!-- TC534200 -->
@@ -5938,9 +5917,9 @@
<year>1996</year>
<publisher>Visco</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="207-p1.p1" offset="0x000000" size="0x100000" crc="334ea51e" sha1="0a642f8565ec6e9587ed767bcf177f4677547162" />
<!-- TC538200 -->
@@ -5977,9 +5956,9 @@
<year>1996</year>
<publisher>Technos Japan</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="208-p1.p1" offset="0x100000" size="0x100000" crc="127f3d32" sha1="18e77b79b1197a89371533ef9b1e4d682c44d875" />
<!-- TC5316200 -->
@@ -6021,9 +6000,9 @@
<year>1995</year>
<publisher>Visco</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="209-p1.p1" offset="0x100000" size="0x100000" crc="2a019a79" sha1="422a639e74284fef2e53e1b49cf8803b0a7e80c6" />
<!-- mask rom TC5316200 -->
@@ -6123,9 +6102,9 @@
<year>1996</year>
<publisher>Visco</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="213-p1.p1" offset="0x100000" size="0x100000" crc="e397d798" sha1="10f459111db4bab7aaa63ca47e83304a84300812" />
<!-- mask rom TC5316200 -->
@@ -6168,7 +6147,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x300000">
<rom loadflag="load16_word_swap" name="214-p1.p1" offset="0x000000" size="0x100000" crc="52755d74" sha1="4232d627f1d2e6ea9fc8cf01571d77d4d5b8a1bb" />
<!-- TC538200 -->
@@ -6491,9 +6469,9 @@
<year>1996</year>
<publisher>Saurus</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="219-p1.p1" offset="0x100000" size="0x100000" crc="6af0e574" sha1="c3f0fed0d942e48c99c80b1713f271c033ce0f4f" />
<!-- TC5316200 -->
@@ -6643,7 +6621,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="222-p1.p1" offset="0x000000" size="0x100000" crc="1a5cb56d" sha1="9a0a5a1c7c5d428829f22d3d17f7033d43a51b5b" />
<!-- TC538200 -->
@@ -7092,9 +7069,9 @@
<year>1997</year>
<publisher>Face</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="231-p1.p1" offset="0x000000" size="0x080000" crc="61be1810" sha1="1ab0e11352ca05329c6e3f5657b60e4a227fcbfb" />
<!-- mask rom TC534200 -->
@@ -7139,7 +7116,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="232-p1.p1" offset="0x000000" size="0x100000" crc="7db81ad9" sha1="8bc42be872fd497eb198ca13bf004852b88eb1dc" />
<!-- TC538200 -->
@@ -7186,7 +7162,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="232-pg1.p1" offset="0x000000" size="0x100000" crc="5c2400b7" sha1="49e23f80c012c62146a1bb8f254a7597823de430" />
<!-- TC538200 -->
@@ -7333,7 +7308,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="234-p1.p1" offset="0x000000" size="0x100000" crc="e123a5a3" sha1="a3ddabc00feeb54272b145246612ad4632b0e413" />
<!-- TC538200 -->
@@ -7382,7 +7356,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="234-pg1.p1" offset="0x000000" size="0x100000" crc="cd01c06d" sha1="d66142571afe07c6191b52f319f1bc8bc8541c14" />
<!-- TC538200 -->
@@ -7485,9 +7458,9 @@
<year>1997</year>
<publisher>Taito (Visco license)</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="235-p1.p1" offset="0x000000" size="0x080000" crc="afed5de2" sha1="a5d82c6dbe687505e8c8d7339908da45cd379a0b" />
</dataarea>
@@ -7530,9 +7503,9 @@
<year>1997</year>
<publisher>Video System Co.</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="237-p1.p1" offset="0x000000" size="0x100000" crc="be96e44f" sha1="43679da8664fbb491103a1108040ddf94d59fc2b" />
<!-- TC538200 -->
@@ -7569,9 +7542,9 @@
<year>1997</year>
<publisher>Saurus</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="238-p1.p1" offset="0x000000" size="0x100000" crc="5677456f" sha1="f76169fa5c90871d65e2a16fd1bb036c90533ac8" />
<rom loadflag="load16_word_swap" name="238-p2.sp2" offset="0x100000" size="0x400000" crc="5b4a09c5" sha1="de04036cba2da4bb2da73d902d1822b82b4f67a9" />
@@ -7617,9 +7590,9 @@
<year>1997</year>
<publisher>Saurus</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="238-pg1.p1" offset="0x000000" size="0x100000" crc="efedf8dc" sha1="f638df9bf7aa7d514ee2bccfc7f2adbf39ca83fc" />
<!-- mask rom TC538200 -->
@@ -7731,7 +7704,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="240-p1.p1" offset="0x000000" size="0x100000" crc="80e41205" sha1="8f83eb8ff54be4ec40f8a0dd2cbe56c54908d00a" />
<!-- TC538200 -->
@@ -7780,7 +7752,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="240-pg1.p1" offset="0x000000" size="0x100000" crc="b6969780" sha1="e3373d18e0f0724d69efb8024a27cca121f1b5b2" />
<!-- TC538200 -->
@@ -7937,7 +7908,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- encrypted code + protection -->
- <!-- MVS VERSION -->
<feature name="slot" value="rom_kof98" />
<dataarea name="maincpu" width="16" endianness="big" size="0x600000">
<rom loadflag="load16_word_swap" name="242-p1.p1" offset="0x000000" size="0x200000" crc="8893df89" sha1="0452828785110601c65f667209fc2d2926cd3751" />
@@ -8105,7 +8075,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION -->
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="242-pn1.p1" offset="0x000000" size="0x100000" crc="61ac868a" sha1="26577264aa72d6af272952a876fcd3775f53e3fa" />
<!-- TC538200 -->
@@ -8166,7 +8135,6 @@
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS AND AES VERSION -->
<!-- later revision -->
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="243-pg1.p1" offset="0x000000" size="0x100000" crc="af1e6554" sha1="bd8526f60c2472937728a5d933fbd19d899f2cba" />
@@ -8262,9 +8230,9 @@
<year>1998</year>
<publisher>Visco</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="245-p1.p1" offset="0x100000" size="0x100000" crc="c828876d" sha1="1dcba850e5cf8219d0945612cfded6d20ca8682a" />
<!-- mask rom TC5316200 -->
@@ -8366,9 +8334,9 @@
<year>1999</year>
<publisher>Visco</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="247-p1.p1" offset="0x000000" size="0x100000" crc="95779094" sha1="a985e033bc6f137fa65855d3eed245d66d5b244a" />
<!-- mask rom TC538200 -->
@@ -8405,9 +8373,9 @@
<year>1999</year>
<publisher>Taito (SNK license)</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="248-p1.p1" offset="0x000000" size="0x100000" crc="9d6c0754" sha1="95c70c2d51fc4de01e768e03cc800a850aaad5dc" />
<!-- TC538200 -->
@@ -8506,9 +8474,9 @@
<year>1999</year>
<publisher>Visco</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- MVS ONLY RELEASE -->
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="249-p1.p1" offset="0x100000" size="0x100000" crc="c9386118" sha1="5554662c7bc8605889cac4a67fee05bbb4eb786f" />
<!-- TC5316200 -->
@@ -8611,7 +8579,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Original Version - Encrypted Code & GFX -->
- <!-- MVS VERSION -->
<feature name="slot" value="rom_sma_kof99" />
<dataarea name="maincpu" width="16" endianness="big" size="0x900000">
<rom loadflag="load16_word_swap" name="ka.neo-sma" offset="0x0c0000" size="0x040000" crc="7766d09e" sha1="4e0a49d1ad669a62676cb30f527c6590cde80194" />
@@ -8669,7 +8636,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Original Version - Encrypted Code & GFX -->
- <!-- AES VERSION -->
<feature name="slot" value="rom_sma_kof99" />
<dataarea name="maincpu" width="16" endianness="big" size="0x900000">
<rom loadflag="load16_word_swap" name="kc.neo-sma" offset="0x0c0000" size="0x040000" crc="6c9d0647" sha1="2a0ce62ca6c18007e8fbe1b60475c7874ab79389" />
@@ -8888,10 +8854,10 @@
<year>1999</year>
<publisher>Visco</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Original Version - Encrypted GFX -->
- <!-- MVS ONLY RELEASE -->
<feature name="slot" value="rom_cmc_ganryu" />
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="252-p1.p1" offset="0x100000" size="0x100000" crc="4b8ac4fb" sha1="93d90271bff281862b03beba3809cf95a47a1e44" />
@@ -9091,10 +9057,10 @@
<year>1999</year>
<publisher>Psikyo</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Original Version, Encrypted GFX Roms -->
- <!-- MVS ONLY RELEASE -->
<feature name="slot" value="rom_cmc_s1945p" />
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="254-p1.p1" offset="0x000000" size="0x100000" crc="ff8efcff" sha1="dcaeaca573385c172ecc43ee6bee355359091893" />
@@ -9137,10 +9103,10 @@
<year>1999</year>
<publisher>Yumekobo</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Original Version, Encrypted GFX -->
- <!-- MVS ONLY RELEASE -->
<feature name="slot" value="r_cmc_preisle2" />
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="255-p1.p1" offset="0x000000" size="0x100000" crc="dfa3c0f3" sha1="793c6a46f3a794536dc0327a3f3fad20e25ab661" />
@@ -9188,7 +9154,6 @@
<part name="cart" interface="neo_cart">
<!-- Original Version - Encrypted Code & GFX -->
<!-- revision 2000.4.1 -->
- <!-- MVS VERSION -->
<feature name="slot" value="rom_sma_mslug3" />
<dataarea name="maincpu" width="16" endianness="big" size="0x900000">
<rom loadflag="load16_word_swap" name="neo-sma" offset="0x0c0000" size="0x040000" crc="9cd55736" sha1="d6efb2b313127c2911d47d9324626b3f1e7c6ccb" />
@@ -9248,7 +9213,6 @@
<part name="cart" interface="neo_cart">
<!-- Original Version - Encrypted GFX -->
<!-- revision 2000.3.17 -->
- <!-- AES VERSION -->
<feature name="slot" value="rom_cmc_mslug3h" />
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="256-ph1.p1" offset="0x000000" size="0x100000" crc="9c42ca85" sha1="7a8f77a89867b889295ae9b9dfd4ba28f02d234d" />
@@ -9313,7 +9277,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Original Version, Encrypted Code + Sound + GFX Roms -->
- <!-- MVS AND AES VERSION -->
<feature name="slot" value="rom_sma_kof2000" />
<dataarea name="maincpu" width="16" endianness="big" size="0x900000">
<rom loadflag="load16_word_swap" name="neo-sma" offset="0x0c0000" size="0x040000" crc="71c6e6bb" sha1="1bd29ded4c6b29780db8e8b772c452189699ca89" />
@@ -9434,10 +9397,10 @@
<year>2000</year>
<publisher>Visco</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Original Version - Encrypted GFX -->
- <!-- MVS ONLY RELEASE -->
<feature name="slot" value="r_cmc_bangbead" />
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="259-p1.p1" offset="0x100000" size="0x100000" crc="88a37f8b" sha1="566db84850fad5e8fe822e8bba910a33e083b550" />
@@ -9474,10 +9437,10 @@
<year>2000</year>
<publisher>Eleven / Gavaking</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Original Version - Encrypted GFX -->
- <!-- MVS ONLY RELEASE -->
<feature name="slot" value="rom_cmc_nitd" />
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="260-p1.p1" offset="0x000000" size="0x080000" crc="61361082" sha1="441f3f41c1aa752c0e0a9a0b1d92711d9e636b85" />
@@ -9569,7 +9532,6 @@
<sharedfeat name="release" value="MVS" />
<sharedfeat name="compatibility" value="MVS" />
<part name="cart" interface="neo_cart">
- <!-- MVS VERSION -->
<feature name="slot" value="r_cmc_kof2001" />
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="262-p1-08-e0.p1" offset="0x000000" size="0x100000" crc="9381750d" sha1="dcfecd69e563ff52fe07d23c5372d0f748b07819" />
@@ -9626,7 +9588,6 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- AES VERSION -->
<feature name="slot" value="r_cmc_kof2001" />
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="262-pg1.p1" offset="0x000000" size="0x100000" crc="2af7e741" sha1="e41282d73ed6d521da056f1a16573bb61bfa3826" />
@@ -9691,7 +9652,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Original Version - Encrypted GFX -->
- <!-- MVS VERSION -->
<feature name="slot" value="r_pc2_mslug4" />
<!-- These carts were manufactured by Mega Enterprise, not SNK. -->
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
@@ -9742,7 +9702,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Original Version - Encrypted GFX -->
- <!-- AES VERSION -->
<feature name="slot" value="r_pc2_mslug4" />
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="263-ph1.p1" offset="0x000000" size="0x100000" crc="c67f5c8d" sha1="12af74964843f103520d9f0825069ea2f67eeb2f" />
@@ -9801,7 +9760,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Encrypted Set -->
- <!-- MVS VERSION -->
<feature name="slot" value="r_pc2_rotd" />
<dataarea name="maincpu" width="16" endianness="big" size="0x800000">
<rom loadflag="load16_word_swap" name="264-p1.p1" offset="0x000000" size="0x800000" crc="b8cc969d" sha1="4f2205b4bdd32dd1522106ef4df10ac0eb1b852d" />
@@ -9861,7 +9819,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Encrypted Set -->
- <!-- MVS AND AES VERSION -->
<feature name="slot" value="r_k2_kof2002" />
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="265-p1.p1" offset="0x000000" size="0x100000" crc="9ede7323" sha1="ad9d45498777fda9fa58e75781f48e09aee705a6" />
@@ -9923,7 +9880,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Encrypted Set -->
- <!-- MVS AND AES VERSION -->
<feature name="slot" value="r_k2_matrim" />
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word_swap" name="266-p1.p1" offset="0x000000" size="0x100000" crc="5d4c2dc7" sha1="8d723b0d28ec344eef26009b361a2b97d300dd51" />
@@ -9980,10 +9936,10 @@
<year>2003</year>
<publisher>Aiky / Taito</publisher>
<sharedfeat name="release" value="MVS" />
+ <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Encrypted Set -->
- <!-- MVS ONLY RELEASE -->
<feature name="slot" value="r_pc2_pnyaa" />
<dataarea name="maincpu" width="16" endianness="big" size="0x100000">
<rom loadflag="load16_word_swap" name="267-p1.p1" offset="0x000000" size="0x100000" crc="112fe2c0" sha1="01420e051f0bdbd4f68ce306a3738161b96f8ba8" />
@@ -10028,7 +9984,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Encrypted Set -->
- <!-- MVS VERSION -->
<feature name="slot" value="r_pv_mslug5" />
<dataarea name="maincpu" width="16" endianness="big" size="0x800000">
<rom loadflag="load32_word_swap" name="268-p1cr.p1" offset="0x000000" size="0x400000" crc="d0466792" sha1="880819933d997fab398f91061e9dbccb959ae8a1" />
@@ -10142,7 +10097,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Encrypted Set -->
- <!-- MVS AND AES VERSION -->
<feature name="slot" value="r_pv_svc" />
<dataarea name="maincpu" width="16" endianness="big" size="0x800000">
<rom loadflag="load32_word_swap" name="269-p1.p1" offset="0x000000" size="0x400000" crc="38e2005e" sha1="1b902905916a30969282f1399a756e32ff069097" />
@@ -10205,7 +10159,6 @@
<sharedfeat name="compatibility" value="MVS" />
<part name="cart" interface="neo_cart">
<!-- Encrypted Set -->
- <!-- MVS VERSION -->
<feature name="slot" value="r_k2_samsh5" />
<dataarea name="maincpu" width="16" endianness="big" size="0x800000">
<rom loadflag="load16_word_swap" name="270-p1.p1" offset="0x000000" size="0x400000" crc="4a2a09e6" sha1="2644de02cdab8ccc605488a7c76b8c9cd1d5bcb9" />
@@ -10259,7 +10212,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Encrypted Set, Alternate Set -->
- <!-- AES VERSION -->
<feature name="slot" value="r_k2_samsh5" />
<dataarea name="maincpu" width="16" endianness="big" size="0x800000">
<rom loadflag="load16_word_swap" name="270-p1c.p1" offset="0x000000" size="0x400000" crc="bf956089" sha1="c538289069bf338b9fa7ecc5c9143763dbb776a8" />
@@ -10321,7 +10273,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Encrypted Code + Sound + GFX Roms -->
- <!-- MVS VERSION -->
<feature name="slot" value="r_pv_kf2k3" />
<dataarea name="maincpu" width="16" endianness="big" size="0x900000">
<rom loadflag="load32_word_swap" name="271-p1c.p1" offset="0x000000" size="0x400000" crc="530ecc14" sha1="812cf7e9902af3f5e9e330b7c05c2171b139ad2b" />
@@ -10377,7 +10328,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Encrypted Code + Sound + GFX Roms -->
- <!-- AES VERSION -->
<feature name="slot" value="r_pv_kf2k3h" />
<!-- All chip labels for this set are correct -->
<dataarea name="maincpu" width="16" endianness="big" size="0x900000">
@@ -10441,7 +10391,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Encrypted Set -->
- <!-- MVS VERSION -->
<feature name="slot" value="r_k2_sams5s" />
<dataarea name="maincpu" width="16" endianness="big" size="0x800000">
<!-- Uncensored -->
@@ -10482,8 +10431,7 @@
<sharedfeat name="release" value="AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
- <!-- Encrypted Set -->
- <!-- AES VERSION, 2nd bugfix release -->
+ <!-- Encrypted Set, 2nd bugfix release -->
<feature name="slot" value="r_k2_sams5s" />
<dataarea name="maincpu" width="16" endianness="big" size="0x800000">
<!-- Less censored -->
@@ -10526,7 +10474,6 @@
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<!-- Encrypted Set -->
- <!-- AES VERSION -->
<feature name="slot" value="r_k2_sams5s" />
<dataarea name="maincpu" width="16" endianness="big" size="0x800000">
<!-- Censored -->
diff --git a/hash/nes.xml b/hash/nes.xml
index 57ae778df37..b850e5abd63 100644
--- a/hash/nes.xml
+++ b/hash/nes.xml
@@ -79788,6 +79788,22 @@ that the real dumps might surface -->
</part>
</software>
+ <software name="mc_cb198" supported="no">
+ <description>CoolBoy 198-in-1</description>
+ <year>201?</year>
+ <publisher>&lt;unknown&gt;</publisher>
+ <part name="cart" interface="nes_cart">
+ <feature name="slot" value="coolboy" />
+ <feature name="pcb" value="UNL-COOLBOY" />
+ <dataarea name="prg" size="33554432">
+ <rom name="cb198in1.bin" size="33554432" crc="253364ea" sha1="808ad7ff037e016c6a7a88dbe7b2bf1d41a46546" offset="00000" />
+ </dataarea>
+ <!-- 256k VRAM on cartridge -->
+ <dataarea name="vram" size="262144">
+ </dataarea>
+ </part>
+ </software>
+
<software name="mc_7x6ss" supported="no">
<description>777777-in-1 (8 bit Slim Station, NEWPXP-DVT22-A PCB)(Unl)[U][!]</description>
<year>19??</year>
@@ -79836,9 +79852,8 @@ that the real dumps might surface -->
</part>
</software>
-
<software name="mc_cb400" supported="no">
- <description>CoolBoy 400 in 1</description>
+ <description>CoolBoy 400-in-1</description>
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="nes_cart">
@@ -79914,6 +79929,54 @@ that the real dumps might surface -->
</part>
</software>
+ <software name="mc_g450" supported="no">
+ <description>Game 450-in-1</description>
+ <year>201?</year>
+ <publisher>&lt;unknown&gt;</publisher>
+ <part name="cart" interface="nes_cart">
+ <feature name="slot" value="coolboy" />
+ <feature name="pcb" value="UNL-COOLBOY" />
+ <dataarea name="prg" size="33554432">
+ <rom name="g450in1.bin" size="33554432" crc="a4396e58" sha1="780d85b737bfc3ba9918f84d09c2d90d72c88dd3" offset="00000" />
+ </dataarea>
+ <!-- 256k VRAM on cartridge -->
+ <dataarea name="vram" size="262144">
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="mc_g500" supported="no">
+ <description>Game 500-in-1</description>
+ <year>201?</year>
+ <publisher>&lt;unknown&gt;</publisher>
+ <part name="cart" interface="nes_cart">
+ <feature name="slot" value="coolboy" />
+ <feature name="pcb" value="UNL-COOLBOY" />
+ <dataarea name="prg" size="33554432">
+ <rom name="g500in1.bin" size="33554432" crc="74787d9d" sha1="63f28d991351320f3427ddd541c9edb6d3c8fe5f" offset="00000" />
+ </dataarea>
+ <!-- 256k VRAM on cartridge -->
+ <dataarea name="vram" size="262144">
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="mc_sg218" supported="no">
+ <description>Super Game 218-in-1</description>
+ <year>201?</year>
+ <publisher>&lt;unknown&gt;</publisher>
+ <part name="cart" interface="nes_cart">
+ <feature name="slot" value="coolboy" />
+ <feature name="pcb" value="UNL-COOLBOY" />
+ <dataarea name="prg" size="33554432">
+ <rom name="sg218in1.bin" size="33554432" crc="82fc4149" sha1="080cb14134e2756472114227267b6ade4f1aab9b" offset="00000" />
+ </dataarea>
+ <!-- 256k VRAM on cartridge -->
+ <dataarea name="vram" size="262144">
+ </dataarea>
+ </part>
+ </software>
+
<software name="mc_sg360" supported="no">
<description>Super Game 360-in-1</description>
<year>19??</year>
@@ -79930,9 +79993,24 @@ that the real dumps might surface -->
</part>
</software>
+ <software name="mc_sg402" supported="no">
+ <description>Super Game 402-in-1</description>
+ <year>201?</year>
+ <publisher>&lt;unknown&gt;</publisher>
+ <part name="cart" interface="nes_cart">
+ <feature name="slot" value="coolboy" />
+ <feature name="pcb" value="UNL-COOLBOY" />
+ <dataarea name="prg" size="33554432">
+ <rom name="sg402in1.bin" size="33554432" crc="205daab3" sha1="b403daad9e0cd3b8490ef9127bcb7acd5b40f710" offset="00000" />
+ </dataarea>
+ <!-- 128k VRAM on cartridge -->
+ <dataarea name="vram" size="131072">
+ </dataarea>
+ </part>
+ </software>
<software name="mc_gx121" supported="no">
- <description>Games Xplosion 121 in 1</description>
+ <description>Games Xplosion 121-in-1</description>
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="nes_cart">
@@ -79947,6 +80025,18 @@ that the real dumps might surface -->
</part>
</software>
+ <software name="mc_hh210" supported="no">
+ <description>Handheld 210-in-1</description>
+ <year>201?</year>
+ <publisher>&lt;unknown&gt;</publisher>
+ <part name="cart" interface="nes_cart">
+ <feature name="slot" value="coolboy" />
+ <feature name="pcb" value="UNL-COOLBOY" />
+ <dataarea name="prg" size="33554432">
+ <rom name="MSP55LV128T.bin" size="16777216" crc="9ba520d4" sha1="627f811b24314197e289a2ade668ff4115421bed" offset="00000" />
+ </dataarea>
+ </part>
+ </software>
<!-- TO SORT AND RENAME PROPERLY!!! -->
diff --git a/language/Japanese/strings.po b/language/Japanese/strings.po
index ad06243c659..3c2bf2270ef 100644
--- a/language/Japanese/strings.po
+++ b/language/Japanese/strings.po
@@ -594,11 +594,11 @@ msgstr "ビデオモード"
#: src/emu/ui/dsplmenu.cpp:40
msgid "Hardware Stretch"
-msgstr ""
+msgstr "ハードウェアによる拡大"
#: src/emu/ui/dsplmenu.cpp:41
msgid "Triple Buffering"
-msgstr ""
+msgstr "トリプルバッファ"
#: src/emu/ui/dsplmenu.cpp:42
msgid "HLSL"
@@ -614,11 +614,11 @@ msgstr "バイリニアフィルタリング"
#: src/emu/ui/dsplmenu.cpp:46
msgid "Bitmap Prescaling"
-msgstr ""
+msgstr "ビットマッププレスケール"
#: src/emu/ui/dsplmenu.cpp:47
msgid "Multi-Threaded Rendering"
-msgstr ""
+msgstr "マルチスレッド描画"
#: src/emu/ui/dsplmenu.cpp:48
msgid "Window Mode"
@@ -626,19 +626,19 @@ msgstr "ウィンドウモード"
#: src/emu/ui/dsplmenu.cpp:49
msgid "Enforce Aspect Ratio"
-msgstr ""
+msgstr "アスペクト比を維持する"
#: src/emu/ui/dsplmenu.cpp:50
msgid "Start Out Maximized"
-msgstr ""
+msgstr "開始時に最大化する"
#: src/emu/ui/dsplmenu.cpp:51
msgid "Synchronized Refresh"
-msgstr ""
+msgstr "リフレッシュを同期"
#: src/emu/ui/dsplmenu.cpp:52
msgid "Wait Vertical Sync"
-msgstr ""
+msgstr "V-Syncを待つ"
#: src/emu/ui/dsplmenu.cpp:204 src/emu/ui/dsplmenu.cpp:224
#: src/emu/ui/optsmenu.cpp:265
@@ -647,7 +647,7 @@ msgstr "表示オプション"
#: src/emu/ui/filesel.cpp:159
msgid "File Already Exists - Override?"
-msgstr ""
+msgstr "ファイルが存在します-上書きしますか?"
#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1598
#: src/emu/ui/selgame.cpp:1599 src/emu/ui/selgame.cpp:1600
@@ -655,7 +655,7 @@ msgstr ""
#: src/emu/ui/selgame.cpp:1603 src/emu/ui/selgame.cpp:1604
#: src/emu/ui/selgame.cpp:1613
msgid "No"
-msgstr ""
+msgstr "いいえ"
#: src/emu/ui/filesel.cpp:162 src/emu/ui/selgame.cpp:1598
#: src/emu/ui/selgame.cpp:1599 src/emu/ui/selgame.cpp:1600
@@ -663,7 +663,7 @@ msgstr ""
#: src/emu/ui/selgame.cpp:1603 src/emu/ui/selgame.cpp:1604
#: src/emu/ui/selgame.cpp:1613
msgid "Yes"
-msgstr ""
+msgstr "はい"
#: src/emu/ui/filesel.cpp:271
msgid "New Image Name:"
@@ -679,7 +679,7 @@ msgstr "作成"
#: src/emu/ui/filesel.cpp:314
msgid "Please enter a file extension too"
-msgstr ""
+msgstr "ファイルの拡張子を入力してください"
#: src/emu/ui/filesel.cpp:502 src/emu/ui/swlist.cpp:65
msgid "[empty slot]"
@@ -711,29 +711,31 @@ msgstr "読み取り/書き込み"
#: src/emu/ui/filesel.cpp:866
msgid "Read this image, write to another image"
-msgstr ""
+msgstr "このイメージから読み取り、別のイメージに書き込む"
#: src/emu/ui/filesel.cpp:867
msgid "Read this image, write to diff"
-msgstr ""
+msgstr "このイメージから読み取り、差分(diff)に書き込む"
#: src/emu/ui/imgcntrl.cpp:115
msgid "Cannot save over directory"
-msgstr ""
+msgstr "別のフォルダには保存できません"
#: src/emu/ui/imgcntrl.cpp:149
msgid ""
"The software selected is missing one or more required ROM or CHD images. "
"Please select a different one."
msgstr ""
+"選択したソフトウェアに必要な1つ以上のROMまたはCHDが不足しています。"
+"別の物を選択してください。"
#: src/emu/ui/info.cpp:98
msgid "Not supported"
-msgstr ""
+msgstr "対応していません"
#: src/emu/ui/info.cpp:101
msgid "Partially supported"
-msgstr ""
+msgstr "部分的に対応"
#: src/emu/ui/info.cpp:109
msgid "[empty]"
@@ -753,7 +755,7 @@ msgstr "ユーザーインターフェイス"
#: src/emu/ui/inputmap.cpp:59
msgid "Other Controls"
-msgstr ""
+msgstr "その他のコントロール"
#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
#: src/emu/ui/slotopt.cpp:172
@@ -870,7 +872,7 @@ msgstr "お気に入りに追加または削除"
#: src/emu/ui/menu.cpp:64
msgid "Export displayed list to file"
-msgstr ""
+msgstr "表示されているリストをファイルに出力"
#: src/emu/ui/menu.cpp:65
msgid "Show DATs view"
@@ -936,6 +938,8 @@ msgid ""
"Tickets dispensed: %1$d\n"
"\n"
msgstr ""
+"チケット発行: %1$d\n"
+"\n"
#: src/emu/ui/miscmenu.cpp:256
msgid "Coin %1$c: NA%3$s\n"
@@ -952,7 +956,7 @@ msgstr "(ロック)"
#: src/emu/ui/miscmenu.cpp:518
msgid "Visible Delay"
-msgstr "目に見えるディレイ"
+msgstr "表示する長さ"
#: src/emu/ui/miscmenu.cpp:557
msgid "Re-select last machine played"
@@ -1006,7 +1010,7 @@ msgstr "%s.xmlをuiフォルダーに保存しました。"
#: src/emu/ui/miscmenu.cpp:765
msgid "Name: Description:\n"
-msgstr ""
+msgstr "名前: 詳細:\n"
#: src/emu/ui/miscmenu.cpp:777
#, c-format
@@ -1015,15 +1019,15 @@ msgstr "%s.txtをuiフォルダーに保存しました。"
#: src/emu/ui/miscmenu.cpp:795
msgid "Export XML format (like -listxml)"
-msgstr ""
+msgstr "XML形式で出力(-listxml同様)"
#: src/emu/ui/miscmenu.cpp:796
msgid "Export TXT format (like -listfull)"
-msgstr ""
+msgstr "TXT形式で出力(-listfull同様)"
#: src/emu/ui/miscmenu.cpp:854
msgid "Dummy"
-msgstr ""
+msgstr "ダミー"
#: src/emu/ui/miscmenu.cpp:856
msgid "Save machine configuration"
@@ -1043,7 +1047,7 @@ msgstr " ^!カテゴリ"
#: src/emu/ui/optsmenu.cpp:254
msgid "^!Setup custom filter"
-msgstr ""
+msgstr "^!カスタムフィルタを設定する"
#: src/emu/ui/optsmenu.cpp:262
msgid "Customize UI"
@@ -1128,6 +1132,10 @@ msgid ""
"\n"
"Press any key (except ESC) to continue."
msgstr ""
+"選択したマシンに必要な1つ以上のROMまたはCHDが不足しています。"
+"別のマシンを選択してください。\n"
+"\n"
+"進めるには、何かキー(ESC以外)を押してください。"
#: src/emu/ui/selgame.cpp:647 src/emu/ui/simpleselgame.cpp:262
msgid "Configure Options"
@@ -1140,7 +1148,7 @@ msgstr "マシンの設定"
#: src/emu/ui/selgame.cpp:804
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
-msgstr ""
+msgstr "%1$s %2$s ( %3$d / %4$d マシン (%5$d BIOS) )"
#: src/emu/ui/selgame.cpp:814
#, c-format
@@ -1160,7 +1168,7 @@ msgstr "%1$s検索:%2$s_"
#: src/emu/ui/selgame.cpp:884
#, c-format
msgid "Romset: %1$-.100s"
-msgstr ""
+msgstr "ROMセット: %1$-.100s"
#: src/emu/ui/selgame.cpp:887 src/emu/ui/selgame.cpp:936
#: src/emu/ui/selsoft.cpp:742 src/emu/ui/selsoft.cpp:792
@@ -1172,77 +1180,77 @@ msgstr ""
#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:748
#, c-format
msgid "Driver is clone of: %1$-.100s"
-msgstr ""
+msgstr "次のクローンのドライバ: %1$-.100s"
#: src/emu/ui/selgame.cpp:895 src/emu/ui/selsoft.cpp:750
msgid "Driver is parent"
-msgstr ""
+msgstr "親セットのドライバ"
#: src/emu/ui/selgame.cpp:899 src/emu/ui/selsoft.cpp:754
#: src/emu/ui/simpleselgame.cpp:332
msgid "Overall: NOT WORKING"
-msgstr ""
+msgstr "概略: 動作不可"
#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:756
#: src/emu/ui/simpleselgame.cpp:334
msgid "Overall: Unemulated Protection"
-msgstr ""
+msgstr "概略: プロテクトが未エミュレート"
#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:758
#: src/emu/ui/simpleselgame.cpp:336
msgid "Overall: Working"
-msgstr ""
+msgstr "概略: 動作可"
#: src/emu/ui/selgame.cpp:907 src/emu/ui/selsoft.cpp:762
msgid "Graphics: Imperfect, "
-msgstr ""
+msgstr "グラフィック: 不完全、 "
#: src/emu/ui/selgame.cpp:909 src/emu/ui/selsoft.cpp:764
msgid "Graphics: OK, "
-msgstr ""
+msgstr "グラフィック: 正常、 "
#: src/emu/ui/selgame.cpp:912 src/emu/ui/selsoft.cpp:767
msgid "Sound: Unimplemented"
-msgstr "サウンド:未実装"
+msgstr "サウンド: 未実装"
#: src/emu/ui/selgame.cpp:914 src/emu/ui/selsoft.cpp:769
msgid "Sound: Imperfect"
-msgstr ""
+msgstr "サウンド: 不完全"
#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:771
msgid "Sound: OK"
-msgstr ""
+msgstr "サウンド: 正常"
#: src/emu/ui/selgame.cpp:933
#, c-format
msgid "System: %1$-.100s"
-msgstr ""
+msgstr "システム: %1$-.100s"
#: src/emu/ui/selgame.cpp:940 src/emu/ui/selsoft.cpp:796
#, c-format
msgid "Software is clone of: %1$-.100s"
-msgstr ""
+msgstr "次のクローンのソフトウェア: %1$-.100s"
#: src/emu/ui/selgame.cpp:942 src/emu/ui/selsoft.cpp:798
msgid "Software is parent"
-msgstr ""
+msgstr "親セットのソフトウェア"
#: src/emu/ui/selgame.cpp:947 src/emu/ui/selsoft.cpp:803
msgid "Supported: No"
-msgstr ""
+msgstr "対応状況: いいえ"
#: src/emu/ui/selgame.cpp:952 src/emu/ui/selsoft.cpp:808
msgid "Supported: Partial"
-msgstr ""
+msgstr "対応状況: 部分的"
#: src/emu/ui/selgame.cpp:957 src/emu/ui/selsoft.cpp:813
msgid "Supported: Yes"
-msgstr ""
+msgstr "対応状況: はい"
#: src/emu/ui/selgame.cpp:962 src/emu/ui/selsoft.cpp:818
#, c-format
msgid "romset: %1$-.100s"
-msgstr ""
+msgstr "ROMセット: %1$-.100s"
#: src/emu/ui/selgame.cpp:969
#, c-format
@@ -1252,7 +1260,7 @@ msgstr ""
#: src/emu/ui/selgame.cpp:1565
#, c-format
msgid "Romset: %1$-.100s\n"
-msgstr ""
+msgstr "ROMセット: %1$-.100s\n"
#: src/emu/ui/selgame.cpp:1566
#, c-format
@@ -1267,35 +1275,35 @@ msgstr "製造元: %1$-.100s\n"
#: src/emu/ui/selgame.cpp:1571
#, c-format
msgid "Driver is Clone of: %1$-.100s\n"
-msgstr ""
+msgstr "次のクローンのドライバ: %1$-.100s\n"
#: src/emu/ui/selgame.cpp:1573
msgid "Driver is Parent\n"
-msgstr ""
+msgstr "親セットのドライバ\n"
#: src/emu/ui/selgame.cpp:1576
msgid "Overall: NOT WORKING\n"
-msgstr ""
+msgstr "概略: 動作不可\n"
#: src/emu/ui/selgame.cpp:1578
msgid "Overall: Unemulated Protection\n"
-msgstr ""
+msgstr "概略: プロテクトが未エミュレート\n"
#: src/emu/ui/selgame.cpp:1580
msgid "Overall: Working\n"
-msgstr ""
+msgstr "概略: 動作可\n"
#: src/emu/ui/selgame.cpp:1583
msgid "Graphics: Imperfect Colors\n"
-msgstr ""
+msgstr "グラフィック: 色が不完全\n"
#: src/emu/ui/selgame.cpp:1587
msgid "Graphics: Imperfect\n"
-msgstr ""
+msgstr "グラフィック: 不完全\n"
#: src/emu/ui/selgame.cpp:1589
msgid "Graphics: OK\n"
-msgstr ""
+msgstr "グラフィック: 正常\n"
#: src/emu/ui/selgame.cpp:1592
msgid "Sound: Unimplemented\n"
@@ -1303,46 +1311,46 @@ msgstr "サウンド: 未実装\n"
#: src/emu/ui/selgame.cpp:1594
msgid "Sound: Imperfect\n"
-msgstr ""
+msgstr "サウンド: 不完全\n"
#: src/emu/ui/selgame.cpp:1596
msgid "Sound: OK\n"
-msgstr ""
+msgstr "サウンド: 正常\n"
#: src/emu/ui/selgame.cpp:1598
#, c-format
msgid "Driver is Skeleton: %1$s\n"
-msgstr ""
+msgstr "スケルトンドライバ: %1$s\n"
#: src/emu/ui/selgame.cpp:1599
#, c-format
msgid "Game is Mechanical: %1$s\n"
-msgstr ""
+msgstr "機械仕掛けのゲーム: %1$s\n"
#: src/emu/ui/selgame.cpp:1600
#, c-format
msgid "Requires Artwork: %1$s\n"
-msgstr ""
+msgstr "アートワークが必要: %1$s\n"
#: src/emu/ui/selgame.cpp:1601
#, c-format
msgid "Requires Clickable Artwork: %1$s\n"
-msgstr ""
+msgstr "クリック可のアートワークが必要: %1$s\n"
#: src/emu/ui/selgame.cpp:1602
#, c-format
msgid "Support Cocktail: %1$s\n"
-msgstr ""
+msgstr "カクテルモード対応: %1$s\n"
#: src/emu/ui/selgame.cpp:1603
#, c-format
msgid "Driver is Bios: %1$s\n"
-msgstr ""
+msgstr "BIOSドライバ: %1$s\n"
#: src/emu/ui/selgame.cpp:1604
#, c-format
msgid "Support Save: %1$s\n"
-msgstr ""
+msgstr "セーブ対応: %1$s\n"
#: src/emu/ui/selgame.cpp:1605
#, c-format
@@ -1360,33 +1368,35 @@ msgstr "横"
#: src/emu/ui/selgame.cpp:1613
#, c-format
msgid "Requires CHD: %1$s\n"
-msgstr ""
+msgstr "CHDが必要: %1$s\n"
#: src/emu/ui/selgame.cpp:1626
msgid "Roms Audit Pass: OK\n"
-msgstr ""
+msgstr "ROM検証結果: 正常\n"
#: src/emu/ui/selgame.cpp:1628
msgid "Roms Audit Pass: BAD\n"
-msgstr ""
+msgstr "ROM検証結果: 異常\n"
#: src/emu/ui/selgame.cpp:1631
msgid "Samples Audit Pass: None Needed\n"
-msgstr ""
+msgstr "サンプル検証結果: 不要\n"
#: src/emu/ui/selgame.cpp:1633
msgid "Samples Audit Pass: OK\n"
-msgstr ""
+msgstr "サンプル検証結果: 正常\n"
#: src/emu/ui/selgame.cpp:1635
msgid "Samples Audit Pass: BAD\n"
-msgstr ""
+msgstr "サンプル検証結果: 異常\n"
#: src/emu/ui/selgame.cpp:1638
msgid ""
"Roms Audit Pass: Disabled\n"
"Samples Audit Pass: Disabled\n"
msgstr ""
+"ROM検証結果: 無効\n"
+"サンプル検証結果: 無効\n"
#: src/emu/ui/selgame.cpp:2070 src/emu/ui/selgame.cpp:2231
#: src/emu/ui/selsoft.cpp:1639
@@ -1408,11 +1418,15 @@ msgid ""
"\n"
"Press any key (except ESC) to continue."
msgstr ""
+"選択したソフトウェアに必要な1つ以上のファイルが不足しています。"
+"別のソフトウェアを選択してください。\n"
+"\n"
+"進めるには、何かキー(ESC以外)を押してください。"
#: src/emu/ui/selsoft.cpp:681
#, c-format
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
-msgstr ""
+msgstr "%1$s %2$s ( %3$d / %4$d ソフトウェア )"
#: src/emu/ui/selsoft.cpp:682
#, c-format
@@ -1471,15 +1485,19 @@ msgid ""
"If this is your first time using %2$s, please see the config.txt file in the "
"docs directory for information on configuring %2$s."
msgstr ""
+"マシンが見つかりません。%1$s.iniファイルで指定したrompathを確認してください。\n"
+"\n"
+"もし %2$s の利用が初めてなら、%2$s の設定方法についてdocsフォルダの"
+"config.txtファイルをご覧ください。"
#: src/emu/ui/simpleselgame.cpp:287
#, c-format
msgid "Type name or select: %1$s_"
-msgstr ""
+msgstr "名前を入力もしくは選択: %1$s_"
#: src/emu/ui/simpleselgame.cpp:289
msgid "Type name or select: (random)"
-msgstr ""
+msgstr "名前を入力もしくは選択: (ランダム)"
#: src/emu/ui/simpleselgame.cpp:328
#, c-format
@@ -1488,11 +1506,11 @@ msgstr "ドライバ:%1$-.100s"
#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
msgid "Imperfect"
-msgstr ""
+msgstr "不完全"
#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
msgid "OK"
-msgstr ""
+msgstr "正常"
#: src/emu/ui/simpleselgame.cpp:345
msgid "Unimplemented"
@@ -1525,12 +1543,12 @@ msgstr "【ファイルマネージャ】"
#: src/emu/ui/swlist.cpp:235
msgid "Switch Item Ordering"
-msgstr ""
+msgstr "項目の並び順の切り替え"
#: src/emu/ui/swlist.cpp:268
#, c-format
msgid "Switched Order: entries now ordered by %s"
-msgstr ""
+msgstr "並び順を切り替え: 一覧は現在 %s 順"
#: src/emu/ui/swlist.cpp:268
msgid "shortname"
@@ -1863,7 +1881,7 @@ msgstr "%1$sの音量"
#: src/emu/ui/ui.cpp:1999
#, c-format
msgid "Overclock CPU %1$s"
-msgstr ""
+msgstr "CPU %1$sのオーバークロック"
#: src/emu/ui/ui.cpp:2019
#, c-format
@@ -1888,42 +1906,42 @@ msgstr "%1$sのガンマ"
#: src/emu/ui/ui.cpp:2036
#, c-format
msgid "%1$s Horiz Stretch"
-msgstr ""
+msgstr "%1$s 横方向の拡大"
#: src/emu/ui/ui.cpp:2039
#, c-format
msgid "%1$s Horiz Position"
-msgstr ""
+msgstr "%1$s 横方向の位置"
#: src/emu/ui/ui.cpp:2042
#, c-format
msgid "%1$s Vert Stretch"
-msgstr ""
+msgstr "%1$s 縦方向の拡大"
#: src/emu/ui/ui.cpp:2045
#, c-format
msgid "%1$s Vert Position"
-msgstr ""
+msgstr "%1$s 縦方向の位置"
#: src/emu/ui/ui.cpp:2063
#, c-format
msgid "Laserdisc '%1$s' Horiz Stretch"
-msgstr ""
+msgstr "レーザーディスク '%1$s' 横方向の拡大"
#: src/emu/ui/ui.cpp:2066
#, c-format
msgid "Laserdisc '%1$s' Horiz Position"
-msgstr ""
+msgstr "レーザーディスク '%1$s' 横方向の位置"
#: src/emu/ui/ui.cpp:2069
#, c-format
msgid "Laserdisc '%1$s' Vert Stretch"
-msgstr ""
+msgstr "レーザーディスク '%1$s' 縦方向の拡大"
#: src/emu/ui/ui.cpp:2072
#, c-format
msgid "Laserdisc '%1$s' Vert Position"
-msgstr ""
+msgstr "レーザーディスク '%1$s' 縦方向の位置"
#: src/emu/ui/ui.cpp:2081
msgid "Vector Flicker"
@@ -1944,7 +1962,7 @@ msgstr "ビーム強度比重"
#: src/emu/ui/ui.cpp:2099
#, c-format
msgid "Crosshair Scale %1$s"
-msgstr ""
+msgstr "照準の大きさ %1$s"
#: src/emu/ui/ui.cpp:2099 src/emu/ui/ui.cpp:2102
msgid "X"
@@ -1957,7 +1975,7 @@ msgstr ""
#: src/emu/ui/ui.cpp:2102
#, c-format
msgid "Crosshair Offset %1$s"
-msgstr ""
+msgstr "照準のオフセット %1$s"
#: src/emu/ui/ui.cpp:2121
#, c-format
@@ -2005,22 +2023,22 @@ msgstr "画面"
#: src/emu/ui/ui.cpp:2544
#, c-format
msgid "Crosshair Scale X %1$1.3f"
-msgstr ""
+msgstr "照準の大きさ X %1$1.3f"
#: src/emu/ui/ui.cpp:2544
#, c-format
msgid "Crosshair Scale Y %1$1.3f"
-msgstr ""
+msgstr "照準の大きさ Y %1$1.3f"
#: src/emu/ui/ui.cpp:2563
#, c-format
msgid "Crosshair Offset X %1$1.3f"
-msgstr ""
+msgstr "照準のオフセット X %1$1.3f"
#: src/emu/ui/ui.cpp:2563
#, c-format
msgid "Crosshair Offset Y %1$1.3f"
-msgstr ""
+msgstr "照準のオフセット Y %1$1.3f"
#: src/emu/ui/videoopt.cpp:55
#, c-format
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 3b441df21c4..0a7c79d5825 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -1059,6 +1059,7 @@ configuration { "asmjs" }
buildoptions {
"-std=gnu89",
"-Wno-implicit-function-declaration",
+ "-s USE_SDL_TTF=2",
}
buildoptions_cpp {
"-x c++",
@@ -1280,6 +1281,7 @@ end
}
configuration { "vs2015" }
buildoptions {
+ "/wd4334", -- warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
"/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
"/wd4457", -- warning C4457: declaration of 'xxx' hides function parameter
"/wd4458", -- warning C4458: declaration of 'xxx' hides class member
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua
index 1379c572fa8..e4451462806 100644
--- a/scripts/src/bus.lua
+++ b/scripts/src/bus.lua
@@ -2587,3 +2587,41 @@ if (BUSES["NEWBRAIN"]~=null) then
MAME_DIR .. "src/devices/bus/newbrain/fdc.h",
}
end
+
+---------------------------------------------------
+--
+--@src/devices/bus/svi3x8/expander/expander.h,BUSES["SVI_EXPANDER"] = true
+---------------------------------------------------
+
+if (BUSES["SVI_EXPANDER"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/bus/svi3x8/expander/expander.cpp",
+ MAME_DIR .. "src/devices/bus/svi3x8/expander/expander.h",
+ MAME_DIR .. "src/devices/bus/svi3x8/expander/modules.cpp",
+ MAME_DIR .. "src/devices/bus/svi3x8/expander/modules.h",
+ MAME_DIR .. "src/devices/bus/svi3x8/expander/sv601.cpp",
+ MAME_DIR .. "src/devices/bus/svi3x8/expander/sv601.h",
+ }
+end
+
+---------------------------------------------------
+--
+--@src/devices/bus/svi3x8/slot/slot.h,BUSES["SVI_SLOT"] = true
+---------------------------------------------------
+
+if (BUSES["SVI_SLOT"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/bus/svi3x8/slot/slot.cpp",
+ MAME_DIR .. "src/devices/bus/svi3x8/slot/slot.h",
+ MAME_DIR .. "src/devices/bus/svi3x8/slot/cards.cpp",
+ MAME_DIR .. "src/devices/bus/svi3x8/slot/cards.h",
+ MAME_DIR .. "src/devices/bus/svi3x8/slot/sv801.cpp",
+ MAME_DIR .. "src/devices/bus/svi3x8/slot/sv801.h",
+ MAME_DIR .. "src/devices/bus/svi3x8/slot/sv803.cpp",
+ MAME_DIR .. "src/devices/bus/svi3x8/slot/sv803.h",
+ MAME_DIR .. "src/devices/bus/svi3x8/slot/sv806.cpp",
+ MAME_DIR .. "src/devices/bus/svi3x8/slot/sv806.h",
+ MAME_DIR .. "src/devices/bus/svi3x8/slot/sv807.cpp",
+ MAME_DIR .. "src/devices/bus/svi3x8/slot/sv807.h",
+ }
+end
diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua
index ed6378f93f8..4d3f98a3e4c 100644
--- a/scripts/src/cpu.lua
+++ b/scripts/src/cpu.lua
@@ -1842,19 +1842,39 @@ if (CPUS["AVR8"]~=null or _OPTIONS["with-tools"]) then
end
--------------------------------------------------
--- Texas Instruments TMS0980
---@src/devices/cpu/tms0980/tms0980.h,CPUS["TMS0980"] = true
+-- Texas Instruments TMS1000 series
+--@src/devices/cpu/tms1000/tms1000.h,CPUS["TMS1000"] = true
+--@src/devices/cpu/tms1000/tms1100.h,CPUS["TMS1000"] = true
+--@src/devices/cpu/tms1000/tms1400.h,CPUS["TMS1000"] = true
+--@src/devices/cpu/tms1000/tms0970.h,CPUS["TMS1000"] = true
+--@src/devices/cpu/tms1000/tms0980.h,CPUS["TMS1000"] = true
+--@src/devices/cpu/tms1000/tms0270.h,CPUS["TMS1000"] = true
+--@src/devices/cpu/tms1000/tp0320.h,CPUS["TMS1000"] = true
--------------------------------------------------
-if (CPUS["TMS0980"]~=null) then
+if (CPUS["TMS1000"]~=null) then
files {
- MAME_DIR .. "src/devices/cpu/tms0980/tms0980.cpp",
- MAME_DIR .. "src/devices/cpu/tms0980/tms0980.h",
+ MAME_DIR .. "src/devices/cpu/tms1000/tms1k_base.cpp",
+ MAME_DIR .. "src/devices/cpu/tms1000/tms1k_base.h",
+ MAME_DIR .. "src/devices/cpu/tms1000/tms1000.cpp",
+ MAME_DIR .. "src/devices/cpu/tms1000/tms1000.h",
+ MAME_DIR .. "src/devices/cpu/tms1000/tms1100.cpp",
+ MAME_DIR .. "src/devices/cpu/tms1000/tms1100.h",
+ MAME_DIR .. "src/devices/cpu/tms1000/tms1400.cpp",
+ MAME_DIR .. "src/devices/cpu/tms1000/tms1400.h",
+ MAME_DIR .. "src/devices/cpu/tms1000/tms0970.cpp",
+ MAME_DIR .. "src/devices/cpu/tms1000/tms0970.h",
+ MAME_DIR .. "src/devices/cpu/tms1000/tms0980.cpp",
+ MAME_DIR .. "src/devices/cpu/tms1000/tms0980.h",
+ MAME_DIR .. "src/devices/cpu/tms1000/tms0270.cpp",
+ MAME_DIR .. "src/devices/cpu/tms1000/tms0270.h",
+ MAME_DIR .. "src/devices/cpu/tms1000/tp0320.cpp",
+ MAME_DIR .. "src/devices/cpu/tms1000/tp0320.h",
}
end
-if (CPUS["TMS0980"]~=null or _OPTIONS["with-tools"]) then
- table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/tms0980/tms0980d.cpp")
+if (CPUS["TMS1000"]~=null or _OPTIONS["with-tools"]) then
+ table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/tms1000/tms1k_dasm.cpp")
end
--------------------------------------------------
@@ -1879,7 +1899,6 @@ end
--@src/devices/cpu/tms9900/tms9900.h,CPUS["TMS9900"] = true
--@src/devices/cpu/tms9900/tms9980a.h,CPUS["TMS9900"] = true
--@src/devices/cpu/tms9900/tms9995.h,CPUS["TMS9900"] = true
-
--------------------------------------------------
if (CPUS["TMS9900"]~=null) then
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index c9c99a354c3..18a5b28210f 100644
--- a/scripts/src/main.lua
+++ b/scripts/src/main.lua
@@ -109,6 +109,7 @@ end
local emccopts = ""
emccopts = emccopts .. " -O3"
emccopts = emccopts .. " -s USE_SDL=2"
+ emccopts = emccopts .. " -s USE_SDL_TTF=2"
emccopts = emccopts .. " --memory-init-file 0"
emccopts = emccopts .. " -s ALLOW_MEMORY_GROWTH=0"
emccopts = emccopts .. " -s TOTAL_MEMORY=268435456"
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index 17f8df2f760..27deeddb3a4 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -100,7 +100,7 @@ CPUS["SM8500"] = true
CPUS["MINX"] = true
CPUS["SSEM"] = true
CPUS["AVR8"] = true
---CPUS["TMS0980"] = true
+--CPUS["TMS1000"] = true
CPUS["I4004"] = true
CPUS["SUPERFX"] = true
CPUS["Z8"] = true
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index eb0322cd2f7..5687a044a41 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -101,7 +101,7 @@ CPUS["SM8500"] = true
CPUS["MINX"] = true
CPUS["SSEM"] = true
CPUS["AVR8"] = true
-CPUS["TMS0980"] = true
+CPUS["TMS1000"] = true
CPUS["I4004"] = true
CPUS["SUPERFX"] = true
CPUS["Z8"] = true
@@ -652,6 +652,8 @@ BUSES["SMS_EXP"] = true
BUSES["SNES"] = true
BUSES["SNES_CTRL"] = true
BUSES["SPC1000"] = true
+BUSES["SVI_EXPANDER"] = true
+BUSES["SVI_SLOT"] = true
BUSES["TI99PEB"] = true
BUSES["TI99X"] = true
BUSES["TIKI100"] = true
diff --git a/src/devices/bus/gba/gba_slot.cpp b/src/devices/bus/gba/gba_slot.cpp
index 10c5d45a0a8..737ff5fa6ed 100644
--- a/src/devices/bus/gba/gba_slot.cpp
+++ b/src/devices/bus/gba/gba_slot.cpp
@@ -295,17 +295,17 @@ int gba_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
// first detect nvram type based on strings inside the file
for (int i = 0; i < len; i++)
{
- if (!memcmp(&ROM[i], "EEPROM_V", 8))
+ if ((i<len-8) && !memcmp(&ROM[i], "EEPROM_V", 8))
chip |= GBA_CHIP_EEPROM; // should be either GBA_CHIP_EEPROM_4K or GBA_CHIP_EEPROM_64K, but it is not yet possible to automatically detect which one
- else if ((!memcmp(&ROM[i], "SRAM_V", 6)) || (!memcmp(&ROM[i], "SRAM_F_V", 8))) // || (!memcmp(&data[i], "ADVANCEWARS", 11))) //advance wars 1 & 2 has SRAM, but no "SRAM_" string can be found inside the ROM space
+ else if (((i<len-6) && !memcmp(&ROM[i], "SRAM_V", 6)) || ((i<len-8) && !memcmp(&ROM[i], "SRAM_F_V", 8))) // || ((i<len-11) && !memcmp(&data[i], "ADVANCEWARS", 11))) //advance wars 1 & 2 has SRAM, but no "SRAM_" string can be found inside the ROM space
chip |= GBA_CHIP_SRAM;
- else if (!memcmp(&ROM[i], "FLASH1M_V", 9))
+ else if ((i<len-9) && !memcmp(&ROM[i], "FLASH1M_V", 9))
chip |= GBA_CHIP_FLASH_1M;
- else if (!memcmp(&ROM[i], "FLASH512_V", 10))
+ else if ((i<len-10) && !memcmp(&ROM[i], "FLASH512_V", 10))
chip |= GBA_CHIP_FLASH_512;
- else if (!memcmp(&ROM[i], "FLASH_V", 7))
+ else if ((i<len-7) && !memcmp(&ROM[i], "FLASH_V", 7))
chip |= GBA_CHIP_FLASH;
- else if (!memcmp(&ROM[i], "SIIRTC_V", 8))
+ else if ((i<len-8) && !memcmp(&ROM[i], "SIIRTC_V", 8))
chip |= GBA_CHIP_RTC;
}
osd_printf_info("GBA: Detected (ROM) %s\n", gba_chip_string(chip).c_str());
diff --git a/src/devices/bus/isa/trident.cpp b/src/devices/bus/isa/trident.cpp
index 4f47bdd7212..85b83d968cc 100644
--- a/src/devices/bus/isa/trident.cpp
+++ b/src/devices/bus/isa/trident.cpp
@@ -191,6 +191,7 @@ void trident_vga_device::device_reset()
// Windows 3.1 TGUI9440AGi drivers do not set the pointer colour registers?
tri.cursor_bg = 0x00000000;
tri.cursor_fg = 0xffffffff;
+ tri.pixel_depth = 0x10; //disable 8bpp mode by default
}
UINT32 trident_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
@@ -443,7 +444,6 @@ void trident_vga_device::trident_seq_reg_write(UINT8 index, UINT8 data)
}
else
{
- if(LOG) logerror("Trident SR%02X: %s mode write %02x\n",index,tri.new_mode ? "new" : "old",data);
switch(index)
{
case 0x0b:
@@ -490,6 +490,7 @@ void trident_vga_device::trident_seq_reg_write(UINT8 index, UINT8 data)
if(!LOG) logerror("Trident: Sequencer index %02x read\n",index);
}
}
+ if(LOG) logerror("Trident SR%02X: %s mode write %02x\n",index,tri.new_mode ? "new" : "old",data);
}
UINT8 trident_vga_device::trident_crtc_reg_read(UINT8 index)
@@ -605,7 +606,6 @@ void trident_vga_device::trident_crtc_reg_write(UINT8 index, UINT8 data)
}
else
{
- if(LOG) logerror("Trident CR%02X: write %02x\n",index,data);
switch(index)
{
case 0x1e: // Module Testing Register
@@ -704,6 +704,7 @@ void trident_vga_device::trident_crtc_reg_write(UINT8 index, UINT8 data)
break;
}
}
+ if(LOG) logerror("Trident CR%02X: write %02x\n",index,data);
}
UINT8 trident_vga_device::trident_gc_reg_read(UINT8 index)
@@ -764,6 +765,7 @@ void trident_vga_device::trident_gc_reg_write(UINT8 index, UINT8 data)
break;
}
}
+ if(LOG) logerror("Trident GC%02X: write %02x\n",index,data);
}
READ8_MEMBER(trident_vga_device::port_03c0_r)
diff --git a/src/devices/bus/svi3x8/expander/expander.cpp b/src/devices/bus/svi3x8/expander/expander.cpp
new file mode 100644
index 00000000000..faddf3f24ac
--- /dev/null
+++ b/src/devices/bus/svi3x8/expander/expander.cpp
@@ -0,0 +1,151 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SVI 318/328 Expansion Slot
+
+ 50-pin slot
+
+***************************************************************************/
+
+#include "expander.h"
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type SVI_EXPANDER = &device_creator<svi_expander_device>;
+
+
+//**************************************************************************
+// SLOT DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// svi_expander_device - constructor
+//-------------------------------------------------
+
+svi_expander_device::svi_expander_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, SVI_EXPANDER, "SVI 318/328 Expander Bus", tag, owner, clock, "svi_expander", __FILE__),
+ device_slot_interface(mconfig, *this),
+ m_module(nullptr),
+ m_int_handler(*this),
+ m_romdis_handler(*this),
+ m_ramdis_handler(*this),
+ m_ctrl1_handler(*this),
+ m_ctrl2_handler(*this)
+{
+}
+
+//-------------------------------------------------
+// svi_expander_device - destructor
+//-------------------------------------------------
+
+svi_expander_device::~svi_expander_device()
+{
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void svi_expander_device::device_start()
+{
+ // get inserted module
+ m_module = dynamic_cast<device_svi_expander_interface *>(get_card_device());
+
+ // resolve callbacks
+ m_int_handler.resolve_safe();
+ m_romdis_handler.resolve_safe();
+ m_ramdis_handler.resolve_safe();
+ m_ctrl1_handler.resolve_safe();
+ m_ctrl2_handler.resolve_safe();
+}
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void svi_expander_device::device_reset()
+{
+}
+
+//-------------------------------------------------
+// host to module interface
+//-------------------------------------------------
+
+READ8_MEMBER( svi_expander_device::mreq_r )
+{
+ if (m_module)
+ return m_module->mreq_r(space, offset);
+
+ return 0xff;
+}
+
+WRITE8_MEMBER( svi_expander_device::mreq_w )
+{
+ if (m_module)
+ m_module->mreq_w(space, offset, data);
+}
+
+READ8_MEMBER( svi_expander_device::iorq_r )
+{
+ if (m_module)
+ return m_module->iorq_r(space, offset);
+
+ return 0xff;
+}
+
+WRITE8_MEMBER( svi_expander_device::iorq_w )
+{
+ if (m_module)
+ m_module->iorq_w(space, offset, data);
+}
+
+WRITE_LINE_MEMBER( svi_expander_device::bk21_w )
+{
+ if (m_module)
+ m_module->bk21_w(state);
+}
+
+WRITE_LINE_MEMBER( svi_expander_device::bk22_w )
+{
+ if (m_module)
+ m_module->bk22_w(state);
+}
+
+WRITE_LINE_MEMBER( svi_expander_device::bk31_w )
+{
+ if (m_module)
+ m_module->bk31_w(state);
+}
+
+WRITE_LINE_MEMBER( svi_expander_device::bk32_w )
+{
+ if (m_module)
+ m_module->bk32_w(state);
+}
+
+
+//**************************************************************************
+// CARTRIDGE INTERFACE
+//**************************************************************************
+
+//-------------------------------------------------
+// device_svi_expander_interface - constructor
+//-------------------------------------------------
+
+device_svi_expander_interface::device_svi_expander_interface(const machine_config &mconfig, device_t &device) :
+ device_slot_card_interface(mconfig, device)
+{
+ m_expander = dynamic_cast<svi_expander_device *>(device.owner());
+}
+
+//-------------------------------------------------
+// ~device_expansion_interface - destructor
+//-------------------------------------------------
+
+device_svi_expander_interface::~device_svi_expander_interface()
+{
+}
diff --git a/src/devices/bus/svi3x8/expander/expander.h b/src/devices/bus/svi3x8/expander/expander.h
new file mode 100644
index 00000000000..a2bed1f609b
--- /dev/null
+++ b/src/devices/bus/svi3x8/expander/expander.h
@@ -0,0 +1,162 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SVI 318/328 Expander Slot
+
+ 50-pin slot
+
+ 1 +5V 2 /CNTRL2
+ 3 +12V 4 -12V
+ 5 /CNTRL1 6 /WAIT
+ 7 /RST 8 CPUCLK
+ 9 A15 10 A14
+ 11 A13 12 A12
+ 13 A11 14 A10
+ 15 A9 16 A8
+ 17 A7 18 A6
+ 19 A5 20 A4
+ 21 A3 22 A2
+ 23 A1 24 A0
+ 25 /RFSH 26 /EXCSR
+ 27 /M1 28 /EXCSW
+ 29 /WR 30 /MREQ
+ 31 /IORQ 32 /RD
+ 33 D0 34 D1
+ 35 D2 36 D3
+ 37 D4 38 D5
+ 39 D6 40 D7
+ 41 CSOUND 42 /INT
+ 43 /RAMDIS 44 /ROMDIS
+ 45 /BK32 46 /BK31
+ 47 /BK22 48 /BK21
+ 49 GND 50 GND
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __SVI3X8_EXPANDER_H__
+#define __SVI3X8_EXPANDER_H__
+
+#include "emu.h"
+
+
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_SVI_EXPANDER_BUS_ADD(_tag) \
+ MCFG_DEVICE_ADD(_tag, SVI_EXPANDER, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(svi_expander_modules, NULL, false) \
+
+#define MCFG_SVI_EXPANDER_INT_HANDLER(_devcb) \
+ devcb = &svi_expander_device::set_int_handler(*device, DEVCB_##_devcb);
+
+#define MCFG_SVI_EXPANDER_ROMDIS_HANDLER(_devcb) \
+ devcb = &svi_expander_device::set_romdis_handler(*device, DEVCB_##_devcb);
+
+#define MCFG_SVI_EXPANDER_RAMDIS_HANDLER(_devcb) \
+ devcb = &svi_expander_device::set_ramdis_handler(*device, DEVCB_##_devcb);
+
+#define MCFG_SVI_EXPANDER_CTRL1_HANDLER(_devcb) \
+ devcb = &svi_expander_device::set_ctrl1_handler(*device, DEVCB_##_devcb);
+
+#define MCFG_SVI_EXPANDER_CTRL2_HANDLER(_devcb) \
+ devcb = &svi_expander_device::set_ctrl2_handler(*device, DEVCB_##_devcb);
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+class device_svi_expander_interface;
+
+// ======================> svi_expander_device
+
+class svi_expander_device : public device_t, public device_slot_interface
+{
+public:
+ // construction/destruction
+ svi_expander_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ virtual ~svi_expander_device();
+
+ // callbacks
+ template<class _Object> static devcb_base &set_int_handler(device_t &device, _Object object)
+ { return downcast<svi_expander_device &>(device).m_int_handler.set_callback(object); }
+
+ template<class _Object> static devcb_base &set_romdis_handler(device_t &device, _Object object)
+ { return downcast<svi_expander_device &>(device).m_romdis_handler.set_callback(object); }
+
+ template<class _Object> static devcb_base &set_ramdis_handler(device_t &device, _Object object)
+ { return downcast<svi_expander_device &>(device).m_ramdis_handler.set_callback(object); }
+
+ template<class _Object> static devcb_base &set_ctrl1_handler(device_t &device, _Object object)
+ { return downcast<svi_expander_device &>(device).m_ctrl1_handler.set_callback(object); }
+
+ template<class _Object> static devcb_base &set_ctrl2_handler(device_t &device, _Object object)
+ { return downcast<svi_expander_device &>(device).m_ctrl2_handler.set_callback(object); }
+
+ // called from cart device
+ DECLARE_WRITE_LINE_MEMBER( int_w ) { m_int_handler(state); }
+ DECLARE_WRITE_LINE_MEMBER( romdis_w ) { m_romdis_handler(state); }
+ DECLARE_WRITE_LINE_MEMBER( ramdis_w ) { m_ramdis_handler(state); }
+ DECLARE_WRITE_LINE_MEMBER( ctrl1_w ) { m_ctrl1_handler(state); }
+ DECLARE_WRITE_LINE_MEMBER( ctrl2_w ) { m_ctrl2_handler(state); }
+
+ // called from host
+ DECLARE_READ8_MEMBER( mreq_r );
+ DECLARE_WRITE8_MEMBER( mreq_w );
+ DECLARE_READ8_MEMBER( iorq_r );
+ DECLARE_WRITE8_MEMBER( iorq_w );
+
+ DECLARE_WRITE_LINE_MEMBER( bk21_w );
+ DECLARE_WRITE_LINE_MEMBER( bk22_w );
+ DECLARE_WRITE_LINE_MEMBER( bk31_w );
+ DECLARE_WRITE_LINE_MEMBER( bk32_w );
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+private:
+ device_svi_expander_interface *m_module;
+
+ devcb_write_line m_int_handler;
+ devcb_write_line m_romdis_handler;
+ devcb_write_line m_ramdis_handler;
+ devcb_write_line m_ctrl1_handler;
+ devcb_write_line m_ctrl2_handler;
+};
+
+// ======================> device_svi_expander_interface
+
+class device_svi_expander_interface : public device_slot_card_interface
+{
+public:
+ // construction/destruction
+ device_svi_expander_interface(const machine_config &mconfig, device_t &device);
+ virtual ~device_svi_expander_interface();
+
+ virtual DECLARE_READ8_MEMBER( mreq_r ) { return 0xff; };
+ virtual DECLARE_WRITE8_MEMBER( mreq_w ){};
+ virtual DECLARE_READ8_MEMBER( iorq_r ) { return 0xff; };
+ virtual DECLARE_WRITE8_MEMBER( iorq_w ){};
+
+ virtual void bk21_w(int state) {};
+ virtual void bk22_w(int state) {};
+ virtual void bk31_w(int state) {};
+ virtual void bk32_w(int state) {};
+
+protected:
+ svi_expander_device *m_expander;
+};
+
+// device type definition
+extern const device_type SVI_EXPANDER;
+
+// include here so drivers don't need to
+#include "modules.h"
+
+#endif // __SVI3X8_EXPANDER_H__
diff --git a/src/devices/bus/svi3x8/expander/modules.cpp b/src/devices/bus/svi3x8/expander/modules.cpp
new file mode 100644
index 00000000000..f613dcf4094
--- /dev/null
+++ b/src/devices/bus/svi3x8/expander/modules.cpp
@@ -0,0 +1,13 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SVI 318/328 Expander Bus Modules
+
+***************************************************************************/
+
+#include "modules.h"
+
+SLOT_INTERFACE_START( svi_expander_modules )
+ SLOT_INTERFACE("sv601", SV601)
+SLOT_INTERFACE_END
diff --git a/src/devices/bus/svi3x8/expander/modules.h b/src/devices/bus/svi3x8/expander/modules.h
new file mode 100644
index 00000000000..953b7094935
--- /dev/null
+++ b/src/devices/bus/svi3x8/expander/modules.h
@@ -0,0 +1,19 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SVI 318/328 Expander Bus Modules
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __SVI_EXPANDER_MODULES_H__
+#define __SVI_EXPANDER_MODULES_H__
+
+#include "emu.h"
+#include "sv601.h"
+
+SLOT_INTERFACE_EXTERN( svi_expander_modules );
+
+#endif // __SVI_EXPANDER_MODULES_H__
diff --git a/src/devices/bus/svi3x8/expander/sv601.cpp b/src/devices/bus/svi3x8/expander/sv601.cpp
new file mode 100644
index 00000000000..fadb45f9a26
--- /dev/null
+++ b/src/devices/bus/svi3x8/expander/sv601.cpp
@@ -0,0 +1,98 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SV-601 Super Expander for SVI-318/328
+
+***************************************************************************/
+
+#include "sv601.h"
+
+
+//**************************************************************************
+// CONSTANTS/MACROS
+//**************************************************************************
+
+#define VERBOSE 0
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type SV601 = &device_creator<sv601_device>;
+
+//-------------------------------------------------
+// machine_config_additions - device-specific
+// machine configurations
+//-------------------------------------------------
+
+static MACHINE_CONFIG_FRAGMENT( sv601 )
+ MCFG_SVI_SLOT_BUS_ADD
+ MCFG_SVI_SLOT_INT_HANDLER(WRITELINE(sv601_device, int_w))
+ MCFG_SVI_SLOT_ROMDIS_HANDLER(WRITELINE(sv601_device, romdis_w))
+ MCFG_SVI_SLOT_RAMDIS_HANDLER(WRITELINE(sv601_device, ramdis_w))
+ MCFG_SVI_SLOT_ADD("0", NULL)
+ MCFG_SVI_SLOT_ADD("1", NULL)
+ MCFG_SVI_SLOT_ADD("2", NULL)
+ MCFG_SVI_SLOT_ADD("3", NULL)
+ MCFG_SVI_SLOT_ADD("4", NULL)
+ MCFG_SVI_SLOT_ADD("5", NULL)
+ MCFG_SVI_SLOT_ADD("6", NULL)
+MACHINE_CONFIG_END
+
+machine_config_constructor sv601_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME( sv601 );
+}
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// sv601_device - constructor
+//-------------------------------------------------
+
+sv601_device::sv601_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, SV601, "SV-601 Super Expander", tag, owner, clock, "sv601", __FILE__),
+ device_svi_expander_interface(mconfig, *this),
+ m_slotbus(*this, "slotbus")
+{
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void sv601_device::device_start()
+{
+}
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void sv601_device::device_reset()
+{
+}
+
+
+//**************************************************************************
+// IMPLEMENTATION
+//**************************************************************************
+
+WRITE_LINE_MEMBER( sv601_device::int_w ) { m_expander->int_w(state); }
+WRITE_LINE_MEMBER( sv601_device::romdis_w ) { m_expander->romdis_w(state); }
+WRITE_LINE_MEMBER( sv601_device::ramdis_w ) { m_expander->ramdis_w(state); }
+
+READ8_MEMBER( sv601_device::mreq_r ) { return m_slotbus->mreq_r(space, offset); }
+WRITE8_MEMBER( sv601_device::mreq_w ) { m_slotbus->mreq_w(space, offset, data); }
+READ8_MEMBER( sv601_device::iorq_r ) { return m_slotbus->iorq_r(space, offset); }
+WRITE8_MEMBER( sv601_device::iorq_w ) { m_slotbus->iorq_w(space, offset, data); }
+
+void sv601_device::bk21_w(int state) { m_slotbus->bk21_w(state); }
+void sv601_device::bk22_w(int state) { m_slotbus->bk22_w(state); }
+void sv601_device::bk31_w(int state) { m_slotbus->bk31_w(state); }
+void sv601_device::bk32_w(int state) { m_slotbus->bk32_w(state); }
diff --git a/src/devices/bus/svi3x8/expander/sv601.h b/src/devices/bus/svi3x8/expander/sv601.h
new file mode 100644
index 00000000000..bf1133cfedb
--- /dev/null
+++ b/src/devices/bus/svi3x8/expander/sv601.h
@@ -0,0 +1,59 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SV-601 Super Expander for SVI-318/328
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __SVI3X8_EXPANDER_SV601_H__
+#define __SVI3X8_EXPANDER_SV601_H__
+
+#include "emu.h"
+#include "expander.h"
+#include "bus/svi3x8/slot/slot.h"
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> sv601_device
+
+class sv601_device : public device_t, public device_svi_expander_interface
+{
+public:
+ // construction/destruction
+ sv601_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // from slots
+ WRITE_LINE_MEMBER( int_w );
+ WRITE_LINE_MEMBER( romdis_w );
+ WRITE_LINE_MEMBER( ramdis_w );
+
+ // from host
+ virtual DECLARE_READ8_MEMBER( mreq_r ) override;
+ virtual DECLARE_WRITE8_MEMBER( mreq_w ) override;
+ virtual DECLARE_READ8_MEMBER( iorq_r ) override;
+ virtual DECLARE_WRITE8_MEMBER( iorq_w ) override;
+
+ virtual void bk21_w(int state) override;
+ virtual void bk22_w(int state) override;
+ virtual void bk31_w(int state) override;
+ virtual void bk32_w(int state) override;
+
+protected:
+ virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+private:
+ required_device<svi_slot_bus_device> m_slotbus;
+};
+
+// device type definition
+extern const device_type SV601;
+
+#endif // __SVI3X8_EXPANDER_SV601_H__
diff --git a/src/devices/bus/svi3x8/slot/cards.cpp b/src/devices/bus/svi3x8/slot/cards.cpp
new file mode 100644
index 00000000000..8e60b1ae1d8
--- /dev/null
+++ b/src/devices/bus/svi3x8/slot/cards.cpp
@@ -0,0 +1,16 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SVI 318/328 Slot Cards
+
+***************************************************************************/
+
+#include "cards.h"
+
+SLOT_INTERFACE_START( svi_slot_cards )
+ SLOT_INTERFACE("sv801", SV801)
+ SLOT_INTERFACE("sv803", SV803)
+ SLOT_INTERFACE("sv806", SV806)
+ SLOT_INTERFACE("sv807", SV807)
+SLOT_INTERFACE_END
diff --git a/src/devices/bus/svi3x8/slot/cards.h b/src/devices/bus/svi3x8/slot/cards.h
new file mode 100644
index 00000000000..03492742e53
--- /dev/null
+++ b/src/devices/bus/svi3x8/slot/cards.h
@@ -0,0 +1,22 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SVI 318/328 Slot Cards
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __SVI3X8_SLOT_CARDS_H__
+#define __SVI3X8_SLOT_CARDS_H__
+
+#include "emu.h"
+#include "sv801.h"
+#include "sv803.h"
+#include "sv806.h"
+#include "sv807.h"
+
+SLOT_INTERFACE_EXTERN( svi_slot_cards );
+
+#endif // __SVI3X8_SLOT_CARDS_H__
diff --git a/src/devices/bus/svi3x8/slot/slot.cpp b/src/devices/bus/svi3x8/slot/slot.cpp
new file mode 100644
index 00000000000..5ab951e18f1
--- /dev/null
+++ b/src/devices/bus/svi3x8/slot/slot.cpp
@@ -0,0 +1,284 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SVI 318/328 Expansion Slot
+
+***************************************************************************/
+
+#include "slot.h"
+
+
+//**************************************************************************
+// SLOT BUS DEVICE
+//**************************************************************************
+
+const device_type SVI_SLOT_BUS = &device_creator<svi_slot_bus_device>;
+
+//-------------------------------------------------
+// svi_slot_bus_device - constructor
+//-------------------------------------------------
+
+svi_slot_bus_device::svi_slot_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, SVI_SLOT_BUS, "SVI Slot Bus", tag, owner, clock, "svislotbus", __FILE__),
+ m_int_handler(*this),
+ m_romdis_handler(*this),
+ m_ramdis_handler(*this)
+{
+}
+
+//-------------------------------------------------
+// svi_slot_bus_device - destructor
+//-------------------------------------------------
+
+svi_slot_bus_device::~svi_slot_bus_device()
+{
+ m_dev.detach_all();
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void svi_slot_bus_device::device_start()
+{
+ // resolve callbacks
+ m_int_handler.resolve_safe();
+ m_romdis_handler.resolve_safe();
+ m_ramdis_handler.resolve_safe();
+}
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void svi_slot_bus_device::device_reset()
+{
+}
+
+//-------------------------------------------------
+// add_card - add new card to our bus
+//-------------------------------------------------
+
+void svi_slot_bus_device::add_card(device_svi_slot_interface *card)
+{
+ card->set_bus_device(this);
+ m_dev.append(*card);
+}
+
+//-------------------------------------------------
+// mreq_r - memory read from slot
+//-------------------------------------------------
+
+READ8_MEMBER( svi_slot_bus_device::mreq_r )
+{
+ device_svi_slot_interface *entry = m_dev.first();
+ UINT8 data = 0xff;
+
+ romdis_w(1);
+ ramdis_w(1);
+
+ while (entry)
+ {
+ data &= entry->mreq_r(space, offset);
+ entry = entry->next();
+ }
+
+ return data;
+}
+
+//-------------------------------------------------
+// mreq_w - memory write to slot
+//-------------------------------------------------
+
+WRITE8_MEMBER( svi_slot_bus_device::mreq_w )
+{
+ device_svi_slot_interface *entry = m_dev.first();
+
+ romdis_w(1);
+ ramdis_w(1);
+
+ while (entry)
+ {
+ entry->mreq_w(space, offset, data);
+ entry = entry->next();
+ }
+}
+
+//-------------------------------------------------
+// iorq_r - memory read from slot
+//-------------------------------------------------
+
+READ8_MEMBER( svi_slot_bus_device::iorq_r )
+{
+ device_svi_slot_interface *entry = m_dev.first();
+ UINT8 data = 0xff;
+
+ while (entry)
+ {
+ data &= entry->iorq_r(space, offset);
+ entry = entry->next();
+ }
+
+ return data;
+}
+
+//-------------------------------------------------
+// iorq_w - memory write to slot
+//-------------------------------------------------
+
+WRITE8_MEMBER( svi_slot_bus_device::iorq_w )
+{
+ device_svi_slot_interface *entry = m_dev.first();
+
+ while (entry)
+ {
+ entry->iorq_w(space, offset, data);
+ entry = entry->next();
+ }
+}
+
+//-------------------------------------------------
+// bk21_w - signal from host to slots
+//-------------------------------------------------
+
+WRITE_LINE_MEMBER( svi_slot_bus_device::bk21_w )
+{
+ device_svi_slot_interface *entry = m_dev.first();
+
+ while (entry)
+ {
+ entry->bk21_w(state);
+ entry = entry->next();
+ }
+}
+
+//-------------------------------------------------
+// bk22_w - signal from host to slots
+//-------------------------------------------------
+
+WRITE_LINE_MEMBER( svi_slot_bus_device::bk22_w )
+{
+ device_svi_slot_interface *entry = m_dev.first();
+
+ while (entry)
+ {
+ entry->bk22_w(state);
+ entry = entry->next();
+ }
+}
+
+//-------------------------------------------------
+// bk31_w - signal from host to slots
+//-------------------------------------------------
+
+WRITE_LINE_MEMBER( svi_slot_bus_device::bk31_w )
+{
+ device_svi_slot_interface *entry = m_dev.first();
+
+ while (entry)
+ {
+ entry->bk31_w(state);
+ entry = entry->next();
+ }
+}
+
+//-------------------------------------------------
+// bk32_w - signal from host to slots
+//-------------------------------------------------
+
+WRITE_LINE_MEMBER( svi_slot_bus_device::bk32_w )
+{
+ device_svi_slot_interface *entry = m_dev.first();
+
+ while (entry)
+ {
+ entry->bk32_w(state);
+ entry = entry->next();
+ }
+}
+
+
+//**************************************************************************
+// SVI SLOT DEVICE
+//**************************************************************************
+
+const device_type SVI_SLOT = &device_creator<svi_slot_device>;
+
+//-------------------------------------------------
+// svi_slot_device - constructor
+//-------------------------------------------------
+
+svi_slot_device::svi_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, SVI_SLOT, "SVI Slot", tag, owner, clock, "svislot", __FILE__),
+ device_slot_interface(mconfig, *this),
+ m_bus_tag(nullptr)
+{
+}
+
+//-------------------------------------------------
+// set_bus - set owner bus tag
+//-------------------------------------------------
+
+void svi_slot_device::set_bus(device_t &device, device_t *owner, const char *bus_tag)
+{
+ svi_slot_device &card = dynamic_cast<svi_slot_device &>(device);
+ card.m_owner = owner;
+ card.m_bus_tag = bus_tag;
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void svi_slot_device::device_start()
+{
+ device_svi_slot_interface *dev = dynamic_cast<device_svi_slot_interface *>(get_card_device());
+
+ if (dev)
+ {
+ svi_slot_bus_device *bus = downcast<svi_slot_bus_device *>(m_owner->subdevice(m_bus_tag));
+ bus->add_card(dev);
+ }
+}
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void svi_slot_device::device_reset()
+{
+}
+
+
+//**************************************************************************
+// CARD INTERFACE
+//**************************************************************************
+
+//-------------------------------------------------
+// device_svi_slot_interface - constructor
+//-------------------------------------------------
+
+device_svi_slot_interface::device_svi_slot_interface(const machine_config &mconfig, device_t &device) :
+ device_slot_card_interface(mconfig, device),
+ m_next(nullptr),
+ m_bus(nullptr)
+{
+}
+
+//-------------------------------------------------
+// ~device_svi_slot_interface - destructor
+//-------------------------------------------------
+
+device_svi_slot_interface::~device_svi_slot_interface()
+{
+}
+
+//-------------------------------------------------
+// set_bus_device - set bus we are attached to
+//-------------------------------------------------
+
+void device_svi_slot_interface::set_bus_device(svi_slot_bus_device *bus)
+{
+ m_bus = bus;
+}
diff --git a/src/devices/bus/svi3x8/slot/slot.h b/src/devices/bus/svi3x8/slot/slot.h
new file mode 100644
index 00000000000..6cea923f6f6
--- /dev/null
+++ b/src/devices/bus/svi3x8/slot/slot.h
@@ -0,0 +1,178 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SVI 318/328 Expansion Slot
+
+ 50-pin slot
+
+ 1 +5V 2 +5V
+ 3 +12V 4 -12V
+ 5 GND 6 /WAIT
+ 7 /RST 8 CPUCLK
+ 9 A15 10 A14
+ 11 A13 12 A12
+ 13 A11 14 A10
+ 15 A9 16 A8
+ 17 A7 18 A6
+ 19 A5 20 A4
+ 21 A3 22 A2
+ 23 A1 24 A0
+ 25 /RFSH 26 GND
+ 27 /M1 28 GND
+ 29 /WR 30 /MREQ
+ 31 /IORQ 32 /RD
+ 33 D0 34 D1
+ 35 D2 36 D3
+ 37 D4 38 D5
+ 39 D6 40 D7
+ 41 CSOUND 42 /INT
+ 43 /RAMDIS 44 /ROMDIS
+ 45 /BK32 46 /BK31
+ 47 /BK22 48 /BK21
+ 49 GND 50 GND
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __SVI3X8_SLOT_H__
+#define __SVI3X8_SLOT_H__
+
+#include "emu.h"
+
+
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_SVI_SLOT_BUS_ADD \
+ MCFG_DEVICE_ADD("slotbus", SVI_SLOT_BUS, 0)
+
+#define MCFG_SVI_SLOT_ADD(_tag, _def_slot) \
+ MCFG_DEVICE_ADD(_tag, SVI_SLOT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(svi_slot_cards, _def_slot, false) \
+ svi_slot_device::set_bus(*device, owner, "slotbus");
+
+#define MCFG_SVI_SLOT_INT_HANDLER(_devcb) \
+ devcb = &svi_slot_bus_device::set_int_handler(*device, DEVCB_##_devcb);
+
+#define MCFG_SVI_SLOT_ROMDIS_HANDLER(_devcb) \
+ devcb = &svi_slot_bus_device::set_romdis_handler(*device, DEVCB_##_devcb);
+
+#define MCFG_SVI_SLOT_RAMDIS_HANDLER(_devcb) \
+ devcb = &svi_slot_bus_device::set_ramdis_handler(*device, DEVCB_##_devcb);
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+class device_svi_slot_interface;
+
+// ======================> svi_slot_bus_device
+
+class svi_slot_bus_device : public device_t
+{
+public:
+ // construction/destruction
+ svi_slot_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ virtual ~svi_slot_bus_device();
+
+ // callbacks
+ template<class _Object> static devcb_base &set_int_handler(device_t &device, _Object object)
+ { return downcast<svi_slot_bus_device &>(device).m_int_handler.set_callback(object); }
+
+ template<class _Object> static devcb_base &set_romdis_handler(device_t &device, _Object object)
+ { return downcast<svi_slot_bus_device &>(device).m_romdis_handler.set_callback(object); }
+
+ template<class _Object> static devcb_base &set_ramdis_handler(device_t &device, _Object object)
+ { return downcast<svi_slot_bus_device &>(device).m_ramdis_handler.set_callback(object); }
+
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ void add_card(device_svi_slot_interface *card);
+
+ // from slot
+ DECLARE_WRITE_LINE_MEMBER( romdis_w ) { m_romdis_handler(state); };
+ DECLARE_WRITE_LINE_MEMBER( ramdis_w ) { m_ramdis_handler(state); };
+
+ // from host
+ DECLARE_READ8_MEMBER( mreq_r );
+ DECLARE_WRITE8_MEMBER( mreq_w );
+ DECLARE_READ8_MEMBER( iorq_r );
+ DECLARE_WRITE8_MEMBER( iorq_w );
+
+ DECLARE_WRITE_LINE_MEMBER( bk21_w );
+ DECLARE_WRITE_LINE_MEMBER( bk22_w );
+ DECLARE_WRITE_LINE_MEMBER( bk31_w );
+ DECLARE_WRITE_LINE_MEMBER( bk32_w );
+
+private:
+ simple_list<device_svi_slot_interface> m_dev;
+
+ devcb_write_line m_int_handler;
+ devcb_write_line m_romdis_handler;
+ devcb_write_line m_ramdis_handler;
+};
+
+// device type definition
+extern const device_type SVI_SLOT_BUS;
+
+// ======================> svi_slot_device
+
+class svi_slot_device : public device_t, public device_slot_interface
+{
+public:
+ // construction/destruction
+ svi_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // inline configuration
+ static void set_bus(device_t &device, device_t *owner, const char *bus_tag);
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ // configuration
+ const char *m_bus_tag;
+};
+
+// device type definition
+extern const device_type SVI_SLOT;
+
+// ======================> svi_slot_device
+
+class device_svi_slot_interface : public device_slot_card_interface
+{
+public:
+ // construction/destruction
+ device_svi_slot_interface(const machine_config &mconfig, device_t &device);
+ virtual ~device_svi_slot_interface();
+
+ void set_bus_device(svi_slot_bus_device *bus);
+
+ device_svi_slot_interface *next() const { return m_next; }
+ device_svi_slot_interface *m_next;
+
+ virtual DECLARE_READ8_MEMBER( mreq_r ) { return 0xff; };
+ virtual DECLARE_WRITE8_MEMBER( mreq_w ) {};
+ virtual DECLARE_READ8_MEMBER( iorq_r ) { return 0xff; };
+ virtual DECLARE_WRITE8_MEMBER( iorq_w ) {};
+
+ virtual DECLARE_WRITE_LINE_MEMBER( bk21_w ) {};
+ virtual DECLARE_WRITE_LINE_MEMBER( bk22_w ) {};
+ virtual DECLARE_WRITE_LINE_MEMBER( bk31_w ) {};
+ virtual DECLARE_WRITE_LINE_MEMBER( bk32_w ) {};
+
+protected:
+ svi_slot_bus_device *m_bus;
+};
+
+// include here so drivers don't need to
+#include "cards.h"
+
+#endif // __SVI3X8_SLOT_H__
diff --git a/src/devices/bus/svi3x8/slot/sv801.cpp b/src/devices/bus/svi3x8/slot/sv801.cpp
new file mode 100644
index 00000000000..544c68e2988
--- /dev/null
+++ b/src/devices/bus/svi3x8/slot/sv801.cpp
@@ -0,0 +1,144 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SV-801 Disk Controller
+
+***************************************************************************/
+
+#include "sv801.h"
+#include "softlist.h"
+#include "formats/svi_dsk.h"
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type SV801 = &device_creator<sv801_device>;
+
+//-------------------------------------------------
+// machine_config_additions - device-specific
+// machine configurations
+//-------------------------------------------------
+
+FLOPPY_FORMATS_MEMBER( sv801_device::floppy_formats )
+ FLOPPY_SVI_FORMAT
+FLOPPY_FORMATS_END
+
+static SLOT_INTERFACE_START( svi_floppies )
+ SLOT_INTERFACE("dd", FLOPPY_525_DD)
+SLOT_INTERFACE_END
+
+static MACHINE_CONFIG_FRAGMENT( sv801 )
+ MCFG_FD1793_ADD("fdc", XTAL_1MHz)
+ MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(sv801_device, intrq_w))
+ MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(sv801_device, drq_w))
+
+ MCFG_FLOPPY_DRIVE_ADD("fdc:0", svi_floppies, "dd", sv801_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:1", svi_floppies, "dd", sv801_device::floppy_formats)
+
+ MCFG_SOFTWARE_LIST_ADD("disk_list", "svi318_flop")
+MACHINE_CONFIG_END
+
+machine_config_constructor sv801_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME( sv801 );
+}
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// sv801_device - constructor
+//-------------------------------------------------
+
+sv801_device::sv801_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, SV801, "SV-801 Disk Controller", tag, owner, clock, "sv801", __FILE__),
+ device_svi_slot_interface(mconfig, *this),
+ m_fdc(*this, "fdc"),
+ m_floppy0(*this, "fdc:0"),
+ m_floppy1(*this, "fdc:1"),
+ m_floppy(nullptr),
+ m_irq(0), m_drq(0)
+{
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void sv801_device::device_start()
+{
+}
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void sv801_device::device_reset()
+{
+}
+
+
+//**************************************************************************
+// IMPLEMENTATION
+//**************************************************************************
+
+WRITE_LINE_MEMBER( sv801_device::intrq_w )
+{
+ m_irq = state;
+}
+
+WRITE_LINE_MEMBER( sv801_device::drq_w )
+{
+ m_drq = state;
+}
+
+WRITE8_MEMBER( sv801_device::motor_w )
+{
+ m_floppy = nullptr;
+
+ if (BIT(data, 0)) m_floppy = m_floppy0->get_device();
+ if (BIT(data, 1)) m_floppy = m_floppy1->get_device();
+
+ m_fdc->set_floppy(m_floppy);
+
+ if (m_floppy0->get_device())
+ m_floppy0->get_device()->mon_w(!BIT(data, 2));
+ if (m_floppy1->get_device())
+ m_floppy1->get_device()->mon_w(!BIT(data, 3));
+}
+
+READ8_MEMBER( sv801_device::iorq_r )
+{
+ switch (offset)
+ {
+ case 0x30: return m_fdc->status_r(space, 0);
+ case 0x31: return m_fdc->track_r(space, 0);
+ case 0x32: return m_fdc->sector_r(space, 0);
+ case 0x33: return m_fdc->data_r(space, 0);
+ case 0x34: return (m_drq << 6) | (m_irq << 7);
+ }
+
+ return 0xff;
+}
+
+WRITE8_MEMBER( sv801_device::iorq_w )
+{
+ switch (offset)
+ {
+ case 0x30: m_fdc->cmd_w(space, 0, data); break;
+ case 0x31: m_fdc->track_w(space, 0, data); break;
+ case 0x32: m_fdc->sector_w(space, 0, data); break;
+ case 0x33: m_fdc->data_w(space, 0, data); break;
+ case 0x34: motor_w(space, 0, data); break;
+ case 0x38:
+ m_fdc->dden_w(BIT(data, 0));
+ if (m_floppy)
+ m_floppy->ss_w(BIT(data, 1));
+ break;
+ }
+}
diff --git a/src/devices/bus/svi3x8/slot/sv801.h b/src/devices/bus/svi3x8/slot/sv801.h
new file mode 100644
index 00000000000..2f670f05ad1
--- /dev/null
+++ b/src/devices/bus/svi3x8/slot/sv801.h
@@ -0,0 +1,61 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SV-801 Disk Controller
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __SVI3X8_SLOT_SV801_H__
+#define __SVI3X8_SLOT_SV801_H__
+
+#include "emu.h"
+#include "slot.h"
+#include "machine/wd_fdc.h"
+#include "imagedev/floppy.h"
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> sv801_device
+
+class sv801_device : public device_t, public device_svi_slot_interface
+{
+public:
+ // construction/destruction
+ sv801_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ DECLARE_FLOPPY_FORMATS(floppy_formats);
+
+ virtual DECLARE_READ8_MEMBER( iorq_r ) override;
+ virtual DECLARE_WRITE8_MEMBER( iorq_w ) override;
+
+ DECLARE_WRITE_LINE_MEMBER( intrq_w );
+ DECLARE_WRITE_LINE_MEMBER( drq_w );
+
+protected:
+ virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+private:
+ DECLARE_WRITE8_MEMBER( motor_w );
+
+ required_device<fd1793_t> m_fdc;
+ required_device<floppy_connector> m_floppy0;
+ required_device<floppy_connector> m_floppy1;
+
+ floppy_image_device *m_floppy;
+
+ int m_irq;
+ int m_drq;
+};
+
+// device type definition
+extern const device_type SV801;
+
+#endif // __SVI3X8_SLOT_SV801_H__
diff --git a/src/devices/bus/svi3x8/slot/sv803.cpp b/src/devices/bus/svi3x8/slot/sv803.cpp
new file mode 100644
index 00000000000..7035efeaa7a
--- /dev/null
+++ b/src/devices/bus/svi3x8/slot/sv803.cpp
@@ -0,0 +1,68 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SV-803 16k memory expansion for SVI-318
+
+***************************************************************************/
+
+#include "sv803.h"
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type SV803 = &device_creator<sv803_device>;
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// sv803_device - constructor
+//-------------------------------------------------
+
+sv803_device::sv803_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, SV803, "SV-803 16k RAM Cartridge", tag, owner, clock, "sv803", __FILE__),
+ device_svi_slot_interface(mconfig, *this)
+{
+ m_ram = std::make_unique<UINT8[]>(0x4000);
+ memset(m_ram.get(), 0xff, 0x4000);
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void sv803_device::device_start()
+{
+}
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void sv803_device::device_reset()
+{
+}
+
+
+//**************************************************************************
+// IMPLEMENTATION
+//**************************************************************************
+
+READ8_MEMBER( sv803_device::mreq_r )
+{
+ if (offset >= 0x8000 && offset <= 0xbfff)
+ return m_ram[offset - 0x8000];
+
+ return 0xff;
+}
+
+WRITE8_MEMBER( sv803_device::mreq_w )
+{
+ if (offset >= 0x8000 && offset <= 0xbfff)
+ m_ram[offset - 0x8000] = data;
+}
diff --git a/src/devices/bus/svi3x8/slot/sv803.h b/src/devices/bus/svi3x8/slot/sv803.h
new file mode 100644
index 00000000000..9dea0ea9180
--- /dev/null
+++ b/src/devices/bus/svi3x8/slot/sv803.h
@@ -0,0 +1,44 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SV-803 16k memory expansion for SVI-318
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __SVI3X8_SLOT_SV803_H__
+#define __SVI3X8_SLOT_SV803_H__
+
+#include "emu.h"
+#include "slot.h"
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> sv803_device
+
+class sv803_device : public device_t, public device_svi_slot_interface
+{
+public:
+ // construction/destruction
+ sv803_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ virtual DECLARE_READ8_MEMBER( mreq_r ) override;
+ virtual DECLARE_WRITE8_MEMBER( mreq_w ) override;
+
+protected:
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+private:
+ std::unique_ptr<UINT8[]> m_ram;
+};
+
+// device type definition
+extern const device_type SV803;
+
+#endif // __SVI3X8_SLOT_SV803_H__
diff --git a/src/devices/bus/svi3x8/slot/sv806.cpp b/src/devices/bus/svi3x8/slot/sv806.cpp
new file mode 100644
index 00000000000..3db7d8ee2a7
--- /dev/null
+++ b/src/devices/bus/svi3x8/slot/sv806.cpp
@@ -0,0 +1,150 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SV-806 80 Column Cartridge for SVI-318/328
+
+***************************************************************************/
+
+#include "sv806.h"
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type SV806 = &device_creator<sv806_device>;
+
+//-------------------------------------------------
+// rom_region - device-specific ROM region
+//-------------------------------------------------
+
+ROM_START( sv806 )
+ ROM_REGION(0x1000, "gfx", 0)
+ ROM_SYSTEM_BIOS(0, "en", "English Character Set")
+ ROMX_LOAD("sv806.ic27", 0x0000, 0x1000, CRC(850bc232) SHA1(ed45cb0e9bd18a9d7bd74f87e620f016a7ae840f), ROM_BIOS(1))
+ ROM_SYSTEM_BIOS(1, "se", "Swedish Character Set")
+ ROMX_LOAD("sv806se.ic27", 0x0000, 0x1000, CRC(daea8956) SHA1(3f16d5513ad35692488ae7d864f660e76c6e8ed3), ROM_BIOS(2))
+ROM_END
+
+const rom_entry *sv806_device::device_rom_region() const
+{
+ return ROM_NAME( sv806 );
+}
+
+//-------------------------------------------------
+// machine_config_additions - device-specific
+// machine configurations
+//-------------------------------------------------
+
+static MACHINE_CONFIG_FRAGMENT( sv806 )
+ MCFG_SCREEN_ADD_MONOCHROME("80col", RASTER, rgb_t::green)
+ MCFG_SCREEN_RAW_PARAMS((XTAL_12MHz / 6) * 8, 864, 0, 640, 317, 0, 192)
+ MCFG_SCREEN_UPDATE_DEVICE("crtc", hd6845_device, screen_update)
+
+ MCFG_PALETTE_ADD_MONOCHROME("palette")
+
+ MCFG_MC6845_ADD("crtc", HD6845, "80col", XTAL_12MHz / 6)
+ MCFG_MC6845_SHOW_BORDER_AREA(false)
+ MCFG_MC6845_CHAR_WIDTH(8)
+ MCFG_MC6845_UPDATE_ROW_CB(sv806_device, crtc_update_row)
+MACHINE_CONFIG_END
+
+machine_config_constructor sv806_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME( sv806 );
+}
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// sv806_device - constructor
+//-------------------------------------------------
+
+sv806_device::sv806_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, SV806, "SV-806 80 Column Cartridge", tag, owner, clock, "sv806", __FILE__),
+ device_svi_slot_interface(mconfig, *this),
+ m_crtc(*this, "crtc"),
+ m_palette(*this, "palette"),
+ m_gfx(*this, "gfx"),
+ m_ram_enabled(0)
+{
+ m_ram = std::make_unique<UINT8[]>(0x800);
+ memset(m_ram.get(), 0xff, 0x800);
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void sv806_device::device_start()
+{
+}
+
+
+//**************************************************************************
+// IMPLEMENTATION
+//**************************************************************************
+
+MC6845_UPDATE_ROW( sv806_device::crtc_update_row )
+{
+ const pen_t *pen = m_palette->pens();
+
+ for (int i = 0; i < x_count; i++)
+ {
+ UINT8 data = m_gfx->u8((m_ram[(ma + i) & 0x7ff] << 4) | ra);
+
+ if (i == cursor_x)
+ data = 0xff;
+
+ bitmap.pix32(y, i * 8 + 0) = pen[BIT(data, 7)];
+ bitmap.pix32(y, i * 8 + 1) = pen[BIT(data, 6)];
+ bitmap.pix32(y, i * 8 + 2) = pen[BIT(data, 5)];
+ bitmap.pix32(y, i * 8 + 3) = pen[BIT(data, 4)];
+ bitmap.pix32(y, i * 8 + 4) = pen[BIT(data, 3)];
+ bitmap.pix32(y, i * 8 + 5) = pen[BIT(data, 2)];
+ bitmap.pix32(y, i * 8 + 6) = pen[BIT(data, 1)];
+ bitmap.pix32(y, i * 8 + 7) = pen[BIT(data, 0)];
+ }
+}
+
+READ8_MEMBER( sv806_device::mreq_r )
+{
+ if (offset >= 0xf000 && m_ram_enabled)
+ {
+ m_bus->ramdis_w(0);
+ return m_ram[offset & 0x7ff];
+ }
+
+ return 0xff;
+}
+
+WRITE8_MEMBER( sv806_device::mreq_w )
+{
+ if (offset >= 0xf000 && m_ram_enabled)
+ {
+ m_bus->ramdis_w(0);
+ m_ram[offset & 0x7ff] = data;
+ }
+}
+
+READ8_MEMBER( sv806_device::iorq_r )
+{
+ if (offset == 0x51)
+ return m_crtc->register_r(space, 0);
+
+ return 0xff;
+}
+
+WRITE8_MEMBER( sv806_device::iorq_w )
+{
+ switch (offset)
+ {
+ case 0x50: m_crtc->address_w(space, 0, data); break;
+ case 0x51: m_crtc->register_w(space, 0, data); break;
+ case 0x58: m_ram_enabled = data; break;
+ }
+}
diff --git a/src/devices/bus/svi3x8/slot/sv806.h b/src/devices/bus/svi3x8/slot/sv806.h
new file mode 100644
index 00000000000..4782faa4812
--- /dev/null
+++ b/src/devices/bus/svi3x8/slot/sv806.h
@@ -0,0 +1,55 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SV-806 80 column card for SVI-318/328
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __SVI3X8_SLOT_SV806_H__
+#define __SVI3X8_SLOT_SV806_H__
+
+#include "emu.h"
+#include "slot.h"
+#include "video/mc6845.h"
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> sv806_device
+
+class sv806_device : public device_t, public device_svi_slot_interface
+{
+public:
+ // construction/destruction
+ sv806_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ virtual DECLARE_READ8_MEMBER( mreq_r ) override;
+ virtual DECLARE_WRITE8_MEMBER( mreq_w ) override;
+ virtual DECLARE_READ8_MEMBER( iorq_r ) override;
+ virtual DECLARE_WRITE8_MEMBER( iorq_w ) override;
+
+ MC6845_UPDATE_ROW(crtc_update_row);
+
+protected:
+ virtual const rom_entry *device_rom_region() const override;
+ virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_start() override;
+
+private:
+ required_device<hd6845_device> m_crtc;
+ required_device<palette_device> m_palette;
+ required_memory_region m_gfx;
+
+ std::unique_ptr<UINT8[]> m_ram;
+ int m_ram_enabled;
+};
+
+// device type definition
+extern const device_type SV806;
+
+#endif // __SVI3X8_SLOT_SV806_H__
diff --git a/src/devices/bus/svi3x8/slot/sv807.cpp b/src/devices/bus/svi3x8/slot/sv807.cpp
new file mode 100644
index 00000000000..14cf5001674
--- /dev/null
+++ b/src/devices/bus/svi3x8/slot/sv807.cpp
@@ -0,0 +1,163 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SV-807 64k memory expansion for SVI-318/328
+
+ TODO:
+ - Switch S6 (but needs to be off for the SVI anyway)
+
+***************************************************************************/
+
+#include "sv807.h"
+
+
+//**************************************************************************
+// CONSTANTS / MACROS
+//**************************************************************************
+
+#define BK21_ACTIVE ((m_bk21 == 0) && (m_switch->read() & 0x01))
+#define BK22_ACTIVE ((m_bk22 == 0) && (m_switch->read() & 0x02))
+#define BK31_ACTIVE ((m_bk31 == 0) && (m_switch->read() & 0x04))
+#define BK32_ACTIVE ((m_bk32 == 0) && (m_switch->read() & 0x08))
+#define BK02_ACTIVE (m_switch->read() & 0x10)
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type SV807 = &device_creator<sv807_device>;
+
+//-------------------------------------------------
+// input_ports - device-specific input ports
+//-------------------------------------------------
+
+static INPUT_PORTS_START( sv807_switches )
+ PORT_START("S")
+ PORT_DIPNAME(0x01, 0x00, "Bank/Page 21")
+ PORT_DIPLOCATION("S:1")
+ PORT_DIPSETTING(0x00, "Off")
+ PORT_DIPSETTING(0x01, "On")
+ PORT_DIPNAME(0x02, 0x02, "Bank/Page 22")
+ PORT_DIPLOCATION("S:2")
+ PORT_DIPSETTING(0x00, "Off")
+ PORT_DIPSETTING(0x02, "On")
+ PORT_DIPNAME(0x04, 0x04, "Bank/Page 31")
+ PORT_DIPLOCATION("S:3")
+ PORT_DIPSETTING(0x00, "Off")
+ PORT_DIPSETTING(0x04, "On")
+ PORT_DIPNAME(0x08, 0x00, "Bank/Page 32")
+ PORT_DIPLOCATION("S:4")
+ PORT_DIPSETTING(0x00, "Off")
+ PORT_DIPSETTING(0x08, "On")
+ PORT_DIPNAME(0x10, 0x00, "Bank/Page 02")
+ PORT_DIPLOCATION("S:5")
+ PORT_DIPSETTING(0x00, "Off")
+ PORT_DIPSETTING(0x10, "On")
+ PORT_DIPNAME(0x20, 0x00, "48k/32k")
+ PORT_DIPLOCATION("S:6")
+ PORT_DIPSETTING(0x00, "Off")
+ PORT_DIPSETTING(0x20, "On")
+INPUT_PORTS_END
+
+ioport_constructor sv807_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME( sv807_switches );
+}
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// sv807_device - constructor
+//-------------------------------------------------
+
+sv807_device::sv807_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, SV803, "SV-807 64k RAM Cartridge", tag, owner, clock, "sv807", __FILE__),
+ device_svi_slot_interface(mconfig, *this),
+ m_switch(*this, "S"),
+ m_bk21(1), m_bk22(1), m_bk31(1), m_bk32(1)
+{
+ m_ram_bank1 = std::make_unique<UINT8[]>(0x8000);
+ m_ram_bank2 = std::make_unique<UINT8[]>(0x8000);
+ memset(m_ram_bank1.get(), 0xff, 0x8000);
+ memset(m_ram_bank2.get(), 0xff, 0x8000);
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void sv807_device::device_start()
+{
+}
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void sv807_device::device_reset()
+{
+}
+
+
+//**************************************************************************
+// IMPLEMENTATION
+//**************************************************************************
+
+// test setup: S2 = enabled (22), S3 = enabled (31)
+
+READ8_MEMBER( sv807_device::mreq_r )
+{
+ if ((BK21_ACTIVE || BK31_ACTIVE) && offset < 0x8000)
+ {
+ m_bus->romdis_w(0);
+ return m_ram_bank1[offset];
+ }
+
+ if ((BK22_ACTIVE || BK32_ACTIVE || BK02_ACTIVE) && offset >= 0x8000)
+ {
+ m_bus->ramdis_w(0);
+ return m_ram_bank2[offset - 0x8000];
+ }
+
+ return 0xff;
+}
+
+WRITE8_MEMBER( sv807_device::mreq_w )
+{
+ if ((BK21_ACTIVE || BK31_ACTIVE) && offset < 0x8000)
+ {
+ m_bus->romdis_w(0);
+ m_ram_bank1[offset] = data;
+ }
+
+ if ((BK22_ACTIVE || BK32_ACTIVE || BK02_ACTIVE) && offset >= 0x8000)
+ {
+ m_bus->ramdis_w(0);
+ m_ram_bank2[offset - 0x8000] = data;
+ }
+}
+
+void sv807_device::bk21_w(int state)
+{
+ m_bk21 = state;
+}
+
+void sv807_device::bk22_w(int state)
+{
+ m_bk22 = state;
+}
+
+void sv807_device::bk31_w(int state)
+{
+ m_bk31 = state;
+}
+
+void sv807_device::bk32_w(int state)
+{
+ m_bk32 = state;
+}
diff --git a/src/devices/bus/svi3x8/slot/sv807.h b/src/devices/bus/svi3x8/slot/sv807.h
new file mode 100644
index 00000000000..deebb9bf79e
--- /dev/null
+++ b/src/devices/bus/svi3x8/slot/sv807.h
@@ -0,0 +1,60 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SV-807 64k memory expansion for SVI-318/328
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __SVI3X8_SLOT_SV807_H__
+#define __SVI3X8_SLOT_SV807_H__
+
+#include "emu.h"
+#include "slot.h"
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> sv807_device
+
+class sv807_device : public device_t, public device_svi_slot_interface
+{
+public:
+ // construction/destruction
+ sv807_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // optional information overrides
+ virtual ioport_constructor device_input_ports() const override;
+
+ virtual DECLARE_READ8_MEMBER( mreq_r ) override;
+ virtual DECLARE_WRITE8_MEMBER( mreq_w ) override;
+
+ virtual void bk21_w(int state) override;
+ virtual void bk22_w(int state) override;
+ virtual void bk31_w(int state) override;
+ virtual void bk32_w(int state) override;
+
+protected:
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+private:
+ required_ioport m_switch;
+
+ std::unique_ptr<UINT8[]> m_ram_bank1;
+ std::unique_ptr<UINT8[]> m_ram_bank2;
+
+ int m_bk21;
+ int m_bk22;
+ int m_bk31;
+ int m_bk32;
+};
+
+// device type definition
+extern const device_type SV807;
+
+#endif // __SVI3X8_SLOT_SV807_H__
diff --git a/src/devices/cpu/tms0980/tms0980.cpp b/src/devices/cpu/tms0980/tms0980.cpp
deleted file mode 100644
index 3ea3ca918b1..00000000000
--- a/src/devices/cpu/tms0980/tms0980.cpp
+++ /dev/null
@@ -1,1514 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Wilbert Pol, hap
-/*
-
- TMS0980/TMS1000-family MCU cores
-
- TODO:
- - emulate TMS1600 L-pins
- - fix debugger disasm view
-
-
-The TMS0980 and TMS1000-family MCU cores are very similar. The TMS0980 has a
-slightly bigger addressable area and uses 9bit instructions where the TMS1000
-family uses 8bit instruction. The instruction set themselves are very similar
-though.
-
-Each instruction takes 12 cycles to execute in 2 phases: a fetch phase and an
-execution phase. The execution phase takes place at the same time as the fetch
-phase of the next instruction. So, during execution there are both fetch and
-execution operations taking place. The operation can be split up as follows:
-cycle #0
- - Fetch:
- 1. ROM address 0
- - Execute:
- 1. Read RAM
- 2. Clear ALU inputs
- 3. Execute BRANCH/CALL/RETN part #2
- 4. K input valid
-cycle #1
- - Fetch:
- 1. ROM address 1
- - Execute:
- 1. Update ALU inputs
-cycle #2
- - Fetch:
- 1. nothing/wait(?)
- - Execute:
- 1. Perform ALU operation
- 2. Write RAM
-cycle #3
- - Fetch:
- 1. Fetch/Update PC/RAM address #1
- - Execute:
- 1. Register store part #1
-cycle #4
- - Fetch:
- 1. Fetch/Update PC/RAM address #2
- - Execute:
- 1. Register store part #2
-cycle #5
- - Fetch:
- 1. Instruction decode
- - Execute:
- 1. Execute BRANCH/CALL/RETN part #1
-
-*/
-
-#include "tms0980.h"
-#include "debugger.h"
-
-/*
-
-The MCU cores contains a set of fixed instructions and a set of
-instructions created using microinstructions. A subset of the
-instruction set could be defined from the microinstructions by
-TI customers.
-
-cycle #0: 15TN, ATN, CIN, CKN, CKP, DMTP, MTN, MTP, NATN, NDMTP, YTP
-cycle #2: C8(?), CKM, NE(?), STO
-cycle #3,#4: AUTA, AUTY
-
-unknown cycle: CME, SSE, SSS
-
-*/
-
-/* Microinstructions */
-#define M_15TN (1<<0) /* 15 to -ALU */
-#define M_ATN (1<<1) /* ACC to -ALU */
-#define M_AUTA (1<<2) /* ALU to ACC */
-#define M_AUTY (1<<3) /* ALU to Y */
-#define M_C8 (1<<4) /* CARRY8 to STATUS */
-#define M_CIN (1<<5) /* Carry In to ALU */
-#define M_CKM (1<<6) /* CKB to MEM */
-#define M_CKN (1<<7) /* CKB to -ALU */
-#define M_CKP (1<<8) /* CKB to +ALU */
-#define M_MTN (1<<9) /* MEM to -ALU */
-#define M_MTP (1<<10) /* MEM to +ALU */
-#define M_NATN (1<<11) /* ~ACC to -ALU */
-#define M_NE (1<<12) /* COMP to STATUS */
-#define M_STO (1<<13) /* ACC to MEM */
-#define M_STSL (1<<14) /* STATUS to Status Latch */
-#define M_YTP (1<<15) /* Y to +ALU */
-
-#define M_CME (1<<16) /* Conditional Memory Enable */
-#define M_DMTP (1<<17) /* DAM to +ALU */
-#define M_NDMTP (1<<18) /* ~DAM to +ALU */
-#define M_SSE (1<<19) /* Special Status Enable */
-#define M_SSS (1<<20) /* Special Status Sample */
-
-#define M_RSTR (1<<21) /* -> line #36, F_RSTR (TMS02x0 custom) */
-#define M_UNK1 (1<<22) /* -> line #37, F_???? (TMS0270 custom) */
-
-/* Standard/fixed instructions - these are documented more in their specific handlers below */
-#define F_BR (1<<0)
-#define F_CALL (1<<1)
-#define F_CLO (1<<2)
-#define F_COMC (1<<3)
-#define F_COMX (1<<4)
-#define F_COMX8 (1<<5)
-#define F_LDP (1<<6)
-#define F_LDX (1<<7)
-#define F_RBIT (1<<8)
-#define F_RETN (1<<9)
-#define F_RSTR (1<<10)
-#define F_SBIT (1<<11)
-#define F_SETR (1<<12)
-#define F_TDO (1<<13)
-#define F_TPC (1<<14)
-
-#define F_OFF (1<<15)
-#define F_REAC (1<<16)
-#define F_SAL (1<<17)
-#define F_SBL (1<<18)
-#define F_SEAC (1<<19)
-#define F_XDA (1<<20)
-
-
-// supported types:
-// note: dice information assumes the orientation is pictured with RAM at the bottom-left, except where noted
-
-// TMS1000
-// - 64x4bit RAM array at the bottom-left
-// - 1024x8bit ROM array at the bottom-right
-// * FYI, the row-selector to the left of it is laid out as:
-// 3,4,11,12,19,20,27,28,35,36,43,44,51,52,59,60,0,7,8,15,16,23,24,31,32,39,40,47,48,55,56,63,
-// 2,5,10,13,18,21,26,29,34,37,42,45,50,53,58,61,1,6,9,14,17,22,25,30,33,38,41,46,49,54,57,62
-// - 30-term microinstructions PLA(mpla) at the top half, to the right of the midline, supporting 16 microinstructions
-// - 20-term output PLA(opla) at the top-left
-// - the ALU is between the opla and mpla
-const device_type TMS1000 = &device_creator<tms1000_cpu_device>; // 28-pin DIP, 11 R pins
-const device_type TMS1070 = &device_creator<tms1070_cpu_device>; // high voltage version
-const device_type TMS1040 = &device_creator<tms1040_cpu_device>; // same as TMS1070 with just a different pinout?
-const device_type TMS1200 = &device_creator<tms1200_cpu_device>; // 40-pin DIP, 13 R pins
-// TMS1270 has 10 O pins, how does that work?
-
-// TMS1100 is nearly the same as TMS1000, some different opcodes, and with double the RAM and ROM
-const device_type TMS1100 = &device_creator<tms1100_cpu_device>; // 28-pin DIP, 11 R pins
-const device_type TMS1170 = &device_creator<tms1170_cpu_device>; // high voltage version
-const device_type TMS1300 = &device_creator<tms1300_cpu_device>; // 40-pin DIP, 16 R pins
-const device_type TMS1370 = &device_creator<tms1370_cpu_device>; // high voltage version
-
-// TMS1400 follows the TMS1100, it doubles the ROM size again (4 chapters of 16 pages), and adds a 3-level callstack
-// - rotate the view and mirror the OR-mask to get the proper layout of the mpla, the default is identical to tms1100
-// - the opla size is increased from 20 to 32 terms
-const device_type TMS1400 = &device_creator<tms1400_cpu_device>; // 28-pin DIP, 11 R pins (TMS1400CR is same, but with TMS1100 pinout)
-const device_type TMS1470 = &device_creator<tms1470_cpu_device>; // high voltage version, 1 R pin removed for Vdd
-
-// TMS1600 adds more I/O to the TMS1400, input pins are doubled with added L1,2,4,8
-// - rotate the view and mirror the OR-mask to get the proper layout of the mpla, the default is identical to tms1100
-// - the opla size is increased from 20 to 32 terms
-const device_type TMS1600 = &device_creator<tms1600_cpu_device>; // 40-pin DIP, 16 R pins
-const device_type TMS1670 = &device_creator<tms1670_cpu_device>; // high voltage version
-
-// TMS0980
-// - 64x9bit RAM array at the bottom-left (set up as 144x4)
-// - 2048x9bit ROM array at the bottom-left
-// - main instructions PLAs at the top half, to the right of the midline
-// * top section is assumed to be the CKI bus select
-// * middle section is for microinstruction redirection, this part may differ per die
-// * rest is fixed instructions select, from top-to-bottom: SEAC, LDX, COMX, COMX8,
-// TDO, SBIT, RETN, SETR, REAC, XDA, SAL, RBIT, ..., OFF, SBL, LDP, redir(------00- + R0^BL)
-// - 64-term microinstructions PLA between the RAM and ROM, supporting 20 microinstructions
-// - 16-term inverted output PLA and segment PLA above the RAM (rotate opla 90 degrees)
-const device_type TMS0980 = &device_creator<tms0980_cpu_device>; // 28-pin DIP, 9 R pins
-
-// TMS1980 is a TMS0980 with a TMS1x00 style opla
-// - RAM, ROM, and main instructions PLAs is the same as TMS0980
-// - one of the microinstructions redirects to a RSTR instruction, like on TMS0270
-// - 32-term inverted output PLA above the RAM, 7 bits! (rotate opla 270 degrees)
-const device_type TMS1980 = &device_creator<tms1980_cpu_device>; // 28-pin DIP, 7 O pins, 10 R pins, high voltage
-
-// TMS0950 is a TMS1000 with a TMS0980 style opla, it was quickly succeeded by the TMS0970
-// - RAM, ROM, microinstructions is the same as TMS1000
-// - 10-term inverted output PLA and segment PLA on the top-left
-const device_type TMS0950 = &device_creator<tms0950_cpu_device>; // 28-pin DIP, 8 O pins, 11? R pins
-
-// TMS0970 is a stripped-down version of the TMS0980, itself acting more like a TMS1000
-// - RAM and ROM is the same as TMS1000
-// - main instructions PLAs at the top half, to the right of the midline
-// * see TMS0980 notes, except that the fixed instruction list differs:
-// RETN, SETR, RBIT, SBIT, LDX, COMX, TDO, ..., redir(----0-00), LDP
-// - 32-term microinstructions PLA between the RAM and ROM, supporting 15 microinstructions
-// - 16-term inverted output PLA and segment PLA above the RAM (rotate opla 90 degrees)
-const device_type TMS0970 = &device_creator<tms0970_cpu_device>; // 28-pin DIP, 11 R pins (note: pinout may slightly differ from chip to chip)
-const device_type TMS1990 = &device_creator<tms1990_cpu_device>; // 28-pin DIP, ? R pins..
-
-// TMS0270 on the other hand, is a TMS0980 with earrings and a new hat. The new changes look like a quick afterthought, almost hacky
-// - RAM, ROM, and main instructions PLAs is the same as TMS0980
-// - 64-term microinstructions PLA between the RAM and ROM, supporting 20 microinstructions plus optional separate lines for custom opcode handling
-// - 48-term output PLA above the RAM (rotate opla 90 degrees)
-const device_type TMS0270 = &device_creator<tms0270_cpu_device>; // 40-pin DIP, 16 O pins, 8+ R pins (some R pins are internally hooked up to support more I/O)
-// newer TMS0270 chips (eg. Speak & Math) have 42 pins
-// TMS0260 is same or similar?
-
-// TP0320 is TI's first CMOS MCU with integrated LCD controller, the die is still very similar to TMS0980
-// - ROM and main RAM is same as on TMS0980 with different row-select
-// -
-const device_type TP0320 = &device_creator<tp0320_cpu_device>; // 28-pin SDIP, ..
-
-
-// internal memory maps
-static ADDRESS_MAP_START(program_11bit_9, AS_PROGRAM, 16, tms1xxx_cpu_device)
- AM_RANGE(0x000, 0xfff) AM_ROM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START(program_10bit_8, AS_PROGRAM, 8, tms1xxx_cpu_device)
- AM_RANGE(0x000, 0x3ff) AM_ROM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START(program_11bit_8, AS_PROGRAM, 8, tms1xxx_cpu_device)
- AM_RANGE(0x000, 0x7ff) AM_ROM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START(program_12bit_8, AS_PROGRAM, 8, tms1xxx_cpu_device)
- AM_RANGE(0x000, 0xfff) AM_ROM
-ADDRESS_MAP_END
-
-
-static ADDRESS_MAP_START(data_64x4, AS_DATA, 8, tms1xxx_cpu_device)
- AM_RANGE(0x00, 0x3f) AM_RAM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START(data_128x4, AS_DATA, 8, tms1xxx_cpu_device)
- AM_RANGE(0x00, 0x7f) AM_RAM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START(data_64x9_as4, AS_DATA, 8, tms1xxx_cpu_device)
- AM_RANGE(0x00, 0x7f) AM_RAM
- AM_RANGE(0x80, 0x8f) AM_RAM AM_MIRROR(0x70) // DAM
-ADDRESS_MAP_END
-
-
-// device definitions
-tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms1xxx_cpu_device(mconfig, TMS1000, "TMS1000", tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 2 /* x width */, 10 /* prg width */, ADDRESS_MAP_NAME(program_10bit_8), 6 /* data width */, ADDRESS_MAP_NAME(data_64x4), "tms1000", __FILE__)
-{ }
-
-tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
- : tms1xxx_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
-{ }
-
-tms1070_cpu_device::tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms1000_cpu_device(mconfig, TMS1070, "TMS1070", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1070", __FILE__)
-{ }
-
-tms1040_cpu_device::tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms1000_cpu_device(mconfig, TMS1040, "TMS1040", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1040", __FILE__)
-{ }
-
-tms1200_cpu_device::tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms1000_cpu_device(mconfig, TMS1200, "TMS1200", tag, owner, clock, 8, 13, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1200", __FILE__)
-{ }
-
-
-tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms1000_cpu_device(mconfig, TMS1100, "TMS1100", tag, owner, clock, 8, 11, 6, 8, 3, 11, ADDRESS_MAP_NAME(program_11bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1100", __FILE__)
-{ }
-
-tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
- : tms1000_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
-{ }
-
-tms1170_cpu_device::tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms1100_cpu_device(mconfig, TMS1170, "TMS1170", tag, owner, clock, 8, 11, 6, 8, 3, 11, ADDRESS_MAP_NAME(program_11bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1170", __FILE__)
-{ }
-
-tms1300_cpu_device::tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms1100_cpu_device(mconfig, TMS1300, "TMS1300", tag, owner, clock, 8, 16, 6, 8, 3, 11, ADDRESS_MAP_NAME(program_11bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1300", __FILE__)
-{ }
-
-tms1370_cpu_device::tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms1100_cpu_device(mconfig, TMS1370, "TMS1370", tag, owner, clock, 8, 16, 6, 8, 3, 11, ADDRESS_MAP_NAME(program_11bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1370", __FILE__)
-{ }
-
-
-tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms1100_cpu_device(mconfig, TMS1400, "TMS1400", tag, owner, clock, 8, 11, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1400", __FILE__)
-{ }
-
-tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
- : tms1100_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
-{ }
-
-tms1470_cpu_device::tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms1400_cpu_device(mconfig, TMS1470, "TMS1470", tag, owner, clock, 8, 10, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1470", __FILE__)
-{ }
-
-
-tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms1400_cpu_device(mconfig, TMS1600, "TMS1600", tag, owner, clock, 8, 16, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1600", __FILE__)
-{ }
-
-tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
- : tms1400_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
-{ }
-
-tms1670_cpu_device::tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms1600_cpu_device(mconfig, TMS1670, "TMS1670", tag, owner, clock, 8, 16, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1670", __FILE__)
-{ }
-
-
-tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms1000_cpu_device(mconfig, TMS0970, "TMS0970", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms0970", __FILE__)
-{ }
-
-tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
- : tms1000_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
-{ }
-
-tms0950_cpu_device::tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms0970_cpu_device(mconfig, TMS0950, "TMS0950", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms0950", __FILE__)
-{ }
-
-tms1990_cpu_device::tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms0970_cpu_device(mconfig, TMS1990, "TMS1990", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1990", __FILE__)
-{ }
-
-
-tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms0970_cpu_device(mconfig, TMS0980, "TMS0980", tag, owner, clock, 8, 9, 7, 9, 4, 12, ADDRESS_MAP_NAME(program_11bit_9), 8, ADDRESS_MAP_NAME(data_64x9_as4), "tms0980", __FILE__)
-{ }
-
-tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
- : tms0970_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
-{ }
-
-tms1980_cpu_device::tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms0980_cpu_device(mconfig, TMS1980, "TMS1980", tag, owner, clock, 7, 10, 7, 9, 4, 12, ADDRESS_MAP_NAME(program_11bit_9), 8, ADDRESS_MAP_NAME(data_64x9_as4), "tms1980", __FILE__)
-{ }
-
-
-tms0270_cpu_device::tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms0980_cpu_device(mconfig, TMS0270, "TMS0270", tag, owner, clock, 16, 16, 7, 9, 4, 12, ADDRESS_MAP_NAME(program_11bit_9), 8, ADDRESS_MAP_NAME(data_64x9_as4), "tms0270", __FILE__)
- , m_read_ctl(*this)
- , m_write_ctl(*this)
- , m_write_pdc(*this)
-{ }
-
-
-tp0320_cpu_device::tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : tms0980_cpu_device(mconfig, TP0320, "TP0320", tag, owner, clock, 7, 10, 7, 9, 4, 12, ADDRESS_MAP_NAME(program_11bit_9), 8, ADDRESS_MAP_NAME(data_64x9_as4), "tp0320", __FILE__)
-{ }
-
-
-// machine configs
-static MACHINE_CONFIG_FRAGMENT(tms1000)
-
- // microinstructions PLA, output PLA
- MCFG_PLA_ADD("mpla", 8, 16, 30)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
- MCFG_PLA_ADD("opla", 5, 8, 20)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
-MACHINE_CONFIG_END
-
-machine_config_constructor tms1000_cpu_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(tms1000);
-}
-
-
-static MACHINE_CONFIG_FRAGMENT(tms1400)
-
- // microinstructions PLA, output PLA
- MCFG_PLA_ADD("mpla", 8, 16, 30)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
- MCFG_PLA_ADD("opla", 5, 8, 32)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
-MACHINE_CONFIG_END
-
-machine_config_constructor tms1400_cpu_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(tms1400);
-}
-
-
-static MACHINE_CONFIG_FRAGMENT(tms0950)
-
- // microinstructions PLA, output PLA, segment PLA
- MCFG_PLA_ADD("mpla", 8, 16, 30)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
- MCFG_PLA_ADD("opla", 4, 8, 10)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
- MCFG_PLA_ADD("spla", 3, 8, 8)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
-MACHINE_CONFIG_END
-
-machine_config_constructor tms0950_cpu_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(tms0950);
-}
-
-
-static MACHINE_CONFIG_FRAGMENT(tms0970)
-
- // main opcodes PLA, microinstructions PLA, output PLA, segment PLA
- MCFG_PLA_ADD("ipla", 8, 15, 18)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
- MCFG_PLA_ADD("mpla", 5, 15, 32)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
- MCFG_PLA_ADD("opla", 4, 8, 16)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
- MCFG_PLA_ADD("spla", 3, 8, 8)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
-MACHINE_CONFIG_END
-
-machine_config_constructor tms0970_cpu_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(tms0970);
-}
-
-
-static MACHINE_CONFIG_FRAGMENT(tms0980)
-
- // main opcodes PLA, microinstructions PLA, output PLA, segment PLA
- MCFG_PLA_ADD("ipla", 9, 22, 24)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
- MCFG_PLA_ADD("mpla", 6, 20, 64)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
- MCFG_PLA_ADD("opla", 4, 8, 16)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
- MCFG_PLA_ADD("spla", 3, 8, 8)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
-MACHINE_CONFIG_END
-
-machine_config_constructor tms0980_cpu_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(tms0980);
-}
-
-
-static MACHINE_CONFIG_FRAGMENT(tms1980)
-
- // main opcodes PLA, microinstructions PLA, output PLA
- MCFG_PLA_ADD("ipla", 9, 22, 24)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
- MCFG_PLA_ADD("mpla", 6, 22, 64)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
- MCFG_PLA_ADD("opla", 5, 7, 32)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
-MACHINE_CONFIG_END
-
-machine_config_constructor tms1980_cpu_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(tms1980);
-}
-
-
-static MACHINE_CONFIG_FRAGMENT(tms0270)
-
- // main opcodes PLA, microinstructions PLA, output PLA
- MCFG_PLA_ADD("ipla", 9, 22, 24)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
- MCFG_PLA_ADD("mpla", 6, 22, 64)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
- MCFG_PLA_ADD("opla", 6, 16, 48)
- MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
-MACHINE_CONFIG_END
-
-machine_config_constructor tms0270_cpu_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(tms0270);
-}
-
-
-// disasm
-offs_t tms1000_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
-{
- extern CPU_DISASSEMBLE(tms1000);
- return CPU_DISASSEMBLE_NAME(tms1000)(this, buffer, pc, oprom, opram, options);
-}
-
-offs_t tms1100_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
-{
- extern CPU_DISASSEMBLE(tms1100);
- return CPU_DISASSEMBLE_NAME(tms1100)(this, buffer, pc, oprom, opram, options);
-}
-
-offs_t tms0980_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
-{
- extern CPU_DISASSEMBLE(tms0980);
- return CPU_DISASSEMBLE_NAME(tms0980)(this, buffer, pc, oprom, opram, options);
-}
-
-void tms1xxx_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
-{
- switch (entry.index())
- {
- case STATE_GENPC:
- str = string_format("%03X", m_rom_address << ((m_byte_bits > 8) ? 1 : 0));
- break;
- }
-}
-
-
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-enum
-{
- TMS1XXX_PC=1, TMS1XXX_SR, TMS1XXX_PA, TMS1XXX_PB,
- TMS1XXX_A, TMS1XXX_X, TMS1XXX_Y, TMS1XXX_STATUS
-};
-
-void tms1xxx_cpu_device::device_start()
-{
- m_program = &space(AS_PROGRAM);
- m_data = &space(AS_DATA);
-
- m_o_mask = (1 << m_o_pins) - 1;
- m_r_mask = (1 << m_r_pins) - 1;
- m_pc_mask = (1 << m_pc_bits) - 1;
- m_x_mask = (1 << m_x_bits) - 1;
-
- // resolve callbacks
- m_read_k.resolve_safe(0);
- m_write_o.resolve_safe();
- m_write_r.resolve_safe();
- m_power_off.resolve_safe();
-
- // zerofill
- m_pc = 0;
- m_sr = 0;
- m_pa = 0;
- m_pb = 0;
- m_ps = 0;
- m_a = 0;
- m_x = 0;
- m_y = 0;
- m_ca = 0;
- m_cb = 0;
- m_cs = 0;
- m_r = 0;
- m_o = 0;
- m_cki_bus = 0;
- m_c4 = 0;
- m_p = 0;
- m_n = 0;
- m_adder_out = 0;
- m_carry_in = 0;
- m_carry_out = 0;
- m_status = 0;
- m_status_latch = 0;
- m_eac = 0;
- m_clatch = 0;
- m_add = 0;
- m_bl = 0;
-
- m_ram_in = 0;
- m_dam_in = 0;
- m_ram_out = 0;
- m_ram_address = 0;
- m_rom_address = 0;
- m_opcode = 0;
- m_fixed = 0;
- m_micro = 0;
- m_subcycle = 0;
-
- // register for savestates
- save_item(NAME(m_pc));
- save_item(NAME(m_sr));
- save_item(NAME(m_pa));
- save_item(NAME(m_pb));
- save_item(NAME(m_ps));
- save_item(NAME(m_a));
- save_item(NAME(m_x));
- save_item(NAME(m_y));
- save_item(NAME(m_ca));
- save_item(NAME(m_cb));
- save_item(NAME(m_cs));
- save_item(NAME(m_r));
- save_item(NAME(m_o));
- save_item(NAME(m_cki_bus));
- save_item(NAME(m_c4));
- save_item(NAME(m_p));
- save_item(NAME(m_n));
- save_item(NAME(m_adder_out));
- save_item(NAME(m_carry_in));
- save_item(NAME(m_carry_out));
- save_item(NAME(m_status));
- save_item(NAME(m_status_latch));
- save_item(NAME(m_eac));
- save_item(NAME(m_clatch));
- save_item(NAME(m_add));
- save_item(NAME(m_bl));
-
- save_item(NAME(m_ram_in));
- save_item(NAME(m_dam_in));
- save_item(NAME(m_ram_out));
- save_item(NAME(m_ram_address));
- save_item(NAME(m_rom_address));
- save_item(NAME(m_opcode));
- save_item(NAME(m_fixed));
- save_item(NAME(m_micro));
- save_item(NAME(m_subcycle));
-
- // register state for debugger
- state_add(TMS1XXX_PC, "PC", m_pc ).formatstr("%02X");
- state_add(TMS1XXX_SR, "SR", m_sr ).formatstr("%01X");
- state_add(TMS1XXX_PA, "PA", m_pa ).formatstr("%01X");
- state_add(TMS1XXX_PB, "PB", m_pb ).formatstr("%01X");
- state_add(TMS1XXX_A, "A", m_a ).formatstr("%01X");
- state_add(TMS1XXX_X, "X", m_x ).formatstr("%01X");
- state_add(TMS1XXX_Y, "Y", m_y ).formatstr("%01X");
- state_add(TMS1XXX_STATUS, "STATUS", m_status).formatstr("%01X");
-
- state_add(STATE_GENPC, "curpc", m_rom_address).formatstr("%03X").noshow();
- state_add(STATE_GENFLAGS, "GENFLAGS", m_sr).formatstr("%8s").noshow();
-
- m_icountptr = &m_icount;
-}
-
-void tms0270_cpu_device::device_start()
-{
- // common init
- tms1xxx_cpu_device::device_start();
-
- m_read_ctl.resolve_safe(0);
- m_write_ctl.resolve_safe();
- m_write_pdc.resolve_safe();
-
- // zerofill
- m_r_prev = 0;
- m_chipsel = 0;
- m_ctl_dir = 0;
- m_ctl_out = 0;
- m_pdc = -1; // !
-
- m_o_latch_low = 0;
- m_o_latch = 0;
- m_o_latch_prev = 0;
-
- // register for savestates
- save_item(NAME(m_r_prev));
- save_item(NAME(m_chipsel));
- save_item(NAME(m_ctl_dir));
- save_item(NAME(m_ctl_out));
- save_item(NAME(m_pdc));
-
- save_item(NAME(m_o_latch_low));
- save_item(NAME(m_o_latch));
- save_item(NAME(m_o_latch_prev));
-}
-
-
-
-//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void tms1xxx_cpu_device::device_reset()
-{
- m_pa = 0xf;
- m_pb = 0xf;
- m_pc = 0;
- m_ca = 0;
- m_cb = 0;
- m_cs = 0;
-
- m_eac = 0;
- m_bl = 0;
- m_add = 0;
-
- m_opcode = 0;
- m_micro = 0;
- m_fixed = 0;
-
- m_subcycle = 0;
-
- // clear outputs
- m_r = 0;
- m_write_r(0, m_r & m_r_mask, 0xffff);
- write_o_output(0);
- m_write_r(0, m_r & m_r_mask, 0xffff);
- m_power_off(0);
-}
-
-
-void tms1000_cpu_device::device_reset()
-{
- // common reset
- tms1xxx_cpu_device::device_reset();
-
- // pre-decode instructionset
- m_fixed_decode.resize(0x100);
- memset(&m_fixed_decode[0], 0, 0x100*sizeof(UINT32));
- m_micro_decode.resize(0x100);
- memset(&m_micro_decode[0], 0, 0x100*sizeof(UINT32));
-
- for (int op = 0; op < 0x100; op++)
- {
- // _____ _____ ______ _____ ______ _____ _____ _____ _____
- const UINT32 md[16] = { M_STSL, M_AUTY, M_AUTA, M_CIN, M_C8, M_NE, M_CKN, M_15TN, M_MTN, M_NATN, M_ATN, M_MTP, M_YTP, M_CKP, M_CKM, M_STO };
- UINT16 mask = m_mpla->read(op);
- mask ^= 0x3fc8; // invert active-negative
-
- for (int bit = 0; bit < 16; bit++)
- if (mask & (1 << bit))
- m_micro_decode[op] |= md[bit];
- }
-
- // the fixed instruction set is not programmable
- m_fixed_decode[0x00] = F_COMX;
- m_fixed_decode[0x0a] = F_TDO;
- m_fixed_decode[0x0b] = F_CLO;
- m_fixed_decode[0x0c] = F_RSTR;
- m_fixed_decode[0x0d] = F_SETR;
- m_fixed_decode[0x0f] = F_RETN;
-
- for (int i = 0x10; i < 0x20; i++) m_fixed_decode[i] = F_LDP;
- for (int i = 0x30; i < 0x34; i++) m_fixed_decode[i] = F_SBIT;
- for (int i = 0x34; i < 0x38; i++) m_fixed_decode[i] = F_RBIT;
- for (int i = 0x3c; i < 0x40; i++) m_fixed_decode[i] = F_LDX;
-
- for (int i = 0x80; i < 0xc0; i++) m_fixed_decode[i] = F_BR;
- for (int i = 0xc0; i < 0x100; i++) m_fixed_decode[i] = F_CALL;
-}
-
-void tms1100_cpu_device::device_reset()
-{
- tms1000_cpu_device::device_reset();
-
- // small differences in 00-3f area
- m_fixed_decode[0x00] = 0;
- m_fixed_decode[0x09] = F_COMX8; // !
- m_fixed_decode[0x0b] = F_COMC;
-
- for (int i = 0x28; i < 0x30; i++) m_fixed_decode[i] = F_LDX;
- for (int i = 0x3c; i < 0x40; i++) m_fixed_decode[i] = 0;
-}
-
-void tms1400_cpu_device::device_reset()
-{
- tms1100_cpu_device::device_reset();
-
- // small differences in 00-3f area
- m_fixed_decode[0x0b] = F_TPC;
-}
-
-
-void tms0970_cpu_device::device_reset()
-{
- // common reset
- tms1xxx_cpu_device::device_reset();
-
- // pre-decode instructionset
- m_fixed_decode.resize(0x100);
- memset(&m_fixed_decode[0], 0, 0x100*sizeof(UINT32));
- m_micro_decode.resize(0x100);
- memset(&m_micro_decode[0], 0, 0x100*sizeof(UINT32));
-
- for (int op = 0; op < 0x100; op++)
- {
- // upper half of the opcodes is always branch/call
- if (op & 0x80)
- m_fixed_decode[op] = (op & 0x40) ? F_CALL: F_BR;
-
- // 5 output bits select a microinstruction index
- UINT32 imask = m_ipla->read(op);
- UINT8 msel = imask & 0x1f;
-
- // but if (from bottom to top) term 1 is active and output bit 5 is 0, R2,R4-R7 directly select a microinstruction index
- if (imask & 0x40 && (imask & 0x20) == 0)
- msel = (op & 0xf) | (op >> 1 & 0x10);
-
- msel = BITSWAP8(msel,7,6,5,0,1,2,3,4); // lines are reversed
- UINT32 mmask = m_mpla->read(msel);
- mmask ^= 0x09fe; // invert active-negative
-
- // _____ _____ _____ _____ ______ _____ ______ _____ _____
- const UINT32 md[15] = { M_CKM, M_CKP, M_YTP, M_MTP, M_ATN, M_NATN, M_MTN, M_15TN, M_CKN, M_NE, M_C8, M_CIN, M_AUTA, M_AUTY, M_STO };
-
- for (int bit = 0; bit < 15; bit++)
- if (mmask & (1 << bit))
- m_micro_decode[op] |= md[bit];
-
- // the other ipla terms each select a fixed instruction
- const UINT32 id[8] = { F_LDP, F_TDO, F_COMX, F_LDX, F_SBIT, F_RBIT, F_SETR, F_RETN };
-
- for (int bit = 0; bit < 8; bit++)
- if (imask & (0x80 << bit))
- m_fixed_decode[op] |= id[bit];
- }
-}
-
-
-UINT32 tms0980_cpu_device::decode_micro(UINT8 sel)
-{
- UINT32 decode = 0;
-
- sel = BITSWAP8(sel,7,6,0,1,2,3,4,5); // lines are reversed
- UINT32 mask = m_mpla->read(sel);
- mask ^= 0x43fc3; // invert active-negative
-
- // M_RSTR is specific to TMS02x0/TMS1980, it redirects to F_RSTR
- // M_UNK1 is specific to TMS0270, unknown/unused yet and apparently not connected on every TMS0270
- // _______ ______ _____ _____ _____ _____ ______ _____ ______ _____ _____
- const UINT32 md[22] = { M_NDMTP, M_DMTP, M_AUTY, M_AUTA, M_CKM, M_SSE, M_CKP, M_YTP, M_MTP, M_ATN, M_NATN, M_MTN, M_15TN, M_CKN, M_NE, M_C8, M_SSS, M_CME, M_CIN, M_STO, M_RSTR, M_UNK1 };
-
- for (int bit = 0; bit < 22 && bit < m_mpla->outputs(); bit++)
- if (mask & (1 << bit))
- decode |= md[bit];
-
- return decode;
-}
-
-void tms0980_cpu_device::device_reset()
-{
- // common reset
- tms1xxx_cpu_device::device_reset();
-
- // pre-decode instructionset
- m_fixed_decode.resize(0x200);
- memset(&m_fixed_decode[0], 0, 0x200*sizeof(UINT32));
- m_micro_decode.resize(0x200);
- memset(&m_micro_decode[0], 0, 0x200*sizeof(UINT32));
-
- for (int op = 0; op < 0x200; op++)
- {
- // upper half of the opcodes is always branch/call
- if (op & 0x100)
- m_fixed_decode[op] = (op & 0x80) ? F_CALL: F_BR;
-
- UINT32 imask = m_ipla->read(op);
-
- // 6 output bits select a microinstruction index
- m_micro_decode[op] = decode_micro(imask & 0x3f);
-
- // the other ipla terms each select a fixed instruction
- const UINT32 id[15] = { F_LDP, F_SBL, F_OFF, F_RBIT, F_SAL, F_XDA, F_REAC, F_SETR, F_RETN, F_SBIT, F_TDO, F_COMX8, F_COMX, F_LDX, F_SEAC };
-
- for (int bit = 0; bit < 15; bit++)
- if (imask & (0x80 << bit))
- m_fixed_decode[op] |= id[bit];
- }
-
- // like on TMS0970, one of the terms directly select a microinstruction index (via R4-R8),
- // but it can't be pre-determined when it's active
- m_micro_direct.resize(0x40);
- memset(&m_micro_decode[0], 0, 0x40*sizeof(UINT32));
-
- for (int op = 0; op < 0x40; op++)
- m_micro_direct[op] = decode_micro(op);
-}
-
-void tms0270_cpu_device::device_reset()
-{
- // common reset
- tms0980_cpu_device::device_reset();
-
- m_o_latch_low = 0;
- m_o_latch = 0;
- m_o_latch_prev = 0;
-}
-
-
-
-//-------------------------------------------------
-// program counter/opcode decode
-//-------------------------------------------------
-
-void tms1xxx_cpu_device::next_pc()
-{
- // The program counter is a LFSR. To put it simply, the feedback bit is a XOR of the two highest bits,
- // but it makes an exception when all low bits are set (eg. in TMS1000 case, when PC is 0x1f or 0x3f).
- int high = 1 << (m_pc_bits - 1);
- int fb = (m_pc << 1 & high) == (m_pc & high);
-
- if (m_pc == (m_pc_mask >> 1))
- fb = 1;
- else if (m_pc == m_pc_mask)
- fb = 0;
-
- m_pc = (m_pc << 1 | fb) & m_pc_mask;
-}
-
-void tms1xxx_cpu_device::read_opcode()
-{
- debugger_instruction_hook(this, m_rom_address);
- m_opcode = m_program->read_byte(m_rom_address);
- m_c4 = BITSWAP8(m_opcode,7,6,5,4,0,1,2,3) & 0xf; // opcode operand is bitswapped for most opcodes
-
- m_fixed = m_fixed_decode[m_opcode];
- m_micro = m_micro_decode[m_opcode];
-
- next_pc();
-}
-
-void tms0980_cpu_device::read_opcode()
-{
- debugger_instruction_hook(this, m_rom_address << 1);
- m_opcode = m_program->read_word(m_rom_address << 1) & 0x1ff;
- m_c4 = BITSWAP8(m_opcode,7,6,5,4,0,1,2,3) & 0xf; // opcode operand is bitswapped for most opcodes
-
- m_fixed = m_fixed_decode[m_opcode];
-
- // if ipla term 0 is active, R4-R8 directly select a microinstruction index when R0 or R0^BL is 0
- int r0 = m_opcode >> 8 & 1;
- if (m_ipla->read(m_opcode) & 0x40 && !((r0 & m_bl) ^ r0))
- m_micro = m_micro_direct[m_opcode & 0x3f];
- else
- m_micro = m_micro_decode[m_opcode];
-
- // TMS02x0/TMS1980: RSTR is on the mpla
- if (m_micro & M_RSTR)
- m_fixed |= F_RSTR;
-
- next_pc();
-}
-
-
-
-//-------------------------------------------------
-// i/o handling
-//-------------------------------------------------
-
-void tms1xxx_cpu_device::write_o_output(UINT8 index)
-{
- // a hardcoded table is supported if the output pla is unknown
- m_o = (m_output_pla_table == nullptr) ? m_opla->read(index) : m_output_pla_table[index];
- m_write_o(0, m_o & m_o_mask, 0xffff);
-}
-
-void tms0970_cpu_device::write_o_output(UINT8 index)
-{
- m_o = m_spla->read(index);
- m_write_o(0, m_o & m_o_mask, 0xffff);
-}
-
-
-void tms0270_cpu_device::dynamic_output()
-{
- // R11: TMS5100 CTL port direction (0=read from TMS5100, 1=write to TMS5100)
- m_ctl_dir = m_r >> 11 & 1;
-
- // R12: chip select (off=display via OPLA, on=TMS5100 via ACC/CKB)
- m_chipsel = m_r >> 12 & 1;
-
- if (m_chipsel)
- {
- // ACC via SEG G,B,C,D: TMS5100 CTL pins
- if (m_ctl_dir && m_a != m_ctl_out)
- {
- m_ctl_out = m_a;
- m_write_ctl(0, m_ctl_out, 0xff);
- }
-
- // R10 via SEG E: TMS5100 PDC pin
- if (m_pdc != (m_r >> 10 & 1))
- {
- m_pdc = m_r >> 10 & 1;
- m_write_pdc(m_pdc);
- }
- }
- else
- {
- // standard O-output
- if (m_o_latch != m_o_latch_prev)
- {
- write_o_output(m_o_latch);
- m_o_latch_prev = m_o_latch;
- }
- }
-
- // standard R-output
- if (m_r != m_r_prev)
- {
- m_write_r(0, m_r & m_r_mask, 0xffff);
- m_r_prev = m_r;
- }
-}
-
-
-UINT8 tms1xxx_cpu_device::read_k_input()
-{
- // K1,2,4,8 (KC test pin is not emulated)
- return m_read_k(0, 0xff) & 0xf;
-}
-
-UINT8 tms0980_cpu_device::read_k_input()
-{
- UINT8 k = m_read_k(0, 0xff) & 0x1f;
- UINT8 k3 = (k & 0x10) ? 3: 0; // the TMS0980 K3 line is simply K1|K2
- return (k & 0xf) | k3;
-}
-
-UINT8 tms0270_cpu_device::read_k_input()
-{
- // external: TMS5100 CTL port via SEG G,B,C,D
- if (m_chipsel)
- return (m_ctl_dir) ? m_ctl_out : m_read_ctl(0, 0xff) & 0xf;
-
- // standard K-input otherwise
- UINT8 k = m_read_k(0, 0xff) & 0x1f;
- return (k & 0x10) ? 0xf : k; // the TMS0270 KF line asserts all K-inputs
-}
-
-
-void tms1xxx_cpu_device::set_cki_bus()
-{
- switch (m_opcode & 0xf8)
- {
- // 00001XXX: K-inputs
- case 0x08:
- m_cki_bus = read_k_input();
- break;
-
- // 0011XXXX: select bit
- case 0x30: case 0x38:
- m_cki_bus = 1 << (m_c4 >> 2) ^ 0xf;
- break;
-
- // 01XXXXXX: constant
- case 0x00: // R2,3,4 are NANDed with eachother, and then ORed with R1, making 00000XXX valid too
- case 0x40: case 0x48: case 0x50: case 0x58: case 0x60: case 0x68: case 0x70: case 0x78:
- m_cki_bus = m_c4;
- break;
-
- default:
- m_cki_bus = 0;
- break;
- }
-}
-
-void tms0980_cpu_device::set_cki_bus()
-{
- switch (m_opcode & 0x1f8)
- {
- // 000001XXX: K-inputs
- case 0x008:
- m_cki_bus = read_k_input();
- break;
-
- // 0X0100XXX: select bit
- case 0x020: case 0x0a0:
- m_cki_bus = 1 << (m_c4 >> 2) ^ 0xf;
- break;
-
- // 0X1XXXXXX: constant
- case 0x040: case 0x048: case 0x050: case 0x058: case 0x060: case 0x068: case 0x070: case 0x078:
- case 0x0c0: case 0x0c8: case 0x0d0: case 0x0d8: case 0x0e0: case 0x0e8: case 0x0f0: case 0x0f8:
- m_cki_bus = m_c4;
- break;
-
- default:
- m_cki_bus = 0;
- break;
- }
-}
-
-
-
-//-------------------------------------------------
-// fixed opcode set
-//-------------------------------------------------
-
-// handle branches:
-
-// TMS1000/common
-// note: add(latch) and bl(branch latch) are specific to 0980 series,
-// c(chapter) bits are specific to 1100(and 1400) series
-
-void tms1xxx_cpu_device::op_br()
-{
- // BR/BL: conditional branch
- if (m_status)
- {
- if (m_clatch == 0)
- m_pa = m_pb;
- m_ca = m_cb;
- m_pc = m_opcode & m_pc_mask;
- }
-}
-
-void tms1xxx_cpu_device::op_call()
-{
- // CALL/CALLL: conditional call
- if (m_status)
- {
- UINT8 prev_pa = m_pa;
-
- if (m_clatch == 0)
- {
- m_clatch = 1;
- m_sr = m_pc;
- m_pa = m_pb;
- m_cs = m_ca;
- }
- m_ca = m_cb;
- m_pb = prev_pa;
- m_pc = m_opcode & m_pc_mask;
- }
-}
-
-void tms1xxx_cpu_device::op_retn()
-{
- // RETN: return from subroutine
- if (m_clatch == 1)
- {
- m_clatch = 0;
- m_pc = m_sr;
- m_ca = m_cs;
- }
- m_add = 0;
- m_bl = 0;
- m_pa = m_pb;
-}
-
-
-// TMS1400-specific
-
-void tms1400_cpu_device::op_br()
-{
- // BR/BL: conditional branch
- if (m_status)
- {
- m_pa = m_pb; // don't care about clatch
- m_ca = m_cb;
- m_pc = m_opcode & m_pc_mask;
- }
-}
-
-void tms1400_cpu_device::op_call()
-{
- // CALL/CALLL: conditional call
- if (m_status)
- {
- // 3-level stack, mask clatch 3 bits (no need to mask others)
- m_clatch = (m_clatch << 1 | 1) & 7;
-
- m_sr = m_sr << m_pc_bits | m_pc;
- m_pc = m_opcode & m_pc_mask;
-
- m_ps = m_ps << 4 | m_pa;
- m_pa = m_pb;
-
- m_cs = m_cs << 2 | m_ca;
- m_ca = m_cb;
- }
- else
- {
- m_pb = m_pa;
- m_cb = m_ca;
- }
-}
-
-void tms1400_cpu_device::op_retn()
-{
- // RETN: return from subroutine
- if (m_clatch & 1)
- {
- m_clatch >>= 1;
-
- m_pc = m_sr & m_pc_mask;
- m_sr >>= m_pc_bits;
-
- m_pa = m_pb = m_ps & 0xf;
- m_ps >>= 4;
-
- m_ca = m_cb = m_cs & 3;
- m_cs >>= 2;
- }
-}
-
-
-// handle other:
-
-// TMS1000/common
-
-void tms1xxx_cpu_device::op_sbit()
-{
- // SBIT: set memory bit
- if (m_ram_out == -1)
- m_ram_out = m_ram_in;
- m_ram_out |= (m_cki_bus ^ 0xf);
-}
-
-void tms1xxx_cpu_device::op_rbit()
-{
- // RBIT: reset memory bit
- if (m_ram_out == -1)
- m_ram_out = m_ram_in;
- m_ram_out &= m_cki_bus;
-}
-
-void tms1xxx_cpu_device::op_setr()
-{
- // SETR: set one R-output line
- m_r = m_r | (1 << m_y);
- m_write_r(0, m_r & m_r_mask, 0xffff);
-}
-
-void tms1xxx_cpu_device::op_rstr()
-{
- // RSTR: reset one R-output line
- m_r = m_r & ~(1 << m_y);
- m_write_r(0, m_r & m_r_mask, 0xffff);
-}
-
-void tms1xxx_cpu_device::op_tdo()
-{
- // TDO: transfer accumulator and status latch to O-output
- write_o_output(m_status_latch << 4 | m_a);
-}
-
-void tms1xxx_cpu_device::op_clo()
-{
- // CLO: clear O-output
- write_o_output(0);
-}
-
-void tms1xxx_cpu_device::op_ldx()
-{
- // LDX: load X register with (x_bits) constant
- m_x = m_c4 >> (4-m_x_bits);
-}
-
-void tms1xxx_cpu_device::op_comx()
-{
- // COMX: complement X register
- m_x ^= m_x_mask;
-}
-
-void tms1xxx_cpu_device::op_comx8()
-{
- // COMX8: complement MSB of X register
- // note: on TMS1100, the mnemonic is simply called "COMX"
- m_x ^= 1 << (m_x_bits-1);
-}
-
-void tms1xxx_cpu_device::op_ldp()
-{
- // LDP: load page buffer with constant
- m_pb = m_c4;
-}
-
-
-// TMS1100-specific
-
-void tms1100_cpu_device::op_setr()
-{
- // SETR: same, but X register MSB must be clear
- if (~m_x & (1 << (m_x_bits-1)))
- tms1xxx_cpu_device::op_setr();
-}
-
-void tms1100_cpu_device::op_rstr()
-{
- // RSTR: same, but X register MSB must be clear
- if (~m_x & (1 << (m_x_bits-1)))
- tms1xxx_cpu_device::op_rstr();
-}
-
-void tms1xxx_cpu_device::op_comc()
-{
- // COMC: complement chapter buffer
- m_cb ^= 1;
-}
-
-
-// TMS1400-specific
-
-void tms1xxx_cpu_device::op_tpc()
-{
- // TPC: transfer page buffer to chapter buffer
- m_cb = m_pb & 3;
-}
-
-
-// TMS0970-specific (and possibly child classes)
-
-void tms0970_cpu_device::op_setr()
-{
- // SETR: set output register
- // DDIG line is a coincidence between the selected output pla row(s) and segment pla row(s)
- int ddig = (m_opla->read(m_a) & m_o) ? 1 : 0;
- m_r = (m_r & ~(1 << m_y)) | (ddig << m_y);
-}
-
-void tms0970_cpu_device::op_tdo()
-{
- // TDO: transfer digits to output
- write_o_output(m_a & 0x7);
- m_write_r(0, m_r & m_r_mask, 0xffff);
-}
-
-
-// TMS0980-specific (and possibly child classes)
-
-void tms0980_cpu_device::op_comx()
-{
- // COMX: complement X register, but not the MSB
- m_x ^= (m_x_mask >> 1);
-}
-
-void tms1xxx_cpu_device::op_xda()
-{
- // XDA: exchange DAM and A
- // note: setting A to DAM is done with DMTP and AUTA during this instruction
- m_ram_address |= (0x10 << (m_x_bits-1));
-}
-
-void tms1xxx_cpu_device::op_off()
-{
- // OFF: request auto power-off
- m_power_off(1);
-}
-
-void tms1xxx_cpu_device::op_seac()
-{
- // SEAC: set end around carry
- m_eac = 1;
-}
-
-void tms1xxx_cpu_device::op_reac()
-{
- // REAC: reset end around carry
- m_eac = 0;
-}
-
-void tms1xxx_cpu_device::op_sal()
-{
- // SAL: set add latch (reset is done with RETN)
- m_add = 1;
-}
-
-void tms1xxx_cpu_device::op_sbl()
-{
- // SBL: set branch latch (reset is done with RETN)
- m_bl = 1;
-}
-
-
-// TMS1980-specific
-
-void tms1980_cpu_device::op_tdo()
-{
- // TDO: transfer accumulator and status(not status_latch!) to O-output
- write_o_output(m_status << 4 | m_a);
-}
-
-
-// TMS0270-specific
-
-void tms0270_cpu_device::op_setr()
-{
- // same as default, but handle write to output in dynamic_output
- m_r = m_r | (1 << m_y);
-}
-
-void tms0270_cpu_device::op_rstr()
-{
- // same as default, but handle write to output in dynamic_output
- m_r = m_r & ~(1 << m_y);
-}
-
-void tms0270_cpu_device::op_tdo()
-{
- // TDO: transfer data out
- if (m_status)
- m_o_latch_low = m_a;
- else
- m_o_latch = m_o_latch_low | (m_a << 4 & 0x30);
-
- // write to output is done in dynamic_output
-}
-
-
-
-//-------------------------------------------------
-// execute_run
-//-------------------------------------------------
-
-void tms1xxx_cpu_device::execute_run()
-{
- do
- {
- m_icount--;
- switch (m_subcycle)
- {
- case 0:
- // fetch: rom address 1/2
-
- // execute: br/call 2/2
- if (m_fixed & F_BR) op_br();
- if (m_fixed & F_CALL) op_call();
- if (m_fixed & F_RETN) op_retn();
-
- // execute: k input valid, read ram, clear alu inputs
- dynamic_output();
- set_cki_bus();
- m_ram_in = m_data->read_byte(m_ram_address) & 0xf;
- m_dam_in = m_data->read_byte(m_ram_address | (0x10 << (m_x_bits-1))) & 0xf;
- m_p = 0;
- m_n = 0;
- m_carry_in = 0;
-
- break;
-
- case 1:
- // fetch: rom address 2/2
- m_rom_address = (m_ca << (m_pc_bits+4)) | (m_pa << m_pc_bits) | m_pc;
-
- // execute: update alu inputs
- // N inputs
- if (m_micro & M_15TN) m_n |= 0xf;
- if (m_micro & M_ATN) m_n |= m_a;
- if (m_micro & M_NATN) m_n |= (~m_a & 0xf);
- if (m_micro & M_CKN) m_n |= m_cki_bus;
- if (m_micro & M_MTN) m_n |= m_ram_in;
-
- // P inputs
- if (m_micro & M_CKP) m_p |= m_cki_bus;
- if (m_micro & M_MTP) m_p |= m_ram_in;
- if (m_micro & M_YTP) m_p |= m_y;
- if (m_micro & M_DMTP) m_p |= m_dam_in;
- if (m_micro & M_NDMTP) m_p |= (~m_dam_in & 0xf);
-
- // carry input
- if (m_micro & M_CIN) m_carry_in |= 1;
- if (m_micro & M_SSS) m_carry_in |= m_eac;
-
- break;
-
- case 2:
- {
- // fetch: nothing
-
- // execute: perform alu logic
- // note: officially, only 1 alu operation is allowed per opcode
- m_adder_out = m_p + m_n + m_carry_in;
- int carry_out = m_adder_out >> 4 & 1;
- int status = 1;
- m_ram_out = -1;
-
- if (m_micro & M_C8) status &= carry_out;
- if (m_micro & M_NE) status &= (m_n != m_p); // COMP
- if (m_micro & M_CKM) m_ram_out = m_cki_bus;
-
- // special status circuit
- if (m_micro & M_SSE)
- {
- m_eac = m_carry_out;
- if (m_add)
- m_eac |= carry_out;
- }
- m_carry_out = carry_out;
-
- if (m_micro & M_STO || (m_micro & M_CME && m_eac == m_add))
- m_ram_out = m_a;
-
- // handle the other fixed opcodes here
- if (m_fixed & F_SBIT) op_sbit();
- if (m_fixed & F_RBIT) op_rbit();
- if (m_fixed & F_SETR) op_setr();
- if (m_fixed & F_RSTR) op_rstr();
- if (m_fixed & F_TDO) op_tdo();
- if (m_fixed & F_CLO) op_clo();
- if (m_fixed & F_LDX) op_ldx();
- if (m_fixed & F_COMX) op_comx();
- if (m_fixed & F_COMX8) op_comx8();
- if (m_fixed & F_LDP) op_ldp();
- if (m_fixed & F_COMC) op_comc();
- if (m_fixed & F_TPC) op_tpc();
- if (m_fixed & F_OFF) op_off();
- if (m_fixed & F_SEAC) op_seac();
- if (m_fixed & F_REAC) op_reac();
- if (m_fixed & F_SAL) op_sal();
- if (m_fixed & F_SBL) op_sbl();
- if (m_fixed & F_XDA) op_xda();
-
- // after fixed opcode handling: store status, write ram
- m_status = status;
- if (m_ram_out != -1)
- m_data->write_byte(m_ram_address, m_ram_out);
-
- break;
- }
-
- case 3:
- // fetch: update pc, ram address 1/2
- // execute: register store 1/2
- break;
-
- case 4:
- // execute: register store 2/2
- if (m_micro & M_AUTA) m_a = m_adder_out & 0xf;
- if (m_micro & M_AUTY) m_y = m_adder_out & 0xf;
- if (m_micro & M_STSL) m_status_latch = m_status;
-
- // fetch: update pc, ram address 2/2
- read_opcode();
- m_ram_address = m_x << 4 | m_y;
- break;
-
- case 5:
- // fetch: instruction decode (handled above, before next_pc)
- // execute: br/call 1/2
- break;
- }
- m_subcycle = (m_subcycle + 1) % 6;
- } while (m_icount > 0);
-}
diff --git a/src/devices/cpu/tms0980/tms0980.h b/src/devices/cpu/tms0980/tms0980.h
deleted file mode 100644
index c253d28ee40..00000000000
--- a/src/devices/cpu/tms0980/tms0980.h
+++ /dev/null
@@ -1,518 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Wilbert Pol, hap
-/*
-
- TMS0980/TMS1000-family MCU cores
-
-*/
-
-#ifndef _TMS0980_H_
-#define _TMS0980_H_
-
-#include "emu.h"
-#include "machine/pla.h"
-
-
-// K input pins
-#define MCFG_TMS1XXX_READ_K_CB(_devcb) \
- tms1xxx_cpu_device::set_read_k_callback(*device, DEVCB_##_devcb);
-
-// O/Segment output pins
-#define MCFG_TMS1XXX_WRITE_O_CB(_devcb) \
- tms1xxx_cpu_device::set_write_o_callback(*device, DEVCB_##_devcb);
-
-// Use this if the output PLA is unknown:
-// If the microinstructions (or other) PLA is unknown, try using one from another romset.
-#define MCFG_TMS1XXX_OUTPUT_PLA(_pla) \
- tms1xxx_cpu_device::set_output_pla(*device, _pla);
-
-// R output pins (also called D on some chips)
-#define MCFG_TMS1XXX_WRITE_R_CB(_devcb) \
- tms1xxx_cpu_device::set_write_r_callback(*device, DEVCB_##_devcb);
-
-// OFF request on TMS0980 and up
-#define MCFG_TMS1XXX_POWER_OFF_CB(_devcb) \
- tms1xxx_cpu_device::set_power_off_callback(*device, DEVCB_##_devcb);
-
-
-// TMS0270 was designed to interface with TMS5100, set it up at driver level
-#define MCFG_TMS0270_READ_CTL_CB(_devcb) \
- tms0270_cpu_device::set_read_ctl_callback(*device, DEVCB_##_devcb);
-
-#define MCFG_TMS0270_WRITE_CTL_CB(_devcb) \
- tms0270_cpu_device::set_write_ctl_callback(*device, DEVCB_##_devcb);
-
-#define MCFG_TMS0270_WRITE_PDC_CB(_devcb) \
- tms0270_cpu_device::set_write_pdc_callback(*device, DEVCB_##_devcb);
-
-
-// pinout reference
-
-/*
-
- ____ ____ ____ ____
- R8 1 |* \_/ | 28 R7 R0 1 |* \_/ | 28 Vss
- R9 2 | | 27 R6 R1 2 | | 27 OSC2
- R10 3 | | 26 R5 R2 3 | | 26 OSC1
- Vdd 4 | | 25 R4 R3 4 | | 25 O0
- K1 5 | | 24 R3 R4 5 | | 24 O1
- K2 6 | TMS1000 | 23 R2 R5 6 | | 23 O2
- K4 7 | TMS1070 | 22 R1 R6 7 | TMS1400 | 22 O3
- K8 8 | TMS1100 | 21 R0 R7 8 | | 21 O4
- INIT 9 | TMS1170 | 20 Vss R8 9 | | 20 O5
- O7 10 | | 19 OSC2 R9 10 | | 19 O6
- O6 11 | | 18 OSC1 R10 11 | | 18 O7
- O5 12 | | 17 O0 Vdd 12 | | 17 K8
- O4 13 | | 16 O1 INIT 13 | | 16 K4
- O3 14 |___________| 15 O2 K1 14 |___________| 15 K2
-
-
- ____ ____
- R2 1 |* \_/ | 28 R3
- R1 2 | | 27 R4
- R0 3 | | 26 R5
- ? 4 | | 25 R6
- Vdd 5 | | 24 R7
- K3 6 | | 23 R8
- K8 7 | TMS0980 | 22 ?
- K4 8 | | 21 ?
- K2 9 | | 20 Vss
- K1 10 | | 19 ?
- O7 11 | | 18 O0
- O6 12 | | 17 O1
- O5 13 | | 16 O2
- O4 14 |___________| 15 O3
-
- note: TMS0980 official pin names for R0-R8 is D9-D1, O0-O7 is S(A-G,DP)
-
-*/
-
-
-class tms1xxx_cpu_device : public cpu_device
-{
-public:
- // construction/destruction
- tms1xxx_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
- : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source)
- , m_program_config("program", ENDIANNESS_BIG, byte_bits > 8 ? 16 : 8, prgwidth, 0, program)
- , m_data_config("data", ENDIANNESS_BIG, 8, datawidth, 0, data)
- , m_mpla(*this, "mpla")
- , m_ipla(*this, "ipla")
- , m_opla(*this, "opla")
- , m_spla(*this, "spla")
- , m_o_pins(o_pins)
- , m_r_pins(r_pins)
- , m_pc_bits(pc_bits)
- , m_byte_bits(byte_bits)
- , m_x_bits(x_bits)
- , m_output_pla_table(nullptr)
- , m_read_k(*this)
- , m_write_o(*this)
- , m_write_r(*this)
- , m_power_off(*this)
- { }
-
- // static configuration helpers
- template<class _Object> static devcb_base &set_read_k_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_read_k.set_callback(object); }
- template<class _Object> static devcb_base &set_write_o_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_write_o.set_callback(object); }
- template<class _Object> static devcb_base &set_write_r_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_write_r.set_callback(object); }
- template<class _Object> static devcb_base &set_power_off_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_power_off.set_callback(object); }
- static void set_output_pla(device_t &device, const UINT16 *output_pla) { downcast<tms1xxx_cpu_device &>(device).m_output_pla_table = output_pla; }
-
-protected:
- // device-level overrides
- virtual void device_start() override;
- virtual void device_reset() override;
-
- // device_execute_interface overrides
- virtual UINT32 execute_min_cycles() const override { return 1; }
- virtual UINT32 execute_max_cycles() const override { return 6; }
- virtual UINT32 execute_input_lines() const override { return 1; }
- virtual void execute_run() override;
-
- // device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
-
- // device_disasm_interface overrides
- virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
- virtual UINT32 disasm_max_opcode_bytes() const override { return 1; }
-
- // device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
-
- void next_pc();
-
- virtual void write_o_output(UINT8 index);
- virtual UINT8 read_k_input();
- virtual void set_cki_bus();
- virtual void dynamic_output() { ; } // not used by default
- virtual void read_opcode();
-
- virtual void op_br();
- virtual void op_call();
- virtual void op_retn();
-
- virtual void op_sbit();
- virtual void op_rbit();
- virtual void op_setr();
- virtual void op_rstr();
- virtual void op_tdo();
- virtual void op_clo();
- virtual void op_ldx();
- virtual void op_comx();
- virtual void op_comx8();
- virtual void op_ldp();
-
- virtual void op_comc();
- virtual void op_tpc();
- virtual void op_xda();
- virtual void op_off();
- virtual void op_seac();
- virtual void op_reac();
- virtual void op_sal();
- virtual void op_sbl();
-
- address_space_config m_program_config;
- address_space_config m_data_config;
-
- optional_device<pla_device> m_mpla;
- optional_device<pla_device> m_ipla;
- optional_device<pla_device> m_opla;
- optional_device<pla_device> m_spla;
-
- UINT8 m_pc; // 6 or 7-bit program counter
- UINT32 m_sr; // 6 or 7-bit subroutine return register(s)
- UINT8 m_pa; // 4-bit page address register
- UINT8 m_pb; // 4-bit page buffer register
- UINT16 m_ps; // 4-bit page subroutine register(s)
- UINT8 m_a; // 4-bit accumulator
- UINT8 m_x; // 2,3,or 4-bit RAM X register
- UINT8 m_y; // 4-bit RAM Y register
- UINT8 m_ca; // chapter address register
- UINT8 m_cb; // chapter buffer register
- UINT16 m_cs; // chapter subroutine register(s)
- UINT16 m_r;
- UINT16 m_o;
- UINT8 m_cki_bus;
- UINT8 m_c4;
- UINT8 m_p; // 4-bit adder p(lus)-input
- UINT8 m_n; // 4-bit adder n(egative)-input
- UINT8 m_adder_out; // adder result
- UINT8 m_carry_in; // adder carry-in bit
- UINT8 m_carry_out; // adder carry-out bit
- UINT8 m_status;
- UINT8 m_status_latch;
- UINT8 m_eac; // end around carry bit
- UINT8 m_clatch; // call latch bit(s)
- UINT8 m_add; // add latch bit
- UINT8 m_bl; // branch latch bit
-
- UINT8 m_ram_in;
- UINT8 m_dam_in;
- int m_ram_out; // signed!
- UINT8 m_ram_address;
- UINT16 m_rom_address;
- UINT16 m_opcode;
- UINT32 m_fixed;
- UINT32 m_micro;
- int m_subcycle;
- int m_icount;
-
- UINT8 m_o_pins; // how many O pins
- UINT8 m_r_pins; // how many R pins
- UINT8 m_pc_bits; // how many program counter bits
- UINT8 m_byte_bits; // how many bits per 'byte'
- UINT8 m_x_bits; // how many X register bits
-
- address_space *m_program;
- address_space *m_data;
-
- const UINT16 *m_output_pla_table;
- devcb_read8 m_read_k;
- devcb_write16 m_write_o;
- devcb_write16 m_write_r;
- devcb_write_line m_power_off;
-
- UINT32 m_o_mask;
- UINT32 m_r_mask;
- UINT32 m_k_mask;
- UINT32 m_pc_mask;
- UINT32 m_x_mask;
-
- // lookup tables
- std::vector<UINT32> m_fixed_decode;
- std::vector<UINT32> m_micro_decode;
- std::vector<UINT32> m_micro_direct;
-};
-
-
-
-class tms1000_cpu_device : public tms1xxx_cpu_device
-{
-public:
- tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
-
-protected:
- // overrides
- virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
-
-
- virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
-};
-
-class tms1070_cpu_device : public tms1000_cpu_device
-{
-public:
- tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-};
-
-class tms1040_cpu_device : public tms1000_cpu_device
-{
-public:
- tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-};
-
-
-class tms1200_cpu_device : public tms1000_cpu_device
-{
-public:
- tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-};
-
-
-class tms1100_cpu_device : public tms1000_cpu_device
-{
-public:
- tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
-
-protected:
- // overrides
- virtual void device_reset() override;
-
- virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
-
- virtual void op_setr() override;
- virtual void op_rstr() override;
-};
-
-class tms1170_cpu_device : public tms1100_cpu_device
-{
-public:
- tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-};
-
-class tms1300_cpu_device : public tms1100_cpu_device
-{
-public:
- tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-};
-
-class tms1370_cpu_device : public tms1100_cpu_device
-{
-public:
- tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-};
-
-
-class tms1400_cpu_device : public tms1100_cpu_device
-{
-public:
- tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
-
-protected:
- // overrides
- virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
-
- virtual void op_br() override;
- virtual void op_call() override;
- virtual void op_retn() override;
-
- virtual void op_setr() override { tms1xxx_cpu_device::op_setr(); } // no anomaly with MSB of X register
- virtual void op_rstr() override { tms1xxx_cpu_device::op_rstr(); } // "
-};
-
-class tms1470_cpu_device : public tms1400_cpu_device
-{
-public:
- tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-};
-
-
-class tms1600_cpu_device : public tms1400_cpu_device
-{
-public:
- tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
-};
-
-class tms1670_cpu_device : public tms1600_cpu_device
-{
-public:
- tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-};
-
-
-class tms0970_cpu_device : public tms1000_cpu_device
-{
-public:
- tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
-
-protected:
- // overrides
- virtual void device_reset() override;
- virtual machine_config_constructor device_mconfig_additions() const override;
-
- virtual void write_o_output(UINT8 index) override;
-
- virtual void op_setr() override;
- virtual void op_tdo() override;
-};
-
-class tms0950_cpu_device : public tms0970_cpu_device
-{
-public:
- tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
-protected:
- // overrides
- virtual void device_reset() override { tms1000_cpu_device::device_reset(); }
- virtual machine_config_constructor device_mconfig_additions() const override;
-
- virtual void op_rstr() override { ; } // assume it has no RSTR or CLO
- virtual void op_clo() override { ; } // "
-};
-
-class tms1990_cpu_device : public tms0970_cpu_device
-{
-public:
- tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-};
-
-
-class tms0980_cpu_device : public tms0970_cpu_device
-{
-public:
- tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
-
-protected:
- // overrides
- virtual void device_reset() override;
-
- virtual machine_config_constructor device_mconfig_additions() const override;
-
- virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
- virtual UINT32 disasm_max_opcode_bytes() const override { return 2; }
- virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
-
- virtual UINT8 read_k_input() override;
- virtual void set_cki_bus() override;
- virtual void read_opcode() override;
-
- virtual void op_comx() override;
-
- UINT32 decode_micro(UINT8 sel);
-};
-
-class tms1980_cpu_device : public tms0980_cpu_device
-{
-public:
- tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
-protected:
- // overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
-
- virtual void write_o_output(UINT8 index) override { tms1xxx_cpu_device::write_o_output(index); }
- virtual UINT8 read_k_input() override { return tms1xxx_cpu_device::read_k_input(); }
-
- virtual void op_setr() override { tms1xxx_cpu_device::op_setr(); }
- virtual void op_tdo() override;
-};
-
-
-class tms0270_cpu_device : public tms0980_cpu_device
-{
-public:
- tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // static configuration helpers
- template<class _Object> static devcb_base &set_read_ctl_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_read_ctl.set_callback(object); }
- template<class _Object> static devcb_base &set_write_ctl_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_write_ctl.set_callback(object); }
- template<class _Object> static devcb_base &set_write_pdc_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_write_pdc.set_callback(object); }
-
-protected:
- // overrides
- virtual void device_start() override;
- virtual void device_reset() override;
-
- virtual machine_config_constructor device_mconfig_additions() const override;
-
- virtual void write_o_output(UINT8 index) override { tms1xxx_cpu_device::write_o_output(index); }
- virtual UINT8 read_k_input() override;
- virtual void dynamic_output() override;
-
- virtual void op_setr() override;
- virtual void op_rstr() override;
- virtual void op_tdo() override;
-
-private:
- // state specific to interface with TMS5100
- UINT16 m_r_prev;
- UINT8 m_chipsel;
- UINT8 m_ctl_out;
- UINT8 m_ctl_dir;
- int m_pdc;
-
- UINT8 m_o_latch_low;
- UINT8 m_o_latch;
- UINT8 m_o_latch_prev;
-
- devcb_read8 m_read_ctl;
- devcb_write8 m_write_ctl;
- devcb_write_line m_write_pdc;
-};
-
-
-class tp0320_cpu_device : public tms0980_cpu_device
-{
-public:
- tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
-protected:
- // overrides
- //virtual void device_start() override;
- //virtual void device_reset() override;
-
- //virtual machine_config_constructor device_mconfig_additions() const override;
-};
-
-
-extern const device_type TMS1000;
-extern const device_type TMS1070;
-extern const device_type TMS1040;
-extern const device_type TMS1200;
-extern const device_type TMS1100;
-extern const device_type TMS1170;
-extern const device_type TMS1300;
-extern const device_type TMS1370;
-extern const device_type TMS1400;
-extern const device_type TMS1470;
-extern const device_type TMS1600;
-extern const device_type TMS1670;
-extern const device_type TMS0950;
-extern const device_type TMS0970;
-extern const device_type TMS1990;
-extern const device_type TMS0980;
-extern const device_type TMS1980;
-extern const device_type TMS0270;
-extern const device_type TP0320;
-
-
-#endif /* _TMS0980_H_ */
diff --git a/src/devices/cpu/tms0980/tms0980d.cpp b/src/devices/cpu/tms0980/tms0980d.cpp
deleted file mode 100644
index 371047b0a79..00000000000
--- a/src/devices/cpu/tms0980/tms0980d.cpp
+++ /dev/null
@@ -1,363 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Wilbert Pol, hap
-/*
-
- TMS0980/TMS1000-family disassembler
-
-*/
-
-#include "emu.h"
-#include "debugger.h"
-#include "tms0980.h"
-
-
-enum e_mnemonics
-{
- zA10AAC=0, zA6AAC, zA8AAC, zAC1AC, zACACC, zACNAA, zALEC, zALEM, zAMAAC, zBRANCH, zCALL, zCCLA,
- zCLA, zCLO, zCOMC, zCOMX, zCOMX8, zCPAIZ, zCTMDYN, zDAN, zDMAN, zDMEA, zDNAA,
- zDYN, zIA, zIMAC, zIYC, zKNEZ, zLDP, zLDX, zLDX3, zLDX4, zMNEA, zMNEZ,
- zNDMEA, zOFF, zRBIT, zREAC, zRETN, zRSTR, zSAL, zSAMAN, zSBIT,
- zSBL, zSEAC, zSETR, zTAM, zTAMACS, zTAMDYN, zTAMIY, zTAMIYC, zTAMZA,
- zTAY, zTBIT, zTCMIY, zTCY, zTDO, zTKA, zTKM, zTMA,
- zTMY, zTYA, zXDA, zXMA, zYMCY, zYNEA, zYNEC,
- zILL
-};
-
-static const char *const s_mnemonic[] =
-{
- "A10AAC", "A6AAC", "A8AAC", "AC1AC", "ACACC", "ACNAA", "ALEC", "ALEM", "AMAAC", "BRANCH", "CALL", "CCLA",
- "CLA", "CLO", "COMC", "COMX", "COMX8", "CPAIZ", "CTMDYN", "DAN", "DMAN", "DMEA", "DNAA",
- "DYN", "IA", "IMAC", "IYC", "KNEZ", "LDP", "LDX", "LDX", "LDX", "MNEA", "MNEZ",
- "NDMEA", "OFF", "RBIT", "REAC", "RETN", "RSTR", "SAL", "SAMAN", "SBIT",
- "SBL", "SEAC", "SETR", "TAM", "TAMACS", "TAMDYN", "TAMIY", "TAMIYC", "TAMZA",
- "TAY", "TBIT", "TCMIY", "TCY", "TDO", "TKA", "TKM", "TMA",
- "TMY", "TYA", "XDA", "XMA", "YMCY", "YNEA", "YNEC",
- "?"
-};
-
-
-#define _OVER DASMFLAG_STEP_OVER
-#define _OUT DASMFLAG_STEP_OUT
-
-static const UINT32 s_flags[] =
-{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _OVER, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, _OUT, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0
-};
-
-
-enum e_addressing
-{
- zB0=0, zI2, zI3, zI4, zB7
-};
-
-static const UINT8 s_addressing[] =
-{
- zB0, zB0, zB0, zI4, zI4, zI4, zI4, zB0, zB0, zB7, zB7, zB0,
- zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0,
- zB0, zB0, zB0, zB0, zB0, zI4, zI2, zI3, zI4, zB0, zB0,
- zB0, zB0, zI2, zB0, zB0, zB0, zB0, zB0, zI2,
- zB0, zB0, zB0, zB0, zI4, zB0, zB0, zB0, zB0,
- zB0, zI2, zI4, zI4, zB0, zB0, zB0, zB0,
- zB0, zB0, zB0, zB0, zI4, zB0, zI4,
- zB0
-};
-
-
-static const UINT8 tms0980_i2_value[4] =
-{
- 0, 2, 1, 3
-};
-static const UINT8 tms0980_i3_value[8] =
-{
- 0, 4, 2, 6, 1, 5, 3, 7
-};
-static const UINT8 tms0980_i4_value[16] =
-{
- 0x0, 0x8, 0x4, 0xc, 0x2, 0xa, 0x6, 0xe, 0x1, 0x9, 0x5, 0xd, 0x3, 0xb, 0x7, 0xf
-};
-
-
-
-// opcode luts
-
-static const UINT8 tms0980_mnemonic[512] =
-{
- /* 0x000 */
- zCOMX, zALEM, zYNEA, zXMA, zDYN, zIYC, zCLA, zDMAN,
- zTKA, zMNEA, zTKM, zILL, zILL, zSETR, zKNEZ, zILL,
- /* 0x010 */
- zDMEA, zDNAA, zCCLA, zNDMEA, zILL, zAMAAC, zILL, zILL,
- zCTMDYN, zXDA, zILL, zILL, zILL, zILL, zILL, zILL,
- /* 0x020 */
- zTBIT, zTBIT, zTBIT, zTBIT, zILL, zILL, zILL, zILL,
- zTAY, zTMA, zTMY, zTYA, zTAMDYN, zTAMIYC, zTAMZA, zTAM,
- /* 0x030 */
- zSAMAN, zCPAIZ, zIMAC, zMNEZ, zILL, zILL, zILL, zILL,
- zTCY, zYNEC, zTCMIY, zACACC, zACNAA, zTAMACS, zALEC, zYMCY,
- /* 0x040 */
- zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY,
- zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY,
- /* 0x050 */
- zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC,
- zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC,
- /* 0x060 */
- zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY,
- zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY,
- /* 0x070 */
- zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC,
- zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC,
- /* 0x080 */
- zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP,
- zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP,
- /* 0x090 */
- zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4,
- zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4,
- /* 0x0A0 */
- zSBIT, zSBIT, zSBIT, zSBIT, zRBIT, zRBIT, zRBIT, zRBIT,
- zILL, zILL, zILL, zILL, zILL, zILL, zILL, zILL,
- /* 0x0B0 */
- zTDO, zSAL, zCOMX8, zSBL, zREAC, zSEAC, zOFF, zILL,
- zILL, zILL, zILL, zILL, zILL, zILL, zILL, zRETN,
- /* 0x0C0 */
- zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA,
- zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA,
- /* 0x0D0 */
- zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS,
- zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS,
- /* 0x0E0 */
- zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC,
- zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC,
- /* 0x0F0 */
- zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY,
- zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY,
- /* 0x100 */
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- /* 0x180 */
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL
-};
-
-
-static const UINT8 tms1000_mnemonic[256] =
-{
- /* 0x00 */
- zCOMX, zA8AAC, zYNEA, zTAM, zTAMZA, zA10AAC, zA6AAC, zDAN,
- zTKA, zKNEZ, zTDO, zCLO, zRSTR, zSETR, zIA, zRETN,
- zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP,
- zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP,
- zTAMIY, zTMA, zTMY, zTYA, zTAY, zAMAAC, zMNEZ, zSAMAN,
- zIMAC, zALEM, zDMAN, zIYC, zDYN, zCPAIZ, zXMA, zCLA,
- zSBIT, zSBIT, zSBIT, zSBIT, zRBIT, zRBIT, zRBIT, zRBIT,
- zTBIT, zTBIT, zTBIT, zTBIT, zLDX, zLDX, zLDX, zLDX,
- /* 0x40 */
- zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY,
- zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY,
- zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC,
- zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC,
- zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY,
- zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY,
- zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC,
- zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC,
- /* 0x80 */
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- /* 0xc0 */
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL
-};
-
-
-static const UINT8 tms1100_mnemonic[256] =
-{
- /* 0x00 */
- zMNEA, zALEM, zYNEA, zXMA, zDYN, zIYC, zAMAAC, zDMAN,
- zTKA, zCOMX, zTDO, zCOMC, zRSTR, zSETR, zKNEZ, zRETN,
- zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP,
- zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP,
- /* 0x20 */
- zTAY, zTMA, zTMY, zTYA, zTAMDYN, zTAMIYC, zTAMZA, zTAM,
- zLDX3, zLDX3, zLDX3, zLDX3, zLDX3, zLDX3, zLDX3, zLDX3,
- zSBIT, zSBIT, zSBIT, zSBIT, zRBIT, zRBIT, zRBIT, zRBIT,
- zTBIT, zTBIT, zTBIT, zTBIT, zSAMAN, zCPAIZ, zIMAC, zMNEZ,
- /* 0x40 */
- zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY,
- zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY,
- zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC,
- zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC,
- /* 0x60 */
- zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY,
- zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY,
- zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC,
- zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zCLA,
- /* 0x80 */
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
- /* 0xC0 */
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
- zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
-};
-
-
-
-// disasm
-
-CPU_DISASSEMBLE( tms0980 )
-{
- char *dst = buffer;
- UINT16 op, instr;
- int pos = 0;
-
- op = ( ( oprom[pos] << 8 ) | oprom[pos + 1] ) & 0x01FF;
- pos += 2;
-
- instr = tms0980_mnemonic[op];
-
- dst += sprintf( dst, "%-8s ", s_mnemonic[instr] );
-
- switch( s_addressing[instr] )
- {
- default:
- case zB0:
- break;
- case zI2:
- dst += sprintf( dst, "%d", tms0980_i2_value[ op & 0x03 ] );
- break;
- case zI4:
- dst += sprintf( dst, "%d", tms0980_i4_value[ op & 0x0F ] );
- break;
- case zB7:
- dst += sprintf( dst, "$%02X", ( op & 0x7F ) << 1 );
- break;
- }
-
- return pos | s_flags[instr] | DASMFLAG_SUPPORTED;
-}
-
-
-CPU_DISASSEMBLE( tms1000 )
-{
- char *dst = buffer;
- UINT8 op, instr;
- int pos = 0;
-
- op = oprom[pos];
- pos += 1;
-
- instr = tms1000_mnemonic[op];
-
- dst += sprintf( dst, "%-8s ", s_mnemonic[instr] );
-
- switch( s_addressing[instr] )
- {
- default:
- case zB0:
- break;
- case zI2:
- dst += sprintf( dst, "%d", tms0980_i2_value[ op & 0x03 ] );
- break;
- case zI4:
- dst += sprintf( dst, "%d", tms0980_i4_value[ op & 0x0F ] );
- break;
- case zB7:
- dst += sprintf( dst, "$%02X", ( op & 0x3F ) );
- break;
- }
-
- return pos | s_flags[instr] | DASMFLAG_SUPPORTED;
-}
-
-
-CPU_DISASSEMBLE( tms1100 )
-{
- char *dst = buffer;
- UINT8 op, instr;
- int pos = 0;
-
- op = oprom[pos];
- pos += 1;
-
- instr = tms1100_mnemonic[op];
-
- dst += sprintf( dst, "%-8s ", s_mnemonic[instr] );
-
- switch( s_addressing[instr] )
- {
- default:
- case zB0:
- break;
- case zI2:
- dst += sprintf( dst, "%d", tms0980_i2_value[ op & 0x03 ] );
- break;
- case zI3:
- dst += sprintf( dst, "%d", tms0980_i3_value[ op & 0x07 ] );
- break;
- case zI4:
- dst += sprintf( dst, "%d", tms0980_i4_value[ op & 0x0F ] );
- break;
- case zB7:
- dst += sprintf( dst, "$%02X", ( op & 0x3F ) );
- break;
- }
-
- return pos | s_flags[instr] | DASMFLAG_SUPPORTED;
-}
diff --git a/src/devices/cpu/tms1000/tms0270.cpp b/src/devices/cpu/tms1000/tms0270.cpp
new file mode 100644
index 00000000000..b38ce2c13b7
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms0270.cpp
@@ -0,0 +1,182 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ TMS1000 family - TMS0270
+
+*/
+
+#include "tms0270.h"
+#include "debugger.h"
+
+// TMS0270 is a TMS0980 with earrings and a new hat. The new changes look like a quick afterthought, almost hacky
+// - RAM, ROM, and main instructions PLAs is the same as TMS0980
+// - 64-term microinstructions PLA between the RAM and ROM, similar to TMS0980,
+// plus optional separate lines for custom opcode handling
+// - 48-term output PLA above the RAM (rotate opla 90 degrees)
+const device_type TMS0270 = &device_creator<tms0270_cpu_device>; // 40-pin DIP, 16 O pins, 8+ R pins (some R pins are internally hooked up to support more I/O)
+// newer TMS0270 chips (eg. Speak & Math) have 42 pins
+
+// TMS0260 is same or similar?
+
+
+// internal memory maps
+static ADDRESS_MAP_START(program_11bit_9, AS_PROGRAM, 16, tms1k_base_device)
+ AM_RANGE(0x000, 0xfff) AM_ROM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START(data_144x4, AS_DATA, 8, tms1k_base_device)
+ AM_RANGE(0x00, 0x7f) AM_RAM
+ AM_RANGE(0x80, 0x8f) AM_RAM AM_MIRROR(0x70) // DAM
+ADDRESS_MAP_END
+
+
+// device definitions
+tms0270_cpu_device::tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms0980_cpu_device(mconfig, TMS0270, "TMS0270", tag, owner, clock, 16 /* o pins */, 16 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 12 /* prg width */, ADDRESS_MAP_NAME(program_11bit_9), 8 /* data width */, ADDRESS_MAP_NAME(data_144x4), "tms0270", __FILE__)
+ , m_read_ctl(*this)
+ , m_write_ctl(*this)
+ , m_write_pdc(*this)
+{ }
+
+
+// machine configs
+static MACHINE_CONFIG_FRAGMENT(tms0270)
+
+ // main opcodes PLA, microinstructions PLA, output PLA
+ MCFG_PLA_ADD("ipla", 9, 22, 24)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+ MCFG_PLA_ADD("mpla", 6, 22, 64)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+ MCFG_PLA_ADD("opla", 6, 16, 48)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+MACHINE_CONFIG_END
+
+machine_config_constructor tms0270_cpu_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME(tms0270);
+}
+
+
+// device_start/reset
+void tms0270_cpu_device::device_start()
+{
+ // common init
+ tms1k_base_device::device_start();
+
+ m_read_ctl.resolve_safe(0);
+ m_write_ctl.resolve_safe();
+ m_write_pdc.resolve_safe();
+
+ // zerofill
+ m_r_prev = 0;
+ m_chipsel = 0;
+ m_ctl_dir = 0;
+ m_ctl_out = 0;
+ m_pdc = -1; // !
+
+ m_o_latch_low = 0;
+ m_o_latch = 0;
+ m_o_latch_prev = 0;
+
+ // register for savestates
+ save_item(NAME(m_r_prev));
+ save_item(NAME(m_chipsel));
+ save_item(NAME(m_ctl_dir));
+ save_item(NAME(m_ctl_out));
+ save_item(NAME(m_pdc));
+
+ save_item(NAME(m_o_latch_low));
+ save_item(NAME(m_o_latch));
+ save_item(NAME(m_o_latch_prev));
+}
+
+void tms0270_cpu_device::device_reset()
+{
+ // common reset
+ tms0980_cpu_device::device_reset();
+
+ m_o_latch_low = 0;
+ m_o_latch = 0;
+ m_o_latch_prev = 0;
+}
+
+
+// i/o handling
+void tms0270_cpu_device::dynamic_output()
+{
+ // R11: TMS5100 CTL port direction (0=read from TMS5100, 1=write to TMS5100)
+ m_ctl_dir = m_r >> 11 & 1;
+
+ // R12: chip select (off=display via OPLA, on=TMS5100 via ACC/CKB)
+ m_chipsel = m_r >> 12 & 1;
+
+ if (m_chipsel)
+ {
+ // ACC via SEG G,B,C,D: TMS5100 CTL pins
+ if (m_ctl_dir && m_a != m_ctl_out)
+ {
+ m_ctl_out = m_a;
+ m_write_ctl(0, m_ctl_out, 0xff);
+ }
+
+ // R10 via SEG E: TMS5100 PDC pin
+ if (m_pdc != (m_r >> 10 & 1))
+ {
+ m_pdc = m_r >> 10 & 1;
+ m_write_pdc(m_pdc);
+ }
+ }
+ else
+ {
+ // standard O-output
+ if (m_o_latch != m_o_latch_prev)
+ {
+ write_o_output(m_o_latch);
+ m_o_latch_prev = m_o_latch;
+ }
+ }
+
+ // standard R-output
+ if (m_r != m_r_prev)
+ {
+ m_write_r(0, m_r & m_r_mask, 0xffff);
+ m_r_prev = m_r;
+ }
+}
+
+UINT8 tms0270_cpu_device::read_k_input()
+{
+ // external: TMS5100 CTL port via SEG G,B,C,D
+ if (m_chipsel)
+ return (m_ctl_dir) ? m_ctl_out : m_read_ctl(0, 0xff) & 0xf;
+
+ // standard K-input otherwise
+ UINT8 k = m_read_k(0, 0xff) & 0x1f;
+ return (k & 0x10) ? 0xf : k; // the TMS0270 KF line asserts all K-inputs
+}
+
+
+// opcode deviations
+void tms0270_cpu_device::op_setr()
+{
+ // same as default, but handle write to output in dynamic_output
+ m_r = m_r | (1 << m_y);
+}
+
+void tms0270_cpu_device::op_rstr()
+{
+ // same as default, but handle write to output in dynamic_output
+ m_r = m_r & ~(1 << m_y);
+}
+
+void tms0270_cpu_device::op_tdo()
+{
+ // TDO: transfer data out
+ if (m_status)
+ m_o_latch_low = m_a;
+ else
+ m_o_latch = m_o_latch_low | (m_a << 4 & 0x30);
+
+ // write to output is done in dynamic_output
+}
diff --git a/src/devices/cpu/tms1000/tms0270.h b/src/devices/cpu/tms1000/tms0270.h
new file mode 100644
index 00000000000..5cac8c810ad
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms0270.h
@@ -0,0 +1,71 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ TMS1000 family - TMS0270
+
+*/
+
+#ifndef _TMS0270_H_
+#define _TMS0270_H_
+
+#include "tms0980.h"
+
+
+// TMS0270 was designed to interface with TMS5100, set it up at driver level
+#define MCFG_TMS0270_READ_CTL_CB(_devcb) \
+ tms0270_cpu_device::set_read_ctl_callback(*device, DEVCB_##_devcb);
+
+#define MCFG_TMS0270_WRITE_CTL_CB(_devcb) \
+ tms0270_cpu_device::set_write_ctl_callback(*device, DEVCB_##_devcb);
+
+#define MCFG_TMS0270_WRITE_PDC_CB(_devcb) \
+ tms0270_cpu_device::set_write_pdc_callback(*device, DEVCB_##_devcb);
+
+
+class tms0270_cpu_device : public tms0980_cpu_device
+{
+public:
+ tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // static configuration helpers
+ template<class _Object> static devcb_base &set_read_ctl_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_read_ctl.set_callback(object); }
+ template<class _Object> static devcb_base &set_write_ctl_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_write_ctl.set_callback(object); }
+ template<class _Object> static devcb_base &set_write_pdc_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_write_pdc.set_callback(object); }
+
+protected:
+ // overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ virtual machine_config_constructor device_mconfig_additions() const override;
+
+ virtual void write_o_output(UINT8 index) override { tms1k_base_device::write_o_output(index); }
+ virtual UINT8 read_k_input() override;
+ virtual void dynamic_output() override;
+
+ virtual void op_setr() override;
+ virtual void op_rstr() override;
+ virtual void op_tdo() override;
+
+private:
+ // state specific to interface with TMS5100
+ UINT16 m_r_prev;
+ UINT8 m_chipsel;
+ UINT8 m_ctl_out;
+ UINT8 m_ctl_dir;
+ int m_pdc;
+
+ UINT8 m_o_latch_low;
+ UINT8 m_o_latch;
+ UINT8 m_o_latch_prev;
+
+ devcb_read8 m_read_ctl;
+ devcb_write8 m_write_ctl;
+ devcb_write_line m_write_pdc;
+};
+
+
+extern const device_type TMS0270;
+
+#endif /* _TMS0270_H_ */
diff --git a/src/devices/cpu/tms1000/tms0970.cpp b/src/devices/cpu/tms1000/tms0970.cpp
new file mode 100644
index 00000000000..88b9a52be39
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms0970.cpp
@@ -0,0 +1,161 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ TMS1000 family - TMS0950, TMS0970, TMS1990
+
+*/
+
+#include "tms0970.h"
+#include "debugger.h"
+
+// TMS0950 is a TMS1000 with a TMS0980 style opla, it was quickly succeeded by the TMS0970
+// - RAM, ROM, microinstructions is the same as TMS1000
+// - 10-term inverted output PLA and segment PLA on the top-left
+const device_type TMS0950 = &device_creator<tms0950_cpu_device>; // 28-pin DIP, 8 O pins, 11? R pins
+
+// TMS0970 is a stripped-down version of the TMS0980, itself acting more like a TMS1000
+// - RAM and ROM is the same as TMS1000
+// - main instructions PLAs at the top half, to the right of the midline
+// * see TMS0980 notes, except that the fixed instruction list differs:
+// RETN, SETR, RBIT, SBIT, LDX, COMX, TDO, ..., redir(----0-00), LDP
+// - 32-term microinstructions PLA between the RAM and ROM, supporting 15 microinstructions
+// - 16-term inverted output PLA and segment PLA above the RAM (rotate opla 90 degrees)
+const device_type TMS0970 = &device_creator<tms0970_cpu_device>; // 28-pin DIP, 11 R pins (note: pinout may slightly differ from chip to chip)
+const device_type TMS1990 = &device_creator<tms1990_cpu_device>; // 28-pin DIP, ? R pins..
+
+
+// internal memory maps
+static ADDRESS_MAP_START(program_10bit_8, AS_PROGRAM, 8, tms1k_base_device)
+ AM_RANGE(0x000, 0x3ff) AM_ROM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START(data_64x4, AS_DATA, 8, tms1k_base_device)
+ AM_RANGE(0x00, 0x3f) AM_RAM
+ADDRESS_MAP_END
+
+
+// device definitions
+tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms1000_cpu_device(mconfig, TMS0970, "TMS0970", tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 2 /* x width */, 10 /* prg width */, ADDRESS_MAP_NAME(program_10bit_8), 6 /* data width */, ADDRESS_MAP_NAME(data_64x4), "tms0970", __FILE__)
+{ }
+
+tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+ : tms1000_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
+{ }
+
+tms0950_cpu_device::tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms0970_cpu_device(mconfig, TMS0950, "TMS0950", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms0950", __FILE__)
+{ }
+
+tms1990_cpu_device::tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms0970_cpu_device(mconfig, TMS1990, "TMS1990", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1990", __FILE__)
+{ }
+
+
+// machine configs
+static MACHINE_CONFIG_FRAGMENT(tms0950)
+
+ // microinstructions PLA, output PLA, segment PLA
+ MCFG_PLA_ADD("mpla", 8, 16, 30)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+ MCFG_PLA_ADD("opla", 4, 8, 10)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+ MCFG_PLA_ADD("spla", 3, 8, 8)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+MACHINE_CONFIG_END
+
+machine_config_constructor tms0950_cpu_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME(tms0950);
+}
+
+static MACHINE_CONFIG_FRAGMENT(tms0970)
+
+ // main opcodes PLA, microinstructions PLA, output PLA, segment PLA
+ MCFG_PLA_ADD("ipla", 8, 15, 18)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+ MCFG_PLA_ADD("mpla", 5, 15, 32)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+ MCFG_PLA_ADD("opla", 4, 8, 16)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+ MCFG_PLA_ADD("spla", 3, 8, 8)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+MACHINE_CONFIG_END
+
+machine_config_constructor tms0970_cpu_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME(tms0970);
+}
+
+
+// device_reset
+void tms0970_cpu_device::device_reset()
+{
+ // common reset
+ tms1k_base_device::device_reset();
+
+ // pre-decode instructionset
+ m_fixed_decode.resize(0x100);
+ memset(&m_fixed_decode[0], 0, 0x100*sizeof(UINT32));
+ m_micro_decode.resize(0x100);
+ memset(&m_micro_decode[0], 0, 0x100*sizeof(UINT32));
+
+ for (int op = 0; op < 0x100; op++)
+ {
+ // upper half of the opcodes is always branch/call
+ if (op & 0x80)
+ m_fixed_decode[op] = (op & 0x40) ? F_CALL: F_BR;
+
+ // 5 output bits select a microinstruction index
+ UINT32 imask = m_ipla->read(op);
+ UINT8 msel = imask & 0x1f;
+
+ // but if (from bottom to top) term 1 is active and output bit 5 is 0, R2,R4-R7 directly select a microinstruction index
+ if (imask & 0x40 && (imask & 0x20) == 0)
+ msel = (op & 0xf) | (op >> 1 & 0x10);
+
+ msel = BITSWAP8(msel,7,6,5,0,1,2,3,4); // lines are reversed
+ UINT32 mmask = m_mpla->read(msel);
+ mmask ^= 0x09fe; // invert active-negative
+
+ // _____ _____ _____ _____ ______ _____ ______ _____ _____
+ const UINT32 md[15] = { M_CKM, M_CKP, M_YTP, M_MTP, M_ATN, M_NATN, M_MTN, M_15TN, M_CKN, M_NE, M_C8, M_CIN, M_AUTA, M_AUTY, M_STO };
+
+ for (int bit = 0; bit < 15; bit++)
+ if (mmask & (1 << bit))
+ m_micro_decode[op] |= md[bit];
+
+ // the other ipla terms each select a fixed instruction
+ const UINT32 id[8] = { F_LDP, F_TDO, F_COMX, F_LDX, F_SBIT, F_RBIT, F_SETR, F_RETN };
+
+ for (int bit = 0; bit < 8; bit++)
+ if (imask & (0x80 << bit))
+ m_fixed_decode[op] |= id[bit];
+ }
+}
+
+
+// i/o handling
+void tms0970_cpu_device::write_o_output(UINT8 index)
+{
+ m_o = m_spla->read(index);
+ m_write_o(0, m_o & m_o_mask, 0xffff);
+}
+
+
+// opcode deviations
+void tms0970_cpu_device::op_setr()
+{
+ // SETR: set output register
+ // DDIG line is a coincidence between the selected output pla row(s) and segment pla row(s)
+ int ddig = (m_opla->read(m_a) & m_o) ? 1 : 0;
+ m_r = (m_r & ~(1 << m_y)) | (ddig << m_y);
+}
+
+void tms0970_cpu_device::op_tdo()
+{
+ // TDO: transfer digits to output
+ write_o_output(m_a & 0x7);
+ m_write_r(0, m_r & m_r_mask, 0xffff);
+}
diff --git a/src/devices/cpu/tms1000/tms0970.h b/src/devices/cpu/tms1000/tms0970.h
new file mode 100644
index 00000000000..62cfb57c4e2
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms0970.h
@@ -0,0 +1,57 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ TMS1000 family - TMS0950, TMS0970, TMS1990
+
+*/
+
+#ifndef _TMS0970_H_
+#define _TMS0970_H_
+
+#include "tms1000.h"
+
+
+class tms0970_cpu_device : public tms1000_cpu_device
+{
+public:
+ tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+
+protected:
+ // overrides
+ virtual void device_reset() override;
+ virtual machine_config_constructor device_mconfig_additions() const override;
+
+ virtual void write_o_output(UINT8 index) override;
+
+ virtual void op_setr() override;
+ virtual void op_tdo() override;
+};
+
+class tms0950_cpu_device : public tms0970_cpu_device
+{
+public:
+ tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // overrides
+ virtual void device_reset() override { tms1000_cpu_device::device_reset(); }
+ virtual machine_config_constructor device_mconfig_additions() const override;
+
+ virtual void op_rstr() override { ; } // assume it has no RSTR or CLO
+ virtual void op_clo() override { ; } // "
+};
+
+class tms1990_cpu_device : public tms0970_cpu_device
+{
+public:
+ tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+};
+
+
+extern const device_type TMS0950;
+extern const device_type TMS0970;
+extern const device_type TMS1990;
+
+#endif /* _TMS0970_H_ */
diff --git a/src/devices/cpu/tms1000/tms0980.cpp b/src/devices/cpu/tms1000/tms0980.cpp
new file mode 100644
index 00000000000..b5884c70ad7
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms0980.cpp
@@ -0,0 +1,231 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ TMS1000 family - TMS0980, TMS1980
+
+*/
+
+#include "tms0980.h"
+#include "debugger.h"
+
+// TMS0980
+// - 144x4bit RAM array at the bottom-left (128+16, set up as 8x18x4)
+// - 2048x9bit ROM array at the bottom-left
+// - main instructions PLAs at the top half, to the right of the midline
+// * top section is assumed to be the CKI bus select
+// * middle section is for microinstruction redirection, this part may differ per die
+// * rest is fixed instructions select, from top-to-bottom: SEAC, LDX, COMX, COMX8,
+// TDO, SBIT, RETN, SETR, REAC, XDA, SAL, RBIT, ..., OFF, SBL, LDP, redir(------00- + R0^BL)
+// - 64-term microinstructions PLA between the RAM and ROM, supporting 20 microinstructions
+// - 16-term inverted output PLA and segment PLA above the RAM (rotate opla 90 degrees)
+const device_type TMS0980 = &device_creator<tms0980_cpu_device>; // 28-pin DIP, 9 R pins
+
+// TMS1980 is a TMS0980 with a TMS1x00 style opla
+// - RAM, ROM, and main instructions PLAs is the same as TMS0980
+// - one of the microinstructions redirects to a RSTR instruction, like on TMS0270
+// - 32-term inverted output PLA above the RAM, 7 bits! (rotate opla 270 degrees)
+const device_type TMS1980 = &device_creator<tms1980_cpu_device>; // 28-pin DIP, 7 O pins, 10 R pins, high voltage
+
+
+// internal memory maps
+static ADDRESS_MAP_START(program_11bit_9, AS_PROGRAM, 16, tms1k_base_device)
+ AM_RANGE(0x000, 0xfff) AM_ROM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START(data_144x4, AS_DATA, 8, tms1k_base_device)
+ AM_RANGE(0x00, 0x7f) AM_RAM
+ AM_RANGE(0x80, 0x8f) AM_RAM AM_MIRROR(0x70) // DAM
+ADDRESS_MAP_END
+
+
+// device definitions
+tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms0970_cpu_device(mconfig, TMS0980, "TMS0980", tag, owner, clock, 8 /* o pins */, 9 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 12 /* prg width */, ADDRESS_MAP_NAME(program_11bit_9), 8 /* data width */, ADDRESS_MAP_NAME(data_144x4), "tms0980", __FILE__)
+{ }
+
+tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+ : tms0970_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
+{ }
+
+tms1980_cpu_device::tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms0980_cpu_device(mconfig, TMS1980, "TMS1980", tag, owner, clock, 7, 10, 7, 9, 4, 12, ADDRESS_MAP_NAME(program_11bit_9), 8, ADDRESS_MAP_NAME(data_144x4), "tms1980", __FILE__)
+{ }
+
+
+// machine configs
+static MACHINE_CONFIG_FRAGMENT(tms0980)
+
+ // main opcodes PLA, microinstructions PLA, output PLA, segment PLA
+ MCFG_PLA_ADD("ipla", 9, 22, 24)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+ MCFG_PLA_ADD("mpla", 6, 20, 64)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+ MCFG_PLA_ADD("opla", 4, 8, 16)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+ MCFG_PLA_ADD("spla", 3, 8, 8)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+MACHINE_CONFIG_END
+
+machine_config_constructor tms0980_cpu_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME(tms0980);
+}
+
+static MACHINE_CONFIG_FRAGMENT(tms1980)
+
+ // main opcodes PLA, microinstructions PLA, output PLA
+ MCFG_PLA_ADD("ipla", 9, 22, 24)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+ MCFG_PLA_ADD("mpla", 6, 22, 64)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+ MCFG_PLA_ADD("opla", 5, 7, 32)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+MACHINE_CONFIG_END
+
+machine_config_constructor tms1980_cpu_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME(tms1980);
+}
+
+
+// disasm
+offs_t tms0980_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
+{
+ extern CPU_DISASSEMBLE(tms0980);
+ return CPU_DISASSEMBLE_NAME(tms0980)(this, buffer, pc, oprom, opram, options);
+}
+
+
+// device_reset
+UINT32 tms0980_cpu_device::decode_micro(UINT8 sel)
+{
+ UINT32 decode = 0;
+
+ sel = BITSWAP8(sel,7,6,0,1,2,3,4,5); // lines are reversed
+ UINT32 mask = m_mpla->read(sel);
+ mask ^= 0x43fc3; // invert active-negative
+
+ // M_RSTR is specific to TMS02x0/TMS1980, it redirects to F_RSTR
+ // M_UNK1 is specific to TMS0270, unknown/unused yet and apparently not connected on every TMS0270
+ // _______ ______ _____ _____ _____ _____ ______ _____ ______ _____ _____
+ const UINT32 md[22] = { M_NDMTP, M_DMTP, M_AUTY, M_AUTA, M_CKM, M_SSE, M_CKP, M_YTP, M_MTP, M_ATN, M_NATN, M_MTN, M_15TN, M_CKN, M_NE, M_C8, M_SSS, M_CME, M_CIN, M_STO, M_RSTR, M_UNK1 };
+
+ for (int bit = 0; bit < 22 && bit < m_mpla->outputs(); bit++)
+ if (mask & (1 << bit))
+ decode |= md[bit];
+
+ return decode;
+}
+
+void tms0980_cpu_device::device_reset()
+{
+ // common reset
+ tms1k_base_device::device_reset();
+
+ // pre-decode instructionset
+ m_fixed_decode.resize(0x200);
+ memset(&m_fixed_decode[0], 0, 0x200*sizeof(UINT32));
+ m_micro_decode.resize(0x200);
+ memset(&m_micro_decode[0], 0, 0x200*sizeof(UINT32));
+
+ for (int op = 0; op < 0x200; op++)
+ {
+ // upper half of the opcodes is always branch/call
+ if (op & 0x100)
+ m_fixed_decode[op] = (op & 0x80) ? F_CALL: F_BR;
+
+ UINT32 imask = m_ipla->read(op);
+
+ // 6 output bits select a microinstruction index
+ m_micro_decode[op] = decode_micro(imask & 0x3f);
+
+ // the other ipla terms each select a fixed instruction
+ const UINT32 id[15] = { F_LDP, F_SBL, F_OFF, F_RBIT, F_SAL, F_XDA, F_REAC, F_SETR, F_RETN, F_SBIT, F_TDO, F_COMX8, F_COMX, F_LDX, F_SEAC };
+
+ for (int bit = 0; bit < 15; bit++)
+ if (imask & (0x80 << bit))
+ m_fixed_decode[op] |= id[bit];
+ }
+
+ // like on TMS0970, one of the terms directly select a microinstruction index (via R4-R8),
+ // but it can't be pre-determined when it's active
+ m_micro_direct.resize(0x40);
+ memset(&m_micro_decode[0], 0, 0x40*sizeof(UINT32));
+
+ for (int op = 0; op < 0x40; op++)
+ m_micro_direct[op] = decode_micro(op);
+}
+
+
+// program counter/opcode decode
+void tms0980_cpu_device::read_opcode()
+{
+ debugger_instruction_hook(this, m_rom_address << 1);
+ m_opcode = m_program->read_word(m_rom_address << 1) & 0x1ff;
+ m_c4 = BITSWAP8(m_opcode,7,6,5,4,0,1,2,3) & 0xf; // opcode operand is bitswapped for most opcodes
+
+ m_fixed = m_fixed_decode[m_opcode];
+
+ // if ipla term 0 is active, R4-R8 directly select a microinstruction index when R0 or R0^BL is 0
+ int r0 = m_opcode >> 8 & 1;
+ if (m_ipla->read(m_opcode) & 0x40 && !((r0 & m_bl) ^ r0))
+ m_micro = m_micro_direct[m_opcode & 0x3f];
+ else
+ m_micro = m_micro_decode[m_opcode];
+
+ // redirect mpla fixed instructions
+ if (m_micro & M_RSTR) m_fixed |= F_RSTR;
+ if (m_micro & M_SETR) m_fixed |= F_SETR;
+
+ next_pc();
+}
+
+
+// i/o handling
+UINT8 tms0980_cpu_device::read_k_input()
+{
+ UINT8 k = m_read_k(0, 0xff) & 0x1f;
+ UINT8 k3 = (k & 0x10) ? 3: 0; // the TMS0980 K3 line is simply K1|K2
+ return (k & 0xf) | k3;
+}
+
+void tms0980_cpu_device::set_cki_bus()
+{
+ switch (m_opcode & 0x1f8)
+ {
+ // 000001XXX: K-inputs
+ case 0x008:
+ m_cki_bus = read_k_input();
+ break;
+
+ // 0X0100XXX: select bit
+ case 0x020: case 0x0a0:
+ m_cki_bus = 1 << (m_c4 >> 2) ^ 0xf;
+ break;
+
+ // 0X1XXXXXX: constant
+ case 0x040: case 0x048: case 0x050: case 0x058: case 0x060: case 0x068: case 0x070: case 0x078:
+ case 0x0c0: case 0x0c8: case 0x0d0: case 0x0d8: case 0x0e0: case 0x0e8: case 0x0f0: case 0x0f8:
+ m_cki_bus = m_c4;
+ break;
+
+ default:
+ m_cki_bus = 0;
+ break;
+ }
+}
+
+
+// opcode deviations
+void tms0980_cpu_device::op_comx()
+{
+ // COMX: complement X register, but not the MSB
+ m_x ^= (m_x_mask >> 1);
+}
+
+void tms1980_cpu_device::op_tdo()
+{
+ // TDO: transfer accumulator and status(not status_latch!) to O-output
+ write_o_output(m_status << 4 | m_a);
+}
diff --git a/src/devices/cpu/tms1000/tms0980.h b/src/devices/cpu/tms1000/tms0980.h
new file mode 100644
index 00000000000..93d8cf22fc3
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms0980.h
@@ -0,0 +1,60 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ TMS1000 family - TMS0980, TMS1980
+
+*/
+
+#ifndef _TMS0980_H_
+#define _TMS0980_H_
+
+#include "tms0970.h"
+
+
+class tms0980_cpu_device : public tms0970_cpu_device
+{
+public:
+ tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+
+protected:
+ // overrides
+ virtual void device_reset() override;
+
+ virtual machine_config_constructor device_mconfig_additions() const override;
+
+ virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
+ virtual UINT32 disasm_max_opcode_bytes() const override { return 2; }
+ virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
+
+ virtual UINT8 read_k_input() override;
+ virtual void set_cki_bus() override;
+ virtual void read_opcode() override;
+
+ virtual void op_comx() override;
+
+ UINT32 decode_micro(UINT8 sel);
+};
+
+class tms1980_cpu_device : public tms0980_cpu_device
+{
+public:
+ tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // overrides
+ virtual machine_config_constructor device_mconfig_additions() const override;
+
+ virtual void write_o_output(UINT8 index) override { tms1k_base_device::write_o_output(index); }
+ virtual UINT8 read_k_input() override { return tms1k_base_device::read_k_input(); }
+
+ virtual void op_setr() override { tms1k_base_device::op_setr(); }
+ virtual void op_tdo() override;
+};
+
+
+extern const device_type TMS0980;
+extern const device_type TMS1980;
+
+#endif /* _TMS0980_H_ */
diff --git a/src/devices/cpu/tms1000/tms1000.cpp b/src/devices/cpu/tms1000/tms1000.cpp
new file mode 100644
index 00000000000..65fc28f6c1a
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms1000.cpp
@@ -0,0 +1,126 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ TMS1000 family - TMS1000, TMS1070, TMS1040, TMS1200
+
+*/
+
+#include "tms1000.h"
+#include "debugger.h"
+
+// TMS1000
+// - 64x4bit RAM array at the bottom-left
+// - 1024x8bit ROM array at the bottom-right
+// * FYI, the row-selector to the left of it is laid out as:
+// 3,4,11,12,19,20,27,28,35,36,43,44,51,52,59,60,0,7,8,15,16,23,24,31,32,39,40,47,48,55,56,63,
+// 2,5,10,13,18,21,26,29,34,37,42,45,50,53,58,61,1,6,9,14,17,22,25,30,33,38,41,46,49,54,57,62
+// - 30-term microinstructions PLA(mpla) at the top half, to the right of the midline, supporting 16 microinstructions
+// - 20-term output PLA(opla) at the top-left
+// - the ALU is between the opla and mpla
+const device_type TMS1000 = &device_creator<tms1000_cpu_device>; // 28-pin DIP, 11 R pins
+const device_type TMS1070 = &device_creator<tms1070_cpu_device>; // high voltage version
+const device_type TMS1040 = &device_creator<tms1040_cpu_device>; // same as TMS1070 with just a different pinout?
+const device_type TMS1200 = &device_creator<tms1200_cpu_device>; // 40-pin DIP, 13 R pins
+// TMS1270 has 10 O pins, how does that work?
+
+
+// internal memory maps
+static ADDRESS_MAP_START(program_10bit_8, AS_PROGRAM, 8, tms1k_base_device)
+ AM_RANGE(0x000, 0x3ff) AM_ROM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START(data_64x4, AS_DATA, 8, tms1k_base_device)
+ AM_RANGE(0x00, 0x3f) AM_RAM
+ADDRESS_MAP_END
+
+
+// device definitions
+tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms1k_base_device(mconfig, TMS1000, "TMS1000", tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 2 /* x width */, 10 /* prg width */, ADDRESS_MAP_NAME(program_10bit_8), 6 /* data width */, ADDRESS_MAP_NAME(data_64x4), "tms1000", __FILE__)
+{ }
+
+tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+ : tms1k_base_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
+{ }
+
+tms1070_cpu_device::tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms1000_cpu_device(mconfig, TMS1070, "TMS1070", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1070", __FILE__)
+{ }
+
+tms1040_cpu_device::tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms1000_cpu_device(mconfig, TMS1040, "TMS1040", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1040", __FILE__)
+{ }
+
+tms1200_cpu_device::tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms1000_cpu_device(mconfig, TMS1200, "TMS1200", tag, owner, clock, 8, 13, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1200", __FILE__)
+{ }
+
+
+// machine configs
+static MACHINE_CONFIG_FRAGMENT(tms1000)
+
+ // microinstructions PLA, output PLA
+ MCFG_PLA_ADD("mpla", 8, 16, 30)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+ MCFG_PLA_ADD("opla", 5, 8, 20)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+MACHINE_CONFIG_END
+
+machine_config_constructor tms1000_cpu_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME(tms1000);
+}
+
+
+// disasm
+offs_t tms1000_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
+{
+ extern CPU_DISASSEMBLE(tms1000);
+ return CPU_DISASSEMBLE_NAME(tms1000)(this, buffer, pc, oprom, opram, options);
+}
+
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void tms1000_cpu_device::device_reset()
+{
+ // common reset
+ tms1k_base_device::device_reset();
+
+ // pre-decode instructionset
+ m_fixed_decode.resize(0x100);
+ memset(&m_fixed_decode[0], 0, 0x100*sizeof(UINT32));
+ m_micro_decode.resize(0x100);
+ memset(&m_micro_decode[0], 0, 0x100*sizeof(UINT32));
+
+ for (int op = 0; op < 0x100; op++)
+ {
+ // _____ _____ ______ _____ ______ _____ _____ _____ _____
+ const UINT32 md[16] = { M_STSL, M_AUTY, M_AUTA, M_CIN, M_C8, M_NE, M_CKN, M_15TN, M_MTN, M_NATN, M_ATN, M_MTP, M_YTP, M_CKP, M_CKM, M_STO };
+ UINT16 mask = m_mpla->read(op);
+ mask ^= 0x3fc8; // invert active-negative
+
+ for (int bit = 0; bit < 16; bit++)
+ if (mask & (1 << bit))
+ m_micro_decode[op] |= md[bit];
+ }
+
+ // the fixed instruction set is not programmable
+ m_fixed_decode[0x00] = F_COMX;
+ m_fixed_decode[0x0a] = F_TDO;
+ m_fixed_decode[0x0b] = F_CLO;
+ m_fixed_decode[0x0c] = F_RSTR;
+ m_fixed_decode[0x0d] = F_SETR;
+ m_fixed_decode[0x0f] = F_RETN;
+
+ for (int i = 0x10; i < 0x20; i++) m_fixed_decode[i] = F_LDP;
+ for (int i = 0x30; i < 0x34; i++) m_fixed_decode[i] = F_SBIT;
+ for (int i = 0x34; i < 0x38; i++) m_fixed_decode[i] = F_RBIT;
+ for (int i = 0x3c; i < 0x40; i++) m_fixed_decode[i] = F_LDX;
+
+ for (int i = 0x80; i < 0xc0; i++) m_fixed_decode[i] = F_BR;
+ for (int i = 0xc0; i < 0x100; i++) m_fixed_decode[i] = F_CALL;
+}
diff --git a/src/devices/cpu/tms1000/tms1000.h b/src/devices/cpu/tms1000/tms1000.h
new file mode 100644
index 00000000000..361e4e6fe83
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms1000.h
@@ -0,0 +1,55 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ TMS1000 family - TMS1000, TMS1070, TMS1040, TMS1200
+
+*/
+
+#ifndef _TMS1000_H_
+#define _TMS1000_H_
+
+#include "tms1k_base.h"
+
+
+class tms1000_cpu_device : public tms1k_base_device
+{
+public:
+ tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+
+protected:
+ // overrides
+ virtual void device_reset() override;
+ virtual machine_config_constructor device_mconfig_additions() const override;
+
+
+ virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
+};
+
+class tms1070_cpu_device : public tms1000_cpu_device
+{
+public:
+ tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+};
+
+class tms1040_cpu_device : public tms1000_cpu_device
+{
+public:
+ tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+};
+
+
+class tms1200_cpu_device : public tms1000_cpu_device
+{
+public:
+ tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+};
+
+
+extern const device_type TMS1000;
+extern const device_type TMS1070;
+extern const device_type TMS1040;
+extern const device_type TMS1200;
+
+#endif /* _TMS1000_H_ */
diff --git a/src/devices/cpu/tms1000/tms1100.cpp b/src/devices/cpu/tms1000/tms1100.cpp
new file mode 100644
index 00000000000..042a0bcf6bf
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms1100.cpp
@@ -0,0 +1,87 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ TMS1000 family - TMS1100, TMS1170, TMS1300, TMS1370
+
+*/
+
+#include "tms1100.h"
+#include "debugger.h"
+
+// TMS1100 is nearly the same as TMS1000, some different opcodes, and with double the RAM and ROM
+const device_type TMS1100 = &device_creator<tms1100_cpu_device>; // 28-pin DIP, 11 R pins
+const device_type TMS1170 = &device_creator<tms1170_cpu_device>; // high voltage version
+const device_type TMS1300 = &device_creator<tms1300_cpu_device>; // 40-pin DIP, 16 R pins
+const device_type TMS1370 = &device_creator<tms1370_cpu_device>; // high voltage version
+
+
+// internal memory maps
+static ADDRESS_MAP_START(program_11bit_8, AS_PROGRAM, 8, tms1k_base_device)
+ AM_RANGE(0x000, 0x7ff) AM_ROM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START(data_128x4, AS_DATA, 8, tms1k_base_device)
+ AM_RANGE(0x00, 0x7f) AM_RAM
+ADDRESS_MAP_END
+
+
+// device definitions
+tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms1000_cpu_device(mconfig, TMS1100, "TMS1100", tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 3 /* x width */, 11 /* prg width */, ADDRESS_MAP_NAME(program_11bit_8), 7 /* data width */, ADDRESS_MAP_NAME(data_128x4), "tms1100", __FILE__)
+{ }
+
+tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+ : tms1000_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
+{ }
+
+tms1170_cpu_device::tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms1100_cpu_device(mconfig, TMS1170, "TMS1170", tag, owner, clock, 8, 11, 6, 8, 3, 11, ADDRESS_MAP_NAME(program_11bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1170", __FILE__)
+{ }
+
+tms1300_cpu_device::tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms1100_cpu_device(mconfig, TMS1300, "TMS1300", tag, owner, clock, 8, 16, 6, 8, 3, 11, ADDRESS_MAP_NAME(program_11bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1300", __FILE__)
+{ }
+
+tms1370_cpu_device::tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms1100_cpu_device(mconfig, TMS1370, "TMS1370", tag, owner, clock, 8, 16, 6, 8, 3, 11, ADDRESS_MAP_NAME(program_11bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1370", __FILE__)
+{ }
+
+
+// disasm
+offs_t tms1100_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
+{
+ extern CPU_DISASSEMBLE(tms1100);
+ return CPU_DISASSEMBLE_NAME(tms1100)(this, buffer, pc, oprom, opram, options);
+}
+
+
+// device_reset
+void tms1100_cpu_device::device_reset()
+{
+ tms1000_cpu_device::device_reset();
+
+ // small differences in 00-3f area
+ m_fixed_decode[0x00] = 0;
+ m_fixed_decode[0x09] = F_COMX8; // !
+ m_fixed_decode[0x0b] = F_COMC;
+
+ for (int i = 0x28; i < 0x30; i++) m_fixed_decode[i] = F_LDX;
+ for (int i = 0x3c; i < 0x40; i++) m_fixed_decode[i] = 0;
+}
+
+
+// opcode deviations
+void tms1100_cpu_device::op_setr()
+{
+ // SETR: same, but X register MSB must be clear
+ if (~m_x & (1 << (m_x_bits-1)))
+ tms1k_base_device::op_setr();
+}
+
+void tms1100_cpu_device::op_rstr()
+{
+ // RSTR: same, but X register MSB must be clear
+ if (~m_x & (1 << (m_x_bits-1)))
+ tms1k_base_device::op_rstr();
+}
diff --git a/src/devices/cpu/tms1000/tms1100.h b/src/devices/cpu/tms1000/tms1100.h
new file mode 100644
index 00000000000..2a78af0f283
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms1100.h
@@ -0,0 +1,56 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ TMS1000 family - TMS1100, TMS1170, TMS1300, TMS1370
+
+*/
+
+#ifndef _TMS1100_H_
+#define _TMS1100_H_
+
+#include "tms1000.h"
+
+
+class tms1100_cpu_device : public tms1000_cpu_device
+{
+public:
+ tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+
+protected:
+ // overrides
+ virtual void device_reset() override;
+
+ virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
+
+ virtual void op_setr() override;
+ virtual void op_rstr() override;
+};
+
+class tms1170_cpu_device : public tms1100_cpu_device
+{
+public:
+ tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+};
+
+class tms1300_cpu_device : public tms1100_cpu_device
+{
+public:
+ tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+};
+
+class tms1370_cpu_device : public tms1100_cpu_device
+{
+public:
+ tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+};
+
+
+extern const device_type TMS1100;
+extern const device_type TMS1170;
+extern const device_type TMS1300;
+extern const device_type TMS1370;
+
+
+#endif /* _TMS1100_H_ */
diff --git a/src/devices/cpu/tms1000/tms1400.cpp b/src/devices/cpu/tms1000/tms1400.cpp
new file mode 100644
index 00000000000..e9246b18685
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms1400.cpp
@@ -0,0 +1,143 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ TMS1000 family - TMS1400, TMS1470, TMS1600, TMS1670
+
+ TODO:
+ - emulate TMS1600 L-pins
+
+*/
+
+#include "tms1400.h"
+#include "debugger.h"
+
+// TMS1400 follows the TMS1100, it doubles the ROM size again (4 chapters of 16 pages), and adds a 3-level callstack
+// - rotate the view and mirror the OR-mask to get the proper layout of the mpla, the default is identical to tms1100
+// - the opla size is increased from 20 to 32 terms
+const device_type TMS1400 = &device_creator<tms1400_cpu_device>; // 28-pin DIP, 11 R pins (TMS1400CR is same, but with TMS1100 pinout)
+const device_type TMS1470 = &device_creator<tms1470_cpu_device>; // high voltage version, 1 R pin removed for Vdd
+
+// TMS1600 adds more I/O to the TMS1400, input pins are doubled with added L1,2,4,8
+// - rotate the view and mirror the OR-mask to get the proper layout of the mpla, the default is identical to tms1100
+// - the opla size is increased from 20 to 32 terms
+const device_type TMS1600 = &device_creator<tms1600_cpu_device>; // 40-pin DIP, 16 R pins
+const device_type TMS1670 = &device_creator<tms1670_cpu_device>; // high voltage version
+
+
+// internal memory maps
+static ADDRESS_MAP_START(program_12bit_8, AS_PROGRAM, 8, tms1k_base_device)
+ AM_RANGE(0x000, 0xfff) AM_ROM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START(data_128x4, AS_DATA, 8, tms1k_base_device)
+ AM_RANGE(0x00, 0x7f) AM_RAM
+ADDRESS_MAP_END
+
+
+// device definitions
+tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms1100_cpu_device(mconfig, TMS1400, "TMS1400", tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 3 /* x width */, 12 /* prg width */, ADDRESS_MAP_NAME(program_12bit_8), 7 /* data width */, ADDRESS_MAP_NAME(data_128x4), "tms1400", __FILE__)
+{ }
+
+tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+ : tms1100_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
+{ }
+
+tms1470_cpu_device::tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms1400_cpu_device(mconfig, TMS1470, "TMS1470", tag, owner, clock, 8, 10, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1470", __FILE__)
+{ }
+
+
+tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms1400_cpu_device(mconfig, TMS1600, "TMS1600", tag, owner, clock, 8, 16, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1600", __FILE__)
+{ }
+
+tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+ : tms1400_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
+{ }
+
+tms1670_cpu_device::tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms1600_cpu_device(mconfig, TMS1670, "TMS1670", tag, owner, clock, 8, 16, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1670", __FILE__)
+{ }
+
+
+// machine configs
+static MACHINE_CONFIG_FRAGMENT(tms1400)
+
+ // microinstructions PLA, output PLA
+ MCFG_PLA_ADD("mpla", 8, 16, 30)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+ MCFG_PLA_ADD("opla", 5, 8, 32)
+ MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
+MACHINE_CONFIG_END
+
+machine_config_constructor tms1400_cpu_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME(tms1400);
+}
+
+
+// device_reset
+void tms1400_cpu_device::device_reset()
+{
+ tms1100_cpu_device::device_reset();
+
+ // small differences in 00-3f area
+ m_fixed_decode[0x0b] = F_TPC;
+}
+
+
+// opcode deviations
+void tms1400_cpu_device::op_br()
+{
+ // BR/BL: conditional branch
+ if (m_status)
+ {
+ m_pa = m_pb; // don't care about clatch
+ m_ca = m_cb;
+ m_pc = m_opcode & m_pc_mask;
+ }
+}
+
+void tms1400_cpu_device::op_call()
+{
+ // CALL/CALLL: conditional call
+ if (m_status)
+ {
+ // 3-level stack, mask clatch 3 bits (no need to mask others)
+ m_clatch = (m_clatch << 1 | 1) & 7;
+
+ m_sr = m_sr << m_pc_bits | m_pc;
+ m_pc = m_opcode & m_pc_mask;
+
+ m_ps = m_ps << 4 | m_pa;
+ m_pa = m_pb;
+
+ m_cs = m_cs << 2 | m_ca;
+ m_ca = m_cb;
+ }
+ else
+ {
+ m_pb = m_pa;
+ m_cb = m_ca;
+ }
+}
+
+void tms1400_cpu_device::op_retn()
+{
+ // RETN: return from subroutine
+ if (m_clatch & 1)
+ {
+ m_clatch >>= 1;
+
+ m_pc = m_sr & m_pc_mask;
+ m_sr >>= m_pc_bits;
+
+ m_pa = m_pb = m_ps & 0xf;
+ m_ps >>= 4;
+
+ m_ca = m_cb = m_cs & 3;
+ m_cs >>= 2;
+ }
+}
diff --git a/src/devices/cpu/tms1000/tms1400.h b/src/devices/cpu/tms1000/tms1400.h
new file mode 100644
index 00000000000..0b73babc223
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms1400.h
@@ -0,0 +1,61 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ TMS1000 family - TMS1400, TMS1470, TMS1600, TMS1670
+
+*/
+
+#ifndef _TMS1400_H_
+#define _TMS1400_H_
+
+#include "tms1100.h"
+
+
+class tms1400_cpu_device : public tms1100_cpu_device
+{
+public:
+ tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+
+protected:
+ // overrides
+ virtual void device_reset() override;
+ virtual machine_config_constructor device_mconfig_additions() const override;
+
+ virtual void op_br() override;
+ virtual void op_call() override;
+ virtual void op_retn() override;
+
+ virtual void op_setr() override { tms1k_base_device::op_setr(); } // no anomaly with MSB of X register
+ virtual void op_rstr() override { tms1k_base_device::op_rstr(); } // "
+};
+
+class tms1470_cpu_device : public tms1400_cpu_device
+{
+public:
+ tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+};
+
+
+class tms1600_cpu_device : public tms1400_cpu_device
+{
+public:
+ tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+};
+
+class tms1670_cpu_device : public tms1600_cpu_device
+{
+public:
+ tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+};
+
+
+extern const device_type TMS1400;
+extern const device_type TMS1470;
+extern const device_type TMS1600;
+extern const device_type TMS1670;
+
+
+#endif /* _TMS1400_H_ */
diff --git a/src/devices/cpu/tms1000/tms1k_base.cpp b/src/devices/cpu/tms1000/tms1k_base.cpp
new file mode 100644
index 00000000000..10e041b5104
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms1k_base.cpp
@@ -0,0 +1,635 @@
+// license:BSD-3-Clause
+// copyright-holders:Wilbert Pol, hap
+/*
+
+ TMS1000 family - base/shared
+
+ TODO:
+ - fix debugger disasm view
+
+
+The TMS0980 and TMS1000-family MCU cores are very similar. The TMS0980 has a
+slightly bigger addressable area and uses 9bit instructions where the TMS1000
+family uses 8bit instruction. The instruction set themselves are very similar
+though.
+
+Each instruction takes 12 cycles to execute in 2 phases: a fetch phase and an
+execution phase. The execution phase takes place at the same time as the fetch
+phase of the next instruction. So, during execution there are both fetch and
+execution operations taking place. The operation can be split up as follows:
+cycle #0
+ - Fetch:
+ 1. ROM address 0
+ - Execute:
+ 1. Read RAM
+ 2. Clear ALU inputs
+ 3. Execute BRANCH/CALL/RETN part #2
+ 4. K input valid
+cycle #1
+ - Fetch:
+ 1. ROM address 1
+ - Execute:
+ 1. Update ALU inputs
+cycle #2
+ - Fetch:
+ 1. nothing/wait(?)
+ - Execute:
+ 1. Perform ALU operation
+ 2. Write RAM
+cycle #3
+ - Fetch:
+ 1. Fetch/Update PC/RAM address #1
+ - Execute:
+ 1. Register store part #1
+cycle #4
+ - Fetch:
+ 1. Fetch/Update PC/RAM address #2
+ - Execute:
+ 1. Register store part #2
+cycle #5
+ - Fetch:
+ 1. Instruction decode
+ - Execute:
+ 1. Execute BRANCH/CALL/RETN part #1
+
+The MCU cores contains a set of fixed instructions and a set of
+instructions created using microinstructions. A subset of the
+instruction set could be defined from the microinstructions by
+TI customers.
+
+cycle #0: 15TN, ATN, CIN, CKN, CKP, DMTP, MTN, MTP, NATN, NDMTP, YTP
+cycle #2: C8(?), CKM, NE(?), STO
+cycle #3,#4: AUTA, AUTY
+
+unknown cycle: CME, SSE, SSS
+
+*/
+
+#include "tms1k_base.h"
+#include "debugger.h"
+
+// disasm
+void tms1k_base_device::state_string_export(const device_state_entry &entry, std::string &str) const
+{
+ switch (entry.index())
+ {
+ case STATE_GENPC:
+ str = string_format("%03X", m_rom_address << ((m_byte_bits > 8) ? 1 : 0));
+ break;
+ }
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+enum
+{
+ TMS1XXX_PC=1, TMS1XXX_SR, TMS1XXX_PA, TMS1XXX_PB,
+ TMS1XXX_A, TMS1XXX_X, TMS1XXX_Y, TMS1XXX_STATUS
+};
+
+void tms1k_base_device::device_start()
+{
+ m_program = &space(AS_PROGRAM);
+ m_data = &space(AS_DATA);
+
+ m_o_mask = (1 << m_o_pins) - 1;
+ m_r_mask = (1 << m_r_pins) - 1;
+ m_pc_mask = (1 << m_pc_bits) - 1;
+ m_x_mask = (1 << m_x_bits) - 1;
+
+ // resolve callbacks
+ m_read_k.resolve_safe(0);
+ m_write_o.resolve_safe();
+ m_write_r.resolve_safe();
+ m_power_off.resolve_safe();
+
+ // zerofill
+ m_pc = 0;
+ m_sr = 0;
+ m_pa = 0;
+ m_pb = 0;
+ m_ps = 0;
+ m_a = 0;
+ m_x = 0;
+ m_y = 0;
+ m_ca = 0;
+ m_cb = 0;
+ m_cs = 0;
+ m_r = 0;
+ m_o = 0;
+ m_cki_bus = 0;
+ m_c4 = 0;
+ m_p = 0;
+ m_n = 0;
+ m_adder_out = 0;
+ m_carry_in = 0;
+ m_carry_out = 0;
+ m_status = 0;
+ m_status_latch = 0;
+ m_eac = 0;
+ m_clatch = 0;
+ m_add = 0;
+ m_bl = 0;
+
+ m_ram_in = 0;
+ m_dam_in = 0;
+ m_ram_out = 0;
+ m_ram_address = 0;
+ m_rom_address = 0;
+ m_opcode = 0;
+ m_fixed = 0;
+ m_micro = 0;
+ m_subcycle = 0;
+
+ // register for savestates
+ save_item(NAME(m_pc));
+ save_item(NAME(m_sr));
+ save_item(NAME(m_pa));
+ save_item(NAME(m_pb));
+ save_item(NAME(m_ps));
+ save_item(NAME(m_a));
+ save_item(NAME(m_x));
+ save_item(NAME(m_y));
+ save_item(NAME(m_ca));
+ save_item(NAME(m_cb));
+ save_item(NAME(m_cs));
+ save_item(NAME(m_r));
+ save_item(NAME(m_o));
+ save_item(NAME(m_cki_bus));
+ save_item(NAME(m_c4));
+ save_item(NAME(m_p));
+ save_item(NAME(m_n));
+ save_item(NAME(m_adder_out));
+ save_item(NAME(m_carry_in));
+ save_item(NAME(m_carry_out));
+ save_item(NAME(m_status));
+ save_item(NAME(m_status_latch));
+ save_item(NAME(m_eac));
+ save_item(NAME(m_clatch));
+ save_item(NAME(m_add));
+ save_item(NAME(m_bl));
+
+ save_item(NAME(m_ram_in));
+ save_item(NAME(m_dam_in));
+ save_item(NAME(m_ram_out));
+ save_item(NAME(m_ram_address));
+ save_item(NAME(m_rom_address));
+ save_item(NAME(m_opcode));
+ save_item(NAME(m_fixed));
+ save_item(NAME(m_micro));
+ save_item(NAME(m_subcycle));
+
+ // register state for debugger
+ state_add(TMS1XXX_PC, "PC", m_pc ).formatstr("%02X");
+ state_add(TMS1XXX_SR, "SR", m_sr ).formatstr("%01X");
+ state_add(TMS1XXX_PA, "PA", m_pa ).formatstr("%01X");
+ state_add(TMS1XXX_PB, "PB", m_pb ).formatstr("%01X");
+ state_add(TMS1XXX_A, "A", m_a ).formatstr("%01X");
+ state_add(TMS1XXX_X, "X", m_x ).formatstr("%01X");
+ state_add(TMS1XXX_Y, "Y", m_y ).formatstr("%01X");
+ state_add(TMS1XXX_STATUS, "STATUS", m_status).formatstr("%01X");
+
+ state_add(STATE_GENPC, "curpc", m_rom_address).formatstr("%03X").noshow();
+ state_add(STATE_GENFLAGS, "GENFLAGS", m_sr).formatstr("%8s").noshow();
+
+ m_icountptr = &m_icount;
+}
+
+
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void tms1k_base_device::device_reset()
+{
+ m_pa = 0xf;
+ m_pb = 0xf;
+ m_pc = 0;
+ m_ca = 0;
+ m_cb = 0;
+ m_cs = 0;
+
+ m_eac = 0;
+ m_bl = 0;
+ m_add = 0;
+
+ m_opcode = 0;
+ m_micro = 0;
+ m_fixed = 0;
+
+ m_subcycle = 0;
+
+ // clear outputs
+ m_r = 0;
+ m_write_r(0, m_r & m_r_mask, 0xffff);
+ write_o_output(0);
+ m_write_r(0, m_r & m_r_mask, 0xffff);
+ m_power_off(0);
+}
+
+
+
+//-------------------------------------------------
+// program counter/opcode decode
+//-------------------------------------------------
+
+void tms1k_base_device::next_pc()
+{
+ // The program counter is a LFSR. To put it simply, the feedback bit is a XOR of the two highest bits,
+ // but it makes an exception when all low bits are set (eg. in TMS1000 case, when PC is 0x1f or 0x3f).
+ int high = 1 << (m_pc_bits - 1);
+ int fb = (m_pc << 1 & high) == (m_pc & high);
+
+ if (m_pc == (m_pc_mask >> 1))
+ fb = 1;
+ else if (m_pc == m_pc_mask)
+ fb = 0;
+
+ m_pc = (m_pc << 1 | fb) & m_pc_mask;
+}
+
+void tms1k_base_device::read_opcode()
+{
+ debugger_instruction_hook(this, m_rom_address);
+ m_opcode = m_program->read_byte(m_rom_address);
+ m_c4 = BITSWAP8(m_opcode,7,6,5,4,0,1,2,3) & 0xf; // opcode operand is bitswapped for most opcodes
+
+ m_fixed = m_fixed_decode[m_opcode];
+ m_micro = m_micro_decode[m_opcode];
+
+ next_pc();
+}
+
+
+
+//-------------------------------------------------
+// i/o handling
+//-------------------------------------------------
+
+void tms1k_base_device::write_o_output(UINT8 index)
+{
+ // a hardcoded table is supported if the output pla is unknown
+ m_o = (m_output_pla_table == nullptr) ? m_opla->read(index) : m_output_pla_table[index];
+ m_write_o(0, m_o & m_o_mask, 0xffff);
+}
+
+UINT8 tms1k_base_device::read_k_input()
+{
+ // K1,2,4,8 (KC test pin is not emulated)
+ return m_read_k(0, 0xff) & 0xf;
+}
+
+void tms1k_base_device::set_cki_bus()
+{
+ switch (m_opcode & 0xf8)
+ {
+ // 00001XXX: K-inputs
+ case 0x08:
+ m_cki_bus = read_k_input();
+ break;
+
+ // 0011XXXX: select bit
+ case 0x30: case 0x38:
+ m_cki_bus = 1 << (m_c4 >> 2) ^ 0xf;
+ break;
+
+ // 01XXXXXX: constant
+ case 0x00: // R2,3,4 are NANDed with eachother, and then ORed with R1, making 00000XXX valid too
+ case 0x40: case 0x48: case 0x50: case 0x58: case 0x60: case 0x68: case 0x70: case 0x78:
+ m_cki_bus = m_c4;
+ break;
+
+ default:
+ m_cki_bus = 0;
+ break;
+ }
+}
+
+
+
+//-------------------------------------------------
+// fixed opcode set
+//-------------------------------------------------
+
+// handle branches:
+
+// TMS1000/common
+// note: add(latch) and bl(branch latch) are specific to 0980 series,
+// c(chapter) bits are specific to 1100(and 1400) series
+
+void tms1k_base_device::op_br()
+{
+ // BR/BL: conditional branch
+ if (m_status)
+ {
+ if (m_clatch == 0)
+ m_pa = m_pb;
+ m_ca = m_cb;
+ m_pc = m_opcode & m_pc_mask;
+ }
+}
+
+void tms1k_base_device::op_call()
+{
+ // CALL/CALLL: conditional call
+ if (m_status)
+ {
+ UINT8 prev_pa = m_pa;
+
+ if (m_clatch == 0)
+ {
+ m_clatch = 1;
+ m_sr = m_pc;
+ m_pa = m_pb;
+ m_cs = m_ca;
+ }
+ m_ca = m_cb;
+ m_pb = prev_pa;
+ m_pc = m_opcode & m_pc_mask;
+ }
+}
+
+void tms1k_base_device::op_retn()
+{
+ // RETN: return from subroutine
+ if (m_clatch == 1)
+ {
+ m_clatch = 0;
+ m_pc = m_sr;
+ m_ca = m_cs;
+ }
+ m_add = 0;
+ m_bl = 0;
+ m_pa = m_pb;
+}
+
+
+// handle other:
+
+// TMS1000/common
+
+void tms1k_base_device::op_sbit()
+{
+ // SBIT: set memory bit
+ if (m_ram_out == -1)
+ m_ram_out = m_ram_in;
+ m_ram_out |= (m_cki_bus ^ 0xf);
+}
+
+void tms1k_base_device::op_rbit()
+{
+ // RBIT: reset memory bit
+ if (m_ram_out == -1)
+ m_ram_out = m_ram_in;
+ m_ram_out &= m_cki_bus;
+}
+
+void tms1k_base_device::op_setr()
+{
+ // SETR: set one R-output line
+ m_r = m_r | (1 << m_y);
+ m_write_r(0, m_r & m_r_mask, 0xffff);
+}
+
+void tms1k_base_device::op_rstr()
+{
+ // RSTR: reset one R-output line
+ m_r = m_r & ~(1 << m_y);
+ m_write_r(0, m_r & m_r_mask, 0xffff);
+}
+
+void tms1k_base_device::op_tdo()
+{
+ // TDO: transfer accumulator and status latch to O-output
+ write_o_output(m_status_latch << 4 | m_a);
+}
+
+void tms1k_base_device::op_clo()
+{
+ // CLO: clear O-output
+ write_o_output(0);
+}
+
+void tms1k_base_device::op_ldx()
+{
+ // LDX: load X register with (x_bits) constant
+ m_x = m_c4 >> (4-m_x_bits);
+}
+
+void tms1k_base_device::op_comx()
+{
+ // COMX: complement X register
+ m_x ^= m_x_mask;
+}
+
+void tms1k_base_device::op_comx8()
+{
+ // COMX8: complement MSB of X register
+ // note: on TMS1100, the mnemonic is simply called "COMX"
+ m_x ^= 1 << (m_x_bits-1);
+}
+
+void tms1k_base_device::op_ldp()
+{
+ // LDP: load page buffer with constant
+ m_pb = m_c4;
+}
+
+
+// TMS1100-specific
+
+void tms1k_base_device::op_comc()
+{
+ // COMC: complement chapter buffer
+ m_cb ^= 1;
+}
+
+
+// TMS1400-specific
+
+void tms1k_base_device::op_tpc()
+{
+ // TPC: transfer page buffer to chapter buffer
+ m_cb = m_pb & 3;
+}
+
+
+// TMS0980-specific (and possibly child classes)
+
+void tms1k_base_device::op_xda()
+{
+ // XDA: exchange DAM and A
+ // note: setting A to DAM is done with DMTP and AUTA during this instruction
+ m_ram_address |= (0x10 << (m_x_bits-1));
+}
+
+void tms1k_base_device::op_off()
+{
+ // OFF: request auto power-off
+ m_power_off(1);
+}
+
+void tms1k_base_device::op_seac()
+{
+ // SEAC: set end around carry
+ m_eac = 1;
+}
+
+void tms1k_base_device::op_reac()
+{
+ // REAC: reset end around carry
+ m_eac = 0;
+}
+
+void tms1k_base_device::op_sal()
+{
+ // SAL: set add latch (reset is done with RETN)
+ m_add = 1;
+}
+
+void tms1k_base_device::op_sbl()
+{
+ // SBL: set branch latch (reset is done with RETN)
+ m_bl = 1;
+}
+
+
+
+//-------------------------------------------------
+// execute_run
+//-------------------------------------------------
+
+void tms1k_base_device::execute_run()
+{
+ do
+ {
+ m_icount--;
+ switch (m_subcycle)
+ {
+ case 0:
+ // fetch: rom address 1/2
+
+ // execute: br/call 2/2
+ if (m_fixed & F_BR) op_br();
+ if (m_fixed & F_CALL) op_call();
+ if (m_fixed & F_RETN) op_retn();
+
+ // execute: k input valid, read ram, clear alu inputs
+ dynamic_output();
+ set_cki_bus();
+ m_ram_in = m_data->read_byte(m_ram_address) & 0xf;
+ m_dam_in = m_data->read_byte(m_ram_address | (0x10 << (m_x_bits-1))) & 0xf;
+ m_p = 0;
+ m_n = 0;
+ m_carry_in = 0;
+
+ break;
+
+ case 1:
+ // fetch: rom address 2/2
+ m_rom_address = (m_ca << (m_pc_bits+4)) | (m_pa << m_pc_bits) | m_pc;
+
+ // execute: update alu inputs
+ // N inputs
+ if (m_micro & M_15TN) m_n |= 0xf;
+ if (m_micro & M_ATN) m_n |= m_a;
+ if (m_micro & M_NATN) m_n |= (~m_a & 0xf);
+ if (m_micro & M_CKN) m_n |= m_cki_bus;
+ if (m_micro & M_MTN) m_n |= m_ram_in;
+
+ // P inputs
+ if (m_micro & M_CKP) m_p |= m_cki_bus;
+ if (m_micro & M_MTP) m_p |= m_ram_in;
+ if (m_micro & M_YTP) m_p |= m_y;
+ if (m_micro & M_DMTP) m_p |= m_dam_in;
+ if (m_micro & M_NDMTP) m_p |= (~m_dam_in & 0xf);
+
+ // carry input
+ if (m_micro & M_CIN) m_carry_in |= 1;
+ if (m_micro & M_SSS) m_carry_in |= m_eac;
+
+ break;
+
+ case 2:
+ {
+ // fetch: nothing
+
+ // execute: perform alu logic
+ // note: officially, only 1 alu operation is allowed per opcode
+ m_adder_out = m_p + m_n + m_carry_in;
+ int carry_out = m_adder_out >> 4 & 1;
+ int status = 1;
+ m_ram_out = -1;
+
+ if (m_micro & M_C8) status &= carry_out;
+ if (m_micro & M_NE) status &= (m_n != m_p); // COMP
+ if (m_micro & M_CKM) m_ram_out = m_cki_bus;
+
+ // special status circuit
+ if (m_micro & M_SSE)
+ {
+ m_eac = m_carry_out;
+ if (m_add)
+ m_eac |= carry_out;
+ }
+ m_carry_out = carry_out;
+
+ if (m_micro & M_STO || (m_micro & M_CME && m_eac == m_add))
+ m_ram_out = m_a;
+
+ // handle the other fixed opcodes here
+ if (m_fixed & F_SBIT) op_sbit();
+ if (m_fixed & F_RBIT) op_rbit();
+ if (m_fixed & F_SETR) op_setr();
+ if (m_fixed & F_RSTR) op_rstr();
+ if (m_fixed & F_TDO) op_tdo();
+ if (m_fixed & F_CLO) op_clo();
+ if (m_fixed & F_LDX) op_ldx();
+ if (m_fixed & F_COMX) op_comx();
+ if (m_fixed & F_COMX8) op_comx8();
+ if (m_fixed & F_LDP) op_ldp();
+ if (m_fixed & F_COMC) op_comc();
+ if (m_fixed & F_TPC) op_tpc();
+ if (m_fixed & F_OFF) op_off();
+ if (m_fixed & F_SEAC) op_seac();
+ if (m_fixed & F_REAC) op_reac();
+ if (m_fixed & F_SAL) op_sal();
+ if (m_fixed & F_SBL) op_sbl();
+ if (m_fixed & F_XDA) op_xda();
+
+ // after fixed opcode handling: store status, write ram
+ m_status = status;
+ if (m_ram_out != -1)
+ m_data->write_byte(m_ram_address, m_ram_out);
+
+ break;
+ }
+
+ case 3:
+ // fetch: update pc, ram address 1/2
+ // execute: register store 1/2
+ break;
+
+ case 4:
+ // execute: register store 2/2
+ if (m_micro & M_AUTA) m_a = m_adder_out & 0xf;
+ if (m_micro & M_AUTY) m_y = m_adder_out & 0xf;
+ if (m_micro & M_STSL) m_status_latch = m_status;
+
+ // fetch: update pc, ram address 2/2
+ read_opcode();
+ m_ram_address = m_x << 4 | m_y;
+ break;
+
+ case 5:
+ // fetch: instruction decode (handled above, before next_pc)
+ // execute: br/call 1/2
+ break;
+ }
+ m_subcycle = (m_subcycle + 1) % 6;
+ } while (m_icount > 0);
+}
diff --git a/src/devices/cpu/tms1000/tms1k_base.h b/src/devices/cpu/tms1000/tms1k_base.h
new file mode 100644
index 00000000000..9ad108b1dca
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms1k_base.h
@@ -0,0 +1,299 @@
+// license:BSD-3-Clause
+// copyright-holders:Wilbert Pol, hap
+/*
+
+ TMS1000 family - base/shared
+
+ Don't include this file, include the specific device header instead,
+ for example tms1000.h
+
+*/
+
+#ifndef _TMS1KBASE_H_
+#define _TMS1KBASE_H_
+
+#include "emu.h"
+#include "machine/pla.h"
+
+
+// K input pins
+#define MCFG_TMS1XXX_READ_K_CB(_devcb) \
+ tms1k_base_device::set_read_k_callback(*device, DEVCB_##_devcb);
+
+// O/Segment output pins
+#define MCFG_TMS1XXX_WRITE_O_CB(_devcb) \
+ tms1k_base_device::set_write_o_callback(*device, DEVCB_##_devcb);
+
+// Use this if the output PLA is unknown:
+// If the microinstructions (or other) PLA is unknown, try using one from another romset.
+#define MCFG_TMS1XXX_OUTPUT_PLA(_pla) \
+ tms1k_base_device::set_output_pla(*device, _pla);
+
+// R output pins (also called D on some chips)
+#define MCFG_TMS1XXX_WRITE_R_CB(_devcb) \
+ tms1k_base_device::set_write_r_callback(*device, DEVCB_##_devcb);
+
+// OFF request on TMS0980 and up
+#define MCFG_TMS1XXX_POWER_OFF_CB(_devcb) \
+ tms1k_base_device::set_power_off_callback(*device, DEVCB_##_devcb);
+
+
+// pinout reference
+
+/*
+
+ ____ ____ ____ ____
+ R8 1 |* \_/ | 28 R7 R0 1 |* \_/ | 28 Vss
+ R9 2 | | 27 R6 R1 2 | | 27 OSC2
+ R10 3 | | 26 R5 R2 3 | | 26 OSC1
+ Vdd 4 | | 25 R4 R3 4 | | 25 O0
+ K1 5 | | 24 R3 R4 5 | | 24 O1
+ K2 6 | TMS1000 | 23 R2 R5 6 | | 23 O2
+ K4 7 | TMS1070 | 22 R1 R6 7 | TMS1400 | 22 O3
+ K8 8 | TMS1100 | 21 R0 R7 8 | | 21 O4
+ INIT 9 | TMS1170 | 20 Vss R8 9 | | 20 O5
+ O7 10 | | 19 OSC2 R9 10 | | 19 O6
+ O6 11 | | 18 OSC1 R10 11 | | 18 O7
+ O5 12 | | 17 O0 Vdd 12 | | 17 K8
+ O4 13 | | 16 O1 INIT 13 | | 16 K4
+ O3 14 |___________| 15 O2 K1 14 |___________| 15 K2
+
+
+ ____ ____
+ R2 1 |* \_/ | 28 R3
+ R1 2 | | 27 R4
+ R0 3 | | 26 R5
+ ? 4 | | 25 R6
+ Vdd 5 | | 24 R7
+ K3 6 | | 23 R8
+ K8 7 | TMS0980 | 22 ?
+ K4 8 | | 21 ?
+ K2 9 | | 20 Vss
+ K1 10 | | 19 ?
+ O7 11 | | 18 O0
+ O6 12 | | 17 O1
+ O5 13 | | 16 O2
+ O4 14 |___________| 15 O3
+
+ note: TMS0980 official pin names for R0-R8 is D9-D1, O0-O7 is S(A-G,DP)
+
+*/
+
+
+class tms1k_base_device : public cpu_device
+{
+public:
+ // construction/destruction
+ tms1k_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+ : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source)
+ , m_program_config("program", ENDIANNESS_BIG, byte_bits > 8 ? 16 : 8, prgwidth, 0, program)
+ , m_data_config("data", ENDIANNESS_BIG, 8, datawidth, 0, data)
+ , m_mpla(*this, "mpla")
+ , m_ipla(*this, "ipla")
+ , m_opla(*this, "opla")
+ , m_spla(*this, "spla")
+ , m_o_pins(o_pins)
+ , m_r_pins(r_pins)
+ , m_pc_bits(pc_bits)
+ , m_byte_bits(byte_bits)
+ , m_x_bits(x_bits)
+ , m_output_pla_table(nullptr)
+ , m_read_k(*this)
+ , m_write_o(*this)
+ , m_write_r(*this)
+ , m_power_off(*this)
+ { }
+
+ // static configuration helpers
+ template<class _Object> static devcb_base &set_read_k_callback(device_t &device, _Object object) { return downcast<tms1k_base_device &>(device).m_read_k.set_callback(object); }
+ template<class _Object> static devcb_base &set_write_o_callback(device_t &device, _Object object) { return downcast<tms1k_base_device &>(device).m_write_o.set_callback(object); }
+ template<class _Object> static devcb_base &set_write_r_callback(device_t &device, _Object object) { return downcast<tms1k_base_device &>(device).m_write_r.set_callback(object); }
+ template<class _Object> static devcb_base &set_power_off_callback(device_t &device, _Object object) { return downcast<tms1k_base_device &>(device).m_power_off.set_callback(object); }
+ static void set_output_pla(device_t &device, const UINT16 *output_pla) { downcast<tms1k_base_device &>(device).m_output_pla_table = output_pla; }
+
+ // microinstructions
+ enum
+ {
+ M_15TN = (1<<0), /* 15 to -ALU */
+ M_ATN = (1<<1), /* ACC to -ALU */
+ M_AUTA = (1<<2), /* ALU to ACC */
+ M_AUTY = (1<<3), /* ALU to Y */
+ M_C8 = (1<<4), /* CARRY8 to STATUS */
+ M_CIN = (1<<5), /* Carry In to ALU */
+ M_CKM = (1<<6), /* CKB to MEM */
+ M_CKN = (1<<7), /* CKB to -ALU */
+ M_CKP = (1<<8), /* CKB to +ALU */
+ M_MTN = (1<<9), /* MEM to -ALU */
+ M_MTP = (1<<10), /* MEM to +ALU */
+ M_NATN = (1<<11), /* ~ACC to -ALU */
+ M_NE = (1<<12), /* COMP to STATUS */
+ M_STO = (1<<13), /* ACC to MEM */
+ M_STSL = (1<<14), /* STATUS to Status Latch */
+ M_YTP = (1<<15), /* Y to +ALU */
+
+ M_CME = (1<<16), /* Conditional Memory Enable */
+ M_DMTP = (1<<17), /* DAM to +ALU */
+ M_NDMTP = (1<<18), /* ~DAM to +ALU */
+ M_SSE = (1<<19), /* Special Status Enable */
+ M_SSS = (1<<20), /* Special Status Sample */
+
+ M_SETR = (1<<21), /* -> line #0d, F_SETR (TP0320 custom), */
+ M_RSTR = (1<<22), /* -> line #36, F_RSTR (TMS02x0 custom), */
+ M_UNK1 = (1<<23) /* -> line #37, F_???? (TMS0270 custom), */
+ };
+
+ // standard/fixed instructions - these are documented more in their specific handlers
+ enum
+ {
+ F_BR = (1<<0),
+ F_CALL = (1<<1),
+ F_CLO = (1<<2),
+ F_COMC = (1<<3),
+ F_COMX = (1<<4),
+ F_COMX8 = (1<<5),
+ F_LDP = (1<<6),
+ F_LDX = (1<<7),
+ F_RBIT = (1<<8),
+ F_RETN = (1<<9),
+ F_RSTR = (1<<10),
+ F_SBIT = (1<<11),
+ F_SETR = (1<<12),
+ F_TDO = (1<<13),
+ F_TPC = (1<<14),
+
+ F_OFF = (1<<15),
+ F_REAC = (1<<16),
+ F_SAL = (1<<17),
+ F_SBL = (1<<18),
+ F_SEAC = (1<<19),
+ F_XDA = (1<<20)
+ };
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ // device_execute_interface overrides
+ virtual UINT32 execute_min_cycles() const override { return 1; }
+ virtual UINT32 execute_max_cycles() const override { return 6; }
+ virtual UINT32 execute_input_lines() const override { return 1; }
+ virtual void execute_run() override;
+
+ // device_memory_interface overrides
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
+
+ // device_disasm_interface overrides
+ virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
+ virtual UINT32 disasm_max_opcode_bytes() const override { return 1; }
+
+ // device_state_interface overrides
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
+
+ void next_pc();
+
+ virtual void write_o_output(UINT8 index);
+ virtual UINT8 read_k_input();
+ virtual void set_cki_bus();
+ virtual void dynamic_output() { ; } // not used by default
+ virtual void read_opcode();
+
+ virtual void op_br();
+ virtual void op_call();
+ virtual void op_retn();
+
+ virtual void op_sbit();
+ virtual void op_rbit();
+ virtual void op_setr();
+ virtual void op_rstr();
+ virtual void op_tdo();
+ virtual void op_clo();
+ virtual void op_ldx();
+ virtual void op_comx();
+ virtual void op_comx8();
+ virtual void op_ldp();
+
+ virtual void op_comc();
+ virtual void op_tpc();
+ virtual void op_xda();
+ virtual void op_off();
+ virtual void op_seac();
+ virtual void op_reac();
+ virtual void op_sal();
+ virtual void op_sbl();
+
+ address_space_config m_program_config;
+ address_space_config m_data_config;
+
+ optional_device<pla_device> m_mpla;
+ optional_device<pla_device> m_ipla;
+ optional_device<pla_device> m_opla;
+ optional_device<pla_device> m_spla;
+
+ UINT8 m_pc; // 6 or 7-bit program counter
+ UINT32 m_sr; // 6 or 7-bit subroutine return register(s)
+ UINT8 m_pa; // 4-bit page address register
+ UINT8 m_pb; // 4-bit page buffer register
+ UINT16 m_ps; // 4-bit page subroutine register(s)
+ UINT8 m_a; // 4-bit accumulator
+ UINT8 m_x; // 2,3,or 4-bit RAM X register
+ UINT8 m_y; // 4-bit RAM Y register
+ UINT8 m_ca; // chapter address register
+ UINT8 m_cb; // chapter buffer register
+ UINT16 m_cs; // chapter subroutine register(s)
+ UINT16 m_r;
+ UINT16 m_o;
+ UINT8 m_cki_bus;
+ UINT8 m_c4;
+ UINT8 m_p; // 4-bit adder p(lus)-input
+ UINT8 m_n; // 4-bit adder n(egative)-input
+ UINT8 m_adder_out; // adder result
+ UINT8 m_carry_in; // adder carry-in bit
+ UINT8 m_carry_out; // adder carry-out bit
+ UINT8 m_status;
+ UINT8 m_status_latch;
+ UINT8 m_eac; // end around carry bit
+ UINT8 m_clatch; // call latch bit(s)
+ UINT8 m_add; // add latch bit
+ UINT8 m_bl; // branch latch bit
+
+ UINT8 m_ram_in;
+ UINT8 m_dam_in;
+ int m_ram_out; // signed!
+ UINT8 m_ram_address;
+ UINT16 m_rom_address;
+ UINT16 m_opcode;
+ UINT32 m_fixed;
+ UINT32 m_micro;
+ int m_subcycle;
+ int m_icount;
+
+ UINT8 m_o_pins; // how many O pins
+ UINT8 m_r_pins; // how many R pins
+ UINT8 m_pc_bits; // how many program counter bits
+ UINT8 m_byte_bits; // how many bits per 'byte'
+ UINT8 m_x_bits; // how many X register bits
+
+ address_space *m_program;
+ address_space *m_data;
+
+ const UINT16 *m_output_pla_table;
+ devcb_read8 m_read_k;
+ devcb_write16 m_write_o;
+ devcb_write16 m_write_r;
+ devcb_write_line m_power_off;
+
+ UINT32 m_o_mask;
+ UINT32 m_r_mask;
+ UINT32 m_k_mask;
+ UINT32 m_pc_mask;
+ UINT32 m_x_mask;
+
+ // lookup tables
+ std::vector<UINT32> m_fixed_decode;
+ std::vector<UINT32> m_micro_decode;
+ std::vector<UINT32> m_micro_direct;
+};
+
+
+#endif /* _TMS1KBASE_H_ */
diff --git a/src/devices/cpu/tms1000/tms1k_dasm.cpp b/src/devices/cpu/tms1000/tms1k_dasm.cpp
new file mode 100644
index 00000000000..054d4f09699
--- /dev/null
+++ b/src/devices/cpu/tms1000/tms1k_dasm.cpp
@@ -0,0 +1,281 @@
+// license:BSD-3-Clause
+// copyright-holders:Wilbert Pol, hap
+/*
+
+ TMS0980/TMS1000-family disassembler
+
+*/
+
+#include "emu.h"
+#include "debugger.h"
+#include "tms1k_base.h"
+
+
+enum e_mnemonics
+{
+ zILL = 0,
+ zA10AAC, zA6AAC, zA8AAC, zAC1AC, zACACC, zACNAA, zALEC, zALEM, zAMAAC, zBRANCH, zCALL, zCCLA,
+ zCLA, zCLO, zCOMC, zCOMX, zCOMX8, zCPAIZ, zCTMDYN, zDAN, zDMAN, zDMEA, zDNAA,
+ zDYN, zIA, zIMAC, zIYC, zKNEZ, zLDP, zLDX2, zLDX3, zLDX4, zMNEA, zMNEZ,
+ zNDMEA, zOFF, zRBIT, zREAC, zRETN, zRSTR, zSAL, zSAMAN, zSBIT,
+ zSBL, zSEAC, zSETR, zTAM, zTAMACS, zTAMDYN, zTAMIY, zTAMIYC, zTAMZA,
+ zTAY, zTBIT, zTCMIY, zTCY, zTDO, zTKA, zTKM, zTMA,
+ zTMY, zTYA, zXDA, zXMA, zYMCY, zYNEA, zYNEC
+};
+
+static const char *const s_mnemonic[] =
+{
+ "?",
+ "A10AAC", "A6AAC", "A8AAC", "AC1AC", "ACACC", "ACNAA", "ALEC", "ALEM", "AMAAC", "BRANCH", "CALL", "CCLA",
+ "CLA", "CLO", "COMC", "COMX", "COMX8", "CPAIZ", "CTMDYN", "DAN", "DMAN", "DMEA", "DNAA",
+ "DYN", "IA", "IMAC", "IYC", "KNEZ", "LDP", "LDX", "LDX", "LDX", "MNEA", "MNEZ",
+ "NDMEA", "OFF", "RBIT", "REAC", "RETN", "RSTR", "SAL", "SAMAN", "SBIT",
+ "SBL", "SEAC", "SETR", "TAM", "TAMACS", "TAMDYN", "TAMIY", "TAMIYC", "TAMZA",
+ "TAY", "TBIT", "TCMIY", "TCY", "TDO", "TKA", "TKM", "TMA",
+ "TMY", "TYA", "XDA", "XMA", "YMCY", "YNEA", "YNEC"
+};
+
+
+#define _OVER DASMFLAG_STEP_OVER
+#define _OUT DASMFLAG_STEP_OUT
+
+static const UINT32 s_flags[] =
+{
+ 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _OVER, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, _OUT, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0
+};
+
+
+enum e_addressing
+{
+ zB0 = 0, zI2, zI3, zI4, zB7
+};
+
+static const UINT8 s_addressing[] =
+{
+ zB0,
+ zB0, zB0, zB0, zI4, zI4, zI4, zI4, zB0, zB0, zB7, zB7, zB0,
+ zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0,
+ zB0, zB0, zB0, zB0, zB0, zI4, zI2, zI3, zI4, zB0, zB0,
+ zB0, zB0, zI2, zB0, zB0, zB0, zB0, zB0, zI2,
+ zB0, zB0, zB0, zB0, zI4, zB0, zB0, zB0, zB0,
+ zB0, zI2, zI4, zI4, zB0, zB0, zB0, zB0,
+ zB0, zB0, zB0, zB0, zI4, zB0, zI4
+};
+
+
+
+// opcode luts
+
+static const UINT8 tms1000_mnemonic[256] =
+{
+/* 0x00 */
+ zCOMX, zA8AAC, zYNEA, zTAM, zTAMZA, zA10AAC, zA6AAC, zDAN, zTKA, zKNEZ, zTDO, zCLO, zRSTR, zSETR, zIA, zRETN, // 0
+ zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, // 1
+ zTAMIY, zTMA, zTMY, zTYA, zTAY, zAMAAC, zMNEZ, zSAMAN, zIMAC, zALEM, zDMAN, zIYC, zDYN, zCPAIZ, zXMA, zCLA, // 2
+ zSBIT, zSBIT, zSBIT, zSBIT, zRBIT, zRBIT, zRBIT, zRBIT, zTBIT, zTBIT, zTBIT, zTBIT, zLDX2, zLDX2, zLDX2, zLDX2, // 3
+ zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, // 4
+ zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, // 5
+ zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, // 6
+ zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, // 7
+/* 0x80 */
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 8
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 9
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // A
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // B
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // C
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // D
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // E
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL // F
+/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
+};
+
+
+static const UINT8 tms1100_mnemonic[256] =
+{
+/* 0x00 */
+ zMNEA, zALEM, zYNEA, zXMA, zDYN, zIYC, zAMAAC, zDMAN, zTKA, zCOMX, zTDO, zCOMC, zRSTR, zSETR, zKNEZ, zRETN, // 0
+ zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, // 1
+ zTAY, zTMA, zTMY, zTYA, zTAMDYN, zTAMIYC, zTAMZA, zTAM, zLDX3, zLDX3, zLDX3, zLDX3, zLDX3, zLDX3, zLDX3, zLDX3, // 2
+ zSBIT, zSBIT, zSBIT, zSBIT, zRBIT, zRBIT, zRBIT, zRBIT, zTBIT, zTBIT, zTBIT, zTBIT, zSAMAN, zCPAIZ, zIMAC, zMNEZ, // 3
+ zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, // 4
+ zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, // 5
+ zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, // 6
+ zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zCLA, // 7
+/* 0x80 */
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 8
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 9
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // A
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // B
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // C
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // D
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // E
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL // F
+/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
+};
+
+
+static const UINT8 tms0980_mnemonic[512] =
+{
+/* 0x000 */
+ zCOMX, zALEM, zYNEA, zXMA, zDYN, zIYC, zCLA, zDMAN, zTKA, zMNEA, zTKM, 0, 0, zSETR, zKNEZ, 0, // 0
+ zDMEA, zDNAA, zCCLA, zNDMEA, 0, zAMAAC, 0, 0, zCTMDYN, zXDA, 0, 0, 0, 0, 0, 0, // 1
+ zTBIT, zTBIT, zTBIT, zTBIT, 0, 0, 0, 0, zTAY, zTMA, zTMY, zTYA, zTAMDYN, zTAMIYC, zTAMZA, zTAM, // 2
+ zSAMAN, zCPAIZ, zIMAC, zMNEZ, 0, 0, 0, 0, zTCY, zYNEC, zTCMIY, zACACC, zACNAA, zTAMACS, zALEC, zYMCY, // 3
+ zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, // 4
+ zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, // 5
+ zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, // 6
+ zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, // 7
+/* 0x080 */
+ zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, // 8
+ zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, // 9
+ zSBIT, zSBIT, zSBIT, zSBIT, zRBIT, zRBIT, zRBIT, zRBIT, 0, 0, 0, 0, 0, 0, 0, 0, // A
+ zTDO, zSAL, zCOMX8, zSBL, zREAC, zSEAC, zOFF, 0, 0, 0, 0, 0, 0, 0, 0, zRETN, // B
+ zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, // C
+ zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, // D
+ zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, // E
+ zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, // F
+/* 0x100 */
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 0
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 1
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 2
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 3
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 4
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 5
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 6
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 7
+/* 0x180 */
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // 8
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // 9
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // A
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // B
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // C
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // D
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // E
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL // F
+/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
+};
+
+
+static const UINT8 tp0320_mnemonic[512] =
+{
+/* 0x000 */
+ 0, zALEM, zYNEA, zXMA, zDYN, zIYC, zCLA, zDMAN, zTKA, zMNEA, zTKM, 0, 0, zSETR, zKNEZ, 0, // 0
+ zDMEA, zDNAA, zCCLA, zNDMEA, 0, zAMAAC, 0, 0, zCTMDYN, zXDA, 0, 0, 0, 0, 0, 0, // 1
+ zTBIT, zTBIT, zTBIT, zTBIT, 0, 0, 0, 0, zTAY, zTMA, zTMY, zTYA, zTAMDYN, zTAMIYC, zTAMZA, zTAM, // 2
+ zSAMAN, zCPAIZ, zIMAC, zMNEZ, 0, 0, zRSTR, zYMCY, zTCY, zYNEC, zTCMIY, zACACC, zACNAA, zTAMACS, zALEC, 0, // 3
+ zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, // 4
+ zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, // 5
+ zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, // 6
+ zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, // 7
+/* 0x080 */
+ zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, // 8
+ zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, // 9
+ zSBIT, zSBIT, zSBIT, zSBIT, zRBIT, zRBIT, zRBIT, zRBIT, 0, 0, 0, 0, 0, 0, 0, 0, // A
+ zTDO, zSAL, zCOMX8, zSBL, zREAC, zSEAC, zOFF, 0, 0, 0, 0, 0, 0, 0, 0, zRETN, // B
+ zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, // C
+ zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, // D
+ zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, // E
+ zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, // F
+/* 0x100 */
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 0
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 1
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 2
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 3
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 4
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 5
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 6
+ zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 7
+/* 0x180 */
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // 8
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // 9
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // A
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // B
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // C
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // D
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // E
+ zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL // F
+/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
+};
+
+
+
+// disasm
+
+static const UINT8 i2_value[4] =
+{
+ 0, 2, 1, 3
+};
+
+static const UINT8 i3_value[8] =
+{
+ 0, 4, 2, 6, 1, 5, 3, 7
+};
+
+static const UINT8 i4_value[16] =
+{
+ 0x0, 0x8, 0x4, 0xc, 0x2, 0xa, 0x6, 0xe, 0x1, 0x9, 0x5, 0xd, 0x3, 0xb, 0x7, 0xf
+};
+
+static offs_t tms1k_dasm(char *dst, const UINT8 *oprom, const UINT8 *lut_mnemonic, UINT16 opcode_mask)
+{
+ // get current opcode
+ int pos = 0;
+ UINT16 op = oprom[pos++];
+ if (opcode_mask & 0x100)
+ op = (op << 8 | oprom[pos++]) & 0x1ff;
+
+ // convert to mnemonic/param
+ UINT16 instr = lut_mnemonic[op];
+ dst += sprintf(dst, "%-8s ", s_mnemonic[instr]);
+
+ switch( s_addressing[instr] )
+ {
+ case zI2:
+ dst += sprintf(dst, "%d", i2_value[op & 0x03]);
+ break;
+ case zI3:
+ dst += sprintf(dst, "%d", i3_value[op & 0x07]);
+ break;
+ case zI4:
+ dst += sprintf(dst, "%d", i4_value[op & 0x0f]);
+ break;
+ case zB7:
+ if (opcode_mask & 0x100)
+ dst += sprintf(dst, "$%02X", op << 1 & 0xfe);
+ else
+ dst += sprintf(dst, "$%02X", op & 0x3f);
+ break;
+ default:
+ break;
+ }
+
+ return pos | s_flags[instr] | DASMFLAG_SUPPORTED;
+}
+
+
+CPU_DISASSEMBLE(tms1000)
+{
+ return tms1k_dasm(buffer, oprom, tms1000_mnemonic, 0xff);
+}
+
+CPU_DISASSEMBLE(tms1100)
+{
+ return tms1k_dasm(buffer, oprom, tms1100_mnemonic, 0xff);
+}
+
+CPU_DISASSEMBLE(tms0980)
+{
+ return tms1k_dasm(buffer, oprom, tms0980_mnemonic, 0x1ff);
+}
+
+CPU_DISASSEMBLE(tp0320)
+{
+ return tms1k_dasm(buffer, oprom, tp0320_mnemonic, 0x1ff);
+}
diff --git a/src/devices/cpu/tms1000/tp0320.cpp b/src/devices/cpu/tms1000/tp0320.cpp
new file mode 100644
index 00000000000..177396e36aa
--- /dev/null
+++ b/src/devices/cpu/tms1000/tp0320.cpp
@@ -0,0 +1,46 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ TMS1000 family - TP0320
+
+*/
+
+#include "tp0320.h"
+#include "debugger.h"
+
+// TP0320 is TI's first CMOS MCU with integrated LCD controller, the die is still very similar to TMS0980
+// - 2048x9bit ROM, same as on TMS0980 with different row-select
+// - 192x4bit RAM array at the bottom-left (set up as 16x12x4)
+// - 16x4bit LCD RAM, above main RAM array
+// - main instructions PLAs at the same position as TMS0980, fixed opcodes:
+// * LDP, RETN, OFF, bb?, be?, b9?, ba?, RBIT, SBIT, COMX8, bc?, LDX, XDA, TDO, SEAC, REAC, SAL, SBL
+// - 64-term microinstructions PLA between the RAM and ROM, similar to TMS0980,
+// plus separate lines for custom opcode handling like TMS0270, used for SETR and RSTR
+// - 24-term output PLA above LCD RAM
+const device_type TP0320 = &device_creator<tp0320_cpu_device>; // 28-pin SDIP, ..
+
+
+// internal memory maps
+static ADDRESS_MAP_START(program_11bit_9, AS_PROGRAM, 16, tms1k_base_device)
+ AM_RANGE(0x000, 0xfff) AM_ROM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START(data_192x4, AS_DATA, 8, tms1k_base_device)
+ AM_RANGE(0x00, 0x7f) AM_RAM
+ AM_RANGE(0x80, 0xbf) AM_RAM AM_MIRROR(0x40) // DAM
+ADDRESS_MAP_END
+
+
+// device definitions
+tp0320_cpu_device::tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : tms0980_cpu_device(mconfig, TP0320, "TP0320", tag, owner, clock, 7 /* o pins */, 10 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 12 /* prg width */, ADDRESS_MAP_NAME(program_11bit_9), 8 /* data width */, ADDRESS_MAP_NAME(data_192x4), "tp0320", __FILE__)
+{ }
+
+
+// disasm
+offs_t tp0320_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
+{
+ extern CPU_DISASSEMBLE(tp0320);
+ return CPU_DISASSEMBLE_NAME(tp0320)(this, buffer, pc, oprom, opram, options);
+}
diff --git a/src/devices/cpu/tms1000/tp0320.h b/src/devices/cpu/tms1000/tp0320.h
new file mode 100644
index 00000000000..9b110abdf40
--- /dev/null
+++ b/src/devices/cpu/tms1000/tp0320.h
@@ -0,0 +1,32 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ TMS1000 family - TP0320
+
+*/
+
+#ifndef _TP0320_H_
+#define _TP0320_H_
+
+#include "tms0980.h"
+
+
+class tp0320_cpu_device : public tms0980_cpu_device
+{
+public:
+ tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // overrides
+ //virtual void device_start() override;
+ //virtual void device_reset() override;
+ virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
+
+ //virtual machine_config_constructor device_mconfig_additions() const override;
+};
+
+
+extern const device_type TP0320;
+
+#endif /* _TP0320_H_ */
diff --git a/src/devices/machine/atapicdr.cpp b/src/devices/machine/atapicdr.cpp
index 151d8d1bb10..13fd79570dd 100644
--- a/src/devices/machine/atapicdr.cpp
+++ b/src/devices/machine/atapicdr.cpp
@@ -72,11 +72,15 @@ void atapi_cdrom_device::device_start()
m_identify_buffer[ 49 ] = 0x0600; // Word 49=Capabilities, IORDY may be disabled (bit_10), LBA Supported mandatory (bit_9)
- m_media_change = true;
-
atapi_hle_device::device_start();
}
+void atapi_cdrom_device::device_reset()
+{
+ atapi_hle_device::device_reset();
+ m_media_change = true;
+}
+
void atapi_cdrom_device::process_buffer()
{
if(m_cdrom != m_image->get_cdrom_file())
@@ -130,10 +134,10 @@ void atapi_cdrom_device::ExecCommand()
}
break;
case T10SPC_CMD_INQUIRY:
+ break;
case T10SPC_CMD_REQUEST_SENSE:
+ m_media_change = false;
break;
}
t10mmc::ExecCommand();
- if((command[0] == T10SPC_CMD_REQUEST_SENSE) && m_media_change)
- m_media_change = false;
}
diff --git a/src/devices/machine/atapicdr.h b/src/devices/machine/atapicdr.h
index 2c310113c5c..dc5220c000d 100644
--- a/src/devices/machine/atapicdr.h
+++ b/src/devices/machine/atapicdr.h
@@ -28,6 +28,7 @@ public:
protected:
// device-level overrides
virtual void device_start() override;
+ virtual void device_reset() override;
virtual machine_config_constructor device_mconfig_additions() const override;
virtual void perform_diagnostic() override;
diff --git a/src/devices/video/pc_vga.cpp b/src/devices/video/pc_vga.cpp
index 7710e3402c3..80cbae9b225 100644
--- a/src/devices/video/pc_vga.cpp
+++ b/src/devices/video/pc_vga.cpp
@@ -224,6 +224,17 @@ TIMER_CALLBACK_MEMBER(vga_device::vblank_timer_cb)
m_vblank_timer->adjust( machine().first_screen()->time_until_pos(vga.crtc.vert_blank_start + vga.crtc.vert_blank_end) );
}
+TIMER_CALLBACK_MEMBER(s3_vga_device::vblank_timer_cb)
+{
+ // not sure if this is correct, but XF86_S3 seems to expect the viewport scrolling to be faster
+ if(s3.memory_config & 0x08)
+ vga.crtc.start_addr = vga.crtc.start_addr_latch << 2;
+ else
+ vga.crtc.start_addr = vga.crtc.start_addr_latch;
+ vga.attribute.pel_shift = vga.attribute.pel_shift_latch;
+ m_vblank_timer->adjust( machine().first_screen()->time_until_pos(vga.crtc.vert_blank_start + vga.crtc.vert_blank_end) );
+}
+
void vga_device::device_start()
{
zero();
@@ -1051,50 +1062,53 @@ UINT32 s3_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
// printf("%08x: %02x %02x %02x %02x\n",src+x*4,vga.memory[src+x*4],vga.memory[src+x*4+1],vga.memory[src+x*4+2],vga.memory[src+x*4+3]);
for(y=0;y<64;y++)
{
- dst = &bitmap.pix32(cy + y, cx);
- for(x=0;x<64;x++)
+ if(cy + y < cliprect.max_y && cx < cliprect.max_x)
{
- UINT16 bita = (vga.memory[(src+1) % vga.svga_intf.vram_size] | ((vga.memory[(src+0) % vga.svga_intf.vram_size]) << 8)) >> (15-(x % 16));
- UINT16 bitb = (vga.memory[(src+3) % vga.svga_intf.vram_size] | ((vga.memory[(src+2) % vga.svga_intf.vram_size]) << 8)) >> (15-(x % 16));
- val = ((bita & 0x01) << 1) | (bitb & 0x01);
- if(s3.extended_dac_ctrl & 0x10)
- { // X11 mode
- switch(val)
- {
- case 0x00:
- // no change
- break;
- case 0x01:
- // no change
- break;
- case 0x02:
- dst[x] = bg_col;
- break;
- case 0x03:
- dst[x] = fg_col;
- break;
+ dst = &bitmap.pix32(cy + y, cx);
+ for(x=0;x<64;x++)
+ {
+ UINT16 bita = (vga.memory[(src+1) % vga.svga_intf.vram_size] | ((vga.memory[(src+0) % vga.svga_intf.vram_size]) << 8)) >> (15-(x % 16));
+ UINT16 bitb = (vga.memory[(src+3) % vga.svga_intf.vram_size] | ((vga.memory[(src+2) % vga.svga_intf.vram_size]) << 8)) >> (15-(x % 16));
+ val = ((bita & 0x01) << 1) | (bitb & 0x01);
+ if(s3.extended_dac_ctrl & 0x10)
+ { // X11 mode
+ switch(val)
+ {
+ case 0x00:
+ // no change
+ break;
+ case 0x01:
+ // no change
+ break;
+ case 0x02:
+ dst[x] = bg_col;
+ break;
+ case 0x03:
+ dst[x] = fg_col;
+ break;
+ }
}
- }
- else
- { // Windows mode
- switch(val)
- {
- case 0x00:
- dst[x] = bg_col;
- break;
- case 0x01:
- dst[x] = fg_col;
- break;
- case 0x02: // screen data
- // no change
- break;
- case 0x03: // inverted screen data
- dst[x] = ~(dst[x]);
- break;
+ else
+ { // Windows mode
+ switch(val)
+ {
+ case 0x00:
+ dst[x] = bg_col;
+ break;
+ case 0x01:
+ dst[x] = fg_col;
+ break;
+ case 0x02: // screen data
+ // no change
+ break;
+ case 0x03: // inverted screen data
+ dst[x] = ~(dst[x]);
+ break;
+ }
}
+ if(x % 16 == 15)
+ src+=4;
}
- if(x % 16 == 15)
- src+=4;
}
}
}
@@ -3388,7 +3402,6 @@ void ibm8514a_device::ibm8514_write(UINT32 offset, UINT32 src)
{
int data_size = 8;
UINT32 xfer;
- address_space& space = machine().device("maincpu")->memory().space(AS_PROGRAM);
switch(ibm8514.pixel_control & 0x00c0)
{
@@ -3428,6 +3441,7 @@ void ibm8514a_device::ibm8514_write(UINT32 offset, UINT32 src)
ibm8514.src_x = 0;
break;
case 0x00c0: // use source plane
+ address_space& space = machine().device("maincpu")->memory().space(AS_PROGRAM);
if(m_vga->mem_linear_r(space,src,0xff) != 0x00)
ibm8514_write_fg(offset);
else
diff --git a/src/devices/video/pc_vga.h b/src/devices/video/pc_vga.h
index 9c729ba7a6e..a7f0552ffdb 100644
--- a/src/devices/video/pc_vga.h
+++ b/src/devices/video/pc_vga.h
@@ -568,6 +568,7 @@ public:
virtual UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) override;
virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual TIMER_CALLBACK_MEMBER(vblank_timer_cb) override;
ibm8514a_device* get_8514() { return m_8514; }
protected:
diff --git a/src/emu/attotime.h b/src/emu/attotime.h
index 0cdaa424ca0..a0915ae07f2 100644
--- a/src/emu/attotime.h
+++ b/src/emu/attotime.h
@@ -117,17 +117,6 @@ public:
UINT64 as_ticks(UINT32 frequency) const;
const char *as_string(int precision = 9) const;
- // Needed by gba.c FIXME: this shouldn't be necessary?
-
- void normalize()
- {
- while (m_attoseconds >= ATTOSECONDS_PER_SECOND)
- {
- m_seconds++;
- m_attoseconds -= ATTOSECONDS_PER_SECOND;
- }
- }
-
attoseconds_t attoseconds() const { return m_attoseconds; }
seconds_t seconds() const { return m_seconds; }
diff --git a/src/emu/debug/dvdisasm.cpp b/src/emu/debug/dvdisasm.cpp
index 6daca107f86..10cb3e75e64 100644
--- a/src/emu/debug/dvdisasm.cpp
+++ b/src/emu/debug/dvdisasm.cpp
@@ -370,6 +370,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines)
// allocate disassembly buffer
const auto total_bytes = m_total.x * m_total.y;
+ m_dasm.clear();
m_dasm.reserve(total_bytes).seekp(total_bytes);
// iterate over lines
@@ -387,6 +388,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines)
// convert back and set the address of this instruction
m_byteaddress[instr] = pcbyte;
+ m_dasm.clear();
util::stream_format(m_dasm.seekp(base),
source.m_space.is_octal() ? " %0*o " : " %0*X ",
source.m_space.logaddrchars()/2*char_num, source.m_space.byte_to_address(pcbyte));
diff --git a/src/emu/fileio.cpp b/src/emu/fileio.cpp
index b8e0c433575..e0d7cdd7772 100644
--- a/src/emu/fileio.cpp
+++ b/src/emu/fileio.cpp
@@ -835,11 +835,11 @@ osd_file::error emu_file::attempt__7zped()
if (fileno != -1)
{
m__7zfile = std::move(_7z);
- m__7zlength = _7z->current_uncompressed_length();
+ m__7zlength = m__7zfile->current_uncompressed_length();
// build a hash with just the CRC
m_hashes.reset();
- m_hashes.add_crc(_7z->current_crc());
+ m_hashes.add_crc(m__7zfile->current_crc());
return (m_openflags & OPEN_FLAG_NO_PRELOAD) ? osd_file::error::NONE : load__7zped_file();
}
diff --git a/src/emu/mconfig.h b/src/emu/mconfig.h
index dc1a2e99b0a..4fb118ca1c5 100644
--- a/src/emu/mconfig.h
+++ b/src/emu/mconfig.h
@@ -1,12 +1,13 @@
// license:BSD-3-Clause
// copyright-holders:Aaron Giles
-/***************************************************************************
+/***************************************************************************/
+/**
+ * @file mconfig.h
+ * @defgroup MACHINE_CONFIG Machine configuration macros and functions
+ * @{
+ */
+/***************************************************************************/
- mconfig.h
-
- Machine configuration macros and functions.
-
-***************************************************************************/
#pragma once
@@ -81,26 +82,52 @@ private:
};
+//*************************************************************************/
+/** @name Machine config start/end macros */
+//*************************************************************************/
-//**************************************************************************
-// MACHINE CONFIG MACROS
-//**************************************************************************
-
-// start/end tags for the machine driver
+/**
+ @def MACHINE_CONFIG_NAME(_name)
+ Returns the internal name for the machine config.
+ @param _name name of desired config
+ @hideinitializer
+ */
#define MACHINE_CONFIG_NAME(_name) construct_machine_config_##_name
+/**
+ @def MACHINE_CONFIG_START(_name, _class)
+ Begins a new machine config.
+ @param _name name of this config
+ @param _class driver_device class for this config
+ @hideinitializer
+ */
#define MACHINE_CONFIG_START(_name, _class) \
ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t *owner, device_t *device) \
{ \
devcb_base *devcb = NULL; \
(void)devcb; \
if (owner == NULL) owner = config.device_add(NULL, "root", &driver_device_creator<_class>, 0);
+
+/**
+ @def MACHINE_CONFIG_FRAGMENT(_name)
+ Begins a partial machine_config that can only be included in another "root" machine_config. This is also used for machine_configs that are specified as part of a device.
+ @param _name name of this config fragment
+ @hideinitializer
+*/
#define MACHINE_CONFIG_FRAGMENT(_name) \
ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t *owner, device_t *device) \
{ \
devcb_base *devcb = NULL; \
(void)devcb; \
assert(owner != NULL);
+
+/**
+ @def MACHINE_CONFIG_DERIVED(_name, _base)
+ Begins a machine_config that is derived from another machine_config.
+ @param _name name of this config
+ @param _base name of the parent config
+ @hideinitializer
+*/
#define MACHINE_CONFIG_DERIVED(_name, _base) \
ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t *owner, device_t *device) \
{ \
@@ -108,6 +135,15 @@ ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t
(void)devcb; \
owner = MACHINE_CONFIG_NAME(_base)(config, owner, device); \
assert(owner != NULL);
+
+/**
+@def MACHINE_CONFIG_DERIVED_CLASS(_name, _base, _class)
+Begins a machine_config that is derived from another machine_config that can specify an alternate driver_device class
+@param _name name of this config
+@param _base name of the parent config
+@param _class name of the alternate driver_device class
+@hideinitializer
+*/
#define MACHINE_CONFIG_DERIVED_CLASS(_name, _base, _class) \
ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t *owner, device_t *device) \
{ \
@@ -115,14 +151,32 @@ ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t
(void)devcb; \
if (owner == NULL) owner = config.device_add(NULL, "root", &driver_device_creator<_class>, 0); \
owner = MACHINE_CONFIG_NAME(_base)(config, owner, device);
+
+/**
+@def MACHINE_CONFIG_END
+Ends a machine_config.
+@hideinitializer
+*/
#define MACHINE_CONFIG_END \
return owner; \
}
-// use this to declare external references to a machine driver
+//*************************************************************************/
+/** @name Standalone machine config macros */
+//*************************************************************************/
+
+/**
+@def MACHINE_CONFIG_EXTERN(_name)
+References an external machine config.
+@param _name Name of the machine config to reference
+@hideinitializer
+*/
#define MACHINE_CONFIG_EXTERN(_name) \
extern device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t *owner, device_t *device)
+//*************************************************************************/
+/** @name Core machine config options */
+//*************************************************************************/
// importing data from other machine drivers
#define MCFG_FRAGMENT_ADD(_name) \
@@ -160,3 +214,4 @@ ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t
device = config.device_find(owner, _tag);
#endif /* __MCONFIG_H__ */
+ /** @} */
diff --git a/src/emu/rendfont.cpp b/src/emu/rendfont.cpp
index 27a14bb0d55..bcd1ca35d78 100644
--- a/src/emu/rendfont.cpp
+++ b/src/emu/rendfont.cpp
@@ -123,7 +123,7 @@ render_font::render_font(render_manager &manager, const char *filename)
m_yoffs(0),
m_scale(1.0f),
m_rawsize(0),
- m_osdfont(nullptr),
+ m_osdfont(),
m_height_cmd(0),
m_yoffs_cmd(0)
{
@@ -134,19 +134,18 @@ render_font::render_font(render_manager &manager, const char *filename)
if (filename != nullptr)
{
m_osdfont = manager.machine().osd().font_alloc();
- if (m_osdfont != nullptr)
+ if (m_osdfont)
{
if (m_osdfont->open(manager.machine().options().font_path(), filename, m_height))
{
- m_scale = 1.0f / (float)m_height;
- m_format = FF_OSD;
+ m_scale = 1.0f / (float)m_height;
+ m_format = FF_OSD;
- //mamep: allocate command glyph font
- render_font_command_glyph();
- return;
- }
- global_free(m_osdfont);
- m_osdfont = nullptr;
+ //mamep: allocate command glyph font
+ render_font_command_glyph();
+ return;
+ }
+ m_osdfont.reset();
}
}
@@ -199,13 +198,6 @@ render_font::~render_font()
}
delete[] elem;
}
-
- // release the OSD font
- if (m_osdfont != nullptr)
- {
- m_osdfont->close();
- global_free(m_osdfont);
- }
}
diff --git a/src/emu/rendfont.h b/src/emu/rendfont.h
index 1f05babd789..b2ec2f12568 100644
--- a/src/emu/rendfont.h
+++ b/src/emu/rendfont.h
@@ -96,14 +96,14 @@ private:
int m_height; // height of the font, from ascent to descent
int m_yoffs; // y offset from baseline to descent
float m_scale; // 1 / height precomputed
- glyph *m_glyphs[256]; // array of glyph subtables
+ glyph *m_glyphs[256]; // array of glyph subtables
std::vector<char> m_rawdata; // pointer to the raw data for the font
UINT64 m_rawsize; // size of the raw font data
- osd_font *m_osdfont; // handle to the OSD font
+ std::unique_ptr<osd_font> m_osdfont; // handle to the OSD font
int m_height_cmd; // height of the font, from ascent to descent
int m_yoffs_cmd; // y offset from baseline to descent
- glyph *m_glyphs_cmd[256]; // array of glyph subtables
+ glyph *m_glyphs_cmd[256]; // array of glyph subtables
std::vector<char> m_rawdata_cmd; // pointer to the raw data for the font
// constants
diff --git a/src/emu/ui/custui.cpp b/src/emu/ui/custui.cpp
index a6279ac5b54..14f5cefc4b6 100644
--- a/src/emu/ui/custui.cpp
+++ b/src/emu/ui/custui.cpp
@@ -9,14 +9,16 @@
*********************************************************************/
#include "emu.h"
+#include "ui/custui.h"
+
#include "ui/ui.h"
-#include "ui/menu.h"
#include "ui/selector.h"
-#include "ui/custui.h"
#include "ui/utils.h"
+
#include <algorithm>
-const char *ui_menu_custom_ui::hide_status[] = {
+
+const char *const ui_menu_custom_ui::hide_status[] = {
__("Show All"),
__("Hide Filters"),
__("Hide Info/Image"),
@@ -192,24 +194,23 @@ void ui_menu_custom_ui::custom_render(void *selectedref, float top, float bottom
ui_menu_font_ui::ui_menu_font_ui(running_machine &machine, render_container *container) : ui_menu(machine, container)
{
ui_options &moptions = machine.ui().options();
-#ifdef UI_WINDOWS
-
std::string name(machine.options().ui_font());
list();
+#ifdef UI_WINDOWS
m_bold = (strreplace(name, "[B]", "") + strreplace(name, "[b]", "") > 0);
m_italic = (strreplace(name, "[I]", "") + strreplace(name, "[i]", "") > 0);
+#endif
m_actual = 0;
for (size_t index = 0; index < m_fonts.size(); index++)
{
- if (m_fonts[index] == name)
+ if (m_fonts[index].first == name)
{
m_actual = index;
break;
}
}
-#endif
m_info_size = moptions.infos_size();
m_font_size = moptions.font_rows();
@@ -231,43 +232,17 @@ ui_menu_font_ui::ui_menu_font_ui(running_machine &machine, render_container *con
}
-#ifdef UI_WINDOWS
-//-------------------------------------------------
-// fonts enumerator CALLBACK
-//-------------------------------------------------
-
-int CALLBACK ui_menu_font_ui::EnumFontFamiliesExProc(const LOGFONT *lpelfe, const TEXTMETRIC *lpntme, DWORD FontType, LPARAM lParam)
-{
- std::vector<std::string> *lpc = (std::vector<std::string>*)lParam;
- std::string utf((char *)lpelfe->lfFaceName);
- if (utf[0] != '@')
- lpc->push_back(utf);
-
- return 1;
-}
-
//-------------------------------------------------
// create fonts list
//-------------------------------------------------
void ui_menu_font_ui::list()
{
- // create LOGFONT structure
- LOGFONT lf;
- lf.lfCharSet = ANSI_CHARSET;
- lf.lfFaceName[0] = '\0';
-
- HDC hDC = GetDC( nullptr );
- EnumFontFamiliesEx( hDC, &lf, (FONTENUMPROC)EnumFontFamiliesExProc, (LPARAM)&m_fonts, 0 );
- ReleaseDC( nullptr, hDC );
-
- // sort
- std::stable_sort(m_fonts.begin(), m_fonts.end());
+ machine().osd().get_font_families(machine().options().font_path(), m_fonts);
// add default string to the top of array
- m_fonts.insert(m_fonts.begin(), std::string(_("default")));
+ m_fonts.emplace(m_fonts.begin(), std::string("default"), std::string(_("default")));
}
-#endif
//-------------------------------------------------
// dtor
@@ -278,18 +253,18 @@ ui_menu_font_ui::~ui_menu_font_ui()
std::string error_string;
ui_options &moptions = machine().ui().options();
+ std::string name(m_fonts[m_actual].first);
#ifdef UI_WINDOWS
- std::string name(m_fonts[m_actual]);
- if (m_fonts[m_actual] != "default")
+ if (name != "default")
{
if (m_italic)
name.insert(0, "[I]");
if (m_bold)
name.insert(0, "[B]");
}
+#endif
machine().options().set_value(OPTION_UI_FONT, name.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
machine().options().mark_changed(OPTION_UI_FONT);
-#endif
moptions.set_value(OPTION_INFOS_SIZE, m_info_size, OPTION_PRIORITY_CMDLINE, error_string);
moptions.set_value(OPTION_FONT_ROWS, m_font_size, OPTION_PRIORITY_CMDLINE, error_string);
@@ -325,7 +300,6 @@ void ui_menu_font_ui::handle()
}
break;
-#ifdef UI_WINDOWS
case MUI_FNT:
if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
@@ -335,11 +309,15 @@ void ui_menu_font_ui::handle()
}
else if (m_event->iptkey == IPT_UI_SELECT)
{
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_fonts, m_actual));
+ std::vector<std::string> display_names;
+ display_names.reserve(m_fonts.size());
+ for (auto const &font : m_fonts) display_names.emplace_back(font.second);
+ ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, std::move(display_names), m_actual));
changed = true;
}
break;
+#ifdef UI_WINDOWS
case MUI_BOLD:
case MUI_ITALIC:
if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT)
@@ -364,13 +342,12 @@ void ui_menu_font_ui::populate()
// set filter arrow
UINT32 arrow_flags;
-#ifdef UI_WINDOWS
// add fonts option
arrow_flags = get_arrow_flags(0, m_fonts.size() - 1, m_actual);
- std::string name(m_fonts[m_actual]);
- item_append(_("UI Font"), name.c_str(), arrow_flags, (void *)(FPTR)MUI_FNT);
+ item_append(_("UI Font"), m_fonts[m_actual].second.c_str(), arrow_flags, (void *)(FPTR)MUI_FNT);
- if (name != "default")
+#ifdef UI_WINDOWS
+ if (m_fonts[m_actual].first != "default")
{
item_append(_("Bold"), m_bold ? "On" : "Off", m_bold ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_BOLD);
item_append(_("Italic"), m_italic ? "On" : "Off", m_italic ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_ITALIC);
diff --git a/src/emu/ui/custui.h b/src/emu/ui/custui.h
index 2ff13994cb6..46f42967b6a 100644
--- a/src/emu/ui/custui.h
+++ b/src/emu/ui/custui.h
@@ -10,13 +10,14 @@
#pragma once
-#ifndef __UI_CUSTUI_H__
-#define __UI_CUSTUI_H__
+#ifndef MAME_EMU_UI_UI_CUSTUI_H
+#define MAME_EMU_UI_UI_CUSTUI_H
+
+#include "ui/menu.h"
+
+#include <vector>
+#include <string>
-#ifdef UI_WINDOWS
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#endif
//-------------------------------------------------
// Custom UI menu
@@ -39,9 +40,9 @@ private:
COLORS_MENU,
HIDE_MENU
};
- static const char *hide_status[];
+ static const char *const hide_status[];
std::vector<std::string> m_lang;
- UINT16 m_currlang;
+ std::uint16_t m_currlang;
};
//-------------------------------------------------
@@ -67,14 +68,12 @@ private:
MUI_ITALIC
};
-#ifdef UI_WINDOWS
- UINT16 m_actual;
- std::vector<std::string> m_fonts;
- bool m_bold, m_italic;
-
void list();
- static int CALLBACK EnumFontFamiliesExProc(const LOGFONT *lpelfe, const TEXTMETRIC *lpntme, DWORD FontType, LPARAM lParam);
+ std::uint16_t m_actual;
+ std::vector<std::pair<std::string, std::string> > m_fonts;
+#ifdef UI_WINDOWS
+ bool m_bold, m_italic;
#endif
float m_info_min, m_info_max, m_info_size;
@@ -182,4 +181,4 @@ private:
rgb_t &m_original;
};
-#endif /* __UI_CUSTUI_H__ */
+#endif // MAME_EMU_UI_UI_CUSTUI_H
diff --git a/src/emu/ui/selector.cpp b/src/emu/ui/selector.cpp
index 330694fd497..5f1704b79fe 100644
--- a/src/emu/ui/selector.cpp
+++ b/src/emu/ui/selector.cpp
@@ -18,13 +18,26 @@
// ctor / dtor
//-------------------------------------------------
-ui_menu_selector::ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> s_sel, UINT16 &s_actual, int category, int _hover)
- : ui_menu(machine, container), m_selector(s_actual)
+ui_menu_selector::ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> const &s_sel, UINT16 &s_actual, int category, int _hover)
+ : ui_menu(machine, container)
+ , m_selector(s_actual)
+ , m_category(category)
+ , m_hover(_hover)
+ , m_first_pass(true)
+ , m_str_items(s_sel)
+{
+ m_search[0] = '\0';
+ m_searchlist[0] = nullptr;
+}
+
+ui_menu_selector::ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> &&s_sel, UINT16 &s_actual, int category, int _hover)
+ : ui_menu(machine, container)
+ , m_selector(s_actual)
+ , m_category(category)
+ , m_hover(_hover)
+ , m_first_pass(true)
+ , m_str_items(std::move(s_sel))
{
- m_category = category;
- m_first_pass = true;
- m_hover = _hover;
- m_str_items = s_sel;
m_search[0] = '\0';
m_searchlist[0] = nullptr;
}
diff --git a/src/emu/ui/selector.h b/src/emu/ui/selector.h
index 595ca1f578d..b2ccba2a8b6 100644
--- a/src/emu/ui/selector.h
+++ b/src/emu/ui/selector.h
@@ -28,7 +28,8 @@ enum
class ui_menu_selector : public ui_menu
{
public:
- ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> _sel, UINT16 &_actual, int _category = 0, int _hover = 0);
+ ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> const &_sel, UINT16 &_actual, int _category = 0, int _hover = 0);
+ ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> &&_sel, UINT16 &_actual, int _category = 0, int _hover = 0);
virtual ~ui_menu_selector();
virtual void populate() override;
virtual void handle() override;
diff --git a/src/lib/formats/ioprocs.cpp b/src/lib/formats/ioprocs.cpp
index 9f00e3bb9d5..3efb1055e56 100644
--- a/src/lib/formats/ioprocs.cpp
+++ b/src/lib/formats/ioprocs.cpp
@@ -121,49 +121,49 @@ const struct io_procs corefile_ioprocs_noclose =
calls for accessing generic IO
*********************************************************************/
-static void io_generic_seek(struct io_generic *generic, UINT64 offset)
+static void io_generic_seek(struct io_generic *genio, UINT64 offset)
{
- generic->procs->seekproc(generic->file, offset, SEEK_SET);
+ genio->procs->seekproc(genio->file, offset, SEEK_SET);
}
-void io_generic_close(struct io_generic *generic)
+void io_generic_close(struct io_generic *genio)
{
- if (generic->procs->closeproc)
- generic->procs->closeproc(generic->file);
+ if (genio->procs->closeproc)
+ genio->procs->closeproc(genio->file);
}
-void io_generic_read(struct io_generic *generic, void *buffer, UINT64 offset, size_t length)
+void io_generic_read(struct io_generic *genio, void *buffer, UINT64 offset, size_t length)
{
UINT64 size;
size_t bytes_read;
- size = io_generic_size(generic);
+ size = io_generic_size(genio);
if (size <= offset)
{
bytes_read = 0;
}
else
{
- io_generic_seek(generic, offset);
- bytes_read = generic->procs->readproc(generic->file, buffer, length);
+ io_generic_seek(genio, offset);
+ bytes_read = genio->procs->readproc(genio->file, buffer, length);
}
- memset(((UINT8 *) buffer) + bytes_read, generic->filler, length - bytes_read);
+ memset(((UINT8 *) buffer) + bytes_read, genio->filler, length - bytes_read);
}
-void io_generic_write(struct io_generic *generic, const void *buffer, UINT64 offset, size_t length)
+void io_generic_write(struct io_generic *genio, const void *buffer, UINT64 offset, size_t length)
{
UINT64 filler_size = 0;
char filler_buffer[1024];
size_t bytes_to_write;
UINT64 size;
- size = io_generic_size(generic);
+ size = io_generic_size(genio);
if (size < offset)
{
@@ -171,27 +171,27 @@ void io_generic_write(struct io_generic *generic, const void *buffer, UINT64 off
offset = size;
}
- io_generic_seek(generic, offset);
+ io_generic_seek(genio, offset);
if (filler_size)
{
- memset(filler_buffer, generic->filler, sizeof(filler_buffer));
+ memset(filler_buffer, genio->filler, sizeof(filler_buffer));
do
{
bytes_to_write = (filler_size > sizeof(filler_buffer)) ? sizeof(filler_buffer) : (size_t) filler_size;
- generic->procs->writeproc(generic->file, filler_buffer, bytes_to_write);
+ genio->procs->writeproc(genio->file, filler_buffer, bytes_to_write);
filler_size -= bytes_to_write;
}
while(filler_size > 0);
}
if (length > 0)
- generic->procs->writeproc(generic->file, buffer, length);
+ genio->procs->writeproc(genio->file, buffer, length);
}
-void io_generic_write_filler(struct io_generic *generic, UINT8 filler, UINT64 offset, size_t length)
+void io_generic_write_filler(struct io_generic *genio, UINT8 filler, UINT64 offset, size_t length)
{
UINT8 buffer[512];
size_t this_length;
@@ -201,7 +201,7 @@ void io_generic_write_filler(struct io_generic *generic, UINT8 filler, UINT64 of
while(length > 0)
{
this_length = MIN(length, sizeof(buffer));
- io_generic_write(generic, buffer, offset, this_length);
+ io_generic_write(genio, buffer, offset, this_length);
offset += this_length;
length -= this_length;
}
@@ -209,7 +209,7 @@ void io_generic_write_filler(struct io_generic *generic, UINT8 filler, UINT64 of
-UINT64 io_generic_size(struct io_generic *generic)
+UINT64 io_generic_size(struct io_generic *genio)
{
- return generic->procs->filesizeproc(generic->file);
+ return genio->procs->filesizeproc(genio->file);
}
diff --git a/src/lib/formats/ioprocs.h b/src/lib/formats/ioprocs.h
index 824e0d38129..08acbe45295 100644
--- a/src/lib/formats/ioprocs.h
+++ b/src/lib/formats/ioprocs.h
@@ -61,11 +61,11 @@ extern const struct io_procs corefile_ioprocs_noclose;
-void io_generic_close(struct io_generic *generic);
-void io_generic_read(struct io_generic *generic, void *buffer, UINT64 offset, size_t length);
-void io_generic_write(struct io_generic *generic, const void *buffer, UINT64 offset, size_t length);
-void io_generic_write_filler(struct io_generic *generic, UINT8 filler, UINT64 offset, size_t length);
-UINT64 io_generic_size(struct io_generic *generic);
+void io_generic_close(struct io_generic *genio);
+void io_generic_read(struct io_generic *genio, void *buffer, UINT64 offset, size_t length);
+void io_generic_write(struct io_generic *genio, const void *buffer, UINT64 offset, size_t length);
+void io_generic_write_filler(struct io_generic *genio, UINT8 filler, UINT64 offset, size_t length);
+UINT64 io_generic_size(struct io_generic *genio);
diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp
index 964ac8b4e03..80f635b3f73 100644
--- a/src/lib/netlist/nl_base.cpp
+++ b/src/lib/netlist/nl_base.cpp
@@ -653,48 +653,23 @@ ATTR_COLD void net_t::save_register()
object_t::save_register();
}
-ATTR_HOT /* inline */ void core_terminal_t::update_dev(const UINT32 mask)
-{
- inc_stat(netdev().stat_call_count);
- if ((state() & mask) != 0)
- {
- device().update_dev();
- }
-}
-
ATTR_HOT /* inline */ void net_t::update_devs()
{
//assert(m_num_cons != 0);
nl_assert(this->isRailNet());
- const UINT32 masks[4] = { 1, 5, 3, 1 };
- const UINT32 mask = masks[ (m_cur_Q << 1) | m_new_Q ];
+ const int masks[4] = { 1, 5, 3, 1 };
+ const int mask = masks[ (m_cur_Q << 1) | m_new_Q ];
m_in_queue = 2; /* mark as taken ... */
m_cur_Q = m_new_Q;
-#if 0
- core_terminal_t * t[256];
- core_terminal_t *p = m_list_active.first();
- int cnt = 0;
- while (p != NULL)
- {
- if ((p->state() & mask) != 0)
- t[cnt++] = p;
- p = m_list_active.next(p);
- }
-
- for (int i=0; i<cnt; i++)
- t[i]->device().update_dev();
-#else
- core_terminal_t *p = m_list_active.first();
-
- while (p != NULL)
+ for (core_terminal_t *p = m_list_active.first(); p != NULL; p = p->next())
{
- p->update_dev(mask);
- p = m_list_active.next(p);
+ inc_stat(p->netdev().stat_call_count);
+ if ((p->state() & mask) != 0)
+ p->device().update_dev();
}
-#endif
}
ATTR_COLD void net_t::reset()
diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h
index c824a1564fc..72911c9b25c 100644
--- a/src/lib/netlist/nl_base.h
+++ b/src/lib/netlist/nl_base.h
@@ -495,16 +495,13 @@ namespace netlist
ATTR_HOT net_t & net() { return *m_net;}
ATTR_HOT bool is_state(const state_e astate) const { return (m_state == astate); }
- ATTR_HOT state_e state() const { return m_state; }
+ ATTR_HOT const state_e &state() const { return m_state; }
ATTR_HOT void set_state(const state_e astate)
{
nl_assert(astate != STATE_NONEX);
m_state = astate;
}
-
- ATTR_HOT /* inline */ void update_dev(const UINT32 mask);
-
protected:
virtual void save_register() override
{
diff --git a/src/lib/netlist/plib/plists.h b/src/lib/netlist/plib/plists.h
index 323e12dad0d..d63d4fbe898 100644
--- a/src/lib/netlist/plib/plists.h
+++ b/src/lib/netlist/plib/plists.h
@@ -210,18 +210,14 @@ public:
ATTR_HOT void remove(const _ListClass &elem)
{
- _ListClass **p = &m_head;
- while (*p != &elem)
+ _ListClass **p;
+ for (p = &m_head; *p != &elem; p = &((*p)->m_next))
{
//nl_assert(*p != NULL);
- p = &((*p)->m_next);
}
(*p) = elem.m_next;
}
-
- ATTR_HOT static _ListClass *next(const _ListClass &elem) { return elem.m_next; }
- ATTR_HOT static _ListClass *next(const _ListClass *elem) { return elem->m_next; }
ATTR_HOT _ListClass *first() const { return m_head; }
ATTR_HOT void clear() { m_head = NULL; }
ATTR_HOT bool is_empty() const { return (m_head == NULL); }
diff --git a/src/lib/util/aviio.cpp b/src/lib/util/aviio.cpp
index 8483adb24f6..339a4de3231 100644
--- a/src/lib/util/aviio.cpp
+++ b/src/lib/util/aviio.cpp
@@ -467,10 +467,10 @@ private:
, m_saved_avih_offset(0)
, m_soundbuf()
, m_soundbuf_samples(0)
- , m_soundbuf_chansamples{ 0 }
, m_soundbuf_chunks(0)
, m_soundbuf_frames(0)
{
+ std::fill(std::begin(m_soundbuf_chansamples), std::end(m_soundbuf_chansamples), 0);
}
avi_stream *get_video_stream();
diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp
index ec1e25340e3..5c16d886fe3 100644
--- a/src/lib/util/corefile.cpp
+++ b/src/lib/util/corefile.cpp
@@ -611,6 +611,7 @@ int core_text_file::puts(char const *s)
int core_text_file::vprintf(util::format_argument_pack<std::ostream> const &args)
{
+ m_printf_buffer.clear();
m_printf_buffer.reserve(1024);
m_printf_buffer.seekp(0, ovectorstream::beg);
util::stream_format<std::ostream, std::ostream>(m_printf_buffer, args);
diff --git a/src/lib/util/un7z.cpp b/src/lib/util/un7z.cpp
index 80c0a6bcba6..b05e4623e57 100644
--- a/src/lib/util/un7z.cpp
+++ b/src/lib/util/un7z.cpp
@@ -431,7 +431,7 @@ void m7z_file_impl::make_utf8_name(int index)
out_pos += produced;
assert(out_pos < m_utf8_buf.size());
}
- m_utf16_buf[out_pos++] = '\0';
+ m_utf8_buf[out_pos++] = '\0';
}
} // anonymous namespace
diff --git a/src/mame/drivers/cclimber.cpp b/src/mame/drivers/cclimber.cpp
index bc924df4980..f8b89ed07b2 100644
--- a/src/mame/drivers/cclimber.cpp
+++ b/src/mame/drivers/cclimber.cpp
@@ -1382,6 +1382,37 @@ ROM_START( cclimbroper )
ROM_END
+ROM_START( cclimbrrod )
+ ROM_REGION( 0x6000, "maincpu", 0 )
+ ROM_LOAD( "cc5.bin", 0x0000, 0x1000, CRC(a67238e9) SHA1(f873b754f658f32e2462b63544cbb7f0866e23ff) )
+ ROM_LOAD( "cc4.bin", 0x1000, 0x1000, CRC(4b1abea6) SHA1(eae7c96fc0b64d313bed4a75bd6d397b37eaac7e) )
+ ROM_LOAD( "cc3.bin", 0x2000, 0x1000, CRC(5612bb3c) SHA1(213846bb3393467260f401b00b821cbab7ac9636) )
+ ROM_LOAD( "cc2.bin", 0x3000, 0x1000, CRC(653cebc4) SHA1(c0b664389f7a6f58e880ba0870118aa26c636a37) )
+ ROM_LOAD( "cc1.bin", 0x4000, 0x1000, CRC(3fcf912b) SHA1(d540895018bc409ae011ce5841c8c5384bbbb1b9) )
+
+ ROM_REGION( 0x4000, "gfx1", 0 )
+ ROM_LOAD( "cc13.bin", 0x0000, 0x0800, CRC(8e0299f5) SHA1(77aa4fd6ee2177971753168bad6eac33034d3fb9) )
+ /* 0x0800-0x0fff - empty */
+ ROM_LOAD( "cc12.bin", 0x1000, 0x0800, CRC(e8cd7b53) SHA1(d4d6120fa14016e197340e8d1eb1141f0eb0eee8) )
+ /* 0x1800-0xffff - empty */
+ ROM_LOAD( "cc11.bin", 0x2000, 0x0800, CRC(921ebd9a) SHA1(95873fcab5da5e4affacdb6c3cab12b305f4b9fd) )
+ /* 0x2800-0x2fff - empty */
+ ROM_LOAD( "cc10.bin", 0x3000, 0x0800, CRC(8ab5fa6b) SHA1(ff31d2c89fe8cd5a276247b11418fb60de03804c))
+ /* 0x3800-0x3fff - empty */
+
+ ROM_REGION( 0x1000, "gfx2", 0 )
+ ROM_LOAD( "cc9.bin", 0x0000, 0x0800, CRC(6fb2afaf) SHA1(d2fe31d00af10e6bcabef51885ce52fb17d1bfbc) )
+ ROM_LOAD( "cc8.bin", 0x0800, 0x0800, CRC(227ee804) SHA1(0cda61a0ceeab299e7d40d33bf6dad3490928323) )
+
+ ROM_REGION( 0x2000, "samples", 0 ) /* samples */
+ ROM_LOAD( "cc7.cpu", 0x0000, 0x1000, CRC(5f0bcdfb) SHA1(7f79bf6de117348f606696ed7ea1937bbf926612) )
+ ROM_LOAD( "cc6.cpu", 0x1000, 0x1000, CRC(9003ffbd) SHA1(fd016056aabc23957643f37230f03842294f795e) )
+
+ ROM_REGION( 0x0060, "proms", 0 ) // NOT verified on this board
+ ROM_LOAD( "cclimber.pr1", 0x0000, 0x0020, CRC(751c3325) SHA1(edce2bc883996c1d72dc6c1c9f62799b162d415a) )
+ ROM_LOAD( "cclimber.pr2", 0x0020, 0x0020, CRC(ab1940fa) SHA1(8d98e05cbaa6f55770c12e0a9a8ed9c73cc54423) )
+ ROM_LOAD( "cclimber.pr3", 0x0040, 0x0020, CRC(71317756) SHA1(1195f0a037e379cc1a3c0314cb746f5cd2bffe50) )
+ROM_END
/* Sets below are Crazy Kong Part II and have an extra screen in attract mode, showing a caged Kong and copyright */
@@ -2516,6 +2547,7 @@ GAME( 1980, ccboot, cclimber, cclimberx, cclimber, cclimber_state, cclimber
GAME( 1980, ccboot2, cclimber, cclimberx, cclimber, cclimber_state, cclimberj,ROT0, "bootleg", "Crazy Climber (bootleg set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1980, ccbootmr, cclimber, cclimberx, cclimber, cclimber_state, cclimberj,ROT0, "bootleg (Model Racing)", "Crazy Climber (Model Racing bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1980, cclimbroper, cclimber, cclimber, cclimber, driver_device, 0, ROT0, "bootleg (Operamatic)", "Crazy Climber (Spanish, Operamatic bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1980, cclimbrrod, cclimber, cclimber, cclimber, driver_device, 0, ROT0, "bootleg (Rodmar)", "Crazy Climber (Spanish, Rodmar bootleg)", MACHINE_SUPPORTS_SAVE )
/* these sets have ugly colours, no extra attract screen, and no graphics for the extra attract screen in the BG roms
- there is a Falcon logo in the text roms which is unused
diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp
index abaea79d40d..f2c05930332 100644
--- a/src/mame/drivers/gba.cpp
+++ b/src/mame/drivers/gba.cpp
@@ -35,8 +35,6 @@ static inline void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, co
}
}
-#define GBA_ATTOTIME_NORMALIZE(a) a.normalize()
-
static const UINT32 timer_clks[4] = { 16777216, 16777216/64, 16777216/256, 16777216/1024 };
@@ -343,7 +341,6 @@ TIMER_CALLBACK_MEMBER(gba_state::timer_expire)
final = clocksel / rate;
m_timer_hz[tmr] = final;
time = attotime::from_hz(final);
- GBA_ATTOTIME_NORMALIZE(time);
m_tmr_timer[tmr]->adjust(time, tmr, time);
}
@@ -1639,7 +1636,6 @@ WRITE32_MEMBER(gba_state::gba_io_w)
if( !(data & 0x40000) ) // if we're not in Count-Up mode
{
attotime time = attotime::from_hz(final);
- GBA_ATTOTIME_NORMALIZE(time);
m_tmr_timer[offset]->adjust(time, offset, time);
}
}
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp
index e1be21683b7..ea51b449120 100644
--- a/src/mame/drivers/hh_tms1k.cpp
+++ b/src/mame/drivers/hh_tms1k.cpp
@@ -122,7 +122,7 @@
#include "bigtrak.lh"
#include "cnfball.lh"
#include "cnfball2.lh"
-#include "cnsector.lh"
+#include "cnsector.lh" // clickable
#include "comp4.lh" // clickable
#include "cqback.lh"
#include "ebball.lh"
@@ -137,7 +137,7 @@
#include "gpoker.lh"
#include "h2hbaseb.lh"
#include "h2hfootb.lh"
-#include "lostreas.lh"
+#include "lostreas.lh" // clickable
#include "mathmagi.lh"
#include "mdndclab.lh" // clickable
#include "merlin.lh" // clickable
@@ -145,8 +145,8 @@
#include "simon.lh" // clickable
#include "ssimon.lh" // clickable
#include "splitsec.lh"
-#include "starwbc.lh"
-#include "stopthie.lh"
+#include "starwbc.lh" // clickable
+#include "stopthie.lh" // clickable
#include "tandy12.lh" // clickable
#include "tbreakup.lh"
#include "tc4.lh"
@@ -4748,7 +4748,7 @@ static INPUT_PORTS_START( lostreas )
PORT_START("IN.2") // O2
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear")
PORT_BIT( 0x04, 0x04, IPT_SPECIAL ) PORT_CONDITION("FAKE", 0x03, NOTEQUALS, 0x00) // air/up
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_V) PORT_NAME("$ Value")
@@ -5757,8 +5757,8 @@ COMP( 1983, fxmcr165, 0, 0, fxmcr165, fxmcr165, driver_device, 0, "Gak
CONS( 1979, elecdet, 0, 0, elecdet, elecdet, driver_device, 0, "Ideal", "Electronic Detective", MACHINE_SUPPORTS_SAVE ) // ***
-CONS( 1979, starwbc, 0, 0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command", MACHINE_SUPPORTS_SAVE )
-CONS( 1979, starwbcp, starwbc, 0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command (patent)", MACHINE_SUPPORTS_SAVE )
+CONS( 1979, starwbc, 0, 0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1979, starwbcp, starwbc, 0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command (patent)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
COMP( 1979, astro, 0, 0, astro, astro, driver_device, 0, "Kosmos", "Astro", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
@@ -5769,14 +5769,14 @@ CONS( 1978, simon, 0, 0, simon, simon, driver_device, 0, "Mil
CONS( 1979, ssimon, 0, 0, ssimon, ssimon, driver_device, 0, "Milton Bradley", "Super Simon", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1979, bigtrak, 0, 0, bigtrak, bigtrak, driver_device, 0, "Milton Bradley", "Big Trak", MACHINE_SUPPORTS_SAVE | MACHINE_MECHANICAL ) // ***
-CONS( 1977, cnsector, 0, 0, cnsector, cnsector, driver_device, 0, "Parker Brothers", "Code Name: Sector", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) // ***
+CONS( 1977, cnsector, 0, 0, cnsector, cnsector, driver_device, 0, "Parker Brothers", "Code Name: Sector", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_NO_SOUND_HW ) // ***
CONS( 1978, merlin, 0, 0, merlin, merlin, driver_device, 0, "Parker Brothers", "Merlin - The Electronic Wizard", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1979, stopthie, 0, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner)", MACHINE_SUPPORTS_SAVE ) // ***
CONS( 1979, stopthiep, stopthie, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner) (patent)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // ***
CONS( 1980, bankshot, 0, 0, bankshot, bankshot, driver_device, 0, "Parker Brothers", "Bank Shot - Electronic Pool", MACHINE_SUPPORTS_SAVE )
CONS( 1980, splitsec, 0, 0, splitsec, splitsec, driver_device, 0, "Parker Brothers", "Split Second", MACHINE_SUPPORTS_SAVE )
CONS( 1982, mmerlin, 0, 0, mmerlin, mmerlin, driver_device, 0, "Parker Brothers", "Master Merlin", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1982, lostreas, 0, 0, lostreas, lostreas, driver_device, 0, "Parker Brothers", "Lost Treasure - The Electronic Deep-Sea Diving Game (Electronic Dive-Control Center)", MACHINE_SUPPORTS_SAVE ) // ***
+CONS( 1982, lostreas, 0, 0, lostreas, lostreas, driver_device, 0, "Parker Brothers", "Lost Treasure - The Electronic Deep-Sea Diving Game (Electronic Dive-Control Center)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // ***
CONS( 1981, tandy12, 0, 0, tandy12, tandy12, driver_device, 0, "Tandy Radio Shack", "Tandy-12: Computerized Arcade", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // some of the minigames: ***
diff --git a/src/mame/drivers/igs017.cpp b/src/mame/drivers/igs017.cpp
index 1d1d439b3fc..8ab7a8711c2 100644
--- a/src/mame/drivers/igs017.cpp
+++ b/src/mame/drivers/igs017.cpp
@@ -4245,4 +4245,7 @@ GAME( 1998, slqz2, 0, slqz2, slqz2, igs017_state, slqz2, ROT
GAME( 1999?, tarzan, 0, iqblocka, iqblocka, igs017_state, tarzan, ROT0, "IGS", "Tarzan (V109C)", MACHINE_NOT_WORKING )
GAME( 1999?, tarzana, tarzan, iqblocka, iqblocka, igs017_state, tarzana, ROT0, "IGS", "Tarzan (V107)", MACHINE_NOT_WORKING )
GAME( 2000?, starzan, 0, starzan, iqblocka, igs017_state, starzan, ROT0, "IGS / G.F. Gioca", "Super Tarzan (Italy, V100I)", MACHINE_NOT_WORKING )
-GAME( ????, spkrform, spk116it, spkrform, spkrform, igs017_state, spkrform, ROT0, "IGS", "Super Poker (v100xD03) / Formosa", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
+
+/* Parent spk306us in driver spoker.cpp. Move this set to that driver? */
+GAME( ????, spkrform, spk306us, spkrform, spkrform, igs017_state, spkrform, ROT0, "IGS", "Super Poker (v100xD03) / Formosa", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
+
diff --git a/src/mame/drivers/microvsn.cpp b/src/mame/drivers/microvsn.cpp
index b7ff8fba4c8..33f0795ff1a 100644
--- a/src/mame/drivers/microvsn.cpp
+++ b/src/mame/drivers/microvsn.cpp
@@ -17,7 +17,7 @@ of the games were clocked at around 500KHz, 550KHz, or 300KHz.
#include "emu.h"
#include "cpu/mcs48/mcs48.h"
-#include "cpu/tms0980/tms0980.h"
+#include "cpu/tms1000/tms1100.h"
#include "sound/dac.h"
#include "rendlay.h"
@@ -547,7 +547,7 @@ DEVICE_IMAGE_LOAD_MEMBER(microvision_state, microvsn_cart)
if (pla)
m_pla = 1;
- tms1xxx_cpu_device::set_output_pla(m_tms1100, m_pla ? microvision_output_pla_1 : microvision_output_pla_0);
+ tms1100_cpu_device::set_output_pla(m_tms1100, m_pla ? microvision_output_pla_1 : microvision_output_pla_0);
// Set default setting for PCB type and RC type
m_pcb_type = microvision_state::PCB_TYPE_UNKNOWN;
diff --git a/src/mame/drivers/n64.cpp b/src/mame/drivers/n64.cpp
index 770c42a6a09..b4b22a35aca 100644
--- a/src/mame/drivers/n64.cpp
+++ b/src/mame/drivers/n64.cpp
@@ -111,6 +111,11 @@ static INPUT_PORTS_START( n64 )
PORT_CONFSETTING(0x0000, "Retail")
PORT_CONFSETTING(0x0100, "Development")
+ PORT_CONFNAME(0xC000, 0x8000, "EEPROM Size")
+ PORT_CONFSETTING(0x0000, "None")
+ PORT_CONFSETTING(0x8000, "4KB")
+ PORT_CONFSETTING(0xC000, "16KB")
+
//Player 1
PORT_START("P1")
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Button A / Left Click")
diff --git a/src/mame/drivers/neogeo_noslot.cpp b/src/mame/drivers/neogeo_noslot.cpp
index f3f79953c03..8fc68f9edcf 100644
--- a/src/mame/drivers/neogeo_noslot.cpp
+++ b/src/mame/drivers/neogeo_noslot.cpp
@@ -683,6 +683,8 @@ ROM_END
. NGH-007
NEO-AEG PROG42G / NEO-AEG CHA42G
NEO-AEG PROG42G / NEO-AEG CHA-8M
+ . prototype
+ NEO-AEG PROG-EP / NEO-AEG CHA-EP
****************************************/
ROM_START( alpham2 ) /* MVS AND AES VERSION */
@@ -707,33 +709,33 @@ ROM_START( alpham2 ) /* MVS AND AES VERSION */
ROM_LOAD16_BYTE( "007-c4.c4", 0x200001, 0x080000, CRC(7d588349) SHA1(a5ed789d7bbc25be5c5b2d99883b64d379c103a2) ) /* Plane 2,3 */ /* TC534200 */
ROM_END
-ROM_START( alpham2p ) /* early prototype - all roms were hand labeled with CRCs, dumps verified against them */
+ROM_START( alpham2p ) /* early prototype - all roms were hand labeled with CRCs, dumps verified against them */ /* AES VERSION*/
ROM_REGION( 0x100000, "maincpu", 0 )
- ROM_LOAD16_BYTE( "proto_007-p1.p1", 0x000001, 0x080000, CRC(c763e52a) SHA1(b24acbac255c5ee1a2e92e77cdde6620a24081cf) )
- ROM_LOAD16_BYTE( "proto_007-p2.p2", 0x000000, 0x080000, CRC(7a0b435c) SHA1(40e6f42a92001d9f4e51898dd7489da143b6b74b) )
+ ROM_LOAD16_BYTE( "007_p1_faac.p1", 0x000001, 0x080000, CRC(c763e52a) SHA1(b24acbac255c5ee1a2e92e77cdde6620a24081cf) )
+ ROM_LOAD16_BYTE( "007_p2_1813.p2", 0x000000, 0x080000, CRC(7a0b435c) SHA1(40e6f42a92001d9f4e51898dd7489da143b6b74b) )
- NEO_SFIX_128K( "proto_007-s1.s1", CRC(efc9ae2e) SHA1(a594826b0082fe5a13191673e8d9aa42517230f5) )
+ NEO_SFIX_128K( "007_s1_36f1.s1", CRC(efc9ae2e) SHA1(a594826b0082fe5a13191673e8d9aa42517230f5) )
- NEO_BIOS_AUDIO_128K( "proto_007-m1.m1", CRC(5976b464) SHA1(ec824567ecc3579f6d86c9d9385710cbaeef16a3) )
+ NEO_BIOS_AUDIO_128K( "007_m1_9384.m1", CRC(5976b464) SHA1(ec824567ecc3579f6d86c9d9385710cbaeef16a3) )
ROM_REGION( 0x200000, "ymsnd", 0 )
- ROM_LOAD( "proto_007-v11.v11", 0x000000, 0x080000, CRC(18eaa9e1) SHA1(85c94d8660f8a32e4ca8e015f0bd704208482d68) )
- ROM_LOAD( "proto_007-v12.v12", 0x080000, 0x080000, CRC(2487d495) SHA1(49af3c4dc6a38c5158d3641fd8f9a40041b42aa6) )
- ROM_LOAD( "proto_007-v13.v13", 0x100000, 0x080000, CRC(25e60f25) SHA1(d06b0df872372de38fcf90187195070ac5f8c651) )
- ROM_LOAD( "proto_007-v21.v21", 0x180000, 0x080000, CRC(ac44b75a) SHA1(7399a05cd4e2c7ecde4a7323d3e189255afe5fc2) )
+ ROM_LOAD( "007_v11_1bb4.v11", 0x000000, 0x080000, CRC(18eaa9e1) SHA1(85c94d8660f8a32e4ca8e015f0bd704208482d68) )
+ ROM_LOAD( "007_v12_c8e8.v12", 0x080000, 0x080000, CRC(2487d495) SHA1(49af3c4dc6a38c5158d3641fd8f9a40041b42aa6) )
+ ROM_LOAD( "007_v13_09fa.v13", 0x100000, 0x080000, CRC(25e60f25) SHA1(d06b0df872372de38fcf90187195070ac5f8c651) )
+ ROM_LOAD( "007_v21_28c2.v21", 0x180000, 0x080000, CRC(ac44b75a) SHA1(7399a05cd4e2c7ecde4a7323d3e189255afe5fc2) )
ROM_REGION( 0x080000, "ymsnd.deltat", 0 )
ROM_COPY( "ymsnd", 0x180000, 0x00000, 0x80000 )
ROM_REGION( 0x400000, "sprites", 0 ) // note, ROM_LOAD32_BYTE
- ROM_LOAD32_BYTE( "proto_007-c1.c1", 0x000000, 0x80000, CRC(24841639) SHA1(fcc2a349121dad86ffefc44b9f0e8ba616ce0d30) ) /* Plane 0 */
- ROM_LOAD32_BYTE( "proto_007-c2.c2", 0x000002, 0x80000, CRC(912763ab) SHA1(cedf26d7d85ad140399ee62813c71f35e65498d6) ) /* Plane 2 */
- ROM_LOAD32_BYTE( "proto_007-c3.c3", 0x000001, 0x80000, CRC(0743bde2) SHA1(0d13ad6333909ad3cf10f9ac360f9abf191318de) ) /* Plane 1 */
- ROM_LOAD32_BYTE( "proto_007-c4.c4", 0x000003, 0x80000, CRC(61240212) SHA1(dee36f6604adaeb96e0d761a7256241c066b1cd2) ) /* Plane 3 */
- ROM_LOAD32_BYTE( "proto_007-c5.c5", 0x200000, 0x80000, CRC(cf9f4c53) SHA1(f979c85f83d9f76e554c2617f85f6d4efca6799c) ) /* Plane 0 */
- ROM_LOAD32_BYTE( "proto_007-c6.c6", 0x200002, 0x80000, CRC(3d903b19) SHA1(001a8c762336b855fe1df69fe2e605d30a3f00a1) ) /* Plane 2 */
- ROM_LOAD32_BYTE( "proto_007-c7.c7", 0x200001, 0x80000, CRC(e41e3875) SHA1(730aceb8a66cb33d0194b096568f053ad7dc000a) ) /* Plane 1 */
- ROM_LOAD32_BYTE( "proto_007-c8.c8", 0x200003, 0x80000, CRC(4483e2cf) SHA1(47c3364f5c36ae9dc3a49fe37ca60bcee0e73314) ) /* Plane 3 */
+ ROM_LOAD32_BYTE( "007_c1_210e.c11", 0x000000, 0x80000, CRC(24841639) SHA1(fcc2a349121dad86ffefc44b9f0e8ba616ce0d30) ) /* Plane 0 */
+ ROM_LOAD32_BYTE( "007_c2_29ae.c12", 0x000002, 0x80000, CRC(912763ab) SHA1(cedf26d7d85ad140399ee62813c71f35e65498d6) ) /* Plane 2 */
+ ROM_LOAD32_BYTE( "007_c3_c873.c13", 0x000001, 0x80000, CRC(0743bde2) SHA1(0d13ad6333909ad3cf10f9ac360f9abf191318de) ) /* Plane 1 */
+ ROM_LOAD32_BYTE( "007_c4_2462.c14", 0x000003, 0x80000, CRC(61240212) SHA1(dee36f6604adaeb96e0d761a7256241c066b1cd2) ) /* Plane 3 */
+ ROM_LOAD32_BYTE( "007_c5_5f16.c15", 0x200000, 0x80000, CRC(cf9f4c53) SHA1(f979c85f83d9f76e554c2617f85f6d4efca6799c) ) /* Plane 0 */
+ ROM_LOAD32_BYTE( "007_c6_8abc.c16", 0x200002, 0x80000, CRC(3d903b19) SHA1(001a8c762336b855fe1df69fe2e605d30a3f00a1) ) /* Plane 2 */
+ ROM_LOAD32_BYTE( "007_c7_c983.c17", 0x200001, 0x80000, CRC(e41e3875) SHA1(730aceb8a66cb33d0194b096568f053ad7dc000a) ) /* Plane 1 */
+ ROM_LOAD32_BYTE( "007_c8_b599.c18", 0x200003, 0x80000, CRC(4483e2cf) SHA1(47c3364f5c36ae9dc3a49fe37ca60bcee0e73314) ) /* Plane 3 */
ROM_END
/****************************************
@@ -1023,6 +1025,8 @@ ROM_END
NEO-MVS PROG42G / NEO-MVS CHA42G
. NGH-018
NEO-AEG PROG42G / NEO-AEG CHA42G
+ . prototype
+ NEO-AEG PROG-EP / NEO-AEG CHA-EP
****************************************/
ROM_START( burningf ) /* MVS AND AES VERSION */
@@ -1067,32 +1071,32 @@ ROM_START( burningfh ) /* AES VERSION (US) */
ROM_LOAD16_BYTE( "018-c4.c4", 0x200001, 0x100000, CRC(e2e0aff7) SHA1(1c691c092a6e2787de4f433b0eb9252bfdaa7e16) ) /* Plane 2,3 */ /* HN62408 */
ROM_END
-ROM_START( burningfp ) /* early prototype - all roms were hand labeled with CRCs, dumps verified against them */
+ROM_START( burningfp ) /* early prototype - all roms were hand labeled with CRCs, dumps verified against them */ /* AES VERSION */
ROM_REGION( 0x100000, "maincpu", 0 )
- ROM_LOAD16_BYTE( "proto_018-p1.p1", 0x000001, 0x080000, CRC(5b4032e7) SHA1(55df91dad6f484d3d49c28ab5972700bf71a8662) )
- ROM_LOAD16_BYTE( "proto_018-p2.p2", 0x000000, 0x080000, CRC(78762f68) SHA1(12170fc6efe75cb5d32624033d3d341032c97548) )
+ ROM_LOAD16_BYTE( "018_p1_9397.p1", 0x000001, 0x080000, CRC(5b4032e7) SHA1(55df91dad6f484d3d49c28ab5972700bf71a8662) )
+ ROM_LOAD16_BYTE( "018_p2_e335.p2", 0x000000, 0x080000, CRC(78762f68) SHA1(12170fc6efe75cb5d32624033d3d341032c97548) )
- NEO_SFIX_128K( "proto_018-s1.s1", CRC(f3d130e8) SHA1(2fdeb93f4bb2a60d391cac2822be41661b1e1795) )
+ NEO_SFIX_128K( "018_s1_9899.s1", CRC(f3d130e8) SHA1(2fdeb93f4bb2a60d391cac2822be41661b1e1795) )
- NEO_BIOS_AUDIO_128K( "proto_018-m1.m1", CRC(470dd5d4) SHA1(4291811b4aefe45261a1ae3631b6999fcd74fb3f) )
+ NEO_BIOS_AUDIO_128K( "018_m1_4586.m1", CRC(470dd5d4) SHA1(4291811b4aefe45261a1ae3631b6999fcd74fb3f) )
ROM_REGION( 0x200000, "ymsnd", 0 )
- ROM_LOAD( "proto_018-v11.v11", 0x000000, 0x080000, CRC(dc07ea3c) SHA1(c3e71aaec44ead7ddc581565d16b90030e6db5fd) )
- ROM_LOAD( "proto_018-v12.v12", 0x080000, 0x080000, CRC(f1ae637c) SHA1(02a4c7d4a544350a314ab7b26d8c9d3baa8f5778) )
- ROM_LOAD( "proto_018-v21.v21", 0x100000, 0x080000, CRC(9f3b4eda) SHA1(7f516923d04daa483b4b99c9babba66505931a34) )
+ ROM_LOAD( "018_v11_56ac.v11", 0x000000, 0x080000, CRC(dc07ea3c) SHA1(c3e71aaec44ead7ddc581565d16b90030e6db5fd) )
+ ROM_LOAD( "018_v12_db95.v12", 0x080000, 0x080000, CRC(f1ae637c) SHA1(02a4c7d4a544350a314ab7b26d8c9d3baa8f5778) )
+ ROM_LOAD( "018_v21_98dd.v21", 0x100000, 0x080000, CRC(9f3b4eda) SHA1(7f516923d04daa483b4b99c9babba66505931a34) )
ROM_REGION( 0x080000, "ymsnd.deltat", 0 )
ROM_COPY( "ymsnd", 0x100000, 0x00000, 0x80000 )
ROM_REGION( 0x400000, "sprites", 0 ) // note, ROM_LOAD32_BYTE
- ROM_LOAD32_BYTE( "proto_018-c1.c1", 0x000000, 0x80000, CRC(6569018b) SHA1(25040e0a9c2b72900100a22a2a41de5f6c339d8a) ) /* Plane 0 */
- ROM_LOAD32_BYTE( "proto_018-c2.c2", 0x000002, 0x80000, CRC(6949b501) SHA1(d8ee48837faff6cc849046ee8757b2b94d440303) ) /* Plane 2 */
- ROM_LOAD32_BYTE( "proto_018-c3.c3", 0x000001, 0x80000, CRC(410f653b) SHA1(ce94667721baa7b2c318fc268e3bb9209671c9f5) ) /* Plane 1 */
- ROM_LOAD32_BYTE( "proto_018-c4.c4", 0x000003, 0x80000, CRC(d43bf2a5) SHA1(c27985d8973611d02570f469a0d8cb4f5b63b614) ) /* Plane 3 */
- ROM_LOAD32_BYTE( "proto_018-c5.c5", 0x200000, 0x80000, CRC(837d09d3) SHA1(d3b06931fca6123604549599544b04529ef34c53) ) /* Plane 0 */
- ROM_LOAD32_BYTE( "proto_018-c6.c6", 0x200002, 0x80000, CRC(5fee51e7) SHA1(835c632fa12a1d5b4104cd80b8f686ac80b314a1) ) /* Plane 2 */
- ROM_LOAD32_BYTE( "proto_018-c7.c7", 0x200001, 0x80000, CRC(0f3f0823) SHA1(ec1d681c1795de43d20f30f85956e2473ec39c95) ) /* Plane 1 */
- ROM_LOAD32_BYTE( "proto_018-c8.c8", 0x200003, 0x80000, CRC(67cc9e34) SHA1(dc72a464c1456a4d2f7b992b416a984fb7885e99) ) /* Plane 3 */
+ ROM_LOAD32_BYTE( "018_c1_ba06.c11", 0x000000, 0x80000, CRC(6569018b) SHA1(25040e0a9c2b72900100a22a2a41de5f6c339d8a) ) /* Plane 0 */
+ ROM_LOAD32_BYTE( "018_c2_d534.c12", 0x000002, 0x80000, CRC(6949b501) SHA1(d8ee48837faff6cc849046ee8757b2b94d440303) ) /* Plane 2 */
+ ROM_LOAD32_BYTE( "018_c3_9d70.c13", 0x000001, 0x80000, CRC(410f653b) SHA1(ce94667721baa7b2c318fc268e3bb9209671c9f5) ) /* Plane 1 */
+ ROM_LOAD32_BYTE( "018_c4_bf9d.c14", 0x000003, 0x80000, CRC(d43bf2a5) SHA1(c27985d8973611d02570f469a0d8cb4f5b63b614) ) /* Plane 3 */
+ ROM_LOAD32_BYTE( "018_c5_ac9d.c15", 0x200000, 0x80000, CRC(837d09d3) SHA1(d3b06931fca6123604549599544b04529ef34c53) ) /* Plane 0 */
+ ROM_LOAD32_BYTE( "018_c6_d2a5.c16", 0x200002, 0x80000, CRC(5fee51e7) SHA1(835c632fa12a1d5b4104cd80b8f686ac80b314a1) ) /* Plane 2 */
+ ROM_LOAD32_BYTE( "018_c7_d568.c17", 0x200001, 0x80000, CRC(0f3f0823) SHA1(ec1d681c1795de43d20f30f85956e2473ec39c95) ) /* Plane 1 */
+ ROM_LOAD32_BYTE( "018_c8_d256.c18", 0x200003, 0x80000, CRC(67cc9e34) SHA1(dc72a464c1456a4d2f7b992b416a984fb7885e99) ) /* Plane 3 */
ROM_END
/****************************************
@@ -1287,6 +1291,9 @@ ROM_END
. NGM-024
NEO-MVS PROG42G-1 / NEO-MVS CHA42G-1
. NGH-024
+
+ . prototype
+ NEO-MVS PROG-EP / NEO-MVS CHA-EPG
****************************************/
ROM_START( lresort )
@@ -1310,32 +1317,32 @@ ROM_START( lresort )
ROM_LOAD16_BYTE( "024-c4.c4", 0x200001, 0x080000, CRC(7382fefb) SHA1(e916dec5bb5462eb9ae9711f08c7388937abb980) ) /* Plane 2,3 */ /* TC534200 */
ROM_END
-ROM_START( lresortp ) /* prototype - all roms were hand labeled with CRCs */
+ROM_START( lresortp ) /* prototype - all roms were hand labeled with CRCs */ /* MVS VERSION */
ROM_REGION( 0x100000, "maincpu", 0 )
- ROM_LOAD16_BYTE( "024_p1_5937.bin", 0x000001, 0x080000, CRC(8e6008ee) SHA1(6779663118782207156dc9fa9e24e81e30c6391c) )
- ROM_LOAD16_BYTE( "024_p2_8d37.bin", 0x000000, 0x080000, CRC(6d9ee90f) SHA1(ecd42182988092417bc96db8301ea408e47735f2) )
+ ROM_LOAD16_BYTE( "024_p1_5937.podd", 0x000001, 0x080000, CRC(8e6008ee) SHA1(6779663118782207156dc9fa9e24e81e30c6391c) )
+ ROM_LOAD16_BYTE( "024_p2_8d37.peven", 0x000000, 0x080000, CRC(6d9ee90f) SHA1(ecd42182988092417bc96db8301ea408e47735f2) )
- NEO_SFIX_128K( "024_s1_22fe.bin", CRC(5cef5cc6) SHA1(9ec305007bdb356e9f8f279beae5e2bcb3f2cf7b) )
+ NEO_SFIX_128K( "024_s1_22fe.s1", CRC(5cef5cc6) SHA1(9ec305007bdb356e9f8f279beae5e2bcb3f2cf7b) )
- NEO_BIOS_AUDIO_128K( "024_m1_fc7a.bin", CRC(22122875) SHA1(540c21559163381467679f836cb068adaf526659) )
+ NEO_BIOS_AUDIO_128K( "024_m1_fc7a.m1", CRC(22122875) SHA1(540c21559163381467679f836cb068adaf526659) )
ROM_REGION( 0x200000, "ymsnd", 0 )
- ROM_LOAD( "024_v11_b085.bin", 0x000000, 0x080000, CRC(0722da38) SHA1(66a9b463d5277908b3a01c03de82b3de9118f2cb) ) // 024_v11_b085.bin 024-v1.v1 [1/2] IDENTICAL
- ROM_LOAD( "024_v12_d3b7.bin", 0x080000, 0x080000, CRC(670ce3ec) SHA1(9004aa85d4a9b0ecf9cf9357b073ed55a98fdb02) ) // 024_v12_d3b7.bin 024-v1.v1 [2/2] IDENTICAL
- ROM_LOAD( "024_v13_a31e.bin", 0x100000, 0x080000, CRC(2e39462b) SHA1(b0a9b1a3377bf0369f3020192505c46ca52927d6) ) // 024_v13_a31e.bin 024-v2.v2 [1/2] IDENTICAL
- ROM_LOAD( "024_v24_2f0f.bin", 0x180000, 0x080000, CRC(7944754f) SHA1(d42a46c5127c6c62041ebffb0007af8a24abd360) ) // 024_v24_2f0f.bin 024-v2.v2 [2/2] IDENTICAL
+ ROM_LOAD( "024_v11_b085.v11", 0x000000, 0x080000, CRC(0722da38) SHA1(66a9b463d5277908b3a01c03de82b3de9118f2cb) ) // 024_v11_b085.bin 024-v1.v1 [1/2] IDENTICAL
+ ROM_LOAD( "024_v12_d3b7.v12", 0x080000, 0x080000, CRC(670ce3ec) SHA1(9004aa85d4a9b0ecf9cf9357b073ed55a98fdb02) ) // 024_v12_d3b7.bin 024-v1.v1 [2/2] IDENTICAL
+ ROM_LOAD( "024_v13_a31e.v13", 0x100000, 0x080000, CRC(2e39462b) SHA1(b0a9b1a3377bf0369f3020192505c46ca52927d6) ) // 024_v13_a31e.bin 024-v2.v2 [1/2] IDENTICAL
+ ROM_LOAD( "024_v24_2f0f.v24", 0x180000, 0x080000, CRC(7944754f) SHA1(d42a46c5127c6c62041ebffb0007af8a24abd360) ) // 024_v24_2f0f.bin 024-v2.v2 [2/2] IDENTICAL
NO_DELTAT_REGION
ROM_REGION( 0x400000, "sprites", 0 ) // note, ROM_LOAD32_BYTE
- ROM_LOAD32_BYTE( "024_c1_b764.bin", 0x000000, 0x80000, CRC(677749ec) SHA1(6f94675e037956a380652ab1056e6f1dec605bec) ) /* Plane 0 */
- ROM_LOAD32_BYTE( "024_c2_1951.bin", 0x000002, 0x80000, CRC(104d7b59) SHA1(404e8776ee8df4ca282eb7b747759af8628ddca1) ) /* Plane 2 */
- ROM_LOAD32_BYTE( "024_c3_0f63.bin", 0x000001, 0x80000, CRC(b0965a74) SHA1(e8026dd4f722ccab9c913261d09ab8843ef56a0e) ) /* Plane 1 */
- ROM_LOAD32_BYTE( "024_c4_c5b5.bin", 0x000003, 0x80000, CRC(dcfc3860) SHA1(8443b455ae8de656adab57f3b7e68919f22d3b9d) ) /* Plane 3 */
- ROM_LOAD32_BYTE( "024_c5_dd03.bin", 0x200000, 0x80000, CRC(50322397) SHA1(3308fbe48ad165b9894a52fc3a8d9898bbbc0c0e) ) /* Plane 0 */
- ROM_LOAD32_BYTE( "024_c6_c81a.bin", 0x200002, 0x80000, CRC(c3c93894) SHA1(f23b9d7e2b54d44c96370dde282bdf45cebd9cba) ) /* Plane 2 */
- ROM_LOAD32_BYTE( "024_c7_5edc.bin", 0x200001, 0x80000, CRC(21faf72b) SHA1(00bf257b06180ae6ede57744cea6257b3488d9f0) ) /* Plane 1 */
- ROM_LOAD32_BYTE( "024_c8_0850.bin", 0x200003, 0x80000, CRC(fb57217b) SHA1(607a98da754e8b1dd94a6432b21a36cc38e06a0f) ) /* Plane 3 */
+ ROM_LOAD32_BYTE( "024_c1_b764.c1", 0x000000, 0x80000, CRC(677749ec) SHA1(6f94675e037956a380652ab1056e6f1dec605bec) ) /* Plane 0 */
+ ROM_LOAD32_BYTE( "024_c2_1951.c2", 0x000002, 0x80000, CRC(104d7b59) SHA1(404e8776ee8df4ca282eb7b747759af8628ddca1) ) /* Plane 2 */
+ ROM_LOAD32_BYTE( "024_c3_0f63.c3", 0x000001, 0x80000, CRC(b0965a74) SHA1(e8026dd4f722ccab9c913261d09ab8843ef56a0e) ) /* Plane 1 */
+ ROM_LOAD32_BYTE( "024_c4_c5b5.c4", 0x000003, 0x80000, CRC(dcfc3860) SHA1(8443b455ae8de656adab57f3b7e68919f22d3b9d) ) /* Plane 3 */
+ ROM_LOAD32_BYTE( "024_c5_dd03.c5", 0x200000, 0x80000, CRC(50322397) SHA1(3308fbe48ad165b9894a52fc3a8d9898bbbc0c0e) ) /* Plane 0 */
+ ROM_LOAD32_BYTE( "024_c6_c81a.c6", 0x200002, 0x80000, CRC(c3c93894) SHA1(f23b9d7e2b54d44c96370dde282bdf45cebd9cba) ) /* Plane 2 */
+ ROM_LOAD32_BYTE( "024_c7_5edc.c7", 0x200001, 0x80000, CRC(21faf72b) SHA1(00bf257b06180ae6ede57744cea6257b3488d9f0) ) /* Plane 1 */
+ ROM_LOAD32_BYTE( "024_c8_0850.c8", 0x200003, 0x80000, CRC(fb57217b) SHA1(607a98da754e8b1dd94a6432b21a36cc38e06a0f) ) /* Plane 3 */
ROM_END
diff --git a/src/mame/drivers/ng_aes.cpp b/src/mame/drivers/ng_aes.cpp
index 994dfbef4e5..42577544f51 100644
--- a/src/mame/drivers/ng_aes.cpp
+++ b/src/mame/drivers/ng_aes.cpp
@@ -1523,27 +1523,12 @@ MACHINE_CONFIG_END
ROM_START( aes )
ROM_REGION16_BE( 0x20000, "mainbios", 0 )
ROM_SYSTEM_BIOS( 0, "asia", "Asia AES" )
- ROM_LOAD16_WORD_SWAP_BIOS( 0, "neo-epo.bin", 0x00000, 0x020000, CRC(d27a71f1) SHA1(1b3b22092f30c4d1b2c15f04d1670eb1e9fbea07) ) /* AES Console (Asia?) Bios */
+ ROM_LOAD16_WORD_SWAP_BIOS( 0, "neo-epo.bin", 0x00000, 0x020000, CRC(d27a71f1) SHA1(1b3b22092f30c4d1b2c15f04d1670eb1e9fbea07) ) /* AES Console (Asia?) Bios */
ROM_SYSTEM_BIOS( 1, "japan", "Japan AES" )
- ROM_LOAD16_WORD_SWAP_BIOS( 1, "neo-po.bin", 0x00000, 0x020000, CRC(16d0c132) SHA1(4e4a440cae46f3889d20234aebd7f8d5f522e22c) ) /* AES Console (Japan) Bios */
+ ROM_LOAD16_WORD_SWAP_BIOS( 1, "neo-po.bin", 0x00000, 0x020000, CRC(16d0c132) SHA1(4e4a440cae46f3889d20234aebd7f8d5f522e22c) ) /* AES Console (Japan) Bios */
ROM_SYSTEM_BIOS( 2, "devel", "Development System ROM" )
- ROM_LOAD16_WORD_SWAP_BIOS( 2, "neodebug.rom", 0x00000, 0x020000, CRC(698ebb7d) SHA1(081c49aa8cc7dad5939833dc1b18338321ea0a07) ) /* Official debug (development) ROM, for home-use base board */
- ROM_SYSTEM_BIOS( 3, "unibios31", "Universe Bios (Hack, Ver. 3.1)" )
- ROM_LOAD16_WORD_SWAP_BIOS( 3, "uni-bios_3_1.rom", 0x00000, 0x020000, CRC(0c58093f) SHA1(29329a3448c2505e1ff45ffa75e61e9693165153) ) /* Universe Bios v3.1 (hack) */
- ROM_SYSTEM_BIOS( 4, "unibios30", "Universe Bios (Hack, Ver. 3.0)" )
- ROM_LOAD16_WORD_SWAP_BIOS( 4, "uni-bios_3_0.rom", 0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f) ) /* Universe Bios v3.0 (hack) */
- ROM_SYSTEM_BIOS( 5, "unibios23", "Universe Bios (Hack, Ver. 2.3)" )
- ROM_LOAD16_WORD_SWAP_BIOS( 5, "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0) ) /* Universe Bios v2.3 (hack) */
- ROM_SYSTEM_BIOS( 6, "unibios23o", "Universe Bios (Hack, Ver. 2.3, older?)" )
- ROM_LOAD16_WORD_SWAP_BIOS( 6, "uni-bios_2_3o.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe Bios v2.3 (hack) alt version, withdrawn? */
- ROM_SYSTEM_BIOS( 7, "unibios22", "Universe Bios (Hack, Ver. 2.2)" )
- ROM_LOAD16_WORD_SWAP_BIOS( 7, "uni-bios_2_2.rom", 0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c) ) /* Universe Bios v2.2 (hack) */
- ROM_SYSTEM_BIOS( 8, "unibios21", "Universe Bios (Hack, Ver. 2.1)" )
- ROM_LOAD16_WORD_SWAP_BIOS( 8, "uni-bios_2_1.rom", 0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c) ) /* Universe Bios v2.1 (hack) */
- ROM_SYSTEM_BIOS( 9, "unibios20", "Universe Bios (Hack, Ver. 2.0)" )
- ROM_LOAD16_WORD_SWAP_BIOS( 9, "uni-bios_2_0.rom", 0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e) ) /* Universe Bios v2.0 (hack) */
- ROM_SYSTEM_BIOS(10, "unibios13", "Universe Bios (Hack, Ver. 1.3)" )
- ROM_LOAD16_WORD_SWAP_BIOS(10, "uni-bios_1_3.rom", 0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e) ) /* Universe Bios v1.3 (hack) - note: versions older than 1.3 don't support AES hardware */
+ ROM_LOAD16_WORD_SWAP_BIOS( 2, "neodebug.rom", 0x00000, 0x020000, CRC(698ebb7d) SHA1(081c49aa8cc7dad5939833dc1b18338321ea0a07) ) /* Official debug (development) ROM, for home-use base board */
+ NEOGEO_UNIBIOS(3)
ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp
index 3adde2898b3..2caacf9ceda 100644
--- a/src/mame/drivers/notetaker.cpp
+++ b/src/mame/drivers/notetaker.cpp
@@ -356,10 +356,12 @@ WRITE16_MEMBER(notetaker_state::FIFOBus_w)
WRITE16_MEMBER( notetaker_state::DiskReg_w )
{
+ // See http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19781023_More_NoteTaker_IO_Information.pdf but note that bit 12 (called bit 3 in documentation) was changed between oct 1978 and 1979 to reset the disk controller digital-PLL as ClrDiskCont' rather than acting as ProgBitClk0, which is permanently wired high instead, meaning only the 4.5Mhz - 18Mhz dot clocks are available for the CRTC.
m_ADCSpd0 = (data&0x8000)?1:0;
m_ADCSpd1 = (data&0x4000)?1:0;
m_StopWordClock_q = (data&0x2000)?1:0;
- m_ClrDiskCont_q = (data&0x1000)?1:0;
+ //if ((!(m_ClrDiskCont_q)) && (data&0x1000)) m_floppy->device_reset(); // reset on rising edge
+ m_ClrDiskCont_q = (data&0x1000)?1:0; // originally ProgBitClk0, but co-opted later to reset the FDC's external PLL
m_ProgBitClk1 = (data&0x0800)?1:0;
m_ProgBitClk2 = (data&0x0400)?1:0;
m_ProgBitClk3 = (data&0x0200)?1:0;
@@ -367,11 +369,40 @@ WRITE16_MEMBER( notetaker_state::DiskReg_w )
m_AnSel2 = (data&0x80)?1:0;
m_AnSel1 = (data&0x40)?1:0;
m_DriveSel1 = (data&0x20)?1:0;
- m_DriveSel2 = (data&0x10)?1:0;
- m_DriveSel3 = (data&0x08)?1:0;
+ m_DriveSel2 = (data&0x10)?1:0; // drive 2 not present on hardware, but could work if present
+ m_DriveSel3 = (data&0x08)?1:0; // drive 3 not present on hardware, but could work if present
m_SideSelect = (data&0x04)?1:0;
m_Disk5VOn = (data&0x02)?1:0;
m_Disk12VOn = (data&0x01)?1:0;
+
+ // ADC stuff
+ //TODO
+
+ // FDC stuff
+ // first handle the motor stuff; we'll clobber whatever was in m_floppy, then reset it to what it should be
+ m_floppy = m_floppy0->get_device();
+ m_floppy->mon_w(!(m_Disk5VOn && m_Disk12VOn)); // Disk5VOn and 12VOn can be thought of as a crude MotorOn signal as the motor won't run with either? of them missing.
+ //m_floppy = m_floppy0->get_device();
+ //m_floppy->mon_w(!(m_Disk5VOn && m_Disk12VOn)); // Disk5VOn and 12VOn can be thought of as a crude MotorOn signal as the motor won't run with either? of them missing.
+ //m_floppy = m_floppy0->get_device();
+ //m_floppy->mon_w(!(m_Disk5VOn && m_Disk12VOn)); // Disk5VOn and 12VOn can be thought of as a crude MotorOn signal as the motor won't run with either? of them missing.
+ // now restore m_floppy state to what it should be
+ if (m_DriveSel1) m_floppy = m_floppy0->get_device();
+ //else if (m_DriveSel2) m_floppy = m_floppy1->get_device();
+ //else if (m_DriveSel3) m_floppy = m_floppy2->get_device();
+ else m_floppy = nullptr;
+ m_fdc->set_floppy(m_floppy); // select the floppy
+ if (m_floppy)
+ {
+ m_floppy->ss_w(m_SideSelect);
+ }
+ // Disk5VOn and 12VOn can be thought of as a crude MotorOn signal as the motor won't run with either? of them missing.
+ //m_floppy0->mon_w(!(m_Disk5VOn && m_Disk12VOn));
+ //m_floppy1->mon_w(!(m_Disk5VOn && m_Disk12VOn));
+ //m_floppy2->mon_w(!(m_Disk5VOn && m_Disk12VOn));
+
+ // CRTC clock rate stuff
+ //TODO
}
WRITE16_MEMBER( notetaker_state::LoadDispAddr_w )
@@ -557,7 +588,7 @@ static ADDRESS_MAP_START(notetaker_iocpu_io, AS_IO, 16, notetaker_state)
AM_RANGE(0x60, 0x61) AM_MIRROR(0x7E1E) AM_WRITE(FIFOReg_w) // DAC sample and hold and frequency setup
//AM_RANGE(0xa0, 0xa1) AM_MIRROR(0x7E18) AM_DEVREADWRITE("debug8255", 8255_device, read, write) // debugger board 8255
AM_RANGE(0xc0, 0xc1) AM_MIRROR(0x7E1E) AM_WRITE(FIFOBus_w) // DAC data write to FIFO
- AM_RANGE(0x100, 0x101) AM_MIRROR(0x7E1E) AM_WRITE(DiskReg_w) // I/O register (adc speed, crtc pixel clock enable, +5 and +12v relays for floppy, etc)
+ AM_RANGE(0x100, 0x101) AM_MIRROR(0x7E1E) AM_WRITE(DiskReg_w) // I/O register (adc speed, crtc pixel clock and clock enable, +5 and +12v relays for floppy, etc)
AM_RANGE(0x120, 0x127) AM_MIRROR(0x7E18) AM_DEVREADWRITE8("wd1791", fd1791_t, read, write, 0x00FF) // floppy controller
AM_RANGE(0x140, 0x15f) AM_MIRROR(0x7E00) AM_DEVREADWRITE8("crt5027", crt5027_device, read, write, 0x00FF) // crt controller
AM_RANGE(0x160, 0x161) AM_MIRROR(0x7E1E) AM_WRITE(LoadDispAddr_w) // loads the start address for the display framebuffer
@@ -584,8 +615,8 @@ irq7 VSync (interrupt from the VSYN VSync pin from the crt5027)
/* writes during boot of io roms v2.0:
0x88 to port 0x020 (PCR; BootSeqDone(1), processor not locked(0), battery charger off(0), rom not disabled(0) correction off&cr4 off(1), cr3 on(0), cr2 on(0), cr1 on (0);)
-0x02 to port 0x100 (IOR write: enable 5v only relay control)
-0x03 to port 0x100 (IOR write: in addition to above, enable 12v relay control)
+0x0002 to port 0x100 (IOR write: enable 5v only relay control)
+0x0003 to port 0x100 (IOR write: in addition to above, enable 12v relay control)
<dram memory 0x00000-0x3ffff is zeroed here>
0x13 to port 0x000 PIC (ICW1, 8085 vector 0b000[ignored], edge trigger mode, interval of 8, single mode (no cascade/ICW3), ICW4 needed )
0x08 to port 0x002 PIC (ICW2, T7-T3 = 0b00001)
@@ -595,14 +626,14 @@ irq7 VSync (interrupt from the VSYN VSync pin from the crt5027)
0x0000 to port 0x1ae (reset UART)
0x0016 to port 0x048 (kbd control reg write)
0x0005 to port 0x1a8 (UART control reg write)
-0x5f to port 0x140 \
-0xf2 to port 0x142 \
-0x7d to port 0x144 \
-0x1d to port 0x146 \_ set up CRTC
-0x04 to port 0x148 /
-0x10 to port 0x14a /
-0x00 to port 0x154 /
-0x1e to port 0x15a /
+0x5f to port 0x140 (reg0 95 horizontal lines) \
+0xf2 to port 0x142 (reg1 interlaced, hswidth=0xE, hsdelay=2) \
+0x7d to port 0x144 (reg2 16 scans/row, 5 chars/datarow) \
+0x1d to port 0x146 (reg3 0 skew bits, 0x1D datarows/frame) \_ set up CRTC
+0x04 to port 0x148 (reg4 4 scan lines/frame /
+0x10 to port 0x14a (reg5 0x10 vdatastart) /
+0x00 to port 0x154 (reset the crtc) /
+0x1e to port 0x15a (reg8 load cursor line address = 0x1e) /
0x0a03 to port 0x100 (IOR write: set bit clock to 12Mhz)
0x2a03 to port 0x100 (IOR write: enable crtc clock chain)
0x00 to port 0x15c (fire off crtc timing chain)
@@ -613,8 +644,8 @@ read from 0x44 (byte wide) to check input fifo status
... more stuff here missing relating to making the beep tone through fifo
(around pc=6b6) read keyboard uart until mouse button is clicked (WaitNoBug)
(around pc=6bc) read keyboard uart until mouse button is released (WaitBug)
-0x2a23 to port 0x100 (select drive 2)
-0x2a23 to port 0x100 (select drive 2)
+0x2a23 to port 0x100 (select drive 1)
+0x2a23 to port 0x100 (select drive 1)
0x3a23 to port 0x100 (unset disk separator clear (allow disk head reading))
0x3a27 to port 0x100 (select disk side 1)
0x3a07 to port 0x100 (unselect all drives)
@@ -653,8 +684,12 @@ void notetaker_state::machine_start()
// allocate the DAC timer, and set it to fire NEVER. We'll set it up properly in IPReset.
m_FIFO_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(notetaker_state::timer_fifoclk),this));
m_FIFO_timer->adjust(attotime::never);
- // floppy stuff
- m_floppy = NULL;
+ // FDC: /DDEN is tied permanently LOW so MFM mode is ALWAYS ON
+ m_fdc->dden_w(0);
+ // Keyboard UART: /SWE is tied permanently LOW
+ m_kbduart->set_input_pin(AY31015_SWE, 0); // status word outputs are permanently enabled (pin 16 SFD(SWE) tied low, active)
+ // EIA UART: /SWE is tied permanently LOW
+ m_eiauart->set_input_pin(AY31015_SWE, 0); // status word outputs are permanently enabled (pin 16 SFD(SWE) tied low, active)
// savestate stuff
// TODO: add me!
}
@@ -669,11 +704,12 @@ void notetaker_state::machine_reset()
/* IP Reset; this emulates the IPReset' signal */
void notetaker_state::ip_reset()
{
- // not-really-reset related, set line on Keybaord UART
- m_kbduart->set_input_pin(AY31015_SWE, 0); // status word outputs are permanently enabled (pin 16 SFD(SWE) tied low, active)
// reset the Keyboard UART
m_kbduart->set_input_pin(AY31015_XR, 0); // MR - pin 21
m_kbduart->set_input_pin(AY31015_XR, 1); // ''
+ // reset the EIA UART
+ m_eiauart->set_input_pin(AY31015_XR, 0); // MR - pin 21
+ m_eiauart->set_input_pin(AY31015_XR, 1); // ''
// reset the IPConReg latch at #f1
m_BootSeqDone = 0;
m_ProcLock = 0;
@@ -683,6 +719,9 @@ void notetaker_state::ip_reset()
m_LedInd6 = 0;
m_LedInd7 = 0;
m_LedInd8 = 0;
+ // Clear the DAC FIFO
+ for (int i=0; i<16; i++) m_outfifo[i] = 0;
+ m_outfifo_count = m_outfifo_tail_ptr = m_outfifo_head_ptr = 0;
// reset the FIFOReg latch at #h9
m_TabletYOn = 0;
m_TabletXOn = 0;
@@ -692,7 +731,10 @@ void notetaker_state::ip_reset()
m_SHConB = 0;
m_SHConA = 0;
m_SetSH = 0;
- // reset the DiskReg latches at #c4 and #b4 on the disk/display controller board
+ // handle consequences of above
+ m_FIFO_timer->adjust(attotime::from_hz(((XTAL_960kHz/10)/4)/((m_FrSel0<<3)+(m_FrSel1<<2)+(m_FrSel2<<1)+1))); // FIFO timer is clocked by 960khz divided by 10 (74ls162 decade counter), divided by 4 (mc14568B with divider 1 pins set to 4), divided by 1,3,5,7,9,11,13,15 (or 0,2,4,6,8,10,12,14?)
+ // todo: handle tablet and sample/hold stuff as well
+ // reset the DiskReg latches at #c4 and #b4 on the disk/display/eia controller board
m_ADCSpd0 = 0;
m_ADCSpd1 = 0;
m_StopWordClock_q = 0;
@@ -709,19 +751,17 @@ void notetaker_state::ip_reset()
m_SideSelect = 0;
m_Disk5VOn = 0;
m_Disk12VOn = 0;
- // Clear the DAC FIFO
- for (int i=0; i<16; i++) m_outfifo[i] = 0;
- m_outfifo_count = m_outfifo_tail_ptr = m_outfifo_head_ptr = 0;
- // Reset the DAC Timer
- m_FIFO_timer->adjust(attotime::from_hz(((XTAL_960kHz/10)/4)/((m_FrSel0<<3)+(m_FrSel1<<2)+(m_FrSel2<<1)+1))); // FIFO timer is clocked by 960khz divided by 10 (74ls162 decade counter), divided by 4 (mc14568B with divider 1 pins set to 4), divided by 1,3,5,7,9,11,13,15 (or 0,2,4,6,8,10,12,14?)
- // stuff on display/eia board also reset by IPReset:
+ // handle the consequences of the above.
+ // Disk12VOn probably runs the drive motor, and MotorOn is hard-wired to low/active, so turn the motor for all drives OFF
+ m_floppy = m_floppy0->get_device();
+ m_floppy->mon_w(1);
+ //m_floppy = m_floppy1->get_device();
+ //m_floppy->mon_w(1);
+ //m_floppy = m_floppy2->get_device();
+ //m_floppy->mon_w(1);
+ m_floppy = nullptr; // select no drive
// reset the Framebuffer Display Address:
m_DispAddr = 0;
- // reset the EIA UART
- m_eiauart->set_input_pin(AY31015_XR, 0); // MR - pin 21
- m_eiauart->set_input_pin(AY31015_XR, 1); // ''
- // reset the DiskReg latches at #c4 and #b4 on the disk/display/eia board
- // write me!
}
/* EP Reset; this emulates the EPReset' signal */
diff --git a/src/mame/drivers/pcat_dyn.cpp b/src/mame/drivers/pcat_dyn.cpp
index 00b1a7df54d..baaa94626ee 100644
--- a/src/mame/drivers/pcat_dyn.cpp
+++ b/src/mame/drivers/pcat_dyn.cpp
@@ -23,7 +23,7 @@ If the output isn't satisfactory, it prints "I/O BOARD FAILURE".
#include "emu.h"
#include "cpu/i386/i386.h"
#include "machine/pcshare.h"
-#include "video/pc_vga.h"
+#include "bus/isa/trident.h"
#include "machine/bankdev.h"
#include "machine/ds128x.h"
#include "machine/ins8250.h"
@@ -56,7 +56,7 @@ WRITE8_MEMBER(pcat_dyn_state::bank2_w)
static ADDRESS_MAP_START( pcat_map, AS_PROGRAM, 32, pcat_dyn_state )
AM_RANGE(0x00000000, 0x0009ffff) AM_RAM
- AM_RANGE(0x000a0000, 0x000bffff) AM_DEVREADWRITE8("vga", vga_device, mem_r, mem_w, 0xffffffff)
+ AM_RANGE(0x000a0000, 0x000bffff) AM_DEVREADWRITE8("vga", trident_vga_device, mem_r, mem_w, 0xffffffff)
AM_RANGE(0x000c0000, 0x000c7fff) AM_ROM AM_REGION("video_bios", 0)
AM_RANGE(0x000d0000, 0x000d0fff) AM_ROM AM_REGION("game_prg", 0x0000) AM_WRITE8(bank1_w, 0xffffffff)
AM_RANGE(0x000d1000, 0x000d1fff) AM_ROM AM_REGION("game_prg", 0x1000) AM_WRITE8(bank2_w, 0xffffffff)
@@ -70,9 +70,9 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( pcat_io, AS_IO, 32, pcat_dyn_state )
AM_IMPORT_FROM(pcat32_io_common)
- AM_RANGE(0x03b0, 0x03bf) AM_DEVREADWRITE8("vga", vga_device, port_03b0_r, port_03b0_w, 0xffffffff)
- AM_RANGE(0x03c0, 0x03cf) AM_DEVREADWRITE8("vga", vga_device, port_03c0_r, port_03c0_w, 0xffffffff)
- AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE8("vga", vga_device, port_03d0_r, port_03d0_w, 0xffffffff)
+ AM_RANGE(0x03b0, 0x03bf) AM_DEVREADWRITE8("vga", trident_vga_device, port_03b0_r, port_03b0_w, 0xffffffff)
+ AM_RANGE(0x03c0, 0x03cf) AM_DEVREADWRITE8("vga", trident_vga_device, port_03c0_r, port_03c0_w, 0xffffffff)
+ AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE8("vga", trident_vga_device, port_03d0_r, port_03d0_w, 0xffffffff)
AM_RANGE(0x03f8, 0x03ff) AM_DEVREADWRITE8("ns16550", ns16550_device, ins8250_r, ins8250_w, 0xffffffff)
ADDRESS_MAP_END
@@ -126,7 +126,7 @@ static MACHINE_CONFIG_START( pcat_dyn, pcat_dyn_state )
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb)
/* video hardware */
- MCFG_FRAGMENT_ADD( pcvideo_vga )
+ MCFG_FRAGMENT_ADD( pcvideo_trident_vga )
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_REFRESH_RATE(60)
diff --git a/src/mame/drivers/ssem.cpp b/src/mame/drivers/ssem.cpp
index 278d02518fb..dac314aa9eb 100644
--- a/src/mame/drivers/ssem.cpp
+++ b/src/mame/drivers/ssem.cpp
@@ -416,6 +416,7 @@ void ssem_state::glyph_print(bitmap_rgb32 &bitmap, INT32 x, INT32 y, Format &&fm
{
const rectangle &visarea = m_screen->visible_area();
+ m_glyph_print_buf.clear();
m_glyph_print_buf.seekp(0, util::ovectorstream::beg);
util::stream_format(m_glyph_print_buf, std::forward<Format>(fmt), std::forward<Params>(args)...);
m_glyph_print_buf.put('\0');
diff --git a/src/mame/drivers/svi318.cpp b/src/mame/drivers/svi318.cpp
index 2529508e2b3..b2a6a2975f3 100644
--- a/src/mame/drivers/svi318.cpp
+++ b/src/mame/drivers/svi318.cpp
@@ -22,10 +22,18 @@
#include "formats/svi_cas.h"
#include "bus/generic/slot.h"
#include "bus/generic/carts.h"
+#include "bus/svi3x8/expander/expander.h"
#include "softlist.h"
//**************************************************************************
+// CONSTANTS & MACROS
+//**************************************************************************
+
+#define IS_SVI328 (m_ram->size() == 64 * 1024)
+
+
+//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -39,18 +47,32 @@ public:
m_basic(*this, "basic"),
m_speaker(*this, "speaker"),
m_cassette(*this, "cassette"),
- m_cart(*this, "cartslot"),
+ m_cart_rom(*this, "cartslot"),
+ m_expander(*this, "exp"),
m_keyboard(*this, "KEY"),
m_buttons(*this, "BUTTONS"),
+ m_intvdp(0), m_intexp(0),
+ m_romdis(1), m_ramdis(1),
+ m_cart(1), m_bk21(1),
m_keyboard_row(0)
{}
DECLARE_READ8_MEMBER( ppi_port_a_r );
DECLARE_READ8_MEMBER( ppi_port_b_r );
DECLARE_WRITE8_MEMBER( ppi_port_c_w );
- DECLARE_WRITE8_MEMBER( psg_port_b_w );
+ DECLARE_WRITE8_MEMBER( bank_w );
DECLARE_WRITE_LINE_MEMBER( intvdp_w );
+ READ8_MEMBER( page1_r );
+ WRITE8_MEMBER( page1_w );
+ READ8_MEMBER( page2_r );
+ WRITE8_MEMBER( page2_w );
+
+ // from expander bus
+ DECLARE_WRITE_LINE_MEMBER( intexp_w );
+ DECLARE_WRITE_LINE_MEMBER( romdis_w );
+ DECLARE_WRITE_LINE_MEMBER( ramdis_w );
+
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cartridge);
protected:
@@ -58,17 +80,23 @@ protected:
virtual void machine_reset() override;
private:
- void reset_memory_configuration();
-
required_device<cpu_device> m_maincpu;
required_device<ram_device> m_ram;
required_memory_region m_basic;
required_device<speaker_sound_device> m_speaker;
required_device<cassette_image_device> m_cassette;
- required_device<generic_slot_device> m_cart;
+ required_device<generic_slot_device> m_cart_rom;
+ required_device<svi_expander_device> m_expander;
required_ioport_array<16> m_keyboard;
required_ioport m_buttons;
+ int m_intvdp;
+ int m_intexp;
+ int m_romdis;
+ int m_ramdis;
+ int m_cart;
+ int m_bk21;
+
UINT8 m_keyboard_row;
};
@@ -79,10 +107,13 @@ private:
static ADDRESS_MAP_START( svi3x8_mem, AS_PROGRAM, 8, svi3x8_state )
ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0000, 0x7fff) AM_READWRITE(page1_r, page1_w)
+ AM_RANGE(0x8000, 0xffff) AM_READWRITE(page2_r, page2_w)
ADDRESS_MAP_END
static ADDRESS_MAP_START( svi3x8_io, AS_IO, 8, svi3x8_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
+ AM_RANGE(0x00, 0x7f) AM_DEVREADWRITE("exp", svi_expander_device, iorq_r, iorq_w)
AM_RANGE(0x80, 0x80) AM_MIRROR(0x22) AM_DEVWRITE("vdp", tms9928a_device, vram_write)
AM_RANGE(0x81, 0x81) AM_MIRROR(0x22) AM_DEVWRITE("vdp", tms9928a_device, register_write)
AM_RANGE(0x84, 0x84) AM_MIRROR(0x22) AM_DEVREAD("vdp", tms9928a_device, vram_read)
@@ -261,7 +292,8 @@ WRITE_LINE_MEMBER( svi3x8_state::intvdp_w )
{
// note: schematics show a CNTRL line that allows switching between
// IRQ and NMI for the interrupt
- m_maincpu->set_input_line(INPUT_LINE_IRQ0, state);
+ m_intvdp = state;
+ m_maincpu->set_input_line(INPUT_LINE_IRQ0, (m_intvdp || m_intexp) ? ASSERT_LINE : CLEAR_LINE);
}
@@ -269,69 +301,90 @@ WRITE_LINE_MEMBER( svi3x8_state::intvdp_w )
// MACHINE EMULATION
//**************************************************************************
-void svi3x8_state::reset_memory_configuration()
-{
- m_maincpu->space(AS_PROGRAM).install_rom(0x0000, 0x7fff, m_basic->base());
-
- if (m_ram->size() == 64 * 1024)
- {
- // SVI-328
- m_maincpu->space(AS_PROGRAM).install_ram(0x8000, 0xffff, m_ram->pointer());
- }
- else
- {
- // SVI-318
- m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x8000, 0xbfff);
- m_maincpu->space(AS_PROGRAM).install_ram(0xc000, 0xffff, m_ram->pointer());
- }
-}
-
void svi3x8_state::machine_start()
{
// register for save states
+ save_item(NAME(m_intvdp));
+ save_item(NAME(m_intexp));
+ save_item(NAME(m_romdis));
+ save_item(NAME(m_ramdis));
+ save_item(NAME(m_cart));
+ save_item(NAME(m_bk21));
save_item(NAME(m_keyboard_row));
}
void svi3x8_state::machine_reset()
{
- reset_memory_configuration();
+ m_intvdp = 0;
+ m_intexp = 0;
+ m_romdis = 1;
+ m_ramdis = 1;
+ m_cart = 1;
+ m_bk21 = 1;
}
-WRITE8_MEMBER( svi3x8_state::psg_port_b_w )
+READ8_MEMBER( svi3x8_state::page1_r)
{
- reset_memory_configuration();
+ if (m_cart == 0)
+ return m_cart_rom->exists() ? m_cart_rom->read_rom(space, offset) : 0xff;
- // CART
- if (BIT(data, 0) == 0)
- {
- if (m_cart->exists())
- m_maincpu->space(AS_PROGRAM).install_rom(0x0000, 0x7fff, m_cart->get_rom_base());
- else
- m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x0000, 0x7fff);
- }
- else
- {
- // BK21 (SV-328)
- if (BIT(data, 1) == 0)
- {
- if (m_ram->size() == 64 * 1024)
- m_maincpu->space(AS_PROGRAM).install_ram(0x0000, 0x7fff, m_ram->pointer() + 0x8000);
- else
- m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x0000, 0x7fff);
- }
-
- // BK22 (SV-807)
- if (BIT(data, 2) == 0)
- m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x8000, 0xffff);
-
- // BK31 (SV-807)
- if (BIT(data, 3) == 0)
- m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x0000, 0x7fff);
-
- // BK32 (SV-807)
- if (BIT(data, 4) == 0)
- m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x8000, 0xffff);
- }
+ UINT8 data = m_expander->mreq_r(space, offset);
+
+ if (m_romdis == 1)
+ data = m_basic->u8(offset);
+
+ if (m_bk21 == 0 && IS_SVI328)
+ data = m_ram->read(offset);
+
+ return data;
+}
+
+WRITE8_MEMBER( svi3x8_state::page1_w)
+{
+ if (m_cart == 0)
+ return;
+
+ m_expander->mreq_w(space, offset, data);
+
+ if (m_bk21 == 0 && IS_SVI328)
+ m_ram->write(offset, data);
+}
+
+READ8_MEMBER( svi3x8_state::page2_r)
+{
+ offset += 0x8000;
+
+ UINT8 data = m_expander->mreq_r(space, offset);
+
+ if (m_ramdis == 1 && (offset >= 0x4000 || IS_SVI328))
+ return m_ram->read(IS_SVI328 ? offset : offset - 0xc000);
+
+ return data;
+}
+
+WRITE8_MEMBER( svi3x8_state::page2_w )
+{
+ offset += 0x8000;
+
+ m_expander->mreq_w(space, offset, data);
+
+ if (m_ramdis == 1 && (offset >= 0x4000 || IS_SVI328))
+ m_ram->write(IS_SVI328 ? offset : offset - 0xc000, data);
+}
+
+WRITE8_MEMBER( svi3x8_state::bank_w )
+{
+ logerror("bank_w: %02x\n", data);
+
+ m_cart = BIT(data, 0);
+ m_bk21 = BIT(data, 1);
+
+ m_expander->bk21_w(BIT(data, 1));
+ m_expander->bk22_w(BIT(data, 2));
+ m_expander->bk31_w(BIT(data, 3));
+ m_expander->bk32_w(BIT(data, 4));
+
+ // TODO: handle ROM2/ROM3 enable (bit 6 + 7)
output().set_value("led_caps_lock", BIT(data, 5));
}
@@ -372,6 +425,22 @@ WRITE8_MEMBER( svi3x8_state::ppi_port_c_w )
m_speaker->level_w(BIT(data, 7));
}
+WRITE_LINE_MEMBER( svi3x8_state::intexp_w )
+{
+ m_intexp = state;
+ m_maincpu->set_input_line(INPUT_LINE_IRQ0, (m_intvdp || m_intexp) ? ASSERT_LINE : CLEAR_LINE);
+}
+
+WRITE_LINE_MEMBER( svi3x8_state::romdis_w )
+{
+ m_romdis = state;
+}
+
+WRITE_LINE_MEMBER( svi3x8_state::ramdis_w )
+{
+ m_ramdis = state;
+}
+
//**************************************************************************
// CARTRIDGE
@@ -379,7 +448,7 @@ WRITE8_MEMBER( svi3x8_state::ppi_port_c_w )
DEVICE_IMAGE_LOAD_MEMBER( svi3x8_state, cartridge )
{
- UINT32 size = m_cart->common_get_size("rom");
+ UINT32 size = m_cart_rom->common_get_size("rom");
if (size != 0x8000)
{
@@ -387,8 +456,8 @@ DEVICE_IMAGE_LOAD_MEMBER( svi3x8_state, cartridge )
return IMAGE_INIT_FAIL;
}
- m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
+ m_cart_rom->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
+ m_cart_rom->common_load_rom(m_cart_rom->get_rom_base(), size, "rom");
return IMAGE_INIT_PASS;
}
@@ -427,7 +496,7 @@ static MACHINE_CONFIG_START( svi318, svi3x8_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_ADD("psg", AY8910, XTAL_10_738635MHz / 6)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("JOY"))
- MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi3x8_state, psg_port_b_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi3x8_state, bank_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
// cassette
@@ -442,6 +511,12 @@ static MACHINE_CONFIG_START( svi318, svi3x8_state )
MCFG_GENERIC_EXTENSIONS("bin,rom")
MCFG_GENERIC_LOAD(svi3x8_state, cartridge)
MCFG_SOFTWARE_LIST_ADD("cart_list", "svi318_cart")
+
+ // expander bus
+ MCFG_SVI_EXPANDER_BUS_ADD("exp")
+ MCFG_SVI_EXPANDER_INT_HANDLER(WRITELINE(svi3x8_state, intexp_w))
+ MCFG_SVI_EXPANDER_ROMDIS_HANDLER(WRITELINE(svi3x8_state, romdis_w))
+ MCFG_SVI_EXPANDER_RAMDIS_HANDLER(WRITELINE(svi3x8_state, ramdis_w))
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( svi318n, svi318 )
diff --git a/src/mame/drivers/symbolics.cpp b/src/mame/drivers/symbolics.cpp
index 7818c0363ff..4e5ea4b918f 100644
--- a/src/mame/drivers/symbolics.cpp
+++ b/src/mame/drivers/symbolics.cpp
@@ -7,6 +7,7 @@
******************************************************************************/
/* Core includes */
+#include "emu.h"
#include "cpu/m68000/m68000.h"
class symbolics_state : public driver_device
@@ -21,11 +22,22 @@ public:
required_device<m68000_base_device> m_maincpu;
DECLARE_DRIVER_INIT(symbolics);
+ DECLARE_READ16_MEMBER(buserror_r);
//protected:
// virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
};
+READ16_MEMBER(symbolics_state::buserror_r)
+{
+ if(!space.debugger_access())
+ {
+ m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
+ m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
+ }
+ return 0;
+}
+
/******************************************************************************
Address Maps
@@ -34,14 +46,22 @@ public:
Address maps (x = ignored; * = selects address within this range, ? = unknown, 1/0 = decodes only when this bit is set to 1/0)
68k address map:
a23 a22 a21 a20 a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 (a0 via UDS/LDS)
-? ? ? ? ? 0 0 0 0 * * * * * * * * * * * * * * 0 R ROM 00H
-? ? ? ? ? 0 0 0 0 * * * * * * * * * * * * * * 1 R ROM 00L
-? ? ? ? ? 0 0 0 1 * * * * * * * * * * * * * * 0 R ROM 04H
-? ? ? ? ? 0 0 0 1 * * * * * * * * * * * * * * 1 R ROM 04L
-? ? ? ? ? 0 0 1 0 x x x x x x x x x x x x x x 0 R Open bus?
-? ? ? ? ? 0 0 1 0 x x x x x x x x x x x x x x 1 R Open bus?
-? ? ? ? ? 0 0 1 1 * * * * * * * * * * * * * * 0 R ROM 10H
-? ? ? ? ? 0 0 1 1 * * * * * * * * * * * * * * 1 R ROM 10L
+? ? ? ? ? 0 0 0 0 0 * * * * * * * * * * * * * 0 R ROM 00H @D13 first half
+? ? ? ? ? 0 0 0 0 0 * * * * * * * * * * * * * 1 R ROM 00L @D7 first half
+? ? ? ? ? 0 0 0 0 1 * * * * * * * * * * * * * 0 R ROM 04H @D14 first half
+? ? ? ? ? 0 0 0 0 1 * * * * * * * * * * * * * 1 R ROM 04L @D8 first half
+? ? ? ? ? 0 0 0 1 0 * * * * * * * * * * * * * 0 R ROM 10H @D16 first half
+? ? ? ? ? 0 0 0 1 0 * * * * * * * * * * * * * 1 R ROM 10L @D10 first half
+? ? ? ? ? 0 0 0 1 1 * * * * * * * * * * * * * 0 R Open Bus (socket @D17 first half)
+? ? ? ? ? 0 0 0 1 1 * * * * * * * * * * * * * 1 R Open Bus (socket @D11 first half)
+? ? ? ? ? 0 0 1 0 0 * * * * * * * * * * * * * 0 R ROM 00H @D13 second half
+? ? ? ? ? 0 0 1 0 0 * * * * * * * * * * * * * 1 R ROM 00L @D7 second half
+? ? ? ? ? 0 0 1 0 1 * * * * * * * * * * * * * 0 R ROM 04H @D14 second half
+? ? ? ? ? 0 0 1 0 1 * * * * * * * * * * * * * 1 R ROM 04L @D8 second half
+? ? ? ? ? 0 0 1 1 0 * * * * * * * * * * * * * 0 R ROM 10H @D16 second half
+? ? ? ? ? 0 0 1 1 0 * * * * * * * * * * * * * 1 R ROM 10L @D10 second half
+? ? ? ? ? 0 0 1 1 1 * * * * * * * * * * * * * 0 R Open Bus (socket @D17 second half)
+? ? ? ? ? 0 0 1 1 1 * * * * * * * * * * * * * 1 R Open Bus (socket @D11 second half)
? ? ? ? ? 0 1 * * * * * * * * * * * * * * * * * RW RAM <- recheck this, might be a weird hole between 20000-20fff ?
? ? ? ? ? 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * ? Something maps here...
| | | | |
@@ -49,10 +69,10 @@ a23 a22 a21 a20 a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4
static ADDRESS_MAP_START(m68k_mem, AS_PROGRAM, 16, symbolics_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x000000, 0x00ffff) AM_ROM /* ROM */
- // 10000-17fff open bus here?
- AM_RANGE(0x018000, 0x01ffff) AM_ROM /* ROM */
- AM_RANGE(0x020000, 0x03ffff) AM_RAM /* Local FEP ram seems to be here? */
+ AM_RANGE(0x000000, 0x01ffff) AM_ROM /* ROM lives here, and writing to 0x00-0x08 writes to the main lisp ram? */
+ AM_RANGE(0x020000, 0x03ffff) AM_RAM /* Local FEP ram seems to be here? there are 18 mcm4164s on the pcb which probably map here, plus 2 parity bits? */
+ //AM_RANGE(0x040000, 0xffffff) AM_READ(buserror_r);
+ //AM_RANGE(0x800000, 0xffffff) AM_RAM /* paged access to lispm ram? */
// there is stuff mapped at 40000 and ffxxx as well, ffxxx may be the main lisp cpu's microcode and macrocode areas
ADDRESS_MAP_END
@@ -93,7 +113,8 @@ DRIVER_INIT_MEMBER(symbolics_state,symbolics)
static MACHINE_CONFIG_START( symbolics, symbolics_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", M68000, 10000000) /* PLACEHOLDER CLOCK, TODO: add correct clock */
+ //XTALS: 16MHz @H11, 4.9152MHz @J5, 66.67MHz @J10
+ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) /* MC68000L8 @A27; clock is guessed to be derived from the 16Mhz xtal @ H11 */
MCFG_CPU_PROGRAM_MAP(m68k_mem)
MCFG_CPU_IO_MAP(m68k_io)
@@ -106,13 +127,50 @@ MACHINE_CONFIG_END
ROM_START( s3600 )
ROM_REGION16_BE(0x40000,"maincpu", 0)
ROM_SYSTEM_BIOS( 0, "v127", "Symbolics 3600 L-Machine FEP V127")
- ROMX_LOAD("00h.127.27128.d13", 0x00000, 0x4000, CRC(b8d7c8da) SHA1(663a09359f5db63beeac00e5c2783ccc25b94250), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "00H.127"
- ROMX_LOAD("00l.127.27c128.d7", 0x00001, 0x4000, CRC(cc7bae9a) SHA1(057538eb821c4d00dde19cfe5136ccc0aee43800), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "00L.127"
- ROMX_LOAD("04h.127.27c128.d15", 0x08000, 0x4000, CRC(e01a717b) SHA1(b87a670f7be13553485ce88fad5fcf90f01473c4), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "04H.127"
- ROMX_LOAD("04l.127.27c128.d9", 0x08001, 0x4000, CRC(68d169fa) SHA1(d6fab3132fca332a9bedb174fddf5fc8c69d05b6), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "04L.127"
- ROMX_LOAD("10h.127.27c128.d16", 0x18000, 0x4000, CRC(2ea7a70d) SHA1(61cc97aada028612c24d788d946d77e82116cf30), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "10H.127"
- ROMX_LOAD("10l.127.27128.d10", 0x18001, 0x4000, CRC(b8ddb3c8) SHA1(e6c3b96340c5c767ef18abf48b73fa8e5d7353b9), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "10L.127"
+ ROMX_LOAD("00h.127.27c128.d13", 0x00000, 0x2000, CRC(b8d7c8da) SHA1(663a09359f5db63beeac00e5c2783ccc25b94250), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "00H.127" @D13
+ ROM_CONTINUE( 0x10000, 0x2000 )
+ ROMX_LOAD("00l.127.27128.d7", 0x00001, 0x2000, CRC(cc7bae9a) SHA1(057538eb821c4d00dde19cfe5136ccc0aee43800), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "00L.127" @D7
+ ROM_CONTINUE( 0x10001, 0x2000 )
+ ROMX_LOAD("04h.127.27128.d14", 0x04000, 0x2000, CRC(e01a717b) SHA1(b87a670f7be13553485ce88fad5fcf90f01473c4), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "04H.127" @D14
+ ROM_CONTINUE( 0x14000, 0x2000 )
+ ROMX_LOAD("04l.127.27128.d8", 0x04001, 0x2000, CRC(68d169fa) SHA1(d6fab3132fca332a9bedb174fddf5fc8c69d05b6), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "04L.127" @D8
+ ROM_CONTINUE( 0x14001, 0x2000 )
+ ROMX_LOAD("10h.127.27128.d16", 0x08000, 0x2000, CRC(2ea7a70d) SHA1(61cc97aada028612c24d788d946d77e82116cf30), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "10H.127" @D16
+ ROM_CONTINUE( 0x18000, 0x2000 )
+ ROMX_LOAD("10l.127.27c128.d10", 0x08001, 0x2000, CRC(b8ddb3c8) SHA1(e6c3b96340c5c767ef18abf48b73fa8e5d7353b9), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "10L.127" @D10
+ ROM_CONTINUE( 0x18001, 0x2000 )
+ // D17, D11 are empty sockets; these would map to 0x0c000-0ffff and 0x1c000-0x1ffff
// note: load all the PLAs, PALs and PROMs here
+ // picture is at https://4310b1a9-a-11c96037-s-sites.googlegroups.com/a/ricomputermuseum.org/home/Home/equipment/symbolics-3645/Symbolics_3645_FEP.jpg
+ /*
+ LBBUFA.4 mb7124 @A6
+ LBBUFB.4 mb7124 @A7
+ LBBUFC.4 mb7124 @A9
+ LBAAR.4 @A12
+ LBPAR.4A @A13
+ PROCA.4 pal16R8A @A25
+ HSADR.4 pal1???? @C4
+ DYNMEM.5 pal16R8A @C20
+ PCDYNCTL @C21
+ REQSEL.4A @C22
+ DY2ACK pal16L8A @C23
+ PROC.4 pal? @C25
+ UDMAHA.4 pal? @D3
+ FEP 4642 16pprom? @D5
+ HRSQ.4 pal @D6
+ d7, d8, d10 are eproms, see above
+ d11 is empty socket marked 2764
+ d13, d14, d16 are eproms, see above
+ d17 is empty socket marked 2764
+ ?DVZNUR? @E21 <- unreadable label, recheck!
+ LDBD.4 pal16L8A @G18
+ PAGTAG.5 @H20
+ UDMABC.4 pal @I4
+ SERDMA.4 @I8
+ SERIAB.4 @I9
+ LBARB.4 @I18
+ SERCTL.4 @K6
+ */
ROM_END
/******************************************************************************
@@ -120,4 +178,4 @@ ROM_END
******************************************************************************/
/* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS */
-COMP( 1984, s3600, 0, 0, symbolics, symbolics, symbolics_state, symbolics, "Symbolics", "3600", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
+COMP( 1984, s3600, 0, 0, symbolics, symbolics, symbolics_state, symbolics, "Symbolics", "3600", MACHINE_IS_SKELETON | MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
diff --git a/src/mame/drivers/vigilant.cpp b/src/mame/drivers/vigilant.cpp
index 239a7c85a53..35053e8f5e2 100644
--- a/src/mame/drivers/vigilant.cpp
+++ b/src/mame/drivers/vigilant.cpp
@@ -1005,30 +1005,30 @@ ROM_END
ROM_START( buccanrs )
ROM_REGION( 0x30000, "maincpu", 0 ) /* 64k for code + 128k for bankswitching */
- ROM_LOAD( "11.u58", 0x00000, 0x10000, CRC(bf1d7e6f) SHA1(55dcf993515b57c3eb1fab98097a2171df3e38ed) ) // both halves are identical (correct for rom type on this board tho)
- ROM_LOAD( "12.u25", 0x10000, 0x10000, CRC(87303ba8) SHA1(49a25393e853b9adf7df00a6f9c38a526a02ea4e) )
+ ROM_LOAD( "BC-011_K-163.U58", 0x00000, 0x10000, CRC(bf1d7e6f) SHA1(55dcf993515b57c3eb1fab98097a2171df3e38ed) ) // both halves are identical (correct for rom type on this board tho)
+ ROM_LOAD( "BC-012_K-163.U25", 0x10000, 0x10000, CRC(87303ba8) SHA1(49a25393e853b9adf7df00a6f9c38a526a02ea4e) )
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for sound */
- ROM_LOAD( "1.u128", 0x00000, 0x10000, CRC(eb65f8c3) SHA1(82566becb630ce92303905dc0c5bef9e80e9caad) )
+ ROM_LOAD( "BC-001_K-0161.U128", 0x00000, 0x10000, CRC(eb65f8c3) SHA1(82566becb630ce92303905dc0c5bef9e80e9caad) )
ROM_REGION( 0x20000, "gfx1", 0 )
- ROM_LOAD( "7.u212", 0x00000, 0x10000, CRC(95e3c517) SHA1(9954830ebc3a6414a3236f4e41981db082e5ea19) )
- ROM_LOAD( "8.u189", 0x10000, 0x10000, CRC(fe2377ab) SHA1(8578c5466d98f140fdfc41e91cd841e725786e32) )
+ ROM_LOAD( "BC-003_K-0161.U212", 0x00000, 0x10000, CRC(95e3c517) SHA1(9954830ebc3a6414a3236f4e41981db082e5ea19) )
+ ROM_LOAD( "BC-004_K-0161.U189", 0x10000, 0x10000, CRC(fe2377ab) SHA1(8578c5466d98f140fdfc41e91cd841e725786e32) )
ROM_REGION( 0x80000, "gfx2", 0 )
- ROM_LOAD( "3.u100", 0x00000, 0x10000, CRC(16dc435f) SHA1(0c13e9786b356770c84f94684697e43d0ea9e7cc) )
+ ROM_LOAD( "BC-005_K-0161.U113", 0x00000, 0x10000, CRC(16dc435f) SHA1(0c13e9786b356770c84f94684697e43d0ea9e7cc) )
ROM_CONTINUE( 0x20000, 0x10000 )
- ROM_LOAD( "4.u80", 0x10000, 0x10000, CRC(4fe3bf97) SHA1(7910ace1eed80bfafa1f9f057ed67e23aa446a22) )
- ROM_LOAD( "6.u52", 0x40000, 0x10000, CRC(078aef7f) SHA1(72e60d39d8af8bd31e9ae019b12620797eb0af7f) )
+ ROM_LOAD( "BC-006_K-161.U80", 0x10000, 0x10000, CRC(4fe3bf97) SHA1(7910ace1eed80bfafa1f9f057ed67e23aa446a22) )
+ ROM_LOAD( "BC-008_K-161.U52", 0x40000, 0x10000, CRC(078aef7f) SHA1(72e60d39d8af8bd31e9ae019b12620797eb0af7f) )
ROM_CONTINUE( 0x60000, 0x10000 )
- ROM_LOAD( "5.u70", 0x50000, 0x10000, CRC(f650fa90) SHA1(c87081b4d6b09f865d08c5120da3d0fb3196a2c3) )
+ ROM_LOAD( "BC-007_K-161.U70", 0x50000, 0x10000, CRC(f650fa90) SHA1(c87081b4d6b09f865d08c5120da3d0fb3196a2c3) )
ROM_REGION( 0x40000, "gfx3", 0 )
- ROM_LOAD( "9.u49", 0x20000, 0x20000, CRC(0c6188fb) SHA1(d49034384c6d0e94db2890223b32a2a49e79a639) )
- ROM_LOAD( "10.u27", 0x00000, 0x20000, CRC(2d383ff8) SHA1(3062baac27feba69c6ed94935c5ced72d89ed4fb) )
+ ROM_LOAD( "BC-009_K-163.U49", 0x20000, 0x20000, CRC(0c6188fb) SHA1(d49034384c6d0e94db2890223b32a2a49e79a639) )
+ ROM_LOAD( "BC-010_K-163.U27", 0x00000, 0x20000, CRC(2d383ff8) SHA1(3062baac27feba69c6ed94935c5ced72d89ed4fb) )
ROM_REGION( 0x10000, "samples", 0 ) /* samples */
- ROM_LOAD( "2.u74", 0x00000, 0x10000, CRC(36ee1dac) SHA1(6dfd2a885c0b1c9347abc4b204ade66551c4b404) )
+ ROM_LOAD( "BC-002_K-0161.U74", 0x00000, 0x10000, CRC(36ee1dac) SHA1(6dfd2a885c0b1c9347abc4b204ade66551c4b404) )
ROM_REGION( 0x400, "proms", 0 )
ROM_LOAD( "prom1.u54", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // == ic52 video timing prom from vigilante
@@ -1045,29 +1045,64 @@ ROM_END
ROM_START( buccanrsa )
ROM_REGION( 0x30000, "maincpu", 0 ) /* 64k for code + 128k for bankswitching */
ROM_LOAD( "bc-011", 0x00000, 0x08000, CRC(6b657ef1) SHA1(a3356654d4b04177af23b39e924cc5ad64930bb6) )
- ROM_LOAD( "12.u25", 0x10000, 0x10000, CRC(87303ba8) SHA1(49a25393e853b9adf7df00a6f9c38a526a02ea4e) ) // not from this set, hopefully its only a data rom
+ ROM_LOAD( "BC-012_K-163.U25", 0x10000, 0x10000, CRC(87303ba8) SHA1(49a25393e853b9adf7df00a6f9c38a526a02ea4e) )
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for sound */
- ROM_LOAD( "1.u128", 0x00000, 0x10000, CRC(eb65f8c3) SHA1(82566becb630ce92303905dc0c5bef9e80e9caad) )
+ ROM_LOAD( "BC-001_K-0161.U128", 0x00000, 0x10000, CRC(eb65f8c3) SHA1(82566becb630ce92303905dc0c5bef9e80e9caad) )
ROM_REGION( 0x20000, "gfx1", 0 )
- ROM_LOAD( "7.u212", 0x00000, 0x10000, CRC(95e3c517) SHA1(9954830ebc3a6414a3236f4e41981db082e5ea19) )
- ROM_LOAD( "8.u189", 0x10000, 0x10000, CRC(fe2377ab) SHA1(8578c5466d98f140fdfc41e91cd841e725786e32) )
+ ROM_LOAD( "BC-003_K-0161.U212", 0x00000, 0x10000, CRC(95e3c517) SHA1(9954830ebc3a6414a3236f4e41981db082e5ea19) )
+ ROM_LOAD( "BC-004_K-0161.U189", 0x10000, 0x10000, CRC(fe2377ab) SHA1(8578c5466d98f140fdfc41e91cd841e725786e32) )
ROM_REGION( 0x80000, "gfx2", 0 )
- ROM_LOAD( "3.u100", 0x00000, 0x10000, CRC(16dc435f) SHA1(0c13e9786b356770c84f94684697e43d0ea9e7cc) )
+ ROM_LOAD( "BC-005_K-0161.U113", 0x00000, 0x10000, CRC(16dc435f) SHA1(0c13e9786b356770c84f94684697e43d0ea9e7cc) )
ROM_CONTINUE( 0x20000, 0x10000 )
- ROM_LOAD( "4.u80", 0x10000, 0x10000, CRC(4fe3bf97) SHA1(7910ace1eed80bfafa1f9f057ed67e23aa446a22) ) // was double size (2nd half blank) in this set)
- ROM_LOAD( "6.u52", 0x40000, 0x10000, CRC(078aef7f) SHA1(72e60d39d8af8bd31e9ae019b12620797eb0af7f) )
+ ROM_LOAD( "BC-006_K-161.U80", 0x10000, 0x10000, CRC(4fe3bf97) SHA1(7910ace1eed80bfafa1f9f057ed67e23aa446a22) )
+ ROM_LOAD( "BC-008_K-161.U52", 0x40000, 0x10000, CRC(078aef7f) SHA1(72e60d39d8af8bd31e9ae019b12620797eb0af7f) )
ROM_CONTINUE( 0x60000, 0x10000 )
- ROM_LOAD( "5.u70", 0x50000, 0x10000, CRC(f650fa90) SHA1(c87081b4d6b09f865d08c5120da3d0fb3196a2c3) ) // was double size (2nd half blank) in this set)
+ ROM_LOAD( "BC-007_K-161.U70", 0x50000, 0x10000, CRC(f650fa90) SHA1(c87081b4d6b09f865d08c5120da3d0fb3196a2c3) )
ROM_REGION( 0x40000, "gfx3", 0 )
- ROM_LOAD( "9.u49", 0x20000, 0x20000, CRC(0c6188fb) SHA1(d49034384c6d0e94db2890223b32a2a49e79a639) )
- ROM_LOAD( "10.u27", 0x00000, 0x20000, CRC(2d383ff8) SHA1(3062baac27feba69c6ed94935c5ced72d89ed4fb) )
+ ROM_LOAD( "BC-009_K-163.U49", 0x20000, 0x20000, CRC(0c6188fb) SHA1(d49034384c6d0e94db2890223b32a2a49e79a639) )
+ ROM_LOAD( "BC-010_K-163.U27", 0x00000, 0x20000, CRC(2d383ff8) SHA1(3062baac27feba69c6ed94935c5ced72d89ed4fb) )
ROM_REGION( 0x10000, "samples", 0 ) /* samples */
- ROM_LOAD( "2.u74", 0x00000, 0x10000, CRC(36ee1dac) SHA1(6dfd2a885c0b1c9347abc4b204ade66551c4b404) )
+ ROM_LOAD( "BC-002_K-0161.U74", 0x00000, 0x10000, CRC(36ee1dac) SHA1(6dfd2a885c0b1c9347abc4b204ade66551c4b404) )
+
+ ROM_REGION( 0x400, "proms", 0 )
+ ROM_LOAD( "prom1.u54", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // == ic52 video timing prom from vigilante
+ ROM_LOAD( "prom4.u79", 0x0100, 0x0100, CRC(e6506ef4) SHA1(079841da7640b14d94aaaeb572bf018932b58293) )
+ ROM_LOAD( "prom3.u88", 0x0200, 0x0100, CRC(b43d094f) SHA1(2bed4892d8a91d7faac5a07bf858d9294eb30606) )
+ ROM_LOAD( "prom2.u99", 0x0300, 0x0100, CRC(e0aa8869) SHA1(ac8bdfeba69420ba56ec561bf3d0f1229d02cea2) )
+ROM_END
+
+
+ROM_START( buccanrsb )
+ ROM_REGION( 0x30000, "maincpu", 0 ) /* 64k for code + 128k for bankswitching */
+ ROM_LOAD( "rr_Du.u58", 0x00000, 0x08000, CRC(dcad3a8b) SHA1(e961927bdff28db18b829ce3f64051ff1604d1e6) )
+ ROM_LOAD( "BC-012_K-163.U25", 0x10000, 0x10000, CRC(87303ba8) SHA1(49a25393e853b9adf7df00a6f9c38a526a02ea4e) )
+
+ ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for sound */
+ ROM_LOAD( "BC-001_K-0161.U128", 0x00000, 0x10000, CRC(eb65f8c3) SHA1(82566becb630ce92303905dc0c5bef9e80e9caad) )
+
+ ROM_REGION( 0x20000, "gfx1", 0 )
+ ROM_LOAD( "BC-003_K-0161.U212", 0x00000, 0x10000, CRC(95e3c517) SHA1(9954830ebc3a6414a3236f4e41981db082e5ea19) )
+ ROM_LOAD( "BC-004_K-0161.U189", 0x10000, 0x10000, CRC(fe2377ab) SHA1(8578c5466d98f140fdfc41e91cd841e725786e32) )
+
+ ROM_REGION( 0x80000, "gfx2", 0 )
+ ROM_LOAD( "BC-005_K-0161.U113", 0x00000, 0x10000, CRC(16dc435f) SHA1(0c13e9786b356770c84f94684697e43d0ea9e7cc) )
+ ROM_CONTINUE( 0x20000, 0x10000 )
+ ROM_LOAD( "BC-006_K-161.U80", 0x10000, 0x10000, CRC(4fe3bf97) SHA1(7910ace1eed80bfafa1f9f057ed67e23aa446a22) )
+ ROM_LOAD( "BC-008_K-161.U52", 0x40000, 0x10000, CRC(078aef7f) SHA1(72e60d39d8af8bd31e9ae019b12620797eb0af7f) )
+ ROM_CONTINUE( 0x60000, 0x10000 )
+ ROM_LOAD( "BC-007_K-161.U70", 0x50000, 0x10000, CRC(f650fa90) SHA1(c87081b4d6b09f865d08c5120da3d0fb3196a2c3) )
+
+ ROM_REGION( 0x40000, "gfx3", 0 )
+ ROM_LOAD( "BC-009_K-163.U49", 0x20000, 0x20000, CRC(0c6188fb) SHA1(d49034384c6d0e94db2890223b32a2a49e79a639) )
+ ROM_LOAD( "BC-010_K-163.U27", 0x00000, 0x20000, CRC(2d383ff8) SHA1(3062baac27feba69c6ed94935c5ced72d89ed4fb) )
+
+ ROM_REGION( 0x10000, "samples", 0 ) /* samples */
+ ROM_LOAD( "BC-002_K-0161.U74", 0x00000, 0x10000, CRC(36ee1dac) SHA1(6dfd2a885c0b1c9347abc4b204ade66551c4b404) )
ROM_REGION( 0x400, "proms", 0 )
ROM_LOAD( "prom1.u54", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // == ic52 video timing prom from vigilante
@@ -1090,3 +1125,4 @@ GAME( 1988, kikcubicb, kikcubic, kikcubic, kikcubic, driver_device, 0, ROT0,
GAME( 1989, buccanrs, 0, buccanrs, buccanrs, driver_device, 0, ROT0, "Duintronic", "Buccaneers (set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
GAME( 1989, buccanrsa, buccanrs, buccanrs, buccanra, driver_device, 0, ROT0, "Duintronic", "Buccaneers (set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1989, buccanrsb, buccanrs, buccanrs, buccanrs, driver_device, 0, ROT0, "Duintronic", "Buccaneers (set 3, harder)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/includes/hh_tms1k.h b/src/mame/includes/hh_tms1k.h
index 46f6530ae7a..46372415b47 100644
--- a/src/mame/includes/hh_tms1k.h
+++ b/src/mame/includes/hh_tms1k.h
@@ -9,9 +9,14 @@
#ifndef _HH_TMS1K_H_
#define _HH_TMS1K_H_
-
#include "emu.h"
-#include "cpu/tms0980/tms0980.h"
+#include "cpu/tms1000/tms1000.h"
+#include "cpu/tms1000/tms1100.h"
+#include "cpu/tms1000/tms1400.h"
+#include "cpu/tms1000/tms0970.h"
+#include "cpu/tms1000/tms0980.h"
+#include "cpu/tms1000/tms0270.h"
+#include "cpu/tms1000/tp0320.h"
#include "sound/speaker.h"
diff --git a/src/mame/includes/neogeo.h b/src/mame/includes/neogeo.h
index da50cb62765..2cd9c2efc86 100644
--- a/src/mame/includes/neogeo.h
+++ b/src/mame/includes/neogeo.h
@@ -365,6 +365,7 @@ ADDRESS_MAP_EXTERN(neogeo_main_map,16);
Some may be missing, there have been multiple CRCs reported for the same
revision in some cases (the Universe bios has an option for entering / displaying
a serial number; these should be noted as such if they're added).
+ Universe bios prior to version 1.3 was incompatible with AES.
The 'japan-hotel' BIOS is a dump of an MVS which could be found in some japanese
hotels. it is a custom MVS mobo which uses MVS carts but it hasn't jamma
@@ -386,6 +387,35 @@ ADDRESS_MAP_EXTERN(neogeo_main_map,16);
#define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \
ROMX_LOAD(name, offset, length, hash, ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(bios+1)) /* Note '+1' */
+#define NEOGEO_UNIBIOS(x) \
+ ROM_SYSTEM_BIOS( x+ 0, "unibios32", "Universe Bios (Hack, Ver. 3.2)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( x+ 0, "uni-bios_3_2.rom", 0x00000, 0x020000, CRC(a4e8b9b3) SHA1(c92f18c3f1edda543d264ecd0ea915240e7c8258) ) /* Universe Bios v3.2 (hack) */ \
+ ROM_SYSTEM_BIOS( x+ 1, "unibios31", "Universe Bios (Hack, Ver. 3.1)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( x+ 1, "uni-bios_3_1.rom", 0x00000, 0x020000, CRC(0c58093f) SHA1(29329a3448c2505e1ff45ffa75e61e9693165153) ) /* Universe Bios v3.1 (hack) */ \
+ ROM_SYSTEM_BIOS( x+ 2, "unibios30", "Universe Bios (Hack, Ver. 3.0)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( x+ 2, "uni-bios_3_0.rom", 0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f) ) /* Universe Bios v3.0 (hack) */ \
+ ROM_SYSTEM_BIOS( x+ 3, "unibios23", "Universe Bios (Hack, Ver. 2.3)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( x+ 3, "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0) ) /* Universe Bios v2.3 (hack) */ \
+ ROM_SYSTEM_BIOS( x+ 4, "unibios23o", "Universe Bios (Hack, Ver. 2.3, older?)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( x+ 4, "uni-bios_2_3o.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe Bios v2.3 (hack) alt version, withdrawn? */ \
+ ROM_SYSTEM_BIOS( x+ 5, "unibios22", "Universe Bios (Hack, Ver. 2.2)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( x+ 5, "uni-bios_2_2.rom", 0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c) ) /* Universe Bios v2.2 (hack) */ \
+ ROM_SYSTEM_BIOS( x+ 6, "unibios21", "Universe Bios (Hack, Ver. 2.1)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( x+ 6, "uni-bios_2_1.rom", 0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c) ) /* Universe Bios v2.1 (hack) */ \
+ ROM_SYSTEM_BIOS( x+ 7, "unibios20", "Universe Bios (Hack, Ver. 2.0)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( x+ 7, "uni-bios_2_0.rom", 0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e) ) /* Universe Bios v2.0 (hack) */ \
+ ROM_SYSTEM_BIOS( x+ 8, "unibios13", "Universe Bios (Hack, Ver. 1.3)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( x+ 8, "uni-bios_1_3.rom", 0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e) ) /* Universe Bios v1.3 (hack) */
+#define NEOGEO_UNIBIOS_1_2_AND_OLDER(x) \
+ ROM_SYSTEM_BIOS( x+ 9, "unibios12", "Universe Bios (Hack, Ver. 1.2)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( x+ 9, "uni-bios_1_2.rom", 0x00000, 0x020000, CRC(4fa698e9) SHA1(682e13ec1c42beaa2d04473967840c88fd52c75a) ) /* Universe Bios v1.2 (hack) */ \
+ ROM_SYSTEM_BIOS( x+10, "unibios12o", "Universe Bios (Hack, Ver. 1.2, older)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( x+10, "uni-bios_1_2o.rom", 0x00000, 0x020000, CRC(e19d3ce9) SHA1(af88ef837f44a3af2d7144bb46a37c8512b67770) ) /* Universe Bios v1.2 (hack) alt version */ \
+ ROM_SYSTEM_BIOS( x+11, "unibios11", "Universe Bios (Hack, Ver. 1.1)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( x+11, "uni-bios_1_1.rom", 0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7) ) /* Universe Bios v1.1 (hack) */ \
+ ROM_SYSTEM_BIOS( x+12, "unibios10", "Universe Bios (Hack, Ver. 1.0)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( x+12, "uni-bios_1_0.rom", 0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9) ) /* Universe Bios v1.0 (hack) */
+
#define NEOGEO_BIOS \
ROM_REGION16_BE( 0x80000, "mainbios", 0 ) \
ROM_SYSTEM_BIOS( 0, "euro", "Europe MVS (Ver. 2)" ) \
@@ -398,7 +428,7 @@ ADDRESS_MAP_EXTERN(neogeo_main_map,16);
ROM_SYSTEM_BIOS( 3, "us-e", "US MVS (Ver. 1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 3, "sp-e.sp1", 0x00000, 0x020000, CRC(2723a5b5) SHA1(5dbff7531cf04886cde3ef022fb5ca687573dcb8) ) /* US, 6 Slot (V5?) */ \
ROM_SYSTEM_BIOS( 4, "us-v2", "US MVS (4 slot, Ver 2)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS(4, "v2.bin", 0x00000, 0x020000, CRC(62f021f4) SHA1(62d372269e1b3161c64ae21123655a0a22ffd1bb) ) /* US, 4 slot */ \
+ ROM_LOAD16_WORD_SWAP_BIOS( 4, "v2.bin", 0x00000, 0x020000, CRC(62f021f4) SHA1(62d372269e1b3161c64ae21123655a0a22ffd1bb) ) /* US, 4 slot */ \
\
ROM_SYSTEM_BIOS( 5, "asia", "Asia MVS (Ver. 3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 5, "asia-s3.rom", 0x00000, 0x020000, CRC(91b64be3) SHA1(720a3e20d26818632aedf2c2fd16c54f213543e1) ) /* Asia */ \
@@ -412,36 +442,12 @@ ADDRESS_MAP_EXTERN(neogeo_main_map,16);
ROM_SYSTEM_BIOS( 9, "mv1c", "NEO-MVH MV1C" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 9, "sp-45.sp1", 0x00000, 0x080000, CRC(03cc9f6a) SHA1(cdf1f49e3ff2bac528c21ed28449cf35b7957dc1) ) /* Latest Asia bios */ \
ROM_SYSTEM_BIOS( 10, "japan-j3", "Japan MVS (J3)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS( 10, "japan-j3.bin", 0x00000, 0x020000, CRC(dff6d41f) SHA1(e92910e20092577a4523a6b39d578a71d4de7085) ) /* Latest Japan bios; correct chip label unknown */ \
- ROM_SYSTEM_BIOS(11, "japan-hotel", "Custom Japanese Hotel" ) \
- ROM_LOAD16_WORD_SWAP_BIOS(11, "sp-1v1_3db8c.bin", 0x00000, 0x020000, CRC(162f0ebe) SHA1(fe1c6dd3dfcf97d960065b1bb46c1e11cb7bf271) ) /* 'rare MVS found in japanese hotels' shows v1.3 in test mode */ \
+ ROM_LOAD16_WORD_SWAP_BIOS( 10, "japan-j3.bin", 0x00000, 0x020000, CRC(dff6d41f) SHA1(e92910e20092577a4523a6b39d578a71d4de7085) ) /* Latest Japan bios; correct chip label unknown */ \
+ ROM_SYSTEM_BIOS( 11, "japan-hotel", "Custom Japanese Hotel" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( 11, "sp-1v1_3db8c.bin", 0x00000, 0x020000, CRC(162f0ebe) SHA1(fe1c6dd3dfcf97d960065b1bb46c1e11cb7bf271) ) /* 'rare MVS found in japanese hotels' shows v1.3 in test mode */ \
\
- ROM_SYSTEM_BIOS(12, "unibios31", "Universe Bios (Hack, Ver. 3.1)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS(12, "uni-bios_3_1.rom", 0x00000, 0x020000, CRC(0c58093f) SHA1(29329a3448c2505e1ff45ffa75e61e9693165153) ) /* Universe Bios v3.1 (hack) */ \
- ROM_SYSTEM_BIOS(13, "unibios30", "Universe Bios (Hack, Ver. 3.0)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS(13, "uni-bios_3_0.rom", 0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f) ) /* Universe Bios v3.0 (hack) */ \
- ROM_SYSTEM_BIOS(14, "unibios23", "Universe Bios (Hack, Ver. 2.3)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS(14, "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0) ) /* Universe Bios v2.3 (hack) */ \
- ROM_SYSTEM_BIOS(15, "unibios23o", "Universe Bios (Hack, Ver. 2.3, older?)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS(15, "uni-bios_2_3o.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe Bios v2.3 (hack) alt version, withdrawn? */ \
- ROM_SYSTEM_BIOS(16, "unibios22", "Universe Bios (Hack, Ver. 2.2)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS(16, "uni-bios_2_2.rom", 0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c) ) /* Universe Bios v2.2 (hack) */ \
- ROM_SYSTEM_BIOS(17, "unibios21", "Universe Bios (Hack, Ver. 2.1)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS(17, "uni-bios_2_1.rom", 0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c) ) /* Universe Bios v2.1 (hack) */ \
- ROM_SYSTEM_BIOS(18, "unibios20", "Universe Bios (Hack, Ver. 2.0)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS(18, "uni-bios_2_0.rom", 0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e) ) /* Universe Bios v2.0 (hack) */ \
- ROM_SYSTEM_BIOS(19, "unibios13", "Universe Bios (Hack, Ver. 1.3)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS(19, "uni-bios_1_3.rom", 0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e) ) /* Universe Bios v1.3 (hack) */ \
- ROM_SYSTEM_BIOS(20, "unibios12", "Universe Bios (Hack, Ver. 1.2)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS(20, "uni-bios_1_2.rom", 0x00000, 0x020000, CRC(4fa698e9) SHA1(682e13ec1c42beaa2d04473967840c88fd52c75a) ) /* Universe Bios v1.2 (hack) */ \
- ROM_SYSTEM_BIOS(21, "unibios12o", "Universe Bios (Hack, Ver. 1.2, older)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS(21, "uni-bios_1_2o.rom", 0x00000, 0x020000, CRC(e19d3ce9) SHA1(af88ef837f44a3af2d7144bb46a37c8512b67770) ) /* Universe Bios v1.2 (hack) alt version */ \
- ROM_SYSTEM_BIOS(22, "unibios11", "Universe Bios (Hack, Ver. 1.1)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS(22, "uni-bios_1_1.rom", 0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7) ) /* Universe Bios v1.1 (hack) */ \
- ROM_SYSTEM_BIOS(23, "unibios10", "Universe Bios (Hack, Ver. 1.0)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS(23, "uni-bios_1_0.rom", 0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9) ) /* Universe Bios v1.0 (hack) */
-
-
+ NEOGEO_UNIBIOS(12) \
+ NEOGEO_UNIBIOS_1_2_AND_OLDER(12)
#define NEO_BIOS_AUDIO_64K(name, hash) \
diff --git a/src/mame/layout/cnsector.lay b/src/mame/layout/cnsector.lay
index 730e02c3d06..8bca9c3ab7a 100644
--- a/src/mame/layout/cnsector.lay
+++ b/src/mame/layout/cnsector.lay
@@ -5,7 +5,9 @@
<element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
<element name="static_white"><rect><color red="0.95" green="0.95" blue="0.95" /></rect></element>
- <element name="static_gray"><rect><color red="0.60" green="0.75" blue="0.63" /></rect></element>
+ <element name="static_white2"><rect><color red="0.88" green="0.85" blue="0.85" /></rect></element>
+ <element name="static_gray"><rect><color red="0.6" green="0.7" blue="0.65" /></rect></element>
+ <element name="static_gray2"><rect><color red="0.75" green="0.73" blue="0.73" /></rect></element>
<element name="static_red"><rect><color red="0.35" green="0.02" blue="0.04" /></rect></element>
<element name="digit" defstate="0">
@@ -17,20 +19,112 @@
<disk state="0"><color red="0.2" green="0.0" blue="0.0" /></disk>
</element>
+ <element name="button" defstate="0">
+ <rect state="1"><color red="0.42" green="0.49" blue="0.455" /></rect>
+ <rect state="0"><color red="0.6" green="0.7" blue="0.65" /></rect>
+ </element>
+ <element name="buttond" defstate="0">
+ <disk state="1"><color red="0.42" green="0.49" blue="0.455" /></disk>
+ <disk state="0"><color red="0.6" green="0.7" blue="0.65" /></disk>
+ </element>
+
+ <element name="text_rnext">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="NEXT"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rship">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="SHIP"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rmove">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="MOVE"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rrecall">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="RECALL"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rleft">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="LEFT"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rright">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="RIGHT"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rrange">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="RANGE"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_raim">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="AIM"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rfire">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="FIRE"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rsteering">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="STEERING"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rspeed">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="SPEED"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rnav">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="NAVIGATIONAL PROGRAMMING"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rslower">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="SLOWER"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rfaster">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="FASTER"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rson">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="SONAR CONTROL"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rteach">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="TEACH"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rmode">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="MODE"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rsub">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="SUB"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rfinder">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="FINDER"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_revasive">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="EVASIVE"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+ <element name="text_rcom">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="COMBAT INFORMATION CENTER"><color red="0.75" green="0.73" blue="0.73" /></text>
+ </element>
+
<element name="text_ship">
<text string="SHIP"><color red="0.95" green="0.95" blue="0.95" /></text>
</element>
<element name="text_speed">
<text string="SPEED"><color red="0.95" green="0.95" blue="0.95" /></text>
</element>
-
<element name="text_north">
<text string="NORTH" align="2"><color red="0.95" green="0.95" blue="0.95" /></text>
</element>
<element name="text_east">
<text string="EAST" align="1"><color red="0.95" green="0.95" blue="0.95" /></text>
</element>
-
<element name="text_depth">
<text string="DEPTH"><color red="0.95" green="0.95" blue="0.95" /></text>
</element>
@@ -54,79 +148,146 @@
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
<text string="W"><color red="0.88" green="0.85" blue="0.85" /></text>
</element>
+ <element name="text_nw">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="NW"><color red="0.88" green="0.85" blue="0.85" /></text>
+ </element>
+ <element name="text_ne">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="NE"><color red="0.88" green="0.85" blue="0.85" /></text>
+ </element>
+ <element name="text_sw">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="SW"><color red="0.88" green="0.85" blue="0.85" /></text>
+ </element>
+ <element name="text_se">
+ <rect><color red="0.35" green="0.02" blue="0.04" /></rect>
+ <text string="SE"><color red="0.88" green="0.85" blue="0.85" /></text>
+ </element>
<!-- build screen -->
<view name="Internal Layout">
- <bounds left="0" right="92" top="0" bottom="146" />
- <bezel element="static_black">
- <bounds left="0" right="92" top="0" bottom="146" />
- </bezel>
+ <bounds left="-1" right="228" top="0" bottom="141" />
<!-- digits -->
<bezel element="static_white"><bounds x="0" y="4" width="100" height="1" /></bezel>
<bezel element="static_white"><bounds x="0" y="12" width="100" height="1" /></bezel>
-
<bezel element="static_white"><bounds x="20" y="4.5" width="1" height="40" /></bezel>
<bezel element="static_white"><bounds x="41" y="4.5" width="1" height="40" /></bezel>
-
<bezel element="static_white"><bounds x="67" y="4.5" width="1" height="8" /></bezel>
-
<bezel element="static_white"><bounds x="20.5" y="36" width="80" height="1" /></bezel>
<bezel element="static_white"><bounds x="0" y="44" width="100" height="1" /></bezel>
+ <bezel element="static_black"><bounds x="92" y="0" width="10" height="49" /></bezel>
<bezel element="text_ship"><bounds x="0" y="5" width="20" height="7" /></bezel>
<bezel element="text_speed"><bounds x="21" y="5" width="20" height="7" /></bezel>
-
<bezel element="text_north"><bounds x="47" y="5" width="19" height="7" /></bezel>
<bezel element="text_east"><bounds x="69" y="5" width="19" height="7" /></bezel>
-
<bezel element="text_depth"><bounds x="21" y="37" width="20" height="7" /></bezel>
<bezel element="text_range"><bounds x="57" y="37" width="20" height="7" /></bezel>
- <bezel name="digit5" element="digit">
- <bounds x="5" y="17" width="10" height="15" />
- </bezel>
-
- <bezel name="digit4" element="digit">
- <bounds x="26" y="17" width="10" height="15" />
- </bezel>
-
- <bezel name="digit3" element="digit">
- <bounds x="47" y="17" width="10" height="15" />
- </bezel>
- <bezel name="digit2" element="digit">
- <bounds x="57" y="17" width="10" height="15" />
- </bezel>
- <bezel name="digit1" element="digit">
- <bounds x="67" y="17" width="10" height="15" />
- </bezel>
- <bezel name="digit0" element="digit">
- <bounds x="77" y="17" width="10" height="15" />
- </bezel>
+ <bezel name="digit5" element="digit"><bounds x="5" y="17" width="10" height="15" /></bezel>
+ <bezel name="digit4" element="digit"><bounds x="26" y="17" width="10" height="15" /></bezel>
+ <bezel name="digit3" element="digit"><bounds x="47" y="17" width="10" height="15" /></bezel>
+ <bezel name="digit2" element="digit"><bounds x="57" y="17" width="10" height="15" /></bezel>
+ <bezel name="digit1" element="digit"><bounds x="67" y="17" width="10" height="15" /></bezel>
+ <bezel name="digit0" element="digit"><bounds x="77" y="17" width="10" height="15" /></bezel>
<!-- compass -->
- <bezel element="static_gray"><bounds x="0" y="50" width="100" height="100" /></bezel>
- <bezel element="static_red"><bounds x="0" y="55" width="100" height="86" /></bezel>
+ <bezel element="static_gray"><bounds x="-2" y="50" width="102" height="6" /></bezel>
+ <bezel element="static_red"><bounds x="-2" y="55" width="102" height="86" /></bezel>
+ <bezel element="static_white2"><bounds x="13.5" y="65.5" width="65" height="65" /></bezel>
+ <bezel element="static_red"><bounds x="14.5" y="66.5" width="63" height="63" /></bezel>
<bezel name="6.a" element="led"><bounds x="42" y="62" width="8" height="8" /></bezel>
<bezel name="7.a" element="led"><bounds x="42" y="126" width="8" height="8" /></bezel>
<bezel name="8.a" element="led"><bounds x="74" y="94" width="8" height="8" /></bezel>
<bezel name="9.a" element="led"><bounds x="10" y="94" width="8" height="8" /></bezel>
+ <bezel element="text_nw"><bounds x="6" y="61" width="16" height="10" /></bezel>
+ <bezel element="text_ne"><bounds x="70" y="61" width="16" height="10" /></bezel>
+ <bezel element="text_sw"><bounds x="6" y="125" width="16" height="10" /></bezel>
+ <bezel element="text_se"><bounds x="70" y="125" width="16" height="10" /></bezel>
+
<bezel element="text_n"><bounds x="41" y="72" width="10" height="10" /></bezel>
<bezel element="text_s"><bounds x="41" y="114" width="10" height="10" /></bezel>
<bezel element="text_e"><bounds x="63" y="93" width="10" height="10" /></bezel>
<bezel element="text_w"><bounds x="21" y="93" width="10" height="10" /></bezel>
- <!-- crop borders -->
+ <!-- button panel -->
+
+ <bezel element="static_gray"><bounds x="93" y="-1" width="6" height="143" /></bezel>
+ <bezel element="static_red"><bounds x="98" y="-1" width="132" height="143" /></bezel>
+
+ <bezel element="text_rcom"><bounds x="99" y="11.5" width="128" height="11" /></bezel>
+
+ <bezel element="static_gray2"><bounds x="102" y="28" width="50" height="18" /></bezel>
+ <bezel element="static_red"><bounds x="103" y="29" width="48" height="16" /></bezel>
+ <bezel element="static_gray2"><bounds x="174" y="28" width="50" height="18" /></bezel>
+ <bezel element="static_red"><bounds x="175" y="29" width="48" height="16" /></bezel>
- <bezel element="static_black"><bounds x="92" y="0" width="10" height="160" /></bezel>
- <bezel element="static_black"><bounds x="0" y="146" width="100" height="10" /></bezel>
+ <bezel element="static_gray2"><bounds x="102" y="49" width="122" height="44" /></bezel>
+ <bezel element="static_red"><bounds x="103" y="51" width="120" height="41" /></bezel>
+ <bezel element="static_gray2"><bounds x="151" y="49" width="24" height="27" /></bezel>
+ <bezel element="static_red"><bounds x="152" y="48" width="22" height="27" /></bezel>
+ <bezel element="static_red"><bounds x="101" y="47" width="124" height="3" /></bezel>
+
+ <bezel element="static_gray2"><bounds x="102" y="97" width="74" height="33" /></bezel>
+ <bezel element="static_red"><bounds x="103" y="98" width="72" height="31" /></bezel>
+ <bezel element="static_gray2"><bounds x="198" y="97" width="26" height="33" /></bezel>
+ <bezel element="static_red"><bounds x="199" y="98" width="24" height="31" /></bezel>
+
+ <bezel element="button" inputtag="IN.0" inputmask="0x01"><bounds x="107" y="33" width="16" height="8" /></bezel>
+ <bezel element="button" inputtag="IN.2" inputmask="0x08"><bounds x="155" y="33" width="16" height="8" /></bezel>
+ <bezel element="button" inputtag="IN.4" inputmask="0x08"><bounds x="203" y="33" width="16" height="8" /></bezel>
+
+ <bezel element="button" inputtag="IN.0" inputmask="0x02"><bounds x="107" y="55" width="16" height="8" /></bezel>
+ <bezel element="button" inputtag="IN.1" inputmask="0x02"><bounds x="131" y="55" width="16" height="8" /></bezel>
+ <bezel element="buttond" inputtag="IN.2" inputmask="0x02"><bounds x="161" y="57" width="4" height="4" /></bezel>
+ <bezel element="button" inputtag="IN.3" inputmask="0x02"><bounds x="179" y="55" width="16" height="8" /></bezel>
+ <bezel element="button" inputtag="IN.4" inputmask="0x02"><bounds x="203" y="55" width="16" height="8" /></bezel>
+
+ <bezel element="button" inputtag="IN.0" inputmask="0x08"><bounds x="107" y="102" width="16" height="8" /></bezel>
+ <bezel element="button" inputtag="IN.1" inputmask="0x01"><bounds x="131" y="102" width="16" height="8" /></bezel>
+ <bezel element="button" inputtag="IN.2" inputmask="0x01"><bounds x="155" y="102" width="16" height="8" /></bezel>
+ <bezel element="buttond" inputtag="IN.3" inputmask="0x01"><bounds x="185" y="104" width="4" height="4" /></bezel>
+ <bezel element="button" inputtag="IN.4" inputmask="0x01"><bounds x="207" y="102" width="8" height="8" /></bezel>
+
+ <bezel element="text_rnext"><bounds x="127" y="32" width="18" height="5" /></bezel>
+ <bezel element="text_rship"><bounds x="127" y="37" width="18" height="5" /></bezel>
+ <bezel element="text_rrecall"><bounds x="154" y="43" width="18" height="5" /></bezel>
+ <bezel element="text_rmove"><bounds x="181" y="32" width="18" height="5" /></bezel>
+ <bezel element="text_rship"><bounds x="181" y="37" width="18" height="5" /></bezel>
+
+ <bezel element="text_rleft"><bounds x="106" y="65" width="18" height="5" /></bezel>
+ <bezel element="text_rright"><bounds x="130" y="65" width="18" height="5" /></bezel>
+ <bezel element="text_revasive"><bounds x="154" y="62.5" width="18" height="5" /></bezel>
+ <bezel element="text_rsub"><bounds x="154" y="67.5" width="18" height="5" /></bezel>
+ <bezel element="text_rslower"><bounds x="178" y="65" width="18" height="5" /></bezel>
+ <bezel element="text_rfaster"><bounds x="202" y="65" width="18" height="5" /></bezel>
+ <bezel element="text_rsteering"><bounds x="107" y="70" width="40" height="8" /></bezel>
+ <bezel element="text_rspeed"><bounds x="179" y="70" width="40" height="8" /></bezel>
+ <bezel element="text_rnav"><bounds x="107" y="80" width="112" height="8" /></bezel>
+
+ <bezel element="text_rrange"><bounds x="106" y="112" width="18" height="5" /></bezel>
+ <bezel element="text_raim"><bounds x="130" y="112" width="18" height="5" /></bezel>
+ <bezel element="text_rfire"><bounds x="154" y="112" width="18" height="5" /></bezel>
+ <bezel element="text_rsub"><bounds x="178" y="109.5" width="18" height="5" /></bezel>
+ <bezel element="text_rfinder"><bounds x="178" y="114.5" width="18" height="5" /></bezel>
+ <bezel element="text_rteach"><bounds x="202" y="112" width="18" height="5" /></bezel>
+ <bezel element="text_rmode"><bounds x="202" y="117" width="18" height="5" /></bezel>
+ <bezel element="text_rson"><bounds x="107" y="117" width="64" height="8" /></bezel>
+
+ <!-- crop borders -->
+ <bezel element="static_black"><bounds x="-3" y="-3" width="232" height="2.9" /></bezel>
+ <bezel element="static_black"><bounds x="-3" y="-3" width="1.9" height="150" /></bezel>
+ <bezel element="static_black"><bounds x="-3" y="141.1" width="232" height="2" /></bezel>
+ <bezel element="static_black"><bounds x="228.1" y="-3" width="3" height="150" /></bezel>
</view>
</mamelayout>
diff --git a/src/mame/layout/lostreas.lay b/src/mame/layout/lostreas.lay
index ac967ce00f2..b837830fd10 100644
--- a/src/mame/layout/lostreas.lay
+++ b/src/mame/layout/lostreas.lay
@@ -3,16 +3,109 @@
<!-- define elements -->
+ <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
+ <element name="static_black2"><rect><color red="0.02" green="0.03" blue="0.05" /></rect></element>
<element name="static_blue"><rect><color red="0.1" green="0.25" blue="0.5" /></rect></element>
<element name="static_blue2"><rect><color red="0.04" green="0.1" blue="0.2" /></rect></element>
- <element name="disk_cyan"><disk><color red="0.0" green="0.75" blue="1.0" /></disk></element>
- <element name="disk_white"><disk><color red="0.8" green="0.9" blue="1.0" /></disk></element>
+ <element name="disk_cyan1"><disk><color red="0.0" green="0.75" blue="1.0" /></disk></element>
+ <element name="disk_cyan2"><disk><color red="0.8" green="0.9" blue="1.0" /></disk></element>
<element name="led" defstate="0">
<disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk>
<disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
</element>
+ <element name="hl" defstate="0">
+ <text string=" ">
+ <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <color red="0.0" green="0.0" blue="0.0" />
+ </text>
+ <disk state="1">
+ <bounds x="0.07" y="0.07" width="0.86" height="0.86" />
+ <color red="0.0" green="0.0" blue="0.0" />
+ </disk>
+ </element>
+
+ <element name="static_cyan1"><rect><color red="0.0" green="0.75" blue="1.0" /></rect></element>
+ <element name="text_k1">
+ <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
+ <text string="1"><color red="1" green="1" blue="1" /></text>
+ </element>
+ <element name="text_k2">
+ <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
+ <text string="2"><color red="1" green="1" blue="1" /></text>
+ </element>
+ <element name="text_k3">
+ <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
+ <text string="3"><color red="1" green="1" blue="1" /></text>
+ </element>
+ <element name="text_k4">
+ <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
+ <text string="4"><color red="1" green="1" blue="1" /></text>
+ </element>
+ <element name="text_k5">
+ <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
+ <text string="5"><color red="1" green="1" blue="1" /></text>
+ </element>
+ <element name="text_k6">
+ <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
+ <text string="6"><color red="1" green="1" blue="1" /></text>
+ </element>
+ <element name="text_k7">
+ <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
+ <text string="7"><color red="1" green="1" blue="1" /></text>
+ </element>
+ <element name="text_k8">
+ <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
+ <text string="8"><color red="1" green="1" blue="1" /></text>
+ </element>
+ <element name="text_k9">
+ <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
+ <text string="9"><color red="1" green="1" blue="1" /></text>
+ </element>
+ <element name="text_br31">
+ <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
+ <text string="$"><color red="1" green="1" blue="1" /></text>
+ </element>
+ <element name="text_br32">
+ <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
+ <text string="VALUE"><color red="1" green="1" blue="1" /></text>
+ </element>
+ <element name="text_br4">
+ <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
+ <text string="CLEAR"><color red="1" green="1" blue="1" /></text>
+ </element>
+
+ <element name="static_cyan2"><rect><color red="0.6" green="0.85" blue="1.0" /></rect></element>
+ <element name="text_br1">
+ <rect><color red="0.6" green="0.85" blue="1.0" /></rect>
+ <text string="AIR"><color red="0.02" green="0.02" blue="0.02" /></text>
+ </element>
+ <element name="text_br2">
+ <rect><color red="0.6" green="0.85" blue="1.0" /></rect>
+ <text string="UP"><color red="0.02" green="0.02" blue="0.02" /></text>
+ </element>
+
+ <element name="static_gold"><rect><color red="0.8" green="0.6" blue="0.1" /></rect></element>
+ <element name="text_bl1">
+ <rect><color red="0.8" green="0.6" blue="0.1" /></rect>
+ <text string="N-S"><color red="0.02" green="0.02" blue="0.02" /></text>
+ </element>
+ <element name="text_bl2">
+ <rect><color red="0.8" green="0.6" blue="0.1" /></rect>
+ <text string="E-W"><color red="0.02" green="0.02" blue="0.02" /></text>
+ </element>
+
+ <element name="static_silv"><rect><color red="0.45" green="0.45" blue="0.48" /></rect></element>
+ <element name="text_bl3">
+ <rect><color red="0.45" green="0.45" blue="0.48" /></rect>
+ <text string="N-S"><color red="0.98" green="0.98" blue="0.98" /></text>
+ </element>
+ <element name="text_bl4">
+ <rect><color red="0.45" green="0.45" blue="0.48" /></rect>
+ <text string="E-W"><color red="0.98" green="0.98" blue="0.98" /></text>
+ </element>
+
<element name="text_1">
<rect><color red="0.1" green="0.25" blue="0.5" /></rect>
<text string="1"><color red="0.04" green="0.1" blue="0.2" /></text>
@@ -96,6 +189,15 @@
<text string="$$"><color red="0.04" green="0.1" blue="0.2" /></text>
</element>
+ <element name="text_l1">
+ <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
+ <text string="ELECTRONIC"><color red="0.04" green="0.1" blue="0.2" /></text>
+ </element>
+ <element name="text_l2">
+ <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
+ <text string="DIVE-CONTROL CENTER"><color red="0.04" green="0.1" blue="0.2" /></text>
+ </element>
+
<element name="text_n">
<rect><color red="0.0" green="0.75" blue="1.0" /></rect>
<text string="N"><color red="1" green="1" blue="1" /></text>
@@ -117,10 +219,12 @@
<!-- build screen -->
<view name="Internal Layout">
- <bounds left="2.2" right="18.5" top="1" bottom="17.3" />
+ <bounds left="2.2" right="39.2" top="1" bottom="17.3" />
<bezel element="static_blue">
- <bounds left="0" right="20" top="0" bottom="20" />
+ <bounds left="0" right="40" top="0" bottom="18" />
</bezel>
+ <bezel element="static_blue2"><bounds x="-1" y="-1" width="41" height="3.9" /></bezel>
+ <bezel element="static_black"><bounds x="-1" y="-1" width="41" height="3.7" /></bezel>
<!-- left side -->
@@ -152,7 +256,6 @@
<bezel element="static_blue2"><bounds x="3.1" y="10.57" width="0.77" height="0.06" /></bezel>
<bezel element="static_blue2"><bounds x="3.1" y="12.57" width="0.77" height="0.06" /></bezel>
<bezel element="static_blue2"><bounds x="3.1" y="14.57" width="0.77" height="0.06" /></bezel>
- <bezel element="static_blue2"><bounds x="7" y="0" width="0.3" height="20" /></bezel>
<bezel name="0.5" element="led"><bounds x="4" y="4" width="1.2" height="1.2" /></bezel>
<bezel name="0.4" element="led"><bounds x="4" y="6" width="1.2" height="1.2" /></bezel>
@@ -163,8 +266,16 @@
<!-- compass -->
- <bezel element="disk_white"><bounds x="8.1" y="2.1" width="9" height="9" /></bezel>
- <bezel element="disk_cyan"><bounds x="8.5" y="2.5" width="8.2" height="8.2" /></bezel>
+ <bezel element="static_blue2"><bounds x="7.1" y="0" width="11" height="12.1" /></bezel>
+ <bezel element="static_blue"><bounds x="7.3" y="1.2" width="10.6" height="10.7" /></bezel>
+ <bezel element="static_blue2"><bounds x="7.5" y="1.4" width="10.2" height="10.3" /></bezel>
+
+ <bezel element="static_blue2"><bounds x="11.1" y="13.1" width="3" height="0.2" /></bezel>
+ <bezel element="static_blue2"><bounds x="11.1" y="14.3" width="3" height="0.2" /></bezel>
+ <bezel element="static_blue2"><bounds x="11.1" y="15.5" width="3" height="0.2" /></bezel>
+
+ <bezel element="disk_cyan2"><bounds x="8.1" y="2.1" width="9" height="9" /></bezel>
+ <bezel element="disk_cyan1"><bounds x="8.5" y="2.5" width="8.2" height="8.2" /></bezel>
<bezel element="text_n"><bounds x="12" y="2.7" width="1.2" height="1.2" /></bezel>
<bezel element="text_s"><bounds x="12" y="9.3" width="1.2" height="1.2" /></bezel>
@@ -177,5 +288,86 @@
<bezel name="0.9" element="led"><bounds x="14" y="6" width="1.2" height="1.2" /></bezel>
<bezel name="0.10" element="led"><bounds x="12" y="6" width="1.2" height="1.2" /></bezel>
+ <!-- keypad -->
+
+ <bezel element="static_blue2"><bounds x="23.15" y="0" width="11" height="12.1" /></bezel>
+ <bezel element="static_blue"><bounds x="23.35" y="1.2" width="10.6" height="10.7" /></bezel>
+ <bezel element="static_blue2"><bounds x="23.55" y="1.4" width="10.2" height="10.3" /></bezel>
+
+ <bezel element="text_l1"><bounds x="23.15" y="13.1" width="11" height="1.2" /></bezel>
+ <bezel element="text_l2"><bounds x="22.15" y="14.3" width="13" height="1.2" /></bezel>
+
+ <bezel element="static_black2"><bounds x="24.15" y="2.1" width="9" height="9" /></bezel>
+ <bezel element="static_cyan1"><bounds x="24.35" y="2.3" width="2.7333" height="2.7333" /></bezel>
+ <bezel element="static_cyan1"><bounds x="27.28333" y="2.3" width="2.7333" height="2.7333" /></bezel>
+ <bezel element="static_cyan1"><bounds x="30.21666" y="2.3" width="2.7333" height="2.7333" /></bezel>
+ <bezel element="static_cyan1"><bounds x="24.35" y="5.2333" width="2.7333" height="2.7333" /></bezel>
+ <bezel element="static_cyan1"><bounds x="27.28333" y="5.2333" width="2.7333" height="2.7333" /></bezel>
+ <bezel element="static_cyan1"><bounds x="30.21666" y="5.2333" width="2.7333" height="2.7333" /></bezel>
+ <bezel element="static_cyan1"><bounds x="24.35" y="8.1666" width="2.7333" height="2.7333" /></bezel>
+ <bezel element="static_cyan1"><bounds x="27.28333" y="8.1666" width="2.7333" height="2.7333" /></bezel>
+ <bezel element="static_cyan1"><bounds x="30.21666" y="8.1666" width="2.7333" height="2.7333" /></bezel>
+
+ <bezel element="text_k1"><bounds x="24.35" y="3.0666" width="2.7333" height="1.2" /></bezel>
+ <bezel element="text_k2"><bounds x="27.28333" y="3.0666" width="2.7333" height="1.2" /></bezel>
+ <bezel element="text_k3"><bounds x="30.21666" y="3.0666" width="2.7333" height="1.2" /></bezel>
+ <bezel element="text_k4"><bounds x="24.35" y="6" width="2.7333" height="1.2" /></bezel>
+ <bezel element="text_k5"><bounds x="27.28333" y="6" width="2.7333" height="1.2" /></bezel>
+ <bezel element="text_k6"><bounds x="30.21666" y="6" width="2.7333" height="1.2" /></bezel>
+ <bezel element="text_k7"><bounds x="24.35" y="8.9333" width="2.7333" height="1.2" /></bezel>
+ <bezel element="text_k8"><bounds x="27.28333" y="8.9333" width="2.7333" height="1.2" /></bezel>
+ <bezel element="text_k9"><bounds x="30.21666" y="8.9333" width="2.7333" height="1.2" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="24.35" y="2.3" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="27.28333" y="2.3" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="30.21666" y="2.3" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="24.35" y="5.2333" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="27.28333" y="5.2333" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="30.21666" y="5.2333" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="24.35" y="8.1666" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="27.28333" y="8.1666" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="30.21666" y="8.1666" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
+
+ <!-- other buttons -->
+
+ <bezel element="static_black2"><bounds x="19.1" y="3.8" width="3.05" height="11.6" /></bezel>
+ <bezel element="static_gold"><bounds x="19.3" y="4" width="2.65" height="2.65" /></bezel>
+ <bezel element="static_gold"><bounds x="19.3" y="6.85" width="2.65" height="2.65" /></bezel>
+ <bezel element="static_silv"><bounds x="19.3" y="9.7" width="2.65" height="2.65" /></bezel>
+ <bezel element="static_silv"><bounds x="19.3" y="12.55" width="2.65" height="2.65" /></bezel>
+
+ <bezel element="text_bl1"><bounds x="19.31" y="4.875" width="2.63" height="0.9" /></bezel>
+ <bezel element="text_bl2"><bounds x="19.31" y="7.725" width="2.63" height="0.9" /></bezel>
+ <bezel element="text_bl3"><bounds x="19.31" y="10.575" width="2.63" height="0.9" /></bezel>
+ <bezel element="text_bl4"><bounds x="19.31" y="13.425" width="2.63" height="0.9" /></bezel>
+
+ <bezel element="static_black2"><bounds x="35.15" y="3.8" width="3.05" height="11.6" /></bezel>
+ <bezel element="static_cyan2"><bounds x="35.35" y="4" width="2.65" height="2.65" /></bezel>
+ <bezel element="static_cyan2"><bounds x="35.35" y="6.85" width="2.65" height="2.65" /></bezel>
+ <bezel element="static_cyan1"><bounds x="35.35" y="9.7" width="2.65" height="2.65" /></bezel>
+ <bezel element="static_cyan1"><bounds x="35.35" y="12.55" width="2.65" height="2.65" /></bezel>
+
+ <bezel element="text_br1"><bounds x="35.36" y="4.875" width="2.63" height="0.9" /></bezel>
+ <bezel element="text_br2"><bounds x="35.36" y="7.725" width="2.63" height="0.9" /></bezel>
+ <bezel element="text_br31"><bounds x="35.36" y="10.125" width="2.63" height="0.9" /></bezel>
+ <bezel element="text_br32"><bounds x="35.36" y="11.025" width="2.63" height="0.9" /></bezel>
+ <bezel element="text_br4"><bounds x="35.36" y="13.425" width="2.63" height="0.9" /></bezel>
+
+ <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="19.3" y="4" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="19.3" y="6.85" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="19.3" y="9.7" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="19.3" y="12.55" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="FAKE" inputmask="0x01"><bounds x="35.35" y="4" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="FAKE" inputmask="0x02"><bounds x="35.35" y="6.85" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="35.35" y="9.7" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="35.35" y="12.55" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
+
+ <!-- crop borders -->
+
+ <bezel element="static_black"><bounds x="-2" y="-2" width="4.1" height="21" /></bezel>
+ <bezel element="static_black"><bounds x="-2" y="-2" width="43" height="3" /></bezel>
+ <bezel element="static_black"><bounds x="39.3" y="-2" width="4" height="21" /></bezel>
+ <bezel element="static_black"><bounds x="-2" y="17.4" width="43" height="4" /></bezel>
+
</view>
</mamelayout>
diff --git a/src/mame/layout/starwbc.lay b/src/mame/layout/starwbc.lay
index 6469cb7dc9a..faa5e219c6d 100644
--- a/src/mame/layout/starwbc.lay
+++ b/src/mame/layout/starwbc.lay
@@ -4,9 +4,22 @@
<!-- define elements -->
<element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
- <element name="static_yellow"><rect><color red="0.67" green="0.65" blue="0.1" /></rect></element>
- <element name="static_red"><rect><color red="0.6" green="0.05" blue="0.0" /></rect></element>
- <element name="static_gray"><rect><color red="0.66" green="0.66" blue="0.66" /></rect></element>
+ <element name="static_yellow"><rect><color red="0.7" green="0.65" blue="0.05" /></rect></element>
+ <element name="static_green"><rect><color red="0.5" green="0.7" blue="0.05" /></rect></element>
+ <element name="static_red"><rect><color red="0.7" green="0.05" blue="0.1" /></rect></element>
+ <element name="static_blue"><rect><color red="0.05" green="0.5" blue="0.7" /></rect></element>
+ <element name="static_white"><rect><color red="0.7" green="0.7" blue="0.7" /></rect></element>
+
+ <element name="hl" defstate="0">
+ <text string=" ">
+ <bounds x="0" y="0" width="24" height="21" />
+ <color red="0.0" green="0.0" blue="0.0" />
+ </text>
+ <disk state="1">
+ <bounds x="3.5" y="2" width="17" height="17" />
+ <color red="1.0" green="1.0" blue="1.0" />
+ </disk>
+ </element>
<element name="digit" defstate="0">
<led7seg><color red="1.0" green="0.25" blue="0.23" /></led7seg>
@@ -29,27 +42,61 @@
<disk state="0"><color red="0.2" green="0.05" blue="0.04" /></disk>
</element>
- <element name="text_a"><text string="A"><color red="0.69" green="0.69" blue="0.69" /></text></element>
- <element name="text_b"><text string="B"><color red="0.69" green="0.69" blue="0.69" /></text></element>
- <element name="text_c"><text string="C"><color red="0.69" green="0.69" blue="0.69" /></text></element>
- <element name="text_d"><text string="D"><color red="0.69" green="0.69" blue="0.69" /></text></element>
+ <element name="text_a"><text string="A"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_b"><text string="B"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_c"><text string="C"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_d"><text string="D"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_1"><text string="1"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_2"><text string="2"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_3"><text string="3"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_4"><text string="4"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+
+ <element name="text_alert"><text string="ALERT"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_combat"><text string="COMBAT"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_force"><text string="FORCE UNITS"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_players"><text string="PLAYERS"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+
+ <element name="text_byl">
+ <rect><color red="0.0" green="0.0" blue="0.0" /></rect>
+ <text string="RECONNAISSANCE"><color red="0.7" green="0.7" blue="0.7" /></text>
+ </element>
+ <element name="text_by1"><text string="MAGNA"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_by2"><text string="ENEMY"><color red="0.7" green="0.7" blue="0.7" /></text></element>
- <element name="text_1"><text string="1"><color red="0.69" green="0.69" blue="0.69" /></text></element>
- <element name="text_2"><text string="2"><color red="0.69" green="0.69" blue="0.69" /></text></element>
- <element name="text_3"><text string="3"><color red="0.69" green="0.69" blue="0.69" /></text></element>
- <element name="text_4"><text string="4"><color red="0.69" green="0.69" blue="0.69" /></text></element>
+ <element name="text_bbl">
+ <rect><color red="0.0" green="0.0" blue="0.0" /></rect>
+ <text string="GAME"><color red="0.7" green="0.7" blue="0.7" /></text>
+ </element>
+ <element name="text_bb1"><text string="BASIC"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_bb2"><text string="INTER"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_bb3"><text string="ADV"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_bb4"><text string="P#"><color red="0.7" green="0.7" blue="0.7" /></text></element>
- <element name="text_alert"><text string="ALERT"><color red="0.69" green="0.69" blue="0.69" /></text></element>
- <element name="text_combat"><text string="COMBAT"><color red="0.69" green="0.69" blue="0.69" /></text></element>
- <element name="text_force"><text string="FORCE UNITS"><color red="0.69" green="0.69" blue="0.69" /></text></element>
- <element name="text_players"><text string="PLAYERS"><color red="0.69" green="0.69" blue="0.69" /></text></element>
+ <element name="text_bgl">
+ <rect><color red="0.0" green="0.0" blue="0.0" /></rect>
+ <text string="TACTICAL REACTION"><color red="0.7" green="0.7" blue="0.7" /></text>
+ </element>
+ <element name="text_bg1"><text string="EM"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_bg2"><text string="BS"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_bg3"><text string="SCR"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_brl">
+ <rect><color red="0.0" green="0.0" blue="0.0" /></rect>
+ <text string="MANEUVERS"><color red="0.7" green="0.7" blue="0.7" /></text>
+ </element>
+ <element name="text_br11"><text string="START"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_br12"><text string="TURN"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_br21"><text string="END"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_br22"><text string="TURN"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_br3"><text string="MOVE"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_br4"><text string="FIRE"><color red="0.7" green="0.7" blue="0.7" /></text></element>
+ <element name="text_bra"><text string="-->"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<!-- build screen -->
<view name="Internal Layout">
- <bounds left="0" right="165" top="0" bottom="105" />
+ <bounds left="0" right="165" top="0" bottom="195" />
<bezel element="static_yellow"><bounds x="3" y="17" width="10" height="83" /></bezel>
<bezel element="static_black"><bounds x="4" y="18" width="8" height="81" /></bezel>
@@ -65,20 +112,19 @@
<bezel element="static_red"><bounds x="58" y="3.5" width="1" height="9" /></bezel>
<bezel element="static_red"><bounds x="78" y="3.5" width="1" height="9" /></bezel>
- <bezel element="text_a"><bounds x="4" y="24.5" width="8" height="8" /></bezel>
- <bezel element="text_b"><bounds x="4" y="44.5" width="8" height="8" /></bezel>
- <bezel element="text_c"><bounds x="4" y="64.5" width="8" height="8" /></bezel>
- <bezel element="text_d"><bounds x="4" y="84.5" width="8" height="8" /></bezel>
-
- <bezel element="text_1"><bounds x="24.5" y="4" width="8" height="8" /></bezel>
- <bezel element="text_2"><bounds x="44.5" y="4" width="8" height="8" /></bezel>
- <bezel element="text_3"><bounds x="64.5" y="4" width="8" height="8" /></bezel>
- <bezel element="text_4"><bounds x="84.5" y="4" width="8" height="8" /></bezel>
+ <bezel element="text_a"><bounds x="4" y="25" width="8" height="7" /></bezel>
+ <bezel element="text_b"><bounds x="4" y="45" width="8" height="7" /></bezel>
+ <bezel element="text_c"><bounds x="4" y="65" width="8" height="7" /></bezel>
+ <bezel element="text_d"><bounds x="4" y="85" width="8" height="7" /></bezel>
+ <bezel element="text_1"><bounds x="24.5" y="4.5" width="8" height="7" /></bezel>
+ <bezel element="text_2"><bounds x="44.5" y="4.5" width="8" height="7" /></bezel>
+ <bezel element="text_3"><bounds x="64.5" y="4.5" width="8" height="7" /></bezel>
+ <bezel element="text_4"><bounds x="84.5" y="4.5" width="8" height="7" /></bezel>
<!-- lamp matrix -->
- <bezel element="static_gray"><bounds x="17" y="17" width="83" height="83" /></bezel>
+ <bezel element="static_white"><bounds x="17" y="17" width="83" height="83" /></bezel>
<bezel name="lamp20" element="lamp"><bounds x="20" y="20" width="17" height="17" /></bezel>
<bezel name="lamp21" element="lamp"><bounds x="40" y="20" width="17" height="17" /></bezel>
@@ -100,28 +146,116 @@
<bezel name="lamp46" element="lamp"><bounds x="60" y="80" width="17" height="17" /></bezel>
<bezel name="lamp47" element="lamp"><bounds x="80" y="80" width="17" height="17" /></bezel>
-
<!-- right side -->
- <bezel element="static_gray"><bounds x="105" y="17" width="55" height="23" /></bezel>
+ <bezel element="static_white"><bounds x="105" y="17" width="55" height="23" /></bezel>
<bezel element="static_black"><bounds x="106" y="18" width="53" height="21" /></bezel>
<bezel element="text_alert"><bounds x="106" y="18.5" width="53" height="8" /></bezel>
<bezel name="lamp5" element="nlamp"><bounds x="130.8" y="30.5" width="3.4" height="3.4" /></bezel>
- <bezel element="static_gray"><bounds x="105" y="43" width="55" height="23" /></bezel>
+ <bezel element="static_white"><bounds x="105" y="43" width="55" height="23" /></bezel>
<bezel element="static_black"><bounds x="106" y="44" width="53" height="21" /></bezel>
- <bezel element="text_combat"><bounds x="106" y="44.5" width="53" height="8" /></bezel>
+ <bezel element="text_combat"><bounds x="106" y="45" width="53" height="7" /></bezel>
<bezel name="lamp4" element="nlamp"><bounds x="130.8" y="56.5" width="3.4" height="3.4" /></bezel>
- <bezel element="static_gray"><bounds x="105" y="69" width="55" height="31" /></bezel>
+ <bezel element="static_white"><bounds x="105" y="69" width="55" height="31" /></bezel>
<bezel element="static_black"><bounds x="106" y="70" width="53" height="29" /></bezel>
- <bezel element="text_force"><bounds x="106" y="70.5" width="53" height="8" /></bezel>
- <bezel element="text_players"><bounds x="106" y="90" width="53" height="8" /></bezel>
+ <bezel element="text_force"><bounds x="106" y="71" width="53" height="7" /></bezel>
+ <bezel element="text_players"><bounds x="106" y="90.5" width="53" height="7" /></bezel>
<bezel name="digit6" element="digit"><bounds x="126" y="79.7" width="6" height="9" /></bezel>
<bezel name="digit8" element="digit"><bounds x="132" y="79.7" width="6" height="9" /></bezel>
+ <!-- button panel -->
+
+ <bezel element="static_white"><bounds x="-1" y="105" width="167" height="1" /></bezel>
+
+ <bezel element="static_white"><bounds x="3" y="112" width="50" height="1" /></bezel>
+ <bezel element="text_byl"><bounds x="9.5" y="110" width="37" height="5" /></bezel>
+ <bezel element="static_yellow"><bounds x="3" y="116" width="24" height="21" /></bezel>
+ <bezel element="static_yellow"><bounds x="29" y="116" width="24" height="21" /></bezel>
+
+ <bezel element="static_white"><bounds x="84" y="112" width="76" height="1" /></bezel>
+ <bezel element="text_bgl"><bounds x="100.5" y="110" width="43" height="5" /></bezel>
+ <bezel element="static_green"><bounds x="84" y="116" width="24" height="21" /></bezel>
+ <bezel element="static_green"><bounds x="110" y="116" width="24" height="21" /></bezel>
+ <bezel element="static_green"><bounds x="136" y="116" width="24" height="21" /></bezel>
+
+ <bezel element="static_blue"><bounds x="3" y="142" width="24" height="21" /></bezel>
+ <bezel element="static_blue"><bounds x="29" y="142" width="24" height="21" /></bezel>
+ <bezel element="static_blue"><bounds x="3" y="165" width="24" height="21" /></bezel>
+ <bezel element="static_blue"><bounds x="29" y="165" width="24" height="21" /></bezel>
+ <bezel element="static_white"><bounds x="3" y="189" width="50" height="1" /></bezel>
+ <bezel element="text_bbl"><bounds x="21" y="187" width="14" height="5" /></bezel>
+
+ <bezel element="static_red"><bounds x="58" y="142" width="24" height="21" /></bezel>
+ <bezel element="static_red"><bounds x="84" y="142" width="24" height="21" /></bezel>
+ <bezel element="static_red"><bounds x="110" y="142" width="24" height="21" /></bezel>
+ <bezel element="static_red"><bounds x="136" y="142" width="24" height="21" /></bezel>
+ <bezel element="static_red"><bounds x="58" y="165" width="24" height="21" /></bezel>
+ <bezel element="static_red"><bounds x="84" y="165" width="24" height="21" /></bezel>
+ <bezel element="static_red"><bounds x="110" y="165" width="24" height="21" /></bezel>
+ <bezel element="static_red"><bounds x="136" y="165" width="24" height="21" /></bezel>
+ <bezel element="static_white"><bounds x="58" y="189" width="102" height="1" /></bezel>
+ <bezel element="text_brl"><bounds x="95.5" y="187" width="27" height="5" /></bezel>
+
+ <bezel element="static_black"><bounds x="6" y="119" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="32" y="119" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="87" y="119" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="113" y="119" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="139" y="119" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="6" y="145" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="32" y="145" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="6" y="168" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="32" y="168" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="61" y="145" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="87" y="145" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="113" y="145" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="139" y="145" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="61" y="168" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="87" y="168" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="113" y="168" width="18" height="15" /></bezel>
+ <bezel element="static_black"><bounds x="139" y="168" width="18" height="15" /></bezel>
+
+ <bezel element="text_by1"><bounds x="6" y="124" width="18" height="5" /></bezel>
+ <bezel element="text_by2"><bounds x="32" y="124" width="18" height="5" /></bezel>
+ <bezel element="text_bg1"><bounds x="87" y="124" width="18" height="5" /></bezel>
+ <bezel element="text_bg2"><bounds x="113" y="124" width="18" height="5" /></bezel>
+ <bezel element="text_bg3"><bounds x="139" y="124" width="18" height="5" /></bezel>
+ <bezel element="text_bb1"><bounds x="6" y="150" width="18" height="5" /></bezel>
+ <bezel element="text_bb2"><bounds x="32" y="150" width="18" height="5" /></bezel>
+ <bezel element="text_bb3"><bounds x="6" y="173" width="18" height="5" /></bezel>
+ <bezel element="text_bb4"><bounds x="32" y="173" width="18" height="5" /></bezel>
+ <bezel element="text_br11"><bounds x="61" y="147.5" width="18" height="5" /></bezel>
+ <bezel element="text_br12"><bounds x="61" y="152.5" width="18" height="5" /></bezel>
+ <bezel element="text_br21"><bounds x="87" y="147.5" width="18" height="5" /></bezel>
+ <bezel element="text_br22"><bounds x="87" y="152.5" width="18" height="5" /></bezel>
+ <bezel element="text_br3"><bounds x="113" y="150" width="18" height="5" /></bezel>
+ <bezel element="text_br4"><bounds x="139" y="150" width="18" height="5" /></bezel>
+ <bezel element="text_bra"><bounds x="61" y="173" width="18" height="5" /><orientation rotate="180" /></bezel>
+ <bezel element="text_bra"><bounds x="93.5" y="168" width="5" height="15" /><orientation rotate="270" /></bezel>
+ <bezel element="text_bra"><bounds x="113" y="173" width="18" height="5" /></bezel>
+ <bezel element="text_bra"><bounds x="145.5" y="168" width="5" height="15" /><orientation rotate="90" /></bezel>
+
+ <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="3" y="116" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="29" y="116" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="84" y="116" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="110" y="116" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="136" y="116" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="3" y="142" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="29" y="142" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="3" y="165" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="29" y="165" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="58" y="142" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="84" y="142" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="110" y="142" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="136" y="142" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="58" y="165" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="84" y="165" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="110" y="165" width="24" height="21" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="136" y="165" width="24" height="21" /><color alpha="0.15" /></bezel>
+
</view>
</mamelayout>
diff --git a/src/mame/machine/n64.cpp b/src/mame/machine/n64.cpp
index 32ba2ee627e..b7968787d94 100644
--- a/src/mame/machine/n64.cpp
+++ b/src/mame/machine/n64.cpp
@@ -1043,7 +1043,7 @@ READ32_MEMBER( n64_periphs::vi_reg_r )
break;
case 0x10/4: // VI_CURRENT_REG
- ret = (m_screen->vpos() & 0x3FE) + field; // << 1);
+ ret = (m_screen->vpos() & 0x3FE) + field;
break;
case 0x14/4: // VI_BURST_REG
@@ -1742,7 +1742,7 @@ int n64_periphs::pif_channel_handle_command(int channel, int slength, UINT8 *sda
{
// Read EEPROM status
rdata[0] = 0x00;
- rdata[1] = 0x80;
+ rdata[1] = (machine().root_device().ioport("input")->read() >> 8) & 0xC0;
rdata[2] = 0x00;
return 0;
@@ -2127,9 +2127,7 @@ void n64_periphs::pif_dma(int direction)
}
}
si_status |= 1;
- si_dma_timer->adjust(attotime::from_hz(1000));
- //si_status |= 0x1000;
- //signal_rcp_interrupt(SI_INTERRUPT);
+ si_dma_timer->adjust(attotime::from_hz(10000));
}
READ32_MEMBER( n64_periphs::si_reg_r )
@@ -2171,6 +2169,7 @@ WRITE32_MEMBER( n64_periphs::si_reg_w )
case 0x18/4: // SI_STATUS_REG
si_status = 0;
+ si_dma_timer->adjust(attotime::never);
clear_rcp_interrupt(SI_INTERRUPT);
break;
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index ac22cb7c080..5922ef777c0 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -8890,6 +8890,7 @@ ccbootmr // Model Racing bootleg
cclimber // (c) 1980 Nichibutsu
cclimberj // (c) 1980 Nichibutsu
cclimbroper // Operamatic bootleg
+cclimbrrod // Rodmar bootleg
ckong // (c) 1981 (Kyoei)
ckongalc // bootleg (Alca)
ckongdks // Spanish Crazy Kong bootleg
@@ -35650,6 +35651,7 @@ videopkr // (c) 1984 InterFlip
@source:vigilant.cpp
buccanrs // (c) 1989 Duintronic
buccanrsa // (c) 1989 Duintronic
+buccanrsb // (c) 1989 Duintronic
kikcubic // (c) 1988 (Japan)
kikcubicb // bootleg
vigilant // (c) 1988 (World Rev E)
diff --git a/src/osd/modules/file/posixsocket.cpp b/src/osd/modules/file/posixsocket.cpp
index f6f465dd5d7..d6655e4cf15 100644
--- a/src/osd/modules/file/posixsocket.cpp
+++ b/src/osd/modules/file/posixsocket.cpp
@@ -50,10 +50,6 @@ public:
virtual error read(void *buffer, std::uint64_t offset, std::uint32_t count, std::uint32_t &actual) override
{
-#if defined(EMSCRIPTEN)
- m_listening = false;
- return error::FAILURE; // TODO: work out what it dislikes about emscripten
-#else
fd_set readfds;
FD_ZERO(&readfds);
FD_SET(m_sock, &readfds);
@@ -107,7 +103,6 @@ public:
{
return error::FAILURE;
}
-#endif
}
virtual error write(void const *buffer, std::uint64_t offset, std::uint32_t count, std::uint32_t &actual) override
diff --git a/src/osd/modules/font/font_dwrite.cpp b/src/osd/modules/font/font_dwrite.cpp
index cfcc952ef0d..80a8ba3a810 100644
--- a/src/osd/modules/font/font_dwrite.cpp
+++ b/src/osd/modules/font/font_dwrite.cpp
@@ -14,7 +14,6 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#include <tchar.h>
#include <memory>
@@ -25,7 +24,6 @@
#include <initguid.h>
// Direct2D
-#include <dxgi1_2.h>
#include <d2d1_1.h>
#include <dwrite_1.h>
@@ -36,11 +34,8 @@ DEFINE_GUID(GUID_WICPixelFormat8bppAlpha, 0xe6cd0116, 0xeeba, 0x4161, 0xaa, 0x85
#include <wrl\client.h>
#undef interface
-#include "emu.h"
#include "strconv.h"
#include "corestr.h"
-#include "corealloc.h"
-#include "fileio.h"
#include "winutil.h"
using namespace Microsoft::WRL;
@@ -72,6 +67,16 @@ static const float POINTS_PER_DIP = (3.0f / 4.0f);
#define HR_RET0( CALL ) HR_RET(CALL, 0)
#define HR_RET1( CALL ) HR_RET(CALL, 1)
+struct osd_deleter
+{
+ void operator () (void * osd_pointer) const
+ {
+ osd_free(osd_pointer);
+ }
+};
+
+typedef std::unique_ptr<char, osd_deleter> osd_utf8_ptr;
+
// Typedefs for dynamically loaded functions
typedef lazy_loaded_function_p4<HRESULT, D2D1_FACTORY_TYPE, REFIID, const D2D1_FACTORY_OPTIONS*, void**> d2d_create_factory_fn;
typedef lazy_loaded_function_p3<HRESULT, DWRITE_FACTORY_TYPE, REFIID, IUnknown**> dwrite_create_factory_fn;
@@ -201,32 +206,32 @@ public:
m_designUnits = designUnits;
}
- UINT16 DesignUnitsPerEm()
+ UINT16 DesignUnitsPerEm() const
{
return m_designUnitsPerEm;
}
- float EmSizeInDip()
+ float EmSizeInDip() const
{
return m_emSizeInDip;
}
- float DesignUnits()
+ float DesignUnits() const
{
return m_designUnits;
}
- int Dips()
+ int Dips() const
{
- return (int)floor((m_designUnits * m_emSizeInDip) / m_designUnitsPerEm);
+ return static_cast<int>(floor((m_designUnits * m_emSizeInDip) / m_designUnitsPerEm));
}
- float Points()
+ float Points() const
{
return Dips() * POINTS_PER_DIP;
}
- FontDimension operator-(const FontDimension &other)
+ FontDimension operator-(const FontDimension &other) const
{
if (m_designUnitsPerEm != other.m_designUnitsPerEm || m_emSizeInDip != other.m_emSizeInDip)
{
@@ -236,7 +241,7 @@ public:
return FontDimension(m_designUnitsPerEm, m_emSizeInDip, m_designUnits - other.m_designUnits);
}
- FontDimension operator+(const FontDimension &other)
+ FontDimension operator+(const FontDimension &other) const
{
if (m_designUnitsPerEm != other.m_designUnitsPerEm || m_emSizeInDip != other.m_emSizeInDip)
{
@@ -267,12 +272,12 @@ public:
{
}
- FontDimension advanceWidth() { return m_advanceWidth; }
- FontDimension abcA() { return m_a; }
+ FontDimension advanceWidth() const { return m_advanceWidth; }
+ FontDimension abcA() const { return m_a; }
// Relationship between advanceWidth and B is ADV = A + B + C so B = ADV - A - C
- FontDimension abcB() { return advanceWidth() - abcA() - abcC(); }
- FontDimension abcC() { return m_c; }
+ FontDimension abcB() const { return advanceWidth() - abcA() - abcC(); }
+ FontDimension abcC() const { return m_c; }
};
//-------------------------------------------------
@@ -287,7 +292,7 @@ private:
float m_emSizeInDip;
public:
- float EmSizeInDip()
+ float EmSizeInDip() const
{
return m_emSizeInDip;
}
@@ -298,25 +303,25 @@ public:
m_emSizeInDip = emSizeInDip;
}
- FontDimension FromDip(float dip)
+ FontDimension FromDip(float dip) const
{
float sizeInDesignUnits = (dip / m_emSizeInDip) * m_designUnitsPerEm;
return FontDimension(m_designUnitsPerEm, m_emSizeInDip, sizeInDesignUnits);
}
- FontDimension FromDesignUnit(float designUnits)
+ FontDimension FromDesignUnit(float designUnits) const
{
return FontDimension(m_designUnitsPerEm, m_emSizeInDip, designUnits);
}
- FontDimension FromPoint(float pointSize)
+ FontDimension FromPoint(float pointSize) const
{
float sizeInDip = pointSize * (4.0f / 3.0f);
float sizeInDesignUnits = (sizeInDip / m_emSizeInDip) * m_designUnitsPerEm;
return FontDimension(m_designUnitsPerEm, m_emSizeInDip, sizeInDesignUnits);
}
- FontABCWidths CreateAbcWidths(float advanceWidth, float leftSideBearing, float rightSideBearing)
+ FontABCWidths CreateAbcWidths(float advanceWidth, float leftSideBearing, float rightSideBearing) const
{
return FontABCWidths(
FromDesignUnit(advanceWidth),
@@ -341,11 +346,11 @@ private:
public:
osd_font_dwrite(ComPtr<ID2D1Factory> d2dfactory, ComPtr<IDWriteFactory> dwriteFactory, ComPtr<IWICImagingFactory> wicFactory)
- : m_d2dfactory(d2dfactory), m_dwriteFactory(dwriteFactory), m_wicFactory(wicFactory)
+ : m_d2dfactory(d2dfactory), m_dwriteFactory(dwriteFactory), m_wicFactory(wicFactory), m_fontEmHeightInDips(0)
{
}
- virtual bool open(const char *font_path, const char *_name, int &height) override
+ virtual bool open(std::string const &font_path, std::string const &_name, int &height) override
{
if (m_d2dfactory == nullptr || m_dwriteFactory == nullptr || m_wicFactory == nullptr)
return false;
@@ -359,11 +364,11 @@ public:
bool italic = (strreplace(name, "[I]", "") + strreplace(name, "[i]", "") > 0);
// convert the face name
- auto familyName = std::wstring(std::unique_ptr<WCHAR, void(*)(void *)>(wstring_from_utf8(name.c_str()), osd_free).get());
+ std::unique_ptr<WCHAR, void(*)(void *)> familyName(wstring_from_utf8(name.c_str()), osd_free);
// find the font
HR_RET0(find_font(
- familyName.c_str(),
+ familyName.get(),
bold ? DWRITE_FONT_WEIGHT_BOLD : DWRITE_FONT_WEIGHT_NORMAL,
DWRITE_FONT_STRETCH_NORMAL,
italic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL,
@@ -373,7 +378,7 @@ public:
m_font->GetMetrics(&metrics);
m_fontEmHeightInDips = DEFAULT_EM_HEIGHT;
- height = (int)round(m_fontEmHeightInDips * DIPS_PER_POINT);
+ height = static_cast<int>(round(m_fontEmHeightInDips * DIPS_PER_POINT));
return true;
}
@@ -397,7 +402,7 @@ public:
// pixel of a black & white font
//-------------------------------------------------
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs) override
+ virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) override
{
const int MEM_ALIGN_CONST = 31;
const int BITMAP_PAD = 50;
@@ -493,7 +498,7 @@ public:
target->Clear(D2D1::ColorF(0.0f, 0.0f, 0.0f, 0.0f));
// now draw the character
- DWRITE_GLYPH_RUN run = { 0 };
+ DWRITE_GLYPH_RUN run = { nullptr };
DWRITE_GLYPH_OFFSET offsets;
offsets.advanceOffset = 0;
offsets.ascenderOffset = 0;
@@ -528,7 +533,7 @@ public:
// Lock the bitmap and get the data pointer
WICRect rect = { 0, 0, bmwidth, bmheight };
HR_RET0(wicBitmap->Lock(&rect, WICBitmapLockRead, lock.GetAddressOf()));
- HR_RET0(lock->GetDataPointer(&cbData, (BYTE**)&pixels));
+ HR_RET0(lock->GetDataPointer(&cbData, static_cast<BYTE**>(&pixels)));
// determine the actual left of the character
for (actbounds.min_x = 0; actbounds.min_x < bmwidth; actbounds.min_x++)
@@ -610,9 +615,9 @@ private:
// find_font - finds a font, given attributes
//-------------------------------------------------
- HRESULT find_font(std::wstring familyName, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STRETCH stretch, DWRITE_FONT_STYLE style, IDWriteFont ** ppfont)
+ HRESULT find_font(std::wstring familyName, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STRETCH stretch, DWRITE_FONT_STYLE style, IDWriteFont ** ppfont) const
{
- HRESULT result = S_OK;
+ HRESULT result;
ComPtr<IDWriteFontCollection> fonts;
HR_RETHR(m_dwriteFactory->GetSystemFontCollection(fonts.GetAddressOf()));
@@ -695,7 +700,7 @@ public:
reinterpret_cast<void**>(this->m_d2dfactory.GetAddressOf())));
// Initialize COM
- CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+ CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
// Create a DirectWrite factory.
HR_RET1(m_pfnDWriteCreateFactory(
@@ -708,15 +713,97 @@ public:
NULL,
CLSCTX_INPROC_SERVER,
__uuidof(IWICImagingFactory),
- (void**)&m_wicFactory));
+ static_cast<void**>(&m_wicFactory)));
osd_printf_verbose("FontProvider: DirectWrite initialized successfully.\n");
return 0;
}
- virtual osd_font *font_alloc() override
+ virtual osd_font::ptr font_alloc() override
+ {
+ return std::make_unique<osd_font_dwrite>(m_d2dfactory, m_dwriteFactory, m_wicFactory);
+ }
+
+ virtual bool get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &fontresult) override
+ {
+ HRESULT result;
+ ComPtr<IDWriteFontFamily> family;
+ ComPtr<IDWriteLocalizedStrings> names;
+
+ // For now, we're just enumerating system fonts, if we want to support custom font
+ // collections, there's more work that neeeds to be done
+ ComPtr<IDWriteFontCollection> fonts;
+ HR_RET0(m_dwriteFactory->GetSystemFontCollection(fonts.GetAddressOf()));
+
+ int family_count = fonts->GetFontFamilyCount();
+ for (int i = 0; i < family_count; i++)
+ {
+ HR_RET0(fonts->GetFontFamily(i, family.ReleaseAndGetAddressOf()));
+
+ HR_RET0(family->GetFamilyNames(names.ReleaseAndGetAddressOf()));
+
+ std::unique_ptr<WCHAR[]> name = nullptr;
+ HR_RET0(get_localized_familyname(names, name));
+
+ auto utf8_name = osd_utf8_ptr(utf8_from_wstring(name.get()));
+ name.reset();
+
+ // Review: should the config name, be unlocalized?
+ // maybe the english name?
+ fontresult.push_back(
+ make_pair(
+ std::string(utf8_name.get()),
+ std::string(utf8_name.get())));
+
+ utf8_name.reset();
+ }
+
+ std::stable_sort(fontresult.begin(), fontresult.end());
+ return true;
+ }
+
+private:
+ HRESULT get_family_for_locale(ComPtr<IDWriteLocalizedStrings> family_names, const WCHAR* locale, std::unique_ptr<WCHAR[]> &family_name) const
+ {
+ HRESULT result;
+ UINT32 index;
+ BOOL exists = false;
+
+ result = family_names->FindLocaleName(locale, &index, &exists);
+
+ // if the above find did not find a match, retry with US English
+ if (SUCCEEDED(result) && !exists)
+ family_names->FindLocaleName(L"en-us", &index, &exists);
+
+ // If the specified locale doesn't exist, select the first on the list.
+ if (!exists)
+ index = 0;
+
+ // Get the length and allocate our buffer
+ UINT32 name_length = 0;
+ HR_RETHR(family_names->GetStringLength(index, &name_length));
+ auto name_buffer = std::make_unique<WCHAR[]>(name_length + 1);
+
+ // Get the name
+ HR_RETHR(family_names->GetString(index, name_buffer.get(), name_length + 1));
+
+ family_name = std::move(name_buffer);
+ return S_OK;
+ }
+
+ HRESULT get_localized_familyname(ComPtr<IDWriteLocalizedStrings> family_names, std::unique_ptr<WCHAR[]> &family_name) const
{
- return global_alloc(osd_font_dwrite(m_d2dfactory, m_dwriteFactory, m_wicFactory));
+ wchar_t localeName[LOCALE_NAME_MAX_LENGTH];
+
+ // Get the default locale for this user.
+ int defaultLocaleSuccess = GetUserDefaultLocaleName(localeName, LOCALE_NAME_MAX_LENGTH);
+
+ // If the default locale is returned, find that locale name, otherwise use "en-us".
+ if (defaultLocaleSuccess)
+ return get_family_for_locale(family_names, localeName, family_name);
+
+ // If locale can't be determined, fall back to US English
+ return get_family_for_locale(family_names, L"en-us", family_name);
}
};
diff --git a/src/osd/modules/font/font_module.h b/src/osd/modules/font/font_module.h
index c9c7b1f40cb..81ffaca74e5 100644
--- a/src/osd/modules/font/font_module.h
+++ b/src/osd/modules/font/font_module.h
@@ -5,12 +5,16 @@
*
*/
-#ifndef FONT_MODULE_H_
-#define FONT_MODULE_H_
+#ifndef MAME_OSD_MODULES_FONT_FONTMODULE_H
+#define MAME_OSD_MODULES_FONT_FONTMODULE_H
#include "osdepend.h"
#include "modules/osdmodule.h"
+#include <string>
+#include <vector>
+
+
//============================================================
// CONSTANTS
//============================================================
@@ -21,8 +25,13 @@ class font_module
{
public:
virtual ~font_module() { }
- virtual osd_font *font_alloc() = 0;
+
+ /** attempt to allocate a font instance */
+ virtual osd_font::ptr font_alloc() = 0;
+
+ /** attempt to list available font families */
+ virtual bool get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result) = 0;
};
-#endif /* FONT_MODULE_H_ */
+#endif // MAME_OSD_MODULES_FONT_FONTMODULE_H
diff --git a/src/osd/modules/font/font_none.cpp b/src/osd/modules/font/font_none.cpp
index de9d01bb103..2716b52cf8e 100644
--- a/src/osd/modules/font/font_none.cpp
+++ b/src/osd/modules/font/font_none.cpp
@@ -8,61 +8,25 @@
#include "font_module.h"
#include "modules/osdmodule.h"
-//-------------------------------------------------
-// font_open - attempt to "open" a handle to the
-// font with the given name
-//-------------------------------------------------
-
class osd_font_none : public osd_font
{
public:
virtual ~osd_font_none() { }
- virtual bool open(const char *font_path, const char *name, int &height) override;
- virtual void close() override;
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs) override;
+ virtual bool open(std::string const &font_path, std::string const &name, int &height) override { return false; }
+ virtual void close() override { }
+ virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) override { return false; }
};
-bool osd_font_none::open(const char *font_path, const char *_name, int &height)
-{
- return false;
-}
-
-//-------------------------------------------------
-// font_close - release resources associated with
-// a given OSD font
-//-------------------------------------------------
-
-void osd_font_none::close()
-{
-}
-
-//-------------------------------------------------
-// font_get_bitmap - allocate and populate a
-// BITMAP_FORMAT_ARGB32 bitmap containing the
-// pixel values rgb_t(0xff,0xff,0xff,0xff)
-// or rgb_t(0x00,0xff,0xff,0xff) for each
-// pixel of a black & white font
-//-------------------------------------------------
-
-bool osd_font_none::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs)
-{
- return false;
-}
-
class font_none : public osd_module, public font_module
{
public:
- font_none() : osd_module(OSD_FONT_PROVIDER, "none"), font_module()
- {
- }
+ font_none() : osd_module(OSD_FONT_PROVIDER, "none"), font_module() { }
virtual int init(const osd_options &options) override { return 0; }
- virtual osd_font *font_alloc() override
- {
- return global_alloc(osd_font_none);
- }
+ virtual osd_font::ptr font_alloc() override { return std::make_unique<osd_font_none>(); }
+ virtual bool get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result) override { return false; }
};
MODULE_DEFINITION(FONT_NONE, font_none)
diff --git a/src/osd/modules/font/font_osx.cpp b/src/osd/modules/font/font_osx.cpp
index 831321fdf34..e1c5137b397 100644
--- a/src/osd/modules/font/font_osx.cpp
+++ b/src/osd/modules/font/font_osx.cpp
@@ -1,5 +1,5 @@
// license:BSD-3-Clause
-// copyright-holders:Olivier Galibert, R. Belmont
+// copyright-holders:Olivier Galibert, R. Belmont, Vas Crabb
/*
* font_osx.c
*
@@ -10,14 +10,11 @@
#ifdef SDLMAME_MACOSX
-#include <Carbon/Carbon.h>
-
#include "corealloc.h"
#include "fileio.h"
-#define POINT_SIZE 144.0
-#define EXTRA_HEIGHT 1.0
-#define EXTRA_WIDTH 1.15
+#include <ApplicationServices/ApplicationServices.h>
+#include <CoreFoundation/CoreFoundation.h>
//-------------------------------------------------
// font_open - attempt to "open" a handle to the
@@ -27,48 +24,64 @@
class osd_font_osx : public osd_font
{
public:
- virtual ~osd_font_osx() { }
+ osd_font_osx() : m_font(NULL) { }
+ osd_font_osx(osd_font_osx &&obj) : m_font(obj.m_font) { obj.m_font = NULL; }
+ virtual ~osd_font_osx() { close(); }
- virtual bool open(const char *font_path, const char *name, int &height);
+ virtual bool open(std::string const &font_path, std::string const &name, int &height);
virtual void close();
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs);
+ virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs);
+
+ osd_font_osx &operator=(osd_font_osx &&obj)
+ {
+ using std::swap;
+ swap(m_font, obj.m_font);
+ return *this;
+ }
+
private:
+ osd_font_osx(osd_font_osx const &) = delete;
+ osd_font_osx &operator=(osd_font_osx const &) = delete;
+
+ static constexpr CGFloat POINT_SIZE = 144.0;
+ static constexpr CGFloat EXTRA_HEIGHT = 1.0;
+ static constexpr CGFloat EXTRA_WIDTH = 1.15;
+
CTFontRef m_font;
};
-bool osd_font_osx::open(const char *font_path, const char *name, int &height)
+bool osd_font_osx::open(std::string const &font_path, std::string const &name, int &height)
{
- m_font = NULL;
- osd_printf_verbose("FONT NAME %s\n", name);
+ osd_printf_verbose("FONT NAME %s\n", name.c_str());
#if 0
- if (!strcmp(name, "default"))
+ if (name != "default")
{
name = "LucidaGrande";
}
#endif
- CFStringRef const font_name = CFStringCreateWithCString(NULL, name, kCFStringEncodingUTF8);
- if (kCFNotFound != CFStringFind(font_name, CFSTR(".BDF"), kCFCompareCaseInsensitive | kCFCompareBackwards | kCFCompareAnchored | kCFCompareNonliteral).location)
+ CFStringRef const font_name = CFStringCreateWithCString(NULL, name.c_str(), kCFStringEncodingUTF8);
+ if (font_name && (kCFNotFound != CFStringFind(font_name, CFSTR(".BDF"), kCFCompareCaseInsensitive | kCFCompareBackwards | kCFCompareAnchored | kCFCompareNonliteral).location))
{
// handle bdf fonts in the core
CFRelease(font_name);
return false;
}
CTFontRef ct_font = NULL;
- if (font_name != NULL)
+ if (font_name)
{
CTFontDescriptorRef const font_descriptor = CTFontDescriptorCreateWithNameAndSize(font_name, 0.0);
- if (font_descriptor != NULL)
+ if (font_descriptor)
{
ct_font = CTFontCreateWithFontDescriptor(font_descriptor, POINT_SIZE, &CGAffineTransformIdentity);
CFRelease(font_descriptor);
}
+ CFRelease(font_name);
}
- CFRelease(font_name);
if (!ct_font)
{
- osd_printf_verbose("Couldn't find/open font %s, using MAME default\n", name);
+ osd_printf_verbose("Couldn't find/open font %s, using MAME default\n", name.c_str());
return false;
}
@@ -84,6 +97,7 @@ bool osd_font_osx::open(const char *font_path, const char *name, int &height)
line_height += CTFontGetLeading(ct_font);
height = ceilf(line_height * EXTRA_HEIGHT);
+ close();
m_font = ct_font;
return true;
}
@@ -96,9 +110,8 @@ bool osd_font_osx::open(const char *font_path, const char *name, int &height)
void osd_font_osx::close()
{
if (m_font != NULL)
- {
CFRelease(m_font);
- }
+ m_font = NULL;
}
//-------------------------------------------------
@@ -109,7 +122,7 @@ void osd_font_osx::close()
// pixel of a black & white font
//-------------------------------------------------
-bool osd_font_osx::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs)
+bool osd_font_osx::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs)
{
UniChar uni_char;
CGGlyph glyph;
@@ -180,21 +193,89 @@ bool osd_font_osx::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &
class font_osx : public osd_module, public font_module
{
public:
- font_osx()
- : osd_module(OSD_FONT_PROVIDER, "osx"), font_module()
+ font_osx() : osd_module(OSD_FONT_PROVIDER, "osx"), font_module() { }
+
+ virtual int init(const osd_options &options) override { return 0; }
+ virtual osd_font::ptr font_alloc() override { return std::make_unique<osd_font_osx>(); }
+ virtual bool get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result) override;
+
+private:
+ static CFComparisonResult sort_callback(CTFontDescriptorRef first, CTFontDescriptorRef second, void *refCon)
{
+ CFStringRef left = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(first, kCTFontDisplayNameAttribute, NULL);
+ if (!left) left = (CFStringRef)CTFontDescriptorCopyAttribute(first, kCTFontNameAttribute);
+ CFStringRef right = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(second, kCTFontDisplayNameAttribute, NULL);
+ if (!right) right = (CFStringRef)CTFontDescriptorCopyAttribute(second, kCTFontNameAttribute);
+
+ CFComparisonResult result;
+ if (left && right) result = CFStringCompareWithOptions(left, right, CFRangeMake(0, CFStringGetLength(left)), kCFCompareCaseInsensitive | kCFCompareLocalized | kCFCompareNonliteral);
+ else if (!left) result = kCFCompareLessThan;
+ else if (!right) result = kCFCompareGreaterThan;
+ else result = kCFCompareEqualTo;
+
+ if (left) CFRelease(left);
+ if (right) CFRelease(right);
+ return result;
}
+};
- virtual int init(const osd_options &options) { return 0; }
-
- osd_font *font_alloc()
+bool font_osx::get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result)
+{
+ CFStringRef keys[] = { kCTFontCollectionRemoveDuplicatesOption };
+ std::uintptr_t values[ARRAY_LENGTH(keys)] = { 1 };
+ CFDictionaryRef const options = CFDictionaryCreate(kCFAllocatorDefault, (void const **)keys, (void const **)values, ARRAY_LENGTH(keys), &kCFTypeDictionaryKeyCallBacks, NULL);
+ CTFontCollectionRef const collection = CTFontCollectionCreateFromAvailableFonts(NULL);
+ CFRelease(options);
+ if (!collection) return false;
+
+ CFArrayRef const descriptors = CTFontCollectionCreateMatchingFontDescriptorsSortedWithCallback(collection, &sort_callback, nullptr);
+ CFRelease(collection);
+ if (!descriptors) return false;
+
+ result.clear();
+ CFIndex const count = CFArrayGetCount(descriptors);
+ result.reserve(count);
+ for (CFIndex i = 0; i != count; i++)
{
- return global_alloc(osd_font_osx);
+ CTFontDescriptorRef const font = (CTFontDescriptorRef)CFArrayGetValueAtIndex(descriptors, i);
+ CFStringRef const name = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontNameAttribute);
+ CFStringRef const display = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(font, kCTFontDisplayNameAttribute, NULL);
+
+ if (name && display)
+ {
+ char const *utf;
+ std::vector<char> buf;
+
+ utf = CFStringGetCStringPtr(name, kCFStringEncodingUTF8);
+ if (!utf)
+ {
+ buf.resize(CFStringGetMaximumSizeForEncoding(std::max(CFStringGetLength(name), CFStringGetLength(display)), kCFStringEncodingUTF8));
+ CFStringGetCString(name, &buf[0], buf.size(), kCFStringEncodingUTF8);
+ }
+ std::string utf8name(utf ? utf : &buf[0]);
+
+ utf = CFStringGetCStringPtr(display, kCFStringEncodingUTF8);
+ if (!utf)
+ {
+ buf.resize(CFStringGetMaximumSizeForEncoding(CFStringGetLength(display), kCFStringEncodingUTF8));
+ CFStringGetCString(display, &buf[0], buf.size(), kCFStringEncodingUTF8);
+ }
+ std::string utf8display(utf ? utf : &buf[0]);
+
+ result.emplace_back(std::move(utf8name), std::move(utf8display));
+ }
+
+ if (name) CFRelease(name);
+ if (display) CFRelease(display);
}
-};
+ return true;
+}
+
#else /* SDLMAME_MACOSX */
- MODULE_NOT_SUPPORTED(font_osx, OSD_FONT_PROVIDER, "osx")
+
+MODULE_NOT_SUPPORTED(font_osx, OSD_FONT_PROVIDER, "osx")
+
#endif
MODULE_DEFINITION(FONT_OSX, font_osx)
diff --git a/src/osd/modules/font/font_sdl.cpp b/src/osd/modules/font/font_sdl.cpp
index ace9963a28b..bfe3013032e 100644
--- a/src/osd/modules/font/font_sdl.cpp
+++ b/src/osd/modules/font/font_sdl.cpp
@@ -1,5 +1,5 @@
// license:BSD-3-Clause
-// copyright-holders:Olivier Galibert, R. Belmont
+// copyright-holders:Olivier Galibert, R. Belmont, Vas Crabb
/*
* font_sdl.c
*
@@ -8,19 +8,22 @@
#include "font_module.h"
#include "modules/osdmodule.h"
-#if defined(SDLMAME_UNIX) && (!defined(SDLMAME_MACOSX)) && (!defined(SDLMAME_SOLARIS)) && (!defined(SDLMAME_HAIKU)) && (!defined(SDLMAME_EMSCRIPTEN))
-
-#include <SDL2/SDL_ttf.h>
-#ifndef SDLMAME_HAIKU
-#include <fontconfig/fontconfig.h>
-#endif
-
+#if defined(SDLMAME_UNIX) && !defined(SDLMAME_MACOSX) && !defined(SDLMAME_SOLARIS) && !defined(SDLMAME_HAIKU)
#include "corestr.h"
#include "corealloc.h"
#include "fileio.h"
+#include "unicode.h"
+
+#ifdef SDLMAME_EMSCRIPTEN
+#include <SDL_ttf.h>
+#else
+#include <SDL2/SDL_ttf.h>
+#endif
+#if !defined(SDLMAME_HAIKU) && !defined(SDLMAME_EMSCRIPTEN)
+#include <fontconfig/fontconfig.h>
+#endif
-#define POINT_SIZE 144.0
//-------------------------------------------------
// font_open - attempt to "open" a handle to the
@@ -30,63 +33,78 @@
class osd_font_sdl : public osd_font
{
public:
- virtual ~osd_font_sdl() { }
+ osd_font_sdl() : m_font(nullptr, &TTF_CloseFont) { }
+ osd_font_sdl(osd_font_sdl &&obj) : m_font(std::move(obj.m_font)) { }
+ virtual ~osd_font_sdl() { close(); }
- virtual bool open(const char *font_path, const char *name, int &height);
+ virtual bool open(std::string const &font_path, std::string const &name, int &height);
virtual void close();
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs);
+ virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs);
+
+ osd_font_sdl & operator=(osd_font_sdl &&obj)
+ {
+ using std::swap;
+ swap(m_font, obj.m_font);
+ return *this;
+ }
+
private:
-#ifndef SDLMAME_HAIKU
- TTF_Font *search_font_config(std::string name, bool bold, bool italic, bool underline, bool &bakedstyles);
+ typedef std::unique_ptr<TTF_Font, void (*)(TTF_Font *)> TTF_Font_ptr;
+
+ osd_font_sdl(osd_font_sdl const &) = delete;
+ osd_font_sdl & operator=(osd_font_sdl const &) = delete;
+
+ static constexpr double POINT_SIZE = 144.0;
+
+#if !defined(SDLMAME_HAIKU) && !defined(SDLMAME_EMSCRIPTEN)
+ TTF_Font_ptr search_font_config(std::string const &family, std::string const &style, bool &bakedstyles);
#endif
- bool BDF_Check_Magic(std::string name);
- TTF_Font * TTF_OpenFont_Magic(std::string name, int fsize);
- TTF_Font *m_font;
+ bool BDF_Check_Magic(std::string const &name);
+ TTF_Font_ptr TTF_OpenFont_Magic(std::string const &name, int fsize, long index);
+
+ TTF_Font_ptr m_font;
};
-bool osd_font_sdl::open(const char *font_path, const char *_name, int &height)
+bool osd_font_sdl::open(std::string const &font_path, std::string const &_name, int &height)
{
- TTF_Font *font = (TTF_Font *)NULL;
bool bakedstyles = false;
- int style = 0;
- // accept qualifiers from the name
std::string name(_name);
-
- if (name.compare("default")==0)
+ if (name.compare("default") == 0)
{
- name = "Liberation Sans";
+ name = "Liberation Sans|Regular";
}
- bool bold = (strreplace(name, "[B]", "") + strreplace(name, "[b]", "") > 0);
- bool italic = (strreplace(name, "[I]", "") + strreplace(name, "[i]", "") > 0);
- bool underline = (strreplace(name, "[U]", "") + strreplace(name, "[u]", "") > 0);
- bool strike = (strreplace(name, "[S]", "") + strreplace(name, "[s]", "") > 0);
+ // accept qualifiers from the name
+ bool const underline = (strreplace(name, "[U]", "") + strreplace(name, "[u]", "") > 0);
+ bool const strike = (strreplace(name, "[S]", "") + strreplace(name, "[s]", "") > 0);
+ std::string::size_type const separator = name.rfind('|');
+ std::string const family(name.substr(0, separator));
+ std::string const style((std::string::npos != separator) ? name.substr(separator + 1) : std::string());
// first up, try it as a filename
- font = TTF_OpenFont_Magic(name, POINT_SIZE);
+ TTF_Font_ptr font = TTF_OpenFont_Magic(family, POINT_SIZE, 0);
// if no success, try the font path
-
if (!font)
{
- osd_printf_verbose("Searching font %s in -%s\n", name.c_str(), OPTION_FONTPATH);
+ osd_printf_verbose("Searching font %s in -%s\n", family.c_str(), OPTION_FONTPATH);
//emu_file file(options().font_path(), OPEN_FLAG_READ);
- emu_file file(font_path, OPEN_FLAG_READ);
- if (file.open(name.c_str()) == osd_file::error::NONE)
+ emu_file file(font_path.c_str(), OPEN_FLAG_READ);
+ if (file.open(family.c_str()) == osd_file::error::NONE)
{
std::string full_name = file.fullpath();
- font = TTF_OpenFont_Magic(full_name, POINT_SIZE);
+ font = TTF_OpenFont_Magic(full_name, POINT_SIZE, 0);
if (font)
osd_printf_verbose("Found font %s\n", full_name.c_str());
}
}
// if that didn't work, crank up the FontConfig database
-#ifndef SDLMAME_HAIKU
+#if !defined(SDLMAME_HAIKU) && !defined(SDLMAME_EMSCRIPTEN)
if (!font)
{
- font = search_font_config(name, bold, italic, underline, bakedstyles);
+ font = search_font_config(family, style, bakedstyles);
}
#endif
@@ -96,28 +114,29 @@ bool osd_font_sdl::open(const char *font_path, const char *_name, int &height)
{
osd_printf_verbose("font %s is not TrueType or BDF, using MAME default\n", name.c_str());
}
- return NULL;
+ return false;
}
// apply styles
+ int styleflags = 0;
if (!bakedstyles)
{
- style |= bold ? TTF_STYLE_BOLD : 0;
- style |= italic ? TTF_STYLE_ITALIC : 0;
+ if ((style.find("Bold") != std::string::npos) || (style.find("Black") != std::string::npos)) styleflags |= TTF_STYLE_BOLD;
+ if ((style.find("Italic") != std::string::npos) || (style.find("Oblique") != std::string::npos)) styleflags |= TTF_STYLE_ITALIC;
}
- style |= underline ? TTF_STYLE_UNDERLINE : 0;
+ styleflags |= underline ? TTF_STYLE_UNDERLINE : 0;
// SDL_ttf 2.0.9 and earlier does not define TTF_STYLE_STRIKETHROUGH
#if SDL_VERSIONNUM(TTF_MAJOR_VERSION, TTF_MINOR_VERSION, TTF_PATCHLEVEL) > SDL_VERSIONNUM(2,0,9)
- style |= strike ? TTF_STYLE_STRIKETHROUGH : 0;
+ styleflags |= strike ? TTF_STYLE_STRIKETHROUGH : 0;
#else
if (strike)
osd_printf_warning("Ignoring strikethrough for SDL_TTF older than 2.0.10\n");
#endif // PATCHLEVEL
- TTF_SetFontStyle(font, style);
+ TTF_SetFontStyle(font.get(), styleflags);
- height = TTF_FontLineSkip(font);
+ height = TTF_FontLineSkip(font.get());
- m_font = font;
+ m_font = std::move(font);
return true;
}
@@ -128,7 +147,7 @@ bool osd_font_sdl::open(const char *font_path, const char *_name, int &height)
void osd_font_sdl::close()
{
- TTF_CloseFont(this->m_font);
+ m_font.reset();
}
//-------------------------------------------------
@@ -139,18 +158,12 @@ void osd_font_sdl::close()
// pixel of a black & white font
//-------------------------------------------------
-bool osd_font_sdl::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs)
+bool osd_font_sdl::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs)
{
- TTF_Font *ttffont;
- SDL_Surface *drawsurf;
- SDL_Color fcol = { 0xff, 0xff, 0xff };
- UINT16 ustr[16];
-
- ttffont = m_font;
-
- memset(ustr,0,sizeof(ustr));
- ustr[0] = (UINT16)chnum;
- drawsurf = TTF_RenderUNICODE_Solid(ttffont, ustr, fcol);
+ SDL_Color const fcol = { 0xff, 0xff, 0xff };
+ char ustr[16];
+ ustr[utf8_from_uchar(ustr, ARRAY_LENGTH(ustr), chnum)] = '\0';
+ std::unique_ptr<SDL_Surface, void (*)(SDL_Surface *)> const drawsurf(TTF_RenderUTF8_Solid(m_font.get(), ustr, fcol), &SDL_FreeSurface);
// was nothing returned?
if (drawsurf)
@@ -161,163 +174,120 @@ bool osd_font_sdl::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &
// copy the rendered character image into it
for (int y = 0; y < bitmap.height(); y++)
{
- UINT32 *dstrow = &bitmap.pix32(y);
- UINT8 *srcrow = (UINT8 *)drawsurf->pixels;
-
- srcrow += (y * drawsurf->pitch);
+ std::uint32_t *const dstrow = &bitmap.pix32(y);
+ std::uint8_t const *const srcrow = reinterpret_cast<std::uint8_t const *>(drawsurf->pixels) + (y * drawsurf->pitch);
for (int x = 0; x < drawsurf->w; x++)
{
- dstrow[x] = srcrow[x] ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
+ dstrow[x] = srcrow[x] ? rgb_t(0xff, 0xff, 0xff, 0xff) : rgb_t(0x00, 0xff, 0xff, 0xff);
}
}
// what are these?
xoffs = yoffs = 0;
width = drawsurf->w;
-
- SDL_FreeSurface(drawsurf);
}
return bitmap.valid();
}
-TTF_Font * osd_font_sdl::TTF_OpenFont_Magic(std::string name, int fsize)
+osd_font_sdl::TTF_Font_ptr osd_font_sdl::TTF_OpenFont_Magic(std::string const &name, int fsize, long index)
{
emu_file file(OPEN_FLAG_READ);
if (file.open(name.c_str()) == osd_file::error::NONE)
{
- unsigned char buffer[5] = { 0xff, 0xff, 0xff, 0xff, 0xff };
- unsigned char magic[5] = { 0x00, 0x01, 0x00, 0x00, 0x00 };
- file.read(buffer,5);
- if (memcmp(buffer, magic, 5))
- return NULL;
+ unsigned char const ttf_magic[] = { 0x00, 0x01, 0x00, 0x00, 0x00 };
+ unsigned char const ttc1_magic[] = { 0x74, 0x74, 0x63, 0x66, 0x00, 0x01, 0x00, 0x00 };
+ unsigned char const ttc2_magic[] = { 0x74, 0x74, 0x63, 0x66, 0x00, 0x02, 0x00, 0x00 };
+ unsigned char buffer[std::max({ sizeof(ttf_magic), sizeof(ttc1_magic), sizeof(ttc2_magic) })];
+ auto const bytes_read = file.read(buffer, sizeof(buffer));
+ file.close();
+
+ if ((bytes_read >= sizeof(ttf_magic)) && !std::memcmp(buffer, ttf_magic, sizeof(ttf_magic)))
+ return TTF_Font_ptr(TTF_OpenFont(name.c_str(), POINT_SIZE), &TTF_CloseFont);
+
+ if (((bytes_read >= sizeof(ttc1_magic)) && !std::memcmp(buffer, ttc1_magic, sizeof(ttc1_magic))) ||
+ ((bytes_read >= sizeof(ttc2_magic)) && !std::memcmp(buffer, ttc2_magic, sizeof(ttc2_magic))))
+ return TTF_Font_ptr(TTF_OpenFontIndex(name.c_str(), POINT_SIZE, index), &TTF_CloseFont);
}
- return TTF_OpenFont(name.c_str(), POINT_SIZE);
+ return TTF_Font_ptr(nullptr, &TTF_CloseFont);
}
-bool osd_font_sdl::BDF_Check_Magic(std::string name)
+bool osd_font_sdl::BDF_Check_Magic(std::string const &name)
{
emu_file file(OPEN_FLAG_READ);
if (file.open(name.c_str()) == osd_file::error::NONE)
{
- unsigned char buffer[9];
- unsigned char magic[9] = { 'S', 'T', 'A', 'R', 'T', 'F', 'O', 'N', 'T' };
- file.read(buffer, 9);
- file.close();
- if (!memcmp(buffer, magic, 9))
+ unsigned char const magic[] = { 'S', 'T', 'A', 'R', 'T', 'F', 'O', 'N', 'T' };
+ unsigned char buffer[sizeof(magic)];
+ if ((sizeof(magic) != file.read(buffer, sizeof(magic))) || memcmp(buffer, magic, sizeof(magic)))
return true;
}
-
return false;
}
-#ifndef SDLMAME_HAIKU
-TTF_Font *osd_font_sdl::search_font_config(std::string name, bool bold, bool italic, bool underline, bool &bakedstyles)
+#if !defined(SDLMAME_HAIKU) && !defined(SDLMAME_EMSCRIPTEN)
+osd_font_sdl::TTF_Font_ptr osd_font_sdl::search_font_config(std::string const &family, std::string const &style, bool &bakedstyles)
{
- TTF_Font *font = (TTF_Font *)NULL;
- FcConfig *config;
- FcPattern *pat;
- FcObjectSet *os;
- FcFontSet *fontset;
- FcValue val;
-
- config = FcConfigGetCurrent();
- pat = FcPatternCreate();
- os = FcObjectSetCreate();
- FcPatternAddString(pat, FC_FAMILY, (const FcChar8 *)name.c_str());
+ TTF_Font_ptr font(nullptr, &TTF_CloseFont);
+
+ FcConfig *const config = FcConfigGetCurrent();
+ std::unique_ptr<FcPattern, void (*)(FcPattern *)> pat(FcPatternCreate(), &FcPatternDestroy);
+ std::unique_ptr<FcObjectSet, void (*)(FcObjectSet *)> os(FcObjectSetCreate(), &FcObjectSetDestroy);
+ FcPatternAddString(pat.get(), FC_FAMILY, (const FcChar8 *)family.c_str());
// try and get a font with the requested styles baked-in
- if (bold)
- {
- if (italic)
- {
- FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Bold Italic");
- }
- else
- {
- FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Bold");
- }
- }
- else if (italic)
- {
- FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Italic");
- }
- else
- {
- FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Regular");
- }
+ if (!style.empty())
+ FcPatternAddString(pat.get(), FC_STYLE, (const FcChar8 *)style.c_str());
- FcPatternAddString(pat, FC_FONTFORMAT, (const FcChar8 *)"TrueType");
+ FcPatternAddString(pat.get(), FC_FONTFORMAT, (const FcChar8 *)"TrueType");
- FcObjectSetAdd(os, FC_FILE);
- fontset = FcFontList(config, pat, os);
+ FcObjectSetAdd(os.get(), FC_FILE);
+ FcObjectSetAdd(os.get(), FC_INDEX);
+ std::unique_ptr<FcFontSet, void (*)(FcFontSet *)> fontset(FcFontList(config, pat.get(), os.get()), &FcFontSetDestroy);
- for (int i = 0; i < fontset->nfont; i++)
+ for (int i = 0; (i < fontset->nfont) && !font; i++)
{
- if (FcPatternGet(fontset->fonts[i], FC_FILE, 0, &val) != FcResultMatch)
+ FcValue val;
+ if ((FcPatternGet(fontset->fonts[i], FC_FILE, 0, &val) == FcResultMatch) && (val.type == FcTypeString))
{
- continue;
- }
-
- if (val.type != FcTypeString)
- {
- continue;
- }
+ osd_printf_verbose("Matching font: %s\n", val.u.s);
- osd_printf_verbose("Matching font: %s\n", val.u.s);
- {
- std::string match_name((const char*)val.u.s);
- font = TTF_OpenFont_Magic(match_name, POINT_SIZE);
- }
+ std::string const match_name((const char*)val.u.s);
+ long const index = ((FcPatternGet(fontset->fonts[i], FC_INDEX, 0, &val) == FcResultMatch) && (val.type == FcTypeInteger)) ? val.u.i : 0;
+ font = TTF_OpenFont_Magic(match_name, POINT_SIZE, index);
- if (font)
- {
- bakedstyles = true;
- break;
+ if (font)
+ bakedstyles = true;
}
}
// didn't get a font above? try again with no baked-in styles
- if (!font)
+ // note that this simply returns the first match for the family name, which could be regular if you're lucky, but it could be bold oblique or something
+ if (!font && !style.empty())
{
- FcPatternDestroy(pat);
- FcFontSetDestroy(fontset);
+ pat.reset(FcPatternCreate());
+ FcPatternAddString(pat.get(), FC_FAMILY, (const FcChar8 *)family.c_str());
+ FcPatternAddString(pat.get(), FC_FONTFORMAT, (const FcChar8 *)"TrueType");
+ fontset.reset(FcFontList(config, pat.get(), os.get()));
- pat = FcPatternCreate();
- FcPatternAddString(pat, FC_FAMILY, (const FcChar8 *)name.c_str());
- FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Regular");
- FcPatternAddString(pat, FC_FONTFORMAT, (const FcChar8 *)"TrueType");
- fontset = FcFontList(config, pat, os);
-
- for (int i = 0; i < fontset->nfont; i++)
+ for (int i = 0; (i < fontset->nfont) && !font; i++)
{
- if (FcPatternGet(fontset->fonts[i], FC_FILE, 0, &val) != FcResultMatch)
+ FcValue val;
+ if ((FcPatternGet(fontset->fonts[i], FC_FILE, 0, &val) == FcResultMatch) && (val.type == FcTypeString))
{
- continue;
- }
+ osd_printf_verbose("Matching unstyled font: %s\n", val.u.s);
- if (val.type != FcTypeString)
- {
- continue;
- }
-
- osd_printf_verbose("Matching unstyled font: %s\n", val.u.s);
- {
- std::string match_name((const char*)val.u.s);
- font = TTF_OpenFont_Magic(match_name, POINT_SIZE);
- }
+ std::string const match_name((const char*)val.u.s);
+ long const index = ((FcPatternGet(fontset->fonts[i], FC_INDEX, 0, &val) == FcResultMatch) && (val.type == FcTypeInteger)) ? val.u.i : 0;
+ font = TTF_OpenFont_Magic(match_name, POINT_SIZE, index);
- if (font)
- {
- break;
+ if (font)
+ bakedstyles = false;
}
}
}
- FcPatternDestroy(pat);
- FcObjectSetDestroy(os);
- FcFontSetDestroy(fontset);
return font;
}
#endif
@@ -330,12 +300,12 @@ public:
{
}
- osd_font *font_alloc()
+ osd_font::ptr font_alloc() override
{
- return global_alloc(osd_font_sdl);
+ return std::make_unique<osd_font_sdl>();
}
- virtual int init(const osd_options &options)
+ virtual int init(const osd_options &options) override
{
if (TTF_Init() == -1)
{
@@ -345,13 +315,72 @@ public:
return 0;
}
- virtual void exit()
+ virtual void exit() override
{
TTF_Quit();
}
+
+ virtual bool get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result) override;
};
+
+
+bool font_sdl::get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result)
+{
+ result.clear();
+
+ // TODO: enumerate TTF files in font path, since we can load them, too
+
+#if !defined(SDLMAME_HAIKU) && !defined(SDLMAME_EMSCRIPTEN)
+ FcConfig *const config = FcConfigGetCurrent();
+ std::unique_ptr<FcPattern, void (*)(FcPattern *)> pat(FcPatternCreate(), &FcPatternDestroy);
+ FcPatternAddString(pat.get(), FC_FONTFORMAT, (const FcChar8 *)"TrueType");
+
+ std::unique_ptr<FcObjectSet, void (*)(FcObjectSet *)> os(FcObjectSetCreate(), &FcObjectSetDestroy);
+ FcObjectSetAdd(os.get(), FC_FAMILY);
+ FcObjectSetAdd(os.get(), FC_FILE);
+ FcObjectSetAdd(os.get(), FC_STYLE);
+
+ std::unique_ptr<FcFontSet, void (*)(FcFontSet *)> fontset(FcFontList(config, pat.get(), os.get()), &FcFontSetDestroy);
+ for (int i = 0; (i < fontset->nfont); i++)
+ {
+ FcValue val;
+ if ((FcPatternGet(fontset->fonts[i], FC_FILE, 0, &val) == FcResultMatch) &&
+ (val.type == FcTypeString) &&
+ (FcPatternGet(fontset->fonts[i], FC_FAMILY, 0, &val) == FcResultMatch) &&
+ (val.type == FcTypeString))
+ {
+ auto const compare_fonts = [](std::pair<std::string, std::string> const &a, std::pair<std::string, std::string> const &b) -> bool
+ {
+ int const second = core_stricmp(a.second.c_str(), b.second.c_str());
+ if (second < 0) return true;
+ else if (second > 0) return false;
+ else return core_stricmp(b.first.c_str(), b.first.c_str()) < 0;
+ };
+ std::string config((const char *)val.u.s);
+ std::string display(config);
+ if ((FcPatternGet(fontset->fonts[i], FC_STYLE, 0, &val) == FcResultMatch) && (val.type == FcTypeString))
+ {
+ config.push_back('|');
+ config.append((const char *)val.u.s);
+ display.push_back(' ');
+ display.append((const char *)val.u.s);
+ }
+ std::pair<std::string, std::string> font(std::move(config), std::move(display));
+ auto const pos = std::lower_bound(result.begin(), result.end(), font, compare_fonts);
+ if ((result.end() == pos) || (pos->first != font.first)) result.emplace(pos, std::move(font));
+ }
+ }
+
+ return true;
+#else
+ return false;
+#endif
+}
+
#else /* SDLMAME_UNIX */
- MODULE_NOT_SUPPORTED(font_sdl, OSD_FONT_PROVIDER, "sdl")
+
+MODULE_NOT_SUPPORTED(font_sdl, OSD_FONT_PROVIDER, "sdl")
+
#endif
MODULE_DEFINITION(FONT_SDL, font_sdl)
diff --git a/src/osd/modules/font/font_windows.cpp b/src/osd/modules/font/font_windows.cpp
index 6d561e5cddd..0de5231f8a0 100644
--- a/src/osd/modules/font/font_windows.cpp
+++ b/src/osd/modules/font/font_windows.cpp
@@ -5,49 +5,64 @@
*
*/
+#define WIN32_LEAN_AND_MEAN
+
#include "font_module.h"
#include "modules/osdmodule.h"
#if defined(OSD_WINDOWS) || defined(SDLMAME_WIN32)
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <commctrl.h>
-#include <mmsystem.h>
-#include <tchar.h>
-#include <io.h>
-
#include "font_module.h"
#include "modules/osdmodule.h"
#include "strconv.h"
#include "corestr.h"
#include "corealloc.h"
-#include "fileio.h"
-//#define POINT_SIZE 144.0
-#define DEFAULT_FONT_HEIGHT (200)
+#include <cstring>
+
+#include <windows.h>
+#include <commctrl.h>
+#include <mmsystem.h>
+#include <tchar.h>
+#include <io.h>
-//-------------------------------------------------
-// font_open - attempt to "open" a handle to the
-// font with the given name
-//-------------------------------------------------
+
+namespace {
class osd_font_windows : public osd_font
{
public:
osd_font_windows(): m_font(NULL) { }
- virtual ~osd_font_windows() { }
+ osd_font_windows(osd_font_windows &&obj) : m_font(obj.m_font) { obj.m_font = NULL; }
+ virtual ~osd_font_windows() {close(); }
- virtual bool open(const char *font_path, const char *name, int &height) override;
+ virtual bool open(std::string const &font_path, std::string const &name, int &height) override;
virtual void close() override;
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs) override;
+ virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) override;
+
+ osd_font_windows &operator=(osd_font_windows &&obj)
+ {
+ using std::swap;
+ swap(m_font, obj.m_font);
+ return *this;
+ }
+
private:
+ osd_font_windows(osd_font_windows const &) = delete;
+ osd_font_windows &operator=(osd_font_windows const &) = delete;
+
+ //#define POINT_SIZE 144.0
+ static constexpr LONG DEFAULT_HEIGHT = 200;
+
HGDIOBJ m_font;
};
-bool osd_font_windows::open(const char *font_path, const char *_name, int &height)
+bool osd_font_windows::open(std::string const &font_path, std::string const &_name, int &height)
{
+ // don't leak a handle if we already have a font open
+ close();
+
// accept qualifiers from the name
std::string name(_name);
if (name.compare("default")==0) name = "Tahoma";
@@ -56,7 +71,7 @@ bool osd_font_windows::open(const char *font_path, const char *_name, int &heigh
// build a basic LOGFONT description of what we want
LOGFONT logfont;
- logfont.lfHeight = DEFAULT_FONT_HEIGHT;
+ logfont.lfHeight = DEFAULT_HEIGHT;
logfont.lfWidth = 0;
logfont.lfEscapement = 0;
logfont.lfOrientation = 0;
@@ -85,13 +100,19 @@ bool osd_font_windows::open(const char *font_path, const char *_name, int &heigh
// select it into a temp DC and get the real font name
HDC dummyDC = CreateCompatibleDC(NULL);
HGDIOBJ oldfont = SelectObject(dummyDC, m_font);
- TCHAR realname[100];
- GetTextFace(dummyDC, ARRAY_LENGTH(realname), realname);
+ std::vector<TCHAR> realname((std::max)(GetTextFace(dummyDC, 0, nullptr), 0));
+ int facelen = GetTextFace(dummyDC, realname.size(), &realname[0]);
SelectObject(dummyDC, oldfont);
DeleteDC(dummyDC);
+ if (facelen <= 0)
+ {
+ DeleteObject(m_font);
+ m_font = NULL;
+ return false;
+ }
// if it doesn't match our request, fail
- char *utf = utf8_from_tstring(realname);
+ char *utf = utf8_from_tstring(&realname[0]);
int result = core_stricmp(utf, name.c_str());
osd_free(utf);
@@ -115,7 +136,7 @@ void osd_font_windows::close()
// delete the font ojbect
if (m_font != NULL)
DeleteObject(m_font);
-
+ m_font = NULL;
}
//-------------------------------------------------
@@ -269,20 +290,51 @@ bool osd_font_windows::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT
class font_win : public osd_module, public font_module
{
public:
- font_win() : osd_module(OSD_FONT_PROVIDER, "win"), font_module()
- {
- }
+ font_win() : osd_module(OSD_FONT_PROVIDER, "win"), font_module() { }
virtual int init(const osd_options &options) override { return 0; }
- virtual osd_font *font_alloc() override
+ virtual osd_font::ptr font_alloc() override { return std::make_unique<osd_font_windows>(); }
+
+ virtual bool get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result) override;
+
+private:
+ static int CALLBACK font_family_callback(LOGFONT const *lpelfe, TEXTMETRIC const *lpntme, DWORD FontType, LPARAM lParam)
{
- return global_alloc(osd_font_windows);
+ auto &result = *reinterpret_cast<std::vector<std::pair<std::string, std::string> > *>(lParam);
+ char *face = utf8_from_tstring(lpelfe->lfFaceName);
+ if ((*face != '@') && (result.empty() || (result.back().first != face))) result.emplace_back(face, face);
+ osd_free(face);
+ return TRUE;
}
-
};
-#else /* SDLMAME_UNIX */
- MODULE_NOT_SUPPORTED(font_win, OSD_FONT_PROVIDER, "win")
-#endif
+
+
+bool font_win::get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result)
+{
+ result.clear();
+
+ LOGFONT logfont;
+ std::memset(&logfont, 0, sizeof(logfont));
+ logfont.lfCharSet = DEFAULT_CHARSET;
+ logfont.lfFaceName[0] = '\0';
+ logfont.lfPitchAndFamily = 0;
+
+ HDC dummyDC = CreateCompatibleDC(nullptr);
+ HRESULT err = EnumFontFamiliesEx(dummyDC, &logfont, &font_family_callback, reinterpret_cast<LPARAM>(&result), 0);
+ DeleteDC(dummyDC);
+
+ std::stable_sort(result.begin(), result.end());
+
+ return !FAILED(err);
+}
+
+} // anonymous namespace
+
+#else // defined(OSD_WINDOWS) || defined(SDLMAME_WIN32)
+
+MODULE_NOT_SUPPORTED(font_win, OSD_FONT_PROVIDER, "win")
+
+#endif // defined(OSD_WINDOWS) || defined(SDLMAME_WIN32)
MODULE_DEFINITION(FONT_WINDOWS, font_win)
diff --git a/src/osd/modules/lib/osdlib_unix.cpp b/src/osd/modules/lib/osdlib_unix.cpp
index 9b2721a62cf..fd60db54ba9 100644
--- a/src/osd/modules/lib/osdlib_unix.cpp
+++ b/src/osd/modules/lib/osdlib_unix.cpp
@@ -14,10 +14,6 @@
#include <sys/types.h>
#include <signal.h>
-#ifdef SDLMAME_EMSCRIPTEN
-#include <emscripten.h>
-#endif
-
// MAME headers
#include "osdcore.h"
#include "osdlib.h"
diff --git a/src/osd/modules/lib/osdobj_common.cpp b/src/osd/modules/lib/osdobj_common.cpp
index 038e14d71bf..7d33cb1218c 100644
--- a/src/osd/modules/lib/osdobj_common.cpp
+++ b/src/osd/modules/lib/osdobj_common.cpp
@@ -506,40 +506,6 @@ void osd_common_t::customize_input_type_list(simple_list<input_type_entry> &type
//-------------------------------------------------
-// font_open - attempt to "open" a handle to the
-// font with the given name
-//-------------------------------------------------
-
-osd_font *osd_common_t::font_open(const char *name, int &height)
-{
- return nullptr;
-}
-
-
-//-------------------------------------------------
-// font_close - release resources associated with
-// a given OSD font
-//-------------------------------------------------
-
-void osd_common_t::font_close(osd_font *font)
-{
-}
-
-
-//-------------------------------------------------
-// font_get_bitmap - allocate and populate a
-// BITMAP_FORMAT_ARGB32 bitmap containing the
-// pixel values rgb_t(0xff,0xff,0xff,0xff)
-// or rgb_t(0x00,0xff,0xff,0xff) for each
-// pixel of a black & white font
-//-------------------------------------------------
-
-bool osd_common_t::font_get_bitmap(osd_font *font, unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs)
-{
- return false;
-}
-
-//-------------------------------------------------
// get_slider_list - allocate and populate a
// list of OS-dependent slider values.
//-------------------------------------------------
diff --git a/src/osd/modules/lib/osdobj_common.h b/src/osd/modules/lib/osdobj_common.h
index dc828d2bbdb..a2418cfc8b7 100644
--- a/src/osd/modules/lib/osdobj_common.h
+++ b/src/osd/modules/lib/osdobj_common.h
@@ -10,8 +10,8 @@
#pragma once
-#ifndef __OSDOBJ_COMMON_H__
-#define __OSDOBJ_COMMON__
+#ifndef MAME_OSD_LIB_OSDOBJ_COMMON_H
+#define MAME_OSD_LIB_OSDOBJ_COMMON_H
#include "osdepend.h"
#include "modules/osdmodule.h"
@@ -178,18 +178,14 @@ public:
// input overridables
virtual void customize_input_type_list(simple_list<input_type_entry> &typelist) override;
- // font overridables
- virtual osd_font *font_open(const char *name, int &height);
- virtual void font_close(osd_font *font);
- virtual bool font_get_bitmap(osd_font *font, unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs);
-
// video overridables
virtual slider_state *get_slider_list() override;
// command option overrides
virtual bool execute_command(const char *command) override;
- virtual osd_font *font_alloc() override { return m_font_module->font_alloc(); }
+ virtual osd_font::ptr font_alloc() override { return m_font_module->font_alloc(); }
+ virtual bool get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result) override { return m_font_module->get_font_families(font_path, result); }
virtual osd_midi_device *create_midi_device() override { return m_midi->create_midi_device(); }
@@ -282,4 +278,4 @@ debug_module *osd_debugger_creator()
return global_alloc(_DeviceClass());
}
-#endif /* __OSDOBJ_COMMON_H__ */
+#endif // MAME_OSD_LIB_OSDOBJ_COMMON_H
diff --git a/src/osd/osdepend.h b/src/osd/osdepend.h
index 3e5b7d91e8f..b6ab45003e1 100644
--- a/src/osd/osdepend.h
+++ b/src/osd/osdepend.h
@@ -10,14 +10,18 @@
#pragma once
-#ifndef __OSDEPEND_H__
-#define __OSDEPEND_H__
+#ifndef MAME_OSD_OSDEPEND_H
+#define MAME_OSD_OSDEPEND_H
#include "emucore.h"
#include "osdcore.h"
#include "unicode.h"
#include "cliopts.h"
+#include <memory>
+#include <string>
+#include <vector>
+
// forward references
class input_type_entry; // FIXME: including emu.h does not work because emu.h includes osdepend.h
@@ -32,11 +36,22 @@ class input_type_entry; // FIXME: including emu.h does not work because emu.
class osd_font
{
public:
- virtual ~osd_font() {}
+ typedef std::unique_ptr<osd_font> ptr;
+
+ virtual ~osd_font() { }
- virtual bool open(const char *font_path, const char *name, int &height) = 0;
+ /** attempt to "open" a handle to the font with the given name */
+ virtual bool open(std::string const &font_path, std::string const &name, int &height) = 0;
+
+ /** release resources associated with a given OSD font */
virtual void close() = 0;
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs) = 0;
+
+ /*!
+ * allocate and populate a BITMAP_FORMAT_ARGB32 bitmap containing
+ * the pixel values rgb_t(0xff,0xff,0xff,0xff) or
+ * rgb_t(0x00,0xff,0xff,0xff) for each pixel of a black & white font
+ */
+ virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) = 0;
};
// ======================> osd_interface
@@ -68,7 +83,8 @@ public:
virtual slider_state *get_slider_list() = 0;
// font interface
- virtual osd_font *font_alloc() = 0;
+ virtual osd_font::ptr font_alloc() = 0;
+ virtual bool get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result) = 0;
// command option overrides
virtual bool execute_command(const char *command) = 0;
@@ -80,4 +96,4 @@ protected:
virtual ~osd_interface() { }
};
-#endif /* __OSDEPEND_H__ */
+#endif // MAME_OSD_OSDEPEND_H
diff --git a/src/osd/strconv.h b/src/osd/strconv.h
index 5de23d0b89b..6d23d78fbb1 100644
--- a/src/osd/strconv.h
+++ b/src/osd/strconv.h
@@ -6,8 +6,8 @@
//
//============================================================
-#ifndef __OSD_STRCONV__
-#define __OSD_STRCONV__
+#ifndef MAME_OSD_STRCONV_H
+#define MAME_OSD_STRCONV_H
#include "osdcore.h"
@@ -17,12 +17,14 @@
// FUNCTION PROTOTYPES
//============================================================
-#if defined(SDLMAME_WIN32) || defined(OSD_WINDOWS)
+#if defined(WIN32)
-#if defined(SDLMAME_WIN32)
+#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
#endif
+
+#include <windows.h>
+
// the result of these functions has to be released with osd_free()
CHAR *astring_from_utf8(const char *s);
@@ -39,7 +41,7 @@ char *utf8_from_wstring(const WCHAR *s);
#define utf8_from_tstring utf8_from_astring
#endif // UNICODE
-#endif //SDLMAME_WIN32
+#endif // defined(WIN32)
-#endif // __OSD_STRCONV__
+#endif // MAME_OSD_STRCONV_H
diff --git a/src/tools/unidasm.cpp b/src/tools/unidasm.cpp
index bf0d7c42959..59cce01ad29 100644
--- a/src/tools/unidasm.cpp
+++ b/src/tools/unidasm.cpp
@@ -181,6 +181,7 @@ CPU_DISASSEMBLE( tms7000 );
CPU_DISASSEMBLE( tms9900 );
CPU_DISASSEMBLE( tms9980 );
CPU_DISASSEMBLE( tms9995 );
+CPU_DISASSEMBLE( tp0320 );
CPU_DISASSEMBLE( tx0_64kw );
CPU_DISASSEMBLE( tx0_8kw );
CPU_DISASSEMBLE( ucom4 );
@@ -333,6 +334,7 @@ static const dasm_table_entry dasm_table[] =
{ "tms9900", _16be, 0, CPU_DISASSEMBLE_NAME(tms9900) },
{ "tms9980", _8bit, 0, CPU_DISASSEMBLE_NAME(tms9980) },
{ "tms9995", _8bit, 0, CPU_DISASSEMBLE_NAME(tms9995) },
+ { "tp0320", _16be, 0, CPU_DISASSEMBLE_NAME(tp0320) },
{ "tx0_64kw", _32be, -2, CPU_DISASSEMBLE_NAME(tx0_64kw) },
{ "tx0_8kw", _32be, -2, CPU_DISASSEMBLE_NAME(tx0_8kw) },
{ "ucom4", _8bit, 0, CPU_DISASSEMBLE_NAME(ucom4) },