summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--android-project/app/src/main/AndroidManifest.xml4
-rw-r--r--docs/source/initialsetup/compilingmame.rst2
-rw-r--r--hash/cgenie_cass.xml18
-rw-r--r--language/Chinese_Simplified/strings.po154
-rw-r--r--language/Chinese_Traditional/strings.po110
-rw-r--r--makefile4
-rw-r--r--src/devices/bus/isa/3c505.cpp28
-rw-r--r--src/devices/cpu/hmcs40/hmcs40d.cpp66
-rw-r--r--src/devices/cpu/hmcs40/hmcs40d.h15
-rw-r--r--src/devices/cpu/i386/cpuidmsrs.hxx33
-rw-r--r--src/devices/cpu/i386/i386.cpp4
-rw-r--r--src/devices/cpu/i386/i386.h2
-rw-r--r--src/devices/cpu/mips/mips1.cpp24
-rw-r--r--src/devices/cpu/mips/mips1.h2
-rw-r--r--src/devices/cpu/mips/r4000.cpp32
-rw-r--r--src/devices/cpu/mips/r4000.h2
-rw-r--r--src/devices/cpu/sm510/sm500core.cpp14
-rw-r--r--src/devices/cpu/sm510/sm510.h4
-rw-r--r--src/devices/cpu/sm510/sm510base.cpp7
-rw-r--r--src/devices/cpu/sm510/sm510core.cpp7
-rw-r--r--src/devices/cpu/sm510/sm510d.cpp103
-rw-r--r--src/devices/cpu/sm510/sm510d.h18
-rw-r--r--src/devices/cpu/sm510/sm510op.cpp17
-rw-r--r--src/devices/cpu/sm510/sm511core.cpp21
-rw-r--r--src/devices/cpu/sm510/sm530.h20
-rw-r--r--src/devices/cpu/sm510/sm530core.cpp121
-rw-r--r--src/devices/cpu/sm510/sm530op.cpp59
-rw-r--r--src/devices/cpu/sm510/sm590core.cpp28
-rw-r--r--src/devices/cpu/sm510/sm590op.cpp1
-rw-r--r--src/devices/cpu/sm510/sm5acore.cpp28
-rw-r--r--src/devices/cpu/tms1000/tms1k_dasm.cpp143
-rw-r--r--src/devices/cpu/tms1000/tms1k_dasm.h3
-rw-r--r--src/devices/machine/genpc.cpp121
-rw-r--r--src/devices/machine/genpc.h23
-rw-r--r--src/devices/machine/netlist.cpp20
-rw-r--r--src/emu/tilemap.cpp12
-rw-r--r--src/emu/tilemap.h20
-rw-r--r--src/lib/netlist/devices/net_lib.cpp2
-rw-r--r--src/lib/netlist/devices/nld_7448.cpp74
-rw-r--r--src/lib/netlist/devices/nld_7448.h23
-rw-r--r--src/lib/netlist/devices/nlid_system.h2
-rw-r--r--src/lib/netlist/devices/nlid_truthtable.cpp2
-rw-r--r--src/lib/netlist/devices/nlid_truthtable.h15
-rw-r--r--src/lib/netlist/macro/nlm_ttl74xx.cpp110
-rw-r--r--src/lib/netlist/macro/nlm_ttl74xx.h18
-rw-r--r--src/lib/netlist/nl_base.cpp111
-rw-r--r--src/lib/netlist/nl_base.h81
-rw-r--r--src/lib/netlist/nl_config.h21
-rw-r--r--src/lib/netlist/nl_errstr.h3
-rw-r--r--src/lib/netlist/nl_lists.h42
-rw-r--r--src/lib/netlist/nl_parser.cpp2
-rw-r--r--src/lib/netlist/nl_setup.cpp17
-rw-r--r--src/lib/netlist/nl_setup.h8
-rw-r--r--src/lib/netlist/plib/palloc.h17
-rw-r--r--src/lib/netlist/plib/pconfig.h2
-rw-r--r--src/lib/netlist/plib/pfunction.cpp2
-rw-r--r--src/lib/netlist/plib/pmempool.h19
-rw-r--r--src/lib/netlist/plib/poptions.h2
-rw-r--r--src/lib/netlist/plib/pparser.cpp6
-rw-r--r--src/lib/netlist/plib/pstring.h70
-rw-r--r--src/lib/netlist/plib/putil.h96
-rw-r--r--src/lib/netlist/prg/nltool.cpp4
-rw-r--r--src/lib/netlist/solver/nld_matrix_solver.cpp2
-rw-r--r--src/lib/netlist/solver/nld_matrix_solver.h1
-rw-r--r--src/lib/netlist/solver/nld_solver.cpp7
-rw-r--r--src/lib/netlist/solver/nld_solver.h3
-rw-r--r--src/lib/netlist/tools/nl_convert.cpp6
-rw-r--r--src/mame/audio/carnival.cpp112
-rw-r--r--src/mame/audio/nl_mario.cpp6
-rw-r--r--src/mame/audio/nl_zac1b11142.cpp6
-rw-r--r--src/mame/drivers/atarig1.cpp2
-rw-r--r--src/mame/drivers/atarig42.cpp4
-rw-r--r--src/mame/drivers/atarigt.cpp6
-rw-r--r--src/mame/drivers/atarigx2.cpp4
-rw-r--r--src/mame/drivers/avalnche.cpp12
-rw-r--r--src/mame/drivers/berzerk.cpp12
-rw-r--r--src/mame/drivers/bublbobl.cpp27
-rw-r--r--src/mame/drivers/cgc7900.cpp1
-rw-r--r--src/mame/drivers/cgenie.cpp2
-rw-r--r--src/mame/drivers/clickstart.cpp5
-rw-r--r--src/mame/drivers/cromptons.cpp3
-rw-r--r--src/mame/drivers/daryde.cpp43
-rw-r--r--src/mame/drivers/dragon.cpp30
-rw-r--r--src/mame/drivers/ec184x.cpp17
-rw-r--r--src/mame/drivers/flkatck.cpp52
-rw-r--r--src/mame/drivers/funworld.cpp572
-rw-r--r--src/mame/drivers/gaelco2.cpp49
-rw-r--r--src/mame/drivers/galaxian.cpp28
-rw-r--r--src/mame/drivers/goldnpkr.cpp88
-rw-r--r--src/mame/drivers/m72.cpp4
-rw-r--r--src/mame/drivers/mac128.cpp5
-rw-r--r--src/mame/drivers/miniboy7.cpp325
-rw-r--r--src/mame/drivers/namcos22.cpp4
-rw-r--r--src/mame/drivers/neogeocd.cpp24
-rw-r--r--src/mame/drivers/nforcepc.cpp274
-rw-r--r--src/mame/drivers/nmk16.cpp90
-rw-r--r--src/mame/drivers/pcw.cpp28
-rw-r--r--src/mame/drivers/peplus.cpp35
-rw-r--r--src/mame/drivers/pong.cpp15
-rw-r--r--src/mame/drivers/segas18.cpp3
-rw-r--r--src/mame/drivers/segas32.cpp1
-rw-r--r--src/mame/drivers/sigmab98.cpp2
-rw-r--r--src/mame/drivers/superga2.cpp5
-rw-r--r--src/mame/drivers/vicdual.cpp166
-rw-r--r--src/mame/includes/namcos22.h2
-rw-r--r--src/mame/includes/nforcepc.h84
-rw-r--r--src/mame/includes/nmk16.h5
-rw-r--r--src/mame/includes/pcw.h5
-rw-r--r--src/mame/includes/vicdual.h94
-rw-r--r--src/mame/includes/xbox_pci.h17
-rw-r--r--src/mame/machine/6883sam.cpp6
-rw-r--r--src/mame/machine/nl_breakout.cpp13
-rw-r--r--src/mame/machine/nl_pongd.cpp4
-rw-r--r--src/mame/machine/nl_rebound.cpp4
-rw-r--r--src/mame/machine/xbox_pci.cpp141
-rw-r--r--src/mame/mame.lst10
-rw-r--r--src/mame/video/atarirle.cpp64
-rw-r--r--src/mame/video/atarirle.h90
-rw-r--r--src/mame/video/atarivad.cpp18
-rw-r--r--src/mame/video/newport.cpp286
-rw-r--r--src/mame/video/newport.h4
-rw-r--r--src/mame/video/skullxbo.cpp2
-rw-r--r--src/mame/video/tc0280grd.cpp67
-rw-r--r--src/mame/video/tc0280grd.h32
124 files changed, 3044 insertions, 2024 deletions
diff --git a/android-project/app/src/main/AndroidManifest.xml b/android-project/app/src/main/AndroidManifest.xml
index 5744d1b72aa..564fef4f1d9 100644
--- a/android-project/app/src/main/AndroidManifest.xml
+++ b/android-project/app/src/main/AndroidManifest.xml
@@ -4,8 +4,8 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mamedev.mame"
- android:versionCode="208"
- android:versionName="0.208"
+ android:versionCode="209"
+ android:versionName="0.209"
android:installLocation="auto">
<!-- OpenGL ES 2.0 -->
diff --git a/docs/source/initialsetup/compilingmame.rst b/docs/source/initialsetup/compilingmame.rst
index b8a854db322..c839ce3ea8b 100644
--- a/docs/source/initialsetup/compilingmame.rst
+++ b/docs/source/initialsetup/compilingmame.rst
@@ -130,7 +130,7 @@ Debian and Ubuntu (including Raspberry Pi and ODROID devices)
You'll need a few prerequisites from your distro. Make sure you get SDL2 2.0.3 or 2.0.4 as earlier versions are buggy.
-**sudo apt-get install git build-essential libsdl2-dev libsdl2-ttf-dev libfontconfig-dev qt5-default**
+**sudo apt-get install git build-essential python libsdl2-dev libsdl2-ttf-dev libfontconfig-dev qt5-default**
Compilation is exactly as described above in All Platforms.
diff --git a/hash/cgenie_cass.xml b/hash/cgenie_cass.xml
index de354d7a31b..e43c79600e4 100644
--- a/hash/cgenie_cass.xml
+++ b/hash/cgenie_cass.xml
@@ -617,6 +617,24 @@ distributor of the Colour Genie EG2000 computers.
</part>
</software>
+ <software name="labyfear" supported="yes">
+ <description>Labyrinth of Fear</description>
+ <year>1983</year>
+ <publisher>Algray Software</publisher>
+ <info name="author" value="Paul Barsby" />
+ <info name="usage" value="Type SYSTEM and load with L, switch to part 2 once loading the first finishes" />
+ <part name="cass1" interface="cgenie_cass">
+ <dataarea name="cass" size="4563">
+ <rom name="labyrinth_fear_part1.cas" size="4563" crc="92e3a0f6" sha1="72167fca3b9c6e4560b0eb398a46743fb041c2d3" offset="0" />
+ </dataarea>
+ </part>
+ <part name="cass2" interface="cgenie_cass">
+ <dataarea name="cass" size="9368">
+ <rom name="labyrinth_fear_part2.cas" size="9368" crc="0887f599" sha1="ff1abfee3a0454553355c91f0712bfd6560884f4" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
<!-- Missing: Länder-Quiz, Klaus Weber -->
<software name="lunarlan" supported="yes">
diff --git a/language/Chinese_Simplified/strings.po b/language/Chinese_Simplified/strings.po
index 518f50dac01..d7ed190a86b 100644
--- a/language/Chinese_Simplified/strings.po
+++ b/language/Chinese_Simplified/strings.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-17 13:37+1100\n"
-"PO-Revision-Date: 2018-04-28 19:01+0800\n"
+"PO-Revision-Date: 2019-03-18 13:40+0800\n"
"Last-Translator: YuiFAN\n"
"Language-Team: MAME Language Team\n"
"Language: zh_CN\n"
@@ -46,7 +46,7 @@ msgstr "已停用"
#: src/frontend/mame/ui/videoopt.cpp:212
msgid "Overlays"
-msgstr "覆叠图"
+msgstr "复叠图"
#: src/frontend/mame/ui/videoopt.cpp:216
msgid "Bezels"
@@ -167,7 +167,7 @@ msgstr "游戏结束"
#: src/frontend/mame/ui/dirmenu.cpp:59 src/frontend/mame/ui/selmenu.cpp:83
msgid "HowTo"
-msgstr "说明"
+msgstr "说明图"
#: src/frontend/mame/ui/dirmenu.cpp:60 src/frontend/mame/ui/selmenu.cpp:80
msgid "Logos"
@@ -1474,7 +1474,7 @@ msgstr "汇出 XML 格式列表 (同 -listxml)"
#: src/frontend/mame/ui/miscmenu.cpp:657
msgid "Export list in XML format (like -listxml, but exclude devices)"
-msgstr "汇出 TXT 格式列表 (同 -listfull,但不包含装置)"
+msgstr "汇出 TXT 格式列表 (同 -listxml,但不包含装置)"
#: src/frontend/mame/ui/miscmenu.cpp:658
msgid "Export list in TXT format (like -listfull)"
@@ -1521,7 +1521,7 @@ msgstr "年代\t%1$s\n"
#: src/frontend/mame/ui/selgame.cpp:1038
#, c-format
msgid "Manufacturer\t%1$-.100s\n"
-msgstr "製造商\t%1$-.100s\n"
+msgstr "制造商\t%1$-.100s\n"
#: src/frontend/mame/ui/selgame.cpp:1042
#, c-format
@@ -1590,11 +1590,11 @@ msgstr "声音\tOK\n"
#: src/frontend/mame/ui/selgame.cpp:1079
msgid "Capture\tUnimplemented\n"
-msgstr ""
+msgstr "撷取\t无法执行\n"
#: src/frontend/mame/ui/selgame.cpp:1081
msgid "Capture\tImperfect\n"
-msgstr ""
+msgstr "撷取\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1084
msgid "Camera\tUnimplemented\n"
@@ -1630,27 +1630,27 @@ msgstr "键盘\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1104
msgid "Mouse\tUnimplemented\n"
-msgstr "滑鼠\t无法执行\n"
+msgstr "鼠标\t无法执行\n"
#: src/frontend/mame/ui/selgame.cpp:1106
msgid "Mouse\tImperfect\n"
-msgstr "滑鼠\t不完美\n"
+msgstr "鼠标\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1109
msgid "Media\tUnimplemented\n"
-msgstr ""
+msgstr "媒体\t无法执行\n"
#: src/frontend/mame/ui/selgame.cpp:1111
msgid "Media\tImperfect\n"
-msgstr ""
+msgstr "媒体\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1114
msgid "Disk\tUnimplemented\n"
-msgstr "磁碟\t无法执行\n"
+msgstr "磁盘\t无法执行\n"
#: src/frontend/mame/ui/selgame.cpp:1116
msgid "Disk\tImperfect\n"
-msgstr "磁碟\t不完美\n"
+msgstr "磁盘\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1119
msgid "Printer\tUnimplemented\n"
@@ -1662,43 +1662,43 @@ msgstr "打印机\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1124
msgid "Mag. Tape\tUnimplemented\n"
-msgstr ""
+msgstr "磁带\t无法执行\n"
#: src/frontend/mame/ui/selgame.cpp:1126
msgid "Mag. Tape\tImperfect\n"
-msgstr ""
+msgstr "磁带\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1129
msgid "Punch Tape\tUnimplemented\n"
-msgstr ""
+msgstr "打孔带\t无法执行\n"
#: src/frontend/mame/ui/selgame.cpp:1131
msgid "Punch Tape\tImperfect\n"
-msgstr ""
+msgstr "打孔带\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1134
msgid "Mag. Drum\tUnimplemented\n"
-msgstr ""
+msgstr "磁鼓\t无法执行\n"
#: src/frontend/mame/ui/selgame.cpp:1136
msgid "Mag. Drum\tImperfect\n"
-msgstr ""
+msgstr "磁鼓\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1139
msgid "(EP)ROM\tUnimplemented\n"
-msgstr ""
+msgstr "(EP)ROM\t无法执行\n"
#: src/frontend/mame/ui/selgame.cpp:1141
msgid "(EP)ROM\tImperfect\n"
-msgstr ""
+msgstr "(EP)ROM\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1144
msgid "Communications\tUnimplemented\n"
-msgstr ""
+msgstr "通讯\t无法执行\n"
#: src/frontend/mame/ui/selgame.cpp:1146
msgid "Communications\tImperfect\n"
-msgstr ""
+msgstr "通讯\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1149
msgid "LAN\tUnimplemented\n"
@@ -1758,11 +1758,11 @@ msgstr "支援檯面型筐体\t否\n"
#: src/frontend/mame/ui/selgame.cpp:1167
msgid "Driver is BIOS\tYes\n"
-msgstr "驱动程式为 BIOS\t是\n"
+msgstr "驱动程序为 BIOS\t是\n"
#: src/frontend/mame/ui/selgame.cpp:1167
msgid "Driver is BIOS\tNo\n"
-msgstr "驱动程式为 BIOS\t否\n"
+msgstr "驱动程序为 BIOS\t否\n"
#: src/frontend/mame/ui/selgame.cpp:1168
msgid "Support Save\tYes\n"
@@ -1864,7 +1864,7 @@ msgstr "放大右侧面版的图片"
#: src/frontend/mame/ui/submenu.cpp:26
msgid "Show mouse pointer"
-msgstr "显示滑鼠指标"
+msgstr "显示鼠标指标"
#: src/frontend/mame/ui/submenu.cpp:27
msgid "Confirm quit from machines"
@@ -1972,7 +1972,7 @@ msgstr "使用背景图"
#: src/frontend/mame/ui/submenu.cpp:59
msgid "Use Overlays"
-msgstr "使用覆叠图"
+msgstr "使用复叠图"
#: src/frontend/mame/ui/submenu.cpp:60
msgid "Use Bezels"
@@ -2016,7 +2016,7 @@ msgstr "投币锁定"
#: src/frontend/mame/ui/submenu.cpp:73
msgid "Mouse"
-msgstr "滑鼠"
+msgstr "鼠标"
#: src/frontend/mame/ui/submenu.cpp:74
msgid "Joystick"
@@ -2032,7 +2032,7 @@ msgstr "多重键盘"
#: src/frontend/mame/ui/submenu.cpp:77
msgid "Multi-mouse"
-msgstr "多重滑鼠"
+msgstr "多鼠标"
#: src/frontend/mame/ui/submenu.cpp:78
msgid "Steadykey"
@@ -2100,11 +2100,11 @@ msgstr "分配指向装置"
#: src/frontend/mame/ui/submenu.cpp:97
msgid "Mouse Device Assignment"
-msgstr "分配滑鼠装置"
+msgstr "分配鼠标装置"
#: src/frontend/mame/ui/submenu.cpp:102
msgid "Video Mode"
-msgstr "视讯模式"
+msgstr "视频模式"
#: src/frontend/mame/ui/submenu.cpp:103
msgid "Number Of Screens"
@@ -2207,7 +2207,7 @@ msgstr " %2$s %5$d.%6$03d kHz\n"
#: src/frontend/mame/ui/devopt.cpp:89
msgid "* Video:\n"
-msgstr "* 視訊:\n"
+msgstr "* 视频:\n"
#: src/frontend/mame/ui/devopt.cpp:94
#, c-format
@@ -2316,7 +2316,7 @@ msgstr "* 媒体选项:\n"
#: src/frontend/mame/ui/devopt.cpp:261
#, c-format
msgid " %1$s [tag: %2$s]\n"
-msgstr " %1$s [標籤: %2$s]\n"
+msgstr " %1$s [标籤: %2$s]\n"
#: src/frontend/mame/ui/devopt.cpp:267
msgid "* Slot Options:\n"
@@ -2324,7 +2324,7 @@ msgstr "* 插槽选项:\n"
#: src/frontend/mame/ui/devopt.cpp:274
msgid "[None]\n"
-msgstr "[無]\n"
+msgstr "[无]\n"
#: src/frontend/mame/ui/auditmenu.cpp:96
#, c-format
@@ -2386,7 +2386,7 @@ msgstr "声音"
#: src/frontend/mame/ui/info.cpp:36
msgid "capture hardware"
-msgstr ""
+msgstr "撷取硬体"
#: src/frontend/mame/ui/info.cpp:37
msgid "camera"
@@ -2406,15 +2406,15 @@ msgstr "键盘"
#: src/frontend/mame/ui/info.cpp:41
msgid "mouse"
-msgstr "滑鼠"
+msgstr "鼠标"
#: src/frontend/mame/ui/info.cpp:42
msgid "media"
-msgstr ""
+msgstr "媒体"
#: src/frontend/mame/ui/info.cpp:43
msgid "disk"
-msgstr "磁碟"
+msgstr "磁盘"
#: src/frontend/mame/ui/info.cpp:44
msgid "printer"
@@ -2422,23 +2422,23 @@ msgstr "印表机"
#: src/frontend/mame/ui/info.cpp:45
msgid "magnetic tape"
-msgstr ""
+msgstr "磁带"
#: src/frontend/mame/ui/info.cpp:46
msgid "punch tape"
-msgstr ""
+msgstr "打孔带"
#: src/frontend/mame/ui/info.cpp:47
msgid "magnetic drum"
-msgstr ""
+msgstr "磁鼓"
#: src/frontend/mame/ui/info.cpp:48
msgid "solid state storage"
-msgstr ""
+msgstr "固态储存"
#: src/frontend/mame/ui/info.cpp:49
msgid "communications"
-msgstr ""
+msgstr "通讯"
#: src/frontend/mame/ui/info.cpp:50
msgid "LAN"
@@ -2898,15 +2898,15 @@ msgstr "此变更仅当选定 \"开始新搜寻\" 时生效"
#: plugins/cheatfind/init.lua:504
msgid "Pause Mode"
-msgstr ""
+msgstr "暂停模式"
#: plugins/cheatfind/init.lua:511
msgid "Manually pause & unpause the game when needed with the pause hotkey"
-msgstr ""
+msgstr "当需要暂停热键时手动暂停及取消暂停游戏"
#: plugins/cheatfind/init.lua:536
msgid "All slots cleared and current state saved to Slot 1"
-msgstr ""
+msgstr "全部插槽已清除且目前状态已储存至插槽 1"
#: plugins/cheatfind/init.lua:551
msgid "Start new search"
@@ -2915,11 +2915,11 @@ msgstr "开始新搜寻"
#: plugins/cheatfind/init.lua:564
#, lua-format
msgid "Memory State saved to Slot %d"
-msgstr ""
+msgstr "记忆体状态已储存至插槽 %d"
#: plugins/cheatfind/init.lua:583
msgid "Save Current Memory State to Slot "
-msgstr ""
+msgstr "储存现有的记忆体状态至插槽"
#: plugins/cheatfind/init.lua:614
#, lua-format
@@ -2928,15 +2928,15 @@ msgstr "总计发现 %d 符合"
#: plugins/cheatfind/init.lua:655
msgid "Perform Compare : "
-msgstr ""
+msgstr "进行比较 :"
#: plugins/cheatfind/init.lua:672
msgid "Left less than right"
-msgstr ""
+msgstr "左值少于右值"
#: plugins/cheatfind/init.lua:674
msgid "Left greater than right"
-msgstr ""
+msgstr "左值多于右值"
#: plugins/cheatfind/init.lua:676
msgid "Left equal to right"
@@ -2944,7 +2944,7 @@ msgstr "左值等于右值"
#: plugins/cheatfind/init.lua:678
msgid "Left not equal to right"
-msgstr ""
+msgstr "左值不等于右值"
#: plugins/cheatfind/init.lua:680
msgid "Left equal to right with bitmask"
@@ -2956,11 +2956,11 @@ msgstr "位元遮罩下左值不等于右值"
#: plugins/cheatfind/init.lua:684
msgid "Left less than value"
-msgstr "左值小于原值"
+msgstr "左值少于原值"
#: plugins/cheatfind/init.lua:686
msgid "Left greater than value"
-msgstr "左值大于原值"
+msgstr "左值多于原值"
#: plugins/cheatfind/init.lua:688
msgid "Left equal to value"
@@ -2976,7 +2976,7 @@ msgstr "值"
#: plugins/cheatfind/init.lua:714
msgid "Difference"
-msgstr ""
+msgstr "差异"
#: plugins/cheatfind/init.lua:719
msgid "Any"
@@ -2984,95 +2984,97 @@ msgstr "任意"
#: plugins/cheatfind/init.lua:725
msgid "Data Format"
-msgstr "数据格式"
+msgstr "资料格式"
#: plugins/cheatfind/init.lua:731
msgid "Test/Write Poke Value"
-msgstr ""
+msgstr "测试/写入塞入值"
#: plugins/cheatfind/init.lua:738
msgid ""
"Use this if you want to poke the Slot 1 value (eg. You started with "
"something but lost it)"
msgstr ""
+"如果你想塞入插槽 1 的值(如你开始某事但忘了),用这个"
#: plugins/cheatfind/init.lua:740
msgid ""
"Use this if you want to poke the Last Slot value (eg. You started without an "
"item but finally got it)"
msgstr ""
+"如果你想塞入最后的插槽值(如你开始时忘了某项但终于找到了),用这个"
#: plugins/cheatfind/init.lua:742
msgid "Use this if you want to poke 0x00"
-msgstr ""
+msgstr "如果你想塞入 0x00 ,用这个"
#: plugins/cheatfind/init.lua:744
msgid "Use this if you want to poke 0x01"
-msgstr ""
+msgstr "如果你想塞入 0x01 ,用这个"
#: plugins/cheatfind/init.lua:746
msgid "Use this if you want to poke 0x02"
-msgstr ""
+msgstr "如果你想塞入 0x02 ,用这个"
#: plugins/cheatfind/init.lua:748
msgid "Use this if you want to poke 0x03"
-msgstr ""
+msgstr "如果你想塞入 0x03 ,用这个"
#: plugins/cheatfind/init.lua:750
msgid "Use this if you want to poke 0x04"
-msgstr ""
+msgstr "如果你想塞入 0x04 ,用这个"
#: plugins/cheatfind/init.lua:752
msgid "Use this if you want to poke 0x05"
-msgstr ""
+msgstr "如果你想塞入 0x05 ,用这个"
#: plugins/cheatfind/init.lua:754
msgid "Use this if you want to poke 0x06"
-msgstr ""
+msgstr "如果你想塞入 0x06 ,用这个"
#: plugins/cheatfind/init.lua:756
msgid "Use this if you want to poke 0x07"
-msgstr ""
+msgstr "如果你想塞入 0x07 ,用这个"
#: plugins/cheatfind/init.lua:758
msgid "Use this if you want to poke 0x08"
-msgstr ""
+msgstr "如果你想塞入 0x08 ,用这个"
#: plugins/cheatfind/init.lua:760
msgid "Use this if you want to poke 0x09"
-msgstr ""
+msgstr "如果你想塞入 0x09 ,用这个"
#: plugins/cheatfind/init.lua:762
msgid "Use this if you want to poke 0x63 (Decimal 99)"
-msgstr ""
+msgstr "如果你想塞入 0x63 (十进位的 99),用这个"
#: plugins/cheatfind/init.lua:764
msgid "Use this if you want to poke 0x99 (BCD 99)"
-msgstr ""
+msgstr "如果你想塞入 0x99 (二进位的 99),用这个"
#: plugins/cheatfind/init.lua:766
msgid "Use this if you want to poke 0xFF (Decimal 255)"
-msgstr ""
+msgstr "如果你想塞入 0xFF (十进位的 255),用这个"
#: plugins/cheatfind/init.lua:768
msgid "Use this if you want to poke 0x3E7 (Decimal 999)"
-msgstr ""
+msgstr "如果你想塞入 0x3E7 (十进位的 999),用这个"
#: plugins/cheatfind/init.lua:770
msgid "Use this if you want to poke 0x999 (BCD 999)"
-msgstr ""
+msgstr "如果你想塞入 0x999 (二进位的 999),用这个"
#: plugins/cheatfind/init.lua:772
msgid "Use this if you want to poke 0x270F (Decimal 9999)"
-msgstr ""
+msgstr "如果你想塞入 0x270F (十进位的 9999),用这个"
#: plugins/cheatfind/init.lua:774
msgid "Use this if you want to poke 0x9999 (BCD 9999)"
-msgstr ""
+msgstr "如果你想塞入 0x9999 (二进位的 9999),用这个"
#: plugins/cheatfind/init.lua:776
msgid "Use this if you want to poke 0xFFFF (Decimal 65535)"
-msgstr ""
+msgstr "如果你想塞入 0xFFFF (十进位的 65535),用这个"
#: plugins/cheatfind/init.lua:816
msgid "Undo last search -- #"
@@ -3089,7 +3091,7 @@ msgstr "所有"
#: plugins/cheatfind/init.lua:934
#, lua-format
msgid "Test Cheat %08X:%02X"
-msgstr ""
+msgstr "测试作弊码 %08X:%02X"
#: plugins/cheatfind/init.lua:974
msgid "Cheat engine not available"
diff --git a/language/Chinese_Traditional/strings.po b/language/Chinese_Traditional/strings.po
index f382ea856ca..99bcfd1713a 100644
--- a/language/Chinese_Traditional/strings.po
+++ b/language/Chinese_Traditional/strings.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: MAME\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-17 13:37+1100\n"
-"PO-Revision-Date: 2018-04-28 18:50+0800\n"
+"PO-Revision-Date: 2019-03-18 06:50+0800\n"
"Last-Translator: YuiFAN\n"
"Language-Team: MAME Language Team\n"
"Language: zh_TW\n"
@@ -1590,11 +1590,11 @@ msgstr "聲音\tOK\n"
#: src/frontend/mame/ui/selgame.cpp:1079
msgid "Capture\tUnimplemented\n"
-msgstr ""
+msgstr "擷取\t無法執行\n"
#: src/frontend/mame/ui/selgame.cpp:1081
msgid "Capture\tImperfect\n"
-msgstr ""
+msgstr "擷取\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1084
msgid "Camera\tUnimplemented\n"
@@ -1638,11 +1638,11 @@ msgstr "滑鼠\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1109
msgid "Media\tUnimplemented\n"
-msgstr ""
+msgstr "媒體\t無法執行\n"
#: src/frontend/mame/ui/selgame.cpp:1111
msgid "Media\tImperfect\n"
-msgstr ""
+msgstr "媒體\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1114
msgid "Disk\tUnimplemented\n"
@@ -1662,43 +1662,43 @@ msgstr "印表機\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1124
msgid "Mag. Tape\tUnimplemented\n"
-msgstr ""
+msgstr "磁帶\t無法執行\n"
#: src/frontend/mame/ui/selgame.cpp:1126
msgid "Mag. Tape\tImperfect\n"
-msgstr ""
+msgstr "磁帶\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1129
msgid "Punch Tape\tUnimplemented\n"
-msgstr ""
+msgstr "打孔帶\t無法執行\n"
#: src/frontend/mame/ui/selgame.cpp:1131
msgid "Punch Tape\tImperfect\n"
-msgstr ""
+msgstr "打孔帶\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1134
msgid "Mag. Drum\tUnimplemented\n"
-msgstr ""
+msgstr "磁鼓\t無法執行\n"
#: src/frontend/mame/ui/selgame.cpp:1136
msgid "Mag. Drum\tImperfect\n"
-msgstr ""
+msgstr "磁鼓\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1139
msgid "(EP)ROM\tUnimplemented\n"
-msgstr ""
+msgstr "(EP)ROM\t無法執行\n"
#: src/frontend/mame/ui/selgame.cpp:1141
msgid "(EP)ROM\tImperfect\n"
-msgstr ""
+msgstr "(EP)ROM\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1144
msgid "Communications\tUnimplemented\n"
-msgstr ""
+msgstr "通訊\t無法執行\n"
#: src/frontend/mame/ui/selgame.cpp:1146
msgid "Communications\tImperfect\n"
-msgstr ""
+msgstr "通訊\t不完美\n"
#: src/frontend/mame/ui/selgame.cpp:1149
msgid "LAN\tUnimplemented\n"
@@ -2386,7 +2386,7 @@ msgstr "聲音"
#: src/frontend/mame/ui/info.cpp:36
msgid "capture hardware"
-msgstr ""
+msgstr "擷取硬體"
#: src/frontend/mame/ui/info.cpp:37
msgid "camera"
@@ -2410,7 +2410,7 @@ msgstr "滑鼠"
#: src/frontend/mame/ui/info.cpp:42
msgid "media"
-msgstr ""
+msgstr "媒體"
#: src/frontend/mame/ui/info.cpp:43
msgid "disk"
@@ -2422,23 +2422,23 @@ msgstr "印表機"
#: src/frontend/mame/ui/info.cpp:45
msgid "magnetic tape"
-msgstr ""
+msgstr "磁帶"
#: src/frontend/mame/ui/info.cpp:46
msgid "punch tape"
-msgstr ""
+msgstr "打孔帶"
#: src/frontend/mame/ui/info.cpp:47
msgid "magnetic drum"
-msgstr ""
+msgstr "磁鼓"
#: src/frontend/mame/ui/info.cpp:48
msgid "solid state storage"
-msgstr ""
+msgstr "固態儲存"
#: src/frontend/mame/ui/info.cpp:49
msgid "communications"
-msgstr ""
+msgstr "通訊"
#: src/frontend/mame/ui/info.cpp:50
msgid "LAN"
@@ -2898,15 +2898,15 @@ msgstr "此變更僅當選定 \"開始新搜尋\" 時生效"
#: plugins/cheatfind/init.lua:504
msgid "Pause Mode"
-msgstr ""
+msgstr "暫停模式"
#: plugins/cheatfind/init.lua:511
msgid "Manually pause & unpause the game when needed with the pause hotkey"
-msgstr ""
+msgstr "當需要暫停熱鍵時手動暫停及取消暫停遊戲"
#: plugins/cheatfind/init.lua:536
msgid "All slots cleared and current state saved to Slot 1"
-msgstr ""
+msgstr "全部插槽已清除且目前狀態已儲存至插槽 1"
#: plugins/cheatfind/init.lua:551
msgid "Start new search"
@@ -2915,11 +2915,11 @@ msgstr "開始新搜尋"
#: plugins/cheatfind/init.lua:564
#, lua-format
msgid "Memory State saved to Slot %d"
-msgstr ""
+msgstr "記憶體狀態已儲存至插槽 %d"
#: plugins/cheatfind/init.lua:583
msgid "Save Current Memory State to Slot "
-msgstr ""
+msgstr "儲存現有的記憶體狀態至插槽"
#: plugins/cheatfind/init.lua:614
#, lua-format
@@ -2928,15 +2928,15 @@ msgstr "總計發現 %d 符合"
#: plugins/cheatfind/init.lua:655
msgid "Perform Compare : "
-msgstr ""
+msgstr "進行比較 :"
#: plugins/cheatfind/init.lua:672
msgid "Left less than right"
-msgstr ""
+msgstr "左值少於右值"
#: plugins/cheatfind/init.lua:674
msgid "Left greater than right"
-msgstr ""
+msgstr "左值多於右值"
#: plugins/cheatfind/init.lua:676
msgid "Left equal to right"
@@ -2944,7 +2944,7 @@ msgstr "左值等於右值"
#: plugins/cheatfind/init.lua:678
msgid "Left not equal to right"
-msgstr ""
+msgstr "左值不等於右值"
#: plugins/cheatfind/init.lua:680
msgid "Left equal to right with bitmask"
@@ -2956,11 +2956,11 @@ msgstr "位元遮罩下左值不等於右值"
#: plugins/cheatfind/init.lua:684
msgid "Left less than value"
-msgstr "左值小於原值"
+msgstr "左值少於原值"
#: plugins/cheatfind/init.lua:686
msgid "Left greater than value"
-msgstr "左值大於原值"
+msgstr "左值多於原值"
#: plugins/cheatfind/init.lua:688
msgid "Left equal to value"
@@ -2976,7 +2976,7 @@ msgstr "值"
#: plugins/cheatfind/init.lua:714
msgid "Difference"
-msgstr ""
+msgstr "差異"
#: plugins/cheatfind/init.lua:719
msgid "Any"
@@ -2988,91 +2988,93 @@ msgstr "資料格式"
#: plugins/cheatfind/init.lua:731
msgid "Test/Write Poke Value"
-msgstr ""
+msgstr "測試/寫入塞入值"
#: plugins/cheatfind/init.lua:738
msgid ""
"Use this if you want to poke the Slot 1 value (eg. You started with "
"something but lost it)"
msgstr ""
+"如果你想塞入插槽 1 的值(如你開始某事但忘了),用這個"
#: plugins/cheatfind/init.lua:740
msgid ""
"Use this if you want to poke the Last Slot value (eg. You started without an "
"item but finally got it)"
msgstr ""
+"如果你想塞入最後的插槽值(如你開始時忘了某項但終於找到了),用這個"
#: plugins/cheatfind/init.lua:742
msgid "Use this if you want to poke 0x00"
-msgstr ""
+msgstr "如果你想塞入 0x00 ,用這個"
#: plugins/cheatfind/init.lua:744
msgid "Use this if you want to poke 0x01"
-msgstr ""
+msgstr "如果你想塞入 0x01 ,用這個"
#: plugins/cheatfind/init.lua:746
msgid "Use this if you want to poke 0x02"
-msgstr ""
+msgstr "如果你想塞入 0x02 ,用這個"
#: plugins/cheatfind/init.lua:748
msgid "Use this if you want to poke 0x03"
-msgstr ""
+msgstr "如果你想塞入 0x03 ,用這個"
#: plugins/cheatfind/init.lua:750
msgid "Use this if you want to poke 0x04"
-msgstr ""
+msgstr "如果你想塞入 0x04 ,用這個"
#: plugins/cheatfind/init.lua:752
msgid "Use this if you want to poke 0x05"
-msgstr ""
+msgstr "如果你想塞入 0x05 ,用這個"
#: plugins/cheatfind/init.lua:754
msgid "Use this if you want to poke 0x06"
-msgstr ""
+msgstr "如果你想塞入 0x06 ,用這個"
#: plugins/cheatfind/init.lua:756
msgid "Use this if you want to poke 0x07"
-msgstr ""
+msgstr "如果你想塞入 0x07 ,用這個"
#: plugins/cheatfind/init.lua:758
msgid "Use this if you want to poke 0x08"
-msgstr ""
+msgstr "如果你想塞入 0x08 ,用這個"
#: plugins/cheatfind/init.lua:760
msgid "Use this if you want to poke 0x09"
-msgstr ""
+msgstr "如果你想塞入 0x09 ,用這個"
#: plugins/cheatfind/init.lua:762
msgid "Use this if you want to poke 0x63 (Decimal 99)"
-msgstr ""
+msgstr "如果你想塞入 0x63 (十進位的 99),用這個"
#: plugins/cheatfind/init.lua:764
msgid "Use this if you want to poke 0x99 (BCD 99)"
-msgstr ""
+msgstr "如果你想塞入 0x99 (二進位的 99),用這個"
#: plugins/cheatfind/init.lua:766
msgid "Use this if you want to poke 0xFF (Decimal 255)"
-msgstr ""
+msgstr "如果你想塞入 0xFF (十進位的 255),用這個"
#: plugins/cheatfind/init.lua:768
msgid "Use this if you want to poke 0x3E7 (Decimal 999)"
-msgstr ""
+msgstr "如果你想塞入 0x3E7 (十進位的 999),用這個"
#: plugins/cheatfind/init.lua:770
msgid "Use this if you want to poke 0x999 (BCD 999)"
-msgstr ""
+msgstr "如果你想塞入 0x999 (二進位的 999),用這個"
#: plugins/cheatfind/init.lua:772
msgid "Use this if you want to poke 0x270F (Decimal 9999)"
-msgstr ""
+msgstr "如果你想塞入 0x270F (十進位的 9999),用這個"
#: plugins/cheatfind/init.lua:774
msgid "Use this if you want to poke 0x9999 (BCD 9999)"
-msgstr ""
+msgstr "如果你想塞入 0x9999 (二進位的 9999),用這個"
#: plugins/cheatfind/init.lua:776
msgid "Use this if you want to poke 0xFFFF (Decimal 65535)"
-msgstr ""
+msgstr "如果你想塞入 0xFFFF (十進位的 65535),用這個"
#: plugins/cheatfind/init.lua:816
msgid "Undo last search -- #"
@@ -3089,7 +3091,7 @@ msgstr "所有"
#: plugins/cheatfind/init.lua:934
#, lua-format
msgid "Test Cheat %08X:%02X"
-msgstr ""
+msgstr "測試作弊碼 %08X:%02X"
#: plugins/cheatfind/init.lua:974
msgid "Cheat engine not available"
diff --git a/makefile b/makefile
index 82b72016f11..701d833b7d9 100644
--- a/makefile
+++ b/makefile
@@ -1625,14 +1625,14 @@ endif
ifeq (posix,$(SHELLTYPE))
$(GENDIR)/version.cpp: $(GENDIR)/git_desc | $(GEN_FOLDERS)
- @echo '#define BARE_BUILD_VERSION "0.208"' > $@
+ @echo '#define BARE_BUILD_VERSION "0.209"' > $@
@echo 'extern const char bare_build_version[];' >> $@
@echo 'extern const char build_version[];' >> $@
@echo 'const char bare_build_version[] = BARE_BUILD_VERSION;' >> $@
@echo 'const char build_version[] = BARE_BUILD_VERSION " ($(NEW_GIT_VERSION))";' >> $@
else
$(GENDIR)/version.cpp: $(GENDIR)/git_desc
- @echo #define BARE_BUILD_VERSION "0.208" > $@
+ @echo #define BARE_BUILD_VERSION "0.209" > $@
@echo extern const char bare_build_version[]; >> $@
@echo extern const char build_version[]; >> $@
@echo const char bare_build_version[] = BARE_BUILD_VERSION; >> $@
diff --git a/src/devices/bus/isa/3c505.cpp b/src/devices/bus/isa/3c505.cpp
index 622a11d48dd..cdf1f26e88e 100644
--- a/src/devices/bus/isa/3c505.cpp
+++ b/src/devices/bus/isa/3c505.cpp
@@ -12,14 +12,12 @@
* http://lxr.free-electrons.com/source/drivers/net/3c505.h
* http://lxr.free-electrons.com/source/drivers/net/3c505.c
* http://stason.org/TULARC/pc/network-cards/O/OLIVETTI-Ethernet-NPU-9144-3C505.html
- * http://www.bitsavers.org/pdf/3Com/3c505_Etherlink_Plus_Developers_Guide_May86.pdf'
+ * http://www.bitsavers.org/pdf/3Com/3c505_Etherlink_Plus_Developers_Guide_May86.pdf
* http://www.bitsavers.org/pdf/3Com/1569-03_EtherLink_Plus_Technical_Reference_Jan89.pdf
*
* TODO
* - resolve intermittent diagnostics bug on 8-bit dma channels
- * - testing on Apollo Domain/OS
- * - externalize mac address
- * - 8 bit isa slot support
+ * - 8-bit isa slot support
* - revision 1.0 and 2.0 hardware/firmware variants
* - 8023 loopback mode
*/
@@ -42,14 +40,19 @@ ROM_START(3c505)
ROM_LOAD16_BYTE("0729-12_a.3h", 0x00000, 0x02000, CRC(5415fccd) SHA1(6a42d7f3acdb3e0213e1037fee1864819ac33991))
ROM_LOAD16_BYTE("0729-62_a.3f", 0x00001, 0x02000, CRC(4240bd9d) SHA1(015d2f7282def85681bcf1a7c5a7f501a16d5a6c))
- ROM_REGION(0x02000, "host", 0)
ROM_SYSTEM_BIOS(0, "unused", "Unused")
-
ROM_SYSTEM_BIOS(1, "apollo", "Apollo")
- ROMX_LOAD("3000_3c505_010728-00.bin", 0x00000, 0x02000, CRC(69b77ec6) SHA1(7ac36cc6fc90b90ddfc56c45303b514cbe18ae58), ROM_BIOS(1))
-
ROM_SYSTEM_BIOS(2, "netware", "3C505-NW EtherLink Plus NetWare Boot PROM")
+
+ // host firmware
+ ROM_REGION(0x02000, "host", 0)
+ ROMX_LOAD("3000_3c505_010728-00.bin", 0x00000, 0x02000, CRC(69b77ec6) SHA1(7ac36cc6fc90b90ddfc56c45303b514cbe18ae58), ROM_BIOS(1))
ROMX_LOAD("3c505-nw.bin", 0x00000, 0x02000, NO_DUMP, ROM_BIOS(2))
+
+ // station address prom
+ ROM_REGION16_LE(0x10, "mac", 0)
+ ROM_LOAD("3com.9h", 0x00, 0x10, CRC(8e207354) SHA1(ca5ddcb272ab2851e00473dc960b23039746e3d2))
+ ROMX_LOAD("apollo.9h", 0x00, 0x10, CRC(490f283e) SHA1(fe4c26b6a41e643f4397990b066fdc04b6f4c5ae), ROM_BIOS(1))
ROM_END
static INPUT_PORTS_START(3c505)
@@ -349,14 +352,7 @@ void isa16_3c505_device::map_io(address_map &map)
map(0x0103, 0x0103).rw(FUNC(isa16_3c505_device::asr_r), FUNC(isa16_3c505_device::acr_w));
map(0x0104, 0x0105).rw(FUNC(isa16_3c505_device::adata_r), FUNC(isa16_3c505_device::adata_w));
- map(0x0180, 0x018f).lr16("mac",
- [](offs_t offset)
- {
- // TODO: hard-code to 3Com dummy address for now
- static const u8 mac[] = { 0x02, 0x60, 0x8c, 0x12, 0x34, 0x56, 0xff, 0xff};
-
- return mac[offset];
- });
+ map(0x0180, 0x018f).rom().region("mac", 0);
}
void isa16_3c505_device::map_isa(address_map &map)
diff --git a/src/devices/cpu/hmcs40/hmcs40d.cpp b/src/devices/cpu/hmcs40/hmcs40d.cpp
index 96e4b6399ea..d845b7545ae 100644
--- a/src/devices/cpu/hmcs40/hmcs40d.cpp
+++ b/src/devices/cpu/hmcs40/hmcs40d.cpp
@@ -11,6 +11,33 @@
#include "emu.h"
#include "hmcs40d.h"
+// constructor
+
+hmcs40_disassembler::hmcs40_disassembler()
+{
+ // init lfsr pc lut
+ for (u32 i = 0, pc = 0; i < 0x40; i++)
+ {
+ m_l2r[i] = pc;
+ m_r2l[pc] = i;
+
+ // see hmcs40_cpu_device::increment_pc()
+ u32 mask = 0x3f;
+ u32 low = pc & mask;
+ u32 fb = (low << 1 & 0x20) == (low & 0x20);
+
+ if (low == (mask >> 1))
+ fb = 1;
+ else if (low == mask)
+ fb = 0;
+
+ pc = (pc & ~mask) | ((pc << 1 | fb) & mask);
+ }
+}
+
+
+// common lookup tables
+
const char *const hmcs40_disassembler::s_mnemonics[] =
{
"?",
@@ -152,6 +179,7 @@ const u8 hmcs40_disassembler::hmcs40_mnemonic[0x400] =
};
+// disasm
offs_t hmcs40_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params)
{
@@ -197,41 +225,3 @@ offs_t hmcs40_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
return 1 | s_flags[instr] | SUPPORTED;
}
-
-u32 hmcs40_disassembler::opcode_alignment() const
-{
- return 1;
-}
-
-u32 hmcs40_disassembler::interface_flags() const
-{
- return NONLINEAR_PC | PAGED;
-}
-
-u32 hmcs40_disassembler::page_address_bits() const
-{
- return 6;
-}
-
-offs_t hmcs40_disassembler::pc_linear_to_real(offs_t pc) const
-{
- static const u8 l2r[64] = {
- 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x3e, 0x3d, 0x3b, 0x37, 0x2f, 0x1e, 0x3c, 0x39, 0x33,
- 0x27, 0x0e, 0x1d, 0x3a, 0x35, 0x2b, 0x16, 0x2c, 0x18, 0x30, 0x21, 0x02, 0x05, 0x0b, 0x17, 0x2e,
- 0x1c, 0x38, 0x31, 0x23, 0x06, 0x0d, 0x1b, 0x36, 0x2d, 0x1a, 0x34, 0x29, 0x12, 0x24, 0x08, 0x11,
- 0x22, 0x04, 0x09, 0x13, 0x26, 0x0c, 0x19, 0x32, 0x25, 0x0a, 0x15, 0x2a, 0x14, 0x28, 0x10, 0x20,
- };
- return (pc & ~0x3f) | l2r[pc & 0x3f];
-}
-
-offs_t hmcs40_disassembler::pc_real_to_linear(offs_t pc) const
-{
- static const u8 r2l[64] = {
- 0x00, 0x01, 0x1b, 0x02, 0x31, 0x1c, 0x24, 0x03, 0x2e, 0x32, 0x39, 0x1d, 0x35, 0x25, 0x11, 0x04,
- 0x3e, 0x2f, 0x2c, 0x33, 0x3c, 0x3a, 0x16, 0x1e, 0x18, 0x36, 0x29, 0x26, 0x20, 0x12, 0x0c, 0x05,
- 0x3f, 0x1a, 0x30, 0x23, 0x2d, 0x38, 0x34, 0x10, 0x3d, 0x2b, 0x3b, 0x15, 0x17, 0x28, 0x1f, 0x0b,
- 0x19, 0x22, 0x37, 0x0f, 0x2a, 0x14, 0x27, 0x0a, 0x21, 0x0e, 0x13, 0x09, 0x0d, 0x08, 0x07, 0x06,
- };
- return (pc & ~0x3f) | r2l[pc & 0x3f];
-}
-
diff --git a/src/devices/cpu/hmcs40/hmcs40d.h b/src/devices/cpu/hmcs40/hmcs40d.h
index 04f534bdc4c..0da5f51d3d9 100644
--- a/src/devices/cpu/hmcs40/hmcs40d.h
+++ b/src/devices/cpu/hmcs40/hmcs40d.h
@@ -14,14 +14,14 @@
class hmcs40_disassembler : public util::disasm_interface
{
public:
- hmcs40_disassembler() = default;
+ hmcs40_disassembler();
virtual ~hmcs40_disassembler() = default;
- virtual u32 opcode_alignment() const override;
- virtual u32 interface_flags() const override;
- virtual u32 page_address_bits() const override;
- virtual offs_t pc_linear_to_real(offs_t pc) const override;
- virtual offs_t pc_real_to_linear(offs_t pc) const override;
+ virtual u32 opcode_alignment() const override { return 1; }
+ virtual u32 interface_flags() const override { return NONLINEAR_PC | PAGED; }
+ virtual u32 page_address_bits() const override { return 6; }
+ virtual offs_t pc_linear_to_real(offs_t pc) const override { return (pc & ~0x3f) | m_l2r[pc & 0x3f]; }
+ virtual offs_t pc_real_to_linear(offs_t pc) const override { return (pc & ~0x3f) | m_r2l[pc & 0x3f]; }
virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params) override;
private:
@@ -45,6 +45,9 @@ private:
static const s8 s_bits[];
static const u32 s_flags[];
static const u8 hmcs40_mnemonic[0x400];
+
+ u8 m_l2r[0x40];
+ u8 m_r2l[0x40];
};
#endif
diff --git a/src/devices/cpu/i386/cpuidmsrs.hxx b/src/devices/cpu/i386/cpuidmsrs.hxx
index 8b02d7828cd..f16868216a5 100644
--- a/src/devices/cpu/i386/cpuidmsrs.hxx
+++ b/src/devices/cpu/i386/cpuidmsrs.hxx
@@ -236,7 +236,7 @@ void athlonxp_device::opcode_cpuid()
case 0x80000007:
{
- REG32(EDX) = 1;
+ REG32(EDX) = 1; // Advanced power management information, temperature sensor present
CYCLES(CYCLES_CPUID);
break;
}
@@ -368,7 +368,21 @@ uint64_t athlonxp_device::opcode_rdmsr(bool &valid_msr)
break;
case 0xC001001D: // TOP_MEM2
break;
+ case 0xC0010111: // SMM_BASE
+ // address of system management mode area
+ ret = (uint64_t)m_msr_smm_base;
+ break;
case 0xC0010113: // SMM_MASK
+ // 1 TValid - Enable TSeg SMRAM Range
+ // 0 AValid - Enable ASeg SMRAM Range
+ /* Access to the ASeg (a0000-bffff) depends on bit 0 of smm_mask
+ if the bit is 0 use the associated fixed mtrr
+ if the bit is 1
+ if smm is active
+ access goes to dram (wrmem 1 rdmem 1)
+ if smm not active
+ access goes to mmio (wrmem 0 rdmem 0) */
+ ret = m_msr_smm_mask;
break;
}
valid_msr = true;
@@ -414,6 +428,11 @@ void athlonxp_device::opcode_wrmsr(uint64_t data, bool &valid_msr)
break;
case 0x259: // MTRRfix16K_A0000
m_msr_mtrrfix[2] = data;
+ if (m_msr_smm_mask & 1)
+ {
+ // data = 0x1818181818181818; // when smm is implemented
+ data = 0; // when smm is not active
+ }
parse_mtrrfix(data, 0xa0000, 16);
break;
case 0x268: // MTRRfix4K_C0000-F8000
@@ -448,7 +467,19 @@ void athlonxp_device::opcode_wrmsr(uint64_t data, bool &valid_msr)
case 0xC001001A: // TOP_MEM
m_msr_top_mem = (offs_t)data;
break;
+ case 0xC0010111: // SMM_BASE
+ m_msr_smm_base = (offs_t)data;
+ break;
case 0xC0010113: // SMM_MASK
+ m_msr_smm_mask = data;
+ if (m_msr_smm_mask & 1)
+ {
+ // data = 0x1818181818181818; // when smm is implemented
+ data = 0; // when smm is not active
+ }
+ else
+ data = m_msr_mtrrfix[2];
+ parse_mtrrfix(data, 0xa0000, 16);
break;
}
valid_msr = true;
diff --git a/src/devices/cpu/i386/i386.cpp b/src/devices/cpu/i386/i386.cpp
index 97dd5e5a8b6..6256b4de996 100644
--- a/src/devices/cpu/i386/i386.cpp
+++ b/src/devices/cpu/i386/i386.cpp
@@ -4708,6 +4708,8 @@ void athlonxp_device::device_start()
save_item(NAME(m_processor_name_string));
save_item(NAME(m_msr_top_mem));
save_item(NAME(m_msr_sys_cfg));
+ save_item(NAME(m_msr_smm_base));
+ save_item(NAME(m_msr_smm_mask));
save_item(NAME(m_msr_mtrrfix));
save_item(NAME(m_memory_ranges_1m));
}
@@ -4761,6 +4763,8 @@ void athlonxp_device::device_reset()
m_memory_ranges_1m[n] = 0;
m_msr_top_mem = 1024 * 1024;
m_msr_sys_cfg = 0;
+ m_msr_smm_base = 0x30000;
+ m_msr_smm_mask = 0;
m_cpuid_max_input_value_eax = 0x01;
m_cpu_version = REG32(EDX);
diff --git a/src/devices/cpu/i386/i386.h b/src/devices/cpu/i386/i386.h
index e3182fcfb81..42eed546f41 100644
--- a/src/devices/cpu/i386/i386.h
+++ b/src/devices/cpu/i386/i386.h
@@ -1677,6 +1677,8 @@ private:
uint8_t m_processor_name_string[48];
offs_t m_msr_top_mem;
uint64_t m_msr_sys_cfg;
+ offs_t m_msr_smm_base;
+ uint64_t m_msr_smm_mask;
uint64_t m_msr_mtrrfix[11];
uint8_t m_memory_ranges_1m[1024 / 4];
cpucache<17, 9, Cache2Way, CacheLineBytes64> cache; // 512 sets, 2 ways (cachelines per set), 64 bytes per cacheline
diff --git a/src/devices/cpu/mips/mips1.cpp b/src/devices/cpu/mips/mips1.cpp
index 1ed202c0d63..a5f99fcc993 100644
--- a/src/devices/cpu/mips/mips1.cpp
+++ b/src/devices/cpu/mips/mips1.cpp
@@ -1408,10 +1408,23 @@ void mips1_device_base::handle_cop1(u32 const op)
if (f32_lt(float32_t{ u32(m_f[FSREG >> 1]) }, float32_t{ 0 }))
set_cop1_reg(FDREG >> 1, f32_mul(float32_t{ u32(m_f[FSREG >> 1]) }, i32_to_f32(-1)).v);
else
- set_cop1_reg(FDREG >> 1, m_f[FSREG >> 1]);
+ set_cop1_reg(FDREG >> 1, u32(m_f[FSREG >> 1]));
break;
case 0x06: // MOV.S
- m_f[FDREG >> 1] = m_f[FSREG >> 1];
+ if (FDREG & 1)
+ if (FSREG & 1)
+ // move high half to high half
+ m_f[FDREG >> 1] = (m_f[FSREG >> 1] & ~0xffffffffULL) | u32(m_f[FDREG >> 1]);
+ else
+ // move low half to high half
+ m_f[FDREG >> 1] = (m_f[FSREG >> 1] << 32) | u32(m_f[FDREG >> 1]);
+ else
+ if (FSREG & 1)
+ // move high half to low half
+ m_f[FDREG >> 1] = (m_f[FDREG >> 1] & ~0xffffffffULL) | (m_f[FSREG >> 1] >> 32);
+ else
+ // move low half to low half
+ m_f[FDREG >> 1] = (m_f[FDREG >> 1] & ~0xffffffffULL) | u32(m_f[FSREG >> 1]);
break;
case 0x07: // NEG.S
set_cop1_reg(FDREG >> 1, f32_mul(float32_t{ u32(m_f[FSREG >> 1]) }, i32_to_f32(-1)).v);
@@ -1802,7 +1815,7 @@ void mips1_device_base::handle_cop1(u32 const op)
}
}
-void mips1_device_base::set_cop1_reg(unsigned const reg, u64 const data)
+template <typename T> void mips1_device_base::set_cop1_reg(unsigned const reg, T const data)
{
// translate softfloat exception flags to cause register
if (softfloat_exceptionFlags)
@@ -1829,7 +1842,10 @@ void mips1_device_base::set_cop1_reg(unsigned const reg, u64 const data)
m_fcr31 |= ((m_fcr31 & FCR31_CM) >> 10);
}
- m_f[reg] = data;
+ if (sizeof(T) == 4)
+ m_f[reg] = (m_f[reg] & ~0xffffffffULL) | data;
+ else
+ m_f[reg] = data;
}
bool mips1_device_base::memory_translate(int spacenum, int intention, offs_t &address)
diff --git a/src/devices/cpu/mips/mips1.h b/src/devices/cpu/mips/mips1.h
index 3ae34e4b69f..3a442fa914c 100644
--- a/src/devices/cpu/mips/mips1.h
+++ b/src/devices/cpu/mips/mips1.h
@@ -298,7 +298,7 @@ protected:
virtual u32 get_cop0_reg(unsigned const reg) override;
virtual void handle_cop1(u32 const op) override;
- virtual void set_cop1_reg(unsigned const reg, u64 const data);
+ template <typename T> void set_cop1_reg(unsigned const reg, T const data);
private:
u64 m_reset_time;
diff --git a/src/devices/cpu/mips/r4000.cpp b/src/devices/cpu/mips/r4000.cpp
index ca95b107c65..28adcda0e15 100644
--- a/src/devices/cpu/mips/r4000.cpp
+++ b/src/devices/cpu/mips/r4000.cpp
@@ -1642,7 +1642,7 @@ void r4000_base_device::cp1_execute(u32 const op)
break;
case 0x04: // MTC1
if (SR & SR_FR)
- m_f[RDREG] = u32(m_r[RTREG]);
+ m_f[RDREG] = (m_f[RDREG] & ~0xffffffffULL) | u32(m_r[RTREG]);
else
if (RDREG & 1)
// load the high half of the even floating point register
@@ -1761,12 +1761,27 @@ void r4000_base_device::cp1_execute(u32 const op)
if (f32_lt(float32_t{ u32(m_f[FSREG]) }, float32_t{ 0 }))
cp1_set(FDREG, f32_mul(float32_t{ u32(m_f[FSREG]) }, i32_to_f32(-1)).v);
else
- cp1_set(FDREG, m_f[FSREG]);
+ cp1_set(FDREG, u32(m_f[FSREG]));
}
break;
case 0x06: // MOV.S
- if ((SR & SR_FR) || !(op & ODD_REGS))
- m_f[FDREG] = m_f[FSREG];
+ if (SR & SR_FR)
+ m_f[FDREG] = (m_f[FDREG] & ~0xffffffffULL) | u32(m_f[FSREG]);
+ else
+ if (FDREG & 1)
+ if (FSREG & 1)
+ // move high half to high half
+ m_f[FDREG & ~1] = (m_f[FSREG & ~1] & ~0xffffffffULL) | u32(m_f[FDREG & ~1]);
+ else
+ // move low half to high half
+ m_f[FDREG & ~1] = (m_f[FSREG & ~1] << 32) | u32(m_f[FDREG & ~1]);
+ else
+ if (FSREG & 1)
+ // move high half to low half
+ m_f[FDREG & ~1] = (m_f[FDREG & ~1] & ~0xffffffffULL) | (m_f[FSREG & ~1] >> 32);
+ else
+ // move low half to low half
+ m_f[FDREG & ~1] = (m_f[FDREG & ~1] & ~0xffffffffULL) | u32(m_f[FSREG & ~1]);
break;
case 0x07: // NEG.S
if ((SR & SR_FR) || !(op & ODD_REGS))
@@ -2358,7 +2373,7 @@ void r4000_base_device::cp1_execute(u32 const op)
[this, op](u32 data)
{
if (SR & SR_FR)
- m_f[RTREG] = data;
+ m_f[RTREG] = (m_f[RTREG] & ~0xffffffffULL) | data;
else
if (RTREG & 1)
// load the high half of the even floating point register
@@ -2397,7 +2412,7 @@ void r4000_base_device::cp1_execute(u32 const op)
}
}
-void r4000_base_device::cp1_set(unsigned const reg, u64 const data)
+template <typename T> void r4000_base_device::cp1_set(unsigned const reg, T const data)
{
// translate softfloat exception flags to cause register
if (softfloat_exceptionFlags)
@@ -2424,7 +2439,10 @@ void r4000_base_device::cp1_set(unsigned const reg, u64 const data)
m_fcr31 |= ((m_fcr31 & FCR31_CM) >> 10);
}
- m_f[reg] = data;
+ if (sizeof(T) == 4)
+ m_f[reg] = (m_f[reg] & ~0xffffffffULL) | data;
+ else
+ m_f[reg] = data;
}
void r4000_base_device::cp2_execute(u32 const op)
diff --git a/src/devices/cpu/mips/r4000.h b/src/devices/cpu/mips/r4000.h
index 8c3a1760ba3..57e37b6dfe1 100644
--- a/src/devices/cpu/mips/r4000.h
+++ b/src/devices/cpu/mips/r4000.h
@@ -347,7 +347,7 @@ protected:
// cp1 implementation
void cp1_execute(u32 const op);
- void cp1_set(unsigned const reg, u64 const data);
+ template <typename T> void cp1_set(unsigned const reg, T const data);
// cp2 implementation
void cp2_execute(u32 const op);
diff --git a/src/devices/cpu/sm510/sm500core.cpp b/src/devices/cpu/sm510/sm500core.cpp
index abe34e55fa3..8396d8e3107 100644
--- a/src/devices/cpu/sm510/sm500core.cpp
+++ b/src/devices/cpu/sm510/sm500core.cpp
@@ -36,16 +36,14 @@ void sm500_device::data_4x10x4(address_map &map)
// device definitions
-sm500_device::sm500_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : sm500_device(mconfig, SM500, tag, owner, clock, 1 /* stack levels */, 7 /* o group pins */, 11 /* prg width */, address_map_constructor(FUNC(sm500_device::program_1_2k), this), 6 /* data width */, address_map_constructor(FUNC(sm500_device::data_4x10x4), this))
-{
-}
+sm500_device::sm500_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ sm500_device(mconfig, SM500, tag, owner, clock, 1 /* stack levels */, 7 /* o group pins */, 11 /* prg width */, address_map_constructor(FUNC(sm500_device::program_1_2k), this), 6 /* data width */, address_map_constructor(FUNC(sm500_device::data_4x10x4), this))
+{ }
-sm500_device::sm500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int o_pins, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data)
- : sm510_base_device(mconfig, type, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data),
+sm500_device::sm500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int o_pins, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) :
+ sm510_base_device(mconfig, type, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data),
m_o_pins(o_pins)
-{
-}
+{ }
// disasm
diff --git a/src/devices/cpu/sm510/sm510.h b/src/devices/cpu/sm510/sm510.h
index 03cd24efe89..6171de9ee6e 100644
--- a/src/devices/cpu/sm510/sm510.h
+++ b/src/devices/cpu/sm510/sm510.h
@@ -149,6 +149,7 @@ protected:
u8 m_bl;
u8 m_bm;
bool m_sbm;
+ bool m_sbl;
u8 m_c;
bool m_skip;
u8 m_w;
@@ -164,7 +165,7 @@ protected:
emu_timer *m_lcd_timer;
u8 m_l, m_x;
u8 m_y;
- bool m_bp;
+ u8 m_bp;
bool m_bc;
u16 get_lcd_row(int column, u8* ram);
@@ -214,6 +215,7 @@ protected:
// opcode handlers
virtual void op_lb();
virtual void op_lbl();
+ virtual void op_sbl();
virtual void op_sbm();
virtual void op_exbla();
virtual void op_incb();
diff --git a/src/devices/cpu/sm510/sm510base.cpp b/src/devices/cpu/sm510/sm510base.cpp
index 919fcea9e17..ab7b659cbb2 100644
--- a/src/devices/cpu/sm510/sm510base.cpp
+++ b/src/devices/cpu/sm510/sm510base.cpp
@@ -61,6 +61,7 @@ void sm510_base_device::device_start()
m_acc = 0;
m_bl = 0;
m_bm = 0;
+ m_sbl = false;
m_sbm = false;
m_c = 0;
m_skip = false;
@@ -73,7 +74,7 @@ void sm510_base_device::device_start()
m_l = 0;
m_x = 0;
m_y = 0;
- m_bp = false;
+ m_bp = 0;
m_bc = false;
m_halt = false;
m_melody_rd = 0;
@@ -93,6 +94,7 @@ void sm510_base_device::device_start()
save_item(NAME(m_acc));
save_item(NAME(m_bl));
save_item(NAME(m_bm));
+ save_item(NAME(m_sbl));
save_item(NAME(m_sbm));
save_item(NAME(m_c));
save_item(NAME(m_skip));
@@ -147,13 +149,14 @@ void sm510_base_device::device_reset()
// ACL
m_skip = false;
m_halt = false;
+ m_sbl = false;
m_sbm = false;
m_op = m_prev_op = 0;
reset_vector();
m_prev_pc = m_pc;
// lcd is on (Bp on, BC off, bs(y) off)
- m_bp = true;
+ m_bp = 1;
m_bc = false;
m_y = 0;
diff --git a/src/devices/cpu/sm510/sm510core.cpp b/src/devices/cpu/sm510/sm510core.cpp
index 4d5edbef5f1..80ab6bf6ab3 100644
--- a/src/devices/cpu/sm510/sm510core.cpp
+++ b/src/devices/cpu/sm510/sm510core.cpp
@@ -37,10 +37,9 @@ void sm510_device::data_96_32x4(address_map &map)
// device definitions
-sm510_device::sm510_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : sm510_base_device(mconfig, SM510, tag, owner, clock, 2 /* stack levels */, 12 /* prg width */, address_map_constructor(FUNC(sm510_device::program_2_7k), this), 7 /* data width */, address_map_constructor(FUNC(sm510_device::data_96_32x4), this))
-{
-}
+sm510_device::sm510_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ sm510_base_device(mconfig, SM510, tag, owner, clock, 2 /* stack levels */, 12 /* prg width */, address_map_constructor(FUNC(sm510_device::program_2_7k), this), 7 /* data width */, address_map_constructor(FUNC(sm510_device::data_96_32x4), this))
+{ }
// disasm
diff --git a/src/devices/cpu/sm510/sm510d.cpp b/src/devices/cpu/sm510/sm510d.cpp
index 5f107babd4c..2525d5a3670 100644
--- a/src/devices/cpu/sm510/sm510d.cpp
+++ b/src/devices/cpu/sm510/sm510d.cpp
@@ -9,6 +9,40 @@
#include "emu.h"
#include "sm510d.h"
+// constructor
+
+sm510_common_disassembler::sm510_common_disassembler()
+{
+ // init 6-bit lfsr pc lut
+ for (u32 i = 0, pc = 0; i < 0x3f; i++)
+ {
+ m_l2r6[i] = pc;
+ m_r2l6[pc] = i;
+ pc = increment_pc(pc, 6);
+ }
+
+ m_l2r6[0x3f] = 0x3f;
+ m_r2l6[0x3f] = 0x3f;
+
+ // init 7-bit lfsr pc lut
+ for (u32 i = 0, pc = 0; i < 0x7f; i++)
+ {
+ m_l2r7[i] = pc;
+ m_r2l7[pc] = i;
+ pc = increment_pc(pc, 7);
+ }
+
+ m_l2r7[0x7f] = 0x7f;
+ m_r2l7[0x7f] = 0x7f;
+}
+
+offs_t sm510_common_disassembler::increment_pc(offs_t pc, u8 pclen)
+{
+ u32 feed = ((pc >> 1 ^ pc) & 1) ? 0 : (1 << (pclen - 1));
+ u32 mask = (1 << pclen) - 1;
+ return feed | (pc >> 1 & (mask >> 1)) | (pc & ~mask);
+}
+
// common lookup tables
@@ -127,18 +161,7 @@ offs_t sm510_common_disassembler::common_disasm(const u8 *lut_mnemonic, const u8
u16 param = mask;
if (bits >= 8)
{
- if (pclen == 6)
- {
- int feed = ((pc >> 1 ^ pc) & 1) ? 0 : 0x20;
- pc = feed | (pc >> 1 & 0x1f) | (pc & ~0x3f);
- }
- else if (pclen == 7)
- {
- int feed = ((pc >> 1 ^ pc) & 1) ? 0 : 0x40;
- pc = feed | (pc >> 1 & 0x3f) | (pc & ~0x7f);
- }
- else
- abort();
+ pc = increment_pc(pc, pclen);
param = params.r8(pc);
len++;
}
@@ -391,63 +414,7 @@ const u8 sm590_disassembler::sm590_mnemonic[0x100] =
mTR7, mTR7, mTR7, mTR7, mTR7, mTR7, mTR7, mTR7, mTR7, mTR7, mTR7, mTR7, mTR7, mTR7, mTR7, mTR7 // F
};
-
offs_t sm590_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params)
{
return common_disasm(sm590_mnemonic, nullptr, stream, pc, opcodes, params, 7);
}
-
-
-// Sarayan's little helpers
-
-offs_t sm510_common_disassembler::pc_linear_to_real(offs_t pc) const
-{
- static const u8 l2r[64] = {
- 0x00, 0x20, 0x30, 0x38, 0x3c, 0x3e, 0x1f, 0x2f, 0x37, 0x3b, 0x3d, 0x1e, 0x0f, 0x27, 0x33, 0x39,
- 0x1c, 0x2e, 0x17, 0x2b, 0x35, 0x1a, 0x0d, 0x06, 0x03, 0x21, 0x10, 0x28, 0x34, 0x3a, 0x1d, 0x0e,
- 0x07, 0x23, 0x31, 0x18, 0x2c, 0x36, 0x1b, 0x2d, 0x16, 0x0b, 0x25, 0x12, 0x09, 0x04, 0x22, 0x11,
- 0x08, 0x24, 0x32, 0x19, 0x0c, 0x26, 0x13, 0x29, 0x14, 0x2a, 0x15, 0x0a, 0x05, 0x02, 0x01, 0x3f,
- };
- return (pc & ~0x3f) | l2r[pc & 0x3f];
-}
-
-offs_t sm510_common_disassembler::pc_real_to_linear(offs_t pc) const
-{
- static const u8 r2l[64] = {
- 0x00, 0x3e, 0x3d, 0x18, 0x2d, 0x3c, 0x17, 0x20, 0x30, 0x2c, 0x3b, 0x29, 0x34, 0x16, 0x1f, 0x0c,
- 0x1a, 0x2f, 0x2b, 0x36, 0x38, 0x3a, 0x28, 0x12, 0x23, 0x33, 0x15, 0x26, 0x10, 0x1e, 0x0b, 0x06,
- 0x01, 0x19, 0x2e, 0x21, 0x31, 0x2a, 0x35, 0x0d, 0x1b, 0x37, 0x39, 0x13, 0x24, 0x27, 0x11, 0x07,
- 0x02, 0x22, 0x32, 0x0e, 0x1c, 0x14, 0x25, 0x08, 0x03, 0x0f, 0x1d, 0x09, 0x04, 0x0a, 0x05, 0x3f,
- };
- return (pc & ~0x3f) | r2l[pc & 0x3f];
-}
-
-offs_t sm590_disassembler::pc_linear_to_real(offs_t pc) const
-{
- static const u8 l2r[128] = {
- 0x00, 0x40, 0x60, 0x70, 0x78, 0x7c, 0x7e, 0x3f, 0x5f, 0x6f, 0x77, 0x7b, 0x7d, 0x3e, 0x1f, 0x4f,
- 0x67, 0x73, 0x79, 0x3c, 0x5e, 0x2f, 0x57, 0x6b, 0x75, 0x3a, 0x1d, 0x0e, 0x07, 0x43, 0x61, 0x30,
- 0x58, 0x6c, 0x76, 0x3b, 0x5d, 0x2e, 0x17, 0x4b, 0x65, 0x32, 0x19, 0x0c, 0x46, 0x23, 0x51, 0x28,
- 0x54, 0x6a, 0x35, 0x1a, 0x0d, 0x06, 0x03, 0x41, 0x20, 0x50, 0x68, 0x74, 0x7a, 0x3d, 0x1e, 0x0f,
- 0x47, 0x63, 0x71, 0x38, 0x5c, 0x6e, 0x37, 0x5b, 0x6d, 0x36, 0x1b, 0x4d, 0x26, 0x13, 0x49, 0x24,
- 0x52, 0x29, 0x14, 0x4a, 0x25, 0x12, 0x09, 0x04, 0x42, 0x21, 0x10, 0x48, 0x64, 0x72, 0x39, 0x1c,
- 0x4e, 0x27, 0x53, 0x69, 0x34, 0x5a, 0x2d, 0x16, 0x0b, 0x45, 0x22, 0x11, 0x08, 0x44, 0x62, 0x31,
- 0x18, 0x4c, 0x66, 0x33, 0x59, 0x2c, 0x56, 0x2b, 0x55, 0x2a, 0x15, 0x0a, 0x05, 0x02, 0x01, 0x7f,
- };
- return (pc & ~0x7f) | l2r[pc & 0x7f];
-}
-
-offs_t sm590_disassembler::pc_real_to_linear(offs_t pc) const
-{
- static const u8 r2l[128] = {
- 0x00, 0x7e, 0x7d, 0x36, 0x57, 0x7c, 0x35, 0x1c, 0x6c, 0x56, 0x7b, 0x68, 0x2b, 0x34, 0x1b, 0x3f,
- 0x5a, 0x6b, 0x55, 0x4d, 0x52, 0x7a, 0x67, 0x26, 0x70, 0x2a, 0x33, 0x4a, 0x5f, 0x1a, 0x3e, 0x0e,
- 0x38, 0x59, 0x6a, 0x2d, 0x4f, 0x54, 0x4c, 0x61, 0x2f, 0x51, 0x79, 0x77, 0x75, 0x66, 0x25, 0x15,
- 0x1f, 0x6f, 0x29, 0x73, 0x64, 0x32, 0x49, 0x46, 0x43, 0x5e, 0x19, 0x23, 0x13, 0x3d, 0x0d, 0x07,
- 0x01, 0x37, 0x58, 0x1d, 0x6d, 0x69, 0x2c, 0x40, 0x5b, 0x4e, 0x53, 0x27, 0x71, 0x4b, 0x60, 0x0f,
- 0x39, 0x2e, 0x50, 0x62, 0x30, 0x78, 0x76, 0x16, 0x20, 0x74, 0x65, 0x47, 0x44, 0x24, 0x14, 0x08,
- 0x02, 0x1e, 0x6e, 0x41, 0x5c, 0x28, 0x72, 0x10, 0x3a, 0x63, 0x31, 0x17, 0x21, 0x48, 0x45, 0x09,
- 0x03, 0x42, 0x5d, 0x11, 0x3b, 0x18, 0x22, 0x0a, 0x04, 0x12, 0x3c, 0x0b, 0x05, 0x0c, 0x06, 0x7f,
- };
- return (pc & ~0x7f) | r2l[pc & 0x7f];
-}
diff --git a/src/devices/cpu/sm510/sm510d.h b/src/devices/cpu/sm510/sm510d.h
index a29a1f201a0..258d8205617 100644
--- a/src/devices/cpu/sm510/sm510d.h
+++ b/src/devices/cpu/sm510/sm510d.h
@@ -14,15 +14,15 @@
class sm510_common_disassembler : public util::disasm_interface
{
public:
- sm510_common_disassembler() = default;
+ sm510_common_disassembler();
virtual ~sm510_common_disassembler() = default;
virtual u32 opcode_alignment() const override { return 1; }
virtual u32 interface_flags() const override { return NONLINEAR_PC | PAGED2LEVEL; }
virtual u32 page_address_bits() const override { return 6; }
virtual u32 page2_address_bits() const override { return 4; }
- virtual offs_t pc_linear_to_real(offs_t pc) const override;
- virtual offs_t pc_real_to_linear(offs_t pc) const override;
+ virtual offs_t pc_linear_to_real(offs_t pc) const override { return (pc & ~0x3f) | m_l2r6[pc & 0x3f]; }
+ virtual offs_t pc_real_to_linear(offs_t pc) const override { return (pc & ~0x3f) | m_r2l6[pc & 0x3f]; }
protected:
enum e_mnemonics
@@ -62,6 +62,12 @@ protected:
static const u8 s_bits[];
static const u32 s_flags[];
+ u8 m_l2r6[0x40];
+ u8 m_r2l6[0x40];
+ u8 m_l2r7[0x80];
+ u8 m_r2l7[0x80];
+
+ offs_t increment_pc(offs_t pc, u8 pclen);
offs_t common_disasm(const u8 *lut_mnemonic, const u8 *lut_extended, std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params, const u8 pclen);
};
@@ -125,6 +131,8 @@ public:
virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params) override;
+ virtual u32 interface_flags() const override { return NONLINEAR_PC | PAGED; }
+
private:
static const u8 sm530_mnemonic[0x100];
};
@@ -139,8 +147,8 @@ public:
virtual u32 page_address_bits() const override { return 7; }
virtual u32 page2_address_bits() const override { return 2; }
- virtual offs_t pc_linear_to_real(offs_t pc) const override;
- virtual offs_t pc_real_to_linear(offs_t pc) const override;
+ virtual offs_t pc_linear_to_real(offs_t pc) const override { return (pc & ~0x7f) | m_l2r7[pc & 0x7f]; }
+ virtual offs_t pc_real_to_linear(offs_t pc) const override { return (pc & ~0x7f) | m_r2l7[pc & 0x7f]; }
private:
static const u8 sm590_mnemonic[0x100];
diff --git a/src/devices/cpu/sm510/sm510op.cpp b/src/devices/cpu/sm510/sm510op.cpp
index 654ce20a5d2..acaf607f9df 100644
--- a/src/devices/cpu/sm510/sm510op.cpp
+++ b/src/devices/cpu/sm510/sm510op.cpp
@@ -11,15 +11,17 @@
u8 sm510_base_device::ram_r()
{
+ int blh = (m_sbl) ? 8 : 0; // from SBL (optional)
int bmh = (m_sbm) ? (1 << (m_datawidth-1)) : 0; // from SBM
- u8 address = (bmh | m_bm << 4 | m_bl) & m_datamask;
+ u8 address = (bmh | blh | m_bm << 4 | m_bl) & m_datamask;
return m_data->read_byte(address) & 0xf;
}
void sm510_base_device::ram_w(u8 data)
{
+ int blh = (m_sbl) ? 8 : 0; // from SBL (optional)
int bmh = (m_sbm) ? (1 << (m_datawidth-1)) : 0; // from SBM
- u8 address = (bmh | m_bm << 4 | m_bl) & m_datamask;
+ u8 address = (bmh | blh | m_bm << 4 | m_bl) & m_datamask;
m_data->write_byte(address, data & 0xf);
}
@@ -40,7 +42,7 @@ void sm510_base_device::push_stack()
void sm510_base_device::do_branch(u8 pu, u8 pm, u8 pl)
{
// set new PC(Pu/Pm/Pl)
- m_pc = ((pu << 10 & 0xc00) | (pm << 6 & 0x3c0) | (pl & 0x03f)) & m_prgmask;
+ m_pc = ((pu << 10) | (pm << 6 & 0x3c0) | (pl & 0x03f)) & m_prgmask;
}
u8 sm510_base_device::bitmask(u16 param)
@@ -69,6 +71,11 @@ void sm510_base_device::op_lbl()
m_bm = (m_param & m_datamask) >> 4;
}
+void sm510_base_device::op_sbl()
+{
+ // SBL: set BL high bit for next opcode - handled in execute_one()
+}
+
void sm510_base_device::op_sbm()
{
// SBM: set BM high bit for next opcode - handled in execute_one()
@@ -139,7 +146,7 @@ void sm510_base_device::op_tml()
void sm510_base_device::op_tm()
{
- // TM x: indirect subroutine call, pointers(IDX) are in page 0
+ // TM x: indirect subroutine call, pointers(IDX) are on page 0
m_icount--;
push_stack();
u8 idx = m_program->read_byte(m_op & 0x3f);
@@ -225,7 +232,7 @@ void sm510_base_device::op_kta()
void sm510_base_device::op_atbp()
{
// ATBP: output ACC to BP(internal LCD backplate signal)
- m_bp = ((m_acc & 1) != 0);
+ m_bp = m_acc & 1;
}
void sm510_base_device::op_atx()
diff --git a/src/devices/cpu/sm510/sm511core.cpp b/src/devices/cpu/sm510/sm511core.cpp
index 6585f18febf..c7a26de07e2 100644
--- a/src/devices/cpu/sm510/sm511core.cpp
+++ b/src/devices/cpu/sm510/sm511core.cpp
@@ -54,20 +54,17 @@ std::unique_ptr<util::disasm_interface> sm511_device::create_disassembler()
// device definitions
-sm511_device::sm511_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : sm511_device(mconfig, SM511, tag, owner, clock, 2 /* stack levels */, 12 /* prg width */, address_map_constructor(FUNC(sm511_device::program_4k), this), 7 /* data width */, address_map_constructor(FUNC(sm511_device::data_96_32x4), this))
-{
-}
+sm511_device::sm511_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ sm511_device(mconfig, SM511, tag, owner, clock, 2 /* stack levels */, 12 /* prg width */, address_map_constructor(FUNC(sm511_device::program_4k), this), 7 /* data width */, address_map_constructor(FUNC(sm511_device::data_96_32x4), this))
+{ }
-sm511_device::sm511_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data)
- : sm510_base_device(mconfig, type, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data)
-{
-}
+sm511_device::sm511_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) :
+ sm510_base_device(mconfig, type, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data)
+{ }
-sm512_device::sm512_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : sm511_device(mconfig, SM512, tag, owner, clock, 2, 12, address_map_constructor(FUNC(sm512_device::program_4k), this), 7, address_map_constructor(FUNC(sm512_device::data_80_48x4), this))
-{
-}
+sm512_device::sm512_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ sm511_device(mconfig, SM512, tag, owner, clock, 2, 12, address_map_constructor(FUNC(sm512_device::program_4k), this), 7, address_map_constructor(FUNC(sm512_device::data_80_48x4), this))
+{ }
diff --git a/src/devices/cpu/sm510/sm530.h b/src/devices/cpu/sm510/sm530.h
index 64e03884481..8837ea1e2cd 100644
--- a/src/devices/cpu/sm510/sm530.h
+++ b/src/devices/cpu/sm510/sm530.h
@@ -25,14 +25,30 @@ protected:
void program_2k(address_map &map);
void data_64_24x4(address_map &map);
+ virtual void device_start() override;
virtual void device_reset() override;
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
+ virtual u64 execute_clocks_to_cycles(u64 clocks) const override { return (clocks + 3 - 1) / 3; } // 3 cycles per machine cycle
+ virtual u64 execute_cycles_to_clocks(u64 cycles) const override { return (cycles * 3); } // "
virtual void execute_one() override;
virtual void get_opcode_param() override;
- virtual u8 ram_r() override;
- virtual void ram_w(u8 data) override;
+ using sm510_base_device::do_branch;
+ virtual void do_branch(u8 pu, u8 pl); // does not have Pm
+ virtual void reset_vector() override { do_branch(0xf, 0); }
+ virtual void wakeup_vector() override { reset_vector(); }
+
+ // opcode handlers
+ virtual void op_lb() override;
+ virtual void op_incb() override;
+
+ virtual void op_tl() override;
+ virtual void op_trs();
+
+ virtual void op_adx() override;
+
+ virtual void op_atbp() override;
};
class sm531_device : public sm530_device
diff --git a/src/devices/cpu/sm510/sm530core.cpp b/src/devices/cpu/sm510/sm530core.cpp
index 1a1b00b392f..3d3a424ad90 100644
--- a/src/devices/cpu/sm510/sm530core.cpp
+++ b/src/devices/cpu/sm510/sm530core.cpp
@@ -5,7 +5,7 @@
Sharp SM530 MCU core implementation
TODO:
- - everything
+ - almost everything
*/
@@ -29,8 +29,8 @@ void sm530_device::program_2k(address_map &map)
void sm530_device::data_64_24x4(address_map &map)
{
map(0x00, 0x3f).ram();
- map(0x40, 0x4b).ram();
- map(0x50, 0x5b).ram();
+ map(0x40, 0x4b).mirror(0x20).ram().share("lcd_ram_a");
+ map(0x50, 0x5b).mirror(0x20).ram().share("lcd_ram_b");
}
@@ -42,19 +42,28 @@ std::unique_ptr<util::disasm_interface> sm530_device::create_disassembler()
// device definitions
-sm530_device::sm530_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : sm530_device(mconfig, SM530, tag, owner, clock, 1 /* stack levels */, 11 /* prg width */, address_map_constructor(FUNC(sm530_device::program_2k), this), 7 /* data width */, address_map_constructor(FUNC(sm530_device::data_64_24x4), this))
-{
-}
+sm530_device::sm530_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ sm530_device(mconfig, SM530, tag, owner, clock, 1 /* stack levels */, 11 /* prg width */, address_map_constructor(FUNC(sm530_device::program_2k), this), 7 /* data width */, address_map_constructor(FUNC(sm530_device::data_64_24x4), this))
+{ }
-sm530_device::sm530_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data)
- : sm511_device(mconfig, type, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data)
-{
-}
+sm530_device::sm530_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) :
+ sm511_device(mconfig, type, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data)
+{ }
+
+sm531_device::sm531_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ sm530_device(mconfig, SM531, tag, owner, clock, 1, 11, address_map_constructor(FUNC(sm531_device::program_2k), this), 7, address_map_constructor(FUNC(sm531_device::data_64_24x4), this))
+{ }
+
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
-sm531_device::sm531_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : sm530_device(mconfig, SM531, tag, owner, clock, 1, 11, address_map_constructor(FUNC(sm531_device::program_2k), this), 7, address_map_constructor(FUNC(sm531_device::data_64_24x4), this))
+void sm530_device::device_start()
{
+ // common init
+ sm511_device::device_start();
}
@@ -65,7 +74,8 @@ sm531_device::sm531_device(const machine_config &mconfig, const char *tag, devic
void sm530_device::device_reset()
{
- sm510_base_device::device_reset();
+ // common reset
+ sm511_device::device_reset();
}
@@ -76,8 +86,91 @@ void sm530_device::device_reset()
void sm530_device::get_opcode_param()
{
+ // LBL, PRE, TL opcodes are 2 bytes
+ if (m_op == 0x6b || m_op == 0x78 || ((m_op & 0xf8) == 0x60))
+ {
+ m_icount--;
+ m_param = m_program->read_byte(m_pc);
+ increment_pc();
+ }
}
void sm530_device::execute_one()
{
+ switch (m_op & 0xf0)
+ {
+ case 0x00: op_adx(); break;
+ case 0x10: op_lax(); break;
+ case 0x30: op_lb(); break;
+
+ case 0x80: case 0x90: case 0xa0: case 0xb0:
+ op_t(); break; // TR
+ case 0xc0: case 0xd0: case 0xe0: case 0xf0:
+ op_trs(); break;
+
+ default:
+ switch (m_op & 0xfc)
+ {
+ case 0x20: op_lda(); break;
+ case 0x24: op_exc(); break;
+ case 0x28: op_exci(); break;
+ case 0x2c: op_excd(); break;
+ case 0x40: op_rm(); break;
+ case 0x44: op_sm(); break;
+ case 0x48: op_tmi(); break; // TM
+ case 0x60: case 0x64: op_tl(); break;
+ //case 0x6c: op_tg(); break;
+
+ default:
+ switch (m_op)
+ {
+ case 0x4c: op_incb(); break;
+ case 0x4d: op_decb(); break;
+ //case 0x4e: op_rds(); break;
+ //case 0x4f: op_sds(); break;
+
+ case 0x50: op_kta(); break;
+ //case 0x51: op_keta(); break;
+ //case 0x52: op_dta(); break;
+ case 0x53: op_coma(); break;
+ case 0x54: op_add(); break;
+ case 0x55: op_add11(); break; // ADDC
+ case 0x56: op_rc(); break;
+ case 0x57: op_sc(); break;
+ case 0x58: op_tabl(); break;
+ case 0x59: op_tam(); break;
+ case 0x5a: op_exbla(); break; // EXBL
+ case 0x5b: op_tc(); break;
+ //case 0x5c: op_ats(); break;
+ //case 0x5d: op_atf(); break;
+ case 0x5e: op_atbp(); break;
+
+ case 0x68: op_rtn0(); break; // RTN
+ case 0x69: op_rtn1(); break; // RTNS
+ case 0x6a: op_atpl(); break;
+ case 0x6b: op_lbl(); break;
+
+ //case 0x70: op_idiv(); break;
+ //case 0x71: op_inis(); break;
+ case 0x72: op_sbm(); break; // SABM
+ case 0x73: op_sbl(); break; // SABL
+ case 0x74: op_cend(); break;
+ case 0x75: op_tmel(); break;
+ case 0x76: op_rme(); break;
+ case 0x77: op_sme(); break;
+ case 0x78: op_pre(); break;
+ case 0x79: op_tal(); break; // TBA
+
+ default: op_illegal(); break;
+ }
+ break; // 0xff
+
+ }
+ break; // 0xfc
+
+ } // big switch
+
+ // SABL/SABM is only valid for 1 step
+ m_sbl = (m_op == 0x73);
+ m_sbm = (m_op == 0x72);
}
diff --git a/src/devices/cpu/sm510/sm530op.cpp b/src/devices/cpu/sm510/sm530op.cpp
index 256feccdb4b..3aec192b0a0 100644
--- a/src/devices/cpu/sm510/sm530op.cpp
+++ b/src/devices/cpu/sm510/sm530op.cpp
@@ -9,15 +9,66 @@
// internal helpers
-u8 sm530_device::ram_r()
+void sm530_device::do_branch(u8 pu, u8 pl)
{
- return 0;
+ // set new PC(Pu/Pl)
+ m_pc = ((pu << 6) | (pl & 0x3f)) & m_prgmask;
}
-void sm530_device::ram_w(u8 data)
+
+
+// instruction set
+
+// RAM address instructions
+
+void sm530_device::op_lb()
+{
+ // LB x: load BM/BL with 4-bit immediate value (partial)
+ m_bl = (m_op << 2 & 8) | (m_op & 1) | 6;
+ m_bm = m_op >> 2 & 3;
+}
+
+void sm530_device::op_incb()
{
+ // INCB: increment BL, but overflow on 3rd bit!
+ sm510_base_device::op_incb();
+ m_skip = (m_bl == 8);
}
+// ROM address instructions
-// instruction set
+void sm530_device::op_tl()
+{
+ // TL xy: long jump
+ do_branch((m_op << 2) | (m_param >> 6 & 3), m_param & 0x3f);
+}
+
+void sm530_device::op_trs()
+{
+ // TRS x: indirect subroutine call, jump vectors are on page 14
+ m_icount--;
+ push_stack();
+ u8 jump = m_program->read_byte((14 << 6) | (m_op & 0x3f));
+ do_branch(jump >> 5 & 7, jump & 0x1f);
+}
+
+
+// Arithmetic instructions
+
+void sm530_device::op_adx()
+{
+ // ADX x: add immediate value to ACC, skip next on carry
+ m_acc += (m_op & 0xf);
+ m_skip = bool(m_acc & 0x10);
+ m_acc &= 0xf;
+}
+
+
+// I/O instructions
+
+void sm530_device::op_atbp()
+{
+ // ATBP: output ACC to BP
+ m_bp = m_acc;
+}
diff --git a/src/devices/cpu/sm510/sm590core.cpp b/src/devices/cpu/sm510/sm590core.cpp
index 8086732ac23..54e4267d7de 100644
--- a/src/devices/cpu/sm510/sm590core.cpp
+++ b/src/devices/cpu/sm510/sm590core.cpp
@@ -35,25 +35,21 @@ void sm590_device::data_16x2x4(address_map &map)
}
// device definitions
-sm590_device::sm590_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : sm590_device(mconfig, SM590, tag, owner, clock, 4 /* stack levels */, 9 /* prg width */, address_map_constructor(FUNC(sm590_device::program_1x128x4), this), 5 /* data width */, address_map_constructor(FUNC(sm590_device::data_16x2x4), this))
-{
-}
+sm590_device::sm590_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ sm590_device(mconfig, SM590, tag, owner, clock, 4 /* stack levels */, 9 /* prg width */, address_map_constructor(FUNC(sm590_device::program_1x128x4), this), 5 /* data width */, address_map_constructor(FUNC(sm590_device::data_16x2x4), this))
+{ }
-//sm591_device::sm591_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
-// : sm510_base_device(mconfig, SM591, tag, owner, clock, 4 /* stack levels */, 10 /* prg width */, address_map_constructor(FUNC(sm591_device::program_2x128x4), this), 6 /* data width */, address_map_constructor(FUNC(sm591_device::data_16x3.5x4), this))
-//{
-//}
+//sm591_device::sm591_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+// sm510_base_device(mconfig, SM591, tag, owner, clock, 4 /* stack levels */, 10 /* prg width */, address_map_constructor(FUNC(sm591_device::program_2x128x4), this), 6 /* data width */, address_map_constructor(FUNC(sm591_device::data_16x3.5x4), this))
+//{ }
-//sm595_device::sm595_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
-// : sm510_base_device(mconfig, SM595, tag, owner, clock, 4 /* stack levels */, 10 /* prg width */, address_map_constructor(FUNC(sm595_device::program_1x128x4_1x128x2), this), 5 /* data width */, address_map_constructor(FUNC(sm595_device::data_16x2x4), this))
-//{
-//}
+//sm595_device::sm595_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+// sm510_base_device(mconfig, SM595, tag, owner, clock, 4 /* stack levels */, 10 /* prg width */, address_map_constructor(FUNC(sm595_device::program_1x128x4_1x128x2), this), 5 /* data width */, address_map_constructor(FUNC(sm595_device::data_16x2x4), this))
+//{ }
-sm590_device::sm590_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data)
- : sm510_base_device(mconfig, type, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data)
-{
-}
+sm590_device::sm590_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) :
+ sm510_base_device(mconfig, type, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data)
+{ }
std::unique_ptr<util::disasm_interface> sm590_device::create_disassembler()
diff --git a/src/devices/cpu/sm510/sm590op.cpp b/src/devices/cpu/sm510/sm590op.cpp
index 99b1c7189b7..c9ead123360 100644
--- a/src/devices/cpu/sm510/sm590op.cpp
+++ b/src/devices/cpu/sm510/sm590op.cpp
@@ -8,6 +8,7 @@
// internal helpers
+
void sm590_device::do_branch(u8 pu, u8 pm, u8 pl)
{
// set new PC(Pu/Pm/Pl)
diff --git a/src/devices/cpu/sm510/sm5acore.cpp b/src/devices/cpu/sm510/sm5acore.cpp
index d32f46a24bf..a48ffb8110d 100644
--- a/src/devices/cpu/sm510/sm5acore.cpp
+++ b/src/devices/cpu/sm510/sm5acore.cpp
@@ -44,25 +44,21 @@ void sm5a_device::data_5x13x4(address_map &map)
// device definitions
-sm5a_device::sm5a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : sm5a_device(mconfig, SM5A, tag, owner, clock, 1 /* stack levels */, 9 /* o group pins */, 11 /* prg width */, address_map_constructor(FUNC(sm5a_device::program_1_8k), this), 7 /* data width */, address_map_constructor(FUNC(sm5a_device::data_5x13x4), this))
-{
-}
+sm5a_device::sm5a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ sm5a_device(mconfig, SM5A, tag, owner, clock, 1 /* stack levels */, 9 /* o group pins */, 11 /* prg width */, address_map_constructor(FUNC(sm5a_device::program_1_8k), this), 7 /* data width */, address_map_constructor(FUNC(sm5a_device::data_5x13x4), this))
+{ }
-sm5a_device::sm5a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int o_pins, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data)
- : sm500_device(mconfig, type, tag, owner, clock, stack_levels, o_pins, prgwidth, program, datawidth, data)
-{
-}
+sm5a_device::sm5a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int o_pins, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) :
+ sm500_device(mconfig, type, tag, owner, clock, stack_levels, o_pins, prgwidth, program, datawidth, data)
+{ }
-sm5l_device::sm5l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : sm5a_device(mconfig, SM5L, tag, owner, clock, 1, 9, 11, address_map_constructor(FUNC(sm5l_device::program_1_8k), this), 7, address_map_constructor(FUNC(sm5l_device::data_5x13x4), this))
-{
-}
+sm5l_device::sm5l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ sm5a_device(mconfig, SM5L, tag, owner, clock, 1, 9, 11, address_map_constructor(FUNC(sm5l_device::program_1_8k), this), 7, address_map_constructor(FUNC(sm5l_device::data_5x13x4), this))
+{ }
-kb1013vk12_device::kb1013vk12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : sm5a_device(mconfig, KB1013VK12, tag, owner, clock, 1, 9, 11, address_map_constructor(FUNC(kb1013vk12_device::program_1_8k), this), 7, address_map_constructor(FUNC(kb1013vk12_device::data_5x13x4), this))
-{
-}
+kb1013vk12_device::kb1013vk12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ sm5a_device(mconfig, KB1013VK12, tag, owner, clock, 1, 9, 11, address_map_constructor(FUNC(kb1013vk12_device::program_1_8k), this), 7, address_map_constructor(FUNC(kb1013vk12_device::data_5x13x4), this))
+{ }
// disasm
diff --git a/src/devices/cpu/tms1000/tms1k_dasm.cpp b/src/devices/cpu/tms1000/tms1k_dasm.cpp
index 1cd05a57ab3..af1af973697 100644
--- a/src/devices/cpu/tms1000/tms1k_dasm.cpp
+++ b/src/devices/cpu/tms1000/tms1k_dasm.cpp
@@ -9,6 +9,65 @@
#include "emu.h"
#include "tms1k_dasm.h"
+// constructor
+
+tms1000_base_disassembler::tms1000_base_disassembler(const u8 *lut_mnemonic, bool opcode_9bits, int pc_bits) :
+ m_lut_mnemonic(lut_mnemonic),
+ m_opcode_9bits(opcode_9bits),
+ m_pc_bits(pc_bits)
+{
+ // init lfsr pc lut
+ const u32 len = 1 << pc_bits;
+ m_l2r = std::make_unique<u8[]>(len);
+ m_r2l = std::make_unique<u8[]>(len);
+
+ for (u32 i = 0, pc = 0; i < len; i++)
+ {
+ m_l2r[i] = pc;
+ m_r2l[pc] = i;
+
+ // see tms1k_base_device::next_pc()
+ u32 mask = (1 << pc_bits) - 1;
+ u32 high = 1 << (pc_bits - 1);
+ u32 fb = (pc << 1 & high) == (pc & high);
+
+ if (pc == (mask >> 1))
+ fb = 1;
+ else if (pc == mask)
+ fb = 0;
+
+ pc = (pc << 1 | fb) & mask;
+ }
+}
+
+tms1000_disassembler::tms1000_disassembler() : tms1000_base_disassembler(tms1000_mnemonic, false, 6)
+{ }
+
+tms1100_disassembler::tms1100_disassembler() : tms1000_base_disassembler(tms1100_mnemonic, false, 6)
+{ }
+
+tms0980_disassembler::tms0980_disassembler() : tms1000_base_disassembler(tms0980_mnemonic, true, 7)
+{ }
+
+tp0320_disassembler::tp0320_disassembler() : tms1000_base_disassembler(tp0320_mnemonic, true, 7)
+{ }
+
+
+offs_t tms1000_base_disassembler::pc_linear_to_real(offs_t pc) const
+{
+ const u32 mask = (1 << m_pc_bits) - 1;
+ return (pc & ~mask) | m_l2r[pc & mask];
+}
+
+offs_t tms1000_base_disassembler::pc_real_to_linear(offs_t pc) const
+{
+ const u32 mask = (1 << m_pc_bits) - 1;
+ return (pc & ~mask) | m_r2l[pc & mask];
+}
+
+
+// common lookup tables
+
const char *const tms1000_base_disassembler::s_mnemonic[] =
{
"?",
@@ -46,7 +105,6 @@ const u8 tms1000_base_disassembler::s_addressing[] =
};
-
// opcode luts
const u8 tms1000_disassembler::tms1000_mnemonic[256] =
@@ -72,7 +130,6 @@ const u8 tms1000_disassembler::tms1000_mnemonic[256] =
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
};
-
const u8 tms1100_disassembler::tms1100_mnemonic[256] =
{
/* 0x00 */
@@ -96,7 +153,6 @@ const u8 tms1100_disassembler::tms1100_mnemonic[256] =
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
};
-
const u8 tms0980_disassembler::tms0980_mnemonic[512] =
{
/* 0x000 */
@@ -138,7 +194,6 @@ const u8 tms0980_disassembler::tms0980_mnemonic[512] =
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
};
-
const u8 tp0320_disassembler::tp0320_mnemonic[512] =
{
/* 0x000 */
@@ -181,7 +236,6 @@ const u8 tp0320_disassembler::tp0320_mnemonic[512] =
};
-
// disasm
const u8 tms1000_base_disassembler::i2_value[4] =
@@ -227,82 +281,3 @@ offs_t tms1000_base_disassembler::disassemble(std::ostream &stream, offs_t pc, c
return 1 | s_flags[instr] | SUPPORTED;
}
-
-tms1000_disassembler::tms1000_disassembler() : tms1000_base_disassembler(tms1000_mnemonic, false, 6)
-{
-}
-
-tms1100_disassembler::tms1100_disassembler() : tms1000_base_disassembler(tms1100_mnemonic, false, 6)
-{
-}
-
-tms0980_disassembler::tms0980_disassembler() : tms1000_base_disassembler(tms0980_mnemonic, true, 7)
-{
-}
-
-tp0320_disassembler::tp0320_disassembler() : tms1000_base_disassembler(tp0320_mnemonic, true, 7)
-{
-}
-
-tms1000_base_disassembler::tms1000_base_disassembler(const u8 *lut_mnemonic, bool opcode_9bits, int pc_bits) : m_lut_mnemonic(lut_mnemonic), m_opcode_9bits(opcode_9bits), m_pc_bits(pc_bits)
-{
-}
-
-offs_t tms1000_base_disassembler::pc_linear_to_real(offs_t pc) const
-{
- switch(m_pc_bits) {
- case 6: {
- static const u8 l2r6[64] = {
- 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x3e, 0x3d, 0x3b, 0x37, 0x2f, 0x1e, 0x3c, 0x39, 0x33,
- 0x27, 0x0e, 0x1d, 0x3a, 0x35, 0x2b, 0x16, 0x2c, 0x18, 0x30, 0x21, 0x02, 0x05, 0x0b, 0x17, 0x2e,
- 0x1c, 0x38, 0x31, 0x23, 0x06, 0x0d, 0x1b, 0x36, 0x2d, 0x1a, 0x34, 0x29, 0x12, 0x24, 0x08, 0x11,
- 0x22, 0x04, 0x09, 0x13, 0x26, 0x0c, 0x19, 0x32, 0x25, 0x0a, 0x15, 0x2a, 0x14, 0x28, 0x10, 0x20,
- };
- return (pc & ~0x3f) | l2r6[pc & 0x3f];
- }
- case 7: {
- static const u8 l2r7[128] = {
- 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0x7e, 0x7d, 0x7b, 0x77, 0x6f, 0x5f, 0x3e, 0x7c,
- 0x79, 0x73, 0x67, 0x4f, 0x1e, 0x3d, 0x7a, 0x75, 0x6b, 0x57, 0x2e, 0x5c, 0x38, 0x70, 0x61, 0x43,
- 0x06, 0x0d, 0x1b, 0x37, 0x6e, 0x5d, 0x3a, 0x74, 0x69, 0x53, 0x26, 0x4c, 0x18, 0x31, 0x62, 0x45,
- 0x0a, 0x15, 0x2b, 0x56, 0x2c, 0x58, 0x30, 0x60, 0x41, 0x02, 0x05, 0x0b, 0x17, 0x2f, 0x5e, 0x3c,
- 0x78, 0x71, 0x63, 0x47, 0x0e, 0x1d, 0x3b, 0x76, 0x6d, 0x5b, 0x36, 0x6c, 0x59, 0x32, 0x64, 0x49,
- 0x12, 0x25, 0x4a, 0x14, 0x29, 0x52, 0x24, 0x48, 0x10, 0x21, 0x42, 0x04, 0x09, 0x13, 0x27, 0x4e,
- 0x1c, 0x39, 0x72, 0x65, 0x4b, 0x16, 0x2d, 0x5a, 0x34, 0x68, 0x51, 0x22, 0x44, 0x08, 0x11, 0x23,
- 0x46, 0x0c, 0x19, 0x33, 0x66, 0x4d, 0x1a, 0x35, 0x6a, 0x55, 0x2a, 0x54, 0x28, 0x50, 0x20, 0x40,
- };
- return (pc & ~0x7f) | l2r7[pc & 0x7f];
- }
- }
- return 0;
-}
-
-offs_t tms1000_base_disassembler::pc_real_to_linear(offs_t pc) const
-{
- switch(m_pc_bits) {
- case 6: {
- static const u8 r2l6[64] = {
- 0x00, 0x01, 0x1b, 0x02, 0x31, 0x1c, 0x24, 0x03, 0x2e, 0x32, 0x39, 0x1d, 0x35, 0x25, 0x11, 0x04,
- 0x3e, 0x2f, 0x2c, 0x33, 0x3c, 0x3a, 0x16, 0x1e, 0x18, 0x36, 0x29, 0x26, 0x20, 0x12, 0x0c, 0x05,
- 0x3f, 0x1a, 0x30, 0x23, 0x2d, 0x38, 0x34, 0x10, 0x3d, 0x2b, 0x3b, 0x15, 0x17, 0x28, 0x1f, 0x0b,
- 0x19, 0x22, 0x37, 0x0f, 0x2a, 0x14, 0x27, 0x0a, 0x21, 0x0e, 0x13, 0x09, 0x0d, 0x08, 0x07, 0x06,
- };
- return (pc & ~0x3f) | r2l6[pc & 0x3f];
- }
- case 7: {
- static const u8 r2l7[128] = {
- 0x00, 0x01, 0x39, 0x02, 0x5b, 0x3a, 0x20, 0x03, 0x6d, 0x5c, 0x30, 0x3b, 0x71, 0x21, 0x44, 0x04,
- 0x58, 0x6e, 0x50, 0x5d, 0x53, 0x31, 0x65, 0x3c, 0x2c, 0x72, 0x76, 0x22, 0x60, 0x45, 0x14, 0x05,
- 0x7e, 0x59, 0x6b, 0x6f, 0x56, 0x51, 0x2a, 0x5e, 0x7c, 0x54, 0x7a, 0x32, 0x34, 0x66, 0x1a, 0x3d,
- 0x36, 0x2d, 0x4d, 0x73, 0x68, 0x77, 0x4a, 0x23, 0x1c, 0x61, 0x26, 0x46, 0x3f, 0x15, 0x0e, 0x06,
- 0x7f, 0x38, 0x5a, 0x1f, 0x6c, 0x2f, 0x70, 0x43, 0x57, 0x4f, 0x52, 0x64, 0x2b, 0x75, 0x5f, 0x13,
- 0x7d, 0x6a, 0x55, 0x29, 0x7b, 0x79, 0x33, 0x19, 0x35, 0x4c, 0x67, 0x49, 0x1b, 0x25, 0x3e, 0x0d,
- 0x37, 0x1e, 0x2e, 0x42, 0x4e, 0x63, 0x74, 0x12, 0x69, 0x28, 0x78, 0x18, 0x4b, 0x48, 0x24, 0x0c,
- 0x1d, 0x41, 0x62, 0x11, 0x27, 0x17, 0x47, 0x0b, 0x40, 0x10, 0x16, 0x0a, 0x0f, 0x09, 0x08, 0x07,
- };
- return (pc & ~0x7f) | r2l7[pc & 0x7f];
- }
- }
- return 0;
-}
-
diff --git a/src/devices/cpu/tms1000/tms1k_dasm.h b/src/devices/cpu/tms1000/tms1k_dasm.h
index 64e9e6f5082..18aad27fe1a 100644
--- a/src/devices/cpu/tms1000/tms1k_dasm.h
+++ b/src/devices/cpu/tms1000/tms1k_dasm.h
@@ -52,6 +52,9 @@ protected:
const u8 *m_lut_mnemonic;
bool m_opcode_9bits;
int m_pc_bits;
+
+ std::unique_ptr<u8[]> m_l2r;
+ std::unique_ptr<u8[]> m_r2l;
};
class tms1000_disassembler : public tms1000_base_disassembler
diff --git a/src/devices/machine/genpc.cpp b/src/devices/machine/genpc.cpp
index e626bf96b30..50528d17aa7 100644
--- a/src/devices/machine/genpc.cpp
+++ b/src/devices/machine/genpc.cpp
@@ -778,7 +778,118 @@ WRITE8_MEMBER( ibm5150_mb_device::pc_ppi_portb_w )
// GLOBAL VARIABLES
//**************************************************************************
-DEFINE_DEVICE_TYPE(EC1841_MOTHERBOARD, ec1841_mb_device, "ec1841_mb", "EC-1840 motherboard")
+DEFINE_DEVICE_TYPE(EC1840_MOTHERBOARD, ec1840_mb_device, "ec1840_mb", "EC-1840 motherboard")
+
+
+//-------------------------------------------------
+// device_add_mconfig - add device configuration
+//-------------------------------------------------
+
+void ec1840_mb_device::device_add_mconfig(machine_config &config)
+{
+ ec1841_mb_device::device_add_mconfig(config);
+
+ m_ppi8255->in_pc_callback().set(FUNC(ec1840_mb_device::pc_ppi_portc_r));
+}
+
+// via http://oldpc.su/pc/ec1840/ec1840rep.html
+static INPUT_PORTS_START( ec1840_mb )
+ PORT_START("DSW0") /* SA1 */
+ PORT_DIPNAME( 0xc0, 0x40, "Number of floppy drives")
+ PORT_DIPSETTING( 0x00, "1" )
+ PORT_DIPSETTING( 0x40, "2" )
+ PORT_DIPSETTING( 0x80, "3" )
+ PORT_DIPSETTING( 0xc0, "4" )
+ PORT_DIPNAME( 0x30, 0x30, "Graphics adapter")
+ PORT_DIPSETTING( 0x00, "Reserved" )
+ PORT_DIPSETTING( 0x10, "Color 40x25" )
+ PORT_DIPSETTING( 0x20, "Color 80x25" )
+ PORT_DIPSETTING( 0x30, "Monochrome" )
+ PORT_BIT( 0x0c, 0x0c, IPT_UNUSED )
+ PORT_DIPNAME( 0x02, 0x02, "DMAC installed")
+ PORT_DIPSETTING( 0x00, DEF_STR(No) )
+ PORT_DIPSETTING( 0x02, DEF_STR(Yes) )
+ PORT_DIPNAME( 0x01, 0x01, "Boot from floppy")
+ PORT_DIPSETTING( 0x00, DEF_STR(No) )
+ PORT_DIPSETTING( 0x01, DEF_STR(Yes) )
+
+ PORT_START("SA2")
+ PORT_BIT( 0xcf, 0x00, IPT_UNUSED )
+ PORT_DIPNAME( 0x20, 0x20, "SA2.5")
+ PORT_DIPSETTING( 0x00, DEF_STR(No) )
+ PORT_DIPSETTING( 0x20, DEF_STR(Yes) )
+ PORT_DIPNAME( 0x10, 0x10, "SA2.4")
+ PORT_DIPSETTING( 0x00, DEF_STR(No) )
+ PORT_DIPSETTING( 0x10, DEF_STR(Yes) )
+INPUT_PORTS_END
+
+//-------------------------------------------------
+// input_ports - device-specific input ports
+//-------------------------------------------------
+
+ioport_constructor ec1840_mb_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME( ec1840_mb );
+}
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// ec1840_mb_device - constructor
+//-------------------------------------------------
+
+ec1840_mb_device::ec1840_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : ec1841_mb_device(mconfig, EC1840_MOTHERBOARD, tag, owner, clock)
+{
+}
+
+void ec1840_mb_device::device_start()
+{
+}
+
+READ8_MEMBER( ec1840_mb_device::pc_ppi_portc_r )
+{
+ int data = 0xff;
+
+ data &= ~0x80; // no parity error
+ data &= ~0x40; // no error on expansion board
+
+ if (m_ppi_portc_switch_high)
+ {
+ /* read hi nibble of SW2 */
+ data = data & 0xf0;
+
+ switch (m_ram->size())
+ {
+ case 128 * 1024: data |= 0x00; break;
+ case 256 * 1024: data |= 0x01; break;
+ case 384 * 1024: data |= 0x02; break;
+ case 512 * 1024: data |= 0x03; break;
+ case 640 * 1024: data |= 0x04; break;
+ }
+
+ PIO_LOG(1,"PIO_C_r (hi)",("$%02x\n", data));
+ }
+ else
+ {
+ /* read lo nibble of S2 */
+ data = (data & 0xf0) | (ioport("DSW0")->read() >> 4);
+ PIO_LOG(1,"PIO_C_r (lo)",("$%02x\n", data));
+ }
+
+ data = ( data & ~0x20 ) | ( m_pit_out2 ? 0x20 : 0x00 );
+
+ return data;
+}
+
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+DEFINE_DEVICE_TYPE(EC1841_MOTHERBOARD, ec1841_mb_device, "ec1841_mb", "EC-1841 motherboard")
//-------------------------------------------------
@@ -820,6 +931,7 @@ static INPUT_PORTS_START( ec1841_mb )
PORT_DIPSETTING( 0x00, DEF_STR(No) )
PORT_START("SA2")
+ PORT_BIT( 0xcb, 0x00, IPT_UNUSED )
PORT_DIPNAME( 0x04, 0x04, "Speech synthesizer")
PORT_DIPSETTING( 0x00, "Installed" )
PORT_DIPSETTING( 0x04, "Not installed" )
@@ -847,6 +959,11 @@ ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, const char *ta
{
}
+ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+ : ibm5160_mb_device(mconfig, type, tag, owner, clock)
+{
+}
+
void ec1841_mb_device::device_start()
{
}
@@ -875,7 +992,7 @@ WRITE8_MEMBER( ec1841_mb_device::pc_ppi_portb_w )
m_pc_kbdc->clock_write_from_mb(m_ppi_clock_signal);
}
-READ8_MEMBER ( ec1841_mb_device::pc_ppi_portc_r )
+READ8_MEMBER( ec1841_mb_device::pc_ppi_portc_r )
{
int data=0xff;
diff --git a/src/devices/machine/genpc.h b/src/devices/machine/genpc.h
index e222b975873..876005d0a26 100644
--- a/src/devices/machine/genpc.h
+++ b/src/devices/machine/genpc.h
@@ -158,6 +158,7 @@ private:
// device type definition
DECLARE_DEVICE_TYPE(IBM5150_MOTHERBOARD, ibm5150_mb_device)
+
class ec1841_mb_device : public ibm5160_mb_device
{
public:
@@ -165,6 +166,8 @@ public:
ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
+ ec1841_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
virtual ioport_constructor device_input_ports() const override;
@@ -180,6 +183,26 @@ private:
DECLARE_DEVICE_TYPE(EC1841_MOTHERBOARD, ec1841_mb_device)
+class ec1840_mb_device : public ec1841_mb_device
+{
+public:
+ // construction/destruction
+ ec1840_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ // optional information overrides
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual ioport_constructor device_input_ports() const override;
+ virtual void device_start() override;
+
+private:
+ DECLARE_READ8_MEMBER ( pc_ppi_portc_r );
+ DECLARE_WRITE8_MEMBER( pc_ppi_portb_w );
+};
+
+DECLARE_DEVICE_TYPE(EC1840_MOTHERBOARD, ec1840_mb_device)
+
+
class pc_noppi_mb_device : public ibm5160_mb_device
{
public:
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp
index 6abd1bb7195..9d7bed491e0 100644
--- a/src/devices/machine/netlist.cpp
+++ b/src/devices/machine/netlist.cpp
@@ -1012,6 +1012,18 @@ void netlist_mame_device::common_dev_start(netlist::netlist_t *lnetlist) const
{
auto &lsetup = lnetlist->nlstate().setup();
+ // Override log statistics
+ pstring p = plib::util::environment("NL_STATS", "");
+ if (p != "")
+ {
+ bool err=false;
+ bool v = plib::pstonum_ne<bool, true>(p, err);
+ if (err)
+ lsetup.log().warning("NL_STATS: invalid value {1}", p);
+ else
+ lnetlist->enable_stats(v);
+ }
+
// register additional devices
nl_register_devices(lsetup);
@@ -1308,11 +1320,11 @@ offs_t netlist_disassembler::disassemble(std::ostream &stream, offs_t pc, const
{
unsigned startpc = pc;
int relpc = pc - m_dev->genPC();
- if (relpc >= 0 && relpc < m_dev->netlist().queue().size())
+ if (relpc >= 0 && relpc < m_dev->netlist().queuex().size())
{
- int dpc = m_dev->netlist().queue().size() - relpc - 1;
- util::stream_format(stream, "%c %s @%10.7f", (relpc == 0) ? '*' : ' ', m_dev->netlist().queue()[dpc].m_object->name().c_str(),
- m_dev->netlist().queue()[dpc].m_exec_time.as_double());
+ int dpc = m_dev->netlist().queuex().size() - relpc - 1;
+ util::stream_format(stream, "%c %s @%10.7f", (relpc == 0) ? '*' : ' ', m_dev->netlist().queuex()[dpc].m_object->name().c_str(),
+ m_dev->netlist().queuex()[dpc].m_exec_time.as_double());
}
pc+=1;
diff --git a/src/emu/tilemap.cpp b/src/emu/tilemap.cpp
index 9425ee88c16..c5c0ff16ad3 100644
--- a/src/emu/tilemap.cpp
+++ b/src/emu/tilemap.cpp
@@ -1627,14 +1627,14 @@ tilemap_device::tilemap_device(const machine_config &mconfig, const char *tag, d
// write: Main memory writes
//-------------------------------------------------
-WRITE8_MEMBER(tilemap_device::write8)
+void tilemap_device::write8(offs_t offset, u8 data)
{
m_basemem.write8(offset, data);
offset /= m_bytes_per_entry;
mark_tile_dirty(offset);
}
-WRITE16_MEMBER(tilemap_device::write16)
+void tilemap_device::write16(offs_t offset, u16 data, u16 mem_mask)
{
m_basemem.write16(offset, data, mem_mask);
offset = offset * 2 / m_bytes_per_entry;
@@ -1643,7 +1643,7 @@ WRITE16_MEMBER(tilemap_device::write16)
mark_tile_dirty(offset + 1);
}
-WRITE32_MEMBER(tilemap_device::write32)
+void tilemap_device::write32(offs_t offset, u32 data, u32 mem_mask)
{
m_basemem.write32(offset, data, mem_mask);
offset = offset * 4 / m_bytes_per_entry;
@@ -1664,14 +1664,14 @@ WRITE32_MEMBER(tilemap_device::write32)
// write_entry_ext: Extension memory writes
//-------------------------------------------------
-WRITE8_MEMBER(tilemap_device::write8_ext)
+void tilemap_device::write8_ext(offs_t offset, u8 data)
{
m_extmem.write8(offset, data);
offset /= m_bytes_per_entry;
mark_tile_dirty(offset);
}
-WRITE16_MEMBER(tilemap_device::write16_ext)
+void tilemap_device::write16_ext(offs_t offset, u16 data, u16 mem_mask)
{
m_extmem.write16(offset, data, mem_mask);
offset = offset * 2 / m_bytes_per_entry;
@@ -1680,7 +1680,7 @@ WRITE16_MEMBER(tilemap_device::write16_ext)
mark_tile_dirty(offset + 1);
}
-WRITE32_MEMBER(tilemap_device::write32_ext)
+void tilemap_device::write32_ext(offs_t offset, u32 data, u32 mem_mask)
{
m_extmem.write32(offset, data, mem_mask);
offset = offset * 4 / m_bytes_per_entry;
diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h
index d0c929658ef..23b75362f0e 100644
--- a/src/emu/tilemap.h
+++ b/src/emu/tilemap.h
@@ -775,18 +775,18 @@ public:
memory_array &extmem() { return m_extmem; }
// write handlers
- DECLARE_WRITE8_MEMBER(write8);
- DECLARE_WRITE16_MEMBER(write16);
- DECLARE_WRITE32_MEMBER(write32);
- DECLARE_WRITE8_MEMBER(write8_ext);
- DECLARE_WRITE16_MEMBER(write16_ext);
- DECLARE_WRITE32_MEMBER(write32_ext);
+ void write8(offs_t offset, u8 data);
+ void write16(offs_t offset, u16 data, u16 mem_mask = ~0);
+ void write32(offs_t offset, u32 data, u32 mem_mask = ~0);
+ void write8_ext(offs_t offset, u8 data);
+ void write16_ext(offs_t offset, u16 data, u16 mem_mask = ~0);
+ void write32_ext(offs_t offset, u32 data, u32 mem_mask = ~0);
// optional memory accessors
- u32 basemem_read(int index) { return m_basemem.read(index); }
- u32 extmem_read(int index) { return m_extmem.read(index); }
- void basemem_write(int index, u32 data) { m_basemem.write(index, data); mark_tile_dirty(index); }
- void extmem_write(int index, u32 data) { m_extmem.write(index, data); mark_tile_dirty(index); }
+ u32 basemem_read(offs_t offset) { return m_basemem.read(offset); }
+ u32 extmem_read(offs_t offset) { return m_extmem.read(offset); }
+ void basemem_write(offs_t offset, u32 data) { m_basemem.write(offset, data); mark_tile_dirty(offset); }
+ void extmem_write(offs_t offset, u32 data) { m_extmem.write(offset, data); mark_tile_dirty(offset); }
// pick one to use to avoid ambiguity errors
using device_t::machine;
diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp
index 43a74fd43f1..4964306f55a 100644
--- a/src/lib/netlist/devices/net_lib.cpp
+++ b/src/lib/netlist/devices/net_lib.cpp
@@ -67,8 +67,10 @@ namespace devices
LIB_ENTRY(2102A_dip)
LIB_ENTRY(2716)
LIB_ENTRY(2716_dip)
+#if !(USE_TRUTHTABLE_7448)
LIB_ENTRY(7448)
LIB_ENTRY(7448_dip)
+#endif
LIB_ENTRY(7450)
LIB_ENTRY(7450_dip)
LIB_ENTRY(7473)
diff --git a/src/lib/netlist/devices/nld_7448.cpp b/src/lib/netlist/devices/nld_7448.cpp
index 4500229a1c5..c74e8a42496 100644
--- a/src/lib/netlist/devices/nld_7448.cpp
+++ b/src/lib/netlist/devices/nld_7448.cpp
@@ -7,6 +7,7 @@
#include "nld_7448.h"
#include "nlid_truthtable.h"
+#include "nlid_system.h"
#include <array>
@@ -14,12 +15,7 @@ namespace netlist
{
namespace devices
{
- #if (USE_TRUTHTABLE_7448)
-
- NETLIB_TRUTHTABLE(7448, 7, 7);
-
- #else
-
+ #if !(USE_TRUTHTABLE_7448)
NETLIB_OBJECT(7448)
{
NETLIB_CONSTRUCTOR(7448)
@@ -32,6 +28,7 @@ namespace netlist
, m_RBIQ(*this, "RBIQ")
, m_state(*this, "m_state", 0)
, m_Q(*this, {{"a", "b", "c", "d", "e", "f", "g"}})
+ , m_power_pins(*this)
{
}
@@ -52,6 +49,7 @@ namespace netlist
state_var<unsigned> m_state;
object_array_t<logic_output_t, 7> m_Q; /* a .. g */
+ nld_power_pins m_power_pins;
};
@@ -66,6 +64,7 @@ namespace netlist
register_subalias("5", m_RBIQ);
register_subalias("6", m_D);
register_subalias("7", m_A);
+ register_subalias("8", "GND");
register_subalias("9", m_Q[4]); // e
register_subalias("10", m_Q[3]); // d
@@ -74,66 +73,13 @@ namespace netlist
register_subalias("13", m_Q[0]); // a
register_subalias("14", m_Q[6]); // g
register_subalias("15", m_Q[5]); // f
+ register_subalias("16", "VCC");
}
};
#endif
- #if (USE_TRUTHTABLE_7448)
- nld_7448::truthtable_t nld_7448::m_ttbl;
- std::vector<pstring> nld_7448::m_desc = {
- " LTQ,BIQ,RBIQ, A , B , C , D | a, b, c, d, e, f, g",
-
- " 1, 1, 1, 0, 0, 0, 0 | 1, 1, 1, 1, 1, 1, 0|100,100,100,100,100,100,100",
- " 1, 1, X, 1, 0, 0, 0 | 0, 1, 1, 0, 0, 0, 0|100,100,100,100,100,100,100",
- " 1, 1, X, 0, 1, 0, 0 | 1, 1, 0, 1, 1, 0, 1|100,100,100,100,100,100,100",
- " 1, 1, X, 1, 1, 0, 0 | 1, 1, 1, 1, 0, 0, 1|100,100,100,100,100,100,100",
- " 1, 1, X, 0, 0, 1, 0 | 0, 1, 1, 0, 0, 1, 1|100,100,100,100,100,100,100",
- " 1, 1, X, 1, 0, 1, 0 | 1, 0, 1, 1, 0, 1, 1|100,100,100,100,100,100,100",
- " 1, 1, X, 0, 1, 1, 0 | 0, 0, 1, 1, 1, 1, 1|100,100,100,100,100,100,100",
- " 1, 1, X, 1, 1, 1, 0 | 1, 1, 1, 0, 0, 0, 0|100,100,100,100,100,100,100",
- " 1, 1, X, 0, 0, 0, 1 | 1, 1, 1, 1, 1, 1, 1|100,100,100,100,100,100,100",
- " 1, 1, X, 1, 0, 0, 1 | 1, 1, 1, 0, 0, 1, 1|100,100,100,100,100,100,100",
- " 1, 1, X, 0, 1, 0, 1 | 0, 0, 0, 1, 1, 0, 1|100,100,100,100,100,100,100",
- " 1, 1, X, 1, 1, 0, 1 | 0, 0, 1, 1, 0, 0, 1|100,100,100,100,100,100,100",
- " 1, 1, X, 0, 0, 1, 1 | 0, 1, 0, 0, 0, 1, 1|100,100,100,100,100,100,100",
- " 1, 1, X, 1, 0, 1, 1 | 1, 0, 0, 1, 0, 1, 1|100,100,100,100,100,100,100",
- " 1, 1, X, 0, 1, 1, 1 | 0, 0, 0, 1, 1, 1, 1|100,100,100,100,100,100,100",
- " 1, 1, X, 1, 1, 1, 1 | 0, 0, 0, 0, 0, 0, 0|100,100,100,100,100,100,100",
-
- // BI/RBO is input output. In the next case it is used as an input will go low.
- " 1, 1, 0, 0, 0, 0, 0 | 0, 0, 0, 0, 0, 0, 0|100,100,100,100,100,100,100", // RBI
-
- " 0, 1, X, X, X, X, X | 1, 1, 1, 1, 1, 1, 1|100,100,100,100,100,100,100", // LT
-
- // This condition has precedence
- " X, 0, X, X, X, X, X | 0, 0, 0, 0, 0, 0, 0|100,100,100,100,100,100,100", // BI
- ""
- };
-
- NETLIB_OBJECT_DERIVED(7448_dip, 7448)
- {
- NETLIB_CONSTRUCTOR_DERIVED(7448_dip, 7448)
- {
- register_subalias("1", m_I[4]); // B
- register_subalias("2", m_I[5]); // C
- register_subalias("3", m_I[0]); // LTQ
- register_subalias("4", m_I[1]); // BIQ
- register_subalias("5", m_I[2]); // RBIQ
- register_subalias("6", m_I[6]); // D
- register_subalias("7", m_I[3]); // A
-
- register_subalias("9", m_Q[4]); // e
- register_subalias("10", m_Q[3]); // d
- register_subalias("11", m_Q[2]); // c
- register_subalias("12", m_Q[1]); // b
- register_subalias("13", m_Q[0]); // a
- register_subalias("14", m_Q[6]); // g
- register_subalias("15", m_Q[5]); // f
- }
- };
-
- #else
+ #if !(USE_TRUTHTABLE_7448)
#define BITS7(b6,b5,b4,b3,b2,b1,b0) ((b6)<<6) | ((b5)<<5) | ((b4)<<4) | ((b3)<<3) | ((b2)<<2) | ((b1)<<1) | ((b0)<<0)
@@ -213,11 +159,11 @@ namespace netlist
}
}
- #endif
-
- NETLIB_DEVICE_IMPL(7448, "TTL_7448", "+A,+B,+C,+D,+LTQ,+BIQ,+RBIQ")
+ NETLIB_DEVICE_IMPL(7448, "TTL_7448", "+A,+B,+C,+D,+LTQ,+BIQ,+RBIQ,@VCC,@GND")
NETLIB_DEVICE_IMPL(7448_dip, "TTL_7448_DIP", "")
+ #endif
+
} //namespace devices
} // namespace netlist
diff --git a/src/lib/netlist/devices/nld_7448.h b/src/lib/netlist/devices/nld_7448.h
index b9c03ae6360..55ebfd8d6e4 100644
--- a/src/lib/netlist/devices/nld_7448.h
+++ b/src/lib/netlist/devices/nld_7448.h
@@ -27,20 +27,23 @@
#include "netlist/nl_setup.h"
#ifndef NL_AUTO_DEVICES
-
-#define TTL_7448(name, cA0, cA1, cA2, cA3, cLTQ, cBIQ, cRBIQ) \
- NET_REGISTER_DEV(TTL_7448, name) \
- NET_CONNECT(name, A, cA0) \
- NET_CONNECT(name, B, cA1) \
- NET_CONNECT(name, C, cA2) \
- NET_CONNECT(name, D, cA3) \
- NET_CONNECT(name, LTQ, cLTQ) \
- NET_CONNECT(name, BIQ, cBIQ) \
+#if !(USE_TRUTHTABLE_7448)
+#define TTL_7448(name, cA0, cA1, cA2, cA3, cLTQ, cBIQ, cRBIQ) \
+ NET_REGISTER_DEV(TTL_7448, name) \
+ NET_CONNECT(name, VCC, VCC) \
+ NET_CONNECT(name, GND, GND) \
+ NET_CONNECT(name, A, cA0) \
+ NET_CONNECT(name, B, cA1) \
+ NET_CONNECT(name, C, cA2) \
+ NET_CONNECT(name, D, cA3) \
+ NET_CONNECT(name, LTQ, cLTQ) \
+ NET_CONNECT(name, BIQ, cBIQ) \
NET_CONNECT(name, RBIQ, cRBIQ)
-#define TTL_7448_DIP(name) \
+#define TTL_7448_DIP(name) \
NET_REGISTER_DEV(TTL_7448_DIP, name)
#endif
+#endif
#endif /* NLD_7448_H_ */
diff --git a/src/lib/netlist/devices/nlid_system.h b/src/lib/netlist/devices/nlid_system.h
index 2bd500893ef..51b8239ee32 100644
--- a/src/lib/netlist/devices/nlid_system.h
+++ b/src/lib/netlist/devices/nlid_system.h
@@ -181,7 +181,7 @@ namespace devices
{
// FIXME: use pstonum_ne
//pati[i] = plib::pstonum<decltype(pati[i])>(pat[i]);
- pati[i] = plib::pstonum<std::int64_t>(pat[i]);
+ pati[i] = plib::pstonum<std::int64_t, true>(pat[i]);
total += pati[i];
}
netlist_time ttotal = netlist_time::zero();
diff --git a/src/lib/netlist/devices/nlid_truthtable.cpp b/src/lib/netlist/devices/nlid_truthtable.cpp
index c62c67da3c1..36c850c1ae5 100644
--- a/src/lib/netlist/devices/nlid_truthtable.cpp
+++ b/src/lib/netlist/devices/nlid_truthtable.cpp
@@ -401,7 +401,7 @@ void truthtable_parser::parse(const std::vector<pstring> &truthtable)
else
nl_assert_always(outs == "0", "Unknown value (not 0 or 1");
// FIXME: error handling
- netlist_time t = netlist_time::from_nsec(plib::pstonum<std::int64_t>(plib::trim(times[j])));
+ netlist_time t = netlist_time::from_nsec(plib::pstonum<std::int64_t, true>(plib::trim(times[j])));
uint_least8_t k=0;
while (m_timing_nt[k] != netlist_time::zero() && m_timing_nt[k] != t)
k++;
diff --git a/src/lib/netlist/devices/nlid_truthtable.h b/src/lib/netlist/devices/nlid_truthtable.h
index 43e32ded893..564bb16451b 100644
--- a/src/lib/netlist/devices/nlid_truthtable.h
+++ b/src/lib/netlist/devices/nlid_truthtable.h
@@ -10,24 +10,11 @@
#ifndef NLID_TRUTHTABLE_H_
#define NLID_TRUTHTABLE_H_
+#include "netlist/devices/nlid_system.h"
#include "netlist/nl_base.h"
#include "netlist/nl_setup.h"
-#include "netlist/devices/nlid_system.h"
#include "plib/putil.h"
-#define NETLIB_TRUTHTABLE(cname, nIN, nOUT) \
- class NETLIB_NAME(cname) : public nld_truthtable_t<nIN, nOUT> \
- { \
- public: \
- template <class C> \
- NETLIB_NAME(cname)(C &owner, const pstring &name) \
- : nld_truthtable_t<nIN, nOUT>(owner, name, family_TTL(), &m_ttbl, m_desc) { } \
- private: \
- static truthtable_t m_ttbl; \
- static std::vector<pstring> m_desc; \
- }
-
-
namespace netlist
{
namespace devices
diff --git a/src/lib/netlist/macro/nlm_ttl74xx.cpp b/src/lib/netlist/macro/nlm_ttl74xx.cpp
index 22c3ae976ab..aca01bf6a8b 100644
--- a/src/lib/netlist/macro/nlm_ttl74xx.cpp
+++ b/src/lib/netlist/macro/nlm_ttl74xx.cpp
@@ -818,6 +818,47 @@ static NETLIST_START(DM9312_DIP)
)
NETLIST_END()
+#if (USE_TRUTHTABLE_7448)
+
+/*
+ * DM7448: BCD to 7-Segment decoders/drivers
+ *
+ * +--------------+
+ * B |1 ++ 16| VCC
+ * C |2 15| f
+ * LAMP TEST |3 14| g
+ * BI/RBQ |4 7448 13| a
+ * RBI |5 12| b
+ * D |6 11| c
+ * A |7 10| d
+ * GND |8 9| e
+ * +--------------+
+ *
+ *
+ * Naming conventions follow National Semiconductor datasheet
+ *
+ */
+#ifndef __PLIB_PREPROCESSOR__
+#define TTL_7448_TT(name) \
+ NET_REGISTER_DEV(TTL_7448_TT, name)
+#endif
+
+static NETLIST_START(TTL_7448_DIP)
+ TTL_7448_TT(s)
+
+ DIPPINS( /* +--------------+ */
+ s.B, /* B |1 ++ 16| VCC */ s.VCC,
+ s.C, /* C |2 15| f */ s.f,
+ s.LTQ, /* LTQ |3 14| g */ s.g,
+ s.BIQ, /* BIQ |4 7448 13| a */ s.a,
+ s.RBIQ, /* RBIQ |5 12| b */ s.b,
+ s.D, /* D |6 11| c */ s.c,
+ s.A, /* A |7 10| d */ s.d,
+ s.GND, /* GND |8 9| e */ s.e
+ /* +--------------+ */
+ )
+NETLIST_END()
+#endif
NETLIST_START(TTL74XX_lib)
NET_MODEL("DM7414 SCHMITT_TRIGGER(VTP=1.7 VTM=0.9 VI=4.35 RI=6.15k VOH=3.5 ROH=120 VOL=0.1 ROL=37.5 TPLH=15 TPHL=15)")
@@ -1046,6 +1087,72 @@ NETLIST_START(TTL74XX_lib)
TT_FAMILY("74XX")
TRUTHTABLE_END()
+#if (USE_TRUTHTABLE_7448)
+ TRUTHTABLE_START(TTL_7448, 7, 7, "+A,+B,+C,+D,+LTQ,+BIQ,+RBIQ,@VCC,@GND")
+ TT_HEAD(" LTQ,BIQ,RBIQ, A , B , C , D | a, b, c, d, e, f, g")
+
+ TT_LINE(" 1, 1, 1, 0, 0, 0, 0 | 1, 1, 1, 1, 1, 1, 0|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 0, 0, 0 | 0, 1, 1, 0, 0, 0, 0|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 0, 1, 0, 0 | 1, 1, 0, 1, 1, 0, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 1, 0, 0 | 1, 1, 1, 1, 0, 0, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 0, 0, 1, 0 | 0, 1, 1, 0, 0, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 0, 1, 0 | 1, 0, 1, 1, 0, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 0, 1, 1, 0 | 0, 0, 1, 1, 1, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 1, 1, 0 | 1, 1, 1, 0, 0, 0, 0|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 0, 0, 0, 1 | 1, 1, 1, 1, 1, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 0, 0, 1 | 1, 1, 1, 0, 0, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 0, 1, 0, 1 | 0, 0, 0, 1, 1, 0, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 1, 0, 1 | 0, 0, 1, 1, 0, 0, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 0, 0, 1, 1 | 0, 1, 0, 0, 0, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 0, 1, 1 | 1, 0, 0, 1, 0, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 0, 1, 1, 1 | 0, 0, 0, 1, 1, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 1, 1, 1 | 0, 0, 0, 0, 0, 0, 0|100,100,100,100,100,100,100")
+
+ // BI/RBO is input output. In the next case it is used as an input will go low.
+ TT_LINE(" 1, 1, 0, 0, 0, 0, 0 | 0, 0, 0, 0, 0, 0, 0|100,100,100,100,100,100,100") // RBI
+
+ TT_LINE(" 0, 1, X, X, X, X, X | 1, 1, 1, 1, 1, 1, 1|100,100,100,100,100,100,100") // LT
+
+ // This condition has precedence
+ TT_LINE(" X, 0, X, X, X, X, X | 0, 0, 0, 0, 0, 0, 0|100,100,100,100,100,100,100") // BI
+ TT_FAMILY("74XX")
+
+ TRUTHTABLE_END()
+
+ // FIXME: We need a more elegant solution than defining twice
+ TRUTHTABLE_START(TTL_7448_TT, 7, 7, "")
+ TT_HEAD(" LTQ,BIQ,RBIQ, A , B , C , D | a, b, c, d, e, f, g")
+
+ TT_LINE(" 1, 1, 1, 0, 0, 0, 0 | 1, 1, 1, 1, 1, 1, 0|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 0, 0, 0 | 0, 1, 1, 0, 0, 0, 0|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 0, 1, 0, 0 | 1, 1, 0, 1, 1, 0, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 1, 0, 0 | 1, 1, 1, 1, 0, 0, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 0, 0, 1, 0 | 0, 1, 1, 0, 0, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 0, 1, 0 | 1, 0, 1, 1, 0, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 0, 1, 1, 0 | 0, 0, 1, 1, 1, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 1, 1, 0 | 1, 1, 1, 0, 0, 0, 0|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 0, 0, 0, 1 | 1, 1, 1, 1, 1, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 0, 0, 1 | 1, 1, 1, 0, 0, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 0, 1, 0, 1 | 0, 0, 0, 1, 1, 0, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 1, 0, 1 | 0, 0, 1, 1, 0, 0, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 0, 0, 1, 1 | 0, 1, 0, 0, 0, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 0, 1, 1 | 1, 0, 0, 1, 0, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 0, 1, 1, 1 | 0, 0, 0, 1, 1, 1, 1|100,100,100,100,100,100,100")
+ TT_LINE(" 1, 1, X, 1, 1, 1, 1 | 0, 0, 0, 0, 0, 0, 0|100,100,100,100,100,100,100")
+
+ // BI/RBO is input output. In the next case it is used as an input will go low.
+ TT_LINE(" 1, 1, 0, 0, 0, 0, 0 | 0, 0, 0, 0, 0, 0, 0|100,100,100,100,100,100,100") // RBI
+
+ TT_LINE(" 0, 1, X, X, X, X, X | 1, 1, 1, 1, 1, 1, 1|100,100,100,100,100,100,100") // LT
+
+ // This condition has precedence
+ TT_LINE(" X, 0, X, X, X, X, X | 0, 0, 0, 0, 0, 0, 0|100,100,100,100,100,100,100") // BI
+ TT_FAMILY("74XX")
+
+ TRUTHTABLE_END()
+
+#endif
+
TRUTHTABLE_START(TTL_7437_NAND, 2, 1, "+A,+B")
TT_HEAD("A,B|Q ")
TT_LINE("0,X|1|22")
@@ -1197,6 +1304,9 @@ NETLIST_START(TTL74XX_lib)
LOCAL_LIB_ENTRY(TTL_7430_DIP)
LOCAL_LIB_ENTRY(TTL_7432_DIP)
LOCAL_LIB_ENTRY(TTL_7437_DIP)
+#if (USE_TRUTHTABLE_7448)
+ LOCAL_LIB_ENTRY(TTL_7448_DIP)
+#endif
LOCAL_LIB_ENTRY(TTL_7486_DIP)
LOCAL_LIB_ENTRY(TTL_74155_DIP)
LOCAL_LIB_ENTRY(TTL_74156_DIP)
diff --git a/src/lib/netlist/macro/nlm_ttl74xx.h b/src/lib/netlist/macro/nlm_ttl74xx.h
index 527aebf6d29..38a08f99e03 100644
--- a/src/lib/netlist/macro/nlm_ttl74xx.h
+++ b/src/lib/netlist/macro/nlm_ttl74xx.h
@@ -209,6 +209,24 @@
NET_REGISTER_DEV(TTL_7437_DIP, name)
+#if (USE_TRUTHTABLE_7448)
+#define TTL_7448(name, cA0, cA1, cA2, cA3, cLTQ, cBIQ, cRBIQ) \
+ NET_REGISTER_DEV(TTL_7448, name) \
+ NET_CONNECT(name, VCC, VCC) \
+ NET_CONNECT(name, GND, GND) \
+ NET_CONNECT(name, A, cA0) \
+ NET_CONNECT(name, B, cA1) \
+ NET_CONNECT(name, C, cA2) \
+ NET_CONNECT(name, D, cA3) \
+ NET_CONNECT(name, LTQ, cLTQ) \
+ NET_CONNECT(name, BIQ, cBIQ) \
+ NET_CONNECT(name, RBIQ, cRBIQ)
+
+#define TTL_7448_DIP(name) \
+ NET_REGISTER_DEV(TTL_7448_DIP, name)
+
+#endif
+
#define TTL_7486_GATE(name) \
NET_REGISTER_DEV(TTL_7486_GATE, name)
diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp
index 0425c54544a..9242386c71f 100644
--- a/src/lib/netlist/nl_base.cpp
+++ b/src/lib/netlist/nl_base.cpp
@@ -107,9 +107,8 @@ const logic_family_desc_t *family_CD4XXX()
// ----------------------------------------------------------------------------------------
detail::queue_t::queue_t(netlist_state_t &nl)
- : timed_queue<pqentry_t<net_t *, netlist_time>, false, NL_KEEP_STATISTICS>(512)
+ : timed_queue<pqentry_t<net_t *, netlist_time>, false, true>(512)
, netlist_ref(nl)
-// , plib::state_manager_t::callback_t()
, m_qsize(0)
, m_times(512)
, m_net_ids(512)
@@ -193,6 +192,7 @@ netlist_t::netlist_t(const pstring &aname, plib::unique_ptr<callbacks_t> callbac
, m_time(netlist_time::zero())
, m_mainclock(nullptr)
, m_queue(*m_state)
+ , m_stats(false)
{
devices::initialize_factory(nlstate().setup().factory());
NETLIST_NAME(base)(nlstate().setup());
@@ -363,14 +363,23 @@ void netlist_state_t::reset()
#endif
}
-
void netlist_t::process_queue(const netlist_time delta) NL_NOEXCEPT
{
- auto sm_guard(m_stat_mainloop.guard());
- netlist_time stop(m_time + delta);
+ if (!m_stats)
+ process_queue_stats<false>(delta);
+ else
+ {
+ auto sm_guard(m_stat_mainloop.guard());
+ process_queue_stats<true>(delta);
+ }
+}
- m_queue.push(detail::queue_t::entry_t(stop, nullptr));
+template <bool KEEP_STATS>
+void netlist_t::process_queue_stats(const netlist_time delta) NL_NOEXCEPT
+{
+ netlist_time stop(m_time + delta);
+ qpush(detail::queue_t::entry_t(stop, nullptr));
if (m_mainclock == nullptr)
{
@@ -378,8 +387,8 @@ void netlist_t::process_queue(const netlist_time delta) NL_NOEXCEPT
m_time = e.m_exec_time;
while (e.m_object != nullptr)
{
- e.m_object->update_devs();
- m_perf_out_processed.inc();
+ e.m_object->template update_devs<KEEP_STATS>();
+ if (KEEP_STATS) m_perf_out_processed.inc();
e = m_queue.pop();
m_time = e.m_exec_time;
}
@@ -396,7 +405,7 @@ void netlist_t::process_queue(const netlist_time delta) NL_NOEXCEPT
{
m_time = mc_time;
mc_net.toggle_new_Q();
- mc_net.update_devs();
+ mc_net.update_devs<KEEP_STATS>();
mc_time += inc;
}
@@ -404,8 +413,8 @@ void netlist_t::process_queue(const netlist_time delta) NL_NOEXCEPT
m_time = e.m_exec_time;
if (e.m_object != nullptr)
{
- e.m_object->update_devs();
- m_perf_out_processed.inc();
+ e.m_object->template update_devs<KEEP_STATS>();
+ if (KEEP_STATS) m_perf_out_processed.inc();
}
else
break;
@@ -416,33 +425,34 @@ void netlist_t::process_queue(const netlist_time delta) NL_NOEXCEPT
void netlist_t::print_stats() const
{
- if (nperftime_t<NL_KEEP_STATISTICS>::enabled)
+ if (m_stats)
{
std::vector<size_t> index;
for (size_t i=0; i < m_state->m_devices.size(); i++)
index.push_back(i);
std::sort(index.begin(), index.end(),
- [&](size_t i1, size_t i2) { return m_state->m_devices[i1].second->m_stat_total_time.total() < m_state->m_devices[i2].second->m_stat_total_time.total(); });
+ [&](size_t i1, size_t i2) { return m_state->m_devices[i1].second->m_stats->m_stat_total_time.total() < m_state->m_devices[i2].second->m_stats->m_stat_total_time.total(); });
- nperftime_t<NL_KEEP_STATISTICS>::type total_time(0);
- nperftime_t<NL_KEEP_STATISTICS>::ctype total_count(0);
+ nperftime_t<true>::type total_time(0);
+ nperftime_t<true>::ctype total_count(0);
for (auto & j : index)
{
auto entry = m_state->m_devices[j].second.get();
+ auto stats = m_state->m_devices[j].second.get()->m_stats.get();
log().verbose("Device {1:20} : {2:12} {3:12} {4:15} {5:12}", entry->name(),
- entry->m_stat_call_count(), entry->m_stat_total_time.count(),
- entry->m_stat_total_time.total(), entry->m_stat_inc_active());
- total_time += entry->m_stat_total_time.total();
- total_count += entry->m_stat_total_time.count();
+ stats->m_stat_call_count(), stats->m_stat_total_time.count(),
+ stats->m_stat_total_time.total(), stats->m_stat_inc_active());
+ total_time += stats->m_stat_total_time.total();
+ total_count += stats->m_stat_total_time.count();
}
log().verbose("Total calls : {1:12} {2:12} {3:12}", total_count,
total_time, total_time / static_cast<decltype(total_time)>(total_count));
- nperftime_t<NL_KEEP_STATISTICS> overhead;
- nperftime_t<NL_KEEP_STATISTICS> test;
+ nperftime_t<true> overhead;
+ nperftime_t<true> test;
{
auto overhead_guard(overhead.guard());
for (int j=0; j<100000;j++)
@@ -451,9 +461,9 @@ void netlist_t::print_stats() const
}
}
- nperftime_t<NL_KEEP_STATISTICS>::type total_overhead = overhead()
- * static_cast<nperftime_t<NL_KEEP_STATISTICS>::type>(total_count)
- / static_cast<nperftime_t<NL_KEEP_STATISTICS>::type>(200000);
+ nperftime_t<true>::type total_overhead = overhead()
+ * static_cast<nperftime_t<true>::type>(total_count)
+ / static_cast<nperftime_t<true>::type>(200000);
log().verbose("Queue Pushes {1:15}", m_queue.m_prof_call());
log().verbose("Queue Moves {1:15}", m_queue.m_prof_sortmove());
@@ -467,8 +477,8 @@ void netlist_t::print_stats() const
log().verbose("");
log().verbose("Take the next lines with a grain of salt. They depend on the measurement implementation.");
log().verbose("Total overhead {1:15}", total_overhead);
- nperftime_t<NL_KEEP_STATISTICS>::type overhead_per_pop = (m_stat_mainloop()-2*total_overhead - (total_time - total_overhead))
- / static_cast<nperftime_t<NL_KEEP_STATISTICS>::type>(m_queue.m_prof_call());
+ nperftime_t<true>::type overhead_per_pop = (m_stat_mainloop()-2*total_overhead - (total_time - total_overhead))
+ / static_cast<nperftime_t<true>::type>(m_queue.m_prof_call());
log().verbose("Overhead per pop {1:11}", overhead_per_pop );
log().verbose("");
@@ -476,12 +486,13 @@ void netlist_t::print_stats() const
for (auto &entry : m_state->m_devices)
{
auto ep = entry.second.get();
+ auto stats = ep->m_stats.get();
// Factor of 3 offers best performace increase
- if (ep->m_stat_inc_active() > 3 * ep->m_stat_total_time.count()
- && ep->m_stat_inc_active() > trigger)
+ if (stats->m_stat_inc_active() > 3 * stats->m_stat_total_time.count()
+ && stats->m_stat_inc_active() > trigger)
log().verbose("HINT({}, NO_DEACTIVATE) // {} {} {}", ep->name(),
- static_cast<double>(ep->m_stat_inc_active()) / static_cast<double>(ep->m_stat_total_time.count()),
- ep->m_stat_inc_active(), ep->m_stat_total_time.count());
+ static_cast<double>(stats->m_stat_inc_active()) / static_cast<double>(stats->m_stat_total_time.count()),
+ stats->m_stat_inc_active(), stats->m_stat_total_time.count());
}
}
}
@@ -516,6 +527,8 @@ core_device_t::core_device_t(netlist_state_t &owner, const pstring &name)
{
if (logic_family() == nullptr)
set_logic_family(family_TTL());
+ if (exec().stats_enabled())
+ m_stats = plib::make_unique<stats_t>();
}
core_device_t::core_device_t(core_device_t &owner, const pstring &name)
@@ -529,6 +542,8 @@ core_device_t::core_device_t(core_device_t &owner, const pstring &name)
if (logic_family() == nullptr)
set_logic_family(family_TTL());
state().add_dev(this->name(), pool_owned_ptr<core_device_t>(this, false));
+ if (exec().stats_enabled())
+ m_stats = plib::make_unique<stats_t>();
}
void core_device_t::set_default_delegate(detail::core_terminal_t &term)
@@ -649,26 +664,40 @@ void detail::net_t::rebuild_list()
term->set_copied_input(m_cur_Q);
}
}
-template <typename T>
+
+template <bool KEEP_STATS, typename T>
void detail::net_t::process(const T mask, netlist_sig_t sig)
{
m_cur_Q = sig;
- for (auto & p : m_list_active)
+ if (KEEP_STATS)
{
- p.set_copied_input(sig);
-
- p.device().m_stat_call_count.inc();
- if ((p.terminal_state() & mask))
+ for (auto & p : m_list_active)
+ {
+ p.set_copied_input(sig);
+ auto *stats = p.device().m_stats.get();
+ stats->m_stat_call_count.inc();
+ if ((p.terminal_state() & mask))
+ {
+ auto g(stats->m_stat_total_time.guard());
+ //p.device().m_stat_total_time.start();
+ p.m_delegate();
+ //p.device().m_stat_total_time.stop();
+ }
+ }
+ }
+ else
+ {
+ for (auto & p : m_list_active)
{
- auto g(p.device().m_stat_total_time.guard());
- //p.device().m_stat_total_time.start();
- p.m_delegate();
- //p.device().m_stat_total_time.stop();
+ p.set_copied_input(sig);
+ if ((p.terminal_state() & mask))
+ p.m_delegate();
}
}
}
+template <bool KEEP_STATS>
void detail::net_t::update_devs() NL_NOEXCEPT
{
nl_assert(this->isRailNet());
@@ -683,7 +712,7 @@ void detail::net_t::update_devs() NL_NOEXCEPT
{
case core_terminal_t::STATE_INP_HL:
case core_terminal_t::STATE_INP_LH:
- process(mask | core_terminal_t::STATE_INP_ACTIVE, new_Q);
+ process<KEEP_STATS>(mask | core_terminal_t::STATE_INP_ACTIVE, new_Q);
break;
default:
/* do nothing */
diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h
index 57cd20732da..f995e0a26fd 100644
--- a/src/lib/netlist/nl_base.h
+++ b/src/lib/netlist/nl_base.h
@@ -653,6 +653,7 @@ namespace netlist
void push_to_queue(netlist_time delay) NL_NOEXCEPT;
bool is_queued() const noexcept { return m_in_queue == queue_status::QUEUED; }
+ template <bool KEEP_STATS>
void update_devs() NL_NOEXCEPT;
netlist_time next_scheduled_time() const noexcept { return m_next_scheduled_time; }
@@ -741,7 +742,7 @@ namespace netlist
plib::linkedlist_t<core_terminal_t> m_list_active;
std::vector<core_terminal_t *> m_core_terms; // save post-start m_list ...
- template <typename T>
+ template <bool KEEP_STATS, typename T>
void process(const T mask, netlist_sig_t sig);
};
} // namespace detail
@@ -1166,7 +1167,8 @@ namespace netlist
{
if (++m_active_outputs == 1)
{
- m_stat_inc_active.inc();
+ if (m_stats/*NL_KEEP_STATISTICS*/)
+ m_stats->m_stat_inc_active.inc();
inc_active();
}
}
@@ -1189,9 +1191,15 @@ namespace netlist
void set_default_delegate(detail::core_terminal_t &term);
/* stats */
- nperftime_t<NL_KEEP_STATISTICS> m_stat_total_time;
- nperfcount_t<NL_KEEP_STATISTICS> m_stat_call_count;
- nperfcount_t<NL_KEEP_STATISTICS> m_stat_inc_active;
+ struct stats_t
+ {
+ // NL_KEEP_STATISTICS
+ nperftime_t<true> m_stat_total_time;
+ nperfcount_t<true> m_stat_call_count;
+ nperfcount_t<true> m_stat_inc_active;
+ };
+
+ plib::unique_ptr<stats_t> m_stats;
virtual void update() NL_NOEXCEPT { }
virtual void reset() { }
@@ -1288,11 +1296,13 @@ namespace netlist
* solvers will update inputs after parallel processing.
*/
class detail::queue_t :
- public timed_queue<pqentry_t<net_t *, netlist_time>, false, NL_KEEP_STATISTICS>,
+ //public timed_queue<pqentry_t<net_t *, netlist_time>, false, NL_KEEP_STATISTICS>,
+ public timed_queue<pqentry_t<net_t *, netlist_time>, false, true>,
public detail::netlist_ref,
public plib::state_manager_t::callback_t
{
public:
+ using base_queue = timed_queue<pqentry_t<net_t *, netlist_time>, false, true>;
using entry_t = pqentry_t<net_t *, netlist_time>;
explicit queue_t(netlist_state_t &nl);
virtual ~queue_t() noexcept = default;
@@ -1488,8 +1498,45 @@ namespace netlist
void process_queue(const netlist_time delta) NL_NOEXCEPT;
void abort_current_queue_slice() NL_NOEXCEPT { m_queue.retime(detail::queue_t::entry_t(m_time, nullptr)); }
+ const detail::queue_t &queuex() const NL_NOEXCEPT { return m_queue; }
+#if 0
const detail::queue_t &queue() const NL_NOEXCEPT { return m_queue; }
detail::queue_t &queue() NL_NOEXCEPT { return m_queue; }
+#endif
+
+ void qpush(detail::queue_t::entry_t && e) noexcept
+ {
+#if (USE_QUEUE_STATS)
+ #if 0
+ // clang treats -Wswitch-bool as error
+ switch (m_stats)
+ {
+ case false: m_queue.push_nostats(std::move(e)); break;
+ case true: m_queue.push(std::move(e)); break;
+ }
+ #else
+ if (!m_stats)
+ m_queue.push_nostats(std::move(e));
+ else
+ m_queue.push(std::move(e));
+ #endif
+#else
+ m_queue.push_nostats(std::move(e));
+#endif
+ }
+
+ template <class R>
+ void qremove(const R &elem) noexcept
+ {
+#if (USE_QUEUE_STATS)
+ if (!m_stats)
+ m_queue.remove_nostats(elem);
+ else
+ m_queue.remove(elem);
+#else
+ m_queue.remove_nostats(elem);
+#endif
+ }
/* Control functions */
@@ -1519,7 +1566,14 @@ namespace netlist
void print_stats() const;
+ bool stats_enabled() const { return m_stats; }
+ void enable_stats(bool val) { m_stats = val; }
+
private:
+
+ template <bool KEEP_STATS>
+ void process_queue_stats(const netlist_time delta) NL_NOEXCEPT;
+
plib::unique_ptr<netlist_state_t> m_state;
devices::NETLIB_NAME(solver) * m_solver;
@@ -1530,10 +1584,11 @@ namespace netlist
PALIGNAS_CACHELINE()
detail::queue_t m_queue;
+ bool m_stats;
// performance
- nperftime_t<NL_KEEP_STATISTICS> m_stat_mainloop;
- nperfcount_t<NL_KEEP_STATISTICS> m_perf_out_processed;
+ nperftime_t<true> m_stat_mainloop;
+ nperfcount_t<true> m_perf_out_processed;
};
// -----------------------------------------------------------------------------
@@ -1590,7 +1645,7 @@ namespace netlist
if (found)
{
bool err = false;
- auto vald = plib::pstonum_ne<T>(p, err);
+ auto vald = plib::pstonum_ne<T, true>(p, err);
if (err)
device.state().log().fatal(MF_INVALID_NUMBER_CONVERSION_1_2(name, p));
m_param = vald;
@@ -1653,15 +1708,15 @@ namespace netlist
if ((num_cons() != 0))
{
auto &lexec(exec());
- auto &q(lexec.queue());
+ //auto &q(lexec.queue());
auto nst(lexec.time() + delay);
if (is_queued())
- q.remove(this);
+ lexec.qremove(this);
m_in_queue = (!m_list_active.empty()) ?
queue_status::QUEUED : queue_status::DELAYED_DUE_TO_INACTIVE; /* queued ? */
if (m_in_queue == queue_status::QUEUED)
- q.push(queue_t::entry_t(nst, this));
+ lexec.qpush(queue_t::entry_t(nst, this));
else
update_inputs();
m_next_scheduled_time = nst;
@@ -1679,7 +1734,7 @@ namespace netlist
if (m_next_scheduled_time > exec().time())
{
m_in_queue = queue_status::QUEUED; /* pending */
- exec().queue().push({m_next_scheduled_time, this});
+ exec().qpush({m_next_scheduled_time, this});
}
else
{
diff --git a/src/lib/netlist/nl_config.h b/src/lib/netlist/nl_config.h
index 98ca0e27370..a668362bae9 100644
--- a/src/lib/netlist/nl_config.h
+++ b/src/lib/netlist/nl_config.h
@@ -28,7 +28,20 @@
* Your mileage may vary.
*
*/
+#ifndef USE_MEMPOOL
#define USE_MEMPOOL (1)
+#endif
+
+/*! Enable queue statistics.
+ *
+ * Queue statistics come at a performance cost. Although
+ * the cost is low, we disable them here since they are
+ * only needed during development.
+ *
+ */
+#ifndef USE_QUEUE_STATS
+#define USE_QUEUE_STATS (0)
+#endif
/*! Store input values in logic_terminal_t.
*
@@ -40,7 +53,9 @@
* the default approach. It is up to 5% slower.
*
*/
+#ifndef USE_COPY_INSTEAD_OF_REFERENCE
#define USE_COPY_INSTEAD_OF_REFERENCE (0)
+#endif
/*
* FIXME: Using truthtable is a lot slower than the explicit device
@@ -51,16 +66,18 @@
#define USE_TRUTHTABLE_7448 (0)
// How many times do we try to resolve links (connections)
+#ifndef NL_MAX_LINK_RESOLVE_LOOPS
#define NL_MAX_LINK_RESOLVE_LOOPS (100)
+#endif
//============================================================
// DEBUGGING
//============================================================
+#ifndef NL_DEBUG
#define NL_DEBUG (false)
-#define NL_KEEP_STATISTICS (0)
//#define NL_DEBUG (true)
-//#define NL_KEEP_STATISTICS (1)
+#endif
//============================================================
// General Macros
diff --git a/src/lib/netlist/nl_errstr.h b/src/lib/netlist/nl_errstr.h
index edc611e0ca8..6f9aa0d7d12 100644
--- a/src/lib/netlist/nl_errstr.h
+++ b/src/lib/netlist/nl_errstr.h
@@ -88,6 +88,7 @@ namespace netlist
PERRMSGV(MF_MODEL_PARAMETERS_NOT_UPPERCASE_1_2, 2, "Model parameters should be uppercase:{1} {2}")
PERRMSGV(MF_ENTITY_1_NOT_FOUND_IN_MODEL_2, 2, "Entity {1} not found in model {2}")
PERRMSGV(MF_UNKNOWN_NUMBER_FACTOR_IN_1, 1, "Unknown number factor in: {1}")
+ PERRMSGV(MF_MODEL_NUMBER_CONVERSION_ERROR, 4, "Can't convert {1}={2} to {3} for model {4}")
PERRMSGV(MF_NOT_FOUND_IN_SOURCE_COLLECTION, 1, "unable to find {1} in sources collection")
PERRMSGV(MW_OVERWRITING_PARAM_1_OLD_2_NEW_3, 3, "Overwriting {1} old <{2}> new <{3}>")
@@ -141,7 +142,7 @@ namespace netlist
PERRMSGV(MW_MOSFET_THRESHOLD_VOLTAGE, 1, "Mosfet: Threshold voltage not specified for {1}")
-}
+} // namespace netlist
#endif /* NL_ERRSTR_H_ */
diff --git a/src/lib/netlist/nl_lists.h b/src/lib/netlist/nl_lists.h
index 325f8a67c72..f4b1c4e8ff5 100644
--- a/src/lib/netlist/nl_lists.h
+++ b/src/lib/netlist/nl_lists.h
@@ -128,16 +128,44 @@ namespace netlist
m_prof_call.inc();
}
+ void push_nostats(T && e) noexcept
+ {
+ /* Lock */
+ lock_guard_type lck(m_lock);
+#if 1
+ T * i(m_end-1);
+ for (; QueueOp::less(*(i), e); --i)
+ {
+ *(i+1) = *(i);
+ }
+ *(i+1) = std::move(e);
+ ++m_end;
+#else
+ T * i(m_end++);
+ while (QueueOp::less(*(--i), e))
+ {
+ *(i+1) = *(i);
+ }
+ *(i+1) = std::move(e);
+#endif
+ }
+
T pop() noexcept { return *(--m_end); }
const T &top() const noexcept { return *(m_end-1); }
template <class R>
void remove(const R &elem) noexcept
{
- /* Lock */
- lock_guard_type lck(m_lock);
m_prof_remove.inc();
+ remove_nostats(elem);
+ }
+ template <class R>
+ void remove_nostats(const R &elem) noexcept
+ {
+ /* Lock */
+ lock_guard_type lck(m_lock);
+#if 1
for (T * i = m_end - 1; i > &m_list[0]; --i)
{
if (QueueOp::equal(*i, elem))
@@ -146,6 +174,16 @@ namespace netlist
return;
}
}
+#else
+ for (T * i = &m_list[1]; i < m_end; ++i)
+ {
+ if (QueueOp::equal(*i, elem))
+ {
+ std::copy(i+1, m_end--, i);
+ return;
+ }
+ }
+#endif
}
void retime(T && elem) noexcept
diff --git a/src/lib/netlist/nl_parser.cpp b/src/lib/netlist/nl_parser.cpp
index 5cffde0f053..dfae907fe96 100644
--- a/src/lib/netlist/nl_parser.cpp
+++ b/src/lib/netlist/nl_parser.cpp
@@ -426,7 +426,7 @@ nl_double parser_t::eval_param(const token_t &tok)
else
{
bool err;
- ret = plib::pstonum_ne<nl_double>(tok.str(), err);
+ ret = plib::pstonum_ne<nl_double, true>(tok.str(), err);
if (err)
error(plib::pfmt("Parameter value <{1}> not double \n")(tok.str()));
}
diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp
index 6a5cf841a22..42efe0cf37c 100644
--- a/src/lib/netlist/nl_setup.cpp
+++ b/src/lib/netlist/nl_setup.cpp
@@ -840,7 +840,7 @@ const log_type &setup_t::log() const
// Models
// ----------------------------------------------------------------------------------------
-void models_t::register_model(pstring model_in)
+void models_t::register_model(const pstring &model_in)
{
auto pos = model_in.find(" ");
if (pos == pstring::npos)
@@ -906,7 +906,7 @@ pstring models_t::model_string(model_map_t &map)
return ret + ")";
}
-pstring models_t::value_str(pstring model, pstring entity)
+pstring models_t::value_str(const pstring &model, const pstring &entity)
{
model_map_t &map = m_cache[model];
@@ -925,7 +925,7 @@ pstring models_t::value_str(pstring model, pstring entity)
return ret;
}
-nl_double models_t::value(pstring model, pstring entity)
+nl_double models_t::value(const pstring &model, const pstring &entity)
{
model_map_t &map = m_cache[model];
@@ -955,7 +955,11 @@ nl_double models_t::value(pstring model, pstring entity)
tmp = plib::left(tmp, tmp.size() - 1);
// FIXME: check for errors
//printf("%s %s %e %e\n", entity.c_str(), tmp.c_str(), plib::pstonum<nl_double>(tmp), factor);
- return plib::pstonum<nl_double>(tmp) * factor;
+ bool err(false);
+ nl_double val = plib::pstonum_ne<nl_double, true>(tmp, err);
+ if (err)
+ throw nl_exception(MF_MODEL_NUMBER_CONVERSION_ERROR(entity, tmp, "double", model));
+ return val * factor;
}
class logic_family_std_proxy_t : public logic_family_desc_t
@@ -1118,8 +1122,9 @@ void setup_t::prepare_to_run()
if (p != m_param_values.end())
{
//FIXME: check for errors ...
- auto v = plib::pstonum<double>(p->second);
- if (std::abs(v - std::floor(v)) > 1e-6 )
+ bool err(false);
+ auto v = plib::pstonum_ne<double, true>(p->second, err);
+ if (err || std::abs(v - std::floor(v)) > 1e-6 )
log().fatal(MF_HND_VAL_NOT_SUPPORTED(p->second));
d.second->set_hint_deactivate(v == 0.0);
}
diff --git a/src/lib/netlist/nl_setup.h b/src/lib/netlist/nl_setup.h
index 4f8bbc3bced..7fd9cf9cd48 100644
--- a/src/lib/netlist/nl_setup.h
+++ b/src/lib/netlist/nl_setup.h
@@ -210,14 +210,14 @@ namespace netlist
class models_t
{
public:
- void register_model(pstring model_in);
+ void register_model(const pstring &model_in);
/* model / family related */
- pstring value_str(pstring model, pstring entity);
+ pstring value_str(const pstring &model, const pstring &entity);
- nl_double value(pstring model, pstring entity);
+ nl_double value(const pstring &model, const pstring &entity);
- pstring type(pstring model) { return value_str(model, "COREMODEL"); }
+ pstring type(const pstring &model) { return value_str(model, "COREMODEL"); }
private:
using model_map_t = std::unordered_map<pstring, pstring>;
diff --git a/src/lib/netlist/plib/palloc.h b/src/lib/netlist/plib/palloc.h
index 15fede3a99b..7a5431ea5ea 100644
--- a/src/lib/netlist/plib/palloc.h
+++ b/src/lib/netlist/plib/palloc.h
@@ -300,12 +300,29 @@ namespace plib {
#endif
}
+#if 0
template<typename T, typename... Args>
owned_pool_ptr<T> make_poolptr(Args&&... args)
{
auto *mem = allocate(alignof(T), sizeof(T));
return owned_pool_ptr<T>(new (mem) T(std::forward<Args>(args)...), true, arena_deleter<aligned_arena, T>(*this));
}
+#endif
+ template<typename T, typename... Args>
+ owned_pool_ptr<T> make_poolptr(Args&&... args)
+ {
+ auto *mem = allocate(alignof(T), sizeof(T));
+ try
+ {
+ auto *mema = new (mem) T(std::forward<Args>(args)...);
+ return owned_pool_ptr<T>(mema, true, arena_deleter<aligned_arena, T>(*this));
+ }
+ catch (...)
+ {
+ deallocate(mem);
+ throw;
+ }
+ }
};
diff --git a/src/lib/netlist/plib/pconfig.h b/src/lib/netlist/plib/pconfig.h
index d66b342f815..411b8189dd1 100644
--- a/src/lib/netlist/plib/pconfig.h
+++ b/src/lib/netlist/plib/pconfig.h
@@ -13,7 +13,7 @@
* RDTSCP.
*/
#ifndef PHAS_RDTSCP
-#define PHAS_RDTSCP (1)
+#define PHAS_RDTSCP (0)
#endif
/*
diff --git a/src/lib/netlist/plib/pfunction.cpp b/src/lib/netlist/plib/pfunction.cpp
index 6b15d7f8229..46bce2b4901 100644
--- a/src/lib/netlist/plib/pfunction.cpp
+++ b/src/lib/netlist/plib/pfunction.cpp
@@ -72,7 +72,7 @@ void pfunction::compile_postfix(const std::vector<pstring> &inputs,
{
rc.m_cmd = PUSH_CONST;
bool err;
- rc.m_param = plib::pstonum_ne<decltype(rc.m_param)>(cmd, err);
+ rc.m_param = plib::pstonum_ne<decltype(rc.m_param), true>(cmd, err);
if (err)
throw plib::pexception(plib::pfmt("pfunction: unknown/misformatted token <{1}> in <{2}>")(cmd)(expr));
stk += 1;
diff --git a/src/lib/netlist/plib/pmempool.h b/src/lib/netlist/plib/pmempool.h
index 5242d2783ac..a341249f1eb 100644
--- a/src/lib/netlist/plib/pmempool.h
+++ b/src/lib/netlist/plib/pmempool.h
@@ -52,6 +52,12 @@ namespace plib {
//::operator delete(m_data_allocated);
delete [] m_data_allocated;
}
+
+ block(const block &) = delete;
+ block(block &&) = delete;
+ block &operator =(const block &) = delete;
+ block &operator =(block &&) = delete;
+
std::size_t m_num_alloc;
std::size_t m_free;
std::size_t m_cur;
@@ -162,7 +168,6 @@ namespace plib {
{
b->m_num_alloc--;
//printf("Freeing in block %p %lu\n", b, b->m_num_alloc);
- sinfo().erase(it);
if (b->m_num_alloc == 0)
{
mempool *mp = b->m_mempool;
@@ -173,6 +178,7 @@ namespace plib {
mp->m_blocks.erase(itb);
plib::pdelete(b);
}
+ sinfo().erase(it);
}
}
@@ -183,7 +189,16 @@ namespace plib {
owned_pool_ptr<T> make_poolptr(Args&&... args)
{
auto *mem = this->allocate(alignof(T), sizeof(T));
- return owned_pool_ptr<T>(new (mem) T(std::forward<Args>(args)...), true, arena_deleter<mempool, T>(this));
+ try
+ {
+ auto *mema = new (mem) T(std::forward<Args>(args)...);
+ return owned_pool_ptr<T>(mema, true, arena_deleter<mempool, T>(this));
+ }
+ catch (...)
+ {
+ this->deallocate(mem);
+ throw;
+ }
}
};
diff --git a/src/lib/netlist/plib/poptions.h b/src/lib/netlist/plib/poptions.h
index 086fe32fc8a..aa2608c2c91 100644
--- a/src/lib/netlist/plib/poptions.h
+++ b/src/lib/netlist/plib/poptions.h
@@ -185,7 +185,7 @@ protected:
int parse(const pstring &argument) override
{
bool err;
- m_val = pstonum_ne<T>(argument, err);
+ m_val = pstonum_ne<T, true>(argument, err);
return (err ? 1 : (m_val < m_min || m_val > m_max));
}
diff --git a/src/lib/netlist/plib/pparser.cpp b/src/lib/netlist/plib/pparser.cpp
index 2b7ec0001e4..ab065495f41 100644
--- a/src/lib/netlist/plib/pparser.cpp
+++ b/src/lib/netlist/plib/pparser.cpp
@@ -121,7 +121,7 @@ double ptokenizer::get_number_double()
error(pfmt("Expected a number, got <{1}>")(tok.str()) );
}
bool err;
- auto ret = plib::pstonum_ne<double>(tok.str(), err);
+ auto ret = plib::pstonum_ne<double, true>(tok.str(), err);
if (err)
error(pfmt("Expected a number, got <{1}>")(tok.str()) );
return ret;
@@ -135,7 +135,7 @@ long ptokenizer::get_number_long()
error(pfmt("Expected a long int, got <{1}>")(tok.str()) );
}
bool err;
- auto ret = plib::pstonum_ne<long>(tok.str(), err);
+ auto ret = plib::pstonum_ne<long, true>(tok.str(), err);
if (err)
error(pfmt("Expected a long int, got <{1}>")(tok.str()) );
return ret;
@@ -357,7 +357,7 @@ int ppreprocessor::expr(const std::vector<pstring> &sexpr, std::size_t &start, i
else
{
// FIXME: error handling
- val = plib::pstonum<decltype(val)>(tok);
+ val = plib::pstonum<decltype(val), true>(tok);
start++;
}
}
diff --git a/src/lib/netlist/plib/pstring.h b/src/lib/netlist/plib/pstring.h
index c4caeab8e8f..cb4ad651548 100644
--- a/src/lib/netlist/plib/pstring.h
+++ b/src/lib/netlist/plib/pstring.h
@@ -510,76 +510,6 @@ namespace plib
return pwstring(std::to_wstring(v));
}
- template <typename T, typename E = void>
- struct pstonum_helper;
-
- template<typename T>
- struct pstonum_helper<T, typename std::enable_if<std::is_integral<T>::value
- && std::is_signed<T>::value>::type>
- {
- template <typename S>
- long long operator()(const S &arg, std::size_t *idx)
- {
- return std::stoll(arg, idx);
- }
- };
-
- template<typename T>
- struct pstonum_helper<T, typename std::enable_if<std::is_integral<T>::value
- && !std::is_signed<T>::value>::type>
- {
- template <typename S>
- unsigned long long operator()(const S &arg, std::size_t *idx)
- {
- return std::stoull(arg, idx);
- }
- };
-
- template<typename T>
- struct pstonum_helper<T, typename std::enable_if<std::is_floating_point<T>::value>::type>
- {
- template <typename S>
- long double operator()(const S &arg, std::size_t *idx)
- {
- return std::stold(arg, idx);
- }
- };
-
- template<typename T, typename S>
- T pstonum(const S &arg)
- {
- decltype(arg.c_str()) cstr = arg.c_str();
- std::size_t idx(0);
- auto ret = pstonum_helper<T>()(cstr, &idx);
- using ret_type = decltype(ret);
- if (ret >= static_cast<ret_type>(std::numeric_limits<T>::lowest())
- && ret <= static_cast<ret_type>(std::numeric_limits<T>::max()))
- //&& (ret == T(0) || std::abs(ret) >= std::numeric_limits<T>::min() ))
- {
- if (cstr[idx] != 0)
- throw std::invalid_argument(std::string("Continuation after numeric value ends: ") + cstr);
- }
- else
- {
- throw std::out_of_range(std::string("Out of range: ") + cstr);
- }
- return static_cast<T>(ret);
- }
-
- template<typename R, typename T>
- R pstonum_ne(const T &str, bool &err) noexcept
- {
- try
- {
- err = false;
- return pstonum<R>(str);
- }
- catch (...)
- {
- err = true;
- return R(0);
- }
- }
template<typename T>
typename T::size_type find_first_not_of(const T &str, const T &no)
diff --git a/src/lib/netlist/plib/putil.h b/src/lib/netlist/plib/putil.h
index 2e0158891f6..771588831e9 100644
--- a/src/lib/netlist/plib/putil.h
+++ b/src/lib/netlist/plib/putil.h
@@ -9,10 +9,11 @@
#define PUTIL_H_
#include "pstring.h"
-
+#include "pexception.h"
#include <algorithm>
#include <initializer_list>
#include <vector>
+#include <sstream>
#define PSTRINGIFY_HELP(y) # y
#define PSTRINGIFY(x) PSTRINGIFY_HELP(x)
@@ -124,6 +125,99 @@ namespace plib
const std::string &token,
const std::size_t maxsplit);
+ // ----------------------------------------------------------------------------------------
+ // number conversions
+ // ----------------------------------------------------------------------------------------
+
+ template <typename T, bool CLOCALE, typename E = void>
+ struct pstonum_helper;
+
+ template<typename T, bool CLOCALE>
+ struct pstonum_helper<T, CLOCALE, typename std::enable_if<std::is_integral<T>::value
+ && std::is_signed<T>::value>::type>
+ {
+ template <typename S>
+ long long operator()(const S &arg, std::size_t *idx)
+ {
+ return std::stoll(arg, idx);
+ }
+ };
+
+ template<typename T, bool CLOCALE>
+ struct pstonum_helper<T, CLOCALE, typename std::enable_if<std::is_integral<T>::value
+ && !std::is_signed<T>::value>::type>
+ {
+ template <typename S>
+ unsigned long long operator()(const S &arg, std::size_t *idx)
+ {
+ return std::stoull(arg, idx);
+ }
+ };
+
+ template<typename T, bool CLOCALE>
+ struct pstonum_helper<T, CLOCALE, typename std::enable_if<std::is_floating_point<T>::value>::type>
+ {
+ template <typename S>
+ long double operator()(const S &arg, std::size_t *idx)
+ {
+ if (CLOCALE)
+ {
+ std::stringstream ss;
+ ss.imbue(std::locale::classic());
+ ss << arg;
+ long int len(ss.tellp());
+ long double x(0.0);
+ long int pos(0);
+ if (ss >> x)
+ {
+ pos = static_cast<long int>(ss.tellg());
+ if (pos == -1)
+ pos = len;
+ }
+ *idx = static_cast<std::size_t>(pos);
+ //printf("%s, %f, %lu %ld\n", arg, (double)x, *idx, (long int) ss.tellg());
+ return x;
+ }
+ else
+ return std::stold(arg, idx);
+ }
+ };
+
+ template<typename T, bool CLOCALE, typename S>
+ T pstonum(const S &arg)
+ {
+ decltype(arg.c_str()) cstr = arg.c_str();
+ std::size_t idx(0);
+ auto ret = pstonum_helper<T, CLOCALE>()(cstr, &idx);
+ using ret_type = decltype(ret);
+ if (ret >= static_cast<ret_type>(std::numeric_limits<T>::lowest())
+ && ret <= static_cast<ret_type>(std::numeric_limits<T>::max()))
+ //&& (ret == T(0) || std::abs(ret) >= std::numeric_limits<T>::min() ))
+ {
+ if (cstr[idx] != 0)
+ throw pexception(pstring("Continuation after numeric value ends: ") + cstr);
+ }
+ else
+ {
+ throw pexception(pstring("Out of range: ") + cstr);
+ }
+ return static_cast<T>(ret);
+ }
+
+ template<typename R, bool CLOCALE, typename T>
+ R pstonum_ne(const T &str, bool &err) noexcept
+ {
+ try
+ {
+ err = false;
+ return pstonum<R, CLOCALE>(str);
+ }
+ catch (...)
+ {
+ err = true;
+ return R(0);
+ }
+ }
//============================================================
// penum - strongly typed enumeration
diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp
index 914e2aaafe4..ec8fe57d448 100644
--- a/src/lib/netlist/prg/nltool.cpp
+++ b/src/lib/netlist/prg/nltool.cpp
@@ -39,6 +39,7 @@ public:
opt_grp3(*this, "Options for run command", "These options are only used by the run command."),
opt_ttr (*this, "t", "time_to_run", 1.0, "time to run the emulation (seconds)\n\n abc def\n\n xyz"),
+ opt_stats(*this, "s", "statistics", "gather runtime statistics"),
opt_logs(*this, "l", "log" , "define terminal to log. This option may be specified repeatedly."),
opt_inp(*this, "i", "input", "", "input file to process (default is none)"),
opt_loadstate(*this,"", "loadstate", "", "load state from file and continue from there"),
@@ -75,6 +76,7 @@ public:
plib::option_str opt_name;
plib::option_group opt_grp3;
plib::option_num<double> opt_ttr;
+ plib::option_bool opt_stats;
plib::option_vec opt_logs;
plib::option_str opt_inp;
plib::option_str opt_loadstate;
@@ -351,6 +353,7 @@ void tool_app_t::run()
auto t_guard(t.guard());
//plib::perftime_t<plib::exact_ticks> t;
+ nt.enable_stats(opt_stats());
nt.init();
if (!opt_verb())
@@ -431,7 +434,6 @@ void tool_app_t::run()
void tool_app_t::validate()
{
std::vector<input_t> inps;
- netlist::netlist_time ttr;
netlist_tool_t nt(*this, "netlist");
if (!opt_verb())
diff --git a/src/lib/netlist/solver/nld_matrix_solver.cpp b/src/lib/netlist/solver/nld_matrix_solver.cpp
index a8474c341cf..24acc8db576 100644
--- a/src/lib/netlist/solver/nld_matrix_solver.cpp
+++ b/src/lib/netlist/solver/nld_matrix_solver.cpp
@@ -605,7 +605,7 @@ namespace devices
void matrix_solver_t::log_stats()
{
- if (this->m_stat_calculations != 0 && this->m_stat_vsolver_calls && this->m_params.m_log_stats)
+ if (this->m_stat_calculations != 0 && this->m_stat_vsolver_calls && log().verbose.is_enabled())
{
log().verbose("==============================================");
log().verbose("Solver {1}", this->name());
diff --git a/src/lib/netlist/solver/nld_matrix_solver.h b/src/lib/netlist/solver/nld_matrix_solver.h
index f76660e1cb9..29017add8a9 100644
--- a/src/lib/netlist/solver/nld_matrix_solver.h
+++ b/src/lib/netlist/solver/nld_matrix_solver.h
@@ -37,7 +37,6 @@ namespace devices
netlist_time m_nr_recalc_delay;
bool m_use_gabs;
bool m_use_linear_prediction;
- bool m_log_stats;
};
diff --git a/src/lib/netlist/solver/nld_solver.cpp b/src/lib/netlist/solver/nld_solver.cpp
index bc10078b1c2..101408b2652 100644
--- a/src/lib/netlist/solver/nld_solver.cpp
+++ b/src/lib/netlist/solver/nld_solver.cpp
@@ -273,13 +273,6 @@ namespace devices
//m_params.m_max_timestep = std::max(m_params.m_max_timestep, m_params.m_max_timestep::)
- // Override log statistics
- pstring p = plib::util::environment("NL_STATS", "");
- if (p != "")
- m_params.m_log_stats = plib::pstonum<decltype(m_params.m_log_stats)>(p);
- else
- m_params.m_log_stats = m_log_stats();
-
log().verbose("Scanning net groups ...");
// determine net groups
diff --git a/src/lib/netlist/solver/nld_solver.h b/src/lib/netlist/solver/nld_solver.h
index 3580ca94996..99937f72812 100644
--- a/src/lib/netlist/solver/nld_solver.h
+++ b/src/lib/netlist/solver/nld_solver.h
@@ -60,7 +60,6 @@ namespace devices
, m_use_gabs(*this, "USE_GABS", true)
, m_use_linear_prediction(*this, "USE_LINEAR_PREDICTION", false) // // savings are eaten up by effort
- , m_log_stats(*this, "LOG_STATS", true) // log statistics on shutdown
, m_params()
{
// internal staff
@@ -100,8 +99,6 @@ namespace devices
param_logic_t m_use_gabs;
param_logic_t m_use_linear_prediction;
- param_logic_t m_log_stats;
-
std::vector<pool_owned_ptr<matrix_solver_t>> m_mat_solvers;
std::vector<matrix_solver_t *> m_mat_solvers_all;
std::vector<matrix_solver_t *> m_mat_solvers_timestepping;
diff --git a/src/lib/netlist/tools/nl_convert.cpp b/src/lib/netlist/tools/nl_convert.cpp
index 1633497dd99..4a88da7d5a3 100644
--- a/src/lib/netlist/tools/nl_convert.cpp
+++ b/src/lib/netlist/tools/nl_convert.cpp
@@ -213,7 +213,7 @@ double nl_convert_base_t::get_sp_val(const pstring &sin)
++p;
pstring val = plib::left(sin, p);
pstring unit = sin.substr(p);
- double ret = get_sp_unit(unit) * plib::pstonum<double>(val);
+ double ret = get_sp_unit(unit) * plib::pstonum<double, true>(val);
return ret;
}
@@ -322,7 +322,7 @@ void nl_convert_spice_t::process_line(const pstring &line)
pstring model;
pstring pins ="CBE";
bool err;
- auto nval = plib::pstonum_ne<long>(tt[4], err);
+ auto nval = plib::pstonum_ne<long, true>(tt[4], err);
plib::unused_var(nval);
if ((!err || plib::startsWith(tt[4], "N")) && tt.size() > 5)
@@ -532,7 +532,7 @@ void nl_convert_eagle_t::convert(const pstring &contents)
else if (plib::ucase(sval) == "LOW")
add_device("TTL_INPUT", name, 0);
else
- add_device("ANALOG_INPUT", name, plib::pstonum<double>(sval));
+ add_device("ANALOG_INPUT", name, plib::pstonum<double, true>(sval));
add_pin_alias(name, "1", "Q");
break;
case 'D':
diff --git a/src/mame/audio/carnival.cpp b/src/mame/audio/carnival.cpp
index 4709c274de4..d64892f4bd2 100644
--- a/src/mame/audio/carnival.cpp
+++ b/src/mame/audio/carnival.cpp
@@ -61,7 +61,7 @@ enum
};
-WRITE8_MEMBER( vicdual_state::carnival_audio_1_w )
+WRITE8_MEMBER( carnival_state::carnival_audio_1_w )
{
int bitsChanged;
int bitsGoneHigh;
@@ -126,8 +126,7 @@ WRITE8_MEMBER( vicdual_state::carnival_audio_1_w )
}
}
-
-WRITE8_MEMBER( vicdual_state::carnival_audio_2_w )
+WRITE8_MEMBER( carnival_state::carnival_audio_2_w )
{
int bitsChanged;
//int bitsGoneHigh;
@@ -156,61 +155,106 @@ WRITE8_MEMBER( vicdual_state::carnival_audio_2_w )
/* Music board */
-void vicdual_state::carnival_psg_latch(address_space &space)
+// common
+
+void carnival_state::mboard_map(address_map &map)
+{
+ map(0x0000, 0x03ff).rom();
+}
+
+READ_LINE_MEMBER( carnival_state::carnival_music_port_t1_r )
+{
+ // T1: comms from audio port 2 d3
+ return ~m_port2State >> 3 & 1;
+}
+
+
+// AY8912 music
+
+void carnival_state::carnival_psg_latch()
{
- if (m_psgBus & 1)
+ if (m_musicBus & 1)
{
// BDIR W, BC1 selects address or data
- if (m_psgBus & 2)
- m_psg->address_w(m_psgData);
+ if (m_musicBus & 2)
+ m_psg->address_w(m_musicData);
else
- m_psg->data_w(m_psgData);
+ m_psg->data_w(m_musicData);
}
}
-WRITE8_MEMBER( vicdual_state::carnival_music_port_1_w )
+WRITE8_MEMBER( carnival_state::carnivala_music_port_1_w )
{
- // P1: ay8912 d0-d7
- m_psgData = data;
- carnival_psg_latch(space);
+ // P1: AY8912 d0-d7
+ m_musicData = data;
+ carnival_psg_latch();
}
-WRITE8_MEMBER( vicdual_state::carnival_music_port_2_w )
+WRITE8_MEMBER( carnival_state::carnivala_music_port_2_w )
{
// P2 d6: AY8912 BDIR(R/W)
// P2 d7: AY8912 BC1
- m_psgBus = data >> 6 & 3;
- carnival_psg_latch(space);
+ m_musicBus = data >> 6 & 3;
+ carnival_psg_latch();
}
-
-READ_LINE_MEMBER( vicdual_state::carnival_music_port_t1_r )
+void carnival_state::carnivala_audio(machine_config &config)
{
- // T1: comms from audio port 2 d3
- return ~m_port2State >> 3 & 1;
+ /* music board */
+ I8035(config, m_audiocpu, XTAL(3'579'545));
+ m_audiocpu->set_addrmap(AS_PROGRAM, &carnival_state::mboard_map);
+ m_audiocpu->p1_out_cb().set(FUNC(carnival_state::carnivala_music_port_1_w));
+ m_audiocpu->p2_out_cb().set(FUNC(carnival_state::carnivala_music_port_2_w));
+ m_audiocpu->t1_in_cb().set(FUNC(carnival_state::carnival_music_port_t1_r));
+
+ AY8912(config, m_psg, XTAL(3'579'545)/3).add_route(ALL_OUTPUTS, "mono", 0.25); // also seen with AY-3-8910, daughterboard has place for either chip
+
+ /* samples */
+ SAMPLES(config, m_samples);
+ m_samples->set_channels(10);
+ m_samples->set_samples_names(carnival_sample_names);
+ m_samples->add_route(ALL_OUTPUTS, "mono", 0.5);
}
-void vicdual_state::mboard_map(address_map &map)
+// PIT8253 music
+
+WRITE8_MEMBER( carnival_state::carnivalb_music_port_1_w )
{
- map(0x0000, 0x03ff).rom();
+ // P1: PIT8253 d0-d7
+ m_musicData = data;
}
+WRITE8_MEMBER( carnival_state::carnivalb_music_port_2_w )
+{
+ // P2 d7: PIT8253 write strobe
+ // P2 d5,d6: PIT8253 A0,A1
+ if (~m_musicBus & data & 0x80)
+ m_pit->write(data >> 5 & 3, m_musicData);
-void vicdual_state::carnival_audio(machine_config &config)
+ m_musicBus = data;
+}
+
+void carnival_state::carnivalb_audio(machine_config &config)
{
- /* music board */
- I8039(config, m_audiocpu, XTAL(3'579'545));
- m_audiocpu->set_addrmap(AS_PROGRAM, &vicdual_state::mboard_map);
- m_audiocpu->p1_out_cb().set(FUNC(vicdual_state::carnival_music_port_1_w));
- m_audiocpu->p2_out_cb().set(FUNC(vicdual_state::carnival_music_port_2_w));
- m_audiocpu->t1_in_cb().set(FUNC(vicdual_state::carnival_music_port_t1_r));
+ // already inherited carnivala_audio
+ config.device_remove("psg");
- AY8912(config, m_psg, XTAL(3'579'545)/3).add_route(ALL_OUTPUTS, "mono", 0.25);
+ m_audiocpu->p1_out_cb().set(FUNC(carnival_state::carnivalb_music_port_1_w));
+ m_audiocpu->p2_out_cb().set(FUNC(carnival_state::carnivalb_music_port_2_w));
- /* samples */
- SAMPLES(config, m_samples);
- m_samples->set_channels(10);
- m_samples->set_samples_names(carnival_sample_names);
- m_samples->add_route(ALL_OUTPUTS, "mono", 0.5);
+ PIT8253(config, m_pit, 0);
+ m_pit->set_clk<0>(XTAL(3'579'545)/3);
+ m_pit->set_clk<1>(XTAL(3'579'545)/3);
+ m_pit->set_clk<2>(XTAL(3'579'545)/3);
+
+ m_pit->out_handler<0>().set(m_dac[0], FUNC(dac_bit_interface::write));
+ m_pit->out_handler<1>().set(m_dac[1], FUNC(dac_bit_interface::write));
+ m_pit->out_handler<2>().set(m_dac[2], FUNC(dac_bit_interface::write));
+
+ for (int i = 0; i < 3; i++)
+ {
+ DAC_1BIT(config, m_dac[i]).add_route(ALL_OUTPUTS, "mono", 0.15);
+ VOLTAGE_REGULATOR(config, m_vref[i]).add_route(0, m_dac[i], 1.0, DAC_VREF_POS_INPUT);
+ }
}
diff --git a/src/mame/audio/nl_mario.cpp b/src/mame/audio/nl_mario.cpp
index 16ecc712e1a..b97d1e08abf 100644
--- a/src/mame/audio/nl_mario.cpp
+++ b/src/mame/audio/nl_mario.cpp
@@ -178,7 +178,7 @@ static NETLIST_START(nl_mario_dac)
NET_C(3M_1.MINUS, R34.2, R35.2)
NET_C(3M_1.OUT, R35.1)
NET_C(3M_1.PLUS, R36.1)
- NET_C(R36.2, GND)
+ NET_C(R36.2, V5)
RES(R21, RES_M(1.8))
RES(R23, RES_K(10))
@@ -218,12 +218,12 @@ NETLIST_START(mario)
LOCAL_SOURCE(nl_mario_dac)
SOLVER(Solver, 48000)
- PARAM(Solver.ACCURACY, 1e-6)
+ PARAM(Solver.ACCURACY, 1e-7)
PARAM(Solver.SOR_FACTOR, 1.0)
PARAM(Solver.GS_LOOPS, 1)
/* Dynamic timestepping avoids excessive newton loops on startup */
PARAM(Solver.DYNAMIC_LTE, 5e-2)
- PARAM(Solver.DYNAMIC_TS, 1)
+ PARAM(Solver.DYNAMIC_TS, 0)
ANALOG_INPUT(V5, 5)
ALIAS(VCC, V5) // no-ttl-dip devices need VCC!
diff --git a/src/mame/audio/nl_zac1b11142.cpp b/src/mame/audio/nl_zac1b11142.cpp
index 087e17a52f8..df97e21da05 100644
--- a/src/mame/audio/nl_zac1b11142.cpp
+++ b/src/mame/audio/nl_zac1b11142.cpp
@@ -243,13 +243,7 @@ NETLIST_START(zac1b11142_schematics)
TTL_74156_DIP(U4B) // FIXME: should be a 74LS156 (lower sink capability)
LM3900(U5B3)
-#if 1
NET_C(RULLANTE, CASSA, BASSO, R82.2, /*R80.2,*/ PIANO, C40.1, R77.1)
-#else
- // cassa swamps the other instruments if it's connected - just ground it for now
- NET_C(GND, CASSA)
- NET_C(RULLANTE, BASSO, R82.2, /*R80.2,*/ PIANO, C40.1, R77.1)
-#endif
NET_C(C40.2, R97.1)
NET_C(TROMBA, R97.2, R41.2, R42.2, R43.2, R44.2, R73.2, R74.2, R75.2, R76.2)
NET_C(IOA2, U4B.13)
diff --git a/src/mame/drivers/atarig1.cpp b/src/mame/drivers/atarig1.cpp
index a4d3de4453d..d89689309aa 100644
--- a/src/mame/drivers/atarig1.cpp
+++ b/src/mame/drivers/atarig1.cpp
@@ -64,7 +64,7 @@ MACHINE_RESET_MEMBER(atarig1_state,atarig1)
WRITE16_MEMBER(atarig1_state::mo_command_w)
{
COMBINE_DATA(m_mo_command);
- m_rle->command_write(space, offset, (data == 0 && m_is_pitfight) ? ATARIRLE_COMMAND_CHECKSUM : ATARIRLE_COMMAND_DRAW);
+ m_rle->command_write((data == 0 && m_is_pitfight) ? ATARIRLE_COMMAND_CHECKSUM : ATARIRLE_COMMAND_DRAW);
}
diff --git a/src/mame/drivers/atarig42.cpp b/src/mame/drivers/atarig42.cpp
index 8878331f30f..3d8de8d26a3 100644
--- a/src/mame/drivers/atarig42.cpp
+++ b/src/mame/drivers/atarig42.cpp
@@ -92,7 +92,7 @@ WRITE16_MEMBER(atarig42_state::io_latch_w)
m_asic65->reset_line((~data >> 14) & 1);
/* bits 13-11 are the MO control bits */
- m_rle->control_write(space, 0, (data >> 11) & 7);
+ m_rle->control_write((data >> 11) & 7);
}
/* lower byte */
@@ -113,7 +113,7 @@ WRITE16_MEMBER(atarig42_state::io_latch_w)
WRITE16_MEMBER(atarig42_state::mo_command_w)
{
COMBINE_DATA(m_mo_command);
- m_rle->command_write(space, offset, (data == 0) ? ATARIRLE_COMMAND_CHECKSUM : ATARIRLE_COMMAND_DRAW);
+ m_rle->command_write((data == 0) ? ATARIRLE_COMMAND_CHECKSUM : ATARIRLE_COMMAND_DRAW);
}
diff --git a/src/mame/drivers/atarigt.cpp b/src/mame/drivers/atarigt.cpp
index d5850333303..cf235d3ea64 100644
--- a/src/mame/drivers/atarigt.cpp
+++ b/src/mame/drivers/atarigt.cpp
@@ -217,7 +217,7 @@ WRITE32_MEMBER(atarigt_state::latch_w)
if (ACCESSING_BITS_24_31)
{
/* bits 13-11 are the MO control bits */
- m_rle->control_write(space, offset, (data >> 27) & 7);
+ m_rle->control_write((data >> 27) & 7);
}
if (ACCESSING_BITS_16_23)
@@ -233,7 +233,7 @@ WRITE32_MEMBER(atarigt_state::mo_command_w)
{
COMBINE_DATA(m_mo_command);
if (ACCESSING_BITS_0_15)
- m_rle->command_write(space, offset, ((data & 0xffff) == 2) ? ATARIRLE_COMMAND_CHECKSUM : ATARIRLE_COMMAND_DRAW);
+ m_rle->command_write(((data & 0xffff) == 2) ? ATARIRLE_COMMAND_CHECKSUM : ATARIRLE_COMMAND_DRAW);
}
@@ -1313,7 +1313,7 @@ WRITE32_MEMBER(atarigt_state::tmek_pf_w)
if (pc == 0x25834 || pc == 0x25860)
logerror("%06X:PFW@%06X = %08X & %08X (src=%06X)\n", m_maincpu->pc(), 0xd72000 + offset*4, data, mem_mask, (uint32_t)m_maincpu->state_int(M68K_A3) - 2);
- m_playfield_tilemap->write32(space, offset, data, mem_mask);
+ m_playfield_tilemap->write32(offset, data, mem_mask);
}
void atarigt_state::init_tmek()
diff --git a/src/mame/drivers/atarigx2.cpp b/src/mame/drivers/atarigx2.cpp
index 0f0869dfb49..15696ebc2cc 100644
--- a/src/mame/drivers/atarigx2.cpp
+++ b/src/mame/drivers/atarigx2.cpp
@@ -103,7 +103,7 @@ WRITE32_MEMBER(atarigx2_state::latch_w)
if (ACCESSING_BITS_24_31)
{
/* bits 13-11 are the MO control bits */
- m_rle->control_write(space, offset, (data >> 27) & 7);
+ m_rle->control_write((data >> 27) & 7);
}
/* lower byte */
@@ -116,7 +116,7 @@ WRITE32_MEMBER(atarigx2_state::mo_command_w)
{
COMBINE_DATA(m_mo_command);
if (ACCESSING_BITS_0_15)
- m_rle->command_write(space, offset, ((data & 0xffff) == 2) ? ATARIRLE_COMMAND_CHECKSUM : ATARIRLE_COMMAND_DRAW);
+ m_rle->command_write(((data & 0xffff) == 2) ? ATARIRLE_COMMAND_CHECKSUM : ATARIRLE_COMMAND_DRAW);
}
diff --git a/src/mame/drivers/avalnche.cpp b/src/mame/drivers/avalnche.cpp
index 4782401e76e..4655321726d 100644
--- a/src/mame/drivers/avalnche.cpp
+++ b/src/mame/drivers/avalnche.cpp
@@ -264,12 +264,12 @@ void avalnche_state::acatch(machine_config &config)
ROM_START( avalnche )
ROM_REGION( 0x8000, "maincpu", 0 )
- ROM_LOAD_NIB_HIGH( "30612.d2", 0x6800, 0x0800, CRC(3f975171) SHA1(afe680865da97824f1ebade4c7a2ba5d7ee2cbab) )
- ROM_LOAD_NIB_LOW ( "30615.d3", 0x6800, 0x0800, CRC(3e1a86b4) SHA1(3ff4cffea5b7a32231c0996473158f24c3bbe107) )
- ROM_LOAD_NIB_HIGH( "30613.e2", 0x7000, 0x0800, CRC(47a224d3) SHA1(9feb7444a2e5a3d90a4fe78ae5d23c3a5039bfaa) )
- ROM_LOAD_NIB_LOW ( "30616.e3", 0x7000, 0x0800, CRC(f620f0f8) SHA1(7802b399b3469fc840796c3145b5f63781090956) )
- ROM_LOAD_NIB_HIGH( "30611.c2", 0x7800, 0x0800, CRC(0ad07f85) SHA1(5a1a873b14e63dbb69ee3686ba53f7ca831fe9d0) )
- ROM_LOAD_NIB_LOW ( "30614.c3", 0x7800, 0x0800, CRC(a12d5d64) SHA1(1647d7416bf9266d07f066d3797bda943e004d24) )
+ ROM_LOAD_NIB_HIGH( "30612-01.d2", 0x6800, 0x0800, CRC(3f975171) SHA1(afe680865da97824f1ebade4c7a2ba5d7ee2cbab) )
+ ROM_LOAD_NIB_LOW ( "30615-01.d3", 0x6800, 0x0800, CRC(3e1a86b4) SHA1(3ff4cffea5b7a32231c0996473158f24c3bbe107) )
+ ROM_LOAD_NIB_HIGH( "30613-01.e2", 0x7000, 0x0800, CRC(47a224d3) SHA1(9feb7444a2e5a3d90a4fe78ae5d23c3a5039bfaa) )
+ ROM_LOAD_NIB_LOW ( "30616-01.e3", 0x7000, 0x0800, CRC(f620f0f8) SHA1(7802b399b3469fc840796c3145b5f63781090956) )
+ ROM_LOAD_NIB_HIGH( "30611-01.c2", 0x7800, 0x0800, CRC(0ad07f85) SHA1(5a1a873b14e63dbb69ee3686ba53f7ca831fe9d0) )
+ ROM_LOAD_NIB_LOW ( "30614-01.c3", 0x7800, 0x0800, CRC(a12d5d64) SHA1(1647d7416bf9266d07f066d3797bda943e004d24) )
ROM_END
ROM_START( cascade )
diff --git a/src/mame/drivers/berzerk.cpp b/src/mame/drivers/berzerk.cpp
index 210dd2a1594..c71a1f2c740 100644
--- a/src/mame/drivers/berzerk.cpp
+++ b/src/mame/drivers/berzerk.cpp
@@ -1291,7 +1291,7 @@ ROM_END
/*
- The original / prototype version of moon war runs on Frenzy Hardware.
+ The original / prototype version of Moon War runs on Frenzy Hardware.
The more common version of Moon War runs on modified Super Cobra (galaxian.cpp) hardware and is often called
'Moon War II' because it is the second version, and the ROMs as well as many of the PCBs are labeled as such.
@@ -1299,6 +1299,12 @@ ROM_END
So far only 2 original boards of this have been found, one with only the sound ROMs on it, and the other
with only the program ROMs on it. This set is a combination of dumps from those two boards, so there
is a small chance they could be mismatched.
+
+Sound ROMs for Moon War:
+
+MOON WAR MOON WAR
+RVO 1C RVO 2C
+1981 STERN 1981 STERN
*/
ROM_START( moonwarp )
ROM_REGION( 0x10000, "maincpu", 0 )
@@ -1309,8 +1315,8 @@ ROM_START( moonwarp )
ROM_LOAD( "5c.bin", 0xc000, 0x1000, CRC(a3d551ab) SHA1(a32352727b5475a6ec6c495c55f01ccd6e024f98) )
ROM_REGION( 0x01000, "speech", 0 ) /* voice data */
- ROM_LOAD( "moonwar.1c.bin", 0x0000, 0x0800, CRC(9e9a653f) SHA1(cf49a38ef343ace271ba1e5dde38bd8b9c0bd876) ) /* VSU-1000 board */
- ROM_LOAD( "moonwar.2c.bin", 0x0800, 0x0800, CRC(73fd988d) SHA1(08a2aeb4d87eee58e38e4e3f749a95f2308aceb0) ) /* ditto */
+ ROM_LOAD( "moon_war_rv0_1c.1c", 0x0000, 0x0800, CRC(9e9a653f) SHA1(cf49a38ef343ace271ba1e5dde38bd8b9c0bd876) ) /* VSU-1000 board */
+ ROM_LOAD( "moon_war_rv0_2c.2c", 0x0800, 0x0800, CRC(73fd988d) SHA1(08a2aeb4d87eee58e38e4e3f749a95f2308aceb0) ) /* ditto */
ROM_REGION( 0x0020, "proms", 0 )
ROM_LOAD( "n82s123.6e", 0x0000, 0x0020, CRC(4471ca5d) SHA1(ba8dca2ec076818f8ad8c17b15c77965e36fa05e) ) /* address decoder/ROM select PROM - from board with prg ROMs, same as Frenzy */
diff --git a/src/mame/drivers/bublbobl.cpp b/src/mame/drivers/bublbobl.cpp
index 1e00ba2d969..9bb8718e746 100644
--- a/src/mame/drivers/bublbobl.cpp
+++ b/src/mame/drivers/bublbobl.cpp
@@ -1787,6 +1787,32 @@ ROM_START( sboblboble ) // identical to sboblbobld but for the first program ROM
ROM_END
+ROM_START( sboblboblf ) // single layer PCB '8001 AX'
+ ROM_REGION( 0x30000, "maincpu", 0 )
+ ROM_LOAD( "a2.bin", 0x00000, 0x08000, CRC(524cdc4f) SHA1(f778e53f664e911a5b992a4f85bcad1097eaa36f) )
+ /* ROMs banked at 8000-bfff */
+ ROM_LOAD( "a4.bin", 0x10000, 0x08000, CRC(13118eb1) SHA1(5a5da40c2cc82420f70bc58ffa32de1088c6c82f) )
+ ROM_LOAD( "a3.bin", 0x18000, 0x08000, CRC(94c75591) SHA1(7698bc4b7d20e554a73a489cd3a15ae61b350e37) )
+ /* 20000-2ffff empty */
+
+ ROM_REGION( 0x10000, "subcpu", 0 )
+ ROM_LOAD( "a5.bin", 0x0000, 0x08000, CRC(ae11a07b) SHA1(af7a335c8da637103103cc274e077f123908ebb7) )
+
+ ROM_REGION( 0x10000, "audiocpu", 0 )
+ ROM_LOAD( "a1.bin", 0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) )
+
+ ROM_REGION (0x80000, "gfx1", ROMREGION_INVERT) // TODO: fix ROM loading, this only has 0x50000 of GFX data instead of 0x60000 like other bootlegs
+ ROM_LOAD ("a11.bin", 0x00000, 0x10000, CRC(9034c8ab) SHA1(d80475c4508249e2347adc422e1efd87dc7cc916))
+ ROM_LOAD ("a10.bin", 0x10000, 0x10000, CRC(d370f499) SHA1(94ce157ff1a53fabf08abe5467531b94a56666a5))
+ ROM_LOAD ("a9.bin", 0x20000, 0x08000, CRC(7b5369a8) SHA1(1307b26d80e6f36ebe6c442bebec41d20066eaf9))
+ ROM_LOAD ("a8.bin", 0x40000, 0x10000, CRC(7f7377c1) SHA1(b1397969f96272df58d46a5e03c6c9756b723580))
+ ROM_LOAD ("a7.bin", 0x50000, 0x10000, CRC(42494016) SHA1(280c757b4330fa9a139cd4ecd98ec6df2b172311))
+ ROM_LOAD ("a6.bin", 0x60000, 0x08000, CRC(56709271) SHA1(2b4ee1a3aaa423b9ee1c58b5bb002660db619b9d))
+
+ ROM_REGION( 0x0100, "proms", 0 ) // not dumped for this set
+ ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */
+ROM_END
+
ROM_START( bub68705 )
ROM_REGION( 0x30000, "maincpu", 0 ) /* Program roms match Bubble Bobble (older) */
ROM_LOAD( "2.bin", 0x00000, 0x08000, CRC(32c8305b) SHA1(6bf69b3edfbefd33cd670a762b4bf0b39629a220) )
@@ -2081,6 +2107,7 @@ GAME( 1986, sboblbobla, bublbobl, boblbobl, boblbobl, bublbobl_state, init_co
GAME( 1986, sboblboblb, bublbobl, boblbobl, sboblboblb, bublbobl_state, init_common, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 3)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, sboblbobld, bublbobl, boblbobl, sboblboblb, bublbobl_state, init_common, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 4)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, sboblboble, bublbobl, boblbobl, sboblboblb, bublbobl_state, init_common, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 5)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, sboblboblf, bublbobl, boblbobl, sboblboblb, bublbobl_state, init_common, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 6)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // wrong GFX ROM loading
GAME( 1986, sboblboblc, bublbobl, boblbobl, sboblboblb, bublbobl_state, init_common, ROT0, "bootleg", "Super Bubble Bobble (bootleg)", MACHINE_SUPPORTS_SAVE ) // the title screen on this one isn't hacked
GAME( 1986, bub68705, bublbobl, bub68705, bublbobl, bub68705_state, init_common, ROT0, "bootleg", "Bubble Bobble (bootleg with 68705)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/cgc7900.cpp b/src/mame/drivers/cgc7900.cpp
index cc5774a751e..3e9c69f9e75 100644
--- a/src/mame/drivers/cgc7900.cpp
+++ b/src/mame/drivers/cgc7900.cpp
@@ -470,7 +470,6 @@ void cgc7900_state::cgc7900(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &cgc7900_state::cgc7900_mem);
m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cgc7900_state::cpu_space_map);
-
i8035_device &kbmcu(I8035(config, I8035_TAG, 1000000));
kbmcu.set_addrmap(AS_PROGRAM, &cgc7900_state::keyboard_mem);
kbmcu.set_disable();
diff --git a/src/mame/drivers/cgenie.cpp b/src/mame/drivers/cgenie.cpp
index b8728da66b5..81f3fb84297 100644
--- a/src/mame/drivers/cgenie.cpp
+++ b/src/mame/drivers/cgenie.cpp
@@ -358,7 +358,7 @@ MC6845_UPDATE_ROW( cgenie_state::crtc_update_row )
gfx = 0xff;
// or use character rom?
- else if ((code < 128) || (code < 192 && BIT(m_control, 4)) || (code > 192 && BIT(m_control, 3)))
+ else if ((code < 128) || (code < 192 && BIT(m_control, 4)) || (code >= 192 && BIT(m_control, 3)))
gfx = m_char_rom->base()[(code << 3) | ra];
// or the programmable characters?
diff --git a/src/mame/drivers/clickstart.cpp b/src/mame/drivers/clickstart.cpp
index 69d1fb1235e..d880e901af7 100644
--- a/src/mame/drivers/clickstart.cpp
+++ b/src/mame/drivers/clickstart.cpp
@@ -4,8 +4,9 @@
Leapfrog Clickstart Emulation
- die markings show
- "SunPlus QL8041C" ( known as Sunplus SPG2?? )
+ Die markings show "SunPlus QL8041C" ( known as Sunplus SPG2?? )
+ The keyboard has a "SunPlus PU6583" MCU under a glob, and the
+ mouse optical sensor is a N2163, probably from Agilent.
Status:
diff --git a/src/mame/drivers/cromptons.cpp b/src/mame/drivers/cromptons.cpp
index fd1701f1977..51473dd99ad 100644
--- a/src/mame/drivers/cromptons.cpp
+++ b/src/mame/drivers/cromptons.cpp
@@ -144,6 +144,9 @@ void cromptons_state::cromptons(machine_config &config)
ROM_START( ffruits )
ROM_REGION(0x10000, "maincpu", 0)
ROM_LOAD( "frntf5v6.ic11", 0x00000, 0x10000, CRC(ca60c557) SHA1(6f356827f0c93ec0376a7edc03963ef0748dccdb) ) // 27c512
+
+ ROM_REGION(0x2000, "timekpr", 0)
+ ROM_LOAD( "frntf_m48t08-100pc1.ic12", 0x0000, 0x2000, CRC(19f1c93a) SHA1(4fb01299c72e50c91af80939f8ffa8a8447f5211) )
ROM_END
diff --git a/src/mame/drivers/daryde.cpp b/src/mame/drivers/daryde.cpp
index 09c8b307702..7d59478ce29 100644
--- a/src/mame/drivers/daryde.cpp
+++ b/src/mame/drivers/daryde.cpp
@@ -2,7 +2,7 @@
// copyright-holders:AJR
/*******************************************************************************
- Skeleton driver for Daryde Panther Darts.
+ Skeleton driver for Daryde darts machines.
*******************************************************************************/
@@ -99,4 +99,45 @@ ROM_START(pandart)
ROM_LOAD("palce16v8h.ic1", 0x000, 0x117, NO_DUMP) // protected
ROM_END
+/* Daryde Cricket PCB
+ __________________________________________________
+ | ___________________ ___________________ |
+ | |_CN13 (12 pins)__| |___CN (12 pins)__| |
+ | ___ __ |
+ | _______ |H606016 ____ |C||
+ |__ |74LS273N |XTAL |N||
+ ||CN _____________ |
+ |__ | DS1225Y-150| ____________ __ |
+ ||C| |____________| | | | ||
+ ||N| _____________ |Z8018010VSC| |C||
+ ||6| |IC3 27C040 | |Z180 MPU | |N||
+ ||_| |____________| |___________| |9||
+ |__ _______ _______ _______ |_||
+ ||C| TDG2083AP |74LS273N |PALCE16B8 |
+ ||N| _______ _______ _______ __ |
+ ||5| |74LS273N |74LS273N |PALCE16B8 |C||
+ ||_| _______ _______ |N||
+ |__ |74HCT244N|74HC244N |8||
+ ||CN _______ _______ |_||
+ ||7| |74HC244N |74HC244N |
+ ||_| ______ _____ _____ _____ _____ |
+ | |CN14 ||JP1| |CN11| |CN2 | |CN10| |
+ |_________________________________________________|
+
+XTAL = 18.432MHz
+JP1 (4 bridges):
+ 2: VDD
+ 1: GND
+ 2: VDD
+ 1: GND */
+ROM_START(cricket)
+ ROM_REGION(0x80000, "program", 0)
+ ROM_LOAD("daryde_cricket_red_1.0.ic3", 0x00000, 0x80000, CRC(6abaa50e) SHA1(f128ed9cd9926684bd77ec708a5d3edf2736e39c)) // AM27C040
+
+ ROM_REGION(0x22e, "pal", 0)
+ ROM_LOAD("a_palce16v8h.ic4", 0x000, 0x117, NO_DUMP)
+ ROM_LOAD("b_palce16v8h.ic5", 0x117, 0x117, NO_DUMP)
+ROM_END
+
+GAME(1995, cricket, 0, pandart, pandart, daryde_state, empty_init, ROT0, "Daryde S. L.", "Cricket", MACHINE_IS_SKELETON_MECHANICAL)
GAME(1999, pandart, 0, pandart, pandart, daryde_state, empty_init, ROT0, "Daryde S. L.", "Panther Darts", MACHINE_IS_SKELETON_MECHANICAL)
diff --git a/src/mame/drivers/dragon.cpp b/src/mame/drivers/dragon.cpp
index c336b62b628..84d6ce7c096 100644
--- a/src/mame/drivers/dragon.cpp
+++ b/src/mame/drivers/dragon.cpp
@@ -111,10 +111,10 @@ static INPUT_PORTS_START( dragon_keyboard )
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) PORT_CHAR('^')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(10)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(9)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP), '^')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN), 10)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(UCHAR_MAMEKEY(LEFT), 8)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT), 9)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, dragon_state, keyboard_changed, nullptr) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
PORT_START("row6")
@@ -332,7 +332,7 @@ void dragon_alpha_state::dgnalpha(machine_config &config)
acia.set_xtal(1.8432_MHz_XTAL);
// floppy
- WD2797(config, m_fdc, 1_MHz_XTAL);
+ WD2797(config, m_fdc, 4_MHz_XTAL/4);
m_fdc->intrq_wr_callback().set(FUNC(dragon_alpha_state::fdc_intrq_w));
m_fdc->drq_wr_callback().set(FUNC(dragon_alpha_state::fdc_drq_w));
@@ -342,7 +342,7 @@ void dragon_alpha_state::dgnalpha(machine_config &config)
FLOPPY_CONNECTOR(config, WD2797_TAG ":3", dragon_alpha_floppies, nullptr, dragon_alpha_state::dragon_formats).enable_sound(true);
// sound hardware
- ay8912_device &ay8912(AY8912(config, AY8912_TAG, 1000000));
+ ay8912_device &ay8912(AY8912(config, AY8912_TAG, 4_MHz_XTAL/4));
ay8912.port_a_read_callback().set(FUNC(dragon_alpha_state::psg_porta_read));
ay8912.port_a_write_callback().set(FUNC(dragon_alpha_state::psg_porta_write));
ay8912.add_route(ALL_OUTPUTS, "speaker", 0.75);
@@ -447,12 +447,12 @@ ROM_END
#define rom_tanodr64h rom_tanodr64
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
-COMP( 1982, dragon32, 0, 0, dragon32, dragon, dragon_state, empty_init, "Dragon Data Ltd", "Dragon 32", 0 )
-COMP( 1983, dragon64, dragon32, 0, dragon64, dragon, dragon64_state, empty_init, "Dragon Data Ltd", "Dragon 64", 0 )
-COMP( 19??, dragon64h, dragon32, 0, dragon64h, dragon, dragon64_state, empty_init, "Dragon Data Ltd", "Dragon 64 (HD6309E CPU)", MACHINE_UNOFFICIAL )
-COMP( 1985, dragon200, dragon32, 0, dragon64, dragon, dragon64_state, empty_init, "Eurohard S.A.", "Dragon 200", 0 )
-COMP( 1985, dragon200e, dragon32, 0, dragon200e, dragon200e, dragon200e_state, empty_init, "Eurohard S.A.", "Dragon 200-E", MACHINE_NOT_WORKING )
-COMP( 1985, d64plus, dragon32, 0, d64plus, dragon, d64plus_state, empty_init, "Dragon Data Ltd / Compusense", "Dragon 64 Plus", 0 )
-COMP( 1983, tanodr64, dragon32, 0, tanodr64, dragon, dragon64_state, empty_init, "Dragon Data Ltd / Tano Ltd", "Tano Dragon 64 (NTSC)", 0 )
-COMP( 19??, tanodr64h, dragon32, 0, tanodr64h, dragon, dragon64_state, empty_init, "Dragon Data Ltd / Tano Ltd", "Tano Dragon 64 (NTSC; HD6309E CPU)", MACHINE_UNOFFICIAL )
-COMP( 1984, dgnalpha, dragon32, 0, dgnalpha, dragon, dragon_alpha_state, empty_init, "Dragon Data Ltd", "Dragon Professional (Alpha)", 0 )
+COMP( 1982, dragon32, 0, 0, dragon32, dragon, dragon_state, empty_init, "Dragon Data Ltd", "Dragon 32", 0 )
+COMP( 1983, dragon64, dragon32, 0, dragon64, dragon, dragon64_state, empty_init, "Dragon Data Ltd", "Dragon 64", 0 )
+COMP( 19??, dragon64h, dragon32, 0, dragon64h, dragon, dragon64_state, empty_init, "Dragon Data Ltd", "Dragon 64 (HD6309E CPU)", MACHINE_UNOFFICIAL )
+COMP( 1985, dragon200, dragon32, 0, dragon64, dragon, dragon64_state, empty_init, "Eurohard S.A.", "Dragon 200", 0 )
+COMP( 1985, dragon200e, dragon32, 0, dragon200e, dragon200e, dragon200e_state, empty_init, "Eurohard S.A.", "Dragon 200-E", MACHINE_NOT_WORKING )
+COMP( 1985, d64plus, dragon32, 0, d64plus, dragon, d64plus_state, empty_init, "Dragon Data Ltd / Compusense", "Dragon 64 Plus", 0 )
+COMP( 1983, tanodr64, dragon32, 0, tanodr64, dragon, dragon64_state, empty_init, "Dragon Data Ltd / Tano Ltd", "Tano Dragon 64 (NTSC)", 0 )
+COMP( 19??, tanodr64h, dragon32, 0, tanodr64h, dragon, dragon64_state, empty_init, "Dragon Data Ltd / Tano Ltd", "Tano Dragon 64 (NTSC; HD6309E)", MACHINE_UNOFFICIAL )
+COMP( 1984, dgnalpha, dragon32, 0, dgnalpha, dragon, dragon_alpha_state, empty_init, "Dragon Data Ltd", "Dragon Professional (Alpha)", 0 )
diff --git a/src/mame/drivers/ec184x.cpp b/src/mame/drivers/ec184x.cpp
index 98a3056406c..c2b47e8c307 100644
--- a/src/mame/drivers/ec184x.cpp
+++ b/src/mame/drivers/ec184x.cpp
@@ -47,6 +47,7 @@ public:
void ec1847(machine_config &config);
void ec1840(machine_config &config);
+ void init_ec1840();
void init_ec1841();
private:
@@ -153,6 +154,14 @@ WRITE8_MEMBER(ec184x_state::memboard_w)
m_memory.enable[offset] = data;
}
+void ec184x_state::init_ec1840()
+{
+ address_space &program = m_maincpu->space(AS_PROGRAM);
+
+ program.install_readwrite_bank(0, m_ram->size()-1, "bank10");
+ membank("bank10")->set_base(m_ram->pointer());
+}
+
void ec184x_state::init_ec1841()
{
address_space &program = m_maincpu->space(AS_PROGRAM);
@@ -206,7 +215,7 @@ void ec184x_state::ec1847_map(address_map &map)
void ec184x_state::ec1840_io(address_map &map)
{
map.unmap_value_high();
- map(0x0000, 0x00ff).m("mb", FUNC(ibm5150_mb_device::map));
+ map(0x0000, 0x00ff).m("mb", FUNC(ec1840_mb_device::map));
}
void ec184x_state::ec1841_io(address_map &map)
@@ -232,7 +241,7 @@ void ec184x_state::ec1840(machine_config &config)
m_maincpu->set_addrmap(AS_IO, &ec184x_state::ec1840_io);
m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
- IBM5150_MOTHERBOARD(config, "mb", 0).set_cputag(m_maincpu);
+ EC1840_MOTHERBOARD(config, "mb", 0).set_cputag(m_maincpu);
// FIXME: determine ISA bus clock
ISA8_SLOT(config, "isa1", 0, "mb:isa", ec184x_isa8_cards, "ec1840.0002", false);
@@ -246,7 +255,7 @@ void ec184x_state::ec1840(machine_config &config)
PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_EC_1841).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
- RAM(config, m_ram).set_default_size("512K");
+ RAM(config, m_ram).set_default_size("640K").set_extra_options("128K,256K,384K,512K");
}
void ec184x_state::ec1841(machine_config &config)
@@ -375,7 +384,7 @@ ROM_START( ec1847 )
ROM_END
// YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS
-COMP( 1987, ec1840, ibm5150, 0, ec1840, 0, ec184x_state, empty_init, "<unknown>", "EC-1840", MACHINE_NOT_WORKING )
+COMP( 1986, ec1840, ibm5150, 0, ec1840, 0, ec184x_state, init_ec1840, "<unknown>", "EC-1840", 0 )
COMP( 1987, ec1841, ibm5150, 0, ec1841, 0, ec184x_state, init_ec1841, "<unknown>", "EC-1841", 0 )
COMP( 1989, ec1845, ibm5150, 0, ec1841, 0, ec184x_state, init_ec1841, "<unknown>", "EC-1845", MACHINE_NOT_WORKING )
COMP( 1990, ec1847, ibm5150, 0, ec1847, 0, ec184x_state, empty_init, "<unknown>", "EC-1847", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/flkatck.cpp b/src/mame/drivers/flkatck.cpp
index 0e3955749f9..85e0e9e233c 100644
--- a/src/mame/drivers/flkatck.cpp
+++ b/src/mame/drivers/flkatck.cpp
@@ -10,6 +10,10 @@
TO DO:
-What does 0x900X do? (Z80)
+NOTE: There is known to exist a USA version of Flak Attack - currently not dumped
+
+24MHz & 3.579545MHz OSCs
+
***************************************************************************/
#include "emu.h"
@@ -214,11 +218,11 @@ void flkatck_state::machine_reset()
void flkatck_state::flkatck(machine_config &config)
{
/* basic machine hardware */
- HD6309(config, m_maincpu, 3000000*4); /* HD63C09EP, 24/8 MHz */
+ HD6309E(config, m_maincpu, 24_MHz_XTAL / 8); /* HD63C09EP, 3MHz (24MHz/8)*/
m_maincpu->set_addrmap(AS_PROGRAM, &flkatck_state::flkatck_map);
m_maincpu->set_vblank_int("screen", FUNC(flkatck_state::flkatck_interrupt));
- Z80(config, m_audiocpu, 3579545); /* NEC D780C-1, 3.579545 MHz */
+ Z80(config, m_audiocpu, 3.579545_MHz_XTAL); /* NEC D780C-1, 3.579545MHz */
m_audiocpu->set_addrmap(AS_PROGRAM, &flkatck_state::flkatck_sound_map);
config.m_minimum_quantum = attotime::from_hz(600);
@@ -246,9 +250,9 @@ void flkatck_state::flkatck(machine_config &config)
GENERIC_LATCH_8(config, m_soundlatch);
- YM2151(config, "ymsnd", 3579545).add_route(0, "lspeaker", 1.0).add_route(0, "rspeaker", 1.0);
+ YM2151(config, "ymsnd", 3.579545_MHz_XTAL).add_route(0, "lspeaker", 1.0).add_route(0, "rspeaker", 1.0);
- K007232(config, m_k007232, 3579545);
+ K007232(config, m_k007232, 3.579545_MHz_XTAL);
m_k007232->port_write().set(FUNC(flkatck_state::volume_callback));
m_k007232->add_route(0, "lspeaker", 0.50);
m_k007232->add_route(0, "rspeaker", 0.50);
@@ -259,45 +263,45 @@ void flkatck_state::flkatck(machine_config &config)
ROM_START( mx5000 )
- ROM_REGION( 0x18000, "maincpu", 0 ) /* 6309 code */
+ ROM_REGION( 0x18000, "maincpu", 0 ) /* 6309 code */
ROM_LOAD( "669_r01.16c", 0x010000, 0x006000, CRC(79b226fc) SHA1(3bc4d93717230fecd54bd08a0c3eeedc1c8f571d) ) /* banked ROM */
ROM_CONTINUE( 0x006000, 0x00a000 ) /* fixed ROM */
- ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the SOUND CPU */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the SOUND CPU */
ROM_LOAD( "669_m02.16b", 0x000000, 0x008000, CRC(7e11e6b9) SHA1(7a7d65a458b15842a6345388007c8f682aec20a7) )
- ROM_REGION( 0x080000, "gfx1", 0 )
- ROM_LOAD( "mask4m.5e", 0x000000, 0x080000, CRC(ff1d718b) SHA1(d44fe3ed5a3ba1b3036264e37f9cd3500b706635) ) /* tiles + sprites */
+ ROM_REGION( 0x080000, "gfx1", 0 ) /* tiles + sprites */
+ ROM_LOAD( "gx669f03.5e", 0x000000, 0x080000, CRC(ff1d718b) SHA1(d44fe3ed5a3ba1b3036264e37f9cd3500b706635) ) /* MASK4M */
- ROM_REGION( 0x040000, "k007232", 0 ) /* 007232 data (chip 1) */
- ROM_LOAD( "mask2m.11a", 0x000000, 0x040000, CRC(6d1ea61c) SHA1(9e6eb9ac61838df6e1f74e74bb72f3edf1274aed) )
+ ROM_REGION( 0x040000, "k007232", 0 ) /* 007232 data (chip 1) */
+ ROM_LOAD( "gx669f04.11a", 0x000000, 0x040000, CRC(6d1ea61c) SHA1(9e6eb9ac61838df6e1f74e74bb72f3edf1274aed) ) /* MASK2M */
ROM_END
ROM_START( flkatck )
- ROM_REGION( 0x18000, "maincpu", 0 ) /* 6309 code */
+ ROM_REGION( 0x18000, "maincpu", 0 ) /* 6309 code */
ROM_LOAD( "669_p01.16c", 0x010000, 0x006000, CRC(c5cd2807) SHA1(22ddd911a23954ff2d52552e07323f5f0ddaeead) ) /* banked ROM */
ROM_CONTINUE( 0x006000, 0x00a000 ) /* fixed ROM */
- ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the SOUND CPU */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the SOUND CPU */
ROM_LOAD( "669_m02.16b", 0x000000, 0x008000, CRC(7e11e6b9) SHA1(7a7d65a458b15842a6345388007c8f682aec20a7) )
- ROM_REGION( 0x080000, "gfx1", 0 )
- ROM_LOAD( "mask4m.5e", 0x000000, 0x080000, CRC(ff1d718b) SHA1(d44fe3ed5a3ba1b3036264e37f9cd3500b706635) ) /* tiles + sprites */
+ ROM_REGION( 0x080000, "gfx1", 0 ) /* tiles + sprites */
+ ROM_LOAD( "gx669f03.5e", 0x000000, 0x080000, CRC(ff1d718b) SHA1(d44fe3ed5a3ba1b3036264e37f9cd3500b706635) ) /* MASK4M */
- ROM_REGION( 0x040000, "k007232", 0 ) /* 007232 data (chip 1) */
- ROM_LOAD( "mask2m.11a", 0x000000, 0x040000, CRC(6d1ea61c) SHA1(9e6eb9ac61838df6e1f74e74bb72f3edf1274aed) )
+ ROM_REGION( 0x040000, "k007232", 0 ) /* 007232 data (chip 1) */
+ ROM_LOAD( "gx669f04.11a", 0x000000, 0x040000, CRC(6d1ea61c) SHA1(9e6eb9ac61838df6e1f74e74bb72f3edf1274aed) ) /* MASK2M */
ROM_END
// identical to flkatck except for the board / ROM type configuration
ROM_START( flkatcka )
- ROM_REGION( 0x18000, "maincpu", 0 ) /* 6309 code */
+ ROM_REGION( 0x18000, "maincpu", 0 ) /* 6309 code */
ROM_LOAD( "669_p01.16c", 0x010000, 0x006000, CRC(c5cd2807) SHA1(22ddd911a23954ff2d52552e07323f5f0ddaeead) ) /* banked ROM */
ROM_CONTINUE( 0x006000, 0x00a000 ) /* fixed ROM */
- ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the SOUND CPU */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the SOUND CPU */
ROM_LOAD( "669_m02.16b", 0x000000, 0x008000, CRC(7e11e6b9) SHA1(7a7d65a458b15842a6345388007c8f682aec20a7) )
- ROM_REGION( 0x080000, "gfx1", 0 ) /* tiles + sprites */ // same data as above set, on PWB 450593 sub-board instead.
+ ROM_REGION( 0x080000, "gfx1", 0 ) /* tiles + sprites */ // same data as above set, on PWB 450593 sub-board instead.
ROM_LOAD16_BYTE( "669_f03a.4b", 0x000001, 0x010000, CRC(f0ed4c1e) SHA1(58efe3cd81054d22de54a7d195aa3b865bde4a01) )
ROM_LOAD16_BYTE( "669_f03e.4d", 0x000000, 0x010000, CRC(95a57a26) SHA1(c8aa30c2c734c0740630b1b04ae43c69931cc7c1) )
ROM_LOAD16_BYTE( "669_f03b.5b", 0x020001, 0x010000, CRC(e2593f3c) SHA1(aa0f6d04015650eaef17c4a39f228eaccf9a2948) )
@@ -307,10 +311,10 @@ ROM_START( flkatcka )
ROM_LOAD16_BYTE( "669_f03d.7b", 0x060001, 0x010000, CRC(18d48f9e) SHA1(b95e38aa813e0f3a0dc6bd45fdb4bf71f7e2066c) )
ROM_LOAD16_BYTE( "669_f03h.7d", 0x060000, 0x010000, CRC(abfe76e7) SHA1(f8661f189308e83056ec442fa6c936efff67ba0a) )
- ROM_REGION( 0x040000, "k007232", 0 ) /* 007232 data (chip 1) */
- ROM_LOAD( "mask2m.11a", 0x000000, 0x040000, CRC(6d1ea61c) SHA1(9e6eb9ac61838df6e1f74e74bb72f3edf1274aed) )
+ ROM_REGION( 0x040000, "k007232", 0 ) /* 007232 data (chip 1) */
+ ROM_LOAD( "gx669f04.11a", 0x000000, 0x040000, CRC(6d1ea61c) SHA1(9e6eb9ac61838df6e1f74e74bb72f3edf1274aed) ) /* MASK2M */
ROM_END
-GAME( 1987, mx5000, 0, flkatck, flkatck, flkatck_state, empty_init, ROT90, "Konami", "MX5000", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, flkatck, mx5000, flkatck, flkatck, flkatck_state, empty_init, ROT90, "Konami", "Flak Attack (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, flkatcka,mx5000, flkatck, flkatck, flkatck_state, empty_init, ROT90, "Konami", "Flak Attack (Japan, PWB 450593 sub-board)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, mx5000, 0, flkatck, flkatck, flkatck_state, empty_init, ROT90, "Konami", "MX5000", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, flkatck, mx5000, flkatck, flkatck, flkatck_state, empty_init, ROT90, "Konami", "Flak Attack (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, flkatcka, mx5000, flkatck, flkatck, flkatck_state, empty_init, ROT90, "Konami", "Flak Attack (Japan, PWB 450593 sub-board)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/funworld.cpp b/src/mame/drivers/funworld.cpp
index e9e48ee1938..c9dfcd2eb3a 100644
--- a/src/mame/drivers/funworld.cpp
+++ b/src/mame/drivers/funworld.cpp
@@ -615,567 +615,6 @@
*****************************************************************************************
- *** Hardware Info ***
-
- Moved all technical info to the ROM load section...
-
-
-*****************************************************************************************
-
- *** Driver Updates ***
-
-
- [2005/09/08]
- - Added Cuore Uno, Elephant Family and Royal Card.
-
- [2005/09/19]
- - Added some clones.
- - Cleaned up and renamed all sets. Made parent-clone relationship.
-
- [2005/12/15]
- - Corrected CPU freq (2 MHz) in cuoreuno and elephfam (both have R65C02P2).
- (I suspect more games must have their CPU running at 2 MHz).
- - Corrected videoram and colorram offsets in cuoreuno and elephfam.
- - To initialize the NVRAM in cuoreuno and elephfam:
- Start game, press and hold Service1 & Service2, press reset (F3),
- release Service1 & Service2 and press reset (F3) again.
-
- [2006/10/18]
- - Corrected the screen size and visible area to cuoreuno and elephfam based on mc6845 registers.
- - Added all inputs to cuoreuno and elephfam.
- - Added test mode DIP switch to cuoreuno and elephfam.
- - Managed cuoreuno and elephfam inputs to pass the initial checks. Now both games are playable.
- - Changed the cuoreuno full name to "Cuore 1" (as shown in the attract).
-
- [2006/10/22-28]
- - Corrected cuoreuno and elephfam graphics to 4bpp.
- - Fixed elephfam gfx planes.
- - Simulated cuoreuno palette based on screenshots.
- - Simulated elephfam palette based on screenshots.
-
-
- [2006/11/01 to 2006/12/04]
-
- ******** REWRITE ********
-
- - Merged/splitted some machine drivers, memory maps and inputs.
- - Unified get_bg_tile_info for all games.
- - Mapped the input buttons in a better format (all games). Keys: 156-QW-ZXCVBNM.
- - Added proper color PROM decode routines.
- - Rewrote the technical notes.
- - Splitted the driver to driver/video.
-
- - Corrected the screen size and visible area to magiccrd based on mc6845 registers.
- - Added the remaining 2 GFX planes to magiccrd, but GFX are imperfect (bad decode or bad dump?).
- Color PROM need to be dumped.
- - Royalcrd: Added all inputs and DIP switches.
- Fixed memory map, gfx decode
- Corrected screen size and visible area based on mc6845 registers.
- Corrected CPU clock to 2mhz.
-
- - New game added: Joker Poker. Not working due to use of custom encrypted CPU.
- - New game added: Royal Card (Slovakia, encrypted). Not working due to use of a custom encrypted CPU.
- - Fixed jolycdcr gfx to 4bpp.
- - Other fixes to get jolycdcr running.
- - Managed royalcdb to work, using the 2nd half of program ROM. (seems to be mapped that way)
- - Managed jolycdit to work, but with imperfect graphics due to gfx encryption.
- - Fixed CPU clock to 2MHz. in all remaining games.
- - Fixed ay8910 frequency based on elephfam audio.
- - Fixed ay8910 volume in all games to avoid clipping.
- - Reworked jolycdcr inputs: The game was designed to work only with remote credits.
- After nvram init, set the payout dip to "manual".
- - Reworked jolycdit inputs: After nvram init, set the payout dip
- to "manual" to allow work the remote mode.
- - Set jolycdat as bigdeal clone. The game has the same layout/behaviour instead of the normal
- jolly card games, even when they are sharing gfx roms.
- - Added the bipolar PROM and GAL to jolycdit. Confirmed the GFX ROMs as good dumps.
- - Added an alternate set of Elephant Family. This one lacks of test mode and doesn't allow
- to switch between min-max bets through stop1.
- - Added color PROMs to cuoreuno and elephfam sets but still no routed.
- Also added PLDs (protected, bad dumps).
- - Corrected jollycrd screen size and visible area based on mc6845 registers.
- - Hooked, wired and decoded the color prom in jollycrd sets based on jolycdit redump.
- Now colors are perfect.
- - Wired and decoded the color prom in cuoreuno and elephfam sets.
- Now colors are perfect.
- - Wired and decoded the color prom in royalcrd. Now colors are perfect.
- - Hooked, wired and decoded the color prom in bigdeal sets based on jolycdat (jollycrd palette).
- Colors seems to be correct, but need to check against the real thing.
- Flagged as IMPERFECT_COLORS till a color PROM dump appear.
- - Decrypted jolycdit gfx roms.
- - Added set Jolly Card (Austria, encrypted).
- - Decrypted jolycdae and managed the planes to show correct colors. The set is working properly.
-
-
- [2006/12/24]
- - Fixed some incomplete inputs.
- - Added new working game: Pool 10.
- - Added new working game: Tortuga Family.
- - Added new game: Mongolfier New. Not working due to the lack of MCU emulation.
- - Added new game: Soccer New. Not working due to the lack of MCU emulation.
- - Updated technical notes.
-
- [2007/02/01]
- - All crystals documented via #defines.
- - All CPU and sound clocks derived from #defined crystal values.
- - Added DIPLOCATIONS to all games.
- - Added a pool10 alternate set.
- - Added proper tsc87c52 MCU dumps to monglfir and soccernew.
- - Modified the refresh rate to 60 fps according to some video evidences.
- - Updated technical notes.
-
- [2007/02/25]
- - Added new game: Snooker 10 (Ver 1.11). Preliminary.
- Properly decoded GFX
- Proper colors decoded.
- - Updated technical notes.
-
- [2007/09/21]
- - Added new game: Saloon (France, encrypted). Preliminary.
- - Updated technical notes.
-
- [2008/02/10]
- - Switched to XTAL def.
- - Fixed Magic Card II graphics issues.
- - Fixed Magic Card II inputs.
- - Fixed screen and visible area to snooker10.
- - Renamed set monglfir to mongolnw.
- - Renamed sets description based on languages instead of countries.
- - Added new game: Magic Card II (green TAB or Impera board). Not working yet.
- - Added new game: Magic Card II (blue TAB board, encrypted). Not working yet.
- - Added new game: Jolly Card (3x3 deal).
- - Added new game: Jolly Card Professional 2.0 (with 'enter code' screen to boot).
- - Added new game: Lucky Lady (3x3 deal).
- - Added new game: Lucky Lady (4x1 aces).
- - Added new game: Royal Vegas Joker Card (fast deal).
- - Added new game: Royal Vegas Joker Card (slow deal).
- - Fixed some years and manufacturers.
- - Updated technical notes.
- - Cleaned up the driver.
-
- [2008/02/22]
- - Switched the color decoding routines to use resnet code.
- - Added complete color connections to/from 74ls373 to the source.
-
- [2008/02/25]
- - Added new game: Royal Vegas Joker Card (fast deal, english gfx).
- - Added new game: Jolly Joker.
- - Added new game: Jolly Joker (50bet).
- - Added new game: Jolly Card (croatian, set 2).
- - Added new game: Jolly Card (Evona Electronic)
- - Added new game: Super Joly 2000 - 3x
- - Fixed some inputs.
- - Masked inputs to allow jolyjokra to boot.
- - Added minor corrections.
- - Updated technical notes.
-
- [2008/03/14]
- - Added proper inputs to jolyc980.
- - Added temporary patch to allow bypass the "code" screen in jolyc980.
- - Updated technical notes.
-
- [2008/03/18]
- - Added new game: Pot Game (italian).
- - Updated technical notes.
-
- [2008/04/18]
- - Removed the temporary hack to jolyc980.
- - Updated technical notes regarding Magic Card II & Jolly Card Professional 2.0.
- - Moved snookr10 to its own driver.
- - Minor clean-up.
-
- [2008/04/27]
- - Fixed AY8910 volume to all games to avoid clips.
- - Merge bigdeal and funworld machine drivers thanks to the AY8910 rewrite.
- - Removed old unaccurate commentary about magiccrd tiles.
-
- [2008/04/29]
- All CMC italian games:
- - Added TICKET and HOPPER buttons to allow payout through the SUPER GAME.
- - Documented the featured SUPER GAME with complete instructions.
- - Improved DIP switches to properly set the payout system.
-
- [2008/05/13]
- - Found the proper algorithm to decrypt the blue TAB PCB.
- - Replaced the old decryption tables with the proper decryption scheme.
- - Updated technical notes.
-
- [2008/07/30]
- - Added new clone: Pool 10 (italian, set 3).
- - Updated technical notes.
-
- [2008/09/12]
- - Added new clone: Pool 10 (italian, set 4).
- - Improved lamps layout for all games.
- - Added Pool 10 pinout and DIP switches info.
- - Updated technical notes.
-
- [2008/12/01]
- - Decripted saloon's program, graphics and color PROM.
- - Created a new memory map and machine driver for saloon.
- - Removed set jolycdae (not coming from a real board).
- - Renamed the sets magiccrd, magiccda and magiccdb, to magicrd2, magicd2a and magicd2b.
- - Updated technical notes.
-
- [2008/12/15]
- - Added new set: Jolly Card (italian, encrypted bootleg).
- No coins... Only remote credits. After nvram init, set the Payout DIP to 'manual'
- to allow the remote credits mode to work.
- - Created inputs from the scratch for jolycdib.
- - Updated technical notes.
-
- [2008-12-26]
- - Correctly setup the MC6845 device for all systems.
- - Added common MC6845 device interface.
- - Eliminated the screen size & visible area parameters to Magic Card 2.
-
- [2009/01/23]
- - Added new sets: Bottle 10 (italian, set 1 & 2).
- - Updated technical notes.
-
- [2009/09/09]
- - Discovered and documented new features in Jolly Card (Evona Electronics).
- - Removed the commented hack for joly980 driver init since is not needed anymore.
- - Fixed a bug introduced with the massive input change, that didn't allow initialize
- all sets that need the normal procedure to do it.
- - Updated technical notes.
-
- [2010/03/01]
- - Fixed Jolly Joker graphics and colors.
- - Changed Jolly Joker description to Jolly Joker (98bet).
- - Added a new croatian set of Jolly Joker with maximum bet = 40.
- - Moved the hardware description and tech notes to the ROM_LOAD section.
- - Added a external default NVRAM for Jolly Card Professional 2.0.
- - Updated technical notes.
-
- [2010/03/09]
- - Added external default NVRAM support to the following games:
- bottle10, bottl10b, elephfam, elephfmb, jollycrd, jolyc3x3,
- jolyccra, jolyccrb, jolycdev, jolycdib, jolycdit, jolyjokr,
- jolyjokra, jolyjokrb, lluck3x3, lluck4x1, magicrd2, pool10,
- pool10b, pool10c, pool10d, potgame, royalcrd, royalcdb,
- sjcd2kx3, tortufam, vegasfst, vegasfte and vegasslw.
- - Changed default settings for some games, now that NVRAM is
- loaded externally.
-
- [2010/03/15]
- - Removed all hacks in the rom load section. Now the involved sets
- are properly loaded in the same way the hardware does.
- - Replaced hardcoded values on graphics decode routines with proper
- RGN_FRAC calculations.
- - Fixed graphics bitplanes to involved games.
- - Added more hardware/technical info.
- - Modify the mongolnw machine driver. Now can see it starts.
- - Added Multi Win, from Fun World. The set is encrypted and use a
- custom CPU. Seems similar hardware than (multi) Joker Card.
- - Added Fun World Quiz. Needs proper banking, and both graphics and
- bipolar PROM redumps.
- - Added Fun World Quiz description, and hardware notes.
-
- - Improved inputs for Fun World Quiz.
- - Proper handlers and banking for Fun World Quiz questions.
- - Partial decryption for royalcdc and multiwin.
- - Complete Fun World Quiz DIP switches with dip locations.
- - Promoted Fun World Quiz to working state.
- - Added Fun World Quiz bookkeeping instructions notes.
- - Turned lamps off as default state for all supported game.
- - Changed default button-lamps layout to selective per game,
- since some games need different one, and some games lack
- of lamps at all.
-
- - Reworked button-lamps layouts per game. Cleaned-up the code.
- - Added specific button-lamps layout for bigdeal games.
- - Added specific button-lamps layout for royalcrd & jolycdit,
- but there is a bug in the d-up select code that lights the
- wrong lamp. This is a leftover from jollycrd routines.
- - Flagged vegasfte as MACHINE_NOT_WORKING, since is not receiving
- any coins or remote credits anymore.
-
- [2010/03/21]
- - Added dual-state palette (addressable through PLDs).
- This allow to choose which half of the palette will be addressed.
- - Splitted the main machine driver to cover both palette states.
- - Reworked inputs / DIP switches for vegasslw, vagasfst and vegasfte.
- - Created new default NVRAM for Royal Vegas Joker Card sets.
- These need to be configurated to be valid ones. Now vegasfte can
- receive remote credits, and all three in the family have valid
- min-max bet value and payout.
- - Removed the not working flag from vegasfte.
- - Improved colors for Big Deal sets.
- - Correct colors for Royal Vegas Joker Card sets.
-
- - Added a second set of Jolly Card Professional.
- Documented the code differences.
- - Added another Royal Vegas Joker Card set, from Mile.
- These sets aren't intended to work with coins. Only remote credits
- are allowed. There are external modules that can manage up to 4
- machines simultaneously, adding/removing/watching credits.
- - Added default NVRAM to the above sets.
- - Added proper inputs and DIP switches to vegasmil.
- - Replaced the jolyc980 default NVRAM with one totally clean.
- Temporal and total meters are cleared to zero.
-
- [2010/04/18]
- - Replaced the Fun World Quiz bad ROMs with good ones.
- - Fixed the Fun World Quiz graphics and colors.
- - Cleaned-up the flags for non working games.
- - Modified the default lamps layout to include the bet lamp.
- - Cleaned-up the Fun World Quiz inputs.
- - Added 4 new Royal Card sets. Reworked parent/clone relationship.
- (delete the old .cfg and .nv files to have them working properly).
- - Splitted the Royal Card machine driver. This is needed to access
- different halves of the bipolar PROM.
- - Now principle Royal Card sets have a working bet button.
- - Added default NVRAM to the new sets.
-
- [2011/04/04]
- - Added 'Witch Royal' from Video Klein. Seems a hybrid game
- from Witch Card and Royal Card...
- - Reworked the button-lamps layout to get the hold buttons
- more centered.
-
- [2011/10/20]
- - Added 'Novo Play Multi Card / Club Card' from Admiral/Novomatic.
- Seems a derivated game from Royal Vegas...
- - Added proper button-lamps support and layout.
- - Added default NVRAM, necessary to boot.
- - Added technical notes.
-
- [2012/10/11]
- - Added 'Mega Card (Ver 0263, encrypted)' from Fun World.
- - Added PCB layout.
- - GFX are properly decoded.
-
- [2012/10/27-29]
- - Added 'Bonus Card (German)' from Fun World.
- - Added PCB layouts.
- - Set Big Deal sets and Jolly Card hybrid as clones
- of Bonus Card.
- - Cleaned up the code.
- - Changed company name 'Funworld' to 'Fun World'.
- - Changed Mega Card to Power Card after check the real hardware running.
- - Fixed Power Card graphics ROM load..
- - Moved jolycdat program to Bonus Card, making it parent.
- This program is a real original Bonus Card program, and the PCB
- was populated with Jolly Card graphics wrongly. The other Bonus Card set
- was turned as clone, since has a fake copyright string (hack).
- - Renamed the internal layout artwork: bigdeal --> bonuscrd.
- - Default Bonus Card & Big Deal DIP switches positions, that
- allow boot the system without errors.
- - Added new Yugoslavian set of Magic Card 2 (Nov/New).
- - Added default NVRAM, needed to boot properly.
- - Rearrange the whole Magic Card 2 sets, and improved descriptions.
- - Added technical notes.
-
- [2012/11/08-09]
- - New Pool 10 set, from a Dino 4 encrypted hardware.
- - Added PCB layout and technical notes.
- - Decrypted the program data & address.
- - Decrypted the graphics ROMs address.
- - Added a default NVRAM.
- - Added button-lamps layout.
- - Promoted to working state.
- - Improved the PCB layout.
- - Added some technical notes.
- - Added PLD dumps to bonuscrd and powercrd.
-
- [2012/11/14]
- - Added a Jolly Card spanish set from an unknown encrypted
- PCB 'alla TAB blue board. Graphics are decrypted.
- - Decrypted the program ROM.
- - Added button-lamps layout.
- - Added a default NVRAM.
- - Promoted to working state.
-
- [2013/01/15]
- - Added a Jolly Card (Italian) set from an encrypted blue TAB
- bootleg board. This one allows to play in both 'remote' and
- 'normal' mode. The game could pay through regular hopper, or
- through manual switch/button, discharging the credits one
- by one.
-
- [2013/04/09]
- - Added default NVRAM to magicrd2b, magicrd2c and royalcrdp,
- allowing to boot them. Promoted to working state.
- - Removed the 'hack' in the Magic Card 2 sets description...
- Almost all the sets on this driver were hacked in different
- degrees. Not proof that these were released as originals,
- or just a hack.
-
- [2013/12/25]
- - Added default NVRAM to mongolnw and soccernw, allowing boot them.
- Both games are promoted to working state, but flagged as 'game
- unemulated protection' due to the lack of MCU emulation.
-
- [2014/01/23]
- - Added unknown encrypted Royal Card. This game is running on Dino 4
- encrypted hardware, with a CPU+PLCC daughterboard.
- - Decrypted program address + data, but code still jumps into $48xx
- range where there's no valid code.
- - Decoded and partially decrypted the graphics set.
-
- [2014/02/05]
- - Rcdino4: Fully decrypted the graphics set.
- - Added technical notes...
-
- [2014/02/10]
- - Added China Town. Running in Dino4 encrypted hardware.
- - Fully decrypted program and graphics set.
- - Worked out the extra protection.
- - Added button-lamps support + layout.
- - Added technical notes...
-
- [2014/02/16]
- - Added Luna Park (set 1, dual program). Running in modified
- CMC hardware, with video RAM 4000-4FFF mirrored in 6000-6FFF
- and color RAM 5000-5FFF mirrored in 7000-7FFF.
- This game has the highest address line of the program tied to
- DIP switch #1, so you can select between 2 different programs.
- Both programs write to videoram either to each video RAM ranges.
- - Added proper program ROM banking and connected to DIP switch #1.
- - Added Luna Park (set 2). This one writes to normal CMC video RAM.
- - Added Crystal Colours (CMC hardware).
- - Added default NVRAM to Crystal Colours (CMC hardware), allowing
- to boot with clean meters/settings.
- - Cleaned-up the machine drivers.
- - Derived clocks via #define.
- - Added technical notes.
-
- [2014/02/26]
- - Added Jolly Card (Italian, different colors, set 1).
- This set is running in a modified hardware with a big CPLD.
- - Added Jolly Card (Italian, different colors, set 2).
- - Added Royal Card (German, set 7).
- These are running in bootleg hardware.
- - Added technical notes.
-
- [2014/03/09]
- - Added Royal Card (French).
- This set is original, but running in a bootleg board.
- - Added a default NVRAM to get the game working.
- - Added technical notes.
-
- [2014/05/08]
- - Rcdino4: Fully decrypted the code set.
- - Corrected technical notes...
-
-
- [...2018/2019]
-
- Note: there are some undocumented improvements, additions and changes.
-
- - Added new Multi/Joker Card hardware from Funworld
- with epoxy brick CPU.
- - Added different sets from this hardware.
- - Added technical notes about the hardware and behaviour.
- - Change game description from Joker Card (Epoxy brick CPU)
- to Joker Card / Multi Card (Epoxy brick CPU).
- - Added NVRAM.
-
- - Support for custom CPUs' opcode decryption, affecting
- Multi Win, Power Card, Mega Card, Joker Card 300 (Amatic)
- and Royal Card (Slovak Encrypted).
-
- Fixed Saloon & added Nevada:
- - Added I2C bus and default serial EEPROM.
- - Added default NVRAM.
- - Improved memory map.
- - Removed PIAs.
- - Added DIP switches.
- - Reworked inputs.
- - Fixed colors.
- - Added technical notes.
-
- Fun World encrypted games improvements:
- - Moved the Multi Win class to the header.
- - Reworked the memory maps.
- - Fixed the ROM loads.
- - Changed tilemaps size.
- - Added new video start.
- - Extended the encryption range to covering the new ROM space.
- - Reworked inputs (still need some work).
- - Fixed graphics bitplanes & palettes.
- - Changed the jokercrd game description to Joker Card 300 (Ver.A267BC, encrypted).
- - Marked jokercrd graphics ROM IC10 as bad dump.
- - Demoted rcdino4 to not working since there are issues with the PIAs
- that doesn't allow the game to boot.
- - Added technical notes.
-
- Royal Card (Slovak, encrypted) improvements:
- - Modified the machine_config to bank the palette in a different way.
- - Inverted the graphics ROM load, fixing the bitplanes.
- Tiles now are visible, and have perfect colors.
- - Moved the royalcrdf class to the header.
- - Created new memory map.
- - Fixed the VRAM offsets.
-
- - Added default NVRAM to Royal Card (Italian, Dino 4 hardware, encrypted).
- - Promoted the game to Working.
- - Added technical and game notes.
-
- - Marked royalcrdc graphics ROM roj.ic26 as bad dump.
- address line 08 is faulty, so you have 0x100 bytes blocks repeated
- along the dump.
- - Reworked jolycdig and added default NVRAM.
- - Added button-lamps support to jolycdig & jolycdab.
- Both games were promoted to working state.
- - Added technical and game notes.
-
- Unknown Inter Games poker improvements:
- - Reworked memory map.
- - Found the real VRAM offset.
- - Added splitted attr/color RAM.
- - Mirrored attr/color RAM for separated writes.
- - Hooked the AY8910 properly.
- - Changed CPU from 65C02 to 65SC02.
- - Generated periodic interrupts.
- - Temporarily patched some hardware checks.
- - Added default NVRAM.
- - Changed game description to Joker Card (Inter Games).
- - Promoted the game to Working.
- - Added technical notes.
-
- - Readded CRTC and nuked the periodic interrupt.
- - Added support for multiplexed CRTC & AY8910.
-
- Fun World Quiz:
- - Added 2 new sets.
- - Adjust the questions Roms load/banking.
- - Reworked Inputs from the scratch.
-
- - Switched Austrian-->German for all sets, since the language
- is in fact German.
-
- Royal Card (Slovak, encrypted):
- - Adjusted the decryption offsets.
- - Improved memory map.
- - Mirrored PIA #0 to $6800, and PIA #1 to $6000.
- - Improved inputs.
- - Created a default NVRAM.
- - Changed game description to Royal Card (Evona, Polish, encrypted).
- - Switched the CPU base to R65C02 to avoid the bug when a NMI occurs in a BRK.
- - Added a temporary workaround to force a NOP after the BRK, and
- balanced checksums. Will be removed once found a workaround in
- the decryption routines.
- - Added technical and game notes.
- - Promoted the game to working.
-
- Royal Card (German, set 4):
- - Verified the GFX dump as a mix of Royal Card
- & Jolly Card graphics, with faulty address.
- Used GFX set from parent, that matches 100%.
- - Removed the imperfect graphics flag.
-
- Joker Card 300 (Ver.A267BC, encrypted):
- - Redumped the faulty graphics ROM thanks to a special
- custom device constructed with forensics technics.
- - Removed the imperfect graphics flag.
- - Promoted the game to working.
- - Added technical and game notes.
-
- - I2C bus inclusion only for Saloon/Nevada instead of all games.
-
-
*** TO DO ***
@@ -1193,11 +632,6 @@
****************************************************************************************/
-#define MASTER_CLOCK XTAL(16'000'000)
-#define CPU_CLOCK (MASTER_CLOCK/8)
-#define SND_CLOCK (MASTER_CLOCK/8)
-#define CRTC_CLOCK (MASTER_CLOCK/8)
-
#include "emu.h"
#include "includes/funworld.h"
@@ -1214,6 +648,12 @@
#include "royalcrd.lh"
+#define MASTER_CLOCK XTAL(16'000'000)
+#define CPU_CLOCK (MASTER_CLOCK/8)
+#define SND_CLOCK (MASTER_CLOCK/8)
+#define CRTC_CLOCK (MASTER_CLOCK/8)
+
+
/**********************
* Read/Write Handlers *
**********************/
diff --git a/src/mame/drivers/gaelco2.cpp b/src/mame/drivers/gaelco2.cpp
index bfdca583fdd..35b14dc18bc 100644
--- a/src/mame/drivers/gaelco2.cpp
+++ b/src/mame/drivers/gaelco2.cpp
@@ -43,31 +43,22 @@
#include "speaker.h"
-#define TILELAYOUT16(NUM) static const gfx_layout tilelayout16_##NUM = \
-{ \
- 16,16, /* 16x16 tiles */ \
- NUM/32, /* number of tiles */ \
- 5, /* 5 bpp */ \
- { 4*NUM*8, 3*NUM*8, 2*NUM*8, 1*NUM*8, 0*NUM*8 }, \
- { 0,1,2,3,4,5,6,7, 16*8+0,16*8+1,16*8+2,16*8+3,16*8+4,16*8+5,16*8+6,16*8+7 }, \
- { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8, 8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8 }, \
- 32*8 \
+static const gfx_layout tilelayout16 =
+{
+ 16,16, /* 16x16 tiles */
+ RGN_FRAC(1,5), /* number of tiles */
+ 5, /* 5 bpp */
+ { RGN_FRAC(4,5), RGN_FRAC(3,5), RGN_FRAC(2,5), RGN_FRAC(1,5), 0 },
+ { STEP8(0,1), STEP8(16*8,1) },
+ { STEP16(0,8) },
+ 32*8
};
-#define GFXDECODEINFO(NUM,ENTRIES) \
-static GFXDECODE_START( gfx_##NUM )\
- GFXDECODE_ENTRY( "gfx1", 0x0000000, tilelayout16_##NUM,0, ENTRIES ) \
+static GFXDECODE_START( gfx_gaelco2 )
+ GFXDECODE_ENTRY( "gfx1", 0, tilelayout16, 0, 128 )
GFXDECODE_END
-TILELAYOUT16(0x0080000)
-GFXDECODEINFO(0x0080000, 128)
-TILELAYOUT16(0x0200000)
-GFXDECODEINFO(0x0200000, 128)
-TILELAYOUT16(0x0400000)
-GFXDECODEINFO(0x0400000, 128)
-
-
/*============================================================================
COMMON
@@ -197,7 +188,7 @@ void gaelco2_state::maniacsq(machine_config &config)
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
screen.set_palette(m_palette);
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0080000);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
@@ -480,7 +471,7 @@ void gaelco2_state::saltcrdi(machine_config &config)
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
screen.set_palette(m_palette);
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0080000); /* gfx_0x0040000 */
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
@@ -737,7 +728,7 @@ void gaelco2_state::play2000(machine_config &config)
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
screen.set_palette(m_palette);
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0200000);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
@@ -843,7 +834,7 @@ void bang_state::bang(machine_config &config)
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
screen.set_palette(m_palette);
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0200000);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
@@ -1082,7 +1073,7 @@ void gaelco2_state::alighunt(machine_config &config)
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising));
screen.set_palette(m_palette);
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0400000);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
@@ -1378,7 +1369,7 @@ void gaelco2_state::touchgo(machine_config &config)
/* video hardware */
BUFFERED_SPRITERAM16(config, m_spriteram);
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0400000);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
config.set_default_layout(layout_dualhsxs);
@@ -1696,7 +1687,7 @@ void gaelco2_state::snowboar(machine_config &config)
screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising));
screen.set_palette(m_palette);
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0400000);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
@@ -1740,7 +1731,7 @@ void gaelco2_state::maniacsqs(machine_config &config)
screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising));
screen.set_palette(m_palette);
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0080000);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
MCFG_VIDEO_START_OVERRIDE(gaelco2_state,gaelco2)
@@ -1976,7 +1967,7 @@ void wrally2_state::wrally2(machine_config &config)
/* video hardware */
BUFFERED_SPRITERAM16(config, m_spriteram);
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_0x0200000);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco2);
PALETTE(config, m_palette).set_entries(4096*16 - 16); /* game's palette is 4096 but we allocate 15 more for shadows & highlights */
config.set_default_layout(layout_dualhsxs);
diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp
index a2bc969d8b4..8b9d4128768 100644
--- a/src/mame/drivers/galaxian.cpp
+++ b/src/mame/drivers/galaxian.cpp
@@ -9775,6 +9775,33 @@ ROM_START( mooncrs4 )
ROM_LOAD( "prom.6l", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) )
ROM_END
+ROM_START( mooncrs5 )
+ ROM_REGION( 0x8000, "maincpu", 0 ) // only the first program ROM differ from mooncrs2. The last is identical but for being double size with identical halves.
+ ROM_LOAD( "f_r_a.bin", 0x0000, 0x0800, CRC(73cd07cf) SHA1(489d14846f5a4ad55a1b4ab55dff312e4ffc68c0) )
+ ROM_LOAD( "f_f_a.bin", 0x0800, 0x0800, CRC(ee262ff2) SHA1(4e2202023ad53109ea58304071735d2425a617f3) )
+ ROM_LOAD( "f_f_b.bin", 0x1000, 0x0800, CRC(29a2b0ab) SHA1(e9fc7161d0566e36307c45b7132e2262c0af4845) )
+ ROM_LOAD( "f_r_c.bin", 0x1800, 0x0800, CRC(4c6a5a6d) SHA1(366516f63c9b5239e703e4dfb672659049ddbf44) )
+ ROM_LOAD( "f_r_d.bin", 0x2000, 0x0800, CRC(06d378a6) SHA1(99dbe9fc7f95f8fdce86eb5c32bd1ca1bea0ca3c) )
+ ROM_LOAD( "f_f_e.bin", 0x2800, 0x0800, CRC(6e84a927) SHA1(82e8e825d157c3c947a3a222bca059a735169c7d) )
+ ROM_LOAD( "f_f_f.bin", 0x3000, 0x0800, CRC(b45af1e8) SHA1(d7020774707234acdaef5c655f667d5ee9e54a13) )
+ ROM_LOAD( "f_r_f.bin", 0x3800, 0x0800, CRC(2d36a3e6) SHA1(9b7b5203dd421a4d9bb310594edd30f5111e9e40) ) // 1st and 2nd half identical
+
+ ROM_REGION( 0x2000, "gfx1", 0 )
+ ROM_LOAD( "r_r_a.bin", 0x0000, 0x0800, CRC(528da705) SHA1(d726ee18b79774c982f88afb2a508eb5d5783193) )
+ ROM_LOAD( "r_f_a.bin", 0x0800, 0x0200, CRC(5a4b17ea) SHA1(8a879dc34fdecc8a121c4a87abb981212fb05945) )
+ ROM_CONTINUE( 0x0c00, 0x0200 ) /* this version of the gfx ROMs has two */
+ ROM_CONTINUE( 0x0a00, 0x0200 ) /* groups of 16 sprites swapped */
+ ROM_CONTINUE( 0x0e00, 0x0200 )
+ ROM_LOAD( "r_r_b.bin", 0x1000, 0x0800, CRC(4e79ff6b) SHA1(f72386a3766a7fcc7b4b8cedfa58b8d57f911f6f) )
+ ROM_LOAD( "r_f_b.bin", 0x1800, 0x0200, CRC(e0edccbd) SHA1(0839a4c9b6e863d12253ae8e1732e80e08702228) )
+ ROM_CONTINUE( 0x1c00, 0x0200 )
+ ROM_CONTINUE( 0x1a00, 0x0200 )
+ ROM_CONTINUE( 0x1e00, 0x0200 )
+
+ ROM_REGION( 0x0020, "proms", 0 ) // not dumped for this set
+ ROM_LOAD( "mmi6331.6l", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) )
+ROM_END
+
ROM_START( mooncrstso )
ROM_REGION( 0x8000, "maincpu", 0 )
ROM_LOAD( "1.bin", 0x0000, 0x0800, CRC(0357ab1a) SHA1(153c3134b7d09817230b4d18a4ba713022c1887e) )
@@ -12754,6 +12781,7 @@ GAME( 1980, mooncrsb, mooncrst, mooncrst, mooncrsa, galaxian_state, init_
GAME( 1980, mooncrs2, mooncrst, mooncrst, mooncrsa, galaxian_state, init_mooncrsu, ROT90, "bootleg", "Moon Cresta (bootleg set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1980, mooncrs3, mooncrst, mooncrst, mooncrst, galaxian_state, init_mooncrsu, ROT90, "bootleg (Jeutel)", "Moon Cresta (bootleg set 3)", MACHINE_SUPPORTS_SAVE ) /* Jeutel bootleg, similar to bootleg set 2 */
GAME( 1980, mooncrs4, mooncrst, mooncrst, mooncrst, galaxian_state, init_mooncrsu, ROT90, "bootleg (SG-Florence)", "Moon Crest (Moon Cresta bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1980, mooncrs5, mooncrst, mooncrst, mooncrst, galaxian_state, init_mooncrsu, ROT90, "bootleg", "Moon Cresta (bootleg set 4)", MACHINE_SUPPORTS_SAVE )
GAME( 1980, fantazia, mooncrst, mooncrst, fantazia, galaxian_state, init_mooncrsu, ROT90, "bootleg (Subelectro)", "Fantazia (bootleg?)", MACHINE_SUPPORTS_SAVE )
GAME( 1981?,spctbird, mooncrst, mooncrst, eagle2, galaxian_state, init_mooncrsu, ROT90, "bootleg (Fortrek)", "Space Thunderbird", MACHINE_SUPPORTS_SAVE )
GAME( 1980?,smooncrs, mooncrst, mooncrst, smooncrs, galaxian_state, init_mooncrsu, ROT90, "bootleg (Gremlin)", "Super Moon Cresta (Gremlin, bootleg)", MACHINE_SUPPORTS_SAVE ) // probably a bootleg, still has the 'POR' text in the bottom right corner that the Sonic version has?!
diff --git a/src/mame/drivers/goldnpkr.cpp b/src/mame/drivers/goldnpkr.cpp
index fe44e74d255..b1bb0056821 100644
--- a/src/mame/drivers/goldnpkr.cpp
+++ b/src/mame/drivers/goldnpkr.cpp
@@ -27,6 +27,7 @@
* Jack Potten's Poker (set 9, 'just 4 fun'), 198?, Bootleg.
* Jack Potten's Poker (set 10, ICP-1 PCB), 198?, Bootleg.
* Jack Potten's Poker (set 11, German, W.W.), 198?, Bootleg.
+ * Jack Potten's Poker (set 12, no Double-Up), 198?, Bootleg.
* Jack Potten's Poker (NGold, set 1), 198?, Unknown.
* Jack Potten's Poker (NGold, set 2), 198?, Unknown.
* Jack Potten's Poker (NGold, set 3), 198?, Unknown.
@@ -5152,6 +5153,65 @@ ROM_START( potnpkri )
ROM_LOAD( "prom.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump OK */
ROM_END
+/*
+ Unknown Potten's Poker.
+ German bootleg (W.W.).
+ Set 11.
+
+ Need to BET in each hand.
+*/
+ROM_START( potnpkrj )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "pok5.a11", 0x5000, 0x1000, CRC(60140393) SHA1(f24a4435fe44d14053e28c7cb144ae00f66d74cb) )
+ ROM_LOAD( "pok6.a13", 0x6000, 0x1000, CRC(58161c72) SHA1(c5607a843ca1b4bde9999f265acae835ab9832fc) )
+ ROM_LOAD( "pok7.a14", 0x7000, 0x1000, CRC(38d92f95) SHA1(9523ef5fae57ad7cdd3fe52667a9670fdca8aa75) )
+
+ ROM_REGION( 0x1800, "gfx1", 0 )
+ ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */
+ ROM_LOAD( "pok4_ww.a7", 0x1000, 0x0800, CRC(5cafb3a9) SHA1(efec24d4dd1f83f40a1b7ec66bc6bf36c4b1e541) ) // text chars
+
+ ROM_REGION( 0x1800, "gfx2", 0 )
+ ROM_LOAD( "7.a2", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane 1
+ ROM_LOAD( "8.a4", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane 2
+ ROM_LOAD( "9.a5", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane 3
+
+ ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM, otherwise settings parameters are incorrect
+ ROM_LOAD( "potnpkrj_nvram.bin", 0x0000, 0x0800, CRC(7c5206ce) SHA1(fc6e9b8d21184b8220b8835696d7eb2d071f5475) )
+
+ ROM_REGION( 0x0100, "proms", 0 )
+ ROM_LOAD( "tbp24s10.d7", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // color PROM
+ROM_END
+
+/*
+ Unknown Potten's Poker.
+ English bootleg with Bonanza's graphics.
+ Set 12.
+
+ No Double-Up.
+ Need to BET in each hand.
+*/
+ROM_START( potnpkrk )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "07.a13", 0x6000, 0x1000, CRC(cdb86a7d) SHA1(d1c20aa6484bbaa794bfba993f21ae0bc199db7a) )
+ ROM_LOAD( "08.a15", 0x7000, 0x1000, CRC(cb4502f4) SHA1(abe0916f01a1b3742e99e0da5f1b5c6a0e7e7dbd) )
+
+ ROM_REGION( 0x1800, "gfx1", 0 )
+ ROM_FILL( 0x0000, 0x1000, 0x0000 ) // filling the R-G bitplanes
+ ROM_LOAD( "8.a7", 0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) ) // text chars
+
+ ROM_REGION( 0x1800, "gfx2", 0 )
+ ROM_LOAD( "4.a2", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane 1
+ ROM_LOAD( "6.a4", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane 2
+ ROM_LOAD( "7.a5", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane 3
+
+ ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM, otherwise settings parameters are incorrect
+ ROM_LOAD( "potnpkrk_nvram.bin", 0x0000, 0x0800, CRC(87970f3f) SHA1(3130594c83407e13f2b08027188b333f29dce568) )
+
+ ROM_REGION( 0x0100, "proms", 0 )
+ ROM_LOAD( "n82s129n.d7", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // color PROM
+ROM_END
+
+
ROM_START( goodluck )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "goodluck_glh6b.bin", 0x0000, 0x8000, CRC(2cfa4a2c) SHA1(720e2900f3a0ef2632aa201a63b5eba0570e6aa3) )
@@ -10383,31 +10443,6 @@ ROM_START( bonuspkr )
ROM_END
-/*
- Unknown Potten's Poker.
- German bootleg (W.W.).
- Set 11.
-*/
-ROM_START( potnpkrj )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pok5.a11", 0x5000, 0x1000, CRC(60140393) SHA1(f24a4435fe44d14053e28c7cb144ae00f66d74cb) )
- ROM_LOAD( "pok6.a13", 0x6000, 0x1000, CRC(58161c72) SHA1(c5607a843ca1b4bde9999f265acae835ab9832fc) )
- ROM_LOAD( "pok7.a14", 0x7000, 0x1000, CRC(38d92f95) SHA1(9523ef5fae57ad7cdd3fe52667a9670fdca8aa75) )
-
- ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0x0000 ) /* filling the R-G bitplanes */
- ROM_LOAD( "pok4_ww.a7", 0x1000, 0x0800, CRC(5cafb3a9) SHA1(efec24d4dd1f83f40a1b7ec66bc6bf36c4b1e541) ) // text chars
-
- ROM_REGION( 0x1800, "gfx2", 0 )
- ROM_LOAD( "7.a2", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) // cards deck gfx, bitplane 1
- ROM_LOAD( "8.a4", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) // cards deck gfx, bitplane 2
- ROM_LOAD( "9.a5", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) // cards deck gfx, bitplane 3
-
- ROM_REGION( 0x0100, "proms", 0 )
- ROM_LOAD( "tbp24s10.d7", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // color PROM
-ROM_END
-
-
ROM_START( royale )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "royalex.bin", 0x4000, 0x4000, CRC(ef370617) SHA1(0fc5679e9787aeea3bc592b36efcaa20e859f912) )
@@ -11595,7 +11630,8 @@ GAMEL( 198?, potnpkrf, pottnpkr, goldnpkr, goldnpkr, goldnpkr_state, empty_init
GAMEL( 198?, potnpkrg, pottnpkr, pottnpkr, potnpkra, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 8, Australian)", 0, layout_goldnpkr )
GAMEL( 198?, potnpkrh, pottnpkr, pottnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 9, 'just 4 fun')", 0, layout_goldnpkr )
GAMEL( 198?, potnpkri, pottnpkr, pottnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 10, ICP-1 PCB)", 0, layout_goldnpkr ) // unencrypted IPC-1 PCB.
-GAME( 198?, potnpkrj, pottnpkr, goldnpkr, pmpoker, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 11, German, W.W.)", MACHINE_NOT_WORKING )
+GAMEL( 198?, potnpkrj, pottnpkr, goldnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 11, German, W.W.)", 0, layout_goldnpkr )
+GAMEL( 198?, potnpkrk, pottnpkr, goldnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 12, no Double-Up)", 0, layout_goldnpkr )
GAMEL( 198?, ngold, pottnpkr, pottnpkr, ngold, goldnpkr_state, empty_init, ROT0, "<unknown>", "Jack Potten's Poker (NGold, set 1)", 0, layout_goldnpkr )
GAMEL( 198?, ngolda, pottnpkr, pottnpkr, ngold, goldnpkr_state, empty_init, ROT0, "<unknown>", "Jack Potten's Poker (NGold, set 2)", 0, layout_goldnpkr )
GAMEL( 198?, ngoldb, pottnpkr, pottnpkr, ngoldb, goldnpkr_state, empty_init, ROT0, "<unknown>", "Jack Potten's Poker (NGold, set 3)", 0, layout_goldnpkr )
diff --git a/src/mame/drivers/m72.cpp b/src/mame/drivers/m72.cpp
index e5dc5e0584c..87a76c52780 100644
--- a/src/mame/drivers/m72.cpp
+++ b/src/mame/drivers/m72.cpp
@@ -2730,8 +2730,8 @@ ROM_START( imgfightb ) // mostly identical to imgfightj content-wise, it's a 4 P
ROM_LOAD( "ic33.3h", 0x30000, 0x10000, CRC(4c682785) SHA1(f61f1227e0ad629fdfca106306b17a9f6a9959e3) )
ROM_REGION( 0x20000, "samples", 0 ) /* samples, identical */
- ROM_LOAD( "ic28.lower.2n.bin", 0x00000, 0x10000, CRC(cb64a194) SHA1(940fad6b9147bccc8290e112f5973f8ea062b52f) )
- ROM_LOAD( "ic28.lower.2n.bin", 0x10000, 0x10000, CRC(45b68bf5) SHA1(2fb28793019ca85b3b6d7c4c31eedff1d71f2d83) )
+ ROM_LOAD( "ic28.lower.2n", 0x00000, 0x10000, CRC(cb64a194) SHA1(940fad6b9147bccc8290e112f5973f8ea062b52f) )
+ ROM_LOAD( "ic28.upper.2n", 0x10000, 0x10000, CRC(45b68bf5) SHA1(2fb28793019ca85b3b6d7c4c31eedff1d71f2d83) )
ROM_END
ROM_START( loht )
diff --git a/src/mame/drivers/mac128.cpp b/src/mame/drivers/mac128.cpp
index 9d30ed6c58f..339d1baba75 100644
--- a/src/mame/drivers/mac128.cpp
+++ b/src/mame/drivers/mac128.cpp
@@ -714,10 +714,7 @@ WRITE16_MEMBER ( mac128_state::mac_via_w )
if (LOG_VIA)
logerror("mac_via_w: offset=0x%02x data=0x%08x\n", offset, data);
- if (ACCESSING_BITS_0_7)
- m_via->write(offset, data & 0xff);
- if (ACCESSING_BITS_8_15)
- m_via->write(offset, (data >> 8) & 0xff);
+ m_via->write(offset, (data >> 8) & 0xff);
m_maincpu->adjust_icount(m_via_cycles);
}
diff --git a/src/mame/drivers/miniboy7.cpp b/src/mame/drivers/miniboy7.cpp
index 55806601093..e4a488c6e22 100644
--- a/src/mame/drivers/miniboy7.cpp
+++ b/src/mame/drivers/miniboy7.cpp
@@ -2,20 +2,25 @@
// copyright-holders:Roberto Fresca
/******************************************************************************
- MINI-BOY 7
+ MINI-BOY 7 / SUPER MINI-BOY.
+ Bonanza Enterprises, Ltd.
Driver by Roberto Fresca.
+
Games running on this hardware:
- * Mini-Boy 7 - 1983, Bonanza Enterprises, Ltd.
+ * Mini-Boy 7, 1983, Bonanza Enterprises, Ltd.
+ * Super Mini-Boy, 1984, Bonanza Enterprises, Ltd.
*******************************************************************************
Game Notes:
- Mini-Boy 7. Seven games in one, plus Ad message support.
+ * Mini-Boy 7.
+
+ Seven games in one, plus Ad message support.
http://www.arcadeflyers.com/?page=thumbs&db=videodb&id=4275
- Draw Poker.
@@ -29,11 +34,25 @@
During attract mode display, pressing the service menu will allow you to
add a custom ad to scroll during attract mode display. Up to 120 characters
+
+ * Super Mini-Boy
+
+ Five games in one.
+
+ - Poker.
+ - Black Jack.
+ - Hi-Lo.
+ - Golden Fruits.
+ - Baccarat.
+
+
*******************************************************************************
Hardware Notes:
--------------
+ * Mini-Boy 7:
+
Board silkscreened on top:
be MVX-001-01 ('be' is a Bonanza Enterprises logo).
@@ -60,6 +79,35 @@
- 2x pots to handle the B-G background color/intensity.
+ * Super Mini-Boy:
+
+ Board silkscreened on top:
+ be MVX-001-02 ('be' is a Bonanza Enterprises logo).
+
+ - CPU: 1x R6502P.
+ - Sound: 1x AY-3-8910.
+ - Video: 1x HD46505SP HD6845SP.
+ - RAM: 4x MSM2128-15
+ - I/O 1x MC6821P PIA.
+ - PRG ROMs: 5x 2764 (8Kb).
+ - GFX ROMs: 1x 2764 (8Kb) for text layer.
+ 3x 2764 (8Kb) for gfx tiles.
+
+ - Clock: 1x 12.4725 MHz. Crystal.
+
+ - Battery backup: (unknown)
+
+ - 1x normal switch (SW1)
+ - 1x 8 DIP switches bank (SW2)
+ - 1x 4 DIP switches bank (SW3)
+
+ - 1x 2x28 pins edge connector.
+ - 1x 2x20 pins female connector.
+
+ - 6x variable resistor to handle B-G background color/intensity
+ and other things.
+
+
*******************************************************************************
--------------------
@@ -75,11 +123,11 @@
$1800 - $1FFF Video RAM B
$2000 - $27FF Color RAM B
- $2800 - $2801 MC6845 ; MC6845 use $2800 for register addressing and $2801 for register values.
+ $2800 - $2801 MC6845 ; $2800 for register addressing & $2801 for register values.
- $3000 - $3001 ????? ; R/W. AY8910?
- $3080 - $3083 MC6821 ; R/W. PIA
- $3800 - $3800 ????? ; R.
+ $3000 - $3001 AY-3-8910 ; R/W.
+ $3080 - $3083 MC6821 PIA ; R/W.
+ $3800 - $3800 ????? ; R.
$4000 - $FFFF ROM ; ROM space.
@@ -91,7 +139,6 @@
*******************************************************************************
-
DRIVER UPDATES:
@@ -123,13 +170,24 @@
- Added debug and technical notes.
- TODO:
+ [2011... 2019]
+
+ - Wired PIA and AY8910 properly.
+ - Implemented and documented the PIA port B multiplexion.
+ - Lot of fixes, getting Mini-Boy 7 working.
+ - Added support for Super Mini-Boy.
+ - Added technical and games notes.
+ - Some clean-up.
- - Find the way to clean the lamps writes.
- (there are alternate writes that mess the lamps)
+ TODO:
+
+ - Find the Super Mini-Boy missing input(s): HOLD 1 and SMALL.
+ maybe these are the same line/button.
+ - Lamps support for Super Mini-Boy.
- Implement fake pots for B-G background color
+
*******************************************************************************/
#include "emu.h"
@@ -171,10 +229,11 @@ public:
void miniboy7(machine_config &config);
private:
- DECLARE_WRITE8_MEMBER(ay_pa_w);
- DECLARE_WRITE8_MEMBER(ay_pb_w);
- DECLARE_READ8_MEMBER(pia_pb_r);
+ void ay_pa_w(uint8_t data);
+ void ay_pb_w(uint8_t data);
+ uint8_t pia_pb_r();
DECLARE_WRITE_LINE_MEMBER(pia_ca2_w);
+ uint8_t lamp_latch_r();
int get_color_offset(uint8_t tile, uint8_t attr, int ra, int px);
MC6845_UPDATE_ROW(crtc_update_row);
@@ -199,6 +258,7 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
output_finder<5> m_lamps;
+ uint8_t m_ay_pa;
uint8_t m_ay_pb;
int m_gpri;
};
@@ -268,7 +328,7 @@ void miniboy7_state::miniboy7_palette(palette_device &palette) const
xxxx ---- unused.
*/
- /* 0000IBGR */
+ // 0000IBGR
if (!m_proms)
return;
@@ -294,52 +354,92 @@ void miniboy7_state::miniboy7_palette(palette_device &palette) const
}
}
+
+/***********************************
+* Machine Start & Reset *
+***********************************/
+
void miniboy7_state::machine_start()
{
m_lamps.resolve();
+ save_item(NAME(m_ay_pa));
save_item(NAME(m_ay_pb));
save_item(NAME(m_gpri));
}
void miniboy7_state::machine_reset()
{
+ m_ay_pa = 0;
m_ay_pb = 0;
m_gpri = 0;
}
-WRITE8_MEMBER(miniboy7_state::ay_pa_w)
+
+/***********************************
+* R/W Handlers *
+***********************************/
+
+void miniboy7_state::ay_pa_w(uint8_t data)
+{
+/* ---x xxxx lamps
+ --x- ---- coins lockout
+ -x-- ---- coins meter
+ x--- ---- unused
+*/
+
+ m_ay_pa = data;
+}
+
+uint8_t miniboy7_state::lamp_latch_r()
{
- // ---x xxxx lamps
- // --x- ---- coins lockout
- // -x-- ---- coins meter
- // x--- ---- unused
+ if (machine().side_effects_disabled())
+ return 0xff;
- data = data ^ 0xff;
+ uint8_t data = m_ay_pa ^ 0xff;
-// m_lamps[0] = BIT(data, 0); // [----x]
-// m_lamps[1] = BIT(data, 1); // [---x-]
-// m_lamps[2] = BIT(data, 2); // [--x--]
-// m_lamps[3] = BIT(data, 3); // [-x---]
-// m_lamps[4] = BIT(data, 4); // [x----]
+ m_lamps[0] = BIT(data, 4); // [----x]
+ m_lamps[1] = BIT(data, 3); // [---x-]
+ m_lamps[2] = BIT(data, 2); // [--x--]
+ m_lamps[3] = BIT(data, 1); // [-x---]
+ m_lamps[4] = BIT(data, 0); // [x----]
machine().bookkeeping().coin_counter_w(0, data & 0x40); // counter
// popmessage("Out Lamps: %02x", data);
// logerror("Out Lamps: %02x\n", data);
+ // value is unused
+ return 0xff;
}
-WRITE8_MEMBER(miniboy7_state::ay_pb_w)
+void miniboy7_state::ay_pb_w(uint8_t data)
{
- // ---- xxxx unused
- // -xxx ---- HCD
- // x--- ---- DSW2 select
-
+/* ---- xxxx unused
+ -xxx ---- HCD
+ x--- ---- DSW2 select
+*/
m_ay_pb = data;
}
-READ8_MEMBER(miniboy7_state::pia_pb_r)
+uint8_t miniboy7_state::pia_pb_r()
+/*
+ PIA PB0-3 are connected to regular inputs.
+ AY8910, PortB-D7, is the selector of a 74LS157 that multiplexes the PIA PB4-7 input lines
+ to read the 8 DIP switches bank lines. See the following diagram.
+
+ 74LS157
+ .-------V-------.
+ AY8910 PB7 -|01 SEL B0 03|- DSW2-8
+ -| B1 06|- DSW2-7
+ PIA PB7 -|04 Y0 B3 13|- DSW2-6
+ PIA PB6 -|07 Y1 B2 10|- DSW2-5
+ PIA PB5 -|12 Y3 A0 02|- DSW2-4
+ PIA PB4 -|09 Y2 A1 05|- DSW2-3
+ -| A3 14|- DSW2-2
+ -| A2 11|- DSW2-1
+ '---------------'
+*/
{
return (m_input2->read() & 0x0f) | ((m_dsw2->read() << (BIT(m_ay_pb, 7) ? 0 : 4)) & 0xf0);
}
@@ -356,70 +456,28 @@ WRITE_LINE_MEMBER(miniboy7_state::pia_ca2_w)
void miniboy7_state::miniboy7_map(address_map &map)
{
- map(0x0000, 0x07ff).ram().share("nvram"); /* battery backed RAM? */
+ map(0x0000, 0x07ff).ram().share("nvram"); // battery backed RAM?
map(0x0800, 0x0fff).ram().share("videoram_a");
map(0x1000, 0x17ff).ram().share("colorram_a");
map(0x1800, 0x1fff).ram().share("videoram_b");
map(0x2000, 0x27ff).ram().share("colorram_b");
map(0x2800, 0x2800).w("crtc", FUNC(mc6845_device::address_w));
map(0x2801, 0x2801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w));
- map(0x3000, 0x3001).rw("ay8910", FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_data_w)); // FIXME
+ map(0x3000, 0x3001).rw("ay8910", FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_data_w));
map(0x3080, 0x3083).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
- map(0x3800, 0x3800).nopr(); // R (right after each read, another value is loaded to the ACCU, so it lacks of sense)
+ map(0x3800, 0x3800).r(FUNC(miniboy7_state::lamp_latch_r));
map(0x4000, 0xffff).rom();
}
/*
-
-'maincpu' (E190): unmapped program memory byte read from 3800
-'maincpu' (E190): unmapped program memory byte read from 3800
-'maincpu' (E190): unmapped program memory byte read from 3800
-'maincpu' (E190): unmapped program memory byte read from 3800
-
-'maincpu' (CF41): unmapped program memory byte read from 3081
-'maincpu' (CF41): unmapped program memory byte write to 3081 = 00
-'maincpu' (CF41): unmapped program memory byte read from 3083
-'maincpu' (CF41): unmapped program memory byte write to 3083 = 00
-'maincpu' (CF41): unmapped program memory byte read from 3080
-'maincpu' (CF41): unmapped program memory byte write to 3080 = 00
-'maincpu' (CF41): unmapped program memory byte read from 3082
-'maincpu' (CF41): unmapped program memory byte write to 3082 = 00
-'maincpu' (CF41): unmapped program memory byte read from 3081
-'maincpu' (CF41): unmapped program memory byte write to 3081 = 3F
-'maincpu' (CF41): unmapped program memory byte read from 3083
-'maincpu' (CF41): unmapped program memory byte write to 3083 = 34
-
-'maincpu' (CF5A): unmapped program memory byte write to 3000 = 0E
-'maincpu' (CF61): unmapped program memory byte write to 3001 = FF
-'maincpu' (CF5A): unmapped program memory byte write to 3000 = 0F
-'maincpu' (CF61): unmapped program memory byte write to 3001 = FF
-'maincpu' (CF5A): unmapped program memory byte write to 3000 = 07
-'maincpu' (CF61): unmapped program memory byte write to 3001 = FF
-'maincpu' (CF5A): unmapped program memory byte write to 3000 = 0E
-'maincpu' (CF61): unmapped program memory byte write to 3001 = FF
-'maincpu' (CF5A): unmapped program memory byte write to 3000 = 0F
-'maincpu' (CF61): unmapped program memory byte write to 3001 = FF
-
... CRTC init (snap) --> $CF2D: JSR $CF76
-'maincpu' (E189): unmapped program memory byte read from 3800
-
-'maincpu' (E1A0): unmapped program memory byte write to 3000 = 0E
-'maincpu' (E1A3): unmapped program memory byte read from 3000
-'maincpu' (E1A8): unmapped program memory byte write to 3001 = 00
-'maincpu' (E1BF): unmapped program memory byte write to 3000 = 0E
-'maincpu' (E1C2): unmapped program memory byte read from 3000
-'maincpu' (E1CA): unmapped program memory byte write to 3001 = 1F
-
-'maincpu' (E189): unmapped program memory byte read from 3800
-'maincpu' (E189): unmapped program memory byte read from 3800
-'maincpu' (E189): unmapped program memory byte read from 3800
-'maincpu' (E189): unmapped program memory byte read from 3800
-'maincpu' (E189): unmapped program memory byte read from 3800
-'maincpu' (E189): unmapped program memory byte read from 3800
+ 3800: Lamps latch. ; right after each read, another value is loaded
+ into the ACCU, losing the previous loaded value.
*/
+
/***********************************
* Input Ports *
***********************************/
@@ -467,6 +525,61 @@ static INPUT_PORTS_START( miniboy7 )
INPUT_PORTS_END
+static INPUT_PORTS_START( sminiboy )
+
+// Hold2/Small button is missing.
+// Just tried on PIA PB4-7, both AY8910 ports,
+// but nothing...
+
+ PORT_START("INPUT1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Big") PORT_CODE(KEYCODE_S) // big
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Cancel / D-UP / Hit") PORT_CODE(KEYCODE_N) // cancel / d-up / hit
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hold 5 / Take / Stand") PORT_CODE(KEYCODE_B) // hold 5 / take / stand
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hold 4") PORT_CODE(KEYCODE_V) // hold 4
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hold 3") PORT_CODE(KEYCODE_C) // hold 3
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 )
+
+ PORT_START("INPUT2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Start / Double") PORT_CODE(KEYCODE_1) // start
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hold 1 / Play") PORT_CODE(KEYCODE_Z) // hold 1 / play
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Service / Books") PORT_CODE(KEYCODE_0) // service / books
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("08 - changes screen") PORT_CODE(KEYCODE_E) // (changes in screen)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("10") PORT_CODE(KEYCODE_R) //
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("20") PORT_CODE(KEYCODE_T) //
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("40") PORT_CODE(KEYCODE_Y) //
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("80") PORT_CODE(KEYCODE_U) //
+
+
+ PORT_START("DSW2")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8")
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7")
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, "Coin A" ) PORT_DIPLOCATION("SW1:6")
+ PORT_DIPSETTING( 0x04, "1 Point" )
+ PORT_DIPSETTING( 0x00, "10.000 Points" )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4")
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3")
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1")
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+INPUT_PORTS_END
+
+
/***********************************
* Graphics Layouts *
***********************************/
@@ -499,16 +612,18 @@ static const gfx_layout tilelayout =
****************************************/
static GFXDECODE_START( gfx_miniboy7 )
- GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 128 ) /* text layer */
+ GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 128 ) // text layer
- /* 0x000 cards
- 0x100 joker
- 0x200 dices
- 0x300 bigtxt */
+ /* 0x000 cards
+ 0x100 joker
+ 0x200 dices
+ 0x300 bigtxt
+ */
GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 32 )
GFXDECODE_END
+
/***********************************
* Machine Drivers *
***********************************/
@@ -532,8 +647,8 @@ void miniboy7_state::miniboy7(machine_config &config)
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
- screen.set_size((47+1)*8, (39+1)*8); /* Taken from MC6845, registers 00 & 04. Normally programmed with (value-1) */
- screen.set_visarea(0*8, 37*8-1, 0*8, 37*8-1); /* Taken from MC6845, registers 01 & 06 */
+ screen.set_size((47+1)*8, (39+1)*8); // taken from MC6845, registers 00 & 04 (normally programmed with value - 1).
+ screen.set_visarea(0*8, 37*8-1, 0*8, 37*8-1); // taken from MC6845, registers 01 & 06.
screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_miniboy7);
@@ -561,7 +676,7 @@ void miniboy7_state::miniboy7(machine_config &config)
***********************************/
/*
-
+ Mini-Boy 7.
Board silkscreened on top:
be MVX-001-01 ('be' is a Bonanza Enterprises logo).
@@ -630,11 +745,43 @@ ROM_START( miniboy7a ) /* The term CREDIT has been changed to POINT is this vers
ROM_LOAD( "j.f10", 0x0100, 0x0100, CRC(4b66215e) SHA1(de4a8f1ee7b9bea02f3a5fc962358d19c7a871a0) ) /* N82S129N BPROM simply labeled J */
ROM_END
+/*
+ Bonaza's Super Mini Boy.
+ PCB: MVX-001-02
+
+ 1x 6502
+ 1x 6845
+ 1x 6522
+ 1x AY8910
+
+*/
+ROM_START( sminiboy )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "sm5_1-9.7a", 0x6000, 0x2000, CRC(e245e1d4) SHA1(69266bbc0a0d3acb98cecebf931f42d5e8ff29f5) )
+ ROM_LOAD( "sm5_2-9.6a", 0x8000, 0x2000, CRC(0b240c50) SHA1(af53a969d34aaf959b5a8e74f920fe895f6c68a0) )
+ ROM_LOAD( "sm5_3-9.4a", 0xa000, 0x2000, CRC(1e389107) SHA1(085f56a544cfec54ea14619af8ae09d7aaf85083) )
+ ROM_LOAD( "sm5_4-9.3a", 0xc000, 0x2000, CRC(2fee506a) SHA1(ddcf87ccc061338ca4ccf2f434903ec0c53dee46) )
+ ROM_LOAD( "sm5_5-9.1a", 0xe000, 0x2000, CRC(c518b16c) SHA1(3f6249fa40a5e95ad3d565f73cfc45fcad4c5a6e) )
+
+ ROM_REGION( 0x2000, "gfx1", 0 )
+ ROM_LOAD( "sm5_0.11d", 0x0000, 0x2000, CRC(295d8146) SHA1(c5b55e10d04d55ba3a5087b588e697a7a89dd02e) ) /* text layer */
+
+ ROM_REGION( 0x6000, "gfx2", 0 )
+ ROM_LOAD( "sm5_1.12d", 0x0000, 0x2000, CRC(1967974e) SHA1(66e06f549d413dcd84d82245cf3bd918bf012209) ) /* bitplane 1 */
+ ROM_LOAD( "sm5_2.13d", 0x2000, 0x2000, CRC(eae3f05a) SHA1(a401fc63f1d9667ceb85c9a8c7cc2bd5d7ab7fcd) ) /* bitplane 2 */
+ ROM_LOAD( "sm5_3.15d", 0x4000, 0x2000, CRC(0f19964f) SHA1(2dba35e3770d8254c65ba82b4d062e4873a6fd8f) ) /* bitplane 3 */
+
+ ROM_REGION( 0x0200, "proms", ROMREGION_INVERT ) /* bipolar PROMs */
+ ROM_LOAD( "j1.7e", 0x0000, 0x0100, CRC(a89e1d80) SHA1(f3f4842729df1fc379a7281edcceb67c4e9558b4) )
+ ROM_LOAD( "j-3.10f", 0x0100, 0x0100, CRC(042ae2c5) SHA1(dad6ace493a2e36c6e8ac1f35e871e1e5071c1ed) )
+ROM_END
+
/***********************************
* Game Drivers *
***********************************/
-// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS LAYOUT
+// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS LAYOUT
+GAME( 1984, sminiboy, 0, miniboy7, sminiboy, miniboy7_state, empty_init, ROT0, "Bonanza Enterprises, Ltd", "Super Mini-Boy", MACHINE_NOT_WORKING )
GAMEL( 1983, miniboy7, 0, miniboy7, miniboy7, miniboy7_state, empty_init, ROT0, "Bonanza Enterprises, Ltd", "Mini-Boy 7 (set 1)", MACHINE_NO_COCKTAIL, layout_miniboy7 )
GAMEL( 1983, miniboy7a, miniboy7, miniboy7, miniboy7, miniboy7_state, empty_init, ROT0, "Bonanza Enterprises, Ltd", "Mini-Boy 7 (set 2)", MACHINE_NO_COCKTAIL, layout_miniboy7 )
diff --git a/src/mame/drivers/namcos22.cpp b/src/mame/drivers/namcos22.cpp
index 263d68cbb8e..ba19a296fa9 100644
--- a/src/mame/drivers/namcos22.cpp
+++ b/src/mame/drivers/namcos22.cpp
@@ -2855,9 +2855,9 @@ READ8_MEMBER(namcos22s_state::mcu_port6_r)
}
template <int Channel>
-u16 namcos22s_state::mcu_adc_r(offs_t offset)
+u16 namcos22s_state::mcu_adc_r()
{
- return m_adc_ports[offset].read_safe(0);
+ return m_adc_ports[Channel].read_safe(0);
}
void namcos22s_state::mcu_program(address_map &map)
diff --git a/src/mame/drivers/neogeocd.cpp b/src/mame/drivers/neogeocd.cpp
index 8b7787dab4a..c6b0f15e337 100644
--- a/src/mame/drivers/neogeocd.cpp
+++ b/src/mame/drivers/neogeocd.cpp
@@ -122,7 +122,7 @@ public:
void init_neocdz();
void init_neocdzj();
- IRQ_CALLBACK_MEMBER(int_callback);
+ uint8_t cdc_irq_ack();
std::unique_ptr<uint8_t[]> m_meminternal_data;
std::unique_ptr<uint8_t[]> m_sprite_ram;
@@ -132,6 +132,7 @@ public:
void neocd_audio_io_map(address_map &map);
void neocd_audio_map(address_map &map);
void neocd_main_map(address_map &map);
+ void neocd_vector_map(address_map &map);
void neocd_ym_map(address_map &map);
protected:
@@ -899,6 +900,12 @@ void ngcd_state::neocd_main_map(address_map &map)
map(0xff0200, 0xffffff).r(FUNC(ngcd_state::unmapped_r));
}
+void ngcd_state::neocd_vector_map(address_map &map)
+{
+ map(0xfffff0, 0xffffff).m(m_maincpu, FUNC(m68000_base_device::autovectors_map));
+ map(0xfffff9, 0xfffff9).r(FUNC(ngcd_state::cdc_irq_ack));
+}
+
/*************************************
*
@@ -958,17 +965,14 @@ INPUT_PORTS_END
/* NeoCD uses custom vectors on IRQ4 to handle various events from the CDC */
-IRQ_CALLBACK_MEMBER(ngcd_state::int_callback)
+uint8_t ngcd_state::cdc_irq_ack()
{
- if (irqline==4)
- {
- if (get_irq_vector_ack()) {
- set_irq_vector_ack(0);
- return get_irq_vector();
- }
+ if (get_irq_vector_ack()) {
+ set_irq_vector_ack(0);
+ return get_irq_vector();
}
- return (0x60+irqline*4)/4;
+ return (0x60+4*4)/4;
}
void ngcd_state::interrupt_callback_type1(void)
@@ -1039,7 +1043,7 @@ void ngcd_state::neocd(machine_config &config)
neogeo_stereo(config);
m_maincpu->set_addrmap(AS_PROGRAM, &ngcd_state::neocd_main_map);
- m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(ngcd_state::int_callback), this));
+ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &ngcd_state::neocd_vector_map);
m_audiocpu->set_addrmap(AS_PROGRAM, &ngcd_state::neocd_audio_map);
m_audiocpu->set_addrmap(AS_IO, &ngcd_state::neocd_audio_io_map);
diff --git a/src/mame/drivers/nforcepc.cpp b/src/mame/drivers/nforcepc.cpp
index 52520958dd1..c3d62b9145a 100644
--- a/src/mame/drivers/nforcepc.cpp
+++ b/src/mame/drivers/nforcepc.cpp
@@ -333,6 +333,273 @@ void as99127f_sensor3_device::device_start()
memset(buffer, 0, sizeof(buffer));
}
+// ITE IT8703F-A SuperIO
+
+DEFINE_DEVICE_TYPE(IT8703F, it8703f_device, "it8703f_device", "ITE IT8703F-A SuperIO")
+
+it8703f_device::it8703f_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, IT8703F, tag, owner, clock)
+ , mode(OperatingMode::Run)
+ , config_key_step(0)
+ , config_index(0)
+ , logical_device(0)
+ , pin_reset_callback(*this)
+ , pin_gatea20_callback(*this)
+ , m_kbdc(*this, "pc_kbdc")
+{
+ memset(global_configuration_registers, 0, sizeof(global_configuration_registers));
+ memset(configuration_registers, 0, sizeof(configuration_registers));
+ for (int n = 0; n < 13; n++)
+ enabled_logical[n] = false;
+}
+
+void it8703f_device::device_start()
+{
+ pin_reset_callback.resolve_safe();
+ pin_gatea20_callback.resolve_safe();
+}
+
+void it8703f_device::internal_memory_map(address_map &map)
+{
+}
+
+void it8703f_device::internal_io_map(address_map &map)
+{
+ map(0x002e, 0x002f).rw(FUNC(it8703f_device::read_it8703f), FUNC(it8703f_device::write_it8703f));
+}
+
+uint16_t it8703f_device::get_base_address(int logical, int index)
+{
+ int position = index * 2 + 0x60;
+
+ return ((uint16_t)configuration_registers[logical][position] << 8) + (uint16_t)configuration_registers[logical][position + 1];
+}
+
+void it8703f_device::device_add_mconfig(machine_config &config)
+{
+ // keyboard
+ KBDC8042(config, m_kbdc);
+ m_kbdc->set_keyboard_type(kbdc8042_device::KBDC8042_PS2);
+ m_kbdc->input_buffer_full_callback().set(FUNC(it8703f_device::irq_keyboard_w));
+ m_kbdc->system_reset_callback().set(FUNC(it8703f_device::kbdp20_gp20_reset_w));
+ m_kbdc->gate_a20_callback().set(FUNC(it8703f_device::kbdp21_gp25_gatea20_w));
+}
+
+READ8_MEMBER(it8703f_device::read_it8703f)
+{
+ if (offset == 0)
+ {
+ if (mode == OperatingMode::Run)
+ return 0;
+ return config_index;
+ }
+ else if (offset == 1)
+ {
+ if (mode == OperatingMode::Run)
+ return 0;
+ if (config_index < 0x30)
+ return read_global_configuration_register(config_index);
+ else
+ return read_logical_configuration_register(config_index);
+ }
+ else
+ return 0;
+}
+
+WRITE8_MEMBER(it8703f_device::write_it8703f)
+{
+ uint8_t byt;
+
+ if (offset == 0)
+ {
+ byt = data & 0xff;
+ if (mode == OperatingMode::Run)
+ {
+ if (byt != 0x87)
+ return;
+ config_key_step++;
+ if (config_key_step > 1)
+ {
+ config_key_step = 0;
+ mode = OperatingMode::Configuration;
+ }
+ }
+ else
+ {
+ if (byt == 0xaa)
+ {
+ mode = OperatingMode::Run;
+ return;
+ }
+ config_index = byt;
+ }
+ }
+ else if (offset == 1)
+ {
+ if (mode == OperatingMode::Run)
+ return;
+ byt = data & 0xff;
+ if (config_index < 0x30)
+ write_global_configuration_register(config_index, byt);
+ else
+ write_logical_configuration_register(config_index, byt);
+ }
+ else
+ return;
+}
+
+void it8703f_device::write_global_configuration_register(int index, int data)
+{
+ global_configuration_registers[index] = data;
+ switch (index)
+ {
+ case 7:
+ logical_device = data;
+ logerror("Selected logical device %d\n", data);
+ break;
+ }
+ logerror("Write global configuration register %02X = %02X\n", index, data);
+}
+
+void it8703f_device::write_logical_configuration_register(int index, int data)
+{
+ configuration_registers[logical_device][index] = data;
+ switch (logical_device)
+ {
+ case LogicalDevice::Keyboard:
+ if (index == 0x30)
+ {
+ if (data & 1)
+ {
+ if (enabled_logical[LogicalDevice::Keyboard] == false)
+ map_keyboard_addresses();
+ enabled_logical[LogicalDevice::Keyboard] = true;
+ logerror("Enabled Keyboard\n");
+ }
+ else
+ {
+ if (enabled_logical[LogicalDevice::Keyboard] == true)
+ unmap_keyboard_addresses();
+ enabled_logical[LogicalDevice::Keyboard] = false;
+ }
+ }
+ break;
+ }
+}
+
+uint16_t it8703f_device::read_global_configuration_register(int index)
+{
+ uint16_t ret = 0;
+
+ ret = global_configuration_registers[index];
+ switch (index)
+ {
+ case 7:
+ ret = logical_device;
+ break;
+ }
+ logerror("Read global configuration register %02X = %02X\n", index, ret);
+ return ret;
+}
+
+uint16_t it8703f_device::read_logical_configuration_register(int index)
+{
+ return configuration_registers[logical_device][index];
+}
+
+WRITE_LINE_MEMBER(it8703f_device::irq_keyboard_w)
+{
+ if (enabled_logical[LogicalDevice::Keyboard] == false)
+ return;
+ lpchost->set_virtual_line(configuration_registers[LogicalDevice::Keyboard][0x70], state ? ASSERT_LINE : CLEAR_LINE);
+}
+
+WRITE_LINE_MEMBER(it8703f_device::kbdp21_gp25_gatea20_w)
+{
+ if (enabled_logical[LogicalDevice::Keyboard] == false)
+ return;
+ pin_gatea20_callback(state);
+}
+
+WRITE_LINE_MEMBER(it8703f_device::kbdp20_gp20_reset_w)
+{
+ if (enabled_logical[LogicalDevice::Keyboard] == false)
+ return;
+ pin_reset_callback(state);
+}
+
+void it8703f_device::map_keyboard(address_map &map)
+{
+ map(0x0, 0x0).rw(FUNC(it8703f_device::at_keybc_r), FUNC(it8703f_device::at_keybc_w));
+ map(0x4, 0x4).rw(FUNC(it8703f_device::keybc_status_r), FUNC(it8703f_device::keybc_command_w));
+}
+
+void it8703f_device::unmap_keyboard(address_map &map)
+{
+ map(0x0, 0x0).noprw();
+ map(0x4, 0x4).noprw();
+}
+
+READ8_MEMBER(it8703f_device::at_keybc_r)
+{
+ switch (offset) //m_kbdc
+ {
+ case 0:
+ return m_kbdc->data_r(space, 0);
+ }
+
+ return 0xff;
+}
+
+WRITE8_MEMBER(it8703f_device::at_keybc_w)
+{
+ switch (offset)
+ {
+ case 0:
+ m_kbdc->data_w(space, 0, data);
+ }
+}
+
+READ8_MEMBER(it8703f_device::keybc_status_r)
+{
+ return m_kbdc->data_r(space, 4);
+}
+
+WRITE8_MEMBER(it8703f_device::keybc_command_w)
+{
+ m_kbdc->data_w(space, 4, data);
+}
+
+
+void it8703f_device::map_keyboard_addresses()
+{
+ uint16_t base = get_base_address(LogicalDevice::Keyboard, 0);
+
+ iospace->install_device(base, base + 7, *this, &it8703f_device::map_keyboard);
+}
+
+void it8703f_device::unmap_keyboard_addresses()
+{
+ uint16_t base = get_base_address(LogicalDevice::Keyboard, 0);
+
+ iospace->install_device(base, base + 7, *this, &it8703f_device::unmap_keyboard);
+}
+
+void it8703f_device::map_extra(address_space *memory_space, address_space *io_space)
+{
+ memspace = memory_space;
+ iospace = io_space;
+ io_space->install_device(0, 0xffff, *this, &it8703f_device::internal_io_map);
+ if (enabled_logical[LogicalDevice::Keyboard] == true)
+ map_keyboard_addresses();
+}
+
+void it8703f_device::set_host(int index, lpcbus_host_interface *host)
+{
+ lpchost = host;
+ lpcindex = index;
+}
+
/*
Machine state
*/
@@ -385,7 +652,7 @@ void nforcepc_state::machine_reset()
}
const nforcepc_state::boot_state_info nforcepc_state::boot_state_infos_award[] = {
- { 0xC0, "Turn off chipset cache" },
+ { 0xC0, "First basic initialization" },
{ 0, nullptr }
};
@@ -440,6 +707,9 @@ void nforcepc_state::nforcepc(machine_config &config)
mcpx_isalpc_device &isa(MCPX_ISALPC(config, ":pci:01.0", 0, 0x10430c11)); // 10de:01b2 NVIDIA Corporation nForce ISA Bridge (LPC bus)
isa.boot_state_hook().set(FUNC(nforcepc_state::boot_state_award_w));
isa.interrupt_output().set(FUNC(nforcepc_state::maincpu_interrupt));
+ it8703f_device &ite(IT8703F(config, ":pci:01.0:0", 0));
+ ite.pin_reset().set_inputline(":maincpu", INPUT_LINE_RESET);
+ ite.pin_gatea20().set_inputline(":maincpu", INPUT_LINE_A20);
MCPX_SMBUS(config, ":pci:01.1", 0); // 10de:01b4 NVIDIA Corporation nForce PCI System Management (SMBus)
SMBUS_ROM(config, ":pci:01.1:050", 0, test_spd_data, sizeof(test_spd_data)); // these 3 are on smbus number 0
SMBUS_LOGGER(config, ":pci:01.1:051", 0);
@@ -472,7 +742,7 @@ ROM_START(nforcepc)
ROM_END
static INPUT_PORTS_START(nforcepc)
- //PORT_INCLUDE(at_keyboard)
+ PORT_INCLUDE(at_keyboard)
INPUT_PORTS_END
COMP(2002, nforcepc, 0, 0, nforcepc, nforcepc, nforcepc_state, empty_init, "Nvidia", "Nvidia nForce PC (CRUSH11/12)", MACHINE_IS_SKELETON)
diff --git a/src/mame/drivers/nmk16.cpp b/src/mame/drivers/nmk16.cpp
index 3d2b78fb778..4558f538bf1 100644
--- a/src/mame/drivers/nmk16.cpp
+++ b/src/mame/drivers/nmk16.cpp
@@ -1105,6 +1105,44 @@ void nmk16_state::gunnail_map(address_map &map)
map(0x0f0000, 0x0fffff).ram().share("mainram");
}
+void nmk16_state::gunnailb_map(address_map &map)
+{
+ map(0x000000, 0x07ffff).rom();
+ map(0x080000, 0x080001).portr("IN0");
+ map(0x080002, 0x080003).portr("IN1");
+ map(0x080008, 0x080009).portr("DSW1");
+ map(0x08000a, 0x08000b).portr("DSW2");
+ // map(0x08000e, 0x08000f).nopr();
+ map(0x080015, 0x080015).w(FUNC(nmk16_state::nmk_flipscreen_w));
+ // map(0x080016, 0x080017).noprw();
+ map(0x080019, 0x080019).w(FUNC(nmk16_state::nmk_tilebank_w));
+ // map(0x08001e, 0x08001f).nopw();
+ map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
+ map(0x08c000, 0x08c1ff).writeonly().share("scrollram");
+ map(0x08c200, 0x08c3ff).writeonly().share("scrollramy");
+ map(0x08c400, 0x08c7ff).writeonly(); // unknown
+ map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::nmk_bgvideoram_w<0>)).share("nmk_bgvideoram0");
+ map(0x09c000, 0x09cfff).mirror(0x001000).ram().w(FUNC(nmk16_state::nmk_txvideoram_w)).share("nmk_txvideoram");
+ map(0x0f0000, 0x0fffff).ram().share("mainram");
+ // map(0x194000, 0x194000)
+}
+
+void nmk16_state::gunnailb_sound_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0x8000, 0xbfff).bankr("audiobank");
+ map(0xc000, 0xdfff).ram();
+}
+
+void nmk16_state::gunnailb_sound_io_map(address_map &map)
+{
+ map.global_mask(0xff);
+ //map(0x00, 0x00).w(FUNC(nmk16_state::macross2_sound_bank_w));
+ //map(0x02, 0x03).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write));
+ //map(0x04, 0x04).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
+ //map(0x06, 0x06).r(m_soundlatch, FUNC(generic_latch_8_device::read));
+}
+
void nmk16_state::macross2_map(address_map &map)
{
map(0x000000, 0x07ffff).rom();
@@ -4628,6 +4666,27 @@ void nmk16_state::gunnail(machine_config &config)
m_oki[1]->add_route(ALL_OUTPUTS, "mono", 0.10);
}
+void nmk16_state::gunnailb(machine_config &config)
+{
+ gunnail(config);
+
+ m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::gunnailb_map);
+
+ GENERIC_LATCH_8(config, m_soundlatch);
+
+ Z80(config, m_audiocpu, 4000000); /* 4 MHz ? */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &nmk16_state::gunnailb_sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &nmk16_state::gunnailb_sound_io_map);
+
+ subdevice<ym2203_device>("ymsnd")->irq_handler().set_inputline(m_audiocpu, 0);
+
+ OKIM6295(config.replace(), m_oki[0], XTAL(16'000'000)/4, okim6295_device::PIN7_LOW); // no OKI banking
+ m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.10);
+
+ config.device_remove("nmk004");
+ config.device_remove("oki2");
+}
+
void nmk16_state::macross2(machine_config &config)
{
/* basic machine hardware */
@@ -5147,6 +5206,12 @@ void nmk16_state::init_bjtwin()
}
+void nmk16_state::init_gunnailb()
+{
+ decode_gfx();
+ init_banked_audiocpu();
+}
+
/* NO NMK004, it has a PIC instead */
READ16_MEMBER(nmk16_state::vandykeb_r){ return 0x0000; }
void nmk16_state::init_vandykeb()
@@ -6605,6 +6670,28 @@ ROM_START( gunnail )
ROM_LOAD( "10_82s123.u96", 0x0200, 0x0020, CRC(c60103c8) SHA1(dfb05b704bb5e1f75f5aaa4fa36e8ddcc905f8b6) ) /* unknown */
ROM_END
+// bootleg board labeled 'GT ELEKTRONIK 16.04.93' with only 1 OKI and no NMK custom chips. Only sprites and bgtile ROMs are identical to the original.
+ROM_START( gunnailb )
+ ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
+ ROM_LOAD16_BYTE( "27c020.6d", 0x00000, 0x40000, CRC(b9566c46) SHA1(dcecec0d401cdf8054b4b7a5dedee62332d92002) )
+ ROM_LOAD16_BYTE( "27c020.6e", 0x00001, 0x40000, CRC(6ba7c54d) SHA1(3932b96d2f1f541f8679524de3bb8867aded9f83) )
+
+ ROM_REGION( 0x20000, "audiocpu", 0 )
+ ROM_LOAD( "27c010.3b", 0x00000, 0x20000, CRC(6e0a5df0) SHA1(616b7c7aaf52a9a55b63c60717c1866940635cd4) )
+
+ ROM_REGION( 0x020000, "fgtile", 0 )
+ ROM_LOAD( "27c010.5g", 0x000000, 0x020000, CRC(6d2ca620) SHA1(6ed3b9987d1740f36235e33bdd66867c24f93f7e) ) /* 8x8 tiles */
+
+ ROM_REGION( 0x200000, "bgtile", 0 )
+ ROM_LOAD( "27c160.k10", 0x000000, 0x200000, CRC(062100a9) SHA1(c7e81656b8112c161d3e9be3edf001da97721727) ) /* 16x16 tiles, 1st and 2nd half identical */
+
+ ROM_REGION( 0x200000, "sprites", 0 )
+ ROM_LOAD16_WORD_SWAP( "27c160.a9", 0x000000, 0x200000, CRC(d49169b3) SHA1(565ff7725dd6ace79b55706114132d8d867e81a9) ) /* Sprites */
+
+ ROM_REGION( 0x040000, "oki1", 0 ) /* OKIM6295 samples */
+ ROM_LOAD( "27c020.1c", 0x00000, 0x40000, CRC(c5f7c0d9) SHA1(dea090ee535edb4e9167078f6e6e5fe4e544625a) )
+ROM_END
+
ROM_START( macross2 ) /* Title screen shows Kanji characters & Macross II */
ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
ROM_LOAD16_WORD_SWAP( "mcrs2j.3", 0x00000, 0x80000, CRC(36a618fe) SHA1(56fdb2bcb4a39888cfbaf9692d66335524a6ac0c) )
@@ -8373,7 +8460,8 @@ GAME( 1991, hachamfp, hachamf, hachamf, hachamfp, nmk16_state, empty
GAME( 1992, macross, 0, macross, macross, nmk16_state, init_nmk, ROT270, "Banpresto", "Super Spacefortress Macross / Chou-Jikuu Yousai Macross", 0 )
GAME( 1993, gunnail, 0, gunnail, gunnail, nmk16_state, init_nmk, ROT270, "NMK / Tecmo", "GunNail (28th May. 1992)", 0 ) // Tecmo is displayed only when set to Japan
-// a 1992 version of Gunnail exists, see https://www.youtube.com/watch?v=tf15Wz0zUiA 3:10
+GAME( 1992, gunnailb, gunnail, gunnailb, gunnail, nmk16_state, init_gunnailb, ROT270, "bootleg", "GunNail (bootleg)", MACHINE_NO_SOUND ) // different sound hardware not hooked up
+// a 1992 version of Gunnail exists, see https://www.youtube.com/watch?v=tf15Wz0zUiA 3:10; is this bootleg version 'gunnailb'?
GAME( 1993, macross2, 0, macross2, macross2, nmk16_state, init_banked_audiocpu, ROT0, "Banpresto", "Super Spacefortress Macross II / Chou-Jikuu Yousai Macross II", MACHINE_NO_COCKTAIL )
GAME( 1993, macross2g, macross2, macross2, macross2, nmk16_state, init_banked_audiocpu, ROT0, "Banpresto", "Super Spacefortress Macross II / Chou-Jikuu Yousai Macross II (GAMEST review build)", MACHINE_NO_COCKTAIL ) // Service switch pauses game
diff --git a/src/mame/drivers/pcw.cpp b/src/mame/drivers/pcw.cpp
index 2015586760a..50195ce54a3 100644
--- a/src/mame/drivers/pcw.cpp
+++ b/src/mame/drivers/pcw.cpp
@@ -215,22 +215,17 @@ WRITE_LINE_MEMBER( pcw_state::pcw_fdc_interrupt )
*/
void pcw_state::pcw_map(address_map &map)
{
- map(0x0000, 0x3fff).bankr("bank1").bankw("bank5");
- map(0x4000, 0x7fff).bankr("bank2").bankw("bank6");
- map(0x8000, 0xbfff).bankr("bank3").bankw("bank7");
- map(0xc000, 0xffff).bankr("bank4").bankw("bank8");
+ map(0x0000, 0x3fff).bankr(m_rdbanks[0]).bankw(m_wrbanks[0]);
+ map(0x4000, 0x7fff).bankr(m_rdbanks[1]).bankw(m_wrbanks[1]);
+ map(0x8000, 0xbfff).bankr(m_rdbanks[2]).bankw(m_wrbanks[2]);
+ map(0xc000, 0xffff).bankr(m_rdbanks[3]).bankw(m_wrbanks[3]);
}
/* Keyboard is read by the MCU and sent as serial data to the gate array ASIC */
READ8_MEMBER(pcw_state::pcw_keyboard_r)
{
- static const char *const keynames[] = {
- "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7",
- "LINE8", "LINE9", "LINE10", "LINE11", "LINE12", "LINE13", "LINE14", "LINE15"
- };
-
- return ioport(keynames[offset])->read();
+ return m_iptlines[offset]->read();
}
READ8_MEMBER(pcw_state::pcw_keyboard_data_r)
@@ -245,9 +240,7 @@ READ8_MEMBER(pcw_state::pcw_keyboard_data_r)
void pcw_state::pcw_update_read_memory_block(int block, int bank)
{
address_space &space = m_maincpu->space(AS_PROGRAM);
- char block_name[32];
- snprintf(block_name, sizeof(block_name), "bank%d", block + 1);
/* bank 3? */
if (bank == 3)
{
@@ -258,18 +251,15 @@ void pcw_state::pcw_update_read_memory_block(int block, int bank)
else
{
/* restore bank handler across entire block */
- space.install_read_bank(block * 0x04000 + 0x0000, block * 0x04000 + 0x3fff,block_name);
+ space.install_read_bank(block * 0x04000 + 0x0000, block * 0x04000 + 0x3fff, m_rdbanks[block].target());
LOGMEM("MEM: read block %i -> bank %i\n", block, bank);
}
- membank(block_name)->set_base(m_ram->pointer() + ((bank * 0x4000) % m_ram->size()));
+ m_rdbanks[block]->set_base(m_ram->pointer() + ((bank * 0x4000) % m_ram->size()));
}
void pcw_state::pcw_update_write_memory_block(int block, int bank)
{
- char block_name[10];
-
- sprintf(block_name,"bank%d",block+5);
- membank(block_name)->set_base(m_ram->pointer() + ((bank * 0x4000) % m_ram->size()));
+ m_wrbanks[block]->set_base(m_ram->pointer() + ((bank * 0x4000) % m_ram->size()));
LOGMEM("MEM: write block %i -> bank %i\n", block, bank);
}
@@ -350,7 +340,7 @@ void pcw_state::pcw_update_mem(int block, int data)
FakeROM = &memregion("maincpu")->base()[0x010000];
- membank("bank1")->set_base(FakeROM);
+ m_rdbanks[0]->set_base(FakeROM);
}*/
}
diff --git a/src/mame/drivers/peplus.cpp b/src/mame/drivers/peplus.cpp
index ac6296de55e..83a87ca8d33 100644
--- a/src/mame/drivers/peplus.cpp
+++ b/src/mame/drivers/peplus.cpp
@@ -10491,6 +10491,32 @@ NOTE: Same as X002338P, except MAX Coin (set to 5) CANNOT be changed - NJ jurisd
ROM_LOAD( "capx1321.u43", 0x0000, 0x0200, CRC(4b57569f) SHA1(fa29c0f627e7ce79951ec6dadec114864144f37d) )
ROM_END
+ROM_START( pex0556p ) /* Superboard : Dueces Joker Wild Poker (X000556P+XP000038) - PSR Verified */
+/*
+ With w/o w/o With
+ Wild JKR Wild JKR
+PayTable 3K STR FL FH 4K SF 5K RF 4D RF 4D (Bonus)
+---------------------------------------------------------------------
+ P73N 1 2 3 3 3 5 8 10 25 800 1000 2000
+ % Range: 93.2-95.2% Optimum: 97.2% Hit Frequency: 50.5%
+ Programs Available: X000556P
+*/
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "xp000038.u67", 0x00000, 0x10000, CRC(8707ab9e) SHA1(3e00a2ad8017e1495c6d6fe900d0efa68a1772b8) ) /* 09/05/95 @ IGT L95-2452 */
+
+ ROM_REGION( 0x10000, "user1", 0 )
+ ROM_LOAD( "x000556p.u66", 0x00000, 0x10000, CRC(5791ed87) SHA1(81adc7e2c4312031f336eb4ff042bedc58f9634f) ) /* Dueces Joker Wild Poker */
+
+ ROM_REGION( 0x020000, "gfx1", 0 )
+ ROM_LOAD( "mro-cg2242.u77", 0x00000, 0x8000, CRC(963a7e7d) SHA1(ebb159f6c731a3f912382745ef9a9c6d4fa2fc99) ) /* 03/19/96 @ IGT L96-0703 */
+ ROM_LOAD( "mgo-cg2242.u78", 0x08000, 0x8000, CRC(53eed56f) SHA1(e79f31c5c817b8b96b4970c1a702d1892961d441) )
+ ROM_LOAD( "mbo-cg2242.u79", 0x10000, 0x8000, CRC(af092f50) SHA1(53a3536593bb14c4072e8a5ee9e05af332feceb1) )
+ ROM_LOAD( "mxo-cg2242.u80", 0x18000, 0x8000, CRC(ecacb6b2) SHA1(32660adcc266fbbb3702a0cd30e25d11b953d23d) )
+
+ ROM_REGION( 0x200, "proms", 0 )
+ ROM_LOAD( "capx1321.u43", 0x0000, 0x0200, CRC(4b57569f) SHA1(fa29c0f627e7ce79951ec6dadec114864144f37d) )
+ROM_END
+
ROM_START( pex0557p ) /* Superboard : Standard Draw Poker (X000557P+XP000038) - PSR Verified */
/*
PayTable Js+ 2PR 3K STR FL FH 4K SF RF (Bonus)
@@ -13760,7 +13786,7 @@ Double Bonus Poker P323A 99.10%
ROM_LOAD( "mxo-cg2440.u80", 0x18000, 0x8000, CRC(9849096b) SHA1(65604ac2a2a27d4e458f6878aacf86f63f5f7c58) )
ROM_REGION( 0x200, "proms", 0 )
- ROM_LOAD( "capx2440.u43", 0x0000, 0x0200, BAD_DUMP CRC(37e8619f) SHA1(303ab25ef0483f2c5023d1765bb0cf9984c45f63) )
+ ROM_LOAD( "capx2440.u43", 0x0000, 0x0200, CRC(00261579) SHA1(71ee1f3de47d1e796cf4b637b2db02e97f47bb8b) )
ROM_END
ROM_START( pexm003p ) /* Superboard : Multi-Poker (XM00003P) - Bonus Poker, Bonus Poker Dlx, Deuces Wild Poker, Jacks or Better & Dbl Bonus Poker */
@@ -14707,13 +14733,13 @@ GAMEL( 1995, pex0190p, 0, peplus, peplus_poker, peplus_state, init_pepl
GAMEL( 1995, pex0197p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000197P+XP000038) Standard Draw Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0203p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000203P+XP000038) 4 of a Kind Bonus Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0224p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000224P+XP000038) Deuces Wild Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
-GAMEL( 1995, pex0225p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000225P+XP000079) Dueces Joker Wild Poker", 0,layout_pe_poker )
+GAMEL( 1995, pex0225p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000225P+XP000079) Dueces Joker Wild Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0242p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000242P+XP000038) Deuces Wild Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0265p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000265P+XP000038) 4 of a Kind Bonus Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0291p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000291P+XP000038) Deuces Wild Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0417p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000417P+XP000038) Deuces Wild Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0426p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000426P+XP000038) Joker Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
-GAMEL( 1995, pex0430p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000430P+XP000079) Dueces Joker Wild Poker", 0,layout_pe_poker )
+GAMEL( 1995, pex0430p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000430P+XP000079) Dueces Joker Wild Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0434p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000434P+XP000038) Bonus Poker Deluxe", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0447p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000447P+XP000038) Standard Draw Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0449p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000449P+XP000038) Standard Draw Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
@@ -14732,6 +14758,7 @@ GAMEL( 1995, pex0516p, 0, peplus, peplus_poker, peplus_state, init_pepl
GAMEL( 1995, pex0536p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000536P+XP000038) Joker Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0537p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000537P+XP000038) Standard Draw Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0550p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000550P+XP000119) Joker Poker (Two Pair or Better)", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
+GAMEL( 1995, pex0556p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000556P+XP000038) Dueces Joker Wild Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0557p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000557P+XP000119) Standard Draw Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0568p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000568P+XP000038) Joker Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pex0578p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000578P+XP000038) Standard Draw Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
@@ -14850,7 +14877,7 @@ GAMEL( 1995, pekoc825, 0, peplus, peplus_poker, peplus_state, init_pepl
/* Superboard : Multi-Poker */
GAMEL( 1995, pexm001p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (XM00001P+XMP00003) Multi-Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pexm002p, pexm001p, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (XM00002P+XMP00006) Multi-Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
-GAMEL( 1995, pexm002pa, pexm001p, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (XM00002P+XMP00006) Multi-Poker (MGM Grand Detroit Casino)", MACHINE_SUPPORTS_SAVE, layout_pe_poker ) /* CAPX2440 needs a redumped */
+GAMEL( 1995, pexm002pa, pexm001p, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (XM00002P+XMP00006) Multi-Poker (MGM Grand Detroit Casino)", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pexm003p, pexm001p, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (XM00003P+XMP00024) Multi-Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pexm004p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (XM00004P+XMP00002) Multi-Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
GAMEL( 1995, pexm005p, 0, peplus, peplus_poker, peplus_state, init_peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (XM00005P+XMP00004) Multi-Poker", MACHINE_SUPPORTS_SAVE, layout_pe_poker )
diff --git a/src/mame/drivers/pong.cpp b/src/mame/drivers/pong.cpp
index 0323845cb10..e65af51db2b 100644
--- a/src/mame/drivers/pong.cpp
+++ b/src/mame/drivers/pong.cpp
@@ -96,7 +96,9 @@ TODO: Volleyball...
* http://www.youtube.com/watch?v=pDrRnJOCKZc
*/
-#define MASTER_CLOCK 7159000
+static const int NS_PER_CLOCK_PONG = static_cast<int>((double) NETLIST_INTERNAL_RES / (double) 7159000 + 0.5);
+static const int MASTER_CLOCK_PONG = static_cast<int>((double) NETLIST_INTERNAL_RES / (double) NS_PER_CLOCK_PONG + 0.5);
+
#define V_TOTAL_PONG (0x105+1) // 262
#define H_TOTAL_PONG (0x1C6+1) // 454
@@ -116,8 +118,8 @@ TODO: Volleyball...
*/
//#define MASTER_CLOCK_BREAKOUT (14318000)
-static const int NS_PER_CLOCK = static_cast<int>((double) NETLIST_INTERNAL_RES / (double) 14318000 + 0.5);
-static const int MASTER_CLOCK_BREAKOUT = static_cast<int>((double) NETLIST_INTERNAL_RES / (double) NS_PER_CLOCK + 0.5);
+static const int NS_PER_CLOCK_BREAKOUT = static_cast<int>((double) NETLIST_INTERNAL_RES / (double) 14318000 + 0.5);
+static const int MASTER_CLOCK_BREAKOUT = static_cast<int>((double) NETLIST_INTERNAL_RES / (double) NS_PER_CLOCK_BREAKOUT + 0.5);
static const int V_TOTAL_BREAKOUT = (0xFC); // 252
static const int H_TOTAL_BREAKOUT = (448*2); // 448
@@ -489,11 +491,12 @@ void pong_state::pong(machine_config &config)
/* video hardware */
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
FIXFREQ(config, m_video).set_screen("screen");
- m_video->set_monitor_clock(MASTER_CLOCK);
+ m_video->set_monitor_clock(MASTER_CLOCK_PONG);
m_video->set_horz_params(H_TOTAL_PONG-67,H_TOTAL_PONG-40,H_TOTAL_PONG-8,H_TOTAL_PONG);
m_video->set_vert_params(V_TOTAL_PONG-22,V_TOTAL_PONG-19,V_TOTAL_PONG-12,V_TOTAL_PONG);
m_video->set_fieldcount(1);
m_video->set_threshold(0.11);
+ m_video->set_horz_scale(4);
/* sound hardware */
SPEAKER(config, "speaker").front_center();
@@ -591,7 +594,7 @@ void pong_state::pongd(machine_config &config)
/* video hardware */
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
FIXFREQ(config, m_video).set_screen("screen");
- m_video->set_monitor_clock(MASTER_CLOCK);
+ m_video->set_monitor_clock(MASTER_CLOCK_PONG);
m_video->set_horz_params(H_TOTAL_PONG-67,H_TOTAL_PONG-52,H_TOTAL_PONG-8,H_TOTAL_PONG);
m_video->set_vert_params(V_TOTAL_PONG-22,V_TOTAL_PONG-19,V_TOTAL_PONG-12,V_TOTAL_PONG);
m_video->set_fieldcount(1);
@@ -630,7 +633,7 @@ void rebound_state::rebound(machine_config &config)
/* video hardware */
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
FIXFREQ(config, m_video).set_screen("screen");
- m_video->set_monitor_clock(MASTER_CLOCK);
+ m_video->set_monitor_clock(MASTER_CLOCK_PONG);
//m_video->set_horz_params(H_TOTAL_PONG-67,H_TOTAL_PONG-40,H_TOTAL_PONG-8,H_TOTAL_PONG);
m_video->set_horz_params(H_TOTAL_PONG-51,H_TOTAL_PONG-40,H_TOTAL_PONG-8,H_TOTAL_PONG);
m_video->set_vert_params(V_TOTAL_PONG-22,V_TOTAL_PONG-19,V_TOTAL_PONG-12,V_TOTAL_PONG);
diff --git a/src/mame/drivers/segas18.cpp b/src/mame/drivers/segas18.cpp
index ad5e6afac73..db0a26bdb91 100644
--- a/src/mame/drivers/segas18.cpp
+++ b/src/mame/drivers/segas18.cpp
@@ -3022,6 +3022,9 @@ ROM_END
Wally wo Sagase! (Where's Wally?), Sega System 18
CPU: FD1094 317-0197B
ROM Board: 171-5873B
+ Main board: 837-8777-01
+ Game BD: 833-8775-01 WALLY
+ ROM Board: 834-8776-01
*/
ROM_START( wwallyj )
ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code - custom CPU 317-0197B
diff --git a/src/mame/drivers/segas32.cpp b/src/mame/drivers/segas32.cpp
index fbc1fd03aab..3cf43f7c3c0 100644
--- a/src/mame/drivers/segas32.cpp
+++ b/src/mame/drivers/segas32.cpp
@@ -4006,6 +4006,7 @@ ROM_END
/**************************************************************************************************************************
Golden Axe: The Revenge of Death Adder (Japan)
protected via a custom V25 with encrypted code
+ROM board: 833-8933
Sub board: 834-8529-02
A/D board: 837-7968
*/
diff --git a/src/mame/drivers/sigmab98.cpp b/src/mame/drivers/sigmab98.cpp
index b8b96f072a6..3f5ba8cdb67 100644
--- a/src/mame/drivers/sigmab98.cpp
+++ b/src/mame/drivers/sigmab98.cpp
@@ -2925,7 +2925,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(lufykzku_state::lufykzku_irq)
else if (scanline == 128)
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer0_vector); // Z80
else if ((scanline % 8) == 0)
- m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer1_vector); // Z*) - this needs to be called often or the state of the door is not read at boot (at least 5 times before bb9 is called)
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer1_vector); // Z80 - this needs to be called often or the state of the door is not read at boot (at least 5 times before bb9 is called)
}
void lufykzku_state::lufykzku(machine_config &config)
diff --git a/src/mame/drivers/superga2.cpp b/src/mame/drivers/superga2.cpp
index 7f832d0ee23..2a8393c95c6 100644
--- a/src/mame/drivers/superga2.cpp
+++ b/src/mame/drivers/superga2.cpp
@@ -34,7 +34,6 @@
#define A2_CPU_TAG "maincpu"
-#define A2_SPEAKER_TAG "speaker"
#define A2_VIDEO_TAG "a2video"
class superga2_state : public driver_device
@@ -47,7 +46,7 @@ public:
m_ram(*this, RAM_TAG),
m_video(*this, A2_VIDEO_TAG),
m_a2common(*this, "a2common"),
- m_speaker(*this, A2_SPEAKER_TAG),
+ m_speaker(*this, "speaker"),
m_softlatch(*this, "softlatch")
{ }
@@ -273,7 +272,7 @@ void superga2_state::kuzmich(machine_config &config)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- SPEAKER_SOUND(config, A2_SPEAKER_TAG).add_route(ALL_OUTPUTS, "mono", 1.00);
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00);
/* soft switches */
F9334(config, m_softlatch); // F14 (labeled 74LS259 on some boards and in the Apple ][ Reference Manual)
diff --git a/src/mame/drivers/vicdual.cpp b/src/mame/drivers/vicdual.cpp
index 2336bbf6057..f2664f90bff 100644
--- a/src/mame/drivers/vicdual.cpp
+++ b/src/mame/drivers/vicdual.cpp
@@ -255,15 +255,22 @@ void vicdual_state::machine_start()
m_port1State = 0;
m_port2State = 0;
- m_psgData = 0;
- m_psgBus = 0;
save_item(NAME(m_coin_status));
save_item(NAME(m_palette_bank));
save_item(NAME(m_port1State));
save_item(NAME(m_port2State));
- save_item(NAME(m_psgData));
- save_item(NAME(m_psgBus));
+}
+
+void carnival_state::machine_start()
+{
+ vicdual_state::machine_start();
+
+ m_musicData = 0;
+ m_musicBus = 0;
+
+ save_item(NAME(m_musicData));
+ save_item(NAME(m_musicBus));
}
@@ -1150,7 +1157,7 @@ WRITE8_MEMBER(vicdual_state::spacetrk_io_w)
}
-WRITE8_MEMBER(vicdual_state::carnival_io_w)
+WRITE8_MEMBER(carnival_state::carnival_io_w)
{
if (offset & 0x01) carnival_audio_1_w(space, 0, data);
if (offset & 0x02) carnival_audio_2_w(space, 0, data);
@@ -1316,7 +1323,7 @@ void vicdual_state::spacetrk_io_map(address_map &map)
}
-void vicdual_state::carnival_io_map(address_map &map)
+void carnival_state::carnival_io_map(address_map &map)
{
map.global_mask(0x7f);
@@ -1327,7 +1334,7 @@ void vicdual_state::carnival_io_map(address_map &map)
/* no decoder, just logic gates, so in theory the
game can write to multiple locations at once */
- map(0x00, 0x7f).w(FUNC(vicdual_state::carnival_io_w));
+ map(0x00, 0x7f).w(FUNC(carnival_state::carnival_io_w));
}
@@ -2186,26 +2193,34 @@ void vicdual_state::spacetrk(machine_config &config)
}
-void vicdual_state::carnival(machine_config &config)
+void carnival_state::carnival(machine_config &config)
{
vicdual_dualgame_root(config);
/* basic machine hardware */
- m_maincpu->set_addrmap(AS_IO, &vicdual_state::carnival_io_map);
+ m_maincpu->set_addrmap(AS_IO, &carnival_state::carnival_io_map);
config.m_perfect_cpu_quantum = subtag("maincpu");
/* audio hardware */
SPEAKER(config, "mono").front_center();
- carnival_audio(config);
+ carnivala_audio(config);
+}
+
+void carnival_state::carnivalb(machine_config &config)
+{
+ carnival(config);
+
+ /* audio hardware */
+ carnivalb_audio(config);
}
-void vicdual_state::carnivalh(machine_config &config)
+void carnival_state::carnivalh(machine_config &config)
{
carnival(config);
/* basic machine hardware */
- m_maincpu->set_addrmap(AS_IO, &vicdual_state::headon_io_map);
+ m_maincpu->set_addrmap(AS_IO, &carnival_state::headon_io_map);
}
@@ -3458,13 +3473,42 @@ ROM_START( carnival )
ROM_LOAD( "epr-666.u1", 0x3c00, 0x0400, CRC(4eec7fae) SHA1(cdc858165136c55b01511805c9d4dc6bc598fe1f) )
ROM_REGION( 0x0020, "proms", 0 )
- ROM_LOAD( "316-633", 0x0000, 0x0020, CRC(f0084d80) SHA1(95ec912ac2c64cd58a50c68afc0993746841a531) )
+ ROM_LOAD( "316-633", 0x0000, 0x0020, CRC(f0084d80) SHA1(95ec912ac2c64cd58a50c68afc0993746841a531) )
ROM_REGION( 0x0400, "audiocpu", 0 ) /* sound ROM */
- ROM_LOAD( "epr-412", 0x0000, 0x0400, CRC(0dbaa2b0) SHA1(eae7fc362a0ff8f908c42e093c7dbb603659373c) )
+ ROM_LOAD( "epr-412.u5", 0x0000, 0x0400, CRC(0dbaa2b0) SHA1(eae7fc362a0ff8f908c42e093c7dbb603659373c) )
ROM_REGION( 0x0020, "user1", 0 ) /* timing PROM */
- ROM_LOAD( "316-0206.u14", 0x0000, 0x0020, CRC(9617d796) SHA1(7cff2741866095ff42eadd8022bea349ec8d2f39) ) /* control PROM */
+ ROM_LOAD( "316-0206.u14", 0x0000, 0x0020, CRC(9617d796) SHA1(7cff2741866095ff42eadd8022bea349ec8d2f39) ) /* control PROM */
+ROM_END
+
+ROM_START( carnivalb )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "epr-651.u33", 0x0000, 0x0400, CRC(9f2736e6) SHA1(c3fb9197b5e83dc7d5335de2268e0acb30cf8328) )
+ ROM_LOAD( "epr-652.u32", 0x0400, 0x0400, CRC(a1f58beb) SHA1(e027beca7bf3ef5ef67e2195f909332fd194b5dc) )
+ ROM_LOAD( "epr-653.u31", 0x0800, 0x0400, CRC(67b17922) SHA1(46cdfd0371dec61a5440c2111660729c0f0ecdb8) )
+ ROM_LOAD( "epr-654.u30", 0x0c00, 0x0400, CRC(befb09a5) SHA1(da44b6a869b5eb0705e01fee4478696f6bef9de8) )
+ ROM_LOAD( "epr-655.u29", 0x1000, 0x0400, CRC(623fcdad) SHA1(35890964f5cf799c141002916641089ccec0fcc9) )
+ ROM_LOAD( "epr-656.u28", 0x1400, 0x0400, CRC(53040332) SHA1(ff7a06d93cb890abf0616770774668396d128ba3) )
+ ROM_LOAD( "epr-657.u27", 0x1800, 0x0400, CRC(f2537467) SHA1(262b859098f4f7e5e9bf2f83bda833044824226e) )
+ ROM_LOAD( "epr-658.u26", 0x1c00, 0x0400, CRC(fcc3854e) SHA1(7adbd6ca6f636dec75fa6eccdf3381686e074bc6) )
+ ROM_LOAD( "epr-659.u8", 0x2000, 0x0400, CRC(28be8d69) SHA1(2d9ac9a53f00fe2282e4317585e6bddadb676c0f) )
+ ROM_LOAD( "epr-660.u7", 0x2400, 0x0400, CRC(3873ccdb) SHA1(56be81fdee8947758ba966915c0739e5560a7f94) )
+ ROM_LOAD( "epr-661.u6", 0x2800, 0x0400, CRC(d9a96dff) SHA1(0366acf3418901bfeeda59d4cd51fe8ceaad4577) )
+ ROM_LOAD( "epr-662.u5", 0x2c00, 0x0400, CRC(d893ca72) SHA1(564176ab7f3757d51db8eef9fbc4228fa2ce328f) )
+ ROM_LOAD( "epr-663.u4", 0x3000, 0x0400, CRC(df8c63c5) SHA1(e8d0632b5cb5bd7f698485531f3edeb13efdc685) )
+ ROM_LOAD( "epr-664.u3", 0x3400, 0x0400, CRC(689a73e8) SHA1(b4134e8d892df7ba3352e4d3f581923decae6e54) )
+ ROM_LOAD( "epr-665.u2", 0x3800, 0x0400, CRC(28e7b2b6) SHA1(57eb5dd0f11da8ff8001e76036264246d6bc27d2) )
+ ROM_LOAD( "epr-666.u1", 0x3c00, 0x0400, CRC(4eec7fae) SHA1(cdc858165136c55b01511805c9d4dc6bc598fe1f) )
+
+ ROM_REGION( 0x0020, "proms", 0 )
+ ROM_LOAD( "316-633", 0x0000, 0x0020, CRC(f0084d80) SHA1(95ec912ac2c64cd58a50c68afc0993746841a531) )
+
+ ROM_REGION( 0x0400, "audiocpu", 0 ) /* sound ROM */
+ ROM_LOAD( "carnival_b.u5", 0x0000, 0x0400, CRC(422abb43) SHA1(edb6f74ccf9382624353e927ac225e1455bb1144) )
+
+ ROM_REGION( 0x0020, "user1", 0 ) /* timing PROM */
+ ROM_LOAD( "316-0206.u14", 0x0000, 0x0020, CRC(9617d796) SHA1(7cff2741866095ff42eadd8022bea349ec8d2f39) ) /* control PROM */
ROM_END
ROM_START( carnivalc )
@@ -3490,7 +3534,7 @@ ROM_START( carnivalc )
ROM_LOAD( "316-633", 0x0000, 0x0020, CRC(f0084d80) SHA1(95ec912ac2c64cd58a50c68afc0993746841a531) )
ROM_REGION( 0x0400, "audiocpu", 0 ) /* sound ROM */
- ROM_LOAD( "epr-412", 0x0000, 0x0400, CRC(0dbaa2b0) SHA1(eae7fc362a0ff8f908c42e093c7dbb603659373c) )
+ ROM_LOAD( "epr-412.u5", 0x0000, 0x0400, CRC(0dbaa2b0) SHA1(eae7fc362a0ff8f908c42e093c7dbb603659373c) )
ROM_REGION( 0x0020, "user1", 0 ) /* timing PROM */
ROM_LOAD( "316-0206.u14", 0x0000, 0x0020, CRC(9617d796) SHA1(7cff2741866095ff42eadd8022bea349ec8d2f39) ) /* control PROM */
@@ -3859,48 +3903,50 @@ ROM_END
*
*************************************/
-GAMEL(1977, depthch, 0, depthch, depthch, vicdual_state, empty_init, ROT0, "Gremlin", "Depthcharge", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch )
-GAMEL(1977, depthcho, depthch, depthch, depthch, vicdual_state, empty_init, ROT0, "Gremlin", "Depthcharge (older)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch )
-GAMEL(1977, subhunt, depthch, depthch, depthch, vicdual_state, empty_init, ROT0, "Gremlin (Taito license)", "Sub Hunter (Gremlin / Taito)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch )
-GAME( 1977, safari, 0, safari, safari, vicdual_state, empty_init, ROT0, "Gremlin", "Safari (set 1)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1977, safaria, safari, safari, safari, vicdual_state, empty_init, ROT0, "Gremlin", "Safari (set 2, bootleg?)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // on a bootleg board, but seems a different code revision too
-GAME( 1978, frogs, 0, frogs, frogs, vicdual_state, empty_init, ROT0, "Gremlin", "Frogs", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, sspaceat, 0, sspaceat, sspaceat, vicdual_state, empty_init, ROT270, "Sega", "Space Attack (upright set 1)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, sspaceat2, sspaceat, sspaceat, sspaceat, vicdual_state, empty_init, ROT270, "Sega", "Space Attack (upright set 2)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, sspaceat3, sspaceat, sspaceat, sspaceat, vicdual_state, empty_init, ROT270, "Sega", "Space Attack (upright set 3)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, sspaceatc, sspaceat, sspaceat, sspaceat, vicdual_state, empty_init, ROT270, "Sega", "Space Attack (cocktail)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, sspacaho, 0, sspacaho, sspacaho, vicdual_state, empty_init, ROT270, "Sega", "Space Attack / Head On", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, headon, 0, headon, headon, vicdual_state, empty_init, ROT0, "Gremlin", "Head On (2 players)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, headon1, headon, headon, headon, vicdual_state, empty_init, ROT0, "Gremlin", "Head On (1 player)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, headonn, headon, headonn, headonn, vicdual_state, empty_init, ROT270, "Nintendo", "Head On N", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, headons, headon, headons, headons, vicdual_state, empty_init, ROT0, "bootleg (Sidam)", "Head On (Sidam bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, headonsa, headon, headons, headonsa, headonsa_state,empty_init, ROT0, "bootleg (Sidam)", "Head On (Sidam bootleg, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, headonmz, headon, headon, headonmz, vicdual_state, empty_init, ROT0, "bootleg", "Head On (bootleg, alt maze)", MACHINE_SUPPORTS_SAVE )
-GAME( 1979, supcrash, headon, headons, supcrash, vicdual_state, empty_init, ROT0, "bootleg (VGG)", "Super Crash (bootleg of Head On)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, hocrash, headon, headons, headons, vicdual_state, empty_init, ROT0, "bootleg (Fraber)", "Crash (bootleg of Head On)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, headon2, 0, headon2, headon2, vicdual_state, empty_init, ROT0, "Sega", "Head On 2", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+// YEAR NAME PARENT MACHINE INPUT CLASS INIT ORIENT. COMPANY, FULLNAME, FLAGS
+GAMEL(1977, depthch, 0, depthch, depthch, vicdual_state, empty_init, ROT0, "Gremlin", "Depthcharge", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch )
+GAMEL(1977, depthcho, depthch, depthch, depthch, vicdual_state, empty_init, ROT0, "Gremlin", "Depthcharge (older)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch )
+GAMEL(1977, subhunt, depthch, depthch, depthch, vicdual_state, empty_init, ROT0, "Gremlin (Taito license)", "Sub Hunter (Gremlin / Taito)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_depthch )
+GAME( 1977, safari, 0, safari, safari, vicdual_state, empty_init, ROT0, "Gremlin", "Safari (set 1)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1977, safaria, safari, safari, safari, vicdual_state, empty_init, ROT0, "Gremlin", "Safari (set 2, bootleg?)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // on a bootleg board, but seems a different code revision too
+GAME( 1978, frogs, 0, frogs, frogs, vicdual_state, empty_init, ROT0, "Gremlin", "Frogs", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, sspaceat, 0, sspaceat, sspaceat, vicdual_state, empty_init, ROT270, "Sega", "Space Attack (upright set 1)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, sspaceat2, sspaceat, sspaceat, sspaceat, vicdual_state, empty_init, ROT270, "Sega", "Space Attack (upright set 2)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, sspaceat3, sspaceat, sspaceat, sspaceat, vicdual_state, empty_init, ROT270, "Sega", "Space Attack (upright set 3)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, sspaceatc, sspaceat, sspaceat, sspaceat, vicdual_state, empty_init, ROT270, "Sega", "Space Attack (cocktail)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, sspacaho, 0, sspacaho, sspacaho, vicdual_state, empty_init, ROT270, "Sega", "Space Attack / Head On", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, headon, 0, headon, headon, vicdual_state, empty_init, ROT0, "Gremlin", "Head On (2 players)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, headon1, headon, headon, headon, vicdual_state, empty_init, ROT0, "Gremlin", "Head On (1 player)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, headonn, headon, headonn, headonn, vicdual_state, empty_init, ROT270, "Nintendo", "Head On N", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, headons, headon, headons, headons, vicdual_state, empty_init, ROT0, "bootleg (Sidam)", "Head On (Sidam bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, headonsa, headon, headons, headonsa, headonsa_state, empty_init, ROT0, "bootleg (Sidam)", "Head On (Sidam bootleg, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, headonmz, headon, headon, headonmz, vicdual_state, empty_init, ROT0, "bootleg", "Head On (bootleg, alt maze)", MACHINE_SUPPORTS_SAVE )
+GAME( 1979, supcrash, headon, headons, supcrash, vicdual_state, empty_init, ROT0, "bootleg (VGG)", "Super Crash (bootleg of Head On)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, hocrash, headon, headons, headons, vicdual_state, empty_init, ROT0, "bootleg (Fraber)", "Crash (bootleg of Head On)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, headon2, 0, headon2, headon2, vicdual_state, empty_init, ROT0, "Sega", "Head On 2", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1979, headon2s, headon2, headon2bw, headon2s, headonsa_state, empty_init, ROT0, "bootleg (Sidam)", "Head On 2 (Sidam bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, car2, headon2, headon2bw, car2, vicdual_state, empty_init, ROT0, "bootleg (RZ Bologna)", "Car 2 (bootleg of Head On 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // title still says 'HeadOn 2'
-GAME( 1979, invho2, 0, invho2, invho2, vicdual_state, empty_init, ROT270, "Sega", "Invinco / Head On 2", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1980, nsub, 0, nsub, nsub, nsub_state, empty_init, ROT270, "Sega", "N-Sub (upright)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // this is the upright set. cocktail set still needs to be dumped
-GAME( 1980, samurai, 0, samurai, samurai, vicdual_state, empty_init, ROT270, "Sega", "Samurai", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, invinco, 0, invinco, invinco, vicdual_state, empty_init, ROT270, "Sega", "Invinco", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, invds, 0, invds, invds, vicdual_state, empty_init, ROT270, "Sega", "Invinco / Deep Scan", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, carhntds, 0, carhntds, carhntds, vicdual_state, empty_init, ROT270, "Sega", "Car Hunt / Deep Scan (France)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1980, tranqgun, 0, tranqgun, tranqgun, vicdual_state, empty_init, ROT270, "Sega", "Tranquillizer Gun", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1980, spacetrk, 0, spacetrk, spacetrk, vicdual_state, empty_init, ROT270, "Sega", "Space Trek (upright)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1980, spacetrkc, spacetrk, spacetrk, spacetrkc, vicdual_state, empty_init, ROT270, "Sega", "Space Trek (cocktail)", MACHINE_IMPERFECT_GRAPHICS |MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1980, carnival, 0, carnival, carnival, vicdual_state, empty_init, ROT270, "Sega", "Carnival (upright)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1980, carnivalc, carnival, carnival, carnivalc, vicdual_state, empty_init, ROT270, "Sega", "Carnival (cocktail)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1980, carnivalh, carnival, carnivalh, carnivalh, vicdual_state, empty_init, ROT270, "Sega", "Carnival (Head On hardware, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1980, carnivalha, carnival, carnivalh, carnivalh, vicdual_state, empty_init, ROT270, "Sega", "Carnival (Head On hardware, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1981, brdrline, 0, brdrline, brdrline, vicdual_state, empty_init, ROT270, "Sega", "Borderline", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1981, starrkr, brdrline, brdrline, starrkr, vicdual_state, empty_init, ROT270, "Sega", "Star Raker", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1981, brdrlins, brdrline, brdrline, brdrline, vicdual_state, empty_init, ROT270, "bootleg (Sidam)", "Borderline (Sidam bootleg)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1981, brdrlinb, brdrline, brdrline, brdrline, vicdual_state, empty_init, ROT270, "bootleg (Karateco)", "Borderline (Karateco bootleg)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1981, brdrlinet, brdrline, tranqgun, tranqgun, vicdual_state, empty_init, ROT270, "Sega", "Borderline (Tranquillizer Gun conversion)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // official factory conversion
-GAME( 198?, startrks, 0, headons, headons, vicdual_state, empty_init, ROT0, "bootleg (Sidam)", "Star Trek (Head On hardware)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1980, digger, 0, digger, digger, vicdual_state, empty_init, ROT270, "Sega", "Digger", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1981, pulsar, 0, pulsar, pulsar, vicdual_state, empty_init, ROT270, "Sega", "Pulsar", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, heiankyo, 0, heiankyo, heiankyo, vicdual_state, empty_init, ROT270, "Denki Onkyo", "Heiankyo Alien", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 19??, alphaho, 0, alphaho, alphaho, vicdual_state, empty_init, ROT270, "Data East Corporation", "Alpha Fighter / Head On", MACHINE_WRONG_COLORS | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, car2, headon2, headon2bw, car2, vicdual_state, empty_init, ROT0, "bootleg (RZ Bologna)", "Car 2 (bootleg of Head On 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // title still says 'HeadOn 2'
+GAME( 1979, invho2, 0, invho2, invho2, vicdual_state, empty_init, ROT270, "Sega", "Invinco / Head On 2", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1980, nsub, 0, nsub, nsub, nsub_state, empty_init, ROT270, "Sega", "N-Sub (upright)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // this is the upright set. cocktail set still needs to be dumped
+GAME( 1980, samurai, 0, samurai, samurai, vicdual_state, empty_init, ROT270, "Sega", "Samurai", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, invinco, 0, invinco, invinco, vicdual_state, empty_init, ROT270, "Sega", "Invinco", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, invds, 0, invds, invds, vicdual_state, empty_init, ROT270, "Sega", "Invinco / Deep Scan", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, carhntds, 0, carhntds, carhntds, vicdual_state, empty_init, ROT270, "Sega", "Car Hunt / Deep Scan (France)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1980, tranqgun, 0, tranqgun, tranqgun, vicdual_state, empty_init, ROT270, "Sega", "Tranquillizer Gun", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1980, spacetrk, 0, spacetrk, spacetrk, vicdual_state, empty_init, ROT270, "Sega", "Space Trek (upright)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1980, spacetrkc, spacetrk, spacetrk, spacetrkc, vicdual_state, empty_init, ROT270, "Sega", "Space Trek (cocktail)", MACHINE_IMPERFECT_GRAPHICS |MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1980, carnival, 0, carnival, carnival, carnival_state, empty_init, ROT270, "Sega", "Carnival (upright, AY8912 music)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1980, carnivalb, carnival, carnivalb, carnival, carnival_state, empty_init, ROT270, "Sega", "Carnival (upright, PIT8253 music)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1980, carnivalc, carnival, carnival, carnivalc, carnival_state, empty_init, ROT270, "Sega", "Carnival (cocktail)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1980, carnivalh, carnival, carnivalh, carnivalh, carnival_state, empty_init, ROT270, "Sega", "Carnival (Head On hardware, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1980, carnivalha, carnival, carnivalh, carnivalh, carnival_state, empty_init, ROT270, "Sega", "Carnival (Head On hardware, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1981, brdrline, 0, brdrline, brdrline, vicdual_state, empty_init, ROT270, "Sega", "Borderline", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1981, starrkr, brdrline, brdrline, starrkr, vicdual_state, empty_init, ROT270, "Sega", "Star Raker", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1981, brdrlins, brdrline, brdrline, brdrline, vicdual_state, empty_init, ROT270, "bootleg (Sidam)", "Borderline (Sidam bootleg)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1981, brdrlinb, brdrline, brdrline, brdrline, vicdual_state, empty_init, ROT270, "bootleg (Karateco)", "Borderline (Karateco bootleg)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1981, brdrlinet, brdrline, tranqgun, tranqgun, vicdual_state, empty_init, ROT270, "Sega", "Borderline (Tranquillizer Gun conversion)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // official factory conversion
+GAME( 198?, startrks, 0, headons, headons, vicdual_state, empty_init, ROT0, "bootleg (Sidam)", "Star Trek (Head On hardware)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1980, digger, 0, digger, digger, vicdual_state, empty_init, ROT270, "Sega", "Digger", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1981, pulsar, 0, pulsar, pulsar, vicdual_state, empty_init, ROT270, "Sega", "Pulsar", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, heiankyo, 0, heiankyo, heiankyo, vicdual_state, empty_init, ROT270, "Denki Onkyo", "Heiankyo Alien", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 19??, alphaho, 0, alphaho, alphaho, vicdual_state, empty_init, ROT270, "Data East Corporation", "Alpha Fighter / Head On", MACHINE_WRONG_COLORS | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/includes/namcos22.h b/src/mame/includes/namcos22.h
index 284a71722f3..f61174d4457 100644
--- a/src/mame/includes/namcos22.h
+++ b/src/mame/includes/namcos22.h
@@ -571,7 +571,7 @@ private:
DECLARE_READ8_MEMBER(mcu_port5_r);
DECLARE_WRITE8_MEMBER(mcu_port6_w);
DECLARE_READ8_MEMBER(mcu_port6_r);
- template <int Channel> u16 mcu_adc_r(offs_t offset);
+ template <int Channel> u16 mcu_adc_r();
DECLARE_WRITE8_MEMBER(alpine_mcu_port4_w);
DECLARE_READ16_MEMBER(mcu130_speedup_r);
DECLARE_READ16_MEMBER(mcu141_speedup_r);
diff --git a/src/mame/includes/nforcepc.h b/src/mame/includes/nforcepc.h
index 840b3b4f3ad..fd12869642c 100644
--- a/src/mame/includes/nforcepc.h
+++ b/src/mame/includes/nforcepc.h
@@ -4,6 +4,7 @@
#define MAME_MACHINE_NFORCEPC_H
#pragma once
+#include "machine/8042kbdc.h"
// NVIDIA Corporation nForce CPU bridge
@@ -163,4 +164,87 @@ private:
DECLARE_DEVICE_TYPE(AS99127F_SENSOR3, as99127f_sensor3_device)
+// ITE IT8703F-A SuperIO
+
+class it8703f_device : public device_t, public lpcbus_device_interface
+{
+public:
+ it8703f_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ virtual void map_extra(address_space *memory_space, address_space *io_space) override;
+ virtual void set_host(int index, lpcbus_host_interface *host) override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
+ auto pin_reset() { return pin_reset_callback.bind(); }
+ auto pin_gatea20() { return pin_gatea20_callback.bind(); }
+
+ // keyboard
+ DECLARE_WRITE_LINE_MEMBER(irq_keyboard_w);
+ DECLARE_WRITE_LINE_MEMBER(kbdp21_gp25_gatea20_w);
+ DECLARE_WRITE_LINE_MEMBER(kbdp20_gp20_reset_w);
+
+ void map_keyboard(address_map &map);
+ void unmap_keyboard(address_map &map);
+
+ DECLARE_READ8_MEMBER(read_it8703f);
+ DECLARE_WRITE8_MEMBER(write_it8703f);
+ // keyboard
+ DECLARE_READ8_MEMBER(at_keybc_r);
+ DECLARE_WRITE8_MEMBER(at_keybc_w);
+ DECLARE_READ8_MEMBER(keybc_status_r);
+ DECLARE_WRITE8_MEMBER(keybc_command_w);
+
+protected:
+ virtual void device_start() override;
+
+private:
+ enum OperatingMode
+ {
+ Run = 0,
+ Configuration = 1
+ } mode;
+ enum LogicalDevice
+ {
+ FDC = 0,
+ Parallel,
+ Serial1,
+ Serial2,
+ Keyboard = 5,
+ ConsumerIR,
+ Gpio1,
+ Gpio2,
+ Gpio34,
+ ACPI,
+ Gpio567 = 12
+ };
+ int config_key_step;
+ int config_index;
+ int logical_device;
+ uint8_t global_configuration_registers[0x30];
+ uint8_t configuration_registers[13][0x100];
+ devcb_write_line pin_reset_callback;
+ devcb_write_line pin_gatea20_callback;
+ required_device<kbdc8042_device> m_kbdc;
+ bool enabled_logical[13];
+
+ lpcbus_host_interface *lpchost;
+ int lpcindex;
+ address_space *memspace;
+ address_space *iospace;
+
+ void internal_memory_map(address_map &map);
+ void internal_io_map(address_map &map);
+ uint16_t get_base_address(int logical, int index);
+ void map_keyboard_addresses();
+ void unmap_keyboard_addresses();
+ void write_global_configuration_register(int index, int data);
+ void write_logical_configuration_register(int index, int data);
+ void write_keyboard_configuration_register(int index, int data);
+ uint16_t read_global_configuration_register(int index);
+ uint16_t read_logical_configuration_register(int index);
+ uint16_t read_keyboard_configuration_register(int index);
+};
+
+DECLARE_DEVICE_TYPE(IT8703F, it8703f_device)
+
+
#endif
diff --git a/src/mame/includes/nmk16.h b/src/mame/includes/nmk16.h
index 6865d96b6c2..1ba5719f9ef 100644
--- a/src/mame/includes/nmk16.h
+++ b/src/mame/includes/nmk16.h
@@ -54,6 +54,7 @@ public:
void twinactn(machine_config &config);
void firehawk(machine_config &config);
void gunnail(machine_config &config);
+ void gunnailb(machine_config &config);
void hachamf(machine_config &config);
void redhawki(machine_config &config);
void bjtwin(machine_config &config);
@@ -90,6 +91,7 @@ public:
void init_banked_audiocpu();
void init_grdnstrm();
void init_grdnstrmau();
+ void init_gunnailb();
void init_spec2k();
void init_redfoxwp2a();
void init_grdnstrmg();
@@ -236,6 +238,9 @@ protected:
void firehawk_map(address_map &map);
void firehawk_sound_cpu(address_map &map);
void gunnail_map(address_map &map);
+ void gunnailb_map(address_map &map);
+ void gunnailb_sound_map(address_map &map);
+ void gunnailb_sound_io_map(address_map &map);
void hachamf_map(address_map &map);
void macross2_map(address_map &map);
void macross2_sound_io_map(address_map &map);
diff --git a/src/mame/includes/pcw.h b/src/mame/includes/pcw.h
index 59bbce9efb9..60a376bc830 100644
--- a/src/mame/includes/pcw.h
+++ b/src/mame/includes/pcw.h
@@ -46,6 +46,9 @@ public:
, m_screen(*this, "screen")
, m_palette(*this, "palette")
, m_ppalette(*this, "ppalette")
+ , m_rdbanks(*this, "bank%u", 1U)
+ , m_wrbanks(*this, "bank%u", 5U)
+ , m_iptlines(*this, "LINE%u", 0U)
{ }
int m_boot;
@@ -141,6 +144,8 @@ public:
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_device<palette_device> m_ppalette;
+ required_memory_bank_array<4> m_rdbanks, m_wrbanks;
+ required_ioport_array<16> m_iptlines;
inline void pcw_plot_pixel(bitmap_ind16 &bitmap, int x, int y, uint32_t color);
void pcw_update_interrupt_counter();
diff --git a/src/mame/includes/vicdual.h b/src/mame/includes/vicdual.h
index 11aa50e8945..0a453acdba8 100644
--- a/src/mame/includes/vicdual.h
+++ b/src/mame/includes/vicdual.h
@@ -7,10 +7,13 @@
*************************************************************************/
#include "cpu/mcs48/mcs48.h"
+#include "machine/pit8253.h"
#include "machine/timer.h"
#include "sound/ay8910.h"
+#include "sound/dac.h"
#include "sound/discrete.h"
#include "sound/samples.h"
+#include "sound/volt_reg.h"
#include "screen.h"
#include "audio/vicdual-97271p.h"
#include "video/vicdual-97269pb.h"
@@ -18,11 +21,9 @@
class vicdual_state : public driver_device
{
public:
- vicdual_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ vicdual_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this,"maincpu"),
- m_audiocpu(*this, "audiocpu"),
- m_psg(*this, "psg"),
m_samples(*this, "samples"),
m_discrete(*this, "discrete"),
m_coinstate_timer(*this, "coinstate"),
@@ -54,8 +55,6 @@ public:
void invinco_audio(machine_config &config);
void invds(machine_config &config);
void headon2(machine_config &config);
- void carnival(machine_config &config);
- void carnival_audio(machine_config &config);
void pulsar(machine_config &config);
void pulsar_audio(machine_config &config);
void spacetrk(machine_config &config);
@@ -63,7 +62,6 @@ public:
void safari(machine_config &config);
void brdrline(machine_config &config);
void brdrline_audio(machine_config &config);
- void carnivalh(machine_config &config);
void samurai(machine_config &config);
void sspaceat(machine_config &config);
void digger(machine_config &config);
@@ -85,8 +83,6 @@ public:
protected:
required_device<cpu_device> m_maincpu;
- optional_device<i8039_device> m_audiocpu;
- optional_device<ay8910_device> m_psg;
optional_device<samples_device> m_samples;
optional_device<discrete_sound_device> m_discrete;
required_device<timer_device> m_coinstate_timer;
@@ -109,8 +105,6 @@ protected:
uint8_t m_samurai_protection_data;
int m_port1State;
int m_port2State;
- int m_psgData;
- int m_psgBus;
emu_timer *m_frogs_croak_timer;
void coin_in();
@@ -142,7 +136,6 @@ protected:
DECLARE_WRITE8_MEMBER(headonn_io_w);
DECLARE_WRITE8_MEMBER(tranqgun_io_w);
DECLARE_WRITE8_MEMBER(spacetrk_io_w);
- DECLARE_WRITE8_MEMBER(carnival_io_w);
DECLARE_WRITE8_MEMBER(brdrline_io_w);
DECLARE_WRITE8_MEMBER(pulsar_io_w);
DECLARE_WRITE8_MEMBER(heiankyo_io_w);
@@ -152,7 +145,7 @@ protected:
DECLARE_READ8_MEMBER(invinco_io_r);
DECLARE_WRITE8_MEMBER(invinco_io_w);
- /*----------- defined in audio/vicdual.c -----------*/
+ /*----------- defined in audio/vicdual.cpp -----------*/
DECLARE_WRITE8_MEMBER( frogs_audio_w );
DECLARE_WRITE8_MEMBER( headon_audio_w );
DECLARE_WRITE8_MEMBER( invho2_audio_w );
@@ -160,25 +153,17 @@ protected:
DECLARE_WRITE8_MEMBER( brdrline_audio_aux_w );
TIMER_CALLBACK_MEMBER( frogs_croak_callback );
- /*----------- defined in audio/carnival.c -----------*/
- DECLARE_WRITE8_MEMBER( carnival_audio_1_w );
- DECLARE_WRITE8_MEMBER( carnival_audio_2_w );
- DECLARE_READ_LINE_MEMBER( carnival_music_port_t1_r );
- DECLARE_WRITE8_MEMBER( carnival_music_port_1_w );
- DECLARE_WRITE8_MEMBER( carnival_music_port_2_w );
- void carnival_psg_latch(address_space &space);
-
- /*----------- defined in audio/depthch.c -----------*/
+ /*----------- defined in audio/depthch.cpp -----------*/
DECLARE_WRITE8_MEMBER( depthch_audio_w );
- /*----------- defined in audio/invinco.c -----------*/
+ /*----------- defined in audio/invinco.cpp -----------*/
DECLARE_WRITE8_MEMBER( invinco_audio_w );
- /*----------- defined in audio/pulsar.c -----------*/
+ /*----------- defined in audio/pulsar.cpp -----------*/
DECLARE_WRITE8_MEMBER( pulsar_audio_1_w );
DECLARE_WRITE8_MEMBER( pulsar_audio_2_w );
- /*----------- defined in audio/tranqgun.c -----------*/
+ /*----------- defined in audio/tranqgun.cpp -----------*/
DECLARE_WRITE8_MEMBER( tranqgun_audio_w );
TIMER_DEVICE_CALLBACK_MEMBER(clear_coin_status);
@@ -199,7 +184,6 @@ protected:
void brdrline_io_map(address_map &map);
void carhntds_dualgame_map(address_map &map);
void carhntds_io_map(address_map &map);
- void carnival_io_map(address_map &map);
void depthch_io_map(address_map &map);
void depthch_map(address_map &map);
void digger_io_map(address_map &map);
@@ -215,7 +199,6 @@ protected:
void invho2_io_map(address_map &map);
void invinco_io_map(address_map &map);
void invinco_map(address_map &map);
- void mboard_map(address_map &map);
void pulsar_io_map(address_map &map);
void safari_io_map(address_map &map);
void safari_map(address_map &map);
@@ -231,8 +214,8 @@ protected:
class nsub_state : public vicdual_state
{
public:
- nsub_state(const machine_config &mconfig, device_type type, const char *tag)
- : vicdual_state(mconfig, type, tag),
+ nsub_state(const machine_config &mconfig, device_type type, const char *tag) :
+ vicdual_state(mconfig, type, tag),
m_s97269pb(*this,"s97269pb"),
m_s97271p(*this,"s97271p")
{ }
@@ -261,12 +244,59 @@ private:
void nsub_map(address_map &map);
};
+class carnival_state : public vicdual_state
+{
+public:
+ carnival_state(const machine_config &mconfig, device_type type, const char *tag) :
+ vicdual_state(mconfig, type, tag),
+ m_audiocpu(*this, "audiocpu"),
+ m_psg(*this, "psg"),
+ m_pit(*this, "pit"),
+ m_dac(*this, "dac%u", 0),
+ m_vref(*this, "vref%u", 0)
+ { }
+
+ void carnival(machine_config &config);
+ void carnivalb(machine_config &config);
+ void carnivalh(machine_config &config);
+
+ void carnivala_audio(machine_config &config);
+ void carnivalb_audio(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+
+ required_device<i8035_device> m_audiocpu;
+ optional_device<ay8910_device> m_psg;
+ optional_device<pit8253_device> m_pit;
+ optional_device_array<dac_bit_interface, 3> m_dac;
+ optional_device_array<voltage_regulator_device, 3> m_vref;
+
+ void carnival_io_map(address_map &map);
+ void mboard_map(address_map &map);
+
+ int m_musicData;
+ int m_musicBus;
+
+ DECLARE_WRITE8_MEMBER(carnival_io_w);
+
+ /*----------- defined in audio/carnival.cpp -----------*/
+ DECLARE_WRITE8_MEMBER( carnival_audio_1_w );
+ DECLARE_WRITE8_MEMBER( carnival_audio_2_w );
+ DECLARE_READ_LINE_MEMBER( carnival_music_port_t1_r );
+ DECLARE_WRITE8_MEMBER( carnivala_music_port_1_w );
+ DECLARE_WRITE8_MEMBER( carnivala_music_port_2_w );
+ void carnival_psg_latch();
+ DECLARE_WRITE8_MEMBER( carnivalb_music_port_1_w );
+ DECLARE_WRITE8_MEMBER( carnivalb_music_port_2_w );
+};
+
class headonsa_state : public vicdual_state
{
public:
- headonsa_state(const machine_config &mconfig, device_type type, const char *tag)
- : vicdual_state(mconfig, type, tag)
- {}
+ headonsa_state(const machine_config &mconfig, device_type type, const char *tag) :
+ vicdual_state(mconfig, type, tag)
+ { }
DECLARE_INPUT_CHANGED_MEMBER(headonsa_coin_inserted);
};
diff --git a/src/mame/includes/xbox_pci.h b/src/mame/includes/xbox_pci.h
index c098d9148fb..16606d1fcb5 100644
--- a/src/mame/includes/xbox_pci.h
+++ b/src/mame/includes/xbox_pci.h
@@ -58,7 +58,18 @@ DECLARE_DEVICE_TYPE(NV2A_RAM, nv2a_ram_device)
* LPC Bus
*/
-class mcpx_isalpc_device : public pci_device {
+class lpcbus_host_interface {
+public:
+ virtual void set_virtual_line(int line, int state) = 0;
+};
+
+class lpcbus_device_interface {
+public:
+ virtual void map_extra(address_space *memory_space, address_space *io_space) = 0;
+ virtual void set_host(int index, lpcbus_host_interface *host) = 0;
+};
+
+class mcpx_isalpc_device : public pci_device, public lpcbus_host_interface {
public:
mcpx_isalpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id);
mcpx_isalpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
@@ -69,6 +80,8 @@ public:
uint32_t acknowledge();
void debug_generate_irq(int irq, int state);
+ virtual void set_virtual_line(int line, int state) override;
+
DECLARE_READ32_MEMBER(acpi_r);
DECLARE_WRITE32_MEMBER(acpi_w);
DECLARE_WRITE8_MEMBER(boot_state_w);
@@ -100,6 +113,8 @@ private:
required_device<pic8259_device> pic8259_1;
required_device<pic8259_device> pic8259_2;
required_device<pit8254_device> pit8254;
+
+ lpcbus_device_interface *lpcdevices[16];
};
DECLARE_DEVICE_TYPE(MCPX_ISALPC, mcpx_isalpc_device)
diff --git a/src/mame/machine/6883sam.cpp b/src/mame/machine/6883sam.cpp
index 3f455fc3954..6c525eaea72 100644
--- a/src/mame/machine/6883sam.cpp
+++ b/src/mame/machine/6883sam.cpp
@@ -270,9 +270,9 @@ void sam6883_device::update_memory(void)
{
// full 64k RAM
m_space_0000.point(m_banks[0], 0x0000, m_banks[0].m_memory_size);
- m_space_8000.point(m_banks[0], 0x8000);
- m_space_A000.point(m_banks[0], 0xA000);
- m_space_C000.point(m_banks[0], 0xC000);
+ m_space_8000.point(m_banks[0], 0x8000 & (m_banks[0].m_memory_size - 1));
+ m_space_A000.point(m_banks[0], 0xA000 & (m_banks[0].m_memory_size - 1));
+ m_space_C000.point(m_banks[0], 0xC000 & (m_banks[0].m_memory_size - 1));
m_counter_mask = 0xFFFF;
setup_rom = false;
}
diff --git a/src/mame/machine/nl_breakout.cpp b/src/mame/machine/nl_breakout.cpp
index 52409161d41..9e4f4e7a13b 100644
--- a/src/mame/machine/nl_breakout.cpp
+++ b/src/mame/machine/nl_breakout.cpp
@@ -287,9 +287,6 @@ CIRCUIT_LAYOUT( breakout )
CHIP("J3", 7402)
DM9312_DIP(J4)
CHIP("J5", 7448)
-#if USE_TRUTHTABLE_7448
- PARAM(J5.USE_DEACTIVATE, 0) // only use this if compiled with 7448 as a truthtable
-#endif
CHIP("J6", 9310)
CHIP("J7", 7420)
CHIP("J8", 74279)
@@ -1715,7 +1712,7 @@ CIRCUIT_LAYOUT( breakout )
E1.14, E2.14, E3.14, E4.14, E5.14, E6.14, E7.14, E8.14, E9.14,
F2.14, F4.14, F5.14, F6.16, F7.16, F8.14, F9.14,
H1.14, H2.14, H3.14, H4.14, H5.16, H6.16, H7.14, H8.14, H9.14,
- J1.16, J2.14, J3.14, J4.16, J6.16, J7.14, J8.16, J9.14,
+ J1.16, J2.14, J3.14, J4.16, J5.16, J6.16, J7.14, J8.16, J9.14,
K1.16, K2.14, K3.14, K4.14, K5.16, K6.16, K7.14, K8.14, K9.14,
L1.16, L2.14, L3.16, L4.14, L5.16, L6.16, L7.14, L8.16, L9.14,
M1.16, M2.5, M3.14, M4.14, M5.16, M6.16, M8.14, M9.14,
@@ -1727,7 +1724,7 @@ CIRCUIT_LAYOUT( breakout )
E1.7, E2.7, E3.7, E4.7, E5.7, E6.7, E7.7, E8.7, E9.7,
F2.7, F4.7, F5.7, F6.8, F7.8, F8.7, F9.7,
H1.7, H2.7, H3.7, H4.7, H5.8, H6.8, H7.7, H8.7, H9.7,
- J1.8, J2.7, J3.7, J4.8, J6.8, J7.7, J8.8, J9.7,
+ J1.8, J2.7, J3.7, J4.8, J5.8, J6.8, J7.7, J8.8, J9.7,
K1.8, K2.7, K3.7, K4.7, K5.8, K6.8, K7.7, K8.7, K9.7,
L1.8, L2.7, L3.8, L4.7, L5.8, L6.8, L7.7, L8.8, L9.7,
M1.8, M2.12, M3.7, M4.7, M5.8, M6.8, M8.7, M9.7,
@@ -1747,7 +1744,11 @@ CIRCUIT_LAYOUT( breakout )
HINT(H2.A, NO_DEACTIVATE)
HINT(H3.A, NO_DEACTIVATE)
HINT(J3.D, NO_DEACTIVATE)
- HINT(J5, NO_DEACTIVATE)
+#if (USE_TRUTHTABLE_7448)
+ HINT(J5.s, NO_DEACTIVATE) // 7448 needs to be disabled in all cases
+#else
+ HINT(J5, NO_DEACTIVATE) // 7448 needs to be disabled in all cases
+#endif
HINT(J6, NO_DEACTIVATE)
HINT(J8.A, NO_DEACTIVATE)
HINT(J8.C, NO_DEACTIVATE)
diff --git a/src/mame/machine/nl_pongd.cpp b/src/mame/machine/nl_pongd.cpp
index eb5be0c17f0..4d7ae1f98ff 100644
--- a/src/mame/machine/nl_pongd.cpp
+++ b/src/mame/machine/nl_pongd.cpp
@@ -1207,7 +1207,7 @@ CIRCUIT_LAYOUT( pongdoubles )
NET_C(V5, A1.16, A2.14, A4.16, A5.14, A6.14, A7.5, A8.14, A9.5,
B1.16, B2.14, B3.14, B4.16, B5.5, B6.14, B7.14, B8.14,
- C1.5, C2.14, C3.14, C4.14, C5.14, C7.16, C8.5, C9.14, C10.14,
+ C1.5, C2.14, C3.14, C4.14, C5.14, C6.16, C7.16, C8.5, C9.14, C10.14,
D1.5, D2.14, D3.14, D4.14, D5.14, D6.14, D7.16, D8.5, D9.14, D10.14,
E1.14, E2.14, E3.14, E4.14, E5.14, E6.14, E7.14, E8.14, E9.5, E10.5,
F1.14, F2.5, F3.14, F4.14, F6.14, F7.14, F8.14, F9.5, F10.5,
@@ -1216,7 +1216,7 @@ CIRCUIT_LAYOUT( pongdoubles )
J1.14, J10.14)
NET_C(GND, A1.8, A2.7, A4.8, A5.7, A6.7, A7.10, A8.7, A9.10,
B1.8, B2.7, B3.7, B4.8, B5.12, B6.7, B7.7, B8.7,
- C1.10, C2.7, C3.7, C4.7, C5.7, C7.8, C8.10, C9.7, C10.7,
+ C1.10, C2.7, C3.7, C4.7, C5.7, C6.8, C7.8, C8.10, C9.7, C10.7,
D1.10, D2.7, D3.7, D4.7, D5.7, D6.7, D7.8, D8.10, D9.7, D10.7,
E1.7, E2.7, E3.7, E4.7, E5.7, E6.7, E7.7, E8.7, E9.10, E10.10,
F1.7, F2.10, F3.7, F4.7, F6.7, F7.7, F8.7, F9.10, F10.10,
diff --git a/src/mame/machine/nl_rebound.cpp b/src/mame/machine/nl_rebound.cpp
index e782dd54a0c..62deb191175 100644
--- a/src/mame/machine/nl_rebound.cpp
+++ b/src/mame/machine/nl_rebound.cpp
@@ -1282,7 +1282,7 @@ NETLIST_START(rebound_schematics)
F1.14, F2.14, F3.14, F4.14, F5.5, F6.14, F7.14, F8.14, F9.14,
H1.14, H2.14, H3.5, H4.14, H5.5, H6.14, H7.14, H8.14, H9.14,
J1.14, J2.14, J3.5, J4.14, J5.14, J6.14, J7.14, J8.16, J9.5,
- K2.5, K3.16, K4.14, K5.14, K6.14, K8.16, K9.5)
+ K2.5, K3.16, K4.14, K5.14, K6.14, K7.16, K8.16, K9.5)
NET_C(GND, A1.7,
B1.7, B2.7, B3.7, B4.8, B5.7, B6.8, B7.8, B8.7,
C1.10, C2.7, C3.7, C4.8, C5.7, C6.7, C7.8, C8.7,
@@ -1291,5 +1291,5 @@ NETLIST_START(rebound_schematics)
F1.7, F2.7, F3.7, F4.7, F5.10, F6.7, F7.7, F8.7, F9.7,
H1.7, H2.7, H3.10, H4.7, H5.10, H6.7, H7.7, H8.7, H9.7,
J1.7, J2.7, J3.10, J4.7, J5.7, J6.7, J7.7, J8.8, J9.10,
- K2.10, K3.8, K4.7, K5.7, K6.7, K8.8, K9.10)
+ K2.10, K3.8, K4.7, K5.7, K6.7, K7.8, K8.8, K9.10)
NETLIST_END()
diff --git a/src/mame/machine/xbox_pci.cpp b/src/mame/machine/xbox_pci.cpp
index b70b01dab1e..c45b3fe53ff 100644
--- a/src/mame/machine/xbox_pci.cpp
+++ b/src/mame/machine/xbox_pci.cpp
@@ -102,6 +102,9 @@ void mcpx_isalpc_device::map_extra(uint64_t memory_window_start, uint64_t memory
uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space)
{
io_space->install_device(0, 0xffff, *this, &mcpx_isalpc_device::internal_io_map);
+ for (int a = 0; a < 16; a++)
+ if (lpcdevices[a] != nullptr)
+ lpcdevices[a]->map_extra(memory_space, io_space);
}
mcpx_isalpc_device::mcpx_isalpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id)
@@ -127,6 +130,30 @@ void mcpx_isalpc_device::device_start()
m_boot_state_hook.resolve_safe();
add_map(0x00000100, M_IO, FUNC(mcpx_isalpc_device::lpc_io));
bank_infos[0].adr = 0x8000;
+ for (int a = 0; a < 16; a++)
+ lpcdevices[a] = nullptr;
+ for (device_t &d : subdevices())
+ {
+ const char *t = d.basetag();
+ int l = strlen(t);
+
+ if (l == 1)
+ {
+ int address = strtol(t + l, nullptr, 16);
+
+ address = address & 15;
+ if (lpcdevices[address] == nullptr)
+ {
+ lpcbus_device_interface *i = dynamic_cast<lpcbus_device_interface *>(&d);
+ lpcdevices[address] = i;
+ if (i)
+ i->set_host(address, this);
+ }
+ else
+ logerror("Duplicate address for LPC bus device with tag %s\n", t);
+ break;
+ }
+ }
}
void mcpx_isalpc_device::device_reset()
@@ -164,13 +191,21 @@ void mcpx_isalpc_device::device_add_mconfig(machine_config &config)
READ32_MEMBER(mcpx_isalpc_device::acpi_r)
{
- logerror("Acpi read from %04X mask %08X\n", bank_infos[0].adr + offset, mem_mask);
+ logerror("Acpi read from %04X mask %08X\n", bank_infos[0].adr + offset * 4, mem_mask);
return 0;
}
WRITE32_MEMBER(mcpx_isalpc_device::acpi_w)
{
- logerror("Acpi write %08X to %04X mask %08X\n", data, bank_infos[0].adr + offset, mem_mask);
+ // Seen using word registers at the following offsets
+ // 0x00 0x02 0x04 0x08 0x20 0x22 0x28 0xa0 0xa2 0xc0-0xd8
+ if ((offset == 0xb) && ACCESSING_BITS_16_23)
+ {
+ // SMI Command Port
+ // write to byte 0x2e must generate a SMI interrupt
+ logerror("Generate software SMI with value %02X\n", (data >> 16) & 0xff);
+ }
+ logerror("Acpi write %08X to %04X mask %08X\n", data, bank_infos[0].adr + offset * 4, mem_mask);
}
WRITE8_MEMBER(mcpx_isalpc_device::boot_state_w)
@@ -233,54 +268,64 @@ uint32_t mcpx_isalpc_device::acknowledge()
void mcpx_isalpc_device::debug_generate_irq(int irq, int state)
{
- switch (irq)
+ set_virtual_line(irq, state);
+}
+
+void mcpx_isalpc_device::set_virtual_line(int line, int state)
+{
+ if (line < 16)
{
- case 0:
- pic8259_1->ir0_w(state);
- break;
- case 1:
- pic8259_1->ir1_w(state);
- break;
- case 3:
- pic8259_1->ir3_w(state);
- break;
- case 4:
- pic8259_1->ir4_w(state);
- break;
- case 5:
- pic8259_1->ir5_w(state);
- break;
- case 6:
- pic8259_1->ir6_w(state);
- break;
- case 7:
- pic8259_1->ir7_w(state);
- break;
- case 8:
- pic8259_2->ir0_w(state);
- break;
- case 9:
- pic8259_2->ir1_w(state);
- break;
- case 10:
- pic8259_2->ir2_w(state);
- break;
- case 11:
- pic8259_2->ir3_w(state);
- break;
- case 12:
- pic8259_2->ir4_w(state);
- break;
- case 13:
- pic8259_2->ir5_w(state);
- break;
- case 14:
- pic8259_2->ir6_w(state);
- break;
- case 15:
- pic8259_2->ir7_w(state);
- break;
+ switch (line)
+ {
+ case 0:
+ pic8259_1->ir0_w(state);
+ break;
+ case 1:
+ pic8259_1->ir1_w(state);
+ break;
+ case 3:
+ pic8259_1->ir3_w(state);
+ break;
+ case 4:
+ pic8259_1->ir4_w(state);
+ break;
+ case 5:
+ pic8259_1->ir5_w(state);
+ break;
+ case 6:
+ pic8259_1->ir6_w(state);
+ break;
+ case 7:
+ pic8259_1->ir7_w(state);
+ break;
+ case 8:
+ pic8259_2->ir0_w(state);
+ break;
+ case 9:
+ pic8259_2->ir1_w(state);
+ break;
+ case 10:
+ pic8259_2->ir2_w(state);
+ break;
+ case 11:
+ pic8259_2->ir3_w(state);
+ break;
+ case 12:
+ pic8259_2->ir4_w(state);
+ break;
+ case 13:
+ pic8259_2->ir5_w(state);
+ break;
+ case 14:
+ pic8259_2->ir6_w(state);
+ break;
+ case 15:
+ pic8259_2->ir7_w(state);
+ break;
+ }
+ return;
}
+ //line = line - 16;
}
/*
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 24bf20ef951..0db00def840 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -9090,6 +9090,7 @@ sboblboblb // bootleg
sboblboblc // bootleg
sboblbobld // bootleg
sboblboble // bootleg
+sboblboblf // bootleg
tokio // A71 1986
tokiob // bootleg
tokioo // A71 1986
@@ -11027,7 +11028,8 @@ gatedoom1 // MAC (c) 1990 Data East Corporation (US)
ds348 // Sigtron Daruma
@source:daryde.cpp
-pandart //
+cricket // (c) 1995 Daryde S.L.
+pandart // (c) 1999 Daryde S.L.
@source:dassault.cpp
dassault // MAJ (c) 1991 Data East Corporation (US)
@@ -13531,6 +13533,7 @@ mooncrgx // bootleg
mooncrs2 // bootleg
mooncrs3 // bootleg
mooncrs4 // bootleg
+mooncrs5 // bootleg
mooncrsb // bootleg
mooncrsl // bootleg (Laguna S.A.)
mooncrst // (c) 1980 Nichibutsu
@@ -14312,6 +14315,7 @@ potnpkrg // Bootleg
potnpkrh // Bootleg
potnpkri // Bootleg
potnpkrj // Bootleg
+potnpkrk // Bootleg
pottnpkr // Bootleg
royale // Unknown
royalea // Unknown
@@ -21667,6 +21671,7 @@ mini2440 //
@source:miniboy7.cpp
miniboy7 // (c) 1983, Bonanza Enterprises
miniboy7a // (c) 1983, Bonanza Enterprises
+sminiboy // (c) 1984, Bonanza Enterprises
@source:minicom.cpp
mcom4_02 //
@@ -30643,6 +30648,7 @@ grdnstrmj // (c) 1998 (Japan)
grdnstrmk // (c) 1998 (Korea)
grdnstrmv // (c) 1998 Apples Industries license
gunnail // (c) 1993 NMK / Tecmo
+gunnailb // bootleg
hachamf // (c) 1991 NMK
hachamfa // (c) 1991 NMK
hachamfb // bootleg
@@ -31886,6 +31892,7 @@ pex0516p // (c) 1995 IGT - International Game Technology
pex0536p // (c) 1995 IGT - International Game Technology
pex0537p // (c) 1995 IGT - International Game Technology
pex0550p // (c) 1995 IGT - International Game Technology
+pex0556p // (c) 1995 IGT - International Game Technology
pex0557p // (c) 1995 IGT - International Game Technology
pex0568p // (c) 1995 IGT - International Game Technology
pex0578p // (c) 1995 IGT - International Game Technology
@@ -38731,6 +38738,7 @@ brdrlins // Sidam bootleg
car2 // bootleg
carhntds //
carnival // 651-666 (c) 1980 Sega
+carnivalb //
carnivalc // 501-516 (c) 1980 Sega
carnivalh //
carnivalha //
diff --git a/src/mame/video/atarirle.cpp b/src/mame/video/atarirle.cpp
index 7c0882619bf..9fcd98340e5 100644
--- a/src/mame/video/atarirle.cpp
+++ b/src/mame/video/atarirle.cpp
@@ -67,10 +67,10 @@ inline int atari_rle_objects_device::round_to_powerof2(int value)
// atari_rle_objects_device: Constructor
//-------------------------------------------------
-atari_rle_objects_device::atari_rle_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, ATARI_RLE_OBJECTS, tag, owner, clock),
- device_video_interface(mconfig, *this),
- m_rombase(*this, DEVICE_SELF)
+atari_rle_objects_device::atari_rle_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : device_t(mconfig, ATARI_RLE_OBJECTS, tag, owner, clock)
+ , device_video_interface(mconfig, *this)
+ , m_rombase(*this, DEVICE_SELF)
{
}
@@ -80,7 +80,7 @@ atari_rle_objects_device::atari_rle_objects_device(const machine_config &mconfig
// bits.
//-------------------------------------------------
-WRITE8_MEMBER(atari_rle_objects_device::control_write)
+void atari_rle_objects_device::control_write(u8 data)
{
//logerror("atarirle_control_w(%d)\n", bits);
@@ -132,7 +132,7 @@ WRITE8_MEMBER(atari_rle_objects_device::control_write)
// bits.
//-------------------------------------------------
-WRITE8_MEMBER(atari_rle_objects_device::command_write)
+void atari_rle_objects_device::command_write(u8 data)
{
m_command = data;
}
@@ -217,7 +217,7 @@ void atari_rle_objects_device::device_start()
memset(m_checksums, 0, sizeof(m_checksums));
for (int sumchunk = 0; sumchunk < m_rombase.bytes() / 0x20000; sumchunk++)
{
- const uint16_t *csbase = &m_rombase[0x10000 * sumchunk];
+ const u16 *csbase = &m_rombase[0x10000 * sumchunk];
int cursum = 0;
for (int word = 0; word < 0x10000; word++)
cursum += *csbase++;
@@ -352,19 +352,19 @@ void atari_rle_objects_device::prescan_rle(int which)
object_info &info = m_info[which];
// look up the offset
- uint16_t *base = (uint16_t *)&m_rombase[which * 4];
- const uint16_t *end = &m_rombase[0] + m_rombase.length();
- info.xoffs = (int16_t)base[0];
- info.yoffs = (int16_t)base[1];
+ u16 *base = (u16 *)&m_rombase[which * 4];
+ const u16 *end = &m_rombase[0] + m_rombase.length();
+ info.xoffs = (s16)base[0];
+ info.yoffs = (s16)base[1];
// determine the depth and table
int flags = base[2];
info.bpp = m_rle_bpp[(flags >> 8) & 7];
- const uint16_t *table = info.table = m_rle_table[(flags >> 8) & 7];
+ const u16 *table = info.table = m_rle_table[(flags >> 8) & 7];
// determine the starting offset
int offset = ((base[2] & 0xff) << 16) | base[3];
- info.data = base = (uint16_t *)&m_rombase[offset];
+ info.data = base = (u16 *)&m_rombase[offset];
// make sure it's valid
if (offset < which * 4 || offset >= m_rombase.length())
@@ -492,9 +492,9 @@ if (count++ == atarirle_hilite_index)
hilite = current->entry;
if (x & ((m_xposmask.mask() + 1) >> 1))
- x = (int16_t)(x | ~m_xposmask.mask());
+ x = (s16)(x | ~m_xposmask.mask());
if (y & ((m_yposmask.mask() + 1) >> 1))
- y = (int16_t)(y | ~m_yposmask.mask());
+ y = (s16)(y | ~m_yposmask.mask());
x += m_cliprect.left();
// merge priority and color
@@ -542,7 +542,7 @@ void atari_rle_objects_device::draw_rle(bitmap_ind16 &bitmap, const rectangle &c
y -= scaled_yoffs;
// draw it with appropriate flipping
- uint32_t palettebase = m_palettebase + color;
+ u32 palettebase = m_palettebase + color;
if (!hflip)
draw_rle_zoom(bitmap, clip, info, palettebase, x, y, xscale << 4, yscale << 4);
else
@@ -556,7 +556,7 @@ void atari_rle_objects_device::draw_rle(bitmap_ind16 &bitmap, const rectangle &c
// a 16-bit bitmap.
//-------------------------------------------------
-void atari_rle_objects_device::draw_rle_zoom(bitmap_ind16 &bitmap, const rectangle &clip, const object_info &info, uint32_t palette, int sx, int sy, int scalex, int scaley)
+void atari_rle_objects_device::draw_rle_zoom(bitmap_ind16 &bitmap, const rectangle &clip, const object_info &info, u32 palette, int sx, int sy, int scalex, int scaley)
{
// determine scaled size; make sure we didn't end up with 0
int scaled_width = (scalex * info.width + 0x7fff) >> 16;
@@ -601,12 +601,12 @@ void atari_rle_objects_device::draw_rle_zoom(bitmap_ind16 &bitmap, const rectang
return;
// loop top to bottom
- const uint16_t *row_start = info.data;
- const uint16_t *table = info.table;
+ const u16 *row_start = info.data;
+ const u16 *table = info.table;
int current_row = 0;
for (int y = sy; y <= ey; y++, sourcey += dy)
{
- uint16_t *dest = &bitmap.pix16(y, sx);
+ u16 *dest = &bitmap.pix16(y, sx);
int sourcex = dx / 2, rle_end = 0;
// loop until we hit the row we're on
@@ -614,7 +614,7 @@ void atari_rle_objects_device::draw_rle_zoom(bitmap_ind16 &bitmap, const rectang
row_start += 1 + *row_start;
// grab our starting parameters from this row
- const uint16_t *base = row_start;
+ const u16 *base = row_start;
int entry_count = *base++;
// non-clipped case
@@ -665,7 +665,7 @@ void atari_rle_objects_device::draw_rle_zoom(bitmap_ind16 &bitmap, const rectang
// clipped case
else
{
- const uint16_t *end = &bitmap.pix16(y, ex);
+ const u16 *end = &bitmap.pix16(y, ex);
int to_be_skipped = pixels_to_skip;
// decode the pixels
@@ -735,7 +735,7 @@ void atari_rle_objects_device::draw_rle_zoom(bitmap_ind16 &bitmap, const rectang
// flip.
//-------------------------------------------------
-void atari_rle_objects_device::draw_rle_zoom_hflip(bitmap_ind16 &bitmap, const rectangle &clip, const object_info &info, uint32_t palette, int sx, int sy, int scalex, int scaley)
+void atari_rle_objects_device::draw_rle_zoom_hflip(bitmap_ind16 &bitmap, const rectangle &clip, const object_info &info, u32 palette, int sx, int sy, int scalex, int scaley)
{
// determine scaled size; make sure we didn't end up with 0
int scaled_width = (scalex * info.width + 0x7fff) >> 16;
@@ -780,12 +780,12 @@ void atari_rle_objects_device::draw_rle_zoom_hflip(bitmap_ind16 &bitmap, const r
return;
// loop top to bottom
- const uint16_t *row_start = info.data;
- const uint16_t *table = info.table;
+ const u16 *row_start = info.data;
+ const u16 *table = info.table;
int current_row = 0;
for (int y = sy; y <= ey; y++, sourcey += dy)
{
- uint16_t *dest = &bitmap.pix16(y, ex);
+ u16 *dest = &bitmap.pix16(y, ex);
int sourcex = dx / 2, rle_end = 0;
// loop until we hit the row we're on
@@ -793,7 +793,7 @@ void atari_rle_objects_device::draw_rle_zoom_hflip(bitmap_ind16 &bitmap, const r
row_start += 1 + *row_start;
// grab our starting parameters from this row
- const uint16_t *base = row_start;
+ const u16 *base = row_start;
int entry_count = *base++;
// non-clipped case
@@ -844,7 +844,7 @@ void atari_rle_objects_device::draw_rle_zoom_hflip(bitmap_ind16 &bitmap, const r
// clipped case
else
{
- const uint16_t *start = &bitmap.pix16(y, sx);
+ const u16 *start = &bitmap.pix16(y, sx);
int to_be_skipped = pixels_to_skip;
// decode the pixels
@@ -928,9 +928,9 @@ void atari_rle_objects_device::hilite_object(bitmap_ind16 &bitmap, int hilite)
int y = m_yposmask.extract(m_ram, hilite);
if (x & ((m_xposmask.mask() + 1) >> 1))
- x = int16_t(x | ~m_xposmask.mask());
+ x = s16(x | ~m_xposmask.mask());
if (y & ((m_yposmask.mask() + 1) >> 1))
- y = int16_t(y | ~m_yposmask.mask());
+ y = s16(y | ~m_yposmask.mask());
x += m_cliprect.left();
// merge priority and color
@@ -1027,7 +1027,7 @@ atari_rle_objects_device::sprite_parameter::sprite_parameter()
// set: Sets the mask via an input 4-word mask.
//-------------------------------------------------
-bool atari_rle_objects_device::sprite_parameter::set(const uint16_t input[8])
+bool atari_rle_objects_device::sprite_parameter::set(const u16 input[8])
{
// determine the word and make sure it's only 1
m_word = 0xffff;
@@ -1049,7 +1049,7 @@ bool atari_rle_objects_device::sprite_parameter::set(const uint16_t input[8])
// determine the shift and final mask
m_shift = 0;
- uint16_t temp = input[m_word];
+ u16 temp = input[m_word];
while (!(temp & 1))
{
m_shift++;
diff --git a/src/mame/video/atarirle.h b/src/mame/video/atarirle.h
index 17dca3c478e..10a27c9268a 100644
--- a/src/mame/video/atarirle.h
+++ b/src/mame/video/atarirle.h
@@ -39,21 +39,21 @@
// description of the motion objects
struct atari_rle_objects_config
{
- struct entry { uint16_t data[8]; };
-
- uint16_t m_leftclip; // left clip coordinate
- uint16_t m_rightclip; // right clip coordinate
- uint16_t m_palettebase; // base palette entry
-
- entry m_code_entry; // mask for the code index
- entry m_color_entry; // mask for the color
- entry m_xpos_entry; // mask for the X position
- entry m_ypos_entry; // mask for the Y position
- entry m_scale_entry; // mask for the scale factor
- entry m_hflip_entry; // mask for the horizontal flip
- entry m_order_entry; // mask for the order
- entry m_priority_entry; // mask for the priority
- entry m_vram_entry; // mask for the VRAM target
+ struct entry { u16 data[8]; };
+
+ u16 m_leftclip; // left clip coordinate
+ u16 m_rightclip; // right clip coordinate
+ u16 m_palettebase; // base palette entry
+
+ entry m_code_entry; // mask for the code index
+ entry m_color_entry; // mask for the color
+ entry m_xpos_entry; // mask for the X position
+ entry m_ypos_entry; // mask for the Y position
+ entry m_scale_entry; // mask for the scale factor
+ entry m_hflip_entry; // mask for the horizontal flip
+ entry m_order_entry; // mask for the order
+ entry m_priority_entry; // mask for the priority
+ entry m_vram_entry; // mask for the VRAM target
};
@@ -68,20 +68,20 @@ class atari_rle_objects_device : public device_t,
{
public:
// construction/destruction
- atari_rle_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const atari_rle_objects_config &config)
+ atari_rle_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, const atari_rle_objects_config &config)
: atari_rle_objects_device(mconfig, tag, owner, clock)
{
set_config(config);
}
- atari_rle_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ atari_rle_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
// configuration helpers
void set_config(const atari_rle_objects_config &config) { static_cast<atari_rle_objects_config &>(*this) = config; }
// control handlers
- DECLARE_WRITE8_MEMBER(control_write);
- DECLARE_WRITE8_MEMBER(command_write);
+ void control_write(u8 data);
+ void command_write(u8 data);
// render helpers
void vblank_callback(screen_device &screen, bool state);
@@ -101,27 +101,27 @@ private:
public:
sprite_parameter();
bool set(const atari_rle_objects_config::entry &input) { return set(input.data); }
- bool set(const uint16_t input[8]);
- uint16_t extract(memory_array &array, int offset) const { return (array.read(offset + m_word) >> m_shift) & m_mask; }
- uint16_t shift() const { return m_shift; }
- uint16_t mask() const { return m_mask; }
+ bool set(const u16 input[8]);
+ u16 extract(memory_array &array, int offset) const { return (array.read(offset + m_word) >> m_shift) & m_mask; }
+ u16 shift() const { return m_shift; }
+ u16 mask() const { return m_mask; }
private:
- uint16_t m_word; // word index
- uint16_t m_shift; // shift amount
- uint16_t m_mask; // final mask
+ u16 m_word; // word index
+ u16 m_shift; // shift amount
+ u16 m_mask; // final mask
};
// internal structure describing each object in the ROMs
struct object_info
{
- int16_t width;
- int16_t height;
- int16_t xoffs;
- int16_t yoffs;
- uint8_t bpp;
- const uint16_t * table;
- const uint16_t * data;
+ s16 width;
+ s16 height;
+ s16 xoffs;
+ s16 yoffs;
+ u8 bpp;
+ const u16 * table;
+ const u16 * data;
};
// internal helpers
@@ -132,8 +132,8 @@ private:
void compute_checksum();
void sort_and_render();
void draw_rle(bitmap_ind16 &bitmap, const rectangle &clip, int code, int color, int hflip, int vflip, int x, int y, int xscale, int yscale);
- void draw_rle_zoom(bitmap_ind16 &bitmap, const rectangle &clip, const object_info &info, uint32_t palette, int sx, int sy, int scalex, int scaley);
- void draw_rle_zoom_hflip(bitmap_ind16 &bitmap, const rectangle &clip, const object_info &info, uint32_t palette, int sx, int sy, int scalex, int scaley);
+ void draw_rle_zoom(bitmap_ind16 &bitmap, const rectangle &clip, const object_info &info, u32 palette, int sx, int sy, int scalex, int scaley);
+ void draw_rle_zoom_hflip(bitmap_ind16 &bitmap, const rectangle &clip, const object_info &info, u32 palette, int sx, int sy, int scalex, int scaley);
void hilite_object(bitmap_ind16 &bitmap, int hilite);
// derived state
@@ -155,24 +155,24 @@ private:
sprite_parameter m_vrammask; // mask for the VRAM target
// ROM information
- required_region_ptr<uint16_t> m_rombase; // pointer to the base of the GFX ROM
+ required_region_ptr<u16> m_rombase; // pointer to the base of the GFX ROM
int m_objectcount; // number of objects in the ROM
std::vector<object_info> m_info; // list of info records
// rendering state
- bitmap_ind16 m_vram[2][2]; // pointers to VRAM bitmaps and backbuffers
- int m_partial_scanline; // partial update scanline
+ bitmap_ind16 m_vram[2][2]; // pointers to VRAM bitmaps and backbuffers
+ int m_partial_scanline; // partial update scanline
// control state
- uint8_t m_control_bits; // current control bits
- uint8_t m_command; // current command
- uint16_t m_checksums[256]; // checksums for each 0x40000 bytes
- memory_array m_ram;
+ u8 m_control_bits; // current control bits
+ u8 m_command; // current command
+ u16 m_checksums[256]; // checksums for each 0x40000 bytes
+ memory_array m_ram;
// tables
- uint8_t m_rle_bpp[8];
- uint16_t * m_rle_table[8];
- uint16_t m_rle_table_data[0x500];
+ u8 m_rle_bpp[8];
+ u16 * m_rle_table[8];
+ u16 m_rle_table_data[0x500];
};
#endif // MAME_VIDEO_ATARIRLE_H
diff --git a/src/mame/video/atarivad.cpp b/src/mame/video/atarivad.cpp
index 0798a0d7b8a..36d676ff930 100644
--- a/src/mame/video/atarivad.cpp
+++ b/src/mame/video/atarivad.cpp
@@ -91,7 +91,7 @@ READ16_MEMBER(atari_vad_device::control_read)
WRITE16_MEMBER(atari_vad_device::alpha_w)
{
- m_alpha_tilemap->write16(space, offset, data, mem_mask);
+ m_alpha_tilemap->write16(offset, data, mem_mask);
}
@@ -102,9 +102,9 @@ WRITE16_MEMBER(atari_vad_device::alpha_w)
WRITE16_MEMBER(atari_vad_device::playfield_upper_w)
{
- m_playfield_tilemap->write16_ext(space, offset, data, mem_mask);
+ m_playfield_tilemap->write16_ext(offset, data, mem_mask);
if (m_playfield2_tilemap != nullptr)
- m_playfield2_tilemap->write16_ext(space, offset, data, mem_mask);
+ m_playfield2_tilemap->write16_ext(offset, data, mem_mask);
}
@@ -116,9 +116,9 @@ WRITE16_MEMBER(atari_vad_device::playfield_upper_w)
WRITE16_MEMBER(atari_vad_device::playfield_latched_lsb_w)
{
- m_playfield_tilemap->write16(space, offset, data, mem_mask);
+ m_playfield_tilemap->write16(offset, data, mem_mask);
if ((m_control[0x0a] & 0x80) != 0)
- m_playfield_tilemap->write16_ext(space, offset, m_control[0x1d], uint16_t(0x00ff));
+ m_playfield_tilemap->write16_ext(offset, m_control[0x1d], uint16_t(0x00ff));
}
@@ -130,9 +130,9 @@ WRITE16_MEMBER(atari_vad_device::playfield_latched_lsb_w)
WRITE16_MEMBER(atari_vad_device::playfield_latched_msb_w)
{
- m_playfield_tilemap->write16(space, offset, data, mem_mask);
+ m_playfield_tilemap->write16(offset, data, mem_mask);
if ((m_control[0x0a] & 0x80) != 0)
- m_playfield_tilemap->write16_ext(space, offset, m_control[0x1c], uint16_t(0xff00));
+ m_playfield_tilemap->write16_ext(offset, m_control[0x1c], uint16_t(0xff00));
}
@@ -144,9 +144,9 @@ WRITE16_MEMBER(atari_vad_device::playfield_latched_msb_w)
WRITE16_MEMBER(atari_vad_device::playfield2_latched_msb_w)
{
- m_playfield2_tilemap->write16(space, offset, data, mem_mask);
+ m_playfield2_tilemap->write16(offset, data, mem_mask);
if ((m_control[0x0a] & 0x80) != 0)
- m_playfield2_tilemap->write16_ext(space, offset, m_control[0x1c], uint16_t(0xff00));
+ m_playfield2_tilemap->write16_ext(offset, m_control[0x1c], uint16_t(0xff00));
}
diff --git a/src/mame/video/newport.cpp b/src/mame/video/newport.cpp
index 69f7275acee..cd3130534a4 100644
--- a/src/mame/video/newport.cpp
+++ b/src/mame/video/newport.cpp
@@ -363,9 +363,9 @@ uint32_t newport_video_device::screen_update(screen_device &device, bitmap_rgb32
{
const uint8_t shift = BIT(table_entry, 0) ? 4 : 0;
const uint8_t pix_in = *src_ci >> shift;
- const uint8_t r = 0xff * BIT(pix_in, 3);
- const uint8_t g = (0xaa * BIT(pix_in, 2)) | (0x55 * BIT(pix_in, 1));
- const uint8_t b = 0xff * BIT(pix_in, 0);
+ const uint8_t r = 0xff * BIT(pix_in, 3);
+ const uint8_t g = (0xaa * BIT(pix_in, 2)) | (0x55 * BIT(pix_in, 1));
+ const uint8_t b = 0xff * BIT(pix_in, 0);
*dest++ = (r << 16) | (g << 8) | b;
break;
}
@@ -1469,90 +1469,92 @@ void newport_video_device::write_pixel(int16_t x, int16_t y, uint8_t color)
uint8_t newport_video_device::get_shade_color(int16_t x, int16_t y)
{
- static const uint8_t s_bayer[4][4] = { { 0, 12, 3, 15 },{ 8, 4, 11, 7 },{ 2, 14, 1, 13 },{ 10, 6, 9, 5 } };
-
- const uint8_t red = (uint8_t)(m_rex3.m_color_red >> 11);
- const uint8_t green = (uint8_t)(m_rex3.m_color_green >> 11);
- const uint8_t blue = (uint8_t)(m_rex3.m_color_blue >> 11);
-
- if (!BIT(m_rex3.m_draw_mode1, 15)) // RGB
- {
- return red;
- }
-
- if (BIT(m_rex3.m_draw_mode1, 16)) // Dithering
- {
- switch ((m_rex3.m_draw_mode1 >> 3) & 3)
- {
- case 0: // 4bpp
- {
- const uint8_t sr = (red >> 3) - (red >> 4);
- const uint8_t sg = (green >> 2) - (green >> 4);
- const uint8_t sb = (blue >> 3) - (blue >> 4);
-
- uint8_t dr = BIT(sr, 4);
- uint8_t dg = (sg >> 4) & 3;
- uint8_t db = BIT(sb, 4);
-
- if ((sr & 0xf) > s_bayer[x & 3][y & 3]) dr++;
- if ((sg & 0xf) > s_bayer[x & 3][y & 3]) dg++;
- if ((sb & 0xf) > s_bayer[x & 3][y & 3]) db++;
-
- if (dr > 1) dr = 1;
- if (dg > 3) dg = 3;
- if (db > 1) db = 1;
-
- return (dr << 3) | (dg << 1) | db;
- }
- case 1: // 8bpp
- {
- const uint8_t sr = (red >> 1) - (red >> 4);
- const uint8_t sg = (green >> 1) - (green >> 4);
- const uint8_t sb = (blue >> 2) - (blue >> 4);
-
- uint8_t dr = (sr >> 4) & 7;
- uint8_t dg = (sg >> 4) & 7;
- uint8_t db = (sb >> 4) & 3;
-
- if ((sr & 0xf) > s_bayer[x & 3][y & 3]) dr++;
- if ((sg & 0xf) > s_bayer[x & 3][y & 3]) dg++;
- if ((sb & 0xf) > s_bayer[x & 3][y & 3]) db++;
-
- if (dr > 7) dr = 7;
- if (dg > 7) dg = 7;
- if (db > 3) db = 3;
-
- return (dr << 5) | (dg << 2) | db;
- }
- case 2: // 12bpp (not yet supported)
- case 3: // 24bpp (not yet supported)
- default:
- return 0;
- }
- }
- else
- {
- switch ((m_rex3.m_draw_mode1 >> 3) & 3)
- {
- case 0: // 4bpp
- return (BIT(red, 7) << 3) | ((green & 0xc0) >> 5) | BIT(blue, 7);
- case 1: // 8bpp
+ static const uint8_t s_bayer[4][4] = { { 0, 12, 3, 15 },{ 8, 4, 11, 7 },{ 2, 14, 1, 13 },{ 10, 6, 9, 5 } };
+
+ const uint8_t red = (uint8_t)(m_rex3.m_color_red >> 11);
+ const uint8_t green = (uint8_t)(m_rex3.m_color_green >> 11);
+ const uint8_t blue = (uint8_t)(m_rex3.m_color_blue >> 11);
+
+ if (!BIT(m_rex3.m_draw_mode1, 15)) // RGB
+ {
+ return red;
+ }
+
+ if (BIT(m_rex3.m_draw_mode1, 16)) // Dithering
+ {
+ switch ((m_rex3.m_draw_mode1 >> 3) & 3)
+ {
+ case 0: // 4bpp
+ {
+ const uint8_t sr = (red >> 3) - (red >> 4);
+ const uint8_t sg = (green >> 2) - (green >> 4);
+ const uint8_t sb = (blue >> 3) - (blue >> 4);
+
+ uint8_t dr = BIT(sr, 4);
+ uint8_t dg = (sg >> 4) & 3;
+ uint8_t db = BIT(sb, 4);
+
+ if ((sr & 0xf) > s_bayer[x & 3][y & 3]) dr++;
+ if ((sg & 0xf) > s_bayer[x & 3][y & 3]) dg++;
+ if ((sb & 0xf) > s_bayer[x & 3][y & 3]) db++;
+
+ if (dr > 1) dr = 1;
+ if (dg > 3) dg = 3;
+ if (db > 1) db = 1;
+
+ return (dr << 3) | (dg << 1) | db;
+ }
+ case 1: // 8bpp
+ {
+ const uint8_t sr = (red >> 1) - (red >> 4);
+ const uint8_t sg = (green >> 1) - (green >> 4);
+ const uint8_t sb = (blue >> 2) - (blue >> 4);
+
+ uint8_t dr = (sr >> 4) & 7;
+ uint8_t dg = (sg >> 4) & 7;
+ uint8_t db = (sb >> 4) & 3;
+
+ if ((sr & 0xf) > s_bayer[x & 3][y & 3]) dr++;
+ if ((sg & 0xf) > s_bayer[x & 3][y & 3]) dg++;
+ if ((sb & 0xf) > s_bayer[x & 3][y & 3]) db++;
+
+ if (dr > 7) dr = 7;
+ if (dg > 7) dg = 7;
+ if (db > 3) db = 3;
+
+ return (dr << 5) | (dg << 2) | db;
+ }
+ case 2: // 12bpp (not yet supported)
+ case 3: // 24bpp (not yet supported)
+ default:
+ return 0;
+ }
+ }
+ else
+ {
+ switch ((m_rex3.m_draw_mode1 >> 3) & 3)
+ {
+ case 0: // 4bpp
+ return (BIT(red, 7) << 3) | ((green & 0xc0) >> 5) | BIT(blue, 7);
+ case 1: // 8bpp
return (red & 0xe0) | ((green & 0xe0) >> 3) | ((blue & 0xc0) >> 6);
- case 2: // 12bpp (not yet supported)
- case 3: // 24bpp (not yet supported)
- default:
- return 0;
- }
- }
+ case 2: // 12bpp (not yet supported)
+ case 3: // 24bpp (not yet supported)
+ default:
+ return 0;
+ }
+ }
}
void newport_video_device::do_v_iline(uint8_t color, bool skip_last, bool shade)
{
- int16_t x1 = m_rex3.m_x_start_i;
+ const int16_t x1 = m_rex3.m_x_start_i;
int16_t y1 = m_rex3.m_y_start_i;
- int16_t y2 = m_rex3.m_y_end_i;
+ const int16_t y2 = m_rex3.m_y_end_i;
+
+ const int16_t incy = (y2 < y1) ? -1 : 1;
- int16_t incy = (y2 < y1) ? -1 : 1;
+ const bool iterate_one = (m_rex3.m_draw_mode0 & 0x300) == 0;
do
{
@@ -1564,21 +1566,15 @@ void newport_video_device::do_v_iline(uint8_t color, bool skip_last, bool shade)
y1 += incy;
if (shade)
- {
- m_rex3.m_color_red += m_rex3.m_slope_red;
- m_rex3.m_color_green += m_rex3.m_slope_green;
- m_rex3.m_color_blue += m_rex3.m_slope_blue;
- }
- } while (y1 != y2);
+ iterate_shade();
+ } while (y1 != y2 && !iterate_one);
- if (!skip_last)
+ if (!skip_last && !iterate_one)
{
if (shade)
{
write_pixel(x1, y1, get_shade_color(x1, y1));
- m_rex3.m_color_red += m_rex3.m_slope_red;
- m_rex3.m_color_green += m_rex3.m_slope_green;
- m_rex3.m_color_blue += m_rex3.m_slope_blue;
+ iterate_shade();
}
else
{
@@ -1593,10 +1589,12 @@ void newport_video_device::do_v_iline(uint8_t color, bool skip_last, bool shade)
void newport_video_device::do_h_iline(uint8_t color, bool skip_last, bool shade)
{
int16_t x1 = m_rex3.m_x_start_i;
- int16_t y1 = m_rex3.m_y_start_i;
- int16_t x2 = m_rex3.m_x_end_i;
+ const int16_t y1 = m_rex3.m_y_start_i;
+ const int16_t x2 = m_rex3.m_x_end_i;
- int16_t incx = (x2 < x1) ? -1 : 1;
+ const int16_t incx = (x2 < x1) ? -1 : 1;
+
+ const bool iterate_one = (m_rex3.m_draw_mode0 & 0x300) == 0;
do
{
@@ -1608,21 +1606,15 @@ void newport_video_device::do_h_iline(uint8_t color, bool skip_last, bool shade)
x1 += incx;
if (shade)
- {
- m_rex3.m_color_red += m_rex3.m_slope_red;
- m_rex3.m_color_green += m_rex3.m_slope_green;
- m_rex3.m_color_blue += m_rex3.m_slope_blue;
- }
- } while (x1 != x2);
+ iterate_shade();
+ } while (x1 != x2 && !iterate_one);
- if (!skip_last)
+ if (!skip_last && !iterate_one)
{
if (shade)
{
write_pixel(x1, y1, get_shade_color(x1, y1));
- m_rex3.m_color_red += m_rex3.m_slope_red;
- m_rex3.m_color_green += m_rex3.m_slope_green;
- m_rex3.m_color_blue += m_rex3.m_slope_blue;
+ iterate_shade();
}
else
{
@@ -1647,6 +1639,8 @@ void newport_video_device::do_iline(uint8_t color, bool skip_last, bool shade)
int16_t dx = abs(x2 - x1);
int16_t dy = abs(y2 - y1);
+ const bool iterate_one = (m_rex3.m_draw_mode0 & 0x300) == 0;
+
if (dy > dx)
{
int16_t t = y2;
@@ -1675,6 +1669,8 @@ void newport_video_device::do_iline(uint8_t color, bool skip_last, bool shade)
x2 = t;
}
+ int16_t length_limit = x1 + (BIT(m_rex3.m_draw_mode0, 15) ? 32 : 0);
+
int horiz = dy << 1;
int diago = (dy - dx) << 1;
int e = (dy << 1) - dx;
@@ -1705,21 +1701,15 @@ void newport_video_device::do_iline(uint8_t color, bool skip_last, bool shade)
x1++;
if (shade)
- {
- m_rex3.m_color_red += m_rex3.m_slope_red;
- m_rex3.m_color_green += m_rex3.m_slope_green;
- m_rex3.m_color_blue += m_rex3.m_slope_blue;
- }
- } while (x1 != x2);
+ iterate_shade();
+ } while (x1 != x2 && x1 != length_limit && !iterate_one);
- if (!skip_last)
+ if (!skip_last && !iterate_one)
{
if (shade)
{
- write_pixel(y1, x1, get_shade_color(x1, y1));
- m_rex3.m_color_red += m_rex3.m_slope_red;
- m_rex3.m_color_green += m_rex3.m_slope_green;
- m_rex3.m_color_blue += m_rex3.m_slope_blue;
+ write_pixel(y1, x1, get_shade_color(y1, x1));
+ iterate_shade();
}
else
{
@@ -1748,21 +1738,15 @@ void newport_video_device::do_iline(uint8_t color, bool skip_last, bool shade)
x1++;
if (shade)
- {
- m_rex3.m_color_red += m_rex3.m_slope_red;
- m_rex3.m_color_green += m_rex3.m_slope_green;
- m_rex3.m_color_blue += m_rex3.m_slope_blue;
- }
- } while (x1 != x2);
+ iterate_shade();
+ } while (x1 != x2 && x1 != length_limit && !iterate_one);
- if (!skip_last)
+ if (!skip_last && !iterate_one)
{
if (shade)
{
write_pixel(x1, y1, get_shade_color(x1, y1));
- m_rex3.m_color_red += m_rex3.m_slope_red;
- m_rex3.m_color_green += m_rex3.m_slope_green;
- m_rex3.m_color_blue += m_rex3.m_slope_blue;
+ iterate_shade();
}
else
{
@@ -1814,6 +1798,13 @@ uint64_t newport_video_device::do_pixel_word_read()
return ret;
}
+void newport_video_device::iterate_shade()
+{
+ m_rex3.m_color_red += m_rex3.m_slope_red;
+ m_rex3.m_color_green += m_rex3.m_slope_green;
+ m_rex3.m_color_blue += m_rex3.m_slope_blue;
+}
+
void newport_video_device::do_rex3_command()
{
static const char* const s_opcode_str[4] = { "Noop", "Read", "Draw", "Scr2Scr" };
@@ -1898,6 +1889,7 @@ void newport_video_device::do_rex3_command()
case 0x00000122: // StopOnX, DoSetup, Span, Draw
case 0x00022102: // LSOpaque, EnLSPattern, StopOnX, Span, Draw
case 0x00080122: // LROnly, StopOnX, DoSetup, Span, Draw
+ case 0x00089102: // LROnly, Length32, EnZPattern, StopOnX, Span, Draw
case 0x000c0122: // LROnly, Shade, StopOnX, DoSetup, Span, Draw
case 0x000c9102: // LROnly, Shade, Length32, EnZPattern, StopOnX, Span, Draw
{
@@ -1910,6 +1902,9 @@ void newport_video_device::do_rex3_command()
end_x += dx;
end_y += dy;
+ if (BIT(mode0, 15) && abs(end_x - start_x) >= 32)
+ end_x = start_x + 31 * dx;
+
bool shade = BIT(mode0, 18);
uint32_t color = m_rex3.m_color_i & 0xff;
@@ -1919,9 +1914,7 @@ void newport_video_device::do_rex3_command()
if (shade)
{
write_pixel(start_x, start_y, get_shade_color(start_x, start_y));
- m_rex3.m_color_red += m_rex3.m_slope_red;
- m_rex3.m_color_green += m_rex3.m_slope_green;
- m_rex3.m_color_blue += m_rex3.m_slope_blue;
+ iterate_shade();
}
else
{
@@ -1967,7 +1960,28 @@ void newport_video_device::do_rex3_command()
{
for (; start_x != end_x; start_x += dx)
{
- write_pixel(start_x + m_rex3.m_x_move, start_y + m_rex3.m_y_move, m_rgbci[(start_y + m_rex3.m_y_window - 0x1000) * (1280 + 64) + (start_x + m_rex3.m_x_window - 0x1000)]);
+ const uint32_t src_addr = (start_y + m_rex3.m_y_window - 0x1000) * (1280 + 64) + (start_x + m_rex3.m_x_window - 0x1000);
+ uint8_t src = 0;
+ switch (mode1 & 7)
+ {
+ case 1: // RGB/CI planes
+ src = m_rgbci[src_addr];
+ break;
+ case 2: // RGBA planes (not yet implemented)
+ break;
+ case 4: // Overlay planes
+ src = m_olay[src_addr];
+ break;
+ case 5: // Popup planes
+ src = m_pup[src_addr] >> 2;
+ break;
+ case 6: // CID planes
+ src = m_cid[src_addr];
+ break;
+ default:
+ break;
+ }
+ write_pixel(start_x + m_rex3.m_x_move, start_y + m_rex3.m_y_move, src);
}
start_x = m_rex3.m_x_save;
}
@@ -1979,14 +1993,16 @@ void newport_video_device::do_rex3_command()
case 0x0000032a: // StopOnX, StopOnY, DoSetup, I_Line, Draw
case 0x00000b2a: // SkipLast, StopOnX, StopOnY, DoSetup, I_Line, Draw
case 0x0000232e: // EnLSPattern, StopOnX, StopOnY, DoSetup, F_Line, Draw
+ case 0x0000930e: // Length32, EnZPattern, StopOnX, StopOnY, F_Line, Draw
case 0x0004232e: // Shade, EnLSPattern, StopOnX, StopOnY, DoSetup, F_Line, Draw
+ case 0x00200b2e: // CIClamp, SkipLast, StopOnX, StopOnY, DoSetup, F_Line, Draw
case 0x00442332: // EndFilter, Shade, EnLSPattern, StopOnX, StopOnY, DoSetp, A_Line, Draw
{
const bool skip_last = BIT(mode0, 11);
const bool shade = BIT(mode0, 18);
LOGMASKED(LOG_COMMANDS, "%cLine: %04x, %04x to %04x, %04x = %08x\n", (mode0 & 0x1c) == 3 ? 'F' : 'I',
- start_x, start_y, end_x, end_y, m_cmap0.m_palette[m_rex3.m_color_i]);
+ start_x, start_y, end_x, end_y, m_rex3.m_color_i);
if (start_x == end_x && start_y == end_y)
{
write_pixel(m_rex3.m_color_i, shade);
@@ -2010,11 +2026,13 @@ void newport_video_device::do_rex3_command()
case 0x00009106: // Length32, EnZPattern, StopOnX, Block, Draw
case 0x00022106: // LSOpaque, EnLSPattern, StopOnX, Block, Draw
case 0x00019106: // ZPOpaque, EnLSPattern, StopOnX, Block, Draw
+ case 0x002c9126: // CIClamp, LROnly, Shade, Length32, EnZPattern, StopOnX, DoSetup, Block, Draw
{
const bool opaque = (mode0 == 0x00019106) || (mode0 == 0x00022106);
const uint32_t pattern = BIT(mode0, 12) ? m_rex3.m_z_pattern : m_rex3.m_ls_pattern;
const uint8_t foreground = m_rex3.m_color_i & 0xff;
const uint8_t background = m_rex3.m_color_back & 0xff;
+ const bool shade = BIT(mode0, 18);
LOGMASKED(LOG_COMMANDS, "%08x at %04x, %04x color %08x\n", pattern, start_x, start_y, foreground);
end_x += dx;
int16_t end = end_x;
@@ -2029,7 +2047,15 @@ void newport_video_device::do_rex3_command()
{
if (pattern & (1 << (31 - (start_x - m_rex3.m_x_start_i))))
{
- write_pixel(start_x, start_y, foreground);
+ if (shade)
+ {
+ write_pixel(start_x, start_y, get_shade_color(start_x, start_y));
+ iterate_shade();
+ }
+ else
+ {
+ write_pixel(start_x, start_y, foreground);
+ }
}
else if (opaque)
{
diff --git a/src/mame/video/newport.h b/src/mame/video/newport.h
index 518dc65b8d9..dcef7a508d8 100644
--- a/src/mame/video/newport.h
+++ b/src/mame/video/newport.h
@@ -11,7 +11,7 @@
#include "machine/hpc3.h"
-#define ENABLE_NEWVIEW_LOG (1)
+#define ENABLE_NEWVIEW_LOG (0)
class newport_video_device : public device_t, public device_palette_interface
{
@@ -191,6 +191,8 @@ private:
void write_pixel(int16_t x, int16_t y, uint8_t color);
void store_pixel(uint8_t *dest_buf, uint8_t src);
+ void iterate_shade();
+
uint8_t get_shade_color(int16_t x, int16_t y);
void do_v_iline(uint8_t color, bool skip_last, bool shade);
diff --git a/src/mame/video/skullxbo.cpp b/src/mame/video/skullxbo.cpp
index dd0507fa1a1..f3497502bab 100644
--- a/src/mame/video/skullxbo.cpp
+++ b/src/mame/video/skullxbo.cpp
@@ -161,7 +161,7 @@ WRITE16_MEMBER( skullxbo_state::playfield_latch_w )
WRITE16_MEMBER(skullxbo_state::playfield_latched_w)
{
- m_playfield_tilemap->write16(space, offset, data, mem_mask);
+ m_playfield_tilemap->write16(offset, data, mem_mask);
if (m_playfield_latch != -1)
{
uint16_t oldval = m_playfield_tilemap->extmem_read(offset);
diff --git a/src/mame/video/tc0280grd.cpp b/src/mame/video/tc0280grd.cpp
index 38c091cf34d..e8a28fa35fc 100644
--- a/src/mame/video/tc0280grd.cpp
+++ b/src/mame/video/tc0280grd.cpp
@@ -23,17 +23,19 @@ control registers:
#include "emu.h"
#include "tc0280grd.h"
+#include <algorithm>
+
#define TC0280GRD_RAM_SIZE 0x2000
DEFINE_DEVICE_TYPE(TC0280GRD, tc0280grd_device, "tc0280grd", "Taito TC0280GRD / TC0430GRW")
-tc0280grd_device::tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, TC0280GRD, tag, owner, clock),
- m_ram(nullptr),
- //m_ctrl[8](0),
- m_base_color(0),
- m_gfxdecode(*this, finder_base::DUMMY_TAG)
+tc0280grd_device::tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : device_t(mconfig, TC0280GRD, tag, owner, clock)
+ , m_ram(nullptr)
+ , m_base_color(0)
+ , m_gfxdecode(*this, finder_base::DUMMY_TAG)
{
+ std::fill(std::begin(m_ctrl), std::end(m_ctrl), 0);
}
//-------------------------------------------------
@@ -45,10 +47,10 @@ void tc0280grd_device::device_start()
if(!m_gfxdecode->started())
throw device_missing_dependencies();
- m_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tc0280grd_device::tc0280grd_get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
+ m_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tc0280grd_device::get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
m_tilemap->set_transparent_pen(0);
- m_ram = make_unique_clear<uint16_t[]>(TC0280GRD_RAM_SIZE / 2);
+ m_ram = make_unique_clear<u16[]>(TC0280GRD_RAM_SIZE / 2);
save_pointer(NAME(m_ram), TC0280GRD_RAM_SIZE / 2);
save_item(NAME(m_ctrl));
@@ -60,9 +62,7 @@ void tc0280grd_device::device_start()
void tc0280grd_device::device_reset()
{
- int i;
-
- for (i = 0; i < 8; i++)
+ for (int i = 0; i < 8; i++)
m_ctrl[i] = 0;
}
@@ -70,7 +70,7 @@ void tc0280grd_device::device_reset()
DEVICE HANDLERS
*****************************************************************************/
-TILE_GET_INFO_MEMBER(tc0280grd_device::tc0280grd_get_tile_info)
+TILE_GET_INFO_MEMBER(tc0280grd_device::get_tile_info)
{
int attr = m_ram[tile_index];
SET_TILE_INFO_MEMBER(m_gfxnum,
@@ -79,38 +79,38 @@ TILE_GET_INFO_MEMBER(tc0280grd_device::tc0280grd_get_tile_info)
0);
}
-READ16_MEMBER( tc0280grd_device::tc0280grd_word_r )
+u16 tc0280grd_device::tc0280grd_word_r(offs_t offset)
{
return m_ram[offset];
}
-WRITE16_MEMBER( tc0280grd_device::tc0280grd_word_w )
+void tc0280grd_device::tc0280grd_word_w(offs_t offset, u16 data, u16 mem_mask)
{
COMBINE_DATA(&m_ram[offset]);
m_tilemap->mark_tile_dirty(offset);
}
-WRITE16_MEMBER( tc0280grd_device::tc0280grd_ctrl_word_w )
+void tc0280grd_device::tc0280grd_ctrl_word_w(offs_t offset, u16 data, u16 mem_mask)
{
COMBINE_DATA(&m_ctrl[offset]);
}
-READ16_MEMBER( tc0280grd_device::tc0430grw_word_r )
+u16 tc0280grd_device::tc0430grw_word_r(offs_t offset)
{
- return tc0280grd_word_r(space, offset, mem_mask);
+ return tc0280grd_word_r(offset);
}
-WRITE16_MEMBER( tc0280grd_device::tc0430grw_word_w )
+void tc0280grd_device::tc0430grw_word_w(offs_t offset, u16 data, u16 mem_mask)
{
- tc0280grd_word_w(space, offset, data, mem_mask);
+ tc0280grd_word_w(offset, data, mem_mask);
}
-WRITE16_MEMBER( tc0280grd_device::tc0430grw_ctrl_word_w )
+void tc0280grd_device::tc0430grw_ctrl_word_w(offs_t offset, u16 data, u16 mem_mask)
{
- tc0280grd_ctrl_word_w(space, offset, data, mem_mask);
+ tc0280grd_ctrl_word_w(offset, data, mem_mask);
}
-void tc0280grd_device::tc0280grd_tilemap_update( int base_color )
+void tc0280grd_device::tc0280grd_tilemap_update(int base_color)
{
if (m_base_color != base_color)
{
@@ -119,35 +119,32 @@ void tc0280grd_device::tc0280grd_tilemap_update( int base_color )
}
}
-void tc0280grd_device::tc0430grw_tilemap_update( int base_color )
+void tc0280grd_device::tc0430grw_tilemap_update(int base_color)
{
tc0280grd_tilemap_update(base_color);
}
-void tc0280grd_device::zoom_draw( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, uint32_t priority, int xmultiply )
+void tc0280grd_device::zoom_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, u32 priority, int xmultiply)
{
- uint32_t startx, starty;
- int incxx, incxy, incyx, incyy;
-
/* 24-bit signed */
- startx = ((m_ctrl[0] & 0xff) << 16) + m_ctrl[1];
+ u32 startx = ((m_ctrl[0] & 0xff) << 16) + m_ctrl[1];
if (startx & 0x800000)
startx -= 0x1000000;
- incxx = (int16_t)m_ctrl[2];
+ int incxx = (s16)m_ctrl[2];
incxx *= xmultiply;
- incyx = (int16_t)m_ctrl[3];
+ int incyx = (s16)m_ctrl[3];
/* 24-bit signed */
- starty = ((m_ctrl[4] & 0xff) << 16) + m_ctrl[5];
+ u32 starty = ((m_ctrl[4] & 0xff) << 16) + m_ctrl[5];
if (starty & 0x800000)
starty -= 0x1000000;
- incxy = (int16_t)m_ctrl[6];
+ int incxy = (s16)m_ctrl[6];
incxy *= xmultiply;
- incyy = (int16_t)m_ctrl[7];
+ int incyy = (s16)m_ctrl[7];
startx -= xoffset * incxx + yoffset * incyx;
starty -= xoffset * incxy + yoffset * incyy;
@@ -158,12 +155,12 @@ void tc0280grd_device::zoom_draw( screen_device &screen, bitmap_ind16 &bitmap, c
0, priority);
}
-void tc0280grd_device::tc0280grd_zoom_draw( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, uint32_t priority )
+void tc0280grd_device::tc0280grd_zoom_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, u32 priority)
{
zoom_draw(screen, bitmap, cliprect, xoffset, yoffset, priority, 2);
}
-void tc0280grd_device::tc0430grw_zoom_draw( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, uint32_t priority )
+void tc0280grd_device::tc0430grw_zoom_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, u32 priority)
{
zoom_draw(screen, bitmap, cliprect, xoffset, yoffset, priority, 1);
}
diff --git a/src/mame/video/tc0280grd.h b/src/mame/video/tc0280grd.h
index 848258bee63..688451bf066 100644
--- a/src/mame/video/tc0280grd.h
+++ b/src/mame/video/tc0280grd.h
@@ -8,23 +8,23 @@
class tc0280grd_device : public device_t
{
public:
- tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
// configuration
template <typename T> void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward<T>(tag)); }
void set_gfx_region(int gfxregion) { m_gfxnum = gfxregion; }
- DECLARE_READ16_MEMBER( tc0280grd_word_r );
- DECLARE_WRITE16_MEMBER( tc0280grd_word_w );
- DECLARE_WRITE16_MEMBER( tc0280grd_ctrl_word_w );
+ u16 tc0280grd_word_r(offs_t offset);
+ void tc0280grd_word_w(offs_t offset, u16 data, u16 mem_mask = ~0);
+ void tc0280grd_ctrl_word_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void tc0280grd_tilemap_update(int base_color);
- void tc0280grd_zoom_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, uint32_t priority);
+ void tc0280grd_zoom_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, u32 priority);
- DECLARE_READ16_MEMBER( tc0430grw_word_r );
- DECLARE_WRITE16_MEMBER( tc0430grw_word_w );
- DECLARE_WRITE16_MEMBER( tc0430grw_ctrl_word_w );
+ u16 tc0430grw_word_r(offs_t offset);
+ void tc0430grw_word_w(offs_t offset, u16 data, u16 mem_mask = ~0);
+ void tc0430grw_ctrl_word_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void tc0430grw_tilemap_update(int base_color);
- void tc0430grw_zoom_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, uint32_t priority);
+ void tc0430grw_zoom_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, u32 priority);
protected:
// device-level overrides
@@ -33,17 +33,17 @@ protected:
private:
// internal state
- std::unique_ptr<uint16_t[]> m_ram;
+ std::unique_ptr<u16[]> m_ram;
- tilemap_t *m_tilemap;
+ tilemap_t *m_tilemap;
- uint16_t m_ctrl[8];
- int m_base_color;
- int m_gfxnum;
+ u16 m_ctrl[8];
+ int m_base_color;
+ int m_gfxnum;
required_device<gfxdecode_device> m_gfxdecode;
- TILE_GET_INFO_MEMBER(tc0280grd_get_tile_info);
- void zoom_draw( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, uint32_t priority, int xmultiply );
+ TILE_GET_INFO_MEMBER(get_tile_info);
+ void zoom_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, u32 priority, int xmultiply);
};
DECLARE_DEVICE_TYPE(TC0280GRD, tc0280grd_device)