mirror of
https://github.com/holub/mame
synced 2025-06-30 07:58:56 +03:00
Merge remote-tracking branch 'refs/remotes/mamedev/master'
This commit is contained in:
commit
421656e108
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,4 +1,9 @@
|
||||
*~
|
||||
.*.sw?
|
||||
*.pyc
|
||||
*.pyo
|
||||
.DS_Store
|
||||
|
||||
/*
|
||||
/*/
|
||||
!/3rdparty/
|
||||
@ -30,7 +35,6 @@
|
||||
/.idea
|
||||
regtests/chdman/temp
|
||||
regtests/jedutil/output
|
||||
*.pyc
|
||||
*.mo
|
||||
/CMakeLists.txt
|
||||
/src/devices/cpu/m68000/m68kops.cpp
|
||||
|
@ -25,6 +25,7 @@ $( document ).ready(function() {
|
||||
$("div#navrow5 > ul.tablist").addClass("pagination pagination-sm pagination-centered");
|
||||
$("ul.tablist").css("margin-top", "0.5em");
|
||||
$("ul.tablist").css("margin-bottom", "0.5em");
|
||||
$("ul.tablist").css("padding-right", "50px");
|
||||
$("li.current").addClass("active");
|
||||
$("iframe").attr("scrolling", "yes");
|
||||
|
||||
@ -58,7 +59,7 @@ $( document ).ready(function() {
|
||||
$("div.ttname a").css("color", 'white');
|
||||
$("div.ttdef,div.ttdoc,div.ttdeci").addClass("panel-body");
|
||||
|
||||
$('#MSearchBox').parent().remove();
|
||||
//$('#MSearchBox').parent().remove();
|
||||
|
||||
//$('div.fragment.well div.line:first').css('margin-top', '15px');
|
||||
//$('div.fragment.well div.line:last').css('margin-bottom', '15px');
|
||||
|
@ -118,7 +118,7 @@ ABBREVIATE_BRIEF =
|
||||
ALWAYS_DETAILED_SEC = YES
|
||||
|
||||
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
|
||||
1# inherited members of a class in the documentation of that class as if those
|
||||
# inherited members of a class in the documentation of that class as if those
|
||||
# members were ordinary class members. Constructors, destructors and assignment
|
||||
# operators of the base classes will not be shown.
|
||||
# The default value is: NO.
|
||||
@ -517,7 +517,7 @@ INLINE_INFO = YES
|
||||
# name. If set to NO the members will appear in declaration order.
|
||||
# The default value is: YES.
|
||||
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_MEMBER_DOCS = NO
|
||||
|
||||
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
|
||||
# descriptions of file, namespace and class members alphabetically by member
|
||||
|
285
hash/neogeo.xml
285
hash/neogeo.xml
File diff suppressed because it is too large
Load Diff
96
hash/nes.xml
96
hash/nes.xml
@ -79788,6 +79788,22 @@ that the real dumps might surface -->
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_cb198" supported="no">
|
||||
<description>CoolBoy 198-in-1</description>
|
||||
<year>201?</year>
|
||||
<publisher><unknown></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="coolboy" />
|
||||
<feature name="pcb" value="UNL-COOLBOY" />
|
||||
<dataarea name="prg" size="33554432">
|
||||
<rom name="cb198in1.bin" size="33554432" crc="253364ea" sha1="808ad7ff037e016c6a7a88dbe7b2bf1d41a46546" offset="00000" />
|
||||
</dataarea>
|
||||
<!-- 256k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="262144">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_7x6ss" supported="no">
|
||||
<description>777777-in-1 (8 bit Slim Station, NEWPXP-DVT22-A PCB)(Unl)[U][!]</description>
|
||||
<year>19??</year>
|
||||
@ -79836,9 +79852,8 @@ that the real dumps might surface -->
|
||||
</part>
|
||||
</software>
|
||||
|
||||
|
||||
<software name="mc_cb400" supported="no">
|
||||
<description>CoolBoy 400 in 1</description>
|
||||
<description>CoolBoy 400-in-1</description>
|
||||
<year>19??</year>
|
||||
<publisher><unknown></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
@ -79914,6 +79929,54 @@ that the real dumps might surface -->
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_g450" supported="no">
|
||||
<description>Game 450-in-1</description>
|
||||
<year>201?</year>
|
||||
<publisher><unknown></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="coolboy" />
|
||||
<feature name="pcb" value="UNL-COOLBOY" />
|
||||
<dataarea name="prg" size="33554432">
|
||||
<rom name="g450in1.bin" size="33554432" crc="a4396e58" sha1="780d85b737bfc3ba9918f84d09c2d90d72c88dd3" offset="00000" />
|
||||
</dataarea>
|
||||
<!-- 256k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="262144">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_g500" supported="no">
|
||||
<description>Game 500-in-1</description>
|
||||
<year>201?</year>
|
||||
<publisher><unknown></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="coolboy" />
|
||||
<feature name="pcb" value="UNL-COOLBOY" />
|
||||
<dataarea name="prg" size="33554432">
|
||||
<rom name="g500in1.bin" size="33554432" crc="74787d9d" sha1="63f28d991351320f3427ddd541c9edb6d3c8fe5f" offset="00000" />
|
||||
</dataarea>
|
||||
<!-- 256k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="262144">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_sg218" supported="no">
|
||||
<description>Super Game 218-in-1</description>
|
||||
<year>201?</year>
|
||||
<publisher><unknown></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="coolboy" />
|
||||
<feature name="pcb" value="UNL-COOLBOY" />
|
||||
<dataarea name="prg" size="33554432">
|
||||
<rom name="sg218in1.bin" size="33554432" crc="82fc4149" sha1="080cb14134e2756472114227267b6ade4f1aab9b" offset="00000" />
|
||||
</dataarea>
|
||||
<!-- 256k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="262144">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_sg360" supported="no">
|
||||
<description>Super Game 360-in-1</description>
|
||||
<year>19??</year>
|
||||
@ -79930,9 +79993,24 @@ that the real dumps might surface -->
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_sg402" supported="no">
|
||||
<description>Super Game 402-in-1</description>
|
||||
<year>201?</year>
|
||||
<publisher><unknown></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="coolboy" />
|
||||
<feature name="pcb" value="UNL-COOLBOY" />
|
||||
<dataarea name="prg" size="33554432">
|
||||
<rom name="sg402in1.bin" size="33554432" crc="205daab3" sha1="b403daad9e0cd3b8490ef9127bcb7acd5b40f710" offset="00000" />
|
||||
</dataarea>
|
||||
<!-- 128k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="131072">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_gx121" supported="no">
|
||||
<description>Games Xplosion 121 in 1</description>
|
||||
<description>Games Xplosion 121-in-1</description>
|
||||
<year>19??</year>
|
||||
<publisher><unknown></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
@ -79947,6 +80025,18 @@ that the real dumps might surface -->
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_hh210" supported="no">
|
||||
<description>Handheld 210-in-1</description>
|
||||
<year>201?</year>
|
||||
<publisher><unknown></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="coolboy" />
|
||||
<feature name="pcb" value="UNL-COOLBOY" />
|
||||
<dataarea name="prg" size="33554432">
|
||||
<rom name="MSP55LV128T.bin" size="16777216" crc="9ba520d4" sha1="627f811b24314197e289a2ade668ff4115421bed" offset="00000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- TO SORT AND RENAME PROPERLY!!! -->
|
||||
|
||||
|
@ -594,11 +594,11 @@ msgstr "ビデオモード"
|
||||
|
||||
#: src/emu/ui/dsplmenu.cpp:40
|
||||
msgid "Hardware Stretch"
|
||||
msgstr ""
|
||||
msgstr "ハードウェアによる拡大"
|
||||
|
||||
#: src/emu/ui/dsplmenu.cpp:41
|
||||
msgid "Triple Buffering"
|
||||
msgstr ""
|
||||
msgstr "トリプルバッファ"
|
||||
|
||||
#: src/emu/ui/dsplmenu.cpp:42
|
||||
msgid "HLSL"
|
||||
@ -614,11 +614,11 @@ msgstr "バイリニアフィルタリング"
|
||||
|
||||
#: src/emu/ui/dsplmenu.cpp:46
|
||||
msgid "Bitmap Prescaling"
|
||||
msgstr ""
|
||||
msgstr "ビットマッププレスケール"
|
||||
|
||||
#: src/emu/ui/dsplmenu.cpp:47
|
||||
msgid "Multi-Threaded Rendering"
|
||||
msgstr ""
|
||||
msgstr "マルチスレッド描画"
|
||||
|
||||
#: src/emu/ui/dsplmenu.cpp:48
|
||||
msgid "Window Mode"
|
||||
@ -626,19 +626,19 @@ msgstr "ウィンドウモード"
|
||||
|
||||
#: src/emu/ui/dsplmenu.cpp:49
|
||||
msgid "Enforce Aspect Ratio"
|
||||
msgstr ""
|
||||
msgstr "アスペクト比を維持する"
|
||||
|
||||
#: src/emu/ui/dsplmenu.cpp:50
|
||||
msgid "Start Out Maximized"
|
||||
msgstr ""
|
||||
msgstr "開始時に最大化する"
|
||||
|
||||
#: src/emu/ui/dsplmenu.cpp:51
|
||||
msgid "Synchronized Refresh"
|
||||
msgstr ""
|
||||
msgstr "リフレッシュを同期"
|
||||
|
||||
#: src/emu/ui/dsplmenu.cpp:52
|
||||
msgid "Wait Vertical Sync"
|
||||
msgstr ""
|
||||
msgstr "V-Syncを待つ"
|
||||
|
||||
#: src/emu/ui/dsplmenu.cpp:204 src/emu/ui/dsplmenu.cpp:224
|
||||
#: src/emu/ui/optsmenu.cpp:265
|
||||
@ -647,7 +647,7 @@ msgstr "表示オプション"
|
||||
|
||||
#: src/emu/ui/filesel.cpp:159
|
||||
msgid "File Already Exists - Override?"
|
||||
msgstr ""
|
||||
msgstr "ファイルが存在します-上書きしますか?"
|
||||
|
||||
#: src/emu/ui/filesel.cpp:161 src/emu/ui/selgame.cpp:1598
|
||||
#: src/emu/ui/selgame.cpp:1599 src/emu/ui/selgame.cpp:1600
|
||||
@ -655,7 +655,7 @@ msgstr ""
|
||||
#: src/emu/ui/selgame.cpp:1603 src/emu/ui/selgame.cpp:1604
|
||||
#: src/emu/ui/selgame.cpp:1613
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
msgstr "いいえ"
|
||||
|
||||
#: src/emu/ui/filesel.cpp:162 src/emu/ui/selgame.cpp:1598
|
||||
#: src/emu/ui/selgame.cpp:1599 src/emu/ui/selgame.cpp:1600
|
||||
@ -663,7 +663,7 @@ msgstr ""
|
||||
#: src/emu/ui/selgame.cpp:1603 src/emu/ui/selgame.cpp:1604
|
||||
#: src/emu/ui/selgame.cpp:1613
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
msgstr "はい"
|
||||
|
||||
#: src/emu/ui/filesel.cpp:271
|
||||
msgid "New Image Name:"
|
||||
@ -679,7 +679,7 @@ msgstr "作成"
|
||||
|
||||
#: src/emu/ui/filesel.cpp:314
|
||||
msgid "Please enter a file extension too"
|
||||
msgstr ""
|
||||
msgstr "ファイルの拡張子を入力してください"
|
||||
|
||||
#: src/emu/ui/filesel.cpp:502 src/emu/ui/swlist.cpp:65
|
||||
msgid "[empty slot]"
|
||||
@ -711,29 +711,31 @@ msgstr "読み取り/書き込み"
|
||||
|
||||
#: src/emu/ui/filesel.cpp:866
|
||||
msgid "Read this image, write to another image"
|
||||
msgstr ""
|
||||
msgstr "このイメージから読み取り、別のイメージに書き込む"
|
||||
|
||||
#: src/emu/ui/filesel.cpp:867
|
||||
msgid "Read this image, write to diff"
|
||||
msgstr ""
|
||||
msgstr "このイメージから読み取り、差分(diff)に書き込む"
|
||||
|
||||
#: src/emu/ui/imgcntrl.cpp:115
|
||||
msgid "Cannot save over directory"
|
||||
msgstr ""
|
||||
msgstr "別のフォルダには保存できません"
|
||||
|
||||
#: src/emu/ui/imgcntrl.cpp:149
|
||||
msgid ""
|
||||
"The software selected is missing one or more required ROM or CHD images. "
|
||||
"Please select a different one."
|
||||
msgstr ""
|
||||
"選択したソフトウェアに必要な1つ以上のROMまたはCHDが不足しています。"
|
||||
"別の物を選択してください。"
|
||||
|
||||
#: src/emu/ui/info.cpp:98
|
||||
msgid "Not supported"
|
||||
msgstr ""
|
||||
msgstr "対応していません"
|
||||
|
||||
#: src/emu/ui/info.cpp:101
|
||||
msgid "Partially supported"
|
||||
msgstr ""
|
||||
msgstr "部分的に対応"
|
||||
|
||||
#: src/emu/ui/info.cpp:109
|
||||
msgid "[empty]"
|
||||
@ -753,7 +755,7 @@ msgstr "ユーザーインターフェイス"
|
||||
|
||||
#: src/emu/ui/inputmap.cpp:59
|
||||
msgid "Other Controls"
|
||||
msgstr ""
|
||||
msgstr "その他のコントロール"
|
||||
|
||||
#: src/emu/ui/inputmap.cpp:625 src/emu/ui/miscmenu.cpp:90
|
||||
#: src/emu/ui/slotopt.cpp:172
|
||||
@ -870,7 +872,7 @@ msgstr "お気に入りに追加または削除"
|
||||
|
||||
#: src/emu/ui/menu.cpp:64
|
||||
msgid "Export displayed list to file"
|
||||
msgstr ""
|
||||
msgstr "表示されているリストをファイルに出力"
|
||||
|
||||
#: src/emu/ui/menu.cpp:65
|
||||
msgid "Show DATs view"
|
||||
@ -936,6 +938,8 @@ msgid ""
|
||||
"Tickets dispensed: %1$d\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"チケット発行: %1$d\n"
|
||||
"\n"
|
||||
|
||||
#: src/emu/ui/miscmenu.cpp:256
|
||||
msgid "Coin %1$c: NA%3$s\n"
|
||||
@ -952,7 +956,7 @@ msgstr "(ロック)"
|
||||
|
||||
#: src/emu/ui/miscmenu.cpp:518
|
||||
msgid "Visible Delay"
|
||||
msgstr "目に見えるディレイ"
|
||||
msgstr "表示する長さ"
|
||||
|
||||
#: src/emu/ui/miscmenu.cpp:557
|
||||
msgid "Re-select last machine played"
|
||||
@ -1006,7 +1010,7 @@ msgstr "%s.xmlをuiフォルダーに保存しました。"
|
||||
|
||||
#: src/emu/ui/miscmenu.cpp:765
|
||||
msgid "Name: Description:\n"
|
||||
msgstr ""
|
||||
msgstr "名前: 詳細:\n"
|
||||
|
||||
#: src/emu/ui/miscmenu.cpp:777
|
||||
#, c-format
|
||||
@ -1015,15 +1019,15 @@ msgstr "%s.txtをuiフォルダーに保存しました。"
|
||||
|
||||
#: src/emu/ui/miscmenu.cpp:795
|
||||
msgid "Export XML format (like -listxml)"
|
||||
msgstr ""
|
||||
msgstr "XML形式で出力(-listxml同様)"
|
||||
|
||||
#: src/emu/ui/miscmenu.cpp:796
|
||||
msgid "Export TXT format (like -listfull)"
|
||||
msgstr ""
|
||||
msgstr "TXT形式で出力(-listfull同様)"
|
||||
|
||||
#: src/emu/ui/miscmenu.cpp:854
|
||||
msgid "Dummy"
|
||||
msgstr ""
|
||||
msgstr "ダミー"
|
||||
|
||||
#: src/emu/ui/miscmenu.cpp:856
|
||||
msgid "Save machine configuration"
|
||||
@ -1043,7 +1047,7 @@ msgstr " ^!カテゴリ"
|
||||
|
||||
#: src/emu/ui/optsmenu.cpp:254
|
||||
msgid "^!Setup custom filter"
|
||||
msgstr ""
|
||||
msgstr "^!カスタムフィルタを設定する"
|
||||
|
||||
#: src/emu/ui/optsmenu.cpp:262
|
||||
msgid "Customize UI"
|
||||
@ -1128,6 +1132,10 @@ msgid ""
|
||||
"\n"
|
||||
"Press any key (except ESC) to continue."
|
||||
msgstr ""
|
||||
"選択したマシンに必要な1つ以上のROMまたはCHDが不足しています。"
|
||||
"別のマシンを選択してください。\n"
|
||||
"\n"
|
||||
"進めるには、何かキー(ESC以外)を押してください。"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:647 src/emu/ui/simpleselgame.cpp:262
|
||||
msgid "Configure Options"
|
||||
@ -1140,7 +1148,7 @@ msgstr "マシンの設定"
|
||||
#: src/emu/ui/selgame.cpp:804
|
||||
#, c-format
|
||||
msgid "%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"
|
||||
msgstr ""
|
||||
msgstr "%1$s %2$s ( %3$d / %4$d マシン (%5$d BIOS) )"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:814
|
||||
#, c-format
|
||||
@ -1160,7 +1168,7 @@ msgstr "%1$s検索:%2$s_"
|
||||
#: src/emu/ui/selgame.cpp:884
|
||||
#, c-format
|
||||
msgid "Romset: %1$-.100s"
|
||||
msgstr ""
|
||||
msgstr "ROMセット: %1$-.100s"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:887 src/emu/ui/selgame.cpp:936
|
||||
#: src/emu/ui/selsoft.cpp:742 src/emu/ui/selsoft.cpp:792
|
||||
@ -1172,34 +1180,34 @@ msgstr ""
|
||||
#: src/emu/ui/selgame.cpp:893 src/emu/ui/selsoft.cpp:748
|
||||
#, c-format
|
||||
msgid "Driver is clone of: %1$-.100s"
|
||||
msgstr ""
|
||||
msgstr "次のクローンのドライバ: %1$-.100s"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:895 src/emu/ui/selsoft.cpp:750
|
||||
msgid "Driver is parent"
|
||||
msgstr ""
|
||||
msgstr "親セットのドライバ"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:899 src/emu/ui/selsoft.cpp:754
|
||||
#: src/emu/ui/simpleselgame.cpp:332
|
||||
msgid "Overall: NOT WORKING"
|
||||
msgstr ""
|
||||
msgstr "概略: 動作不可"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:901 src/emu/ui/selsoft.cpp:756
|
||||
#: src/emu/ui/simpleselgame.cpp:334
|
||||
msgid "Overall: Unemulated Protection"
|
||||
msgstr ""
|
||||
msgstr "概略: プロテクトが未エミュレート"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:903 src/emu/ui/selsoft.cpp:758
|
||||
#: src/emu/ui/simpleselgame.cpp:336
|
||||
msgid "Overall: Working"
|
||||
msgstr ""
|
||||
msgstr "概略: 動作可"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:907 src/emu/ui/selsoft.cpp:762
|
||||
msgid "Graphics: Imperfect, "
|
||||
msgstr ""
|
||||
msgstr "グラフィック: 不完全、 "
|
||||
|
||||
#: src/emu/ui/selgame.cpp:909 src/emu/ui/selsoft.cpp:764
|
||||
msgid "Graphics: OK, "
|
||||
msgstr ""
|
||||
msgstr "グラフィック: 正常、 "
|
||||
|
||||
#: src/emu/ui/selgame.cpp:912 src/emu/ui/selsoft.cpp:767
|
||||
msgid "Sound: Unimplemented"
|
||||
@ -1207,42 +1215,42 @@ msgstr "サウンド:未実装"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:914 src/emu/ui/selsoft.cpp:769
|
||||
msgid "Sound: Imperfect"
|
||||
msgstr ""
|
||||
msgstr "サウンド: 不完全"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:916 src/emu/ui/selsoft.cpp:771
|
||||
msgid "Sound: OK"
|
||||
msgstr ""
|
||||
msgstr "サウンド: 正常"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:933
|
||||
#, c-format
|
||||
msgid "System: %1$-.100s"
|
||||
msgstr ""
|
||||
msgstr "システム: %1$-.100s"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:940 src/emu/ui/selsoft.cpp:796
|
||||
#, c-format
|
||||
msgid "Software is clone of: %1$-.100s"
|
||||
msgstr ""
|
||||
msgstr "次のクローンのソフトウェア: %1$-.100s"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:942 src/emu/ui/selsoft.cpp:798
|
||||
msgid "Software is parent"
|
||||
msgstr ""
|
||||
msgstr "親セットのソフトウェア"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:947 src/emu/ui/selsoft.cpp:803
|
||||
msgid "Supported: No"
|
||||
msgstr ""
|
||||
msgstr "対応状況: いいえ"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:952 src/emu/ui/selsoft.cpp:808
|
||||
msgid "Supported: Partial"
|
||||
msgstr ""
|
||||
msgstr "対応状況: 部分的"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:957 src/emu/ui/selsoft.cpp:813
|
||||
msgid "Supported: Yes"
|
||||
msgstr ""
|
||||
msgstr "対応状況: はい"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:962 src/emu/ui/selsoft.cpp:818
|
||||
#, c-format
|
||||
msgid "romset: %1$-.100s"
|
||||
msgstr ""
|
||||
msgstr "ROMセット: %1$-.100s"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:969
|
||||
#, c-format
|
||||
@ -1252,7 +1260,7 @@ msgstr ""
|
||||
#: src/emu/ui/selgame.cpp:1565
|
||||
#, c-format
|
||||
msgid "Romset: %1$-.100s\n"
|
||||
msgstr ""
|
||||
msgstr "ROMセット: %1$-.100s\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1566
|
||||
#, c-format
|
||||
@ -1267,35 +1275,35 @@ msgstr "製造元: %1$-.100s\n"
|
||||
#: src/emu/ui/selgame.cpp:1571
|
||||
#, c-format
|
||||
msgid "Driver is Clone of: %1$-.100s\n"
|
||||
msgstr ""
|
||||
msgstr "次のクローンのドライバ: %1$-.100s\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1573
|
||||
msgid "Driver is Parent\n"
|
||||
msgstr ""
|
||||
msgstr "親セットのドライバ\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1576
|
||||
msgid "Overall: NOT WORKING\n"
|
||||
msgstr ""
|
||||
msgstr "概略: 動作不可\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1578
|
||||
msgid "Overall: Unemulated Protection\n"
|
||||
msgstr ""
|
||||
msgstr "概略: プロテクトが未エミュレート\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1580
|
||||
msgid "Overall: Working\n"
|
||||
msgstr ""
|
||||
msgstr "概略: 動作可\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1583
|
||||
msgid "Graphics: Imperfect Colors\n"
|
||||
msgstr ""
|
||||
msgstr "グラフィック: 色が不完全\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1587
|
||||
msgid "Graphics: Imperfect\n"
|
||||
msgstr ""
|
||||
msgstr "グラフィック: 不完全\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1589
|
||||
msgid "Graphics: OK\n"
|
||||
msgstr ""
|
||||
msgstr "グラフィック: 正常\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1592
|
||||
msgid "Sound: Unimplemented\n"
|
||||
@ -1303,46 +1311,46 @@ msgstr "サウンド: 未実装\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1594
|
||||
msgid "Sound: Imperfect\n"
|
||||
msgstr ""
|
||||
msgstr "サウンド: 不完全\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1596
|
||||
msgid "Sound: OK\n"
|
||||
msgstr ""
|
||||
msgstr "サウンド: 正常\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1598
|
||||
#, c-format
|
||||
msgid "Driver is Skeleton: %1$s\n"
|
||||
msgstr ""
|
||||
msgstr "スケルトンドライバ: %1$s\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1599
|
||||
#, c-format
|
||||
msgid "Game is Mechanical: %1$s\n"
|
||||
msgstr ""
|
||||
msgstr "機械仕掛けのゲーム: %1$s\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1600
|
||||
#, c-format
|
||||
msgid "Requires Artwork: %1$s\n"
|
||||
msgstr ""
|
||||
msgstr "アートワークが必要: %1$s\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1601
|
||||
#, c-format
|
||||
msgid "Requires Clickable Artwork: %1$s\n"
|
||||
msgstr ""
|
||||
msgstr "クリック可のアートワークが必要: %1$s\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1602
|
||||
#, c-format
|
||||
msgid "Support Cocktail: %1$s\n"
|
||||
msgstr ""
|
||||
msgstr "カクテルモード対応: %1$s\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1603
|
||||
#, c-format
|
||||
msgid "Driver is Bios: %1$s\n"
|
||||
msgstr ""
|
||||
msgstr "BIOSドライバ: %1$s\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1604
|
||||
#, c-format
|
||||
msgid "Support Save: %1$s\n"
|
||||
msgstr ""
|
||||
msgstr "セーブ対応: %1$s\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1605
|
||||
#, c-format
|
||||
@ -1360,33 +1368,35 @@ msgstr "横"
|
||||
#: src/emu/ui/selgame.cpp:1613
|
||||
#, c-format
|
||||
msgid "Requires CHD: %1$s\n"
|
||||
msgstr ""
|
||||
msgstr "CHDが必要: %1$s\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1626
|
||||
msgid "Roms Audit Pass: OK\n"
|
||||
msgstr ""
|
||||
msgstr "ROM検証結果: 正常\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1628
|
||||
msgid "Roms Audit Pass: BAD\n"
|
||||
msgstr ""
|
||||
msgstr "ROM検証結果: 異常\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1631
|
||||
msgid "Samples Audit Pass: None Needed\n"
|
||||
msgstr ""
|
||||
msgstr "サンプル検証結果: 不要\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1633
|
||||
msgid "Samples Audit Pass: OK\n"
|
||||
msgstr ""
|
||||
msgstr "サンプル検証結果: 正常\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1635
|
||||
msgid "Samples Audit Pass: BAD\n"
|
||||
msgstr ""
|
||||
msgstr "サンプル検証結果: 異常\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1638
|
||||
msgid ""
|
||||
"Roms Audit Pass: Disabled\n"
|
||||
"Samples Audit Pass: Disabled\n"
|
||||
msgstr ""
|
||||
"ROM検証結果: 無効\n"
|
||||
"サンプル検証結果: 無効\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:2070 src/emu/ui/selgame.cpp:2231
|
||||
#: src/emu/ui/selsoft.cpp:1639
|
||||
@ -1408,11 +1418,15 @@ msgid ""
|
||||
"\n"
|
||||
"Press any key (except ESC) to continue."
|
||||
msgstr ""
|
||||
"選択したソフトウェアに必要な1つ以上のファイルが不足しています。"
|
||||
"別のソフトウェアを選択してください。\n"
|
||||
"\n"
|
||||
"進めるには、何かキー(ESC以外)を押してください。"
|
||||
|
||||
#: src/emu/ui/selsoft.cpp:681
|
||||
#, c-format
|
||||
msgid "%1$s %2$s ( %3$d / %4$d softwares )"
|
||||
msgstr ""
|
||||
msgstr "%1$s %2$s ( %3$d / %4$d ソフトウェア )"
|
||||
|
||||
#: src/emu/ui/selsoft.cpp:682
|
||||
#, c-format
|
||||
@ -1471,15 +1485,19 @@ msgid ""
|
||||
"If this is your first time using %2$s, please see the config.txt file in the "
|
||||
"docs directory for information on configuring %2$s."
|
||||
msgstr ""
|
||||
"マシンが見つかりません。%1$s.iniファイルで指定したrompathを確認してください。\n"
|
||||
"\n"
|
||||
"もし %2$s の利用が初めてなら、%2$s の設定方法についてdocsフォルダの"
|
||||
"config.txtファイルをご覧ください。"
|
||||
|
||||
#: src/emu/ui/simpleselgame.cpp:287
|
||||
#, c-format
|
||||
msgid "Type name or select: %1$s_"
|
||||
msgstr ""
|
||||
msgstr "名前を入力もしくは選択: %1$s_"
|
||||
|
||||
#: src/emu/ui/simpleselgame.cpp:289
|
||||
msgid "Type name or select: (random)"
|
||||
msgstr ""
|
||||
msgstr "名前を入力もしくは選択: (ランダム)"
|
||||
|
||||
#: src/emu/ui/simpleselgame.cpp:328
|
||||
#, c-format
|
||||
@ -1488,11 +1506,11 @@ msgstr "ドライバ:%1$-.100s"
|
||||
|
||||
#: src/emu/ui/simpleselgame.cpp:340 src/emu/ui/simpleselgame.cpp:347
|
||||
msgid "Imperfect"
|
||||
msgstr ""
|
||||
msgstr "不完全"
|
||||
|
||||
#: src/emu/ui/simpleselgame.cpp:342 src/emu/ui/simpleselgame.cpp:349
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
msgstr "正常"
|
||||
|
||||
#: src/emu/ui/simpleselgame.cpp:345
|
||||
msgid "Unimplemented"
|
||||
@ -1525,12 +1543,12 @@ msgstr "【ファイルマネージャ】"
|
||||
|
||||
#: src/emu/ui/swlist.cpp:235
|
||||
msgid "Switch Item Ordering"
|
||||
msgstr ""
|
||||
msgstr "項目の並び順の切り替え"
|
||||
|
||||
#: src/emu/ui/swlist.cpp:268
|
||||
#, c-format
|
||||
msgid "Switched Order: entries now ordered by %s"
|
||||
msgstr ""
|
||||
msgstr "並び順を切り替え: 一覧は現在 %s 順"
|
||||
|
||||
#: src/emu/ui/swlist.cpp:268
|
||||
msgid "shortname"
|
||||
@ -1863,7 +1881,7 @@ msgstr "%1$sの音量"
|
||||
#: src/emu/ui/ui.cpp:1999
|
||||
#, c-format
|
||||
msgid "Overclock CPU %1$s"
|
||||
msgstr ""
|
||||
msgstr "CPU %1$sのオーバークロック"
|
||||
|
||||
#: src/emu/ui/ui.cpp:2019
|
||||
#, c-format
|
||||
@ -1888,42 +1906,42 @@ msgstr "%1$sのガンマ"
|
||||
#: src/emu/ui/ui.cpp:2036
|
||||
#, c-format
|
||||
msgid "%1$s Horiz Stretch"
|
||||
msgstr ""
|
||||
msgstr "%1$s 横方向の拡大"
|
||||
|
||||
#: src/emu/ui/ui.cpp:2039
|
||||
#, c-format
|
||||
msgid "%1$s Horiz Position"
|
||||
msgstr ""
|
||||
msgstr "%1$s 横方向の位置"
|
||||
|
||||
#: src/emu/ui/ui.cpp:2042
|
||||
#, c-format
|
||||
msgid "%1$s Vert Stretch"
|
||||
msgstr ""
|
||||
msgstr "%1$s 縦方向の拡大"
|
||||
|
||||
#: src/emu/ui/ui.cpp:2045
|
||||
#, c-format
|
||||
msgid "%1$s Vert Position"
|
||||
msgstr ""
|
||||
msgstr "%1$s 縦方向の位置"
|
||||
|
||||
#: src/emu/ui/ui.cpp:2063
|
||||
#, c-format
|
||||
msgid "Laserdisc '%1$s' Horiz Stretch"
|
||||
msgstr ""
|
||||
msgstr "レーザーディスク '%1$s' 横方向の拡大"
|
||||
|
||||
#: src/emu/ui/ui.cpp:2066
|
||||
#, c-format
|
||||
msgid "Laserdisc '%1$s' Horiz Position"
|
||||
msgstr ""
|
||||
msgstr "レーザーディスク '%1$s' 横方向の位置"
|
||||
|
||||
#: src/emu/ui/ui.cpp:2069
|
||||
#, c-format
|
||||
msgid "Laserdisc '%1$s' Vert Stretch"
|
||||
msgstr ""
|
||||
msgstr "レーザーディスク '%1$s' 縦方向の拡大"
|
||||
|
||||
#: src/emu/ui/ui.cpp:2072
|
||||
#, c-format
|
||||
msgid "Laserdisc '%1$s' Vert Position"
|
||||
msgstr ""
|
||||
msgstr "レーザーディスク '%1$s' 縦方向の位置"
|
||||
|
||||
#: src/emu/ui/ui.cpp:2081
|
||||
msgid "Vector Flicker"
|
||||
@ -1944,7 +1962,7 @@ msgstr "ビーム強度比重"
|
||||
#: src/emu/ui/ui.cpp:2099
|
||||
#, c-format
|
||||
msgid "Crosshair Scale %1$s"
|
||||
msgstr ""
|
||||
msgstr "照準の大きさ %1$s"
|
||||
|
||||
#: src/emu/ui/ui.cpp:2099 src/emu/ui/ui.cpp:2102
|
||||
msgid "X"
|
||||
@ -1957,7 +1975,7 @@ msgstr ""
|
||||
#: src/emu/ui/ui.cpp:2102
|
||||
#, c-format
|
||||
msgid "Crosshair Offset %1$s"
|
||||
msgstr ""
|
||||
msgstr "照準のオフセット %1$s"
|
||||
|
||||
#: src/emu/ui/ui.cpp:2121
|
||||
#, c-format
|
||||
@ -2005,22 +2023,22 @@ msgstr "画面"
|
||||
#: src/emu/ui/ui.cpp:2544
|
||||
#, c-format
|
||||
msgid "Crosshair Scale X %1$1.3f"
|
||||
msgstr ""
|
||||
msgstr "照準の大きさ X %1$1.3f"
|
||||
|
||||
#: src/emu/ui/ui.cpp:2544
|
||||
#, c-format
|
||||
msgid "Crosshair Scale Y %1$1.3f"
|
||||
msgstr ""
|
||||
msgstr "照準の大きさ Y %1$1.3f"
|
||||
|
||||
#: src/emu/ui/ui.cpp:2563
|
||||
#, c-format
|
||||
msgid "Crosshair Offset X %1$1.3f"
|
||||
msgstr ""
|
||||
msgstr "照準のオフセット X %1$1.3f"
|
||||
|
||||
#: src/emu/ui/ui.cpp:2563
|
||||
#, c-format
|
||||
msgid "Crosshair Offset Y %1$1.3f"
|
||||
msgstr ""
|
||||
msgstr "照準のオフセット Y %1$1.3f"
|
||||
|
||||
#: src/emu/ui/videoopt.cpp:55
|
||||
#, c-format
|
||||
|
@ -1059,6 +1059,7 @@ configuration { "asmjs" }
|
||||
buildoptions {
|
||||
"-std=gnu89",
|
||||
"-Wno-implicit-function-declaration",
|
||||
"-s USE_SDL_TTF=2",
|
||||
}
|
||||
buildoptions_cpp {
|
||||
"-x c++",
|
||||
@ -1280,6 +1281,7 @@ end
|
||||
}
|
||||
configuration { "vs2015" }
|
||||
buildoptions {
|
||||
"/wd4334", -- warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
|
||||
"/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
|
||||
"/wd4457", -- warning C4457: declaration of 'xxx' hides function parameter
|
||||
"/wd4458", -- warning C4458: declaration of 'xxx' hides class member
|
||||
|
@ -2587,3 +2587,41 @@ if (BUSES["NEWBRAIN"]~=null) then
|
||||
MAME_DIR .. "src/devices/bus/newbrain/fdc.h",
|
||||
}
|
||||
end
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/bus/svi3x8/expander/expander.h,BUSES["SVI_EXPANDER"] = true
|
||||
---------------------------------------------------
|
||||
|
||||
if (BUSES["SVI_EXPANDER"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/expander/expander.cpp",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/expander/expander.h",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/expander/modules.cpp",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/expander/modules.h",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/expander/sv601.cpp",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/expander/sv601.h",
|
||||
}
|
||||
end
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/bus/svi3x8/slot/slot.h,BUSES["SVI_SLOT"] = true
|
||||
---------------------------------------------------
|
||||
|
||||
if (BUSES["SVI_SLOT"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/slot.cpp",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/slot.h",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/cards.cpp",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/cards.h",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv801.cpp",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv801.h",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv803.cpp",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv803.h",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv806.cpp",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv806.h",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv807.cpp",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv807.h",
|
||||
}
|
||||
end
|
||||
|
@ -1842,19 +1842,39 @@ if (CPUS["AVR8"]~=null or _OPTIONS["with-tools"]) then
|
||||
end
|
||||
|
||||
--------------------------------------------------
|
||||
-- Texas Instruments TMS0980
|
||||
--@src/devices/cpu/tms0980/tms0980.h,CPUS["TMS0980"] = true
|
||||
-- Texas Instruments TMS1000 series
|
||||
--@src/devices/cpu/tms1000/tms1000.h,CPUS["TMS1000"] = true
|
||||
--@src/devices/cpu/tms1000/tms1100.h,CPUS["TMS1000"] = true
|
||||
--@src/devices/cpu/tms1000/tms1400.h,CPUS["TMS1000"] = true
|
||||
--@src/devices/cpu/tms1000/tms0970.h,CPUS["TMS1000"] = true
|
||||
--@src/devices/cpu/tms1000/tms0980.h,CPUS["TMS1000"] = true
|
||||
--@src/devices/cpu/tms1000/tms0270.h,CPUS["TMS1000"] = true
|
||||
--@src/devices/cpu/tms1000/tp0320.h,CPUS["TMS1000"] = true
|
||||
--------------------------------------------------
|
||||
|
||||
if (CPUS["TMS0980"]~=null) then
|
||||
if (CPUS["TMS1000"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/cpu/tms0980/tms0980.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/tms0980/tms0980.h",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tms1k_base.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tms1k_base.h",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tms1000.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tms1000.h",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tms1100.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tms1100.h",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tms1400.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tms1400.h",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tms0970.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tms0970.h",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tms0980.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tms0980.h",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tms0270.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tms0270.h",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tp0320.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/tms1000/tp0320.h",
|
||||
}
|
||||
end
|
||||
|
||||
if (CPUS["TMS0980"]~=null or _OPTIONS["with-tools"]) then
|
||||
table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/tms0980/tms0980d.cpp")
|
||||
if (CPUS["TMS1000"]~=null or _OPTIONS["with-tools"]) then
|
||||
table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/tms1000/tms1k_dasm.cpp")
|
||||
end
|
||||
|
||||
--------------------------------------------------
|
||||
@ -1879,7 +1899,6 @@ end
|
||||
--@src/devices/cpu/tms9900/tms9900.h,CPUS["TMS9900"] = true
|
||||
--@src/devices/cpu/tms9900/tms9980a.h,CPUS["TMS9900"] = true
|
||||
--@src/devices/cpu/tms9900/tms9995.h,CPUS["TMS9900"] = true
|
||||
|
||||
--------------------------------------------------
|
||||
|
||||
if (CPUS["TMS9900"]~=null) then
|
||||
|
@ -109,6 +109,7 @@ end
|
||||
local emccopts = ""
|
||||
emccopts = emccopts .. " -O3"
|
||||
emccopts = emccopts .. " -s USE_SDL=2"
|
||||
emccopts = emccopts .. " -s USE_SDL_TTF=2"
|
||||
emccopts = emccopts .. " --memory-init-file 0"
|
||||
emccopts = emccopts .. " -s ALLOW_MEMORY_GROWTH=0"
|
||||
emccopts = emccopts .. " -s TOTAL_MEMORY=268435456"
|
||||
|
@ -100,7 +100,7 @@ CPUS["SM8500"] = true
|
||||
CPUS["MINX"] = true
|
||||
CPUS["SSEM"] = true
|
||||
CPUS["AVR8"] = true
|
||||
--CPUS["TMS0980"] = true
|
||||
--CPUS["TMS1000"] = true
|
||||
CPUS["I4004"] = true
|
||||
CPUS["SUPERFX"] = true
|
||||
CPUS["Z8"] = true
|
||||
|
@ -101,7 +101,7 @@ CPUS["SM8500"] = true
|
||||
CPUS["MINX"] = true
|
||||
CPUS["SSEM"] = true
|
||||
CPUS["AVR8"] = true
|
||||
CPUS["TMS0980"] = true
|
||||
CPUS["TMS1000"] = true
|
||||
CPUS["I4004"] = true
|
||||
CPUS["SUPERFX"] = true
|
||||
CPUS["Z8"] = true
|
||||
@ -652,6 +652,8 @@ BUSES["SMS_EXP"] = true
|
||||
BUSES["SNES"] = true
|
||||
BUSES["SNES_CTRL"] = true
|
||||
BUSES["SPC1000"] = true
|
||||
BUSES["SVI_EXPANDER"] = true
|
||||
BUSES["SVI_SLOT"] = true
|
||||
BUSES["TI99PEB"] = true
|
||||
BUSES["TI99X"] = true
|
||||
BUSES["TIKI100"] = true
|
||||
|
@ -295,17 +295,17 @@ int gba_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
|
||||
// first detect nvram type based on strings inside the file
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
if (!memcmp(&ROM[i], "EEPROM_V", 8))
|
||||
if ((i<len-8) && !memcmp(&ROM[i], "EEPROM_V", 8))
|
||||
chip |= GBA_CHIP_EEPROM; // should be either GBA_CHIP_EEPROM_4K or GBA_CHIP_EEPROM_64K, but it is not yet possible to automatically detect which one
|
||||
else if ((!memcmp(&ROM[i], "SRAM_V", 6)) || (!memcmp(&ROM[i], "SRAM_F_V", 8))) // || (!memcmp(&data[i], "ADVANCEWARS", 11))) //advance wars 1 & 2 has SRAM, but no "SRAM_" string can be found inside the ROM space
|
||||
else if (((i<len-6) && !memcmp(&ROM[i], "SRAM_V", 6)) || ((i<len-8) && !memcmp(&ROM[i], "SRAM_F_V", 8))) // || ((i<len-11) && !memcmp(&data[i], "ADVANCEWARS", 11))) //advance wars 1 & 2 has SRAM, but no "SRAM_" string can be found inside the ROM space
|
||||
chip |= GBA_CHIP_SRAM;
|
||||
else if (!memcmp(&ROM[i], "FLASH1M_V", 9))
|
||||
else if ((i<len-9) && !memcmp(&ROM[i], "FLASH1M_V", 9))
|
||||
chip |= GBA_CHIP_FLASH_1M;
|
||||
else if (!memcmp(&ROM[i], "FLASH512_V", 10))
|
||||
else if ((i<len-10) && !memcmp(&ROM[i], "FLASH512_V", 10))
|
||||
chip |= GBA_CHIP_FLASH_512;
|
||||
else if (!memcmp(&ROM[i], "FLASH_V", 7))
|
||||
else if ((i<len-7) && !memcmp(&ROM[i], "FLASH_V", 7))
|
||||
chip |= GBA_CHIP_FLASH;
|
||||
else if (!memcmp(&ROM[i], "SIIRTC_V", 8))
|
||||
else if ((i<len-8) && !memcmp(&ROM[i], "SIIRTC_V", 8))
|
||||
chip |= GBA_CHIP_RTC;
|
||||
}
|
||||
osd_printf_info("GBA: Detected (ROM) %s\n", gba_chip_string(chip).c_str());
|
||||
|
@ -191,6 +191,7 @@ void trident_vga_device::device_reset()
|
||||
// Windows 3.1 TGUI9440AGi drivers do not set the pointer colour registers?
|
||||
tri.cursor_bg = 0x00000000;
|
||||
tri.cursor_fg = 0xffffffff;
|
||||
tri.pixel_depth = 0x10; //disable 8bpp mode by default
|
||||
}
|
||||
|
||||
UINT32 trident_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
@ -443,7 +444,6 @@ void trident_vga_device::trident_seq_reg_write(UINT8 index, UINT8 data)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(LOG) logerror("Trident SR%02X: %s mode write %02x\n",index,tri.new_mode ? "new" : "old",data);
|
||||
switch(index)
|
||||
{
|
||||
case 0x0b:
|
||||
@ -490,6 +490,7 @@ void trident_vga_device::trident_seq_reg_write(UINT8 index, UINT8 data)
|
||||
if(!LOG) logerror("Trident: Sequencer index %02x read\n",index);
|
||||
}
|
||||
}
|
||||
if(LOG) logerror("Trident SR%02X: %s mode write %02x\n",index,tri.new_mode ? "new" : "old",data);
|
||||
}
|
||||
|
||||
UINT8 trident_vga_device::trident_crtc_reg_read(UINT8 index)
|
||||
@ -605,7 +606,6 @@ void trident_vga_device::trident_crtc_reg_write(UINT8 index, UINT8 data)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(LOG) logerror("Trident CR%02X: write %02x\n",index,data);
|
||||
switch(index)
|
||||
{
|
||||
case 0x1e: // Module Testing Register
|
||||
@ -704,6 +704,7 @@ void trident_vga_device::trident_crtc_reg_write(UINT8 index, UINT8 data)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(LOG) logerror("Trident CR%02X: write %02x\n",index,data);
|
||||
}
|
||||
|
||||
UINT8 trident_vga_device::trident_gc_reg_read(UINT8 index)
|
||||
@ -764,6 +765,7 @@ void trident_vga_device::trident_gc_reg_write(UINT8 index, UINT8 data)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(LOG) logerror("Trident GC%02X: write %02x\n",index,data);
|
||||
}
|
||||
|
||||
READ8_MEMBER(trident_vga_device::port_03c0_r)
|
||||
|
151
src/devices/bus/svi3x8/expander/expander.cpp
Normal file
151
src/devices/bus/svi3x8/expander/expander.cpp
Normal file
@ -0,0 +1,151 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SVI 318/328 Expansion Slot
|
||||
|
||||
50-pin slot
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "expander.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type SVI_EXPANDER = &device_creator<svi_expander_device>;
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// SLOT DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// svi_expander_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
svi_expander_device::svi_expander_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, SVI_EXPANDER, "SVI 318/328 Expander Bus", tag, owner, clock, "svi_expander", __FILE__),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_module(nullptr),
|
||||
m_int_handler(*this),
|
||||
m_romdis_handler(*this),
|
||||
m_ramdis_handler(*this),
|
||||
m_ctrl1_handler(*this),
|
||||
m_ctrl2_handler(*this)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// svi_expander_device - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
svi_expander_device::~svi_expander_device()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void svi_expander_device::device_start()
|
||||
{
|
||||
// get inserted module
|
||||
m_module = dynamic_cast<device_svi_expander_interface *>(get_card_device());
|
||||
|
||||
// resolve callbacks
|
||||
m_int_handler.resolve_safe();
|
||||
m_romdis_handler.resolve_safe();
|
||||
m_ramdis_handler.resolve_safe();
|
||||
m_ctrl1_handler.resolve_safe();
|
||||
m_ctrl2_handler.resolve_safe();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void svi_expander_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// host to module interface
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER( svi_expander_device::mreq_r )
|
||||
{
|
||||
if (m_module)
|
||||
return m_module->mreq_r(space, offset);
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( svi_expander_device::mreq_w )
|
||||
{
|
||||
if (m_module)
|
||||
m_module->mreq_w(space, offset, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( svi_expander_device::iorq_r )
|
||||
{
|
||||
if (m_module)
|
||||
return m_module->iorq_r(space, offset);
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( svi_expander_device::iorq_w )
|
||||
{
|
||||
if (m_module)
|
||||
m_module->iorq_w(space, offset, data);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( svi_expander_device::bk21_w )
|
||||
{
|
||||
if (m_module)
|
||||
m_module->bk21_w(state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( svi_expander_device::bk22_w )
|
||||
{
|
||||
if (m_module)
|
||||
m_module->bk22_w(state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( svi_expander_device::bk31_w )
|
||||
{
|
||||
if (m_module)
|
||||
m_module->bk31_w(state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( svi_expander_device::bk32_w )
|
||||
{
|
||||
if (m_module)
|
||||
m_module->bk32_w(state);
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CARTRIDGE INTERFACE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_svi_expander_interface - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_svi_expander_interface::device_svi_expander_interface(const machine_config &mconfig, device_t &device) :
|
||||
device_slot_card_interface(mconfig, device)
|
||||
{
|
||||
m_expander = dynamic_cast<svi_expander_device *>(device.owner());
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// ~device_expansion_interface - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_svi_expander_interface::~device_svi_expander_interface()
|
||||
{
|
||||
}
|
162
src/devices/bus/svi3x8/expander/expander.h
Normal file
162
src/devices/bus/svi3x8/expander/expander.h
Normal file
@ -0,0 +1,162 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SVI 318/328 Expander Slot
|
||||
|
||||
50-pin slot
|
||||
|
||||
1 +5V 2 /CNTRL2
|
||||
3 +12V 4 -12V
|
||||
5 /CNTRL1 6 /WAIT
|
||||
7 /RST 8 CPUCLK
|
||||
9 A15 10 A14
|
||||
11 A13 12 A12
|
||||
13 A11 14 A10
|
||||
15 A9 16 A8
|
||||
17 A7 18 A6
|
||||
19 A5 20 A4
|
||||
21 A3 22 A2
|
||||
23 A1 24 A0
|
||||
25 /RFSH 26 /EXCSR
|
||||
27 /M1 28 /EXCSW
|
||||
29 /WR 30 /MREQ
|
||||
31 /IORQ 32 /RD
|
||||
33 D0 34 D1
|
||||
35 D2 36 D3
|
||||
37 D4 38 D5
|
||||
39 D6 40 D7
|
||||
41 CSOUND 42 /INT
|
||||
43 /RAMDIS 44 /ROMDIS
|
||||
45 /BK32 46 /BK31
|
||||
47 /BK22 48 /BK21
|
||||
49 GND 50 GND
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __SVI3X8_EXPANDER_H__
|
||||
#define __SVI3X8_EXPANDER_H__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_SVI_EXPANDER_BUS_ADD(_tag) \
|
||||
MCFG_DEVICE_ADD(_tag, SVI_EXPANDER, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(svi_expander_modules, NULL, false) \
|
||||
|
||||
#define MCFG_SVI_EXPANDER_INT_HANDLER(_devcb) \
|
||||
devcb = &svi_expander_device::set_int_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_SVI_EXPANDER_ROMDIS_HANDLER(_devcb) \
|
||||
devcb = &svi_expander_device::set_romdis_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_SVI_EXPANDER_RAMDIS_HANDLER(_devcb) \
|
||||
devcb = &svi_expander_device::set_ramdis_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_SVI_EXPANDER_CTRL1_HANDLER(_devcb) \
|
||||
devcb = &svi_expander_device::set_ctrl1_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_SVI_EXPANDER_CTRL2_HANDLER(_devcb) \
|
||||
devcb = &svi_expander_device::set_ctrl2_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
class device_svi_expander_interface;
|
||||
|
||||
// ======================> svi_expander_device
|
||||
|
||||
class svi_expander_device : public device_t, public device_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
svi_expander_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~svi_expander_device();
|
||||
|
||||
// callbacks
|
||||
template<class _Object> static devcb_base &set_int_handler(device_t &device, _Object object)
|
||||
{ return downcast<svi_expander_device &>(device).m_int_handler.set_callback(object); }
|
||||
|
||||
template<class _Object> static devcb_base &set_romdis_handler(device_t &device, _Object object)
|
||||
{ return downcast<svi_expander_device &>(device).m_romdis_handler.set_callback(object); }
|
||||
|
||||
template<class _Object> static devcb_base &set_ramdis_handler(device_t &device, _Object object)
|
||||
{ return downcast<svi_expander_device &>(device).m_ramdis_handler.set_callback(object); }
|
||||
|
||||
template<class _Object> static devcb_base &set_ctrl1_handler(device_t &device, _Object object)
|
||||
{ return downcast<svi_expander_device &>(device).m_ctrl1_handler.set_callback(object); }
|
||||
|
||||
template<class _Object> static devcb_base &set_ctrl2_handler(device_t &device, _Object object)
|
||||
{ return downcast<svi_expander_device &>(device).m_ctrl2_handler.set_callback(object); }
|
||||
|
||||
// called from cart device
|
||||
DECLARE_WRITE_LINE_MEMBER( int_w ) { m_int_handler(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( romdis_w ) { m_romdis_handler(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( ramdis_w ) { m_ramdis_handler(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( ctrl1_w ) { m_ctrl1_handler(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( ctrl2_w ) { m_ctrl2_handler(state); }
|
||||
|
||||
// called from host
|
||||
DECLARE_READ8_MEMBER( mreq_r );
|
||||
DECLARE_WRITE8_MEMBER( mreq_w );
|
||||
DECLARE_READ8_MEMBER( iorq_r );
|
||||
DECLARE_WRITE8_MEMBER( iorq_w );
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( bk21_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( bk22_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( bk31_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( bk32_w );
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
private:
|
||||
device_svi_expander_interface *m_module;
|
||||
|
||||
devcb_write_line m_int_handler;
|
||||
devcb_write_line m_romdis_handler;
|
||||
devcb_write_line m_ramdis_handler;
|
||||
devcb_write_line m_ctrl1_handler;
|
||||
devcb_write_line m_ctrl2_handler;
|
||||
};
|
||||
|
||||
// ======================> device_svi_expander_interface
|
||||
|
||||
class device_svi_expander_interface : public device_slot_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
device_svi_expander_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual ~device_svi_expander_interface();
|
||||
|
||||
virtual DECLARE_READ8_MEMBER( mreq_r ) { return 0xff; };
|
||||
virtual DECLARE_WRITE8_MEMBER( mreq_w ){};
|
||||
virtual DECLARE_READ8_MEMBER( iorq_r ) { return 0xff; };
|
||||
virtual DECLARE_WRITE8_MEMBER( iorq_w ){};
|
||||
|
||||
virtual void bk21_w(int state) {};
|
||||
virtual void bk22_w(int state) {};
|
||||
virtual void bk31_w(int state) {};
|
||||
virtual void bk32_w(int state) {};
|
||||
|
||||
protected:
|
||||
svi_expander_device *m_expander;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type SVI_EXPANDER;
|
||||
|
||||
// include here so drivers don't need to
|
||||
#include "modules.h"
|
||||
|
||||
#endif // __SVI3X8_EXPANDER_H__
|
13
src/devices/bus/svi3x8/expander/modules.cpp
Normal file
13
src/devices/bus/svi3x8/expander/modules.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SVI 318/328 Expander Bus Modules
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "modules.h"
|
||||
|
||||
SLOT_INTERFACE_START( svi_expander_modules )
|
||||
SLOT_INTERFACE("sv601", SV601)
|
||||
SLOT_INTERFACE_END
|
19
src/devices/bus/svi3x8/expander/modules.h
Normal file
19
src/devices/bus/svi3x8/expander/modules.h
Normal file
@ -0,0 +1,19 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SVI 318/328 Expander Bus Modules
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __SVI_EXPANDER_MODULES_H__
|
||||
#define __SVI_EXPANDER_MODULES_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "sv601.h"
|
||||
|
||||
SLOT_INTERFACE_EXTERN( svi_expander_modules );
|
||||
|
||||
#endif // __SVI_EXPANDER_MODULES_H__
|
98
src/devices/bus/svi3x8/expander/sv601.cpp
Normal file
98
src/devices/bus/svi3x8/expander/sv601.cpp
Normal file
@ -0,0 +1,98 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SV-601 Super Expander for SVI-318/328
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "sv601.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CONSTANTS/MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define VERBOSE 0
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type SV601 = &device_creator<sv601_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( sv601 )
|
||||
MCFG_SVI_SLOT_BUS_ADD
|
||||
MCFG_SVI_SLOT_INT_HANDLER(WRITELINE(sv601_device, int_w))
|
||||
MCFG_SVI_SLOT_ROMDIS_HANDLER(WRITELINE(sv601_device, romdis_w))
|
||||
MCFG_SVI_SLOT_RAMDIS_HANDLER(WRITELINE(sv601_device, ramdis_w))
|
||||
MCFG_SVI_SLOT_ADD("0", NULL)
|
||||
MCFG_SVI_SLOT_ADD("1", NULL)
|
||||
MCFG_SVI_SLOT_ADD("2", NULL)
|
||||
MCFG_SVI_SLOT_ADD("3", NULL)
|
||||
MCFG_SVI_SLOT_ADD("4", NULL)
|
||||
MCFG_SVI_SLOT_ADD("5", NULL)
|
||||
MCFG_SVI_SLOT_ADD("6", NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor sv601_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( sv601 );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// sv601_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
sv601_device::sv601_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, SV601, "SV-601 Super Expander", tag, owner, clock, "sv601", __FILE__),
|
||||
device_svi_expander_interface(mconfig, *this),
|
||||
m_slotbus(*this, "slotbus")
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void sv601_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void sv601_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
WRITE_LINE_MEMBER( sv601_device::int_w ) { m_expander->int_w(state); }
|
||||
WRITE_LINE_MEMBER( sv601_device::romdis_w ) { m_expander->romdis_w(state); }
|
||||
WRITE_LINE_MEMBER( sv601_device::ramdis_w ) { m_expander->ramdis_w(state); }
|
||||
|
||||
READ8_MEMBER( sv601_device::mreq_r ) { return m_slotbus->mreq_r(space, offset); }
|
||||
WRITE8_MEMBER( sv601_device::mreq_w ) { m_slotbus->mreq_w(space, offset, data); }
|
||||
READ8_MEMBER( sv601_device::iorq_r ) { return m_slotbus->iorq_r(space, offset); }
|
||||
WRITE8_MEMBER( sv601_device::iorq_w ) { m_slotbus->iorq_w(space, offset, data); }
|
||||
|
||||
void sv601_device::bk21_w(int state) { m_slotbus->bk21_w(state); }
|
||||
void sv601_device::bk22_w(int state) { m_slotbus->bk22_w(state); }
|
||||
void sv601_device::bk31_w(int state) { m_slotbus->bk31_w(state); }
|
||||
void sv601_device::bk32_w(int state) { m_slotbus->bk32_w(state); }
|
59
src/devices/bus/svi3x8/expander/sv601.h
Normal file
59
src/devices/bus/svi3x8/expander/sv601.h
Normal file
@ -0,0 +1,59 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SV-601 Super Expander for SVI-318/328
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __SVI3X8_EXPANDER_SV601_H__
|
||||
#define __SVI3X8_EXPANDER_SV601_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "expander.h"
|
||||
#include "bus/svi3x8/slot/slot.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> sv601_device
|
||||
|
||||
class sv601_device : public device_t, public device_svi_expander_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
sv601_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// from slots
|
||||
WRITE_LINE_MEMBER( int_w );
|
||||
WRITE_LINE_MEMBER( romdis_w );
|
||||
WRITE_LINE_MEMBER( ramdis_w );
|
||||
|
||||
// from host
|
||||
virtual DECLARE_READ8_MEMBER( mreq_r ) override;
|
||||
virtual DECLARE_WRITE8_MEMBER( mreq_w ) override;
|
||||
virtual DECLARE_READ8_MEMBER( iorq_r ) override;
|
||||
virtual DECLARE_WRITE8_MEMBER( iorq_w ) override;
|
||||
|
||||
virtual void bk21_w(int state) override;
|
||||
virtual void bk22_w(int state) override;
|
||||
virtual void bk31_w(int state) override;
|
||||
virtual void bk32_w(int state) override;
|
||||
|
||||
protected:
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
private:
|
||||
required_device<svi_slot_bus_device> m_slotbus;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type SV601;
|
||||
|
||||
#endif // __SVI3X8_EXPANDER_SV601_H__
|
16
src/devices/bus/svi3x8/slot/cards.cpp
Normal file
16
src/devices/bus/svi3x8/slot/cards.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SVI 318/328 Slot Cards
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "cards.h"
|
||||
|
||||
SLOT_INTERFACE_START( svi_slot_cards )
|
||||
SLOT_INTERFACE("sv801", SV801)
|
||||
SLOT_INTERFACE("sv803", SV803)
|
||||
SLOT_INTERFACE("sv806", SV806)
|
||||
SLOT_INTERFACE("sv807", SV807)
|
||||
SLOT_INTERFACE_END
|
22
src/devices/bus/svi3x8/slot/cards.h
Normal file
22
src/devices/bus/svi3x8/slot/cards.h
Normal file
@ -0,0 +1,22 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SVI 318/328 Slot Cards
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __SVI3X8_SLOT_CARDS_H__
|
||||
#define __SVI3X8_SLOT_CARDS_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "sv801.h"
|
||||
#include "sv803.h"
|
||||
#include "sv806.h"
|
||||
#include "sv807.h"
|
||||
|
||||
SLOT_INTERFACE_EXTERN( svi_slot_cards );
|
||||
|
||||
#endif // __SVI3X8_SLOT_CARDS_H__
|
284
src/devices/bus/svi3x8/slot/slot.cpp
Normal file
284
src/devices/bus/svi3x8/slot/slot.cpp
Normal file
@ -0,0 +1,284 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SVI 318/328 Expansion Slot
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "slot.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// SLOT BUS DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
const device_type SVI_SLOT_BUS = &device_creator<svi_slot_bus_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// svi_slot_bus_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
svi_slot_bus_device::svi_slot_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, SVI_SLOT_BUS, "SVI Slot Bus", tag, owner, clock, "svislotbus", __FILE__),
|
||||
m_int_handler(*this),
|
||||
m_romdis_handler(*this),
|
||||
m_ramdis_handler(*this)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// svi_slot_bus_device - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
svi_slot_bus_device::~svi_slot_bus_device()
|
||||
{
|
||||
m_dev.detach_all();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void svi_slot_bus_device::device_start()
|
||||
{
|
||||
// resolve callbacks
|
||||
m_int_handler.resolve_safe();
|
||||
m_romdis_handler.resolve_safe();
|
||||
m_ramdis_handler.resolve_safe();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void svi_slot_bus_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// add_card - add new card to our bus
|
||||
//-------------------------------------------------
|
||||
|
||||
void svi_slot_bus_device::add_card(device_svi_slot_interface *card)
|
||||
{
|
||||
card->set_bus_device(this);
|
||||
m_dev.append(*card);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// mreq_r - memory read from slot
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER( svi_slot_bus_device::mreq_r )
|
||||
{
|
||||
device_svi_slot_interface *entry = m_dev.first();
|
||||
UINT8 data = 0xff;
|
||||
|
||||
romdis_w(1);
|
||||
ramdis_w(1);
|
||||
|
||||
while (entry)
|
||||
{
|
||||
data &= entry->mreq_r(space, offset);
|
||||
entry = entry->next();
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// mreq_w - memory write to slot
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER( svi_slot_bus_device::mreq_w )
|
||||
{
|
||||
device_svi_slot_interface *entry = m_dev.first();
|
||||
|
||||
romdis_w(1);
|
||||
ramdis_w(1);
|
||||
|
||||
while (entry)
|
||||
{
|
||||
entry->mreq_w(space, offset, data);
|
||||
entry = entry->next();
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// iorq_r - memory read from slot
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER( svi_slot_bus_device::iorq_r )
|
||||
{
|
||||
device_svi_slot_interface *entry = m_dev.first();
|
||||
UINT8 data = 0xff;
|
||||
|
||||
while (entry)
|
||||
{
|
||||
data &= entry->iorq_r(space, offset);
|
||||
entry = entry->next();
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// iorq_w - memory write to slot
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER( svi_slot_bus_device::iorq_w )
|
||||
{
|
||||
device_svi_slot_interface *entry = m_dev.first();
|
||||
|
||||
while (entry)
|
||||
{
|
||||
entry->iorq_w(space, offset, data);
|
||||
entry = entry->next();
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// bk21_w - signal from host to slots
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE_LINE_MEMBER( svi_slot_bus_device::bk21_w )
|
||||
{
|
||||
device_svi_slot_interface *entry = m_dev.first();
|
||||
|
||||
while (entry)
|
||||
{
|
||||
entry->bk21_w(state);
|
||||
entry = entry->next();
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// bk22_w - signal from host to slots
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE_LINE_MEMBER( svi_slot_bus_device::bk22_w )
|
||||
{
|
||||
device_svi_slot_interface *entry = m_dev.first();
|
||||
|
||||
while (entry)
|
||||
{
|
||||
entry->bk22_w(state);
|
||||
entry = entry->next();
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// bk31_w - signal from host to slots
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE_LINE_MEMBER( svi_slot_bus_device::bk31_w )
|
||||
{
|
||||
device_svi_slot_interface *entry = m_dev.first();
|
||||
|
||||
while (entry)
|
||||
{
|
||||
entry->bk31_w(state);
|
||||
entry = entry->next();
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// bk32_w - signal from host to slots
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE_LINE_MEMBER( svi_slot_bus_device::bk32_w )
|
||||
{
|
||||
device_svi_slot_interface *entry = m_dev.first();
|
||||
|
||||
while (entry)
|
||||
{
|
||||
entry->bk32_w(state);
|
||||
entry = entry->next();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// SVI SLOT DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
const device_type SVI_SLOT = &device_creator<svi_slot_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// svi_slot_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
svi_slot_device::svi_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, SVI_SLOT, "SVI Slot", tag, owner, clock, "svislot", __FILE__),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_bus_tag(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_bus - set owner bus tag
|
||||
//-------------------------------------------------
|
||||
|
||||
void svi_slot_device::set_bus(device_t &device, device_t *owner, const char *bus_tag)
|
||||
{
|
||||
svi_slot_device &card = dynamic_cast<svi_slot_device &>(device);
|
||||
card.m_owner = owner;
|
||||
card.m_bus_tag = bus_tag;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void svi_slot_device::device_start()
|
||||
{
|
||||
device_svi_slot_interface *dev = dynamic_cast<device_svi_slot_interface *>(get_card_device());
|
||||
|
||||
if (dev)
|
||||
{
|
||||
svi_slot_bus_device *bus = downcast<svi_slot_bus_device *>(m_owner->subdevice(m_bus_tag));
|
||||
bus->add_card(dev);
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void svi_slot_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CARD INTERFACE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_svi_slot_interface - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_svi_slot_interface::device_svi_slot_interface(const machine_config &mconfig, device_t &device) :
|
||||
device_slot_card_interface(mconfig, device),
|
||||
m_next(nullptr),
|
||||
m_bus(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// ~device_svi_slot_interface - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_svi_slot_interface::~device_svi_slot_interface()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_bus_device - set bus we are attached to
|
||||
//-------------------------------------------------
|
||||
|
||||
void device_svi_slot_interface::set_bus_device(svi_slot_bus_device *bus)
|
||||
{
|
||||
m_bus = bus;
|
||||
}
|
178
src/devices/bus/svi3x8/slot/slot.h
Normal file
178
src/devices/bus/svi3x8/slot/slot.h
Normal file
@ -0,0 +1,178 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SVI 318/328 Expansion Slot
|
||||
|
||||
50-pin slot
|
||||
|
||||
1 +5V 2 +5V
|
||||
3 +12V 4 -12V
|
||||
5 GND 6 /WAIT
|
||||
7 /RST 8 CPUCLK
|
||||
9 A15 10 A14
|
||||
11 A13 12 A12
|
||||
13 A11 14 A10
|
||||
15 A9 16 A8
|
||||
17 A7 18 A6
|
||||
19 A5 20 A4
|
||||
21 A3 22 A2
|
||||
23 A1 24 A0
|
||||
25 /RFSH 26 GND
|
||||
27 /M1 28 GND
|
||||
29 /WR 30 /MREQ
|
||||
31 /IORQ 32 /RD
|
||||
33 D0 34 D1
|
||||
35 D2 36 D3
|
||||
37 D4 38 D5
|
||||
39 D6 40 D7
|
||||
41 CSOUND 42 /INT
|
||||
43 /RAMDIS 44 /ROMDIS
|
||||
45 /BK32 46 /BK31
|
||||
47 /BK22 48 /BK21
|
||||
49 GND 50 GND
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __SVI3X8_SLOT_H__
|
||||
#define __SVI3X8_SLOT_H__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_SVI_SLOT_BUS_ADD \
|
||||
MCFG_DEVICE_ADD("slotbus", SVI_SLOT_BUS, 0)
|
||||
|
||||
#define MCFG_SVI_SLOT_ADD(_tag, _def_slot) \
|
||||
MCFG_DEVICE_ADD(_tag, SVI_SLOT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(svi_slot_cards, _def_slot, false) \
|
||||
svi_slot_device::set_bus(*device, owner, "slotbus");
|
||||
|
||||
#define MCFG_SVI_SLOT_INT_HANDLER(_devcb) \
|
||||
devcb = &svi_slot_bus_device::set_int_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_SVI_SLOT_ROMDIS_HANDLER(_devcb) \
|
||||
devcb = &svi_slot_bus_device::set_romdis_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_SVI_SLOT_RAMDIS_HANDLER(_devcb) \
|
||||
devcb = &svi_slot_bus_device::set_ramdis_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
class device_svi_slot_interface;
|
||||
|
||||
// ======================> svi_slot_bus_device
|
||||
|
||||
class svi_slot_bus_device : public device_t
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
svi_slot_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~svi_slot_bus_device();
|
||||
|
||||
// callbacks
|
||||
template<class _Object> static devcb_base &set_int_handler(device_t &device, _Object object)
|
||||
{ return downcast<svi_slot_bus_device &>(device).m_int_handler.set_callback(object); }
|
||||
|
||||
template<class _Object> static devcb_base &set_romdis_handler(device_t &device, _Object object)
|
||||
{ return downcast<svi_slot_bus_device &>(device).m_romdis_handler.set_callback(object); }
|
||||
|
||||
template<class _Object> static devcb_base &set_ramdis_handler(device_t &device, _Object object)
|
||||
{ return downcast<svi_slot_bus_device &>(device).m_ramdis_handler.set_callback(object); }
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
void add_card(device_svi_slot_interface *card);
|
||||
|
||||
// from slot
|
||||
DECLARE_WRITE_LINE_MEMBER( romdis_w ) { m_romdis_handler(state); };
|
||||
DECLARE_WRITE_LINE_MEMBER( ramdis_w ) { m_ramdis_handler(state); };
|
||||
|
||||
// from host
|
||||
DECLARE_READ8_MEMBER( mreq_r );
|
||||
DECLARE_WRITE8_MEMBER( mreq_w );
|
||||
DECLARE_READ8_MEMBER( iorq_r );
|
||||
DECLARE_WRITE8_MEMBER( iorq_w );
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( bk21_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( bk22_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( bk31_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( bk32_w );
|
||||
|
||||
private:
|
||||
simple_list<device_svi_slot_interface> m_dev;
|
||||
|
||||
devcb_write_line m_int_handler;
|
||||
devcb_write_line m_romdis_handler;
|
||||
devcb_write_line m_ramdis_handler;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type SVI_SLOT_BUS;
|
||||
|
||||
// ======================> svi_slot_device
|
||||
|
||||
class svi_slot_device : public device_t, public device_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
svi_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// inline configuration
|
||||
static void set_bus(device_t &device, device_t *owner, const char *bus_tag);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
// configuration
|
||||
const char *m_bus_tag;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type SVI_SLOT;
|
||||
|
||||
// ======================> svi_slot_device
|
||||
|
||||
class device_svi_slot_interface : public device_slot_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
device_svi_slot_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual ~device_svi_slot_interface();
|
||||
|
||||
void set_bus_device(svi_slot_bus_device *bus);
|
||||
|
||||
device_svi_slot_interface *next() const { return m_next; }
|
||||
device_svi_slot_interface *m_next;
|
||||
|
||||
virtual DECLARE_READ8_MEMBER( mreq_r ) { return 0xff; };
|
||||
virtual DECLARE_WRITE8_MEMBER( mreq_w ) {};
|
||||
virtual DECLARE_READ8_MEMBER( iorq_r ) { return 0xff; };
|
||||
virtual DECLARE_WRITE8_MEMBER( iorq_w ) {};
|
||||
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( bk21_w ) {};
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( bk22_w ) {};
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( bk31_w ) {};
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( bk32_w ) {};
|
||||
|
||||
protected:
|
||||
svi_slot_bus_device *m_bus;
|
||||
};
|
||||
|
||||
// include here so drivers don't need to
|
||||
#include "cards.h"
|
||||
|
||||
#endif // __SVI3X8_SLOT_H__
|
144
src/devices/bus/svi3x8/slot/sv801.cpp
Normal file
144
src/devices/bus/svi3x8/slot/sv801.cpp
Normal file
@ -0,0 +1,144 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SV-801 Disk Controller
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "sv801.h"
|
||||
#include "softlist.h"
|
||||
#include "formats/svi_dsk.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type SV801 = &device_creator<sv801_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
FLOPPY_FORMATS_MEMBER( sv801_device::floppy_formats )
|
||||
FLOPPY_SVI_FORMAT
|
||||
FLOPPY_FORMATS_END
|
||||
|
||||
static SLOT_INTERFACE_START( svi_floppies )
|
||||
SLOT_INTERFACE("dd", FLOPPY_525_DD)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( sv801 )
|
||||
MCFG_FD1793_ADD("fdc", XTAL_1MHz)
|
||||
MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(sv801_device, intrq_w))
|
||||
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(sv801_device, drq_w))
|
||||
|
||||
MCFG_FLOPPY_DRIVE_ADD("fdc:0", svi_floppies, "dd", sv801_device::floppy_formats)
|
||||
MCFG_FLOPPY_DRIVE_ADD("fdc:1", svi_floppies, "dd", sv801_device::floppy_formats)
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("disk_list", "svi318_flop")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor sv801_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( sv801 );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// sv801_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
sv801_device::sv801_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, SV801, "SV-801 Disk Controller", tag, owner, clock, "sv801", __FILE__),
|
||||
device_svi_slot_interface(mconfig, *this),
|
||||
m_fdc(*this, "fdc"),
|
||||
m_floppy0(*this, "fdc:0"),
|
||||
m_floppy1(*this, "fdc:1"),
|
||||
m_floppy(nullptr),
|
||||
m_irq(0), m_drq(0)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void sv801_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void sv801_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
WRITE_LINE_MEMBER( sv801_device::intrq_w )
|
||||
{
|
||||
m_irq = state;
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( sv801_device::drq_w )
|
||||
{
|
||||
m_drq = state;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( sv801_device::motor_w )
|
||||
{
|
||||
m_floppy = nullptr;
|
||||
|
||||
if (BIT(data, 0)) m_floppy = m_floppy0->get_device();
|
||||
if (BIT(data, 1)) m_floppy = m_floppy1->get_device();
|
||||
|
||||
m_fdc->set_floppy(m_floppy);
|
||||
|
||||
if (m_floppy0->get_device())
|
||||
m_floppy0->get_device()->mon_w(!BIT(data, 2));
|
||||
if (m_floppy1->get_device())
|
||||
m_floppy1->get_device()->mon_w(!BIT(data, 3));
|
||||
}
|
||||
|
||||
READ8_MEMBER( sv801_device::iorq_r )
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0x30: return m_fdc->status_r(space, 0);
|
||||
case 0x31: return m_fdc->track_r(space, 0);
|
||||
case 0x32: return m_fdc->sector_r(space, 0);
|
||||
case 0x33: return m_fdc->data_r(space, 0);
|
||||
case 0x34: return (m_drq << 6) | (m_irq << 7);
|
||||
}
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( sv801_device::iorq_w )
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0x30: m_fdc->cmd_w(space, 0, data); break;
|
||||
case 0x31: m_fdc->track_w(space, 0, data); break;
|
||||
case 0x32: m_fdc->sector_w(space, 0, data); break;
|
||||
case 0x33: m_fdc->data_w(space, 0, data); break;
|
||||
case 0x34: motor_w(space, 0, data); break;
|
||||
case 0x38:
|
||||
m_fdc->dden_w(BIT(data, 0));
|
||||
if (m_floppy)
|
||||
m_floppy->ss_w(BIT(data, 1));
|
||||
break;
|
||||
}
|
||||
}
|
61
src/devices/bus/svi3x8/slot/sv801.h
Normal file
61
src/devices/bus/svi3x8/slot/sv801.h
Normal file
@ -0,0 +1,61 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SV-801 Disk Controller
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __SVI3X8_SLOT_SV801_H__
|
||||
#define __SVI3X8_SLOT_SV801_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "slot.h"
|
||||
#include "machine/wd_fdc.h"
|
||||
#include "imagedev/floppy.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> sv801_device
|
||||
|
||||
class sv801_device : public device_t, public device_svi_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
sv801_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
DECLARE_FLOPPY_FORMATS(floppy_formats);
|
||||
|
||||
virtual DECLARE_READ8_MEMBER( iorq_r ) override;
|
||||
virtual DECLARE_WRITE8_MEMBER( iorq_w ) override;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( intrq_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( drq_w );
|
||||
|
||||
protected:
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
private:
|
||||
DECLARE_WRITE8_MEMBER( motor_w );
|
||||
|
||||
required_device<fd1793_t> m_fdc;
|
||||
required_device<floppy_connector> m_floppy0;
|
||||
required_device<floppy_connector> m_floppy1;
|
||||
|
||||
floppy_image_device *m_floppy;
|
||||
|
||||
int m_irq;
|
||||
int m_drq;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type SV801;
|
||||
|
||||
#endif // __SVI3X8_SLOT_SV801_H__
|
68
src/devices/bus/svi3x8/slot/sv803.cpp
Normal file
68
src/devices/bus/svi3x8/slot/sv803.cpp
Normal file
@ -0,0 +1,68 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SV-803 16k memory expansion for SVI-318
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "sv803.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type SV803 = &device_creator<sv803_device>;
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// sv803_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
sv803_device::sv803_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, SV803, "SV-803 16k RAM Cartridge", tag, owner, clock, "sv803", __FILE__),
|
||||
device_svi_slot_interface(mconfig, *this)
|
||||
{
|
||||
m_ram = std::make_unique<UINT8[]>(0x4000);
|
||||
memset(m_ram.get(), 0xff, 0x4000);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void sv803_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void sv803_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
READ8_MEMBER( sv803_device::mreq_r )
|
||||
{
|
||||
if (offset >= 0x8000 && offset <= 0xbfff)
|
||||
return m_ram[offset - 0x8000];
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( sv803_device::mreq_w )
|
||||
{
|
||||
if (offset >= 0x8000 && offset <= 0xbfff)
|
||||
m_ram[offset - 0x8000] = data;
|
||||
}
|
44
src/devices/bus/svi3x8/slot/sv803.h
Normal file
44
src/devices/bus/svi3x8/slot/sv803.h
Normal file
@ -0,0 +1,44 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SV-803 16k memory expansion for SVI-318
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __SVI3X8_SLOT_SV803_H__
|
||||
#define __SVI3X8_SLOT_SV803_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "slot.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> sv803_device
|
||||
|
||||
class sv803_device : public device_t, public device_svi_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
sv803_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
virtual DECLARE_READ8_MEMBER( mreq_r ) override;
|
||||
virtual DECLARE_WRITE8_MEMBER( mreq_w ) override;
|
||||
|
||||
protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<UINT8[]> m_ram;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type SV803;
|
||||
|
||||
#endif // __SVI3X8_SLOT_SV803_H__
|
150
src/devices/bus/svi3x8/slot/sv806.cpp
Normal file
150
src/devices/bus/svi3x8/slot/sv806.cpp
Normal file
@ -0,0 +1,150 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SV-806 80 Column Cartridge for SVI-318/328
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "sv806.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type SV806 = &device_creator<sv806_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// rom_region - device-specific ROM region
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( sv806 )
|
||||
ROM_REGION(0x1000, "gfx", 0)
|
||||
ROM_SYSTEM_BIOS(0, "en", "English Character Set")
|
||||
ROMX_LOAD("sv806.ic27", 0x0000, 0x1000, CRC(850bc232) SHA1(ed45cb0e9bd18a9d7bd74f87e620f016a7ae840f), ROM_BIOS(1))
|
||||
ROM_SYSTEM_BIOS(1, "se", "Swedish Character Set")
|
||||
ROMX_LOAD("sv806se.ic27", 0x0000, 0x1000, CRC(daea8956) SHA1(3f16d5513ad35692488ae7d864f660e76c6e8ed3), ROM_BIOS(2))
|
||||
ROM_END
|
||||
|
||||
const rom_entry *sv806_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( sv806 );
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( sv806 )
|
||||
MCFG_SCREEN_ADD_MONOCHROME("80col", RASTER, rgb_t::green)
|
||||
MCFG_SCREEN_RAW_PARAMS((XTAL_12MHz / 6) * 8, 864, 0, 640, 317, 0, 192)
|
||||
MCFG_SCREEN_UPDATE_DEVICE("crtc", hd6845_device, screen_update)
|
||||
|
||||
MCFG_PALETTE_ADD_MONOCHROME("palette")
|
||||
|
||||
MCFG_MC6845_ADD("crtc", HD6845, "80col", XTAL_12MHz / 6)
|
||||
MCFG_MC6845_SHOW_BORDER_AREA(false)
|
||||
MCFG_MC6845_CHAR_WIDTH(8)
|
||||
MCFG_MC6845_UPDATE_ROW_CB(sv806_device, crtc_update_row)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor sv806_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( sv806 );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// sv806_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
sv806_device::sv806_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, SV806, "SV-806 80 Column Cartridge", tag, owner, clock, "sv806", __FILE__),
|
||||
device_svi_slot_interface(mconfig, *this),
|
||||
m_crtc(*this, "crtc"),
|
||||
m_palette(*this, "palette"),
|
||||
m_gfx(*this, "gfx"),
|
||||
m_ram_enabled(0)
|
||||
{
|
||||
m_ram = std::make_unique<UINT8[]>(0x800);
|
||||
memset(m_ram.get(), 0xff, 0x800);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void sv806_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
MC6845_UPDATE_ROW( sv806_device::crtc_update_row )
|
||||
{
|
||||
const pen_t *pen = m_palette->pens();
|
||||
|
||||
for (int i = 0; i < x_count; i++)
|
||||
{
|
||||
UINT8 data = m_gfx->u8((m_ram[(ma + i) & 0x7ff] << 4) | ra);
|
||||
|
||||
if (i == cursor_x)
|
||||
data = 0xff;
|
||||
|
||||
bitmap.pix32(y, i * 8 + 0) = pen[BIT(data, 7)];
|
||||
bitmap.pix32(y, i * 8 + 1) = pen[BIT(data, 6)];
|
||||
bitmap.pix32(y, i * 8 + 2) = pen[BIT(data, 5)];
|
||||
bitmap.pix32(y, i * 8 + 3) = pen[BIT(data, 4)];
|
||||
bitmap.pix32(y, i * 8 + 4) = pen[BIT(data, 3)];
|
||||
bitmap.pix32(y, i * 8 + 5) = pen[BIT(data, 2)];
|
||||
bitmap.pix32(y, i * 8 + 6) = pen[BIT(data, 1)];
|
||||
bitmap.pix32(y, i * 8 + 7) = pen[BIT(data, 0)];
|
||||
}
|
||||
}
|
||||
|
||||
READ8_MEMBER( sv806_device::mreq_r )
|
||||
{
|
||||
if (offset >= 0xf000 && m_ram_enabled)
|
||||
{
|
||||
m_bus->ramdis_w(0);
|
||||
return m_ram[offset & 0x7ff];
|
||||
}
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( sv806_device::mreq_w )
|
||||
{
|
||||
if (offset >= 0xf000 && m_ram_enabled)
|
||||
{
|
||||
m_bus->ramdis_w(0);
|
||||
m_ram[offset & 0x7ff] = data;
|
||||
}
|
||||
}
|
||||
|
||||
READ8_MEMBER( sv806_device::iorq_r )
|
||||
{
|
||||
if (offset == 0x51)
|
||||
return m_crtc->register_r(space, 0);
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( sv806_device::iorq_w )
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0x50: m_crtc->address_w(space, 0, data); break;
|
||||
case 0x51: m_crtc->register_w(space, 0, data); break;
|
||||
case 0x58: m_ram_enabled = data; break;
|
||||
}
|
||||
}
|
55
src/devices/bus/svi3x8/slot/sv806.h
Normal file
55
src/devices/bus/svi3x8/slot/sv806.h
Normal file
@ -0,0 +1,55 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SV-806 80 column card for SVI-318/328
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __SVI3X8_SLOT_SV806_H__
|
||||
#define __SVI3X8_SLOT_SV806_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "slot.h"
|
||||
#include "video/mc6845.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> sv806_device
|
||||
|
||||
class sv806_device : public device_t, public device_svi_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
sv806_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
virtual DECLARE_READ8_MEMBER( mreq_r ) override;
|
||||
virtual DECLARE_WRITE8_MEMBER( mreq_w ) override;
|
||||
virtual DECLARE_READ8_MEMBER( iorq_r ) override;
|
||||
virtual DECLARE_WRITE8_MEMBER( iorq_w ) override;
|
||||
|
||||
MC6845_UPDATE_ROW(crtc_update_row);
|
||||
|
||||
protected:
|
||||
virtual const rom_entry *device_rom_region() const override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_start() override;
|
||||
|
||||
private:
|
||||
required_device<hd6845_device> m_crtc;
|
||||
required_device<palette_device> m_palette;
|
||||
required_memory_region m_gfx;
|
||||
|
||||
std::unique_ptr<UINT8[]> m_ram;
|
||||
int m_ram_enabled;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type SV806;
|
||||
|
||||
#endif // __SVI3X8_SLOT_SV806_H__
|
163
src/devices/bus/svi3x8/slot/sv807.cpp
Normal file
163
src/devices/bus/svi3x8/slot/sv807.cpp
Normal file
@ -0,0 +1,163 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SV-807 64k memory expansion for SVI-318/328
|
||||
|
||||
TODO:
|
||||
- Switch S6 (but needs to be off for the SVI anyway)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "sv807.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CONSTANTS / MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define BK21_ACTIVE ((m_bk21 == 0) && (m_switch->read() & 0x01))
|
||||
#define BK22_ACTIVE ((m_bk22 == 0) && (m_switch->read() & 0x02))
|
||||
#define BK31_ACTIVE ((m_bk31 == 0) && (m_switch->read() & 0x04))
|
||||
#define BK32_ACTIVE ((m_bk32 == 0) && (m_switch->read() & 0x08))
|
||||
#define BK02_ACTIVE (m_switch->read() & 0x10)
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type SV807 = &device_creator<sv807_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// input_ports - device-specific input ports
|
||||
//-------------------------------------------------
|
||||
|
||||
static INPUT_PORTS_START( sv807_switches )
|
||||
PORT_START("S")
|
||||
PORT_DIPNAME(0x01, 0x00, "Bank/Page 21")
|
||||
PORT_DIPLOCATION("S:1")
|
||||
PORT_DIPSETTING(0x00, "Off")
|
||||
PORT_DIPSETTING(0x01, "On")
|
||||
PORT_DIPNAME(0x02, 0x02, "Bank/Page 22")
|
||||
PORT_DIPLOCATION("S:2")
|
||||
PORT_DIPSETTING(0x00, "Off")
|
||||
PORT_DIPSETTING(0x02, "On")
|
||||
PORT_DIPNAME(0x04, 0x04, "Bank/Page 31")
|
||||
PORT_DIPLOCATION("S:3")
|
||||
PORT_DIPSETTING(0x00, "Off")
|
||||
PORT_DIPSETTING(0x04, "On")
|
||||
PORT_DIPNAME(0x08, 0x00, "Bank/Page 32")
|
||||
PORT_DIPLOCATION("S:4")
|
||||
PORT_DIPSETTING(0x00, "Off")
|
||||
PORT_DIPSETTING(0x08, "On")
|
||||
PORT_DIPNAME(0x10, 0x00, "Bank/Page 02")
|
||||
PORT_DIPLOCATION("S:5")
|
||||
PORT_DIPSETTING(0x00, "Off")
|
||||
PORT_DIPSETTING(0x10, "On")
|
||||
PORT_DIPNAME(0x20, 0x00, "48k/32k")
|
||||
PORT_DIPLOCATION("S:6")
|
||||
PORT_DIPSETTING(0x00, "Off")
|
||||
PORT_DIPSETTING(0x20, "On")
|
||||
INPUT_PORTS_END
|
||||
|
||||
ioport_constructor sv807_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME( sv807_switches );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// sv807_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
sv807_device::sv807_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, SV803, "SV-807 64k RAM Cartridge", tag, owner, clock, "sv807", __FILE__),
|
||||
device_svi_slot_interface(mconfig, *this),
|
||||
m_switch(*this, "S"),
|
||||
m_bk21(1), m_bk22(1), m_bk31(1), m_bk32(1)
|
||||
{
|
||||
m_ram_bank1 = std::make_unique<UINT8[]>(0x8000);
|
||||
m_ram_bank2 = std::make_unique<UINT8[]>(0x8000);
|
||||
memset(m_ram_bank1.get(), 0xff, 0x8000);
|
||||
memset(m_ram_bank2.get(), 0xff, 0x8000);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void sv807_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void sv807_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
// test setup: S2 = enabled (22), S3 = enabled (31)
|
||||
|
||||
READ8_MEMBER( sv807_device::mreq_r )
|
||||
{
|
||||
if ((BK21_ACTIVE || BK31_ACTIVE) && offset < 0x8000)
|
||||
{
|
||||
m_bus->romdis_w(0);
|
||||
return m_ram_bank1[offset];
|
||||
}
|
||||
|
||||
if ((BK22_ACTIVE || BK32_ACTIVE || BK02_ACTIVE) && offset >= 0x8000)
|
||||
{
|
||||
m_bus->ramdis_w(0);
|
||||
return m_ram_bank2[offset - 0x8000];
|
||||
}
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( sv807_device::mreq_w )
|
||||
{
|
||||
if ((BK21_ACTIVE || BK31_ACTIVE) && offset < 0x8000)
|
||||
{
|
||||
m_bus->romdis_w(0);
|
||||
m_ram_bank1[offset] = data;
|
||||
}
|
||||
|
||||
if ((BK22_ACTIVE || BK32_ACTIVE || BK02_ACTIVE) && offset >= 0x8000)
|
||||
{
|
||||
m_bus->ramdis_w(0);
|
||||
m_ram_bank2[offset - 0x8000] = data;
|
||||
}
|
||||
}
|
||||
|
||||
void sv807_device::bk21_w(int state)
|
||||
{
|
||||
m_bk21 = state;
|
||||
}
|
||||
|
||||
void sv807_device::bk22_w(int state)
|
||||
{
|
||||
m_bk22 = state;
|
||||
}
|
||||
|
||||
void sv807_device::bk31_w(int state)
|
||||
{
|
||||
m_bk31 = state;
|
||||
}
|
||||
|
||||
void sv807_device::bk32_w(int state)
|
||||
{
|
||||
m_bk32 = state;
|
||||
}
|
60
src/devices/bus/svi3x8/slot/sv807.h
Normal file
60
src/devices/bus/svi3x8/slot/sv807.h
Normal file
@ -0,0 +1,60 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Dirk Best
|
||||
/***************************************************************************
|
||||
|
||||
SV-807 64k memory expansion for SVI-318/328
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __SVI3X8_SLOT_SV807_H__
|
||||
#define __SVI3X8_SLOT_SV807_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "slot.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> sv807_device
|
||||
|
||||
class sv807_device : public device_t, public device_svi_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
sv807_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
|
||||
virtual DECLARE_READ8_MEMBER( mreq_r ) override;
|
||||
virtual DECLARE_WRITE8_MEMBER( mreq_w ) override;
|
||||
|
||||
virtual void bk21_w(int state) override;
|
||||
virtual void bk22_w(int state) override;
|
||||
virtual void bk31_w(int state) override;
|
||||
virtual void bk32_w(int state) override;
|
||||
|
||||
protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
private:
|
||||
required_ioport m_switch;
|
||||
|
||||
std::unique_ptr<UINT8[]> m_ram_bank1;
|
||||
std::unique_ptr<UINT8[]> m_ram_bank2;
|
||||
|
||||
int m_bk21;
|
||||
int m_bk22;
|
||||
int m_bk31;
|
||||
int m_bk32;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type SV807;
|
||||
|
||||
#endif // __SVI3X8_SLOT_SV807_H__
|
File diff suppressed because it is too large
Load Diff
@ -1,518 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Wilbert Pol, hap
|
||||
/*
|
||||
|
||||
TMS0980/TMS1000-family MCU cores
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _TMS0980_H_
|
||||
#define _TMS0980_H_
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/pla.h"
|
||||
|
||||
|
||||
// K input pins
|
||||
#define MCFG_TMS1XXX_READ_K_CB(_devcb) \
|
||||
tms1xxx_cpu_device::set_read_k_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
// O/Segment output pins
|
||||
#define MCFG_TMS1XXX_WRITE_O_CB(_devcb) \
|
||||
tms1xxx_cpu_device::set_write_o_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
// Use this if the output PLA is unknown:
|
||||
// If the microinstructions (or other) PLA is unknown, try using one from another romset.
|
||||
#define MCFG_TMS1XXX_OUTPUT_PLA(_pla) \
|
||||
tms1xxx_cpu_device::set_output_pla(*device, _pla);
|
||||
|
||||
// R output pins (also called D on some chips)
|
||||
#define MCFG_TMS1XXX_WRITE_R_CB(_devcb) \
|
||||
tms1xxx_cpu_device::set_write_r_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
// OFF request on TMS0980 and up
|
||||
#define MCFG_TMS1XXX_POWER_OFF_CB(_devcb) \
|
||||
tms1xxx_cpu_device::set_power_off_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
|
||||
// TMS0270 was designed to interface with TMS5100, set it up at driver level
|
||||
#define MCFG_TMS0270_READ_CTL_CB(_devcb) \
|
||||
tms0270_cpu_device::set_read_ctl_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_TMS0270_WRITE_CTL_CB(_devcb) \
|
||||
tms0270_cpu_device::set_write_ctl_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_TMS0270_WRITE_PDC_CB(_devcb) \
|
||||
tms0270_cpu_device::set_write_pdc_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
|
||||
// pinout reference
|
||||
|
||||
/*
|
||||
|
||||
____ ____ ____ ____
|
||||
R8 1 |* \_/ | 28 R7 R0 1 |* \_/ | 28 Vss
|
||||
R9 2 | | 27 R6 R1 2 | | 27 OSC2
|
||||
R10 3 | | 26 R5 R2 3 | | 26 OSC1
|
||||
Vdd 4 | | 25 R4 R3 4 | | 25 O0
|
||||
K1 5 | | 24 R3 R4 5 | | 24 O1
|
||||
K2 6 | TMS1000 | 23 R2 R5 6 | | 23 O2
|
||||
K4 7 | TMS1070 | 22 R1 R6 7 | TMS1400 | 22 O3
|
||||
K8 8 | TMS1100 | 21 R0 R7 8 | | 21 O4
|
||||
INIT 9 | TMS1170 | 20 Vss R8 9 | | 20 O5
|
||||
O7 10 | | 19 OSC2 R9 10 | | 19 O6
|
||||
O6 11 | | 18 OSC1 R10 11 | | 18 O7
|
||||
O5 12 | | 17 O0 Vdd 12 | | 17 K8
|
||||
O4 13 | | 16 O1 INIT 13 | | 16 K4
|
||||
O3 14 |___________| 15 O2 K1 14 |___________| 15 K2
|
||||
|
||||
|
||||
____ ____
|
||||
R2 1 |* \_/ | 28 R3
|
||||
R1 2 | | 27 R4
|
||||
R0 3 | | 26 R5
|
||||
? 4 | | 25 R6
|
||||
Vdd 5 | | 24 R7
|
||||
K3 6 | | 23 R8
|
||||
K8 7 | TMS0980 | 22 ?
|
||||
K4 8 | | 21 ?
|
||||
K2 9 | | 20 Vss
|
||||
K1 10 | | 19 ?
|
||||
O7 11 | | 18 O0
|
||||
O6 12 | | 17 O1
|
||||
O5 13 | | 16 O2
|
||||
O4 14 |___________| 15 O3
|
||||
|
||||
note: TMS0980 official pin names for R0-R8 is D9-D1, O0-O7 is S(A-G,DP)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
class tms1xxx_cpu_device : public cpu_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
tms1xxx_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
|
||||
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, source)
|
||||
, m_program_config("program", ENDIANNESS_BIG, byte_bits > 8 ? 16 : 8, prgwidth, 0, program)
|
||||
, m_data_config("data", ENDIANNESS_BIG, 8, datawidth, 0, data)
|
||||
, m_mpla(*this, "mpla")
|
||||
, m_ipla(*this, "ipla")
|
||||
, m_opla(*this, "opla")
|
||||
, m_spla(*this, "spla")
|
||||
, m_o_pins(o_pins)
|
||||
, m_r_pins(r_pins)
|
||||
, m_pc_bits(pc_bits)
|
||||
, m_byte_bits(byte_bits)
|
||||
, m_x_bits(x_bits)
|
||||
, m_output_pla_table(nullptr)
|
||||
, m_read_k(*this)
|
||||
, m_write_o(*this)
|
||||
, m_write_r(*this)
|
||||
, m_power_off(*this)
|
||||
{ }
|
||||
|
||||
// static configuration helpers
|
||||
template<class _Object> static devcb_base &set_read_k_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_read_k.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_write_o_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_write_o.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_write_r_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_write_r.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_power_off_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_power_off.set_callback(object); }
|
||||
static void set_output_pla(device_t &device, const UINT16 *output_pla) { downcast<tms1xxx_cpu_device &>(device).m_output_pla_table = output_pla; }
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
// device_execute_interface overrides
|
||||
virtual UINT32 execute_min_cycles() const override { return 1; }
|
||||
virtual UINT32 execute_max_cycles() const override { return 6; }
|
||||
virtual UINT32 execute_input_lines() const override { return 1; }
|
||||
virtual void execute_run() override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
|
||||
virtual UINT32 disasm_max_opcode_bytes() const override { return 1; }
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
|
||||
void next_pc();
|
||||
|
||||
virtual void write_o_output(UINT8 index);
|
||||
virtual UINT8 read_k_input();
|
||||
virtual void set_cki_bus();
|
||||
virtual void dynamic_output() { ; } // not used by default
|
||||
virtual void read_opcode();
|
||||
|
||||
virtual void op_br();
|
||||
virtual void op_call();
|
||||
virtual void op_retn();
|
||||
|
||||
virtual void op_sbit();
|
||||
virtual void op_rbit();
|
||||
virtual void op_setr();
|
||||
virtual void op_rstr();
|
||||
virtual void op_tdo();
|
||||
virtual void op_clo();
|
||||
virtual void op_ldx();
|
||||
virtual void op_comx();
|
||||
virtual void op_comx8();
|
||||
virtual void op_ldp();
|
||||
|
||||
virtual void op_comc();
|
||||
virtual void op_tpc();
|
||||
virtual void op_xda();
|
||||
virtual void op_off();
|
||||
virtual void op_seac();
|
||||
virtual void op_reac();
|
||||
virtual void op_sal();
|
||||
virtual void op_sbl();
|
||||
|
||||
address_space_config m_program_config;
|
||||
address_space_config m_data_config;
|
||||
|
||||
optional_device<pla_device> m_mpla;
|
||||
optional_device<pla_device> m_ipla;
|
||||
optional_device<pla_device> m_opla;
|
||||
optional_device<pla_device> m_spla;
|
||||
|
||||
UINT8 m_pc; // 6 or 7-bit program counter
|
||||
UINT32 m_sr; // 6 or 7-bit subroutine return register(s)
|
||||
UINT8 m_pa; // 4-bit page address register
|
||||
UINT8 m_pb; // 4-bit page buffer register
|
||||
UINT16 m_ps; // 4-bit page subroutine register(s)
|
||||
UINT8 m_a; // 4-bit accumulator
|
||||
UINT8 m_x; // 2,3,or 4-bit RAM X register
|
||||
UINT8 m_y; // 4-bit RAM Y register
|
||||
UINT8 m_ca; // chapter address register
|
||||
UINT8 m_cb; // chapter buffer register
|
||||
UINT16 m_cs; // chapter subroutine register(s)
|
||||
UINT16 m_r;
|
||||
UINT16 m_o;
|
||||
UINT8 m_cki_bus;
|
||||
UINT8 m_c4;
|
||||
UINT8 m_p; // 4-bit adder p(lus)-input
|
||||
UINT8 m_n; // 4-bit adder n(egative)-input
|
||||
UINT8 m_adder_out; // adder result
|
||||
UINT8 m_carry_in; // adder carry-in bit
|
||||
UINT8 m_carry_out; // adder carry-out bit
|
||||
UINT8 m_status;
|
||||
UINT8 m_status_latch;
|
||||
UINT8 m_eac; // end around carry bit
|
||||
UINT8 m_clatch; // call latch bit(s)
|
||||
UINT8 m_add; // add latch bit
|
||||
UINT8 m_bl; // branch latch bit
|
||||
|
||||
UINT8 m_ram_in;
|
||||
UINT8 m_dam_in;
|
||||
int m_ram_out; // signed!
|
||||
UINT8 m_ram_address;
|
||||
UINT16 m_rom_address;
|
||||
UINT16 m_opcode;
|
||||
UINT32 m_fixed;
|
||||
UINT32 m_micro;
|
||||
int m_subcycle;
|
||||
int m_icount;
|
||||
|
||||
UINT8 m_o_pins; // how many O pins
|
||||
UINT8 m_r_pins; // how many R pins
|
||||
UINT8 m_pc_bits; // how many program counter bits
|
||||
UINT8 m_byte_bits; // how many bits per 'byte'
|
||||
UINT8 m_x_bits; // how many X register bits
|
||||
|
||||
address_space *m_program;
|
||||
address_space *m_data;
|
||||
|
||||
const UINT16 *m_output_pla_table;
|
||||
devcb_read8 m_read_k;
|
||||
devcb_write16 m_write_o;
|
||||
devcb_write16 m_write_r;
|
||||
devcb_write_line m_power_off;
|
||||
|
||||
UINT32 m_o_mask;
|
||||
UINT32 m_r_mask;
|
||||
UINT32 m_k_mask;
|
||||
UINT32 m_pc_mask;
|
||||
UINT32 m_x_mask;
|
||||
|
||||
// lookup tables
|
||||
std::vector<UINT32> m_fixed_decode;
|
||||
std::vector<UINT32> m_micro_decode;
|
||||
std::vector<UINT32> m_micro_direct;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class tms1000_cpu_device : public tms1xxx_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual void device_reset() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
|
||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
|
||||
};
|
||||
|
||||
class tms1070_cpu_device : public tms1000_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
class tms1040_cpu_device : public tms1000_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
class tms1200_cpu_device : public tms1000_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
class tms1100_cpu_device : public tms1000_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual void device_reset() override;
|
||||
|
||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
|
||||
|
||||
virtual void op_setr() override;
|
||||
virtual void op_rstr() override;
|
||||
};
|
||||
|
||||
class tms1170_cpu_device : public tms1100_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
class tms1300_cpu_device : public tms1100_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
class tms1370_cpu_device : public tms1100_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
class tms1400_cpu_device : public tms1100_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual void device_reset() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
virtual void op_br() override;
|
||||
virtual void op_call() override;
|
||||
virtual void op_retn() override;
|
||||
|
||||
virtual void op_setr() override { tms1xxx_cpu_device::op_setr(); } // no anomaly with MSB of X register
|
||||
virtual void op_rstr() override { tms1xxx_cpu_device::op_rstr(); } // "
|
||||
};
|
||||
|
||||
class tms1470_cpu_device : public tms1400_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
class tms1600_cpu_device : public tms1400_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
|
||||
};
|
||||
|
||||
class tms1670_cpu_device : public tms1600_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
class tms0970_cpu_device : public tms1000_cpu_device
|
||||
{
|
||||
public:
|
||||
tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual void device_reset() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
virtual void write_o_output(UINT8 index) override;
|
||||
|
||||
virtual void op_setr() override;
|
||||
virtual void op_tdo() override;
|
||||
};
|
||||
|
||||
class tms0950_cpu_device : public tms0970_cpu_device
|
||||
{
|
||||
public:
|
||||
tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual void device_reset() override { tms1000_cpu_device::device_reset(); }
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
virtual void op_rstr() override { ; } // assume it has no RSTR or CLO
|
||||
virtual void op_clo() override { ; } // "
|
||||
};
|
||||
|
||||
class tms1990_cpu_device : public tms0970_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
class tms0980_cpu_device : public tms0970_cpu_device
|
||||
{
|
||||
public:
|
||||
tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual void device_reset() override;
|
||||
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
|
||||
virtual UINT32 disasm_max_opcode_bytes() const override { return 2; }
|
||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
|
||||
|
||||
virtual UINT8 read_k_input() override;
|
||||
virtual void set_cki_bus() override;
|
||||
virtual void read_opcode() override;
|
||||
|
||||
virtual void op_comx() override;
|
||||
|
||||
UINT32 decode_micro(UINT8 sel);
|
||||
};
|
||||
|
||||
class tms1980_cpu_device : public tms0980_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
virtual void write_o_output(UINT8 index) override { tms1xxx_cpu_device::write_o_output(index); }
|
||||
virtual UINT8 read_k_input() override { return tms1xxx_cpu_device::read_k_input(); }
|
||||
|
||||
virtual void op_setr() override { tms1xxx_cpu_device::op_setr(); }
|
||||
virtual void op_tdo() override;
|
||||
};
|
||||
|
||||
|
||||
class tms0270_cpu_device : public tms0980_cpu_device
|
||||
{
|
||||
public:
|
||||
tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// static configuration helpers
|
||||
template<class _Object> static devcb_base &set_read_ctl_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_read_ctl.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_write_ctl_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_write_ctl.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_write_pdc_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_write_pdc.set_callback(object); }
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
virtual void write_o_output(UINT8 index) override { tms1xxx_cpu_device::write_o_output(index); }
|
||||
virtual UINT8 read_k_input() override;
|
||||
virtual void dynamic_output() override;
|
||||
|
||||
virtual void op_setr() override;
|
||||
virtual void op_rstr() override;
|
||||
virtual void op_tdo() override;
|
||||
|
||||
private:
|
||||
// state specific to interface with TMS5100
|
||||
UINT16 m_r_prev;
|
||||
UINT8 m_chipsel;
|
||||
UINT8 m_ctl_out;
|
||||
UINT8 m_ctl_dir;
|
||||
int m_pdc;
|
||||
|
||||
UINT8 m_o_latch_low;
|
||||
UINT8 m_o_latch;
|
||||
UINT8 m_o_latch_prev;
|
||||
|
||||
devcb_read8 m_read_ctl;
|
||||
devcb_write8 m_write_ctl;
|
||||
devcb_write_line m_write_pdc;
|
||||
};
|
||||
|
||||
|
||||
class tp0320_cpu_device : public tms0980_cpu_device
|
||||
{
|
||||
public:
|
||||
tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
//virtual void device_start() override;
|
||||
//virtual void device_reset() override;
|
||||
|
||||
//virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
};
|
||||
|
||||
|
||||
extern const device_type TMS1000;
|
||||
extern const device_type TMS1070;
|
||||
extern const device_type TMS1040;
|
||||
extern const device_type TMS1200;
|
||||
extern const device_type TMS1100;
|
||||
extern const device_type TMS1170;
|
||||
extern const device_type TMS1300;
|
||||
extern const device_type TMS1370;
|
||||
extern const device_type TMS1400;
|
||||
extern const device_type TMS1470;
|
||||
extern const device_type TMS1600;
|
||||
extern const device_type TMS1670;
|
||||
extern const device_type TMS0950;
|
||||
extern const device_type TMS0970;
|
||||
extern const device_type TMS1990;
|
||||
extern const device_type TMS0980;
|
||||
extern const device_type TMS1980;
|
||||
extern const device_type TMS0270;
|
||||
extern const device_type TP0320;
|
||||
|
||||
|
||||
#endif /* _TMS0980_H_ */
|
@ -1,363 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Wilbert Pol, hap
|
||||
/*
|
||||
|
||||
TMS0980/TMS1000-family disassembler
|
||||
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "debugger.h"
|
||||
#include "tms0980.h"
|
||||
|
||||
|
||||
enum e_mnemonics
|
||||
{
|
||||
zA10AAC=0, zA6AAC, zA8AAC, zAC1AC, zACACC, zACNAA, zALEC, zALEM, zAMAAC, zBRANCH, zCALL, zCCLA,
|
||||
zCLA, zCLO, zCOMC, zCOMX, zCOMX8, zCPAIZ, zCTMDYN, zDAN, zDMAN, zDMEA, zDNAA,
|
||||
zDYN, zIA, zIMAC, zIYC, zKNEZ, zLDP, zLDX, zLDX3, zLDX4, zMNEA, zMNEZ,
|
||||
zNDMEA, zOFF, zRBIT, zREAC, zRETN, zRSTR, zSAL, zSAMAN, zSBIT,
|
||||
zSBL, zSEAC, zSETR, zTAM, zTAMACS, zTAMDYN, zTAMIY, zTAMIYC, zTAMZA,
|
||||
zTAY, zTBIT, zTCMIY, zTCY, zTDO, zTKA, zTKM, zTMA,
|
||||
zTMY, zTYA, zXDA, zXMA, zYMCY, zYNEA, zYNEC,
|
||||
zILL
|
||||
};
|
||||
|
||||
static const char *const s_mnemonic[] =
|
||||
{
|
||||
"A10AAC", "A6AAC", "A8AAC", "AC1AC", "ACACC", "ACNAA", "ALEC", "ALEM", "AMAAC", "BRANCH", "CALL", "CCLA",
|
||||
"CLA", "CLO", "COMC", "COMX", "COMX8", "CPAIZ", "CTMDYN", "DAN", "DMAN", "DMEA", "DNAA",
|
||||
"DYN", "IA", "IMAC", "IYC", "KNEZ", "LDP", "LDX", "LDX", "LDX", "MNEA", "MNEZ",
|
||||
"NDMEA", "OFF", "RBIT", "REAC", "RETN", "RSTR", "SAL", "SAMAN", "SBIT",
|
||||
"SBL", "SEAC", "SETR", "TAM", "TAMACS", "TAMDYN", "TAMIY", "TAMIYC", "TAMZA",
|
||||
"TAY", "TBIT", "TCMIY", "TCY", "TDO", "TKA", "TKM", "TMA",
|
||||
"TMY", "TYA", "XDA", "XMA", "YMCY", "YNEA", "YNEC",
|
||||
"?"
|
||||
};
|
||||
|
||||
|
||||
#define _OVER DASMFLAG_STEP_OVER
|
||||
#define _OUT DASMFLAG_STEP_OUT
|
||||
|
||||
static const UINT32 s_flags[] =
|
||||
{
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _OVER, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, _OUT, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0,
|
||||
0
|
||||
};
|
||||
|
||||
|
||||
enum e_addressing
|
||||
{
|
||||
zB0=0, zI2, zI3, zI4, zB7
|
||||
};
|
||||
|
||||
static const UINT8 s_addressing[] =
|
||||
{
|
||||
zB0, zB0, zB0, zI4, zI4, zI4, zI4, zB0, zB0, zB7, zB7, zB0,
|
||||
zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0,
|
||||
zB0, zB0, zB0, zB0, zB0, zI4, zI2, zI3, zI4, zB0, zB0,
|
||||
zB0, zB0, zI2, zB0, zB0, zB0, zB0, zB0, zI2,
|
||||
zB0, zB0, zB0, zB0, zI4, zB0, zB0, zB0, zB0,
|
||||
zB0, zI2, zI4, zI4, zB0, zB0, zB0, zB0,
|
||||
zB0, zB0, zB0, zB0, zI4, zB0, zI4,
|
||||
zB0
|
||||
};
|
||||
|
||||
|
||||
static const UINT8 tms0980_i2_value[4] =
|
||||
{
|
||||
0, 2, 1, 3
|
||||
};
|
||||
static const UINT8 tms0980_i3_value[8] =
|
||||
{
|
||||
0, 4, 2, 6, 1, 5, 3, 7
|
||||
};
|
||||
static const UINT8 tms0980_i4_value[16] =
|
||||
{
|
||||
0x0, 0x8, 0x4, 0xc, 0x2, 0xa, 0x6, 0xe, 0x1, 0x9, 0x5, 0xd, 0x3, 0xb, 0x7, 0xf
|
||||
};
|
||||
|
||||
|
||||
|
||||
// opcode luts
|
||||
|
||||
static const UINT8 tms0980_mnemonic[512] =
|
||||
{
|
||||
/* 0x000 */
|
||||
zCOMX, zALEM, zYNEA, zXMA, zDYN, zIYC, zCLA, zDMAN,
|
||||
zTKA, zMNEA, zTKM, zILL, zILL, zSETR, zKNEZ, zILL,
|
||||
/* 0x010 */
|
||||
zDMEA, zDNAA, zCCLA, zNDMEA, zILL, zAMAAC, zILL, zILL,
|
||||
zCTMDYN, zXDA, zILL, zILL, zILL, zILL, zILL, zILL,
|
||||
/* 0x020 */
|
||||
zTBIT, zTBIT, zTBIT, zTBIT, zILL, zILL, zILL, zILL,
|
||||
zTAY, zTMA, zTMY, zTYA, zTAMDYN, zTAMIYC, zTAMZA, zTAM,
|
||||
/* 0x030 */
|
||||
zSAMAN, zCPAIZ, zIMAC, zMNEZ, zILL, zILL, zILL, zILL,
|
||||
zTCY, zYNEC, zTCMIY, zACACC, zACNAA, zTAMACS, zALEC, zYMCY,
|
||||
/* 0x040 */
|
||||
zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY,
|
||||
zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY,
|
||||
/* 0x050 */
|
||||
zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC,
|
||||
zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC,
|
||||
/* 0x060 */
|
||||
zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY,
|
||||
zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY,
|
||||
/* 0x070 */
|
||||
zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC,
|
||||
zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC,
|
||||
/* 0x080 */
|
||||
zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP,
|
||||
zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP,
|
||||
/* 0x090 */
|
||||
zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4,
|
||||
zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4,
|
||||
/* 0x0A0 */
|
||||
zSBIT, zSBIT, zSBIT, zSBIT, zRBIT, zRBIT, zRBIT, zRBIT,
|
||||
zILL, zILL, zILL, zILL, zILL, zILL, zILL, zILL,
|
||||
/* 0x0B0 */
|
||||
zTDO, zSAL, zCOMX8, zSBL, zREAC, zSEAC, zOFF, zILL,
|
||||
zILL, zILL, zILL, zILL, zILL, zILL, zILL, zRETN,
|
||||
/* 0x0C0 */
|
||||
zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA,
|
||||
zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA,
|
||||
/* 0x0D0 */
|
||||
zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS,
|
||||
zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS,
|
||||
/* 0x0E0 */
|
||||
zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC,
|
||||
zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC,
|
||||
/* 0x0F0 */
|
||||
zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY,
|
||||
zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY,
|
||||
/* 0x100 */
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
/* 0x180 */
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL
|
||||
};
|
||||
|
||||
|
||||
static const UINT8 tms1000_mnemonic[256] =
|
||||
{
|
||||
/* 0x00 */
|
||||
zCOMX, zA8AAC, zYNEA, zTAM, zTAMZA, zA10AAC, zA6AAC, zDAN,
|
||||
zTKA, zKNEZ, zTDO, zCLO, zRSTR, zSETR, zIA, zRETN,
|
||||
zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP,
|
||||
zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP,
|
||||
zTAMIY, zTMA, zTMY, zTYA, zTAY, zAMAAC, zMNEZ, zSAMAN,
|
||||
zIMAC, zALEM, zDMAN, zIYC, zDYN, zCPAIZ, zXMA, zCLA,
|
||||
zSBIT, zSBIT, zSBIT, zSBIT, zRBIT, zRBIT, zRBIT, zRBIT,
|
||||
zTBIT, zTBIT, zTBIT, zTBIT, zLDX, zLDX, zLDX, zLDX,
|
||||
/* 0x40 */
|
||||
zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY,
|
||||
zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY,
|
||||
zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC,
|
||||
zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC,
|
||||
zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY,
|
||||
zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY,
|
||||
zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC,
|
||||
zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC,
|
||||
/* 0x80 */
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
/* 0xc0 */
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL
|
||||
};
|
||||
|
||||
|
||||
static const UINT8 tms1100_mnemonic[256] =
|
||||
{
|
||||
/* 0x00 */
|
||||
zMNEA, zALEM, zYNEA, zXMA, zDYN, zIYC, zAMAAC, zDMAN,
|
||||
zTKA, zCOMX, zTDO, zCOMC, zRSTR, zSETR, zKNEZ, zRETN,
|
||||
zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP,
|
||||
zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP,
|
||||
/* 0x20 */
|
||||
zTAY, zTMA, zTMY, zTYA, zTAMDYN, zTAMIYC, zTAMZA, zTAM,
|
||||
zLDX3, zLDX3, zLDX3, zLDX3, zLDX3, zLDX3, zLDX3, zLDX3,
|
||||
zSBIT, zSBIT, zSBIT, zSBIT, zRBIT, zRBIT, zRBIT, zRBIT,
|
||||
zTBIT, zTBIT, zTBIT, zTBIT, zSAMAN, zCPAIZ, zIMAC, zMNEZ,
|
||||
/* 0x40 */
|
||||
zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY,
|
||||
zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY,
|
||||
zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC,
|
||||
zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC,
|
||||
/* 0x60 */
|
||||
zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY,
|
||||
zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY,
|
||||
zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC,
|
||||
zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zCLA,
|
||||
/* 0x80 */
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH,
|
||||
/* 0xC0 */
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
|
||||
};
|
||||
|
||||
|
||||
|
||||
// disasm
|
||||
|
||||
CPU_DISASSEMBLE( tms0980 )
|
||||
{
|
||||
char *dst = buffer;
|
||||
UINT16 op, instr;
|
||||
int pos = 0;
|
||||
|
||||
op = ( ( oprom[pos] << 8 ) | oprom[pos + 1] ) & 0x01FF;
|
||||
pos += 2;
|
||||
|
||||
instr = tms0980_mnemonic[op];
|
||||
|
||||
dst += sprintf( dst, "%-8s ", s_mnemonic[instr] );
|
||||
|
||||
switch( s_addressing[instr] )
|
||||
{
|
||||
default:
|
||||
case zB0:
|
||||
break;
|
||||
case zI2:
|
||||
dst += sprintf( dst, "%d", tms0980_i2_value[ op & 0x03 ] );
|
||||
break;
|
||||
case zI4:
|
||||
dst += sprintf( dst, "%d", tms0980_i4_value[ op & 0x0F ] );
|
||||
break;
|
||||
case zB7:
|
||||
dst += sprintf( dst, "$%02X", ( op & 0x7F ) << 1 );
|
||||
break;
|
||||
}
|
||||
|
||||
return pos | s_flags[instr] | DASMFLAG_SUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
CPU_DISASSEMBLE( tms1000 )
|
||||
{
|
||||
char *dst = buffer;
|
||||
UINT8 op, instr;
|
||||
int pos = 0;
|
||||
|
||||
op = oprom[pos];
|
||||
pos += 1;
|
||||
|
||||
instr = tms1000_mnemonic[op];
|
||||
|
||||
dst += sprintf( dst, "%-8s ", s_mnemonic[instr] );
|
||||
|
||||
switch( s_addressing[instr] )
|
||||
{
|
||||
default:
|
||||
case zB0:
|
||||
break;
|
||||
case zI2:
|
||||
dst += sprintf( dst, "%d", tms0980_i2_value[ op & 0x03 ] );
|
||||
break;
|
||||
case zI4:
|
||||
dst += sprintf( dst, "%d", tms0980_i4_value[ op & 0x0F ] );
|
||||
break;
|
||||
case zB7:
|
||||
dst += sprintf( dst, "$%02X", ( op & 0x3F ) );
|
||||
break;
|
||||
}
|
||||
|
||||
return pos | s_flags[instr] | DASMFLAG_SUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
CPU_DISASSEMBLE( tms1100 )
|
||||
{
|
||||
char *dst = buffer;
|
||||
UINT8 op, instr;
|
||||
int pos = 0;
|
||||
|
||||
op = oprom[pos];
|
||||
pos += 1;
|
||||
|
||||
instr = tms1100_mnemonic[op];
|
||||
|
||||
dst += sprintf( dst, "%-8s ", s_mnemonic[instr] );
|
||||
|
||||
switch( s_addressing[instr] )
|
||||
{
|
||||
default:
|
||||
case zB0:
|
||||
break;
|
||||
case zI2:
|
||||
dst += sprintf( dst, "%d", tms0980_i2_value[ op & 0x03 ] );
|
||||
break;
|
||||
case zI3:
|
||||
dst += sprintf( dst, "%d", tms0980_i3_value[ op & 0x07 ] );
|
||||
break;
|
||||
case zI4:
|
||||
dst += sprintf( dst, "%d", tms0980_i4_value[ op & 0x0F ] );
|
||||
break;
|
||||
case zB7:
|
||||
dst += sprintf( dst, "$%02X", ( op & 0x3F ) );
|
||||
break;
|
||||
}
|
||||
|
||||
return pos | s_flags[instr] | DASMFLAG_SUPPORTED;
|
||||
}
|
182
src/devices/cpu/tms1000/tms0270.cpp
Normal file
182
src/devices/cpu/tms1000/tms0270.cpp
Normal file
@ -0,0 +1,182 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
TMS1000 family - TMS0270
|
||||
|
||||
*/
|
||||
|
||||
#include "tms0270.h"
|
||||
#include "debugger.h"
|
||||
|
||||
// TMS0270 is a TMS0980 with earrings and a new hat. The new changes look like a quick afterthought, almost hacky
|
||||
// - RAM, ROM, and main instructions PLAs is the same as TMS0980
|
||||
// - 64-term microinstructions PLA between the RAM and ROM, similar to TMS0980,
|
||||
// plus optional separate lines for custom opcode handling
|
||||
// - 48-term output PLA above the RAM (rotate opla 90 degrees)
|
||||
const device_type TMS0270 = &device_creator<tms0270_cpu_device>; // 40-pin DIP, 16 O pins, 8+ R pins (some R pins are internally hooked up to support more I/O)
|
||||
// newer TMS0270 chips (eg. Speak & Math) have 42 pins
|
||||
|
||||
// TMS0260 is same or similar?
|
||||
|
||||
|
||||
// internal memory maps
|
||||
static ADDRESS_MAP_START(program_11bit_9, AS_PROGRAM, 16, tms1k_base_device)
|
||||
AM_RANGE(0x000, 0xfff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START(data_144x4, AS_DATA, 8, tms1k_base_device)
|
||||
AM_RANGE(0x00, 0x7f) AM_RAM
|
||||
AM_RANGE(0x80, 0x8f) AM_RAM AM_MIRROR(0x70) // DAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
// device definitions
|
||||
tms0270_cpu_device::tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms0980_cpu_device(mconfig, TMS0270, "TMS0270", tag, owner, clock, 16 /* o pins */, 16 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 12 /* prg width */, ADDRESS_MAP_NAME(program_11bit_9), 8 /* data width */, ADDRESS_MAP_NAME(data_144x4), "tms0270", __FILE__)
|
||||
, m_read_ctl(*this)
|
||||
, m_write_ctl(*this)
|
||||
, m_write_pdc(*this)
|
||||
{ }
|
||||
|
||||
|
||||
// machine configs
|
||||
static MACHINE_CONFIG_FRAGMENT(tms0270)
|
||||
|
||||
// main opcodes PLA, microinstructions PLA, output PLA
|
||||
MCFG_PLA_ADD("ipla", 9, 22, 24)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MCFG_PLA_ADD("mpla", 6, 22, 64)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MCFG_PLA_ADD("opla", 6, 16, 48)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor tms0270_cpu_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME(tms0270);
|
||||
}
|
||||
|
||||
|
||||
// device_start/reset
|
||||
void tms0270_cpu_device::device_start()
|
||||
{
|
||||
// common init
|
||||
tms1k_base_device::device_start();
|
||||
|
||||
m_read_ctl.resolve_safe(0);
|
||||
m_write_ctl.resolve_safe();
|
||||
m_write_pdc.resolve_safe();
|
||||
|
||||
// zerofill
|
||||
m_r_prev = 0;
|
||||
m_chipsel = 0;
|
||||
m_ctl_dir = 0;
|
||||
m_ctl_out = 0;
|
||||
m_pdc = -1; // !
|
||||
|
||||
m_o_latch_low = 0;
|
||||
m_o_latch = 0;
|
||||
m_o_latch_prev = 0;
|
||||
|
||||
// register for savestates
|
||||
save_item(NAME(m_r_prev));
|
||||
save_item(NAME(m_chipsel));
|
||||
save_item(NAME(m_ctl_dir));
|
||||
save_item(NAME(m_ctl_out));
|
||||
save_item(NAME(m_pdc));
|
||||
|
||||
save_item(NAME(m_o_latch_low));
|
||||
save_item(NAME(m_o_latch));
|
||||
save_item(NAME(m_o_latch_prev));
|
||||
}
|
||||
|
||||
void tms0270_cpu_device::device_reset()
|
||||
{
|
||||
// common reset
|
||||
tms0980_cpu_device::device_reset();
|
||||
|
||||
m_o_latch_low = 0;
|
||||
m_o_latch = 0;
|
||||
m_o_latch_prev = 0;
|
||||
}
|
||||
|
||||
|
||||
// i/o handling
|
||||
void tms0270_cpu_device::dynamic_output()
|
||||
{
|
||||
// R11: TMS5100 CTL port direction (0=read from TMS5100, 1=write to TMS5100)
|
||||
m_ctl_dir = m_r >> 11 & 1;
|
||||
|
||||
// R12: chip select (off=display via OPLA, on=TMS5100 via ACC/CKB)
|
||||
m_chipsel = m_r >> 12 & 1;
|
||||
|
||||
if (m_chipsel)
|
||||
{
|
||||
// ACC via SEG G,B,C,D: TMS5100 CTL pins
|
||||
if (m_ctl_dir && m_a != m_ctl_out)
|
||||
{
|
||||
m_ctl_out = m_a;
|
||||
m_write_ctl(0, m_ctl_out, 0xff);
|
||||
}
|
||||
|
||||
// R10 via SEG E: TMS5100 PDC pin
|
||||
if (m_pdc != (m_r >> 10 & 1))
|
||||
{
|
||||
m_pdc = m_r >> 10 & 1;
|
||||
m_write_pdc(m_pdc);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// standard O-output
|
||||
if (m_o_latch != m_o_latch_prev)
|
||||
{
|
||||
write_o_output(m_o_latch);
|
||||
m_o_latch_prev = m_o_latch;
|
||||
}
|
||||
}
|
||||
|
||||
// standard R-output
|
||||
if (m_r != m_r_prev)
|
||||
{
|
||||
m_write_r(0, m_r & m_r_mask, 0xffff);
|
||||
m_r_prev = m_r;
|
||||
}
|
||||
}
|
||||
|
||||
UINT8 tms0270_cpu_device::read_k_input()
|
||||
{
|
||||
// external: TMS5100 CTL port via SEG G,B,C,D
|
||||
if (m_chipsel)
|
||||
return (m_ctl_dir) ? m_ctl_out : m_read_ctl(0, 0xff) & 0xf;
|
||||
|
||||
// standard K-input otherwise
|
||||
UINT8 k = m_read_k(0, 0xff) & 0x1f;
|
||||
return (k & 0x10) ? 0xf : k; // the TMS0270 KF line asserts all K-inputs
|
||||
}
|
||||
|
||||
|
||||
// opcode deviations
|
||||
void tms0270_cpu_device::op_setr()
|
||||
{
|
||||
// same as default, but handle write to output in dynamic_output
|
||||
m_r = m_r | (1 << m_y);
|
||||
}
|
||||
|
||||
void tms0270_cpu_device::op_rstr()
|
||||
{
|
||||
// same as default, but handle write to output in dynamic_output
|
||||
m_r = m_r & ~(1 << m_y);
|
||||
}
|
||||
|
||||
void tms0270_cpu_device::op_tdo()
|
||||
{
|
||||
// TDO: transfer data out
|
||||
if (m_status)
|
||||
m_o_latch_low = m_a;
|
||||
else
|
||||
m_o_latch = m_o_latch_low | (m_a << 4 & 0x30);
|
||||
|
||||
// write to output is done in dynamic_output
|
||||
}
|
71
src/devices/cpu/tms1000/tms0270.h
Normal file
71
src/devices/cpu/tms1000/tms0270.h
Normal file
@ -0,0 +1,71 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
TMS1000 family - TMS0270
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _TMS0270_H_
|
||||
#define _TMS0270_H_
|
||||
|
||||
#include "tms0980.h"
|
||||
|
||||
|
||||
// TMS0270 was designed to interface with TMS5100, set it up at driver level
|
||||
#define MCFG_TMS0270_READ_CTL_CB(_devcb) \
|
||||
tms0270_cpu_device::set_read_ctl_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_TMS0270_WRITE_CTL_CB(_devcb) \
|
||||
tms0270_cpu_device::set_write_ctl_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_TMS0270_WRITE_PDC_CB(_devcb) \
|
||||
tms0270_cpu_device::set_write_pdc_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
|
||||
class tms0270_cpu_device : public tms0980_cpu_device
|
||||
{
|
||||
public:
|
||||
tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// static configuration helpers
|
||||
template<class _Object> static devcb_base &set_read_ctl_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_read_ctl.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_write_ctl_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_write_ctl.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_write_pdc_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_write_pdc.set_callback(object); }
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
virtual void write_o_output(UINT8 index) override { tms1k_base_device::write_o_output(index); }
|
||||
virtual UINT8 read_k_input() override;
|
||||
virtual void dynamic_output() override;
|
||||
|
||||
virtual void op_setr() override;
|
||||
virtual void op_rstr() override;
|
||||
virtual void op_tdo() override;
|
||||
|
||||
private:
|
||||
// state specific to interface with TMS5100
|
||||
UINT16 m_r_prev;
|
||||
UINT8 m_chipsel;
|
||||
UINT8 m_ctl_out;
|
||||
UINT8 m_ctl_dir;
|
||||
int m_pdc;
|
||||
|
||||
UINT8 m_o_latch_low;
|
||||
UINT8 m_o_latch;
|
||||
UINT8 m_o_latch_prev;
|
||||
|
||||
devcb_read8 m_read_ctl;
|
||||
devcb_write8 m_write_ctl;
|
||||
devcb_write_line m_write_pdc;
|
||||
};
|
||||
|
||||
|
||||
extern const device_type TMS0270;
|
||||
|
||||
#endif /* _TMS0270_H_ */
|
161
src/devices/cpu/tms1000/tms0970.cpp
Normal file
161
src/devices/cpu/tms1000/tms0970.cpp
Normal file
@ -0,0 +1,161 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
TMS1000 family - TMS0950, TMS0970, TMS1990
|
||||
|
||||
*/
|
||||
|
||||
#include "tms0970.h"
|
||||
#include "debugger.h"
|
||||
|
||||
// TMS0950 is a TMS1000 with a TMS0980 style opla, it was quickly succeeded by the TMS0970
|
||||
// - RAM, ROM, microinstructions is the same as TMS1000
|
||||
// - 10-term inverted output PLA and segment PLA on the top-left
|
||||
const device_type TMS0950 = &device_creator<tms0950_cpu_device>; // 28-pin DIP, 8 O pins, 11? R pins
|
||||
|
||||
// TMS0970 is a stripped-down version of the TMS0980, itself acting more like a TMS1000
|
||||
// - RAM and ROM is the same as TMS1000
|
||||
// - main instructions PLAs at the top half, to the right of the midline
|
||||
// * see TMS0980 notes, except that the fixed instruction list differs:
|
||||
// RETN, SETR, RBIT, SBIT, LDX, COMX, TDO, ..., redir(----0-00), LDP
|
||||
// - 32-term microinstructions PLA between the RAM and ROM, supporting 15 microinstructions
|
||||
// - 16-term inverted output PLA and segment PLA above the RAM (rotate opla 90 degrees)
|
||||
const device_type TMS0970 = &device_creator<tms0970_cpu_device>; // 28-pin DIP, 11 R pins (note: pinout may slightly differ from chip to chip)
|
||||
const device_type TMS1990 = &device_creator<tms1990_cpu_device>; // 28-pin DIP, ? R pins..
|
||||
|
||||
|
||||
// internal memory maps
|
||||
static ADDRESS_MAP_START(program_10bit_8, AS_PROGRAM, 8, tms1k_base_device)
|
||||
AM_RANGE(0x000, 0x3ff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START(data_64x4, AS_DATA, 8, tms1k_base_device)
|
||||
AM_RANGE(0x00, 0x3f) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
// device definitions
|
||||
tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms1000_cpu_device(mconfig, TMS0970, "TMS0970", tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 2 /* x width */, 10 /* prg width */, ADDRESS_MAP_NAME(program_10bit_8), 6 /* data width */, ADDRESS_MAP_NAME(data_64x4), "tms0970", __FILE__)
|
||||
{ }
|
||||
|
||||
tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
|
||||
: tms1000_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
|
||||
{ }
|
||||
|
||||
tms0950_cpu_device::tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms0970_cpu_device(mconfig, TMS0950, "TMS0950", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms0950", __FILE__)
|
||||
{ }
|
||||
|
||||
tms1990_cpu_device::tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms0970_cpu_device(mconfig, TMS1990, "TMS1990", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1990", __FILE__)
|
||||
{ }
|
||||
|
||||
|
||||
// machine configs
|
||||
static MACHINE_CONFIG_FRAGMENT(tms0950)
|
||||
|
||||
// microinstructions PLA, output PLA, segment PLA
|
||||
MCFG_PLA_ADD("mpla", 8, 16, 30)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MCFG_PLA_ADD("opla", 4, 8, 10)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MCFG_PLA_ADD("spla", 3, 8, 8)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor tms0950_cpu_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME(tms0950);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT(tms0970)
|
||||
|
||||
// main opcodes PLA, microinstructions PLA, output PLA, segment PLA
|
||||
MCFG_PLA_ADD("ipla", 8, 15, 18)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MCFG_PLA_ADD("mpla", 5, 15, 32)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MCFG_PLA_ADD("opla", 4, 8, 16)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MCFG_PLA_ADD("spla", 3, 8, 8)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor tms0970_cpu_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME(tms0970);
|
||||
}
|
||||
|
||||
|
||||
// device_reset
|
||||
void tms0970_cpu_device::device_reset()
|
||||
{
|
||||
// common reset
|
||||
tms1k_base_device::device_reset();
|
||||
|
||||
// pre-decode instructionset
|
||||
m_fixed_decode.resize(0x100);
|
||||
memset(&m_fixed_decode[0], 0, 0x100*sizeof(UINT32));
|
||||
m_micro_decode.resize(0x100);
|
||||
memset(&m_micro_decode[0], 0, 0x100*sizeof(UINT32));
|
||||
|
||||
for (int op = 0; op < 0x100; op++)
|
||||
{
|
||||
// upper half of the opcodes is always branch/call
|
||||
if (op & 0x80)
|
||||
m_fixed_decode[op] = (op & 0x40) ? F_CALL: F_BR;
|
||||
|
||||
// 5 output bits select a microinstruction index
|
||||
UINT32 imask = m_ipla->read(op);
|
||||
UINT8 msel = imask & 0x1f;
|
||||
|
||||
// but if (from bottom to top) term 1 is active and output bit 5 is 0, R2,R4-R7 directly select a microinstruction index
|
||||
if (imask & 0x40 && (imask & 0x20) == 0)
|
||||
msel = (op & 0xf) | (op >> 1 & 0x10);
|
||||
|
||||
msel = BITSWAP8(msel,7,6,5,0,1,2,3,4); // lines are reversed
|
||||
UINT32 mmask = m_mpla->read(msel);
|
||||
mmask ^= 0x09fe; // invert active-negative
|
||||
|
||||
// _____ _____ _____ _____ ______ _____ ______ _____ _____
|
||||
const UINT32 md[15] = { M_CKM, M_CKP, M_YTP, M_MTP, M_ATN, M_NATN, M_MTN, M_15TN, M_CKN, M_NE, M_C8, M_CIN, M_AUTA, M_AUTY, M_STO };
|
||||
|
||||
for (int bit = 0; bit < 15; bit++)
|
||||
if (mmask & (1 << bit))
|
||||
m_micro_decode[op] |= md[bit];
|
||||
|
||||
// the other ipla terms each select a fixed instruction
|
||||
const UINT32 id[8] = { F_LDP, F_TDO, F_COMX, F_LDX, F_SBIT, F_RBIT, F_SETR, F_RETN };
|
||||
|
||||
for (int bit = 0; bit < 8; bit++)
|
||||
if (imask & (0x80 << bit))
|
||||
m_fixed_decode[op] |= id[bit];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// i/o handling
|
||||
void tms0970_cpu_device::write_o_output(UINT8 index)
|
||||
{
|
||||
m_o = m_spla->read(index);
|
||||
m_write_o(0, m_o & m_o_mask, 0xffff);
|
||||
}
|
||||
|
||||
|
||||
// opcode deviations
|
||||
void tms0970_cpu_device::op_setr()
|
||||
{
|
||||
// SETR: set output register
|
||||
// DDIG line is a coincidence between the selected output pla row(s) and segment pla row(s)
|
||||
int ddig = (m_opla->read(m_a) & m_o) ? 1 : 0;
|
||||
m_r = (m_r & ~(1 << m_y)) | (ddig << m_y);
|
||||
}
|
||||
|
||||
void tms0970_cpu_device::op_tdo()
|
||||
{
|
||||
// TDO: transfer digits to output
|
||||
write_o_output(m_a & 0x7);
|
||||
m_write_r(0, m_r & m_r_mask, 0xffff);
|
||||
}
|
57
src/devices/cpu/tms1000/tms0970.h
Normal file
57
src/devices/cpu/tms1000/tms0970.h
Normal file
@ -0,0 +1,57 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
TMS1000 family - TMS0950, TMS0970, TMS1990
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _TMS0970_H_
|
||||
#define _TMS0970_H_
|
||||
|
||||
#include "tms1000.h"
|
||||
|
||||
|
||||
class tms0970_cpu_device : public tms1000_cpu_device
|
||||
{
|
||||
public:
|
||||
tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual void device_reset() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
virtual void write_o_output(UINT8 index) override;
|
||||
|
||||
virtual void op_setr() override;
|
||||
virtual void op_tdo() override;
|
||||
};
|
||||
|
||||
class tms0950_cpu_device : public tms0970_cpu_device
|
||||
{
|
||||
public:
|
||||
tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual void device_reset() override { tms1000_cpu_device::device_reset(); }
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
virtual void op_rstr() override { ; } // assume it has no RSTR or CLO
|
||||
virtual void op_clo() override { ; } // "
|
||||
};
|
||||
|
||||
class tms1990_cpu_device : public tms0970_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
extern const device_type TMS0950;
|
||||
extern const device_type TMS0970;
|
||||
extern const device_type TMS1990;
|
||||
|
||||
#endif /* _TMS0970_H_ */
|
231
src/devices/cpu/tms1000/tms0980.cpp
Normal file
231
src/devices/cpu/tms1000/tms0980.cpp
Normal file
@ -0,0 +1,231 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
TMS1000 family - TMS0980, TMS1980
|
||||
|
||||
*/
|
||||
|
||||
#include "tms0980.h"
|
||||
#include "debugger.h"
|
||||
|
||||
// TMS0980
|
||||
// - 144x4bit RAM array at the bottom-left (128+16, set up as 8x18x4)
|
||||
// - 2048x9bit ROM array at the bottom-left
|
||||
// - main instructions PLAs at the top half, to the right of the midline
|
||||
// * top section is assumed to be the CKI bus select
|
||||
// * middle section is for microinstruction redirection, this part may differ per die
|
||||
// * rest is fixed instructions select, from top-to-bottom: SEAC, LDX, COMX, COMX8,
|
||||
// TDO, SBIT, RETN, SETR, REAC, XDA, SAL, RBIT, ..., OFF, SBL, LDP, redir(------00- + R0^BL)
|
||||
// - 64-term microinstructions PLA between the RAM and ROM, supporting 20 microinstructions
|
||||
// - 16-term inverted output PLA and segment PLA above the RAM (rotate opla 90 degrees)
|
||||
const device_type TMS0980 = &device_creator<tms0980_cpu_device>; // 28-pin DIP, 9 R pins
|
||||
|
||||
// TMS1980 is a TMS0980 with a TMS1x00 style opla
|
||||
// - RAM, ROM, and main instructions PLAs is the same as TMS0980
|
||||
// - one of the microinstructions redirects to a RSTR instruction, like on TMS0270
|
||||
// - 32-term inverted output PLA above the RAM, 7 bits! (rotate opla 270 degrees)
|
||||
const device_type TMS1980 = &device_creator<tms1980_cpu_device>; // 28-pin DIP, 7 O pins, 10 R pins, high voltage
|
||||
|
||||
|
||||
// internal memory maps
|
||||
static ADDRESS_MAP_START(program_11bit_9, AS_PROGRAM, 16, tms1k_base_device)
|
||||
AM_RANGE(0x000, 0xfff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START(data_144x4, AS_DATA, 8, tms1k_base_device)
|
||||
AM_RANGE(0x00, 0x7f) AM_RAM
|
||||
AM_RANGE(0x80, 0x8f) AM_RAM AM_MIRROR(0x70) // DAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
// device definitions
|
||||
tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms0970_cpu_device(mconfig, TMS0980, "TMS0980", tag, owner, clock, 8 /* o pins */, 9 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 12 /* prg width */, ADDRESS_MAP_NAME(program_11bit_9), 8 /* data width */, ADDRESS_MAP_NAME(data_144x4), "tms0980", __FILE__)
|
||||
{ }
|
||||
|
||||
tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
|
||||
: tms0970_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
|
||||
{ }
|
||||
|
||||
tms1980_cpu_device::tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms0980_cpu_device(mconfig, TMS1980, "TMS1980", tag, owner, clock, 7, 10, 7, 9, 4, 12, ADDRESS_MAP_NAME(program_11bit_9), 8, ADDRESS_MAP_NAME(data_144x4), "tms1980", __FILE__)
|
||||
{ }
|
||||
|
||||
|
||||
// machine configs
|
||||
static MACHINE_CONFIG_FRAGMENT(tms0980)
|
||||
|
||||
// main opcodes PLA, microinstructions PLA, output PLA, segment PLA
|
||||
MCFG_PLA_ADD("ipla", 9, 22, 24)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MCFG_PLA_ADD("mpla", 6, 20, 64)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MCFG_PLA_ADD("opla", 4, 8, 16)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MCFG_PLA_ADD("spla", 3, 8, 8)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor tms0980_cpu_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME(tms0980);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT(tms1980)
|
||||
|
||||
// main opcodes PLA, microinstructions PLA, output PLA
|
||||
MCFG_PLA_ADD("ipla", 9, 22, 24)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MCFG_PLA_ADD("mpla", 6, 22, 64)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MCFG_PLA_ADD("opla", 5, 7, 32)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor tms1980_cpu_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME(tms1980);
|
||||
}
|
||||
|
||||
|
||||
// disasm
|
||||
offs_t tms0980_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
|
||||
{
|
||||
extern CPU_DISASSEMBLE(tms0980);
|
||||
return CPU_DISASSEMBLE_NAME(tms0980)(this, buffer, pc, oprom, opram, options);
|
||||
}
|
||||
|
||||
|
||||
// device_reset
|
||||
UINT32 tms0980_cpu_device::decode_micro(UINT8 sel)
|
||||
{
|
||||
UINT32 decode = 0;
|
||||
|
||||
sel = BITSWAP8(sel,7,6,0,1,2,3,4,5); // lines are reversed
|
||||
UINT32 mask = m_mpla->read(sel);
|
||||
mask ^= 0x43fc3; // invert active-negative
|
||||
|
||||
// M_RSTR is specific to TMS02x0/TMS1980, it redirects to F_RSTR
|
||||
// M_UNK1 is specific to TMS0270, unknown/unused yet and apparently not connected on every TMS0270
|
||||
// _______ ______ _____ _____ _____ _____ ______ _____ ______ _____ _____
|
||||
const UINT32 md[22] = { M_NDMTP, M_DMTP, M_AUTY, M_AUTA, M_CKM, M_SSE, M_CKP, M_YTP, M_MTP, M_ATN, M_NATN, M_MTN, M_15TN, M_CKN, M_NE, M_C8, M_SSS, M_CME, M_CIN, M_STO, M_RSTR, M_UNK1 };
|
||||
|
||||
for (int bit = 0; bit < 22 && bit < m_mpla->outputs(); bit++)
|
||||
if (mask & (1 << bit))
|
||||
decode |= md[bit];
|
||||
|
||||
return decode;
|
||||
}
|
||||
|
||||
void tms0980_cpu_device::device_reset()
|
||||
{
|
||||
// common reset
|
||||
tms1k_base_device::device_reset();
|
||||
|
||||
// pre-decode instructionset
|
||||
m_fixed_decode.resize(0x200);
|
||||
memset(&m_fixed_decode[0], 0, 0x200*sizeof(UINT32));
|
||||
m_micro_decode.resize(0x200);
|
||||
memset(&m_micro_decode[0], 0, 0x200*sizeof(UINT32));
|
||||
|
||||
for (int op = 0; op < 0x200; op++)
|
||||
{
|
||||
// upper half of the opcodes is always branch/call
|
||||
if (op & 0x100)
|
||||
m_fixed_decode[op] = (op & 0x80) ? F_CALL: F_BR;
|
||||
|
||||
UINT32 imask = m_ipla->read(op);
|
||||
|
||||
// 6 output bits select a microinstruction index
|
||||
m_micro_decode[op] = decode_micro(imask & 0x3f);
|
||||
|
||||
// the other ipla terms each select a fixed instruction
|
||||
const UINT32 id[15] = { F_LDP, F_SBL, F_OFF, F_RBIT, F_SAL, F_XDA, F_REAC, F_SETR, F_RETN, F_SBIT, F_TDO, F_COMX8, F_COMX, F_LDX, F_SEAC };
|
||||
|
||||
for (int bit = 0; bit < 15; bit++)
|
||||
if (imask & (0x80 << bit))
|
||||
m_fixed_decode[op] |= id[bit];
|
||||
}
|
||||
|
||||
// like on TMS0970, one of the terms directly select a microinstruction index (via R4-R8),
|
||||
// but it can't be pre-determined when it's active
|
||||
m_micro_direct.resize(0x40);
|
||||
memset(&m_micro_decode[0], 0, 0x40*sizeof(UINT32));
|
||||
|
||||
for (int op = 0; op < 0x40; op++)
|
||||
m_micro_direct[op] = decode_micro(op);
|
||||
}
|
||||
|
||||
|
||||
// program counter/opcode decode
|
||||
void tms0980_cpu_device::read_opcode()
|
||||
{
|
||||
debugger_instruction_hook(this, m_rom_address << 1);
|
||||
m_opcode = m_program->read_word(m_rom_address << 1) & 0x1ff;
|
||||
m_c4 = BITSWAP8(m_opcode,7,6,5,4,0,1,2,3) & 0xf; // opcode operand is bitswapped for most opcodes
|
||||
|
||||
m_fixed = m_fixed_decode[m_opcode];
|
||||
|
||||
// if ipla term 0 is active, R4-R8 directly select a microinstruction index when R0 or R0^BL is 0
|
||||
int r0 = m_opcode >> 8 & 1;
|
||||
if (m_ipla->read(m_opcode) & 0x40 && !((r0 & m_bl) ^ r0))
|
||||
m_micro = m_micro_direct[m_opcode & 0x3f];
|
||||
else
|
||||
m_micro = m_micro_decode[m_opcode];
|
||||
|
||||
// redirect mpla fixed instructions
|
||||
if (m_micro & M_RSTR) m_fixed |= F_RSTR;
|
||||
if (m_micro & M_SETR) m_fixed |= F_SETR;
|
||||
|
||||
next_pc();
|
||||
}
|
||||
|
||||
|
||||
// i/o handling
|
||||
UINT8 tms0980_cpu_device::read_k_input()
|
||||
{
|
||||
UINT8 k = m_read_k(0, 0xff) & 0x1f;
|
||||
UINT8 k3 = (k & 0x10) ? 3: 0; // the TMS0980 K3 line is simply K1|K2
|
||||
return (k & 0xf) | k3;
|
||||
}
|
||||
|
||||
void tms0980_cpu_device::set_cki_bus()
|
||||
{
|
||||
switch (m_opcode & 0x1f8)
|
||||
{
|
||||
// 000001XXX: K-inputs
|
||||
case 0x008:
|
||||
m_cki_bus = read_k_input();
|
||||
break;
|
||||
|
||||
// 0X0100XXX: select bit
|
||||
case 0x020: case 0x0a0:
|
||||
m_cki_bus = 1 << (m_c4 >> 2) ^ 0xf;
|
||||
break;
|
||||
|
||||
// 0X1XXXXXX: constant
|
||||
case 0x040: case 0x048: case 0x050: case 0x058: case 0x060: case 0x068: case 0x070: case 0x078:
|
||||
case 0x0c0: case 0x0c8: case 0x0d0: case 0x0d8: case 0x0e0: case 0x0e8: case 0x0f0: case 0x0f8:
|
||||
m_cki_bus = m_c4;
|
||||
break;
|
||||
|
||||
default:
|
||||
m_cki_bus = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// opcode deviations
|
||||
void tms0980_cpu_device::op_comx()
|
||||
{
|
||||
// COMX: complement X register, but not the MSB
|
||||
m_x ^= (m_x_mask >> 1);
|
||||
}
|
||||
|
||||
void tms1980_cpu_device::op_tdo()
|
||||
{
|
||||
// TDO: transfer accumulator and status(not status_latch!) to O-output
|
||||
write_o_output(m_status << 4 | m_a);
|
||||
}
|
60
src/devices/cpu/tms1000/tms0980.h
Normal file
60
src/devices/cpu/tms1000/tms0980.h
Normal file
@ -0,0 +1,60 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
TMS1000 family - TMS0980, TMS1980
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _TMS0980_H_
|
||||
#define _TMS0980_H_
|
||||
|
||||
#include "tms0970.h"
|
||||
|
||||
|
||||
class tms0980_cpu_device : public tms0970_cpu_device
|
||||
{
|
||||
public:
|
||||
tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual void device_reset() override;
|
||||
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
|
||||
virtual UINT32 disasm_max_opcode_bytes() const override { return 2; }
|
||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
|
||||
|
||||
virtual UINT8 read_k_input() override;
|
||||
virtual void set_cki_bus() override;
|
||||
virtual void read_opcode() override;
|
||||
|
||||
virtual void op_comx() override;
|
||||
|
||||
UINT32 decode_micro(UINT8 sel);
|
||||
};
|
||||
|
||||
class tms1980_cpu_device : public tms0980_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
virtual void write_o_output(UINT8 index) override { tms1k_base_device::write_o_output(index); }
|
||||
virtual UINT8 read_k_input() override { return tms1k_base_device::read_k_input(); }
|
||||
|
||||
virtual void op_setr() override { tms1k_base_device::op_setr(); }
|
||||
virtual void op_tdo() override;
|
||||
};
|
||||
|
||||
|
||||
extern const device_type TMS0980;
|
||||
extern const device_type TMS1980;
|
||||
|
||||
#endif /* _TMS0980_H_ */
|
126
src/devices/cpu/tms1000/tms1000.cpp
Normal file
126
src/devices/cpu/tms1000/tms1000.cpp
Normal file
@ -0,0 +1,126 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
TMS1000 family - TMS1000, TMS1070, TMS1040, TMS1200
|
||||
|
||||
*/
|
||||
|
||||
#include "tms1000.h"
|
||||
#include "debugger.h"
|
||||
|
||||
// TMS1000
|
||||
// - 64x4bit RAM array at the bottom-left
|
||||
// - 1024x8bit ROM array at the bottom-right
|
||||
// * FYI, the row-selector to the left of it is laid out as:
|
||||
// 3,4,11,12,19,20,27,28,35,36,43,44,51,52,59,60,0,7,8,15,16,23,24,31,32,39,40,47,48,55,56,63,
|
||||
// 2,5,10,13,18,21,26,29,34,37,42,45,50,53,58,61,1,6,9,14,17,22,25,30,33,38,41,46,49,54,57,62
|
||||
// - 30-term microinstructions PLA(mpla) at the top half, to the right of the midline, supporting 16 microinstructions
|
||||
// - 20-term output PLA(opla) at the top-left
|
||||
// - the ALU is between the opla and mpla
|
||||
const device_type TMS1000 = &device_creator<tms1000_cpu_device>; // 28-pin DIP, 11 R pins
|
||||
const device_type TMS1070 = &device_creator<tms1070_cpu_device>; // high voltage version
|
||||
const device_type TMS1040 = &device_creator<tms1040_cpu_device>; // same as TMS1070 with just a different pinout?
|
||||
const device_type TMS1200 = &device_creator<tms1200_cpu_device>; // 40-pin DIP, 13 R pins
|
||||
// TMS1270 has 10 O pins, how does that work?
|
||||
|
||||
|
||||
// internal memory maps
|
||||
static ADDRESS_MAP_START(program_10bit_8, AS_PROGRAM, 8, tms1k_base_device)
|
||||
AM_RANGE(0x000, 0x3ff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START(data_64x4, AS_DATA, 8, tms1k_base_device)
|
||||
AM_RANGE(0x00, 0x3f) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
// device definitions
|
||||
tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms1k_base_device(mconfig, TMS1000, "TMS1000", tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 2 /* x width */, 10 /* prg width */, ADDRESS_MAP_NAME(program_10bit_8), 6 /* data width */, ADDRESS_MAP_NAME(data_64x4), "tms1000", __FILE__)
|
||||
{ }
|
||||
|
||||
tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
|
||||
: tms1k_base_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
|
||||
{ }
|
||||
|
||||
tms1070_cpu_device::tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms1000_cpu_device(mconfig, TMS1070, "TMS1070", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1070", __FILE__)
|
||||
{ }
|
||||
|
||||
tms1040_cpu_device::tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms1000_cpu_device(mconfig, TMS1040, "TMS1040", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1040", __FILE__)
|
||||
{ }
|
||||
|
||||
tms1200_cpu_device::tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms1000_cpu_device(mconfig, TMS1200, "TMS1200", tag, owner, clock, 8, 13, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1200", __FILE__)
|
||||
{ }
|
||||
|
||||
|
||||
// machine configs
|
||||
static MACHINE_CONFIG_FRAGMENT(tms1000)
|
||||
|
||||
// microinstructions PLA, output PLA
|
||||
MCFG_PLA_ADD("mpla", 8, 16, 30)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MCFG_PLA_ADD("opla", 5, 8, 20)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor tms1000_cpu_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME(tms1000);
|
||||
}
|
||||
|
||||
|
||||
// disasm
|
||||
offs_t tms1000_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
|
||||
{
|
||||
extern CPU_DISASSEMBLE(tms1000);
|
||||
return CPU_DISASSEMBLE_NAME(tms1000)(this, buffer, pc, oprom, opram, options);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void tms1000_cpu_device::device_reset()
|
||||
{
|
||||
// common reset
|
||||
tms1k_base_device::device_reset();
|
||||
|
||||
// pre-decode instructionset
|
||||
m_fixed_decode.resize(0x100);
|
||||
memset(&m_fixed_decode[0], 0, 0x100*sizeof(UINT32));
|
||||
m_micro_decode.resize(0x100);
|
||||
memset(&m_micro_decode[0], 0, 0x100*sizeof(UINT32));
|
||||
|
||||
for (int op = 0; op < 0x100; op++)
|
||||
{
|
||||
// _____ _____ ______ _____ ______ _____ _____ _____ _____
|
||||
const UINT32 md[16] = { M_STSL, M_AUTY, M_AUTA, M_CIN, M_C8, M_NE, M_CKN, M_15TN, M_MTN, M_NATN, M_ATN, M_MTP, M_YTP, M_CKP, M_CKM, M_STO };
|
||||
UINT16 mask = m_mpla->read(op);
|
||||
mask ^= 0x3fc8; // invert active-negative
|
||||
|
||||
for (int bit = 0; bit < 16; bit++)
|
||||
if (mask & (1 << bit))
|
||||
m_micro_decode[op] |= md[bit];
|
||||
}
|
||||
|
||||
// the fixed instruction set is not programmable
|
||||
m_fixed_decode[0x00] = F_COMX;
|
||||
m_fixed_decode[0x0a] = F_TDO;
|
||||
m_fixed_decode[0x0b] = F_CLO;
|
||||
m_fixed_decode[0x0c] = F_RSTR;
|
||||
m_fixed_decode[0x0d] = F_SETR;
|
||||
m_fixed_decode[0x0f] = F_RETN;
|
||||
|
||||
for (int i = 0x10; i < 0x20; i++) m_fixed_decode[i] = F_LDP;
|
||||
for (int i = 0x30; i < 0x34; i++) m_fixed_decode[i] = F_SBIT;
|
||||
for (int i = 0x34; i < 0x38; i++) m_fixed_decode[i] = F_RBIT;
|
||||
for (int i = 0x3c; i < 0x40; i++) m_fixed_decode[i] = F_LDX;
|
||||
|
||||
for (int i = 0x80; i < 0xc0; i++) m_fixed_decode[i] = F_BR;
|
||||
for (int i = 0xc0; i < 0x100; i++) m_fixed_decode[i] = F_CALL;
|
||||
}
|
55
src/devices/cpu/tms1000/tms1000.h
Normal file
55
src/devices/cpu/tms1000/tms1000.h
Normal file
@ -0,0 +1,55 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
TMS1000 family - TMS1000, TMS1070, TMS1040, TMS1200
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _TMS1000_H_
|
||||
#define _TMS1000_H_
|
||||
|
||||
#include "tms1k_base.h"
|
||||
|
||||
|
||||
class tms1000_cpu_device : public tms1k_base_device
|
||||
{
|
||||
public:
|
||||
tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual void device_reset() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
|
||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
|
||||
};
|
||||
|
||||
class tms1070_cpu_device : public tms1000_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
class tms1040_cpu_device : public tms1000_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
class tms1200_cpu_device : public tms1000_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
extern const device_type TMS1000;
|
||||
extern const device_type TMS1070;
|
||||
extern const device_type TMS1040;
|
||||
extern const device_type TMS1200;
|
||||
|
||||
#endif /* _TMS1000_H_ */
|
87
src/devices/cpu/tms1000/tms1100.cpp
Normal file
87
src/devices/cpu/tms1000/tms1100.cpp
Normal file
@ -0,0 +1,87 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
TMS1000 family - TMS1100, TMS1170, TMS1300, TMS1370
|
||||
|
||||
*/
|
||||
|
||||
#include "tms1100.h"
|
||||
#include "debugger.h"
|
||||
|
||||
// TMS1100 is nearly the same as TMS1000, some different opcodes, and with double the RAM and ROM
|
||||
const device_type TMS1100 = &device_creator<tms1100_cpu_device>; // 28-pin DIP, 11 R pins
|
||||
const device_type TMS1170 = &device_creator<tms1170_cpu_device>; // high voltage version
|
||||
const device_type TMS1300 = &device_creator<tms1300_cpu_device>; // 40-pin DIP, 16 R pins
|
||||
const device_type TMS1370 = &device_creator<tms1370_cpu_device>; // high voltage version
|
||||
|
||||
|
||||
// internal memory maps
|
||||
static ADDRESS_MAP_START(program_11bit_8, AS_PROGRAM, 8, tms1k_base_device)
|
||||
AM_RANGE(0x000, 0x7ff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START(data_128x4, AS_DATA, 8, tms1k_base_device)
|
||||
AM_RANGE(0x00, 0x7f) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
// device definitions
|
||||
tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms1000_cpu_device(mconfig, TMS1100, "TMS1100", tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 3 /* x width */, 11 /* prg width */, ADDRESS_MAP_NAME(program_11bit_8), 7 /* data width */, ADDRESS_MAP_NAME(data_128x4), "tms1100", __FILE__)
|
||||
{ }
|
||||
|
||||
tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
|
||||
: tms1000_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
|
||||
{ }
|
||||
|
||||
tms1170_cpu_device::tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms1100_cpu_device(mconfig, TMS1170, "TMS1170", tag, owner, clock, 8, 11, 6, 8, 3, 11, ADDRESS_MAP_NAME(program_11bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1170", __FILE__)
|
||||
{ }
|
||||
|
||||
tms1300_cpu_device::tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms1100_cpu_device(mconfig, TMS1300, "TMS1300", tag, owner, clock, 8, 16, 6, 8, 3, 11, ADDRESS_MAP_NAME(program_11bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1300", __FILE__)
|
||||
{ }
|
||||
|
||||
tms1370_cpu_device::tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms1100_cpu_device(mconfig, TMS1370, "TMS1370", tag, owner, clock, 8, 16, 6, 8, 3, 11, ADDRESS_MAP_NAME(program_11bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1370", __FILE__)
|
||||
{ }
|
||||
|
||||
|
||||
// disasm
|
||||
offs_t tms1100_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
|
||||
{
|
||||
extern CPU_DISASSEMBLE(tms1100);
|
||||
return CPU_DISASSEMBLE_NAME(tms1100)(this, buffer, pc, oprom, opram, options);
|
||||
}
|
||||
|
||||
|
||||
// device_reset
|
||||
void tms1100_cpu_device::device_reset()
|
||||
{
|
||||
tms1000_cpu_device::device_reset();
|
||||
|
||||
// small differences in 00-3f area
|
||||
m_fixed_decode[0x00] = 0;
|
||||
m_fixed_decode[0x09] = F_COMX8; // !
|
||||
m_fixed_decode[0x0b] = F_COMC;
|
||||
|
||||
for (int i = 0x28; i < 0x30; i++) m_fixed_decode[i] = F_LDX;
|
||||
for (int i = 0x3c; i < 0x40; i++) m_fixed_decode[i] = 0;
|
||||
}
|
||||
|
||||
|
||||
// opcode deviations
|
||||
void tms1100_cpu_device::op_setr()
|
||||
{
|
||||
// SETR: same, but X register MSB must be clear
|
||||
if (~m_x & (1 << (m_x_bits-1)))
|
||||
tms1k_base_device::op_setr();
|
||||
}
|
||||
|
||||
void tms1100_cpu_device::op_rstr()
|
||||
{
|
||||
// RSTR: same, but X register MSB must be clear
|
||||
if (~m_x & (1 << (m_x_bits-1)))
|
||||
tms1k_base_device::op_rstr();
|
||||
}
|
56
src/devices/cpu/tms1000/tms1100.h
Normal file
56
src/devices/cpu/tms1000/tms1100.h
Normal file
@ -0,0 +1,56 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
TMS1000 family - TMS1100, TMS1170, TMS1300, TMS1370
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _TMS1100_H_
|
||||
#define _TMS1100_H_
|
||||
|
||||
#include "tms1000.h"
|
||||
|
||||
|
||||
class tms1100_cpu_device : public tms1000_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual void device_reset() override;
|
||||
|
||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
|
||||
|
||||
virtual void op_setr() override;
|
||||
virtual void op_rstr() override;
|
||||
};
|
||||
|
||||
class tms1170_cpu_device : public tms1100_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
class tms1300_cpu_device : public tms1100_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
class tms1370_cpu_device : public tms1100_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
extern const device_type TMS1100;
|
||||
extern const device_type TMS1170;
|
||||
extern const device_type TMS1300;
|
||||
extern const device_type TMS1370;
|
||||
|
||||
|
||||
#endif /* _TMS1100_H_ */
|
143
src/devices/cpu/tms1000/tms1400.cpp
Normal file
143
src/devices/cpu/tms1000/tms1400.cpp
Normal file
@ -0,0 +1,143 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
TMS1000 family - TMS1400, TMS1470, TMS1600, TMS1670
|
||||
|
||||
TODO:
|
||||
- emulate TMS1600 L-pins
|
||||
|
||||
*/
|
||||
|
||||
#include "tms1400.h"
|
||||
#include "debugger.h"
|
||||
|
||||
// TMS1400 follows the TMS1100, it doubles the ROM size again (4 chapters of 16 pages), and adds a 3-level callstack
|
||||
// - rotate the view and mirror the OR-mask to get the proper layout of the mpla, the default is identical to tms1100
|
||||
// - the opla size is increased from 20 to 32 terms
|
||||
const device_type TMS1400 = &device_creator<tms1400_cpu_device>; // 28-pin DIP, 11 R pins (TMS1400CR is same, but with TMS1100 pinout)
|
||||
const device_type TMS1470 = &device_creator<tms1470_cpu_device>; // high voltage version, 1 R pin removed for Vdd
|
||||
|
||||
// TMS1600 adds more I/O to the TMS1400, input pins are doubled with added L1,2,4,8
|
||||
// - rotate the view and mirror the OR-mask to get the proper layout of the mpla, the default is identical to tms1100
|
||||
// - the opla size is increased from 20 to 32 terms
|
||||
const device_type TMS1600 = &device_creator<tms1600_cpu_device>; // 40-pin DIP, 16 R pins
|
||||
const device_type TMS1670 = &device_creator<tms1670_cpu_device>; // high voltage version
|
||||
|
||||
|
||||
// internal memory maps
|
||||
static ADDRESS_MAP_START(program_12bit_8, AS_PROGRAM, 8, tms1k_base_device)
|
||||
AM_RANGE(0x000, 0xfff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START(data_128x4, AS_DATA, 8, tms1k_base_device)
|
||||
AM_RANGE(0x00, 0x7f) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
// device definitions
|
||||
tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms1100_cpu_device(mconfig, TMS1400, "TMS1400", tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 3 /* x width */, 12 /* prg width */, ADDRESS_MAP_NAME(program_12bit_8), 7 /* data width */, ADDRESS_MAP_NAME(data_128x4), "tms1400", __FILE__)
|
||||
{ }
|
||||
|
||||
tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
|
||||
: tms1100_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
|
||||
{ }
|
||||
|
||||
tms1470_cpu_device::tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms1400_cpu_device(mconfig, TMS1470, "TMS1470", tag, owner, clock, 8, 10, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1470", __FILE__)
|
||||
{ }
|
||||
|
||||
|
||||
tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms1400_cpu_device(mconfig, TMS1600, "TMS1600", tag, owner, clock, 8, 16, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1600", __FILE__)
|
||||
{ }
|
||||
|
||||
tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
|
||||
: tms1400_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
|
||||
{ }
|
||||
|
||||
tms1670_cpu_device::tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms1600_cpu_device(mconfig, TMS1670, "TMS1670", tag, owner, clock, 8, 16, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1670", __FILE__)
|
||||
{ }
|
||||
|
||||
|
||||
// machine configs
|
||||
static MACHINE_CONFIG_FRAGMENT(tms1400)
|
||||
|
||||
// microinstructions PLA, output PLA
|
||||
MCFG_PLA_ADD("mpla", 8, 16, 30)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MCFG_PLA_ADD("opla", 5, 8, 32)
|
||||
MCFG_PLA_FILEFORMAT(PLA_FMT_BERKELEY)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor tms1400_cpu_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME(tms1400);
|
||||
}
|
||||
|
||||
|
||||
// device_reset
|
||||
void tms1400_cpu_device::device_reset()
|
||||
{
|
||||
tms1100_cpu_device::device_reset();
|
||||
|
||||
// small differences in 00-3f area
|
||||
m_fixed_decode[0x0b] = F_TPC;
|
||||
}
|
||||
|
||||
|
||||
// opcode deviations
|
||||
void tms1400_cpu_device::op_br()
|
||||
{
|
||||
// BR/BL: conditional branch
|
||||
if (m_status)
|
||||
{
|
||||
m_pa = m_pb; // don't care about clatch
|
||||
m_ca = m_cb;
|
||||
m_pc = m_opcode & m_pc_mask;
|
||||
}
|
||||
}
|
||||
|
||||
void tms1400_cpu_device::op_call()
|
||||
{
|
||||
// CALL/CALLL: conditional call
|
||||
if (m_status)
|
||||
{
|
||||
// 3-level stack, mask clatch 3 bits (no need to mask others)
|
||||
m_clatch = (m_clatch << 1 | 1) & 7;
|
||||
|
||||
m_sr = m_sr << m_pc_bits | m_pc;
|
||||
m_pc = m_opcode & m_pc_mask;
|
||||
|
||||
m_ps = m_ps << 4 | m_pa;
|
||||
m_pa = m_pb;
|
||||
|
||||
m_cs = m_cs << 2 | m_ca;
|
||||
m_ca = m_cb;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pb = m_pa;
|
||||
m_cb = m_ca;
|
||||
}
|
||||
}
|
||||
|
||||
void tms1400_cpu_device::op_retn()
|
||||
{
|
||||
// RETN: return from subroutine
|
||||
if (m_clatch & 1)
|
||||
{
|
||||
m_clatch >>= 1;
|
||||
|
||||
m_pc = m_sr & m_pc_mask;
|
||||
m_sr >>= m_pc_bits;
|
||||
|
||||
m_pa = m_pb = m_ps & 0xf;
|
||||
m_ps >>= 4;
|
||||
|
||||
m_ca = m_cb = m_cs & 3;
|
||||
m_cs >>= 2;
|
||||
}
|
||||
}
|
61
src/devices/cpu/tms1000/tms1400.h
Normal file
61
src/devices/cpu/tms1000/tms1400.h
Normal file
@ -0,0 +1,61 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
TMS1000 family - TMS1400, TMS1470, TMS1600, TMS1670
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _TMS1400_H_
|
||||
#define _TMS1400_H_
|
||||
|
||||
#include "tms1100.h"
|
||||
|
||||
|
||||
class tms1400_cpu_device : public tms1100_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
virtual void device_reset() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
virtual void op_br() override;
|
||||
virtual void op_call() override;
|
||||
virtual void op_retn() override;
|
||||
|
||||
virtual void op_setr() override { tms1k_base_device::op_setr(); } // no anomaly with MSB of X register
|
||||
virtual void op_rstr() override { tms1k_base_device::op_rstr(); } // "
|
||||
};
|
||||
|
||||
class tms1470_cpu_device : public tms1400_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
class tms1600_cpu_device : public tms1400_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
|
||||
};
|
||||
|
||||
class tms1670_cpu_device : public tms1600_cpu_device
|
||||
{
|
||||
public:
|
||||
tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
extern const device_type TMS1400;
|
||||
extern const device_type TMS1470;
|
||||
extern const device_type TMS1600;
|
||||
extern const device_type TMS1670;
|
||||
|
||||
|
||||
#endif /* _TMS1400_H_ */
|
635
src/devices/cpu/tms1000/tms1k_base.cpp
Normal file
635
src/devices/cpu/tms1000/tms1k_base.cpp
Normal file
@ -0,0 +1,635 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Wilbert Pol, hap
|
||||
/*
|
||||
|
||||
TMS1000 family - base/shared
|
||||
|
||||
TODO:
|
||||
- fix debugger disasm view
|
||||
|
||||
|
||||
The TMS0980 and TMS1000-family MCU cores are very similar. The TMS0980 has a
|
||||
slightly bigger addressable area and uses 9bit instructions where the TMS1000
|
||||
family uses 8bit instruction. The instruction set themselves are very similar
|
||||
though.
|
||||
|
||||
Each instruction takes 12 cycles to execute in 2 phases: a fetch phase and an
|
||||
execution phase. The execution phase takes place at the same time as the fetch
|
||||
phase of the next instruction. So, during execution there are both fetch and
|
||||
execution operations taking place. The operation can be split up as follows:
|
||||
cycle #0
|
||||
- Fetch:
|
||||
1. ROM address 0
|
||||
- Execute:
|
||||
1. Read RAM
|
||||
2. Clear ALU inputs
|
||||
3. Execute BRANCH/CALL/RETN part #2
|
||||
4. K input valid
|
||||
cycle #1
|
||||
- Fetch:
|
||||
1. ROM address 1
|
||||
- Execute:
|
||||
1. Update ALU inputs
|
||||
cycle #2
|
||||
- Fetch:
|
||||
1. nothing/wait(?)
|
||||
- Execute:
|
||||
1. Perform ALU operation
|
||||
2. Write RAM
|
||||
cycle #3
|
||||
- Fetch:
|
||||
1. Fetch/Update PC/RAM address #1
|
||||
- Execute:
|
||||
1. Register store part #1
|
||||
cycle #4
|
||||
- Fetch:
|
||||
1. Fetch/Update PC/RAM address #2
|
||||
- Execute:
|
||||
1. Register store part #2
|
||||
cycle #5
|
||||
- Fetch:
|
||||
1. Instruction decode
|
||||
- Execute:
|
||||
1. Execute BRANCH/CALL/RETN part #1
|
||||
|
||||
The MCU cores contains a set of fixed instructions and a set of
|
||||
instructions created using microinstructions. A subset of the
|
||||
instruction set could be defined from the microinstructions by
|
||||
TI customers.
|
||||
|
||||
cycle #0: 15TN, ATN, CIN, CKN, CKP, DMTP, MTN, MTP, NATN, NDMTP, YTP
|
||||
cycle #2: C8(?), CKM, NE(?), STO
|
||||
cycle #3,#4: AUTA, AUTY
|
||||
|
||||
unknown cycle: CME, SSE, SSS
|
||||
|
||||
*/
|
||||
|
||||
#include "tms1k_base.h"
|
||||
#include "debugger.h"
|
||||
|
||||
// disasm
|
||||
void tms1k_base_device::state_string_export(const device_state_entry &entry, std::string &str) const
|
||||
{
|
||||
switch (entry.index())
|
||||
{
|
||||
case STATE_GENPC:
|
||||
str = string_format("%03X", m_rom_address << ((m_byte_bits > 8) ? 1 : 0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
enum
|
||||
{
|
||||
TMS1XXX_PC=1, TMS1XXX_SR, TMS1XXX_PA, TMS1XXX_PB,
|
||||
TMS1XXX_A, TMS1XXX_X, TMS1XXX_Y, TMS1XXX_STATUS
|
||||
};
|
||||
|
||||
void tms1k_base_device::device_start()
|
||||
{
|
||||
m_program = &space(AS_PROGRAM);
|
||||
m_data = &space(AS_DATA);
|
||||
|
||||
m_o_mask = (1 << m_o_pins) - 1;
|
||||
m_r_mask = (1 << m_r_pins) - 1;
|
||||
m_pc_mask = (1 << m_pc_bits) - 1;
|
||||
m_x_mask = (1 << m_x_bits) - 1;
|
||||
|
||||
// resolve callbacks
|
||||
m_read_k.resolve_safe(0);
|
||||
m_write_o.resolve_safe();
|
||||
m_write_r.resolve_safe();
|
||||
m_power_off.resolve_safe();
|
||||
|
||||
// zerofill
|
||||
m_pc = 0;
|
||||
m_sr = 0;
|
||||
m_pa = 0;
|
||||
m_pb = 0;
|
||||
m_ps = 0;
|
||||
m_a = 0;
|
||||
m_x = 0;
|
||||
m_y = 0;
|
||||
m_ca = 0;
|
||||
m_cb = 0;
|
||||
m_cs = 0;
|
||||
m_r = 0;
|
||||
m_o = 0;
|
||||
m_cki_bus = 0;
|
||||
m_c4 = 0;
|
||||
m_p = 0;
|
||||
m_n = 0;
|
||||
m_adder_out = 0;
|
||||
m_carry_in = 0;
|
||||
m_carry_out = 0;
|
||||
m_status = 0;
|
||||
m_status_latch = 0;
|
||||
m_eac = 0;
|
||||
m_clatch = 0;
|
||||
m_add = 0;
|
||||
m_bl = 0;
|
||||
|
||||
m_ram_in = 0;
|
||||
m_dam_in = 0;
|
||||
m_ram_out = 0;
|
||||
m_ram_address = 0;
|
||||
m_rom_address = 0;
|
||||
m_opcode = 0;
|
||||
m_fixed = 0;
|
||||
m_micro = 0;
|
||||
m_subcycle = 0;
|
||||
|
||||
// register for savestates
|
||||
save_item(NAME(m_pc));
|
||||
save_item(NAME(m_sr));
|
||||
save_item(NAME(m_pa));
|
||||
save_item(NAME(m_pb));
|
||||
save_item(NAME(m_ps));
|
||||
save_item(NAME(m_a));
|
||||
save_item(NAME(m_x));
|
||||
save_item(NAME(m_y));
|
||||
save_item(NAME(m_ca));
|
||||
save_item(NAME(m_cb));
|
||||
save_item(NAME(m_cs));
|
||||
save_item(NAME(m_r));
|
||||
save_item(NAME(m_o));
|
||||
save_item(NAME(m_cki_bus));
|
||||
save_item(NAME(m_c4));
|
||||
save_item(NAME(m_p));
|
||||
save_item(NAME(m_n));
|
||||
save_item(NAME(m_adder_out));
|
||||
save_item(NAME(m_carry_in));
|
||||
save_item(NAME(m_carry_out));
|
||||
save_item(NAME(m_status));
|
||||
save_item(NAME(m_status_latch));
|
||||
save_item(NAME(m_eac));
|
||||
save_item(NAME(m_clatch));
|
||||
save_item(NAME(m_add));
|
||||
save_item(NAME(m_bl));
|
||||
|
||||
save_item(NAME(m_ram_in));
|
||||
save_item(NAME(m_dam_in));
|
||||
save_item(NAME(m_ram_out));
|
||||
save_item(NAME(m_ram_address));
|
||||
save_item(NAME(m_rom_address));
|
||||
save_item(NAME(m_opcode));
|
||||
save_item(NAME(m_fixed));
|
||||
save_item(NAME(m_micro));
|
||||
save_item(NAME(m_subcycle));
|
||||
|
||||
// register state for debugger
|
||||
state_add(TMS1XXX_PC, "PC", m_pc ).formatstr("%02X");
|
||||
state_add(TMS1XXX_SR, "SR", m_sr ).formatstr("%01X");
|
||||
state_add(TMS1XXX_PA, "PA", m_pa ).formatstr("%01X");
|
||||
state_add(TMS1XXX_PB, "PB", m_pb ).formatstr("%01X");
|
||||
state_add(TMS1XXX_A, "A", m_a ).formatstr("%01X");
|
||||
state_add(TMS1XXX_X, "X", m_x ).formatstr("%01X");
|
||||
state_add(TMS1XXX_Y, "Y", m_y ).formatstr("%01X");
|
||||
state_add(TMS1XXX_STATUS, "STATUS", m_status).formatstr("%01X");
|
||||
|
||||
state_add(STATE_GENPC, "curpc", m_rom_address).formatstr("%03X").noshow();
|
||||
state_add(STATE_GENFLAGS, "GENFLAGS", m_sr).formatstr("%8s").noshow();
|
||||
|
||||
m_icountptr = &m_icount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void tms1k_base_device::device_reset()
|
||||
{
|
||||
m_pa = 0xf;
|
||||
m_pb = 0xf;
|
||||
m_pc = 0;
|
||||
m_ca = 0;
|
||||
m_cb = 0;
|
||||
m_cs = 0;
|
||||
|
||||
m_eac = 0;
|
||||
m_bl = 0;
|
||||
m_add = 0;
|
||||
|
||||
m_opcode = 0;
|
||||
m_micro = 0;
|
||||
m_fixed = 0;
|
||||
|
||||
m_subcycle = 0;
|
||||
|
||||
// clear outputs
|
||||
m_r = 0;
|
||||
m_write_r(0, m_r & m_r_mask, 0xffff);
|
||||
write_o_output(0);
|
||||
m_write_r(0, m_r & m_r_mask, 0xffff);
|
||||
m_power_off(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// program counter/opcode decode
|
||||
//-------------------------------------------------
|
||||
|
||||
void tms1k_base_device::next_pc()
|
||||
{
|
||||
// The program counter is a LFSR. To put it simply, the feedback bit is a XOR of the two highest bits,
|
||||
// but it makes an exception when all low bits are set (eg. in TMS1000 case, when PC is 0x1f or 0x3f).
|
||||
int high = 1 << (m_pc_bits - 1);
|
||||
int fb = (m_pc << 1 & high) == (m_pc & high);
|
||||
|
||||
if (m_pc == (m_pc_mask >> 1))
|
||||
fb = 1;
|
||||
else if (m_pc == m_pc_mask)
|
||||
fb = 0;
|
||||
|
||||
m_pc = (m_pc << 1 | fb) & m_pc_mask;
|
||||
}
|
||||
|
||||
void tms1k_base_device::read_opcode()
|
||||
{
|
||||
debugger_instruction_hook(this, m_rom_address);
|
||||
m_opcode = m_program->read_byte(m_rom_address);
|
||||
m_c4 = BITSWAP8(m_opcode,7,6,5,4,0,1,2,3) & 0xf; // opcode operand is bitswapped for most opcodes
|
||||
|
||||
m_fixed = m_fixed_decode[m_opcode];
|
||||
m_micro = m_micro_decode[m_opcode];
|
||||
|
||||
next_pc();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// i/o handling
|
||||
//-------------------------------------------------
|
||||
|
||||
void tms1k_base_device::write_o_output(UINT8 index)
|
||||
{
|
||||
// a hardcoded table is supported if the output pla is unknown
|
||||
m_o = (m_output_pla_table == nullptr) ? m_opla->read(index) : m_output_pla_table[index];
|
||||
m_write_o(0, m_o & m_o_mask, 0xffff);
|
||||
}
|
||||
|
||||
UINT8 tms1k_base_device::read_k_input()
|
||||
{
|
||||
// K1,2,4,8 (KC test pin is not emulated)
|
||||
return m_read_k(0, 0xff) & 0xf;
|
||||
}
|
||||
|
||||
void tms1k_base_device::set_cki_bus()
|
||||
{
|
||||
switch (m_opcode & 0xf8)
|
||||
{
|
||||
// 00001XXX: K-inputs
|
||||
case 0x08:
|
||||
m_cki_bus = read_k_input();
|
||||
break;
|
||||
|
||||
// 0011XXXX: select bit
|
||||
case 0x30: case 0x38:
|
||||
m_cki_bus = 1 << (m_c4 >> 2) ^ 0xf;
|
||||
break;
|
||||
|
||||
// 01XXXXXX: constant
|
||||
case 0x00: // R2,3,4 are NANDed with eachother, and then ORed with R1, making 00000XXX valid too
|
||||
case 0x40: case 0x48: case 0x50: case 0x58: case 0x60: case 0x68: case 0x70: case 0x78:
|
||||
m_cki_bus = m_c4;
|
||||
break;
|
||||
|
||||
default:
|
||||
m_cki_bus = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// fixed opcode set
|
||||
//-------------------------------------------------
|
||||
|
||||
// handle branches:
|
||||
|
||||
// TMS1000/common
|
||||
// note: add(latch) and bl(branch latch) are specific to 0980 series,
|
||||
// c(chapter) bits are specific to 1100(and 1400) series
|
||||
|
||||
void tms1k_base_device::op_br()
|
||||
{
|
||||
// BR/BL: conditional branch
|
||||
if (m_status)
|
||||
{
|
||||
if (m_clatch == 0)
|
||||
m_pa = m_pb;
|
||||
m_ca = m_cb;
|
||||
m_pc = m_opcode & m_pc_mask;
|
||||
}
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_call()
|
||||
{
|
||||
// CALL/CALLL: conditional call
|
||||
if (m_status)
|
||||
{
|
||||
UINT8 prev_pa = m_pa;
|
||||
|
||||
if (m_clatch == 0)
|
||||
{
|
||||
m_clatch = 1;
|
||||
m_sr = m_pc;
|
||||
m_pa = m_pb;
|
||||
m_cs = m_ca;
|
||||
}
|
||||
m_ca = m_cb;
|
||||
m_pb = prev_pa;
|
||||
m_pc = m_opcode & m_pc_mask;
|
||||
}
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_retn()
|
||||
{
|
||||
// RETN: return from subroutine
|
||||
if (m_clatch == 1)
|
||||
{
|
||||
m_clatch = 0;
|
||||
m_pc = m_sr;
|
||||
m_ca = m_cs;
|
||||
}
|
||||
m_add = 0;
|
||||
m_bl = 0;
|
||||
m_pa = m_pb;
|
||||
}
|
||||
|
||||
|
||||
// handle other:
|
||||
|
||||
// TMS1000/common
|
||||
|
||||
void tms1k_base_device::op_sbit()
|
||||
{
|
||||
// SBIT: set memory bit
|
||||
if (m_ram_out == -1)
|
||||
m_ram_out = m_ram_in;
|
||||
m_ram_out |= (m_cki_bus ^ 0xf);
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_rbit()
|
||||
{
|
||||
// RBIT: reset memory bit
|
||||
if (m_ram_out == -1)
|
||||
m_ram_out = m_ram_in;
|
||||
m_ram_out &= m_cki_bus;
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_setr()
|
||||
{
|
||||
// SETR: set one R-output line
|
||||
m_r = m_r | (1 << m_y);
|
||||
m_write_r(0, m_r & m_r_mask, 0xffff);
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_rstr()
|
||||
{
|
||||
// RSTR: reset one R-output line
|
||||
m_r = m_r & ~(1 << m_y);
|
||||
m_write_r(0, m_r & m_r_mask, 0xffff);
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_tdo()
|
||||
{
|
||||
// TDO: transfer accumulator and status latch to O-output
|
||||
write_o_output(m_status_latch << 4 | m_a);
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_clo()
|
||||
{
|
||||
// CLO: clear O-output
|
||||
write_o_output(0);
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_ldx()
|
||||
{
|
||||
// LDX: load X register with (x_bits) constant
|
||||
m_x = m_c4 >> (4-m_x_bits);
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_comx()
|
||||
{
|
||||
// COMX: complement X register
|
||||
m_x ^= m_x_mask;
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_comx8()
|
||||
{
|
||||
// COMX8: complement MSB of X register
|
||||
// note: on TMS1100, the mnemonic is simply called "COMX"
|
||||
m_x ^= 1 << (m_x_bits-1);
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_ldp()
|
||||
{
|
||||
// LDP: load page buffer with constant
|
||||
m_pb = m_c4;
|
||||
}
|
||||
|
||||
|
||||
// TMS1100-specific
|
||||
|
||||
void tms1k_base_device::op_comc()
|
||||
{
|
||||
// COMC: complement chapter buffer
|
||||
m_cb ^= 1;
|
||||
}
|
||||
|
||||
|
||||
// TMS1400-specific
|
||||
|
||||
void tms1k_base_device::op_tpc()
|
||||
{
|
||||
// TPC: transfer page buffer to chapter buffer
|
||||
m_cb = m_pb & 3;
|
||||
}
|
||||
|
||||
|
||||
// TMS0980-specific (and possibly child classes)
|
||||
|
||||
void tms1k_base_device::op_xda()
|
||||
{
|
||||
// XDA: exchange DAM and A
|
||||
// note: setting A to DAM is done with DMTP and AUTA during this instruction
|
||||
m_ram_address |= (0x10 << (m_x_bits-1));
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_off()
|
||||
{
|
||||
// OFF: request auto power-off
|
||||
m_power_off(1);
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_seac()
|
||||
{
|
||||
// SEAC: set end around carry
|
||||
m_eac = 1;
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_reac()
|
||||
{
|
||||
// REAC: reset end around carry
|
||||
m_eac = 0;
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_sal()
|
||||
{
|
||||
// SAL: set add latch (reset is done with RETN)
|
||||
m_add = 1;
|
||||
}
|
||||
|
||||
void tms1k_base_device::op_sbl()
|
||||
{
|
||||
// SBL: set branch latch (reset is done with RETN)
|
||||
m_bl = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// execute_run
|
||||
//-------------------------------------------------
|
||||
|
||||
void tms1k_base_device::execute_run()
|
||||
{
|
||||
do
|
||||
{
|
||||
m_icount--;
|
||||
switch (m_subcycle)
|
||||
{
|
||||
case 0:
|
||||
// fetch: rom address 1/2
|
||||
|
||||
// execute: br/call 2/2
|
||||
if (m_fixed & F_BR) op_br();
|
||||
if (m_fixed & F_CALL) op_call();
|
||||
if (m_fixed & F_RETN) op_retn();
|
||||
|
||||
// execute: k input valid, read ram, clear alu inputs
|
||||
dynamic_output();
|
||||
set_cki_bus();
|
||||
m_ram_in = m_data->read_byte(m_ram_address) & 0xf;
|
||||
m_dam_in = m_data->read_byte(m_ram_address | (0x10 << (m_x_bits-1))) & 0xf;
|
||||
m_p = 0;
|
||||
m_n = 0;
|
||||
m_carry_in = 0;
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
// fetch: rom address 2/2
|
||||
m_rom_address = (m_ca << (m_pc_bits+4)) | (m_pa << m_pc_bits) | m_pc;
|
||||
|
||||
// execute: update alu inputs
|
||||
// N inputs
|
||||
if (m_micro & M_15TN) m_n |= 0xf;
|
||||
if (m_micro & M_ATN) m_n |= m_a;
|
||||
if (m_micro & M_NATN) m_n |= (~m_a & 0xf);
|
||||
if (m_micro & M_CKN) m_n |= m_cki_bus;
|
||||
if (m_micro & M_MTN) m_n |= m_ram_in;
|
||||
|
||||
// P inputs
|
||||
if (m_micro & M_CKP) m_p |= m_cki_bus;
|
||||
if (m_micro & M_MTP) m_p |= m_ram_in;
|
||||
if (m_micro & M_YTP) m_p |= m_y;
|
||||
if (m_micro & M_DMTP) m_p |= m_dam_in;
|
||||
if (m_micro & M_NDMTP) m_p |= (~m_dam_in & 0xf);
|
||||
|
||||
// carry input
|
||||
if (m_micro & M_CIN) m_carry_in |= 1;
|
||||
if (m_micro & M_SSS) m_carry_in |= m_eac;
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
{
|
||||
// fetch: nothing
|
||||
|
||||
// execute: perform alu logic
|
||||
// note: officially, only 1 alu operation is allowed per opcode
|
||||
m_adder_out = m_p + m_n + m_carry_in;
|
||||
int carry_out = m_adder_out >> 4 & 1;
|
||||
int status = 1;
|
||||
m_ram_out = -1;
|
||||
|
||||
if (m_micro & M_C8) status &= carry_out;
|
||||
if (m_micro & M_NE) status &= (m_n != m_p); // COMP
|
||||
if (m_micro & M_CKM) m_ram_out = m_cki_bus;
|
||||
|
||||
// special status circuit
|
||||
if (m_micro & M_SSE)
|
||||
{
|
||||
m_eac = m_carry_out;
|
||||
if (m_add)
|
||||
m_eac |= carry_out;
|
||||
}
|
||||
m_carry_out = carry_out;
|
||||
|
||||
if (m_micro & M_STO || (m_micro & M_CME && m_eac == m_add))
|
||||
m_ram_out = m_a;
|
||||
|
||||
// handle the other fixed opcodes here
|
||||
if (m_fixed & F_SBIT) op_sbit();
|
||||
if (m_fixed & F_RBIT) op_rbit();
|
||||
if (m_fixed & F_SETR) op_setr();
|
||||
if (m_fixed & F_RSTR) op_rstr();
|
||||
if (m_fixed & F_TDO) op_tdo();
|
||||
if (m_fixed & F_CLO) op_clo();
|
||||
if (m_fixed & F_LDX) op_ldx();
|
||||
if (m_fixed & F_COMX) op_comx();
|
||||
if (m_fixed & F_COMX8) op_comx8();
|
||||
if (m_fixed & F_LDP) op_ldp();
|
||||
if (m_fixed & F_COMC) op_comc();
|
||||
if (m_fixed & F_TPC) op_tpc();
|
||||
if (m_fixed & F_OFF) op_off();
|
||||
if (m_fixed & F_SEAC) op_seac();
|
||||
if (m_fixed & F_REAC) op_reac();
|
||||
if (m_fixed & F_SAL) op_sal();
|
||||
if (m_fixed & F_SBL) op_sbl();
|
||||
if (m_fixed & F_XDA) op_xda();
|
||||
|
||||
// after fixed opcode handling: store status, write ram
|
||||
m_status = status;
|
||||
if (m_ram_out != -1)
|
||||
m_data->write_byte(m_ram_address, m_ram_out);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 3:
|
||||
// fetch: update pc, ram address 1/2
|
||||
// execute: register store 1/2
|
||||
break;
|
||||
|
||||
case 4:
|
||||
// execute: register store 2/2
|
||||
if (m_micro & M_AUTA) m_a = m_adder_out & 0xf;
|
||||
if (m_micro & M_AUTY) m_y = m_adder_out & 0xf;
|
||||
if (m_micro & M_STSL) m_status_latch = m_status;
|
||||
|
||||
// fetch: update pc, ram address 2/2
|
||||
read_opcode();
|
||||
m_ram_address = m_x << 4 | m_y;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
// fetch: instruction decode (handled above, before next_pc)
|
||||
// execute: br/call 1/2
|
||||
break;
|
||||
}
|
||||
m_subcycle = (m_subcycle + 1) % 6;
|
||||
} while (m_icount > 0);
|
||||
}
|
299
src/devices/cpu/tms1000/tms1k_base.h
Normal file
299
src/devices/cpu/tms1000/tms1k_base.h
Normal file
@ -0,0 +1,299 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Wilbert Pol, hap
|
||||
/*
|
||||
|
||||
TMS1000 family - base/shared
|
||||
|
||||
Don't include this file, include the specific device header instead,
|
||||
for example tms1000.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _TMS1KBASE_H_
|
||||
#define _TMS1KBASE_H_
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/pla.h"
|
||||
|
||||
|
||||
// K input pins
|
||||
#define MCFG_TMS1XXX_READ_K_CB(_devcb) \
|
||||
tms1k_base_device::set_read_k_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
// O/Segment output pins
|
||||
#define MCFG_TMS1XXX_WRITE_O_CB(_devcb) \
|
||||
tms1k_base_device::set_write_o_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
// Use this if the output PLA is unknown:
|
||||
// If the microinstructions (or other) PLA is unknown, try using one from another romset.
|
||||
#define MCFG_TMS1XXX_OUTPUT_PLA(_pla) \
|
||||
tms1k_base_device::set_output_pla(*device, _pla);
|
||||
|
||||
// R output pins (also called D on some chips)
|
||||
#define MCFG_TMS1XXX_WRITE_R_CB(_devcb) \
|
||||
tms1k_base_device::set_write_r_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
// OFF request on TMS0980 and up
|
||||
#define MCFG_TMS1XXX_POWER_OFF_CB(_devcb) \
|
||||
tms1k_base_device::set_power_off_callback(*device, DEVCB_##_devcb);
|
||||
|
||||
|
||||
// pinout reference
|
||||
|
||||
/*
|
||||
|
||||
____ ____ ____ ____
|
||||
R8 1 |* \_/ | 28 R7 R0 1 |* \_/ | 28 Vss
|
||||
R9 2 | | 27 R6 R1 2 | | 27 OSC2
|
||||
R10 3 | | 26 R5 R2 3 | | 26 OSC1
|
||||
Vdd 4 | | 25 R4 R3 4 | | 25 O0
|
||||
K1 5 | | 24 R3 R4 5 | | 24 O1
|
||||
K2 6 | TMS1000 | 23 R2 R5 6 | | 23 O2
|
||||
K4 7 | TMS1070 | 22 R1 R6 7 | TMS1400 | 22 O3
|
||||
K8 8 | TMS1100 | 21 R0 R7 8 | | 21 O4
|
||||
INIT 9 | TMS1170 | 20 Vss R8 9 | | 20 O5
|
||||
O7 10 | | 19 OSC2 R9 10 | | 19 O6
|
||||
O6 11 | | 18 OSC1 R10 11 | | 18 O7
|
||||
O5 12 | | 17 O0 Vdd 12 | | 17 K8
|
||||
O4 13 | | 16 O1 INIT 13 | | 16 K4
|
||||
O3 14 |___________| 15 O2 K1 14 |___________| 15 K2
|
||||
|
||||
|
||||
____ ____
|
||||
R2 1 |* \_/ | 28 R3
|
||||
R1 2 | | 27 R4
|
||||
R0 3 | | 26 R5
|
||||
? 4 | | 25 R6
|
||||
Vdd 5 | | 24 R7
|
||||
K3 6 | | 23 R8
|
||||
K8 7 | TMS0980 | 22 ?
|
||||
K4 8 | | 21 ?
|
||||
K2 9 | | 20 Vss
|
||||
K1 10 | | 19 ?
|
||||
O7 11 | | 18 O0
|
||||
O6 12 | | 17 O1
|
||||
O5 13 | | 16 O2
|
||||
O4 14 |___________| 15 O3
|
||||
|
||||
note: TMS0980 official pin names for R0-R8 is D9-D1, O0-O7 is S(A-G,DP)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
class tms1k_base_device : public cpu_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
tms1k_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
|
||||
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, source)
|
||||
, m_program_config("program", ENDIANNESS_BIG, byte_bits > 8 ? 16 : 8, prgwidth, 0, program)
|
||||
, m_data_config("data", ENDIANNESS_BIG, 8, datawidth, 0, data)
|
||||
, m_mpla(*this, "mpla")
|
||||
, m_ipla(*this, "ipla")
|
||||
, m_opla(*this, "opla")
|
||||
, m_spla(*this, "spla")
|
||||
, m_o_pins(o_pins)
|
||||
, m_r_pins(r_pins)
|
||||
, m_pc_bits(pc_bits)
|
||||
, m_byte_bits(byte_bits)
|
||||
, m_x_bits(x_bits)
|
||||
, m_output_pla_table(nullptr)
|
||||
, m_read_k(*this)
|
||||
, m_write_o(*this)
|
||||
, m_write_r(*this)
|
||||
, m_power_off(*this)
|
||||
{ }
|
||||
|
||||
// static configuration helpers
|
||||
template<class _Object> static devcb_base &set_read_k_callback(device_t &device, _Object object) { return downcast<tms1k_base_device &>(device).m_read_k.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_write_o_callback(device_t &device, _Object object) { return downcast<tms1k_base_device &>(device).m_write_o.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_write_r_callback(device_t &device, _Object object) { return downcast<tms1k_base_device &>(device).m_write_r.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_power_off_callback(device_t &device, _Object object) { return downcast<tms1k_base_device &>(device).m_power_off.set_callback(object); }
|
||||
static void set_output_pla(device_t &device, const UINT16 *output_pla) { downcast<tms1k_base_device &>(device).m_output_pla_table = output_pla; }
|
||||
|
||||
// microinstructions
|
||||
enum
|
||||
{
|
||||
M_15TN = (1<<0), /* 15 to -ALU */
|
||||
M_ATN = (1<<1), /* ACC to -ALU */
|
||||
M_AUTA = (1<<2), /* ALU to ACC */
|
||||
M_AUTY = (1<<3), /* ALU to Y */
|
||||
M_C8 = (1<<4), /* CARRY8 to STATUS */
|
||||
M_CIN = (1<<5), /* Carry In to ALU */
|
||||
M_CKM = (1<<6), /* CKB to MEM */
|
||||
M_CKN = (1<<7), /* CKB to -ALU */
|
||||
M_CKP = (1<<8), /* CKB to +ALU */
|
||||
M_MTN = (1<<9), /* MEM to -ALU */
|
||||
M_MTP = (1<<10), /* MEM to +ALU */
|
||||
M_NATN = (1<<11), /* ~ACC to -ALU */
|
||||
M_NE = (1<<12), /* COMP to STATUS */
|
||||
M_STO = (1<<13), /* ACC to MEM */
|
||||
M_STSL = (1<<14), /* STATUS to Status Latch */
|
||||
M_YTP = (1<<15), /* Y to +ALU */
|
||||
|
||||
M_CME = (1<<16), /* Conditional Memory Enable */
|
||||
M_DMTP = (1<<17), /* DAM to +ALU */
|
||||
M_NDMTP = (1<<18), /* ~DAM to +ALU */
|
||||
M_SSE = (1<<19), /* Special Status Enable */
|
||||
M_SSS = (1<<20), /* Special Status Sample */
|
||||
|
||||
M_SETR = (1<<21), /* -> line #0d, F_SETR (TP0320 custom), */
|
||||
M_RSTR = (1<<22), /* -> line #36, F_RSTR (TMS02x0 custom), */
|
||||
M_UNK1 = (1<<23) /* -> line #37, F_???? (TMS0270 custom), */
|
||||
};
|
||||
|
||||
// standard/fixed instructions - these are documented more in their specific handlers
|
||||
enum
|
||||
{
|
||||
F_BR = (1<<0),
|
||||
F_CALL = (1<<1),
|
||||
F_CLO = (1<<2),
|
||||
F_COMC = (1<<3),
|
||||
F_COMX = (1<<4),
|
||||
F_COMX8 = (1<<5),
|
||||
F_LDP = (1<<6),
|
||||
F_LDX = (1<<7),
|
||||
F_RBIT = (1<<8),
|
||||
F_RETN = (1<<9),
|
||||
F_RSTR = (1<<10),
|
||||
F_SBIT = (1<<11),
|
||||
F_SETR = (1<<12),
|
||||
F_TDO = (1<<13),
|
||||
F_TPC = (1<<14),
|
||||
|
||||
F_OFF = (1<<15),
|
||||
F_REAC = (1<<16),
|
||||
F_SAL = (1<<17),
|
||||
F_SBL = (1<<18),
|
||||
F_SEAC = (1<<19),
|
||||
F_XDA = (1<<20)
|
||||
};
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
// device_execute_interface overrides
|
||||
virtual UINT32 execute_min_cycles() const override { return 1; }
|
||||
virtual UINT32 execute_max_cycles() const override { return 6; }
|
||||
virtual UINT32 execute_input_lines() const override { return 1; }
|
||||
virtual void execute_run() override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
|
||||
virtual UINT32 disasm_max_opcode_bytes() const override { return 1; }
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
|
||||
void next_pc();
|
||||
|
||||
virtual void write_o_output(UINT8 index);
|
||||
virtual UINT8 read_k_input();
|
||||
virtual void set_cki_bus();
|
||||
virtual void dynamic_output() { ; } // not used by default
|
||||
virtual void read_opcode();
|
||||
|
||||
virtual void op_br();
|
||||
virtual void op_call();
|
||||
virtual void op_retn();
|
||||
|
||||
virtual void op_sbit();
|
||||
virtual void op_rbit();
|
||||
virtual void op_setr();
|
||||
virtual void op_rstr();
|
||||
virtual void op_tdo();
|
||||
virtual void op_clo();
|
||||
virtual void op_ldx();
|
||||
virtual void op_comx();
|
||||
virtual void op_comx8();
|
||||
virtual void op_ldp();
|
||||
|
||||
virtual void op_comc();
|
||||
virtual void op_tpc();
|
||||
virtual void op_xda();
|
||||
virtual void op_off();
|
||||
virtual void op_seac();
|
||||
virtual void op_reac();
|
||||
virtual void op_sal();
|
||||
virtual void op_sbl();
|
||||
|
||||
address_space_config m_program_config;
|
||||
address_space_config m_data_config;
|
||||
|
||||
optional_device<pla_device> m_mpla;
|
||||
optional_device<pla_device> m_ipla;
|
||||
optional_device<pla_device> m_opla;
|
||||
optional_device<pla_device> m_spla;
|
||||
|
||||
UINT8 m_pc; // 6 or 7-bit program counter
|
||||
UINT32 m_sr; // 6 or 7-bit subroutine return register(s)
|
||||
UINT8 m_pa; // 4-bit page address register
|
||||
UINT8 m_pb; // 4-bit page buffer register
|
||||
UINT16 m_ps; // 4-bit page subroutine register(s)
|
||||
UINT8 m_a; // 4-bit accumulator
|
||||
UINT8 m_x; // 2,3,or 4-bit RAM X register
|
||||
UINT8 m_y; // 4-bit RAM Y register
|
||||
UINT8 m_ca; // chapter address register
|
||||
UINT8 m_cb; // chapter buffer register
|
||||
UINT16 m_cs; // chapter subroutine register(s)
|
||||
UINT16 m_r;
|
||||
UINT16 m_o;
|
||||
UINT8 m_cki_bus;
|
||||
UINT8 m_c4;
|
||||
UINT8 m_p; // 4-bit adder p(lus)-input
|
||||
UINT8 m_n; // 4-bit adder n(egative)-input
|
||||
UINT8 m_adder_out; // adder result
|
||||
UINT8 m_carry_in; // adder carry-in bit
|
||||
UINT8 m_carry_out; // adder carry-out bit
|
||||
UINT8 m_status;
|
||||
UINT8 m_status_latch;
|
||||
UINT8 m_eac; // end around carry bit
|
||||
UINT8 m_clatch; // call latch bit(s)
|
||||
UINT8 m_add; // add latch bit
|
||||
UINT8 m_bl; // branch latch bit
|
||||
|
||||
UINT8 m_ram_in;
|
||||
UINT8 m_dam_in;
|
||||
int m_ram_out; // signed!
|
||||
UINT8 m_ram_address;
|
||||
UINT16 m_rom_address;
|
||||
UINT16 m_opcode;
|
||||
UINT32 m_fixed;
|
||||
UINT32 m_micro;
|
||||
int m_subcycle;
|
||||
int m_icount;
|
||||
|
||||
UINT8 m_o_pins; // how many O pins
|
||||
UINT8 m_r_pins; // how many R pins
|
||||
UINT8 m_pc_bits; // how many program counter bits
|
||||
UINT8 m_byte_bits; // how many bits per 'byte'
|
||||
UINT8 m_x_bits; // how many X register bits
|
||||
|
||||
address_space *m_program;
|
||||
address_space *m_data;
|
||||
|
||||
const UINT16 *m_output_pla_table;
|
||||
devcb_read8 m_read_k;
|
||||
devcb_write16 m_write_o;
|
||||
devcb_write16 m_write_r;
|
||||
devcb_write_line m_power_off;
|
||||
|
||||
UINT32 m_o_mask;
|
||||
UINT32 m_r_mask;
|
||||
UINT32 m_k_mask;
|
||||
UINT32 m_pc_mask;
|
||||
UINT32 m_x_mask;
|
||||
|
||||
// lookup tables
|
||||
std::vector<UINT32> m_fixed_decode;
|
||||
std::vector<UINT32> m_micro_decode;
|
||||
std::vector<UINT32> m_micro_direct;
|
||||
};
|
||||
|
||||
|
||||
#endif /* _TMS1KBASE_H_ */
|
281
src/devices/cpu/tms1000/tms1k_dasm.cpp
Normal file
281
src/devices/cpu/tms1000/tms1k_dasm.cpp
Normal file
@ -0,0 +1,281 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Wilbert Pol, hap
|
||||
/*
|
||||
|
||||
TMS0980/TMS1000-family disassembler
|
||||
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "debugger.h"
|
||||
#include "tms1k_base.h"
|
||||
|
||||
|
||||
enum e_mnemonics
|
||||
{
|
||||
zILL = 0,
|
||||
zA10AAC, zA6AAC, zA8AAC, zAC1AC, zACACC, zACNAA, zALEC, zALEM, zAMAAC, zBRANCH, zCALL, zCCLA,
|
||||
zCLA, zCLO, zCOMC, zCOMX, zCOMX8, zCPAIZ, zCTMDYN, zDAN, zDMAN, zDMEA, zDNAA,
|
||||
zDYN, zIA, zIMAC, zIYC, zKNEZ, zLDP, zLDX2, zLDX3, zLDX4, zMNEA, zMNEZ,
|
||||
zNDMEA, zOFF, zRBIT, zREAC, zRETN, zRSTR, zSAL, zSAMAN, zSBIT,
|
||||
zSBL, zSEAC, zSETR, zTAM, zTAMACS, zTAMDYN, zTAMIY, zTAMIYC, zTAMZA,
|
||||
zTAY, zTBIT, zTCMIY, zTCY, zTDO, zTKA, zTKM, zTMA,
|
||||
zTMY, zTYA, zXDA, zXMA, zYMCY, zYNEA, zYNEC
|
||||
};
|
||||
|
||||
static const char *const s_mnemonic[] =
|
||||
{
|
||||
"?",
|
||||
"A10AAC", "A6AAC", "A8AAC", "AC1AC", "ACACC", "ACNAA", "ALEC", "ALEM", "AMAAC", "BRANCH", "CALL", "CCLA",
|
||||
"CLA", "CLO", "COMC", "COMX", "COMX8", "CPAIZ", "CTMDYN", "DAN", "DMAN", "DMEA", "DNAA",
|
||||
"DYN", "IA", "IMAC", "IYC", "KNEZ", "LDP", "LDX", "LDX", "LDX", "MNEA", "MNEZ",
|
||||
"NDMEA", "OFF", "RBIT", "REAC", "RETN", "RSTR", "SAL", "SAMAN", "SBIT",
|
||||
"SBL", "SEAC", "SETR", "TAM", "TAMACS", "TAMDYN", "TAMIY", "TAMIYC", "TAMZA",
|
||||
"TAY", "TBIT", "TCMIY", "TCY", "TDO", "TKA", "TKM", "TMA",
|
||||
"TMY", "TYA", "XDA", "XMA", "YMCY", "YNEA", "YNEC"
|
||||
};
|
||||
|
||||
|
||||
#define _OVER DASMFLAG_STEP_OVER
|
||||
#define _OUT DASMFLAG_STEP_OUT
|
||||
|
||||
static const UINT32 s_flags[] =
|
||||
{
|
||||
0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _OVER, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, _OUT, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
|
||||
enum e_addressing
|
||||
{
|
||||
zB0 = 0, zI2, zI3, zI4, zB7
|
||||
};
|
||||
|
||||
static const UINT8 s_addressing[] =
|
||||
{
|
||||
zB0,
|
||||
zB0, zB0, zB0, zI4, zI4, zI4, zI4, zB0, zB0, zB7, zB7, zB0,
|
||||
zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0,
|
||||
zB0, zB0, zB0, zB0, zB0, zI4, zI2, zI3, zI4, zB0, zB0,
|
||||
zB0, zB0, zI2, zB0, zB0, zB0, zB0, zB0, zI2,
|
||||
zB0, zB0, zB0, zB0, zI4, zB0, zB0, zB0, zB0,
|
||||
zB0, zI2, zI4, zI4, zB0, zB0, zB0, zB0,
|
||||
zB0, zB0, zB0, zB0, zI4, zB0, zI4
|
||||
};
|
||||
|
||||
|
||||
|
||||
// opcode luts
|
||||
|
||||
static const UINT8 tms1000_mnemonic[256] =
|
||||
{
|
||||
/* 0x00 */
|
||||
zCOMX, zA8AAC, zYNEA, zTAM, zTAMZA, zA10AAC, zA6AAC, zDAN, zTKA, zKNEZ, zTDO, zCLO, zRSTR, zSETR, zIA, zRETN, // 0
|
||||
zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, // 1
|
||||
zTAMIY, zTMA, zTMY, zTYA, zTAY, zAMAAC, zMNEZ, zSAMAN, zIMAC, zALEM, zDMAN, zIYC, zDYN, zCPAIZ, zXMA, zCLA, // 2
|
||||
zSBIT, zSBIT, zSBIT, zSBIT, zRBIT, zRBIT, zRBIT, zRBIT, zTBIT, zTBIT, zTBIT, zTBIT, zLDX2, zLDX2, zLDX2, zLDX2, // 3
|
||||
zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, // 4
|
||||
zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, // 5
|
||||
zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, // 6
|
||||
zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, // 7
|
||||
/* 0x80 */
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 8
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 9
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // A
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // B
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // C
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // D
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // E
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL // F
|
||||
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
|
||||
};
|
||||
|
||||
|
||||
static const UINT8 tms1100_mnemonic[256] =
|
||||
{
|
||||
/* 0x00 */
|
||||
zMNEA, zALEM, zYNEA, zXMA, zDYN, zIYC, zAMAAC, zDMAN, zTKA, zCOMX, zTDO, zCOMC, zRSTR, zSETR, zKNEZ, zRETN, // 0
|
||||
zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, // 1
|
||||
zTAY, zTMA, zTMY, zTYA, zTAMDYN, zTAMIYC, zTAMZA, zTAM, zLDX3, zLDX3, zLDX3, zLDX3, zLDX3, zLDX3, zLDX3, zLDX3, // 2
|
||||
zSBIT, zSBIT, zSBIT, zSBIT, zRBIT, zRBIT, zRBIT, zRBIT, zTBIT, zTBIT, zTBIT, zTBIT, zSAMAN, zCPAIZ, zIMAC, zMNEZ, // 3
|
||||
zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, // 4
|
||||
zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, // 5
|
||||
zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, // 6
|
||||
zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zAC1AC, zCLA, // 7
|
||||
/* 0x80 */
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 8
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 9
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // A
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // B
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // C
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // D
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // E
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL // F
|
||||
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
|
||||
};
|
||||
|
||||
|
||||
static const UINT8 tms0980_mnemonic[512] =
|
||||
{
|
||||
/* 0x000 */
|
||||
zCOMX, zALEM, zYNEA, zXMA, zDYN, zIYC, zCLA, zDMAN, zTKA, zMNEA, zTKM, 0, 0, zSETR, zKNEZ, 0, // 0
|
||||
zDMEA, zDNAA, zCCLA, zNDMEA, 0, zAMAAC, 0, 0, zCTMDYN, zXDA, 0, 0, 0, 0, 0, 0, // 1
|
||||
zTBIT, zTBIT, zTBIT, zTBIT, 0, 0, 0, 0, zTAY, zTMA, zTMY, zTYA, zTAMDYN, zTAMIYC, zTAMZA, zTAM, // 2
|
||||
zSAMAN, zCPAIZ, zIMAC, zMNEZ, 0, 0, 0, 0, zTCY, zYNEC, zTCMIY, zACACC, zACNAA, zTAMACS, zALEC, zYMCY, // 3
|
||||
zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, // 4
|
||||
zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, // 5
|
||||
zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, // 6
|
||||
zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, // 7
|
||||
/* 0x080 */
|
||||
zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, // 8
|
||||
zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, // 9
|
||||
zSBIT, zSBIT, zSBIT, zSBIT, zRBIT, zRBIT, zRBIT, zRBIT, 0, 0, 0, 0, 0, 0, 0, 0, // A
|
||||
zTDO, zSAL, zCOMX8, zSBL, zREAC, zSEAC, zOFF, 0, 0, 0, 0, 0, 0, 0, 0, zRETN, // B
|
||||
zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, // C
|
||||
zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, // D
|
||||
zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, // E
|
||||
zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, // F
|
||||
/* 0x100 */
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 0
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 1
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 2
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 3
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 4
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 5
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 6
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 7
|
||||
/* 0x180 */
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // 8
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // 9
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // A
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // B
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // C
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // D
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // E
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL // F
|
||||
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
|
||||
};
|
||||
|
||||
|
||||
static const UINT8 tp0320_mnemonic[512] =
|
||||
{
|
||||
/* 0x000 */
|
||||
0, zALEM, zYNEA, zXMA, zDYN, zIYC, zCLA, zDMAN, zTKA, zMNEA, zTKM, 0, 0, zSETR, zKNEZ, 0, // 0
|
||||
zDMEA, zDNAA, zCCLA, zNDMEA, 0, zAMAAC, 0, 0, zCTMDYN, zXDA, 0, 0, 0, 0, 0, 0, // 1
|
||||
zTBIT, zTBIT, zTBIT, zTBIT, 0, 0, 0, 0, zTAY, zTMA, zTMY, zTYA, zTAMDYN, zTAMIYC, zTAMZA, zTAM, // 2
|
||||
zSAMAN, zCPAIZ, zIMAC, zMNEZ, 0, 0, zRSTR, zYMCY, zTCY, zYNEC, zTCMIY, zACACC, zACNAA, zTAMACS, zALEC, 0, // 3
|
||||
zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, zTCY, // 4
|
||||
zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, zYNEC, // 5
|
||||
zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, zTCMIY, // 6
|
||||
zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, zACACC, // 7
|
||||
/* 0x080 */
|
||||
zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, zLDP, // 8
|
||||
zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, zLDX4, // 9
|
||||
zSBIT, zSBIT, zSBIT, zSBIT, zRBIT, zRBIT, zRBIT, zRBIT, 0, 0, 0, 0, 0, 0, 0, 0, // A
|
||||
zTDO, zSAL, zCOMX8, zSBL, zREAC, zSEAC, zOFF, 0, 0, 0, 0, 0, 0, 0, 0, zRETN, // B
|
||||
zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, zACNAA, // C
|
||||
zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, zTAMACS, // D
|
||||
zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, zALEC, // E
|
||||
zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, zYMCY, // F
|
||||
/* 0x100 */
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 0
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 1
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 2
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 3
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 4
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 5
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 6
|
||||
zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, zBRANCH, // 7
|
||||
/* 0x180 */
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // 8
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // 9
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // A
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // B
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // C
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // D
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, // E
|
||||
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL // F
|
||||
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
|
||||
};
|
||||
|
||||
|
||||
|
||||
// disasm
|
||||
|
||||
static const UINT8 i2_value[4] =
|
||||
{
|
||||
0, 2, 1, 3
|
||||
};
|
||||
|
||||
static const UINT8 i3_value[8] =
|
||||
{
|
||||
0, 4, 2, 6, 1, 5, 3, 7
|
||||
};
|
||||
|
||||
static const UINT8 i4_value[16] =
|
||||
{
|
||||
0x0, 0x8, 0x4, 0xc, 0x2, 0xa, 0x6, 0xe, 0x1, 0x9, 0x5, 0xd, 0x3, 0xb, 0x7, 0xf
|
||||
};
|
||||
|
||||
static offs_t tms1k_dasm(char *dst, const UINT8 *oprom, const UINT8 *lut_mnemonic, UINT16 opcode_mask)
|
||||
{
|
||||
// get current opcode
|
||||
int pos = 0;
|
||||
UINT16 op = oprom[pos++];
|
||||
if (opcode_mask & 0x100)
|
||||
op = (op << 8 | oprom[pos++]) & 0x1ff;
|
||||
|
||||
// convert to mnemonic/param
|
||||
UINT16 instr = lut_mnemonic[op];
|
||||
dst += sprintf(dst, "%-8s ", s_mnemonic[instr]);
|
||||
|
||||
switch( s_addressing[instr] )
|
||||
{
|
||||
case zI2:
|
||||
dst += sprintf(dst, "%d", i2_value[op & 0x03]);
|
||||
break;
|
||||
case zI3:
|
||||
dst += sprintf(dst, "%d", i3_value[op & 0x07]);
|
||||
break;
|
||||
case zI4:
|
||||
dst += sprintf(dst, "%d", i4_value[op & 0x0f]);
|
||||
break;
|
||||
case zB7:
|
||||
if (opcode_mask & 0x100)
|
||||
dst += sprintf(dst, "$%02X", op << 1 & 0xfe);
|
||||
else
|
||||
dst += sprintf(dst, "$%02X", op & 0x3f);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return pos | s_flags[instr] | DASMFLAG_SUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
CPU_DISASSEMBLE(tms1000)
|
||||
{
|
||||
return tms1k_dasm(buffer, oprom, tms1000_mnemonic, 0xff);
|
||||
}
|
||||
|
||||
CPU_DISASSEMBLE(tms1100)
|
||||
{
|
||||
return tms1k_dasm(buffer, oprom, tms1100_mnemonic, 0xff);
|
||||
}
|
||||
|
||||
CPU_DISASSEMBLE(tms0980)
|
||||
{
|
||||
return tms1k_dasm(buffer, oprom, tms0980_mnemonic, 0x1ff);
|
||||
}
|
||||
|
||||
CPU_DISASSEMBLE(tp0320)
|
||||
{
|
||||
return tms1k_dasm(buffer, oprom, tp0320_mnemonic, 0x1ff);
|
||||
}
|
46
src/devices/cpu/tms1000/tp0320.cpp
Normal file
46
src/devices/cpu/tms1000/tp0320.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
TMS1000 family - TP0320
|
||||
|
||||
*/
|
||||
|
||||
#include "tp0320.h"
|
||||
#include "debugger.h"
|
||||
|
||||
// TP0320 is TI's first CMOS MCU with integrated LCD controller, the die is still very similar to TMS0980
|
||||
// - 2048x9bit ROM, same as on TMS0980 with different row-select
|
||||
// - 192x4bit RAM array at the bottom-left (set up as 16x12x4)
|
||||
// - 16x4bit LCD RAM, above main RAM array
|
||||
// - main instructions PLAs at the same position as TMS0980, fixed opcodes:
|
||||
// * LDP, RETN, OFF, bb?, be?, b9?, ba?, RBIT, SBIT, COMX8, bc?, LDX, XDA, TDO, SEAC, REAC, SAL, SBL
|
||||
// - 64-term microinstructions PLA between the RAM and ROM, similar to TMS0980,
|
||||
// plus separate lines for custom opcode handling like TMS0270, used for SETR and RSTR
|
||||
// - 24-term output PLA above LCD RAM
|
||||
const device_type TP0320 = &device_creator<tp0320_cpu_device>; // 28-pin SDIP, ..
|
||||
|
||||
|
||||
// internal memory maps
|
||||
static ADDRESS_MAP_START(program_11bit_9, AS_PROGRAM, 16, tms1k_base_device)
|
||||
AM_RANGE(0x000, 0xfff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START(data_192x4, AS_DATA, 8, tms1k_base_device)
|
||||
AM_RANGE(0x00, 0x7f) AM_RAM
|
||||
AM_RANGE(0x80, 0xbf) AM_RAM AM_MIRROR(0x40) // DAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
// device definitions
|
||||
tp0320_cpu_device::tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tms0980_cpu_device(mconfig, TP0320, "TP0320", tag, owner, clock, 7 /* o pins */, 10 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 12 /* prg width */, ADDRESS_MAP_NAME(program_11bit_9), 8 /* data width */, ADDRESS_MAP_NAME(data_192x4), "tp0320", __FILE__)
|
||||
{ }
|
||||
|
||||
|
||||
// disasm
|
||||
offs_t tp0320_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
|
||||
{
|
||||
extern CPU_DISASSEMBLE(tp0320);
|
||||
return CPU_DISASSEMBLE_NAME(tp0320)(this, buffer, pc, oprom, opram, options);
|
||||
}
|
32
src/devices/cpu/tms1000/tp0320.h
Normal file
32
src/devices/cpu/tms1000/tp0320.h
Normal file
@ -0,0 +1,32 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
TMS1000 family - TP0320
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _TP0320_H_
|
||||
#define _TP0320_H_
|
||||
|
||||
#include "tms0980.h"
|
||||
|
||||
|
||||
class tp0320_cpu_device : public tms0980_cpu_device
|
||||
{
|
||||
public:
|
||||
tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
protected:
|
||||
// overrides
|
||||
//virtual void device_start() override;
|
||||
//virtual void device_reset() override;
|
||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
|
||||
|
||||
//virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
};
|
||||
|
||||
|
||||
extern const device_type TP0320;
|
||||
|
||||
#endif /* _TP0320_H_ */
|
@ -72,11 +72,15 @@ void atapi_cdrom_device::device_start()
|
||||
|
||||
m_identify_buffer[ 49 ] = 0x0600; // Word 49=Capabilities, IORDY may be disabled (bit_10), LBA Supported mandatory (bit_9)
|
||||
|
||||
m_media_change = true;
|
||||
|
||||
atapi_hle_device::device_start();
|
||||
}
|
||||
|
||||
void atapi_cdrom_device::device_reset()
|
||||
{
|
||||
atapi_hle_device::device_reset();
|
||||
m_media_change = true;
|
||||
}
|
||||
|
||||
void atapi_cdrom_device::process_buffer()
|
||||
{
|
||||
if(m_cdrom != m_image->get_cdrom_file())
|
||||
@ -130,10 +134,10 @@ void atapi_cdrom_device::ExecCommand()
|
||||
}
|
||||
break;
|
||||
case T10SPC_CMD_INQUIRY:
|
||||
break;
|
||||
case T10SPC_CMD_REQUEST_SENSE:
|
||||
m_media_change = false;
|
||||
break;
|
||||
}
|
||||
t10mmc::ExecCommand();
|
||||
if((command[0] == T10SPC_CMD_REQUEST_SENSE) && m_media_change)
|
||||
m_media_change = false;
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ public:
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
virtual void perform_diagnostic() override;
|
||||
|
@ -224,6 +224,17 @@ TIMER_CALLBACK_MEMBER(vga_device::vblank_timer_cb)
|
||||
m_vblank_timer->adjust( machine().first_screen()->time_until_pos(vga.crtc.vert_blank_start + vga.crtc.vert_blank_end) );
|
||||
}
|
||||
|
||||
TIMER_CALLBACK_MEMBER(s3_vga_device::vblank_timer_cb)
|
||||
{
|
||||
// not sure if this is correct, but XF86_S3 seems to expect the viewport scrolling to be faster
|
||||
if(s3.memory_config & 0x08)
|
||||
vga.crtc.start_addr = vga.crtc.start_addr_latch << 2;
|
||||
else
|
||||
vga.crtc.start_addr = vga.crtc.start_addr_latch;
|
||||
vga.attribute.pel_shift = vga.attribute.pel_shift_latch;
|
||||
m_vblank_timer->adjust( machine().first_screen()->time_until_pos(vga.crtc.vert_blank_start + vga.crtc.vert_blank_end) );
|
||||
}
|
||||
|
||||
void vga_device::device_start()
|
||||
{
|
||||
zero();
|
||||
@ -1050,6 +1061,8 @@ UINT32 s3_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
|
||||
// for(x=0;x<64;x++)
|
||||
// printf("%08x: %02x %02x %02x %02x\n",src+x*4,vga.memory[src+x*4],vga.memory[src+x*4+1],vga.memory[src+x*4+2],vga.memory[src+x*4+3]);
|
||||
for(y=0;y<64;y++)
|
||||
{
|
||||
if(cy + y < cliprect.max_y && cx < cliprect.max_x)
|
||||
{
|
||||
dst = &bitmap.pix32(cy + y, cx);
|
||||
for(x=0;x<64;x++)
|
||||
@ -1098,6 +1111,7 @@ UINT32 s3_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -3388,7 +3402,6 @@ void ibm8514a_device::ibm8514_write(UINT32 offset, UINT32 src)
|
||||
{
|
||||
int data_size = 8;
|
||||
UINT32 xfer;
|
||||
address_space& space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
|
||||
switch(ibm8514.pixel_control & 0x00c0)
|
||||
{
|
||||
@ -3428,6 +3441,7 @@ void ibm8514a_device::ibm8514_write(UINT32 offset, UINT32 src)
|
||||
ibm8514.src_x = 0;
|
||||
break;
|
||||
case 0x00c0: // use source plane
|
||||
address_space& space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
if(m_vga->mem_linear_r(space,src,0xff) != 0x00)
|
||||
ibm8514_write_fg(offset);
|
||||
else
|
||||
|
@ -568,6 +568,7 @@ public:
|
||||
virtual UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) override;
|
||||
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual TIMER_CALLBACK_MEMBER(vblank_timer_cb) override;
|
||||
|
||||
ibm8514a_device* get_8514() { return m_8514; }
|
||||
protected:
|
||||
|
@ -117,17 +117,6 @@ public:
|
||||
UINT64 as_ticks(UINT32 frequency) const;
|
||||
const char *as_string(int precision = 9) const;
|
||||
|
||||
// Needed by gba.c FIXME: this shouldn't be necessary?
|
||||
|
||||
void normalize()
|
||||
{
|
||||
while (m_attoseconds >= ATTOSECONDS_PER_SECOND)
|
||||
{
|
||||
m_seconds++;
|
||||
m_attoseconds -= ATTOSECONDS_PER_SECOND;
|
||||
}
|
||||
}
|
||||
|
||||
attoseconds_t attoseconds() const { return m_attoseconds; }
|
||||
seconds_t seconds() const { return m_seconds; }
|
||||
|
||||
|
@ -370,6 +370,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines)
|
||||
|
||||
// allocate disassembly buffer
|
||||
const auto total_bytes = m_total.x * m_total.y;
|
||||
m_dasm.clear();
|
||||
m_dasm.reserve(total_bytes).seekp(total_bytes);
|
||||
|
||||
// iterate over lines
|
||||
@ -387,6 +388,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines)
|
||||
|
||||
// convert back and set the address of this instruction
|
||||
m_byteaddress[instr] = pcbyte;
|
||||
m_dasm.clear();
|
||||
util::stream_format(m_dasm.seekp(base),
|
||||
source.m_space.is_octal() ? " %0*o " : " %0*X ",
|
||||
source.m_space.logaddrchars()/2*char_num, source.m_space.byte_to_address(pcbyte));
|
||||
|
@ -835,11 +835,11 @@ osd_file::error emu_file::attempt__7zped()
|
||||
if (fileno != -1)
|
||||
{
|
||||
m__7zfile = std::move(_7z);
|
||||
m__7zlength = _7z->current_uncompressed_length();
|
||||
m__7zlength = m__7zfile->current_uncompressed_length();
|
||||
|
||||
// build a hash with just the CRC
|
||||
m_hashes.reset();
|
||||
m_hashes.add_crc(_7z->current_crc());
|
||||
m_hashes.add_crc(m__7zfile->current_crc());
|
||||
return (m_openflags & OPEN_FLAG_NO_PRELOAD) ? osd_file::error::NONE : load__7zped_file();
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,13 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Aaron Giles
|
||||
/***************************************************************************
|
||||
/***************************************************************************/
|
||||
/**
|
||||
* @file mconfig.h
|
||||
* @defgroup MACHINE_CONFIG Machine configuration macros and functions
|
||||
* @{
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
mconfig.h
|
||||
|
||||
Machine configuration macros and functions.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
@ -81,26 +82,52 @@ private:
|
||||
};
|
||||
|
||||
|
||||
//*************************************************************************/
|
||||
/** @name Machine config start/end macros */
|
||||
//*************************************************************************/
|
||||
|
||||
//**************************************************************************
|
||||
// MACHINE CONFIG MACROS
|
||||
//**************************************************************************
|
||||
|
||||
// start/end tags for the machine driver
|
||||
/**
|
||||
@def MACHINE_CONFIG_NAME(_name)
|
||||
Returns the internal name for the machine config.
|
||||
@param _name name of desired config
|
||||
@hideinitializer
|
||||
*/
|
||||
#define MACHINE_CONFIG_NAME(_name) construct_machine_config_##_name
|
||||
|
||||
/**
|
||||
@def MACHINE_CONFIG_START(_name, _class)
|
||||
Begins a new machine config.
|
||||
@param _name name of this config
|
||||
@param _class driver_device class for this config
|
||||
@hideinitializer
|
||||
*/
|
||||
#define MACHINE_CONFIG_START(_name, _class) \
|
||||
ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t *owner, device_t *device) \
|
||||
{ \
|
||||
devcb_base *devcb = NULL; \
|
||||
(void)devcb; \
|
||||
if (owner == NULL) owner = config.device_add(NULL, "root", &driver_device_creator<_class>, 0);
|
||||
|
||||
/**
|
||||
@def MACHINE_CONFIG_FRAGMENT(_name)
|
||||
Begins a partial machine_config that can only be included in another "root" machine_config. This is also used for machine_configs that are specified as part of a device.
|
||||
@param _name name of this config fragment
|
||||
@hideinitializer
|
||||
*/
|
||||
#define MACHINE_CONFIG_FRAGMENT(_name) \
|
||||
ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t *owner, device_t *device) \
|
||||
{ \
|
||||
devcb_base *devcb = NULL; \
|
||||
(void)devcb; \
|
||||
assert(owner != NULL);
|
||||
|
||||
/**
|
||||
@def MACHINE_CONFIG_DERIVED(_name, _base)
|
||||
Begins a machine_config that is derived from another machine_config.
|
||||
@param _name name of this config
|
||||
@param _base name of the parent config
|
||||
@hideinitializer
|
||||
*/
|
||||
#define MACHINE_CONFIG_DERIVED(_name, _base) \
|
||||
ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t *owner, device_t *device) \
|
||||
{ \
|
||||
@ -108,6 +135,15 @@ ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t
|
||||
(void)devcb; \
|
||||
owner = MACHINE_CONFIG_NAME(_base)(config, owner, device); \
|
||||
assert(owner != NULL);
|
||||
|
||||
/**
|
||||
@def MACHINE_CONFIG_DERIVED_CLASS(_name, _base, _class)
|
||||
Begins a machine_config that is derived from another machine_config that can specify an alternate driver_device class
|
||||
@param _name name of this config
|
||||
@param _base name of the parent config
|
||||
@param _class name of the alternate driver_device class
|
||||
@hideinitializer
|
||||
*/
|
||||
#define MACHINE_CONFIG_DERIVED_CLASS(_name, _base, _class) \
|
||||
ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t *owner, device_t *device) \
|
||||
{ \
|
||||
@ -115,14 +151,32 @@ ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t
|
||||
(void)devcb; \
|
||||
if (owner == NULL) owner = config.device_add(NULL, "root", &driver_device_creator<_class>, 0); \
|
||||
owner = MACHINE_CONFIG_NAME(_base)(config, owner, device);
|
||||
|
||||
/**
|
||||
@def MACHINE_CONFIG_END
|
||||
Ends a machine_config.
|
||||
@hideinitializer
|
||||
*/
|
||||
#define MACHINE_CONFIG_END \
|
||||
return owner; \
|
||||
}
|
||||
|
||||
// use this to declare external references to a machine driver
|
||||
//*************************************************************************/
|
||||
/** @name Standalone machine config macros */
|
||||
//*************************************************************************/
|
||||
|
||||
/**
|
||||
@def MACHINE_CONFIG_EXTERN(_name)
|
||||
References an external machine config.
|
||||
@param _name Name of the machine config to reference
|
||||
@hideinitializer
|
||||
*/
|
||||
#define MACHINE_CONFIG_EXTERN(_name) \
|
||||
extern device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t *owner, device_t *device)
|
||||
|
||||
//*************************************************************************/
|
||||
/** @name Core machine config options */
|
||||
//*************************************************************************/
|
||||
|
||||
// importing data from other machine drivers
|
||||
#define MCFG_FRAGMENT_ADD(_name) \
|
||||
@ -160,3 +214,4 @@ ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t
|
||||
device = config.device_find(owner, _tag);
|
||||
|
||||
#endif /* __MCONFIG_H__ */
|
||||
/** @} */
|
||||
|
@ -123,7 +123,7 @@ render_font::render_font(render_manager &manager, const char *filename)
|
||||
m_yoffs(0),
|
||||
m_scale(1.0f),
|
||||
m_rawsize(0),
|
||||
m_osdfont(nullptr),
|
||||
m_osdfont(),
|
||||
m_height_cmd(0),
|
||||
m_yoffs_cmd(0)
|
||||
{
|
||||
@ -134,7 +134,7 @@ render_font::render_font(render_manager &manager, const char *filename)
|
||||
if (filename != nullptr)
|
||||
{
|
||||
m_osdfont = manager.machine().osd().font_alloc();
|
||||
if (m_osdfont != nullptr)
|
||||
if (m_osdfont)
|
||||
{
|
||||
if (m_osdfont->open(manager.machine().options().font_path(), filename, m_height))
|
||||
{
|
||||
@ -145,8 +145,7 @@ render_font::render_font(render_manager &manager, const char *filename)
|
||||
render_font_command_glyph();
|
||||
return;
|
||||
}
|
||||
global_free(m_osdfont);
|
||||
m_osdfont = nullptr;
|
||||
m_osdfont.reset();
|
||||
}
|
||||
}
|
||||
|
||||
@ -199,13 +198,6 @@ render_font::~render_font()
|
||||
}
|
||||
delete[] elem;
|
||||
}
|
||||
|
||||
// release the OSD font
|
||||
if (m_osdfont != nullptr)
|
||||
{
|
||||
m_osdfont->close();
|
||||
global_free(m_osdfont);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -99,7 +99,7 @@ private:
|
||||
glyph *m_glyphs[256]; // array of glyph subtables
|
||||
std::vector<char> m_rawdata; // pointer to the raw data for the font
|
||||
UINT64 m_rawsize; // size of the raw font data
|
||||
osd_font *m_osdfont; // handle to the OSD font
|
||||
std::unique_ptr<osd_font> m_osdfont; // handle to the OSD font
|
||||
|
||||
int m_height_cmd; // height of the font, from ascent to descent
|
||||
int m_yoffs_cmd; // y offset from baseline to descent
|
||||
|
@ -9,14 +9,16 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "ui/ui.h"
|
||||
#include "ui/menu.h"
|
||||
#include "ui/selector.h"
|
||||
#include "ui/custui.h"
|
||||
|
||||
#include "ui/ui.h"
|
||||
#include "ui/selector.h"
|
||||
#include "ui/utils.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
const char *ui_menu_custom_ui::hide_status[] = {
|
||||
|
||||
const char *const ui_menu_custom_ui::hide_status[] = {
|
||||
__("Show All"),
|
||||
__("Hide Filters"),
|
||||
__("Hide Info/Image"),
|
||||
@ -192,24 +194,23 @@ void ui_menu_custom_ui::custom_render(void *selectedref, float top, float bottom
|
||||
ui_menu_font_ui::ui_menu_font_ui(running_machine &machine, render_container *container) : ui_menu(machine, container)
|
||||
{
|
||||
ui_options &moptions = machine.ui().options();
|
||||
#ifdef UI_WINDOWS
|
||||
|
||||
std::string name(machine.options().ui_font());
|
||||
list();
|
||||
|
||||
#ifdef UI_WINDOWS
|
||||
m_bold = (strreplace(name, "[B]", "") + strreplace(name, "[b]", "") > 0);
|
||||
m_italic = (strreplace(name, "[I]", "") + strreplace(name, "[i]", "") > 0);
|
||||
#endif
|
||||
m_actual = 0;
|
||||
|
||||
for (size_t index = 0; index < m_fonts.size(); index++)
|
||||
{
|
||||
if (m_fonts[index] == name)
|
||||
if (m_fonts[index].first == name)
|
||||
{
|
||||
m_actual = index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
m_info_size = moptions.infos_size();
|
||||
m_font_size = moptions.font_rows();
|
||||
@ -231,43 +232,17 @@ ui_menu_font_ui::ui_menu_font_ui(running_machine &machine, render_container *con
|
||||
|
||||
}
|
||||
|
||||
#ifdef UI_WINDOWS
|
||||
//-------------------------------------------------
|
||||
// fonts enumerator CALLBACK
|
||||
//-------------------------------------------------
|
||||
|
||||
int CALLBACK ui_menu_font_ui::EnumFontFamiliesExProc(const LOGFONT *lpelfe, const TEXTMETRIC *lpntme, DWORD FontType, LPARAM lParam)
|
||||
{
|
||||
std::vector<std::string> *lpc = (std::vector<std::string>*)lParam;
|
||||
std::string utf((char *)lpelfe->lfFaceName);
|
||||
if (utf[0] != '@')
|
||||
lpc->push_back(utf);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// create fonts list
|
||||
//-------------------------------------------------
|
||||
|
||||
void ui_menu_font_ui::list()
|
||||
{
|
||||
// create LOGFONT structure
|
||||
LOGFONT lf;
|
||||
lf.lfCharSet = ANSI_CHARSET;
|
||||
lf.lfFaceName[0] = '\0';
|
||||
|
||||
HDC hDC = GetDC( nullptr );
|
||||
EnumFontFamiliesEx( hDC, &lf, (FONTENUMPROC)EnumFontFamiliesExProc, (LPARAM)&m_fonts, 0 );
|
||||
ReleaseDC( nullptr, hDC );
|
||||
|
||||
// sort
|
||||
std::stable_sort(m_fonts.begin(), m_fonts.end());
|
||||
machine().osd().get_font_families(machine().options().font_path(), m_fonts);
|
||||
|
||||
// add default string to the top of array
|
||||
m_fonts.insert(m_fonts.begin(), std::string(_("default")));
|
||||
m_fonts.emplace(m_fonts.begin(), std::string("default"), std::string(_("default")));
|
||||
}
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------
|
||||
// dtor
|
||||
@ -278,18 +253,18 @@ ui_menu_font_ui::~ui_menu_font_ui()
|
||||
std::string error_string;
|
||||
ui_options &moptions = machine().ui().options();
|
||||
|
||||
std::string name(m_fonts[m_actual].first);
|
||||
#ifdef UI_WINDOWS
|
||||
std::string name(m_fonts[m_actual]);
|
||||
if (m_fonts[m_actual] != "default")
|
||||
if (name != "default")
|
||||
{
|
||||
if (m_italic)
|
||||
name.insert(0, "[I]");
|
||||
if (m_bold)
|
||||
name.insert(0, "[B]");
|
||||
}
|
||||
#endif
|
||||
machine().options().set_value(OPTION_UI_FONT, name.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
|
||||
machine().options().mark_changed(OPTION_UI_FONT);
|
||||
#endif
|
||||
|
||||
moptions.set_value(OPTION_INFOS_SIZE, m_info_size, OPTION_PRIORITY_CMDLINE, error_string);
|
||||
moptions.set_value(OPTION_FONT_ROWS, m_font_size, OPTION_PRIORITY_CMDLINE, error_string);
|
||||
@ -325,7 +300,6 @@ void ui_menu_font_ui::handle()
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef UI_WINDOWS
|
||||
|
||||
case MUI_FNT:
|
||||
if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
|
||||
@ -335,11 +309,15 @@ void ui_menu_font_ui::handle()
|
||||
}
|
||||
else if (m_event->iptkey == IPT_UI_SELECT)
|
||||
{
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_fonts, m_actual));
|
||||
std::vector<std::string> display_names;
|
||||
display_names.reserve(m_fonts.size());
|
||||
for (auto const &font : m_fonts) display_names.emplace_back(font.second);
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, std::move(display_names), m_actual));
|
||||
changed = true;
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef UI_WINDOWS
|
||||
case MUI_BOLD:
|
||||
case MUI_ITALIC:
|
||||
if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT)
|
||||
@ -364,13 +342,12 @@ void ui_menu_font_ui::populate()
|
||||
// set filter arrow
|
||||
UINT32 arrow_flags;
|
||||
|
||||
#ifdef UI_WINDOWS
|
||||
// add fonts option
|
||||
arrow_flags = get_arrow_flags(0, m_fonts.size() - 1, m_actual);
|
||||
std::string name(m_fonts[m_actual]);
|
||||
item_append(_("UI Font"), name.c_str(), arrow_flags, (void *)(FPTR)MUI_FNT);
|
||||
item_append(_("UI Font"), m_fonts[m_actual].second.c_str(), arrow_flags, (void *)(FPTR)MUI_FNT);
|
||||
|
||||
if (name != "default")
|
||||
#ifdef UI_WINDOWS
|
||||
if (m_fonts[m_actual].first != "default")
|
||||
{
|
||||
item_append(_("Bold"), m_bold ? "On" : "Off", m_bold ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_BOLD);
|
||||
item_append(_("Italic"), m_italic ? "On" : "Off", m_italic ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_ITALIC);
|
||||
|
@ -10,13 +10,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __UI_CUSTUI_H__
|
||||
#define __UI_CUSTUI_H__
|
||||
#ifndef MAME_EMU_UI_UI_CUSTUI_H
|
||||
#define MAME_EMU_UI_UI_CUSTUI_H
|
||||
|
||||
#include "ui/menu.h"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#ifdef UI_WINDOWS
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------
|
||||
// Custom UI menu
|
||||
@ -39,9 +40,9 @@ private:
|
||||
COLORS_MENU,
|
||||
HIDE_MENU
|
||||
};
|
||||
static const char *hide_status[];
|
||||
static const char *const hide_status[];
|
||||
std::vector<std::string> m_lang;
|
||||
UINT16 m_currlang;
|
||||
std::uint16_t m_currlang;
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -67,14 +68,12 @@ private:
|
||||
MUI_ITALIC
|
||||
};
|
||||
|
||||
#ifdef UI_WINDOWS
|
||||
UINT16 m_actual;
|
||||
std::vector<std::string> m_fonts;
|
||||
bool m_bold, m_italic;
|
||||
|
||||
void list();
|
||||
static int CALLBACK EnumFontFamiliesExProc(const LOGFONT *lpelfe, const TEXTMETRIC *lpntme, DWORD FontType, LPARAM lParam);
|
||||
|
||||
std::uint16_t m_actual;
|
||||
std::vector<std::pair<std::string, std::string> > m_fonts;
|
||||
#ifdef UI_WINDOWS
|
||||
bool m_bold, m_italic;
|
||||
#endif
|
||||
|
||||
float m_info_min, m_info_max, m_info_size;
|
||||
@ -182,4 +181,4 @@ private:
|
||||
rgb_t &m_original;
|
||||
};
|
||||
|
||||
#endif /* __UI_CUSTUI_H__ */
|
||||
#endif // MAME_EMU_UI_UI_CUSTUI_H
|
||||
|
@ -18,13 +18,26 @@
|
||||
// ctor / dtor
|
||||
//-------------------------------------------------
|
||||
|
||||
ui_menu_selector::ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> s_sel, UINT16 &s_actual, int category, int _hover)
|
||||
: ui_menu(machine, container), m_selector(s_actual)
|
||||
ui_menu_selector::ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> const &s_sel, UINT16 &s_actual, int category, int _hover)
|
||||
: ui_menu(machine, container)
|
||||
, m_selector(s_actual)
|
||||
, m_category(category)
|
||||
, m_hover(_hover)
|
||||
, m_first_pass(true)
|
||||
, m_str_items(s_sel)
|
||||
{
|
||||
m_search[0] = '\0';
|
||||
m_searchlist[0] = nullptr;
|
||||
}
|
||||
|
||||
ui_menu_selector::ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> &&s_sel, UINT16 &s_actual, int category, int _hover)
|
||||
: ui_menu(machine, container)
|
||||
, m_selector(s_actual)
|
||||
, m_category(category)
|
||||
, m_hover(_hover)
|
||||
, m_first_pass(true)
|
||||
, m_str_items(std::move(s_sel))
|
||||
{
|
||||
m_category = category;
|
||||
m_first_pass = true;
|
||||
m_hover = _hover;
|
||||
m_str_items = s_sel;
|
||||
m_search[0] = '\0';
|
||||
m_searchlist[0] = nullptr;
|
||||
}
|
||||
|
@ -28,7 +28,8 @@ enum
|
||||
class ui_menu_selector : public ui_menu
|
||||
{
|
||||
public:
|
||||
ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> _sel, UINT16 &_actual, int _category = 0, int _hover = 0);
|
||||
ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> const &_sel, UINT16 &_actual, int _category = 0, int _hover = 0);
|
||||
ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> &&_sel, UINT16 &_actual, int _category = 0, int _hover = 0);
|
||||
virtual ~ui_menu_selector();
|
||||
virtual void populate() override;
|
||||
virtual void handle() override;
|
||||
|
@ -121,49 +121,49 @@ const struct io_procs corefile_ioprocs_noclose =
|
||||
calls for accessing generic IO
|
||||
*********************************************************************/
|
||||
|
||||
static void io_generic_seek(struct io_generic *generic, UINT64 offset)
|
||||
static void io_generic_seek(struct io_generic *genio, UINT64 offset)
|
||||
{
|
||||
generic->procs->seekproc(generic->file, offset, SEEK_SET);
|
||||
genio->procs->seekproc(genio->file, offset, SEEK_SET);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void io_generic_close(struct io_generic *generic)
|
||||
void io_generic_close(struct io_generic *genio)
|
||||
{
|
||||
if (generic->procs->closeproc)
|
||||
generic->procs->closeproc(generic->file);
|
||||
if (genio->procs->closeproc)
|
||||
genio->procs->closeproc(genio->file);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void io_generic_read(struct io_generic *generic, void *buffer, UINT64 offset, size_t length)
|
||||
void io_generic_read(struct io_generic *genio, void *buffer, UINT64 offset, size_t length)
|
||||
{
|
||||
UINT64 size;
|
||||
size_t bytes_read;
|
||||
|
||||
size = io_generic_size(generic);
|
||||
size = io_generic_size(genio);
|
||||
if (size <= offset)
|
||||
{
|
||||
bytes_read = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
io_generic_seek(generic, offset);
|
||||
bytes_read = generic->procs->readproc(generic->file, buffer, length);
|
||||
io_generic_seek(genio, offset);
|
||||
bytes_read = genio->procs->readproc(genio->file, buffer, length);
|
||||
}
|
||||
memset(((UINT8 *) buffer) + bytes_read, generic->filler, length - bytes_read);
|
||||
memset(((UINT8 *) buffer) + bytes_read, genio->filler, length - bytes_read);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void io_generic_write(struct io_generic *generic, const void *buffer, UINT64 offset, size_t length)
|
||||
void io_generic_write(struct io_generic *genio, const void *buffer, UINT64 offset, size_t length)
|
||||
{
|
||||
UINT64 filler_size = 0;
|
||||
char filler_buffer[1024];
|
||||
size_t bytes_to_write;
|
||||
UINT64 size;
|
||||
|
||||
size = io_generic_size(generic);
|
||||
size = io_generic_size(genio);
|
||||
|
||||
if (size < offset)
|
||||
{
|
||||
@ -171,27 +171,27 @@ void io_generic_write(struct io_generic *generic, const void *buffer, UINT64 off
|
||||
offset = size;
|
||||
}
|
||||
|
||||
io_generic_seek(generic, offset);
|
||||
io_generic_seek(genio, offset);
|
||||
|
||||
if (filler_size)
|
||||
{
|
||||
memset(filler_buffer, generic->filler, sizeof(filler_buffer));
|
||||
memset(filler_buffer, genio->filler, sizeof(filler_buffer));
|
||||
do
|
||||
{
|
||||
bytes_to_write = (filler_size > sizeof(filler_buffer)) ? sizeof(filler_buffer) : (size_t) filler_size;
|
||||
generic->procs->writeproc(generic->file, filler_buffer, bytes_to_write);
|
||||
genio->procs->writeproc(genio->file, filler_buffer, bytes_to_write);
|
||||
filler_size -= bytes_to_write;
|
||||
}
|
||||
while(filler_size > 0);
|
||||
}
|
||||
|
||||
if (length > 0)
|
||||
generic->procs->writeproc(generic->file, buffer, length);
|
||||
genio->procs->writeproc(genio->file, buffer, length);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void io_generic_write_filler(struct io_generic *generic, UINT8 filler, UINT64 offset, size_t length)
|
||||
void io_generic_write_filler(struct io_generic *genio, UINT8 filler, UINT64 offset, size_t length)
|
||||
{
|
||||
UINT8 buffer[512];
|
||||
size_t this_length;
|
||||
@ -201,7 +201,7 @@ void io_generic_write_filler(struct io_generic *generic, UINT8 filler, UINT64 of
|
||||
while(length > 0)
|
||||
{
|
||||
this_length = MIN(length, sizeof(buffer));
|
||||
io_generic_write(generic, buffer, offset, this_length);
|
||||
io_generic_write(genio, buffer, offset, this_length);
|
||||
offset += this_length;
|
||||
length -= this_length;
|
||||
}
|
||||
@ -209,7 +209,7 @@ void io_generic_write_filler(struct io_generic *generic, UINT8 filler, UINT64 of
|
||||
|
||||
|
||||
|
||||
UINT64 io_generic_size(struct io_generic *generic)
|
||||
UINT64 io_generic_size(struct io_generic *genio)
|
||||
{
|
||||
return generic->procs->filesizeproc(generic->file);
|
||||
return genio->procs->filesizeproc(genio->file);
|
||||
}
|
||||
|
@ -61,11 +61,11 @@ extern const struct io_procs corefile_ioprocs_noclose;
|
||||
|
||||
|
||||
|
||||
void io_generic_close(struct io_generic *generic);
|
||||
void io_generic_read(struct io_generic *generic, void *buffer, UINT64 offset, size_t length);
|
||||
void io_generic_write(struct io_generic *generic, const void *buffer, UINT64 offset, size_t length);
|
||||
void io_generic_write_filler(struct io_generic *generic, UINT8 filler, UINT64 offset, size_t length);
|
||||
UINT64 io_generic_size(struct io_generic *generic);
|
||||
void io_generic_close(struct io_generic *genio);
|
||||
void io_generic_read(struct io_generic *genio, void *buffer, UINT64 offset, size_t length);
|
||||
void io_generic_write(struct io_generic *genio, const void *buffer, UINT64 offset, size_t length);
|
||||
void io_generic_write_filler(struct io_generic *genio, UINT8 filler, UINT64 offset, size_t length);
|
||||
UINT64 io_generic_size(struct io_generic *genio);
|
||||
|
||||
|
||||
|
||||
|
@ -653,48 +653,23 @@ ATTR_COLD void net_t::save_register()
|
||||
object_t::save_register();
|
||||
}
|
||||
|
||||
ATTR_HOT /* inline */ void core_terminal_t::update_dev(const UINT32 mask)
|
||||
{
|
||||
inc_stat(netdev().stat_call_count);
|
||||
if ((state() & mask) != 0)
|
||||
{
|
||||
device().update_dev();
|
||||
}
|
||||
}
|
||||
|
||||
ATTR_HOT /* inline */ void net_t::update_devs()
|
||||
{
|
||||
//assert(m_num_cons != 0);
|
||||
nl_assert(this->isRailNet());
|
||||
|
||||
const UINT32 masks[4] = { 1, 5, 3, 1 };
|
||||
const UINT32 mask = masks[ (m_cur_Q << 1) | m_new_Q ];
|
||||
const int masks[4] = { 1, 5, 3, 1 };
|
||||
const int mask = masks[ (m_cur_Q << 1) | m_new_Q ];
|
||||
|
||||
m_in_queue = 2; /* mark as taken ... */
|
||||
m_cur_Q = m_new_Q;
|
||||
#if 0
|
||||
core_terminal_t * t[256];
|
||||
core_terminal_t *p = m_list_active.first();
|
||||
int cnt = 0;
|
||||
while (p != NULL)
|
||||
|
||||
for (core_terminal_t *p = m_list_active.first(); p != NULL; p = p->next())
|
||||
{
|
||||
inc_stat(p->netdev().stat_call_count);
|
||||
if ((p->state() & mask) != 0)
|
||||
t[cnt++] = p;
|
||||
p = m_list_active.next(p);
|
||||
p->device().update_dev();
|
||||
}
|
||||
|
||||
for (int i=0; i<cnt; i++)
|
||||
t[i]->device().update_dev();
|
||||
|
||||
#else
|
||||
core_terminal_t *p = m_list_active.first();
|
||||
|
||||
while (p != NULL)
|
||||
{
|
||||
p->update_dev(mask);
|
||||
p = m_list_active.next(p);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
ATTR_COLD void net_t::reset()
|
||||
|
@ -495,16 +495,13 @@ namespace netlist
|
||||
ATTR_HOT net_t & net() { return *m_net;}
|
||||
|
||||
ATTR_HOT bool is_state(const state_e astate) const { return (m_state == astate); }
|
||||
ATTR_HOT state_e state() const { return m_state; }
|
||||
ATTR_HOT const state_e &state() const { return m_state; }
|
||||
ATTR_HOT void set_state(const state_e astate)
|
||||
{
|
||||
nl_assert(astate != STATE_NONEX);
|
||||
m_state = astate;
|
||||
}
|
||||
|
||||
|
||||
ATTR_HOT /* inline */ void update_dev(const UINT32 mask);
|
||||
|
||||
protected:
|
||||
virtual void save_register() override
|
||||
{
|
||||
|
@ -210,18 +210,14 @@ public:
|
||||
|
||||
ATTR_HOT void remove(const _ListClass &elem)
|
||||
{
|
||||
_ListClass **p = &m_head;
|
||||
while (*p != &elem)
|
||||
_ListClass **p;
|
||||
for (p = &m_head; *p != &elem; p = &((*p)->m_next))
|
||||
{
|
||||
//nl_assert(*p != NULL);
|
||||
p = &((*p)->m_next);
|
||||
}
|
||||
(*p) = elem.m_next;
|
||||
}
|
||||
|
||||
|
||||
ATTR_HOT static _ListClass *next(const _ListClass &elem) { return elem.m_next; }
|
||||
ATTR_HOT static _ListClass *next(const _ListClass *elem) { return elem->m_next; }
|
||||
ATTR_HOT _ListClass *first() const { return m_head; }
|
||||
ATTR_HOT void clear() { m_head = NULL; }
|
||||
ATTR_HOT bool is_empty() const { return (m_head == NULL); }
|
||||
|
@ -467,10 +467,10 @@ private:
|
||||
, m_saved_avih_offset(0)
|
||||
, m_soundbuf()
|
||||
, m_soundbuf_samples(0)
|
||||
, m_soundbuf_chansamples{ 0 }
|
||||
, m_soundbuf_chunks(0)
|
||||
, m_soundbuf_frames(0)
|
||||
{
|
||||
std::fill(std::begin(m_soundbuf_chansamples), std::end(m_soundbuf_chansamples), 0);
|
||||
}
|
||||
|
||||
avi_stream *get_video_stream();
|
||||
|
@ -611,6 +611,7 @@ int core_text_file::puts(char const *s)
|
||||
|
||||
int core_text_file::vprintf(util::format_argument_pack<std::ostream> const &args)
|
||||
{
|
||||
m_printf_buffer.clear();
|
||||
m_printf_buffer.reserve(1024);
|
||||
m_printf_buffer.seekp(0, ovectorstream::beg);
|
||||
util::stream_format<std::ostream, std::ostream>(m_printf_buffer, args);
|
||||
|
@ -431,7 +431,7 @@ void m7z_file_impl::make_utf8_name(int index)
|
||||
out_pos += produced;
|
||||
assert(out_pos < m_utf8_buf.size());
|
||||
}
|
||||
m_utf16_buf[out_pos++] = '\0';
|
||||
m_utf8_buf[out_pos++] = '\0';
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
@ -1382,6 +1382,37 @@ ROM_START( cclimbroper )
|
||||
ROM_END
|
||||
|
||||
|
||||
ROM_START( cclimbrrod )
|
||||
ROM_REGION( 0x6000, "maincpu", 0 )
|
||||
ROM_LOAD( "cc5.bin", 0x0000, 0x1000, CRC(a67238e9) SHA1(f873b754f658f32e2462b63544cbb7f0866e23ff) )
|
||||
ROM_LOAD( "cc4.bin", 0x1000, 0x1000, CRC(4b1abea6) SHA1(eae7c96fc0b64d313bed4a75bd6d397b37eaac7e) )
|
||||
ROM_LOAD( "cc3.bin", 0x2000, 0x1000, CRC(5612bb3c) SHA1(213846bb3393467260f401b00b821cbab7ac9636) )
|
||||
ROM_LOAD( "cc2.bin", 0x3000, 0x1000, CRC(653cebc4) SHA1(c0b664389f7a6f58e880ba0870118aa26c636a37) )
|
||||
ROM_LOAD( "cc1.bin", 0x4000, 0x1000, CRC(3fcf912b) SHA1(d540895018bc409ae011ce5841c8c5384bbbb1b9) )
|
||||
|
||||
ROM_REGION( 0x4000, "gfx1", 0 )
|
||||
ROM_LOAD( "cc13.bin", 0x0000, 0x0800, CRC(8e0299f5) SHA1(77aa4fd6ee2177971753168bad6eac33034d3fb9) )
|
||||
/* 0x0800-0x0fff - empty */
|
||||
ROM_LOAD( "cc12.bin", 0x1000, 0x0800, CRC(e8cd7b53) SHA1(d4d6120fa14016e197340e8d1eb1141f0eb0eee8) )
|
||||
/* 0x1800-0xffff - empty */
|
||||
ROM_LOAD( "cc11.bin", 0x2000, 0x0800, CRC(921ebd9a) SHA1(95873fcab5da5e4affacdb6c3cab12b305f4b9fd) )
|
||||
/* 0x2800-0x2fff - empty */
|
||||
ROM_LOAD( "cc10.bin", 0x3000, 0x0800, CRC(8ab5fa6b) SHA1(ff31d2c89fe8cd5a276247b11418fb60de03804c))
|
||||
/* 0x3800-0x3fff - empty */
|
||||
|
||||
ROM_REGION( 0x1000, "gfx2", 0 )
|
||||
ROM_LOAD( "cc9.bin", 0x0000, 0x0800, CRC(6fb2afaf) SHA1(d2fe31d00af10e6bcabef51885ce52fb17d1bfbc) )
|
||||
ROM_LOAD( "cc8.bin", 0x0800, 0x0800, CRC(227ee804) SHA1(0cda61a0ceeab299e7d40d33bf6dad3490928323) )
|
||||
|
||||
ROM_REGION( 0x2000, "samples", 0 ) /* samples */
|
||||
ROM_LOAD( "cc7.cpu", 0x0000, 0x1000, CRC(5f0bcdfb) SHA1(7f79bf6de117348f606696ed7ea1937bbf926612) )
|
||||
ROM_LOAD( "cc6.cpu", 0x1000, 0x1000, CRC(9003ffbd) SHA1(fd016056aabc23957643f37230f03842294f795e) )
|
||||
|
||||
ROM_REGION( 0x0060, "proms", 0 ) // NOT verified on this board
|
||||
ROM_LOAD( "cclimber.pr1", 0x0000, 0x0020, CRC(751c3325) SHA1(edce2bc883996c1d72dc6c1c9f62799b162d415a) )
|
||||
ROM_LOAD( "cclimber.pr2", 0x0020, 0x0020, CRC(ab1940fa) SHA1(8d98e05cbaa6f55770c12e0a9a8ed9c73cc54423) )
|
||||
ROM_LOAD( "cclimber.pr3", 0x0040, 0x0020, CRC(71317756) SHA1(1195f0a037e379cc1a3c0314cb746f5cd2bffe50) )
|
||||
ROM_END
|
||||
|
||||
|
||||
/* Sets below are Crazy Kong Part II and have an extra screen in attract mode, showing a caged Kong and copyright */
|
||||
@ -2516,6 +2547,7 @@ GAME( 1980, ccboot, cclimber, cclimberx, cclimber, cclimber_state, cclimber
|
||||
GAME( 1980, ccboot2, cclimber, cclimberx, cclimber, cclimber_state, cclimberj,ROT0, "bootleg", "Crazy Climber (bootleg set 2)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1980, ccbootmr, cclimber, cclimberx, cclimber, cclimber_state, cclimberj,ROT0, "bootleg (Model Racing)", "Crazy Climber (Model Racing bootleg)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1980, cclimbroper, cclimber, cclimber, cclimber, driver_device, 0, ROT0, "bootleg (Operamatic)", "Crazy Climber (Spanish, Operamatic bootleg)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1980, cclimbrrod, cclimber, cclimber, cclimber, driver_device, 0, ROT0, "bootleg (Rodmar)", "Crazy Climber (Spanish, Rodmar bootleg)", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
/* these sets have ugly colours, no extra attract screen, and no graphics for the extra attract screen in the BG roms
|
||||
- there is a Falcon logo in the text roms which is unused
|
||||
|
@ -35,8 +35,6 @@ static inline void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, co
|
||||
}
|
||||
}
|
||||
|
||||
#define GBA_ATTOTIME_NORMALIZE(a) a.normalize()
|
||||
|
||||
static const UINT32 timer_clks[4] = { 16777216, 16777216/64, 16777216/256, 16777216/1024 };
|
||||
|
||||
|
||||
@ -343,7 +341,6 @@ TIMER_CALLBACK_MEMBER(gba_state::timer_expire)
|
||||
final = clocksel / rate;
|
||||
m_timer_hz[tmr] = final;
|
||||
time = attotime::from_hz(final);
|
||||
GBA_ATTOTIME_NORMALIZE(time);
|
||||
m_tmr_timer[tmr]->adjust(time, tmr, time);
|
||||
}
|
||||
|
||||
@ -1639,7 +1636,6 @@ WRITE32_MEMBER(gba_state::gba_io_w)
|
||||
if( !(data & 0x40000) ) // if we're not in Count-Up mode
|
||||
{
|
||||
attotime time = attotime::from_hz(final);
|
||||
GBA_ATTOTIME_NORMALIZE(time);
|
||||
m_tmr_timer[offset]->adjust(time, offset, time);
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +122,7 @@
|
||||
#include "bigtrak.lh"
|
||||
#include "cnfball.lh"
|
||||
#include "cnfball2.lh"
|
||||
#include "cnsector.lh"
|
||||
#include "cnsector.lh" // clickable
|
||||
#include "comp4.lh" // clickable
|
||||
#include "cqback.lh"
|
||||
#include "ebball.lh"
|
||||
@ -137,7 +137,7 @@
|
||||
#include "gpoker.lh"
|
||||
#include "h2hbaseb.lh"
|
||||
#include "h2hfootb.lh"
|
||||
#include "lostreas.lh"
|
||||
#include "lostreas.lh" // clickable
|
||||
#include "mathmagi.lh"
|
||||
#include "mdndclab.lh" // clickable
|
||||
#include "merlin.lh" // clickable
|
||||
@ -145,8 +145,8 @@
|
||||
#include "simon.lh" // clickable
|
||||
#include "ssimon.lh" // clickable
|
||||
#include "splitsec.lh"
|
||||
#include "starwbc.lh"
|
||||
#include "stopthie.lh"
|
||||
#include "starwbc.lh" // clickable
|
||||
#include "stopthie.lh" // clickable
|
||||
#include "tandy12.lh" // clickable
|
||||
#include "tbreakup.lh"
|
||||
#include "tc4.lh"
|
||||
@ -4748,7 +4748,7 @@ static INPUT_PORTS_START( lostreas )
|
||||
|
||||
PORT_START("IN.2") // O2
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear")
|
||||
PORT_BIT( 0x04, 0x04, IPT_SPECIAL ) PORT_CONDITION("FAKE", 0x03, NOTEQUALS, 0x00) // air/up
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_V) PORT_NAME("$ Value")
|
||||
|
||||
@ -5757,8 +5757,8 @@ COMP( 1983, fxmcr165, 0, 0, fxmcr165, fxmcr165, driver_device, 0, "Gak
|
||||
|
||||
CONS( 1979, elecdet, 0, 0, elecdet, elecdet, driver_device, 0, "Ideal", "Electronic Detective", MACHINE_SUPPORTS_SAVE ) // ***
|
||||
|
||||
CONS( 1979, starwbc, 0, 0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command", MACHINE_SUPPORTS_SAVE )
|
||||
CONS( 1979, starwbcp, starwbc, 0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command (patent)", MACHINE_SUPPORTS_SAVE )
|
||||
CONS( 1979, starwbc, 0, 0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||
CONS( 1979, starwbcp, starwbc, 0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command (patent)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||
|
||||
COMP( 1979, astro, 0, 0, astro, astro, driver_device, 0, "Kosmos", "Astro", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
|
||||
|
||||
@ -5769,14 +5769,14 @@ CONS( 1978, simon, 0, 0, simon, simon, driver_device, 0, "Mil
|
||||
CONS( 1979, ssimon, 0, 0, ssimon, ssimon, driver_device, 0, "Milton Bradley", "Super Simon", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||
CONS( 1979, bigtrak, 0, 0, bigtrak, bigtrak, driver_device, 0, "Milton Bradley", "Big Trak", MACHINE_SUPPORTS_SAVE | MACHINE_MECHANICAL ) // ***
|
||||
|
||||
CONS( 1977, cnsector, 0, 0, cnsector, cnsector, driver_device, 0, "Parker Brothers", "Code Name: Sector", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) // ***
|
||||
CONS( 1977, cnsector, 0, 0, cnsector, cnsector, driver_device, 0, "Parker Brothers", "Code Name: Sector", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_NO_SOUND_HW ) // ***
|
||||
CONS( 1978, merlin, 0, 0, merlin, merlin, driver_device, 0, "Parker Brothers", "Merlin - The Electronic Wizard", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||
CONS( 1979, stopthie, 0, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner)", MACHINE_SUPPORTS_SAVE ) // ***
|
||||
CONS( 1979, stopthiep, stopthie, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner) (patent)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // ***
|
||||
CONS( 1980, bankshot, 0, 0, bankshot, bankshot, driver_device, 0, "Parker Brothers", "Bank Shot - Electronic Pool", MACHINE_SUPPORTS_SAVE )
|
||||
CONS( 1980, splitsec, 0, 0, splitsec, splitsec, driver_device, 0, "Parker Brothers", "Split Second", MACHINE_SUPPORTS_SAVE )
|
||||
CONS( 1982, mmerlin, 0, 0, mmerlin, mmerlin, driver_device, 0, "Parker Brothers", "Master Merlin", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||
CONS( 1982, lostreas, 0, 0, lostreas, lostreas, driver_device, 0, "Parker Brothers", "Lost Treasure - The Electronic Deep-Sea Diving Game (Electronic Dive-Control Center)", MACHINE_SUPPORTS_SAVE ) // ***
|
||||
CONS( 1982, lostreas, 0, 0, lostreas, lostreas, driver_device, 0, "Parker Brothers", "Lost Treasure - The Electronic Deep-Sea Diving Game (Electronic Dive-Control Center)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // ***
|
||||
|
||||
CONS( 1981, tandy12, 0, 0, tandy12, tandy12, driver_device, 0, "Tandy Radio Shack", "Tandy-12: Computerized Arcade", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // some of the minigames: ***
|
||||
|
||||
|
@ -4245,4 +4245,7 @@ GAME( 1998, slqz2, 0, slqz2, slqz2, igs017_state, slqz2, ROT
|
||||
GAME( 1999?, tarzan, 0, iqblocka, iqblocka, igs017_state, tarzan, ROT0, "IGS", "Tarzan (V109C)", MACHINE_NOT_WORKING )
|
||||
GAME( 1999?, tarzana, tarzan, iqblocka, iqblocka, igs017_state, tarzana, ROT0, "IGS", "Tarzan (V107)", MACHINE_NOT_WORKING )
|
||||
GAME( 2000?, starzan, 0, starzan, iqblocka, igs017_state, starzan, ROT0, "IGS / G.F. Gioca", "Super Tarzan (Italy, V100I)", MACHINE_NOT_WORKING )
|
||||
GAME( ????, spkrform, spk116it, spkrform, spkrform, igs017_state, spkrform, ROT0, "IGS", "Super Poker (v100xD03) / Formosa", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
|
||||
|
||||
/* Parent spk306us in driver spoker.cpp. Move this set to that driver? */
|
||||
GAME( ????, spkrform, spk306us, spkrform, spkrform, igs017_state, spkrform, ROT0, "IGS", "Super Poker (v100xD03) / Formosa", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
|
||||
|
||||
|
@ -17,7 +17,7 @@ of the games were clocked at around 500KHz, 550KHz, or 300KHz.
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/mcs48/mcs48.h"
|
||||
#include "cpu/tms0980/tms0980.h"
|
||||
#include "cpu/tms1000/tms1100.h"
|
||||
#include "sound/dac.h"
|
||||
#include "rendlay.h"
|
||||
|
||||
@ -547,7 +547,7 @@ DEVICE_IMAGE_LOAD_MEMBER(microvision_state, microvsn_cart)
|
||||
if (pla)
|
||||
m_pla = 1;
|
||||
|
||||
tms1xxx_cpu_device::set_output_pla(m_tms1100, m_pla ? microvision_output_pla_1 : microvision_output_pla_0);
|
||||
tms1100_cpu_device::set_output_pla(m_tms1100, m_pla ? microvision_output_pla_1 : microvision_output_pla_0);
|
||||
|
||||
// Set default setting for PCB type and RC type
|
||||
m_pcb_type = microvision_state::PCB_TYPE_UNKNOWN;
|
||||
|
@ -111,6 +111,11 @@ static INPUT_PORTS_START( n64 )
|
||||
PORT_CONFSETTING(0x0000, "Retail")
|
||||
PORT_CONFSETTING(0x0100, "Development")
|
||||
|
||||
PORT_CONFNAME(0xC000, 0x8000, "EEPROM Size")
|
||||
PORT_CONFSETTING(0x0000, "None")
|
||||
PORT_CONFSETTING(0x8000, "4KB")
|
||||
PORT_CONFSETTING(0xC000, "16KB")
|
||||
|
||||
//Player 1
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Button A / Left Click")
|
||||
|
@ -683,6 +683,8 @@ ROM_END
|
||||
. NGH-007
|
||||
NEO-AEG PROG42G / NEO-AEG CHA42G
|
||||
NEO-AEG PROG42G / NEO-AEG CHA-8M
|
||||
. prototype
|
||||
NEO-AEG PROG-EP / NEO-AEG CHA-EP
|
||||
****************************************/
|
||||
|
||||
ROM_START( alpham2 ) /* MVS AND AES VERSION */
|
||||
@ -707,33 +709,33 @@ ROM_START( alpham2 ) /* MVS AND AES VERSION */
|
||||
ROM_LOAD16_BYTE( "007-c4.c4", 0x200001, 0x080000, CRC(7d588349) SHA1(a5ed789d7bbc25be5c5b2d99883b64d379c103a2) ) /* Plane 2,3 */ /* TC534200 */
|
||||
ROM_END
|
||||
|
||||
ROM_START( alpham2p ) /* early prototype - all roms were hand labeled with CRCs, dumps verified against them */
|
||||
ROM_START( alpham2p ) /* early prototype - all roms were hand labeled with CRCs, dumps verified against them */ /* AES VERSION*/
|
||||
ROM_REGION( 0x100000, "maincpu", 0 )
|
||||
ROM_LOAD16_BYTE( "proto_007-p1.p1", 0x000001, 0x080000, CRC(c763e52a) SHA1(b24acbac255c5ee1a2e92e77cdde6620a24081cf) )
|
||||
ROM_LOAD16_BYTE( "proto_007-p2.p2", 0x000000, 0x080000, CRC(7a0b435c) SHA1(40e6f42a92001d9f4e51898dd7489da143b6b74b) )
|
||||
ROM_LOAD16_BYTE( "007_p1_faac.p1", 0x000001, 0x080000, CRC(c763e52a) SHA1(b24acbac255c5ee1a2e92e77cdde6620a24081cf) )
|
||||
ROM_LOAD16_BYTE( "007_p2_1813.p2", 0x000000, 0x080000, CRC(7a0b435c) SHA1(40e6f42a92001d9f4e51898dd7489da143b6b74b) )
|
||||
|
||||
NEO_SFIX_128K( "proto_007-s1.s1", CRC(efc9ae2e) SHA1(a594826b0082fe5a13191673e8d9aa42517230f5) )
|
||||
NEO_SFIX_128K( "007_s1_36f1.s1", CRC(efc9ae2e) SHA1(a594826b0082fe5a13191673e8d9aa42517230f5) )
|
||||
|
||||
NEO_BIOS_AUDIO_128K( "proto_007-m1.m1", CRC(5976b464) SHA1(ec824567ecc3579f6d86c9d9385710cbaeef16a3) )
|
||||
NEO_BIOS_AUDIO_128K( "007_m1_9384.m1", CRC(5976b464) SHA1(ec824567ecc3579f6d86c9d9385710cbaeef16a3) )
|
||||
|
||||
ROM_REGION( 0x200000, "ymsnd", 0 )
|
||||
ROM_LOAD( "proto_007-v11.v11", 0x000000, 0x080000, CRC(18eaa9e1) SHA1(85c94d8660f8a32e4ca8e015f0bd704208482d68) )
|
||||
ROM_LOAD( "proto_007-v12.v12", 0x080000, 0x080000, CRC(2487d495) SHA1(49af3c4dc6a38c5158d3641fd8f9a40041b42aa6) )
|
||||
ROM_LOAD( "proto_007-v13.v13", 0x100000, 0x080000, CRC(25e60f25) SHA1(d06b0df872372de38fcf90187195070ac5f8c651) )
|
||||
ROM_LOAD( "proto_007-v21.v21", 0x180000, 0x080000, CRC(ac44b75a) SHA1(7399a05cd4e2c7ecde4a7323d3e189255afe5fc2) )
|
||||
ROM_LOAD( "007_v11_1bb4.v11", 0x000000, 0x080000, CRC(18eaa9e1) SHA1(85c94d8660f8a32e4ca8e015f0bd704208482d68) )
|
||||
ROM_LOAD( "007_v12_c8e8.v12", 0x080000, 0x080000, CRC(2487d495) SHA1(49af3c4dc6a38c5158d3641fd8f9a40041b42aa6) )
|
||||
ROM_LOAD( "007_v13_09fa.v13", 0x100000, 0x080000, CRC(25e60f25) SHA1(d06b0df872372de38fcf90187195070ac5f8c651) )
|
||||
ROM_LOAD( "007_v21_28c2.v21", 0x180000, 0x080000, CRC(ac44b75a) SHA1(7399a05cd4e2c7ecde4a7323d3e189255afe5fc2) )
|
||||
|
||||
ROM_REGION( 0x080000, "ymsnd.deltat", 0 )
|
||||
ROM_COPY( "ymsnd", 0x180000, 0x00000, 0x80000 )
|
||||
|
||||
ROM_REGION( 0x400000, "sprites", 0 ) // note, ROM_LOAD32_BYTE
|
||||
ROM_LOAD32_BYTE( "proto_007-c1.c1", 0x000000, 0x80000, CRC(24841639) SHA1(fcc2a349121dad86ffefc44b9f0e8ba616ce0d30) ) /* Plane 0 */
|
||||
ROM_LOAD32_BYTE( "proto_007-c2.c2", 0x000002, 0x80000, CRC(912763ab) SHA1(cedf26d7d85ad140399ee62813c71f35e65498d6) ) /* Plane 2 */
|
||||
ROM_LOAD32_BYTE( "proto_007-c3.c3", 0x000001, 0x80000, CRC(0743bde2) SHA1(0d13ad6333909ad3cf10f9ac360f9abf191318de) ) /* Plane 1 */
|
||||
ROM_LOAD32_BYTE( "proto_007-c4.c4", 0x000003, 0x80000, CRC(61240212) SHA1(dee36f6604adaeb96e0d761a7256241c066b1cd2) ) /* Plane 3 */
|
||||
ROM_LOAD32_BYTE( "proto_007-c5.c5", 0x200000, 0x80000, CRC(cf9f4c53) SHA1(f979c85f83d9f76e554c2617f85f6d4efca6799c) ) /* Plane 0 */
|
||||
ROM_LOAD32_BYTE( "proto_007-c6.c6", 0x200002, 0x80000, CRC(3d903b19) SHA1(001a8c762336b855fe1df69fe2e605d30a3f00a1) ) /* Plane 2 */
|
||||
ROM_LOAD32_BYTE( "proto_007-c7.c7", 0x200001, 0x80000, CRC(e41e3875) SHA1(730aceb8a66cb33d0194b096568f053ad7dc000a) ) /* Plane 1 */
|
||||
ROM_LOAD32_BYTE( "proto_007-c8.c8", 0x200003, 0x80000, CRC(4483e2cf) SHA1(47c3364f5c36ae9dc3a49fe37ca60bcee0e73314) ) /* Plane 3 */
|
||||
ROM_LOAD32_BYTE( "007_c1_210e.c11", 0x000000, 0x80000, CRC(24841639) SHA1(fcc2a349121dad86ffefc44b9f0e8ba616ce0d30) ) /* Plane 0 */
|
||||
ROM_LOAD32_BYTE( "007_c2_29ae.c12", 0x000002, 0x80000, CRC(912763ab) SHA1(cedf26d7d85ad140399ee62813c71f35e65498d6) ) /* Plane 2 */
|
||||
ROM_LOAD32_BYTE( "007_c3_c873.c13", 0x000001, 0x80000, CRC(0743bde2) SHA1(0d13ad6333909ad3cf10f9ac360f9abf191318de) ) /* Plane 1 */
|
||||
ROM_LOAD32_BYTE( "007_c4_2462.c14", 0x000003, 0x80000, CRC(61240212) SHA1(dee36f6604adaeb96e0d761a7256241c066b1cd2) ) /* Plane 3 */
|
||||
ROM_LOAD32_BYTE( "007_c5_5f16.c15", 0x200000, 0x80000, CRC(cf9f4c53) SHA1(f979c85f83d9f76e554c2617f85f6d4efca6799c) ) /* Plane 0 */
|
||||
ROM_LOAD32_BYTE( "007_c6_8abc.c16", 0x200002, 0x80000, CRC(3d903b19) SHA1(001a8c762336b855fe1df69fe2e605d30a3f00a1) ) /* Plane 2 */
|
||||
ROM_LOAD32_BYTE( "007_c7_c983.c17", 0x200001, 0x80000, CRC(e41e3875) SHA1(730aceb8a66cb33d0194b096568f053ad7dc000a) ) /* Plane 1 */
|
||||
ROM_LOAD32_BYTE( "007_c8_b599.c18", 0x200003, 0x80000, CRC(4483e2cf) SHA1(47c3364f5c36ae9dc3a49fe37ca60bcee0e73314) ) /* Plane 3 */
|
||||
ROM_END
|
||||
|
||||
/****************************************
|
||||
@ -1023,6 +1025,8 @@ ROM_END
|
||||
NEO-MVS PROG42G / NEO-MVS CHA42G
|
||||
. NGH-018
|
||||
NEO-AEG PROG42G / NEO-AEG CHA42G
|
||||
. prototype
|
||||
NEO-AEG PROG-EP / NEO-AEG CHA-EP
|
||||
****************************************/
|
||||
|
||||
ROM_START( burningf ) /* MVS AND AES VERSION */
|
||||
@ -1067,32 +1071,32 @@ ROM_START( burningfh ) /* AES VERSION (US) */
|
||||
ROM_LOAD16_BYTE( "018-c4.c4", 0x200001, 0x100000, CRC(e2e0aff7) SHA1(1c691c092a6e2787de4f433b0eb9252bfdaa7e16) ) /* Plane 2,3 */ /* HN62408 */
|
||||
ROM_END
|
||||
|
||||
ROM_START( burningfp ) /* early prototype - all roms were hand labeled with CRCs, dumps verified against them */
|
||||
ROM_START( burningfp ) /* early prototype - all roms were hand labeled with CRCs, dumps verified against them */ /* AES VERSION */
|
||||
ROM_REGION( 0x100000, "maincpu", 0 )
|
||||
ROM_LOAD16_BYTE( "proto_018-p1.p1", 0x000001, 0x080000, CRC(5b4032e7) SHA1(55df91dad6f484d3d49c28ab5972700bf71a8662) )
|
||||
ROM_LOAD16_BYTE( "proto_018-p2.p2", 0x000000, 0x080000, CRC(78762f68) SHA1(12170fc6efe75cb5d32624033d3d341032c97548) )
|
||||
ROM_LOAD16_BYTE( "018_p1_9397.p1", 0x000001, 0x080000, CRC(5b4032e7) SHA1(55df91dad6f484d3d49c28ab5972700bf71a8662) )
|
||||
ROM_LOAD16_BYTE( "018_p2_e335.p2", 0x000000, 0x080000, CRC(78762f68) SHA1(12170fc6efe75cb5d32624033d3d341032c97548) )
|
||||
|
||||
NEO_SFIX_128K( "proto_018-s1.s1", CRC(f3d130e8) SHA1(2fdeb93f4bb2a60d391cac2822be41661b1e1795) )
|
||||
NEO_SFIX_128K( "018_s1_9899.s1", CRC(f3d130e8) SHA1(2fdeb93f4bb2a60d391cac2822be41661b1e1795) )
|
||||
|
||||
NEO_BIOS_AUDIO_128K( "proto_018-m1.m1", CRC(470dd5d4) SHA1(4291811b4aefe45261a1ae3631b6999fcd74fb3f) )
|
||||
NEO_BIOS_AUDIO_128K( "018_m1_4586.m1", CRC(470dd5d4) SHA1(4291811b4aefe45261a1ae3631b6999fcd74fb3f) )
|
||||
|
||||
ROM_REGION( 0x200000, "ymsnd", 0 )
|
||||
ROM_LOAD( "proto_018-v11.v11", 0x000000, 0x080000, CRC(dc07ea3c) SHA1(c3e71aaec44ead7ddc581565d16b90030e6db5fd) )
|
||||
ROM_LOAD( "proto_018-v12.v12", 0x080000, 0x080000, CRC(f1ae637c) SHA1(02a4c7d4a544350a314ab7b26d8c9d3baa8f5778) )
|
||||
ROM_LOAD( "proto_018-v21.v21", 0x100000, 0x080000, CRC(9f3b4eda) SHA1(7f516923d04daa483b4b99c9babba66505931a34) )
|
||||
ROM_LOAD( "018_v11_56ac.v11", 0x000000, 0x080000, CRC(dc07ea3c) SHA1(c3e71aaec44ead7ddc581565d16b90030e6db5fd) )
|
||||
ROM_LOAD( "018_v12_db95.v12", 0x080000, 0x080000, CRC(f1ae637c) SHA1(02a4c7d4a544350a314ab7b26d8c9d3baa8f5778) )
|
||||
ROM_LOAD( "018_v21_98dd.v21", 0x100000, 0x080000, CRC(9f3b4eda) SHA1(7f516923d04daa483b4b99c9babba66505931a34) )
|
||||
|
||||
ROM_REGION( 0x080000, "ymsnd.deltat", 0 )
|
||||
ROM_COPY( "ymsnd", 0x100000, 0x00000, 0x80000 )
|
||||
|
||||
ROM_REGION( 0x400000, "sprites", 0 ) // note, ROM_LOAD32_BYTE
|
||||
ROM_LOAD32_BYTE( "proto_018-c1.c1", 0x000000, 0x80000, CRC(6569018b) SHA1(25040e0a9c2b72900100a22a2a41de5f6c339d8a) ) /* Plane 0 */
|
||||
ROM_LOAD32_BYTE( "proto_018-c2.c2", 0x000002, 0x80000, CRC(6949b501) SHA1(d8ee48837faff6cc849046ee8757b2b94d440303) ) /* Plane 2 */
|
||||
ROM_LOAD32_BYTE( "proto_018-c3.c3", 0x000001, 0x80000, CRC(410f653b) SHA1(ce94667721baa7b2c318fc268e3bb9209671c9f5) ) /* Plane 1 */
|
||||
ROM_LOAD32_BYTE( "proto_018-c4.c4", 0x000003, 0x80000, CRC(d43bf2a5) SHA1(c27985d8973611d02570f469a0d8cb4f5b63b614) ) /* Plane 3 */
|
||||
ROM_LOAD32_BYTE( "proto_018-c5.c5", 0x200000, 0x80000, CRC(837d09d3) SHA1(d3b06931fca6123604549599544b04529ef34c53) ) /* Plane 0 */
|
||||
ROM_LOAD32_BYTE( "proto_018-c6.c6", 0x200002, 0x80000, CRC(5fee51e7) SHA1(835c632fa12a1d5b4104cd80b8f686ac80b314a1) ) /* Plane 2 */
|
||||
ROM_LOAD32_BYTE( "proto_018-c7.c7", 0x200001, 0x80000, CRC(0f3f0823) SHA1(ec1d681c1795de43d20f30f85956e2473ec39c95) ) /* Plane 1 */
|
||||
ROM_LOAD32_BYTE( "proto_018-c8.c8", 0x200003, 0x80000, CRC(67cc9e34) SHA1(dc72a464c1456a4d2f7b992b416a984fb7885e99) ) /* Plane 3 */
|
||||
ROM_LOAD32_BYTE( "018_c1_ba06.c11", 0x000000, 0x80000, CRC(6569018b) SHA1(25040e0a9c2b72900100a22a2a41de5f6c339d8a) ) /* Plane 0 */
|
||||
ROM_LOAD32_BYTE( "018_c2_d534.c12", 0x000002, 0x80000, CRC(6949b501) SHA1(d8ee48837faff6cc849046ee8757b2b94d440303) ) /* Plane 2 */
|
||||
ROM_LOAD32_BYTE( "018_c3_9d70.c13", 0x000001, 0x80000, CRC(410f653b) SHA1(ce94667721baa7b2c318fc268e3bb9209671c9f5) ) /* Plane 1 */
|
||||
ROM_LOAD32_BYTE( "018_c4_bf9d.c14", 0x000003, 0x80000, CRC(d43bf2a5) SHA1(c27985d8973611d02570f469a0d8cb4f5b63b614) ) /* Plane 3 */
|
||||
ROM_LOAD32_BYTE( "018_c5_ac9d.c15", 0x200000, 0x80000, CRC(837d09d3) SHA1(d3b06931fca6123604549599544b04529ef34c53) ) /* Plane 0 */
|
||||
ROM_LOAD32_BYTE( "018_c6_d2a5.c16", 0x200002, 0x80000, CRC(5fee51e7) SHA1(835c632fa12a1d5b4104cd80b8f686ac80b314a1) ) /* Plane 2 */
|
||||
ROM_LOAD32_BYTE( "018_c7_d568.c17", 0x200001, 0x80000, CRC(0f3f0823) SHA1(ec1d681c1795de43d20f30f85956e2473ec39c95) ) /* Plane 1 */
|
||||
ROM_LOAD32_BYTE( "018_c8_d256.c18", 0x200003, 0x80000, CRC(67cc9e34) SHA1(dc72a464c1456a4d2f7b992b416a984fb7885e99) ) /* Plane 3 */
|
||||
ROM_END
|
||||
|
||||
/****************************************
|
||||
@ -1287,6 +1291,9 @@ ROM_END
|
||||
. NGM-024
|
||||
NEO-MVS PROG42G-1 / NEO-MVS CHA42G-1
|
||||
. NGH-024
|
||||
|
||||
. prototype
|
||||
NEO-MVS PROG-EP / NEO-MVS CHA-EPG
|
||||
****************************************/
|
||||
|
||||
ROM_START( lresort )
|
||||
@ -1310,32 +1317,32 @@ ROM_START( lresort )
|
||||
ROM_LOAD16_BYTE( "024-c4.c4", 0x200001, 0x080000, CRC(7382fefb) SHA1(e916dec5bb5462eb9ae9711f08c7388937abb980) ) /* Plane 2,3 */ /* TC534200 */
|
||||
ROM_END
|
||||
|
||||
ROM_START( lresortp ) /* prototype - all roms were hand labeled with CRCs */
|
||||
ROM_START( lresortp ) /* prototype - all roms were hand labeled with CRCs */ /* MVS VERSION */
|
||||
ROM_REGION( 0x100000, "maincpu", 0 )
|
||||
ROM_LOAD16_BYTE( "024_p1_5937.bin", 0x000001, 0x080000, CRC(8e6008ee) SHA1(6779663118782207156dc9fa9e24e81e30c6391c) )
|
||||
ROM_LOAD16_BYTE( "024_p2_8d37.bin", 0x000000, 0x080000, CRC(6d9ee90f) SHA1(ecd42182988092417bc96db8301ea408e47735f2) )
|
||||
ROM_LOAD16_BYTE( "024_p1_5937.podd", 0x000001, 0x080000, CRC(8e6008ee) SHA1(6779663118782207156dc9fa9e24e81e30c6391c) )
|
||||
ROM_LOAD16_BYTE( "024_p2_8d37.peven", 0x000000, 0x080000, CRC(6d9ee90f) SHA1(ecd42182988092417bc96db8301ea408e47735f2) )
|
||||
|
||||
NEO_SFIX_128K( "024_s1_22fe.bin", CRC(5cef5cc6) SHA1(9ec305007bdb356e9f8f279beae5e2bcb3f2cf7b) )
|
||||
NEO_SFIX_128K( "024_s1_22fe.s1", CRC(5cef5cc6) SHA1(9ec305007bdb356e9f8f279beae5e2bcb3f2cf7b) )
|
||||
|
||||
NEO_BIOS_AUDIO_128K( "024_m1_fc7a.bin", CRC(22122875) SHA1(540c21559163381467679f836cb068adaf526659) )
|
||||
NEO_BIOS_AUDIO_128K( "024_m1_fc7a.m1", CRC(22122875) SHA1(540c21559163381467679f836cb068adaf526659) )
|
||||
|
||||
ROM_REGION( 0x200000, "ymsnd", 0 )
|
||||
ROM_LOAD( "024_v11_b085.bin", 0x000000, 0x080000, CRC(0722da38) SHA1(66a9b463d5277908b3a01c03de82b3de9118f2cb) ) // 024_v11_b085.bin 024-v1.v1 [1/2] IDENTICAL
|
||||
ROM_LOAD( "024_v12_d3b7.bin", 0x080000, 0x080000, CRC(670ce3ec) SHA1(9004aa85d4a9b0ecf9cf9357b073ed55a98fdb02) ) // 024_v12_d3b7.bin 024-v1.v1 [2/2] IDENTICAL
|
||||
ROM_LOAD( "024_v13_a31e.bin", 0x100000, 0x080000, CRC(2e39462b) SHA1(b0a9b1a3377bf0369f3020192505c46ca52927d6) ) // 024_v13_a31e.bin 024-v2.v2 [1/2] IDENTICAL
|
||||
ROM_LOAD( "024_v24_2f0f.bin", 0x180000, 0x080000, CRC(7944754f) SHA1(d42a46c5127c6c62041ebffb0007af8a24abd360) ) // 024_v24_2f0f.bin 024-v2.v2 [2/2] IDENTICAL
|
||||
ROM_LOAD( "024_v11_b085.v11", 0x000000, 0x080000, CRC(0722da38) SHA1(66a9b463d5277908b3a01c03de82b3de9118f2cb) ) // 024_v11_b085.bin 024-v1.v1 [1/2] IDENTICAL
|
||||
ROM_LOAD( "024_v12_d3b7.v12", 0x080000, 0x080000, CRC(670ce3ec) SHA1(9004aa85d4a9b0ecf9cf9357b073ed55a98fdb02) ) // 024_v12_d3b7.bin 024-v1.v1 [2/2] IDENTICAL
|
||||
ROM_LOAD( "024_v13_a31e.v13", 0x100000, 0x080000, CRC(2e39462b) SHA1(b0a9b1a3377bf0369f3020192505c46ca52927d6) ) // 024_v13_a31e.bin 024-v2.v2 [1/2] IDENTICAL
|
||||
ROM_LOAD( "024_v24_2f0f.v24", 0x180000, 0x080000, CRC(7944754f) SHA1(d42a46c5127c6c62041ebffb0007af8a24abd360) ) // 024_v24_2f0f.bin 024-v2.v2 [2/2] IDENTICAL
|
||||
|
||||
NO_DELTAT_REGION
|
||||
|
||||
ROM_REGION( 0x400000, "sprites", 0 ) // note, ROM_LOAD32_BYTE
|
||||
ROM_LOAD32_BYTE( "024_c1_b764.bin", 0x000000, 0x80000, CRC(677749ec) SHA1(6f94675e037956a380652ab1056e6f1dec605bec) ) /* Plane 0 */
|
||||
ROM_LOAD32_BYTE( "024_c2_1951.bin", 0x000002, 0x80000, CRC(104d7b59) SHA1(404e8776ee8df4ca282eb7b747759af8628ddca1) ) /* Plane 2 */
|
||||
ROM_LOAD32_BYTE( "024_c3_0f63.bin", 0x000001, 0x80000, CRC(b0965a74) SHA1(e8026dd4f722ccab9c913261d09ab8843ef56a0e) ) /* Plane 1 */
|
||||
ROM_LOAD32_BYTE( "024_c4_c5b5.bin", 0x000003, 0x80000, CRC(dcfc3860) SHA1(8443b455ae8de656adab57f3b7e68919f22d3b9d) ) /* Plane 3 */
|
||||
ROM_LOAD32_BYTE( "024_c5_dd03.bin", 0x200000, 0x80000, CRC(50322397) SHA1(3308fbe48ad165b9894a52fc3a8d9898bbbc0c0e) ) /* Plane 0 */
|
||||
ROM_LOAD32_BYTE( "024_c6_c81a.bin", 0x200002, 0x80000, CRC(c3c93894) SHA1(f23b9d7e2b54d44c96370dde282bdf45cebd9cba) ) /* Plane 2 */
|
||||
ROM_LOAD32_BYTE( "024_c7_5edc.bin", 0x200001, 0x80000, CRC(21faf72b) SHA1(00bf257b06180ae6ede57744cea6257b3488d9f0) ) /* Plane 1 */
|
||||
ROM_LOAD32_BYTE( "024_c8_0850.bin", 0x200003, 0x80000, CRC(fb57217b) SHA1(607a98da754e8b1dd94a6432b21a36cc38e06a0f) ) /* Plane 3 */
|
||||
ROM_LOAD32_BYTE( "024_c1_b764.c1", 0x000000, 0x80000, CRC(677749ec) SHA1(6f94675e037956a380652ab1056e6f1dec605bec) ) /* Plane 0 */
|
||||
ROM_LOAD32_BYTE( "024_c2_1951.c2", 0x000002, 0x80000, CRC(104d7b59) SHA1(404e8776ee8df4ca282eb7b747759af8628ddca1) ) /* Plane 2 */
|
||||
ROM_LOAD32_BYTE( "024_c3_0f63.c3", 0x000001, 0x80000, CRC(b0965a74) SHA1(e8026dd4f722ccab9c913261d09ab8843ef56a0e) ) /* Plane 1 */
|
||||
ROM_LOAD32_BYTE( "024_c4_c5b5.c4", 0x000003, 0x80000, CRC(dcfc3860) SHA1(8443b455ae8de656adab57f3b7e68919f22d3b9d) ) /* Plane 3 */
|
||||
ROM_LOAD32_BYTE( "024_c5_dd03.c5", 0x200000, 0x80000, CRC(50322397) SHA1(3308fbe48ad165b9894a52fc3a8d9898bbbc0c0e) ) /* Plane 0 */
|
||||
ROM_LOAD32_BYTE( "024_c6_c81a.c6", 0x200002, 0x80000, CRC(c3c93894) SHA1(f23b9d7e2b54d44c96370dde282bdf45cebd9cba) ) /* Plane 2 */
|
||||
ROM_LOAD32_BYTE( "024_c7_5edc.c7", 0x200001, 0x80000, CRC(21faf72b) SHA1(00bf257b06180ae6ede57744cea6257b3488d9f0) ) /* Plane 1 */
|
||||
ROM_LOAD32_BYTE( "024_c8_0850.c8", 0x200003, 0x80000, CRC(fb57217b) SHA1(607a98da754e8b1dd94a6432b21a36cc38e06a0f) ) /* Plane 3 */
|
||||
ROM_END
|
||||
|
||||
|
||||
|
@ -1528,22 +1528,7 @@ ROM_START( aes )
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 1, "neo-po.bin", 0x00000, 0x020000, CRC(16d0c132) SHA1(4e4a440cae46f3889d20234aebd7f8d5f522e22c) ) /* AES Console (Japan) Bios */
|
||||
ROM_SYSTEM_BIOS( 2, "devel", "Development System ROM" )
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 2, "neodebug.rom", 0x00000, 0x020000, CRC(698ebb7d) SHA1(081c49aa8cc7dad5939833dc1b18338321ea0a07) ) /* Official debug (development) ROM, for home-use base board */
|
||||
ROM_SYSTEM_BIOS( 3, "unibios31", "Universe Bios (Hack, Ver. 3.1)" )
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 3, "uni-bios_3_1.rom", 0x00000, 0x020000, CRC(0c58093f) SHA1(29329a3448c2505e1ff45ffa75e61e9693165153) ) /* Universe Bios v3.1 (hack) */
|
||||
ROM_SYSTEM_BIOS( 4, "unibios30", "Universe Bios (Hack, Ver. 3.0)" )
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 4, "uni-bios_3_0.rom", 0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f) ) /* Universe Bios v3.0 (hack) */
|
||||
ROM_SYSTEM_BIOS( 5, "unibios23", "Universe Bios (Hack, Ver. 2.3)" )
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 5, "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0) ) /* Universe Bios v2.3 (hack) */
|
||||
ROM_SYSTEM_BIOS( 6, "unibios23o", "Universe Bios (Hack, Ver. 2.3, older?)" )
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 6, "uni-bios_2_3o.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe Bios v2.3 (hack) alt version, withdrawn? */
|
||||
ROM_SYSTEM_BIOS( 7, "unibios22", "Universe Bios (Hack, Ver. 2.2)" )
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 7, "uni-bios_2_2.rom", 0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c) ) /* Universe Bios v2.2 (hack) */
|
||||
ROM_SYSTEM_BIOS( 8, "unibios21", "Universe Bios (Hack, Ver. 2.1)" )
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 8, "uni-bios_2_1.rom", 0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c) ) /* Universe Bios v2.1 (hack) */
|
||||
ROM_SYSTEM_BIOS( 9, "unibios20", "Universe Bios (Hack, Ver. 2.0)" )
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 9, "uni-bios_2_0.rom", 0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e) ) /* Universe Bios v2.0 (hack) */
|
||||
ROM_SYSTEM_BIOS(10, "unibios13", "Universe Bios (Hack, Ver. 1.3)" )
|
||||
ROM_LOAD16_WORD_SWAP_BIOS(10, "uni-bios_1_3.rom", 0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e) ) /* Universe Bios v1.3 (hack) - note: versions older than 1.3 don't support AES hardware */
|
||||
NEOGEO_UNIBIOS(3)
|
||||
|
||||
ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
|
||||
|
||||
|
@ -356,10 +356,12 @@ WRITE16_MEMBER(notetaker_state::FIFOBus_w)
|
||||
|
||||
WRITE16_MEMBER( notetaker_state::DiskReg_w )
|
||||
{
|
||||
// See http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19781023_More_NoteTaker_IO_Information.pdf but note that bit 12 (called bit 3 in documentation) was changed between oct 1978 and 1979 to reset the disk controller digital-PLL as ClrDiskCont' rather than acting as ProgBitClk0, which is permanently wired high instead, meaning only the 4.5Mhz - 18Mhz dot clocks are available for the CRTC.
|
||||
m_ADCSpd0 = (data&0x8000)?1:0;
|
||||
m_ADCSpd1 = (data&0x4000)?1:0;
|
||||
m_StopWordClock_q = (data&0x2000)?1:0;
|
||||
m_ClrDiskCont_q = (data&0x1000)?1:0;
|
||||
//if ((!(m_ClrDiskCont_q)) && (data&0x1000)) m_floppy->device_reset(); // reset on rising edge
|
||||
m_ClrDiskCont_q = (data&0x1000)?1:0; // originally ProgBitClk0, but co-opted later to reset the FDC's external PLL
|
||||
m_ProgBitClk1 = (data&0x0800)?1:0;
|
||||
m_ProgBitClk2 = (data&0x0400)?1:0;
|
||||
m_ProgBitClk3 = (data&0x0200)?1:0;
|
||||
@ -367,11 +369,40 @@ WRITE16_MEMBER( notetaker_state::DiskReg_w )
|
||||
m_AnSel2 = (data&0x80)?1:0;
|
||||
m_AnSel1 = (data&0x40)?1:0;
|
||||
m_DriveSel1 = (data&0x20)?1:0;
|
||||
m_DriveSel2 = (data&0x10)?1:0;
|
||||
m_DriveSel3 = (data&0x08)?1:0;
|
||||
m_DriveSel2 = (data&0x10)?1:0; // drive 2 not present on hardware, but could work if present
|
||||
m_DriveSel3 = (data&0x08)?1:0; // drive 3 not present on hardware, but could work if present
|
||||
m_SideSelect = (data&0x04)?1:0;
|
||||
m_Disk5VOn = (data&0x02)?1:0;
|
||||
m_Disk12VOn = (data&0x01)?1:0;
|
||||
|
||||
// ADC stuff
|
||||
//TODO
|
||||
|
||||
// FDC stuff
|
||||
// first handle the motor stuff; we'll clobber whatever was in m_floppy, then reset it to what it should be
|
||||
m_floppy = m_floppy0->get_device();
|
||||
m_floppy->mon_w(!(m_Disk5VOn && m_Disk12VOn)); // Disk5VOn and 12VOn can be thought of as a crude MotorOn signal as the motor won't run with either? of them missing.
|
||||
//m_floppy = m_floppy0->get_device();
|
||||
//m_floppy->mon_w(!(m_Disk5VOn && m_Disk12VOn)); // Disk5VOn and 12VOn can be thought of as a crude MotorOn signal as the motor won't run with either? of them missing.
|
||||
//m_floppy = m_floppy0->get_device();
|
||||
//m_floppy->mon_w(!(m_Disk5VOn && m_Disk12VOn)); // Disk5VOn and 12VOn can be thought of as a crude MotorOn signal as the motor won't run with either? of them missing.
|
||||
// now restore m_floppy state to what it should be
|
||||
if (m_DriveSel1) m_floppy = m_floppy0->get_device();
|
||||
//else if (m_DriveSel2) m_floppy = m_floppy1->get_device();
|
||||
//else if (m_DriveSel3) m_floppy = m_floppy2->get_device();
|
||||
else m_floppy = nullptr;
|
||||
m_fdc->set_floppy(m_floppy); // select the floppy
|
||||
if (m_floppy)
|
||||
{
|
||||
m_floppy->ss_w(m_SideSelect);
|
||||
}
|
||||
// Disk5VOn and 12VOn can be thought of as a crude MotorOn signal as the motor won't run with either? of them missing.
|
||||
//m_floppy0->mon_w(!(m_Disk5VOn && m_Disk12VOn));
|
||||
//m_floppy1->mon_w(!(m_Disk5VOn && m_Disk12VOn));
|
||||
//m_floppy2->mon_w(!(m_Disk5VOn && m_Disk12VOn));
|
||||
|
||||
// CRTC clock rate stuff
|
||||
//TODO
|
||||
}
|
||||
|
||||
WRITE16_MEMBER( notetaker_state::LoadDispAddr_w )
|
||||
@ -557,7 +588,7 @@ static ADDRESS_MAP_START(notetaker_iocpu_io, AS_IO, 16, notetaker_state)
|
||||
AM_RANGE(0x60, 0x61) AM_MIRROR(0x7E1E) AM_WRITE(FIFOReg_w) // DAC sample and hold and frequency setup
|
||||
//AM_RANGE(0xa0, 0xa1) AM_MIRROR(0x7E18) AM_DEVREADWRITE("debug8255", 8255_device, read, write) // debugger board 8255
|
||||
AM_RANGE(0xc0, 0xc1) AM_MIRROR(0x7E1E) AM_WRITE(FIFOBus_w) // DAC data write to FIFO
|
||||
AM_RANGE(0x100, 0x101) AM_MIRROR(0x7E1E) AM_WRITE(DiskReg_w) // I/O register (adc speed, crtc pixel clock enable, +5 and +12v relays for floppy, etc)
|
||||
AM_RANGE(0x100, 0x101) AM_MIRROR(0x7E1E) AM_WRITE(DiskReg_w) // I/O register (adc speed, crtc pixel clock and clock enable, +5 and +12v relays for floppy, etc)
|
||||
AM_RANGE(0x120, 0x127) AM_MIRROR(0x7E18) AM_DEVREADWRITE8("wd1791", fd1791_t, read, write, 0x00FF) // floppy controller
|
||||
AM_RANGE(0x140, 0x15f) AM_MIRROR(0x7E00) AM_DEVREADWRITE8("crt5027", crt5027_device, read, write, 0x00FF) // crt controller
|
||||
AM_RANGE(0x160, 0x161) AM_MIRROR(0x7E1E) AM_WRITE(LoadDispAddr_w) // loads the start address for the display framebuffer
|
||||
@ -584,8 +615,8 @@ irq7 VSync (interrupt from the VSYN VSync pin from the crt5027)
|
||||
|
||||
/* writes during boot of io roms v2.0:
|
||||
0x88 to port 0x020 (PCR; BootSeqDone(1), processor not locked(0), battery charger off(0), rom not disabled(0) correction off&cr4 off(1), cr3 on(0), cr2 on(0), cr1 on (0);)
|
||||
0x02 to port 0x100 (IOR write: enable 5v only relay control)
|
||||
0x03 to port 0x100 (IOR write: in addition to above, enable 12v relay control)
|
||||
0x0002 to port 0x100 (IOR write: enable 5v only relay control)
|
||||
0x0003 to port 0x100 (IOR write: in addition to above, enable 12v relay control)
|
||||
<dram memory 0x00000-0x3ffff is zeroed here>
|
||||
0x13 to port 0x000 PIC (ICW1, 8085 vector 0b000[ignored], edge trigger mode, interval of 8, single mode (no cascade/ICW3), ICW4 needed )
|
||||
0x08 to port 0x002 PIC (ICW2, T7-T3 = 0b00001)
|
||||
@ -595,14 +626,14 @@ irq7 VSync (interrupt from the VSYN VSync pin from the crt5027)
|
||||
0x0000 to port 0x1ae (reset UART)
|
||||
0x0016 to port 0x048 (kbd control reg write)
|
||||
0x0005 to port 0x1a8 (UART control reg write)
|
||||
0x5f to port 0x140 \
|
||||
0xf2 to port 0x142 \
|
||||
0x7d to port 0x144 \
|
||||
0x1d to port 0x146 \_ set up CRTC
|
||||
0x04 to port 0x148 /
|
||||
0x10 to port 0x14a /
|
||||
0x00 to port 0x154 /
|
||||
0x1e to port 0x15a /
|
||||
0x5f to port 0x140 (reg0 95 horizontal lines) \
|
||||
0xf2 to port 0x142 (reg1 interlaced, hswidth=0xE, hsdelay=2) \
|
||||
0x7d to port 0x144 (reg2 16 scans/row, 5 chars/datarow) \
|
||||
0x1d to port 0x146 (reg3 0 skew bits, 0x1D datarows/frame) \_ set up CRTC
|
||||
0x04 to port 0x148 (reg4 4 scan lines/frame /
|
||||
0x10 to port 0x14a (reg5 0x10 vdatastart) /
|
||||
0x00 to port 0x154 (reset the crtc) /
|
||||
0x1e to port 0x15a (reg8 load cursor line address = 0x1e) /
|
||||
0x0a03 to port 0x100 (IOR write: set bit clock to 12Mhz)
|
||||
0x2a03 to port 0x100 (IOR write: enable crtc clock chain)
|
||||
0x00 to port 0x15c (fire off crtc timing chain)
|
||||
@ -613,8 +644,8 @@ read from 0x44 (byte wide) to check input fifo status
|
||||
... more stuff here missing relating to making the beep tone through fifo
|
||||
(around pc=6b6) read keyboard uart until mouse button is clicked (WaitNoBug)
|
||||
(around pc=6bc) read keyboard uart until mouse button is released (WaitBug)
|
||||
0x2a23 to port 0x100 (select drive 2)
|
||||
0x2a23 to port 0x100 (select drive 2)
|
||||
0x2a23 to port 0x100 (select drive 1)
|
||||
0x2a23 to port 0x100 (select drive 1)
|
||||
0x3a23 to port 0x100 (unset disk separator clear (allow disk head reading))
|
||||
0x3a27 to port 0x100 (select disk side 1)
|
||||
0x3a07 to port 0x100 (unselect all drives)
|
||||
@ -653,8 +684,12 @@ void notetaker_state::machine_start()
|
||||
// allocate the DAC timer, and set it to fire NEVER. We'll set it up properly in IPReset.
|
||||
m_FIFO_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(notetaker_state::timer_fifoclk),this));
|
||||
m_FIFO_timer->adjust(attotime::never);
|
||||
// floppy stuff
|
||||
m_floppy = NULL;
|
||||
// FDC: /DDEN is tied permanently LOW so MFM mode is ALWAYS ON
|
||||
m_fdc->dden_w(0);
|
||||
// Keyboard UART: /SWE is tied permanently LOW
|
||||
m_kbduart->set_input_pin(AY31015_SWE, 0); // status word outputs are permanently enabled (pin 16 SFD(SWE) tied low, active)
|
||||
// EIA UART: /SWE is tied permanently LOW
|
||||
m_eiauart->set_input_pin(AY31015_SWE, 0); // status word outputs are permanently enabled (pin 16 SFD(SWE) tied low, active)
|
||||
// savestate stuff
|
||||
// TODO: add me!
|
||||
}
|
||||
@ -669,11 +704,12 @@ void notetaker_state::machine_reset()
|
||||
/* IP Reset; this emulates the IPReset' signal */
|
||||
void notetaker_state::ip_reset()
|
||||
{
|
||||
// not-really-reset related, set line on Keybaord UART
|
||||
m_kbduart->set_input_pin(AY31015_SWE, 0); // status word outputs are permanently enabled (pin 16 SFD(SWE) tied low, active)
|
||||
// reset the Keyboard UART
|
||||
m_kbduart->set_input_pin(AY31015_XR, 0); // MR - pin 21
|
||||
m_kbduart->set_input_pin(AY31015_XR, 1); // ''
|
||||
// reset the EIA UART
|
||||
m_eiauart->set_input_pin(AY31015_XR, 0); // MR - pin 21
|
||||
m_eiauart->set_input_pin(AY31015_XR, 1); // ''
|
||||
// reset the IPConReg latch at #f1
|
||||
m_BootSeqDone = 0;
|
||||
m_ProcLock = 0;
|
||||
@ -683,6 +719,9 @@ void notetaker_state::ip_reset()
|
||||
m_LedInd6 = 0;
|
||||
m_LedInd7 = 0;
|
||||
m_LedInd8 = 0;
|
||||
// Clear the DAC FIFO
|
||||
for (int i=0; i<16; i++) m_outfifo[i] = 0;
|
||||
m_outfifo_count = m_outfifo_tail_ptr = m_outfifo_head_ptr = 0;
|
||||
// reset the FIFOReg latch at #h9
|
||||
m_TabletYOn = 0;
|
||||
m_TabletXOn = 0;
|
||||
@ -692,7 +731,10 @@ void notetaker_state::ip_reset()
|
||||
m_SHConB = 0;
|
||||
m_SHConA = 0;
|
||||
m_SetSH = 0;
|
||||
// reset the DiskReg latches at #c4 and #b4 on the disk/display controller board
|
||||
// handle consequences of above
|
||||
m_FIFO_timer->adjust(attotime::from_hz(((XTAL_960kHz/10)/4)/((m_FrSel0<<3)+(m_FrSel1<<2)+(m_FrSel2<<1)+1))); // FIFO timer is clocked by 960khz divided by 10 (74ls162 decade counter), divided by 4 (mc14568B with divider 1 pins set to 4), divided by 1,3,5,7,9,11,13,15 (or 0,2,4,6,8,10,12,14?)
|
||||
// todo: handle tablet and sample/hold stuff as well
|
||||
// reset the DiskReg latches at #c4 and #b4 on the disk/display/eia controller board
|
||||
m_ADCSpd0 = 0;
|
||||
m_ADCSpd1 = 0;
|
||||
m_StopWordClock_q = 0;
|
||||
@ -709,19 +751,17 @@ void notetaker_state::ip_reset()
|
||||
m_SideSelect = 0;
|
||||
m_Disk5VOn = 0;
|
||||
m_Disk12VOn = 0;
|
||||
// Clear the DAC FIFO
|
||||
for (int i=0; i<16; i++) m_outfifo[i] = 0;
|
||||
m_outfifo_count = m_outfifo_tail_ptr = m_outfifo_head_ptr = 0;
|
||||
// Reset the DAC Timer
|
||||
m_FIFO_timer->adjust(attotime::from_hz(((XTAL_960kHz/10)/4)/((m_FrSel0<<3)+(m_FrSel1<<2)+(m_FrSel2<<1)+1))); // FIFO timer is clocked by 960khz divided by 10 (74ls162 decade counter), divided by 4 (mc14568B with divider 1 pins set to 4), divided by 1,3,5,7,9,11,13,15 (or 0,2,4,6,8,10,12,14?)
|
||||
// stuff on display/eia board also reset by IPReset:
|
||||
// handle the consequences of the above.
|
||||
// Disk12VOn probably runs the drive motor, and MotorOn is hard-wired to low/active, so turn the motor for all drives OFF
|
||||
m_floppy = m_floppy0->get_device();
|
||||
m_floppy->mon_w(1);
|
||||
//m_floppy = m_floppy1->get_device();
|
||||
//m_floppy->mon_w(1);
|
||||
//m_floppy = m_floppy2->get_device();
|
||||
//m_floppy->mon_w(1);
|
||||
m_floppy = nullptr; // select no drive
|
||||
// reset the Framebuffer Display Address:
|
||||
m_DispAddr = 0;
|
||||
// reset the EIA UART
|
||||
m_eiauart->set_input_pin(AY31015_XR, 0); // MR - pin 21
|
||||
m_eiauart->set_input_pin(AY31015_XR, 1); // ''
|
||||
// reset the DiskReg latches at #c4 and #b4 on the disk/display/eia board
|
||||
// write me!
|
||||
}
|
||||
|
||||
/* EP Reset; this emulates the EPReset' signal */
|
||||
|
@ -23,7 +23,7 @@ If the output isn't satisfactory, it prints "I/O BOARD FAILURE".
|
||||
#include "emu.h"
|
||||
#include "cpu/i386/i386.h"
|
||||
#include "machine/pcshare.h"
|
||||
#include "video/pc_vga.h"
|
||||
#include "bus/isa/trident.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/ds128x.h"
|
||||
#include "machine/ins8250.h"
|
||||
@ -56,7 +56,7 @@ WRITE8_MEMBER(pcat_dyn_state::bank2_w)
|
||||
|
||||
static ADDRESS_MAP_START( pcat_map, AS_PROGRAM, 32, pcat_dyn_state )
|
||||
AM_RANGE(0x00000000, 0x0009ffff) AM_RAM
|
||||
AM_RANGE(0x000a0000, 0x000bffff) AM_DEVREADWRITE8("vga", vga_device, mem_r, mem_w, 0xffffffff)
|
||||
AM_RANGE(0x000a0000, 0x000bffff) AM_DEVREADWRITE8("vga", trident_vga_device, mem_r, mem_w, 0xffffffff)
|
||||
AM_RANGE(0x000c0000, 0x000c7fff) AM_ROM AM_REGION("video_bios", 0)
|
||||
AM_RANGE(0x000d0000, 0x000d0fff) AM_ROM AM_REGION("game_prg", 0x0000) AM_WRITE8(bank1_w, 0xffffffff)
|
||||
AM_RANGE(0x000d1000, 0x000d1fff) AM_ROM AM_REGION("game_prg", 0x1000) AM_WRITE8(bank2_w, 0xffffffff)
|
||||
@ -70,9 +70,9 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( pcat_io, AS_IO, 32, pcat_dyn_state )
|
||||
AM_IMPORT_FROM(pcat32_io_common)
|
||||
AM_RANGE(0x03b0, 0x03bf) AM_DEVREADWRITE8("vga", vga_device, port_03b0_r, port_03b0_w, 0xffffffff)
|
||||
AM_RANGE(0x03c0, 0x03cf) AM_DEVREADWRITE8("vga", vga_device, port_03c0_r, port_03c0_w, 0xffffffff)
|
||||
AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE8("vga", vga_device, port_03d0_r, port_03d0_w, 0xffffffff)
|
||||
AM_RANGE(0x03b0, 0x03bf) AM_DEVREADWRITE8("vga", trident_vga_device, port_03b0_r, port_03b0_w, 0xffffffff)
|
||||
AM_RANGE(0x03c0, 0x03cf) AM_DEVREADWRITE8("vga", trident_vga_device, port_03c0_r, port_03c0_w, 0xffffffff)
|
||||
AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE8("vga", trident_vga_device, port_03d0_r, port_03d0_w, 0xffffffff)
|
||||
AM_RANGE(0x03f8, 0x03ff) AM_DEVREADWRITE8("ns16550", ns16550_device, ins8250_r, ins8250_w, 0xffffffff)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -126,7 +126,7 @@ static MACHINE_CONFIG_START( pcat_dyn, pcat_dyn_state )
|
||||
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_FRAGMENT_ADD( pcvideo_vga )
|
||||
MCFG_FRAGMENT_ADD( pcvideo_trident_vga )
|
||||
MCFG_SCREEN_MODIFY("screen")
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
|
||||
|
@ -416,6 +416,7 @@ void ssem_state::glyph_print(bitmap_rgb32 &bitmap, INT32 x, INT32 y, Format &&fm
|
||||
{
|
||||
const rectangle &visarea = m_screen->visible_area();
|
||||
|
||||
m_glyph_print_buf.clear();
|
||||
m_glyph_print_buf.seekp(0, util::ovectorstream::beg);
|
||||
util::stream_format(m_glyph_print_buf, std::forward<Format>(fmt), std::forward<Params>(args)...);
|
||||
m_glyph_print_buf.put('\0');
|
||||
|
@ -22,9 +22,17 @@
|
||||
#include "formats/svi_cas.h"
|
||||
#include "bus/generic/slot.h"
|
||||
#include "bus/generic/carts.h"
|
||||
#include "bus/svi3x8/expander/expander.h"
|
||||
#include "softlist.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CONSTANTS & MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define IS_SVI328 (m_ram->size() == 64 * 1024)
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
@ -39,18 +47,32 @@ public:
|
||||
m_basic(*this, "basic"),
|
||||
m_speaker(*this, "speaker"),
|
||||
m_cassette(*this, "cassette"),
|
||||
m_cart(*this, "cartslot"),
|
||||
m_cart_rom(*this, "cartslot"),
|
||||
m_expander(*this, "exp"),
|
||||
m_keyboard(*this, "KEY"),
|
||||
m_buttons(*this, "BUTTONS"),
|
||||
m_intvdp(0), m_intexp(0),
|
||||
m_romdis(1), m_ramdis(1),
|
||||
m_cart(1), m_bk21(1),
|
||||
m_keyboard_row(0)
|
||||
{}
|
||||
|
||||
DECLARE_READ8_MEMBER( ppi_port_a_r );
|
||||
DECLARE_READ8_MEMBER( ppi_port_b_r );
|
||||
DECLARE_WRITE8_MEMBER( ppi_port_c_w );
|
||||
DECLARE_WRITE8_MEMBER( psg_port_b_w );
|
||||
DECLARE_WRITE8_MEMBER( bank_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( intvdp_w );
|
||||
|
||||
READ8_MEMBER( page1_r );
|
||||
WRITE8_MEMBER( page1_w );
|
||||
READ8_MEMBER( page2_r );
|
||||
WRITE8_MEMBER( page2_w );
|
||||
|
||||
// from expander bus
|
||||
DECLARE_WRITE_LINE_MEMBER( intexp_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( romdis_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( ramdis_w );
|
||||
|
||||
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cartridge);
|
||||
|
||||
protected:
|
||||
@ -58,17 +80,23 @@ protected:
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
void reset_memory_configuration();
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<ram_device> m_ram;
|
||||
required_memory_region m_basic;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_device<generic_slot_device> m_cart;
|
||||
required_device<generic_slot_device> m_cart_rom;
|
||||
required_device<svi_expander_device> m_expander;
|
||||
required_ioport_array<16> m_keyboard;
|
||||
required_ioport m_buttons;
|
||||
|
||||
int m_intvdp;
|
||||
int m_intexp;
|
||||
int m_romdis;
|
||||
int m_ramdis;
|
||||
int m_cart;
|
||||
int m_bk21;
|
||||
|
||||
UINT8 m_keyboard_row;
|
||||
};
|
||||
|
||||
@ -79,10 +107,13 @@ private:
|
||||
|
||||
static ADDRESS_MAP_START( svi3x8_mem, AS_PROGRAM, 8, svi3x8_state )
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x0000, 0x7fff) AM_READWRITE(page1_r, page1_w)
|
||||
AM_RANGE(0x8000, 0xffff) AM_READWRITE(page2_r, page2_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( svi3x8_io, AS_IO, 8, svi3x8_state )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
AM_RANGE(0x00, 0x7f) AM_DEVREADWRITE("exp", svi_expander_device, iorq_r, iorq_w)
|
||||
AM_RANGE(0x80, 0x80) AM_MIRROR(0x22) AM_DEVWRITE("vdp", tms9928a_device, vram_write)
|
||||
AM_RANGE(0x81, 0x81) AM_MIRROR(0x22) AM_DEVWRITE("vdp", tms9928a_device, register_write)
|
||||
AM_RANGE(0x84, 0x84) AM_MIRROR(0x22) AM_DEVREAD("vdp", tms9928a_device, vram_read)
|
||||
@ -261,7 +292,8 @@ WRITE_LINE_MEMBER( svi3x8_state::intvdp_w )
|
||||
{
|
||||
// note: schematics show a CNTRL line that allows switching between
|
||||
// IRQ and NMI for the interrupt
|
||||
m_maincpu->set_input_line(INPUT_LINE_IRQ0, state);
|
||||
m_intvdp = state;
|
||||
m_maincpu->set_input_line(INPUT_LINE_IRQ0, (m_intvdp || m_intexp) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -269,70 +301,91 @@ WRITE_LINE_MEMBER( svi3x8_state::intvdp_w )
|
||||
// MACHINE EMULATION
|
||||
//**************************************************************************
|
||||
|
||||
void svi3x8_state::reset_memory_configuration()
|
||||
{
|
||||
m_maincpu->space(AS_PROGRAM).install_rom(0x0000, 0x7fff, m_basic->base());
|
||||
|
||||
if (m_ram->size() == 64 * 1024)
|
||||
{
|
||||
// SVI-328
|
||||
m_maincpu->space(AS_PROGRAM).install_ram(0x8000, 0xffff, m_ram->pointer());
|
||||
}
|
||||
else
|
||||
{
|
||||
// SVI-318
|
||||
m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x8000, 0xbfff);
|
||||
m_maincpu->space(AS_PROGRAM).install_ram(0xc000, 0xffff, m_ram->pointer());
|
||||
}
|
||||
}
|
||||
|
||||
void svi3x8_state::machine_start()
|
||||
{
|
||||
// register for save states
|
||||
save_item(NAME(m_intvdp));
|
||||
save_item(NAME(m_intexp));
|
||||
save_item(NAME(m_romdis));
|
||||
save_item(NAME(m_ramdis));
|
||||
save_item(NAME(m_cart));
|
||||
save_item(NAME(m_bk21));
|
||||
save_item(NAME(m_keyboard_row));
|
||||
}
|
||||
|
||||
void svi3x8_state::machine_reset()
|
||||
{
|
||||
reset_memory_configuration();
|
||||
m_intvdp = 0;
|
||||
m_intexp = 0;
|
||||
m_romdis = 1;
|
||||
m_ramdis = 1;
|
||||
m_cart = 1;
|
||||
m_bk21 = 1;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( svi3x8_state::psg_port_b_w )
|
||||
READ8_MEMBER( svi3x8_state::page1_r)
|
||||
{
|
||||
reset_memory_configuration();
|
||||
if (m_cart == 0)
|
||||
return m_cart_rom->exists() ? m_cart_rom->read_rom(space, offset) : 0xff;
|
||||
|
||||
// CART
|
||||
if (BIT(data, 0) == 0)
|
||||
{
|
||||
if (m_cart->exists())
|
||||
m_maincpu->space(AS_PROGRAM).install_rom(0x0000, 0x7fff, m_cart->get_rom_base());
|
||||
else
|
||||
m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x0000, 0x7fff);
|
||||
}
|
||||
else
|
||||
{
|
||||
// BK21 (SV-328)
|
||||
if (BIT(data, 1) == 0)
|
||||
{
|
||||
if (m_ram->size() == 64 * 1024)
|
||||
m_maincpu->space(AS_PROGRAM).install_ram(0x0000, 0x7fff, m_ram->pointer() + 0x8000);
|
||||
else
|
||||
m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x0000, 0x7fff);
|
||||
UINT8 data = m_expander->mreq_r(space, offset);
|
||||
|
||||
if (m_romdis == 1)
|
||||
data = m_basic->u8(offset);
|
||||
|
||||
if (m_bk21 == 0 && IS_SVI328)
|
||||
data = m_ram->read(offset);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
// BK22 (SV-807)
|
||||
if (BIT(data, 2) == 0)
|
||||
m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x8000, 0xffff);
|
||||
WRITE8_MEMBER( svi3x8_state::page1_w)
|
||||
{
|
||||
if (m_cart == 0)
|
||||
return;
|
||||
|
||||
// BK31 (SV-807)
|
||||
if (BIT(data, 3) == 0)
|
||||
m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x0000, 0x7fff);
|
||||
m_expander->mreq_w(space, offset, data);
|
||||
|
||||
// BK32 (SV-807)
|
||||
if (BIT(data, 4) == 0)
|
||||
m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x8000, 0xffff);
|
||||
if (m_bk21 == 0 && IS_SVI328)
|
||||
m_ram->write(offset, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( svi3x8_state::page2_r)
|
||||
{
|
||||
offset += 0x8000;
|
||||
|
||||
UINT8 data = m_expander->mreq_r(space, offset);
|
||||
|
||||
if (m_ramdis == 1 && (offset >= 0x4000 || IS_SVI328))
|
||||
return m_ram->read(IS_SVI328 ? offset : offset - 0xc000);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( svi3x8_state::page2_w )
|
||||
{
|
||||
offset += 0x8000;
|
||||
|
||||
m_expander->mreq_w(space, offset, data);
|
||||
|
||||
if (m_ramdis == 1 && (offset >= 0x4000 || IS_SVI328))
|
||||
m_ram->write(IS_SVI328 ? offset : offset - 0xc000, data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( svi3x8_state::bank_w )
|
||||
{
|
||||
logerror("bank_w: %02x\n", data);
|
||||
|
||||
m_cart = BIT(data, 0);
|
||||
m_bk21 = BIT(data, 1);
|
||||
|
||||
m_expander->bk21_w(BIT(data, 1));
|
||||
m_expander->bk22_w(BIT(data, 2));
|
||||
m_expander->bk31_w(BIT(data, 3));
|
||||
m_expander->bk32_w(BIT(data, 4));
|
||||
|
||||
// TODO: handle ROM2/ROM3 enable (bit 6 + 7)
|
||||
|
||||
output().set_value("led_caps_lock", BIT(data, 5));
|
||||
}
|
||||
|
||||
@ -372,6 +425,22 @@ WRITE8_MEMBER( svi3x8_state::ppi_port_c_w )
|
||||
m_speaker->level_w(BIT(data, 7));
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( svi3x8_state::intexp_w )
|
||||
{
|
||||
m_intexp = state;
|
||||
m_maincpu->set_input_line(INPUT_LINE_IRQ0, (m_intvdp || m_intexp) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( svi3x8_state::romdis_w )
|
||||
{
|
||||
m_romdis = state;
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( svi3x8_state::ramdis_w )
|
||||
{
|
||||
m_ramdis = state;
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CARTRIDGE
|
||||
@ -379,7 +448,7 @@ WRITE8_MEMBER( svi3x8_state::ppi_port_c_w )
|
||||
|
||||
DEVICE_IMAGE_LOAD_MEMBER( svi3x8_state, cartridge )
|
||||
{
|
||||
UINT32 size = m_cart->common_get_size("rom");
|
||||
UINT32 size = m_cart_rom->common_get_size("rom");
|
||||
|
||||
if (size != 0x8000)
|
||||
{
|
||||
@ -387,8 +456,8 @@ DEVICE_IMAGE_LOAD_MEMBER( svi3x8_state, cartridge )
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
|
||||
m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
|
||||
m_cart_rom->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
|
||||
m_cart_rom->common_load_rom(m_cart_rom->get_rom_base(), size, "rom");
|
||||
|
||||
return IMAGE_INIT_PASS;
|
||||
}
|
||||
@ -427,7 +496,7 @@ static MACHINE_CONFIG_START( svi318, svi3x8_state )
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
MCFG_SOUND_ADD("psg", AY8910, XTAL_10_738635MHz / 6)
|
||||
MCFG_AY8910_PORT_A_READ_CB(IOPORT("JOY"))
|
||||
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi3x8_state, psg_port_b_w))
|
||||
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi3x8_state, bank_w))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
|
||||
|
||||
// cassette
|
||||
@ -442,6 +511,12 @@ static MACHINE_CONFIG_START( svi318, svi3x8_state )
|
||||
MCFG_GENERIC_EXTENSIONS("bin,rom")
|
||||
MCFG_GENERIC_LOAD(svi3x8_state, cartridge)
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list", "svi318_cart")
|
||||
|
||||
// expander bus
|
||||
MCFG_SVI_EXPANDER_BUS_ADD("exp")
|
||||
MCFG_SVI_EXPANDER_INT_HANDLER(WRITELINE(svi3x8_state, intexp_w))
|
||||
MCFG_SVI_EXPANDER_ROMDIS_HANDLER(WRITELINE(svi3x8_state, romdis_w))
|
||||
MCFG_SVI_EXPANDER_RAMDIS_HANDLER(WRITELINE(svi3x8_state, ramdis_w))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( svi318n, svi318 )
|
||||
|
@ -7,6 +7,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
/* Core includes */
|
||||
#include "emu.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
|
||||
class symbolics_state : public driver_device
|
||||
@ -21,11 +22,22 @@ public:
|
||||
|
||||
required_device<m68000_base_device> m_maincpu;
|
||||
DECLARE_DRIVER_INIT(symbolics);
|
||||
DECLARE_READ16_MEMBER(buserror_r);
|
||||
|
||||
//protected:
|
||||
// virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
};
|
||||
|
||||
READ16_MEMBER(symbolics_state::buserror_r)
|
||||
{
|
||||
if(!space.debugger_access())
|
||||
{
|
||||
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
Address Maps
|
||||
@ -34,14 +46,22 @@ public:
|
||||
Address maps (x = ignored; * = selects address within this range, ? = unknown, 1/0 = decodes only when this bit is set to 1/0)
|
||||
68k address map:
|
||||
a23 a22 a21 a20 a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 (a0 via UDS/LDS)
|
||||
? ? ? ? ? 0 0 0 0 * * * * * * * * * * * * * * 0 R ROM 00H
|
||||
? ? ? ? ? 0 0 0 0 * * * * * * * * * * * * * * 1 R ROM 00L
|
||||
? ? ? ? ? 0 0 0 1 * * * * * * * * * * * * * * 0 R ROM 04H
|
||||
? ? ? ? ? 0 0 0 1 * * * * * * * * * * * * * * 1 R ROM 04L
|
||||
? ? ? ? ? 0 0 1 0 x x x x x x x x x x x x x x 0 R Open bus?
|
||||
? ? ? ? ? 0 0 1 0 x x x x x x x x x x x x x x 1 R Open bus?
|
||||
? ? ? ? ? 0 0 1 1 * * * * * * * * * * * * * * 0 R ROM 10H
|
||||
? ? ? ? ? 0 0 1 1 * * * * * * * * * * * * * * 1 R ROM 10L
|
||||
? ? ? ? ? 0 0 0 0 0 * * * * * * * * * * * * * 0 R ROM 00H @D13 first half
|
||||
? ? ? ? ? 0 0 0 0 0 * * * * * * * * * * * * * 1 R ROM 00L @D7 first half
|
||||
? ? ? ? ? 0 0 0 0 1 * * * * * * * * * * * * * 0 R ROM 04H @D14 first half
|
||||
? ? ? ? ? 0 0 0 0 1 * * * * * * * * * * * * * 1 R ROM 04L @D8 first half
|
||||
? ? ? ? ? 0 0 0 1 0 * * * * * * * * * * * * * 0 R ROM 10H @D16 first half
|
||||
? ? ? ? ? 0 0 0 1 0 * * * * * * * * * * * * * 1 R ROM 10L @D10 first half
|
||||
? ? ? ? ? 0 0 0 1 1 * * * * * * * * * * * * * 0 R Open Bus (socket @D17 first half)
|
||||
? ? ? ? ? 0 0 0 1 1 * * * * * * * * * * * * * 1 R Open Bus (socket @D11 first half)
|
||||
? ? ? ? ? 0 0 1 0 0 * * * * * * * * * * * * * 0 R ROM 00H @D13 second half
|
||||
? ? ? ? ? 0 0 1 0 0 * * * * * * * * * * * * * 1 R ROM 00L @D7 second half
|
||||
? ? ? ? ? 0 0 1 0 1 * * * * * * * * * * * * * 0 R ROM 04H @D14 second half
|
||||
? ? ? ? ? 0 0 1 0 1 * * * * * * * * * * * * * 1 R ROM 04L @D8 second half
|
||||
? ? ? ? ? 0 0 1 1 0 * * * * * * * * * * * * * 0 R ROM 10H @D16 second half
|
||||
? ? ? ? ? 0 0 1 1 0 * * * * * * * * * * * * * 1 R ROM 10L @D10 second half
|
||||
? ? ? ? ? 0 0 1 1 1 * * * * * * * * * * * * * 0 R Open Bus (socket @D17 second half)
|
||||
? ? ? ? ? 0 0 1 1 1 * * * * * * * * * * * * * 1 R Open Bus (socket @D11 second half)
|
||||
? ? ? ? ? 0 1 * * * * * * * * * * * * * * * * * RW RAM <- recheck this, might be a weird hole between 20000-20fff ?
|
||||
? ? ? ? ? 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * ? Something maps here...
|
||||
| | | | |
|
||||
@ -49,10 +69,10 @@ a23 a22 a21 a20 a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4
|
||||
|
||||
static ADDRESS_MAP_START(m68k_mem, AS_PROGRAM, 16, symbolics_state )
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x000000, 0x00ffff) AM_ROM /* ROM */
|
||||
// 10000-17fff open bus here?
|
||||
AM_RANGE(0x018000, 0x01ffff) AM_ROM /* ROM */
|
||||
AM_RANGE(0x020000, 0x03ffff) AM_RAM /* Local FEP ram seems to be here? */
|
||||
AM_RANGE(0x000000, 0x01ffff) AM_ROM /* ROM lives here, and writing to 0x00-0x08 writes to the main lisp ram? */
|
||||
AM_RANGE(0x020000, 0x03ffff) AM_RAM /* Local FEP ram seems to be here? there are 18 mcm4164s on the pcb which probably map here, plus 2 parity bits? */
|
||||
//AM_RANGE(0x040000, 0xffffff) AM_READ(buserror_r);
|
||||
//AM_RANGE(0x800000, 0xffffff) AM_RAM /* paged access to lispm ram? */
|
||||
// there is stuff mapped at 40000 and ffxxx as well, ffxxx may be the main lisp cpu's microcode and macrocode areas
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -93,7 +113,8 @@ DRIVER_INIT_MEMBER(symbolics_state,symbolics)
|
||||
|
||||
static MACHINE_CONFIG_START( symbolics, symbolics_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* PLACEHOLDER CLOCK, TODO: add correct clock */
|
||||
//XTALS: 16MHz @H11, 4.9152MHz @J5, 66.67MHz @J10
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) /* MC68000L8 @A27; clock is guessed to be derived from the 16Mhz xtal @ H11 */
|
||||
MCFG_CPU_PROGRAM_MAP(m68k_mem)
|
||||
MCFG_CPU_IO_MAP(m68k_io)
|
||||
|
||||
@ -106,13 +127,50 @@ MACHINE_CONFIG_END
|
||||
ROM_START( s3600 )
|
||||
ROM_REGION16_BE(0x40000,"maincpu", 0)
|
||||
ROM_SYSTEM_BIOS( 0, "v127", "Symbolics 3600 L-Machine FEP V127")
|
||||
ROMX_LOAD("00h.127.27128.d13", 0x00000, 0x4000, CRC(b8d7c8da) SHA1(663a09359f5db63beeac00e5c2783ccc25b94250), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "00H.127"
|
||||
ROMX_LOAD("00l.127.27c128.d7", 0x00001, 0x4000, CRC(cc7bae9a) SHA1(057538eb821c4d00dde19cfe5136ccc0aee43800), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "00L.127"
|
||||
ROMX_LOAD("04h.127.27c128.d15", 0x08000, 0x4000, CRC(e01a717b) SHA1(b87a670f7be13553485ce88fad5fcf90f01473c4), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "04H.127"
|
||||
ROMX_LOAD("04l.127.27c128.d9", 0x08001, 0x4000, CRC(68d169fa) SHA1(d6fab3132fca332a9bedb174fddf5fc8c69d05b6), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "04L.127"
|
||||
ROMX_LOAD("10h.127.27c128.d16", 0x18000, 0x4000, CRC(2ea7a70d) SHA1(61cc97aada028612c24d788d946d77e82116cf30), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "10H.127"
|
||||
ROMX_LOAD("10l.127.27128.d10", 0x18001, 0x4000, CRC(b8ddb3c8) SHA1(e6c3b96340c5c767ef18abf48b73fa8e5d7353b9), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "10L.127"
|
||||
ROMX_LOAD("00h.127.27c128.d13", 0x00000, 0x2000, CRC(b8d7c8da) SHA1(663a09359f5db63beeac00e5c2783ccc25b94250), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "00H.127" @D13
|
||||
ROM_CONTINUE( 0x10000, 0x2000 )
|
||||
ROMX_LOAD("00l.127.27128.d7", 0x00001, 0x2000, CRC(cc7bae9a) SHA1(057538eb821c4d00dde19cfe5136ccc0aee43800), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "00L.127" @D7
|
||||
ROM_CONTINUE( 0x10001, 0x2000 )
|
||||
ROMX_LOAD("04h.127.27128.d14", 0x04000, 0x2000, CRC(e01a717b) SHA1(b87a670f7be13553485ce88fad5fcf90f01473c4), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "04H.127" @D14
|
||||
ROM_CONTINUE( 0x14000, 0x2000 )
|
||||
ROMX_LOAD("04l.127.27128.d8", 0x04001, 0x2000, CRC(68d169fa) SHA1(d6fab3132fca332a9bedb174fddf5fc8c69d05b6), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "04L.127" @D8
|
||||
ROM_CONTINUE( 0x14001, 0x2000 )
|
||||
ROMX_LOAD("10h.127.27128.d16", 0x08000, 0x2000, CRC(2ea7a70d) SHA1(61cc97aada028612c24d788d946d77e82116cf30), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "10H.127" @D16
|
||||
ROM_CONTINUE( 0x18000, 0x2000 )
|
||||
ROMX_LOAD("10l.127.27c128.d10", 0x08001, 0x2000, CRC(b8ddb3c8) SHA1(e6c3b96340c5c767ef18abf48b73fa8e5d7353b9), ROM_SKIP(1) | ROM_BIOS(1)) // Label: "10L.127" @D10
|
||||
ROM_CONTINUE( 0x18001, 0x2000 )
|
||||
// D17, D11 are empty sockets; these would map to 0x0c000-0ffff and 0x1c000-0x1ffff
|
||||
// note: load all the PLAs, PALs and PROMs here
|
||||
// picture is at https://4310b1a9-a-11c96037-s-sites.googlegroups.com/a/ricomputermuseum.org/home/Home/equipment/symbolics-3645/Symbolics_3645_FEP.jpg
|
||||
/*
|
||||
LBBUFA.4 mb7124 @A6
|
||||
LBBUFB.4 mb7124 @A7
|
||||
LBBUFC.4 mb7124 @A9
|
||||
LBAAR.4 @A12
|
||||
LBPAR.4A @A13
|
||||
PROCA.4 pal16R8A @A25
|
||||
HSADR.4 pal1???? @C4
|
||||
DYNMEM.5 pal16R8A @C20
|
||||
PCDYNCTL @C21
|
||||
REQSEL.4A @C22
|
||||
DY2ACK pal16L8A @C23
|
||||
PROC.4 pal? @C25
|
||||
UDMAHA.4 pal? @D3
|
||||
FEP 4642 16pprom? @D5
|
||||
HRSQ.4 pal @D6
|
||||
d7, d8, d10 are eproms, see above
|
||||
d11 is empty socket marked 2764
|
||||
d13, d14, d16 are eproms, see above
|
||||
d17 is empty socket marked 2764
|
||||
?DVZNUR? @E21 <- unreadable label, recheck!
|
||||
LDBD.4 pal16L8A @G18
|
||||
PAGTAG.5 @H20
|
||||
UDMABC.4 pal @I4
|
||||
SERDMA.4 @I8
|
||||
SERIAB.4 @I9
|
||||
LBARB.4 @I18
|
||||
SERCTL.4 @K6
|
||||
*/
|
||||
ROM_END
|
||||
|
||||
/******************************************************************************
|
||||
@ -120,4 +178,4 @@ ROM_END
|
||||
******************************************************************************/
|
||||
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS */
|
||||
COMP( 1984, s3600, 0, 0, symbolics, symbolics, symbolics_state, symbolics, "Symbolics", "3600", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
|
||||
COMP( 1984, s3600, 0, 0, symbolics, symbolics, symbolics_state, symbolics, "Symbolics", "3600", MACHINE_IS_SKELETON | MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
|
||||
|
@ -1005,30 +1005,30 @@ ROM_END
|
||||
|
||||
ROM_START( buccanrs )
|
||||
ROM_REGION( 0x30000, "maincpu", 0 ) /* 64k for code + 128k for bankswitching */
|
||||
ROM_LOAD( "11.u58", 0x00000, 0x10000, CRC(bf1d7e6f) SHA1(55dcf993515b57c3eb1fab98097a2171df3e38ed) ) // both halves are identical (correct for rom type on this board tho)
|
||||
ROM_LOAD( "12.u25", 0x10000, 0x10000, CRC(87303ba8) SHA1(49a25393e853b9adf7df00a6f9c38a526a02ea4e) )
|
||||
ROM_LOAD( "BC-011_K-163.U58", 0x00000, 0x10000, CRC(bf1d7e6f) SHA1(55dcf993515b57c3eb1fab98097a2171df3e38ed) ) // both halves are identical (correct for rom type on this board tho)
|
||||
ROM_LOAD( "BC-012_K-163.U25", 0x10000, 0x10000, CRC(87303ba8) SHA1(49a25393e853b9adf7df00a6f9c38a526a02ea4e) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for sound */
|
||||
ROM_LOAD( "1.u128", 0x00000, 0x10000, CRC(eb65f8c3) SHA1(82566becb630ce92303905dc0c5bef9e80e9caad) )
|
||||
ROM_LOAD( "BC-001_K-0161.U128", 0x00000, 0x10000, CRC(eb65f8c3) SHA1(82566becb630ce92303905dc0c5bef9e80e9caad) )
|
||||
|
||||
ROM_REGION( 0x20000, "gfx1", 0 )
|
||||
ROM_LOAD( "7.u212", 0x00000, 0x10000, CRC(95e3c517) SHA1(9954830ebc3a6414a3236f4e41981db082e5ea19) )
|
||||
ROM_LOAD( "8.u189", 0x10000, 0x10000, CRC(fe2377ab) SHA1(8578c5466d98f140fdfc41e91cd841e725786e32) )
|
||||
ROM_LOAD( "BC-003_K-0161.U212", 0x00000, 0x10000, CRC(95e3c517) SHA1(9954830ebc3a6414a3236f4e41981db082e5ea19) )
|
||||
ROM_LOAD( "BC-004_K-0161.U189", 0x10000, 0x10000, CRC(fe2377ab) SHA1(8578c5466d98f140fdfc41e91cd841e725786e32) )
|
||||
|
||||
ROM_REGION( 0x80000, "gfx2", 0 )
|
||||
ROM_LOAD( "3.u100", 0x00000, 0x10000, CRC(16dc435f) SHA1(0c13e9786b356770c84f94684697e43d0ea9e7cc) )
|
||||
ROM_LOAD( "BC-005_K-0161.U113", 0x00000, 0x10000, CRC(16dc435f) SHA1(0c13e9786b356770c84f94684697e43d0ea9e7cc) )
|
||||
ROM_CONTINUE( 0x20000, 0x10000 )
|
||||
ROM_LOAD( "4.u80", 0x10000, 0x10000, CRC(4fe3bf97) SHA1(7910ace1eed80bfafa1f9f057ed67e23aa446a22) )
|
||||
ROM_LOAD( "6.u52", 0x40000, 0x10000, CRC(078aef7f) SHA1(72e60d39d8af8bd31e9ae019b12620797eb0af7f) )
|
||||
ROM_LOAD( "BC-006_K-161.U80", 0x10000, 0x10000, CRC(4fe3bf97) SHA1(7910ace1eed80bfafa1f9f057ed67e23aa446a22) )
|
||||
ROM_LOAD( "BC-008_K-161.U52", 0x40000, 0x10000, CRC(078aef7f) SHA1(72e60d39d8af8bd31e9ae019b12620797eb0af7f) )
|
||||
ROM_CONTINUE( 0x60000, 0x10000 )
|
||||
ROM_LOAD( "5.u70", 0x50000, 0x10000, CRC(f650fa90) SHA1(c87081b4d6b09f865d08c5120da3d0fb3196a2c3) )
|
||||
ROM_LOAD( "BC-007_K-161.U70", 0x50000, 0x10000, CRC(f650fa90) SHA1(c87081b4d6b09f865d08c5120da3d0fb3196a2c3) )
|
||||
|
||||
ROM_REGION( 0x40000, "gfx3", 0 )
|
||||
ROM_LOAD( "9.u49", 0x20000, 0x20000, CRC(0c6188fb) SHA1(d49034384c6d0e94db2890223b32a2a49e79a639) )
|
||||
ROM_LOAD( "10.u27", 0x00000, 0x20000, CRC(2d383ff8) SHA1(3062baac27feba69c6ed94935c5ced72d89ed4fb) )
|
||||
ROM_LOAD( "BC-009_K-163.U49", 0x20000, 0x20000, CRC(0c6188fb) SHA1(d49034384c6d0e94db2890223b32a2a49e79a639) )
|
||||
ROM_LOAD( "BC-010_K-163.U27", 0x00000, 0x20000, CRC(2d383ff8) SHA1(3062baac27feba69c6ed94935c5ced72d89ed4fb) )
|
||||
|
||||
ROM_REGION( 0x10000, "samples", 0 ) /* samples */
|
||||
ROM_LOAD( "2.u74", 0x00000, 0x10000, CRC(36ee1dac) SHA1(6dfd2a885c0b1c9347abc4b204ade66551c4b404) )
|
||||
ROM_LOAD( "BC-002_K-0161.U74", 0x00000, 0x10000, CRC(36ee1dac) SHA1(6dfd2a885c0b1c9347abc4b204ade66551c4b404) )
|
||||
|
||||
ROM_REGION( 0x400, "proms", 0 )
|
||||
ROM_LOAD( "prom1.u54", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // == ic52 video timing prom from vigilante
|
||||
@ -1045,29 +1045,64 @@ ROM_END
|
||||
ROM_START( buccanrsa )
|
||||
ROM_REGION( 0x30000, "maincpu", 0 ) /* 64k for code + 128k for bankswitching */
|
||||
ROM_LOAD( "bc-011", 0x00000, 0x08000, CRC(6b657ef1) SHA1(a3356654d4b04177af23b39e924cc5ad64930bb6) )
|
||||
ROM_LOAD( "12.u25", 0x10000, 0x10000, CRC(87303ba8) SHA1(49a25393e853b9adf7df00a6f9c38a526a02ea4e) ) // not from this set, hopefully its only a data rom
|
||||
ROM_LOAD( "BC-012_K-163.U25", 0x10000, 0x10000, CRC(87303ba8) SHA1(49a25393e853b9adf7df00a6f9c38a526a02ea4e) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for sound */
|
||||
ROM_LOAD( "1.u128", 0x00000, 0x10000, CRC(eb65f8c3) SHA1(82566becb630ce92303905dc0c5bef9e80e9caad) )
|
||||
ROM_LOAD( "BC-001_K-0161.U128", 0x00000, 0x10000, CRC(eb65f8c3) SHA1(82566becb630ce92303905dc0c5bef9e80e9caad) )
|
||||
|
||||
ROM_REGION( 0x20000, "gfx1", 0 )
|
||||
ROM_LOAD( "7.u212", 0x00000, 0x10000, CRC(95e3c517) SHA1(9954830ebc3a6414a3236f4e41981db082e5ea19) )
|
||||
ROM_LOAD( "8.u189", 0x10000, 0x10000, CRC(fe2377ab) SHA1(8578c5466d98f140fdfc41e91cd841e725786e32) )
|
||||
ROM_LOAD( "BC-003_K-0161.U212", 0x00000, 0x10000, CRC(95e3c517) SHA1(9954830ebc3a6414a3236f4e41981db082e5ea19) )
|
||||
ROM_LOAD( "BC-004_K-0161.U189", 0x10000, 0x10000, CRC(fe2377ab) SHA1(8578c5466d98f140fdfc41e91cd841e725786e32) )
|
||||
|
||||
ROM_REGION( 0x80000, "gfx2", 0 )
|
||||
ROM_LOAD( "3.u100", 0x00000, 0x10000, CRC(16dc435f) SHA1(0c13e9786b356770c84f94684697e43d0ea9e7cc) )
|
||||
ROM_LOAD( "BC-005_K-0161.U113", 0x00000, 0x10000, CRC(16dc435f) SHA1(0c13e9786b356770c84f94684697e43d0ea9e7cc) )
|
||||
ROM_CONTINUE( 0x20000, 0x10000 )
|
||||
ROM_LOAD( "4.u80", 0x10000, 0x10000, CRC(4fe3bf97) SHA1(7910ace1eed80bfafa1f9f057ed67e23aa446a22) ) // was double size (2nd half blank) in this set)
|
||||
ROM_LOAD( "6.u52", 0x40000, 0x10000, CRC(078aef7f) SHA1(72e60d39d8af8bd31e9ae019b12620797eb0af7f) )
|
||||
ROM_LOAD( "BC-006_K-161.U80", 0x10000, 0x10000, CRC(4fe3bf97) SHA1(7910ace1eed80bfafa1f9f057ed67e23aa446a22) )
|
||||
ROM_LOAD( "BC-008_K-161.U52", 0x40000, 0x10000, CRC(078aef7f) SHA1(72e60d39d8af8bd31e9ae019b12620797eb0af7f) )
|
||||
ROM_CONTINUE( 0x60000, 0x10000 )
|
||||
ROM_LOAD( "5.u70", 0x50000, 0x10000, CRC(f650fa90) SHA1(c87081b4d6b09f865d08c5120da3d0fb3196a2c3) ) // was double size (2nd half blank) in this set)
|
||||
ROM_LOAD( "BC-007_K-161.U70", 0x50000, 0x10000, CRC(f650fa90) SHA1(c87081b4d6b09f865d08c5120da3d0fb3196a2c3) )
|
||||
|
||||
ROM_REGION( 0x40000, "gfx3", 0 )
|
||||
ROM_LOAD( "9.u49", 0x20000, 0x20000, CRC(0c6188fb) SHA1(d49034384c6d0e94db2890223b32a2a49e79a639) )
|
||||
ROM_LOAD( "10.u27", 0x00000, 0x20000, CRC(2d383ff8) SHA1(3062baac27feba69c6ed94935c5ced72d89ed4fb) )
|
||||
ROM_LOAD( "BC-009_K-163.U49", 0x20000, 0x20000, CRC(0c6188fb) SHA1(d49034384c6d0e94db2890223b32a2a49e79a639) )
|
||||
ROM_LOAD( "BC-010_K-163.U27", 0x00000, 0x20000, CRC(2d383ff8) SHA1(3062baac27feba69c6ed94935c5ced72d89ed4fb) )
|
||||
|
||||
ROM_REGION( 0x10000, "samples", 0 ) /* samples */
|
||||
ROM_LOAD( "2.u74", 0x00000, 0x10000, CRC(36ee1dac) SHA1(6dfd2a885c0b1c9347abc4b204ade66551c4b404) )
|
||||
ROM_LOAD( "BC-002_K-0161.U74", 0x00000, 0x10000, CRC(36ee1dac) SHA1(6dfd2a885c0b1c9347abc4b204ade66551c4b404) )
|
||||
|
||||
ROM_REGION( 0x400, "proms", 0 )
|
||||
ROM_LOAD( "prom1.u54", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // == ic52 video timing prom from vigilante
|
||||
ROM_LOAD( "prom4.u79", 0x0100, 0x0100, CRC(e6506ef4) SHA1(079841da7640b14d94aaaeb572bf018932b58293) )
|
||||
ROM_LOAD( "prom3.u88", 0x0200, 0x0100, CRC(b43d094f) SHA1(2bed4892d8a91d7faac5a07bf858d9294eb30606) )
|
||||
ROM_LOAD( "prom2.u99", 0x0300, 0x0100, CRC(e0aa8869) SHA1(ac8bdfeba69420ba56ec561bf3d0f1229d02cea2) )
|
||||
ROM_END
|
||||
|
||||
|
||||
ROM_START( buccanrsb )
|
||||
ROM_REGION( 0x30000, "maincpu", 0 ) /* 64k for code + 128k for bankswitching */
|
||||
ROM_LOAD( "rr_Du.u58", 0x00000, 0x08000, CRC(dcad3a8b) SHA1(e961927bdff28db18b829ce3f64051ff1604d1e6) )
|
||||
ROM_LOAD( "BC-012_K-163.U25", 0x10000, 0x10000, CRC(87303ba8) SHA1(49a25393e853b9adf7df00a6f9c38a526a02ea4e) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for sound */
|
||||
ROM_LOAD( "BC-001_K-0161.U128", 0x00000, 0x10000, CRC(eb65f8c3) SHA1(82566becb630ce92303905dc0c5bef9e80e9caad) )
|
||||
|
||||
ROM_REGION( 0x20000, "gfx1", 0 )
|
||||
ROM_LOAD( "BC-003_K-0161.U212", 0x00000, 0x10000, CRC(95e3c517) SHA1(9954830ebc3a6414a3236f4e41981db082e5ea19) )
|
||||
ROM_LOAD( "BC-004_K-0161.U189", 0x10000, 0x10000, CRC(fe2377ab) SHA1(8578c5466d98f140fdfc41e91cd841e725786e32) )
|
||||
|
||||
ROM_REGION( 0x80000, "gfx2", 0 )
|
||||
ROM_LOAD( "BC-005_K-0161.U113", 0x00000, 0x10000, CRC(16dc435f) SHA1(0c13e9786b356770c84f94684697e43d0ea9e7cc) )
|
||||
ROM_CONTINUE( 0x20000, 0x10000 )
|
||||
ROM_LOAD( "BC-006_K-161.U80", 0x10000, 0x10000, CRC(4fe3bf97) SHA1(7910ace1eed80bfafa1f9f057ed67e23aa446a22) )
|
||||
ROM_LOAD( "BC-008_K-161.U52", 0x40000, 0x10000, CRC(078aef7f) SHA1(72e60d39d8af8bd31e9ae019b12620797eb0af7f) )
|
||||
ROM_CONTINUE( 0x60000, 0x10000 )
|
||||
ROM_LOAD( "BC-007_K-161.U70", 0x50000, 0x10000, CRC(f650fa90) SHA1(c87081b4d6b09f865d08c5120da3d0fb3196a2c3) )
|
||||
|
||||
ROM_REGION( 0x40000, "gfx3", 0 )
|
||||
ROM_LOAD( "BC-009_K-163.U49", 0x20000, 0x20000, CRC(0c6188fb) SHA1(d49034384c6d0e94db2890223b32a2a49e79a639) )
|
||||
ROM_LOAD( "BC-010_K-163.U27", 0x00000, 0x20000, CRC(2d383ff8) SHA1(3062baac27feba69c6ed94935c5ced72d89ed4fb) )
|
||||
|
||||
ROM_REGION( 0x10000, "samples", 0 ) /* samples */
|
||||
ROM_LOAD( "BC-002_K-0161.U74", 0x00000, 0x10000, CRC(36ee1dac) SHA1(6dfd2a885c0b1c9347abc4b204ade66551c4b404) )
|
||||
|
||||
ROM_REGION( 0x400, "proms", 0 )
|
||||
ROM_LOAD( "prom1.u54", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // == ic52 video timing prom from vigilante
|
||||
@ -1090,3 +1125,4 @@ GAME( 1988, kikcubicb, kikcubic, kikcubic, kikcubic, driver_device, 0, ROT0,
|
||||
|
||||
GAME( 1989, buccanrs, 0, buccanrs, buccanrs, driver_device, 0, ROT0, "Duintronic", "Buccaneers (set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1989, buccanrsa, buccanrs, buccanrs, buccanra, driver_device, 0, ROT0, "Duintronic", "Buccaneers (set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1989, buccanrsb, buccanrs, buccanrs, buccanrs, driver_device, 0, ROT0, "Duintronic", "Buccaneers (set 3, harder)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -9,9 +9,14 @@
|
||||
#ifndef _HH_TMS1K_H_
|
||||
#define _HH_TMS1K_H_
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/tms0980/tms0980.h"
|
||||
#include "cpu/tms1000/tms1000.h"
|
||||
#include "cpu/tms1000/tms1100.h"
|
||||
#include "cpu/tms1000/tms1400.h"
|
||||
#include "cpu/tms1000/tms0970.h"
|
||||
#include "cpu/tms1000/tms0980.h"
|
||||
#include "cpu/tms1000/tms0270.h"
|
||||
#include "cpu/tms1000/tp0320.h"
|
||||
#include "sound/speaker.h"
|
||||
|
||||
|
||||
|
@ -365,6 +365,7 @@ ADDRESS_MAP_EXTERN(neogeo_main_map,16);
|
||||
Some may be missing, there have been multiple CRCs reported for the same
|
||||
revision in some cases (the Universe bios has an option for entering / displaying
|
||||
a serial number; these should be noted as such if they're added).
|
||||
Universe bios prior to version 1.3 was incompatible with AES.
|
||||
|
||||
The 'japan-hotel' BIOS is a dump of an MVS which could be found in some japanese
|
||||
hotels. it is a custom MVS mobo which uses MVS carts but it hasn't jamma
|
||||
@ -386,6 +387,35 @@ ADDRESS_MAP_EXTERN(neogeo_main_map,16);
|
||||
#define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \
|
||||
ROMX_LOAD(name, offset, length, hash, ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(bios+1)) /* Note '+1' */
|
||||
|
||||
#define NEOGEO_UNIBIOS(x) \
|
||||
ROM_SYSTEM_BIOS( x+ 0, "unibios32", "Universe Bios (Hack, Ver. 3.2)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( x+ 0, "uni-bios_3_2.rom", 0x00000, 0x020000, CRC(a4e8b9b3) SHA1(c92f18c3f1edda543d264ecd0ea915240e7c8258) ) /* Universe Bios v3.2 (hack) */ \
|
||||
ROM_SYSTEM_BIOS( x+ 1, "unibios31", "Universe Bios (Hack, Ver. 3.1)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( x+ 1, "uni-bios_3_1.rom", 0x00000, 0x020000, CRC(0c58093f) SHA1(29329a3448c2505e1ff45ffa75e61e9693165153) ) /* Universe Bios v3.1 (hack) */ \
|
||||
ROM_SYSTEM_BIOS( x+ 2, "unibios30", "Universe Bios (Hack, Ver. 3.0)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( x+ 2, "uni-bios_3_0.rom", 0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f) ) /* Universe Bios v3.0 (hack) */ \
|
||||
ROM_SYSTEM_BIOS( x+ 3, "unibios23", "Universe Bios (Hack, Ver. 2.3)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( x+ 3, "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0) ) /* Universe Bios v2.3 (hack) */ \
|
||||
ROM_SYSTEM_BIOS( x+ 4, "unibios23o", "Universe Bios (Hack, Ver. 2.3, older?)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( x+ 4, "uni-bios_2_3o.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe Bios v2.3 (hack) alt version, withdrawn? */ \
|
||||
ROM_SYSTEM_BIOS( x+ 5, "unibios22", "Universe Bios (Hack, Ver. 2.2)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( x+ 5, "uni-bios_2_2.rom", 0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c) ) /* Universe Bios v2.2 (hack) */ \
|
||||
ROM_SYSTEM_BIOS( x+ 6, "unibios21", "Universe Bios (Hack, Ver. 2.1)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( x+ 6, "uni-bios_2_1.rom", 0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c) ) /* Universe Bios v2.1 (hack) */ \
|
||||
ROM_SYSTEM_BIOS( x+ 7, "unibios20", "Universe Bios (Hack, Ver. 2.0)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( x+ 7, "uni-bios_2_0.rom", 0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e) ) /* Universe Bios v2.0 (hack) */ \
|
||||
ROM_SYSTEM_BIOS( x+ 8, "unibios13", "Universe Bios (Hack, Ver. 1.3)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( x+ 8, "uni-bios_1_3.rom", 0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e) ) /* Universe Bios v1.3 (hack) */
|
||||
#define NEOGEO_UNIBIOS_1_2_AND_OLDER(x) \
|
||||
ROM_SYSTEM_BIOS( x+ 9, "unibios12", "Universe Bios (Hack, Ver. 1.2)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( x+ 9, "uni-bios_1_2.rom", 0x00000, 0x020000, CRC(4fa698e9) SHA1(682e13ec1c42beaa2d04473967840c88fd52c75a) ) /* Universe Bios v1.2 (hack) */ \
|
||||
ROM_SYSTEM_BIOS( x+10, "unibios12o", "Universe Bios (Hack, Ver. 1.2, older)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( x+10, "uni-bios_1_2o.rom", 0x00000, 0x020000, CRC(e19d3ce9) SHA1(af88ef837f44a3af2d7144bb46a37c8512b67770) ) /* Universe Bios v1.2 (hack) alt version */ \
|
||||
ROM_SYSTEM_BIOS( x+11, "unibios11", "Universe Bios (Hack, Ver. 1.1)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( x+11, "uni-bios_1_1.rom", 0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7) ) /* Universe Bios v1.1 (hack) */ \
|
||||
ROM_SYSTEM_BIOS( x+12, "unibios10", "Universe Bios (Hack, Ver. 1.0)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( x+12, "uni-bios_1_0.rom", 0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9) ) /* Universe Bios v1.0 (hack) */
|
||||
|
||||
#define NEOGEO_BIOS \
|
||||
ROM_REGION16_BE( 0x80000, "mainbios", 0 ) \
|
||||
ROM_SYSTEM_BIOS( 0, "euro", "Europe MVS (Ver. 2)" ) \
|
||||
@ -416,32 +446,8 @@ ADDRESS_MAP_EXTERN(neogeo_main_map,16);
|
||||
ROM_SYSTEM_BIOS( 11, "japan-hotel", "Custom Japanese Hotel" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS( 11, "sp-1v1_3db8c.bin", 0x00000, 0x020000, CRC(162f0ebe) SHA1(fe1c6dd3dfcf97d960065b1bb46c1e11cb7bf271) ) /* 'rare MVS found in japanese hotels' shows v1.3 in test mode */ \
|
||||
\
|
||||
ROM_SYSTEM_BIOS(12, "unibios31", "Universe Bios (Hack, Ver. 3.1)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS(12, "uni-bios_3_1.rom", 0x00000, 0x020000, CRC(0c58093f) SHA1(29329a3448c2505e1ff45ffa75e61e9693165153) ) /* Universe Bios v3.1 (hack) */ \
|
||||
ROM_SYSTEM_BIOS(13, "unibios30", "Universe Bios (Hack, Ver. 3.0)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS(13, "uni-bios_3_0.rom", 0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f) ) /* Universe Bios v3.0 (hack) */ \
|
||||
ROM_SYSTEM_BIOS(14, "unibios23", "Universe Bios (Hack, Ver. 2.3)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS(14, "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0) ) /* Universe Bios v2.3 (hack) */ \
|
||||
ROM_SYSTEM_BIOS(15, "unibios23o", "Universe Bios (Hack, Ver. 2.3, older?)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS(15, "uni-bios_2_3o.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe Bios v2.3 (hack) alt version, withdrawn? */ \
|
||||
ROM_SYSTEM_BIOS(16, "unibios22", "Universe Bios (Hack, Ver. 2.2)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS(16, "uni-bios_2_2.rom", 0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c) ) /* Universe Bios v2.2 (hack) */ \
|
||||
ROM_SYSTEM_BIOS(17, "unibios21", "Universe Bios (Hack, Ver. 2.1)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS(17, "uni-bios_2_1.rom", 0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c) ) /* Universe Bios v2.1 (hack) */ \
|
||||
ROM_SYSTEM_BIOS(18, "unibios20", "Universe Bios (Hack, Ver. 2.0)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS(18, "uni-bios_2_0.rom", 0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e) ) /* Universe Bios v2.0 (hack) */ \
|
||||
ROM_SYSTEM_BIOS(19, "unibios13", "Universe Bios (Hack, Ver. 1.3)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS(19, "uni-bios_1_3.rom", 0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e) ) /* Universe Bios v1.3 (hack) */ \
|
||||
ROM_SYSTEM_BIOS(20, "unibios12", "Universe Bios (Hack, Ver. 1.2)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS(20, "uni-bios_1_2.rom", 0x00000, 0x020000, CRC(4fa698e9) SHA1(682e13ec1c42beaa2d04473967840c88fd52c75a) ) /* Universe Bios v1.2 (hack) */ \
|
||||
ROM_SYSTEM_BIOS(21, "unibios12o", "Universe Bios (Hack, Ver. 1.2, older)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS(21, "uni-bios_1_2o.rom", 0x00000, 0x020000, CRC(e19d3ce9) SHA1(af88ef837f44a3af2d7144bb46a37c8512b67770) ) /* Universe Bios v1.2 (hack) alt version */ \
|
||||
ROM_SYSTEM_BIOS(22, "unibios11", "Universe Bios (Hack, Ver. 1.1)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS(22, "uni-bios_1_1.rom", 0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7) ) /* Universe Bios v1.1 (hack) */ \
|
||||
ROM_SYSTEM_BIOS(23, "unibios10", "Universe Bios (Hack, Ver. 1.0)" ) \
|
||||
ROM_LOAD16_WORD_SWAP_BIOS(23, "uni-bios_1_0.rom", 0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9) ) /* Universe Bios v1.0 (hack) */
|
||||
|
||||
|
||||
NEOGEO_UNIBIOS(12) \
|
||||
NEOGEO_UNIBIOS_1_2_AND_OLDER(12)
|
||||
|
||||
|
||||
#define NEO_BIOS_AUDIO_64K(name, hash) \
|
||||
|
@ -5,7 +5,9 @@
|
||||
|
||||
<element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
|
||||
<element name="static_white"><rect><color red="0.95" green="0.95" blue="0.95" /></rect></element>
|
||||
<element name="static_gray"><rect><color red="0.60" green="0.75" blue="0.63" /></rect></element>
|
||||
<element name="static_white2"><rect><color red="0.88" green="0.85" blue="0.85" /></rect></element>
|
||||
<element name="static_gray"><rect><color red="0.6" green="0.7" blue="0.65" /></rect></element>
|
||||
<element name="static_gray2"><rect><color red="0.75" green="0.73" blue="0.73" /></rect></element>
|
||||
<element name="static_red"><rect><color red="0.35" green="0.02" blue="0.04" /></rect></element>
|
||||
|
||||
<element name="digit" defstate="0">
|
||||
@ -17,20 +19,112 @@
|
||||
<disk state="0"><color red="0.2" green="0.0" blue="0.0" /></disk>
|
||||
</element>
|
||||
|
||||
<element name="button" defstate="0">
|
||||
<rect state="1"><color red="0.42" green="0.49" blue="0.455" /></rect>
|
||||
<rect state="0"><color red="0.6" green="0.7" blue="0.65" /></rect>
|
||||
</element>
|
||||
<element name="buttond" defstate="0">
|
||||
<disk state="1"><color red="0.42" green="0.49" blue="0.455" /></disk>
|
||||
<disk state="0"><color red="0.6" green="0.7" blue="0.65" /></disk>
|
||||
</element>
|
||||
|
||||
<element name="text_rnext">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="NEXT"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rship">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="SHIP"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rmove">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="MOVE"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rrecall">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="RECALL"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rleft">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="LEFT"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rright">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="RIGHT"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rrange">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="RANGE"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_raim">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="AIM"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rfire">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="FIRE"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rsteering">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="STEERING"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rspeed">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="SPEED"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rnav">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="NAVIGATIONAL PROGRAMMING"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rslower">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="SLOWER"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rfaster">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="FASTER"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rson">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="SONAR CONTROL"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rteach">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="TEACH"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rmode">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="MODE"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rsub">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="SUB"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rfinder">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="FINDER"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_revasive">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="EVASIVE"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
<element name="text_rcom">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="COMBAT INFORMATION CENTER"><color red="0.75" green="0.73" blue="0.73" /></text>
|
||||
</element>
|
||||
|
||||
<element name="text_ship">
|
||||
<text string="SHIP"><color red="0.95" green="0.95" blue="0.95" /></text>
|
||||
</element>
|
||||
<element name="text_speed">
|
||||
<text string="SPEED"><color red="0.95" green="0.95" blue="0.95" /></text>
|
||||
</element>
|
||||
|
||||
<element name="text_north">
|
||||
<text string="NORTH" align="2"><color red="0.95" green="0.95" blue="0.95" /></text>
|
||||
</element>
|
||||
<element name="text_east">
|
||||
<text string="EAST" align="1"><color red="0.95" green="0.95" blue="0.95" /></text>
|
||||
</element>
|
||||
|
||||
<element name="text_depth">
|
||||
<text string="DEPTH"><color red="0.95" green="0.95" blue="0.95" /></text>
|
||||
</element>
|
||||
@ -54,79 +148,146 @@
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="W"><color red="0.88" green="0.85" blue="0.85" /></text>
|
||||
</element>
|
||||
<element name="text_nw">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="NW"><color red="0.88" green="0.85" blue="0.85" /></text>
|
||||
</element>
|
||||
<element name="text_ne">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="NE"><color red="0.88" green="0.85" blue="0.85" /></text>
|
||||
</element>
|
||||
<element name="text_sw">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="SW"><color red="0.88" green="0.85" blue="0.85" /></text>
|
||||
</element>
|
||||
<element name="text_se">
|
||||
<rect><color red="0.35" green="0.02" blue="0.04" /></rect>
|
||||
<text string="SE"><color red="0.88" green="0.85" blue="0.85" /></text>
|
||||
</element>
|
||||
|
||||
|
||||
<!-- build screen -->
|
||||
|
||||
<view name="Internal Layout">
|
||||
<bounds left="0" right="92" top="0" bottom="146" />
|
||||
<bezel element="static_black">
|
||||
<bounds left="0" right="92" top="0" bottom="146" />
|
||||
</bezel>
|
||||
<bounds left="-1" right="228" top="0" bottom="141" />
|
||||
|
||||
<!-- digits -->
|
||||
|
||||
<bezel element="static_white"><bounds x="0" y="4" width="100" height="1" /></bezel>
|
||||
<bezel element="static_white"><bounds x="0" y="12" width="100" height="1" /></bezel>
|
||||
|
||||
<bezel element="static_white"><bounds x="20" y="4.5" width="1" height="40" /></bezel>
|
||||
<bezel element="static_white"><bounds x="41" y="4.5" width="1" height="40" /></bezel>
|
||||
|
||||
<bezel element="static_white"><bounds x="67" y="4.5" width="1" height="8" /></bezel>
|
||||
|
||||
<bezel element="static_white"><bounds x="20.5" y="36" width="80" height="1" /></bezel>
|
||||
<bezel element="static_white"><bounds x="0" y="44" width="100" height="1" /></bezel>
|
||||
<bezel element="static_black"><bounds x="92" y="0" width="10" height="49" /></bezel>
|
||||
|
||||
<bezel element="text_ship"><bounds x="0" y="5" width="20" height="7" /></bezel>
|
||||
<bezel element="text_speed"><bounds x="21" y="5" width="20" height="7" /></bezel>
|
||||
|
||||
<bezel element="text_north"><bounds x="47" y="5" width="19" height="7" /></bezel>
|
||||
<bezel element="text_east"><bounds x="69" y="5" width="19" height="7" /></bezel>
|
||||
|
||||
<bezel element="text_depth"><bounds x="21" y="37" width="20" height="7" /></bezel>
|
||||
<bezel element="text_range"><bounds x="57" y="37" width="20" height="7" /></bezel>
|
||||
|
||||
<bezel name="digit5" element="digit">
|
||||
<bounds x="5" y="17" width="10" height="15" />
|
||||
</bezel>
|
||||
|
||||
<bezel name="digit4" element="digit">
|
||||
<bounds x="26" y="17" width="10" height="15" />
|
||||
</bezel>
|
||||
|
||||
<bezel name="digit3" element="digit">
|
||||
<bounds x="47" y="17" width="10" height="15" />
|
||||
</bezel>
|
||||
<bezel name="digit2" element="digit">
|
||||
<bounds x="57" y="17" width="10" height="15" />
|
||||
</bezel>
|
||||
<bezel name="digit1" element="digit">
|
||||
<bounds x="67" y="17" width="10" height="15" />
|
||||
</bezel>
|
||||
<bezel name="digit0" element="digit">
|
||||
<bounds x="77" y="17" width="10" height="15" />
|
||||
</bezel>
|
||||
<bezel name="digit5" element="digit"><bounds x="5" y="17" width="10" height="15" /></bezel>
|
||||
<bezel name="digit4" element="digit"><bounds x="26" y="17" width="10" height="15" /></bezel>
|
||||
<bezel name="digit3" element="digit"><bounds x="47" y="17" width="10" height="15" /></bezel>
|
||||
<bezel name="digit2" element="digit"><bounds x="57" y="17" width="10" height="15" /></bezel>
|
||||
<bezel name="digit1" element="digit"><bounds x="67" y="17" width="10" height="15" /></bezel>
|
||||
<bezel name="digit0" element="digit"><bounds x="77" y="17" width="10" height="15" /></bezel>
|
||||
|
||||
<!-- compass -->
|
||||
|
||||
<bezel element="static_gray"><bounds x="0" y="50" width="100" height="100" /></bezel>
|
||||
<bezel element="static_red"><bounds x="0" y="55" width="100" height="86" /></bezel>
|
||||
<bezel element="static_gray"><bounds x="-2" y="50" width="102" height="6" /></bezel>
|
||||
<bezel element="static_red"><bounds x="-2" y="55" width="102" height="86" /></bezel>
|
||||
<bezel element="static_white2"><bounds x="13.5" y="65.5" width="65" height="65" /></bezel>
|
||||
<bezel element="static_red"><bounds x="14.5" y="66.5" width="63" height="63" /></bezel>
|
||||
|
||||
<bezel name="6.a" element="led"><bounds x="42" y="62" width="8" height="8" /></bezel>
|
||||
<bezel name="7.a" element="led"><bounds x="42" y="126" width="8" height="8" /></bezel>
|
||||
<bezel name="8.a" element="led"><bounds x="74" y="94" width="8" height="8" /></bezel>
|
||||
<bezel name="9.a" element="led"><bounds x="10" y="94" width="8" height="8" /></bezel>
|
||||
|
||||
<bezel element="text_nw"><bounds x="6" y="61" width="16" height="10" /></bezel>
|
||||
<bezel element="text_ne"><bounds x="70" y="61" width="16" height="10" /></bezel>
|
||||
<bezel element="text_sw"><bounds x="6" y="125" width="16" height="10" /></bezel>
|
||||
<bezel element="text_se"><bounds x="70" y="125" width="16" height="10" /></bezel>
|
||||
|
||||
<bezel element="text_n"><bounds x="41" y="72" width="10" height="10" /></bezel>
|
||||
<bezel element="text_s"><bounds x="41" y="114" width="10" height="10" /></bezel>
|
||||
<bezel element="text_e"><bounds x="63" y="93" width="10" height="10" /></bezel>
|
||||
<bezel element="text_w"><bounds x="21" y="93" width="10" height="10" /></bezel>
|
||||
|
||||
<!-- button panel -->
|
||||
|
||||
<bezel element="static_gray"><bounds x="93" y="-1" width="6" height="143" /></bezel>
|
||||
<bezel element="static_red"><bounds x="98" y="-1" width="132" height="143" /></bezel>
|
||||
|
||||
<bezel element="text_rcom"><bounds x="99" y="11.5" width="128" height="11" /></bezel>
|
||||
|
||||
<bezel element="static_gray2"><bounds x="102" y="28" width="50" height="18" /></bezel>
|
||||
<bezel element="static_red"><bounds x="103" y="29" width="48" height="16" /></bezel>
|
||||
<bezel element="static_gray2"><bounds x="174" y="28" width="50" height="18" /></bezel>
|
||||
<bezel element="static_red"><bounds x="175" y="29" width="48" height="16" /></bezel>
|
||||
|
||||
<bezel element="static_gray2"><bounds x="102" y="49" width="122" height="44" /></bezel>
|
||||
<bezel element="static_red"><bounds x="103" y="51" width="120" height="41" /></bezel>
|
||||
<bezel element="static_gray2"><bounds x="151" y="49" width="24" height="27" /></bezel>
|
||||
<bezel element="static_red"><bounds x="152" y="48" width="22" height="27" /></bezel>
|
||||
<bezel element="static_red"><bounds x="101" y="47" width="124" height="3" /></bezel>
|
||||
|
||||
<bezel element="static_gray2"><bounds x="102" y="97" width="74" height="33" /></bezel>
|
||||
<bezel element="static_red"><bounds x="103" y="98" width="72" height="31" /></bezel>
|
||||
<bezel element="static_gray2"><bounds x="198" y="97" width="26" height="33" /></bezel>
|
||||
<bezel element="static_red"><bounds x="199" y="98" width="24" height="31" /></bezel>
|
||||
|
||||
<bezel element="button" inputtag="IN.0" inputmask="0x01"><bounds x="107" y="33" width="16" height="8" /></bezel>
|
||||
<bezel element="button" inputtag="IN.2" inputmask="0x08"><bounds x="155" y="33" width="16" height="8" /></bezel>
|
||||
<bezel element="button" inputtag="IN.4" inputmask="0x08"><bounds x="203" y="33" width="16" height="8" /></bezel>
|
||||
|
||||
<bezel element="button" inputtag="IN.0" inputmask="0x02"><bounds x="107" y="55" width="16" height="8" /></bezel>
|
||||
<bezel element="button" inputtag="IN.1" inputmask="0x02"><bounds x="131" y="55" width="16" height="8" /></bezel>
|
||||
<bezel element="buttond" inputtag="IN.2" inputmask="0x02"><bounds x="161" y="57" width="4" height="4" /></bezel>
|
||||
<bezel element="button" inputtag="IN.3" inputmask="0x02"><bounds x="179" y="55" width="16" height="8" /></bezel>
|
||||
<bezel element="button" inputtag="IN.4" inputmask="0x02"><bounds x="203" y="55" width="16" height="8" /></bezel>
|
||||
|
||||
<bezel element="button" inputtag="IN.0" inputmask="0x08"><bounds x="107" y="102" width="16" height="8" /></bezel>
|
||||
<bezel element="button" inputtag="IN.1" inputmask="0x01"><bounds x="131" y="102" width="16" height="8" /></bezel>
|
||||
<bezel element="button" inputtag="IN.2" inputmask="0x01"><bounds x="155" y="102" width="16" height="8" /></bezel>
|
||||
<bezel element="buttond" inputtag="IN.3" inputmask="0x01"><bounds x="185" y="104" width="4" height="4" /></bezel>
|
||||
<bezel element="button" inputtag="IN.4" inputmask="0x01"><bounds x="207" y="102" width="8" height="8" /></bezel>
|
||||
|
||||
<bezel element="text_rnext"><bounds x="127" y="32" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rship"><bounds x="127" y="37" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rrecall"><bounds x="154" y="43" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rmove"><bounds x="181" y="32" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rship"><bounds x="181" y="37" width="18" height="5" /></bezel>
|
||||
|
||||
<bezel element="text_rleft"><bounds x="106" y="65" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rright"><bounds x="130" y="65" width="18" height="5" /></bezel>
|
||||
<bezel element="text_revasive"><bounds x="154" y="62.5" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rsub"><bounds x="154" y="67.5" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rslower"><bounds x="178" y="65" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rfaster"><bounds x="202" y="65" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rsteering"><bounds x="107" y="70" width="40" height="8" /></bezel>
|
||||
<bezel element="text_rspeed"><bounds x="179" y="70" width="40" height="8" /></bezel>
|
||||
<bezel element="text_rnav"><bounds x="107" y="80" width="112" height="8" /></bezel>
|
||||
|
||||
<bezel element="text_rrange"><bounds x="106" y="112" width="18" height="5" /></bezel>
|
||||
<bezel element="text_raim"><bounds x="130" y="112" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rfire"><bounds x="154" y="112" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rsub"><bounds x="178" y="109.5" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rfinder"><bounds x="178" y="114.5" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rteach"><bounds x="202" y="112" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rmode"><bounds x="202" y="117" width="18" height="5" /></bezel>
|
||||
<bezel element="text_rson"><bounds x="107" y="117" width="64" height="8" /></bezel>
|
||||
|
||||
<!-- crop borders -->
|
||||
|
||||
<bezel element="static_black"><bounds x="92" y="0" width="10" height="160" /></bezel>
|
||||
<bezel element="static_black"><bounds x="0" y="146" width="100" height="10" /></bezel>
|
||||
|
||||
<bezel element="static_black"><bounds x="-3" y="-3" width="232" height="2.9" /></bezel>
|
||||
<bezel element="static_black"><bounds x="-3" y="-3" width="1.9" height="150" /></bezel>
|
||||
<bezel element="static_black"><bounds x="-3" y="141.1" width="232" height="2" /></bezel>
|
||||
<bezel element="static_black"><bounds x="228.1" y="-3" width="3" height="150" /></bezel>
|
||||
|
||||
</view>
|
||||
</mamelayout>
|
||||
|
@ -3,16 +3,109 @@
|
||||
|
||||
<!-- define elements -->
|
||||
|
||||
<element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
|
||||
<element name="static_black2"><rect><color red="0.02" green="0.03" blue="0.05" /></rect></element>
|
||||
<element name="static_blue"><rect><color red="0.1" green="0.25" blue="0.5" /></rect></element>
|
||||
<element name="static_blue2"><rect><color red="0.04" green="0.1" blue="0.2" /></rect></element>
|
||||
<element name="disk_cyan"><disk><color red="0.0" green="0.75" blue="1.0" /></disk></element>
|
||||
<element name="disk_white"><disk><color red="0.8" green="0.9" blue="1.0" /></disk></element>
|
||||
<element name="disk_cyan1"><disk><color red="0.0" green="0.75" blue="1.0" /></disk></element>
|
||||
<element name="disk_cyan2"><disk><color red="0.8" green="0.9" blue="1.0" /></disk></element>
|
||||
|
||||
<element name="led" defstate="0">
|
||||
<disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk>
|
||||
<disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
|
||||
</element>
|
||||
|
||||
<element name="hl" defstate="0">
|
||||
<text string=" ">
|
||||
<bounds x="0.0" y="0.0" width="1.0" height="1.0" />
|
||||
<color red="0.0" green="0.0" blue="0.0" />
|
||||
</text>
|
||||
<disk state="1">
|
||||
<bounds x="0.07" y="0.07" width="0.86" height="0.86" />
|
||||
<color red="0.0" green="0.0" blue="0.0" />
|
||||
</disk>
|
||||
</element>
|
||||
|
||||
<element name="static_cyan1"><rect><color red="0.0" green="0.75" blue="1.0" /></rect></element>
|
||||
<element name="text_k1">
|
||||
<rect><color red="0.0" green="0.75" blue="1.0" /></rect>
|
||||
<text string="1"><color red="1" green="1" blue="1" /></text>
|
||||
</element>
|
||||
<element name="text_k2">
|
||||
<rect><color red="0.0" green="0.75" blue="1.0" /></rect>
|
||||
<text string="2"><color red="1" green="1" blue="1" /></text>
|
||||
</element>
|
||||
<element name="text_k3">
|
||||
<rect><color red="0.0" green="0.75" blue="1.0" /></rect>
|
||||
<text string="3"><color red="1" green="1" blue="1" /></text>
|
||||
</element>
|
||||
<element name="text_k4">
|
||||
<rect><color red="0.0" green="0.75" blue="1.0" /></rect>
|
||||
<text string="4"><color red="1" green="1" blue="1" /></text>
|
||||
</element>
|
||||
<element name="text_k5">
|
||||
<rect><color red="0.0" green="0.75" blue="1.0" /></rect>
|
||||
<text string="5"><color red="1" green="1" blue="1" /></text>
|
||||
</element>
|
||||
<element name="text_k6">
|
||||
<rect><color red="0.0" green="0.75" blue="1.0" /></rect>
|
||||
<text string="6"><color red="1" green="1" blue="1" /></text>
|
||||
</element>
|
||||
<element name="text_k7">
|
||||
<rect><color red="0.0" green="0.75" blue="1.0" /></rect>
|
||||
<text string="7"><color red="1" green="1" blue="1" /></text>
|
||||
</element>
|
||||
<element name="text_k8">
|
||||
<rect><color red="0.0" green="0.75" blue="1.0" /></rect>
|
||||
<text string="8"><color red="1" green="1" blue="1" /></text>
|
||||
</element>
|
||||
<element name="text_k9">
|
||||
<rect><color red="0.0" green="0.75" blue="1.0" /></rect>
|
||||
<text string="9"><color red="1" green="1" blue="1" /></text>
|
||||
</element>
|
||||
<element name="text_br31">
|
||||
<rect><color red="0.0" green="0.75" blue="1.0" /></rect>
|
||||
<text string="$"><color red="1" green="1" blue="1" /></text>
|
||||
</element>
|
||||
<element name="text_br32">
|
||||
<rect><color red="0.0" green="0.75" blue="1.0" /></rect>
|
||||
<text string="VALUE"><color red="1" green="1" blue="1" /></text>
|
||||
</element>
|
||||
<element name="text_br4">
|
||||
<rect><color red="0.0" green="0.75" blue="1.0" /></rect>
|
||||
<text string="CLEAR"><color red="1" green="1" blue="1" /></text>
|
||||
</element>
|
||||
|
||||
<element name="static_cyan2"><rect><color red="0.6" green="0.85" blue="1.0" /></rect></element>
|
||||
<element name="text_br1">
|
||||
<rect><color red="0.6" green="0.85" blue="1.0" /></rect>
|
||||
<text string="AIR"><color red="0.02" green="0.02" blue="0.02" /></text>
|
||||
</element>
|
||||
<element name="text_br2">
|
||||
<rect><color red="0.6" green="0.85" blue="1.0" /></rect>
|
||||
<text string="UP"><color red="0.02" green="0.02" blue="0.02" /></text>
|
||||
</element>
|
||||
|
||||
<element name="static_gold"><rect><color red="0.8" green="0.6" blue="0.1" /></rect></element>
|
||||
<element name="text_bl1">
|
||||
<rect><color red="0.8" green="0.6" blue="0.1" /></rect>
|
||||
<text string="N-S"><color red="0.02" green="0.02" blue="0.02" /></text>
|
||||
</element>
|
||||
<element name="text_bl2">
|
||||
<rect><color red="0.8" green="0.6" blue="0.1" /></rect>
|
||||
<text string="E-W"><color red="0.02" green="0.02" blue="0.02" /></text>
|
||||
</element>
|
||||
|
||||
<element name="static_silv"><rect><color red="0.45" green="0.45" blue="0.48" /></rect></element>
|
||||
<element name="text_bl3">
|
||||
<rect><color red="0.45" green="0.45" blue="0.48" /></rect>
|
||||
<text string="N-S"><color red="0.98" green="0.98" blue="0.98" /></text>
|
||||
</element>
|
||||
<element name="text_bl4">
|
||||
<rect><color red="0.45" green="0.45" blue="0.48" /></rect>
|
||||
<text string="E-W"><color red="0.98" green="0.98" blue="0.98" /></text>
|
||||
</element>
|
||||
|
||||
<element name="text_1">
|
||||
<rect><color red="0.1" green="0.25" blue="0.5" /></rect>
|
||||
<text string="1"><color red="0.04" green="0.1" blue="0.2" /></text>
|
||||
@ -96,6 +189,15 @@
|
||||
<text string="$$"><color red="0.04" green="0.1" blue="0.2" /></text>
|
||||
</element>
|
||||
|
||||
<element name="text_l1">
|
||||
<rect><color red="0.1" green="0.25" blue="0.5" /></rect>
|
||||
<text string="ELECTRONIC"><color red="0.04" green="0.1" blue="0.2" /></text>
|
||||
</element>
|
||||
<element name="text_l2">
|
||||
<rect><color red="0.1" green="0.25" blue="0.5" /></rect>
|
||||
<text string="DIVE-CONTROL CENTER"><color red="0.04" green="0.1" blue="0.2" /></text>
|
||||
</element>
|
||||
|
||||
<element name="text_n">
|
||||
<rect><color red="0.0" green="0.75" blue="1.0" /></rect>
|
||||
<text string="N"><color red="1" green="1" blue="1" /></text>
|
||||
@ -117,10 +219,12 @@
|
||||
<!-- build screen -->
|
||||
|
||||
<view name="Internal Layout">
|
||||
<bounds left="2.2" right="18.5" top="1" bottom="17.3" />
|
||||
<bounds left="2.2" right="39.2" top="1" bottom="17.3" />
|
||||
<bezel element="static_blue">
|
||||
<bounds left="0" right="20" top="0" bottom="20" />
|
||||
<bounds left="0" right="40" top="0" bottom="18" />
|
||||
</bezel>
|
||||
<bezel element="static_blue2"><bounds x="-1" y="-1" width="41" height="3.9" /></bezel>
|
||||
<bezel element="static_black"><bounds x="-1" y="-1" width="41" height="3.7" /></bezel>
|
||||
|
||||
<!-- left side -->
|
||||
|
||||
@ -152,7 +256,6 @@
|
||||
<bezel element="static_blue2"><bounds x="3.1" y="10.57" width="0.77" height="0.06" /></bezel>
|
||||
<bezel element="static_blue2"><bounds x="3.1" y="12.57" width="0.77" height="0.06" /></bezel>
|
||||
<bezel element="static_blue2"><bounds x="3.1" y="14.57" width="0.77" height="0.06" /></bezel>
|
||||
<bezel element="static_blue2"><bounds x="7" y="0" width="0.3" height="20" /></bezel>
|
||||
|
||||
<bezel name="0.5" element="led"><bounds x="4" y="4" width="1.2" height="1.2" /></bezel>
|
||||
<bezel name="0.4" element="led"><bounds x="4" y="6" width="1.2" height="1.2" /></bezel>
|
||||
@ -163,8 +266,16 @@
|
||||
|
||||
<!-- compass -->
|
||||
|
||||
<bezel element="disk_white"><bounds x="8.1" y="2.1" width="9" height="9" /></bezel>
|
||||
<bezel element="disk_cyan"><bounds x="8.5" y="2.5" width="8.2" height="8.2" /></bezel>
|
||||
<bezel element="static_blue2"><bounds x="7.1" y="0" width="11" height="12.1" /></bezel>
|
||||
<bezel element="static_blue"><bounds x="7.3" y="1.2" width="10.6" height="10.7" /></bezel>
|
||||
<bezel element="static_blue2"><bounds x="7.5" y="1.4" width="10.2" height="10.3" /></bezel>
|
||||
|
||||
<bezel element="static_blue2"><bounds x="11.1" y="13.1" width="3" height="0.2" /></bezel>
|
||||
<bezel element="static_blue2"><bounds x="11.1" y="14.3" width="3" height="0.2" /></bezel>
|
||||
<bezel element="static_blue2"><bounds x="11.1" y="15.5" width="3" height="0.2" /></bezel>
|
||||
|
||||
<bezel element="disk_cyan2"><bounds x="8.1" y="2.1" width="9" height="9" /></bezel>
|
||||
<bezel element="disk_cyan1"><bounds x="8.5" y="2.5" width="8.2" height="8.2" /></bezel>
|
||||
|
||||
<bezel element="text_n"><bounds x="12" y="2.7" width="1.2" height="1.2" /></bezel>
|
||||
<bezel element="text_s"><bounds x="12" y="9.3" width="1.2" height="1.2" /></bezel>
|
||||
@ -177,5 +288,86 @@
|
||||
<bezel name="0.9" element="led"><bounds x="14" y="6" width="1.2" height="1.2" /></bezel>
|
||||
<bezel name="0.10" element="led"><bounds x="12" y="6" width="1.2" height="1.2" /></bezel>
|
||||
|
||||
<!-- keypad -->
|
||||
|
||||
<bezel element="static_blue2"><bounds x="23.15" y="0" width="11" height="12.1" /></bezel>
|
||||
<bezel element="static_blue"><bounds x="23.35" y="1.2" width="10.6" height="10.7" /></bezel>
|
||||
<bezel element="static_blue2"><bounds x="23.55" y="1.4" width="10.2" height="10.3" /></bezel>
|
||||
|
||||
<bezel element="text_l1"><bounds x="23.15" y="13.1" width="11" height="1.2" /></bezel>
|
||||
<bezel element="text_l2"><bounds x="22.15" y="14.3" width="13" height="1.2" /></bezel>
|
||||
|
||||
<bezel element="static_black2"><bounds x="24.15" y="2.1" width="9" height="9" /></bezel>
|
||||
<bezel element="static_cyan1"><bounds x="24.35" y="2.3" width="2.7333" height="2.7333" /></bezel>
|
||||
<bezel element="static_cyan1"><bounds x="27.28333" y="2.3" width="2.7333" height="2.7333" /></bezel>
|
||||
<bezel element="static_cyan1"><bounds x="30.21666" y="2.3" width="2.7333" height="2.7333" /></bezel>
|
||||
<bezel element="static_cyan1"><bounds x="24.35" y="5.2333" width="2.7333" height="2.7333" /></bezel>
|
||||
<bezel element="static_cyan1"><bounds x="27.28333" y="5.2333" width="2.7333" height="2.7333" /></bezel>
|
||||
<bezel element="static_cyan1"><bounds x="30.21666" y="5.2333" width="2.7333" height="2.7333" /></bezel>
|
||||
<bezel element="static_cyan1"><bounds x="24.35" y="8.1666" width="2.7333" height="2.7333" /></bezel>
|
||||
<bezel element="static_cyan1"><bounds x="27.28333" y="8.1666" width="2.7333" height="2.7333" /></bezel>
|
||||
<bezel element="static_cyan1"><bounds x="30.21666" y="8.1666" width="2.7333" height="2.7333" /></bezel>
|
||||
|
||||
<bezel element="text_k1"><bounds x="24.35" y="3.0666" width="2.7333" height="1.2" /></bezel>
|
||||
<bezel element="text_k2"><bounds x="27.28333" y="3.0666" width="2.7333" height="1.2" /></bezel>
|
||||
<bezel element="text_k3"><bounds x="30.21666" y="3.0666" width="2.7333" height="1.2" /></bezel>
|
||||
<bezel element="text_k4"><bounds x="24.35" y="6" width="2.7333" height="1.2" /></bezel>
|
||||
<bezel element="text_k5"><bounds x="27.28333" y="6" width="2.7333" height="1.2" /></bezel>
|
||||
<bezel element="text_k6"><bounds x="30.21666" y="6" width="2.7333" height="1.2" /></bezel>
|
||||
<bezel element="text_k7"><bounds x="24.35" y="8.9333" width="2.7333" height="1.2" /></bezel>
|
||||
<bezel element="text_k8"><bounds x="27.28333" y="8.9333" width="2.7333" height="1.2" /></bezel>
|
||||
<bezel element="text_k9"><bounds x="30.21666" y="8.9333" width="2.7333" height="1.2" /></bezel>
|
||||
|
||||
<bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="24.35" y="2.3" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="27.28333" y="2.3" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="30.21666" y="2.3" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="24.35" y="5.2333" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="27.28333" y="5.2333" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="30.21666" y="5.2333" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="24.35" y="8.1666" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="27.28333" y="8.1666" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="30.21666" y="8.1666" width="2.7333" height="2.7333" /><color alpha="0.15" /></bezel>
|
||||
|
||||
<!-- other buttons -->
|
||||
|
||||
<bezel element="static_black2"><bounds x="19.1" y="3.8" width="3.05" height="11.6" /></bezel>
|
||||
<bezel element="static_gold"><bounds x="19.3" y="4" width="2.65" height="2.65" /></bezel>
|
||||
<bezel element="static_gold"><bounds x="19.3" y="6.85" width="2.65" height="2.65" /></bezel>
|
||||
<bezel element="static_silv"><bounds x="19.3" y="9.7" width="2.65" height="2.65" /></bezel>
|
||||
<bezel element="static_silv"><bounds x="19.3" y="12.55" width="2.65" height="2.65" /></bezel>
|
||||
|
||||
<bezel element="text_bl1"><bounds x="19.31" y="4.875" width="2.63" height="0.9" /></bezel>
|
||||
<bezel element="text_bl2"><bounds x="19.31" y="7.725" width="2.63" height="0.9" /></bezel>
|
||||
<bezel element="text_bl3"><bounds x="19.31" y="10.575" width="2.63" height="0.9" /></bezel>
|
||||
<bezel element="text_bl4"><bounds x="19.31" y="13.425" width="2.63" height="0.9" /></bezel>
|
||||
|
||||
<bezel element="static_black2"><bounds x="35.15" y="3.8" width="3.05" height="11.6" /></bezel>
|
||||
<bezel element="static_cyan2"><bounds x="35.35" y="4" width="2.65" height="2.65" /></bezel>
|
||||
<bezel element="static_cyan2"><bounds x="35.35" y="6.85" width="2.65" height="2.65" /></bezel>
|
||||
<bezel element="static_cyan1"><bounds x="35.35" y="9.7" width="2.65" height="2.65" /></bezel>
|
||||
<bezel element="static_cyan1"><bounds x="35.35" y="12.55" width="2.65" height="2.65" /></bezel>
|
||||
|
||||
<bezel element="text_br1"><bounds x="35.36" y="4.875" width="2.63" height="0.9" /></bezel>
|
||||
<bezel element="text_br2"><bounds x="35.36" y="7.725" width="2.63" height="0.9" /></bezel>
|
||||
<bezel element="text_br31"><bounds x="35.36" y="10.125" width="2.63" height="0.9" /></bezel>
|
||||
<bezel element="text_br32"><bounds x="35.36" y="11.025" width="2.63" height="0.9" /></bezel>
|
||||
<bezel element="text_br4"><bounds x="35.36" y="13.425" width="2.63" height="0.9" /></bezel>
|
||||
|
||||
<bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="19.3" y="4" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="19.3" y="6.85" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="19.3" y="9.7" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="19.3" y="12.55" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="FAKE" inputmask="0x01"><bounds x="35.35" y="4" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="FAKE" inputmask="0x02"><bounds x="35.35" y="6.85" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="35.35" y="9.7" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="35.35" y="12.55" width="2.65" height="2.65" /><color alpha="0.15" /></bezel>
|
||||
|
||||
<!-- crop borders -->
|
||||
|
||||
<bezel element="static_black"><bounds x="-2" y="-2" width="4.1" height="21" /></bezel>
|
||||
<bezel element="static_black"><bounds x="-2" y="-2" width="43" height="3" /></bezel>
|
||||
<bezel element="static_black"><bounds x="39.3" y="-2" width="4" height="21" /></bezel>
|
||||
<bezel element="static_black"><bounds x="-2" y="17.4" width="43" height="4" /></bezel>
|
||||
|
||||
</view>
|
||||
</mamelayout>
|
||||
|
@ -4,9 +4,22 @@
|
||||
<!-- define elements -->
|
||||
|
||||
<element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
|
||||
<element name="static_yellow"><rect><color red="0.67" green="0.65" blue="0.1" /></rect></element>
|
||||
<element name="static_red"><rect><color red="0.6" green="0.05" blue="0.0" /></rect></element>
|
||||
<element name="static_gray"><rect><color red="0.66" green="0.66" blue="0.66" /></rect></element>
|
||||
<element name="static_yellow"><rect><color red="0.7" green="0.65" blue="0.05" /></rect></element>
|
||||
<element name="static_green"><rect><color red="0.5" green="0.7" blue="0.05" /></rect></element>
|
||||
<element name="static_red"><rect><color red="0.7" green="0.05" blue="0.1" /></rect></element>
|
||||
<element name="static_blue"><rect><color red="0.05" green="0.5" blue="0.7" /></rect></element>
|
||||
<element name="static_white"><rect><color red="0.7" green="0.7" blue="0.7" /></rect></element>
|
||||
|
||||
<element name="hl" defstate="0">
|
||||
<text string=" ">
|
||||
<bounds x="0" y="0" width="24" height="21" />
|
||||
<color red="0.0" green="0.0" blue="0.0" />
|
||||
</text>
|
||||
<disk state="1">
|
||||
<bounds x="3.5" y="2" width="17" height="17" />
|
||||
<color red="1.0" green="1.0" blue="1.0" />
|
||||
</disk>
|
||||
</element>
|
||||
|
||||
<element name="digit" defstate="0">
|
||||
<led7seg><color red="1.0" green="0.25" blue="0.23" /></led7seg>
|
||||
@ -29,27 +42,61 @@
|
||||
<disk state="0"><color red="0.2" green="0.05" blue="0.04" /></disk>
|
||||
</element>
|
||||
|
||||
<element name="text_a"><text string="A"><color red="0.69" green="0.69" blue="0.69" /></text></element>
|
||||
<element name="text_b"><text string="B"><color red="0.69" green="0.69" blue="0.69" /></text></element>
|
||||
<element name="text_c"><text string="C"><color red="0.69" green="0.69" blue="0.69" /></text></element>
|
||||
<element name="text_d"><text string="D"><color red="0.69" green="0.69" blue="0.69" /></text></element>
|
||||
<element name="text_a"><text string="A"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_b"><text string="B"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_c"><text string="C"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_d"><text string="D"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_1"><text string="1"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_2"><text string="2"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_3"><text string="3"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_4"><text string="4"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
|
||||
<element name="text_1"><text string="1"><color red="0.69" green="0.69" blue="0.69" /></text></element>
|
||||
<element name="text_2"><text string="2"><color red="0.69" green="0.69" blue="0.69" /></text></element>
|
||||
<element name="text_3"><text string="3"><color red="0.69" green="0.69" blue="0.69" /></text></element>
|
||||
<element name="text_4"><text string="4"><color red="0.69" green="0.69" blue="0.69" /></text></element>
|
||||
<element name="text_alert"><text string="ALERT"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_combat"><text string="COMBAT"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_force"><text string="FORCE UNITS"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_players"><text string="PLAYERS"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
|
||||
<element name="text_alert"><text string="ALERT"><color red="0.69" green="0.69" blue="0.69" /></text></element>
|
||||
<element name="text_combat"><text string="COMBAT"><color red="0.69" green="0.69" blue="0.69" /></text></element>
|
||||
<element name="text_force"><text string="FORCE UNITS"><color red="0.69" green="0.69" blue="0.69" /></text></element>
|
||||
<element name="text_players"><text string="PLAYERS"><color red="0.69" green="0.69" blue="0.69" /></text></element>
|
||||
<element name="text_byl">
|
||||
<rect><color red="0.0" green="0.0" blue="0.0" /></rect>
|
||||
<text string="RECONNAISSANCE"><color red="0.7" green="0.7" blue="0.7" /></text>
|
||||
</element>
|
||||
<element name="text_by1"><text string="MAGNA"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_by2"><text string="ENEMY"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
|
||||
<element name="text_bbl">
|
||||
<rect><color red="0.0" green="0.0" blue="0.0" /></rect>
|
||||
<text string="GAME"><color red="0.7" green="0.7" blue="0.7" /></text>
|
||||
</element>
|
||||
<element name="text_bb1"><text string="BASIC"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_bb2"><text string="INTER"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_bb3"><text string="ADV"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_bb4"><text string="P#"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
|
||||
<element name="text_bgl">
|
||||
<rect><color red="0.0" green="0.0" blue="0.0" /></rect>
|
||||
<text string="TACTICAL REACTION"><color red="0.7" green="0.7" blue="0.7" /></text>
|
||||
</element>
|
||||
<element name="text_bg1"><text string="EM"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_bg2"><text string="BS"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_bg3"><text string="SCR"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
|
||||
<element name="text_brl">
|
||||
<rect><color red="0.0" green="0.0" blue="0.0" /></rect>
|
||||
<text string="MANEUVERS"><color red="0.7" green="0.7" blue="0.7" /></text>
|
||||
</element>
|
||||
<element name="text_br11"><text string="START"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_br12"><text string="TURN"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_br21"><text string="END"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_br22"><text string="TURN"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_br3"><text string="MOVE"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_br4"><text string="FIRE"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
<element name="text_bra"><text string="-->"><color red="0.7" green="0.7" blue="0.7" /></text></element>
|
||||
|
||||
|
||||
<!-- build screen -->
|
||||
|
||||
<view name="Internal Layout">
|
||||
<bounds left="0" right="165" top="0" bottom="105" />
|
||||
<bounds left="0" right="165" top="0" bottom="195" />
|
||||
|
||||
<bezel element="static_yellow"><bounds x="3" y="17" width="10" height="83" /></bezel>
|
||||
<bezel element="static_black"><bounds x="4" y="18" width="8" height="81" /></bezel>
|
||||
@ -65,20 +112,19 @@
|
||||
<bezel element="static_red"><bounds x="58" y="3.5" width="1" height="9" /></bezel>
|
||||
<bezel element="static_red"><bounds x="78" y="3.5" width="1" height="9" /></bezel>
|
||||
|
||||
<bezel element="text_a"><bounds x="4" y="24.5" width="8" height="8" /></bezel>
|
||||
<bezel element="text_b"><bounds x="4" y="44.5" width="8" height="8" /></bezel>
|
||||
<bezel element="text_c"><bounds x="4" y="64.5" width="8" height="8" /></bezel>
|
||||
<bezel element="text_d"><bounds x="4" y="84.5" width="8" height="8" /></bezel>
|
||||
|
||||
<bezel element="text_1"><bounds x="24.5" y="4" width="8" height="8" /></bezel>
|
||||
<bezel element="text_2"><bounds x="44.5" y="4" width="8" height="8" /></bezel>
|
||||
<bezel element="text_3"><bounds x="64.5" y="4" width="8" height="8" /></bezel>
|
||||
<bezel element="text_4"><bounds x="84.5" y="4" width="8" height="8" /></bezel>
|
||||
<bezel element="text_a"><bounds x="4" y="25" width="8" height="7" /></bezel>
|
||||
<bezel element="text_b"><bounds x="4" y="45" width="8" height="7" /></bezel>
|
||||
<bezel element="text_c"><bounds x="4" y="65" width="8" height="7" /></bezel>
|
||||
<bezel element="text_d"><bounds x="4" y="85" width="8" height="7" /></bezel>
|
||||
|
||||
<bezel element="text_1"><bounds x="24.5" y="4.5" width="8" height="7" /></bezel>
|
||||
<bezel element="text_2"><bounds x="44.5" y="4.5" width="8" height="7" /></bezel>
|
||||
<bezel element="text_3"><bounds x="64.5" y="4.5" width="8" height="7" /></bezel>
|
||||
<bezel element="text_4"><bounds x="84.5" y="4.5" width="8" height="7" /></bezel>
|
||||
|
||||
<!-- lamp matrix -->
|
||||
|
||||
<bezel element="static_gray"><bounds x="17" y="17" width="83" height="83" /></bezel>
|
||||
<bezel element="static_white"><bounds x="17" y="17" width="83" height="83" /></bezel>
|
||||
|
||||
<bezel name="lamp20" element="lamp"><bounds x="20" y="20" width="17" height="17" /></bezel>
|
||||
<bezel name="lamp21" element="lamp"><bounds x="40" y="20" width="17" height="17" /></bezel>
|
||||
@ -100,28 +146,116 @@
|
||||
<bezel name="lamp46" element="lamp"><bounds x="60" y="80" width="17" height="17" /></bezel>
|
||||
<bezel name="lamp47" element="lamp"><bounds x="80" y="80" width="17" height="17" /></bezel>
|
||||
|
||||
|
||||
<!-- right side -->
|
||||
|
||||
<bezel element="static_gray"><bounds x="105" y="17" width="55" height="23" /></bezel>
|
||||
<bezel element="static_white"><bounds x="105" y="17" width="55" height="23" /></bezel>
|
||||
<bezel element="static_black"><bounds x="106" y="18" width="53" height="21" /></bezel>
|
||||
<bezel element="text_alert"><bounds x="106" y="18.5" width="53" height="8" /></bezel>
|
||||
|
||||
<bezel name="lamp5" element="nlamp"><bounds x="130.8" y="30.5" width="3.4" height="3.4" /></bezel>
|
||||
|
||||
<bezel element="static_gray"><bounds x="105" y="43" width="55" height="23" /></bezel>
|
||||
<bezel element="static_white"><bounds x="105" y="43" width="55" height="23" /></bezel>
|
||||
<bezel element="static_black"><bounds x="106" y="44" width="53" height="21" /></bezel>
|
||||
<bezel element="text_combat"><bounds x="106" y="44.5" width="53" height="8" /></bezel>
|
||||
<bezel element="text_combat"><bounds x="106" y="45" width="53" height="7" /></bezel>
|
||||
|
||||
<bezel name="lamp4" element="nlamp"><bounds x="130.8" y="56.5" width="3.4" height="3.4" /></bezel>
|
||||
|
||||
<bezel element="static_gray"><bounds x="105" y="69" width="55" height="31" /></bezel>
|
||||
<bezel element="static_white"><bounds x="105" y="69" width="55" height="31" /></bezel>
|
||||
<bezel element="static_black"><bounds x="106" y="70" width="53" height="29" /></bezel>
|
||||
<bezel element="text_force"><bounds x="106" y="70.5" width="53" height="8" /></bezel>
|
||||
<bezel element="text_players"><bounds x="106" y="90" width="53" height="8" /></bezel>
|
||||
<bezel element="text_force"><bounds x="106" y="71" width="53" height="7" /></bezel>
|
||||
<bezel element="text_players"><bounds x="106" y="90.5" width="53" height="7" /></bezel>
|
||||
|
||||
<bezel name="digit6" element="digit"><bounds x="126" y="79.7" width="6" height="9" /></bezel>
|
||||
<bezel name="digit8" element="digit"><bounds x="132" y="79.7" width="6" height="9" /></bezel>
|
||||
|
||||
<!-- button panel -->
|
||||
|
||||
<bezel element="static_white"><bounds x="-1" y="105" width="167" height="1" /></bezel>
|
||||
|
||||
<bezel element="static_white"><bounds x="3" y="112" width="50" height="1" /></bezel>
|
||||
<bezel element="text_byl"><bounds x="9.5" y="110" width="37" height="5" /></bezel>
|
||||
<bezel element="static_yellow"><bounds x="3" y="116" width="24" height="21" /></bezel>
|
||||
<bezel element="static_yellow"><bounds x="29" y="116" width="24" height="21" /></bezel>
|
||||
|
||||
<bezel element="static_white"><bounds x="84" y="112" width="76" height="1" /></bezel>
|
||||
<bezel element="text_bgl"><bounds x="100.5" y="110" width="43" height="5" /></bezel>
|
||||
<bezel element="static_green"><bounds x="84" y="116" width="24" height="21" /></bezel>
|
||||
<bezel element="static_green"><bounds x="110" y="116" width="24" height="21" /></bezel>
|
||||
<bezel element="static_green"><bounds x="136" y="116" width="24" height="21" /></bezel>
|
||||
|
||||
<bezel element="static_blue"><bounds x="3" y="142" width="24" height="21" /></bezel>
|
||||
<bezel element="static_blue"><bounds x="29" y="142" width="24" height="21" /></bezel>
|
||||
<bezel element="static_blue"><bounds x="3" y="165" width="24" height="21" /></bezel>
|
||||
<bezel element="static_blue"><bounds x="29" y="165" width="24" height="21" /></bezel>
|
||||
<bezel element="static_white"><bounds x="3" y="189" width="50" height="1" /></bezel>
|
||||
<bezel element="text_bbl"><bounds x="21" y="187" width="14" height="5" /></bezel>
|
||||
|
||||
<bezel element="static_red"><bounds x="58" y="142" width="24" height="21" /></bezel>
|
||||
<bezel element="static_red"><bounds x="84" y="142" width="24" height="21" /></bezel>
|
||||
<bezel element="static_red"><bounds x="110" y="142" width="24" height="21" /></bezel>
|
||||
<bezel element="static_red"><bounds x="136" y="142" width="24" height="21" /></bezel>
|
||||
<bezel element="static_red"><bounds x="58" y="165" width="24" height="21" /></bezel>
|
||||
<bezel element="static_red"><bounds x="84" y="165" width="24" height="21" /></bezel>
|
||||
<bezel element="static_red"><bounds x="110" y="165" width="24" height="21" /></bezel>
|
||||
<bezel element="static_red"><bounds x="136" y="165" width="24" height="21" /></bezel>
|
||||
<bezel element="static_white"><bounds x="58" y="189" width="102" height="1" /></bezel>
|
||||
<bezel element="text_brl"><bounds x="95.5" y="187" width="27" height="5" /></bezel>
|
||||
|
||||
<bezel element="static_black"><bounds x="6" y="119" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="32" y="119" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="87" y="119" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="113" y="119" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="139" y="119" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="6" y="145" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="32" y="145" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="6" y="168" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="32" y="168" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="61" y="145" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="87" y="145" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="113" y="145" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="139" y="145" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="61" y="168" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="87" y="168" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="113" y="168" width="18" height="15" /></bezel>
|
||||
<bezel element="static_black"><bounds x="139" y="168" width="18" height="15" /></bezel>
|
||||
|
||||
<bezel element="text_by1"><bounds x="6" y="124" width="18" height="5" /></bezel>
|
||||
<bezel element="text_by2"><bounds x="32" y="124" width="18" height="5" /></bezel>
|
||||
<bezel element="text_bg1"><bounds x="87" y="124" width="18" height="5" /></bezel>
|
||||
<bezel element="text_bg2"><bounds x="113" y="124" width="18" height="5" /></bezel>
|
||||
<bezel element="text_bg3"><bounds x="139" y="124" width="18" height="5" /></bezel>
|
||||
<bezel element="text_bb1"><bounds x="6" y="150" width="18" height="5" /></bezel>
|
||||
<bezel element="text_bb2"><bounds x="32" y="150" width="18" height="5" /></bezel>
|
||||
<bezel element="text_bb3"><bounds x="6" y="173" width="18" height="5" /></bezel>
|
||||
<bezel element="text_bb4"><bounds x="32" y="173" width="18" height="5" /></bezel>
|
||||
<bezel element="text_br11"><bounds x="61" y="147.5" width="18" height="5" /></bezel>
|
||||
<bezel element="text_br12"><bounds x="61" y="152.5" width="18" height="5" /></bezel>
|
||||
<bezel element="text_br21"><bounds x="87" y="147.5" width="18" height="5" /></bezel>
|
||||
<bezel element="text_br22"><bounds x="87" y="152.5" width="18" height="5" /></bezel>
|
||||
<bezel element="text_br3"><bounds x="113" y="150" width="18" height="5" /></bezel>
|
||||
<bezel element="text_br4"><bounds x="139" y="150" width="18" height="5" /></bezel>
|
||||
<bezel element="text_bra"><bounds x="61" y="173" width="18" height="5" /><orientation rotate="180" /></bezel>
|
||||
<bezel element="text_bra"><bounds x="93.5" y="168" width="5" height="15" /><orientation rotate="270" /></bezel>
|
||||
<bezel element="text_bra"><bounds x="113" y="173" width="18" height="5" /></bezel>
|
||||
<bezel element="text_bra"><bounds x="145.5" y="168" width="5" height="15" /><orientation rotate="90" /></bezel>
|
||||
|
||||
<bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="3" y="116" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="29" y="116" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="84" y="116" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="110" y="116" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="136" y="116" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="3" y="142" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="29" y="142" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="3" y="165" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="29" y="165" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="58" y="142" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="84" y="142" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="110" y="142" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="136" y="142" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="58" y="165" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="84" y="165" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="110" y="165" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
<bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="136" y="165" width="24" height="21" /><color alpha="0.15" /></bezel>
|
||||
|
||||
</view>
|
||||
</mamelayout>
|
||||
|
@ -1043,7 +1043,7 @@ READ32_MEMBER( n64_periphs::vi_reg_r )
|
||||
break;
|
||||
|
||||
case 0x10/4: // VI_CURRENT_REG
|
||||
ret = (m_screen->vpos() & 0x3FE) + field; // << 1);
|
||||
ret = (m_screen->vpos() & 0x3FE) + field;
|
||||
break;
|
||||
|
||||
case 0x14/4: // VI_BURST_REG
|
||||
@ -1742,7 +1742,7 @@ int n64_periphs::pif_channel_handle_command(int channel, int slength, UINT8 *sda
|
||||
{
|
||||
// Read EEPROM status
|
||||
rdata[0] = 0x00;
|
||||
rdata[1] = 0x80;
|
||||
rdata[1] = (machine().root_device().ioport("input")->read() >> 8) & 0xC0;
|
||||
rdata[2] = 0x00;
|
||||
|
||||
return 0;
|
||||
@ -2127,9 +2127,7 @@ void n64_periphs::pif_dma(int direction)
|
||||
}
|
||||
}
|
||||
si_status |= 1;
|
||||
si_dma_timer->adjust(attotime::from_hz(1000));
|
||||
//si_status |= 0x1000;
|
||||
//signal_rcp_interrupt(SI_INTERRUPT);
|
||||
si_dma_timer->adjust(attotime::from_hz(10000));
|
||||
}
|
||||
|
||||
READ32_MEMBER( n64_periphs::si_reg_r )
|
||||
@ -2171,6 +2169,7 @@ WRITE32_MEMBER( n64_periphs::si_reg_w )
|
||||
|
||||
case 0x18/4: // SI_STATUS_REG
|
||||
si_status = 0;
|
||||
si_dma_timer->adjust(attotime::never);
|
||||
clear_rcp_interrupt(SI_INTERRUPT);
|
||||
break;
|
||||
|
||||
|
@ -8890,6 +8890,7 @@ ccbootmr // Model Racing bootleg
|
||||
cclimber // (c) 1980 Nichibutsu
|
||||
cclimberj // (c) 1980 Nichibutsu
|
||||
cclimbroper // Operamatic bootleg
|
||||
cclimbrrod // Rodmar bootleg
|
||||
ckong // (c) 1981 (Kyoei)
|
||||
ckongalc // bootleg (Alca)
|
||||
ckongdks // Spanish Crazy Kong bootleg
|
||||
@ -35650,6 +35651,7 @@ videopkr // (c) 1984 InterFlip
|
||||
@source:vigilant.cpp
|
||||
buccanrs // (c) 1989 Duintronic
|
||||
buccanrsa // (c) 1989 Duintronic
|
||||
buccanrsb // (c) 1989 Duintronic
|
||||
kikcubic // (c) 1988 (Japan)
|
||||
kikcubicb // bootleg
|
||||
vigilant // (c) 1988 (World Rev E)
|
||||
|
@ -50,10 +50,6 @@ public:
|
||||
|
||||
virtual error read(void *buffer, std::uint64_t offset, std::uint32_t count, std::uint32_t &actual) override
|
||||
{
|
||||
#if defined(EMSCRIPTEN)
|
||||
m_listening = false;
|
||||
return error::FAILURE; // TODO: work out what it dislikes about emscripten
|
||||
#else
|
||||
fd_set readfds;
|
||||
FD_ZERO(&readfds);
|
||||
FD_SET(m_sock, &readfds);
|
||||
@ -107,7 +103,6 @@ public:
|
||||
{
|
||||
return error::FAILURE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual error write(void const *buffer, std::uint64_t offset, std::uint32_t count, std::uint32_t &actual) override
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
@ -25,7 +24,6 @@
|
||||
#include <initguid.h>
|
||||
|
||||
// Direct2D
|
||||
#include <dxgi1_2.h>
|
||||
#include <d2d1_1.h>
|
||||
#include <dwrite_1.h>
|
||||
|
||||
@ -36,11 +34,8 @@ DEFINE_GUID(GUID_WICPixelFormat8bppAlpha, 0xe6cd0116, 0xeeba, 0x4161, 0xaa, 0x85
|
||||
#include <wrl\client.h>
|
||||
#undef interface
|
||||
|
||||
#include "emu.h"
|
||||
#include "strconv.h"
|
||||
#include "corestr.h"
|
||||
#include "corealloc.h"
|
||||
#include "fileio.h"
|
||||
#include "winutil.h"
|
||||
|
||||
using namespace Microsoft::WRL;
|
||||
@ -72,6 +67,16 @@ static const float POINTS_PER_DIP = (3.0f / 4.0f);
|
||||
#define HR_RET0( CALL ) HR_RET(CALL, 0)
|
||||
#define HR_RET1( CALL ) HR_RET(CALL, 1)
|
||||
|
||||
struct osd_deleter
|
||||
{
|
||||
void operator () (void * osd_pointer) const
|
||||
{
|
||||
osd_free(osd_pointer);
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::unique_ptr<char, osd_deleter> osd_utf8_ptr;
|
||||
|
||||
// Typedefs for dynamically loaded functions
|
||||
typedef lazy_loaded_function_p4<HRESULT, D2D1_FACTORY_TYPE, REFIID, const D2D1_FACTORY_OPTIONS*, void**> d2d_create_factory_fn;
|
||||
typedef lazy_loaded_function_p3<HRESULT, DWRITE_FACTORY_TYPE, REFIID, IUnknown**> dwrite_create_factory_fn;
|
||||
@ -201,32 +206,32 @@ public:
|
||||
m_designUnits = designUnits;
|
||||
}
|
||||
|
||||
UINT16 DesignUnitsPerEm()
|
||||
UINT16 DesignUnitsPerEm() const
|
||||
{
|
||||
return m_designUnitsPerEm;
|
||||
}
|
||||
|
||||
float EmSizeInDip()
|
||||
float EmSizeInDip() const
|
||||
{
|
||||
return m_emSizeInDip;
|
||||
}
|
||||
|
||||
float DesignUnits()
|
||||
float DesignUnits() const
|
||||
{
|
||||
return m_designUnits;
|
||||
}
|
||||
|
||||
int Dips()
|
||||
int Dips() const
|
||||
{
|
||||
return (int)floor((m_designUnits * m_emSizeInDip) / m_designUnitsPerEm);
|
||||
return static_cast<int>(floor((m_designUnits * m_emSizeInDip) / m_designUnitsPerEm));
|
||||
}
|
||||
|
||||
float Points()
|
||||
float Points() const
|
||||
{
|
||||
return Dips() * POINTS_PER_DIP;
|
||||
}
|
||||
|
||||
FontDimension operator-(const FontDimension &other)
|
||||
FontDimension operator-(const FontDimension &other) const
|
||||
{
|
||||
if (m_designUnitsPerEm != other.m_designUnitsPerEm || m_emSizeInDip != other.m_emSizeInDip)
|
||||
{
|
||||
@ -236,7 +241,7 @@ public:
|
||||
return FontDimension(m_designUnitsPerEm, m_emSizeInDip, m_designUnits - other.m_designUnits);
|
||||
}
|
||||
|
||||
FontDimension operator+(const FontDimension &other)
|
||||
FontDimension operator+(const FontDimension &other) const
|
||||
{
|
||||
if (m_designUnitsPerEm != other.m_designUnitsPerEm || m_emSizeInDip != other.m_emSizeInDip)
|
||||
{
|
||||
@ -267,12 +272,12 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
FontDimension advanceWidth() { return m_advanceWidth; }
|
||||
FontDimension abcA() { return m_a; }
|
||||
FontDimension advanceWidth() const { return m_advanceWidth; }
|
||||
FontDimension abcA() const { return m_a; }
|
||||
|
||||
// Relationship between advanceWidth and B is ADV = A + B + C so B = ADV - A - C
|
||||
FontDimension abcB() { return advanceWidth() - abcA() - abcC(); }
|
||||
FontDimension abcC() { return m_c; }
|
||||
FontDimension abcB() const { return advanceWidth() - abcA() - abcC(); }
|
||||
FontDimension abcC() const { return m_c; }
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -287,7 +292,7 @@ private:
|
||||
float m_emSizeInDip;
|
||||
|
||||
public:
|
||||
float EmSizeInDip()
|
||||
float EmSizeInDip() const
|
||||
{
|
||||
return m_emSizeInDip;
|
||||
}
|
||||
@ -298,25 +303,25 @@ public:
|
||||
m_emSizeInDip = emSizeInDip;
|
||||
}
|
||||
|
||||
FontDimension FromDip(float dip)
|
||||
FontDimension FromDip(float dip) const
|
||||
{
|
||||
float sizeInDesignUnits = (dip / m_emSizeInDip) * m_designUnitsPerEm;
|
||||
return FontDimension(m_designUnitsPerEm, m_emSizeInDip, sizeInDesignUnits);
|
||||
}
|
||||
|
||||
FontDimension FromDesignUnit(float designUnits)
|
||||
FontDimension FromDesignUnit(float designUnits) const
|
||||
{
|
||||
return FontDimension(m_designUnitsPerEm, m_emSizeInDip, designUnits);
|
||||
}
|
||||
|
||||
FontDimension FromPoint(float pointSize)
|
||||
FontDimension FromPoint(float pointSize) const
|
||||
{
|
||||
float sizeInDip = pointSize * (4.0f / 3.0f);
|
||||
float sizeInDesignUnits = (sizeInDip / m_emSizeInDip) * m_designUnitsPerEm;
|
||||
return FontDimension(m_designUnitsPerEm, m_emSizeInDip, sizeInDesignUnits);
|
||||
}
|
||||
|
||||
FontABCWidths CreateAbcWidths(float advanceWidth, float leftSideBearing, float rightSideBearing)
|
||||
FontABCWidths CreateAbcWidths(float advanceWidth, float leftSideBearing, float rightSideBearing) const
|
||||
{
|
||||
return FontABCWidths(
|
||||
FromDesignUnit(advanceWidth),
|
||||
@ -341,11 +346,11 @@ private:
|
||||
|
||||
public:
|
||||
osd_font_dwrite(ComPtr<ID2D1Factory> d2dfactory, ComPtr<IDWriteFactory> dwriteFactory, ComPtr<IWICImagingFactory> wicFactory)
|
||||
: m_d2dfactory(d2dfactory), m_dwriteFactory(dwriteFactory), m_wicFactory(wicFactory)
|
||||
: m_d2dfactory(d2dfactory), m_dwriteFactory(dwriteFactory), m_wicFactory(wicFactory), m_fontEmHeightInDips(0)
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool open(const char *font_path, const char *_name, int &height) override
|
||||
virtual bool open(std::string const &font_path, std::string const &_name, int &height) override
|
||||
{
|
||||
if (m_d2dfactory == nullptr || m_dwriteFactory == nullptr || m_wicFactory == nullptr)
|
||||
return false;
|
||||
@ -359,11 +364,11 @@ public:
|
||||
bool italic = (strreplace(name, "[I]", "") + strreplace(name, "[i]", "") > 0);
|
||||
|
||||
// convert the face name
|
||||
auto familyName = std::wstring(std::unique_ptr<WCHAR, void(*)(void *)>(wstring_from_utf8(name.c_str()), osd_free).get());
|
||||
std::unique_ptr<WCHAR, void(*)(void *)> familyName(wstring_from_utf8(name.c_str()), osd_free);
|
||||
|
||||
// find the font
|
||||
HR_RET0(find_font(
|
||||
familyName.c_str(),
|
||||
familyName.get(),
|
||||
bold ? DWRITE_FONT_WEIGHT_BOLD : DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STRETCH_NORMAL,
|
||||
italic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL,
|
||||
@ -373,7 +378,7 @@ public:
|
||||
m_font->GetMetrics(&metrics);
|
||||
|
||||
m_fontEmHeightInDips = DEFAULT_EM_HEIGHT;
|
||||
height = (int)round(m_fontEmHeightInDips * DIPS_PER_POINT);
|
||||
height = static_cast<int>(round(m_fontEmHeightInDips * DIPS_PER_POINT));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -397,7 +402,7 @@ public:
|
||||
// pixel of a black & white font
|
||||
//-------------------------------------------------
|
||||
|
||||
virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs) override
|
||||
virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) override
|
||||
{
|
||||
const int MEM_ALIGN_CONST = 31;
|
||||
const int BITMAP_PAD = 50;
|
||||
@ -493,7 +498,7 @@ public:
|
||||
target->Clear(D2D1::ColorF(0.0f, 0.0f, 0.0f, 0.0f));
|
||||
|
||||
// now draw the character
|
||||
DWRITE_GLYPH_RUN run = { 0 };
|
||||
DWRITE_GLYPH_RUN run = { nullptr };
|
||||
DWRITE_GLYPH_OFFSET offsets;
|
||||
offsets.advanceOffset = 0;
|
||||
offsets.ascenderOffset = 0;
|
||||
@ -528,7 +533,7 @@ public:
|
||||
// Lock the bitmap and get the data pointer
|
||||
WICRect rect = { 0, 0, bmwidth, bmheight };
|
||||
HR_RET0(wicBitmap->Lock(&rect, WICBitmapLockRead, lock.GetAddressOf()));
|
||||
HR_RET0(lock->GetDataPointer(&cbData, (BYTE**)&pixels));
|
||||
HR_RET0(lock->GetDataPointer(&cbData, static_cast<BYTE**>(&pixels)));
|
||||
|
||||
// determine the actual left of the character
|
||||
for (actbounds.min_x = 0; actbounds.min_x < bmwidth; actbounds.min_x++)
|
||||
@ -610,9 +615,9 @@ private:
|
||||
// find_font - finds a font, given attributes
|
||||
//-------------------------------------------------
|
||||
|
||||
HRESULT find_font(std::wstring familyName, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STRETCH stretch, DWRITE_FONT_STYLE style, IDWriteFont ** ppfont)
|
||||
HRESULT find_font(std::wstring familyName, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STRETCH stretch, DWRITE_FONT_STYLE style, IDWriteFont ** ppfont) const
|
||||
{
|
||||
HRESULT result = S_OK;
|
||||
HRESULT result;
|
||||
|
||||
ComPtr<IDWriteFontCollection> fonts;
|
||||
HR_RETHR(m_dwriteFactory->GetSystemFontCollection(fonts.GetAddressOf()));
|
||||
@ -695,7 +700,7 @@ public:
|
||||
reinterpret_cast<void**>(this->m_d2dfactory.GetAddressOf())));
|
||||
|
||||
// Initialize COM
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
|
||||
|
||||
// Create a DirectWrite factory.
|
||||
HR_RET1(m_pfnDWriteCreateFactory(
|
||||
@ -708,15 +713,97 @@ public:
|
||||
NULL,
|
||||
CLSCTX_INPROC_SERVER,
|
||||
__uuidof(IWICImagingFactory),
|
||||
(void**)&m_wicFactory));
|
||||
static_cast<void**>(&m_wicFactory)));
|
||||
|
||||
osd_printf_verbose("FontProvider: DirectWrite initialized successfully.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual osd_font *font_alloc() override
|
||||
virtual osd_font::ptr font_alloc() override
|
||||
{
|
||||
return global_alloc(osd_font_dwrite(m_d2dfactory, m_dwriteFactory, m_wicFactory));
|
||||
return std::make_unique<osd_font_dwrite>(m_d2dfactory, m_dwriteFactory, m_wicFactory);
|
||||
}
|
||||
|
||||
virtual bool get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &fontresult) override
|
||||
{
|
||||
HRESULT result;
|
||||
ComPtr<IDWriteFontFamily> family;
|
||||
ComPtr<IDWriteLocalizedStrings> names;
|
||||
|
||||
// For now, we're just enumerating system fonts, if we want to support custom font
|
||||
// collections, there's more work that neeeds to be done
|
||||
ComPtr<IDWriteFontCollection> fonts;
|
||||
HR_RET0(m_dwriteFactory->GetSystemFontCollection(fonts.GetAddressOf()));
|
||||
|
||||
int family_count = fonts->GetFontFamilyCount();
|
||||
for (int i = 0; i < family_count; i++)
|
||||
{
|
||||
HR_RET0(fonts->GetFontFamily(i, family.ReleaseAndGetAddressOf()));
|
||||
|
||||
HR_RET0(family->GetFamilyNames(names.ReleaseAndGetAddressOf()));
|
||||
|
||||
std::unique_ptr<WCHAR[]> name = nullptr;
|
||||
HR_RET0(get_localized_familyname(names, name));
|
||||
|
||||
auto utf8_name = osd_utf8_ptr(utf8_from_wstring(name.get()));
|
||||
name.reset();
|
||||
|
||||
// Review: should the config name, be unlocalized?
|
||||
// maybe the english name?
|
||||
fontresult.push_back(
|
||||
make_pair(
|
||||
std::string(utf8_name.get()),
|
||||
std::string(utf8_name.get())));
|
||||
|
||||
utf8_name.reset();
|
||||
}
|
||||
|
||||
std::stable_sort(fontresult.begin(), fontresult.end());
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
HRESULT get_family_for_locale(ComPtr<IDWriteLocalizedStrings> family_names, const WCHAR* locale, std::unique_ptr<WCHAR[]> &family_name) const
|
||||
{
|
||||
HRESULT result;
|
||||
UINT32 index;
|
||||
BOOL exists = false;
|
||||
|
||||
result = family_names->FindLocaleName(locale, &index, &exists);
|
||||
|
||||
// if the above find did not find a match, retry with US English
|
||||
if (SUCCEEDED(result) && !exists)
|
||||
family_names->FindLocaleName(L"en-us", &index, &exists);
|
||||
|
||||
// If the specified locale doesn't exist, select the first on the list.
|
||||
if (!exists)
|
||||
index = 0;
|
||||
|
||||
// Get the length and allocate our buffer
|
||||
UINT32 name_length = 0;
|
||||
HR_RETHR(family_names->GetStringLength(index, &name_length));
|
||||
auto name_buffer = std::make_unique<WCHAR[]>(name_length + 1);
|
||||
|
||||
// Get the name
|
||||
HR_RETHR(family_names->GetString(index, name_buffer.get(), name_length + 1));
|
||||
|
||||
family_name = std::move(name_buffer);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT get_localized_familyname(ComPtr<IDWriteLocalizedStrings> family_names, std::unique_ptr<WCHAR[]> &family_name) const
|
||||
{
|
||||
wchar_t localeName[LOCALE_NAME_MAX_LENGTH];
|
||||
|
||||
// Get the default locale for this user.
|
||||
int defaultLocaleSuccess = GetUserDefaultLocaleName(localeName, LOCALE_NAME_MAX_LENGTH);
|
||||
|
||||
// If the default locale is returned, find that locale name, otherwise use "en-us".
|
||||
if (defaultLocaleSuccess)
|
||||
return get_family_for_locale(family_names, localeName, family_name);
|
||||
|
||||
// If locale can't be determined, fall back to US English
|
||||
return get_family_for_locale(family_names, L"en-us", family_name);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -5,12 +5,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef FONT_MODULE_H_
|
||||
#define FONT_MODULE_H_
|
||||
#ifndef MAME_OSD_MODULES_FONT_FONTMODULE_H
|
||||
#define MAME_OSD_MODULES_FONT_FONTMODULE_H
|
||||
|
||||
#include "osdepend.h"
|
||||
#include "modules/osdmodule.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
//============================================================
|
||||
// CONSTANTS
|
||||
//============================================================
|
||||
@ -21,8 +25,13 @@ class font_module
|
||||
{
|
||||
public:
|
||||
virtual ~font_module() { }
|
||||
virtual osd_font *font_alloc() = 0;
|
||||
|
||||
/** attempt to allocate a font instance */
|
||||
virtual osd_font::ptr font_alloc() = 0;
|
||||
|
||||
/** attempt to list available font families */
|
||||
virtual bool get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result) = 0;
|
||||
};
|
||||
|
||||
|
||||
#endif /* FONT_MODULE_H_ */
|
||||
#endif // MAME_OSD_MODULES_FONT_FONTMODULE_H
|
||||
|
@ -8,61 +8,25 @@
|
||||
#include "font_module.h"
|
||||
#include "modules/osdmodule.h"
|
||||
|
||||
//-------------------------------------------------
|
||||
// font_open - attempt to "open" a handle to the
|
||||
// font with the given name
|
||||
//-------------------------------------------------
|
||||
|
||||
class osd_font_none : public osd_font
|
||||
{
|
||||
public:
|
||||
virtual ~osd_font_none() { }
|
||||
|
||||
virtual bool open(const char *font_path, const char *name, int &height) override;
|
||||
virtual void close() override;
|
||||
virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs) override;
|
||||
virtual bool open(std::string const &font_path, std::string const &name, int &height) override { return false; }
|
||||
virtual void close() override { }
|
||||
virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) override { return false; }
|
||||
};
|
||||
|
||||
bool osd_font_none::open(const char *font_path, const char *_name, int &height)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// font_close - release resources associated with
|
||||
// a given OSD font
|
||||
//-------------------------------------------------
|
||||
|
||||
void osd_font_none::close()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// font_get_bitmap - allocate and populate a
|
||||
// BITMAP_FORMAT_ARGB32 bitmap containing the
|
||||
// pixel values rgb_t(0xff,0xff,0xff,0xff)
|
||||
// or rgb_t(0x00,0xff,0xff,0xff) for each
|
||||
// pixel of a black & white font
|
||||
//-------------------------------------------------
|
||||
|
||||
bool osd_font_none::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
class font_none : public osd_module, public font_module
|
||||
{
|
||||
public:
|
||||
font_none() : osd_module(OSD_FONT_PROVIDER, "none"), font_module()
|
||||
{
|
||||
}
|
||||
font_none() : osd_module(OSD_FONT_PROVIDER, "none"), font_module() { }
|
||||
|
||||
virtual int init(const osd_options &options) override { return 0; }
|
||||
|
||||
virtual osd_font *font_alloc() override
|
||||
{
|
||||
return global_alloc(osd_font_none);
|
||||
}
|
||||
virtual osd_font::ptr font_alloc() override { return std::make_unique<osd_font_none>(); }
|
||||
virtual bool get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result) override { return false; }
|
||||
};
|
||||
|
||||
MODULE_DEFINITION(FONT_NONE, font_none)
|
||||
|
@ -1,5 +1,5 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert, R. Belmont
|
||||
// copyright-holders:Olivier Galibert, R. Belmont, Vas Crabb
|
||||
/*
|
||||
* font_osx.c
|
||||
*
|
||||
@ -10,14 +10,11 @@
|
||||
|
||||
#ifdef SDLMAME_MACOSX
|
||||
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
#include "corealloc.h"
|
||||
#include "fileio.h"
|
||||
|
||||
#define POINT_SIZE 144.0
|
||||
#define EXTRA_HEIGHT 1.0
|
||||
#define EXTRA_WIDTH 1.15
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
//-------------------------------------------------
|
||||
// font_open - attempt to "open" a handle to the
|
||||
@ -27,48 +24,64 @@
|
||||
class osd_font_osx : public osd_font
|
||||
{
|
||||
public:
|
||||
virtual ~osd_font_osx() { }
|
||||
osd_font_osx() : m_font(NULL) { }
|
||||
osd_font_osx(osd_font_osx &&obj) : m_font(obj.m_font) { obj.m_font = NULL; }
|
||||
virtual ~osd_font_osx() { close(); }
|
||||
|
||||
virtual bool open(const char *font_path, const char *name, int &height);
|
||||
virtual bool open(std::string const &font_path, std::string const &name, int &height);
|
||||
virtual void close();
|
||||
virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs);
|
||||
virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs);
|
||||
|
||||
osd_font_osx &operator=(osd_font_osx &&obj)
|
||||
{
|
||||
using std::swap;
|
||||
swap(m_font, obj.m_font);
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
osd_font_osx(osd_font_osx const &) = delete;
|
||||
osd_font_osx &operator=(osd_font_osx const &) = delete;
|
||||
|
||||
static constexpr CGFloat POINT_SIZE = 144.0;
|
||||
static constexpr CGFloat EXTRA_HEIGHT = 1.0;
|
||||
static constexpr CGFloat EXTRA_WIDTH = 1.15;
|
||||
|
||||
CTFontRef m_font;
|
||||
};
|
||||
|
||||
bool osd_font_osx::open(const char *font_path, const char *name, int &height)
|
||||
bool osd_font_osx::open(std::string const &font_path, std::string const &name, int &height)
|
||||
{
|
||||
m_font = NULL;
|
||||
osd_printf_verbose("FONT NAME %s\n", name);
|
||||
osd_printf_verbose("FONT NAME %s\n", name.c_str());
|
||||
#if 0
|
||||
if (!strcmp(name, "default"))
|
||||
if (name != "default")
|
||||
{
|
||||
name = "LucidaGrande";
|
||||
}
|
||||
#endif
|
||||
|
||||
CFStringRef const font_name = CFStringCreateWithCString(NULL, name, kCFStringEncodingUTF8);
|
||||
if (kCFNotFound != CFStringFind(font_name, CFSTR(".BDF"), kCFCompareCaseInsensitive | kCFCompareBackwards | kCFCompareAnchored | kCFCompareNonliteral).location)
|
||||
CFStringRef const font_name = CFStringCreateWithCString(NULL, name.c_str(), kCFStringEncodingUTF8);
|
||||
if (font_name && (kCFNotFound != CFStringFind(font_name, CFSTR(".BDF"), kCFCompareCaseInsensitive | kCFCompareBackwards | kCFCompareAnchored | kCFCompareNonliteral).location))
|
||||
{
|
||||
// handle bdf fonts in the core
|
||||
CFRelease(font_name);
|
||||
return false;
|
||||
}
|
||||
CTFontRef ct_font = NULL;
|
||||
if (font_name != NULL)
|
||||
if (font_name)
|
||||
{
|
||||
CTFontDescriptorRef const font_descriptor = CTFontDescriptorCreateWithNameAndSize(font_name, 0.0);
|
||||
if (font_descriptor != NULL)
|
||||
if (font_descriptor)
|
||||
{
|
||||
ct_font = CTFontCreateWithFontDescriptor(font_descriptor, POINT_SIZE, &CGAffineTransformIdentity);
|
||||
CFRelease(font_descriptor);
|
||||
}
|
||||
}
|
||||
CFRelease(font_name);
|
||||
}
|
||||
|
||||
if (!ct_font)
|
||||
{
|
||||
osd_printf_verbose("Couldn't find/open font %s, using MAME default\n", name);
|
||||
osd_printf_verbose("Couldn't find/open font %s, using MAME default\n", name.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -84,6 +97,7 @@ bool osd_font_osx::open(const char *font_path, const char *name, int &height)
|
||||
line_height += CTFontGetLeading(ct_font);
|
||||
height = ceilf(line_height * EXTRA_HEIGHT);
|
||||
|
||||
close();
|
||||
m_font = ct_font;
|
||||
return true;
|
||||
}
|
||||
@ -96,9 +110,8 @@ bool osd_font_osx::open(const char *font_path, const char *name, int &height)
|
||||
void osd_font_osx::close()
|
||||
{
|
||||
if (m_font != NULL)
|
||||
{
|
||||
CFRelease(m_font);
|
||||
}
|
||||
m_font = NULL;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -109,7 +122,7 @@ void osd_font_osx::close()
|
||||
// pixel of a black & white font
|
||||
//-------------------------------------------------
|
||||
|
||||
bool osd_font_osx::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs)
|
||||
bool osd_font_osx::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs)
|
||||
{
|
||||
UniChar uni_char;
|
||||
CGGlyph glyph;
|
||||
@ -180,21 +193,89 @@ bool osd_font_osx::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &
|
||||
class font_osx : public osd_module, public font_module
|
||||
{
|
||||
public:
|
||||
font_osx()
|
||||
: osd_module(OSD_FONT_PROVIDER, "osx"), font_module()
|
||||
font_osx() : osd_module(OSD_FONT_PROVIDER, "osx"), font_module() { }
|
||||
|
||||
virtual int init(const osd_options &options) override { return 0; }
|
||||
virtual osd_font::ptr font_alloc() override { return std::make_unique<osd_font_osx>(); }
|
||||
virtual bool get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result) override;
|
||||
|
||||
private:
|
||||
static CFComparisonResult sort_callback(CTFontDescriptorRef first, CTFontDescriptorRef second, void *refCon)
|
||||
{
|
||||
CFStringRef left = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(first, kCTFontDisplayNameAttribute, NULL);
|
||||
if (!left) left = (CFStringRef)CTFontDescriptorCopyAttribute(first, kCTFontNameAttribute);
|
||||
CFStringRef right = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(second, kCTFontDisplayNameAttribute, NULL);
|
||||
if (!right) right = (CFStringRef)CTFontDescriptorCopyAttribute(second, kCTFontNameAttribute);
|
||||
|
||||
CFComparisonResult result;
|
||||
if (left && right) result = CFStringCompareWithOptions(left, right, CFRangeMake(0, CFStringGetLength(left)), kCFCompareCaseInsensitive | kCFCompareLocalized | kCFCompareNonliteral);
|
||||
else if (!left) result = kCFCompareLessThan;
|
||||
else if (!right) result = kCFCompareGreaterThan;
|
||||
else result = kCFCompareEqualTo;
|
||||
|
||||
if (left) CFRelease(left);
|
||||
if (right) CFRelease(right);
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual int init(const osd_options &options) { return 0; }
|
||||
|
||||
osd_font *font_alloc()
|
||||
{
|
||||
return global_alloc(osd_font_osx);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
bool font_osx::get_font_families(std::string const &font_path, std::vector<std::pair<std::string, std::string> > &result)
|
||||
{
|
||||
CFStringRef keys[] = { kCTFontCollectionRemoveDuplicatesOption };
|
||||
std::uintptr_t values[ARRAY_LENGTH(keys)] = { 1 };
|
||||
CFDictionaryRef const options = CFDictionaryCreate(kCFAllocatorDefault, (void const **)keys, (void const **)values, ARRAY_LENGTH(keys), &kCFTypeDictionaryKeyCallBacks, NULL);
|
||||
CTFontCollectionRef const collection = CTFontCollectionCreateFromAvailableFonts(NULL);
|
||||
CFRelease(options);
|
||||
if (!collection) return false;
|
||||
|
||||
CFArrayRef const descriptors = CTFontCollectionCreateMatchingFontDescriptorsSortedWithCallback(collection, &sort_callback, nullptr);
|
||||
CFRelease(collection);
|
||||
if (!descriptors) return false;
|
||||
|
||||
result.clear();
|
||||
CFIndex const count = CFArrayGetCount(descriptors);
|
||||
result.reserve(count);
|
||||
for (CFIndex i = 0; i != count; i++)
|
||||
{
|
||||
CTFontDescriptorRef const font = (CTFontDescriptorRef)CFArrayGetValueAtIndex(descriptors, i);
|
||||
CFStringRef const name = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontNameAttribute);
|
||||
CFStringRef const display = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(font, kCTFontDisplayNameAttribute, NULL);
|
||||
|
||||
if (name && display)
|
||||
{
|
||||
char const *utf;
|
||||
std::vector<char> buf;
|
||||
|
||||
utf = CFStringGetCStringPtr(name, kCFStringEncodingUTF8);
|
||||
if (!utf)
|
||||
{
|
||||
buf.resize(CFStringGetMaximumSizeForEncoding(std::max(CFStringGetLength(name), CFStringGetLength(display)), kCFStringEncodingUTF8));
|
||||
CFStringGetCString(name, &buf[0], buf.size(), kCFStringEncodingUTF8);
|
||||
}
|
||||
std::string utf8name(utf ? utf : &buf[0]);
|
||||
|
||||
utf = CFStringGetCStringPtr(display, kCFStringEncodingUTF8);
|
||||
if (!utf)
|
||||
{
|
||||
buf.resize(CFStringGetMaximumSizeForEncoding(CFStringGetLength(display), kCFStringEncodingUTF8));
|
||||
CFStringGetCString(display, &buf[0], buf.size(), kCFStringEncodingUTF8);
|
||||
}
|
||||
std::string utf8display(utf ? utf : &buf[0]);
|
||||
|
||||
result.emplace_back(std::move(utf8name), std::move(utf8display));
|
||||
}
|
||||
|
||||
if (name) CFRelease(name);
|
||||
if (display) CFRelease(display);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#else /* SDLMAME_MACOSX */
|
||||
|
||||
MODULE_NOT_SUPPORTED(font_osx, OSD_FONT_PROVIDER, "osx")
|
||||
|
||||
#endif
|
||||
|
||||
MODULE_DEFINITION(FONT_OSX, font_osx)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user