diff options
author | 2022-05-17 12:56:38 +1000 | |
---|---|---|
committer | 2022-05-17 12:56:38 +1000 | |
commit | b91e4cd32ed17c42e5b7c1d40e5f3022349581db (patch) | |
tree | a4e3b7eb55b64b1d0768da1f3797e27a8570ee22 | |
parent | 17f0347abdc3e4c147133e6c0ff018352f5f96cc (diff) | |
parent | 7282130cc31b7b518f5be5bc17e07cdab760d7eb (diff) |
Merge remote-tracking branch 'upstream/master'
70 files changed, 10315 insertions, 1804 deletions
diff --git a/hash/bbc_rom.xml b/hash/bbc_rom.xml index a455a0a6e88..9fc1b70fab3 100644 --- a/hash/bbc_rom.xml +++ b/hash/bbc_rom.xml @@ -5635,6 +5635,42 @@ license:CC0 </part> </software> + <software name="ibos114" cloneof="ibos"> + <description>Integra-B OS 1.14</description> + <year>1988</year> + <publisher>Computech</publisher> + <info name="usage" value="Requires Integra-B" /> + <part name="rom1" interface="bbc_rom"> + <dataarea name="rom" size="16384"> + <rom name="IBOS-1.14.rom" size="16384" crc="d05ce376" sha1="b2b7fc3258936296f83d720759caacba5378edec"/> + </dataarea> + </part> + </software> + + <software name="ibos120" cloneof="ibos"> + <description>Integra-B OS 1.20</description> + <year>1989</year> + <publisher>Computech</publisher> + <info name="usage" value="Requires Integra-B" /> + <part name="rom1" interface="bbc_rom"> + <dataarea name="rom" size="16384"> + <rom name="IBOS-1.20.rom" size="16384" crc="52b1b8c4" sha1="0f5b2a5bee23808b34eab2f027f7c1e77395c782"/> + </dataarea> + </part> + </software> + + <software name="ibos"> + <description>Integra-B OS 1.20 (Y2K patched)</description> + <year>1989</year> + <publisher>Computech</publisher> + <info name="usage" value="Requires Integra-B" /> + <part name="rom1" interface="bbc_rom"> + <dataarea name="rom" size="16384"> + <rom name="IBOS-1.20-Y2K.rom" size="16384" crc="21e7a2c2" sha1="d5ff79da2243aabd363ee26a1e7ad546657fdeb5"/> + </dataarea> + </part> + </software> + <software name="iconmstr"> <description>Icon Master 1.00</description> <year>1985</year> @@ -6754,6 +6790,19 @@ license:CC0 </part> </software> + <software name="memexb20"> + <description>Memex-B20 2.2</description> + <year>1984</year> + <publisher>Memex</publisher> + <info name="usage" value="Requires Memex-B20" /> + <sharedfeat name="compatibility" value="B"/> + <part name="rom1" interface="bbc_rom"> + <dataarea name="rom" size="8192"> + <rom name="Memex-B20-2.2.rom" size="8192" crc="98ee8eb6" sha1="aad311797e204b0b69450460f8b4605409c31ddd"/> + </dataarea> + </part> + </software> + <software name="menurom100" cloneof="menurom"> <description>Menu ROM 1.00</description> <year>1985</year> @@ -9125,20 +9174,20 @@ license:CC0 </part> </software> - <software name="sideaid128" supported="no"> - <description>SideAid128</description> + <software name="sideaid128"> + <description>SideAid128 1.03</description> <year>1988</year> <publisher>Computer and Technical Services</publisher> <info name="usage" value="Requires Solidisk TwoMeg128" /> <part name="rom1" interface="bbc_rom"> <dataarea name="rom" size="16384"> - <rom name="SideAid128-1.03.rom" size="16384" crc="48d1035c" sha1="9fc1952e856f0b08c8623e8502d8560ebecfb0ed" status="baddump"/> + <rom name="SideAid128-1.03.rom" size="16384" crc="bc40dd93" sha1="9b1bba805e6b4a59f3c4f53e2962bf3e675190c5"/> </dataarea> </part> </software> <software name="sideaid256" supported="no"> - <description>SideAid256</description> + <description>SideAid256 1.05</description> <year>1988</year> <publisher>Computer and Technical Services</publisher> <info name="usage" value="Requires Solidisk FourMeg256" /> @@ -11474,6 +11523,17 @@ license:CC0 </part> </software> + <software name="vidiedit"> + <description>VidiEditor 1.2</description> + <year>1987</year> + <publisher>Black-Hole Soft</publisher> + <part name="rom1" interface="bbc_rom"> + <dataarea name="rom" size="8192"> + <rom name="VidiEditor-1.2.rom" size="8192" crc="582fdf65" sha1="a22c27bcf16bb1546c96bc43b9a86669502964b1"/> + </dataarea> + </part> + </software> + <software name="vidifix"> <description>Vidifix 1.5 (Dut)</description> <year>1984</year> @@ -11588,6 +11648,22 @@ license:CC0 </part> </software> + <software name="pipedream" cloneof="viewpro"> + <description>PipeDream 0.2</description> + <year>1986</year> + <publisher>Colton Software</publisher> + <part name="rom1" interface="bbc_rom"> + <dataarea name="rom" size="16384"> + <rom name="PipeDream-0.2.rom" size="16384" crc="18b1f47d" sha1="c4fd0a3447e08f16da36bda7c41d680d206a1b79"/> + </dataarea> + </part> + <part name="rom2" interface="bbc_rom"> + <dataarea name="rom" size="16384"> + <rom name="PipeSlave-0.2.rom" size="16384" crc="987f3a37" sha1="60714bab56f6d29b3a1eefe21a6f7d7d8fa93c90"/> + </dataarea> + </part> + </software> + <software name="viewpro10" cloneof="viewpro"> <description>View Professional 1.0</description> <year>1987</year> @@ -12501,4 +12577,39 @@ license:CC0 </part> </software> + <!-- Unofficial game conversions to ROM/RFS --> + + <software name="chuckie"> + <description>Chuckie Egg (unofficial ROM)</description> + <year>1983</year> + <publisher>A&F Software</publisher> + <part name="rom1" interface="bbc_rom"> + <dataarea name="rom" size="16384"> + <rom name="ChuckieEgg.rom" size="16384" crc="4fd618d4" sha1="6e90ede8258542534ead8e3c1684b6e1751ac7ca"/> + </dataarea> + </part> + </software> + + <software name="frak"> + <description>Frak! (unofficial ROM)</description> + <year>1984</year> + <publisher>Aardvark</publisher> + <part name="rom1" interface="bbc_rom"> + <dataarea name="rom" size="16384"> + <rom name="Frak.rom" size="16384" crc="bbf504e7" sha1="8fd8a3c2ad90048428e440ced0693cbc233a8b0b"/> + </dataarea> + </part> + </software> + + <software name="killergo"> + <description>Killer Gorilla (unofficial ROM)</description> + <year>1984</year> + <publisher>Micro Power</publisher> + <part name="rom1" interface="bbc_rom"> + <dataarea name="rom" size="16384"> + <rom name="KillerGorilla.rom" size="16384" crc="7dae2b07" sha1="27d53f91621da8d90c88cbfdbd5940eaeeb02902"/> + </dataarea> + </part> + </software> + </softwarelist> diff --git a/hash/cdi.xml b/hash/cdi.xml index 35bf3f696f0..65cde825902 100644 --- a/hash/cdi.xml +++ b/hash/cdi.xml @@ -10972,6 +10972,33 @@ license:CC0 </part> </software> + <software name="pcd1904"> + <!-- + Origin: Foxhack + <rom name="PCD1904 (Track 1).bin" size="818496" crc="1d037f6d" md5="05dde46197ea63a14510717960e414fd" sha1="0a805e88a5f40e5fd6ba8a579cb6ca0cf379ed05" /> + <rom name="PCD1904 (Track 2).bin" size="100018800" crc="24233b6d" md5="24444ff73512426f74e2fc0505bf0df6" sha1="34c8dd58666d502ede55d632e643bd121426a1a0" /> + <rom name="PCD1904 (Track 3).bin" size="16581600" crc="b779625b" md5="fc057c2568599b68bd3a657e3688ef85" sha1="b3c4ad5df7568b0a891d192bc49f673e352fd243" /> + <rom name="PCD1904 (Track 4).bin" size="4762800" crc="88c2e4e9" md5="cd6402f0b46c83996d24826a03186c3c" sha1="5690073a9162bf31123e07f6fdd8e1ddcc8077d4" /> + <rom name="PCD1904 (Track 5).bin" size="132300000" crc="c4a7ee90" md5="3c4731edeffded203ab96c184edd84d1" sha1="723f14cad145fb8dc197d2066ae77fb09a775d93" /> + <rom name="PCD1904 (Track 6).bin" size="38631600" crc="099b3382" md5="2bc8816b0d2194801e6a98e756067613" sha1="79712b1aa0a0b5b4901d3ed91cde25ac871b029d" /> + <rom name="PCD1904 (Track 7).bin" size="26460000" crc="7b76c4b6" md5="4586c3b510abf2dee4ac532a2ad6bf86" sha1="3407398b97cae5d5af4121cd2759c85f1dcf4b49" /> + <rom name="PCD1904 (Track 8).bin" size="26283600" crc="825108c2" md5="c118c88266b337ebbd5df15bca71a8a5" sha1="24d9e26729e780891a598657fabf11a41708f67a" /> + <rom name="PCD1904 (Track 9).bin" size="41207040" crc="823fb562" md5="f2abea76d3e4d823c2356232ad60d39c" sha1="ce794bbf1b299107133cb8797342e44868d90b6c" /> + + Note: This is a Windows ISO9660-formatted CD that included Photo CD on CD-Interactive, Version 3.1 (April 14, 1993). This disc also works under Windows + 3.1, and includes demo software for that platform. + + --> + <description>The Photo CD Book Companion CD-ROM</description> + <year>1994</year> + <publisher>Abacus</publisher> + <part name="cdrom" interface="cdi_cdrom"> + <diskarea name="cdrom"> + <disk name="pcd1904" sha1="19c7875a0329b2a75b3c0c05fa646536473e8c7d"/> + </diskarea> + </part> + </software> + <!-- this is just bad, and has visible corruption during the startup animations as a result of bad sectors --> <software name="gose"> <description>Go - Special Edition</description> diff --git a/hash/dc.xml b/hash/dc.xml index 6512569c59d..b7caff2932c 100644 --- a/hash/dc.xml +++ b/hash/dc.xml @@ -551,7 +551,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track10.raw" size="34670832" md5="137bd822fed33a86f1d3aaf841500ffa" sha1="547aa69f3973c99608001fbffc4436e1a12d95c7"/> <rom name="track11.iso" size="162893824" md5="1d4920973682a6f3260195ec975a9c05" sha1="25688c46191774b062a25ec382425f286ea22e51"/> --> - <description>4x4 Evo (Euro, Prototype 20010109)</description> + <description>4x4 Evo (Euro, prototype 20010109)</description> <year>2001</year> <publisher>Gathering of Developers</publisher> <info name="release" value="20010109"/> @@ -649,7 +649,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1735776" md5="8bafd2d23c80e5539dbd5ed65c5b7c4c" sha1="2b6fb002a412c2ac1fbe75f758e936efd59e7cb4"/> <rom name="track03.iso" size="1032499200" md5="d210a684bdd78f0573f3fe70bbceb7cb" sha1="b8d53ca8f3c8be8860221d82e5ffd7f33447a4a9"/> --> - <description>18 Wheeler: American Pro Trucker (USA, Prototype 20010202)</description> + <description>18 Wheeler: American Pro Trucker (USA, prototype 20010202)</description> <year>2001</year> <publisher>Sega</publisher> <info name="release" value="20010202"/> @@ -667,7 +667,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1237152" md5="87af6d21a8b10aeffb90874118531e29" sha1="b0d28980a64765c022b4b3e47244aad32a345270"/> <rom name="track03.bin" size="1185760800" md5="2442c1b6e4d1b2c00ba05a49efa5fccd" sha1="a7834a9321c944e1bda9035cf1c79d3cc469608c"/> --> - <description>18 Wheeler: American Pro Trucker (USA, Prototype 20010405)</description> + <description>18 Wheeler: American Pro Trucker (USA, prototype 20010405)</description> <year>2001</year> <publisher>Sega</publisher> <info name="release" value="20010405"/> @@ -1024,7 +1024,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="Aero Dancing F (Japan) (Rev A) (Track 2).bin" size="37716672" crc="593fb5ea" md5="130e6981084b5c2aa9730bfe512f1f45" sha1="f96e2c38b4e665edf4396938001adfa1b5f0965e"/> <rom name="Aero Dancing F (Japan) (Rev A) (Track 3).bin" size="1185760800" crc="de0f630f" md5="54b8315e58cc2460f6e966fd0ec1710d" sha1="a8c45e54a7adac237c6d94f30740403ac0709672"/> --> - <description>Aero Dancing F (Jpn, Rev. A)</description> + <description>Aero Dancing F (Jpn, rev. A)</description> <year>2000</year> <publisher>CRI</publisher> <info name="serial" value="T-6808M"/> <!-- Internal Serial: T-6804M --> @@ -1206,7 +1206,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="Air (Japan) (Track 2).bin" size="2088576" crc="1859ea65" md5="652a31166a58b8f933e8a924e7c88780" sha1="0ecd537e42946f3e74c80c9fcb8d0bccccfc96f1"/> <rom name="Air (Japan) (Track 3).bin" size="1185760800" crc="c31eea05" md5="40e703c7d584528dda2703d55c079c19" sha1="95e1864bba1d1787b6a2a7f5b37bf87e537d927b"/> --> - <description>Air (Jpn, Rev. A)</description> + <description>Air (Jpn, rev. A)</description> <year>2001</year> <publisher>NEC Interchannel</publisher> <info name="serial" value="T-20112M"/> @@ -1316,7 +1316,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track29.raw" size="7858032" md5="dcd1a2bd98d617158a80fd09440ba319" sha1="5d0fce6e808417fcd6b8e8db5b825ed7c9b6d3ee"/> <rom name="track30.bin" size="78321600" md5="939575ba42d8598af45855764ec01bcd" sha1="22fc338a50f001118a9f09ad6ac955b280793cee"/> --> - <description>Airforce Delta (USA, Alt)</description> + <description>Airforce Delta (USA, alt)</description> <year>1999</year> <publisher>Konami</publisher> <info name="serial" value="T-9501N"/> @@ -1669,7 +1669,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. </software> <!-- Apparently dumped via Dreamshell, which is known to give bad dumps. --> - <software name="alienfntop"> + <software name="alienfntop" cloneof="alienfnto"> <!-- <rom name="ALIENFRONT_ONLINE.gdi" size="143" md5="0a3db521ea34e40a63967a0108d4bc78" sha1="397340cf23de1f66776741a3b9da8914c9b48203"/> <rom name="track01.iso" size="921600" md5="98de8e5db931c9106cbf5c53b75f7cc7" sha1="5e23b9e4a63d4720e114bc777640bd65f0edca9b"/> @@ -1678,7 +1678,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size="13 818 000" md5="52d4f2952f4aca03f15d23825f5609b0" sha1="b00cc2ffa6abbd0908675ced977586fd9111d881"/> <rom name="track05.iso" size="143 302 656" md5="d4ca27065a01df92300d240093d61ff5" sha1="2db3177f076caaa5e779a70f1ba546ac1b709e26"/> --> - <description>Alien Front Online (USA, Prototype 20010625)</description> + <description>Alien Front Online (USA, prototype 20010625)</description> <year>2001</year> <publisher>Sega</publisher> <info name="release" value="20010625"/> @@ -2680,7 +2680,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1735776" md5="d09be539a7074a058159505b7f5fdcb3" sha1="db680939aae4bf61d0e588414c72a47c6dd92cdd"/> <rom name="track03.bin" size="1185760800" md5="2554d92134f23d99a904212c8e729813" sha1="21141a6178f917131431996bf8c0f516bd352c4d"/> --> - <description>Biohazard: Code: Veronica - Shokai Genteiban (Jpn, Alt)</description> + <description>Biohazard: Code: Veronica - Shokai Genteiban (Jpn, alt)</description> <year>2000</year> <publisher>Capcom</publisher> <info name="serial" value="T-1210M"/> @@ -2767,7 +2767,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="13994400" md5="d1838bcbca4a24b39deddeae2a9d371a" sha1="b643df4def042b6c23f90f54c690ac7df431233f"/> <rom name="track03.iso" size="1032499200" md5="ea67d594eec4e08018690a49b5c06f33" sha1="64d82ddee0317d7b6a2503b3e0d06370423db016"/> --> - <description>Resident Evil: Code: Veronica (Euro, Prototype 20000415)</description> + <description>Resident Evil: Code: Veronica (Euro, prototype 20000415)</description> <year>2000</year> <publisher>Eidos</publisher> <info name="release" value="20000415"/> @@ -3001,7 +3001,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="2471952" md5="079ba845b859ac77fa95232c9a6069ee" sha1="1aaa7d0297c252d9fd762f329ff491b7ba465c8e"/> <rom name="track03.iso" size="1032499200" md5="ab675a4e4a0090f0b6411c7deb1dc2a0" sha1="106fd8c2e54ec70396b5e431e7e2d2a5db8ba9a9"/> --> - <description>Blue Stinger (Fra, Prototype 19990824)</description> + <description>Blue Stinger (Fra, prototype 19990824)</description> <year>1999</year> <publisher>Activision</publisher> <info name="release" value="19990824"/> @@ -3275,7 +3275,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1237152" md5="87af6d21a8b10aeffb90874118531e29" sha1="b0d28980a64765c022b4b3e47244aad32a345270"/> <rom name="track03.bin" size="1185760800" md5="e072149f49ae5e68d74ef136494d4f56" sha1="195da4a378be110a549fc0de13db1fd71865bedf"/> --> - <description>Bomberman Online (USA, Prototype 20010908)</description> + <description>Bomberman Online (USA, prototype 20010908)</description> <year>2001</year> <publisher>Sega</publisher> <info name="release" value="20010908"/> @@ -3398,7 +3398,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1641696" md5="709e6eedad732eff20a5856f38825989" sha1="facbfdd2acb4ed9e7c9df75b1fb97c89f79f87be"/> <rom name="track03.bin" size="1185760800" md5="1fd9fa42a32c45dd4c8da143f86c4ed0" sha1="fcdd538d1523bfea1931c0fced062f461b061a24"/> --> - <description>Broadband Passport (Jpn, Alt)</description> + <description>Broadband Passport (Jpn, alt)</description> <year>2001</year> <publisher>Sega</publisher> <info name="serial" value="610-7883"/> @@ -3922,7 +3922,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1735776" md5="d09be539a7074a058159505b7f5fdcb3" sha1="db680939aae4bf61d0e588414c72a47c6dd92cdd"/> <rom name="track03.bin" size="1185760800" md5="9e3ccf690f540fa8af05c6aa87e4fa57" sha1="58b8ed9fb9c6f991366a39acc27b955a3d4a8191"/> --> - <description>Capcom vs. SNK: Millennium Fight 2000 (Jpn, Rev. 1)</description> + <description>Capcom vs. SNK: Millennium Fight 2000 (Jpn, rev. 1)</description> <year>2000</year> <publisher>Capcom</publisher> <info name="serial" value="T-1217M"/> @@ -4418,7 +4418,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <!-- The Sega Direct version shares the same disc as the regular edition (T-47801M) but comes with a bonus CD. --> <software name="cfieldsd1" cloneof="cfield"> - <description>Chaos Field (Jpn, Sega Direct, Rev. 1)</description> + <description>Chaos Field (Jpn, Sega Direct, rev. 1)</description> <year>2004</year> <publisher>Milestone Inc.</publisher> <info name="serial" value="T-47801M, STRV-003 (Bonus CD)"/> @@ -4770,7 +4770,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1735776" md5="8659426a29f58924f5f0458cc720098b" sha1="e12b9ae5ebc79b7da5271bce29df450671ce5d93"/> <rom name="track03.bin" size="1185760800" md5="9ae7fabd082d0b2711be8f75022f4845" sha1="fbd2a1b94d7c54b24e68f164ce72a1d648865b63"/> --> - <description>Seaman: Kindan no Pet (Jpn, Rev. 1)</description> + <description>Seaman: Kindan no Pet (Jpn, rev. 1)</description> <year>1999</year> <publisher>Vivarium</publisher> <info name="serial" value="T-39401M (Visual Memory Doukon Pack), T-39402M"/> @@ -5393,7 +5393,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="13994400" md5="d1838bcbca4a24b39deddeae2a9d371a" sha1="b643df4def042b6c23f90f54c690ac7df431233f"/> <rom name="track03.bin" size="1185760800" md5="8b60130df37e3640dfc7807971ed3492" sha1="ad5d180494a44690fadf712d3644b726508d7995"/> --> - <description>Confidential Mission (Euro, Prototype 20010409)</description> + <description>Confidential Mission (Euro, prototype 20010409)</description> <year>2001</year> <publisher>Sega</publisher> <info name="release" value="20010409"/> @@ -6101,7 +6101,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="2526048" md5="fb87abc670c22e46c63dff8b15604a98" sha1="297c31400bfe737d24684896acab1fe74735a50b"/> <rom name="track03.bin" size="1185760800" md5="6004523cfa0c47e5304675e500f51878" sha1="35759e29377163665419dc606671ecd42d43c005"/> --> - <description>D no Shokutaku 2 (Jpn, Alt)</description> + <description>D no Shokutaku 2 (Jpn, alt)</description> <year>1999</year> <publisher>Warp</publisher> <info name="serial" value="T-30003M, T-30004M, T-30005M, T-30006M"/> @@ -6365,7 +6365,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track13.raw" size=" 22111152" md5="cf1a3a276c6a5110e1d0b5be5852193f" sha1="839e9399375be6a47574e23ba899e2ca63419a42"/> <rom name="track14.bin" size=" 314318928" md5="649e235acf8f5c4cac4b3ab33033dac5" sha1="06c964aa8da324951cf0e2ccb922e8de09a989e5"/> --> - <description>Dave Mirra Freestyle BMX (World, Prototype 20000907)</description> + <description>Dave Mirra Freestyle BMX (World, prototype 20000907)</description> <year>2000</year> <publisher>Acclaim Entertainment</publisher> <info name="release" value="20000907"/> @@ -6395,7 +6395,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track13.raw" size="22111152" md5="1b8d426e09b63f14f839de30970e0e23" sha1="522a20ddcba4e3c87b390ce02405e2549dfc03fc"/> <rom name="track14.iso" size="273692672" md5="0c9df058ac5260924aee993b79f3d467" sha1="74171c4104656777ce10b1f6b535a317f1163112"/> --> - <description>Dave Mirra Freestyle BMX (World, Prototype 20001016)</description> + <description>Dave Mirra Freestyle BMX (World, prototype 20001016)</description> <year>2000</year> <publisher>Acclaim Entertainment</publisher> <info name="release" value="20001016"/> @@ -6472,7 +6472,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1237152" md5="87af6d21a8b10aeffb90874118531e29" sha1="b0d28980a64765c022b4b3e47244aad32a345270"/> <rom name="track03.bin" size="1181343744" md5="b9bc5395925eeec7e0a3d0a8f4280a7b" sha1="3551e007c91cccc0587e8e113c651dce29e8b8b2"/> --> - <description>Daytona USA (USA, Prototype 20010214)</description> + <description>Daytona USA (USA, prototype 20010214)</description> <year>200?</year> <publisher>Hasbro</publisher> <info name="release" value="20010214"/> @@ -6491,7 +6491,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size=" 13994400" md5="d1838bcbca4a24b39deddeae2a9d371a" sha1="b643df4def042b6c23f90f54c690ac7df431233f"/> <rom name="track03.iso" size="1032499200" md5="da08cfa1455a0d282e7b5292cac965b8" sha1="2ccde5fb8f21db9bd9f1f294cbc43e7a41413255"/> --> - <description>Daytona USA 2001 (Euro, Prototype 20010227)</description> + <description>Daytona USA 2001 (Euro, prototype 20010227)</description> <year>2001</year> <publisher>Sega</publisher> <info name="release" value="20010227"/> @@ -6713,7 +6713,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size=" 13994400" md5="d1838bcbca4a24b39deddeae2a9d371a" sha1="b643df4def042b6c23f90f54c690ac7df431233f"/> <rom name="track03.iso" size="1032499200" md5="d9b5099bf1ddb0a5e2c30d6e847cec0d" sha1="17544d5c986661c554779d036152a820dd0f4854"/> --> - <description>Dead or Alive 2 (Euro, Prototype 20000611)</description> + <description>Dead or Alive 2 (Euro, prototype 20000611)</description> <year>2000</year> <publisher>Acclaim</publisher> <info name="release" value="20000611"/> @@ -7155,7 +7155,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track19.raw" size=" 29658720" md5="f93e8fe89492ff121228974ca65a7398" sha1="2555c8bd74db79a2241ae7f2722a3dfeda31de32"/> <rom name="track20.iso" size=" 390031360" md5="a7ac75562c75f56e543993407a14dd0f" sha1="88c6320599b0f6b15b6c7280afafaa69c3b00e88"/> --> - <description>Deep Fighter (Fra, Prototype 20000505)</description> + <description>Deep Fighter (Fra, prototype 20000505)</description> <year>2000</year> <publisher>Ubisoft</publisher> <info name="release" value="20000505"/> @@ -7867,7 +7867,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size="1587600" md5="9a9bce6b675b3f5116eb1bda0c7f9d96" sha1="1f92e618545f508179d419b724eae4ca637a9195"/> <rom name="track05.iso" size="727209984" md5="8fce0eeeab8af651d3efbf8719a98a87" sha1="15914a725d366cde04b56c03aa897396372be508"/> --> - <description>Disney's 102 Dalmatians: Puppies to the Rescue (Euro, Prototype 20000110)</description> + <description>Disney's 102 Dalmatians: Puppies to the Rescue (Euro, prototype 20000110)</description> <year>2000</year> <publisher>Eidos</publisher> <info name="release" value="20000110"/> @@ -8585,7 +8585,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size="1060752" md5="3a892db029c4b1ba6ed24ccdaf5cff62" sha1="36b69ee3a5dd70637228feaa14528ac23f848ee7"/> <rom name="track05.iso" size="983638016" md5="c4b3470aa00f43eab77df065d51b66b1" sha1="1a237704f79ca41e6bbf07615006d878f253398b"/> --> - <description>Draconus: Cult of the Wyrm (World, Prototype 20000127)</description> + <description>Draconus: Cult of the Wyrm (World, prototype 20000127)</description> <year>2000</year> <publisher>Crave</publisher> <info name="release" value="20000127"/> @@ -9408,7 +9408,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1641696" md5="2d0707ff4c88581bfb98ba6f24aae855" sha1="d1fbe0e6d9ce44d770aff2a4bbb35f14e5600ecc"/> <rom name="track03.bin" size="1185760800" md5="d9df28a55cd4c83a89c8b518754ee84a" sha1="fd6e896cc3bac91f15ff17dad04de2259251a432"/> --> - <description>Dream Passport 2 (Jpn, Rev. 1)</description> + <description>Dream Passport 2 (Jpn, rev. 1)</description> <year>1999</year> <publisher>Sega</publisher> <info name="serial" value="610-7180"/> @@ -9583,7 +9583,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="6994848" md5="56e0a3b8ac470c6044ca978b5b0e74b7" sha1="0096772662c047020848dcabed170397c4177bf4"/> <rom name="track03.bin" size="1185760800" md5="1b490423c98569f4e874608b312f2d95" sha1="307837ab77e6e9acf654c7f25f28f300a09fdd22"/> --> - <description>Dream Passport 3 (Jpn, Alt)</description> + <description>Dream Passport 3 (Jpn, alt)</description> <year>2000</year> <publisher>Sega</publisher> <info name="serial" value="610-7819, 610-7851 (Ch@b)"/> @@ -9610,7 +9610,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="6994848" md5="ac9754e6ff8e4fa0d20aed11cad67aaa" sha1="023d8960b60350ebeced92fd8956e5b9dcfc8b6e"/> <rom name="track03.bin" size="1185760800" md5="1b490423c98569f4e874608b312f2d95" sha1="307837ab77e6e9acf654c7f25f28f300a09fdd22"/> --> - <description>Dream Passport 3 (Jpn, Alt 2)</description> + <description>Dream Passport 3 (Jpn, alt 2)</description> <year>2000</year> <publisher>Sega</publisher> <info name="serial" value="610-7819, 610-7851 (Ch@b)"/> @@ -10375,7 +10375,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="13994400" md5="d1838bcbca4a24b39deddeae2a9d371a" sha1="b643df4def042b6c23f90f54c690ac7df431233f"/> <rom name="track03.bin" size="1185760800" md5="0f3b5731b37fcfa655e771be3e5ff493" sha1="e542a7fe0230728e9c16a527045706849319cf81"/> --> - <description>DreamKey (Euro, Rev. 1)</description> + <description>DreamKey (Euro, rev. 1)</description> <year>1999</year> <publisher>Sega</publisher> <info name="serial" value="832-0002-05, 610-7373 (Box)"/> @@ -11076,7 +11076,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size=" 9118704" md5="600718b01152a488f8a531ebf5982d5a" sha1="7b5cc11eeed728a8e30b38e8615c41a65a22b927"/> <rom name="track05.bin" size="811990368" md5="125533300f84b4e20839f6e3c9e7a220" sha1="4c7034cb4d46af0f44bc4490266bbf6494f12ec9"/> --> - <description>Ecco the Dolphin: Defender of the Future (Euro, Prototype 20000417 7AM)</description> + <description>Ecco the Dolphin: Defender of the Future (Euro, prototype 20000417 7AM)</description> <year>2000</year> <publisher>Sega</publisher> <info name="release" value="20000417"/> @@ -11096,7 +11096,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size=" 9118704" md5="600718b01152a488f8a531ebf5982d5a" sha1="7b5cc11eeed728a8e30b38e8615c41a65a22b927"/> <rom name="track05.bin" size="1058971536" md5="22ef9d9342d03da26c5a45d00da8209b" sha1="366b20789dc6ab4869125a1906ee5997965a8494"/> --> - <description>Ecco the Dolphin: Defender of the Future (Euro, Prototype 20000417 2PM)</description> + <description>Ecco the Dolphin: Defender of the Future (Euro, prototype 20000417 2PM)</description> <year>2000</year> <publisher>Sega</publisher> <info name="release" value="20000417"/> @@ -11116,7 +11116,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size=" 9118704" md5="600718b01152a488f8a531ebf5982d5a" sha1="7b5cc11eeed728a8e30b38e8615c41a65a22b927"/> <rom name="track05.bin" size="1051071168" md5="dad3c6c1b6d8547f2f1952496ca06975" sha1="2a7569cf8adea3253f5eeb8452ff71d7f3fccbe2"/> --> - <description>Ecco the Dolphin: Defender of the Future (Euro, Prototype 20000419)</description> + <description>Ecco the Dolphin: Defender of the Future (Euro, prototype 20000419)</description> <year>2000</year> <publisher>Sega</publisher> <info name="release" value="20000419"/> @@ -11136,7 +11136,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size=" 9118704" md5="600718b01152a488f8a531ebf5982d5a" sha1="7b5cc11eeed728a8e30b38e8615c41a65a22b927"/> <rom name="track05.bin" size="1052569392" md5="dba8c10d57fbeca2a157a34812bf0f0e" sha1="8489ff1fd7f97c8fa8a707d9a2705985c28e4e26"/> --> - <description>Ecco the Dolphin: Defender of the Future (Euro, Prototype 20000421)</description> + <description>Ecco the Dolphin: Defender of the Future (Euro, prototype 20000421)</description> <year>2000</year> <publisher>Sega</publisher> <info name="release" value="20000421"/> @@ -11156,7 +11156,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size=" 9118704" md5="600718b01152a488f8a531ebf5982d5a" sha1="7b5cc11eeed728a8e30b38e8615c41a65a22b927"/> <rom name="track05.bin" size="1079513904" md5="e80c7be8bf4b96a80490c01faed80881" sha1="542fecde04d847493e2d0199297f96fde05af2e6"/> --> - <description>Ecco the Dolphin: Defender of the Future (USA, Prototype 20000606)</description> + <description>Ecco the Dolphin: Defender of the Future (USA, prototype 20000606)</description> <year>2000</year> <publisher>Sega</publisher> <info name="release" value="20000606"/> @@ -11181,7 +11181,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track09.raw" size=" 26749296" md5="db88cdb7051e8f048587ca6154aadea2" sha1="36c383455f5a4915b66a684afcbcef25b3023c39"/> <rom name="track10.bin" size=" 74342016" md5="aadbe24755aa48f6c9ca4e6b221a210c" sha1="7ab6a0ee03c249c3441cb16386abe489b553d3c9"/> --> - <description>Ecco the Dolphin: E3 Demo (USA, Prototype 19990508)</description> + <description>Ecco the Dolphin: E3 Demo (USA, prototype 19990508)</description> <year>1999</year> <publisher>Sega</publisher> <info name="release" value="19990508"/> @@ -11201,7 +11201,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size=" 54881568" md5="c9fd012fa3e173ab6f646b2fd575da47" sha1="a89359218f9974130634a016202b5e4fada5bfb0"/> <rom name="track05.bin" size=" 16346400" md5="abe3159cc65386d1445c378d035ca6ef" sha1="3b778ac8640093ffa3e7d4307ad2a4231331eab1"/> --> - <description>Ecco 3D (World, Prototype 19990506)</description> + <description>Ecco 3D (World, prototype 19990506)</description> <year>1999</year> <publisher>Sega</publisher> <info name="release" value="19990506"/> @@ -11221,7 +11221,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size=" 898464" md5="a3aab7f95cfbba5e2fab45213ec72785" sha1="0d354c1358c621403c6d390c2c9f919698192cf9"/> <rom name="track05.bin" size=" 75184032" md5="d277a49b85017d09451c37f0e51e5a82" sha1="522ed4d64ccf0335406469af912e1b9ccee5c265"/> --> - <description>Ecco II: Sentinels of the Universe (World, Prototype 20010219)</description> + <description>Ecco II: Sentinels of the Universe (World, prototype 20010219)</description> <year>2001</year> <publisher>Sega</publisher> <info name="release" value="20010219"/> @@ -12224,7 +12224,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track27.raw" size=" 4494672" md5="6456bf4dad0f3e62c43a2caa034dd148" sha1="bf69b778e708385ceef0020221c6934658fb9c97"/> <rom name="track28.iso" size="246210560" md5="16cdc87b0f72deff19dd0721b6006470" sha1="4e2784ff736dd80f25eae46d1c4a78446030fc8e"/> --> - <description>Millennium Soldier: Expendable (Euro, Prototype 19990715)</description> + <description>Millennium Soldier: Expendable (Euro, prototype 19990715)</description> <year>1999</year> <publisher>Infogrames</publisher> <info name="release" value="19990715"/> @@ -12442,7 +12442,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track22.raw" size=" 21751296" md5="4537353d84c2846af3cc17c981cce844" sha1="645c01a7d722f264f8eff8a89d87d4d4caa75b62"/> <rom name="track23.iso" size="143550464" md5="d454268fced6e9743519781df717bc68" sha1="8434a32c16eaf3ae1521155ec50ae1aa59fc667b"/> --> - <description>F1 World Grand Prix for Dreamcast (Euro, Prototype 19990903)</description> + <description>F1 World Grand Prix for Dreamcast (Euro, prototype 19990903)</description> <year>1999</year> <publisher>Video System</publisher> <info name="release" value="19990903"/> @@ -12579,7 +12579,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track23.raw" size=" 14300160" md5="b1749ada3caf745d2ad49bd6468e9490" sha1="d799ebbfc577489fa97e48984e322d57d3c887eb"/> <rom name="track24.bin" size="259315056" md5="bddfebb031025f72c1da221943412eba" sha1="fa28fb7fdef593795b28d5902856a2f83f3648e0"/> --> - <description>F1 World Grand Prix II for Dreamcast (Euro, Prototype 20000728)</description> + <description>F1 World Grand Prix II for Dreamcast (Euro, prototype 20000728)</description> <year>2000</year> <publisher>Video System</publisher> <info name="release" value="20000728"/> @@ -12618,7 +12618,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1237152" md5="c0149abd5ae61eadb85ea67f84676d00" sha1="bcdc971432cd55516bf9f4de6f13c333d7386801"/> <rom name="track03.bin" size="1185760800" md5="dd8449569e5ce5285cd57f89266e8b44" sha1="05022c6b2cdd4a51a7b77d5074029ece9f613ba7"/> --> - <description>F355 Challenge: Passione Rossa (USA, Alt)</description> + <description>F355 Challenge: Passione Rossa (USA, alt)</description> <year>2000</year> <publisher>Acclaim</publisher> <info name="serial" value="T-8119N"/> @@ -12718,7 +12718,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size=" 1735776" md5="8659426a29f58924f5f0458cc720098b" sha1="e12b9ae5ebc79b7da5271bce29df450671ce5d93"/> <rom name="track03.iso" size="1032499200" md5="1d6f32cf248c3c71ec13816c0760457a" sha1="a0987b02d59783769784f308829a5d19c1d55e69"/> --> - <description>F355 Challenge: Passione Rossa (USA, Prototype 20000501)</description> + <description>F355 Challenge: Passione Rossa (USA, prototype 20000501)</description> <year>2000</year> <publisher>Acclaim</publisher> <info name="release" value="20000501"/> @@ -12737,7 +12737,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size=" 1237152" md5="87af6d21a8b10aeffb90874118531e29" sha1="b0d28980a64765c022b4b3e47244aad32a345270"/> <rom name="track03.iso" size="1032499200" md5="fd0897f82a3634ee68d1ebe06cf23e18" sha1="0b8beb0cd7afff83d193635b77573c0eb915f89c"/> --> - <description>F355 Challenge: Passione Rossa (USA, Prototype 20000821)</description> + <description>F355 Challenge: Passione Rossa (USA, prototype 20000821)</description> <year>2000</year> <publisher>Acclaim</publisher> <info name="release" value="20000821"/> @@ -12899,7 +12899,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track05.raw" size="1060752" md5="f5ed74c3b1e74e5df56c6845587b7413" sha1="888609c4ac6c9726c97b3abf99eddcac55ddf684"/> <rom name="track06.bin" size="589994496" md5="b115255bf35c584a81d0d87b1aac3fa1" sha1="2faf95f5850caa971448ae0db14675fb0fd101cd"/> --> - <description>Fighting Force 2 (USA, Alt)</description> + <description>Fighting Force 2 (USA, alt)</description> <year>1999</year> <publisher>Eidos Interactive</publisher> <info name="serial" value="T-36801N"/> @@ -12922,7 +12922,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="Fighting Force 2 (USA) (Track 5).bin" size="1237152" crc="95557332" md5="cb9f913312fff0782cd8c87568bcc047" sha1="cf9a3476b4886212c18868190f98d301f5205a09"/> <rom name="Fighting Force 2 (USA) (Track 6).bin" size="590530752" crc="2cdb4717" md5="d2556d8cc02aa47718f0e12e148acfa2" sha1="e5e3a5adb1f8807be959fc53867606716d10f08c"/> --> - <description>Fighting Force 2 (USA, Alt 2)</description> + <description>Fighting Force 2 (USA, alt 2)</description> <year>1999</year> <publisher>Eidos Interactive</publisher> <info name="serial" value="T-36801N"/> @@ -13004,7 +13004,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track05.raw" size=" 13818000" md5="e081e4437e3193c4f9f712f5d607ce52" sha1="415049310c4e753b5554b75fc9fc484b9b946179"/> <rom name="track06.iso" size="553435136" md5="c644242a1da5c80d47edadd1c46431f4" sha1="e3d5514c8cacaa10240fa86790ea0c3fbd1aa5f4"/> --> - <description>Fighting Force 2 (Euro, Prototype 19991202)</description> + <description>Fighting Force 2 (Euro, prototype 19991202)</description> <year>1999</year> <publisher>Eidos Interactive</publisher> <info name="release" value="19991202"/> @@ -13062,7 +13062,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="13994400" md5="d1838bcbca4a24b39deddeae2a9d371a" sha1="b643df4def042b6c23f90f54c690ac7df431233f"/> <rom name="track03.bin" size="1185760800" md5="5fe5e3cbaf2926414d3ff2530733c978" sha1="08f854b653a96ce6fddbe5e19c84a56e71481018"/> --> - <description>Fighting Vipers 2 (Euro, Prototype 20001226)</description> + <description>Fighting Vipers 2 (Euro, prototype 20001226)</description> <year>2000</year> <publisher>Sega</publisher> <info name="serial" value="952-0135-50"/> @@ -13641,7 +13641,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1166592" md5="c1774d74e7f31b8f2ef74af2d7f28010" sha1="f1849e96005ebd0d4e0762ec2357a08a723cda1f"/> <rom name="track03.bin" size="1185760800" md5="73b443f96a919282364ef02105b8be74" sha1="626144e0343150604f76e152a3d1d58e3a4d5858"/> --> - <description>Fur Fighters (Euro, Demo)</description> + <description>Fur Fighters (Euro, demo)</description> <year>2000</year> <publisher>Acclaim</publisher> <info name="serial" value="D-0008-50"/> @@ -13661,7 +13661,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1237152" md5="87af6d21a8b10aeffb90874118531e29" sha1="b0d28980a64765c022b4b3e47244aad32a345270"/> <rom name="track03.iso" size="1032499200" md5="770abc0397be7ff989ab546fc7db0443" sha1="674a4f65e587cefc12885c65702da8db16e0c1ad"/> --> - <description>Fur Fighters (Euro, Prototype 20000602)</description> + <description>Fur Fighters (Euro, prototype 20000602)</description> <year>2000</year> <publisher>Acclaim</publisher> <info name="release" value="20000602"/> @@ -13680,7 +13680,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="13994400" md5="d1838bcbca4a24b39deddeae2a9d371a" sha1="b643df4def042b6c23f90f54c690ac7df431233f"/> <rom name="track03.iso" size="1032499200" md5="b8a77fc894940de9a135e441dabe6818" sha1="76da7b28000364cfb7f8d7b06673b25e781c26f1"/> --> - <description>Fur Fighters (Euro, Prototype 20000612)</description> + <description>Fur Fighters (Euro, prototype 20000612)</description> <year>2000</year> <publisher>Acclaim</publisher> <info name="release" value="20000612"/> @@ -14100,7 +14100,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track08.raw" size="32709264" md5="17ed7c732b89f730aac31a5acc354dce" sha1="2d6ba782f07ada8cdcf51da1e7872670b0566514"/> <rom name="track09.bin" size="918223152" md5="fce19201f27493075a1e7e78c4ad95e8" sha1="c988b5748a1770d2df328930c8cbc980712ea943"/> --> - <description>Generator Vol. 1 (USA, Alt)</description> + <description>Generator Vol. 1 (USA, alt)</description> <year>1999</year> <publisher>Sega</publisher> <info name="serial" value="SDC-00000"/> @@ -14130,7 +14130,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track08.raw" size="32709264" md5="a66bc558c687fb6c40a6abad9fbd652f" sha1="41f31ac448d33244b886c98901efb8cdcc83f635"/> <rom name="track09.bin" size="918223152" md5="fce19201f27493075a1e7e78c4ad95e8" sha1="c988b5748a1770d2df328930c8cbc980712ea943"/> --> - <description>Generator Vol. 1 (USA, Alt 2)</description> + <description>Generator Vol. 1 (USA, alt 2)</description> <year>1999</year> <publisher>Sega</publisher> <info name="serial" value="SDC-00000"/> @@ -14160,7 +14160,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track08.raw" size="32709264" md5="162676a92e3d3752e0e43e10b09f365b" sha1="206f5258def8ee66e70f9fb1b409f5dab9d12de4"/> <rom name="track09.bin" size="918223152" md5="fce19201f27493075a1e7e78c4ad95e8" sha1="c988b5748a1770d2df328930c8cbc980712ea943"/> --> - <description>Generator Vol. 1 (USA, Alt 3)</description> + <description>Generator Vol. 1 (USA, alt 3)</description> <year>1999</year> <publisher>Sega</publisher> <info name="serial" value="SDC-00000"/> @@ -14190,7 +14190,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track08.raw" size="32709264" md5="2de618bf34e5e391c1292402b4de6b1b" sha1="52b520dc82da9ce58494d46032a71205e347a563"/> <rom name="track09.bin" size="918223152" md5="fce19201f27493075a1e7e78c4ad95e8" sha1="c988b5748a1770d2df328930c8cbc980712ea943"/> --> - <description>Generator Vol. 1 (USA, Alt 4)</description> + <description>Generator Vol. 1 (USA, alt 4)</description> <year>1999</year> <publisher>Sega</publisher> <info name="serial" value="SDC-00000"/> @@ -14248,7 +14248,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track09.raw" size="12089280" md5="3a1de40bc2a4d9f16e0a220e5878dcd7" sha1="9dd4200727175d757c83e73f12c46b563b341b98"/> <rom name="track10.bin" size="1061365872" md5="5e9a18a98d1f0d9853b7e41d18195d24" sha1="4d0f5a6fd93eb0d2f5e20f709c8cf76706fc96ed"/> --> - <description>Generator Vol. 2 (USA, Alt)</description> + <description>Generator Vol. 2 (USA, alt)</description> <year>2000</year> <publisher>Sega</publisher> <info name="serial" value="51057"/> @@ -14279,7 +14279,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track09.raw" size="12089280" md5="4ad593372b74e54bb9b5ce4c11a99fe7" sha1="9f84fb6289bec6155697b97a507870419cc78a1f"/> <rom name="track10.bin" size="1061365872" md5="5e9a18a98d1f0d9853b7e41d18195d24" sha1="4d0f5a6fd93eb0d2f5e20f709c8cf76706fc96ed"/> --> - <description>Generator Vol. 2 (USA, Alt 2)</description> + <description>Generator Vol. 2 (USA, alt 2)</description> <year>2000</year> <publisher>Sega</publisher> <info name="serial" value="51057"/> @@ -14468,7 +14468,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="2036832" md5="9cc20be2467dca722d83676483af5798" sha1="6fdd43aab2bc57db785c1748ce0d45e07f7711a4"/> <rom name="track03.bin" size="1185760800" md5="ec82276c3c2192bb2f28f79a47b1f048" sha1="0047b2ca0f0003044e68e9667896145b50348d55"/> --> - <description>Giant Gram 2000: Zen Nihon Pro Wres 3 Eikou no Yuusha-tachi (Jpn, Alt)</description> + <description>Giant Gram 2000: Zen Nihon Pro Wres 3 Eikou no Yuusha-tachi (Jpn, alt)</description> <year>2000</year> <publisher>Sega</publisher> <info name="serial" value="HDR-0101"/> @@ -14653,7 +14653,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size="13818000" md5="e081e4437e3193c4f9f712f5d607ce52" sha1="415049310c4e753b5554b75fc9fc484b9b946179"/> <rom name="track05.bin" size="222590928" md5="b50c3de37b5ff56ed613f8f4abf61d09" sha1="ee02c5e47edf6a7844083d12b86202f9d0c7e075"/> --> - <description>GK: Giant Killers (Euro, Prototype 20010109)</description> + <description>GK: Giant Killers (Euro, prototype 20010109)</description> <year>2001</year> <publisher>AAA Game</publisher> <info name="serial" value="952-0143-50"/> @@ -14814,7 +14814,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1237152" md5="ad8a2202e072192fad5f7726a7e9d144" sha1="ecb6171a873be3ad993e4b91b09d01e23c840348"/> <rom name="track03.bin" size="1185760800" md5="4b2d952b3ac82e26b25430e3dee38908" sha1="4ec5eb9dd700ad942db4332b28229a8bfbbf38c1"/> --> - <description>Tee Off (USA, Alt)</description> + <description>Tee Off (USA, alt)</description> <year>1999</year> <publisher>Acclaim</publisher> <info name="serial" value="T-8108N"/> @@ -14873,7 +14873,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="15551424" md5="2551d7c9f919ba04e3cecaa9d1b945ca" sha1="ca747e37f30b1c9a875d11272be502c8fdd10efc"/> <rom name="track03.bin" size="1185760800" md5="5219fb69bb2f96430e7252ee2709d550" sha1="d2b2b0794493a5a0a85ece53af5d6ad142789e13"/> --> - <description>Golf Shiyou yo (Jpn, Rev. A)</description> + <description>Golf Shiyou yo (Jpn, rev. A)</description> <year>1999</year> <publisher>Bottom Up</publisher> <info name="serial" value="T-40901M"/> @@ -14892,7 +14892,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="Golf Shiyou yo (Japan) (Rev B) (Track 2).bin" size="15904224" crc="73a29dd3" md5="94801204d825ce7f13236c5bb3268e7a" sha1="99fec046c7ddc0fad012116d016914352f0ecdff"/> <rom name="Golf Shiyou yo (Japan) (Rev B) (Track 3).bin" size="1185760800" crc="9eafc931" md5="2b90e9e21f7981fd424ad4010bc9fa31" sha1="237ffb4e8a630ce74c60eed0e8ad73c7406aecac"/> --> - <description>Golf Shiyou yo (Jpn, Rev. B)</description> + <description>Golf Shiyou yo (Jpn, rev. B)</description> <year>2000</year> <publisher>Bottom Up</publisher> <info name="serial" value="T-40901M"/> @@ -15185,7 +15185,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1735776" md5="299599274bf003e5c440277e9300ebb3" sha1="9ab25eafdde07ca5c709d45f875b3124387835bd"/> <rom name="track03.iso" size="1032499200" md5="17075f506b14aab7c5132b1ba34c0038" sha1="f15beeb19a8bbcafbcd7c2374c7f060714783dd2"/> --> - <description>Grandia II - Tentou-you Demo (Jpn)</description> + <description>Grandia II - Tentou-you (Jpn, demo)</description> <year>2000</year> <publisher>Game Arts</publisher> <info name="serial" value="610-7878"/> @@ -16404,7 +16404,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track36.raw" size="21344400" md5="10660b8ec46f85890b47cdcd86016a00" sha1="253a5c641601c3324be93dbc42a819f9628f39c8"/> <rom name="track37.bin" size="579088272" md5="43524daaebcea89fcf08165e8735b3b9" sha1="eb597ea970c73b27199e5c6a1d44afe4ee4a7181"/> --> - <description>Hydro Thunder (USA, Rev. 1)</description> + <description>Hydro Thunder (USA, rev. 1)</description> <year>200?</year> <publisher>Midway</publisher> <info name="serial" value="T-9702N"/> @@ -16524,7 +16524,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track35.raw" size=" 21346752" md5="6fae8d53b2e771a297d8a852d00776dd" sha1="d035afed48af5275a82e5db9a6e5e4700b98744f"/> <rom name="track36.iso" size="434581504" md5="02de9d0cdca472998b9e3bf9e33d8ef9" sha1="d885ab517240216f3f4f597ceca247753ee53980"/> --> - <description>Hydro Thunder (World, Prototype 19990616)</description> + <description>Hydro Thunder (World, prototype 19990616)</description> <year>1999</year> <publisher>Midway</publisher> <info name="release" value="19990616"/> @@ -16577,7 +16577,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track36.raw" size=" 21344400" md5="4f44542a4dc9ee8774a812dc5414244e" sha1="d7199adeea5dd7d289586ada5a54a855110b2228"/> <rom name="track37.iso" size="504270848" md5="c133f5b564dbe6e39558f28b46afbab2" sha1="ba8f9ab4076b14dd16989b66bedf25f4d9fd8737"/> --> - <description>Hydro Thunder (Euro, Prototype 19990908)</description> + <description>Hydro Thunder (Euro, prototype 19990908)</description> <year>1999</year> <publisher>Midway</publisher> <info name="release" value="19990908"/> @@ -16847,7 +16847,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="Incoming - Jinrui Saishuu Kessen (Japan) (Track 13).bin" size="20916336" crc="280304e3" md5="fc5d1f0824677699a824b3c3ddedb615" sha1="05cc33e378fd977853efe1695854083150a233e3"/> <rom name="Incoming - Jinrui Saishuu Kessen (Japan) (Track 14).bin" size="38779776" crc="4cfe0f6e" md5="615ae5810acd6e9dd3441450fdf3034f" sha1="f43dc2e3f636aa603831c6502c1344c5b4981a7f"/> --> - <description>Incoming: Jinrui Saishuu Kessen (Jpn, Rev. 1)</description> + <description>Incoming: Jinrui Saishuu Kessen (Jpn, rev. 1)</description> <year>1998</year> <publisher>Imagineer</publisher> <info name="serial" value="T-15001M"/> @@ -16880,7 +16880,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track13.raw" size="20739936" md5="d6c74d7a365948404c494f0a82f4599f" sha1="258715ad794e5dccba3df9b9fd1dc70c306cf6c6"/> <rom name="track14.iso" size="80334848" md5="6bd43e032402ab10939a7cab5b8f2695" sha1="cb410a46060a13d7bee14c6547c23f56e16d8517"/> --> - <description>Incoming (Euro, Prototype 19990906)</description> + <description>Incoming (Euro, prototype 19990906)</description> <year>1999</year> <publisher>Rage Software</publisher> <info name="release" value="19990906"/> @@ -17507,7 +17507,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1237152" md5="9eef669a6adf2577aedb687d0605fbfd" sha1="13ffe1f95015a5bd325c6cbc369ab2dd27ae461e"/> <rom name="track03.bin" size="1185760800" md5="77bc0b131e14d35f909f02e6778b2c87" sha1="f9ed8434bc1570fd785d6f4900752adc91d39dd9"/> --> - <description>Jet Grind Radio (USA, Prototype 20001002)</description> + <description>Jet Grind Radio (USA, prototype 20001002)</description> <year>2000</year> <publisher>Sega</publisher> <info name="release" value="20001002"/> @@ -17526,7 +17526,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="13994400" md5="d1838bcbca4a24b39deddeae2a9d371a" sha1="b643df4def042b6c23f90f54c690ac7df431233f"/> <rom name="track03.iso" size="1032499200" md5="b6676bec4a24dacc43ca9376cd4970b5" sha1="2ec596cf2f5cf2f0aa7b2026964a301b477836a0"/> --> - <description>Jet Set Radio (Euro, Prototype 20001003)</description> + <description>Jet Set Radio (Euro, prototype 20001003)</description> <year>2000</year> <publisher>Sega</publisher> <info name="release" value="20001003"/> @@ -17803,7 +17803,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="2036832" md5="b62b490782ae03865592d79f13168c17" sha1="4fd817ccaa746651a1e277fdebd25ea4868ffb86"/> <rom name="track03.bin" size="1185760800" md5="23e70871f0bc0cb0fc094ec4072b8629" sha1="a64cffa8a721b8730f8d80a908f0c3f1f823b7fd"/> --> - <description>July (Jpn, Rev. 1)</description> + <description>July (Jpn, rev. 1)</description> <year>1998</year> <publisher>FortyFive</publisher> <info name="serial" value="T-35401M"/> @@ -18075,7 +18075,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track06.raw" size=" 25799088" md5="a6d4032d6014e6d11f9a17aeaec8334c" sha1="b9bd6cec4d7fb36806aaf6943b8305d0641a00da"/> <rom name="track07.bin" size=" 52809456" md5="29364068520d85cb2d73ec7932506a1f" sha1="4616015d8cde9013ac2d1e7b4b86fcc6ea88cece"/> --> - <description>Kao the Kangaroo (Demo) (World)</description> + <description>Kao the Kangaroo (World, demo)</description> <year>2000</year> <publisher>Titus</publisher> <info name="serial" value="952-0100-50"/> @@ -18572,7 +18572,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="1949808" md5="bc1d0aae3030443bcb14854048eb05d8" sha1="d0b02149b67f0d2f0f6c166f200bef58cfc7a301"/> <rom name="track03.bin" size="1185760800" md5="c32cb43346b72d9a680cf85d8ed93152" sha1="89404fc6a39de3279d0ecf6dd2bb5a8c29a4e3b8"/> --> - <description>Kuon no Kizuna: Sairinshou (Jpn, Rev. 1)</description> + <description>Kuon no Kizuna: Sairinshou (Jpn, rev. 1)</description> <year>2000</year> <publisher>FOG</publisher> <info name="serial" value="T-36701M"/> @@ -18789,7 +18789,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size=" 990192" md5="7f45034fc9b914871365595df8fb6f48" sha1="d6a9fdab713e1adc90763d1f73dbf605bab9cd70"/> <rom name="track05.iso" size="161746944" md5="d9db618388b5d55f8dd476cd38aaf54d" sha1="f594937d17ac409142b8f44b1834c159564c6553"/> --> - <description>Le Mans 24 Hours (World, Prototype 20000820)</description> + <description>Le Mans 24 Hours (World, prototype 20000820)</description> <year>2000</year> <publisher>Sega</publisher> <info name="release" value="20000820"/> @@ -18945,7 +18945,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size=" 1060752" md5="3a892db029c4b1ba6ed24ccdaf5cff62" sha1="36b69ee3a5dd70637228feaa14528ac23f848ee7"/> <rom name="track05.iso" size="578127872" md5="b632a79c74509455ea2ac9d8fe0656fb" sha1="bb972240d0a271c90a1dbb59594c732105839f10"/> --> - <description>Legacy of Kain: Soul Reaver (Euro, Prototype 20000118)</description> + <description>Legacy of Kain: Soul Reaver (Euro, prototype 20000118)</description> <year>2000</year> <publisher>Eidos Interactive</publisher> <info name="release" value="20000118"/> @@ -19064,7 +19064,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track16.raw" size=" 34456800" md5="360d8a65327a2a5397c5c6d08155cc7b" sha1="71c25771b8ef427e0ab6fa5f7b0c5e71491f51a8"/> <rom name="track17.iso" size=" 90777600" md5="dfaec113207035fa454caffcbb757a02" sha1="cf787ffdddf58b09f4b6d5122962c39fcd42db82"/> --> - <description>Looney Tunes: Space Race (World, Prototype 19991014)</description> + <description>Looney Tunes: Space Race (World, prototype 19991014)</description> <year>1999</year> <publisher>Infogrames</publisher> <info name="release" value="19991014"/> @@ -19096,7 +19096,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track16.raw" size=" 34456800" md5="39989a8236d79b3e11b9077f1e53033f" sha1="8996620fee124bf191932d8c2406231dcb7de133"/> <rom name="track17.bin" size="104252400" md5="8df80d1b78503db134bb174448152ea8" sha1="2f1a6e42b85b10c08c204147df4782e6a198b81e"/> --> - <description>Looney Tunes: Space Race (World, Prototype 20000731)</description> + <description>Looney Tunes: Space Race (World, prototype 20000731)</description> <year>2000</year> <publisher>Infogrames</publisher> <info name="release" value="20000731"/> @@ -19301,7 +19301,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track12.raw" size=" 48422976" md5="16b9cfc248e2fa806a13878a7e47adac" sha1="d48c6b1ab2df3d245ecb9ecbfdfc03ae4c1dd125"/> <rom name="track13.iso" size="128477184" md5="dcf451789e8202d65a3d854e6c53d01b" sha1="dc9d436f219f9afd77a070c397f517109a75498c"/> --> - <description>Magforce Racing (World, Prototype 20000524)</description> + <description>Magforce Racing (World, prototype 20000524)</description> <year>2000</year> <publisher>Crave</publisher> <info name="release" value="20000524"/> @@ -19972,7 +19972,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track07.raw" size=" 12089280" md5="f5969521da574d2fbf591ca13392ea7e" sha1="0eba22cef97196e1a2d91c43dd700f81c99b0c91"/> <rom name="track08.iso" size="209692672" md5="a1f1daf1c36db10c1cb8e4885662654d" sha1="cb53f6efb938f81a3d5469640be1232ba8ad28ff"/> --> - <description>MDK 2 (World, Prototype 20000126 5PM)</description> + <description>MDK 2 (World, prototype 20000126 5PM)</description> <year>2000</year> <publisher>Interplay</publisher> <info name="release" value="20000126"/> @@ -19995,7 +19995,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track07.raw" size=" 12089280" md5="f5969521da574d2fbf591ca13392ea7e" sha1="0eba22cef97196e1a2d91c43dd700f81c99b0c91"/> <rom name="track08.bin" size="239962800" md5="9dcbd2773c2f2e1570fe46290a534a14" sha1="54203e1c5423ff7e3fc9d7d7fa9bc485ab50d6ed"/> --> - <description>MDK 2 (World, Prototype 20000126 7PM)</description> + <description>MDK 2 (World, prototype 20000126 7PM)</description> <year>2000</year> <publisher>Interplay</publisher> <info name="release" value="20000126"/> @@ -20016,7 +20016,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size=" 39332496" md5="40149dd92eacef8609df026dfc844287" sha1="c974953e8ce3608828f002ad6e6caccbe3502643"/> <rom name="track05.iso" size="265670656" md5="fb6118f5d4e398a8d03fed191864d999" sha1="7b719c8b9860e1f5422748dc04d437b45fee0e3f"/> --> - <description>Sega Mega Drive (World, Prototype 20010115)</description> + <description>Sega Mega Drive (World, prototype 20010115)</description> <year>2001</year> <publisher>Sega</publisher> <info name="release" value="20010115"/> @@ -20334,7 +20334,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track10.raw" size=" 52863552" md5="4c3f9e5665b508a3e5bf0ef8ded1ab20" sha1="3d27d5fc15483719f57ceb544b6af429e0642333"/> <rom name="track11.iso" size=" 86781952" md5="a47257ada1406f87e599d8637e5d7578" sha1="c1b1143d2d1642944d2a96f1e3c8e0c27b33f097"/> --> - <description>Millennium Racer: Y2K Fighters (World, Prototype 20010604)</description> + <description>Millennium Racer: Y2K Fighters (World, prototype 20010604)</description> <year>2001</year> <publisher>Creat Studio</publisher> <info name="release" value="20010604"/> @@ -20494,7 +20494,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size="882000" md5="d7777a272481a223fb3174934ebc4868" sha1="595665221a8978e276b50bc6ae59011133ef4447"/> <rom name="track05.bin" size="1031683632" md5="f505987f9af094cd91f938b125f51e2f" sha1="17ca1be7416f7743186eab332cdf06e9219c8a1a"/> --> - <description>Ball Breakers (USA, Prototype 20000924)</description> + <description>Ball Breakers (USA, prototype 20000924)</description> <year>2000</year> <publisher>Take-Two</publisher> <info name="release" value="20000924"/> @@ -20681,7 +20681,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track21.raw" size=" 8072064" md5="d5644e1a205917662e5445fa2b075649" sha1="9f7386bfb8a7cfb940c3af102389a332baa798bd"/> <rom name="track22.iso" size=" 98684928" md5="c6ae6e5392072ec6b3cdd2779b42f4c5" sha1="c6d8c842196ee724632026729251d834034bf25f"/> --> - <description>Monaco Grand Prix: Racing Simulation 2 (Jpn, Prototype 19990106)</description> + <description>Monaco Grand Prix: Racing Simulation 2 (Jpn, prototype 19990106)</description> <year>1999</year> <publisher>Ubisoft</publisher> <info name="release" value="19990106"/> @@ -20874,7 +20874,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track52.raw" size="882000" md5="f0620fc1d5b6a118d153606c82a4555e" sha1="bb19856567c632f03e38f1de87ad7ed79c3c74ac"/> <rom name="track53.bin" size="777176064" md5="abbbf07c6bccff43a4e7bd644bd8da32" sha1="5263f3580d1d9a0fc01ab20618eb78db630cb862"/> --> - <description>Mortal Kombat Gold (USA, Rev. 1)</description> + <description>Mortal Kombat Gold (USA, rev. 1)</description> <year>1999</year> <publisher>Midway</publisher> <info name="serial" value="T-9701N"/> @@ -21027,7 +21027,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track52.raw" size=" 1942752" md5="591a051b0bf6d85aa9762f65aa49025f" sha1="07acdf0ea7dbcc0591e1295c70c85cda0807dfa7"/> <rom name="track53.iso" size="676556800" md5="fa32645edd472b1a9d8134a2e0561e65" sha1="f3b80af435cff953e9377f467af13c783cb155bb"/> --> - <description>Mortal Kombat Gold (Euro, Prototype 19990828)</description> + <description>Mortal Kombat Gold (Euro, prototype 19990828)</description> <year>1999</year> <publisher>Midway</publisher> <info name="release" value="19990828"/> @@ -21235,7 +21235,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track28.raw" size=" 20888112" md5="11f5c8a89878c8fb8fdf6296dfb994f0" sha1="3349de2cea5e3ba47762aab70ff738dde6c51c4d"/> <rom name="track29.iso" size=" 10295296" md5="3e6fd3cb1c582b0c985daac9aa540620" sha1="0976a68a0822c90720bf62ae3f6bb9ad66b239cd"/> --> - <description>Mr. Driller (Euro, Prototype 20000918)</description> + <description>Mr. Driller (Euro, prototype 20000918)</description> <year>2000</year> <publisher>Virgin Interactive</publisher> <info name="release" value="20000918"/> @@ -21341,7 +21341,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track02.raw" size="13994400" md5="d1838bcbca4a24b39deddeae2a9d371a" sha1="b643df4def042b6c23f90f54c690ac7df431233f"/> <rom name="track03.bin" size="1185760800" md5="38a3203513165cbb7c88ee50112b74c3" sha1="e1fa8b923356537107b521645e5ebe3e672001d5"/> --> - <description>MSR: Metropolis Street Racer (Euro, Rev. B)</description> + <description>MSR: Metropolis Street Racer (Euro, rev. B)</description> <year>2000</year> <publisher>Sega</publisher> <info name="serial" value="MK-51022-50"/> @@ -21382,7 +21382,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size=" 1060752" md5="3a892db029c4b1ba6ed24ccdaf5cff62" sha1="36b69ee3a5dd70637228feaa14528ac23f848ee7"/> <rom name="track05.iso" size="155680768" md5="847b7786fdd0e81febf890eb0df1b35b" sha1="4e85b3be2623e0dc5b389094016e82e1ce352f99"/> --> - <description>MSR: Metropolis Street Racer (World, Prototype 20000509)</description> + <description>MSR: Metropolis Street Racer (World, prototype 20000509)</description> <year>2000</year> <publisher>Sega</publisher> <info name="release" value="20000509"/> @@ -21658,7 +21658,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size="1060752" md5="3a892db029c4b1ba6ed24ccdaf5cff62" sha1="36b69ee3a5dd70637228feaa14528ac23f848ee7"/> <rom name="track05.iso" size="427399168" md5="9b5f5e0a9a1f4cf8e7514e5bd080649c" sha1="da375955766377659cf585944cef1308517dd70a"/> --> - <description>NBA 2K (USA, Prototype 19990922)</description> + <description>NBA 2K (USA, prototype 19990922)</description> <year>1999</year> <publisher>Sega</publisher> <info name="release" value="19990922"/> @@ -21679,7 +21679,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size="1060752" md5="3a892db029c4b1ba6ed24ccdaf5cff62" sha1="36b69ee3a5dd70637228feaa14528ac23f848ee7"/> <rom name="track05.iso" size="933912576" md5="6226ee946e9cd3bc450592cc995350ee" sha1="fa88a10f6dc75f2fef55439bac531b8ad6f50dc7"/> --> - <description>NBA 2K (World, Prototype 19991221)</description> + <description>NBA 2K (World, prototype 19991221)</description> <year>1999</year> <publisher>Sega</publisher> <info name="release" value="19991221"/> @@ -22351,7 +22351,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size="1060752" md5="f4cca51b2d1cacfb71c3a2a95259500e" sha1="58d7ebc62a61fddf6bee07da2a11c4639b1c5386"/> <rom name="track05.bin" size="1131253200" md5="950b7440802ce1f099d325e134376eb0" sha1="40d11183000e1685e9067cfbe94312deb828fdd0"/> --> - <description>NFL 2K (USA, Alt 1)</description> + <description>NFL 2K (USA, alt 1)</description> <year>1999</year> <publisher>Sega</publisher> <info name="serial" value="51003"/> @@ -22374,7 +22374,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size="1060752" md5="3fc13642cd326d398f0f1da04ce73b52" sha1="c416c83b9ffbd2e0903ca4720c3754b029bfafe6"/> <rom name="track05.bin" size="1131253200" md5="950b7440802ce1f099d325e134376eb0" sha1="40d11183000e1685e9067cfbe94312deb828fdd0"/> --> - <description>NFL 2K (USA, Alt 2)</description> + <description>NFL 2K (USA, alt 2)</description> <year>1999</year> <publisher>Sega</publisher> <info name="serial" value="51003"/> @@ -22403,7 +22403,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size="1060752" md5="3a892db029c4b1ba6ed24ccdaf5cff62" sha1="36b69ee3a5dd70637228feaa14528ac23f848ee7"/> <rom name="track05.bin" size="1131253200" md5="950b7440802ce1f099d325e134376eb0" sha1="40d11183000e1685e9067cfbe94312deb828fdd0"/> --> - <description>NFL 2K (USA, Alt 3)</description> + <description>NFL 2K (USA, alt 3)</description> <year>1999</year> <publisher>Sega</publisher> <info name="serial" value="51003"/> @@ -22567,7 +22567,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size="117183696" md5="97bc82e88c8d282031ae86026127399d" sha1="58ee5f397fb75b5b6c8e0f5b67f88ed2ae97ecfd"/> <rom name="track05.bin" size="395472336" md5="63859fa5f23dd7fc280b8cc7b3bbc432" sha1="a189fdb686762e7cdd07d08d4ee69f644ca8fcb2"/> --> - <description>NFL Blitz 2000 (USA, Rev. 1)</description> + <description>NFL Blitz 2000 (USA, rev. 1)</description> <year>1999</year> <publisher>Midway</publisher> <info name="serial" value="T-9703N"/> @@ -22610,7 +22610,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size="117183696" md5="2b3721506f2db076f2e7fd503b0235a7" sha1="19f1e544d6d7f6cf91c62bdb25bfa55324968f31"/> <rom name="track05.iso" size="344360960" md5="3660047dbf8a80416544b42b4f9dd6cc" sha1="c80c037ab610d1be409f8ce89e7eef53306cf37f"/> --> - <description>NFL Blitz 2000 (Euro, Prototype 19990908)</description> + <description>NFL Blitz 2000 (Euro, prototype 19990908)</description> <year>1999</year> <publisher>Midway</publisher> <info name="release" value="19990908"/> @@ -22761,7 +22761,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size="16696848" md5="477ddf28dcf25f2f34e4cc823f6baadd" sha1="57471fc523fb14f5ad52c06aaa3dd6b5858bc321"/> <rom name="track05.bin" size="749843472" md5="b769b2beceb69533282d8ee7d9de6e43" sha1="4a29feee03c01b1436fb7af1b028cafb5df92645"/> --> - <description>NHL 2K (USA, Prototype 20000131)</description> + <description>NHL 2K (USA, prototype 20000131)</description> <year>2000</year> <publisher>Sega</publisher> <info name="release" value="20000131"/> @@ -22782,7 +22782,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size=" 16696848" md5="0235b9288538cae24da1e72e3392eaef" sha1="04cf85ff2b86b07e24a3cf824d0327bfc4427fa8"/> <rom name="track05.iso" size=" 652924928" md5="31c7bdbaf7a37b95709ffdb21f5a7422" sha1="1953c99a0ec722e2b735d3fe730861c706a73ad8"/> --> - <description>NHL 2K (USA, Prototype 20000131, Alt)</description> + <description>NHL 2K (USA, prototype 20000131, alt)</description> <year>2000</year> <publisher>Sega</publisher> <info name="release" value="20000131"/> @@ -22803,7 +22803,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track04.raw" size="16696848" md5="477ddf28dcf25f2f34e4cc823f6baadd" sha1="57471fc523fb14f5ad52c06aaa3dd6b5858bc321"/> <rom name="track05.iso" size="652924928" md5="6f36f50a55acd2d32e21c31ed7bfbc5c" sha1="eee953b7bc8e377d2a5282c2b71bae4caf9f600c"/> --> - <description>NHL 2K (Euro, Prototype 20000321)</description> + <description>NHL 2K (Euro, prototype 20000321)</description> <year>2000</year> <publisher>Sega</publisher> <info name="release" value="20000321"/> @@ -23156,7 +23156,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track89.raw" size="2116800" md5="8e0a93a14893adf0ae38da65b11ac28b" sha1="be54986a2cdfb03281934c647ae63a4f51dcd0a3"/> <rom name="track90.bin" size="645616944" md5="d858e2483df915a5fb64d13dbf788bda" sha1="354f99ff4d358e5daf22df8eb353b0365720d139"/> --> - <description>Nightmare Creatures II (USA, Prototype 20000509)</description> + <description>Nightmare Creatures II (USA, prototype 20000509)</description> <year>2000</year> <publisher>Konami</publisher> <info name="release" value="20000509"/> @@ -23262,7 +23262,7 @@ P830-****-** : Appears to be a Sega part number for promo discs. <rom name="track89.raw" size="2116800" md5="8ac57390fa4ba17b0e138055267b3f6e" sha1="a74409044d54e3348432b3abaa4b99eb9fca08c7"/> <rom name="track90.iso" size="617672704" md5="4432b85c32545829589d9a3f1cdd3160" sha1="f44b33508e9dc85abe4bb530022676eeb967aa38"/> --> - <description>Nightmare Creatures II (Euro, Prototype 20000721)</description> + <description>Nightmare Creatures II (Euro, prototype 20000721)</description> <year>2000</year> <publisher>Konami</publisher> <info name="release" value="20000721"/> diff --git a/hash/gameboy.xml b/hash/gameboy.xml index 259d2ddb0c5..558e11f4955 100644 --- a/hash/gameboy.xml +++ b/hash/gameboy.xml @@ -3909,7 +3909,7 @@ license:CC0 </software> <software name="mazemonp" cloneof="mazemon"> - <description>Chou Mashin Eiyuu Den Wataru - Mazekko Monster (Japan, prototype)</description> + <description>Chou Mashin Eiyuuden Wataru - Mazekko Monster (Japan, prototype)</description> <year>1997</year> <publisher>Banpresto</publisher> <info name="alt_title" value="超魔神英雄伝ワタル まぜっこモンスター" /> @@ -3924,7 +3924,7 @@ license:CC0 </software> <software name="mazemon"> - <description>Chou Mashin Eiyuu Den Wataru - Mazekko Monster (Japan)</description> + <description>Chou Mashin Eiyuuden Wataru - Mazekko Monster (Japan)</description> <year>1997</year> <publisher>Banpresto</publisher> <info name="serial" value="DMG-AWAJ-JPN" /> @@ -3949,7 +3949,7 @@ license:CC0 <software name="mazemon2"> <!-- Notes: Also released by NP in 2000-08 --> - <description>Chou Mashin Eiyuu Den Wataru - Mazekko Monster 2 (Japan)</description> + <description>Chou Mashin Eiyuuden Wataru - Mazekko Monster 2 (Japan)</description> <year>1998</year> <publisher>Banpresto</publisher> <info name="serial" value="DMG-AWMJ-JPN" /> diff --git a/hash/nes.xml b/hash/nes.xml index a9e98384c3b..a360ebdca0c 100644 --- a/hash/nes.xml +++ b/hash/nes.xml @@ -23216,7 +23216,7 @@ license:CC0 </software> <software name="watarug"> - <description>Majin Eiyuu Den Wataru Gaiden (Jpn)</description> + <description>Mashin Eiyuuden Wataru Gaiden (Japan)</description> <year>1990</year> <publisher>Hudson Soft</publisher> <info name="serial" value="HFC-V2"/> diff --git a/hash/pce.xml b/hash/pce.xml index bfa819c9ea0..3a19e76dd9a 100644 --- a/hash/pce.xml +++ b/hash/pce.xml @@ -2125,7 +2125,7 @@ license:CC0 </software> <software name="wataru"> - <description>Majin Eiyuu Den Wataru</description> + <description>Mashin Eiyuuden Wataru</description> <year>1988</year> <publisher>Hudson</publisher> <info name="serial" value="HC63012"/> diff --git a/hash/pce_tourvision.xml b/hash/pce_tourvision.xml index 2d7e5ef6a41..7d861aa88a7 100644 --- a/hash/pce_tourvision.xml +++ b/hash/pce_tourvision.xml @@ -1548,7 +1548,7 @@ Parasol Stars </software> <software name="wataru"> - <description>Majin Eiyuu Den Wataru (TourVisión PCE bootleg)</description> + <description>Mashin Eiyuuden Wataru (TourVisión PCE bootleg)</description> <year>1988</year> <publisher>bootleg (TourVisión) / Hudson</publisher> <info name="alt_title" value="魔神英雄伝ワタル"/> diff --git a/hash/snes.xml b/hash/snes.xml index 67419604b36..1a72965cc8d 100644 --- a/hash/snes.xml +++ b/hash/snes.xml @@ -2101,7 +2101,7 @@ Beyond that last category are the roms waiting to be classified. </part> </software> - <software name="mrbloopy"> + <software name="mrbloopyp" cloneof="mrbloopy"> <!-- unknown/auction --> <description>Mr. Bloopy - Saves the World (USA, prototype 19950216)</description> <year>1994</year> @@ -37466,6 +37466,18 @@ List of unclassified roms </software> <software name="cornbust"> + <description>Corn Buster</description> + <year>2015</year> + <publisher>Piko Interactive</publisher> + <part name="cart" interface="snes_cart"> + <feature name="slot" value="lorom" /> + <dataarea name="rom" size="2097152"> + <rom name="corn buster (world) (unl).sfc" size="2097152" crc="c380ff4a" sha1="4cb7ac9c3564bffdc6fc967686c69c838755bc7c" offset="0x000000" /> + </dataarea> + </part> + </software> + + <software name="cornbustp" cloneof="cornbust"> <description>Corn Buster (Euro, prototype)</description> <year>199?</year> <publisher><unknown></publisher> @@ -38470,8 +38482,20 @@ List of unclassified roms </part> </software> + <software name="dorkeymp"> + <description>Dorke & Ymp</description> + <year>2015</year> + <publisher>Piko Interactive</publisher> + <part name="cart" interface="snes_cart"> + <feature name="slot" value="lorom" /> + <dataarea name="rom" size="4194304"> + <rom name="dorke & ymp (world) (unl).sfc" size="4194304" crc="c3fa8238" sha1="61de74e32e1625ae318d38508fe865b324dcee93" offset="0x000000" /> + </dataarea> + </part> + </software> + <!-- binary built from source --> - <software name="dorque1"> + <software name="dorque1" cloneof="dorkeymp"> <description>Dorque & Imp (Euro, prototype World 1)</description> <year>199?</year> <publisher>Norse</publisher> <!-- cancelled --> @@ -38484,7 +38508,7 @@ List of unclassified roms </software> <!-- binary built from source --> - <software name="dorque2" cloneof="dorque1"> + <software name="dorque2" cloneof="dorkeymp"> <description>Dorque & Imp (Euro, prototype World 2)</description> <year>199?</year> <publisher>Norse</publisher> <!-- cancelled --> @@ -38497,7 +38521,7 @@ List of unclassified roms </software> <!-- binary built from source --> - <software name="dorque3" cloneof="dorque1"> + <software name="dorque3" cloneof="dorkeymp"> <description>Dorque & Imp (Euro, prototype World 3)</description> <year>199?</year> <publisher>Norse</publisher> <!-- cancelled --> @@ -43762,6 +43786,18 @@ List of unclassified roms </software> <software name="ironcomm"> + <description>Iron Commando</description> + <year>2017</year> + <publisher>Piko Interactive</publisher> + <part name="cart" interface="snes_cart"> + <feature name="slot" value="lorom" /> + <dataarea name="rom" size="2097152"> + <rom name="iron commando (world) (unl).sfc" size="2097152" crc="b82e8499" sha1="21a56379dc2c4718dc407d14df47cd9bc8f6d292" offset="0x000000" /> + </dataarea> + </part> + </software> + + <software name="ironcommp" cloneof="ironcomm"> <description>Iron Commando (Euro, prototype)</description> <year>199?</year> <publisher><unknown></publisher> @@ -46613,6 +46649,18 @@ List of unclassified roms </part> </software> + <software name="legendpi" cloneof="legend"> + <description>Legend (Piko reissue)</description> + <year>2017</year> + <publisher>Piko Interactive</publisher> + <part name="cart" interface="snes_cart"> + <feature name="slot" value="lorom" /> + <dataarea name="rom" size="1048576"> + <rom name="legend (world) (unl).sfc" size="1048576" crc="fa66536d" sha1="fa868ed108891e84b62f27a92e539b8cb741f7f0" offset="0x000000" /> + </dataarea> + </part> + </software> + <software name="legendup" cloneof="legend"> <description>Legend (USA, prototype)</description> <year>1994</year> @@ -49185,6 +49233,18 @@ to ensure nothing has been touched in the Retro Quest cart production in 2013/20 </part> </software> + <software name="mrbloopy"> + <description>Mr. Bloopy Saves the World</description> + <year>2014</year> + <publisher>Piko Interactive</publisher> + <part name="cart" interface="snes_cart"> + <feature name="slot" value="lorom" /> + <dataarea name="rom" size="2097152"> + <rom name="mr. bloopy saves the world (world) (unl).sfc" size="2097152" crc="235a86d2" sha1="b057da5ee743a8f07063ace28c8b797a6d83e7b3" offset="0x000000" /> + </dataarea> + </part> + </software> + <software name="mrdo"> <description>Mr. Do! (Euro)</description> <year>1996</year> @@ -59547,6 +59607,18 @@ to ensure nothing has been touched in the Retro Quest cart production in 2013/20 </part> </software> + <software name="noaharkpi" cloneof="noahark"> + <description>Super Noah's Ark 3D (Piko reissue)</description> + <year>2013</year> + <publisher>Piko Interactive</publisher> + <part name="cart" interface="snes_cart"> + <feature name="slot" value="hirom" /> + <dataarea name="rom" size="1048576"> + <rom name="super 3d noah's ark (world) (unl).sfc" size="1048576" crc="2b691ded" sha1="16965ee9b63fe2bcd4b32c6e6bb7c37f18d0c8a6" offset="0x000000" /> + </dataarea> + </part> + </software> + <software name="snova"> <description>Super Nova (USA)</description> <year>1993</year> @@ -60329,6 +60401,18 @@ to ensure nothing has been touched in the Retro Quest cart production in 2013/20 </part> </software> + <software name="suprthor"> + <description>Super Thor Quest</description> + <year>2014</year> + <publisher>Piko Interactive</publisher> + <part name="cart" interface="snes_cart"> + <feature name="slot" value="lorom" /> + <dataarea name="rom" size="262144"> + <rom name="super thor quest (world) (unl).sfc" size="262144" crc="8658f479" sha1="1f02984ede26df2594a8c1efbef447b931511f87" offset="0x000000" /> + </dataarea> + </part> + </software> + <software name="strollup" cloneof="stroll"> <description>Super Troll Islands (USA, prototype)</description> <year>1994</year> @@ -995,7 +995,7 @@ endif ifeq ($(OS),windows) ifeq (posix,$(SHELLTYPE)) -GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -dumpversion 2> /dev/null) +GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -dumpfullversion 2> /dev/null) CLANG_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) --version 2> /dev/null| head -n 1 | grep clang | sed "s/^.*[^0-9]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$$/\1/" | head -n 1) PYTHON_AVAILABLE := $(shell $(PYTHON) --version > /dev/null 2>&1 && echo python) GIT_AVAILABLE := $(shell git --version > /dev/null 2>&1 && echo git) diff --git a/scripts/genie.lua b/scripts/genie.lua index f9307359ba1..9c02cca4b45 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -35,33 +35,37 @@ end function str_to_version(str) local val = 0 - if (str == nil or str == '') then + if not str then return val end - local cnt = 10000 - for word in string.gmatch(str, '([^.]+)') do - if(tonumber(word) == nil) then + local scale = 10000 + for word, sep in str:gmatch('([^.-]+)([.-]?)') do + local part = tonumber(word) + if not part then + return val + end + val = val + tonumber(word) * scale + scale = scale // 100 + if (scale == 0) or (sep ~= '.') then return val end - val = val + tonumber(word) * cnt - cnt = cnt / 100 end return val end function findfunction(x) assert(type(x) == "string") - local f=_G + local f = _G for v in x:gmatch("[^%.]+") do - if type(f) ~= "table" then - return nil, "looking for '"..v.."' expected table, not "..type(f) - end - f=f[v] + if type(f) ~= "table" then + return nil, "looking for '" .. v .. "' expected table, not " .. type(f) + end + f = f[v] end if type(f) == "function" then - return f + return f else - return nil, "expected function, not "..type(f) + return nil, "expected function, not " .. type(f) end end @@ -1098,8 +1102,8 @@ end end if version >= 120000 then buildoptions { - "-Wno-maybe-uninitialized", - "-Wno-uninitialized", -- netlist + "-Wno-error=maybe-uninitialized", + "-Wno-error=uninitialized", -- netlist } end end diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index 3a97d6e7c52..7e87a80393b 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -551,6 +551,8 @@ if (BUSES["BBC_INTERNAL"]~=null) then MAME_DIR .. "src/devices/bus/bbc/internal/cumana68k.h", MAME_DIR .. "src/devices/bus/bbc/internal/integrab.cpp", MAME_DIR .. "src/devices/bus/bbc/internal/integrab.h", + MAME_DIR .. "src/devices/bus/bbc/internal/memex.cpp", + MAME_DIR .. "src/devices/bus/bbc/internal/memex.h", MAME_DIR .. "src/devices/bus/bbc/internal/morleyaa.cpp", MAME_DIR .. "src/devices/bus/bbc/internal/morleyaa.h", MAME_DIR .. "src/devices/bus/bbc/internal/overlay.cpp", @@ -2088,22 +2090,32 @@ if (BUSES["RC2014"]~=null) then files { MAME_DIR .. "src/devices/bus/rc2014/rc2014.cpp", MAME_DIR .. "src/devices/bus/rc2014/rc2014.h", - MAME_DIR .. "src/devices/bus/rc2014/modules.cpp", - MAME_DIR .. "src/devices/bus/rc2014/modules.h", - MAME_DIR .. "src/devices/bus/rc2014/z80cpu.cpp", - MAME_DIR .. "src/devices/bus/rc2014/z80cpu.h", + MAME_DIR .. "src/devices/bus/rc2014/cf.cpp", + MAME_DIR .. "src/devices/bus/rc2014/cf.h", MAME_DIR .. "src/devices/bus/rc2014/clock.cpp", MAME_DIR .. "src/devices/bus/rc2014/clock.h", + MAME_DIR .. "src/devices/bus/rc2014/fdc.cpp", + MAME_DIR .. "src/devices/bus/rc2014/fdc.h", + MAME_DIR .. "src/devices/bus/rc2014/ide.cpp", + MAME_DIR .. "src/devices/bus/rc2014/ide.h", + MAME_DIR .. "src/devices/bus/rc2014/micro.cpp", + MAME_DIR .. "src/devices/bus/rc2014/micro.h", + MAME_DIR .. "src/devices/bus/rc2014/modules.cpp", + MAME_DIR .. "src/devices/bus/rc2014/modules.h", MAME_DIR .. "src/devices/bus/rc2014/ram.cpp", MAME_DIR .. "src/devices/bus/rc2014/ram.h", MAME_DIR .. "src/devices/bus/rc2014/rom.cpp", MAME_DIR .. "src/devices/bus/rc2014/rom.h", MAME_DIR .. "src/devices/bus/rc2014/romram.cpp", MAME_DIR .. "src/devices/bus/rc2014/romram.h", + MAME_DIR .. "src/devices/bus/rc2014/rtc.cpp", + MAME_DIR .. "src/devices/bus/rc2014/rtc.h", MAME_DIR .. "src/devices/bus/rc2014/serial.cpp", MAME_DIR .. "src/devices/bus/rc2014/serial.h", - MAME_DIR .. "src/devices/bus/rc2014/cf.cpp", - MAME_DIR .. "src/devices/bus/rc2014/cf.h", + MAME_DIR .. "src/devices/bus/rc2014/sound.cpp", + MAME_DIR .. "src/devices/bus/rc2014/sound.h", + MAME_DIR .. "src/devices/bus/rc2014/z80cpu.cpp", + MAME_DIR .. "src/devices/bus/rc2014/z80cpu.h", } end diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 85b566f0e97..16ab338b889 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -1044,6 +1044,8 @@ files { MAME_DIR .. "src/mame/audio/decobsmt.h", MAME_DIR .. "src/mame/audio/efo_zsu.cpp", MAME_DIR .. "src/mame/audio/efo_zsu.h", + MAME_DIR .. "src/mame/audio/fruitsamples.cpp", + MAME_DIR .. "src/mame/audio/fruitsamples.h", MAME_DIR .. "src/mame/audio/rax.cpp", MAME_DIR .. "src/mame/audio/rax.h", MAME_DIR .. "src/mame/audio/segam1audio.cpp", @@ -2331,6 +2333,8 @@ files { MAME_DIR .. "src/mame/drivers/jpmsys5sw.cpp", MAME_DIR .. "src/mame/drivers/jpmmps.cpp", MAME_DIR .. "src/mame/drivers/jpms80.cpp", + MAME_DIR .. "src/mame/audio/nl_jpmsru.cpp", + MAME_DIR .. "src/mame/audio/nl_jpmsru.h", MAME_DIR .. "src/mame/drivers/jpmsru.cpp", MAME_DIR .. "src/mame/drivers/jpmimpct.cpp", MAME_DIR .. "src/mame/includes/jpmimpct.h", @@ -4483,8 +4487,6 @@ files { MAME_DIR .. "src/mame/includes/fromanc2.h", MAME_DIR .. "src/mame/video/fromanc2.cpp", MAME_DIR .. "src/mame/drivers/gstriker.cpp", - MAME_DIR .. "src/mame/includes/gstriker.h", - MAME_DIR .. "src/mame/video/gstriker.cpp", MAME_DIR .. "src/mame/video/mb60553.cpp", MAME_DIR .. "src/mame/video/mb60553.h", MAME_DIR .. "src/mame/video/vs920a.cpp", diff --git a/src/devices/bus/bbc/internal/internal.cpp b/src/devices/bus/bbc/internal/internal.cpp index b09f6fca29c..a365b5729dc 100644 --- a/src/devices/bus/bbc/internal/internal.cpp +++ b/src/devices/bus/bbc/internal/internal.cpp @@ -162,6 +162,7 @@ WRITE_LINE_MEMBER(bbc_internal_slot_device::irq6502_w) #include "atpl.h" #include "cumana68k.h" #include "integrab.h" +#include "memex.h" #include "morleyaa.h" #include "overlay.h" #include "peartree.h" @@ -186,6 +187,7 @@ void bbcb_internal_devices(device_slot_interface &device) device.option_add("atplsw", BBC_ATPLSW); /* ATPL Sidewise ROM/RAM expansion */ device.option_add("cumana68k", BBC_CUMANA68K); /* Cumana 68008 Upgrade Board */ device.option_add("integrab", BBC_INTEGRAB); /* Computech Integra-B */ + device.option_add("memexb20", BBC_MEMEXB20); /* Memex-B20 RAM expansion */ device.option_add("mr3000", BBC_MR3000); /* Peartree MR3000 ROM board */ device.option_add("mr4200", BBC_MR4200); /* Peartree MR4200 RAM board */ device.option_add("mr4300", BBC_MR4300); /* Peartree MR4300 ROM/RAM board */ diff --git a/src/devices/bus/bbc/internal/memex.cpp b/src/devices/bus/bbc/internal/memex.cpp new file mode 100644 index 00000000000..809313e4c68 --- /dev/null +++ b/src/devices/bus/bbc/internal/memex.cpp @@ -0,0 +1,109 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Memex B20 20K RAM expansion + + This is a DIY project from the May 1984 issue of Electronics and + Computing, with part two of the project in the August 1984 issue. + +**********************************************************************/ + + +#include "emu.h" +#include "memex.h" + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE(BBC_MEMEXB20, bbc_memexb20_device, "bbc_memexb20", "Memex-B20 RAM expansion"); + + +//------------------------------------------------- +// ROM( memexb20 ) +//------------------------------------------------- + +ROM_START(memexb20) + ROM_REGION(0x2000, "exp_rom", 0) + ROM_LOAD("memex-b20_v2.2.rom", 0x0000, 0x2000, CRC(98ee8eb6) SHA1(aad311797e204b0b69450460f8b4605409c31ddd)) +ROM_END + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const tiny_rom_entry *bbc_memexb20_device::device_rom_region() const +{ + return ROM_NAME(memexb20); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// bbc_memexb20_device - constructor +//------------------------------------------------- + +bbc_memexb20_device::bbc_memexb20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, BBC_MEMEXB20, tag, owner, clock) + , device_bbc_internal_interface(mconfig, *this) + , m_shadow(false) +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void bbc_memexb20_device::device_start() +{ + address_space &program = m_maincpu->space(AS_PROGRAM); + + program.install_write_handler(0xd000, 0xd000, write8smo_delegate(*this, FUNC(bbc_memexb20_device::enable_w))); + program.install_write_handler(0xc000, 0xc000, write8smo_delegate(*this, FUNC(bbc_memexb20_device::disable_w))); + + m_ram = make_unique_clear<uint8_t[]>(0x5000); + + /* register for save states */ + save_item(NAME(m_shadow)); + save_pointer(NAME(m_ram), 0x5000); +} + + +//************************************************************************** +// IMPLEMENTATION +//************************************************************************** + +void bbc_memexb20_device::enable_w(uint8_t data) +{ + m_shadow = true; +} + +void bbc_memexb20_device::disable_w(uint8_t data) +{ + m_shadow = false; +} + +uint8_t bbc_memexb20_device::ram_r(offs_t offset) +{ + uint8_t data = 0xff; + + if (m_shadow && offset >= 0x3000) + data = m_ram[offset - 0x3000]; + else + data = m_mb_ram->pointer()[offset]; + + return data; +} + +void bbc_memexb20_device::ram_w(offs_t offset, uint8_t data) +{ + if (m_shadow && offset >= 0x3000) + m_ram[offset - 0x3000] = data; + else + m_mb_ram->pointer()[offset] = data; +} diff --git a/src/devices/bus/bbc/internal/memex.h b/src/devices/bus/bbc/internal/memex.h new file mode 100644 index 00000000000..1e4f07bcb16 --- /dev/null +++ b/src/devices/bus/bbc/internal/memex.h @@ -0,0 +1,50 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Memex B20 20K RAM expansion + +**********************************************************************/ + + +#ifndef MAME_BUS_BBC_INTERNAL_MEMEX_H +#define MAME_BUS_BBC_INTERNAL_MEMEX_H + +#include "internal.h" + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +class bbc_memexb20_device : public device_t, public device_bbc_internal_interface +{ +public: + // construction/destruction + bbc_memexb20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + // device-level overrides + virtual void device_start() override; + + // optional information overrides + virtual const tiny_rom_entry *device_rom_region() const override; + + virtual bool overrides_ram() override { return true; } + virtual uint8_t ram_r(offs_t offset) override; + virtual void ram_w(offs_t offset, uint8_t data) override; + +private: + void enable_w(uint8_t data); + void disable_w(uint8_t data); + + bool m_shadow; + std::unique_ptr<uint8_t[]> m_ram; +}; + + +// device type definition +DECLARE_DEVICE_TYPE(BBC_MEMEXB20, bbc_memexb20_device); + + +#endif /* MAME_BUS_BBC_INTERNAL_MEMEX_H */ diff --git a/src/devices/bus/nscsi/cfp1080s.cpp b/src/devices/bus/nscsi/cfp1080s.cpp index 27902389b6a..a55e78c402c 100644 --- a/src/devices/bus/nscsi/cfp1080s.cpp +++ b/src/devices/bus/nscsi/cfp1080s.cpp @@ -36,6 +36,7 @@ void cfp1080s_device::device_start() void cfp1080s_device::mem_map(address_map &map) { map(0x00000, 0x1ffff).rom().region("firmware", 0); + map(0xff081, 0xff081).lr8(NAME([]() { return 0x80; })); // status register of some peripheral } void cfp1080s_device::device_add_mconfig(machine_config &config) diff --git a/src/devices/bus/rc2014/cf.cpp b/src/devices/bus/rc2014/cf.cpp index b15a20eed70..c30da3f429e 100644 --- a/src/devices/bus/rc2014/cf.cpp +++ b/src/devices/bus/rc2014/cf.cpp @@ -26,9 +26,9 @@ public: protected: // device-level overrides virtual void device_start() override; + virtual void device_reset() override; virtual void device_add_mconfig(machine_config &config) override; - DECLARE_WRITE_LINE_MEMBER( irq_w ) { m_bus->int_w(state); } DECLARE_WRITE_LINE_MEMBER( tx_w ) { m_bus->tx_w(state); } uint8_t ide_cs0_r(offs_t offset) { return m_ata->cs0_r(offset); } @@ -46,13 +46,17 @@ compact_flash_device::compact_flash_device(const machine_config &mconfig, const void compact_flash_device::device_start() { - // A7 not connected - m_bus->installer(AS_IO)->install_readwrite_handler(0x10, 0x17, 0, 0x80, 0, read8sm_delegate(*this, FUNC(compact_flash_device::ide_cs0_r)), write8sm_delegate(*this, FUNC(compact_flash_device::ide_cs0_w))); +} + +void compact_flash_device::device_reset() +{ + // A15-A8 and A7 not connected + m_bus->installer(AS_IO)->install_readwrite_handler(0x10, 0x17, 0, 0xff80, 0, read8sm_delegate(*this, FUNC(compact_flash_device::ide_cs0_r)), write8sm_delegate(*this, FUNC(compact_flash_device::ide_cs0_w))); } void compact_flash_device::device_add_mconfig(machine_config &config) { - ATA_INTERFACE(config, m_ata).options(ata_devices, "hdd", nullptr, false); + ATA_INTERFACE(config, m_ata).options(ata_devices, "hdd", nullptr, true); } } diff --git a/src/devices/bus/rc2014/clock.cpp b/src/devices/bus/rc2014/clock.cpp index 00bfd43e4bb..bb73143edc2 100644 --- a/src/devices/bus/rc2014/clock.cpp +++ b/src/devices/bus/rc2014/clock.cpp @@ -93,7 +93,7 @@ void dual_clock_base::device_start() } static constexpr u32 clock_mapping[] = -{ +{ 7'372'800/1, 7'372'800/2, 7'372'800/3, @@ -102,8 +102,8 @@ static constexpr u32 clock_mapping[] = 7'372'800/12, 7'372'800/24, 10'000, - 0, - 0 + 0, // TODO: Support manual clocking (not possible for now) + 0 // TODO: Support external clocking }; void dual_clock_base::device_reset() diff --git a/src/devices/bus/rc2014/fdc.cpp b/src/devices/bus/rc2014/fdc.cpp new file mode 100644 index 00000000000..ba8ce96d7ab --- /dev/null +++ b/src/devices/bus/rc2014/fdc.cpp @@ -0,0 +1,241 @@ +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic +/*************************************************************************** + + RC2014 FDC + +****************************************************************************/ + +#include "emu.h" +#include "fdc.h" + +#include "machine/upd765.h" +#include "imagedev/floppy.h" +#include "formats/imd_dsk.h" +#include "formats/pc_dsk.h" + +namespace { + +//************************************************************************** +// RC2014 Floppy Disk Controller FDC9266 +// Module author: Dr. Scott M. Baker +//************************************************************************** + +class rc2014_fdc9266_device : public device_t, public device_rc2014_card_interface +{ +public: + // construction/destruction + rc2014_fdc9266_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; +private: + void control_w(offs_t offset, uint8_t data); + + required_ioport m_addr; + required_ioport_array<4> m_jp; + required_device<upd765a_device> m_fdc; + required_device_array<floppy_connector, 2> m_floppy; +}; + +rc2014_fdc9266_device::rc2014_fdc9266_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, RC2014_FDC9266, tag, owner, clock) + , device_rc2014_card_interface(mconfig, *this) + , m_addr(*this, "SV1") + , m_jp(*this, "JP%u", 1U) + , m_fdc(*this, "fdc") + , m_floppy(*this, "fdc:%u", 0U) +{ +} + +void rc2014_fdc9266_device::device_start() +{ +} + +void rc2014_fdc9266_device::device_reset() +{ + uint8_t base = m_addr->read() << 5; // SV1 + // A15-A8 and A1 not connected + m_bus->installer(AS_IO)->install_read_handler(base+0x10, base+0x10, 0, 0xff02, 0, read8smo_delegate(m_fdc, FUNC(upd765a_device::msr_r))); + m_bus->installer(AS_IO)->install_readwrite_handler(base+0x11, base+0x11, 0, 0xff02, 0, read8smo_delegate(m_fdc, FUNC(upd765a_device::fifo_r)), write8smo_delegate(m_fdc, FUNC(upd765a_device::fifo_w))); + m_bus->installer(AS_IO)->install_write_handler(base+0x18, base+0x18, 0, 0xff02, 0, write8sm_delegate(*this, FUNC(rc2014_fdc9266_device::control_w))); + // TODO: Use jumpers +} + +void rc2014_fdc9266_device::control_w(offs_t, uint8_t data) +{ + // D0 - TC + // D1 - MOTEA + // D2 - MOTEB + // D3 - P2 + // D4 - P1 + // D5 - P0 + // D6 - DENSEL + // D7 - FDC_RST (trough inverter) + m_fdc->tc_w(BIT(data,0)? true : false); + if (m_floppy[0]->get_device()) + m_floppy[0]->get_device()->mon_w(!BIT(data,1)); + if (m_floppy[1]->get_device()) + m_floppy[1]->get_device()->mon_w(!BIT(data,2)); + + m_fdc->set_rate(BIT(data,6) ? 500000 : 250000); + m_fdc->reset_w(!BIT(data,7) ? ASSERT_LINE : CLEAR_LINE); +} + +static void rc2014_floppies(device_slot_interface &device) +{ + device.option_add("35hd", FLOPPY_35_HD); +} + +static void rc2014_floppy_formats(format_registration &fr) +{ + fr.add_mfm_containers(); + fr.add(FLOPPY_IMD_FORMAT); + fr.add(FLOPPY_PC_FORMAT); +} + +void rc2014_fdc9266_device::device_add_mconfig(machine_config &config) +{ + // FDC9266 + UPD765A(config, m_fdc, XTAL(8'000'000), true, true); + + // floppy drives + FLOPPY_CONNECTOR(config, m_floppy[0], rc2014_floppies, "35hd", rc2014_floppy_formats); + FLOPPY_CONNECTOR(config, m_floppy[1], rc2014_floppies, "35hd", rc2014_floppy_formats); +} + +static INPUT_PORTS_START( rc2014_fdc9266_jumpers ) + PORT_START("SV1") + PORT_CONFNAME( 0x7, 0x2, "Base Address" ) + PORT_CONFSETTING( 0x0, "0x00" ) + PORT_CONFSETTING( 0x1, "0x20" ) + PORT_CONFSETTING( 0x2, "0x40" ) + PORT_CONFSETTING( 0x3, "0x60" ) + PORT_CONFSETTING( 0x4, "0x80" ) + PORT_CONFSETTING( 0x5, "0xa0" ) + PORT_CONFSETTING( 0x6, "0xc0" ) + PORT_CONFSETTING( 0x7, "0xe0" ) + PORT_START("JP1") + PORT_CONFNAME( 0x1, 0x1, "Two Side" ) + PORT_CONFSETTING( 0x0, "GND" ) + PORT_CONFSETTING( 0x1, "None" ) + PORT_START("JP2") + PORT_CONFNAME( 0x1, 0x0, "/FAULT" ) + PORT_CONFSETTING( 0x0, "None" ) + PORT_CONFSETTING( 0x1, "+5V" ) + PORT_START("JP3") + PORT_CONFNAME( 0x1, 0x1, "MINI" ) + PORT_CONFSETTING( 0x0, "GND" ) + PORT_CONFSETTING( 0x1, "+5V" ) + PORT_START("JP4") + PORT_CONFNAME( 0x1, 0x4, "RDY" ) + PORT_CONFSETTING( 0x0, "GND" ) + PORT_CONFSETTING( 0x4, "DC/RDY" ) +INPUT_PORTS_END + +ioport_constructor rc2014_fdc9266_device::device_input_ports() const +{ + return INPUT_PORTS_NAME( rc2014_fdc9266_jumpers ); +} + +//************************************************************************** +// RC2014 Floppy Disk Controller WD37C65 +// Module author: Dr. Scott M. Baker +//************************************************************************** + +class rc2014_wd37c65_device : public device_t, public device_rc2014_card_interface +{ +public: + // construction/destruction + rc2014_wd37c65_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; + + // DACK confirmation is same as pulsing TC + uint8_t dack_r(address_space &space, offs_t) { m_fdc->tc_w(true); m_fdc->tc_w(false); return space.unmap(); } +private: + required_ioport m_addr; + required_ioport_array<2> m_jp; + required_device<wd37c65c_device> m_fdc; + required_device_array<floppy_connector, 2> m_floppy; +}; + +rc2014_wd37c65_device::rc2014_wd37c65_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, RC2014_WD37C65, tag, owner, clock) + , device_rc2014_card_interface(mconfig, *this) + , m_addr(*this, "SV1") + , m_jp(*this, "JP%u", 1U) + , m_fdc(*this, "fdc") + , m_floppy(*this, "fdc:%u", 0U) +{ +} + +void rc2014_wd37c65_device::device_start() +{ +} + +void rc2014_wd37c65_device::device_reset() +{ + uint8_t base = m_addr->read() << 5; // SV1 + // A15-A8 and A1 not connected + m_bus->installer(AS_IO)->install_read_handler(base+0x10, base+0x10, 0, 0xff02, 0, read8smo_delegate(m_fdc, FUNC(wd37c65c_device::msr_r))); + m_bus->installer(AS_IO)->install_readwrite_handler(base+0x11, base+0x11, 0, 0xff02, 0, read8smo_delegate(m_fdc, FUNC(wd37c65c_device::fifo_r)), write8smo_delegate(m_fdc, FUNC(wd37c65c_device::fifo_w))); + + // A15-A8 and A0 and A1 not connected + m_bus->installer(AS_IO)->install_write_handler(base+0x08, base+0x08, 0, 0xff06, 0, write8smo_delegate(m_fdc, FUNC(wd37c65c_device::ccr_w))); + m_bus->installer(AS_IO)->install_write_handler(base+0x18, base+0x18, 0, 0xff06, 0, write8smo_delegate(m_fdc, FUNC(wd37c65c_device::dor_w))); + m_bus->installer(AS_IO)->install_read_handler(base+0x18, base+0x18, 0, 0xff06, 0, read8m_delegate(*this, FUNC(rc2014_wd37c65_device::dack_r))); + // TODO: Use jumpers +} + +void rc2014_wd37c65_device::device_add_mconfig(machine_config &config) +{ + WD37C65C(config, m_fdc, 16_MHz_XTAL); + + // floppy drives + FLOPPY_CONNECTOR(config, m_floppy[0], rc2014_floppies, "35hd", rc2014_floppy_formats); + FLOPPY_CONNECTOR(config, m_floppy[1], rc2014_floppies, "35hd", rc2014_floppy_formats); +} + +static INPUT_PORTS_START( rc2014_wd37c65_jumpers ) + PORT_START("SV1") + PORT_CONFNAME( 0x7, 0x2, "Base Address" ) + PORT_CONFSETTING( 0x0, "0x00" ) + PORT_CONFSETTING( 0x1, "0x20" ) + PORT_CONFSETTING( 0x2, "0x40" ) + PORT_CONFSETTING( 0x3, "0x60" ) + PORT_CONFSETTING( 0x4, "0x80" ) + PORT_CONFSETTING( 0x5, "0xa0" ) + PORT_CONFSETTING( 0x6, "0xc0" ) + PORT_CONFSETTING( 0x7, "0xe0" ) + PORT_START("JP1") + PORT_CONFNAME( 0x1, 0x1, "DACK" ) + PORT_CONFSETTING( 0x0, "Share with DOR" ) + PORT_CONFSETTING( 0x1, "Use offset 0" ) + PORT_START("JP2") + PORT_CONFNAME( 0x1, 0x0, "TC" ) + PORT_CONFSETTING( 0x0, "Port offset 4" ) + PORT_CONFSETTING( 0x1, "+5V" ) +INPUT_PORTS_END + +ioport_constructor rc2014_wd37c65_device::device_input_ports() const +{ + return INPUT_PORTS_NAME( rc2014_wd37c65_jumpers ); +} + +} +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(RC2014_FDC9266, device_rc2014_card_interface, rc2014_fdc9266_device, "rc2014_fdc9266", "RC2014 Floppy Disk Controller FDC9266") +DEFINE_DEVICE_TYPE_PRIVATE(RC2014_WD37C65, device_rc2014_card_interface, rc2014_wd37c65_device, "rc2014_wd37c65", "RC2014 Floppy Disk Controller WD37C65") diff --git a/src/devices/bus/rc2014/fdc.h b/src/devices/bus/rc2014/fdc.h new file mode 100644 index 00000000000..ed1c50cd6b9 --- /dev/null +++ b/src/devices/bus/rc2014/fdc.h @@ -0,0 +1,19 @@ +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic +/********************************************************************** + + RC2014 FDC + +**********************************************************************/ + +#ifndef MAME_BUS_RC2014_FDC_H +#define MAME_BUS_RC2014_FDC_H + +#pragma once + +#include "bus/rc2014/rc2014.h" + +DECLARE_DEVICE_TYPE(RC2014_FDC9266, device_rc2014_card_interface) +DECLARE_DEVICE_TYPE(RC2014_WD37C65, device_rc2014_card_interface) + +#endif // MAME_BUS_RC2014_FDC_H diff --git a/src/devices/bus/rc2014/ide.cpp b/src/devices/bus/rc2014/ide.cpp new file mode 100644 index 00000000000..e81a168cba6 --- /dev/null +++ b/src/devices/bus/rc2014/ide.cpp @@ -0,0 +1,295 @@ +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic +/*************************************************************************** + + RC2014 IDE + +****************************************************************************/ + +#include "emu.h" +#include "ide.h" +#include "machine/i8255.h" +#include "bus/ata/ataintf.h" + +namespace { + +//************************************************************************** +// rc2014_ide_base +//************************************************************************** + +class rc2014_ide_base : public device_t, public device_rc2014_card_interface +{ +protected: + // construction/destruction + rc2014_ide_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + + // device-level overrides + virtual void device_start() override; + virtual void device_add_mconfig(machine_config &config) override; + + uint8_t ppi_pa_r() { return m_data.b.l; } + uint8_t ppi_pb_r() { return m_data.b.h; } + void ppi_pa_w(uint8_t data) { m_data.b.l = data; } + void ppi_pb_w(uint8_t data) { m_data.b.h = data; } + virtual void ppi_pc_w(uint8_t data) = 0; + + // base-class members + required_device<ata_interface_device> m_ata; + required_device<i8255_device> m_ppi; + + PAIR16 m_data; + uint8_t m_prev; +}; + +rc2014_ide_base::rc2014_ide_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, type, tag, owner, clock) + , device_rc2014_card_interface(mconfig, *this) + , m_ata(*this, "ata") + , m_ppi(*this, "82c55") + , m_prev(0) +{ +} + +void rc2014_ide_base::device_start() +{ +} + +void rc2014_ide_base::device_add_mconfig(machine_config &config) +{ + I8255(config, m_ppi, 0); + m_ppi->in_pa_callback().set(FUNC(rc2014_ide_base::ppi_pa_r)); + m_ppi->in_pb_callback().set(FUNC(rc2014_ide_base::ppi_pb_r)); + m_ppi->out_pa_callback().set(FUNC(rc2014_ide_base::ppi_pa_w)); + m_ppi->out_pb_callback().set(FUNC(rc2014_ide_base::ppi_pb_w)); + m_ppi->out_pc_callback().set(FUNC(rc2014_ide_base::ppi_pc_w)); + + ATA_INTERFACE(config, m_ata).options(ata_devices, "hdd", "hdd", false); +} + +//************************************************************************** +// RC2014 82C55 IDE Interface +// Module author: Ed Brindley +//************************************************************************** + +class rc2014_82c55_ide_device : public rc2014_ide_base +{ +public: + // construction/destruction + rc2014_82c55_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // device-level overrides + virtual void device_reset() override; + virtual ioport_constructor device_input_ports() const override; + + void ppi_pc_w(uint8_t data) override; +private: + required_ioport m_sw; + required_ioport_array<4> m_jp; + + uint8_t m_da0; + uint8_t m_da1; + uint8_t m_dcs1; + uint8_t m_dior; +}; + +rc2014_82c55_ide_device::rc2014_82c55_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : rc2014_ide_base(mconfig, RC2014_82C55_IDE, tag, owner, clock) + , m_sw(*this, "SW1") + , m_jp(*this, "JP%u", 1U) +{ +} + +void rc2014_82c55_ide_device::device_reset() +{ + m_da0 = (m_jp[0]->read() == 1) ? 4 : 0; + m_dcs1 = (m_jp[1]->read() == 1) ? 0 : 4; + m_da1 = (m_jp[2]->read() == 1) ? 6 : 1; + m_dior = (m_jp[3]->read() == 1) ? 1 : 6; + + uint8_t base = m_sw->read(); // SW1 + // A15-A8 not connected + m_bus->installer(AS_IO)->install_readwrite_handler(base, base+0x03, 0, 0xff00, 0, read8sm_delegate(m_ppi, FUNC(i8255_device::read)), write8sm_delegate(m_ppi, FUNC(i8255_device::write))); +} + +void rc2014_82c55_ide_device::ppi_pc_w(uint8_t data) +{ + // On IDE connector DIOW and DIOR are inverted + // write is on falling and read on rising edge + uint8_t offset = BIT(data,2) << 2 | BIT(data,m_da1) << 1 | BIT(data,m_da0); + + if (BIT(data,3)) // DCS0 + { + if (BIT(data,5)==0 && BIT(m_prev,5)==1) // DIOW + { + m_ata->cs0_w(offset, m_data.w); + } + if (BIT(data,m_dior)==1 && BIT(m_prev,m_dior)==0) // DIOR + { + m_data.w = m_ata->cs0_r(offset); + } + } + if (BIT(data,m_dcs1)) // DCS1 + { + if (BIT(data,5)==0 && BIT(m_prev,5)==1) // DIOW + { + m_ata->cs1_w(offset, m_data.w); + } + if (BIT(data,m_dior)==1 && BIT(m_prev,m_dior)==0) // DIOR + { + m_data.w = m_ata->cs1_r(offset); + } + } + if (BIT(data,7)) // DRESET + { + // RESET IDE Disk + m_ata->reset(); + } + m_prev = data; + +} + +static INPUT_PORTS_START( rc2014_82c55_ide_jumpers ) + PORT_START("SW1") + PORT_DIPNAME(0x04, 0x00, "0x04") PORT_DIPLOCATION("Base Address:1") + PORT_DIPSETTING(0x00, DEF_STR( Off ) ) + PORT_DIPSETTING(0x04, DEF_STR( On ) ) + PORT_DIPNAME(0x08, 0x00, "0x08") PORT_DIPLOCATION("Base Address:2") + PORT_DIPSETTING(0x00, DEF_STR( Off ) ) + PORT_DIPSETTING(0x08, DEF_STR( On ) ) + PORT_DIPNAME(0x10, 0x00, "0x10") PORT_DIPLOCATION("Base Address:3") + PORT_DIPSETTING(0x00, DEF_STR( Off ) ) + PORT_DIPSETTING(0x10, DEF_STR( On ) ) + PORT_DIPNAME(0x20, 0x20, "0x20") PORT_DIPLOCATION("Base Address:4") + PORT_DIPSETTING(0x00, DEF_STR( Off ) ) + PORT_DIPSETTING(0x20, DEF_STR( On ) ) + PORT_DIPNAME(0x40, 0x00, "0x40") PORT_DIPLOCATION("Base Address:5") + PORT_DIPSETTING(0x00, DEF_STR( Off ) ) + PORT_DIPSETTING(0x40, DEF_STR( On ) ) + PORT_DIPNAME(0x80, 0x00, "0x80") PORT_DIPLOCATION("Base Address:6") + PORT_DIPSETTING(0x00, DEF_STR( Off ) ) + PORT_DIPSETTING(0x80, DEF_STR( On ) ) + PORT_START("JP1") + PORT_CONFNAME( 0x1, 0x0, "DA0" ) + PORT_CONFSETTING( 0x0, "PC0" ) + PORT_CONFSETTING( 0x1, "PC4" ) + PORT_START("JP2") + PORT_CONFNAME( 0x1, 0x0, "DCS1" ) + PORT_CONFSETTING( 0x0, "PC4" ) + PORT_CONFSETTING( 0x1, "PC0" ) + PORT_START("JP3") + PORT_CONFNAME( 0x1, 0x0, "DA1" ) + PORT_CONFSETTING( 0x0, "PC1" ) + PORT_CONFSETTING( 0x1, "PC6" ) + PORT_START("JP4") + PORT_CONFNAME( 0x1, 0x0, "DIOR" ) + PORT_CONFSETTING( 0x0, "PC6" ) + PORT_CONFSETTING( 0x1, "PC1" ) + PORT_START("JP5") + PORT_CONFNAME( 0x1, 0x0, "Power" ) + PORT_CONFSETTING( 0x0, "Bus" ) + PORT_CONFSETTING( 0x1, "External" ) +INPUT_PORTS_END + +ioport_constructor rc2014_82c55_ide_device::device_input_ports() const +{ + return INPUT_PORTS_NAME( rc2014_82c55_ide_jumpers ); +} + +//************************************************************************** +// RC2014 IDE Hard Drive Module +// Module author: Spencer Owen +// Based on design from Ed Brindley, but simplified +//************************************************************************** + +class rc2014_ide_hdd_device : public rc2014_ide_base +{ +public: + // construction/destruction + rc2014_ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // device-level overrides + virtual void device_reset() override; + virtual ioport_constructor device_input_ports() const override; + + void ppi_pc_w(uint8_t data) override; +private: + required_ioport m_jp; +}; + +rc2014_ide_hdd_device::rc2014_ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : rc2014_ide_base(mconfig, RC2014_IDE_HDD, tag, owner, clock) + , m_jp(*this, "J1") +{ +} + +void rc2014_ide_hdd_device::device_reset() +{ + uint8_t base = m_jp->read() << 3; + // A15-A8 are not connected, A7,A6 and A2 must be 0 + m_bus->installer(AS_IO)->install_readwrite_handler(base, base+0x03, 0, 0xff00, 0, read8sm_delegate(m_ppi, FUNC(i8255_device::read)), write8sm_delegate(m_ppi, FUNC(i8255_device::write))); +} + +void rc2014_ide_hdd_device::ppi_pc_w(uint8_t data) +{ + uint8_t offset = data & 7; + + if (BIT(data,3)) // DCS0 + { + if (BIT(data,5)==0 && BIT(m_prev,5)==1) // DIOW + { + m_ata->cs0_w(offset, m_data.w); + } + if (BIT(data,6)==1 && BIT(m_prev,6)==0) // DIOR + { + m_data.w = m_ata->cs0_r(offset); + } + } + if (BIT(data,4)) // DCS1 + { + if (BIT(data,5)==0 && BIT(m_prev,5)==1) // DIOW + { + m_ata->cs1_w(offset, m_data.w); + } + if (BIT(data,6)==1 && BIT(m_prev,6)==0) // DIOR + { + m_data.w = m_ata->cs1_r(offset); + } + } + if (BIT(data,7)) // DRESET + { + // RESET IDE Disk + m_ata->reset(); + } + m_prev = data; + +} + +static INPUT_PORTS_START( rc2014_ide_hdd_jumpers ) + PORT_START("J1") + PORT_CONFNAME( 0x7, 0x4, "Base Address" ) + PORT_CONFSETTING( 0x1, "0x08" ) + PORT_CONFSETTING( 0x2, "0x10" ) + PORT_CONFSETTING( 0x3, "0x18" ) + PORT_CONFSETTING( 0x4, "0x20" ) + PORT_CONFSETTING( 0x5, "0x28" ) + PORT_CONFSETTING( 0x6, "0x30" ) + PORT_CONFSETTING( 0x7, "0x38" ) + PORT_START("JP1") + PORT_CONFNAME( 0x1, 0x0, "Power" ) + PORT_CONFSETTING( 0x0, "Bus" ) + PORT_CONFSETTING( 0x1, "External" ) +INPUT_PORTS_END + +ioport_constructor rc2014_ide_hdd_device::device_input_ports() const +{ + return INPUT_PORTS_NAME( rc2014_ide_hdd_jumpers ); +} + +} +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** +DEFINE_DEVICE_TYPE_PRIVATE(RC2014_82C55_IDE, device_rc2014_card_interface, rc2014_82c55_ide_device, "rc2014_82c55_ide", "RC2014 82C55 IDE Interface") +DEFINE_DEVICE_TYPE_PRIVATE(RC2014_IDE_HDD, device_rc2014_card_interface, rc2014_ide_hdd_device, "rc2014_ide_hdd", "RC2014 IDE Hard Drive Module") diff --git a/src/devices/bus/rc2014/ide.h b/src/devices/bus/rc2014/ide.h new file mode 100644 index 00000000000..02cecc00aae --- /dev/null +++ b/src/devices/bus/rc2014/ide.h @@ -0,0 +1,19 @@ +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic +/********************************************************************** + + RC2014 IDE + +**********************************************************************/ + +#ifndef MAME_BUS_RC2014_IDE_H +#define MAME_BUS_RC2014_IDE_H + +#pragma once + +#include "bus/rc2014/rc2014.h" + +DECLARE_DEVICE_TYPE(RC2014_82C55_IDE, device_rc2014_card_interface) +DECLARE_DEVICE_TYPE(RC2014_IDE_HDD, device_rc2014_card_interface) + +#endif // MAME_BUS_RC2014_IDE_H diff --git a/src/devices/bus/rc2014/micro.cpp b/src/devices/bus/rc2014/micro.cpp new file mode 100644 index 00000000000..10f3b5c3e8e --- /dev/null +++ b/src/devices/bus/rc2014/micro.cpp @@ -0,0 +1,299 @@ +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic +/*************************************************************************** + + RC2014 Micro Module + +****************************************************************************/ + +#include "emu.h" +#include "micro.h" +#include "modules.h" + +#include "cpu/z80/z80.h" +#include "machine/6850acia.h" +#include "machine/clock.h" +#include "bus/ata/ataintf.h" +#include "bus/rs232/rs232.h" + +namespace { + +//************************************************************************** +// RC2014 Micro module +// Module author: Spencer Owen +//************************************************************************** + +class rc2014_micro : public device_t, public device_rc2014_card_interface +{ +public: + // construction/destruction + rc2014_micro(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +private: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_resolve_objects() override; + virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; + virtual const tiny_rom_entry *device_rom_region() const override; + + DECLARE_WRITE_LINE_MEMBER( clk_w ) { m_bus->clk_w(state); } + DECLARE_WRITE_LINE_MEMBER( tx_w ) { m_bus->tx_w(state); } + + void addrmap_mem(address_map &map) { map.unmap_value_high(); } + void addrmap_io(address_map &map) { map.unmap_value_high(); } + + required_device<z80_device> m_maincpu; + required_device<acia6850_device> m_acia; + required_memory_region m_rom; + required_ioport m_rom_selector; + required_ioport m_rom_present; + + std::unique_ptr<u8[]> m_ram; + + static constexpr XTAL MAIN_CLOCK = XTAL(7'372'800); +}; + +rc2014_micro::rc2014_micro(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, RC2014_MICRO, tag, owner, clock) + , device_rc2014_card_interface(mconfig, *this) + , m_maincpu(*this, "maincpu") + , m_acia(*this, "acia") + , m_rom(*this, "rom") + , m_rom_selector(*this, "JP2-JP4") + , m_rom_present(*this, "ROM") + , m_ram(nullptr) +{ +} + +void rc2014_micro::device_start() +{ + // Setup CPU + m_bus->set_bus_clock(MAIN_CLOCK); + m_maincpu->set_daisy_config(m_bus->get_daisy_chain()); + + // Setup RAM + m_ram = std::make_unique<u8[]>(0x8000); + std::fill_n(m_ram.get(), 0x8000, 0xff); + save_pointer(NAME(m_ram), 0x8000); + m_bus->installer(AS_PROGRAM)->install_ram(0x8000, 0xffff, m_ram.get()); +} + +void rc2014_micro::device_reset() +{ + // Setup ACIA + // A15-A8 and A5-A1 not connected + m_bus->installer(AS_IO)->install_readwrite_handler(0x80, 0x81, 0, 0xff3e, 0, read8sm_delegate(*m_acia, FUNC(acia6850_device::read)), write8sm_delegate(*m_acia, FUNC(acia6850_device::write))); + + // Setup ROM + if (m_rom_present->read()) + m_bus->installer(AS_PROGRAM)->install_rom(0x0000, 0x1fff, 0x0000, m_rom->base() + (m_rom_selector->read() & 7) * 0x2000); +} + +void rc2014_micro::device_resolve_objects() +{ + // Setup CPU + m_bus->assign_installer(AS_PROGRAM, &m_maincpu->space(AS_PROGRAM)); + m_bus->assign_installer(AS_IO, &m_maincpu->space(AS_IO)); + m_bus->int_callback().append_inputline(m_maincpu, INPUT_LINE_IRQ0); + + // Setup ACIA + m_bus->rx_callback().append(m_acia, FUNC(acia6850_device::write_rxd)); +} + +static DEVICE_INPUT_DEFAULTS_START( terminal ) + DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_115200 ) + DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_115200 ) + DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_8 ) + DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_NONE ) + DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_1 ) +DEVICE_INPUT_DEFAULTS_END + +void rc2014_micro::device_add_mconfig(machine_config &config) +{ + Z80(config, m_maincpu, MAIN_CLOCK); + m_maincpu->set_addrmap(AS_PROGRAM, &rc2014_micro::addrmap_mem); + m_maincpu->set_addrmap(AS_IO, &rc2014_micro::addrmap_io); + + clock_device &clock(CLOCK(config, "clock", MAIN_CLOCK)); + clock.signal_handler().append(FUNC(rc2014_micro::clk_w)); + clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_txc)); + clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc)); + + ACIA6850(config, m_acia, 0); + m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); + m_acia->txd_handler().append(FUNC(rc2014_micro::tx_w)); + m_acia->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); + m_acia->irq_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0); + + rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal")); + rs232.rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd)); + rs232.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal)); +} + +static INPUT_PORTS_START( rc2014_micro_jumpers ) + // JP1 is used to enable power from USB-to-Serial cable + PORT_START("JP2-JP4") + PORT_CONFNAME( 0x7, 0x0, "ROM Bank (A13-A15)" ) + PORT_CONFSETTING( 0x0, "BASIC" ) + PORT_CONFSETTING( 0x1, "EMPTY1" ) + PORT_CONFSETTING( 0x2, "EMPTY2" ) + PORT_CONFSETTING( 0x3, "EMPTY3" ) + PORT_CONFSETTING( 0x4, "EMPTY4" ) + PORT_CONFSETTING( 0x5, "EMPTY5" ) + PORT_CONFSETTING( 0x6, "EMPTY6" ) + PORT_CONFSETTING( 0x7, "SCM" ) + PORT_START("ROM") + PORT_CONFNAME( 0x1, 0x1, "ROM Socket" ) + PORT_CONFSETTING( 0x0, "Empty" ) + PORT_CONFSETTING( 0x1, "Populated" ) +INPUT_PORTS_END + +ioport_constructor rc2014_micro::device_input_ports() const +{ + return INPUT_PORTS_NAME( rc2014_micro_jumpers ); +} + +ROM_START(rc2014_rom) + ROM_REGION( 0x10000, "rom",0 ) + ROM_LOAD( "r0000009.bin", 0x0000, 0x10000, CRC(3fb1ced7) SHA1(40a030b931ebe6cca654ce056c228297f245b057) ) +ROM_END + +const tiny_rom_entry *rc2014_micro::device_rom_region() const +{ + return ROM_NAME( rc2014_rom ); +} + +//************************************************************************** +// RC2014 Mini CP/M Upgrade module +// Module author: Spencer Owen +//************************************************************************** + +class rc2014_mini_cpm : public device_t, public device_rc2014_card_interface +{ +public: + // construction/destruction + rc2014_mini_cpm(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_post_load() override { update_banks(); } + virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; + virtual const tiny_rom_entry *device_rom_region() const override; + + DECLARE_WRITE_LINE_MEMBER( tx_w ) { m_bus->tx_w(state); } + + uint8_t ide_cs0_r(offs_t offset) { return m_ata->cs0_r(offset); } + void ide_cs0_w(offs_t offset, uint8_t data) { m_ata->cs0_w(offset, data); } + void reset_bank_w(offs_t, uint8_t) { m_view_num = 0; update_banks(); } + void toggle_bank_w(offs_t, uint8_t) { m_view_num = m_view_num ? 0 : 1; update_banks(); } + +private: + void update_banks() { m_view.select(m_view_num); } + + // base-class members + uint8_t m_view_num; + std::unique_ptr<u8[]> m_ram; + + required_device<ata_interface_device> m_ata; + required_device<rc2014_bus_device> m_rc2014_bus; + required_memory_region m_rom; + required_ioport m_jp1; + memory_view m_view; + memory_bank_creator m_rombank; + memory_bank_creator m_rambank; +}; + +rc2014_mini_cpm::rc2014_mini_cpm(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, RC2014_MINI_CPM, tag, owner, clock) + , device_rc2014_card_interface(mconfig, *this) + , m_ata(*this, "ata") + , m_rc2014_bus(*this, ":bus") + , m_rom(*this, "rom") + , m_jp1(*this, "JP1-JP2") + , m_view(*this, "view") + , m_rombank(*this, "bank") + , m_rambank(*this, "ram") +{ +} + +void rc2014_mini_cpm::device_start() +{ + // Additional 32K RAM + m_ram = std::make_unique<u8[]>(0x8000); + std::fill_n(m_ram.get(), 0x8000, 0xff); + save_pointer(NAME(m_ram), 0x8000); + save_item(NAME(m_view_num)); + + // Install RAM/ROM + m_bus->installer(AS_PROGRAM)->install_view(0x0000, 0x7fff, m_view); + m_view[0].install_read_bank(0x0000, 0x3fff, m_rombank); + m_view[0].install_write_bank(0x0000, 0x3fff, m_rambank); + m_view[1].install_readwrite_bank(0x0000, 0x7fff, m_rambank); + + // Setup banks + m_rombank->configure_entry(0, m_rom->base() + 0x0000); + m_rombank->configure_entry(1, m_rom->base() + 0x4000); + m_rombank->configure_entry(2, m_rom->base() + 0x8000); + m_rombank->configure_entry(3, m_rom->base() + 0xc000); + + m_rambank->configure_entry(0, m_ram.get()); +} + +void rc2014_mini_cpm::device_reset() +{ + // A15-A8, A7 and A2-A0 not connected, A6 must be 0 + m_bus->installer(AS_IO)->install_write_handler(0x30, 0x30, 0, 0xff87, 0, write8sm_delegate(*this, FUNC(rc2014_mini_cpm::reset_bank_w))); + m_bus->installer(AS_IO)->install_write_handler(0x38, 0x38, 0, 0xff87, 0, write8sm_delegate(*this, FUNC(rc2014_mini_cpm::toggle_bank_w))); + // A15-A8 and A7 not connected + m_bus->installer(AS_IO)->install_readwrite_handler(0x10, 0x17, 0, 0xff80, 0, read8sm_delegate(*this, FUNC(rc2014_mini_cpm::ide_cs0_r)), write8sm_delegate(*this, FUNC(rc2014_mini_cpm::ide_cs0_w))); + + // Set default banks + m_view_num = 0; + m_rombank->set_entry(m_jp1->read()); + update_banks(); +} + +void rc2014_mini_cpm::device_add_mconfig(machine_config &config) +{ + ATA_INTERFACE(config, m_ata).options(ata_devices, "hdd", nullptr, true); + + RC2014_SLOT(config, "1", m_rc2014_bus, rc2014_bus_modules, nullptr); + RC2014_SLOT(config, "2", m_rc2014_bus, rc2014_bus_modules, nullptr); +} + +static INPUT_PORTS_START( rc2014_mini_cpm_jumpers ) + PORT_START("JP1-JP2") + PORT_CONFNAME( 0x3, 0x1, "Bank" ) + PORT_CONFSETTING( 0x0, "0" ) + PORT_CONFSETTING( 0x1, "1" ) + PORT_CONFSETTING( 0x2, "2" ) + PORT_CONFSETTING( 0x3, "3" ) +INPUT_PORTS_END + +ioport_constructor rc2014_mini_cpm::device_input_ports() const +{ + return INPUT_PORTS_NAME( rc2014_mini_cpm_jumpers ); +} + +ROM_START(rc2014_mini_cpm) + ROM_REGION( 0x10000, "rom",0 ) + ROM_LOAD( "r0881099.bin", 0x00000, 0x10000, CRC(5619f399) SHA1(c96e9ebd6ce019c264aaea156532fcf807d4c74c) ) +ROM_END + +const tiny_rom_entry *rc2014_mini_cpm::device_rom_region() const +{ + return ROM_NAME( rc2014_mini_cpm ); +} + +} +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(RC2014_MICRO, device_rc2014_card_interface, rc2014_micro, "rc2014_micro", "RC2014 Micro module") +DEFINE_DEVICE_TYPE_PRIVATE(RC2014_MINI_CPM, device_rc2014_card_interface, rc2014_mini_cpm, "rc2014_mini_cpm", "Mini CP/M Upgrade module") diff --git a/src/devices/bus/rc2014/micro.h b/src/devices/bus/rc2014/micro.h new file mode 100644 index 00000000000..f5683d0a426 --- /dev/null +++ b/src/devices/bus/rc2014/micro.h @@ -0,0 +1,19 @@ +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic +/********************************************************************** + + RC2014 Micro Module + +**********************************************************************/ + +#ifndef MAME_BUS_RC2014_MICRO_H +#define MAME_BUS_RC2014_MICRO_H + +#pragma once + +#include "bus/rc2014/rc2014.h" + +DECLARE_DEVICE_TYPE(RC2014_MICRO, device_rc2014_card_interface) +DECLARE_DEVICE_TYPE(RC2014_MINI_CPM, device_rc2014_card_interface) + +#endif // MAME_BUS_RC2014_MICRO_H diff --git a/src/devices/bus/rc2014/modules.cpp b/src/devices/bus/rc2014/modules.cpp index 0429b87d5a1..7e27e7d65e6 100644 --- a/src/devices/bus/rc2014/modules.cpp +++ b/src/devices/bus/rc2014/modules.cpp @@ -9,13 +9,18 @@ #include "emu.h" #include "bus/rc2014/rc2014.h" -#include "bus/rc2014/z80cpu.h" +#include "bus/rc2014/cf.h" #include "bus/rc2014/clock.h" +#include "bus/rc2014/fdc.h" +#include "bus/rc2014/ide.h" +#include "bus/rc2014/micro.h" #include "bus/rc2014/ram.h" #include "bus/rc2014/rom.h" #include "bus/rc2014/romram.h" +#include "bus/rc2014/rtc.h" #include "bus/rc2014/serial.h" -#include "bus/rc2014/cf.h" +#include "bus/rc2014/sound.h" +#include "bus/rc2014/z80cpu.h" void rc2014_bus_modules(device_slot_interface &device) { @@ -31,6 +36,22 @@ void rc2014_bus_modules(device_slot_interface &device) device.option_add("sio_40p", RC2014_DUAL_SERIAL_40P); device.option_add("cf", RC2014_COMPACT_FLASH); device.option_add("rom_ram", RC2014_ROM_RAM_512); + device.option_add("rtc", RC2014_DS1302_RTC); + device.option_add("ym_sound", RC2014_YM2149_SOUND); + device.option_add("ay_sound", RC2014_AY8190_SOUND); + device.option_add("82c55_ide", RC2014_82C55_IDE); + device.option_add("ide_hdd", RC2014_IDE_HDD); + device.option_add("fdc_smc", RC2014_FDC9266); + device.option_add("fdc_wdc", RC2014_WD37C65); + device.option_add("micro", RC2014_MICRO); +} + +// Mini mezzanine boards +void rc2014_mini_bus_modules(device_slot_interface &device) +{ + rc2014_bus_modules(device); + device.option_add("mini", RC2014_MICRO); + device.option_add("mini_cpm", RC2014_MINI_CPM); } void rc2014_ext_bus_modules(device_slot_interface &device) diff --git a/src/devices/bus/rc2014/modules.h b/src/devices/bus/rc2014/modules.h index 0447f81aee7..16becd448d5 100644 --- a/src/devices/bus/rc2014/modules.h +++ b/src/devices/bus/rc2014/modules.h @@ -13,6 +13,7 @@ // supported devices void rc2014_bus_modules(device_slot_interface &device); +void rc2014_mini_bus_modules(device_slot_interface &device); void rc2014_ext_bus_modules(device_slot_interface &device); void rc2014_rc80_bus_modules(device_slot_interface &device); diff --git a/src/devices/bus/rc2014/ram.cpp b/src/devices/bus/rc2014/ram.cpp index 83790e510df..dc7c89ae170 100644 --- a/src/devices/bus/rc2014/ram.cpp +++ b/src/devices/bus/rc2014/ram.cpp @@ -69,7 +69,6 @@ protected: virtual ioport_constructor device_input_ports() const override; DECLARE_WRITE_LINE_MEMBER( page_w ) { m_bank = state; update_banks(); } - void ram_w(offs_t offset, uint8_t data) { m_ram[offset] = data; } virtual void update_banks() = 0; @@ -105,7 +104,7 @@ void ram_64k_base::device_reset() static INPUT_PORTS_START( ram_64k_jumpers ) PORT_START("START_ADDR") - PORT_CONFNAME( 0x4, 0x0, "Start address" ) + PORT_CONFNAME( 0x7, 0x0, "Start address" ) PORT_CONFSETTING( 0x0, "0x0000" ) PORT_CONFSETTING( 0x1, "0x1000" ) PORT_CONFSETTING( 0x2, "0x2000" ) @@ -164,11 +163,10 @@ void ram_64k_device::update_banks() { if (m_paged->read() == 0) return; // If not paged skip - if (m_bank == 0) { - m_bus->installer(AS_PROGRAM)->install_write_handler(0x0000, 0x7fff, write8sm_delegate(*this, FUNC(ram_64k_device::ram_w))); - } else { + if (m_bank == 0) + m_bus->installer(AS_PROGRAM)->install_writeonly(0x0000, 0x7fff, m_ram.get()); + else m_bus->installer(AS_PROGRAM)->install_ram(0x0000, 0x7fff, m_ram.get()); - } } //************************************************************************** @@ -202,9 +200,9 @@ void ram_64k_device_40pin::device_reset() if (m_paged->read()) { m_bus->installer(AS_PROGRAM)->install_ram(0x8000, 0xffff, m_ram.get() + 0x8000); - m_bus->installer(AS_PROGRAM)->install_write_handler(0x0000, 0x7fff, write8sm_delegate(*this, FUNC(ram_64k_device_40pin::ram_w))); + m_bus->installer(AS_PROGRAM)->install_writeonly(0x0000, 0x7fff, m_ram.get()); } - else + else { m_bus->installer(AS_PROGRAM)->install_ram(m_start_addr->read() * 0x1000, 0xffff, m_ram.get() + m_start_addr->read() * 0x1000); } diff --git a/src/devices/bus/rc2014/rc2014.cpp b/src/devices/bus/rc2014/rc2014.cpp index 69d07eb515c..26feec22365 100644 --- a/src/devices/bus/rc2014/rc2014.cpp +++ b/src/devices/bus/rc2014/rc2014.cpp @@ -14,7 +14,7 @@ //************************************************************************** //------------------------------------------------- -// rc2014_bus_device +// rc2014_bus_device //------------------------------------------------- rc2014_bus_device::rc2014_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) @@ -40,14 +40,12 @@ rc2014_bus_device::rc2014_bus_device(const machine_config &mconfig, const char * rc2014_bus_device::~rc2014_bus_device() { for(size_t i = 0; i < m_daisy.size(); i++) - delete [] m_daisy_chain[i]; + delete [] m_daisy_chain[i]; delete [] m_daisy_chain; } void rc2014_bus_device::device_start() { - if (m_installer[AS_PROGRAM] == nullptr) - throw emu_fatalerror("Main address installer missing on RC2014 bus !!!"); // resolve callbacks m_clk.resolve_safe(); m_int.resolve_safe(); @@ -59,6 +57,11 @@ void rc2014_bus_device::device_start() m_user4.resolve_safe(); } +void rc2014_bus_device::device_reset() +{ + installer(AS_IO)->unmap_readwrite(0, (1 << installer(AS_IO)->space_config().addr_width()) - 1); +} + void rc2014_bus_device::set_bus_clock(u32 clock) { set_clock(clock); @@ -74,7 +77,9 @@ void rc2014_bus_device::assign_installer(int index, address_space_installer *ins address_space_installer *rc2014_bus_device::installer(int index) const { - assert(index >= 0 && index < 4 && m_installer[index]); + assert(index >= 0 && index < 4); + if (m_installer[index] == nullptr ) + throw emu_fatalerror("Address installer not set on RC2014 bus !!! Add CPU module."); return m_installer[index]; } @@ -91,7 +96,7 @@ const z80_daisy_config* rc2014_bus_device::get_daisy_chain() } //------------------------------------------------- -// device_rc2014_card_interface +// device_rc2014_card_interface //------------------------------------------------- device_rc2014_card_interface::device_rc2014_card_interface(const machine_config &mconfig, device_t &device) @@ -138,7 +143,7 @@ void rc2014_slot_device::device_resolve_objects() //************************************************************************** //------------------------------------------------- -// rc2014_ext_bus_device +// rc2014_ext_bus_device //------------------------------------------------- rc2014_ext_bus_device::rc2014_ext_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) @@ -175,7 +180,7 @@ void rc2014_ext_bus_device::device_start() } //------------------------------------------------- -// device_rc2014_ext_card_interface +// device_rc2014_ext_card_interface //------------------------------------------------- device_rc2014_ext_card_interface::device_rc2014_ext_card_interface(const machine_config &mconfig, device_t &device) @@ -221,7 +226,7 @@ void rc2014_ext_slot_device::device_resolve_objects() //************************************************************************** //------------------------------------------------- -// rc2014_rc80_bus_device +// rc2014_rc80_bus_device //------------------------------------------------- rc2014_rc80_bus_device::rc2014_rc80_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) @@ -241,7 +246,7 @@ void rc2014_rc80_bus_device::device_start() } //------------------------------------------------- -// device_rc2014_rc80_card_interface +// device_rc2014_rc80_card_interface //------------------------------------------------- device_rc2014_rc80_card_interface::device_rc2014_rc80_card_interface(const machine_config &mconfig, device_t &device) diff --git a/src/devices/bus/rc2014/rc2014.h b/src/devices/bus/rc2014/rc2014.h index d6cbd6f5154..da7284edc7c 100644 --- a/src/devices/bus/rc2014/rc2014.h +++ b/src/devices/bus/rc2014/rc2014.h @@ -5,49 +5,49 @@ RC2014 Bus Device =========================================================================== - Standard Bus| Extended Bus | RC80 RC2014 Bus + Standard Bus| Extended Bus | RC80 RC2014 Bus =============|============================|================================ - Pin Signal |Pin Signal Pin Signal |Pin # Signal Pin Signal + Pin Signal |Pin Signal Pin Signal |Pin # Signal Pin Signal =============|============================|================================ - 1 A15 |1 Not used 1 A15 |41 #41 (custom) 1 A15 - 2 A14 |2 Not used 2 A14 |42 #42 (custom) 2 A14 - 3 A13 |3 Not used 3 A13 |43 #43 (custom) 3 A13 - 4 A12 |4 Not used 4 A12 |44 #44 (custom) 4 A12 - 5 A11 |5 Not used 5 A11 |45 #45 (custom) 5 A11 - 6 A10 |6 Not used 6 A10 |46 #46 (custom) 6 A10 - 7 A9 |7 Not used 7 A9 |47 #47 (custom) 7 A9 - 8 A8 |8 Not used 8 A8 |48 #48 (custom) 8 A8 - 9 A7 |9 Not used 9 A7 |49 A23 9 A7 - 10 A6 |10 Not used 10 A6 |50 A22 10 A6 - 11 A5 |11 Not used 11 A5 |51 A21 11 A5 - 12 A4 |12 Not used 12 A4 |52 A20 12 A4 - 13 A3 |13 Not used 13 A3 |53 A19 13 A3 - 14 A2 |14 Not used 14 A2 |54 A18 14 A2 - 15 A1 |15 Not used 15 A1 |55 A17 15 A1 - 16 A0 |16 Not used 16 A0 |56 A16 16 A0 - 17 GND |17 GND 17 GND |57 GND 17 GND - 18 5V |18 5V 18 5V |58 5V 18 5V - 19 /M1 |19 /RFSH 19 /M1 |59 /RFSH 19 /M1 - 20 /RESET |20 PAGE(/RESET2)20 /RESET |60 PAGE 20 /RESET - 21 CLK |21 CLK2 21 CLK |61 CLK2 21 CLK - 22 /INT |22 /BUSAK 22 /INT |62 /BUSAK 22 /INT - 23 /MREQ |23 /HALT 23 /MREQ |63 /HALT 23 /MREQ - 24 /WR |24 /BUSRQ 24 /WR |64 /BUSRQ 24 /WR - 25 /RD |25 /WAIT 25 /RD |65 /WAIT 25 /RD - 26 /IORQ |26 /NMI 26 /IORQ |66 /NMI 26 /IORQ - 27 D0 |27 D8 27 D0 |67 #67 (custom) 27 D0 - 28 D1 |28 D9 28 D1 |68 #68 (custom) 28 D1 - 29 D2 |29 D10 29 D2 |69 #69 (custom) 29 D2 - 30 D3 |30 D11 30 D3 |70 #70 (custom) 30 D3 - 31 D4 |31 D12 31 D4 |71 #71 (custom) 31 D4 - 32 D5 |32 D13 32 D5 |72 #72 (custom) 32 D5 - 33 D6 |33 D14 33 D6 |73 #73 (custom) 33 D6 - 34 D7 |34 D15 34 D7 |74 #74 (custom) 34 D7 - 35 TX |35 TX2 35 TX |75 TX2 35 TX - 36 RX |36 RX2 36 RX |76 RX2 36 RX - 37 USER1 |37 USER5 37 USER1 |77 USER5 37 USER1 - 38 USER2 |38 USER6 38 USER2 |78 USER6 38 USER2 - 39 USER3 |39 USER7 39 USER3 |79 USER7 39 USER3 + 1 A15 |1 Not used 1 A15 |41 #41 (custom) 1 A15 + 2 A14 |2 Not used 2 A14 |42 #42 (custom) 2 A14 + 3 A13 |3 Not used 3 A13 |43 #43 (custom) 3 A13 + 4 A12 |4 Not used 4 A12 |44 #44 (custom) 4 A12 + 5 A11 |5 Not used 5 A11 |45 #45 (custom) 5 A11 + 6 A10 |6 Not used 6 A10 |46 #46 (custom) 6 A10 + 7 A9 |7 Not used 7 A9 |47 #47 (custom) 7 A9 + 8 A8 |8 Not used 8 A8 |48 #48 (custom) 8 A8 + 9 A7 |9 Not used 9 A7 |49 A23 9 A7 + 10 A6 |10 Not used 10 A6 |50 A22 10 A6 + 11 A5 |11 Not used 11 A5 |51 A21 11 A5 + 12 A4 |12 Not used 12 A4 |52 A20 12 A4 + 13 A3 |13 Not used 13 A3 |53 A19 13 A3 + 14 A2 |14 Not used 14 A2 |54 A18 14 A2 + 15 A1 |15 Not used 15 A1 |55 A17 15 A1 + 16 A0 |16 Not used 16 A0 |56 A16 16 A0 + 17 GND |17 GND 17 GND |57 GND 17 GND + 18 5V |18 5V 18 5V |58 5V 18 5V + 19 /M1 |19 /RFSH 19 /M1 |59 /RFSH 19 /M1 + 20 /RESET |20 PAGE(/RESET2)20 /RESET |60 PAGE 20 /RESET + 21 CLK |21 CLK2 21 CLK |61 CLK2 21 CLK + 22 /INT |22 /BUSAK 22 /INT |62 /BUSAK 22 /INT + 23 /MREQ |23 /HALT 23 /MREQ |63 /HALT 23 /MREQ + 24 /WR |24 /BUSRQ 24 /WR |64 /BUSRQ 24 /WR + 25 /RD |25 /WAIT 25 /RD |65 /WAIT 25 /RD + 26 /IORQ |26 /NMI 26 /IORQ |66 /NMI 26 /IORQ + 27 D0 |27 D8 27 D0 |67 #67 (custom) 27 D0 + 28 D1 |28 D9 28 D1 |68 #68 (custom) 28 D1 + 29 D2 |29 D10 29 D2 |69 #69 (custom) 29 D2 + 30 D3 |30 D11 30 D3 |70 #70 (custom) 30 D3 + 31 D4 |31 D12 31 D4 |71 #71 (custom) 31 D4 + 32 D5 |32 D13 32 D5 |72 #72 (custom) 32 D5 + 33 D6 |33 D14 33 D6 |73 #73 (custom) 33 D6 + 34 D7 |34 D15 34 D7 |74 #74 (custom) 34 D7 + 35 TX |35 TX2 35 TX |75 TX2 35 TX + 36 RX |36 RX2 36 RX |76 RX2 36 RX + 37 USER1 |37 USER5 37 USER1 |77 USER5 37 USER1 + 38 USER2 |38 USER6 38 USER2 |78 USER6 38 USER2 + 39 USER3 |39 USER7 39 USER3 |79 USER7 39 USER3 40 USER4 |40 USER8 40 USER4 |80 USER8(IEI) 40 USER4(IEO) =========================================================================== @@ -106,6 +106,7 @@ protected: rc2014_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); // device-level overrides virtual void device_start() override; + virtual void device_reset() override; private: address_space_installer *m_installer[4]; @@ -146,14 +147,14 @@ public: rc2014_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); template <typename T, typename U> - rc2014_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bus_tag, U &&slot_options, char const *default_option) + rc2014_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bus_tag, U &&slot_options, char const *default_option, bool fixed = false) : rc2014_slot_device(mconfig, tag, owner, DERIVED_CLOCK(1,1)) { m_bus.set_tag(std::forward<T>(bus_tag)); option_reset(); slot_options(*this); set_default_option(default_option); - set_fixed(false); + set_fixed(fixed); } protected: @@ -239,14 +240,14 @@ public: rc2014_ext_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); template <typename T, typename U> - rc2014_ext_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bus_tag, U &&slot_options, char const *default_option) + rc2014_ext_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bus_tag, U &&slot_options, char const *default_option, bool fixed = false) : rc2014_ext_slot_device(mconfig, tag, owner, DERIVED_CLOCK(1,1)) { m_bus.set_tag(std::forward<T>(bus_tag)); option_reset(); slot_options(*this); set_default_option(default_option); - set_fixed(false); + set_fixed(fixed); } protected: diff --git a/src/devices/bus/rc2014/rom.cpp b/src/devices/bus/rc2014/rom.cpp index 9e73cd6084e..61d0d8bb191 100644 --- a/src/devices/bus/rc2014/rom.cpp +++ b/src/devices/bus/rc2014/rom.cpp @@ -53,14 +53,14 @@ void switchable_rom_device::device_reset() static INPUT_PORTS_START( switchable_rom_jumpers ) PORT_START("A13-A15") /* jumpers to select ROM region */ PORT_CONFNAME( 0x7, 0x7, "ROM Bank" ) - PORT_CONFSETTING( 0x0, "BASIC" ) - PORT_CONFSETTING( 0x1, "EMPTY1" ) - PORT_CONFSETTING( 0x2, "EMPTY2" ) - PORT_CONFSETTING( 0x3, "EMPTY3" ) - PORT_CONFSETTING( 0x4, "EMPTY4" ) - PORT_CONFSETTING( 0x5, "EMPTY5" ) - PORT_CONFSETTING( 0x6, "EMPTY6" ) - PORT_CONFSETTING( 0x7, "SCM" ) + PORT_CONFSETTING( 0x0, "Bank 0" ) + PORT_CONFSETTING( 0x1, "Bank 1" ) + PORT_CONFSETTING( 0x2, "Bank 2" ) + PORT_CONFSETTING( 0x3, "Bank 3" ) + PORT_CONFSETTING( 0x4, "Bank 4" ) + PORT_CONFSETTING( 0x5, "Bank 5" ) + PORT_CONFSETTING( 0x6, "Bank 6" ) + PORT_CONFSETTING( 0x7, "Bank 7" ) INPUT_PORTS_END ioport_constructor switchable_rom_device::device_input_ports() const @@ -68,14 +68,39 @@ ioport_constructor switchable_rom_device::device_input_ports() const return INPUT_PORTS_NAME( switchable_rom_jumpers ); } -ROM_START(rc2014_rom) +ROM_START(rc2014_switchable_rom) ROM_REGION( 0x10000, "rom",0 ) - ROM_LOAD( "r0000009.bin", 0x0000, 0x10000, CRC(3fb1ced7) SHA1(40a030b931ebe6cca654ce056c228297f245b057) ) + // + // Decoding ROM labels + // + // 0 - Empty bank, available for user to program + // R - Microsoft BASIC, for 32k RAM, 68B50 ACIA, with origin 0x0000 + // K - Microsoft BASIC, for 56k RAM, 68B50 ACIA, with origin 0x0000 + // 1 - CP/M Monitor, for pageable ROM, 64k RAM, 68B50 ACIA, CF Module at 0x10, with origin at 0x0000 + // 2 - Microsoft BASIC, for 32k RAM, SIO/2, with origin 0x0000 + // 4 - Microsoft BASIC, for 56k RAM, SIO/2, with origin 0x0000 + // 6 - CP/M Monitor, for pageable ROM, 64k RAM, SIO/2, CF Module at 0x10, with origin at 0x0000 + // 88 - Small Computer Monitor for pageable ROM, 64k RAM, SIO/2 or 68B50 ACIA, with Microsoft BASIC a + // and CP/M boot options [Note that this is a 16k image, so Page Size needs to be set to 16k and + // only A14 and A15 jumpers to select] + // 9 - Small Computer Monitor for any ROM, any RAM, any UART + // + ROM_DEFAULT_BIOS("r0000009") + ROM_SYSTEM_BIOS(0, "r0000009", "BASIC 32K ACIA + SCM") + ROMX_LOAD( "r0000009.bin", 0x0000, 0x10000, CRC(3fb1ced7) SHA1(40a030b931ebe6cca654ce056c228297f245b057), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "00001000", "CP/M Monitor ACIA") + ROMX_LOAD( "00001000.bin", 0x0000, 0x10000, CRC(e6509de9) SHA1(e5f3b528e972f63cd243bd5057e7e7850436b671), ROM_BIOS(1)) + ROM_SYSTEM_BIOS(2, "k0001000", "BASIC 56K + CP/M Monitor ACIA") + ROMX_LOAD( "k0001000.bin", 0x0000, 0x10000, CRC(619a9c3e) SHA1(c1213316746a6e2a7d2030b283f75c4f3a9c177a), ROM_BIOS(2)) + ROM_SYSTEM_BIOS(3, "r0001000", "BASIC 32K + CP/M Monitor ACIA") + ROMX_LOAD( "r0001000.bin", 0x0000, 0x10000, CRC(5b174833) SHA1(97c204ada65129ef61507faf74e29c8ec7a05064), ROM_BIOS(3)) + ROM_SYSTEM_BIOS(4, "r0001009", "BASIC 32K + CP/M Monitor ACIA + SCM") + ROMX_LOAD( "r0001009.bin", 0x0000, 0x10000, CRC(074a2d70) SHA1(0077ab5e669da6e95ed2f66c9e759067c4236e36), ROM_BIOS(4)) ROM_END const tiny_rom_entry *switchable_rom_device::device_rom_region() const { - return ROM_NAME( rc2014_rom ); + return ROM_NAME( rc2014_switchable_rom ); } //************************************************************************** @@ -123,9 +148,6 @@ pagable_rom_device::pagable_rom_device(const machine_config &mconfig, const char void pagable_rom_device::device_start() { save_item(NAME(m_bank)); - - m_bus->installer(AS_IO)->install_write_handler(0x30, 0x30, write8sm_delegate(*this, FUNC(pagable_rom_device::reset_bank_w))); - m_bus->installer(AS_IO)->install_write_handler(0x38, 0x38, write8sm_delegate(*this, FUNC(pagable_rom_device::toggle_bank_w))); } void pagable_rom_device::device_reset() @@ -144,6 +166,10 @@ void pagable_rom_device::device_reset() m_start_offset &= page_mask[m_page_size_conf->read()]; m_end_addr = page_size[m_page_size_conf->read()] - 1; reset_bank_w(0,0); + + // A15-A8, A7 and A2-A0 not connected, A6 must be 0 + m_bus->installer(AS_IO)->install_write_handler(0x30, 0x30, 0, 0xff87, 0, write8sm_delegate(*this, FUNC(pagable_rom_device::reset_bank_w))); + m_bus->installer(AS_IO)->install_write_handler(0x38, 0x38, 0, 0xff87, 0, write8sm_delegate(*this, FUNC(pagable_rom_device::toggle_bank_w))); } void pagable_rom_device::update_banks() @@ -199,8 +225,27 @@ ioport_constructor pagable_rom_device::device_input_ports() const } ROM_START(rc2014_pagable_rom) + // + // Decoding ROM labels + // + // 0 - Empty bank, available for user to program + // R - Microsoft BASIC, for 32k RAM, 68B50 ACIA, with origin 0x0000 + // K - Microsoft BASIC, for 56k RAM, 68B50 ACIA, with origin 0x0000 + // 1 - CP/M Monitor, for pageable ROM, 64k RAM, 68B50 ACIA, CF Module at 0x10, with origin at 0x0000 + // 2 - Microsoft BASIC, for 32k RAM, SIO/2, with origin 0x0000 + // 4 - Microsoft BASIC, for 56k RAM, SIO/2, with origin 0x0000 + // 6 - CP/M Monitor, for pageable ROM, 64k RAM, SIO/2, CF Module at 0x10, with origin at 0x0000 + // 88 - Small Computer Monitor for pageable ROM, 64k RAM, SIO/2 or 68B50 ACIA, with Microsoft BASIC a + // and CP/M boot options [Note that this is a 16k image, so Page Size needs to be set to 16k and + // only A14 and A15 jumpers to select] + // 9 - Small Computer Monitor for any ROM, any RAM, any UART + // ROM_REGION( 0x10000, "rom",0 ) - ROM_LOAD( "24886009.bin", 0x00000, 0x10000, CRC(2731ca52) SHA1(e9ac663cb85de4e3e041bce444712c00f46b6eb2) ) + ROM_DEFAULT_BIOS("24886009") + ROM_SYSTEM_BIOS(0, "24886009", "BASIC 32K/56K SIO/2 + CP/M + SCM Pagable + SCM") + ROMX_LOAD( "24886009.bin", 0x00000, 0x10000, CRC(2731ca52) SHA1(e9ac663cb85de4e3e041bce444712c00f46b6eb2), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "24006000", "BASIC 32K/56K SIO/2 + CP/M Monitor") + ROMX_LOAD( "24006000.bin", 0x00000, 0x10000, CRC(3532872b) SHA1(ff5b3873abdcbe8ab48f62a9dbdf39314b938e89), ROM_BIOS(1)) ROM_END const tiny_rom_entry *pagable_rom_device::device_rom_region() const diff --git a/src/devices/bus/rc2014/romram.cpp b/src/devices/bus/rc2014/romram.cpp index 6b5c9b7bc66..bc7d0713e2e 100644 --- a/src/devices/bus/rc2014/romram.cpp +++ b/src/devices/bus/rc2014/romram.cpp @@ -8,6 +8,7 @@ #include "emu.h" #include "romram.h" +#include "machine/intelfsh.h" namespace { @@ -25,19 +26,21 @@ public: protected: // device-level overrides virtual void device_start() override; - virtual void device_post_load() override { update_banks(); } + virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; - void page_w(offs_t offset, uint8_t data) { m_page_reg[offset & 3] = data & 0x3f; update_banks(); } - void page_en_w(offs_t, uint8_t data) { m_page_en = data & 1; update_banks(); } + void page_w(offs_t offset, uint8_t data) { m_page_reg[offset & 3] = data & 0x3f; } + void page_en_w(offs_t, uint8_t data) { m_page_en = data & 1; } - void update_banks(); private: + template<uint8_t Bank> void mem_w(offs_t offset, uint8_t data); + template<uint8_t Bank> uint8_t mem_r(offs_t offset); + uint8_t m_page_reg[4]; uint8_t m_page_en; std::unique_ptr<u8[]> m_ram; - required_memory_region m_romram; - memory_bank_array_creator<4> m_bank; + required_device<sst_39sf040_device> m_flash; }; rom_ram_512k_device::rom_ram_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) @@ -46,8 +49,7 @@ rom_ram_512k_device::rom_ram_512k_device(const machine_config &mconfig, const ch , m_page_reg{0,0,0,0} , m_page_en(0) , m_ram(nullptr) - , m_romram(*this, "romram") - , m_bank(*this, "bank%u", 0U) + , m_flash(*this, "flash") { } @@ -59,64 +61,92 @@ void rom_ram_512k_device::device_start() save_item(NAME(m_page_en)); save_item(NAME(m_page_reg)); - // A3 not connected - m_bus->installer(AS_IO)->install_write_handler(0x70, 0x73, 0, 0x08, 0, write8sm_delegate(*this, FUNC(rom_ram_512k_device::page_w))); - // A3, A1 and A0 not connected - m_bus->installer(AS_IO)->install_write_handler(0x74, 0x74, 0, 0x0b, 0, write8sm_delegate(*this, FUNC(rom_ram_512k_device::page_en_w))); + m_bus->installer(AS_PROGRAM)->install_readwrite_handler(0x0000, 0x3fff, 0, 0, 0, read8sm_delegate(*this, FUNC(rom_ram_512k_device::mem_r<0>)), write8sm_delegate(*this, FUNC(rom_ram_512k_device::mem_w<0>))); + m_bus->installer(AS_PROGRAM)->install_readwrite_handler(0x4000, 0x7fff, 0, 0, 0, read8sm_delegate(*this, FUNC(rom_ram_512k_device::mem_r<1>)), write8sm_delegate(*this, FUNC(rom_ram_512k_device::mem_w<1>))); + m_bus->installer(AS_PROGRAM)->install_readwrite_handler(0x8000, 0xbfff, 0, 0, 0, read8sm_delegate(*this, FUNC(rom_ram_512k_device::mem_r<2>)), write8sm_delegate(*this, FUNC(rom_ram_512k_device::mem_w<2>))); + m_bus->installer(AS_PROGRAM)->install_readwrite_handler(0xc000, 0xffff, 0, 0, 0, read8sm_delegate(*this, FUNC(rom_ram_512k_device::mem_r<3>)), write8sm_delegate(*this, FUNC(rom_ram_512k_device::mem_w<3>))); +} - m_bus->installer(AS_PROGRAM)->install_read_bank(0x0000, 0x3fff, m_bank[0]); - m_bus->installer(AS_PROGRAM)->install_read_bank(0x4000, 0x7fff, m_bank[1]); - m_bus->installer(AS_PROGRAM)->install_read_bank(0x8000, 0xbfff, m_bank[2]); - m_bus->installer(AS_PROGRAM)->install_read_bank(0xc000, 0xffff, m_bank[3]); +void rom_ram_512k_device::device_reset() +{ + m_page_en = 0; + m_page_reg[0] = 0; + m_page_reg[1] = 0; + m_page_reg[2] = 0; + m_page_reg[3] = 0; + + // A15-A8 and A3 not connected + m_bus->installer(AS_IO)->install_write_handler(0x70, 0x73, 0, 0xff08, 0, write8sm_delegate(*this, FUNC(rom_ram_512k_device::page_w))); + // A15-A8, A3, A1 and A0 not connected + m_bus->installer(AS_IO)->install_write_handler(0x74, 0x74, 0, 0xff0b, 0, write8sm_delegate(*this, FUNC(rom_ram_512k_device::page_en_w))); +} - update_banks(); +void rom_ram_512k_device::device_add_mconfig(machine_config &config) +{ + SST_39SF040(config, m_flash); } -void rom_ram_512k_device::update_banks() +template<uint8_t Bank> +void rom_ram_512k_device::mem_w(offs_t offset, uint8_t data) { if (m_page_en) { - if (m_page_reg[0] & 0x20) { - m_bank[0]->set_base(m_ram.get() + ((m_page_reg[0] & 0x1f) << 14)); - m_bus->installer(AS_PROGRAM)->install_write_bank(0x0000, 0x3fff, m_bank[0]); + if (m_page_reg[Bank] & 0x20) { + m_ram[offset + ((m_page_reg[Bank] & 0x1f) << 14)] = data; } else { - m_bank[0]->set_base(m_romram->base() + (m_page_reg[0] << 14)); - m_bus->installer(AS_PROGRAM)->unmap_write(0x0000, 0x3fff); - } - if (m_page_reg[1] & 0x20) { - m_bank[1]->set_base(m_ram.get() + ((m_page_reg[1] & 0x1f) << 14)); - m_bus->installer(AS_PROGRAM)->install_write_bank(0x4000, 0x7fff, m_bank[1]); - } else { - m_bank[1]->set_base(m_romram->base() + (m_page_reg[1] << 14)); - m_bus->installer(AS_PROGRAM)->unmap_write(0x4000, 0x7fff); - } - if (m_page_reg[2] & 0x20) { - m_bank[2]->set_base(m_ram.get() + ((m_page_reg[2] & 0x1f) << 14)); - m_bus->installer(AS_PROGRAM)->install_write_bank(0x8000, 0xbfff, m_bank[2]); - } else { - m_bank[2]->set_base(m_romram->base() + (m_page_reg[2] << 14)); - m_bus->installer(AS_PROGRAM)->unmap_write(0x8000, 0xbfff); - } - if (m_page_reg[3] & 0x20) { - m_bank[3]->set_base(m_ram.get() + ((m_page_reg[3] & 0x1f) << 14)); - m_bus->installer(AS_PROGRAM)->install_write_bank(0xc000, 0xffff, m_bank[3]); - } else { - m_bank[3]->set_base(m_romram->base() + (m_page_reg[3] << 14)); - m_bus->installer(AS_PROGRAM)->unmap_write(0xc000, 0xffff); + m_flash->write(offset + (m_page_reg[Bank] << 14), data); } } else { - m_bank[0]->set_base(m_romram->base() + 0x0000); - m_bank[1]->set_base(m_romram->base() + 0x4000); - m_bank[2]->set_base(m_romram->base() + 0x8000); - m_bank[3]->set_base(m_romram->base() + 0xc000); + m_flash->write(offset + (Bank << 14), data); + } +} + +template<uint8_t Bank> +uint8_t rom_ram_512k_device::mem_r(offs_t offset) +{ + if (m_page_en) + { + if ((offset>>14 == 0) && (m_page_reg[Bank] & 0x20)) { + return m_ram[offset + ((m_page_reg[Bank] & 0x1f) << 14)]; + } else { + return m_flash->read(offset + (m_page_reg[Bank] << 14)); + } } + return m_flash->read(offset + (Bank << 14)); } ROM_START(rc2014_rom_ram_512k) - ROM_REGION( 0x80000, "romram", 0) - ROM_LOAD( "rc_2.512k.rom", 0x00000, 0x80000, CRC(c3aefb4e) SHA1(34541851dc781033b00cdfbe445e1d91811da5c2) ) + ROM_REGION( 0x80000, "flash", 0) + ROM_DEFAULT_BIOS("3.0.1") + // Official ROMs distributed with kit + ROM_SYSTEM_BIOS(0, "1.512k", "RomWBW RC_Std.ROM 2.9.1-pre5") + ROMX_LOAD( "rc_1.512k.rom", 0x00000, 0x80000, CRC(f360d908) SHA1(e9c0c79f873eecff9184836025c13915630274c5), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "2.512k", "RomWBW RC_Std.ROM 2.9.1-pre5 With PPIDE") + ROMX_LOAD( "rc_2.512k.rom", 0x00000, 0x80000, CRC(c3aefb4e) SHA1(34541851dc781033b00cdfbe445e1d91811da5c2), ROM_BIOS(1)) + ROM_SYSTEM_BIOS(2, "3.512k", "RomWBW RC_Std.ROM 2.9.1-pre5 With RTC") + ROMX_LOAD( "rc_3.512k.rom", 0x00000, 0x80000, CRC(749f7973) SHA1(2b78bb5ad0595b63c95dc58d48c5144320237362), ROM_BIOS(2)) + ROM_SYSTEM_BIOS(3, "4.512k", "RomWBW RC_Std.ROM 2.9.1-pre5 With PPIDE and RTC") + ROMX_LOAD( "rc_4.512k.rom", 0x00000, 0x80000, CRC(fbe44292) SHA1(ae0407f0a605e9b1262ce00acf393c30fd87d1e4), ROM_BIOS(3)) + ROM_SYSTEM_BIOS(4, "5.512k", "RomWBW RC_Std.ROM 2.9.1-pre5 With WDC Floppy") + ROMX_LOAD( "rc_5.512k.rom", 0x00000, 0x80000, CRC(4e1d00dd) SHA1(57b21ce416a0a23e034c2efdb54f669f4b110878), ROM_BIOS(4)) + ROM_SYSTEM_BIOS(5, "6.512k", "RomWBW RC_Std.ROM 2.9.1-pre5 With WDC Floppy and PPIDE") + ROMX_LOAD( "rc_6.512k.rom", 0x00000, 0x80000, CRC(f2f1535e) SHA1(9121ca4246c520169cca47fda07143de8e903b3e), ROM_BIOS(5)) + ROM_SYSTEM_BIOS(6, "7.512k", "RomWBW RC_Std.ROM 2.9.1-pre5 With WDC Floppy and RTC") + ROMX_LOAD( "rc_7.512k.rom", 0x00000, 0x80000, CRC(57efe210) SHA1(b9ee93215d69c185d5af511a1105ee06e6474ff2), ROM_BIOS(6)) + ROM_SYSTEM_BIOS(7, "8.512k", "RomWBW RC_Std.ROM 2.9.1-pre5 With WDC Floppy, PPIDE and RTC") + ROMX_LOAD( "rc_8.512k.rom", 0x00000, 0x80000, CRC(38cc2dfc) SHA1(6e740224276b9d0ae32bb28095c8a8ccb47c38b5), ROM_BIOS(7)) + // Official distribution of ROMWBW + // Taken from https://github.com/wwarthen/RomWBW/releases + ROM_SYSTEM_BIOS(8, "2.9.0", "Official RomWBW 2.9.0") + ROMX_LOAD( "rc_std_2_9_0.rom", 0x00000, 0x80000, CRC(2045d238) SHA1(dd37c945fd531192b368d80b20b0154e6b2d2a75), ROM_BIOS(8)) + ROM_SYSTEM_BIOS(9, "2.9.1", "Official RomWBW 2.9.1") + ROMX_LOAD( "rcz80_std_2_9_1.rom", 0x00000, 0x80000, CRC(f7c52c5f) SHA1(86a0dbbecfea118cf66f9f35a21f138ce64ae788), ROM_BIOS(9)) + ROM_SYSTEM_BIOS(10, "3.0.0", "Official RomWBW 3.0.0") + ROMX_LOAD( "rcz80_std_3_0_0.rom", 0x00000, 0x80000, CRC(15b802f8) SHA1(0941c6b00ccdca460d64d16fb374c0380dd431ad), ROM_BIOS(10)) + ROM_SYSTEM_BIOS(11, "3.0.1", "Official RomWBW 3.0.1") + ROMX_LOAD( "rcz80_std_3_0_1.rom", 0x00000, 0x80000, CRC(6d6b60c5) SHA1(5c642cb3113bc0a51562dc92c8b46bde414adb6c), ROM_BIOS(11)) ROM_END const tiny_rom_entry *rom_ram_512k_device::device_rom_region() const diff --git a/src/devices/bus/rc2014/rtc.cpp b/src/devices/bus/rc2014/rtc.cpp new file mode 100644 index 00000000000..4e8659c2771 --- /dev/null +++ b/src/devices/bus/rc2014/rtc.cpp @@ -0,0 +1,107 @@ +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic +/*************************************************************************** + + RC2014 Real Time Clock + +****************************************************************************/ + +#include "emu.h" +#include "rtc.h" +#include "machine/ds1302.h" + +namespace { + +//************************************************************************** +// RC2014 Real Time Clock DS1302 module +// Module author: Ed Brindley +//************************************************************************** + +class rc2014_ds1302_device : public device_t, public device_rc2014_card_interface +{ +public: + // construction/destruction + rc2014_ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; + + uint8_t rtc_r(offs_t offset); + void rtc_w(offs_t offset, uint8_t data); +private: + required_device<ds1302_device> m_rtc; + required_ioport m_addr; +}; + +rc2014_ds1302_device::rc2014_ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, RC2014_DS1302_RTC, tag, owner, clock) + , device_rc2014_card_interface(mconfig, *this) + , m_rtc(*this, "rtc") + , m_addr(*this, "SW1") +{ +} + +void rc2014_ds1302_device::device_start() +{ +} + +void rc2014_ds1302_device::device_reset() +{ + // A15-A8, A1 and A0 not connected + m_bus->installer(AS_IO)->install_readwrite_handler(m_addr->read(), m_addr->read(), 0, 0xff03, 0, read8sm_delegate(*this, FUNC(rc2014_ds1302_device::rtc_r)), write8sm_delegate(*this, FUNC(rc2014_ds1302_device::rtc_w))); +} + +void rc2014_ds1302_device::device_add_mconfig(machine_config &config) +{ + DS1302(config, m_rtc, 32.768_kHz_XTAL); +} + +uint8_t rc2014_ds1302_device::rtc_r(offs_t offset) +{ + return m_rtc->io_r() ? 0x01 : 0x00; +} + +void rc2014_ds1302_device::rtc_w(offs_t, uint8_t data) +{ + m_rtc->ce_w(BIT(data,4)); + if (BIT(data,5)==0) m_rtc->io_w(BIT(data,7)); + m_rtc->sclk_w(BIT(data,6)); +} + +static INPUT_PORTS_START( rc2014_ds1302_jumpers ) + PORT_START("SW1") + PORT_DIPNAME(0x04, 0x00, "0x04") PORT_DIPLOCATION("Base Address:1") + PORT_DIPSETTING(0x00, DEF_STR( Off ) ) + PORT_DIPSETTING(0x04, DEF_STR( On ) ) + PORT_DIPNAME(0x08, 0x00, "0x08") PORT_DIPLOCATION("Base Address:2") + PORT_DIPSETTING(0x00, DEF_STR( Off ) ) + PORT_DIPSETTING(0x08, DEF_STR( On ) ) + PORT_DIPNAME(0x10, 0x00, "0x10") PORT_DIPLOCATION("Base Address:3") + PORT_DIPSETTING(0x00, DEF_STR( Off ) ) + PORT_DIPSETTING(0x10, DEF_STR( On ) ) + PORT_DIPNAME(0x20, 0x00, "0x20") PORT_DIPLOCATION("Base Address:4") + PORT_DIPSETTING(0x00, DEF_STR( Off ) ) + PORT_DIPSETTING(0x20, DEF_STR( On ) ) + PORT_DIPNAME(0x40, 0x40, "0x40") PORT_DIPLOCATION("Base Address:5") + PORT_DIPSETTING(0x00, DEF_STR( Off ) ) + PORT_DIPSETTING(0x40, DEF_STR( On ) ) + PORT_DIPNAME(0x80, 0x80, "0x80") PORT_DIPLOCATION("Base Address:6") + PORT_DIPSETTING(0x00, DEF_STR( Off ) ) + PORT_DIPSETTING(0x80, DEF_STR( On ) ) +INPUT_PORTS_END + +ioport_constructor rc2014_ds1302_device::device_input_ports() const +{ + return INPUT_PORTS_NAME( rc2014_ds1302_jumpers ); +} + +} +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(RC2014_DS1302_RTC, device_rc2014_card_interface, rc2014_ds1302_device, "rc2014_ds1302", "RC2014 Real Time Clock DS1302 module") diff --git a/src/devices/bus/rc2014/rtc.h b/src/devices/bus/rc2014/rtc.h new file mode 100644 index 00000000000..025e6cf5363 --- /dev/null +++ b/src/devices/bus/rc2014/rtc.h @@ -0,0 +1,18 @@ +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic +/********************************************************************** + + RC2014 Real Time Clock + +**********************************************************************/ + +#ifndef MAME_BUS_RC2014_RTC_H +#define MAME_BUS_RC2014_RTC_H + +#pragma once + +#include "bus/rc2014/rc2014.h" + +DECLARE_DEVICE_TYPE(RC2014_DS1302_RTC, device_rc2014_card_interface) + +#endif // MAME_BUS_RC2014_RTC_H diff --git a/src/devices/bus/rc2014/serial.cpp b/src/devices/bus/rc2014/serial.cpp index 80bc984579b..1a3eff6a593 100644 --- a/src/devices/bus/rc2014/serial.cpp +++ b/src/devices/bus/rc2014/serial.cpp @@ -28,6 +28,7 @@ public: protected: // device-level overrides virtual void device_start() override; + virtual void device_reset() override; virtual void device_resolve_objects() override; virtual void device_add_mconfig(machine_config &config) override; @@ -46,8 +47,12 @@ serial_io_device::serial_io_device(const machine_config &mconfig, const char *ta void serial_io_device::device_start() { - // A5, A4, A3, A2 and A1 not connected - m_bus->installer(AS_IO)->install_readwrite_handler(0x80, 0x81, 0, 0x3e, 0, read8sm_delegate(*m_acia, FUNC(acia6850_device::read)), write8sm_delegate(*m_acia, FUNC(acia6850_device::write))); +} + +void serial_io_device::device_reset() +{ + // A15-A8 and A5-A1 not connected + m_bus->installer(AS_IO)->install_readwrite_handler(0x80, 0x81, 0, 0xff3e, 0, read8sm_delegate(*m_acia, FUNC(acia6850_device::read)), write8sm_delegate(*m_acia, FUNC(acia6850_device::write))); } void serial_io_device::device_resolve_objects() @@ -58,6 +63,8 @@ void serial_io_device::device_resolve_objects() m_bus->rx_callback().append(m_acia, FUNC(acia6850_device::write_rxd)); } +// JP1 is used to enable power from USB-to-Serial cable + static DEVICE_INPUT_DEFAULTS_START( terminal ) DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_115200 ) DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_115200 ) @@ -115,7 +122,7 @@ protected: dual_serial_base::dual_serial_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, type, tag, owner, clock) , m_clk_portb(0) - , m_portb(*this, "PORTB") + , m_portb(*this, "JP1") , m_sio(*this, "sio") { } @@ -149,10 +156,11 @@ void dual_serial_base::device_add_mconfig(machine_config &config) } static INPUT_PORTS_START( dual_serial_jumpers ) - PORT_START("PORTB") + PORT_START("JP1") PORT_CONFNAME( 0x1, 0x0, "Port B" ) PORT_CONFSETTING( 0x0, "CLK2 (Open)" ) PORT_CONFSETTING( 0x1, "CLK1 (Closed)" ) + // JP2 and JP3 are used to enable power from USB-to-Serial cable INPUT_PORTS_END ioport_constructor dual_serial_base::device_input_ports() const @@ -172,7 +180,7 @@ public: protected: // device-level overrides - virtual void device_start() override; + virtual void device_reset() override; virtual void device_resolve_objects() override; // base-class overrides @@ -187,13 +195,14 @@ dual_serial_device::dual_serial_device(const machine_config &mconfig, const char { } -void dual_serial_device::device_start() +void dual_serial_device::device_reset() { - // A2 not connected - m_bus->installer(AS_IO)->install_readwrite_handler(0x80, 0x80, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::ca_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::ca_w))); - m_bus->installer(AS_IO)->install_readwrite_handler(0x81, 0x81, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::da_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::da_w))); - m_bus->installer(AS_IO)->install_readwrite_handler(0x82, 0x82, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::cb_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::cb_w))); - m_bus->installer(AS_IO)->install_readwrite_handler(0x83, 0x83, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::db_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::db_w))); + dual_serial_base::device_reset(); + // A15-A8 and A2 not connected + m_bus->installer(AS_IO)->install_readwrite_handler(0x80, 0x80, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::ca_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::ca_w))); + m_bus->installer(AS_IO)->install_readwrite_handler(0x81, 0x81, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::da_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::da_w))); + m_bus->installer(AS_IO)->install_readwrite_handler(0x82, 0x82, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::cb_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::cb_w))); + m_bus->installer(AS_IO)->install_readwrite_handler(0x83, 0x83, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::db_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::db_w))); } void dual_serial_device::device_resolve_objects() @@ -221,7 +230,7 @@ public: protected: // device-level overrides - virtual void device_start() override; + virtual void device_reset() override; virtual void device_resolve_objects() override; // base-class overrides @@ -236,13 +245,14 @@ dual_serial_device_40pin::dual_serial_device_40pin(const machine_config &mconfig { } -void dual_serial_device_40pin::device_start() +void dual_serial_device_40pin::device_reset() { - // A2 not connected - m_bus->installer(AS_IO)->install_readwrite_handler(0x80, 0x80, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::ca_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::ca_w))); - m_bus->installer(AS_IO)->install_readwrite_handler(0x81, 0x81, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::da_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::da_w))); - m_bus->installer(AS_IO)->install_readwrite_handler(0x82, 0x82, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::cb_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::cb_w))); - m_bus->installer(AS_IO)->install_readwrite_handler(0x83, 0x83, 0, 0x04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::db_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::db_w))); + dual_serial_base::device_reset(); + // A15-A8 and A2 not connected + m_bus->installer(AS_IO)->install_readwrite_handler(0x80, 0x80, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::ca_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::ca_w))); + m_bus->installer(AS_IO)->install_readwrite_handler(0x81, 0x81, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::da_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::da_w))); + m_bus->installer(AS_IO)->install_readwrite_handler(0x82, 0x82, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::cb_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::cb_w))); + m_bus->installer(AS_IO)->install_readwrite_handler(0x83, 0x83, 0, 0xff04, 0, read8smo_delegate(*m_sio, FUNC(z80sio_device::db_r)), write8smo_delegate(*m_sio, FUNC(z80sio_device::db_w))); } void dual_serial_device_40pin::device_resolve_objects() diff --git a/src/devices/bus/rc2014/sound.cpp b/src/devices/bus/rc2014/sound.cpp new file mode 100644 index 00000000000..204d52f9f6c --- /dev/null +++ b/src/devices/bus/rc2014/sound.cpp @@ -0,0 +1,209 @@ +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic +/*************************************************************************** + + RC2014 Sound + +****************************************************************************/ + +#include "emu.h" +#include "sound.h" +#include "sound/ay8910.h" +#include "speaker.h" + +namespace { + +//************************************************************************** +// RC2014 YM2149F/AY-3-8190 Sound card +// Module author: Ed Brindley +//************************************************************************** + +class rc2014_ym_ay_device : public device_t, public device_rc2014_card_interface +{ +protected: + // construction/destruction + rc2014_ym_ay_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + virtual ioport_constructor device_input_ports() const override; + + // base class members + required_device<ay8910_device> m_psg; + required_ioport_array<6> m_jp; +}; + +rc2014_ym_ay_device::rc2014_ym_ay_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, type, tag, owner, clock) + , device_rc2014_card_interface(mconfig, *this) + , m_psg(*this, "psg") + , m_jp(*this, "JP%u", 1U) +{ +} + +void rc2014_ym_ay_device::device_start() +{ +} + +void rc2014_ym_ay_device::device_reset() +{ + uint16_t base; + uint16_t reg; + // A13-A8 and A0 not connected + uint16_t mask = 0x3f01; + // JP2 - Addressing mode + if (m_jp[1]->read()) + { + base = 0x8000; // A15 for Spectrum mode + mask |= 0x0F00; // A7-A4 are not connected + } + else + { + base = m_jp[3]->read() << 4; // JP4 + base |= m_jp[0]->read() ? 0x10 : 0x00; // JP1 + mask |= 0x8000; // A15 not connected + } + // JP3 - Register mode + switch(m_jp[2]->read()) + { + case 0 : // A14 (Spectrum) + reg = 0x4000; // A14 + mask |= 0x000c; // A2 and A3 not connected + break; + case 1 : // A3 (Base + 8) + reg = 0x0008; // A3 + mask |= 0x4004; // A14 and A2 not connected + break; + default : // A2 (Base + 4) + reg = 0x0004; // A2 + mask |= 0x4008; // A14 and A3 not connected + break; + } + m_bus->installer(AS_IO)->install_write_handler(base, base, 0, mask, 0, write8smo_delegate(m_psg, FUNC(ay8910_device::data_w))); + m_bus->installer(AS_IO)->install_readwrite_handler(base + reg, base + reg, 0, mask, 0, read8smo_delegate(m_psg, FUNC(ay8910_device::data_r)), write8smo_delegate(m_psg, FUNC(ay8910_device::address_w))); + // JP5 - Clock divider + m_psg->set_clock(clock() / m_jp[4]->read()); +} + +static INPUT_PORTS_START( rc2014_ym_ay_jumpers ) + PORT_START("JP1") // JP1 and JP7 + PORT_CONFNAME( 0x1, 0x1, "A4 Chip Enable" ) + PORT_CONFSETTING( 0x0, "Low" ) + PORT_CONFSETTING( 0x1, "High" ) + PORT_START("JP2") + PORT_CONFNAME( 0x1, 0x0, "Addressing mode" ) + PORT_CONFSETTING( 0x0, "Default" ) + PORT_CONFSETTING( 0x1, "Spectrum 128" ) + PORT_START("JP3") + PORT_CONFNAME( 0x3, 0x1, "Register mode" ) + PORT_CONFSETTING( 0x0, "A14 (Spectrum)" ) + PORT_CONFSETTING( 0x1, "A3 (Base + 8)" ) + PORT_CONFSETTING( 0x2, "A2 (Base + 4)" ) + PORT_START("JP4") + PORT_CONFNAME( 0xf, 0xc, "Base Address" ) + PORT_CONFSETTING( 0x0, "0x00 / 0x10" ) + PORT_CONFSETTING( 0x8, "0x80 / 0x90" ) + PORT_CONFSETTING( 0x4, "0x40 / 0x50" ) + PORT_CONFSETTING( 0xc, "0xC0 / 0xD0" ) + PORT_CONFSETTING( 0x2, "0x20 / 0x30" ) + PORT_CONFSETTING( 0xa, "0xA0 / 0xB0" ) + PORT_CONFSETTING( 0x6, "0x60 / 0x70" ) + PORT_CONFSETTING( 0xe, "0xE0 / 0xF0" ) + PORT_START("JP5") + PORT_CONFNAME( 0x7, 0x4, "Divide by" ) + PORT_CONFSETTING( 0x2, "2" ) + PORT_CONFSETTING( 0x4, "4" ) + PORT_START("JP6") + PORT_CONFNAME( 0x1, 0x0, "YM2149 half clock" ) + PORT_CONFSETTING( 0x0, DEF_STR( No ) ) + PORT_CONFSETTING( 0x1, DEF_STR( Yes ) ) +INPUT_PORTS_END + +ioport_constructor rc2014_ym_ay_device::device_input_ports() const +{ + return INPUT_PORTS_NAME( rc2014_ym_ay_jumpers ); +} + +//************************************************************************** +// With YM2149F chip +//************************************************************************** + +class rc2014_ym2149_device : public rc2014_ym_ay_device +{ +public: + // construction/destruction + rc2014_ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // device-level overrides + virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; +}; + +rc2014_ym2149_device::rc2014_ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : rc2014_ym_ay_device(mconfig, RC2014_YM2149_SOUND, tag, owner, clock) +{ +} + +void rc2014_ym2149_device::device_reset() +{ + rc2014_ym_ay_device::device_reset(); + // JP6 - YM2149 half clock + if (m_jp[5]->read()) + { + m_psg->set_pin26_low_w(); + } +} + +void rc2014_ym2149_device::device_add_mconfig(machine_config &config) +{ + SPEAKER(config, "lspeaker").front_left(); + SPEAKER(config, "rspeaker").front_right(); + + YM2149(config, m_psg, 0); + m_psg->add_route(0, "rspeaker", 0.25); + m_psg->add_route(2, "rspeaker", 0.25); + m_psg->add_route(1, "lspeaker", 0.25); + m_psg->add_route(2, "lspeaker", 0.25); +} + +//************************************************************************** +// With AY-3-8190 chip +//************************************************************************** + +class rc2014_ay8190_device : public rc2014_ym_ay_device +{ +public: + // construction/destruction + rc2014_ay8190_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // device-level overrides + virtual void device_add_mconfig(machine_config &config) override; +}; + +rc2014_ay8190_device::rc2014_ay8190_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : rc2014_ym_ay_device(mconfig, RC2014_AY8190_SOUND, tag, owner, clock) +{ +} + +void rc2014_ay8190_device::device_add_mconfig(machine_config &config) +{ + SPEAKER(config, "lspeaker").front_left(); + SPEAKER(config, "rspeaker").front_right(); + + AY8910(config, m_psg, 0); + m_psg->add_route(0, "rspeaker", 0.25); + m_psg->add_route(2, "rspeaker", 0.25); + m_psg->add_route(1, "lspeaker", 0.25); + m_psg->add_route(2, "lspeaker", 0.25); +} + +} +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE_PRIVATE(RC2014_YM2149_SOUND, device_rc2014_card_interface, rc2014_ym2149_device, "rc2014_ym2149", "RC2014 YM2149F Sound card") +DEFINE_DEVICE_TYPE_PRIVATE(RC2014_AY8190_SOUND, device_rc2014_card_interface, rc2014_ay8190_device, "rc2014_ay8190", "RC2014 AY-3-8190 Sound card") diff --git a/src/devices/bus/rc2014/sound.h b/src/devices/bus/rc2014/sound.h new file mode 100644 index 00000000000..a00a0e01654 --- /dev/null +++ b/src/devices/bus/rc2014/sound.h @@ -0,0 +1,19 @@ +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic +/********************************************************************** + + RC2014 Sound + +**********************************************************************/ + +#ifndef MAME_BUS_RC2014_SOUND_H +#define MAME_BUS_RC2014_SOUND_H + +#pragma once + +#include "bus/rc2014/rc2014.h" + +DECLARE_DEVICE_TYPE(RC2014_YM2149_SOUND, device_rc2014_card_interface) +DECLARE_DEVICE_TYPE(RC2014_AY8190_SOUND, device_rc2014_card_interface) + +#endif // MAME_BUS_RC2014_SOUND_H diff --git a/src/devices/bus/rc2014/z80cpu.cpp b/src/devices/bus/rc2014/z80cpu.cpp index 35991f2fad5..9723c947e2e 100644 --- a/src/devices/bus/rc2014/z80cpu.cpp +++ b/src/devices/bus/rc2014/z80cpu.cpp @@ -27,8 +27,8 @@ protected: virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; - void addrmap_mem(address_map &map); - void addrmap_io(address_map &map); + void addrmap_mem(address_map &map) { map.unmap_value_high(); } + void addrmap_io(address_map &map) { map.unmap_value_high(); } // object finders required_device<z80_device> m_maincpu; @@ -44,17 +44,6 @@ void z80cpu_base::device_start() { } -void z80cpu_base::addrmap_mem(address_map &map) -{ - map.unmap_value_high(); -} - -void z80cpu_base::addrmap_io(address_map &map) -{ - map.unmap_value_high(); - map.global_mask(0xff); -} - void z80cpu_base::device_add_mconfig(machine_config &config) { Z80(config, m_maincpu, DERIVED_CLOCK(1,1)); diff --git a/src/devices/cpu/m68hc16/cpu16.cpp b/src/devices/cpu/m68hc16/cpu16.cpp index d1096ff91b6..e8c7b6f36df 100644 --- a/src/devices/cpu/m68hc16/cpu16.cpp +++ b/src/devices/cpu/m68hc16/cpu16.cpp @@ -4,7 +4,20 @@ Motorola MC68HC16/CPU16 emulation - Currently this device is just a stub with no actual execution core. + Motorola's description of the internal organization of this CPU defines + PC, IX, IY, IZ and SP as 16-bit registers, though a 4-bit extension for + each is also provided, usually in either CCR or K. However, most + address arithmetic does involve full 20-bit calculations. Accordingly, + PC, SP and the index registers have been made 20-bit variables here to + simplify emulation and make debugging more convenient, and the 16 bits + of K are not stored together but packed and unpacked for PSHM, PULM + and debugging. (Adding to the confusion is that the typical CPU16 bus + interface uses 24-bit physical addresses, with or without a MMU.) + + The execution core is currently somewhat incomplete. 16-bit memory + shifting instructions, indexed jump instructions, extended divisions + and the MAC unit are not yet supported. Interrupts have also not been + implemented yet. ***************************************************************************/ @@ -12,6 +25,158 @@ #include "cpu16.h" #include "cpu16dasm.h" + +enum class cpu16_device::seq : u16 +{ + BOOT_0, BOOT_1, BOOT_2, BOOT_3, + INVALID, + PREFETCH_1, PREFETCH_2, + STORE8_EA, STORE8_EXT, + STORE16_EA, STORE16_EXT, + ABA, + ABX, + ADDA_IND8, ADDA_IND8_2, ADDA_IND8_3, ADDA_IMM8, ADDA_IND16, ADDA_IND16_2, ADDA_IND16_3, ADDA_EXT, ADDA_INDE, ADDA_INDE_2, ADDA_INDE_3, + ADDB_IND8, ADDB_IND8_2, ADDB_IND8_3, ADDB_IMM8, ADDB_IND16, ADDB_IND16_2, ADDB_IND16_3, ADDB_EXT, ADDB_INDE, ADDB_INDE_2, ADDB_INDE_3, + ADDD_IND8, ADDD_IND8_2, ADDD_IND8_2B, ADDD_IND8_3, ADDD_IMM8, ADDD_IMM16, ADDD_IND16, ADDD_IND16_2, ADDD_IND16_2B, ADDD_IND16_3, ADDD_EXT, ADDD_INDE, ADDD_INDE_2, ADDD_INDE_2B, ADDD_INDE_3, + ADDE_IMM8, ADDE_IMM16, ADDE_IND16, ADDE_IND16_2, ADDE_IND16_2B, ADDE_IND16_3, ADDE_EXT, + ADE, + ADX, + AEX, + AIX_IMM8, AIX_IMM16, + ANDA_IND8, ANDA_IND8_2, ANDA_IND8_3, ANDA_IMM8, ANDA_IND16, ANDA_IND16_2, ANDA_IND16_3, ANDA_EXT, ANDA_INDE, + ANDB_IND8, ANDB_IND8_2, ANDB_IND8_3, ANDB_IMM8, ANDB_IND16, ANDB_IND16_2, ANDB_IND16_3, ANDB_EXT, ANDB_INDE, + ANDD_IND8, ANDD_IND8_2, ANDD_IND8_2B, ANDD_IND8_3, ANDD_IMM16, ANDD_IND16, ANDD_IND16_2, ANDD_IND16_2B, ANDD_IND16_3, ANDD_EXT, ANDD_INDE, + ANDE_IMM16, ANDE_IND16, ANDE_IND16_2, ANDE_IND16_2B, ANDE_IND16_3, ANDE_EXT, + ANDP, + ASR_IND8, ASR_IND8_2, ASR_IND8_3, ASR_IND16, ASR_IND16_2, ASR_IND16_3, ASR_EXT, + ASRA, + ASRB, + ASRD, + ASRE, + BCLR_IND16, BCLR_IND16_2, BCLR_IND16_3, BCLR_EXT, BCLR_IND8, BCLR_IND8_2, BCLR_IND8_3, + BCLRW_IND16, BCLRW_IND16_2, BCLRW_IND16_2B, BCLRW_IND16_3, BCLRW_EXT, + BITA_IND8, BITA_IND8_2, BITA_IND8_3, BITA_IMM8, BITA_IND16, BITA_IND16_2, BITA_IND16_3, BITA_EXT, BITA_INDE, + BITB_IND8, BITB_IND8_2, BITB_IND8_3, BITB_IMM8, BITB_IND16, BITB_IND16_2, BITB_IND16_3, BITB_EXT, BITB_INDE, + BCC, + BRSET_IND8, BRSET_IND8_2, BRSET_IND8_3, BRSET_IND8_4, BRSET_IND16, BRSET_IND16_2, BRSET_IND16_3, BRSET_EXT, + BSET_IND16, BSET_IND16_2, BSET_IND16_3, BSET_EXT, BSET_IND8, BSET_IND8_2, BSET_IND8_3, + BSETW_IND16, BSETW_IND16_2, BSETW_IND16_2B, BSETW_IND16_3, BSETW_EXT, + BSR, BSR_2, BSR_2B, BSR_3, BSR_3B, + CBA, + CLR_IND8, CLR_IND16, CLR_EXT, + CLRA, + CLRB, + CLRD, + CLRE, + CLRM, + CLRW_IND16, CLRW_EXT, + CMPA_IND8, CMPA_IND8_2, CMPA_IND8_3, CMPA_IMM8, CMPA_IND16, CMPA_IND16_2, CMPA_IND16_3, CMPA_EXT, CMPA_INDE, + CMPB_IND8, CMPB_IND8_2, CMPB_IND8_3, CMPB_IMM8, CMPB_IND16, CMPB_IND16_2, CMPB_IND16_3, CMPB_EXT, CMPB_INDE, + CPD_IND8, CPD_IND8_2, CPD_IND8_2B, CPD_IND8_3, CPD_IMM16, CPD_IND16, CPD_IND16_2, CPD_IND16_2B, CPD_IND16_3, CPD_EXT, CPD_INDE, + CPE_IMM16, CPE_IND16, CPE_IND16_2, CPE_IND16_2B, CPE_IND16_3, CPE_EXT, + CPX_IND8, CPX_IND8_2, CPX_IND8_2B, CPX_IND8_3, CPX_IMM16, CPX_IND16, CPX_IND16_2, CPX_IND16_2B, CPX_IND16_3, CPX_EXT, + DAA, + DEC_IND8, DEC_IND8_2, DEC_IND8_3, DEC_IND16, DEC_IND16_2, DEC_IND16_3, DEC_EXT, + DECA, + DECB, + DECW_IND16, DECW_IND16_2, DECW_IND16_2B, DECW_IND16_3, DECW_EXT, + DIV, DIV_2, DIV_3, DIV_4, DIV_5, DIV_6, DIV_7, DIV_8, DIV_9, DIV_10, DIV_11, + EMUL, EMUL_2, EMUL_3, EMUL_4, EMUL_5, + EMULS, EMULS_2, EMULS_3, EMULS_4, + EORA_IND8, EORA_IND8_2, EORA_IND8_3, EORA_IMM8, EORA_IND16, EORA_IND16_2, EORA_IND16_3, EORA_EXT, EORA_INDE, + EORB_IND8, EORB_IND8_2, EORB_IND8_3, EORB_IMM8, EORB_IND16, EORB_IND16_2, EORB_IND16_3, EORB_EXT, EORB_INDE, + EORD_IND8, EORD_IND8_2, EORD_IND8_2B, EORD_IND8_3, EORD_IMM16, EORD_IND16, EORD_IND16_2, EORD_IND16_2B, EORD_IND16_3, EORD_EXT, EORD_INDE, + EORE_IMM16, EORE_IND16, EORE_IND16_2, EORE_IND16_2B, EORE_IND16_3, EORE_EXT, + INC_IND8, INC_IND8_2, INC_IND8_3, INC_IND16, INC_IND16_2, INC_IND16_3, INC_EXT, + INCA, + INCB, + INCW_IND16, INCW_IND16_2, INCW_IND16_2B, INCW_IND16_3, INCW_EXT, + JMP_EXT20, + JSR_EXT20, JSR_EXT20_2, JSR_EXT20_2B, JSR_EXT20_3, JSR_EXT20_3B, + LBCC, + LBSR, LBSR_2, LBSR_2B, LBSR_3, LBSR_3B, + LDAA_IND8, LDAA_IND8_2, LDAA_IND8_3, LDAA_IMM8, LDAA_IND16, LDAA_IND16_2, LDAA_IND16_3, LDAA_EXT, LDAA_INDE, + LDAB_IND8, LDAB_IND8_2, LDAB_IND8_3, LDAB_IMM8, LDAB_IND16, LDAB_IND16_2, LDAB_IND16_3, LDAB_EXT, LDAB_INDE, + LDD_IND8, LDD_IND8_2, LDD_IND8_2B, LDD_IND8_3, LDD_IMM16, LDD_IND16, LDD_IND16_2, LDD_IND16_2B, LDD_IND16_3, LDD_EXT, LDD_INDE, + LDE_IMM16, LDE_IND16, LDE_IND16_2, LDE_IND16_2B, LDE_IND16_3, LDE_EXT, + LDED, LDED_2, LDED_2B, LDED_3, LDED_3B, LDED_4, + LDHI, LDHI_2, LDHI_2B, LDHI_3, LDHI_3B, LDHI_4, + LDX_IND8, LDX_IND8_2, LDX_IND8_2B, LDX_IND8_3, LDX_IMM16, LDX_IND16, LDX_IND16_2, LDX_IND16_2B, LDX_IND16_3, LDX_EXT, + MOVB_IXP_EXT, MOVB_IXP_EXT_2, MOVB_IXP_EXT_3, MOVB_EXT_IXP, MOVB_EXT_IXP_2, MOVB_EXT_IXP_3, MOVB_EXT_EXT, MOVB_EXT_EXT_2, MOVB_EXT_EXT_3, + MOVW_IXP_EXT, MOVW_IXP_EXT_2, MOVW_IXP_EXT_2B, MOVW_IXP_EXT_3, MOVW_EXT_IXP, MOVW_EXT_IXP_2, MOVW_EXT_IXP_2B, MOVW_EXT_IXP_3, MOVW_EXT_EXT, MOVW_EXT_EXT_2, MOVW_EXT_EXT_2B, MOVW_EXT_EXT_3, + MUL, MUL_2, MUL_3, MUL_4, MUL_5, + NEG_IND8, NEG_IND8_2, NEG_IND8_3, NEG_IND16, NEG_IND16_2, NEG_IND16_3, NEG_EXT, + NEGA, + NEGB, + NEGD, + NEGE, + NEGW_IND16, NEGW_IND16_2, NEGW_IND16_2B, NEGW_IND16_3, NEGW_EXT, + ORAA_IND8, ORAA_IND8_2, ORAA_IND8_3, ORAA_IMM8, ORAA_IND16, ORAA_IND16_2, ORAA_IND16_3, ORAA_EXT, ORAA_INDE, + ORAB_IND8, ORAB_IND8_2, ORAB_IND8_3, ORAB_IMM8, ORAB_IND16, ORAB_IND16_2, ORAB_IND16_3, ORAB_EXT, ORAB_INDE, + ORD_IND8, ORD_IND8_2, ORD_IND8_2B, ORD_IND8_3, ORD_IMM16, ORD_IND16, ORD_IND16_2, ORD_IND16_2B, ORD_IND16_3, ORD_EXT, ORD_INDE, + ORE_IMM16, ORE_IND16, ORE_IND16_2, ORE_IND16_2B, ORE_IND16_3, ORE_EXT, + ORP, + PSHA, PSHA_2, + PSHB, + PSHM, PSHM_0, PSHM_1, PSHM_2, PSHM_3, PSHM_4, PSHM_5, PSHM_6, PSHM_8, PSHM_0B, PSHM_1B, PSHM_2B, PSHM_3B, PSHM_4B, PSHM_5B, PSHM_6B, + PULA, PULA_2, PULA_3, + PULB, PULB_2, PULB_3, + PULM, PULM_0, PULM_1, PULM_2, PULM_3, PULM_4, PULM_5, PULM_6, PULM_7, PULM_8, PULM_0B, PULM_1B, PULM_2B, PULM_3B, PULM_4B, PULM_5B, PULM_6B, PULM_7B, + ROL_IND8, ROL_IND8_2, ROL_IND8_3, ROL_IND16, ROL_IND16_2, ROL_IND16_3, ROL_EXT, + ROLA, + ROLB, + ROLD, + ROLE, + ROR_IND8, ROR_IND8_2, ROR_IND8_3, ROR_IND16, ROR_IND16_2, ROR_IND16_3, ROR_EXT, + RORA, + RORB, + RORD, + RORE, + RTS, RTS_2, RTS_2B, RTS_3, RTS_3B, RTS_4, + SBA, + SDE, + STAA_IND8, STAA_IND16, STAA_EXT, STAA_INDE, + STAB_IND8, STAB_IND16, STAB_EXT, STAB_INDE, + STD_IND8, STD_IND16, STD_EXT, STD_INDE, + STE_IND16, STE_EXT, + STED, STED_2, STED_2B, + STX_IND8, STX_IND16, STX_EXT, + SUBA_IND8, SUBA_IND8_2, SUBA_IND8_3, SUBA_IMM8, SUBA_IND16, SUBA_IND16_2, SUBA_IND16_3, SUBA_EXT, SUBA_INDE, SUBA_INDE_2, SUBA_INDE_3, + SUBB_IND8, SUBB_IND8_2, SUBB_IND8_3, SUBB_IMM8, SUBB_IND16, SUBB_IND16_2, SUBB_IND16_3, SUBB_EXT, SUBB_INDE, SUBB_INDE_2, SUBB_INDE_3, + SUBD_IND8, SUBD_IND8_2, SUBD_IND8_2B, SUBD_IND8_3, SUBD_IMM16, SUBD_IND16, SUBD_IND16_2, SUBD_IND16_2B, SUBD_IND16_3, SUBD_EXT, SUBD_INDE, SUBD_INDE_2, SUBD_INDE_2B, SUBD_INDE_3, + SUBE_IMM16, SUBE_IND16, SUBE_IND16_2, SUBE_IND16_2B, SUBE_IND16_3, SUBE_EXT, + SXT, + TAB, + TAP, + TBA, + TBEK, + TBXK, + TDE, + TDMSK, + TDP, + TED, + TEKB, + TPA, + TPD, + TST_IND8, TST_IND8_2, TST_IND8_3, TST_IND16, TST_IND16_2, TST_IND16_3, TST_EXT, + TSTA, + TSTB, + TSTD, + TSTE, + TSTW_IND16, TSTW_IND16_2, TSTW_IND16_2B, TSTW_IND16_3, TSTW_EXT, + TSX, + TXKB, + TXS, + TXX, + XGAB, + XGDE, + XGDX, + XGEX +}; + +ALLOW_SAVE_TYPE(cpu16_device::seq) + + // device type definition DEFINE_DEVICE_TYPE(MC68HC16Z1, mc68hc16z1_device, "mc68hc16z1", "Motorola MC68HC16Z1") @@ -26,22 +191,30 @@ cpu16_device::cpu16_device(const machine_config &mconfig, device_type type, cons , m_d(0) , m_e(0) , m_ek(0) - , m_index_regs{0, 0, 0} - , m_sp(0) + , m_index_regs{0, 0, 0, 0} , m_hr(0) , m_ir(0) , m_am(0) , m_sl(false) , m_index_mask{0, 0} + , m_sequence(seq::BOOT_0) + , m_ea(0) + , m_tmp(0) + , m_start(false) , m_icount(0) { } mc68hc16z1_device::mc68hc16z1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : cpu16_device(mconfig, MC68HC16Z1, tag, owner, clock, address_map_constructor(/* TODO */)) + : cpu16_device(mconfig, MC68HC16Z1, tag, owner, clock, address_map_constructor(FUNC(mc68hc16z1_device::internal_map), this)) { } +void mc68hc16z1_device::internal_map(address_map &map) +{ + map(0xfe000, 0xfe3ff).ram(); // FIXME: this is relocatable +} + std::unique_ptr<util::disasm_interface> cpu16_device::create_disassembler() { return std::make_unique<cpu16_disassembler>(); @@ -49,22 +222,30 @@ std::unique_ptr<util::disasm_interface> cpu16_device::create_disassembler() device_memory_interface::space_config_vector cpu16_device::memory_space_config() const { - return space_config_vector { - std::make_pair(AS_PROGRAM, &m_program_config), - std::make_pair(AS_DATA, &m_data_config), - }; + if (has_configured_map(AS_DATA)) + return space_config_vector { + std::make_pair(AS_PROGRAM, &m_program_config), + std::make_pair(AS_DATA, &m_data_config), + }; + else + return space_config_vector { + std::make_pair(AS_PROGRAM, &m_program_config), + }; } void cpu16_device::debug_set_pcbase(u32 value) { m_fwa = value; - debug_set_pc((value + 6) & 0xffffe); - // TODO: prefetch + set_pc(value + 4); + + // Fake prefetch operations + m_fetch_pipe[2] = m_cache.read_word(m_fwa); + m_fetch_pipe[1] = m_cache.read_word(m_fwa + 2); } -void cpu16_device::debug_set_pc(u32 value) +void cpu16_device::set_pc(u32 value) noexcept { - m_pc = value; + m_pc = value & 0xffffe; m_ccr = (m_ccr & 0xfff0) | (value & 0xf0000) >> 16; } @@ -90,6 +271,36 @@ void cpu16_device::set_k(u16 value) noexcept m_index_regs[2] = u32(value & 0x000f) << 16 | (m_index_regs[2] & 0x0ffff); } +u16 cpu16_device::get_ix(int which) const noexcept +{ + return m_index_regs[which] & 0x0ffff; +} + +void cpu16_device::set_ix(int which, u16 value) noexcept +{ + m_index_regs[which] = (m_index_regs[which] & 0xf0000) | value; +} + +u8 cpu16_device::get_xk(int which) const noexcept +{ + return (m_index_regs[which] & 0xf0000) << 16; +} + +void cpu16_device::set_xk(int which, u8 value) noexcept +{ + m_index_regs[which] = u32(value & 0xf) << 16 | (m_index_regs[which] & 0x0ffff); +} + +void cpu16_device::set_a(u8 value) noexcept +{ + m_d = u16(value) << 8 | (m_d & 0x00ff); +} + +void cpu16_device::set_b(u8 value) noexcept +{ + m_d = (m_d & 0xff00) | value; +} + void cpu16_device::device_start() { space(AS_PROGRAM).cache(m_cache); @@ -101,35 +312,35 @@ void cpu16_device::device_start() state_add(CPU16_FWA, "FWA", m_fwa, std::bind(&cpu16_device::debug_set_pcbase, this, _1)).mask(0xffffe); state_add(CPU16_IPIPEC, "IPIPEC", m_fetch_pipe[2]); state_add(CPU16_IPIPEB, "IPIPEB", m_fetch_pipe[1]); - state_add(CPU16_IPIPEA, "IPIPEA", m_fetch_pipe[0]); + //state_add(CPU16_IPIPEA, "IPIPEA", m_fetch_pipe[0]); state_add(CPU16_D, "D", m_d); state_add<u8>(CPU16_A, "A", [this]() { return (m_d & 0xff00) >> 8; }, - [this](u8 value) { m_d = (m_d & 0x00ff) | u16(value) << 8; }).noshow(); + std::bind(&cpu16_device::set_a, this, _1)).noshow(); state_add<u8>(CPU16_B, "B", [this]() { return m_d & 0x00ff; }, - [this](u8 value) { m_d = (m_d & 0xff00) | value; }).noshow(); + std::bind(&cpu16_device::set_b, this, _1)).noshow(); state_add(CPU16_E, "E", m_e); + state_add(CPU16_EK, "EK", m_ek).mask(0xf); for (int i = 0; i < 3; i++) { state_add(CPU16_X + i, util::string_format("%c", 'X' + i).c_str(), m_index_regs[i]).mask(0xfffff); state_add<u16>(CPU16_IX + i, util::string_format("I%c", 'X' + i).c_str(), - [this, i]() { return m_index_regs[i] & 0x0ffff; }, - [this, i](u16 value) { m_index_regs[i] = (m_index_regs[i] & 0xf0000) | value; }).noshow(); + std::bind(&cpu16_device::get_ix, this, i), + std::bind(&cpu16_device::set_ix, this, i, _1)).noshow(); state_add<u8>(CPU16_XK + i, util::string_format("%cK", 'X' + i).c_str(), - [this, i]() { return (m_index_regs[i] & 0xf0000) >> 16; }, - [this, i](u8 value) { m_index_regs[i] = (m_index_regs[i] & 0x0ffff) | u32(value) << 16; }).mask(0xf).noshow(); + std::bind(&cpu16_device::get_xk, this, i), + std::bind(&cpu16_device::set_xk, this, i, _1)).mask(0xf).noshow(); } - state_add(CPU16_SP, "SP", m_sp).mask(0xfffff); + state_add(CPU16_SP, "SP", m_index_regs[3]).mask(0xfffff); state_add<u8>(CPU16_SK, "SK", - [this]() { return (m_sp & 0xf0000) >> 16; }, - [this](u8 value) { m_sp = (m_sp & 0x0ffff) | u32(value) << 16; }).mask(0xf).noshow(); - state_add(CPU16_PC, "PC", m_pc, std::bind(&cpu16_device::debug_set_pc, this, _1)).mask(0xffffe); - state_add(STATE_GENPC, "GENPC", m_pc, std::bind(&cpu16_device::debug_set_pc, this, _1)).mask(0xffffe).noshow(); + [this]() { return (m_index_regs[3] & 0xf0000) >> 16; }, + [this](u8 value) { m_index_regs[3] = (m_index_regs[3] & 0x0ffff) | u32(value) << 16; }).mask(0xf).noshow(); + state_add(CPU16_PC, "PC", m_pc, std::bind(&cpu16_device::set_pc, this, _1)).mask(0xffffe); + state_add(STATE_GENPC, "GENPC", m_pc, std::bind(&cpu16_device::set_pc, this, _1)).mask(0xffffe).noshow(); state_add(STATE_GENPCBASE, "CURPC", m_fwa, std::bind(&cpu16_device::debug_set_pcbase, this, _1)).mask(0xffffe).noshow(); state_add(CPU16_CCR, "CCR", m_ccr, std::bind(&cpu16_device::debug_set_ccr, this, _1)); state_add(STATE_GENFLAGS, "CURFLAGS", m_ccr, std::bind(&cpu16_device::debug_set_ccr, this, _1)).noshow().formatstr("%13s"); - state_add(CPU16_EK, "EK", m_ek).mask(0xf); state_add<u16>(CPU16_K, "K", std::bind(&cpu16_device::get_k, this), std::bind(&cpu16_device::set_k, this, _1)).noshow(); state_add(CPU16_HR, "HR", m_hr); state_add(CPU16_IR, "IR", m_ir); @@ -145,35 +356,5684 @@ void cpu16_device::device_start() save_item(NAME(m_e)); save_item(NAME(m_ek)); save_item(NAME(m_index_regs)); - save_item(NAME(m_sp)); save_item(NAME(m_pc)); save_item(NAME(m_hr)); save_item(NAME(m_ir)); save_item(NAME(m_am)); save_item(NAME(m_sl)); save_item(NAME(m_index_mask)); + save_item(NAME(m_sequence)); + save_item(NAME(m_ea)); + save_item(NAME(m_tmp)); + save_item(NAME(m_start)); } void cpu16_device::device_reset() { m_ccr = 0x80e0 | (m_ccr & 0x7f00); // IP, S, SM initialized - for (u32 &i : m_index_regs) - i &= 0x0ffff; - m_ek = 0; + set_k(0); + + m_sequence = seq::BOOT_0; + m_start = false; +} + +const cpu16_device::seq cpu16_device::s_inst_decode[4][256] = +{ + // Page 0 + { + // 0X-3X + seq::NEG_IND8, seq::DEC_IND8, seq::NEG_IND8, seq::INC_IND8, seq::ROL_IND8, seq::CLR_IND8, seq::TST_IND8, seq::INVALID, + seq::BCLR_IND16, seq::BSET_IND16, seq::BRSET_IND16, seq::BRSET_IND16, seq::ROL_IND8, seq::ASR_IND8, seq::ROR_IND8, seq::ROR_IND8, + seq::NEG_IND8, seq::DEC_IND8, seq::NEG_IND8, seq::INC_IND8, seq::ROL_IND8, seq::CLR_IND8, seq::TST_IND8, seq::INVALID, + seq::BCLR_IND16, seq::BSET_IND16, seq::BRSET_IND16, seq::BRSET_IND16, seq::ROL_IND8, seq::ASR_IND8, seq::ROR_IND8, seq::ROR_IND8, + seq::NEG_IND8, seq::DEC_IND8, seq::NEG_IND8, seq::INC_IND8, seq::ROL_IND8, seq::CLR_IND8, seq::TST_IND8, seq::INVALID, + seq::BCLR_IND16, seq::BSET_IND16, seq::BRSET_IND16, seq::BRSET_IND16, seq::ROL_IND8, seq::ASR_IND8, seq::ROR_IND8, seq::ROR_IND8, + seq::MOVB_IXP_EXT, seq::MOVW_IXP_EXT, seq::MOVB_EXT_IXP, seq::MOVW_EXT_IXP, seq::PSHM, seq::PULM, seq::BSR, seq::INVALID, + seq::BCLR_EXT, seq::BSET_EXT, seq::BRSET_EXT, seq::BRSET_EXT, seq::AIX_IMM8, seq::AIX_IMM8, seq::AIX_IMM8, seq::AIX_IMM8, + + // 4X-7X + seq::SUBA_IND8, seq::ADDA_IND8, seq::SUBA_IND8, seq::ADDA_IND8, seq::EORA_IND8, seq::LDAA_IND8, seq::ANDA_IND8, seq::ORAA_IND8, + seq::CMPA_IND8, seq::BITA_IND8, seq::STAA_IND8, seq::INVALID, seq::CPX_IND8, seq::CPX_IND8, seq::CPX_IND8, seq::CPX_IND8, + seq::SUBA_IND8, seq::ADDA_IND8, seq::SUBA_IND8, seq::ADDA_IND8, seq::EORA_IND8, seq::LDAA_IND8, seq::ANDA_IND8, seq::ORAA_IND8, + seq::CMPA_IND8, seq::BITA_IND8, seq::STAA_IND8, seq::INVALID, seq::CPX_IND8, seq::CPX_IND8, seq::CPX_IND8, seq::CPX_IND8, + seq::SUBA_IND8, seq::ADDA_IND8, seq::SUBA_IND8, seq::ADDA_IND8, seq::EORA_IND8, seq::LDAA_IND8, seq::ANDA_IND8, seq::ORAA_IND8, + seq::CMPA_IND8, seq::BITA_IND8, seq::STAA_IND8, seq::INVALID, seq::CPX_IND8, seq::CPX_IND8, seq::CPX_IND8, seq::CPX_IND8, + seq::SUBA_IMM8, seq::ADDA_IMM8, seq::SUBA_IMM8, seq::ADDA_IMM8, seq::EORA_IMM8, seq::LDAA_IMM8, seq::ANDA_IMM8, seq::ORAA_IMM8, + seq::CMPA_IMM8, seq::BITA_IMM8, seq::JMP_EXT20, seq::INVALID, seq::ADDE_IMM8, seq::INVALID, seq::INVALID, seq::INVALID, + + // AX-BX + seq::SUBD_IND8, seq::ADDD_IND8, seq::SUBD_IND8, seq::ADDD_IND8, seq::EORD_IND8, seq::LDD_IND8, seq::ANDD_IND8, seq::ORD_IND8, + seq::CPD_IND8, seq::INVALID, seq::STD_IND8, seq::BRSET_IND8, seq::STX_IND8, seq::STX_IND8, seq::STX_IND8, seq::STX_IND8, + seq::SUBD_IND8, seq::ADDD_IND8, seq::SUBD_IND8, seq::ADDD_IND8, seq::EORD_IND8, seq::LDD_IND8, seq::ANDD_IND8, seq::ORD_IND8, + seq::CPD_IND8, seq::INVALID, seq::STD_IND8, seq::BRSET_IND8, seq::STX_IND8, seq::STX_IND8, seq::STX_IND8, seq::STX_IND8, + seq::SUBD_IND8, seq::ADDD_IND8, seq::SUBD_IND8, seq::ADDD_IND8, seq::EORD_IND8, seq::LDD_IND8, seq::ANDD_IND8, seq::ORD_IND8, + seq::CPD_IND8, seq::INVALID, seq::STD_IND8, seq::BRSET_IND8, seq::STX_IND8, seq::STX_IND8, seq::STX_IND8, seq::STX_IND8, + seq::BCC, seq::BCC, seq::BCC, seq::BCC, seq::BCC, seq::BCC, seq::BCC, seq::BCC, + seq::BCC, seq::BCC, seq::BCC, seq::BCC, seq::BCC, seq::BCC, seq::BCC, seq::BCC, + + // CX-FX + seq::SUBB_IND8, seq::ADDB_IND8, seq::SUBB_IND8, seq::ADDB_IND8, seq::EORB_IND8, seq::LDAB_IND8, seq::ANDB_IND8, seq::ORAB_IND8, + seq::CMPB_IND8, seq::BITB_IND8, seq::STAB_IND8, seq::BRSET_IND8, seq::LDX_IND8, seq::LDX_IND8, seq::LDX_IND8, seq::LDX_IND8, + seq::SUBB_IND8, seq::ADDB_IND8, seq::SUBB_IND8, seq::ADDB_IND8, seq::EORB_IND8, seq::LDAB_IND8, seq::ANDB_IND8, seq::ORAB_IND8, + seq::CMPB_IND8, seq::BITB_IND8, seq::STAB_IND8, seq::BRSET_IND8, seq::LDX_IND8, seq::LDX_IND8, seq::LDX_IND8, seq::LDX_IND8, + seq::SUBB_IND8, seq::ADDB_IND8, seq::SUBB_IND8, seq::ADDB_IND8, seq::EORB_IND8, seq::LDAB_IND8, seq::ANDB_IND8, seq::ORAB_IND8, + seq::CMPB_IND8, seq::BITB_IND8, seq::STAB_IND8, seq::BRSET_IND8, seq::LDX_IND8, seq::LDX_IND8, seq::LDX_IND8, seq::LDX_IND8, + seq::SUBB_IMM8, seq::ADDB_IMM8, seq::SUBB_IND8, seq::ADDB_IMM8, seq::EORB_IMM8, seq::LDAB_IMM8, seq::ANDB_IMM8, seq::ORAB_IMM8, + seq::CMPB_IMM8, seq::BITB_IMM8, seq::JSR_EXT20, seq::INVALID, seq::ADDD_IMM8, seq::INVALID, seq::INVALID, seq::INVALID + }, + + // Page 1 + { + // 170X-173X + seq::NEG_IND16, seq::DEC_IND16, seq::NEG_IND16, seq::INC_IND16, seq::ROL_IND16, seq::CLR_IND16, seq::TST_IND16, seq::INVALID, + seq::BCLR_IND8, seq::BSET_IND8, seq::INVALID, seq::INVALID, seq::ROL_IND16, seq::ASR_IND16, seq::ROR_IND16, seq::ROR_IND16, + seq::NEG_IND16, seq::DEC_IND16, seq::NEG_IND16, seq::INC_IND16, seq::ROL_IND16, seq::CLR_IND16, seq::TST_IND16, seq::INVALID, + seq::BCLR_IND8, seq::BSET_IND8, seq::INVALID, seq::INVALID, seq::ROL_IND16, seq::ASR_IND16, seq::ROR_IND16, seq::ROR_IND16, + seq::NEG_IND16, seq::DEC_IND16, seq::NEG_IND16, seq::INC_IND16, seq::ROL_IND16, seq::CLR_IND16, seq::TST_IND16, seq::INVALID, + seq::BCLR_IND8, seq::BSET_IND8, seq::INVALID, seq::INVALID, seq::ROL_IND16, seq::ASR_IND16, seq::ROR_IND16, seq::ROR_IND16, + seq::NEG_EXT, seq::DEC_EXT, seq::NEG_EXT, seq::INC_EXT, seq::ROL_EXT, seq::CLR_EXT, seq::TST_EXT, seq::INVALID, + seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::ROL_EXT, seq::ASR_EXT, seq::ROR_EXT, seq::ROR_EXT, + + // 174X-177X + seq::SUBA_IND16, seq::ADDA_IND16, seq::SUBA_IND16, seq::ADDA_IND16, seq::EORA_IND16, seq::LDAA_IND16, seq::ANDA_IND16, seq::ORAA_IND16, + seq::CMPA_IND16, seq::BITA_IND16, seq::STAA_IND16, seq::INVALID, seq::CPX_IND16, seq::CPX_IND16, seq::CPX_IND16, seq::CPX_IND16, + seq::SUBA_IND16, seq::ADDA_IND16, seq::SUBA_IND16, seq::ADDA_IND16, seq::EORA_IND16, seq::LDAA_IND16, seq::ANDA_IND16, seq::ORAA_IND16, + seq::CMPA_IND16, seq::BITA_IND16, seq::STAA_IND16, seq::INVALID, seq::CPX_IND16, seq::CPX_IND16, seq::CPX_IND16, seq::CPX_IND16, + seq::SUBA_IND16, seq::ADDA_IND16, seq::SUBA_IND16, seq::ADDA_IND16, seq::EORA_IND16, seq::LDAA_IND16, seq::ANDA_IND16, seq::ORAA_IND16, + seq::CMPA_IND16, seq::BITA_IND16, seq::STAA_IND16, seq::INVALID, seq::CPX_IND16, seq::CPX_IND16, seq::CPX_IND16, seq::CPX_IND16, + seq::SUBA_EXT, seq::ADDA_EXT, seq::SUBA_EXT, seq::ADDA_EXT, seq::EORA_EXT, seq::LDAA_EXT, seq::ANDA_EXT, seq::ORAA_EXT, + seq::CMPA_EXT, seq::BITA_EXT, seq::STAA_EXT, seq::INVALID, seq::CPX_EXT, seq::CPX_EXT, seq::CPX_EXT, seq::CPX_EXT, + + // 178X-17BX + seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::STX_IND16, seq::STX_IND16, seq::STX_IND16, seq::STX_IND16, + seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::STX_IND16, seq::STX_IND16, seq::STX_IND16, seq::STX_IND16, + seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::STX_IND16, seq::STX_IND16, seq::STX_IND16, seq::STX_IND16, + seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::STX_EXT, seq::STX_EXT, seq::STX_EXT, seq::STX_EXT, + + // 17CX-17FX + seq::SUBB_IND16, seq::ADDB_IND16, seq::SUBB_IND16, seq::ADDB_IND16, seq::EORB_IND16, seq::LDAB_IND16, seq::ANDB_IND16, seq::ORAB_IND16, + seq::CMPB_IND16, seq::BITB_IND16, seq::STAB_IND16, seq::INVALID, seq::LDX_IND16, seq::LDX_IND16, seq::LDX_IND16, seq::LDX_IND16, + seq::SUBB_IND16, seq::ADDB_IND16, seq::SUBB_IND16, seq::ADDB_IND16, seq::EORB_IND16, seq::LDAB_IND16, seq::ANDB_IND16, seq::ORAB_IND16, + seq::CMPB_IND16, seq::BITB_IND16, seq::STAB_IND16, seq::INVALID, seq::LDX_IND16, seq::LDX_IND16, seq::LDX_IND16, seq::LDX_IND16, + seq::SUBB_IND16, seq::ADDB_IND16, seq::SUBB_IND16, seq::ADDB_IND16, seq::EORB_IND16, seq::LDAB_IND16, seq::ANDB_IND16, seq::ORAB_IND16, + seq::CMPB_IND16, seq::BITB_IND16, seq::STAB_IND16, seq::INVALID, seq::LDX_IND16, seq::LDX_IND16, seq::LDX_IND16, seq::LDX_IND16, + seq::SUBB_EXT, seq::ADDB_EXT, seq::SUBB_EXT, seq::ADDB_EXT, seq::EORB_EXT, seq::LDAB_EXT, seq::ANDB_EXT, seq::ORAB_EXT, + seq::CMPB_EXT, seq::BITB_EXT, seq::STAB_EXT, seq::INVALID, seq::LDX_EXT, seq::LDX_EXT, seq::LDX_EXT, seq::LDX_EXT + }, + + // Page 2 + { + // 270X-273X + seq::NEGW_IND16, seq::DECW_IND16, seq::NEGW_IND16, seq::INCW_IND16, seq::INVALID, seq::CLRW_IND16, seq::TSTW_IND16, seq::INVALID, + seq::BCLRW_IND16, seq::BSETW_IND16, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::NEGW_IND16, seq::DECW_IND16, seq::NEGW_IND16, seq::INCW_IND16, seq::INVALID, seq::CLRW_IND16, seq::TSTW_IND16, seq::INVALID, + seq::BCLRW_IND16, seq::BSETW_IND16, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::NEGW_IND16, seq::DECW_IND16, seq::NEGW_IND16, seq::INCW_IND16, seq::INVALID, seq::CLRW_IND16, seq::TSTW_IND16, seq::INVALID, + seq::BCLRW_IND16, seq::BSETW_IND16, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::NEGW_EXT, seq::DECW_EXT, seq::NEGW_EXT, seq::INCW_EXT, seq::INVALID, seq::CLRW_EXT, seq::TSTW_EXT, seq::INVALID, + seq::BCLRW_EXT, seq::BSETW_EXT, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + + // 274X-277X + seq::SUBA_INDE, seq::ADDA_INDE, seq::SUBA_INDE, seq::ADDA_INDE, seq::EORA_INDE, seq::LDAA_INDE, seq::ANDA_INDE, seq::ORAA_INDE, + seq::CMPA_INDE, seq::BITA_INDE, seq::STAA_INDE, seq::INVALID, seq::TXX, seq::TXX, seq::TXX, seq::TSX, + seq::SUBA_INDE, seq::ADDA_INDE, seq::SUBA_INDE, seq::ADDA_INDE, seq::EORA_INDE, seq::LDAA_INDE, seq::ANDA_INDE, seq::ORAA_INDE, + seq::CMPA_INDE, seq::BITA_INDE, seq::STAA_INDE, seq::INVALID, seq::TXX, seq::INVALID, seq::TXX, seq::TSX, + seq::SUBA_INDE, seq::ADDA_INDE, seq::SUBA_INDE, seq::ADDA_INDE, seq::EORA_INDE, seq::LDAA_INDE, seq::ANDA_INDE, seq::ORAA_INDE, + seq::CMPA_INDE, seq::BITA_INDE, seq::STAA_INDE, seq::INVALID, seq::TXX, seq::TXX, seq::INVALID, seq::TSX, + seq::NEGE, seq::LDED, seq::NEGE, seq::STED, seq::ROLE, seq::CLRE, seq::TSTE, seq::INVALID, + seq::ADE, seq::SDE, seq::XGDE, seq::TDE, seq::ROLE, seq::ASRE, seq::RORE, seq::RORE, + + // 278X-27BX + seq::SUBD_INDE, seq::ADDD_INDE, seq::SUBD_INDE, seq::ADDD_INDE, seq::EORD_INDE, seq::LDD_INDE, seq::ANDD_INDE, seq::ORD_INDE, + seq::CPD_INDE, seq::INVALID, seq::STD_INDE, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::SUBD_INDE, seq::ADDD_INDE, seq::SUBD_INDE, seq::ADDD_INDE, seq::EORD_INDE, seq::LDD_INDE, seq::ANDD_INDE, seq::ORD_INDE, + seq::CPD_INDE, seq::INVALID, seq::STD_INDE, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::SUBD_INDE, seq::ADDD_INDE, seq::SUBD_INDE, seq::ADDD_INDE, seq::EORD_INDE, seq::LDD_INDE, seq::ANDD_INDE, seq::ORD_INDE, + seq::CPD_INDE, seq::INVALID, seq::STD_INDE, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::LDHI, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::CLRM, + seq::INVALID, seq::INVALID, seq::INVALID, seq::TEKB, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + + // 27CX-27FX + seq::SUBB_INDE, seq::ADDB_INDE, seq::SUBB_INDE, seq::ADDB_INDE, seq::EORB_INDE, seq::LDAB_INDE, seq::ANDB_INDE, seq::ORAB_INDE, + seq::CMPB_INDE, seq::BITB_INDE, seq::STAB_INDE, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::SUBB_INDE, seq::ADDB_INDE, seq::SUBB_INDE, seq::ADDB_INDE, seq::EORB_INDE, seq::LDAB_INDE, seq::ANDB_INDE, seq::ORAB_INDE, + seq::CMPB_INDE, seq::BITB_INDE, seq::STAB_INDE, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::SUBB_INDE, seq::ADDB_INDE, seq::SUBB_INDE, seq::ADDB_INDE, seq::EORB_INDE, seq::LDAB_INDE, seq::ANDB_INDE, seq::ORAB_INDE, + seq::CMPB_INDE, seq::BITB_INDE, seq::STAB_INDE, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::NEGD, seq::INVALID, seq::NEGD, seq::INVALID, seq::ROLD, seq::CLRD, seq::TSTD, seq::RTS, + seq::SXT, seq::LBSR, seq::TBEK, seq::TDE, seq::ROLD, seq::ASRD, seq::RORD, seq::RORD + }, + + // Page 3 + { + // 370X-373X + seq::NEGA, seq::DECA, seq::NEGA, seq::INCA, seq::ROLA, seq::CLRA, seq::TSTA, seq::TBA, + seq::PSHA, seq::PULA, seq::SBA, seq::ABA, seq::ROLA, seq::ASRA, seq::RORA, seq::RORA, + seq::NEGB, seq::DECB, seq::NEGB, seq::INCB, seq::ROLB, seq::CLRB, seq::TSTB, seq::TAB, + seq::PSHB, seq::PULB, seq::XGAB, seq::CBA, seq::ROLB, seq::ASRB, seq::RORB, seq::RORB, + seq::INVALID, seq::DAA, seq::INVALID, seq::INVALID, seq::MUL, seq::EMUL, seq::EMULS, seq::EMULS, + seq::INVALID, seq::INVALID, seq::DIV, seq::DIV, seq::TPD, seq::TDP, seq::INVALID, seq::TDMSK, + seq::SUBE_IMM16, seq::ADDE_IMM16, seq::SUBE_IMM16, seq::ADDE_IMM16, seq::EORE_IMM16, seq::LDE_IMM16, seq::ANDE_IMM16, seq::ORE_IMM16, + seq::CPE_IMM16, seq::INVALID, seq::ANDP, seq::ORP, seq::AIX_IMM16, seq::AIX_IMM16, seq::AIX_IMM16, seq::AIX_IMM16, + + // 374X-377X + seq::SUBE_IND16, seq::ADDE_IND16, seq::SUBE_IND16, seq::ADDE_IND16, seq::EORE_IND16, seq::LDE_IND16, seq::ANDE_IND16, seq::ORE_IND16, + seq::CPE_IND16, seq::INVALID, seq::STE_IND16, seq::INVALID, seq::XGEX, seq::AEX, seq::TXS, seq::ABX, + seq::SUBE_IND16, seq::ADDE_IND16, seq::SUBE_IND16, seq::ADDE_IND16, seq::EORE_IND16, seq::LDE_IND16, seq::ANDE_IND16, seq::ORE_IND16, + seq::CPE_IND16, seq::INVALID, seq::STE_IND16, seq::INVALID, seq::XGEX, seq::AEX, seq::TXS, seq::ABX, + seq::SUBE_IND16, seq::ADDE_IND16, seq::SUBE_IND16, seq::ADDE_IND16, seq::EORE_IND16, seq::LDE_IND16, seq::ANDE_IND16, seq::ORE_IND16, + seq::CPE_IND16, seq::INVALID, seq::STE_IND16, seq::INVALID, seq::XGEX, seq::AEX, seq::TXS, seq::ABX, + seq::SUBE_EXT, seq::ADDE_EXT, seq::SUBE_EXT, seq::ADDE_EXT, seq::EORE_EXT, seq::LDE_EXT, seq::ANDE_EXT, seq::ORE_EXT, + seq::CPE_EXT, seq::INVALID, seq::STE_EXT, seq::INVALID, seq::CPX_IMM16, seq::CPX_IMM16, seq::CPX_IMM16, seq::CPX_IMM16, + + // 378X-37BX + seq::LBCC, seq::LBCC, seq::LBCC, seq::LBCC, seq::LBCC, seq::LBCC, seq::LBCC, seq::LBCC, + seq::LBCC, seq::LBCC, seq::LBCC, seq::LBCC, seq::LBCC, seq::LBCC, seq::LBCC, seq::LBCC, + seq::LBCC, seq::LBCC, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::TBXK, seq::TBXK, seq::TBXK, seq::TBXK, + seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, + seq::INVALID, seq::INVALID, seq::INVALID, seq::INVALID, seq::TXKB, seq::TXKB, seq::TXKB, seq::TXKB, + seq::SUBD_IMM16, seq::ADDD_IMM16, seq::SUBD_IMM16, seq::ADDD_IMM16, seq::EORD_IMM16, seq::LDD_IMM16, seq::ANDD_IMM16, seq::ORD_IMM16, + seq::CPD_IMM16, seq::INVALID, seq::INVALID, seq::INVALID, seq::LDX_IMM16, seq::LDX_IMM16, seq::LDX_IMM16, seq::LDX_IMM16, + + // 37CX-37FX + seq::SUBD_IND16, seq::ADDD_IND16, seq::SUBD_IND16, seq::ADDD_IND16, seq::EORD_IND16, seq::LDD_IND16, seq::ANDD_IND16, seq::ORD_IND16, + seq::CPD_IND16, seq::INVALID, seq::STD_IND16, seq::INVALID, seq::XGDX, seq::ADX, seq::INVALID, seq::INVALID, + seq::SUBD_IND16, seq::ADDD_IND16, seq::SUBD_IND16, seq::ADDD_IND16, seq::EORD_IND16, seq::LDD_IND16, seq::ANDD_IND16, seq::ORD_IND16, + seq::CPD_IND16, seq::INVALID, seq::STD_IND16, seq::INVALID, seq::XGDX, seq::ADX, seq::INVALID, seq::INVALID, + seq::SUBD_IND16, seq::ADDD_IND16, seq::SUBD_IND16, seq::ADDD_IND16, seq::EORD_IND16, seq::LDD_IND16, seq::ANDD_IND16, seq::ORD_IND16, + seq::CPD_IND16, seq::INVALID, seq::STD_IND16, seq::INVALID, seq::XGDX, seq::ADX, seq::INVALID, seq::INVALID, + seq::SUBD_EXT, seq::ADDD_EXT, seq::SUBD_EXT, seq::ADDD_EXT, seq::EORD_EXT, seq::LDD_EXT, seq::ANDD_EXT, seq::ORD_EXT, + seq::CPD_EXT, seq::INVALID, seq::STD_EXT, seq::INVALID, seq::TPA, seq::TAP, seq::MOVB_EXT_EXT, seq::MOVW_EXT_EXT + } +}; + +void cpu16_device::advance() noexcept +{ + if (m_start) + { + m_fetch_pipe[2] = m_fetch_pipe[1]; + m_fwa = m_pc - 2; + } + m_fetch_pipe[1] = m_fetch_pipe[0]; + m_pc = (m_pc + 2) & 0xfffff; + if ((m_pc & 0x0ffff) == 0) + m_ccr = (m_ccr & 0xfff0) | (m_pc >> 16); +} + +void cpu16_device::set_nzv8(u8 data, bool v) noexcept +{ + m_ccr = (m_ccr & 0xf1ff) | (s8(data) < 0 ? 0x0800 : 0) | (data == 0 ? 0x0400 : 0) | (v ? 0x0200 : 0); +} + +void cpu16_device::set_nzv16(u16 data, bool v) noexcept +{ + m_ccr = (m_ccr & 0xf1ff) | (s16(data) < 0 ? 0x0800 : 0) | (data == 0 ? 0x0400 : 0) | (v ? 0x0200 : 0); +} + +void cpu16_device::set_z16(u16 data) noexcept +{ + m_ccr = (m_ccr & 0xfbff) | (data == 0 ? 0x0400 : 0); +} + +u8 cpu16_device::adc8(u8 data1, u8 data2, bool cin) noexcept +{ + // 8-bit additions set the half carry flag as well as NZVC + s8 result = data1 + data2 + (cin ? 1 : 0); + m_ccr = (m_ccr & 0xd0ff) + | ((data1 & 0x0f) + (data2 & 0x0f) + (cin ? 1 : 0) > 0x0f ? 0x2000 : 0) + | (result < 0 ? 0x0800 : 0) + | (result == 0 ? 0x0400 : 0) + | ((s8(data2) < 0 ? s8(data1) < 0 && result >= 0 : s8(data1) >= 0 && result < 0) ? 0x0200 : 0) + | (data1 >= (cin ? 0x100 : 0xff) - data2 ? 0x0100 : 0); + return result; +} + +u8 cpu16_device::sbc8(u8 data1, u8 data2, bool cin) noexcept +{ + s8 result = data1 - data2 - (cin ? 1 : 0); + m_ccr = (m_ccr & 0xf0ff) + | (result < 0 ? 0x0800 : 0) + | (result == 0 ? 0x0400 : 0) + | ((s8(data2) >= 0 ? s8(data1) < 0 && result >= 0 : s8(data1) >= 0 && result < 0) ? 0x0200 : 0) + | (data1 < data2 + (cin ? 1 : 0) ? 0x0100 : 0); + return result; +} + +u16 cpu16_device::adc16(u16 data1, u16 data2, bool cin) noexcept +{ + s16 result = data1 + data2 + (cin ? 1 : 0); + m_ccr = (m_ccr & 0xf0ff) + | (result < 0 ? 0x0800 : 0) + | (result == 0 ? 0x0400 : 0) + | ((s16(data2) < 0 ? s16(data1) < 0 && result >= 0 : s16(data1) >= 0 && result < 0) ? 0x0200 : 0) + | (data1 >= (cin ? 0x10000 : 0xffff) - data2 ? 0x0100 : 0); + return result; +} + +u16 cpu16_device::sbc16(u16 data1, u16 data2, bool cin) noexcept +{ + s16 result = data1 - data2 - (cin ? 1 : 0); + m_ccr = (m_ccr & 0xf0ff) + | (result < 0 ? 0x0800 : 0) + | (result == 0 ? 0x0400 : 0) + | ((s16(data2) >= 0 ? s16(data1) < 0 && result >= 0 : s16(data1) >= 0 && result < 0) ? 0x0200 : 0) + | (data1 < data2 + (cin ? 1 : 0) ? 0x0100 : 0); + return result; +} + +u8 cpu16_device::rol8(u8 data, bool cin) noexcept +{ + u8 result = (data << 1) | (cin ? 1 : 0); + m_ccr = (m_ccr & 0xf0ff) + | (BIT(result, 7) ? 0x0800 : 0) + | (result == 0 ? 0x0400 : 0) + | (BIT(data ^ result, 7) ? 0x0200 : 0) + | (BIT(data, 7) ? 0x0100 : 0); + return result; +} + +u16 cpu16_device::rol16(u16 data, bool cin) noexcept +{ + u16 result = (data << 1) | (cin ? 1 : 0); + m_ccr = (m_ccr & 0xf0ff) + | (BIT(result, 15) ? 0x0800 : 0) + | (result == 0 ? 0x0400 : 0) + | (BIT(data ^ result, 15) ? 0x0200 : 0) + | (BIT(data, 15) ? 0x0100 : 0); + return result; +} + +u8 cpu16_device::ror8(u8 data, bool cin) noexcept +{ + u8 result = (data >> 1) | (cin ? 0x80 : 0); + m_ccr = (m_ccr & 0xf0ff) + | (BIT(result, 7) ? 0x0800 : 0) + | (result == 0 ? 0x0400 : 0) + | (BIT(data, 0) != BIT(result, 7) ? 0x0200 : 0) + | (BIT(data, 0) ? 0x0100 : 0); + return result; +} + +u16 cpu16_device::ror16(u16 data, bool cin) noexcept +{ + u16 result = (data >> 1) | (cin ? 0x8000 : 0); + m_ccr = (m_ccr & 0xf0ff) + | (BIT(result, 15) ? 0x0800 : 0) + | (result == 0 ? 0x0400 : 0) + | (BIT(data, 0) != BIT(result, 7) ? 0x0200 : 0) + | (BIT(data, 0) ? 0x0100 : 0); + return result; +} + +u8 cpu16_device::asr8(u8 data) noexcept +{ + u8 result = (data >> 1) | (data & 0x80); + m_ccr = (m_ccr & 0xf0ff) + | (BIT(result, 7) ? 0x0800 : 0) + | (result == 0 ? 0x0400 : 0) + | (BIT(data, 0) != BIT(result, 7) ? 0x0200 : 0) + | (BIT(data, 0) ? 0x0100 : 0); + return result; +} + +u16 cpu16_device::asr16(u16 data) noexcept +{ + u16 result = (data >> 1) | (data & 0x8000); + m_ccr = (m_ccr & 0xf0ff) + | (BIT(result, 15) ? 0x0800 : 0) + | (result == 0 ? 0x0400 : 0) + | (BIT(data, 0) != BIT(result, 7) ? 0x0200 : 0) + | (BIT(data, 0) ? 0x0100 : 0); + return result; +} + +void cpu16_device::mulu8() noexcept +{ + // 8×8 → 16-bit unsigned multiply, setting C to permit rounding into A + m_d = (m_d & 0x00ff) * ((m_d >> 8) & 0x00ff); + if (BIT(m_d, 7)) + m_ccr |= 0x0100; + else + m_ccr &= 0xfeff; +} + +void cpu16_device::mulu16() noexcept +{ + // 16×16 → 32-bit unsigned multiply, setting N, Z and C according to result + u32 prod = u32(m_d) * u32(m_e); + m_ccr = (m_ccr & 0xf2ff) + | (BIT(prod, 31) ? 0x0800 : 0) + | (prod == 0 ? 0x0400 : 0) + | (BIT(prod, 15) ? 0x0100 : 0); + + // Product is stored in E:D + m_e = prod >> 16; + m_d = prod & 0xffff; +} + +void cpu16_device::muls16(bool frac) noexcept +{ + // 16×16 → 32-bit signed multiply, setting N, Z and C according to result + s32 prod = s32(s16(m_d)) * s32(s16(m_e)); + m_ccr = (m_ccr & 0xf2ff) + | (prod < 0 ? 0x0800 : 0) + | (prod == 0 ? 0x0400 : 0) + | (BIT(prod, 15) ? 0x0100 : 0); + + // Optional adjustment for fractional mode + if (frac) + { + // Set V flag if -1.0 × -1.0 = -1.0 + if (prod == 0x40000000) + m_ccr |= 0x0200; + else + m_ccr &= 0xfdff; + prod <<= 1; + } + + // Product is stored in E:D + m_e = prod >> 16; + m_d = prod & 0xffff; +} + +void cpu16_device::divu16(bool frac) noexcept +{ + u16 divisor = get_ix(0); + if (divisor <= (frac ? m_d : 0)) + { + // Division by zero or fractional quotient ≥ 1.0 + m_ccr = (m_ccr & 0xf8ff) + | (frac ? 0x0200 : 0) + | (divisor == 0 ? 0x0100 : 0); + m_index_regs[0] = 0xffff; + // D is officially indeterminate, so leave it alone + } + else + { + if (frac) + { + set_ix(0, (u32(m_d) << 16) / divisor); + m_d = (u32(m_d) << 16) % divisor; + } + else + { + set_ix(0, m_d / divisor); + m_d %= divisor; + } + + // Set Z flag if quotient is zero; clear V and C + m_ccr = (m_ccr & 0xf8ff) | (get_ix(0) == 0 ? 0x0400 : 0); + } +} + +void cpu16_device::pshm_step(int n) +{ + switch (n) + { + case 0: + if (BIT(m_fetch_pipe[2], 0)) + { + m_sequence = seq::PSHM_0; + m_tmp = m_d; + break; + } + [[fallthrough]]; + + case 1: + if (BIT(m_fetch_pipe[2], 1)) + { + m_sequence = seq::PSHM_1; + m_tmp = m_e; + break; + } + [[fallthrough]]; + + case 2: + if (BIT(m_fetch_pipe[2], 2)) + { + m_sequence = seq::PSHM_2; + m_tmp = get_ix(0); + break; + } + [[fallthrough]]; + + case 3: + if (BIT(m_fetch_pipe[2], 3)) + { + m_sequence = seq::PSHM_3; + m_tmp = get_ix(1); + break; + } + [[fallthrough]]; + + case 4: + if (BIT(m_fetch_pipe[2], 4)) + { + m_sequence = seq::PSHM_4; + m_tmp = get_ix(2); + break; + } + [[fallthrough]]; + + case 5: + if (BIT(m_fetch_pipe[2], 5)) + { + m_sequence = seq::PSHM_5; + m_tmp = get_k(); + break; + } + [[fallthrough]]; + + case 6: + if (BIT(m_fetch_pipe[2], 6)) + { + m_sequence = seq::PSHM_6; + m_tmp = m_ccr; + break; + } + [[fallthrough]]; + + default: + m_sequence = seq::PSHM_8; + break; + } +} + +void cpu16_device::pulm_step(int n) +{ + while (n < 8 && !BIT(m_fetch_pipe[2], n)) + ++n; + + switch (n) + { + case 0: + m_ccr = (m_tmp & 0xfff0) | (m_ccr & 0x000f); + m_sequence = seq::PULM_1; + break; + + case 1: + set_k(m_tmp); + m_sequence = seq::PULM_2; + break; + + case 2: + set_ix(2, m_tmp); + m_sequence = seq::PULM_3; + break; + + case 3: + set_ix(1, m_tmp); + m_sequence = seq::PULM_4; + break; + + case 4: + set_ix(0, m_tmp); + m_sequence = seq::PULM_5; + break; + + case 5: + m_e = m_tmp; + m_sequence = seq::PULM_6; + break; + + case 6: + m_d = m_tmp; + m_sequence = seq::PULM_7; + break; + + default: + m_sequence = seq::PULM_8; + break; + } +} + +bool cpu16_device::cc_test(u8 cc) const noexcept +{ + switch (cc) + { + case 0x00: + // Unary: always (1) + return true; + + case 0x01: default: + // Unary: never (0) + return false; + + case 0x02: + // Unsigned: higher (C + Z = 0) + return !BIT(m_ccr, 8) && !BIT(m_ccr, 10); + + case 0x03: + // Unsigned: lower or same (C + Z = 1) + return BIT(m_ccr, 8) || BIT(m_ccr, 10); + + case 0x04: + // Simple: carry clear (C = 0) + return !BIT(m_ccr, 8); + + case 0x05: + // Simple: carry set (C = 1) + return BIT(m_ccr, 8); + + case 0x06: + // Simple: not equal to zero (Z = 0) + return !BIT(m_ccr, 10); + + case 0x07: + // Simple: equal to zero (Z = 1) + return BIT(m_ccr, 10); + + case 0x08: + // Simple: overflow clear (V = 0) + return !BIT(m_ccr, 9); + + case 0x09: + // Simple: overflow set (V = 1) + return BIT(m_ccr, 9); + + case 0x0a: + // Simple: plus sign (N = 0) + return !BIT(m_ccr, 11); + + case 0x0b: + // Simple: minus sign (N = 1) + return BIT(m_ccr, 11); + + case 0x0c: + // Signed: greater than or equal (N ⊕ V = 0) + return BIT(m_ccr, 11) == BIT(m_ccr, 9); + + case 0x0d: + // Signed: less than (N ⊕ V = 1) + return BIT(m_ccr, 11) != BIT(m_ccr, 9); + + case 0x0e: + // Signed: greater than (Z + (N ⊕ V) = 0) + return !BIT(m_ccr, 10) && BIT(m_ccr, 11) == BIT(m_ccr, 9); + + case 0x0f: + // Signed: less than or equal (Z + (N ⊕ V) = 1) + return BIT(m_ccr, 10) || BIT(m_ccr, 11) != BIT(m_ccr, 9); + + case 0x10: + // MAC unit: AM overflow set (MV = 1) + return BIT(m_ccr, 14); + + case 0x11: + // MAC unit: extension bit overflow set (EV = 1) + return BIT(m_ccr, 12); + } } void cpu16_device::execute_run() { - u16 word0 = m_cache.read_word(0x00000); // reserved:ZK:SK:PK - m_pc = m_cache.read_word(0x00002) | u32(word0 & 0x000f) << 16; - m_sp = m_cache.read_word(0x00004) | u32(word0 & 0x00f0) << 12; - m_index_regs[2] = m_cache.read_word(0x00006) | u32(word0 & 0x0f00) << 8; - m_ccr = (m_ccr & 0xfff0) | (word0 & 0x000f); + while (m_icount > 0) + { + if (m_start) + { + debugger_instruction_hook(m_fwa); + u8 page = (m_fetch_pipe[2] & 0xcf00) == 0x0700 ? BIT(m_fetch_pipe[2], 12, 2) : 0; + m_sequence = s_inst_decode[page][page != 0 ? BIT(m_fetch_pipe[2], 0, 8) : BIT(m_fetch_pipe[2], 8, 8)]; + } + + switch (m_sequence) + { + case seq::BOOT_0: + m_tmp = m_cache.read_word(0x00000); // reserved:ZK:SK:PK + m_sequence = seq::BOOT_1; + m_icount -= 2; + break; + + case seq::BOOT_1: + m_pc = m_cache.read_word(0x00002) | u32(m_tmp & 0x000f) << 16; + m_ccr = (m_ccr & 0xfff0) | (m_tmp & 0x000f); + m_sequence = seq::BOOT_2; + m_icount -= 2; + break; + + case seq::BOOT_2: + m_index_regs[3] = m_cache.read_word(0x00004) | u32(m_tmp & 0x00f0) << 12; + m_sequence = seq::BOOT_3; + m_icount -= 2; + break; + + case seq::BOOT_3: + m_index_regs[2] = m_cache.read_word(0x00006) | u32(m_tmp & 0x0f00) << 8; + m_sequence = seq::PREFETCH_1; + m_icount -= 2; + break; + + case seq::INVALID: // TODO: these are trapped + logerror("%05X: Invalid/unimplemented instruction word $%04X encountered\n", m_fwa, m_fetch_pipe[2]); + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::PREFETCH_1: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_sequence = seq::PREFETCH_2; + advance(); + m_icount -= 2; + break; + + case seq::PREFETCH_2: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::STORE8_EA: + m_data.write_word(m_ea, (m_tmp & 0x00ff) | (m_tmp << 8), BIT(m_ea, 0) ? 0x00ff : 0xff00); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::STORE8_EXT: + m_data.write_word(m_ea, (m_tmp & 0x00ff) | (m_tmp << 8), BIT(m_ea, 0) ? 0x00ff : 0xff00); + m_sequence = seq::PREFETCH_2; + advance(); + m_icount -= 2; + break; + + case seq::STORE16_EA: + if (BIT(m_ea, 0)) + { + m_data.write_word(m_ea, (m_tmp & 0xff00) | (m_tmp >> 8), 0x00ff); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::STORE8_EA; + } + else + { + m_data.write_word(m_ea, m_tmp); + m_start = true; + advance(); + } + m_icount -= 2; + break; + + case seq::STORE16_EXT: + if (BIT(m_ea, 0)) + { + m_data.write_word(m_ea, (m_tmp & 0xff00) | (m_tmp >> 8), 0x00ff); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::STORE8_EXT; + } + else + { + m_data.write_word(m_ea, m_tmp); + m_sequence = seq::PREFETCH_2; + advance(); + } + m_icount -= 2; + break; + + case seq::ABA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_a(adc8(m_d >> 8, m_d & 0x00ff, false)); + advance(); + m_icount -= 2; + break; + + case seq::ABX: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + (m_d & 0x00ff)) & 0xfffff; // B is zero-extended to 20 bits + advance(); + m_icount -= 2; + break; + + case seq::ADDA_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::ADDA_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ADDA_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ADDA_IND8_3; + m_icount -= 2; + break; + + case seq::ADDA_IND8_3: + set_a(adc8(m_d >> 8, m_tmp, BIT(m_fetch_pipe[2], 9) && BIT(m_ccr, 8))); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ADDA_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_a(adc8(m_d >> 8, m_fetch_pipe[2] & 0x00ff, BIT(m_fetch_pipe[2], 9) && BIT(m_ccr, 8))); + advance(); + m_icount -= 2; + break; + + case seq::ADDA_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ADDA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ADDA_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ADDA_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ADDA_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_a(adc8(m_d >> 8, m_tmp, BIT(m_fetch_pipe[2], 1) && BIT(m_ccr, 8))); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ADDA_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ADDA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ADDA_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::ADDA_INDE_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ADDA_INDE_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ADDA_INDE_3; + m_icount -= 2; + break; + + case seq::ADDA_INDE_3: + set_a(adc8(m_d >> 8, m_tmp, BIT(m_fetch_pipe[2], 1) && BIT(m_ccr, 8))); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ADDB_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::ADDB_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ADDB_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ADDB_IND8_3; + m_icount -= 2; + break; + + case seq::ADDB_IND8_3: + set_b(adc8(m_d & 0x00ff, m_tmp, BIT(m_fetch_pipe[2], 9) && BIT(m_ccr, 8))); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ADDB_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b(adc8(m_d & 0x00ff, m_fetch_pipe[2] & 0x00ff, BIT(m_fetch_pipe[2], 9) && BIT(m_ccr, 8))); + advance(); + m_icount -= 2; + break; + + case seq::ADDB_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ADDB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ADDB_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ADDB_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ADDB_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b(adc8(m_d & 0x00ff, m_tmp, BIT(m_fetch_pipe[2], 1) && BIT(m_ccr, 8))); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ADDB_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ADDB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ADDB_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::ADDB_INDE_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ADDB_INDE_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ADDB_INDE_3; + m_icount -= 2; + break; + + case seq::ADDB_INDE_3: + set_b(adc8(m_d & 0x00ff, m_tmp, BIT(m_fetch_pipe[2], 1) && BIT(m_ccr, 8))); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ADDD_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::ADDD_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ADDD_IND8_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::ADDD_IND8_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::ADDD_IND8_3; + } + m_icount -= 2; + break; + + case seq::ADDD_IND8_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::ADDD_IND8_3; + m_icount -= 2; + break; + + case seq::ADDD_IND8_3: + m_d = adc16(m_d, m_tmp, BIT(m_fetch_pipe[2], 9) && BIT(m_ccr, 8)); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ADDD_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d = adc16(m_d, s16(s8(m_fetch_pipe[2] & 0x00ff)), false); + advance(); + m_icount -= 2; + break; + + case seq::ADDD_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::ADDD_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::ADDD_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ADDD_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ADDD_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::ADDD_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::ADDD_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::ADDD_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::ADDD_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ADDD_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d = adc16(m_d, m_tmp, BIT(m_fetch_pipe[2], 1) && BIT(m_ccr, 8)); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ADDD_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ADDD_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ADDD_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::ADDD_INDE_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ADDD_INDE_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::ADDD_INDE_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::ADDD_INDE_3; + } + m_icount -= 2; + break; + + case seq::ADDD_INDE_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::ADDD_INDE_3; + m_icount -= 2; + break; + + case seq::ADDD_INDE_3: + m_d = adc16(m_d, m_tmp, BIT(m_fetch_pipe[2], 1) && BIT(m_ccr, 8)); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ADDE_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e = adc16(m_e, s16(s8(m_fetch_pipe[2] & 0x00ff)), false); + advance(); + m_icount -= 2; + break; + + case seq::ADDE_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::ADDE_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::ADDE_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ADDE_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ADDE_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::ADDE_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::ADDE_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::ADDE_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::ADDE_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ADDE_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e = adc16(m_e, m_tmp, BIT(m_fetch_pipe[2], 1) && BIT(m_ccr, 8)); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ADDE_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ADDE_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ADE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e = adc16(m_e, m_d, false); + advance(); + m_icount -= 2; + break; + + case seq::ADX: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_d)) & 0xfffff; + advance(); + m_icount -= 2; + break; + + case seq::AEX: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + advance(); + m_icount -= 2; + break; + + case seq::AIX_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_index_regs[BIT(m_fetch_pipe[2], 8, 2)] = (m_index_regs[BIT(m_fetch_pipe[2], 8, 2)] + s8(m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + if (BIT(m_fetch_pipe[2], 8, 2) != 3) + set_z16(get_ix(BIT(m_fetch_pipe[2], 8, 2))); + advance(); + m_icount -= 2; + break; + + case seq::AIX_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_index_regs[BIT(m_fetch_pipe[2], 0, 2)] = (m_index_regs[BIT(m_fetch_pipe[2], 0, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + if (BIT(m_fetch_pipe[2], 0, 2) != 3) + set_z16(get_ix(BIT(m_fetch_pipe[2], 0, 2))); + m_sequence = seq::PREFETCH_2; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::ANDA_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::ANDA_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ANDA_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ANDA_IND8_3; + m_icount -= 2; + break; + + case seq::ANDA_IND8_3: + m_d &= m_tmp << 8 | 0x00ff; + set_nzv8(m_d >> 8, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ANDA_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d &= m_fetch_pipe[2] << 8 | 0x00ff; + set_nzv8(m_d >> 8, false); + advance(); + m_icount -= 2; + break; + + case seq::ANDA_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ANDA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ANDA_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ANDA_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ANDA_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d &= m_tmp << 8 | 0x00ff; + set_nzv8(m_d >> 8, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ANDA_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ANDA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ANDA_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::ANDA_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ANDB_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::ANDB_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ANDB_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ANDB_IND8_3; + m_icount -= 2; + break; + + case seq::ANDB_IND8_3: + m_d &= m_tmp | 0xff00; + set_nzv8(m_d & 0x00ff, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ANDB_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d &= m_fetch_pipe[2] | 0xff00; + set_nzv8(m_d & 0x00ff, false); + advance(); + m_icount -= 2; + break; + + case seq::ANDB_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ANDB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ANDB_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ANDB_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ANDB_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d &= m_tmp | 0xff00; + set_nzv8(m_d & 0x00ff, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ANDB_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ANDB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ANDB_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::ANDB_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ANDD_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::ANDD_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ANDD_IND8_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::ANDD_IND8_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::ANDD_IND8_3; + } + m_icount -= 2; + break; + + case seq::ANDD_IND8_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::ANDD_IND8_3; + m_icount -= 2; + break; + + case seq::ANDD_IND8_3: + m_d &= m_tmp; + set_nzv16(m_d, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ANDD_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::ANDD_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::ANDD_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ANDD_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ANDD_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::ANDD_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::ANDD_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::ANDD_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::ANDD_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ANDD_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d &= m_tmp; + set_nzv16(m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ANDD_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ANDD_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ANDD_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::ANDD_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ANDE_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::ANDE_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::ANDE_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ANDE_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ANDE_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::ANDE_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::ANDE_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::ANDE_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::ANDE_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ANDE_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e &= m_tmp; + set_nzv16(m_e, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ANDE_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ANDE_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ANDP: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ccr &= m_fetch_pipe[1] | 0x000f; // PK is unaffected + m_sequence = seq::PREFETCH_2; // TODO: prohibit interrupts + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::ASR_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::ASR_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ASR_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ASR_IND8_3; + m_icount -= 2; + break; + + case seq::ASR_IND8_3: + m_tmp = asr8(m_tmp); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::ASR_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ASR_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ASR_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ASR_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ASR_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = asr8(m_tmp); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::ASR_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ASR_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ASRA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_a(asr8(m_d >> 8)); + advance(); + m_icount -= 2; + break; + + case seq::ASRB: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b(asr8(m_d & 0x00ff)); + advance(); + m_icount -= 2; + break; + + case seq::ASRD: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d = asr16(m_d); + advance(); + m_icount -= 2; + break; + + case seq::ASRE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e = asr16(m_e); + advance(); + m_icount -= 2; + break; + + case seq::BCLR_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::BCLR_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BCLR_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::BCLR_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::BCLR_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp &= ~m_fetch_pipe[2] & 0x00ff; + set_nzv8(m_tmp, false); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::BCLR_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::BCLR_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BCLR_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + (m_fetch_pipe[1] & 0x00ff)) & 0xfffff; + m_sequence = seq::BCLR_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BCLR_IND8_2: + m_tmp = (m_fetch_pipe[1] & 0xff00) | m_data.read_byte(m_ea); + m_sequence = seq::BCLR_IND8_3; + advance(); + m_icount -= 2; + break; + + case seq::BCLR_IND8_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp &= m_tmp >> 8; + set_nzv8(m_tmp, false); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::BCLRW_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::BCLRW_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BCLRW_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::BCLRW_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::BCLRW_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::BCLRW_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_ea = (m_ea - 1) & 0xfffff; + m_sequence = seq::BCLRW_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::BCLRW_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp &= ~m_fetch_pipe[1]; + set_nzv16(m_tmp, false); + m_sequence = seq::STORE16_EXT; + m_icount -= 2; + break; + + case seq::BCLRW_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::BCLRW_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BITA_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::BITA_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BITA_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::BITA_IND8_3; + m_icount -= 2; + break; + + case seq::BITA_IND8_3: + set_nzv8((m_d >> 8) & m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::BITA_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_nzv8((m_d >> 8) & m_fetch_pipe[2] & 0x00ff, false); + advance(); + m_icount -= 2; + break; + + case seq::BITA_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::BITA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BITA_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::BITA_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::BITA_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_nzv8((m_d >> 8) & m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::BITA_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::BITA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BITA_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::BITA_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BITB_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::BITB_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BITB_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::BITB_IND8_3; + m_icount -= 2; + break; + + case seq::BITB_IND8_3: + set_nzv8(m_d & m_tmp & 0x00ff, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::BITB_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_nzv8(m_d & m_fetch_pipe[2] & 0x00ff, false); + advance(); + m_icount -= 2; + break; + + case seq::BITB_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::BITB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BITB_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::BITB_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::BITB_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_nzv8(m_d & m_tmp & 0x00ff, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::BITB_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::BITB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BITB_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::BITB_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BCC: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + if (cc_test(BIT(m_fetch_pipe[2], 8, 4))) + { + m_sequence = seq::PREFETCH_1; + m_start = false; + set_pc(m_pc + s8(m_fetch_pipe[2] & 0x00ff)); + } + advance(); + m_icount -= 2; + break; + + case seq::BRSET_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[1] >> 8)) & 0xfffff; + m_sequence = seq::BRSET_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BRSET_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::BRSET_IND8_3; + m_icount -= 2; + break; + + case seq::BRSET_IND8_3: + m_tmp = (BIT(m_fetch_pipe[2], 14) ? m_tmp : ~m_tmp) & m_fetch_pipe[2] & 0x00ff; + m_ea = (m_pc + 2 + s8(m_fetch_pipe[1] & 0x00fe)) & 0xfffff; + m_sequence = seq::BRSET_IND8_4; + advance(); + m_icount -= 2; + break; + + case seq::BRSET_IND8_4: + if (m_tmp == 0) + { + m_sequence = seq::PREFETCH_1; + m_pc = m_ea; + } + else + m_sequence = seq::PREFETCH_2; + m_icount -= 2; + break; + + case seq::BRSET_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::BRSET_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BRSET_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::BRSET_IND16_3; + m_icount -= 2; + advance(); + break; + + case seq::BRSET_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = (BIT(m_fetch_pipe[2], 8) ? ~m_tmp : m_tmp) & m_fetch_pipe[2] & 0x00ff; + m_ea = (m_pc + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::BRSET_IND8_4; + advance(); + m_icount -= 2; + break; + + case seq::BRSET_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::BRSET_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BSET_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::BSET_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BSET_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::BSET_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::BSET_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp |= m_fetch_pipe[2] & 0x00ff; + set_nzv8(m_tmp, false); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::BSET_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::BSET_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BSET_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + (m_fetch_pipe[1] & 0x00ff)) & 0xfffff; + m_sequence = seq::BSET_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BSET_IND8_2: + m_tmp = (m_fetch_pipe[1] & 0xff00) | m_data.read_byte(m_ea); + m_sequence = seq::BSET_IND8_3; + advance(); + m_icount -= 2; + break; + + case seq::BSET_IND8_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = (m_tmp >> 8) | (m_tmp & 0x00ff); + set_nzv8(m_tmp, false); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::BSETW_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::BSETW_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BSETW_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::BSETW_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::BSETW_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::BSETW_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_ea = (m_ea - 1) & 0xfffff; + m_sequence = seq::BSETW_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::BSETW_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp |= m_fetch_pipe[1]; + set_nzv16(m_tmp, false); + m_sequence = seq::STORE16_EXT; + m_icount -= 2; + break; + + case seq::BSETW_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::BSETW_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BSR: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_pc & 0x0ffff; + m_sequence = seq::BSR_2; + m_start = false; + m_icount -= 2; + break; + + case seq::BSR_2: + if (BIT(m_index_regs[3], 0)) + { + m_data.write_word(m_index_regs[3], (m_tmp & 0xff00) | (m_tmp >> 8), 0x00ff); + m_index_regs[3] = (m_index_regs[3] + 1) & 0xfffff; + m_sequence = seq::BSR_2B; + } + else + { + m_data.write_word(m_index_regs[3], m_tmp); + m_tmp = m_ccr; + m_index_regs[3] = (m_index_regs[3] - 2) & 0xfffff; + m_sequence = seq::BSR_3; + } + m_icount -= 2; + break; + + case seq::BSR_2B: + m_data.write_word(m_index_regs[3], (m_tmp & 0x00ff) | (m_tmp << 8), 0xff00); + m_index_regs[3] = (m_index_regs[3] - 3) & 0xfffff; + m_tmp = m_ccr; + m_sequence = seq::BSR_3; + m_icount -= 2; + break; + + case seq::BSR_3: + if (BIT(m_index_regs[3], 0)) + { + m_data.write_word(m_index_regs[3], (m_tmp & 0xff00) | (m_tmp >> 8), 0x00ff); + m_index_regs[3] = (m_index_regs[3] + 1) & 0xfffff; + m_sequence = seq::BSR_3B; + } + else + { + m_data.write_word(m_index_regs[3], m_tmp); + set_pc(m_pc + 2 + s8(m_fetch_pipe[2] & 0x00ff)); + m_index_regs[3] = (m_index_regs[3] - 2) & 0xfffff; + m_sequence = seq::PREFETCH_1; + } + m_icount -= 2; + break; + + case seq::BSR_3B: + m_data.write_word(m_index_regs[3], (m_tmp & 0x00ff) | (m_tmp << 8), 0xff00); + set_pc(u32(m_fetch_pipe[2] & 0x000f) << 16 | m_fetch_pipe[1]); + m_index_regs[3] = (m_index_regs[3] - 3) & 0xfffff; + m_sequence = seq::PREFETCH_1; + m_icount -= 2; + break; + + case seq::CBA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + (void)sbc8(m_d >> 8, m_d & 0x00ff, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::CLR_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = 0; + set_nzv8(0, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::STORE8_EA; + m_start = false; + m_icount -= 2; + break; + + case seq::CLR_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = 0; + set_nzv8(0, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::STORE8_EXT; + m_start = false; + m_icount -= 2; + break; + + case seq::CLR_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = 0; + set_nzv8(0, false); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::STORE8_EXT; + m_start = false; + m_icount -= 2; + break; + + case seq::CLRA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d &= 0x00ff; + set_nzv8(0, false); + advance(); + m_icount -= 2; + break; + + case seq::CLRB: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d &= 0xff00; + set_nzv8(0, false); + advance(); + m_icount -= 2; + break; + + case seq::CLRD: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d = 0; + set_nzv16(0, false); + advance(); + m_icount -= 2; + break; + + case seq::CLRE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e = 0; + set_nzv16(0, false); + advance(); + m_icount -= 2; + break; + + case seq::CLRM: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_am = 0; + m_ccr &= 0xafff; // MV and EV flags cleared + advance(); + m_icount -= 2; + break; + + case seq::CLRW_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = 0; + set_nzv16(0, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::STORE16_EXT; + m_start = false; + m_icount -= 2; + break; + + case seq::CLRW_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = 0; + set_nzv16(0, false); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::STORE16_EXT; + m_start = false; + m_icount -= 2; + break; + + case seq::CMPA_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::CMPA_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::CMPA_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::CMPA_IND8_3; + m_icount -= 2; + break; + + case seq::CMPA_IND8_3: + (void)sbc8(m_d >> 8, m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::CMPA_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + (void)sbc8(m_d >> 8, m_fetch_pipe[2] & 0x00ff, false); + advance(); + m_icount -= 2; + break; + + case seq::CMPA_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::CMPA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::CMPA_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::CMPA_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::CMPA_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + (void)sbc8(m_d >> 8, m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::CMPA_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::CMPA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::CMPA_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::CMPA_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::CMPB_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::CMPB_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::CMPB_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::CMPB_IND8_3; + m_icount -= 2; + break; + + case seq::CMPB_IND8_3: + (void)sbc8(m_d & 0x00ff, m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::CMPB_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + (void)sbc8(m_d & 0x00ff, m_fetch_pipe[2] & 0x00ff, false); + advance(); + m_icount -= 2; + break; + + case seq::CMPB_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::CMPB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::CMPB_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::CMPB_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::CMPB_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + (void)sbc8(m_d & 0x00ff, m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::CMPB_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::CMPB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::CMPB_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::CMPB_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::CPD_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::CPD_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::CPD_IND8_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::CPD_IND8_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::CPD_IND8_3; + } + m_icount -= 2; + break; + + case seq::CPD_IND8_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::CPD_IND8_3; + m_icount -= 2; + break; + + case seq::CPD_IND8_3: + (void)sbc16(m_d, m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::CPD_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::CPD_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::CPD_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::CPD_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::CPD_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::CPD_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::CPD_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::CPD_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::CPD_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::CPD_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + (void)sbc16(m_d, m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::CPD_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::CPD_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::CPD_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::CPD_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::CPE_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::CPE_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::CPE_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::CPE_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::CPE_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::CPE_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::CPE_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::CPE_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::CPE_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::CPE_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + (void)sbc16(m_e, m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::CPE_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::CPE_IND16_2; + m_start = false; + m_icount -= 2; + break; - m_fwa = m_pc; - debugger_instruction_hook(m_fwa); + case seq::CPX_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::CPX_IND8_2; + m_start = false; + m_icount -= 2; + break; - m_icount = 0; + case seq::CPX_IND8_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::CPX_IND8_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::CPX_IND8_3; + } + m_icount -= 2; + break; + + case seq::CPX_IND8_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::CPX_IND8_3; + m_icount -= 2; + break; + + case seq::CPX_IND8_3: + (void)sbc16(get_ix(BIT(m_fetch_pipe[2], 8, 2)), m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::CPX_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::CPX_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::CPX_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::CPX_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::CPX_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::CPX_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::CPX_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::CPX_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::CPX_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::CPX_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + (void)sbc16(get_ix(BIT(m_fetch_pipe[2], 0, 2)), m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::CPX_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::CPX_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::DAA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + if ((m_d & 0x0f00) > 0x0900 || BIT(m_ccr, 13)) + { + // Decimal adjust A[3:0] + if ((m_d & 0xff00) >= 0xfa00) + m_ccr |= 0x0100; + m_d += 0x0600; + } + if ((m_d & 0xf000) > 0x9000 || BIT(m_ccr, 8)) + { + // Decimal adjust A[7:4] + m_ccr |= 0x0100; + m_d += 0x6000; + } + // V is officially undefined (as with decimal arithmetic on most other CPUs), so just leave it alone here + set_nzv8(m_d >> 8, BIT(m_ccr, 9)); + advance(); + m_icount -= 2; + break; + + case seq::DEC_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::DEC_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::DEC_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::DEC_IND8_3; + m_icount -= 2; + break; + + case seq::DEC_IND8_3: + --m_tmp; + set_nzv8(m_tmp, m_tmp == 0x007f); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::DEC_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::DEC_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::DEC_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::DEC_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::DEC_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + --m_tmp; + set_nzv8(m_tmp, m_tmp == 0x007f); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::DEC_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::DEC_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::DECA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d -= 0x0100; + set_nzv8(m_d >> 8, (m_d & 0xff00) == 0x7f00); + advance(); + m_icount -= 2; + break; + + case seq::DECB: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b((m_d - 1) & 0x00ff); + set_nzv8(m_d & 0x00ff, (m_d & 0x00ff) == 0x007f); + advance(); + m_icount -= 2; + break; + + case seq::DECW_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::DECW_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::DECW_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::DECW_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::DECW_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::DECW_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_ea = (m_ea - 1) & 0xfffff; + m_sequence = seq::DECW_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::DECW_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + --m_tmp; + set_nzv16(m_tmp, m_tmp == 0x7fff); + m_sequence = seq::STORE16_EA; + m_icount -= 2; + break; + + case seq::DECW_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::DECW_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::DIV: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_sequence = seq::DIV_2; + m_start = false; + m_icount -= 2; + break; + + case seq::DIV_2: + m_sequence = seq::DIV_3; + m_icount -= 2; + break; + + case seq::DIV_3: + m_sequence = seq::DIV_4; + m_icount -= 2; + break; + + case seq::DIV_4: + m_sequence = seq::DIV_5; + m_icount -= 2; + break; + + case seq::DIV_5: + m_sequence = seq::DIV_6; + m_icount -= 2; + break; + + case seq::DIV_6: + m_sequence = seq::DIV_7; + m_icount -= 2; + break; + + case seq::DIV_7: + m_sequence = seq::DIV_8; + m_icount -= 2; + break; + + case seq::DIV_8: + m_sequence = seq::DIV_9; + m_icount -= 2; + break; + + case seq::DIV_9: + m_sequence = seq::DIV_10; + m_icount -= 2; + break; + + case seq::DIV_10: + m_sequence = seq::DIV_11; + m_icount -= 2; + break; + + case seq::DIV_11: + divu16(BIT(m_fetch_pipe[2], 0)); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::EMUL: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_sequence = seq::EMUL_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EMUL_2: + m_sequence = seq::EMUL_3; + m_icount -= 2; + break; + + case seq::EMUL_3: + m_sequence = seq::EMUL_4; + m_icount -= 2; + break; + + case seq::EMUL_4: + m_sequence = seq::EMUL_5; + m_icount -= 2; + break; + + case seq::EMUL_5: + mulu16(); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::EMULS: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_sequence = seq::EMULS_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EMULS_2: + m_sequence = seq::EMULS_3; + m_icount -= 2; + break; + + case seq::EMULS_3: + m_sequence = seq::EMULS_4; + m_icount -= 2; + break; + + case seq::EMULS_4: + muls16(BIT(m_fetch_pipe[2], 0)); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::EORA_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::EORA_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EORA_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::EORA_IND8_3; + m_icount -= 2; + break; + + case seq::EORA_IND8_3: + m_d ^= m_tmp << 8; + set_nzv8(m_d >> 8, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::EORA_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d ^= m_fetch_pipe[2] << 8; + set_nzv8(m_d >> 8, false); + advance(); + m_icount -= 2; + break; + + case seq::EORA_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::EORA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EORA_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::EORA_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::EORA_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d ^= m_tmp << 8; + set_nzv8(m_d >> 8, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::EORA_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::EORA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EORA_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::EORA_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EORB_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::EORB_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EORB_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::EORB_IND8_3; + m_icount -= 2; + break; + + case seq::EORB_IND8_3: + m_d ^= m_tmp & 0x00ff; + set_nzv8(m_d & 0x00ff, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::EORB_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d ^= m_fetch_pipe[2] & 0x00ff; + set_nzv8(m_d & 0x00ff, false); + advance(); + m_icount -= 2; + break; + + case seq::EORB_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::EORB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EORB_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::EORB_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::EORB_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d ^= m_tmp & 0x00ff; + set_nzv8(m_d & 0x00ff, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::EORB_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::EORB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EORB_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::EORB_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EORD_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::EORD_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EORD_IND8_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::EORD_IND8_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::EORD_IND8_3; + } + m_icount -= 2; + break; + + case seq::EORD_IND8_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::EORD_IND8_3; + m_icount -= 2; + break; + + case seq::EORD_IND8_3: + m_d ^= m_tmp; + set_nzv16(m_d, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::EORD_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::EORD_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::EORD_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::EORD_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EORD_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::EORD_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::EORD_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::EORD_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::EORD_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::EORD_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d ^= m_tmp; + set_nzv16(m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::EORD_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::EORD_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EORD_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::EORD_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EORE_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::EORE_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::EORE_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::EORE_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::EORE_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::EORE_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::EORE_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::EORE_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::EORE_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::EORE_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e &= m_tmp; + set_nzv16(m_e, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::EORE_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::EORE_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::INC_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::INC_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::INC_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::INC_IND8_3; + m_icount -= 2; + break; + + case seq::INC_IND8_3: + ++m_tmp; + set_nzv8(m_tmp, m_tmp == 0x0080); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::INC_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::INC_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::INC_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::INC_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::INC_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + ++m_tmp; + set_nzv8(m_tmp, m_tmp == 0x0080); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::INC_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::INC_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::INCA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d += 0x0100; + set_nzv8(m_d >> 8, (m_d & 0xff00) == 0x8000); + advance(); + m_icount -= 2; + break; + + case seq::INCB: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b((m_d + 1) & 0x00ff); + set_nzv8(m_d & 0x00ff, (m_d & 0x00ff) == 0x0080); + advance(); + m_icount -= 2; + break; + + case seq::INCW_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::INCW_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::INCW_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::INCW_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::INCW_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::INCW_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_ea = (m_ea - 1) & 0xfffff; + m_sequence = seq::INCW_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::INCW_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + ++m_tmp; + set_nzv16(m_tmp, m_tmp == 0x8000); + m_sequence = seq::STORE16_EA; + m_icount -= 2; + break; + + case seq::INCW_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::INCW_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::JMP_EXT20: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_pc(u32(m_fetch_pipe[2] & 0x000f) << 16 | m_fetch_pipe[1]); + m_sequence = seq::PREFETCH_1; + m_start = false; + m_icount -= 2; + break; + + case seq::JSR_EXT20: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = (m_pc + 2) & 0x0ffff; + m_sequence = seq::JSR_EXT20_2; + m_start = false; + m_icount -= 2; + break; + + case seq::JSR_EXT20_2: + if (BIT(m_index_regs[3], 0)) + { + m_data.write_word(m_index_regs[3], (m_tmp & 0xff00) | (m_tmp >> 8), 0x00ff); + m_index_regs[3] = (m_index_regs[3] + 1) & 0xfffff; + m_sequence = seq::JSR_EXT20_2B; + } + else + { + m_data.write_word(m_index_regs[3], m_tmp); + m_tmp = m_ccr; + m_index_regs[3] = (m_index_regs[3] - 2) & 0xfffff; + m_sequence = seq::JSR_EXT20_3; + } + m_icount -= 2; + break; + + case seq::JSR_EXT20_2B: + m_data.write_word(m_index_regs[3], (m_tmp & 0x00ff) | (m_tmp << 8), 0xff00); + m_index_regs[3] = (m_index_regs[3] - 3) & 0xfffff; + m_tmp = m_ccr; + m_sequence = seq::JSR_EXT20_3; + m_icount -= 2; + break; + + case seq::JSR_EXT20_3: + if (BIT(m_index_regs[3], 0)) + { + m_data.write_word(m_index_regs[3], (m_tmp & 0xff00) | (m_tmp >> 8), 0x00ff); + m_index_regs[3] = (m_index_regs[3] + 1) & 0xfffff; + m_sequence = seq::JSR_EXT20_3B; + } + else + { + m_data.write_word(m_index_regs[3], m_tmp); + set_pc(u32(m_fetch_pipe[2] & 0x000f) << 16 | m_fetch_pipe[1]); + m_index_regs[3] = (m_index_regs[3] - 2) & 0xfffff; + m_sequence = seq::PREFETCH_1; + } + m_icount -= 2; + break; + + case seq::JSR_EXT20_3B: + m_data.write_word(m_index_regs[3], (m_tmp & 0x00ff) | (m_tmp << 8), 0xff00); + set_pc(u32(m_fetch_pipe[2] & 0x000f) << 16 | m_fetch_pipe[1]); + m_index_regs[3] = (m_index_regs[3] - 3) & 0xfffff; + m_sequence = seq::PREFETCH_1; + m_icount -= 2; + break; + + case seq::LBCC: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + if (cc_test(BIT(m_fetch_pipe[2], 0, 5))) + { + set_pc(m_pc + s16(m_fetch_pipe[1])); + m_sequence = seq::PREFETCH_1; + } + else + m_sequence = seq::PREFETCH_2; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::LBSR: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = (m_pc + 2) & 0x0ffff; + m_sequence = seq::LBSR_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LBSR_2: + if (BIT(m_index_regs[3], 0)) + { + m_data.write_word(m_index_regs[3], (m_tmp & 0xff00) | (m_tmp >> 8), 0x00ff); + m_index_regs[3] = (m_index_regs[3] + 1) & 0xfffff; + m_sequence = seq::LBSR_2B; + } + else + { + m_data.write_word(m_index_regs[3], m_tmp); + m_tmp = m_ccr; + m_index_regs[3] = (m_index_regs[3] - 2) & 0xfffff; + m_sequence = seq::LBSR_3; + } + m_icount -= 2; + break; + + case seq::LBSR_2B: + m_data.write_word(m_index_regs[3], (m_tmp & 0x00ff) | (m_tmp << 8), 0xff00); + m_index_regs[3] = (m_index_regs[3] - 3) & 0xfffff; + m_tmp = m_ccr; + m_sequence = seq::LBSR_3; + m_icount -= 2; + break; + + case seq::LBSR_3: + if (BIT(m_index_regs[3], 0)) + { + m_data.write_word(m_index_regs[3], (m_tmp & 0xff00) | (m_tmp >> 8), 0x00ff); + m_index_regs[3] = (m_index_regs[3] + 1) & 0xfffff; + m_sequence = seq::LBSR_3B; + } + else + { + m_data.write_word(m_index_regs[3], m_tmp); + set_pc(m_pc + 2 + s16(m_fetch_pipe[1])); + m_index_regs[3] = (m_index_regs[3] - 2) & 0xfffff; + m_sequence = seq::PREFETCH_1; + } + m_icount -= 2; + break; + + case seq::LBSR_3B: + m_data.write_word(m_index_regs[3], (m_tmp & 0x00ff) | (m_tmp << 8), 0xff00); + set_pc(m_pc + 2 + s16(m_fetch_pipe[1])); + m_index_regs[3] = (m_index_regs[3] - 3) & 0xfffff; + m_sequence = seq::PREFETCH_1; + m_icount -= 2; + break; + + case seq::LDAA_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::LDAA_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDAA_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::LDAA_IND8_3; + m_icount -= 2; + break; + + case seq::LDAA_IND8_3: + set_a(m_tmp); + set_nzv8(m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::LDAA_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_a(m_fetch_pipe[2] & 0x00ff); + set_nzv8(m_fetch_pipe[2] & 0x00ff, false); + advance(); + m_icount -= 2; + break; + + case seq::LDAA_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::LDAA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDAA_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::LDAA_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::LDAA_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_a(m_tmp); + set_nzv8(m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::LDAA_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::LDAA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDAA_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::LDAA_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDAB_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::LDAB_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDAB_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::LDAB_IND8_3; + m_icount -= 2; + break; + + case seq::LDAB_IND8_3: + set_b(m_tmp); + set_nzv8(m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::LDAB_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b(m_fetch_pipe[2] & 0x00ff); + set_nzv8(m_fetch_pipe[2] & 0x00ff, false); + advance(); + m_icount -= 2; + break; + + case seq::LDAB_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::LDAB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDAB_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::LDAB_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::LDAB_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b(m_tmp); + set_nzv8(m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::LDAB_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::LDAB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDAB_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::LDAB_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDD_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::LDD_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDD_IND8_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::LDD_IND8_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::LDD_IND8_3; + } + m_icount -= 2; + break; + + case seq::LDD_IND8_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::LDD_IND8_3; + m_icount -= 2; + break; + + case seq::LDD_IND8_3: + m_d = m_tmp; + set_nzv16(m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::LDD_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::LDD_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::LDD_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::LDD_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDD_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::LDD_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::LDD_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::LDD_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::LDD_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::LDD_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d = m_tmp; + set_nzv16(m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::LDD_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::LDD_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDD_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::LDD_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDE_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::LDE_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::LDE_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::LDE_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDE_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::LDE_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::LDE_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::LDE_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::LDE_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::LDE_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e = m_tmp; + set_nzv16(m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::LDE_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::LDE_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDED: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::LDED_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDED_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::LDED_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_ea = (m_ea + 2) & 0xfffff; + m_sequence = seq::LDED_3; + } + m_icount -= 2; + break; + + case seq::LDED_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::LDED_3; + m_icount -= 2; + break; + + case seq::LDED_3: + m_e = m_tmp; + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::LDED_3B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::LDED_4; + advance(); + } + m_icount -= 2; + break; + + case seq::LDED_3B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::LDED_4; + advance(); + m_icount -= 2; + break; + + case seq::LDED_4: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d = m_tmp; + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::LDHI: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = m_index_regs[0]; + m_sequence = seq::LDHI_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDHI_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::LDHI_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_ea = m_index_regs[1]; + m_sequence = seq::LDHI_3; + } + m_icount -= 2; + break; + + case seq::LDHI_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_ea = m_index_regs[1]; + m_sequence = seq::LDHI_3; + m_icount -= 2; + break; + + case seq::LDHI_3: + m_hr = m_tmp; + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::LDHI_3B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::LDHI_4; + } + m_icount -= 2; + break; + + case seq::LDHI_3B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::LDHI_4; + m_icount -= 2; + break; + + case seq::LDHI_4: + m_ir = m_tmp; + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::LDX_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::LDX_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDX_IND8_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::LDX_IND8_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::LDX_IND8_3; + } + m_icount -= 2; + break; + + case seq::LDX_IND8_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::LDX_IND8_3; + m_icount -= 2; + break; + + case seq::LDX_IND8_3: + set_ix(BIT(m_fetch_pipe[2], 8, 2), m_tmp); + set_nzv16(m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::LDX_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::LDX_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::LDX_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::LDX_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::LDX_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::LDX_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::LDX_IND16_3; + } + m_icount -= 2; + break; + + case seq::LDX_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::LDX_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::LDX_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_ix(BIT(m_fetch_pipe[2], 0, 2), m_tmp); + set_nzv16(m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::LDX_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::LDX_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::MOVB_IXP_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = m_index_regs[0]; + m_index_regs[0] = u32(m_ek) << 16 | m_fetch_pipe[1]; // HACK: save destination in XK:IX to prevent it from being overwritten + m_sequence = seq::MOVB_IXP_EXT_2; + m_start = false; + m_icount -= 2; + break; + + case seq::MOVB_IXP_EXT_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::MOVB_IXP_EXT_3; + advance(); + m_icount -= 2; + break; + + case seq::MOVB_IXP_EXT_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_nzv8(m_tmp, false); + m_index_regs[0] = (std::exchange(m_ea, m_index_regs[0]) + s8(m_fetch_pipe[2] & 0x00ff)) & 0xfffff; // post-modify XK:IX by signed offset + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::MOVB_EXT_IXP: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = m_index_regs[0]; + m_index_regs[0] = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::MOVB_EXT_IXP_2; + m_start = false; + m_icount -= 2; + break; + + case seq::MOVB_EXT_IXP_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::MOVB_EXT_IXP_3; + advance(); + m_icount -= 2; + break; + + case seq::MOVB_EXT_IXP_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_nzv8(m_tmp, false); + m_ea = m_index_regs[0]; + m_index_regs[0] = (m_index_regs[0] + s8(m_fetch_pipe[2] & 0x00ff)) & 0xfffff; // post-modify XK:IX by signed offset + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::MOVB_EXT_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::MOVB_EXT_EXT_2; + m_start = false; + m_icount -= 2; + break; + + case seq::MOVB_EXT_EXT_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::MOVB_EXT_EXT_3; + advance(); + m_icount -= 2; + break; + + case seq::MOVB_EXT_EXT_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_nzv8(m_tmp, false); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::STORE8_EXT; + m_icount -= 2; + break; + + case seq::MOVW_IXP_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = m_index_regs[0]; + m_index_regs[0] = u32(m_ek) << 16 | m_fetch_pipe[1]; // HACK: save destination in XK:IX to prevent it from being overwritten + m_sequence = seq::MOVW_IXP_EXT_2; + m_start = false; + m_icount -= 2; + break; + + case seq::MOVW_IXP_EXT_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::MOVW_IXP_EXT_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::MOVW_IXP_EXT_3; + advance(); + } + m_icount -= 2; + break; + + case seq::MOVW_IXP_EXT_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_ea = (m_ea - 1) & 0xfffff; + m_sequence = seq::MOVW_IXP_EXT_3; + advance(); + m_icount -= 2; + break; + + case seq::MOVW_IXP_EXT_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_nzv16(m_tmp, false); + m_index_regs[0] = (std::exchange(m_ea, m_index_regs[0]) + s8(m_fetch_pipe[2] & 0x00ff)) & 0xfffff; // post-modify XK:IX by signed offset + m_sequence = seq::STORE16_EA; + m_icount -= 2; + break; + + case seq::MOVW_EXT_IXP: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = m_index_regs[0]; + m_index_regs[0] = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::MOVW_EXT_IXP_2; + m_start = false; + m_icount -= 2; + break; + + case seq::MOVW_EXT_IXP_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::MOVW_EXT_IXP_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::MOVW_EXT_IXP_3; + advance(); + } + m_icount -= 2; + break; + + case seq::MOVW_EXT_IXP_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::MOVW_EXT_IXP_3; + advance(); + m_icount -= 2; + break; + + case seq::MOVW_EXT_IXP_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_nzv8(m_tmp, false); + m_ea = m_index_regs[0]; + m_index_regs[0] = (m_index_regs[0] + s8(m_fetch_pipe[2] & 0x00ff)) & 0xfffff; // post-modify XK:IX by signed offset + m_sequence = seq::STORE16_EA; + m_icount -= 2; + break; + + case seq::MOVW_EXT_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::MOVW_EXT_EXT_2; + m_start = false; + m_icount -= 2; + break; + + case seq::MOVW_EXT_EXT_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::MOVW_EXT_EXT_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::MOVW_EXT_EXT_3; + advance(); + } + m_icount -= 2; + break; + + case seq::MOVW_EXT_EXT_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::MOVW_EXT_EXT_3; + advance(); + m_icount -= 2; + break; + + case seq::MOVW_EXT_EXT_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_nzv16(m_tmp, false); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::STORE16_EXT; + m_icount -= 2; + break; + + case seq::MUL: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_sequence = seq::MUL_2; + m_start = false; + m_icount -= 2; + break; + + case seq::MUL_2: + m_sequence = seq::MUL_3; + m_icount -= 2; + break; + + case seq::MUL_3: + m_sequence = seq::MUL_4; + m_icount -= 2; + break; + + case seq::MUL_4: + m_sequence = seq::MUL_5; + m_icount -= 2; + break; + + case seq::MUL_5: + mulu8(); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::NEG_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::NEG_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::NEG_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::NEG_IND8_3; + m_icount -= 2; + break; + + case seq::NEG_IND8_3: + m_tmp = sbc8(0, m_tmp, !BIT(m_fetch_pipe[2], 1)); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::NEG_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::NEG_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::NEG_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::NEG_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::NEG_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = sbc8(0, m_tmp, !BIT(m_fetch_pipe[2], 1)); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::NEG_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::NEG_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::NEGA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_a(sbc8(0, m_d >> 8, !BIT(m_fetch_pipe[2], 1))); + advance(); + m_icount -= 2; + break; + + case seq::NEGB: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b(sbc8(0, m_d & 0x00ff, !BIT(m_fetch_pipe[2], 1))); + advance(); + m_icount -= 2; + break; + + case seq::NEGD: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d = sbc16(0, m_d, !BIT(m_fetch_pipe[2], 1)); + advance(); + m_icount -= 2; + break; + + case seq::NEGE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e = sbc16(0, m_e, !BIT(m_fetch_pipe[2], 1)); + advance(); + m_icount -= 2; + break; + + case seq::NEGW_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::NEGW_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::NEGW_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::NEGW_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::NEGW_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::NEGW_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_ea = (m_ea - 1) & 0xfffff; + m_sequence = seq::NEGW_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::NEGW_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = sbc16(0, m_tmp, !BIT(m_fetch_pipe[2], 1)); + set_nzv16(m_tmp, false); + m_sequence = seq::STORE16_EA; + m_icount -= 2; + break; + + case seq::NEGW_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::NEGW_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORAA_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::ORAA_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORAA_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ORAA_IND8_3; + m_icount -= 2; + break; + + case seq::ORAA_IND8_3: + m_d |= m_tmp << 8; + set_nzv8(m_d >> 8, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ORAA_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d |= m_fetch_pipe[2] << 8; + set_nzv8(m_d >> 8, false); + advance(); + m_icount -= 2; + break; + + case seq::ORAA_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ORAA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORAA_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ORAA_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ORAA_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d |= m_tmp << 8; + set_nzv8(m_d >> 8, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ORAA_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ORAA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORAA_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::ORAA_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORAB_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::ORAB_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORAB_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ORAB_IND8_3; + m_icount -= 2; + break; + + case seq::ORAB_IND8_3: + m_d |= m_tmp & 0x00ff; + set_nzv8(m_d & 0x00ff, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ORAB_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d |= m_fetch_pipe[2] & 0x00ff; + set_nzv8(m_d & 0x00ff, false); + advance(); + m_icount -= 2; + break; + + case seq::ORAB_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ORAB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORAB_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ORAB_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ORAB_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d |= m_tmp & 0x00ff; + set_nzv8(m_d & 0x00ff, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ORAB_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ORAB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORAB_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::ORAB_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORD_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::ORD_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORD_IND8_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::ORD_IND8_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::ORD_IND8_3; + } + m_icount -= 2; + break; + + case seq::ORD_IND8_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::ORD_IND8_3; + m_icount -= 2; + break; + + case seq::ORD_IND8_3: + m_d |= m_tmp; + set_nzv16(m_d, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ORD_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::ORD_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::ORD_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ORD_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORD_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::ORD_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::ORD_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::ORD_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::ORD_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ORD_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d |= m_tmp; + set_nzv16(m_tmp, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ORD_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ORD_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORD_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::ORD_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORE_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::ORE_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::ORE_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ORE_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORE_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::ORE_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::ORE_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::ORE_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::ORE_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ORE_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e &= m_tmp; + set_nzv16(m_e, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ORE_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ORE_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ORP: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ccr |= m_fetch_pipe[1] & 0xfff0; // PK is unaffected + m_sequence = seq::PREFETCH_2; // TODO: prohibit interrupts + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::PSHA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[3] + 1) & 0xfffff; + m_tmp = m_d >> 8; + m_sequence = seq::PSHA_2; + m_start = false; + m_icount -= 2; + break; + + case seq::PSHA_2: + m_data.write_word(m_ea, m_tmp | (m_tmp << 8), BIT(m_ea, 0) ? 0x00ff : 0xff00); + m_index_regs[3] = (m_ea - 2) & 0xfffff; // these instructions may leave the stack pointer misaligned + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::PSHB: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[3] + 1) & 0xfffff; + m_tmp = m_d & 0x00ff; + m_sequence = seq::PSHA_2; + m_start = false; + m_icount -= 2; + break; + + case seq::PSHM: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_start = false; + pshm_step(0); + m_icount -= 2; + break; + + case seq::PSHM_0: + case seq::PSHM_1: + case seq::PSHM_2: + case seq::PSHM_3: + case seq::PSHM_4: + case seq::PSHM_5: + case seq::PSHM_6: + if (BIT(m_index_regs[3], 0)) + { + m_data.write_word(m_index_regs[3], (m_tmp & 0xff00) | (m_tmp >> 8), 0x00ff); + m_index_regs[3] = (m_index_regs[3] + 1) & 0xfffff; + m_sequence = static_cast<seq>(static_cast<int>(m_sequence) - static_cast<int>(seq::PSHM_0) + static_cast<int>(seq::PSHM_0B)); + } + else + { + m_data.write_word(m_index_regs[3], m_tmp); + m_index_regs[3] = (m_index_regs[3] - 2) & 0xfffff; + pshm_step(static_cast<int>(m_sequence) - static_cast<int>(seq::PSHM_0) + 1); + } + m_icount -= 2; + break; + + case seq::PSHM_0B: + case seq::PSHM_1B: + case seq::PSHM_2B: + case seq::PSHM_3B: + case seq::PSHM_4B: + case seq::PSHM_5B: + case seq::PSHM_6B: + m_data.write_word(m_index_regs[3], (m_tmp & 0x00ff) | (m_tmp << 8), BIT(m_ea, 0) ? 0x00ff : 0xff00); + pshm_step(static_cast<int>(m_sequence) - static_cast<int>(seq::PSHM_0B) + 1); + m_icount -= 2; + break; + + case seq::PSHM_8: + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::PULA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[3] + 2) & 0xfffff; + m_sequence = seq::PULA_2; + m_start = false; + m_icount -= 2; + break; + + case seq::PULA_2: + m_tmp = m_data.read_byte(m_ea); + m_index_regs[3] = (m_ea - 1) & 0xfffff; + m_sequence = seq::PULA_3; + m_icount -= 2; + break; + + case seq::PULA_3: + set_a(m_tmp); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::PULB: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[3] + 2) & 0xfffff; + m_sequence = seq::PULB_2; + m_start = false; + m_icount -= 2; + break; + + case seq::PULB_2: + m_tmp = m_data.read_byte(m_ea); + m_index_regs[3] = (m_ea - 1) & 0xfffff; + m_sequence = seq::PULB_3; + m_icount -= 2; + break; + + case seq::PULB_3: + set_b(m_tmp); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::PULM: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[3] + 2) & 0xfffff; + m_sequence = seq::PULM_0; + m_start = false; + m_icount -= 2; + break; + + case seq::PULM_0: + case seq::PULM_1: + case seq::PULM_2: + case seq::PULM_3: + case seq::PULM_4: + case seq::PULM_5: + case seq::PULM_6: + case seq::PULM_7: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = static_cast<seq>(static_cast<int>(m_sequence) - static_cast<int>(seq::PULM_0) + static_cast<int>(seq::PULM_0B)); + } + else + { + m_tmp = m_data.read_word(m_ea); + m_ea = (m_ea + 2) & 0xfffff; + pulm_step(static_cast<int>(m_sequence) - static_cast<int>(seq::PULM_0)); + } + m_icount -= 2; + break; + + case seq::PULM_0B: + case seq::PULM_1B: + case seq::PULM_2B: + case seq::PULM_3B: + case seq::PULM_4B: + case seq::PULM_5B: + case seq::PULM_6B: + case seq::PULM_7B: + m_tmp = u16(m_tmp) << 8 | m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + pulm_step(static_cast<int>(m_sequence) - static_cast<int>(seq::PULM_0B)); + m_icount -= 2; + break; + + case seq::PULM_8: + // The algorithm overshoots and reads one word too many... as documented + m_index_regs[3] = (m_ea - 4) & 0xfffff; + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::ROL_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::ROL_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ROL_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ROL_IND8_3; + m_icount -= 2; + break; + + case seq::ROL_IND8_3: + m_tmp = rol8(m_tmp, BIT(m_fetch_pipe[2], 11) && BIT(m_ccr, 8)); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::ROL_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ROL_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ROL_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ROL_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ROL_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = rol8(m_tmp, BIT(m_fetch_pipe[2], 3) && BIT(m_ccr, 8)); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::ROL_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ROL_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ROLA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_a(rol8(m_d >> 8, BIT(m_fetch_pipe[2], 3) && BIT(m_ccr, 8))); + advance(); + m_icount -= 2; + break; + + case seq::ROLB: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b(rol8(m_d & 0x00ff, BIT(m_fetch_pipe[2], 3) && BIT(m_ccr, 8))); + advance(); + m_icount -= 2; + break; + + case seq::ROLD: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d = rol16(m_d, BIT(m_fetch_pipe[2], 3) && BIT(m_ccr, 8)); + advance(); + m_icount -= 2; + break; + + case seq::ROLE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e = rol16(m_e, BIT(m_fetch_pipe[2], 3) && BIT(m_ccr, 8)); + advance(); + m_icount -= 2; + break; + + case seq::ROR_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::ROR_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ROR_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ROR_IND8_3; + m_icount -= 2; + break; + + case seq::ROR_IND8_3: + m_tmp = ror8(m_tmp, !BIT(m_fetch_pipe[2], 8) && BIT(m_ccr, 8)); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::ROR_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::ROR_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::ROR_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::ROR_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::ROR_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = ror8(m_tmp, !BIT(m_fetch_pipe[2], 0) && BIT(m_ccr, 8)); + m_sequence = seq::STORE8_EA; + m_icount -= 2; + break; + + case seq::ROR_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::ROR_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::RORA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_a(ror8(m_d >> 8, !BIT(m_fetch_pipe[2], 0) && BIT(m_ccr, 8))); + advance(); + m_icount -= 2; + break; + + case seq::RORB: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b(ror8(m_d & 0x00ff, !BIT(m_fetch_pipe[2], 0) && BIT(m_ccr, 8))); + advance(); + m_icount -= 2; + break; + + case seq::RORD: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d = ror16(m_d, !BIT(m_fetch_pipe[2], 0) && BIT(m_ccr, 8)); + advance(); + m_icount -= 2; + break; + + case seq::RORE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e = ror16(m_e, !BIT(m_fetch_pipe[2], 0) && BIT(m_ccr, 8)); + advance(); + m_icount -= 2; + break; + + case seq::RTS: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_index_regs[3] = (m_index_regs[3] + 2) & 0xfffff; + m_sequence = seq::RTS_2; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::RTS_2: + if (BIT(m_index_regs[3], 0)) + { + m_tmp = m_data.read_byte(m_index_regs[3]); + m_index_regs[3] = (m_index_regs[3] + 1) & 0xfffff; + m_sequence = seq::RTS_2B; + } + else + { + m_ea = u32(m_data.read_word(m_index_regs[3])) << 16; + m_index_regs[3] = (m_index_regs[3] + 2) & 0xfffff; + m_sequence = seq::RTS_3; + } + m_icount -= 2; + break; + + case seq::RTS_2B: + m_ea = (m_tmp << 8 | m_data.read_byte(m_index_regs[3])) << 16; + m_index_regs[3] = (m_index_regs[3] + 1) & 0xfffff; + m_sequence = seq::RTS_3; + m_icount -= 2; + break; + + case seq::RTS_3: + if (BIT(m_index_regs[3], 0)) + { + m_tmp = m_data.read_byte(m_index_regs[3]); + m_index_regs[3] = (m_index_regs[3] + 1) & 0xfffff; + m_sequence = seq::RTS_3B; + } + else + { + m_ea |= m_data.read_word(m_index_regs[3]); + m_sequence = seq::RTS_4; + } + m_icount -= 2; + break; + + case seq::RTS_3B: + m_ea |= m_tmp << 8 | m_data.read_byte(m_index_regs[3]); + m_index_regs[3] = (m_index_regs[3] - 1) & 0xfffff; + m_sequence = seq::RTS_4; + m_icount -= 2; + break; + + case seq::RTS_4: + set_pc(m_ea - 2); + m_sequence = seq::PREFETCH_1; + m_icount -= 2; + break; + + case seq::SBA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_a(sbc8(m_d >> 8, m_d & 0x00ff, false)); + advance(); + m_icount -= 2; + break; + + case seq::SDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e = sbc16(m_e, m_d, false); + advance(); + m_icount -= 2; + break; + + case seq::STAA_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = (m_d & 0xff00) >> 8; + set_nzv8(m_tmp, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::STORE8_EA; + m_start = false; + m_icount -= 2; + break; + + case seq::STAA_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = (m_d & 0xff00) >> 8; + set_nzv8(m_tmp, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::STORE8_EXT; + m_start = false; + m_icount -= 2; + break; + + case seq::STAA_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = (m_d & 0xff00) >> 8; + set_nzv8(m_tmp, false); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::STORE8_EXT; + m_start = false; + m_icount -= 2; + break; + + case seq::STAA_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = (m_d & 0xff00) >> 8; + set_nzv8(m_tmp, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::STORE8_EA; + m_start = false; + m_icount -= 2; + break; + + case seq::STAB_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_d & 0x00ff; + set_nzv8(m_tmp, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::STORE8_EA; + m_start = false; + m_icount -= 2; + break; + + case seq::STAB_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_d & 0x00ff; + set_nzv8(m_tmp, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::STORE8_EXT; + m_start = false; + m_icount -= 2; + break; + + case seq::STAB_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_d & 0x00ff; + set_nzv8(m_tmp, false); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::STORE8_EXT; + m_start = false; + m_icount -= 2; + break; + + case seq::STAB_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_d & 0x00ff; + set_nzv8(m_tmp, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::STORE8_EA; + m_start = false; + m_icount -= 2; + break; + + case seq::STD_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_d; + set_nzv16(m_d, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::STORE16_EA; + m_start = false; + m_icount -= 2; + break; + + case seq::STD_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_d; + set_nzv16(m_d, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::STORE16_EXT; + m_start = false; + m_icount -= 2; + break; + + case seq::STD_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_d; + set_nzv16(m_d, false); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::STORE16_EXT; + m_start = false; + m_icount -= 2; + break; + + case seq::STD_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_d; + set_nzv16(m_d, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::STORE16_EA; + m_start = false; + m_icount -= 2; + break; + + case seq::STE_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_e; + set_nzv16(m_e, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::STORE16_EXT; + m_start = false; + m_icount -= 2; + break; + + case seq::STE_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_e; + set_nzv16(m_e, false); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::STORE16_EXT; + m_start = false; + m_icount -= 2; + break; + + case seq::STED: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_e; + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::STED_2; + m_start = false; + m_icount -= 2; + break; + + case seq::STED_2: + if (BIT(m_ea, 0)) + { + m_data.write_word(m_ea, (m_tmp & 0xff00) | (m_tmp >> 8), 0x00ff); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::STED_2B; + } + else + { + m_data.write_word(m_ea, m_tmp); + m_tmp = m_d; + m_ea = (m_ea + 2) & 0xfffff; + m_sequence = seq::STORE16_EXT; + } + m_icount -= 2; + break; + + case seq::STED_2B: + m_data.write_word(m_ea, (m_tmp & 0x00ff) | (m_tmp << 8), 0xff00); + m_ea = (m_ea + 1) & 0xfffff; + m_tmp = m_d; + m_sequence = seq::STORE16_EXT; + m_icount -= 2; + break; + + case seq::STX_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = get_ix(BIT(m_fetch_pipe[2], 8, 2)); + set_nzv16(m_tmp, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::STORE16_EA; + m_start = false; + m_icount -= 2; + break; + + case seq::STX_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = get_ix(BIT(m_fetch_pipe[2], 0, 2)); + set_nzv16(m_tmp, false); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::STORE16_EXT; + m_start = false; + m_icount -= 2; + break; + + case seq::STX_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = get_ix(BIT(m_fetch_pipe[2], 0, 2)); + set_nzv16(m_tmp, false); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::STORE16_EXT; + m_start = false; + m_icount -= 2; + break; + + case seq::SUBA_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::SUBA_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::SUBA_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::SUBA_IND8_3; + m_icount -= 2; + break; + + case seq::SUBA_IND8_3: + set_a(sbc8(m_d >> 8, m_tmp, BIT(m_fetch_pipe[2], 9) && BIT(m_ccr, 8))); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::SUBA_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_a(sbc8(m_d >> 8, m_fetch_pipe[2] & 0x00ff, BIT(m_fetch_pipe[2], 9) && BIT(m_ccr, 8))); + advance(); + m_icount -= 2; + break; + + case seq::SUBA_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::SUBA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::SUBA_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::SUBA_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::SUBA_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_a(sbc8(m_d >> 8, m_tmp, BIT(m_fetch_pipe[2], 1) && BIT(m_ccr, 8))); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::SUBA_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::SUBA_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::SUBA_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::SUBA_INDE_2; + m_start = false; + m_icount -= 2; + break; + + case seq::SUBA_INDE_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::SUBA_INDE_3; + m_icount -= 2; + break; + + case seq::SUBA_INDE_3: + set_a(sbc8(m_d >> 8, m_tmp, BIT(m_fetch_pipe[2], 1) && BIT(m_ccr, 8))); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::SUBB_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::SUBB_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::SUBB_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::SUBB_IND8_3; + m_icount -= 2; + break; + + case seq::SUBB_IND8_3: + set_b(sbc8(m_d & 0x00ff, m_tmp, BIT(m_fetch_pipe[2], 9) && BIT(m_ccr, 8))); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::SUBB_IMM8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b(sbc8(m_d & 0x00ff, m_fetch_pipe[2] & 0x00ff, BIT(m_fetch_pipe[2], 9) && BIT(m_ccr, 8))); + advance(); + m_icount -= 2; + break; + + case seq::SUBB_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::SUBB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::SUBB_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::SUBB_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::SUBB_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b(sbc8(m_d & 0x00ff, m_tmp, BIT(m_fetch_pipe[2], 1) && BIT(m_ccr, 8))); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::SUBB_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::SUBB_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::SUBB_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::SUBB_INDE_2; + m_start = false; + m_icount -= 2; + break; + + case seq::SUBB_INDE_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::SUBB_INDE_3; + m_icount -= 2; + break; + + case seq::SUBB_INDE_3: + set_b(sbc8(m_d & 0x00ff, m_tmp, BIT(m_fetch_pipe[2], 1) && BIT(m_ccr, 8))); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::SUBD_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::SUBD_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::SUBD_IND8_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::SUBD_IND8_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::SUBD_IND8_3; + } + m_icount -= 2; + break; + + case seq::SUBD_IND8_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::SUBD_IND8_3; + m_icount -= 2; + break; + + case seq::SUBD_IND8_3: + m_d = sbc16(m_d, m_tmp, BIT(m_fetch_pipe[2], 9) && BIT(m_ccr, 8)); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::SUBD_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::SUBD_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::SUBD_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::SUBD_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::SUBD_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::SUBD_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::SUBD_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::SUBD_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::SUBD_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::SUBD_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d = sbc16(m_d, m_tmp, BIT(m_fetch_pipe[2], 1) && BIT(m_ccr, 8)); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::SUBD_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::SUBD_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::SUBD_INDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_e)) & 0xfffff; + m_sequence = seq::SUBD_INDE_2; + m_start = false; + m_icount -= 2; + break; + + case seq::SUBD_INDE_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::SUBD_IND8_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::SUBD_INDE_3; + } + m_icount -= 2; + break; + + case seq::SUBD_INDE_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::SUBD_INDE_3; + m_icount -= 2; + break; + + case seq::SUBD_INDE_3: + m_d = sbc16(m_d, m_tmp, BIT(m_fetch_pipe[2], 1) && BIT(m_ccr, 8)); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::SUBE_IMM16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_tmp = m_fetch_pipe[1]; + m_sequence = seq::SUBE_IND16_3; + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::SUBE_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::SUBE_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::SUBE_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::SUBE_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::SUBE_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::SUBE_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::SUBE_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::SUBE_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e = sbc16(m_e, m_tmp, BIT(m_fetch_pipe[2], 1) && BIT(m_ccr, 8)); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::SUBE_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u32(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::SUBE_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::SXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d = s16(s8(m_d & 0x00ff)); + set_nzv16(m_d, BIT(m_ccr, 9)); // V is unaffected + advance(); + m_icount -= 2; + break; + + case seq::TAB: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b(m_d >> 8); + set_nzv8(m_d & 0x00ff, false); + advance(); + m_icount -= 2; + break; + + case seq::TAP: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ccr = (m_d & 0xff00) | (m_ccr & 0x00ff); + m_sequence = seq::PREFETCH_2; // TODO: prohibit interrupts + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::TBA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_a(m_d & 0x00ff); + set_nzv8(m_d & 0x00ff, false); + advance(); + m_icount -= 2; + break; + + case seq::TBEK: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ek = m_d & 0x000f; + advance(); + m_icount -= 2; + break; + + case seq::TBXK: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_xk(BIT(m_fetch_pipe[2], 0, 2), m_d & 0x000f); + advance(); + m_icount -= 2; + break; + + case seq::TDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_e = m_d; + set_nzv16(m_d, false); + advance(); + m_icount -= 2; + break; + + case seq::TDMSK: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_index_mask[0] = m_d >> 8; + m_index_mask[1] = m_d & 0x00ff; + advance(); + m_icount -= 2; + break; + + case seq::TDP: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ccr = (m_d & 0xfff0) | (m_ccr & 0x000f); // PK is unaffected + m_sequence = seq::PREFETCH_2; // TODO: prohibit interrupts + m_start = false; + advance(); + m_icount -= 2; + break; + + case seq::TED: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d = m_e; + set_nzv16(m_e, false); + advance(); + m_icount -= 2; + break; + + case seq::TEKB: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b(m_ek); + advance(); + m_icount -= 2; + break; + + case seq::TPA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_a(m_ccr >> 8); + advance(); + m_icount -= 2; + break; + + case seq::TPD: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d = m_ccr; + advance(); + m_icount -= 2; + break; + + case seq::TST_IND8: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 12, 2)] + (m_fetch_pipe[2] & 0x00ff)) & 0xfffff; + m_sequence = seq::TST_IND8_2; + m_start = false; + m_icount -= 2; + break; + + case seq::TST_IND8_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::TST_IND8_3; + m_icount -= 2; + break; + + case seq::TST_IND8_3: + (void)sbc8(m_tmp, 0, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::TST_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::TST_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::TST_IND16_2: + m_tmp = m_data.read_byte(m_ea); + m_sequence = seq::TST_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::TST_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + (void)sbc8(m_tmp, 0, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::TST_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::TST_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::TSTA: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + (void)sbc8((m_d & 0xff00) >> 8, 0, false); + advance(); + m_icount -= 2; + break; + + case seq::TSTB: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + (void)sbc8(m_d & 0x00ff, 0, false); + advance(); + m_icount -= 2; + break; + + case seq::TSTD: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + (void)sbc16(m_d, 0, false); + advance(); + m_icount -= 2; + break; + + case seq::TSTE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + (void)sbc16(m_e, 0, false); + advance(); + m_icount -= 2; + break; + + case seq::TSTW_IND16: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] + s16(m_fetch_pipe[1])) & 0xfffff; + m_sequence = seq::TSTW_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::TSTW_IND16_2: + if (BIT(m_ea, 0)) + { + m_tmp = m_data.read_byte(m_ea); + m_ea = (m_ea + 1) & 0xfffff; + m_sequence = seq::TSTW_IND16_2B; + } + else + { + m_tmp = m_data.read_word(m_ea); + m_sequence = seq::TSTW_IND16_3; + advance(); + } + m_icount -= 2; + break; + + case seq::TSTW_IND16_2B: + m_tmp = m_tmp << 8 | m_data.read_byte(m_ea); + m_sequence = seq::TSTW_IND16_3; + advance(); + m_icount -= 2; + break; + + case seq::TSTW_IND16_3: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + (void)sbc16(m_tmp, 0, false); + m_start = true; + advance(); + m_icount -= 2; + break; + + case seq::TSTW_EXT: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_ea = u16(m_ek) << 16 | m_fetch_pipe[1]; + m_sequence = seq::TSTW_IND16_2; + m_start = false; + m_icount -= 2; + break; + + case seq::TSX: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] = (m_index_regs[3] + 2) & 0xfffff; + advance(); + m_icount -= 2; + break; + + case seq::TXKB: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_b(get_xk(BIT(m_fetch_pipe[2], 0, 2))); + advance(); + m_icount -= 2; + break; + + case seq::TXS: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_index_regs[3] = (m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] - 2) & 0xfffff; + advance(); + m_icount -= 2; + break; + + case seq::TXX: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_index_regs[BIT(m_fetch_pipe[2], 4, 2)] = m_index_regs[BIT(m_fetch_pipe[2], 0, 2)]; + advance(); + m_icount -= 2; + break; + + case seq::XGAB: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + m_d = swapendian_int16(m_d); + advance(); + m_icount -= 2; + break; + + case seq::XGDE: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + std::swap(m_d, m_e); + advance(); + m_icount -= 2; + break; + + case seq::XGDX: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_ix(BIT(m_fetch_pipe[2], 4, 2), std::exchange(m_d, get_ix(BIT(m_fetch_pipe[2], 4, 2)))); + advance(); + m_icount -= 2; + break; + + case seq::XGEX: + m_fetch_pipe[0] = m_cache.read_word(m_pc); + set_ix(BIT(m_fetch_pipe[2], 4, 2), std::exchange(m_e, get_ix(BIT(m_fetch_pipe[2], 4, 2)))); + advance(); + m_icount -= 2; + break; + } + } } void cpu16_device::execute_set_input(int inputnum, int state) diff --git a/src/devices/cpu/m68hc16/cpu16.h b/src/devices/cpu/m68hc16/cpu16.h index 5e2616a4470..dac6fe7db53 100644 --- a/src/devices/cpu/m68hc16/cpu16.h +++ b/src/devices/cpu/m68hc16/cpu16.h @@ -33,6 +33,8 @@ protected: virtual void device_reset() override; // device_execute_interface overrides + virtual u32 execute_min_cycles() const noexcept override { return 2; } + virtual u32 execute_max_cycles() const noexcept override { return 2; } virtual void execute_run() override; virtual void execute_set_input(int inputnum, int state) override; @@ -46,12 +48,46 @@ protected: virtual void state_string_export(const device_state_entry &entry, std::string &str) const override; private: + enum class seq : u16; + static const seq s_inst_decode[4][256]; + // register helpers void debug_set_pcbase(u32 value); - void debug_set_pc(u32 value); + void set_pc(u32 value) noexcept; void debug_set_ccr(u16 value); u16 get_k() noexcept; void set_k(u16 value) noexcept; + u16 get_ix(int which) const noexcept; + void set_ix(int which, u16 value) noexcept; + u8 get_xk(int which) const noexcept; + void set_xk(int which, u8 value) noexcept; + void set_a(u8 value) noexcept; + void set_b(u8 value) noexcept; + + // arithmetic and condition code helpers + void set_nzv8(u8 data, bool v) noexcept; + void set_nzv16(u16 data, bool v) noexcept; + void set_z16(u16 data) noexcept; + u8 adc8(u8 data1, u8 data2, bool cin) noexcept; + u8 sbc8(u8 data1, u8 data2, bool cin) noexcept; + u16 adc16(u16 data1, u16 data2, bool cin) noexcept; + u16 sbc16(u16 data1, u16 data2, bool cin) noexcept; + u8 rol8(u8 data, bool cin) noexcept; + u16 rol16(u16 data, bool cin) noexcept; + u8 ror8(u8 data, bool cin) noexcept; + u16 ror16(u16 data, bool cin) noexcept; + u8 asr8(u8 data) noexcept; + u16 asr16(u16 data) noexcept; + void mulu8() noexcept; + void mulu16() noexcept; + void muls16(bool frac) noexcept; + void divu16(bool frac) noexcept; + + // misc. execution helpers + void advance() noexcept; + void pshm_step(int n); + void pulm_step(int n); + bool cc_test(u8 cc) const noexcept; // address spaces address_space_config m_program_config; @@ -67,8 +103,7 @@ private: u16 m_d; u16 m_e; u8 m_ek; - u32 m_index_regs[3]; - u32 m_sp; + u32 m_index_regs[4]; // MAC registers u16 m_hr; @@ -78,6 +113,10 @@ private: u8 m_index_mask[2]; // misc. state + seq m_sequence; + u32 m_ea; + u16 m_tmp; + bool m_start; s32 m_icount; }; @@ -86,6 +125,9 @@ class mc68hc16z1_device : public cpu16_device public: // device type constructor mc68hc16z1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +private: + void internal_map(address_map &map); }; // device type declaration diff --git a/src/devices/cpu/m68hc16/cpu16dasm.cpp b/src/devices/cpu/m68hc16/cpu16dasm.cpp index 7523afcbc5e..3d646639058 100644 --- a/src/devices/cpu/m68hc16/cpu16dasm.cpp +++ b/src/devices/cpu/m68hc16/cpu16dasm.cpp @@ -9,6 +9,10 @@ the 8-bit direct mode no longer exists. The use of PC+6 as the base for relative jump destinations is an artifact of pipelining. + For whatever reason, Motorola's assembler chose to retain LSL, LSLA, + LSLB, etc. as mnemonic aliases for ASL, ASLA, ASLB and so on, but + eliminated BHS and BLO as alternate mnemonics for BCC and BCS. + ***************************************************************************/ #include "emu.h" @@ -361,8 +365,8 @@ const cpu16_disassembler::opcode_info cpu16_disassembler::s_opinfo[4][256] = { "clr", cpu16_disassembler::mode::IND, 0 }, { "tst", cpu16_disassembler::mode::IND, 0 }, { "", cpu16_disassembler::mode::UND, 0 }, - { "bclr", cpu16_disassembler::mode::IND, 0 }, - { "bset", cpu16_disassembler::mode::IND, 0 }, + { "bclr", cpu16_disassembler::mode::BIT, 0 }, + { "bset", cpu16_disassembler::mode::BIT, 0 }, { "", cpu16_disassembler::mode::UND, 0 }, { "", cpu16_disassembler::mode::UND, 0 }, { "rol", cpu16_disassembler::mode::IND, 0 }, @@ -804,10 +808,10 @@ const cpu16_disassembler::opcode_info cpu16_disassembler::s_opinfo[4][256] = { "", cpu16_disassembler::mode::UND, 0 }, // 27BX - { "ldhi", cpu16_disassembler::mode::EXT, 0 }, + { "ldhi", cpu16_disassembler::mode::INH, 0 }, { "tedm", cpu16_disassembler::mode::INH, 0 }, { "tem", cpu16_disassembler::mode::INH, 0 }, - { "tmexd", cpu16_disassembler::mode::INH, 0 }, + { "tmxed", cpu16_disassembler::mode::INH, 0 }, { "tmer", cpu16_disassembler::mode::INH, 0 }, { "tmet", cpu16_disassembler::mode::INH, 0 }, { "aslm", cpu16_disassembler::mode::INH, 0 }, @@ -951,7 +955,7 @@ const cpu16_disassembler::opcode_info cpu16_disassembler::s_opinfo[4][256] = // 373X { "sube", cpu16_disassembler::mode::IMM, 0 }, { "adde", cpu16_disassembler::mode::IMM, 0 }, - { "sbcd", cpu16_disassembler::mode::IMM, 0 }, + { "sbce", cpu16_disassembler::mode::IMM, 0 }, { "adce", cpu16_disassembler::mode::IMM, 0 }, { "eore", cpu16_disassembler::mode::IMM, 0 }, { "lde", cpu16_disassembler::mode::IMM, 0 }, diff --git a/src/devices/machine/steppers.cpp b/src/devices/machine/steppers.cpp index 0350017d976..6f1e8cf8369 100644 --- a/src/devices/machine/steppers.cpp +++ b/src/devices/machine/steppers.cpp @@ -403,6 +403,38 @@ void reel_device::advance_phase() break; } break; + + case SRU_200STEP_REEL : + //Standard drive table is 2,3,1,9,8,c,4,6 + //Starpoint mechanism, custom for JPM? + switch (m_pattern) + { + case 0x02: + m_phase = 7; + break; + case 0x03: + m_phase = 6; + break; + case 0x01: + m_phase = 5; + break; + case 0x09: + m_phase = 4; + break; + case 0x08: + m_phase = 3; + break; + case 0x0c: + m_phase = 2; + break; + case 0x04: + m_phase = 1; + break; + case 0x06: + m_phase = 0; + break; + } + break; case PROJECT_48STEP_REEL : //Standard drive table is 8,c,4,5,1,3,2,a diff --git a/src/devices/machine/steppers.h b/src/devices/machine/steppers.h index 53317c37e71..3a07de01d62 100644 --- a/src/devices/machine/steppers.h +++ b/src/devices/machine/steppers.h @@ -33,6 +33,8 @@ #define PROJECT_48STEP_REEL 10 +#define SRU_200STEP_REEL 11 + class stepper_device : public device_t { @@ -134,6 +136,7 @@ protected: case STARPOINT_200STEP_REEL : case GAMESMAN_200STEP_REEL : case ECOIN_200STEP_REEL : + case SRU_200STEP_REEL : m_max_steps = (200*2); break; } diff --git a/src/devices/sound/upd7759.cpp b/src/devices/sound/upd7759.cpp index 1e9a98b8a3d..36738f029a5 100644 --- a/src/devices/sound/upd7759.cpp +++ b/src/devices/sound/upd7759.cpp @@ -390,8 +390,6 @@ void upd775x_device::advance_state() { // Idle state: we stick around here while there's nothing to do case STATE_IDLE: - // If we have dropped back to idle state we always switch back to stand alone mode - m_mode = MODE_STAND_ALONE; m_clocks_left = 4; break; @@ -678,7 +676,7 @@ void upd7759_device::internal_start_w(int state) m_channel->update(); - if (m_state == STATE_IDLE && oldstart && !m_start && m_reset) + if (m_state == STATE_IDLE && m_mode == MODE_STAND_ALONE && oldstart && !m_start && m_reset) { m_state = STATE_START; @@ -725,11 +723,18 @@ void upd7759_device::internal_md_w(int state) m_channel->update(); - if (m_state == STATE_IDLE && old_md && !m_md && m_reset) + if (m_state == STATE_IDLE && m_reset) { - m_mode = MODE_SLAVE; - m_state = STATE_START; - m_timer->adjust(attotime::zero); + if (old_md && !m_md) + { + m_mode = MODE_SLAVE; + m_state = STATE_START; + m_timer->adjust(attotime::zero); + } + else if (!old_md && m_md) + { + m_mode = MODE_STAND_ALONE; + } } } diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index 743d8c3cdec..cb09afb134f 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -1220,8 +1220,8 @@ void slot_option::set_bios(std::string &&text) { if (!m_specified) { - m_specified = true; m_specified_value = value(); + m_specified = true; } m_specified_bios = std::move(text); } diff --git a/src/lib/formats/acorn_dsk.cpp b/src/lib/formats/acorn_dsk.cpp index 002c3aa1d37..3b9df1a585d 100644 --- a/src/lib/formats/acorn_dsk.cpp +++ b/src/lib/formats/acorn_dsk.cpp @@ -55,12 +55,12 @@ int acorn_ssd_format::find_size(util::random_read &io, uint32_t form_factor, con // test for Torch CPN - test pattern at sector &0018 io.read_at(0x32800, cat, 8, actual); - if (memcmp(cat, "\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd", 4) == 0 && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count) + if (memcmp(cat, "\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd", 8) == 0 && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count) return i; // test for HADFS - test pattern at sector 70 io.read_at(0x04610, cat, 8, actual); - if (memcmp(cat, "\x00\x28\x43\x29\x4a\x47\x48\x00", 4) == 0 && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count) + if (memcmp(cat, "\x00\x28\x43\x29\x4a\x47\x48\x00", 8) == 0 && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count) return i; // test for Kenda SD - offset &0962 = 0 SD/1 DD, offset &0963 = disk size blocks / 4 (block size = 1K, ie. 0x400 bytes), reserved tracks = 3, ie. 0x1e00 bytes, soft stagger = 2 sectors, ie. 0x200 bytes @@ -113,7 +113,7 @@ int acorn_ssd_format::identify(util::random_read &io, uint32_t form_factor, cons int type = find_size(io, form_factor, variants); if (type != -1) - return FIFID_SIZE; + return FIFID_SIZE | FIFID_STRUCT; return 0; } @@ -207,14 +207,19 @@ int acorn_dsd_format::find_size(util::random_read &io, uint32_t form_factor, con // test for Torch CPN - test pattern at sector &0018 io.read_at(0x1200, cat, 8, actual); - if (memcmp(cat, "\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd", 4) == 0 && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count) + if (memcmp(cat, "\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd", 8) == 0 && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count) return i; // test for HADFS - test pattern at sector 70 io.read_at(0x08c10, cat, 8, actual); - if (memcmp(cat, "\x00\x28\x43\x29\x4a\x47\x48\x00", 4) == 0 && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count) + if (memcmp(cat, "\x00\x28\x43\x29\x4a\x47\x48\x00", 8) == 0 && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count) return i; + // test for FLEX - from System Information Record + io.read_at(0x0226, cat, 2, actual); + if ((memcmp(cat, "\x4f\x14", 2) == 0 || memcmp(cat, "\x4f\x0a", 2) == 0) && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count) + return i; + // read sector count from side 0 catalogue io.read_at(0x100, cat, 8, actual); sectors0 = ((cat[6] & 3) << 8) + cat[7]; @@ -246,7 +251,7 @@ int acorn_dsd_format::identify(util::random_read &io, uint32_t form_factor, cons int type = find_size(io, form_factor, variants); if (type != -1) - return FIFID_SIZE; + return FIFID_STRUCT | FIFID_SIZE; return 0; } @@ -351,7 +356,7 @@ int opus_ddos_format::identify(util::random_read &io, uint32_t form_factor, cons int type = find_size(io, form_factor, variants); if (type != -1) - return FIFID_SIZE; + return FIFID_STRUCT | FIFID_SIZE; return 0; } @@ -448,7 +453,7 @@ int acorn_adfs_old_format::identify(util::random_read &io, uint32_t form_factor, int type = find_size(io, form_factor, variants); if(type != -1) - return FIFID_SIZE; + return FIFID_STRUCT | FIFID_SIZE; return 0; } @@ -552,7 +557,7 @@ int acorn_adfs_new_format::identify(util::random_read &io, uint32_t form_factor, int type = find_size(io, form_factor, variants); if (type != -1) - return FIFID_SIZE; + return FIFID_STRUCT | FIFID_SIZE; return 0; } @@ -633,7 +638,7 @@ int acorn_dos_format::identify(util::random_read &io, uint32_t form_factor, cons int type = find_size(io, form_factor, variants); if (type != -1) - return FIFID_SIZE; + return FIFID_STRUCT | FIFID_SIZE; return 0; } diff --git a/src/mame/audio/fruitsamples.cpp b/src/mame/audio/fruitsamples.cpp new file mode 100644 index 00000000000..3cf044babce --- /dev/null +++ b/src/mame/audio/fruitsamples.cpp @@ -0,0 +1,63 @@ +// license:BSD-3-Clause +// copyright-holders:SomeRandomGuyIdk +/*************************************************************************** + + Fruit machine mechanical sound samples + +***************************************************************************/ + +#include "emu.h" + +#include "fruitsamples.h" + +#include "speaker.h" + +namespace { + +const char *const fruit_sample_names[fruit_samples_device::SAMPLE_END + 2] = +{ + "*fruitsamples", + "payout", + "meter", + nullptr /* end of array */ +}; + +const uint8_t fruit_sample_channels[fruit_samples_device::SAMPLE_END] = +{ + 0, + 1 +}; + +} // anonymous namespace + + +DEFINE_DEVICE_TYPE(FRUIT_SAMPLES, fruit_samples_device, "fruit_samples", "Fruit machine mechanical samples") + +fruit_samples_device::fruit_samples_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, FRUIT_SAMPLES, tag, owner, clock), + m_samples(*this, "samples") +{ +} + +void fruit_samples_device::device_start() +{ + +} + +void fruit_samples_device::device_add_mconfig(machine_config &config) +{ + SPEAKER(config, "fruitmech").front_center(); + + SAMPLES(config, m_samples); + m_samples->set_channels(2); + m_samples->set_samples_names(fruit_sample_names); + m_samples->add_route(ALL_OUTPUTS, "fruitmech", 1.0); +} + +void fruit_samples_device::play(uint8_t index) +{ + if (index < SAMPLE_END) + m_samples->start(fruit_sample_channels[index], index); + else + fatalerror("fruit_samples_device: Sample index %u out of range\n", index); +} diff --git a/src/mame/audio/fruitsamples.h b/src/mame/audio/fruitsamples.h new file mode 100644 index 00000000000..69125984061 --- /dev/null +++ b/src/mame/audio/fruitsamples.h @@ -0,0 +1,40 @@ +// license:BSD-3-Clause +// copyright-holders:SomeRandomGuyIdk +/*************************************************************************** + + Fruit machine mechanical sound samples + +***************************************************************************/ + +#ifndef MAME_AUDIO_FRUITSAMPLES_H +#define MAME_AUDIO_FRUITSAMPLES_H + +#pragma once + +#include "sound/samples.h" + +class fruit_samples_device : public device_t +{ +public: + fruit_samples_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + + void play(uint8_t index); + + enum + { + SAMPLE_PAYOUT = 0, + SAMPLE_METER, + SAMPLE_END + }; + +protected: + virtual void device_start() override; + virtual void device_add_mconfig(machine_config &config) override; + +private: + required_device<samples_device> m_samples; +}; + +DECLARE_DEVICE_TYPE(FRUIT_SAMPLES, fruit_samples_device) + +#endif // MAME_AUDIO_FRUITSAMPLES_H diff --git a/src/mame/audio/nl_jpmsru.cpp b/src/mame/audio/nl_jpmsru.cpp new file mode 100644 index 00000000000..5560a6a8b9f --- /dev/null +++ b/src/mame/audio/nl_jpmsru.cpp @@ -0,0 +1,64 @@ +// license:CC0 +// copyright-holders:SomeRandomGuyIdk + +#include "netlist/devices/net_lib.h" + +NETLIST_START(jpmsru) + + SOLVER(Solver, 48000) + ANALOG_INPUT(V5, 5) + ANALOG_INPUT(VM5, -5) + + TTL_INPUT(IN1, 0) + TTL_INPUT(IN2, 0) + TTL_INPUT(IN3, 0) + TTL_INPUT(IN4, 0) + TTL_INPUT(IN5, 0) + TTL_INPUT(IN6, 0) + NET_C(V5, IN1.VCC, IN2.VCC, IN3.VCC, IN4.VCC, IN5.VCC, IN6.VCC) + NET_C(GND, IN1.GND, IN2.GND, IN3.GND, IN4.GND, IN5.GND, IN6.GND) + + RES(R1, RES_K(1.5)) + RES(R2, RES_K(1.5)) + RES(R3, RES_K(1.5)) + RES(R4, RES_K(1.5)) + RES(R5, RES_K(1.5)) + RES(R6, RES_K(1.5)) + RES(R7, 470) + POT(R8, RES_K(4.7)) + NET_C(R8.3, GND) + RES(R9, RES_K(6.8)) + RES(R10, 270) + + CAP(C1, CAP_P(1000)) + CAP(C2, CAP_U(0.22)) + + NE566_DIP(IC14) + + NET_C(IN1.Q, R1.1) + NET_C(IN2.Q, R2.1) + NET_C(IN3.Q, R3.1) + NET_C(IN4.Q, R4.1) + NET_C(IN5.Q, R5.1) + NET_C(IN6.Q, R6.1) + NET_C(R1.2, R2.2, R3.2, R4.2, R5.2, R6.2, R7.1, C1.1, IC14.5) + NET_C(R7.2, V5, R8.1) + NET_C(R8.2, R9.1) + NET_C(R9.2, C1.2, IC14.6) + + NET_C(VM5, IC14.1, C2.1) + NET_C(C2.2, IC14.7) + + NET_C(IC14.3, R10.1) + ALIAS(OUT, R10.2) + + NET_C(V5, IC14.8) + + OPTIMIZE_FRONTIER(R1.1, RES_K(1.5), 50) + OPTIMIZE_FRONTIER(R2.1, RES_K(1.5), 50) + OPTIMIZE_FRONTIER(R3.1, RES_K(1.5), 50) + OPTIMIZE_FRONTIER(R4.1, RES_K(1.5), 50) + OPTIMIZE_FRONTIER(R5.1, RES_K(1.5), 50) + OPTIMIZE_FRONTIER(R6.1, RES_K(1.5), 50) + +NETLIST_END() diff --git a/src/mame/audio/nl_jpmsru.h b/src/mame/audio/nl_jpmsru.h new file mode 100644 index 00000000000..fa0d794ddfe --- /dev/null +++ b/src/mame/audio/nl_jpmsru.h @@ -0,0 +1,12 @@ +// license:CC0 +// copyright-holders:SomeRandomGuyIdk +#ifndef MAME_AUDIO_NL_JPMSRU_H +#define MAME_AUDIO_NL_JPMSRU_H + +#pragma once + +#include "netlist/nl_setup.h" + +NETLIST_EXTERNAL(jpmsru) + +#endif // MAME_AUDIO_NL_JPMSRU_H diff --git a/src/mame/drivers/bfcobra.cpp b/src/mame/drivers/bfcobra.cpp index e3b70e87f6c..60eab2fd41d 100644 --- a/src/mame/drivers/bfcobra.cpp +++ b/src/mame/drivers/bfcobra.cpp @@ -2603,9 +2603,8 @@ void bfcobjam_state::genio_w( uint8_t data ) } //bits 1 and 2 are for upd7759 - m_upd7759_int->md_w(0); + m_upd7759_int->md_w(!BIT(data,1)); m_upd7759_int->reset_w(!BIT(data,2)); - m_upd7759_int->start_w(BIT(data,1)); } void bfcobjam_state::upd7759_w(uint8_t data) diff --git a/src/mame/drivers/goldstar.cpp b/src/mame/drivers/goldstar.cpp index 5cff325585c..96c492a5f2a 100644 --- a/src/mame/drivers/goldstar.cpp +++ b/src/mame/drivers/goldstar.cpp @@ -19222,6 +19222,20 @@ void cb3_state::init_cherrys() } } +void cb3_state::init_cb3c() +{ + uint8_t *rom = memregion("maincpu")->base(); + + std::vector<uint8_t> buffer(0x10000); + + memcpy(&buffer[0], rom, 0x10000); + + for (int i = 0; i < 0x10000; i++) + { + rom[i] = buffer[bitswap<24>(i, 23, 22, 21, 20, 19, 18, 17, 16, 10, 11, 12, 9, 15, 0, 14, 13, 8, 7, 6, 5, 4, 3, 2, 1)]; + rom[i] = bitswap<8>(rom[i], 1, 0, 6, 4, 7, 5, 3, 2); + } +} void cb3_state::init_cb3e() { @@ -19587,7 +19601,7 @@ GAMEL( 199?, ncb3, 0, ncb3, ncb3, cb3_state, empty_init GAMEL( 199?, cb3a, ncb3, ncb3, cb3a, cb3_state, empty_init, ROT0, "Dyna", "Cherry Bonus III (ver.1.40, set 2)", 0, layout_cherryb3 ) GAMEL( 199?, cb3, ncb3, ncb3, ncb3, cb3_state, init_cb3, ROT0, "Dyna", "Cherry Bonus III (ver.1.40, encrypted)", 0, layout_cherryb3 ) GAMEL( 199?, cb3b, ncb3, cherrys, ncb3, cb3_state, init_cherrys, ROT0, "Dyna", "Cherry Bonus III (alt)", 0, layout_cherryb3 ) -GAME( 199?, cb3c, ncb3, cb3c, chrygld, cb3_state, init_cb3, ROT0, "bootleg", "Cherry Bonus III (alt, set 2)", MACHINE_NOT_WORKING) // encrypted +GAME( 199?, cb3c, ncb3, cb3c, chrygld, cb3_state, init_cb3c, ROT0, "bootleg", "Cherry Bonus III (Ivanhoe V46-0799)", MACHINE_NOT_WORKING) // decryption should be good, but different memory map GAMEL( 199?, cb3d, ncb3, ncb3, ncb3, cb3_state, empty_init, ROT0, "bootleg", "Cherry Bonus III (set 3)", 0, layout_cherryb3 ) GAMEL( 199?, cb3e, ncb3, cb3e, chrygld, cb3_state, init_cb3e, ROT0, "bootleg", "Cherry Bonus III (set 4, encrypted bootleg)", 0, layout_chrygld ) GAMEL( 199?, cb3f, ncb3, ncb3, ncb3, cb3_state, init_cb3f, ROT0, "bootleg (Cleco)", "Cherry Bonus III (set 5, encrypted bootleg)", MACHINE_NOT_WORKING, layout_chrygld ) // partially decrypted, stops at 'call attendant' diff --git a/src/mame/drivers/gstriker.cpp b/src/mame/drivers/gstriker.cpp index 70d28b62353..207ded7bfbc 100644 --- a/src/mame/drivers/gstriker.cpp +++ b/src/mame/drivers/gstriker.cpp @@ -5,8 +5,8 @@ Grand Striker, V Goal Soccer, World Cup '94 driver by Farfetch'd and David Haywood -Grand Striker (c)199? Human -V Goal Soccer (c)199? Tecmo (2 sets) +Grand Striker (c)1993 Human +V Goal Soccer (c)1994 Tecmo Tecmo World Cup '94 (c) 1994 Tecmo ****************************************************************************** @@ -23,8 +23,6 @@ in the video). Grand Striker has an IRQ2 which is probably network related. -DSWs need correctly mapping, they're just commented for the moment. - TODO: - Finish hooking up the inputs - Tilemap scrolling/rotation/zooming or whatever effect it needs @@ -37,16 +35,6 @@ TODO: ******************************************************************************/ -#include "emu.h" -#include "includes/gstriker.h" - -#include "cpu/m68000/m68000.h" -#include "cpu/z80/z80.h" -#include "machine/vs9209.h" -#include "sound/ymopn.h" -#include "speaker.h" - - /*** README INFO ************************************************************** *** ROMSET: gstriker @@ -97,7 +85,7 @@ scrgs107.u99 23c8000 - Sounds *** ROMSET: vgoalsoc V Goal Soccer -Tecmo 199x? +Tecmo 1994 This game runs on Video Systems h/w. @@ -137,9 +125,9 @@ c13_u11.u11 HN624116 - GFX c13_u12.u12 HN624116 - GFX -*** ROMSET: vgoalsca +*** ROMSET: vgoalsoca -Tecmo V Goal Soccer (c)1994? Tecmo +Tecmo V Goal Soccer (c)1994 Tecmo CPU: 68000, Z80 Sound: YM2610 @@ -186,9 +174,184 @@ Frequencies: 68k is XTAL_32MHZ/2 ******************************************************************************/ +#include "emu.h" + +#include "machine/vs9209.h" +#include "video/mb60553.h" +#include "video/vs920a.h" +#include "video/vsystem_spr.h" + +#include "cpu/m68000/m68000.h" +#include "cpu/z80/z80.h" +#include "machine/6850acia.h" +#include "machine/gen_latch.h" +#include "machine/mb3773.h" +#include "sound/ymopn.h" + +#include "emupal.h" +#include "screen.h" +#include "speaker.h" + + +// configurable logging +#define LOG_MIXER (1U << 1) +#define LOG_PROTECTION (1U << 2) + +//#define VERBOSE (LOG_GENERAL | LOG_MIXER | LOG_PROTECTION) + +#include "logmacro.h" + +#define LOGMIXER(...) LOGMASKED(LOG_MIXER, __VA_ARGS__) +#define LOGPROTECTION(...) LOGMASKED(LOG_PROTECTION, __VA_ARGS__) + + +namespace { + +class gstriker_state : public driver_device +{ +public: + gstriker_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_spr(*this, "vsystem_spr"), + m_bg(*this, "zoomtilemap"), + m_tx(*this, "texttilemap"), + m_gfxdecode(*this, "gfxdecode"), + m_screen(*this, "screen"), + m_palette(*this, "palette"), + m_watchdog(*this, "watchdog"), + m_acia(*this, "acia"), + m_cg10103_vram(*this, "cg10103_vram"), + m_buffered_spriteram(*this, "buffere_spriteram%u", 0U, 0x2000U, ENDIANNESS_BIG), + m_work_ram(*this, "work_ram"), + m_mixerregs(*this, "mixerregs"), + m_soundbank(*this, "soundbank") + { } + + void base(machine_config &config); + void twc94(machine_config &config); + void gstriker(machine_config &config); + void vgoal(machine_config &config); + + void init_vgoalsoc(); + void init_twcup94(); + void init_twcup94a(); + void init_twcup94b(); + +protected: + virtual void machine_start() override; + virtual void video_start() override; + +private: + required_device<cpu_device> m_maincpu; + required_device<cpu_device> m_audiocpu; + required_device<vsystem_spr_device> m_spr; + required_device<mb60553_zooming_tilemap_device> m_bg; + required_device<vs920a_text_tilemap_device> m_tx; + required_device<gfxdecode_device> m_gfxdecode; + required_device<screen_device> m_screen; + required_device<palette_device> m_palette; + required_device<mb3773_device> m_watchdog; + optional_device<acia6850_device> m_acia; + + required_shared_ptr<uint16_t> m_cg10103_vram; + memory_share_array_creator<uint16_t, 2> m_buffered_spriteram; + required_shared_ptr<uint16_t> m_work_ram; + required_shared_ptr<uint16_t> m_mixerregs; + required_memory_bank m_soundbank; + + enum + { + TECMO_WCUP94_MCU = 1, + TECMO_WCUP94A_MCU, + TECMO_WCUP94B_MCU, + VGOAL_SOCCER_MCU + }; + + int m_gametype = 0; + uint16_t m_prot_reg[2]{}; + + // common + void sh_bankswitch_w(uint8_t data); + + // vgoalsoc and twrldc + void twcup94_prot_reg_w(uint8_t data); + + // vgoalsoc only + uint16_t vbl_toggle_r(); + void vbl_toggle_w(uint16_t data); + + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + DECLARE_WRITE_LINE_MEMBER(screen_vblank); + + void mcu_init(); + void gstriker_map(address_map &map); + void sound_io_map(address_map &map); + void sound_map(address_map &map); + void twcup94_map(address_map &map); +}; + + +// video + +/*** VIDEO UPDATE/START **********************************************/ + +void gstriker_state::video_start() +{ + // Initialize the chip for the score plane + m_tx->set_transparent_pen(0xf); + + // Initialize the chip for the screen plane + m_bg->set_transparent_pen(0xf); +} + +WRITE_LINE_MEMBER(gstriker_state::screen_vblank) +{ + // sprites are two frames ahead + // TODO: probably all Video System games are (Aero Fighters definitely desyncs wrt background) + if(state) + { + memcpy(m_buffered_spriteram[0], m_cg10103_vram, 0x2000); + memcpy(m_buffered_spriteram[1], m_buffered_spriteram[0], 0x2000); + } +} + + +uint32_t gstriker_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + bitmap.fill(m_mixerregs[8] & 0x07ff, cliprect); // complete guess, causes green behind test grid in twc94 and blue behind title screen on gstriker + + /* + [4] AAAA BBBB ---- ---- sprite priority number A/B? + [5] xxxx ---- ---- ---- background layer priority number? + [6] xxxx ---- ---- ---- foreground layer priority number? + */ + LOGMIXER("%04x %04x %04x %04x %04x %04x %04x %04x | %04x %04x %04x %04x %04x %04x %04x %04x", m_mixerregs[0], m_mixerregs[1], m_mixerregs[2], m_mixerregs[3], m_mixerregs[4], m_mixerregs[5], m_mixerregs[6], m_mixerregs[7], m_mixerregs[8], m_mixerregs[9], m_mixerregs[10], m_mixerregs[11], m_mixerregs[12], m_mixerregs[13], m_mixerregs[14], m_mixerregs[15]); + + m_spr->set_pal_base((m_mixerregs[0] & 0xf000) >> 8); + m_bg->set_pal_base((m_mixerregs[1] & 0xf000) >> 8); + m_tx->set_pal_base((m_mixerregs[2] & 0xf000) >> 8); + + + // Sandwiched screen/sprite0/score/sprite1. Surely wrong, probably needs sprite orthogonality + m_bg->draw(screen, bitmap, cliprect, 0); + + m_spr->draw_sprites(m_buffered_spriteram[1], 0x2000, screen, bitmap, cliprect, 0x2, 0x0); + + m_tx->draw(screen, bitmap, cliprect, 0); + + m_spr->draw_sprites(m_buffered_spriteram[1], 0x2000, screen, bitmap, cliprect, 0x2, 0x2); + + return 0; +} + + +// machine + void gstriker_state::machine_start() { - membank("soundbank")->configure_entries(0, 8, memregion("audiocpu")->base(), 0x8000); + m_soundbank->configure_entries(0, 8, memregion("audiocpu")->base(), 0x8000); if (m_acia.found()) { @@ -202,31 +365,15 @@ void gstriker_state::machine_start() void gstriker_state::sh_bankswitch_w(uint8_t data) { - membank("soundbank")->set_entry(data & 0x07); + m_soundbank->set_entry(data & 0x07); } /*** GFX DECODE **************************************************************/ -static const gfx_layout gs_16x16x4_layout = -{ - 16,16, - RGN_FRAC(1,1), - 4, - { 0,1,2,3 }, - { 0, 4, 8, 12, 16, 20, 24, 28, - 32+0,32+4,32+8,32+12,32+16,32+20,32+24,32+28 - }, - - { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64, - 8*64,9*64,10*64,11*64,12*64,13*64,14*64,15*64 - }, - 16*64 -}; - static GFXDECODE_START( gfx_gstriker ) - GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_packed_lsb, 0, 256 ) - GFXDECODE_ENTRY( "gfx2", 0, gs_16x16x4_layout, 0, 256 ) - GFXDECODE_ENTRY( "gfx3", 0, gs_16x16x4_layout, 0, 256 ) + GFXDECODE_ENTRY( "fix_tiles", 0, gfx_8x8x4_packed_lsb, 0, 256 ) + GFXDECODE_ENTRY( "scroll_tiles", 0, gfx_16x16x4_packed_msb, 0, 256 ) + GFXDECODE_ENTRY( "sprites", 0, gfx_16x16x4_packed_msb, 0, 256 ) GFXDECODE_END @@ -238,7 +385,7 @@ void gstriker_state::twcup94_map(address_map &map) { map(0x000000, 0x0fffff).rom(); map(0x100000, 0x103fff).rw(m_bg, FUNC(mb60553_zooming_tilemap_device::vram_r), FUNC(mb60553_zooming_tilemap_device::vram_w)); - map(0x140000, 0x141fff).ram().share("cg10103_m_vram"); + map(0x140000, 0x141fff).ram().share(m_cg10103_vram); map(0x180000, 0x180fff).rw(m_tx, FUNC(vs920a_text_tilemap_device::vram_r), FUNC(vs920a_text_tilemap_device::vram_w)); map(0x181000, 0x181fff).rw(m_bg, FUNC(mb60553_zooming_tilemap_device::line_r), FUNC(mb60553_zooming_tilemap_device::line_w)); map(0x1c0000, 0x1c0fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette").mirror(0x00f000); @@ -246,11 +393,11 @@ void gstriker_state::twcup94_map(address_map &map) map(0x200000, 0x20000f).rw(m_bg, FUNC(mb60553_zooming_tilemap_device::regs_r), FUNC(mb60553_zooming_tilemap_device::regs_w)); map(0x200010, 0x200011).nopw(); map(0x200020, 0x200021).nopw(); - map(0x200040, 0x20005f).ram().share("mixerregs"); + map(0x200040, 0x20005f).ram().share(m_mixerregs); map(0x200080, 0x20009f).rw("io", FUNC(vs9209_device::read), FUNC(vs9209_device::write)).umask16(0x00ff); - map(0x2000a1, 0x2000a1).w(m_soundlatch, FUNC(generic_latch_8_device::write)); + map(0x2000a1, 0x2000a1).w("soundlatch", FUNC(generic_latch_8_device::write)); - map(0xffc000, 0xffffff).ram().share("work_ram"); + map(0xffc000, 0xffffff).ram().share(m_work_ram); } void gstriker_state::gstriker_map(address_map &map) @@ -263,7 +410,7 @@ void gstriker_state::sound_map(address_map &map) { map(0x0000, 0x77ff).rom(); map(0x7800, 0x7fff).ram(); - map(0x8000, 0xffff).bankr("soundbank"); + map(0x8000, 0xffff).bankr(m_soundbank); } void gstriker_state::sound_io_map(address_map &map) @@ -271,8 +418,8 @@ void gstriker_state::sound_io_map(address_map &map) map.global_mask(0xff); map(0x00, 0x03).rw("ymsnd", FUNC(ym2610_device::read), FUNC(ym2610_device::write)); map(0x04, 0x04).w(FUNC(gstriker_state::sh_bankswitch_w)); - map(0x08, 0x08).w(m_soundlatch, FUNC(generic_latch_8_device::acknowledge_w)); - map(0x0c, 0x0c).r(m_soundlatch, FUNC(generic_latch_8_device::read)); + map(0x08, 0x08).w("soundlatch", FUNC(generic_latch_8_device::acknowledge_w)); + map(0x0c, 0x0c).r("soundlatch", FUNC(generic_latch_8_device::read)); } @@ -478,7 +625,7 @@ INPUT_PORTS_END void gstriker_state::base(machine_config &config) { - Z80(config, m_audiocpu, 8000000/2); /* 4 MHz ??? */ + Z80(config, m_audiocpu, 8_MHz_XTAL / 2); // 4 MHz ??? m_audiocpu->set_addrmap(AS_PROGRAM, &gstriker_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &gstriker_state::sound_io_map); @@ -488,7 +635,7 @@ void gstriker_state::base(machine_config &config) io.portc_input_cb().set_ioport("SYSTEM"); io.portd_input_cb().set_ioport("DSW1"); io.porte_input_cb().set_ioport("DSW2"); - io.porth_input_cb().set(m_soundlatch, FUNC(generic_latch_8_device::pending_r)).lshift(0); + io.porth_input_cb().set("soundlatch", FUNC(generic_latch_8_device::pending_r)).lshift(0); io.porth_output_cb().set("watchdog", FUNC(mb3773_device::write_line_ck)).bit(3); MB3773(config, m_watchdog, 0); @@ -496,7 +643,7 @@ void gstriker_state::base(machine_config &config) SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); m_screen->set_refresh_hz(60); - m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(5000)); /* hand-tuned, it needs a bit */ + m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(5000)); // hand-tuned, it needs a bit m_screen->set_size(64*8, 64*8); m_screen->set_visarea(0*8, 40*8-1, 0*8, 28*8-1); m_screen->set_screen_update(FUNC(gstriker_state::screen_update)); @@ -523,11 +670,11 @@ void gstriker_state::base(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - GENERIC_LATCH_8(config, m_soundlatch); - m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); - m_soundlatch->set_separate_acknowledge(true); + generic_latch_8_device &soundlatch(GENERIC_LATCH_8(config, "soundlatch")); + soundlatch.data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); + soundlatch.set_separate_acknowledge(true); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); + ym2610_device &ymsnd(YM2610(config, "ymsnd", 8_MHz_XTAL)); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "lspeaker", 0.25); ymsnd.add_route(0, "rspeaker", 0.25); @@ -537,7 +684,7 @@ void gstriker_state::base(machine_config &config) void gstriker_state::gstriker(machine_config &config) { - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, 20_MHz_XTAL / 2); m_maincpu->set_addrmap(AS_PROGRAM, &gstriker_state::gstriker_map); m_maincpu->set_vblank_int("screen", FUNC(gstriker_state::irq1_line_hold)); @@ -551,12 +698,14 @@ void gstriker_state::gstriker(machine_config &config) void gstriker_state::twc94(machine_config &config) { - M68000(config, m_maincpu, 16000000); + M68000(config, m_maincpu, 32_MHz_XTAL / 2); m_maincpu->set_addrmap(AS_PROGRAM, &gstriker_state::twcup94_map); m_maincpu->set_vblank_int("screen", FUNC(gstriker_state::irq1_line_hold)); base(config); + m_audiocpu->set_clock(20_MHz_XTAL / 4); + subdevice<vs9209_device>("io")->porth_output_cb().append(FUNC(gstriker_state::twcup94_prot_reg_w)); } @@ -579,19 +728,19 @@ ROM_START( gstriker ) ROM_REGION( 0x40000, "audiocpu", 0 ) ROM_LOAD( "human-3_27c1001.u87", 0x00000, 0x20000, CRC(2f28c01e) SHA1(63829ad7969d197b2f2c87cb88bdb9e9880ed2d6) ) - ROM_REGION( 0x20000, "gfx1", 0 ) // score tilemap + ROM_REGION( 0x20000, "fix_tiles", 0 ) // score ROM_LOAD( "human-2_27c1024.u79", 0x00000, 0x20000, CRC(a981993b) SHA1(ed92c7581d2b84a8628744dd5f8a2266c45dcd5b) ) - ROM_REGION( 0x200000, "gfx2", 0 ) // scroll tilemap + ROM_REGION( 0x200000, "scroll_tiles", 0 ) ROM_LOAD( "human_scr-gs-105_m531602c-44_3405356.u2", 0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) ) - ROM_LOAD( "human_scr-gs-105_m531602c-44_3405356.u4", 0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) ) // same content, dif pos on board + ROM_LOAD( "human_scr-gs-105_m531602c-44_3405356.u4", 0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) ) // same content, different position on board - ROM_REGION( 0x1000000, "gfx3", 0 ) + ROM_REGION( 0x1000000, "sprites", 0 ) ROM_LOAD( "human_scr-gs-101_m531602c-40_3405351.u25", 0x000000, 0x200000, CRC(becaea24) SHA1(e96fca863f49f50992f56c7defa5a69599608785) ) ROM_LOAD( "human_scr-gs-102_m531602c-41_3405355.u24", 0x200000, 0x200000, CRC(0dae7aba) SHA1(304f336994be33fa8239c13e6fd9967c06f97d5c) ) ROM_LOAD( "human_scr-gs-103_m531602c-42_3405353.u23", 0x400000, 0x200000, CRC(3448fe92) SHA1(c4c2d2d5610795aff6633b0601ff484897598904) ) ROM_LOAD( "human_scr-gs-104_m531602c-43_3405354.u22", 0x600000, 0x200000, CRC(0ac33e5a) SHA1(9d7717d80f2c6817bac3fad50c39e04f0aa94255) ) - ROM_LOAD( "human-4_27c240.u6", 0xf80000, 0x080000, CRC(a990f9bb) SHA1(7ce31d4c650eb244e2ab285f253a98d6613b7dc8) ) // extra european team flags + ROM_LOAD( "human-4_27c240.u6", 0xf80000, 0x080000, CRC(a990f9bb) SHA1(7ce31d4c650eb244e2ab285f253a98d6613b7dc8) ) // extra European team flags ROM_REGION( 0x40000, "ymsnd:adpcmb", 0 ) ROM_LOAD( "human_scr-gs-106_m532001b-16_3402370.u93", 0x00000, 0x040000, CRC(93c9868c) SHA1(dcecb34e46405155e35aaf134b8547430d23f5a7) ) @@ -614,19 +763,19 @@ ROM_START( gstrikera ) ROM_REGION( 0x40000, "audiocpu", 0 ) ROM_LOAD( "human-3_27c1001.u87", 0x00000, 0x20000, CRC(2f28c01e) SHA1(63829ad7969d197b2f2c87cb88bdb9e9880ed2d6) ) - ROM_REGION( 0x20000, "gfx1", 0 ) // score tilemap + ROM_REGION( 0x20000, "fix_tiles", 0 ) // score ROM_LOAD( "human-2_27c1024.u79", 0x00000, 0x20000, CRC(a981993b) SHA1(ed92c7581d2b84a8628744dd5f8a2266c45dcd5b) ) - ROM_REGION( 0x200000, "gfx2", 0 ) // scroll tilemap + ROM_REGION( 0x200000, "scroll_tiles", 0 ) ROM_LOAD( "human_scr-gs-105_m531602c-44_3405356.u2", 0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) ) - ROM_LOAD( "human_scr-gs-105_m531602c-44_3405356.u4", 0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) ) // same content, dif pos on board + ROM_LOAD( "human_scr-gs-105_m531602c-44_3405356.u4", 0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) ) // same content, different position on board - ROM_REGION( 0x1000000, "gfx3", 0 ) + ROM_REGION( 0x1000000, "sprites", 0 ) ROM_LOAD( "human_scr-gs-101_m531602c-40_3405351.u25", 0x000000, 0x200000, CRC(becaea24) SHA1(e96fca863f49f50992f56c7defa5a69599608785) ) ROM_LOAD( "human_scr-gs-102_m531602c-41_3405355.u24", 0x200000, 0x200000, CRC(0dae7aba) SHA1(304f336994be33fa8239c13e6fd9967c06f97d5c) ) ROM_LOAD( "human_scr-gs-103_m531602c-42_3405353.u23", 0x400000, 0x200000, CRC(3448fe92) SHA1(c4c2d2d5610795aff6633b0601ff484897598904) ) ROM_LOAD( "human_scr-gs-104_m531602c-43_3405354.u22", 0x600000, 0x200000, CRC(0ac33e5a) SHA1(9d7717d80f2c6817bac3fad50c39e04f0aa94255) ) - ROM_LOAD( "human-4_27c240.u6", 0xf80000, 0x080000, CRC(a990f9bb) SHA1(7ce31d4c650eb244e2ab285f253a98d6613b7dc8) ) // extra european team flags + ROM_LOAD( "human-4_27c240.u6", 0xf80000, 0x080000, CRC(a990f9bb) SHA1(7ce31d4c650eb244e2ab285f253a98d6613b7dc8) ) // extra European team flags ROM_REGION( 0x40000, "ymsnd:adpcmb", 0 ) ROM_LOAD( "human_scr-gs-106_m532001b-16_3402370.u93", 0x00000, 0x040000, CRC(93c9868c) SHA1(dcecb34e46405155e35aaf134b8547430d23f5a7) ) @@ -634,7 +783,7 @@ ROM_START( gstrikera ) ROM_REGION( 0x100000, "ymsnd:adpcma", 0 ) ROM_LOAD( "scrgs107.u99", 0x00000, 0x100000, CRC(ecc0a01b) SHA1(239e832b7d22925460a8f44eb82e782cd13aba49) ) - /* PALs were protected on this version, used the ones from the "gstriker" set */ + // PALs were protected on this version, used the ones from the "gstriker" set ROM_REGION( 0x1000, "plds", 0 ) ROM_LOAD( "pal16l8.s201a.u52", 0x0000, 0x0104, CRC(724faf0f) SHA1(755fad09d188af58efce733a9f1256b1abc7c360) ) ROM_LOAD( "pal16l8.s202a.u74", 0x0200, 0x0104, CRC(ad5c4722) SHA1(0aad71b73c6674e15596b7de59160a5156a4118d) ) @@ -650,14 +799,14 @@ ROM_START( gstrikerj ) ROM_REGION( 0x40000, "audiocpu", 0 ) ROM_LOAD( "human3.u87", 0x00000, 0x20000, CRC(2f28c01e) SHA1(63829ad7969d197b2f2c87cb88bdb9e9880ed2d6) ) - ROM_REGION( 0x20000, "gfx1", 0 ) // score tilemap + ROM_REGION( 0x20000, "fix_tiles", 0 ) // score ROM_LOAD( "human2.u79", 0x00000, 0x20000, CRC(9ad17eb3) SHA1(614b2630e02745f675b1791a514a90131264d545) ) - ROM_REGION( 0x200000, "gfx2", 0 ) // scroll tilemap + ROM_REGION( 0x200000, "scroll_tiles", 0 ) ROM_LOAD( "human_scr-gs-105_m531602c-44_3405356.u2", 0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) ) - ROM_LOAD( "human_scr-gs-105_m531602c-44_3405356.u4", 0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) ) // same content, dif pos on board + ROM_LOAD( "human_scr-gs-105_m531602c-44_3405356.u4", 0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) ) // same content, different position on board - ROM_REGION( 0x1000000, "gfx3", 0 ) + ROM_REGION( 0x1000000, "sprites", 0 ) ROM_LOAD( "human_scr-gs-101_m531602c-40_3405351.u25", 0x000000, 0x200000, CRC(becaea24) SHA1(e96fca863f49f50992f56c7defa5a69599608785) ) ROM_LOAD( "human_scr-gs-102_m531602c-41_3405355.u24", 0x200000, 0x200000, CRC(0dae7aba) SHA1(304f336994be33fa8239c13e6fd9967c06f97d5c) ) ROM_LOAD( "human_scr-gs-103_m531602c-42_3405353.u23", 0x400000, 0x200000, CRC(3448fe92) SHA1(c4c2d2d5610795aff6633b0601ff484897598904) ) @@ -670,7 +819,7 @@ ROM_START( gstrikerj ) ROM_REGION( 0x100000, "ymsnd:adpcma", 0 ) ROM_LOAD( "scrgs107.u99", 0x00000, 0x100000, CRC(ecc0a01b) SHA1(239e832b7d22925460a8f44eb82e782cd13aba49) ) - /* PALs were protected on this version, used the ones from the "gstriker" set */ + // PALs were protected on this version, used the ones from the "gstriker" set ROM_REGION( 0x1000, "plds", 0 ) ROM_LOAD( "pal16l8.s201a.u52", 0x0000, 0x0104, CRC(724faf0f) SHA1(755fad09d188af58efce733a9f1256b1abc7c360) ) ROM_LOAD( "pal16l8.s202a.u74", 0x0200, 0x0104, CRC(ad5c4722) SHA1(0aad71b73c6674e15596b7de59160a5156a4118d) ) @@ -680,7 +829,7 @@ ROM_START( gstrikerj ) ROM_END -/* these were bruteforced from secured pal16l8 devices found on a twcup94a set, probably the same for all sets? */ +// these were bruteforced from secured pal16l8 devices found on a twcup94a set, probably the same for all sets? #define TWCUP94_PLD_DEVICES \ ROM_LOAD( "s2031a.u39", 0x0000, 0x0117, CRC(66f6020f) SHA1(b44a9ad51c1987bab14fb044b3ee37d73ec96fa7) ) \ ROM_LOAD( "s2032a.u64", 0x0200, 0x0117, CRC(e186728e) SHA1(c6ad476566d48585944e7f7889667899f654619b) ) \ @@ -699,14 +848,14 @@ ROM_START( vgoalsoc ) ROM_REGION( 0x20000, "mcu", 0 ) ROM_LOAD( "vgoalsoc_hd6473258p10", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x20000, "gfx1", 0 ) // score tilemap + ROM_REGION( 0x20000, "fix_tiles", 0 ) // score ROM_LOAD( "c16_u48.u48", 0x000000, 0x020000, CRC(ca059e7f) SHA1(2fa48b0fec1210575f3a1ecee7d2aec0af3fa9c4) ) - ROM_REGION( 0x100000, "gfx2", 0 ) // screen tilemap + ROM_REGION( 0x100000, "scroll_tiles", 0 ) // screen ROM_LOAD( "c13_u20.u20", 0x000000, 0x100000, CRC(bc6e07e8) SHA1(3f164165a2eed909aaf38d1ae23a622482d39f96) ) - ROM_LOAD( "c13_u17.u17", 0x000000, 0x100000, CRC(bc6e07e8) SHA1(3f164165a2eed909aaf38d1ae23a622482d39f96) ) // same content, dif pos on board + ROM_LOAD( "c13_u17.u17", 0x000000, 0x100000, CRC(bc6e07e8) SHA1(3f164165a2eed909aaf38d1ae23a622482d39f96) ) // same content, different position on board - ROM_REGION( 0x400000, "gfx3", 0 ) + ROM_REGION( 0x400000, "sprites", 0 ) ROM_LOAD( "c13_u11.u11", 0x000000, 0x200000, CRC(76d09f27) SHA1(ffef83954426f9e56bbe2d98b32cea675c063fab) ) ROM_LOAD( "c13_u12.u12", 0x200000, 0x200000, CRC(a3874419) SHA1(c9fa283106ada3419e311f400fcf4251b32318c4) ) @@ -720,7 +869,7 @@ ROM_START( vgoalsoc ) TWCUP94_PLD_DEVICES ROM_END -ROM_START( vgoalsca ) +ROM_START( vgoalsoca ) ROM_REGION( 0x100000, "maincpu", 0 ) ROM_LOAD16_WORD_SWAP( "vgoalc16.u37", 0x00000, 0x80000, CRC(775ef300) SHA1(d0ab1c13a19ce646c6edfc25a0c0994989560cbc) ) @@ -730,14 +879,14 @@ ROM_START( vgoalsca ) ROM_REGION( 0x20000, "mcu", 0 ) ROM_LOAD( "vgoalsoc_hd6473258p10", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x20000, "gfx1", 0 ) // fixed tile + ROM_REGION( 0x20000, "fix_tiles", 0 ) ROM_LOAD( "c16_u48.u48", 0x000000, 0x020000, CRC(ca059e7f) SHA1(2fa48b0fec1210575f3a1ecee7d2aec0af3fa9c4) ) - ROM_REGION( 0x100000, "gfx2", 0 ) // scroll tile + ROM_REGION( 0x100000, "scroll_tiles", 0 ) ROM_LOAD( "c13_u20.u20", 0x000000, 0x100000, CRC(bc6e07e8) SHA1(3f164165a2eed909aaf38d1ae23a622482d39f96) ) - ROM_LOAD( "c13_u17.u17", 0x000000, 0x100000, CRC(bc6e07e8) SHA1(3f164165a2eed909aaf38d1ae23a622482d39f96) ) // same content, dif pos on board + ROM_LOAD( "c13_u17.u17", 0x000000, 0x100000, CRC(bc6e07e8) SHA1(3f164165a2eed909aaf38d1ae23a622482d39f96) ) // same content, different position on board - ROM_REGION( 0x400000, "gfx3", 0 ) + ROM_REGION( 0x400000, "sprites", 0 ) ROM_LOAD( "c13_u11.u11", 0x000000, 0x200000, CRC(76d09f27) SHA1(ffef83954426f9e56bbe2d98b32cea675c063fab) ) ROM_LOAD( "c13_u12.u12", 0x200000, 0x200000, CRC(a3874419) SHA1(c9fa283106ada3419e311f400fcf4251b32318c4) ) @@ -761,14 +910,14 @@ ROM_START( twcup94 ) ROM_REGION( 0x20000, "mcu", 0 ) ROM_LOAD( "twcup94_hd6473258p10", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x20000, "gfx1", 0 ) // fixed tile + ROM_REGION( 0x20000, "fix_tiles", 0 ) ROM_LOAD( "11.u48", 0x000000, 0x020000, CRC(37d6dcb6) SHA1(679dd8b615497fff23c4638d413b5d4a724d3f2a) ) - ROM_REGION( 0x200000, "gfx2", 0 ) // scroll tile + ROM_REGION( 0x200000, "scroll_tiles", 0 ) ROM_LOAD( "u17", 0x000000, 0x200000, CRC(a5e40a61) SHA1(a2cb452fb069862570870653b29b045d12caf062) ) ROM_LOAD( "u20", 0x000000, 0x200000, CRC(a5e40a61) SHA1(a2cb452fb069862570870653b29b045d12caf062) ) - ROM_REGION( 0x800000, "gfx3", 0 ) + ROM_REGION( 0x800000, "sprites", 0 ) ROM_LOAD( "u11", 0x000000, 0x200000, CRC(dd93fd45) SHA1(26491815b5443fe6d8b1ef4d795c5151fd75c101) ) ROM_LOAD( "u12", 0x200000, 0x200000, CRC(8e3c9bd2) SHA1(bfd23157c836148a3860ccea5191f656fdd98ef4) ) ROM_LOAD( "u13", 0x400000, 0x200000, CRC(8db6b3a9) SHA1(9422cd5d6fb57a7eaa7a13bdf4ccee1f8b57f773) ) @@ -794,14 +943,14 @@ ROM_START( twcup94a ) ROM_REGION( 0x20000, "mcu", 0 ) ROM_LOAD( "twcup94_hd6473258p10", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x20000, "gfx1", 0 ) // fixed tile + ROM_REGION( 0x20000, "fix_tiles", 0 ) ROM_LOAD( "twrdc94a_11.u48", 0x000000, 0x020000, CRC(37d6dcb6) SHA1(679dd8b615497fff23c4638d413b5d4a724d3f2a) ) - ROM_REGION( 0x200000, "gfx2", 0 ) // scroll tile + ROM_REGION( 0x200000, "scroll_tiles", 0 ) ROM_LOAD( "u17", 0x000000, 0x200000, CRC(a5e40a61) SHA1(a2cb452fb069862570870653b29b045d12caf062) ) ROM_LOAD( "u20", 0x000000, 0x200000, CRC(a5e40a61) SHA1(a2cb452fb069862570870653b29b045d12caf062) ) - ROM_REGION( 0x800000, "gfx3", 0 ) + ROM_REGION( 0x800000, "sprites", 0 ) ROM_LOAD( "u11", 0x000000, 0x200000, CRC(dd93fd45) SHA1(26491815b5443fe6d8b1ef4d795c5151fd75c101) ) ROM_LOAD( "u12", 0x200000, 0x200000, CRC(8e3c9bd2) SHA1(bfd23157c836148a3860ccea5191f656fdd98ef4) ) ROM_LOAD( "u13", 0x400000, 0x200000, CRC(8db6b3a9) SHA1(9422cd5d6fb57a7eaa7a13bdf4ccee1f8b57f773) ) @@ -827,14 +976,14 @@ ROM_START( twcup94b ) ROM_REGION( 0x20000, "mcu", 0 ) ROM_LOAD( "twcup94_hd6473258p10", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x20000, "gfx1", 0 ) // fixed tile + ROM_REGION( 0x20000, "fix_tiles", 0 ) ROM_LOAD( "11.u48", 0x000000, 0x020000, CRC(37d6dcb6) SHA1(679dd8b615497fff23c4638d413b5d4a724d3f2a) ) - ROM_REGION( 0x200000, "gfx2", 0 ) // scroll tile + ROM_REGION( 0x200000, "scroll_tiles", 0 ) ROM_LOAD( "u17", 0x000000, 0x200000, CRC(a5e40a61) SHA1(a2cb452fb069862570870653b29b045d12caf062) ) ROM_LOAD( "u20", 0x000000, 0x200000, CRC(a5e40a61) SHA1(a2cb452fb069862570870653b29b045d12caf062) ) - ROM_REGION( 0x800000, "gfx3", 0 ) + ROM_REGION( 0x800000, "sprites", 0 ) ROM_LOAD( "u11", 0x000000, 0x200000, CRC(dd93fd45) SHA1(26491815b5443fe6d8b1ef4d795c5151fd75c101) ) ROM_LOAD( "u12", 0x200000, 0x200000, CRC(8e3c9bd2) SHA1(bfd23157c836148a3860ccea5191f656fdd98ef4) ) ROM_LOAD( "u13", 0x400000, 0x200000, CRC(8db6b3a9) SHA1(9422cd5d6fb57a7eaa7a13bdf4ccee1f8b57f773) ) @@ -853,21 +1002,21 @@ ROM_END /****************************************************************************************** -Simple protection check concept.The M68k writes a command and the MCU +Simple protection check concept. The M68k writes a command and the MCU returns the PC at address 0xffc000. -The problem is that only the concept is easy,beating this protection requires a good +The problem is that only the concept is easy, beating this protection requires a good amount of time without a trojan... Misc Notes: -Protection routine is at 0x890 -An original feature of this game is that if you enter into service mode the game gives you the possibility to test various stuff on a pre-registered play such as the speed or -the zooming.To use it,you should use Player 2 Start button to show the test screens +the zooming. To use it, you should use Player 2 Start button to show the test screens or to advance into the tests. ******************************************************************************************/ #define PC(_num_)\ - m_work_ram[0x000/2] = (_num_ & 0xffff0000) >> 16;\ - m_work_ram[0x002/2] = (_num_ & 0x0000ffff) >> 0; + m_work_ram[0x000 / 2] = (_num_ & 0xffff0000) >> 16;\ + m_work_ram[0x002 / 2] = (_num_ & 0x0000ffff) >> 0; void gstriker_state::twcup94_prot_reg_w(uint8_t data) @@ -877,7 +1026,7 @@ void gstriker_state::twcup94_prot_reg_w(uint8_t data) // Command byte is also written to VS9209 port F, which is set for input only. // Does the MCU somehow strobe it out of there? - uint8_t mcu_data = m_work_ram[0x00f/2] & 0x00ff; + uint8_t mcu_data = m_work_ram[0x00f / 2] & 0x00ff; if( ((m_prot_reg[1] & 4) == 0) && ((m_prot_reg[0] & 4) == 4) ) { @@ -886,8 +1035,8 @@ void gstriker_state::twcup94_prot_reg_w(uint8_t data) case TECMO_WCUP94_MCU: switch (mcu_data) { - #define NULL_SUB 0x0000828E - case 0x53: PC(0x00000A4C); break; // boot -> main loop + #define NULL_SUB 0x0000828e + case 0x53: PC(0x00000a4c); break; // boot -> main loop /* 68 and 62 could be sprite or sound changes, or ? @@ -902,12 +1051,12 @@ void gstriker_state::twcup94_prot_reg_w(uint8_t data) } */ case 0x68: PC(NULL_SUB); break; // time up doesn't block long enough for pk shootout - case 0x61: PC(0x00003AF4); break; // after time up, pk shootout??? - case 0x65: PC(0x00003F26); break; + case 0x61: PC(0x00003af4); break; // after time up, pk shootout??? + case 0x65: PC(0x00003f26); break; // 62->72 - case 0x62: PC(NULL_SUB); break; // after lose shootout, continue ??? - case 0x72: PC(0x0000409E); break; // game over + case 0x62: PC(NULL_SUB); break; // after losing shootout, continue ??? + case 0x72: PC(0x0000409e); break; // game over /* Attract mode is pre programmed loop called from main @@ -917,21 +1066,21 @@ void gstriker_state::twcup94_prot_reg_w(uint8_t data) further up around 0x1410b0.) The loop begins with three prot calls: - one always present (may be diversion to 0x0010DC8 unreachable code + one always present (may be diversion to 0x0010dc8 unreachable code and prot cases 6a,79,6f) and two alternating calls. The loop is 6e -> [6b|69] -> top11 -> (4 segment)playdemo These are the likely suspects for attract mode: - 0x0010E28 red tecmo on black + 0x0010E28 red Tecmo on black 0x0010EEC bouncing ball and player with game title 0x00117A2 single segment demo play with player sprites at 0x140000 0x001120A sliding display of player photos 0x0010DC8 unreachable code at end of attract loop with cases 6a,79,6f */ - case 0x6e: PC(0x00010E28); break; // loop - case 0x6b: PC(0x00010EEC); break; // attract even - case 0x69: PC(0x0001120A); break; // attract odd + case 0x6e: PC(0x00010e28); break; // loop + case 0x6b: PC(0x00010eec); break; // attract even + case 0x69: PC(0x0001120a); break; // attract odd // In "continue" screen // if( w@FFE078 & 80) 75 @@ -944,7 +1093,7 @@ void gstriker_state::twcup94_prot_reg_w(uint8_t data) case 0x6f: PC(NULL_SUB); break; default: - logerror("Unknown MCU CMD %04x\n",mcu_data); + LOGPROTECTION("Unknown MCU CMD %04x\n", mcu_data); PC(NULL_SUB); break; @@ -957,25 +1106,25 @@ void gstriker_state::twcup94_prot_reg_w(uint8_t data) switch (mcu_data) { - #define NULL_SUB 0x0000829E - case 0x53: PC(0x00000A5C); break; // POST + #define NULL_SUB 0x0000829e + case 0x53: PC(0x00000a5c); break; // POST case 0x68: PC(NULL_SUB); break; // time up doesn't block long enough for pk shootout - case 0x61: PC(0x00003B04); break; // after time up, pk shootout??? - case 0x65: PC(0x00003F36); break; + case 0x61: PC(0x00003b04); break; // after time up, pk shootout??? + case 0x65: PC(0x00003f36); break; - case 0x62: PC(NULL_SUB); break; // after lose shootout, continue ??? - case 0x72: PC(0x000040AE); break; // game over + case 0x62: PC(NULL_SUB); break; // after losing shootout, continue ??? + case 0x72: PC(0x000040ae); break; // game over case 0x75: PC(0x005098); break; // match adder, and check if limit is reached for ending // attract mode - case 0x6e: PC(0x00010E38); break; // loop - case 0x6b: PC(0x00010EFC); break; // attract even - case 0x69: PC(0x0001121A); break; // attract odd + case 0x6e: PC(0x00010e38); break; // loop + case 0x6b: PC(0x00010efc); break; // attract even + case 0x69: PC(0x0001121a); break; // attract odd default: - logerror("Unknown MCU CMD %04x\n",mcu_data); + LOGPROTECTION("Unknown MCU CMD %04x\n", mcu_data); PC(NULL_SUB); break; @@ -988,25 +1137,25 @@ void gstriker_state::twcup94_prot_reg_w(uint8_t data) switch (mcu_data) { - #define NULL_SUB (0x00830A) + #define NULL_SUB (0x00830a) case 0x53: PC(0x000a80); break; // POST case 0x68: PC(NULL_SUB); break; // time up doesn't block long enough for pk shootout - case 0x61: PC(0x003B72); break; // after time up, pk shootout??? - case 0x65: PC(0x003FA4); break; + case 0x61: PC(0x003b72); break; // after time up, pk shootout??? + case 0x65: PC(0x003fa4); break; - case 0x62: PC(NULL_SUB); break; // after lose shootout, continue ??? - case 0x72: PC(0x411C); break; // game over + case 0x62: PC(NULL_SUB); break; // after losing shootout, continue ??? + case 0x72: PC(0x411c); break; // game over case 0x75: PC(0x5106); break; // match adder, and check if limit is reached for ending // attract mode - case 0x6e: PC(0x00010EF0); break; // loop - case 0x6b: PC(0x00010FB4); break; // attract even - case 0x69: PC(0x000112D2); break; // attract odd + case 0x6e: PC(0x00010ef0); break; // loop + case 0x6b: PC(0x00010fb4); break; // attract even + case 0x69: PC(0x000112d2); break; // attract odd default: - logerror("Unknown MCU CMD %04x\n",mcu_data); + LOGPROTECTION("Unknown MCU CMD %04x\n", mcu_data); PC(NULL_SUB); break; @@ -1019,17 +1168,17 @@ void gstriker_state::twcup94_prot_reg_w(uint8_t data) switch (mcu_data) { case 0x33: PC(0x00063416); break; // *after game over, is this right? - case 0x3d: PC(0x0006275C); break; // after sprite ram init, team select - case 0x42: PC(0x0006274E); break; // after press start, init sprite ram + case 0x3d: PC(0x0006275c); break; // after sprite ram init, team select + case 0x42: PC(0x0006274e); break; // after press start, init sprite ram case 0x43: PC(0x0006a000); break; // POST case 0x50: PC(0x00001900); break; // enter main loop - case 0x65: PC(0x0006532C); break; // results + case 0x65: PC(0x0006532c); break; // results case 0x70: PC(0x00063416); break; // *attract loop ends, what should happen after "standings" display? - case 0x74: PC(0x000650D8); break; // after time up, show scores and continue - case 0x79: PC(0x0006072E); break; // after select, start match + case 0x74: PC(0x000650d8); break; // after time up, show scores and continue + case 0x79: PC(0x0006072e); break; // after select, start match default: - logerror("Unknown MCU CMD %04x\n",mcu_data); + LOGPROTECTION("Unknown MCU CMD %04x\n",mcu_data); PC(0x00000586); // rts break; } @@ -1040,7 +1189,7 @@ void gstriker_state::twcup94_prot_reg_w(uint8_t data) /* vgoalsoc uses a set of programmable timers. - There is a code implementation for at 00065F00 that appears to have + There is a code implementation for at 00065f00 that appears to have been RTSed out. I'm guessing it was replaced with an external implementation. @@ -1051,14 +1200,14 @@ void gstriker_state::twcup94_prot_reg_w(uint8_t data) More likely these timers are driven entirely by the MCU. */ //m_work_ram[ (0xffe900 - 0xffc00) ] -#define COUNTER1_ENABLE m_work_ram[0x2900/2] >> 8 -#define COUNTER2_ENABLE (m_work_ram[0x2900/2] & 0xff) -#define TICK_1 m_work_ram[0x2908/2] -#define TICKCOUNT_1 m_work_ram[0x290a/2] -#define TICK_2 m_work_ram[0x290c/2] -#define TICKCOUNT_3 m_work_ram[0x290e/2] -#define COUNTER_1 m_work_ram[0x2928/2] -#define COUNTER_2 m_work_ram[0x292a/2] +#define COUNTER1_ENABLE m_work_ram[0x2900 / 2] >> 8 +#define COUNTER2_ENABLE (m_work_ram[0x2900 / 2] & 0xff) +#define TICK_1 m_work_ram[0x2908 / 2] +#define TICKCOUNT_1 m_work_ram[0x290a / 2] +#define TICK_2 m_work_ram[0x290c / 2] +#define TICKCOUNT_3 m_work_ram[0x290e / 2] +#define COUNTER_1 m_work_ram[0x2928 / 2] +#define COUNTER_2 m_work_ram[0x292a / 2] uint16_t gstriker_state::vbl_toggle_r() { return 0xff; @@ -1066,20 +1215,20 @@ uint16_t gstriker_state::vbl_toggle_r() void gstriker_state::vbl_toggle_w(uint16_t data) { - if( COUNTER1_ENABLE == 1 ) + if (COUNTER1_ENABLE == 1) { TICK_1 = (TICK_1 - 1) & 0xff; // 8bit - if( TICK_1 <= 0 ) + if (TICK_1 <= 0) { TICK_1 = TICKCOUNT_1; COUNTER_1 = (COUNTER_1 - 1);// & 0xff; has to be 16bit for continue timer. } } - if( COUNTER2_ENABLE == 2 ) + if (COUNTER2_ENABLE == 2) { TICK_2 = (TICK_2 - 1) & 0xff; - if( TICK_2 <= 0 ) + if (TICK_2 <= 0) { TICK_2 = TICKCOUNT_3; COUNTER_2 = (COUNTER_2 - 1);// & 0xff; @@ -1119,6 +1268,8 @@ void gstriker_state::init_vgoalsoc() m_maincpu->space(AS_PROGRAM).install_read_handler(0x200090, 0x200091, read16smo_delegate(*this, FUNC(gstriker_state::vbl_toggle_r))); } +} // anonymous namespace + /*** GAME DRIVERS ************************************************************/ @@ -1127,9 +1278,9 @@ GAME( 1993, gstrikera, gstriker, gstriker, gstriker, gstriker_state, empty_init, GAME( 1993, gstrikerj, gstriker, gstriker, gstriker, gstriker_state, empty_init, ROT0, "Human", "Grand Striker (Japan)", MACHINE_NOT_WORKING | MACHINE_NODEVICE_LAN | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -/* Similar, but not identical hardware, appear to be protected by an MCU :-( */ -GAME( 1994, vgoalsoc, 0, vgoal, vgoalsoc, gstriker_state, init_vgoalsoc, ROT0, "Tecmo", "V Goal Soccer (Europe)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // has ger/hol/arg/bra/ita/eng/spa/fra -GAME( 1994, vgoalsca, vgoalsoc, vgoal, vgoalsoc, gstriker_state, init_vgoalsoc, ROT0, "Tecmo", "V Goal Soccer (US/Japan/Korea)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // has ger/hol/arg/bra/ita/kor/usa/jpn -GAME( 1994, twcup94, 0, twc94, twcup94, gstriker_state, init_twcup94, ROT0, "Tecmo", "Tecmo World Cup '94 (set 1)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1994, twcup94a, twcup94, twc94, twcup94, gstriker_state, init_twcup94a, ROT0, "Tecmo", "Tecmo World Cup '94 (set 2)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1994, twcup94b, twcup94, twc94, twcup94, gstriker_state, init_twcup94b, ROT0, "Tecmo", "Tecmo World Cup '94 (set 3)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +// Similar, but not identical hardware, appear to be protected by an MCU +GAME( 1994, vgoalsoc, 0, vgoal, vgoalsoc, gstriker_state, init_vgoalsoc, ROT0, "Tecmo", "V Goal Soccer (Europe)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // has ger/hol/arg/bra/ita/eng/spa/fra +GAME( 1994, vgoalsoca, vgoalsoc, vgoal, vgoalsoc, gstriker_state, init_vgoalsoc, ROT0, "Tecmo", "V Goal Soccer (US/Japan/Korea)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // has ger/hol/arg/bra/ita/kor/usa/jpn +GAME( 1994, twcup94, 0, twc94, twcup94, gstriker_state, init_twcup94, ROT0, "Tecmo", "Tecmo World Cup '94 (set 1)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1994, twcup94a, twcup94, twc94, twcup94, gstriker_state, init_twcup94a, ROT0, "Tecmo", "Tecmo World Cup '94 (set 2)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1994, twcup94b, twcup94, twc94, twcup94, gstriker_state, init_twcup94b, ROT0, "Tecmo", "Tecmo World Cup '94 (set 3)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/gsz80.cpp b/src/mame/drivers/gsz80.cpp index af76cc443a8..e76927db5ec 100644 --- a/src/mame/drivers/gsz80.cpp +++ b/src/mame/drivers/gsz80.cpp @@ -4,9 +4,6 @@ // MAME Reference driver for Grant Searle's Simple Z80 Computer // http://www.searle.wales/ -// RC2014 Mini added by Chris Swan -// https://rc2014.co.uk/full-kits/rc2014-mini/ - // All the common emulator stuff is here #include "emu.h" @@ -44,29 +41,6 @@ protected: required_device<acia6850_device> m_acia; }; -class rc2014mini_state : public gsz80_state -{ -public: - rc2014mini_state(const machine_config &mconfig, device_type type, const char *tag) - : gsz80_state(mconfig, type, tag) - , m_rombank(*this, "rombank") - , m_jump_rom(*this, "A13-15") - { } - - // Different machine config due to different RAM - void rc2014mini(machine_config &config); - -protected: - // RC2014 Mini only has 32K RAM, so memory map is different - void rc2014mini_mem(address_map &map); - - virtual void machine_start() override; - virtual void machine_reset() override; - - required_memory_bank m_rombank; - required_ioport m_jump_rom; -}; - // Trivial memory map for program memory void gsz80_state::gsz80_mem(address_map &map) { @@ -74,24 +48,6 @@ void gsz80_state::gsz80_mem(address_map &map) map(0x2000, 0xffff).ram(); } -void rc2014mini_state::machine_start() -{ - m_rombank->configure_entries(0, 8, memregion("maincpu")->base(), 0x2000); -} - -// Set ROM bank from machine CONF at Reset -void rc2014mini_state::machine_reset() -{ - m_rombank->set_entry(m_jump_rom->read() & 7); -} - -// RC2014 Mini only has 32K RAM -void rc2014mini_state::rc2014mini_mem(address_map &map) -{ - map(0x0000, 0x1fff).bankr("rombank"); - map(0x8000, 0xffff).ram(); -} - void gsz80_state::gsz80_io(address_map &map) { map.global_mask(0xff); // use 8-bit ports @@ -136,25 +92,6 @@ void gsz80_state::gsz80(machine_config &config) rs232.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal)); // must be below the DEVICE_INPUT_DEFAULTS_START block } -void rc2014mini_state::rc2014mini(machine_config &config) -{ - gsz80(config); - m_maincpu->set_addrmap(AS_PROGRAM, &rc2014mini_state::rc2014mini_mem); -} - -static INPUT_PORTS_START( rc2014mini ) - PORT_START("A13-15") /* jumpers to select ROM region */ - PORT_CONFNAME( 0x7, 0x0, "ROM Bank" ) - PORT_CONFSETTING( 0x0, "BASIC" ) - PORT_CONFSETTING( 0x1, "EMPTY1" ) - PORT_CONFSETTING( 0x2, "EMPTY2" ) - PORT_CONFSETTING( 0x3, "EMPTY3" ) - PORT_CONFSETTING( 0x4, "EMPTY4" ) - PORT_CONFSETTING( 0x5, "EMPTY5" ) - PORT_CONFSETTING( 0x6, "EMPTY6" ) - PORT_CONFSETTING( 0x7, "SCM" ) -INPUT_PORTS_END - // ROM mapping is trivial, this binary was created from the HEX file on Grant's website ROM_START(gsz80) ROM_REGION(0x2000, "maincpu",0) @@ -172,4 +109,3 @@ ROM_END // This ties everything together // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS COMP( 2007, gsz80, 0, 0, gsz80, 0, gsz80_state, empty_init, "Grant Searle", "Simple Z-80 Machine", MACHINE_NO_SOUND_HW ) -COMP( 2016, rc2014mini, gsz80, 0, rc2014mini, rc2014mini, rc2014mini_state, empty_init, "RFC2795 Ltd", "RC2014 Mini", MACHINE_NO_SOUND_HW ) diff --git a/src/mame/drivers/jpmsru.cpp b/src/mame/drivers/jpmsru.cpp index ca601ce3439..a29046253ec 100644 --- a/src/mame/drivers/jpmsru.cpp +++ b/src/mame/drivers/jpmsru.cpp @@ -1,64 +1,178 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:David Haywood, SomeRandomGuyIdk /********************************************************************** + + JPM Stepper Reel Unit + + JPM's first CPU-based fruit machine platform, from late 1978/1979. + Notably the first system to use stepper reels instead of EM reels. + Uses a 1.5MHz TMS9980A CPU together with some TTL for I/O providing + 56 outputs (16 used by reels) & 24 inputs (8 used by optos), + a ROM card holding game ROMs, and a selection of expansion boards. + Sound is output by a simple 6-tone NE556-based circuit. + + TODO: + - Layouts + - Netlist audio works but isn't quite right. The tone pot needs to + be set to 17% for it to not cut out, and even then popping can be heard. + Needs a look from someone with more analog knowledge than me. + - Add remaining games + + Expansion boards: + Bus Extension + Optional board with 128 nibbles NVRAM and 24 DIP switches, only supported by early JPM games + + Input Extension + Same as Bus Extension except with 8 extra inputs replacing the NVRAM (moved to ROM card), used by club games + + Logic Extension + 56 extra outputs addressed from CRU memory, accessed via 9 existing outputs + + Maxi Logic Extension + 64 extra outputs addressed from CRU memory, accessed via 9 existing outputs + + Mini Logic Extension + 16 extra outputs addressed directly from CRU memory + + Output Extension + 16 extra outputs addressed from main memory + + ROM cards: + Most SRU games used a 3K ROM card for storage. A few later games had a 4K card, + and a 6K card with 512 nibbles of NVRAM was used for club games. + +**********************************************************************/ - JPM S.R.U Hardware +#include "emu.h" - The Stepper Reel Unit (SRU) was the first JPM hardware platform - to use CPU based technology as opposed to a purely mechanical - setup. +#include "audio/fruitsamples.h" +#include "audio/nl_jpmsru.h" +#include "video/awpvid.h" - It really shows that this is the antecedent of System 80, - the sound hardware seems to be a basic discrete circuit (complete - with tone pot), and the hardware uses the older TMS9980A as a CPU. +#include "cpu/tms9900/tms9980a.h" - TODO: Everything!, there are 10 different SRU subtypes, including - one purely for export, though this is a layout change rather than - anything significant. +#include "machine/netlist.h" +#include "machine/nvram.h" +#include "machine/steppers.h" +#include "machine/timer.h" -**********************************************************************/ +#include "speaker.h" + +#include "netlist/nl_setup.h" -#include "emu.h" -#include "cpu/tms9900/tms9980a.h" #include "jpmsru.lh" +#include "j_ewn.lh" +#include "j_ndu.lh" +#include "j_dud.lh" +#include "j_lan.lh" + +#define MAIN_CLOCK 6_MHz_XTAL class jpmsru_state : public driver_device { public: - jpmsru_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu") + jpmsru_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_inputs(*this, "IN%u", 0U), + m_reel(*this, "reel%u", 0U), + m_lamp(*this, "lamp%u", 0U), + m_digits(*this, "digit%u", 0U), + m_audio_in(*this, "nl_audio:in%u", 0U), + m_samples(*this, "samples"), + m_nvram(*this, "nvram", 0x80, ENDIANNESS_BIG), + m_dips(*this, "DIP%u", 0U) { } - void jpmsru(machine_config &config); - void jpmsru_4(machine_config &config); + void jpmsru_3k(machine_config &config); + void jpmsru_3k_busext(machine_config &config); + void jpmsru_4k(machine_config &config); + void ewn(machine_config &config); + void ewn2(machine_config &config); + void ndu(machine_config &config); + void dud(machine_config &config); + void lan(machine_config &config); void init_jpmsru(); + + template <unsigned N> DECLARE_READ_LINE_MEMBER(opto_r) { return m_opto[N]; } +protected: + virtual void machine_start() override; private: - void jpmsru_4_map(address_map &map); + template <unsigned N> DECLARE_WRITE_LINE_MEMBER(opto_cb) { m_opto[N] = state; } + + uint8_t inputs_r(offs_t offset); + void reel_w(offs_t offset, uint8_t data); + void update_int(); + void audio_w(offs_t offset, uint8_t data); + void int1_en_w(offs_t offset, uint8_t data); + void int2_en_w(offs_t offset, uint8_t data); + uint8_t busext_data_r(offs_t offset); + void busext_data_w(offs_t offset, uint8_t data); + void busext_bdir_w(offs_t offset, uint8_t data); + void busext_mode_w(offs_t offset, uint8_t data); + void busext_addr_w(offs_t offset, uint8_t data); + uint8_t busext_dips_r(offs_t offset); + void out_lamp_w(offs_t offset, uint8_t data); + void out_lamp_ext_w(offs_t offset, uint8_t data); + void out_disp_w(offs_t offset, uint8_t data); + void out_payout_cash_w(offs_t offset, uint8_t data); + void out_payout_token_w(offs_t offset, uint8_t data); + template<unsigned Meter> void out_meter_w(offs_t offset, uint8_t data); + void out_coin_lockout_w(offs_t offset, uint8_t data); + + void jpmsru_3k_map(address_map &map); + void jpmsru_4k_map(address_map &map); void jpmsru_io(address_map &map); - void jpmsru_map(address_map &map); + void jpmsru_busext_io(address_map &map); + void outputs_ewn(address_map &map); + void outputs_ewn2(address_map &map); + void outputs_ndu(address_map &map); + void outputs_dud(address_map &map); + void outputs_lan(address_map &map); + + bool m_int1; + bool m_int2; + bool m_int1_en; + bool m_int2_en; + int m_reelbits[4]; + bool m_opto[4]; + int m_disp_digit; + bool m_disp_d1; + bool m_disp_d2; + bool m_busext_bdir; + uint8_t m_busext_mode; + uint8_t m_busext_addr; + + TIMER_DEVICE_CALLBACK_MEMBER(int1); + TIMER_DEVICE_CALLBACK_MEMBER(int2); // devices required_device<cpu_device> m_maincpu; -public: + required_ioport_array<3> m_inputs; + required_device_array<stepper_device, 4> m_reel; + output_finder<56> m_lamp; + output_finder<2> m_digits; + required_device_array<netlist_mame_logic_input_device, 6> m_audio_in; + required_device<fruit_samples_device> m_samples; + + memory_share_creator<uint8_t> m_nvram; + optional_ioport_array<3> m_dips; }; -// blind guess -#define MAIN_CLOCK 6000000 - -/* System with RAM at 0x0c00 */ - -void jpmsru_state::jpmsru_map(address_map &map) +void jpmsru_state::jpmsru_3k_map(address_map &map) { map(0x0000, 0x0bff).rom(); - map(0x0c00, 0x0eff).ram(); + map(0x0e00, 0x0eff).ram(); + /* Some sort of peculiar data logging system used by later JPM games. + It consists of 32 bytes of memory where games write various statistics + (total plays, win amount, win symbol, gamble win/lose etc.) either as numeric values + or ASCII text. Most likely for JPM internal use only. */ + map(0x1400, 0x141f).ram(); } -/* System with RAM at 0x0e00 */ - -void jpmsru_state::jpmsru_4_map(address_map &map) +void jpmsru_state::jpmsru_4k_map(address_map &map) { map(0x0000, 0x0bff).rom(); map(0x0c00, 0x0eff).ram(); @@ -67,51 +181,734 @@ void jpmsru_state::jpmsru_4_map(address_map &map) void jpmsru_state::jpmsru_io(address_map &map) { + map(0x00, 0x2f).r(FUNC(jpmsru_state::inputs_r)); + map(0x00, 0x1f).w(FUNC(jpmsru_state::reel_w)); + map(0x70, 0x7b).w(FUNC(jpmsru_state::audio_w)); + map(0x7c, 0x7d).w(FUNC(jpmsru_state::int2_en_w)); + map(0x7e, 0x7f).w(FUNC(jpmsru_state::int1_en_w)); + // Outputs, all lamps by default + map(0x20, 0x6f).w(FUNC(jpmsru_state::out_lamp_w)); +} + +void jpmsru_state::jpmsru_busext_io(address_map &map) +{ + jpmsru_io(map); + + map(0x80, 0x87).rw(FUNC(jpmsru_state::busext_data_r), FUNC(jpmsru_state::busext_data_w)); + map(0x88, 0x89).w(FUNC(jpmsru_state::busext_bdir_w)); + map(0x8a, 0x8d).w(FUNC(jpmsru_state::busext_mode_w)); + map(0x90, 0x9d).w(FUNC(jpmsru_state::busext_addr_w)); + map(0x90, 0xbf).r(FUNC(jpmsru_state::busext_dips_r)); +} + +// CRU maps for each game +void jpmsru_state::outputs_ewn(address_map &map) +{ + jpmsru_busext_io(map); + + map(0x3a, 0x3b).w(FUNC(jpmsru_state::out_meter_w<0>)); + map(0x3c, 0x3d).w(FUNC(jpmsru_state::out_meter_w<1>)); + map(0x3e, 0x3f).w(FUNC(jpmsru_state::out_meter_w<2>)); + map(0x40, 0x41).w(FUNC(jpmsru_state::out_meter_w<3>)); + map(0x42, 0x4d).w(FUNC(jpmsru_state::out_disp_w)); + map(0x4e, 0x4f).w(FUNC(jpmsru_state::out_meter_w<4>)); + map(0x50, 0x51).w(FUNC(jpmsru_state::out_meter_w<5>)); + map(0x6a, 0x6b).w(FUNC(jpmsru_state::out_payout_cash_w)); + map(0x6c, 0x6d).w(FUNC(jpmsru_state::out_payout_token_w)); + map(0x6e, 0x6f).w(FUNC(jpmsru_state::out_coin_lockout_w)); +} + +void jpmsru_state::outputs_ewn2(address_map &map) +{ + jpmsru_io(map); + + map(0x3a, 0x3b).w(FUNC(jpmsru_state::out_meter_w<0>)); + map(0x3c, 0x3d).w(FUNC(jpmsru_state::out_meter_w<1>)); + map(0x3e, 0x3f).w(FUNC(jpmsru_state::out_meter_w<2>)); + map(0x40, 0x41).w(FUNC(jpmsru_state::out_meter_w<3>)); + map(0x42, 0x4d).w(FUNC(jpmsru_state::out_disp_w)); + map(0x4e, 0x4f).w(FUNC(jpmsru_state::out_meter_w<4>)); + map(0x50, 0x51).w(FUNC(jpmsru_state::out_meter_w<5>)); + map(0x6a, 0x6b).w(FUNC(jpmsru_state::out_payout_cash_w)); + map(0x6c, 0x6d).w(FUNC(jpmsru_state::out_payout_token_w)); + map(0x6e, 0x6f).w(FUNC(jpmsru_state::out_coin_lockout_w)); +} + +void jpmsru_state::outputs_ndu(address_map &map) +{ + jpmsru_busext_io(map); + + map(0x3a, 0x3b).w(FUNC(jpmsru_state::out_meter_w<0>)); + map(0x3c, 0x3d).w(FUNC(jpmsru_state::out_meter_w<1>)); + map(0x3e, 0x3f).w(FUNC(jpmsru_state::out_meter_w<2>)); + map(0x40, 0x41).w(FUNC(jpmsru_state::out_meter_w<3>)); + map(0x42, 0x4d).w(FUNC(jpmsru_state::out_disp_w)); + map(0x4e, 0x4f).w(FUNC(jpmsru_state::out_meter_w<4>)); + map(0x50, 0x51).w(FUNC(jpmsru_state::out_meter_w<5>)); + map(0x64, 0x65).w(FUNC(jpmsru_state::out_meter_w<6>)); + map(0x6a, 0x6b).w(FUNC(jpmsru_state::out_payout_cash_w)); + map(0x6c, 0x6d).w(FUNC(jpmsru_state::out_payout_token_w)); + map(0x6e, 0x6f).w(FUNC(jpmsru_state::out_coin_lockout_w)); +} + +void jpmsru_state::outputs_dud(address_map &map) +{ + jpmsru_io(map); + + map(0x3a, 0x3b).w(FUNC(jpmsru_state::out_meter_w<0>)); + map(0x3c, 0x3d).w(FUNC(jpmsru_state::out_meter_w<1>)); + map(0x3e, 0x3f).w(FUNC(jpmsru_state::out_meter_w<2>)); + map(0x40, 0x41).w(FUNC(jpmsru_state::out_meter_w<3>)); + map(0x42, 0x4d).w(FUNC(jpmsru_state::out_disp_w)); + map(0x4e, 0x4f).w(FUNC(jpmsru_state::out_meter_w<4>)); + map(0x50, 0x51).w(FUNC(jpmsru_state::out_meter_w<5>)); + map(0x64, 0x65).w(FUNC(jpmsru_state::out_meter_w<6>)); + map(0x6a, 0x6b).w(FUNC(jpmsru_state::out_payout_cash_w)); + map(0x6c, 0x6d).w(FUNC(jpmsru_state::out_payout_token_w)); + map(0x6e, 0x6f).w(FUNC(jpmsru_state::out_coin_lockout_w)); +} + +void jpmsru_state::outputs_lan(address_map &map) +{ + jpmsru_io(map); + map(0x38, 0x39).w(FUNC(jpmsru_state::out_meter_w<0>)); + map(0x3a, 0x3b).w(FUNC(jpmsru_state::out_meter_w<1>)); + map(0x3c, 0x3d).w(FUNC(jpmsru_state::out_meter_w<2>)); + map(0x3e, 0x3f).w(FUNC(jpmsru_state::out_meter_w<3>)); + map(0x40, 0x41).w(FUNC(jpmsru_state::out_meter_w<4>)); + map(0x42, 0x4d).w(FUNC(jpmsru_state::out_disp_w)); + map(0x4e, 0x4f).w(FUNC(jpmsru_state::out_meter_w<5>)); + map(0x50, 0x51).w(FUNC(jpmsru_state::out_meter_w<6>)); + map(0x6a, 0x6b).w(FUNC(jpmsru_state::out_payout_cash_w)); + map(0x6c, 0x6d).w(FUNC(jpmsru_state::out_payout_token_w)); + map(0x6e, 0x6f).w(FUNC(jpmsru_state::out_coin_lockout_w)); + // Mini Logic Extension outputs, used for extra lamps + map(0x80, 0x9f).w(FUNC(jpmsru_state::out_lamp_ext_w)); +} + +uint8_t jpmsru_state::inputs_r(offs_t offset) +{ + return BIT(m_inputs[(offset & 0x18) >> 3]->read(), offset & 0x7); +} + +void jpmsru_state::reel_w(offs_t offset, uint8_t data) +{ + const int reel = (offset & 0xc) >> 2; + const int bit = offset & 0x3; + m_reelbits[reel] = (m_reelbits[reel] & ~(1 << bit)) | (data ? (1 << bit) : 0); + + if(bit == 3) + { + m_reel[reel]->update(m_reelbits[reel]); + const char reelnames[4][6] = { "reel1", "reel2", "reel3", "reel4" }; + awp_draw_reel(machine(), reelnames[reel], *m_reel[reel]); + } +} + +void jpmsru_state::out_lamp_w(offs_t offset, uint8_t data) +{ + m_lamp[offset] = data; +} + +void jpmsru_state::out_lamp_ext_w(offs_t offset, uint8_t data) +{ + // Extra lamps beyond the stock 40 outputs + m_lamp[offset + 40] = data; +} + +void jpmsru_state::out_disp_w(offs_t offset, uint8_t data) +{ + switch(offset) + { + case 0: m_disp_digit = (m_disp_digit & ~0x01) | (data ? 0x00 : 0x01); break; + case 1: m_disp_digit = (m_disp_digit & ~0x02) | (data ? 0x00 : 0x02); break; + case 2: m_disp_digit = (m_disp_digit & ~0x04) | (data ? 0x00 : 0x04); break; + case 3: m_disp_digit = (m_disp_digit & ~0x08) | (data ? 0x00 : 0x08); break; + case 4: m_disp_d1 = data; break; + case 5: m_disp_d2 = data; break; + } + + static constexpr uint8_t patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0,0,0,0,0,0 }; + if(m_disp_d1) m_digits[1] = patterns[m_disp_digit]; + if(m_disp_d2) m_digits[0] = patterns[m_disp_digit]; +} + +template<unsigned Meter> +void jpmsru_state::out_meter_w(offs_t offset, uint8_t data) +{ + machine().bookkeeping().coin_counter_w(Meter, data); + // SRU doesn't have audible meters +} + +void jpmsru_state::out_payout_cash_w(offs_t offset, uint8_t data) +{ + if(data) m_samples->play(fruit_samples_device::SAMPLE_PAYOUT); +} + +void jpmsru_state::out_payout_token_w(offs_t offset, uint8_t data) +{ + if(data) m_samples->play(fruit_samples_device::SAMPLE_PAYOUT); +} + +void jpmsru_state::out_coin_lockout_w(offs_t offset, uint8_t data) +{ + machine().bookkeeping().coin_lockout_w(0, !data); + machine().bookkeeping().coin_lockout_w(1, !data); + machine().bookkeeping().coin_lockout_w(2, !data); + machine().bookkeeping().coin_lockout_w(3, !data); +} + +void jpmsru_state::audio_w(offs_t offset, uint8_t data) +{ + m_audio_in[offset]->write(data); +} + +void jpmsru_state::update_int() +{ + // 74148 priority encoder + if(m_int1) + m_maincpu->set_input_line(INT_9980A_LEVEL1, ASSERT_LINE); + else if(m_int2) + m_maincpu->set_input_line(INT_9980A_LEVEL2, ASSERT_LINE); + else + m_maincpu->set_input_line(INT_9980A_CLEAR, CLEAR_LINE); +} + +void jpmsru_state::int1_en_w(offs_t offset, uint8_t data) +{ + if(m_int1_en && !data) m_int1 = 0; // Acknowledge on high->low transition + m_int1_en = data; + + update_int(); +} + +void jpmsru_state::int2_en_w(offs_t offset, uint8_t data) +{ + if(m_int2_en && !data) m_int2 = 0; // Acknowledge on high->low transition + m_int2_en = data; + + update_int(); +} + +uint8_t jpmsru_state::busext_data_r(offs_t offset) +{ + if(m_busext_mode == 3 && m_busext_bdir == 1) + { + return (m_nvram[m_busext_addr] >> offset) & 1; + } + return 0; +} + +void jpmsru_state::busext_data_w(offs_t offset, uint8_t data) +{ + if(m_busext_mode == 2 && m_busext_bdir == 0) + { + m_nvram[m_busext_addr] = (m_nvram[m_busext_addr] & ~(1 << offset)) | (data ? (1 << offset) : 0); + } +} + +void jpmsru_state::busext_bdir_w(offs_t offset, uint8_t data) +{ + m_busext_bdir = data; + return; +} + +void jpmsru_state::busext_mode_w(offs_t offset, uint8_t data) +{ + m_busext_mode = (m_busext_mode & ~(2 >> offset)) | (data ? (2 >> offset) : 0); + return; +} + +void jpmsru_state::busext_addr_w(offs_t offset, uint8_t data) +{ + m_busext_addr = (m_busext_addr & ~(1 << offset)) | (data ? (1 << offset) : 0); + return; } +uint8_t jpmsru_state::busext_dips_r(offs_t offset) +{ + return BIT(m_dips[(offset & 0x18) >> 3]->read(), offset & 0x7); +} + +TIMER_DEVICE_CALLBACK_MEMBER(jpmsru_state::int1) +{ + if(m_int1_en) + { + m_int1 = 1; + update_int(); + } +} + +TIMER_DEVICE_CALLBACK_MEMBER(jpmsru_state::int2) +{ + if(m_int2_en) + { + m_int2 = 1; + update_int(); + } +} + +static INPUT_PORTS_START( jpmsru_inputs ) + PORT_START("IN0") + // Optos + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jpmsru_state, opto_r<0>) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jpmsru_state, opto_r<1>) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jpmsru_state, opto_r<2>) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jpmsru_state, opto_r<3>) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) + // TTL inputs + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Self Test") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Refill Key") PORT_CODE(KEYCODE_R) PORT_TOGGLE + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_NAME("5p") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_NAME("10p") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_NAME("10p Token") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN4 ) PORT_NAME("50p") + + PORT_START("POT") + PORT_ADJUSTER( 50, "Tone Pot" ) NETLIST_ANALOG_PORT_CHANGED("nl_audio", "pot") +INPUT_PORTS_END + +static INPUT_PORTS_START( j_ewn ) + PORT_INCLUDE( jpmsru_inputs ) + + PORT_MODIFY("IN1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_POKER_HOLD2 ) PORT_NAME("Hold 2") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_POKER_HOLD3 ) PORT_NAME("Hold 3") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_POKER_CANCEL ) PORT_NAME("Cancel/Gamble") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Nudge Down") + + PORT_MODIFY("IN2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Nudge Up") + + PORT_START("DIP0") + PORT_DIPNAME( 0x0f, 0x00, "Nudge chance" ) + PORT_DIPSETTING ( 0x0f, "1%" ) + PORT_DIPSETTING ( 0x0e, "2%" ) + PORT_DIPSETTING ( 0x0d, "3%" ) + PORT_DIPSETTING ( 0x0c, "4%" ) + PORT_DIPSETTING ( 0x0b, "5%" ) + PORT_DIPSETTING ( 0x0a, "6%" ) + PORT_DIPSETTING ( 0x09, "7%" ) + PORT_DIPSETTING ( 0x00, "8%" ) + PORT_DIPSETTING ( 0x01, "9%" ) + PORT_DIPSETTING ( 0x02, "10%" ) + PORT_DIPSETTING ( 0x03, "11%" ) + PORT_DIPSETTING ( 0x04, "12%" ) + PORT_DIPSETTING ( 0x05, "13%" ) + PORT_DIPSETTING ( 0x06, "14%" ) + PORT_DIPSETTING ( 0x07, "15%" ) + PORT_DIPNAME( 0xf0, 0x00, "Win hold chance" ) + PORT_DIPSETTING ( 0xf0, "17%" ) + PORT_DIPSETTING ( 0xe0, "19%" ) + PORT_DIPSETTING ( 0xd0, "21%" ) + PORT_DIPSETTING ( 0xc0, "23%" ) + PORT_DIPSETTING ( 0xb0, "25%" ) + PORT_DIPSETTING ( 0xa0, "27%" ) + PORT_DIPSETTING ( 0x90, "29%" ) + PORT_DIPSETTING ( 0x00, "31%" ) + PORT_DIPSETTING ( 0x10, "33%" ) + PORT_DIPSETTING ( 0x20, "35%" ) + PORT_DIPSETTING ( 0x30, "37%" ) + PORT_DIPSETTING ( 0x40, "39%" ) + PORT_DIPSETTING ( 0x50, "41%" ) + PORT_DIPSETTING ( 0x60, "43%" ) + PORT_DIPSETTING ( 0x70, "45%" ) + + PORT_START("DIP1") + PORT_DIPNAME( 0x0f, 0x00, "Hold chance" ) + PORT_DIPSETTING ( 0x0f, "17%" ) + PORT_DIPSETTING ( 0x0e, "19%" ) + PORT_DIPSETTING ( 0x0d, "21%" ) + PORT_DIPSETTING ( 0x0c, "23%" ) + PORT_DIPSETTING ( 0x0b, "25%" ) + PORT_DIPSETTING ( 0x0a, "27%" ) + PORT_DIPSETTING ( 0x09, "29%" ) + PORT_DIPSETTING ( 0x00, "31%" ) + PORT_DIPSETTING ( 0x01, "33%" ) + PORT_DIPSETTING ( 0x02, "35%" ) + PORT_DIPSETTING ( 0x03, "37%" ) + PORT_DIPSETTING ( 0x04, "39%" ) + PORT_DIPSETTING ( 0x05, "41%" ) + PORT_DIPSETTING ( 0x06, "43%" ) + PORT_DIPSETTING ( 0x07, "45%" ) + PORT_DIPNAME( 0x10, 0x00, "Store credits" ) + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) + PORT_DIPSETTING( 0x10, DEF_STR(On) ) + PORT_DIPNAME( 0x20, 0x00, "Use default hold/nudge chance" ) // 31% and 8% + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) + PORT_DIPSETTING( 0x20, DEF_STR(On) ) + PORT_DIPUNUSED( 0x40, 0x00 ) + PORT_DIPUNUSED( 0x80, 0x00 ) + + PORT_START("DIP2") + PORT_DIPUNUSED( 0x01, 0x00 ) + PORT_DIPUNUSED( 0x02, 0x00 ) + PORT_DIPUNUSED( 0x04, 0x00 ) + PORT_DIPUNUSED( 0x08, 0x00 ) + PORT_DIPUNUSED( 0x10, 0x00 ) + PORT_DIPUNUSED( 0x20, 0x00 ) + PORT_DIPUNUSED( 0x40, 0x00 ) + PORT_DIPUNUSED( 0x80, 0x00 ) +INPUT_PORTS_END + +static INPUT_PORTS_START( j_ewn2 ) + PORT_INCLUDE( jpmsru_inputs ) + + PORT_MODIFY("IN0") + PORT_CONFNAME( 0x80, 0x80, "5p/10p jumper" ) + PORT_CONFSETTING( 0x00, "5p" ) + PORT_CONFSETTING( 0x80, "10p" ) + + PORT_MODIFY("IN1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_POKER_HOLD2 ) PORT_NAME("Hold 2") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_POKER_HOLD3 ) PORT_NAME("Hold 3") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_POKER_CANCEL ) PORT_NAME("Cancel/Gamble") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Nudge Down") + + PORT_MODIFY("IN2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Nudge Up") +INPUT_PORTS_END + +static INPUT_PORTS_START( j_ndu ) + PORT_INCLUDE( jpmsru_inputs ) + + PORT_MODIFY("IN1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_POKER_HOLD2 ) PORT_NAME("Hold 2") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_POKER_HOLD3 ) PORT_NAME("Hold 3") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_POKER_CANCEL ) PORT_NAME("Cancel/Gamble") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Nudge Down") + + PORT_MODIFY("IN2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Nudge Up") + + PORT_START("DIP0") + PORT_DIPNAME( 0x0f, 0x00, "Nudge chance" ) + PORT_DIPSETTING ( 0x0f, "1%" ) + PORT_DIPSETTING ( 0x0e, "2%" ) + PORT_DIPSETTING ( 0x0d, "3%" ) + PORT_DIPSETTING ( 0x0c, "4%" ) + PORT_DIPSETTING ( 0x0b, "5%" ) + PORT_DIPSETTING ( 0x0a, "6%" ) + PORT_DIPSETTING ( 0x09, "7%" ) + PORT_DIPSETTING ( 0x00, "8%" ) + PORT_DIPSETTING ( 0x01, "9%" ) + PORT_DIPSETTING ( 0x02, "10%" ) + PORT_DIPSETTING ( 0x03, "11%" ) + PORT_DIPSETTING ( 0x04, "12%" ) + PORT_DIPSETTING ( 0x05, "13%" ) + PORT_DIPSETTING ( 0x06, "14%" ) + PORT_DIPSETTING ( 0x07, "15%" ) + PORT_DIPNAME( 0xf0, 0x00, "Win hold chance" ) + PORT_DIPSETTING ( 0xf0, "17%" ) + PORT_DIPSETTING ( 0xe0, "19%" ) + PORT_DIPSETTING ( 0xd0, "21%" ) + PORT_DIPSETTING ( 0xc0, "23%" ) + PORT_DIPSETTING ( 0xb0, "25%" ) + PORT_DIPSETTING ( 0xa0, "27%" ) + PORT_DIPSETTING ( 0x90, "29%" ) + PORT_DIPSETTING ( 0x00, "31%" ) + PORT_DIPSETTING ( 0x10, "33%" ) + PORT_DIPSETTING ( 0x20, "35%" ) + PORT_DIPSETTING ( 0x30, "37%" ) + PORT_DIPSETTING ( 0x40, "39%" ) + PORT_DIPSETTING ( 0x50, "41%" ) + PORT_DIPSETTING ( 0x60, "43%" ) + PORT_DIPSETTING ( 0x70, "45%" ) + + PORT_START("DIP1") + PORT_DIPNAME( 0x0f, 0x00, "Hold chance" ) + PORT_DIPSETTING ( 0x0f, "17%" ) + PORT_DIPSETTING ( 0x0e, "19%" ) + PORT_DIPSETTING ( 0x0d, "21%" ) + PORT_DIPSETTING ( 0x0c, "23%" ) + PORT_DIPSETTING ( 0x0b, "25%" ) + PORT_DIPSETTING ( 0x0a, "27%" ) + PORT_DIPSETTING ( 0x09, "29%" ) + PORT_DIPSETTING ( 0x00, "31%" ) + PORT_DIPSETTING ( 0x01, "33%" ) + PORT_DIPSETTING ( 0x02, "35%" ) + PORT_DIPSETTING ( 0x03, "37%" ) + PORT_DIPSETTING ( 0x04, "39%" ) + PORT_DIPSETTING ( 0x05, "41%" ) + PORT_DIPSETTING ( 0x06, "43%" ) + PORT_DIPSETTING ( 0x07, "45%" ) + PORT_DIPUNUSED( 0x10, 0x00 ) + PORT_DIPNAME( 0x20, 0x00, "Use default hold/nudge chance" ) // 31% and 8% + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) + PORT_DIPSETTING( 0x20, DEF_STR(On) ) + PORT_DIPUNUSED( 0x40, 0x00 ) + PORT_DIPUNUSED( 0x80, 0x00 ) + + PORT_START("DIP2") + PORT_DIPUNUSED( 0x01, 0x00 ) + PORT_DIPUNUSED( 0x02, 0x00 ) + PORT_DIPUNUSED( 0x04, 0x00 ) + PORT_DIPUNUSED( 0x08, 0x00 ) + PORT_DIPUNUSED( 0x10, 0x00 ) + PORT_DIPUNUSED( 0x20, 0x00 ) + PORT_DIPUNUSED( 0x40, 0x00 ) + PORT_DIPUNUSED( 0x80, 0x00 ) +INPUT_PORTS_END + +static INPUT_PORTS_START( j_dud ) + PORT_INCLUDE( jpmsru_inputs ) + + PORT_MODIFY("IN1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_POKER_HOLD2 ) PORT_NAME("Hold 2") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_POKER_HOLD3 ) PORT_NAME("Hold 3") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_POKER_CANCEL ) PORT_NAME("Cancel/Gamble") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Nudge Down") + + PORT_MODIFY("IN2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Nudge Up") +INPUT_PORTS_END + +static INPUT_PORTS_START( j_dud2 ) + PORT_INCLUDE( j_dud ) + + PORT_MODIFY("IN0") + PORT_CONFNAME( 0x80, 0x80, "5p/10p jumper" ) + PORT_CONFSETTING( 0x00, "5p" ) + PORT_CONFSETTING( 0x80, "10p" ) +INPUT_PORTS_END + +static INPUT_PORTS_START( j_lan ) + PORT_INCLUDE( jpmsru_inputs ) + + PORT_MODIFY("IN1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_POKER_HOLD2 ) PORT_NAME("Hold 2") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_POKER_HOLD3 ) PORT_NAME("Hold 3") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Nudge Reverse") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Start") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_POKER_CANCEL ) PORT_NAME("Cancel/Gamble") + + PORT_MODIFY("IN2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Feature Stop") +INPUT_PORTS_END -static INPUT_PORTS_START( jpmsru ) +static INPUT_PORTS_START( j_lan2 ) + PORT_INCLUDE( j_lan ) + + PORT_MODIFY("IN0") + PORT_CONFNAME( 0x80, 0x80, "5p/10p jumper" ) + PORT_CONFSETTING( 0x00, "5p" ) + PORT_CONFSETTING( 0x80, "10p" ) INPUT_PORTS_END -void jpmsru_state::jpmsru(machine_config &config) +void jpmsru_state::machine_start() { - TMS9980A(config, m_maincpu, MAIN_CLOCK); - m_maincpu->set_addrmap(AS_PROGRAM, &jpmsru_state::jpmsru_map); - m_maincpu->set_addrmap(AS_IO, &jpmsru_state::jpmsru_io); + m_lamp.resolve(); + m_digits.resolve(); + + save_item(NAME(m_reelbits[0])); + save_item(NAME(m_reelbits[1])); + save_item(NAME(m_reelbits[2])); + save_item(NAME(m_reelbits[3])); + save_item(NAME(m_int1)); + save_item(NAME(m_int2)); + save_item(NAME(m_int1_en)); + save_item(NAME(m_int2_en)); + save_item(NAME(m_disp_digit)); +} + +void jpmsru_state::init_jpmsru() +{ + m_int1 = 0; + m_int2 = 0; + m_reelbits[0] = 0; + m_reelbits[1] = 0; + m_reelbits[2] = 0; + m_reelbits[3] = 0; + m_disp_digit = 0; + m_busext_mode = 0; + m_busext_addr = 0; } -void jpmsru_state::jpmsru_4(machine_config &config) +// Base SRU with 3K ROM card +void jpmsru_state::jpmsru_3k(machine_config &config) { TMS9980A(config, m_maincpu, MAIN_CLOCK); - m_maincpu->set_addrmap(AS_PROGRAM, &jpmsru_state::jpmsru_4_map); + m_maincpu->set_addrmap(AS_PROGRAM, &jpmsru_state::jpmsru_3k_map); m_maincpu->set_addrmap(AS_IO, &jpmsru_state::jpmsru_io); + + TIMER(config, "int1").configure_periodic(FUNC(jpmsru_state::int1), attotime::from_hz(MAIN_CLOCK / 32768)); // 183.1 Hz reel timing + TIMER(config, "int2").configure_periodic(FUNC(jpmsru_state::int2), attotime::from_hz(100)); // 100 Hz from AC zero crossing detector + + REEL(config, m_reel[0], SRU_200STEP_REEL, 8, 10, 0, 7, 200*2); + m_reel[0]->optic_handler().set(FUNC(jpmsru_state::opto_cb<0>)); + REEL(config, m_reel[1], SRU_200STEP_REEL, 8, 10, 0, 7, 200*2); + m_reel[1]->optic_handler().set(FUNC(jpmsru_state::opto_cb<1>)); + REEL(config, m_reel[2], SRU_200STEP_REEL, 8, 10, 0, 7, 200*2); + m_reel[2]->optic_handler().set(FUNC(jpmsru_state::opto_cb<2>)); + REEL(config, m_reel[3], SRU_200STEP_REEL, 8, 10, 0, 7, 200*2); + m_reel[3]->optic_handler().set(FUNC(jpmsru_state::opto_cb<3>)); + + config.set_default_layout(layout_jpmsru); + + SPEAKER(config, "mono").front_center(); + + NETLIST_SOUND(config, "nl_audio", 48000) + .set_source(NETLIST_NAME(jpmsru)) + .add_route(ALL_OUTPUTS, "mono", 1.0); + + NETLIST_LOGIC_INPUT(config, m_audio_in[0], "IN1.IN", 0); + NETLIST_LOGIC_INPUT(config, m_audio_in[1], "IN2.IN", 0); + NETLIST_LOGIC_INPUT(config, m_audio_in[2], "IN3.IN", 0); + NETLIST_LOGIC_INPUT(config, m_audio_in[3], "IN4.IN", 0); + NETLIST_LOGIC_INPUT(config, m_audio_in[4], "IN5.IN", 0); + NETLIST_LOGIC_INPUT(config, m_audio_in[5], "IN6.IN", 0); + NETLIST_ANALOG_INPUT(config, "nl_audio:pot", "R8.DIAL"); + + NETLIST_STREAM_OUTPUT(config, "nl_audio:cout0", 0, "OUT").set_mult_offset(1.0, 0.0); + + FRUIT_SAMPLES(config, m_samples); } -void jpmsru_state::init_jpmsru() +// SRU with 3K ROM card and Bus Extension board +void jpmsru_state::jpmsru_3k_busext(machine_config &config) { + jpmsru_3k(config); + + m_maincpu->set_addrmap(AS_IO, &jpmsru_state::jpmsru_busext_io); + + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); } -ROM_START( j_ewnud ) +// SRU with 4K ROM card +void jpmsru_state::jpmsru_4k(machine_config &config) +{ + jpmsru_3k(config); +} + +// Game configs +void jpmsru_state::ewn(machine_config &config) +{ + jpmsru_3k_busext(config); + m_maincpu->set_addrmap(AS_IO, &jpmsru_state::outputs_ewn); +} + +void jpmsru_state::ewn2(machine_config &config) +{ + jpmsru_3k(config); + m_maincpu->set_addrmap(AS_IO, &jpmsru_state::outputs_ewn2); +} + +void jpmsru_state::ndu(machine_config &config) +{ + jpmsru_3k_busext(config); + m_maincpu->set_addrmap(AS_IO, &jpmsru_state::outputs_ndu); +} + +void jpmsru_state::dud(machine_config &config) +{ + jpmsru_3k(config); + m_maincpu->set_addrmap(AS_IO, &jpmsru_state::outputs_dud); +} + +void jpmsru_state::lan(machine_config &config) +{ + jpmsru_3k(config); + m_maincpu->set_addrmap(AS_IO, &jpmsru_state::outputs_lan); +} + +ROM_START( j_ewn ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "ewn20.1", 0x0000, 0x400, CRC(e90f686b) SHA1(aec88647c6289b01149b2816845a568481b1d37f) ) + ROM_LOAD( "ewn20.2", 0x0400, 0x400, CRC(c02a2427) SHA1(57144443a03db56a803b19e14e868b1ccd222f37) ) + ROM_LOAD( "ewn20.3", 0x0800, 0x400, CRC(a64e4df7) SHA1(1512c3c85e100dadd5ff67fed731feb69cc8575e) ) +ROM_END + +ROM_START( j_ewna ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "ewn26.a1", 0x0000, 0x400, CRC(a92760b7) SHA1(dfef0dab7799a4b4975755c1584efca81a3798c4) ) + ROM_LOAD( "ewn26.2", 0x0400, 0x400, CRC(bd24e59e) SHA1(038ed23283a7b61e873f543de32b685630fcdb97) ) + ROM_LOAD( "ewn26.3", 0x0800, 0x400, CRC(a3280b35) SHA1(2771c81735c69ae3efb02715ac97901dae434e72) ) +ROM_END + +ROM_START( j_ewnb ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "ewn.1", 0x0000, 0x400, CRC(84ce735e) SHA1(98bae928246050ae88518ca511447fbef5c810f5) ) + ROM_LOAD( "ewn.2", 0x0400, 0x400, CRC(4c121f5e) SHA1(1221ff91ff9e352efeabb26a60eab93aae5bca5e) ) + ROM_LOAD( "ewn.3", 0x0800, 0x400, CRC(bef3a938) SHA1(6a6844203c6361b65f5b07853d9dbe18a29ebc44) ) +ROM_END + +ROM_START( j_ndu ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "ndu17.1", 0x0000, 0x400, CRC(174a8519) SHA1(3d9cc2a531ff91b3313aa893a9f774eea7847b8b) ) + ROM_LOAD( "ndu17.2", 0x0400, 0x400, CRC(634644b8) SHA1(35f2c71f81ddab18b85aa0a240dca55b0531f8d0) ) + ROM_LOAD( "ndu17.3", 0x0800, 0x400, CRC(60ef9c60) SHA1(e3614407a74c9e462cdfb3275b1c99b706cd824c) ) +ROM_END + +ROM_START( j_ndua ) // 24% hold chance instead of 26% + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "ndu17.1", 0x0000, 0x400, CRC(fae0f783) SHA1(1a09f8f425ec6b6d02aa6f32f7c7e22798a80a3a) ) + ROM_LOAD( "ndu17.2", 0x0400, 0x400, CRC(634644b8) SHA1(35f2c71f81ddab18b85aa0a240dca55b0531f8d0) ) + ROM_LOAD( "ndu17.3", 0x0800, 0x400, CRC(60ef9c60) SHA1(e3614407a74c9e462cdfb3275b1c99b706cd824c) ) +ROM_END + +ROM_START( j_dud ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "dud10.1", 0x0000, 0x400, CRC(e6cc42bc) SHA1(5f24f9fdb577a4ea4ef8d35352dd63021ebf26cd) ) + ROM_LOAD( "dud10.2", 0x0400, 0x400, CRC(69243c04) SHA1(958791fbd515ab6e2b38391527b611977303ad10) ) + ROM_LOAD( "dud10.3", 0x0800, 0x400, CRC(9f67e2f7) SHA1(f850655ba5d3651ff91f624431deb0e008fab57e) ) +ROM_END + +ROM_START( j_duda ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "dud.1", 0x0000, 0x400, CRC(66445282) SHA1(8614b5330d72ed28141974e60a2238e003f4bce1) ) + ROM_LOAD( "dud.2", 0x0400, 0x400, CRC(2945e808) SHA1(e306b5f9cc9f4999b9b4b8536101f2b69728f6ca) ) + ROM_LOAD( "dud.3", 0x0800, 0x400, CRC(f4359851) SHA1(43c17c147a96aba901435154de657594fbec6008) ) +ROM_END + +ROM_START( j_dt ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "ewn1a26", 0x0000, 0x000400, CRC(a92760b7) SHA1(dfef0dab7799a4b4975755c1584efca81a3798c4) ) - ROM_LOAD( "ewn26.2", 0x0400, 0x000400, CRC(bd24e59e) SHA1(038ed23283a7b61e873f543de32b685630fcdb97) ) - ROM_LOAD( "ewn26.3", 0x0800, 0x000400, CRC(a3280b35) SHA1(2771c81735c69ae3efb02715ac97901dae434e72) ) + ROM_LOAD( "dt13.1", 0x0000, 0x400, CRC(ce0b9d56) SHA1(1a21ddc4af260f8f4799c0d0e6ab17fc6385fbd5) ) + ROM_LOAD( "dt13.2", 0x0400, 0x400, CRC(cd9ac1cd) SHA1(e5983145e52843be701752c7fb52a99d799a489d) ) + ROM_LOAD( "dt13.3", 0x0800, 0x400, CRC(6de3a213) SHA1(b264fc45adbe3b2b833890f4a6238bd2f41d053f) ) ROM_END -ROM_START( j_ewnda ) +// LIGHT A NUDGE - REVISION 17 +ROM_START( j_lan ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "ewn1.bin", 0x0000, 0x000400, CRC(84ce735e) SHA1(98bae928246050ae88518ca511447fbef5c810f5) ) - ROM_LOAD( "ewn2.bin", 0x0400, 0x000400, CRC(4c121f5e) SHA1(1221ff91ff9e352efeabb26a60eab93aae5bca5e) ) - ROM_LOAD( "ewn3.bin", 0x0800, 0x000400, CRC(bef3a938) SHA1(6a6844203c6361b65f5b07853d9dbe18a29ebc44) ) + ROM_LOAD( "lan17.f1", 0x0000, 0x400, CRC(82d974b4) SHA1(2e10b40cf45c0aa7669e8bb046382982de1e77e3) ) + ROM_LOAD( "lan17.2", 0x0400, 0x400, CRC(e58416ed) SHA1(7d1cdd7007297a467487c6f58abefb4a70197838) ) + ROM_LOAD( "lan17.3", 0x0800, 0x400, CRC(fdc857b4) SHA1(3b89f0cd5e8ed73c2e3cded1edc64d23d0fefa54) ) ROM_END -ROM_START( j_ewnd20 ) +ROM_START( j_lana ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "ewn20.1", 0x0000, 0x000400, CRC(e90f686b) SHA1(aec88647c6289b01149b2816845a568481b1d37f) ) - ROM_LOAD( "ewn20.2", 0x0400, 0x000400, CRC(c02a2427) SHA1(57144443a03db56a803b19e14e868b1ccd222f37) ) - ROM_LOAD( "ewn20.3", 0x0800, 0x000400, CRC(a64e4df7) SHA1(1512c3c85e100dadd5ff67fed731feb69cc8575e) ) + ROM_LOAD( "lan.1", 0x0000, 0x400, CRC(7d959d11) SHA1(6f2834a9279cee1abb48837ef862fb42b28b1cb8) ) + ROM_LOAD( "lan.2", 0x0400, 0x400, CRC(18089aed) SHA1(1fc5250b56ba0f5211a591fbc0470fa60535cdd8) ) + ROM_LOAD( "lan.3", 0x0800, 0x400, CRC(d3e76076) SHA1(1f9f96351e8bc08722dc047c8b80c4697c589939) ) ROM_END + ROM_START( j_ews ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "ews13c1.bin", 0x0000, 0x000400, CRC(2eec7c4d) SHA1(a1740d27e60192659392ba7602b9b62947c4f6db) ) @@ -133,8 +930,6 @@ ROM_START( j_luckac ) ROM_LOAD( "la3.bin", 0x0800, 0x000400, CRC(cb9362ac) SHA1(a16d43ba01b24e1b515881957c1559d33a03bcc4) ) ROM_END - - ROM_START( j_plus2 ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "plus2_1.bin", 0x0000, 0x000400, CRC(f635174d) SHA1(9478aabc0eaa25d4ae44d2385e738584f03f6647) ) @@ -143,8 +938,6 @@ ROM_START( j_plus2 ) ROM_LOAD( "plus2_4.bin", 0x0c00, 0x000400, CRC(8b6922b4) SHA1(7b7fc7b0708bf96846860254fea957bcbc952923) ) ROM_END - - ROM_START( j_super2 ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "super2_1.bin", 0x0000, 0x000400, CRC(a1df2719) SHA1(eed80329c14ef6c272a8c622e8a4bc7d14ac87e6) ) @@ -159,20 +952,6 @@ ROM_START( j_luck2 ) ROM_LOAD( "lt_9.3", 0x0800, 0x000400, CRC(d6881e6f) SHA1(42a83f01d67a8f530ca2a10ffeff30237bdfba94) ) ROM_END -ROM_START( j_nuddup ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "ndu10_1.p1", 0x0000, 0x000400, CRC(f2210c00) SHA1(34a18028661a5ac0064b8c5c2f09d3918942be6e) ) - ROM_LOAD( "ndu10_1.p2", 0x0400, 0x000400, CRC(69243c04) SHA1(958791fbd515ab6e2b38391527b611977303ad10) ) - ROM_LOAD( "ndu10_1.p3", 0x0800, 0x000400, CRC(9f67e2f7) SHA1(f850655ba5d3651ff91f624431deb0e008fab57e) ) -ROM_END - -ROM_START( j_nuddup2 ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "nduset1-1.bin", 0x0000, 0x000400, CRC(66445282) SHA1(8614b5330d72ed28141974e60a2238e003f4bce1) ) - ROM_LOAD( "nduset1-2.bin", 0x0400, 0x000400, CRC(2945e808) SHA1(e306b5f9cc9f4999b9b4b8536101f2b69728f6ca) ) - ROM_LOAD( "nduset1-3.bin", 0x0800, 0x000400, CRC(f4359851) SHA1(43c17c147a96aba901435154de657594fbec6008) ) -ROM_END - ROM_START( j_unk ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "sruunk1.p1", 0x0000, 0x000400, CRC(be7d3b79) SHA1(3304dcc69e93eca2e6e89df0b18afc6874ebacf0) ) @@ -180,22 +959,23 @@ ROM_START( j_unk ) ROM_LOAD( "sruunk1.p3", 0x0800, 0x000400, CRC(25138e03) SHA1(644fc6144ea74f08dc892f106ad494ba364afe86) ) ROM_END -GAME(198?, j_ewnud, 0, jpmsru, jpmsru, jpmsru_state, init_jpmsru, ROT0, "Barcrest?","Each Way Nudger (Barcrest?, set 1)", MACHINE_IS_SKELETON_MECHANICAL ) -GAME(198?, j_ewnda, j_ewnud, jpmsru, jpmsru, jpmsru_state, init_jpmsru, ROT0, "Barcrest?","Each Way Nudger (Barcrest?, set 2)", MACHINE_IS_SKELETON_MECHANICAL ) -GAME(198?, j_ewnd20, j_ewnud, jpmsru, jpmsru, jpmsru_state, init_jpmsru, ROT0, "Barcrest?","Each Way Nudger (Barcrest?, set 3, version 20?)", MACHINE_IS_SKELETON_MECHANICAL ) -GAME(198?, j_ews, 0, jpmsru, jpmsru, jpmsru_state, init_jpmsru, ROT0, "Barcrest?","Each Way Shifter (Barcrest?, set 1, version 16)", MACHINE_IS_SKELETON_MECHANICAL ) -GAME(198?, j_ews8a, j_ews, jpmsru, jpmsru, jpmsru_state, init_jpmsru, ROT0, "Barcrest?","Each Way Shifter (Barcrest?, set 2, version 8a)", MACHINE_IS_SKELETON_MECHANICAL ) - -GAME(198?, j_luckac, 0, jpmsru, jpmsru, jpmsru_state, init_jpmsru, ROT0, "<unknown>","Lucky Aces (Unk)", MACHINE_IS_SKELETON_MECHANICAL ) -GAME(198?, j_super2, 0, jpmsru, jpmsru, jpmsru_state, init_jpmsru, ROT0, "JPM","Super 2 (JPM)", MACHINE_IS_SKELETON_MECHANICAL ) - -GAME(198?, j_luck2, 0, jpmsru_4, jpmsru, jpmsru_state, init_jpmsru, ROT0, "<unknown>","Lucky Twos?", MACHINE_IS_SKELETON_MECHANICAL ) - -GAME(198?, j_nuddup, 0, jpmsru_4, jpmsru, jpmsru_state, init_jpmsru, ROT0, "JPM","Nudge Double Up (JPM SRU, set 1)", MACHINE_IS_SKELETON_MECHANICAL ) - -GAME(198?, j_nuddup2, j_nuddup, jpmsru_4, jpmsru, jpmsru_state, init_jpmsru, ROT0, "JPM","Nudge Double Up (JPM SRU, set 2)", MACHINE_IS_SKELETON_MECHANICAL ) - -GAME(198?, j_unk, 0, jpmsru_4, jpmsru, jpmsru_state, init_jpmsru, ROT0, "JPM?","unknown SRU Game (JPM?)", MACHINE_IS_SKELETON_MECHANICAL ) - -// this one is different again? -GAME(198?, j_plus2, 0, jpmsru_4, jpmsru, jpmsru_state, init_jpmsru, ROT0, "JPM","Plus 2 (JPM)", MACHINE_IS_SKELETON_MECHANICAL ) +#define GAME_FLAGS MACHINE_NOT_WORKING|MACHINE_MECHANICAL|MACHINE_REQUIRES_ARTWORK|MACHINE_IMPERFECT_SOUND|MACHINE_SUPPORTS_SAVE + +GAMEL( 1979?, j_ewn, 0, ewn, j_ewn, jpmsru_state, init_jpmsru, ROT0, "JPM", "Each Way Nudger (JPM) (SRU) (revision 20, 5p Stake, £1 Jackpot)", GAME_FLAGS, layout_j_ewn ) +GAMEL( 1981?, j_ewna, j_ewn, ewn2, j_ewn2, jpmsru_state, init_jpmsru, ROT0, "JPM", "Each Way Nudger (JPM) (SRU) (revision 26A, £2 Jackpot)", GAME_FLAGS, layout_j_ewn ) +GAMEL( 1981?, j_ewnb, j_ewn, ewn2, j_ewn2, jpmsru_state, init_jpmsru, ROT0, "JPM", "Each Way Nudger (JPM) (SRU) (£2 Jackpot)", GAME_FLAGS, layout_j_ewn ) +GAMEL( 1979?, j_ndu, 0, ndu, j_ndu, jpmsru_state, init_jpmsru, ROT0, "JPM", "Nudge Double Up (JPM) (SRU) (revision 17, 5p Stake, £1 Jackpot)", GAME_FLAGS, layout_j_ndu ) +GAMEL( 1979?, j_ndua, j_ndu, ndu, j_ndu, jpmsru_state, init_jpmsru, ROT0, "JPM", "Nudge Double Up (JPM) (SRU) (revision 17, 5p Stake, £1 Jackpot, lower %)", GAME_FLAGS, layout_j_ndu ) +GAMEL( 1980?, j_dud, 0, dud, j_dud, jpmsru_state, init_jpmsru, ROT0, "JPM", "Nudge Double Up Deluxe (JPM) (SRU) (revision 10, 5p Stake, £1 Jackpot)", GAME_FLAGS, layout_j_dud ) +GAMEL( 1981?, j_duda, j_dud, dud, j_dud2, jpmsru_state, init_jpmsru, ROT0, "JPM", "Nudge Double Up Deluxe (JPM) (SRU) (£2 Jackpot)", GAME_FLAGS, layout_j_dud ) +GAMEL( 1981?, j_dt, j_dud, dud, j_dud2, jpmsru_state, init_jpmsru, ROT0, "JPM", "Double Top (JPM) (SRU) (revision 13, £2 Jackpot)", GAME_FLAGS, layout_j_dud ) +GAMEL( 1980?, j_lan, 0, lan, j_lan, jpmsru_state, init_jpmsru, ROT0, "JPM", "Lite A Nudge (JPM) (SRU) (revision 17F, 5p Stake, £1 Jackpot)", GAME_FLAGS, layout_j_lan ) +GAMEL( 1981?, j_lana, j_lan, lan, j_lan2, jpmsru_state, init_jpmsru, ROT0, "JPM", "Lite A Nudge (JPM) (SRU) (£2 Jackpot)", GAME_FLAGS, layout_j_lan ) +// Unsorted +GAMEL(198?, j_ews, 0, jpmsru_3k, jpmsru_inputs, jpmsru_state, init_jpmsru, ROT0, "JPM","Each Way Shuffle (Barcrest?, set 1, revision 16)", MACHINE_IS_SKELETON_MECHANICAL, layout_jpmsru ) +GAMEL(198?, j_ews8a, j_ews, jpmsru_3k, jpmsru_inputs, jpmsru_state, init_jpmsru, ROT0, "JPM","Each Way Shuffle (Barcrest?, set 2, revision 8a)", MACHINE_IS_SKELETON_MECHANICAL, layout_jpmsru ) +GAMEL(198?, j_luckac, 0, jpmsru_3k, jpmsru_inputs, jpmsru_state, init_jpmsru, ROT0, "JPM","Lucky Aces (Unk)", MACHINE_IS_SKELETON_MECHANICAL, layout_jpmsru ) +GAMEL(198?, j_super2, 0, jpmsru_3k, jpmsru_inputs, jpmsru_state, init_jpmsru, ROT0, "JPM","Super 2 (JPM)", MACHINE_IS_SKELETON_MECHANICAL, layout_jpmsru ) +GAMEL(198?, j_luck2, 0, jpmsru_4k, jpmsru_inputs, jpmsru_state, init_jpmsru, ROT0, "JPM","Lucky 2's", MACHINE_IS_SKELETON_MECHANICAL, layout_jpmsru ) +GAMEL(198?, j_unk, 0, jpmsru_4k, jpmsru_inputs, jpmsru_state, init_jpmsru, ROT0, "JPM?","unknown SRU Game (JPM?)", MACHINE_IS_SKELETON_MECHANICAL, layout_jpmsru ) +GAMEL(198?, j_plus2, 0, jpmsru_4k, jpmsru_inputs, jpmsru_state, init_jpmsru, ROT0, "JPM","Plus 2 (JPM)", MACHINE_IS_SKELETON_MECHANICAL, layout_jpmsru )
\ No newline at end of file diff --git a/src/mame/drivers/nemesis.cpp b/src/mame/drivers/nemesis.cpp index a91097a80b3..0279e8d7ec5 100644 --- a/src/mame/drivers/nemesis.cpp +++ b/src/mame/drivers/nemesis.cpp @@ -1144,8 +1144,8 @@ INPUT_PORTS_END static INPUT_PORTS_START( salamand ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 ) @@ -1224,8 +1224,8 @@ INPUT_PORTS_END static INPUT_PORTS_START( lifefrcj ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 ) diff --git a/src/mame/drivers/pangofun.cpp b/src/mame/drivers/pangofun.cpp index 650cd47bf69..7987ce994b5 100644 --- a/src/mame/drivers/pangofun.cpp +++ b/src/mame/drivers/pangofun.cpp @@ -1,17 +1,20 @@ // license:BSD-3-Clause // copyright-holders:David Haywood -/* It's a standard 486 PC motherboard, gfx card etc. with expansion ROM board +/************************************************************************************************** - probably impossible to emulate right now due to the bad / missing (blank when read) rom - although it would be a good idea if somebody checked for sure + It's a standard 486 PC motherboard, gfx card etc. with expansion ROM board -TODO: -- bp 932d1, ROM banking that reads at 0xffffe??? - -*/ + probably impossible to emulate right now due to the bad / missing (blank when read) rom + although it would be a good idea if somebody checked for sure -/* +TODO: +- Doesn't detect proper CPU type; +- "Memory test fail" at POST, needs um8498f "memory controller" emulation + (non-PCI with shadow RAM?), also cfr. correlated at.cpp romsets; +- Sometimes POST will trip an invalid groupFF_16 modrm FF at 000F00B2, causing an hang; +- bp 932d1, ROM banking that reads at 0xffffe? Is um8498f ROM boot capable? +=================================================================================================== readme by f205v Game: Pango Fun @@ -26,14 +29,14 @@ Main PCB (it's a standard 486 motherboard): 1x 80486 1x oscillator 14.31818 MHz -Video PCB (it's a standard VGA EISA board): +Video PCB (it's a standard VGA ISA board): 1x CIRRUS CLGD5401-42QC-B-31063-198AC Sound PCB (missing, it's a standard ISA 16bit sound card): ? -ROMs PCB (it's a custom PCB, with EISA connector to motherboard on one side and JAMMA connetcor on the other side): +ROMs PCB (it's a custom PCB, with ISA connector to motherboard on one side and JAMMA connetcor on the other side): 1x NE555P @@ -42,12 +45,12 @@ ROMs:----------- Main PCB (it's a standard 486 motherboard): 1x 27C512 (bios) -Video PCB (it's a standard VGA EISA board): +Video PCB (it's a standard VGA ISA board): 1x maskrom (28pin) (VGAbios)(not dumped) Sound PCB (missing, it's a standard ISA 16bit sound card): -ROMs PCB (it's a custom PCB, with EISA connector to motherboard on one side and JAMMA connetcor on the other side): +ROMs PCB (it's a custom PCB, with ISA connector to motherboard on one side and JAMMA connector on the other side): 5x AM27C040 (u11,u12,u31,u32,u33) 1x TMS27C040 (u13)(probably corrupted) 1x INTEL27C010A (u39) @@ -62,15 +65,15 @@ Notes:---------- Main PCB (it's a standard 486 motherboard): 1x Keyboard DIN connector (not used) -Video PCB (it's a standard VGA EISA board): +Video PCB (it's a standard VGA ISA board): 1x VGA connetctor (to ROMs PCB) 1x red/black cable (to ROMs PCB) Sound PCB (missing, it's a standard ISA 16bit sound card): 1x stereo audio out (to ROMs PCB) -ROMs PCB (it's a custom PCB, with EISA connector to motherboard on one side and JAMMA connetcor on the other side): -1x EISA connector (into motherboard) +ROMs PCB (it's a custom PCB, with ISA connector to motherboard on one side and JAMMA connetcor on the other side): +1x ISA connector (into motherboard) 1x JAMMA edge connector 1x VGA in connector (from Video PCB) 1x stereo audio jack (from sound card) @@ -92,7 +95,7 @@ it was an action/strategy videogame published by Proxxima Software (Rome, Italy) later ported to PC machines and published in 1994 by AIM Games software (US) and in Arcade Version (Coin-Op) by InfoCube (Pisa, Italy) -*/ +**************************************************************************************************/ #include "emu.h" #include "cpu/i386/i386.h" @@ -126,8 +129,7 @@ void pangofun_state::pcat_map(address_map &map) map(0x000e0000, 0x000effff).rom().region("game_prg", 0); map(0x000f0000, 0x000fffff).rom().region("bios", 0); /* TODO: correct RAM mapping/size? */ - map(0x00100000, 0x00ffffff).noprw(); - map(0x01000000, 0x01ffffff).ram(); + map(0x00100000, 0x01ffffff).ram(); map(0x02000000, 0xfffeffff).noprw(); map(0xffff0000, 0xffffffff).rom().region("bios", 0); } @@ -151,22 +153,22 @@ void pangofun_state::machine_start() void pangofun_state::pangofun(machine_config &config) { /* basic machine hardware */ - I486(config, m_maincpu, 25000000); /* I486 ?? Mhz (25 according to POST) */ + I486(config, m_maincpu, XTAL(40'000'000)); // um486sxlc-40 m_maincpu->set_addrmap(AS_PROGRAM, &pangofun_state::pcat_map); m_maincpu->set_addrmap(AS_IO, &pangofun_state::pcat_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); /* video hardware */ pcvideo_vga(config); - subdevice<screen_device>("screen")->set_refresh_hz(60); - subdevice<screen_device>("screen")->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ pcat_common(config); + + // TODO: um8498f } ROM_START(pangofun) - ROM_REGION32_LE(0x20000, "bios", 0) /* motherboard bios */ + ROM_REGION32_LE(0x10000, "bios", 0) /* motherboard bios */ ROM_LOAD("bios.bin", 0x000000, 0x10000, CRC(e70168ff) SHA1(4a0d985c218209b7db2b2d33f606068aae539020) ) ROM_REGION32_LE(0x20000, "video_bios", 0) /* Trident TVGA9000 BIOS */ diff --git a/src/mame/drivers/rc2014.cpp b/src/mame/drivers/rc2014.cpp index 80af8114c92..eeddd9b8b72 100644 --- a/src/mame/drivers/rc2014.cpp +++ b/src/mame/drivers/rc2014.cpp @@ -42,6 +42,19 @@ public: } // + // Backplane-5 - 5 x 40pin slots + // + void rc2014bp5(machine_config &config) + { + RC2014_BUS(config, m_rc2014_bus, 0); + RC2014_SLOT(config, "bus:1", m_rc2014_bus, rc2014_bus_modules, nullptr); + RC2014_SLOT(config, "bus:2", m_rc2014_bus, rc2014_bus_modules, nullptr); + RC2014_SLOT(config, "bus:3", m_rc2014_bus, rc2014_bus_modules, nullptr); + RC2014_SLOT(config, "bus:4", m_rc2014_bus, rc2014_bus_modules, nullptr); + RC2014_SLOT(config, "bus:5", m_rc2014_bus, rc2014_bus_modules, nullptr); + } + + // // RC2014 Classic II // // Clock/Reset @@ -79,7 +92,7 @@ public: // Backplane 8 - 8 x 40pin slots // // Some modules are extended bus modules in standard slots - // + // void rc2014zed(machine_config &config) { RC2014_BUS(config, m_rc2014_bus, 0); @@ -93,17 +106,41 @@ public: RC2014_SLOT(config, "bus:8", m_rc2014_bus, rc2014_bus_modules, nullptr); } + // + // Backplane 8 - 8 x 40pin slots + // + void rc2014bp8(machine_config &config) + { + RC2014_BUS(config, m_rc2014_bus, 0); + RC2014_SLOT(config, "bus:1", m_rc2014_bus, rc2014_bus_modules, nullptr); + RC2014_SLOT(config, "bus:2", m_rc2014_bus, rc2014_bus_modules, nullptr); + RC2014_SLOT(config, "bus:3", m_rc2014_bus, rc2014_bus_modules, nullptr); + RC2014_SLOT(config, "bus:4", m_rc2014_bus, rc2014_bus_modules, nullptr); + RC2014_SLOT(config, "bus:5", m_rc2014_bus, rc2014_bus_modules, nullptr); + RC2014_SLOT(config, "bus:6", m_rc2014_bus, rc2014_bus_modules, nullptr); + RC2014_SLOT(config, "bus:7", m_rc2014_bus, rc2014_bus_modules, nullptr); + RC2014_SLOT(config, "bus:8", m_rc2014_bus, rc2014_bus_modules, nullptr); + } + private: required_device<rc2014_bus_device> m_rc2014_bus; }; ROM_START(rc2014) ROM_END + +ROM_START(rc2014bp5) +ROM_END + ROM_START(rc2014cl2) ROM_END + ROM_START(rc2014zed) ROM_END +ROM_START(rc2014bp8) +ROM_END + class rc2014pro_state : public driver_device { public: @@ -123,7 +160,7 @@ public: // Compact Flash storage // // Backplane Pro - 12 x extended slots - // + // void rc2014pro(machine_config &config) { RC2014_EXT_BUS(config, m_rc2014_bus, 0); @@ -140,7 +177,7 @@ public: RC2014_EXT_SLOT(config, "bus:11", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); RC2014_EXT_SLOT(config, "bus:12", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); } - + // // RC2014 Zed // @@ -167,6 +204,26 @@ public: RC2014_EXT_SLOT(config, "bus:11", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); RC2014_EXT_SLOT(config, "bus:12", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); } + + // + // Backplane Pro - 12 x extended slots + // + void rc2014bppro(machine_config &config) + { + RC2014_EXT_BUS(config, m_rc2014_bus, 0); + RC2014_EXT_SLOT(config, "bus:1", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); + RC2014_EXT_SLOT(config, "bus:2", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); + RC2014_EXT_SLOT(config, "bus:3", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); + RC2014_EXT_SLOT(config, "bus:4", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); + RC2014_EXT_SLOT(config, "bus:5", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); + RC2014_EXT_SLOT(config, "bus:6", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); + RC2014_EXT_SLOT(config, "bus:7", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); + RC2014_EXT_SLOT(config, "bus:8", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); + RC2014_EXT_SLOT(config, "bus:9", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); + RC2014_EXT_SLOT(config, "bus:10", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); + RC2014_EXT_SLOT(config, "bus:11", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); + RC2014_EXT_SLOT(config, "bus:12", m_rc2014_bus, rc2014_ext_bus_modules, nullptr); + } private: required_device<rc2014_ext_bus_device> m_rc2014_bus; }; @@ -177,12 +234,67 @@ ROM_END ROM_START(rc2014zedp) ROM_END +ROM_START(rc2014bppro) +ROM_END + +static DEVICE_INPUT_DEFAULTS_START(mini_cpm) + DEVICE_INPUT_DEFAULTS("ROM", 0x1, 0x0) +DEVICE_INPUT_DEFAULTS_END + +class rc2014mini_state : public driver_device +{ +public: + rc2014mini_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_rc2014_bus(*this, "bus") + { } + + // + // RC2014 Mini + // + // Added by Chris Swan + // https://rc2014.co.uk/full-kits/rc2014-mini/ + // + void rc2014mini(machine_config &config) + { + RC2014_BUS(config, m_rc2014_bus, 0); + RC2014_SLOT(config, "board", m_rc2014_bus, rc2014_mini_bus_modules, "mini", true); + RC2014_SLOT(config, "bus:1", m_rc2014_bus, rc2014_mini_bus_modules, nullptr); + } + + // + // RC2014 Mini with CP/M Upgrade + // + void rc2014minicpm(machine_config &config) + { + RC2014_BUS(config, m_rc2014_bus, 0); + RC2014_SLOT(config, "board", m_rc2014_bus, rc2014_mini_bus_modules, "mini", true).set_option_device_input_defaults("mini", DEVICE_INPUT_DEFAULTS_NAME(mini_cpm)); + RC2014_SLOT(config, "bus:1", m_rc2014_bus, rc2014_mini_bus_modules, "mini_cpm", true); + } + +private: + required_device<rc2014_bus_device> m_rc2014_bus; +}; + +ROM_START(rc2014mini) +ROM_END + +ROM_START(rc2014minicpm) +ROM_END + } // anonymous namespace // This ties everything together -// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 2016, rc2014, 0, 0, rc2014, 0, rc2014_state, empty_init, "RFC2795 Ltd", "RC2014 Classic", MACHINE_SUPPORTS_SAVE ) -COMP( 2017, rc2014pro, rc2014, 0, rc2014pro, 0, rc2014pro_state, empty_init, "RFC2795 Ltd", "RC2014 Pro", MACHINE_SUPPORTS_SAVE ) -COMP( 2020, rc2014cl2, rc2014, 0, rc2014cl2, 0, rc2014_state, empty_init, "RFC2795 Ltd", "RC2014 Classic II", MACHINE_SUPPORTS_SAVE ) -COMP( 2018, rc2014zed , rc2014, 0, rc2014zed ,0, rc2014_state, empty_init, "RFC2795 Ltd", "RC2014 Zed", MACHINE_SUPPORTS_SAVE ) -COMP( 2018, rc2014zedp, rc2014, 0, rc2014zedp,0, rc2014pro_state, empty_init, "RFC2795 Ltd", "RC2014 Zed Pro", MACHINE_SUPPORTS_SAVE ) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 2016, rc2014, 0, 0, rc2014, 0, rc2014_state, empty_init, "RFC2795 Ltd", "RC2014 Classic", MACHINE_SUPPORTS_SAVE ) +COMP( 2017, rc2014pro, rc2014, 0, rc2014pro, 0, rc2014pro_state, empty_init, "RFC2795 Ltd", "RC2014 Pro", MACHINE_SUPPORTS_SAVE ) +COMP( 2020, rc2014cl2, rc2014, 0, rc2014cl2, 0, rc2014_state, empty_init, "RFC2795 Ltd", "RC2014 Classic II", MACHINE_SUPPORTS_SAVE ) +COMP( 2018, rc2014zed, rc2014, 0, rc2014zed, 0, rc2014_state, empty_init, "RFC2795 Ltd", "RC2014 Zed", MACHINE_SUPPORTS_SAVE ) +COMP( 2018, rc2014zedp, rc2014, 0, rc2014zedp, 0, rc2014pro_state, empty_init, "RFC2795 Ltd", "RC2014 Zed Pro", MACHINE_SUPPORTS_SAVE ) +COMP( 2016, rc2014mini, rc2014, 0, rc2014mini, 0, rc2014mini_state, empty_init, "RFC2795 Ltd", "RC2014 Mini", MACHINE_SUPPORTS_SAVE ) +COMP( 2016, rc2014minicpm,rc2014, 0, rc2014minicpm, 0, rc2014mini_state, empty_init, "RFC2795 Ltd", "RC2014 Mini with CP/M Upgrade", MACHINE_SUPPORTS_SAVE ) + +// Backplanes +COMP( 2016, rc2014bp5, rc2014, 0, rc2014bp5, 0, rc2014_state, empty_init, "RFC2795 Ltd", "RC2014 Backplane-5", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) +COMP( 2016, rc2014bp8, rc2014, 0, rc2014bp8, 0, rc2014_state, empty_init, "RFC2795 Ltd", "RC2014 Backplane-8", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) +COMP( 2017, rc2014bppro, rc2014, 0, rc2014bppro, 0, rc2014pro_state, empty_init, "RFC2795 Ltd", "RC2014 Backplane Pro", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) diff --git a/src/mame/drivers/umipoker.cpp b/src/mame/drivers/umipoker.cpp index a219c15b377..81ed8e13ba7 100644 --- a/src/mame/drivers/umipoker.cpp +++ b/src/mame/drivers/umipoker.cpp @@ -5,6 +5,10 @@ Umi de Poker (c) 1997 World Station Co.,LTD Slot Poker Saiyuki (c) 1998 World Station Co.,LTD + Undumped games running on the same hardware: + * Baccara Star (World-One) + * Baccarat Special (World-One) + Driver by Angelo Salese. Additional work by Roberto Fresca. diff --git a/src/mame/drivers/vball.cpp b/src/mame/drivers/vball.cpp index d2f28fbe89e..bab0303b5eb 100644 --- a/src/mame/drivers/vball.cpp +++ b/src/mame/drivers/vball.cpp @@ -20,7 +20,7 @@ Remaining Issues: -1) IRQ & NMI code is totally guessed, and needs to be solved properly -Measurements from Guru (someone needs to rewrite INTERRUPT_GEN() in video/vball.cpp): +Measurements from Guru: 6502 /IRQ = 1.720kHz 6202 /NMI = 58 Hz VBlank = 58Hz @@ -117,7 +117,6 @@ public: m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), m_palette(*this, "palette"), - m_attribram(*this, "attribram"), m_videoram(*this, "videoram"), m_scrolly_lo(*this, "scrolly_lo"), diff --git a/src/mame/drivers/vic20.cpp b/src/mame/drivers/vic20.cpp index 3024231550f..ecd70122b6d 100644 --- a/src/mame/drivers/vic20.cpp +++ b/src/mame/drivers/vic20.cpp @@ -53,7 +53,7 @@ public: m_kernal(*this, "kernal"), m_charom(*this, "charom"), m_color_ram(*this, "color_ram"), - m_row(*this, "ROW%u", 0), + m_col(*this, "COL%u", 0), m_restore(*this, "RESTORE"), m_lock(*this, "LOCK") { } @@ -81,7 +81,7 @@ private: required_region_ptr<uint8_t> m_kernal; required_region_ptr<uint8_t> m_charom; required_shared_ptr<uint8_t> m_color_ram; - required_ioport_array<8> m_row; + required_ioport_array<8> m_col; required_ioport m_restore; required_ioport m_lock; @@ -106,6 +106,7 @@ private: uint8_t via2_pa_r(); uint8_t via2_pb_r(); + void via2_pa_w(uint8_t data); void via2_pb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( via2_ca2_w ); DECLARE_WRITE_LINE_MEMBER( via2_cb2_w ); @@ -114,6 +115,7 @@ private: DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_vc20); // keyboard state + int m_key_row; int m_key_col; int m_light_pen; int m_user_joy0; @@ -402,7 +404,7 @@ void vic20_state::vic_colorram_map(address_map &map) //------------------------------------------------- static INPUT_PORTS_START( vic20 ) - PORT_START( "ROW0" ) + PORT_START( "COL0" ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Del Inst") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR(0xA3) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('+') @@ -412,7 +414,7 @@ static INPUT_PORTS_START( vic20 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') - PORT_START( "ROW1" ) + PORT_START( "COL1" ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('*') PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P') @@ -422,7 +424,7 @@ static INPUT_PORTS_START( vic20 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x90") PORT_CODE(KEYCODE_TILDE) PORT_CHAR(0x2190) - PORT_START( "ROW2" ) + PORT_START( "COL2" ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Crsr Right Left") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR(']') PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') @@ -432,7 +434,7 @@ static INPUT_PORTS_START( vic20 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_SHIFT_2) - PORT_START( "ROW3" ) + PORT_START( "COL3" ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Crsr Down Up") PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') @@ -442,7 +444,7 @@ static INPUT_PORTS_START( vic20 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Shift (Left)") PORT_CODE(KEYCODE_LSHIFT) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Stop Run") PORT_CODE(KEYCODE_HOME) - PORT_START( "ROW4" ) + PORT_START( "COL4" ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Shift (Right)") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') @@ -452,7 +454,7 @@ static INPUT_PORTS_START( vic20 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') - PORT_START( "ROW5" ) + PORT_START( "COL5" ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('=') PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('[') @@ -462,7 +464,7 @@ static INPUT_PORTS_START( vic20 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CBM") PORT_CODE(KEYCODE_LCONTROL) - PORT_START( "ROW6" ) + PORT_START( "COL6" ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CHAR(UCHAR_MAMEKEY(F6)) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x91 Pi") PORT_CODE(KEYCODE_DEL) PORT_CHAR(0x2191,'^') PORT_CHAR(0x03C0) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') @@ -472,7 +474,7 @@ static INPUT_PORTS_START( vic20 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') - PORT_START( "ROW7" ) + PORT_START( "COL7" ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F7)) PORT_CHAR(UCHAR_MAMEKEY(F8)) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Home Clr") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(HOME)) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('-') @@ -498,7 +500,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( vic1001 ) PORT_INCLUDE( vic20 ) - PORT_MODIFY( "ROW0" ) + PORT_MODIFY( "COL0" ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR(0xA5) INPUT_PORTS_END @@ -510,24 +512,24 @@ INPUT_PORTS_END static INPUT_PORTS_START( vic20s ) PORT_INCLUDE( vic20 ) - PORT_MODIFY( "ROW0" ) + PORT_MODIFY( "COL0" ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR(':') PORT_CHAR('*') PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') - PORT_MODIFY( "ROW1" ) + PORT_MODIFY( "COL1" ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('@') - PORT_MODIFY( "ROW2" ) + PORT_MODIFY( "COL2" ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0x00C4) - PORT_MODIFY( "ROW5" ) + PORT_MODIFY( "COL5" ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(';') PORT_CHAR('+') PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(0x00D6) - PORT_MODIFY( "ROW6" ) + PORT_MODIFY( "COL6" ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR(0x00C5) - PORT_MODIFY( "ROW7" ) + PORT_MODIFY( "COL7" ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') INPUT_PORTS_END @@ -635,7 +637,7 @@ uint8_t vic20_state::via2_pa_r() for (int i = 0; i < 8; i++) { - if (!BIT(m_key_col, i)) data &= m_row[i]->read(); + if (!BIT(m_key_col, i)) data &= m_col[i]->read(); } return data; @@ -663,11 +665,40 @@ uint8_t vic20_state::via2_pb_r() // joystick uint8_t joy = m_joy->read_joy(); - data &= BIT(joy, 3) << 7; + data &= (BIT(joy, 3) << 7) | 0x7f; + + for (int i = 0; i < 8; i++) + { + if (!BIT(m_key_row, i)) + for (int c = 0; c < 8; c++) + if (!BIT(m_col[c]->read(), i)) + data &= ~(1 << c); + } return data; } +void vic20_state::via2_pa_w(uint8_t data) +{ + /* + + bit description + + PA0 ROW 0 + PA1 ROW 1 + PA2 ROW 2 + PA3 ROW 3 + PA4 ROW 4 + PA5 ROW 5 + PA6 ROW 6 + PA7 ROW 7 + + */ + + // keyboard row + m_key_row = data; +} + void vic20_state::via2_pb_w(uint8_t data) { /* @@ -737,7 +768,11 @@ void vic20_state::machine_start() if (!(offset % 64)) data ^= 0xff; } + m_key_row = 0xff; + m_key_col = 0xff; + // state saving + save_item(NAME(m_key_row)); save_item(NAME(m_key_col)); save_item(NAME(m_light_pen)); save_item(NAME(m_user_joy0)); @@ -873,6 +908,7 @@ void vic20_state::add_clocked_devices(machine_config &config, uint32_t clock) MOS6522(config, m_via2, clock); m_via2->readpa_handler().set(FUNC(vic20_state::via2_pa_r)); m_via2->readpb_handler().set(FUNC(vic20_state::via2_pb_r)); + m_via2->writepa_handler().set(FUNC(vic20_state::via2_pa_w)); m_via2->writepb_handler().set(FUNC(vic20_state::via2_pb_w)); m_via2->ca2_handler().set(FUNC(vic20_state::via2_ca2_w)); m_via2->cb2_handler().set(FUNC(vic20_state::via2_cb2_w)); diff --git a/src/mame/includes/goldstar.h b/src/mame/includes/goldstar.h index 78faf542186..75781de32c7 100644 --- a/src/mame/includes/goldstar.h +++ b/src/mame/includes/goldstar.h @@ -295,6 +295,7 @@ public: } void init_cb3(); + void init_cb3c(); void init_cb3e(); void init_cb3f(); void init_cherrys(); diff --git a/src/mame/includes/gstriker.h b/src/mame/includes/gstriker.h deleted file mode 100644 index c3401a43e66..00000000000 --- a/src/mame/includes/gstriker.h +++ /dev/null @@ -1,102 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Farfetch'd, David Haywood -#ifndef MAME_INCLUDES_GSTRIKER_H -#define MAME_INCLUDES_GSTRIKER_H - -#pragma once - -#include "machine/6850acia.h" -#include "machine/gen_latch.h" -#include "machine/mb3773.h" -#include "video/vsystem_spr.h" -#include "video/mb60553.h" -#include "video/vs920a.h" -#include "emupal.h" -#include "screen.h" - - - -class gstriker_state : public driver_device -{ -public: - gstriker_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), - m_spr(*this, "vsystem_spr"), - m_bg(*this, "zoomtilemap"), - m_tx(*this, "texttilemap"), - m_gfxdecode(*this, "gfxdecode"), - m_screen(*this, "screen"), - m_palette(*this, "palette"), - m_soundlatch(*this, "soundlatch"), - m_watchdog(*this, "watchdog"), - m_acia(*this, "acia"), - m_CG10103_m_vram(*this, "cg10103_m_vram"), - m_work_ram(*this, "work_ram"), - m_mixerregs(*this, "mixerregs") - { } - - void base(machine_config &config); - void twc94(machine_config &config); - void gstriker(machine_config &config); - void vgoal(machine_config &config); - - void init_vgoalsoc(); - void init_twcup94(); - void init_twcup94a(); - void init_twcup94b(); - -protected: - virtual void machine_start() override; - virtual void video_start() override; - -private: - required_device<cpu_device> m_maincpu; - required_device<cpu_device> m_audiocpu; - required_device<vsystem_spr_device> m_spr; - required_device<mb60553_zooming_tilemap_device> m_bg; - required_device<vs920a_text_tilemap_device> m_tx; - required_device<gfxdecode_device> m_gfxdecode; - required_device<screen_device> m_screen; - required_device<palette_device> m_palette; - required_device<generic_latch_8_device> m_soundlatch; - required_device<mb3773_device> m_watchdog; - optional_device<acia6850_device> m_acia; - - required_shared_ptr<uint16_t> m_CG10103_m_vram; - std::unique_ptr<uint16_t[]> m_buffered_spriteram{}; - std::unique_ptr<uint16_t[]> m_buffered_spriteram2{}; - required_shared_ptr<uint16_t> m_work_ram; - required_shared_ptr<uint16_t> m_mixerregs; - - enum { - TECMO_WCUP94_MCU = 1, - TECMO_WCUP94A_MCU, - TECMO_WCUP94B_MCU, - VGOAL_SOCCER_MCU - }m_mcutype; - int m_gametype = 0; - uint16_t m_prot_reg[2]{}; - - // common - void sh_bankswitch_w(uint8_t data); - - // vgoalsoc and twrldc - void twcup94_prot_reg_w(uint8_t data); - - // vgoalsoc only - uint16_t vbl_toggle_r(); - void vbl_toggle_w(uint16_t data); - - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE_LINE_MEMBER(screen_vblank); - - void mcu_init(); - void gstriker_map(address_map &map); - void sound_io_map(address_map &map); - void sound_map(address_map &map); - void twcup94_map(address_map &map); -}; - -#endif // MAME_INCLUDES_GSTRIKER_H diff --git a/src/mame/layout/j_dud.lay b/src/mame/layout/j_dud.lay new file mode 100644 index 00000000000..f8e865c2d4e --- /dev/null +++ b/src/mame/layout/j_dud.lay @@ -0,0 +1,144 @@ +<?xml version="1.0"?> +<!-- +Nudge Double Up Deluxe +license:CC0 +--> +<mamelayout version="2"> + <element name="matrixlamp"> + <rect state ="0"> + <bounds x="0" y="0" width="7" height="7" /> + <color red="0.7" green="0.7" blue="0.7" /> + </rect> + <rect state ="1"> + <bounds x="0" y="0" width="7" height="7" /> + <color red="0.95" green="0.95" blue="0.43" /> + </rect> + </element> + <element name="rect_white"> + <rect> + <color red="1.0" green="1.0" blue="1.0"/> + </rect> + </element> + <element name="rect_black"> + <rect> + <color red="0.0" green="0.0" blue="0.0"/> + </rect> + </element> + <element name="text_credits"> + <rect> + <color red="0.0" green="0.0" blue="0.0"/> + </rect> + <text string="Plays"> + <color red="1.0" green="1.0" blue="1.0"/> + <bounds x="0.05" y="0.05" width="0.90" height="0.90"/> + </text> + </element> + <element name="Reel 1"> + <rect> <bounds x="0" y="0" width="100" height="400"/> <color alpha="0.0"/> </rect> + <text string="Melon"> <bounds x="0" y="40" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="60" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="80" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="100" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="120" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="140" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="160" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="180" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="200" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="220" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="240" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="260" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="280" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="300" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="320" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="340" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="360" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="380" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="0" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="JPM"> <bounds x="0" y="20" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + </element> + <element name="Reel 2"> + <rect> <bounds x="0" y="0" width="100" height="400"/> <color alpha="0.0"/> </rect> + <text string="Orange"> <bounds x="0" y="40" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="60" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="80" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="100" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="120" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="140" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="160" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="180" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="200" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="220" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="240" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="260" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="280" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="300" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="320" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="340" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="360" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="380" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="0" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="JPM"> <bounds x="0" y="20" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + </element> + <element name="Reel 3"> + <rect> <bounds x="0" y="0" width="100" height="400"/> <color alpha="0.0"/> </rect> + <text string="Grapes"> <bounds x="0" y="40" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="60" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="80" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="100" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="120" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="140" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="160" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="180" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="200" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="220" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="240" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="260" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="280" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="300" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="320" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="340" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="360" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="380" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="0" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="JPM"> <bounds x="0" y="20" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + </element> + <element name="LCD" defstate="0"> + <led7seg> + <color red="0.9" green="0.0" blue="0.0" /> + </led7seg> + </element> + + <view name="AWP Simulated Video (No Artwork)"> + <repeat count="3"> + <param name="i" start="1" increment="1" /> + <param name="x" start="20" increment="50" /> + <element ref="rect_white"> + <bounds x="~x~" y="300" width="30" height="100"/> + </element> + <element ref="Reel ~i~" state="0"> + <bounds x="~x~" y="300" width="30" height="100"/> + <yscroll name="sreel~i~" size="0.25" wrap="yes" min="65536" max="0"/> + </element> + </repeat> + <element ref="rect_black"> + <bounds x="20" y="350" width="150" height="1"/> + </element> + <element name="digit0" ref="LCD"><bounds x="170" y="390" width="18" height="30" /></element> + <element name="digit1" ref="LCD"><bounds x="194" y="390" width="18" height="30" /></element> + <element ref="text_credits"> + <bounds x="170" y="420" width="36" height="15"/> + </element> + <repeat count="5"> + <param name="i" start="0" increment="8" /> + <param name="y" start="0" increment="8" /> + <repeat count="8"> + <param name="j" start="~i~" increment="1" /> + <param name="x" start="0" increment="8" /> + <element name="lamp~j~" ref="matrixlamp" state="0"> + <bounds x="~x~" y="~y~" width="7" height="7"/> + </element> + </repeat> + </repeat> + </view> +</mamelayout> + diff --git a/src/mame/layout/j_ewn.lay b/src/mame/layout/j_ewn.lay new file mode 100644 index 00000000000..da7082b3047 --- /dev/null +++ b/src/mame/layout/j_ewn.lay @@ -0,0 +1,144 @@ +<?xml version="1.0"?> +<!-- +Each Way Nudger +license:CC0 +--> +<mamelayout version="2"> + <element name="matrixlamp"> + <rect state ="0"> + <bounds x="0" y="0" width="7" height="7" /> + <color red="0.7" green="0.7" blue="0.7" /> + </rect> + <rect state ="1"> + <bounds x="0" y="0" width="7" height="7" /> + <color red="0.95" green="0.95" blue="0.43" /> + </rect> + </element> + <element name="rect_white"> + <rect> + <color red="1.0" green="1.0" blue="1.0"/> + </rect> + </element> + <element name="rect_black"> + <rect> + <color red="0.0" green="0.0" blue="0.0"/> + </rect> + </element> + <element name="text_credits"> + <rect> + <color red="0.0" green="0.0" blue="0.0"/> + </rect> + <text string="Plays"> + <color red="1.0" green="1.0" blue="1.0"/> + <bounds x="0.05" y="0.05" width="0.90" height="0.90"/> + </text> + </element> + <element name="Reel 1"> + <rect> <bounds x="0" y="0" width="100" height="400"/> <color alpha="0.0"/> </rect> + <text string="Melon"> <bounds x="0" y="40" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="60" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="80" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="100" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="120" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="140" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="160" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="180" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="200" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="220" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="240" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="260" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="280" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="300" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="320" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="340" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="360" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="380" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="0" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="JPM"> <bounds x="0" y="20" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + </element> + <element name="Reel 2"> + <rect> <bounds x="0" y="0" width="100" height="400"/> <color alpha="0.0"/> </rect> + <text string="Orange"> <bounds x="0" y="40" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="60" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="80" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="100" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="120" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="140" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="160" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="180" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="200" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="220" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="240" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="260" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="280" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="300" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="320" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="340" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="360" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="380" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="0" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="JPM"> <bounds x="0" y="20" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + </element> + <element name="Reel 3"> + <rect> <bounds x="0" y="0" width="100" height="400"/> <color alpha="0.0"/> </rect> + <text string="Orange"> <bounds x="0" y="40" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="60" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="80" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="100" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="120" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="140" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="160" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="180" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="200" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="220" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="240" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="260" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="280" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="300" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="320" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="340" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="360" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="380" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="0" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="JPM"> <bounds x="0" y="20" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + </element> + <element name="LCD" defstate="0"> + <led7seg> + <color red="0.9" green="0.0" blue="0.0" /> + </led7seg> + </element> + + <view name="AWP Simulated Video (No Artwork)"> + <repeat count="3"> + <param name="i" start="1" increment="1" /> + <param name="x" start="20" increment="50" /> + <element ref="rect_white"> + <bounds x="~x~" y="300" width="30" height="100"/> + </element> + <element ref="Reel ~i~" state="0"> + <bounds x="~x~" y="300" width="30" height="100"/> + <yscroll name="sreel~i~" size="0.25" wrap="yes" min="65536" max="0"/> + </element> + </repeat> + <element ref="rect_black"> + <bounds x="20" y="350" width="150" height="1"/> + </element> + <element name="digit0" ref="LCD"><bounds x="170" y="390" width="18" height="30" /></element> + <element name="digit1" ref="LCD"><bounds x="194" y="390" width="18" height="30" /></element> + <element ref="text_credits"> + <bounds x="170" y="420" width="36" height="15"/> + </element> + <repeat count="5"> + <param name="i" start="0" increment="8" /> + <param name="y" start="0" increment="8" /> + <repeat count="8"> + <param name="j" start="~i~" increment="1" /> + <param name="x" start="0" increment="8" /> + <element name="lamp~j~" ref="matrixlamp" state="0"> + <bounds x="~x~" y="~y~" width="7" height="7"/> + </element> + </repeat> + </repeat> + </view> +</mamelayout> + diff --git a/src/mame/layout/j_lan.lay b/src/mame/layout/j_lan.lay new file mode 100644 index 00000000000..3c6e8afbced --- /dev/null +++ b/src/mame/layout/j_lan.lay @@ -0,0 +1,144 @@ +<?xml version="1.0"?> +<!-- +Lite A Nudge +license:CC0 +--> +<mamelayout version="2"> + <element name="matrixlamp"> + <rect state ="0"> + <bounds x="0" y="0" width="7" height="7" /> + <color red="0.7" green="0.7" blue="0.7" /> + </rect> + <rect state ="1"> + <bounds x="0" y="0" width="7" height="7" /> + <color red="0.95" green="0.95" blue="0.43" /> + </rect> + </element> + <element name="rect_white"> + <rect> + <color red="1.0" green="1.0" blue="1.0"/> + </rect> + </element> + <element name="rect_black"> + <rect> + <color red="0.0" green="0.0" blue="0.0"/> + </rect> + </element> + <element name="text_credits"> + <rect> + <color red="0.0" green="0.0" blue="0.0"/> + </rect> + <text string="Plays"> + <color red="1.0" green="1.0" blue="1.0"/> + <bounds x="0.05" y="0.05" width="0.90" height="0.90"/> + </text> + </element> + <element name="Reel 1"> + <rect> <bounds x="0" y="0" width="100" height="400"/> <color alpha="0.0"/> </rect> + <text string="Melon"> <bounds x="0" y="40" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="60" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell(1)"> <bounds x="0" y="80" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="100" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="120" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear(2)"> <bounds x="0" y="140" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="160" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell(2)"> <bounds x="0" y="180" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="200" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange(1)"> <bounds x="0" y="220" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="240" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="260" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="280" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear(2)"> <bounds x="0" y="300" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="320" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange(2)"> <bounds x="0" y="340" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear(1)"> <bounds x="0" y="360" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="380" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="0" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="JPM"> <bounds x="0" y="20" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + </element> + <element name="Reel 2"> + <rect> <bounds x="0" y="0" width="100" height="400"/> <color alpha="0.0"/> </rect> + <text string="Orange"> <bounds x="0" y="40" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum(2)"> <bounds x="0" y="60" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="80" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum(1)"> <bounds x="0" y="100" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="120" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="140" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="160" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum(1)"> <bounds x="0" y="180" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="200" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="220" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum(2)"> <bounds x="0" y="240" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="260" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="280" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="300" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="320" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum(2)"> <bounds x="0" y="340" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="360" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum(1)"> <bounds x="0" y="380" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="0" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="JPM"> <bounds x="0" y="20" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + </element> + <element name="Reel 3"> + <rect> <bounds x="0" y="0" width="100" height="400"/> <color alpha="0.0"/> </rect> + <text string="Orange(2)"> <bounds x="0" y="40" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="60" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="80" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="100" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="120" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell(2)"> <bounds x="0" y="140" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="160" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="180" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange(1)"> <bounds x="0" y="200" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="220" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="240" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear(1)"> <bounds x="0" y="260" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="280" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear(2)"> <bounds x="0" y="300" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="320" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange(2)"> <bounds x="0" y="340" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="360" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="380" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell(1)"> <bounds x="0" y="0" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="JPM"> <bounds x="0" y="20" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + </element> + <element name="LCD" defstate="0"> + <led7seg> + <color red="0.9" green="0.0" blue="0.0" /> + </led7seg> + </element> + + <view name="AWP Simulated Video (No Artwork)"> + <repeat count="3"> + <param name="i" start="1" increment="1" /> + <param name="x" start="20" increment="50" /> + <element ref="rect_white"> + <bounds x="~x~" y="300" width="30" height="100"/> + </element> + <element ref="Reel ~i~" state="0"> + <bounds x="~x~" y="300" width="30" height="100"/> + <yscroll name="sreel~i~" size="0.25" wrap="yes" min="65536" max="0"/> + </element> + </repeat> + <element ref="rect_black"> + <bounds x="20" y="350" width="150" height="1"/> + </element> + <element name="digit0" ref="LCD"><bounds x="170" y="390" width="18" height="30" /></element> + <element name="digit1" ref="LCD"><bounds x="194" y="390" width="18" height="30" /></element> + <element ref="text_credits"> + <bounds x="170" y="420" width="36" height="15"/> + </element> + <repeat count="7"> + <param name="i" start="0" increment="8" /> + <param name="y" start="0" increment="8" /> + <repeat count="8"> + <param name="j" start="~i~" increment="1" /> + <param name="x" start="0" increment="8" /> + <element name="lamp~j~" ref="matrixlamp" state="0"> + <bounds x="~x~" y="~y~" width="7" height="7"/> + </element> + </repeat> + </repeat> + </view> +</mamelayout> + diff --git a/src/mame/layout/j_ndu.lay b/src/mame/layout/j_ndu.lay new file mode 100644 index 00000000000..e039bad45b5 --- /dev/null +++ b/src/mame/layout/j_ndu.lay @@ -0,0 +1,144 @@ +<?xml version="1.0"?> +<!-- +Nudge Double Up +license:CC0 +--> +<mamelayout version="2"> + <element name="matrixlamp"> + <rect state ="0"> + <bounds x="0" y="0" width="7" height="7" /> + <color red="0.7" green="0.7" blue="0.7" /> + </rect> + <rect state ="1"> + <bounds x="0" y="0" width="7" height="7" /> + <color red="0.95" green="0.95" blue="0.43" /> + </rect> + </element> + <element name="rect_white"> + <rect> + <color red="1.0" green="1.0" blue="1.0"/> + </rect> + </element> + <element name="rect_black"> + <rect> + <color red="0.0" green="0.0" blue="0.0"/> + </rect> + </element> + <element name="text_credits"> + <rect> + <color red="0.0" green="0.0" blue="0.0"/> + </rect> + <text string="Plays"> + <color red="1.0" green="1.0" blue="1.0"/> + <bounds x="0.05" y="0.05" width="0.90" height="0.90"/> + </text> + </element> + <element name="Reel 1"> + <rect> <bounds x="0" y="0" width="100" height="400"/> <color alpha="0.0"/> </rect> + <text string="Melon"> <bounds x="0" y="40" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="60" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="80" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="100" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="120" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="140" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="160" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="180" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="200" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="220" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="240" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="260" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="280" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="300" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="320" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="340" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="360" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="380" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="0" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="JPM"> <bounds x="0" y="20" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + </element> + <element name="Reel 2"> + <rect> <bounds x="0" y="0" width="100" height="400"/> <color alpha="0.0"/> </rect> + <text string="Orange"> <bounds x="0" y="40" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="60" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="80" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="100" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="120" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="140" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="160" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="180" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="200" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="220" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="240" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="260" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="280" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="300" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="320" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="340" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="360" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="380" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="0" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="JPM"> <bounds x="0" y="20" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + </element> + <element name="Reel 3"> + <rect> <bounds x="0" y="0" width="100" height="400"/> <color alpha="0.0"/> </rect> + <text string="Grapes"> <bounds x="0" y="40" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="60" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="80" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="100" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="120" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="140" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="160" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="180" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="200" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Melon"> <bounds x="0" y="220" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="240" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="260" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="280" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Pear"> <bounds x="0" y="300" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Plum"> <bounds x="0" y="320" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Orange"> <bounds x="0" y="340" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Grapes"> <bounds x="0" y="360" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Cherry"> <bounds x="0" y="380" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="Bell"> <bounds x="0" y="0" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="JPM"> <bounds x="0" y="20" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + </element> + <element name="LCD" defstate="0"> + <led7seg> + <color red="0.9" green="0.0" blue="0.0" /> + </led7seg> + </element> + + <view name="AWP Simulated Video (No Artwork)"> + <repeat count="3"> + <param name="i" start="1" increment="1" /> + <param name="x" start="20" increment="50" /> + <element ref="rect_white"> + <bounds x="~x~" y="300" width="30" height="100"/> + </element> + <element ref="Reel ~i~" state="0"> + <bounds x="~x~" y="300" width="30" height="100"/> + <yscroll name="sreel~i~" size="0.25" wrap="yes" min="65536" max="0"/> + </element> + </repeat> + <element ref="rect_black"> + <bounds x="20" y="350" width="150" height="1"/> + </element> + <element name="digit0" ref="LCD"><bounds x="170" y="390" width="18" height="30" /></element> + <element name="digit1" ref="LCD"><bounds x="194" y="390" width="18" height="30" /></element> + <element ref="text_credits"> + <bounds x="170" y="420" width="36" height="15"/> + </element> + <repeat count="5"> + <param name="i" start="0" increment="8" /> + <param name="y" start="0" increment="8" /> + <repeat count="8"> + <param name="j" start="~i~" increment="1" /> + <param name="x" start="0" increment="8" /> + <element name="lamp~j~" ref="matrixlamp" state="0"> + <bounds x="~x~" y="~y~" width="7" height="7"/> + </element> + </repeat> + </repeat> + </view> +</mamelayout> + diff --git a/src/mame/layout/jpmsru.lay b/src/mame/layout/jpmsru.lay index ba3d2fd40ba..9ccde975c26 100644 --- a/src/mame/layout/jpmsru.lay +++ b/src/mame/layout/jpmsru.lay @@ -10,912 +10,68 @@ license:CC0 </rect> <rect state ="1"> <bounds x="0" y="0" width="7" height="7" /> - <color red="0.0" green="0.0" blue="1.0" /> + <color red="0.95" green="0.95" blue="0.43" /> </rect> - <rect state ="2"> - <bounds x="0" y="0" width="7" height="7" /> - <color red="0.0" green="1.0" blue="0.0" /> + </element> + <element name="reel_bg"> + <rect> + <color red="1.0" green="1.0" blue="1.0"/> </rect> </element> - <element name="Steppers" defstate="0"> - <simplecounter maxstate="999" digits="3"> - <color red="1.0" green="1.0" blue="1.0" /> - <bounds x="0" y="0" width="1" height="1" /> - </simplecounter> + <element name="Reel"> + <rect> <bounds x="0" y="0" width="100" height="400"/> <color alpha="0.0"/> </rect> + <text string="1"> <bounds x="0" y="40" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="2"> <bounds x="0" y="60" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="3"> <bounds x="0" y="80" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="4"> <bounds x="0" y="100" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="5"> <bounds x="0" y="120" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="6"> <bounds x="0" y="140" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="7"> <bounds x="0" y="160" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="8"> <bounds x="0" y="180" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="9"> <bounds x="0" y="200" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="10"> <bounds x="0" y="220" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="11"> <bounds x="0" y="240" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="12"> <bounds x="0" y="260" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="13"> <bounds x="0" y="280" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="14"> <bounds x="0" y="300" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="15"> <bounds x="0" y="320" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="16"> <bounds x="0" y="340" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="17"> <bounds x="0" y="360" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="18"> <bounds x="0" y="380" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="19"> <bounds x="0" y="0" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> + <text string="20"> <bounds x="0" y="20" width="100" height="20"/> <color red="0.0" green="0.0" blue="0.0"/> </text> </element> - - <element name="vfd0"> - <led16segsc> - <color red="0" green="0.6" blue="1.0" /> - </led16segsc> + <element name="LCD" defstate="0"> + <led7seg> + <color red="0.9" green="0.0" blue="0.0" /> + </led7seg> </element> <view name="AWP Simulated Video (No Artwork)"> - <element name="vfd0" ref="vfd0" state="0"> - <bounds x="10" y="200" width="9" height="17"/> - </element> - <element name="vfd1" ref="vfd0" state="0"> - <bounds x="19" y="200" width="9" height="17"/> - </element> - <element name="vfd2" ref="vfd0" state="0"> - <bounds x="28" y="200" width="9" height="17"/> - </element> - <element name="vfd3" ref="vfd0" state="0"> - <bounds x="37" y="200" width="9" height="17"/> - </element> - <element name="vfd4" ref="vfd0" state="0"> - <bounds x="46" y="200" width="9" height="17"/> - </element> - <element name="vfd5" ref="vfd0" state="0"> - <bounds x="55" y="200" width="9" height="17"/> - </element> - <element name="vfd6" ref="vfd0" state="0"> - <bounds x="64" y="200" width="9" height="17"/> - </element> - <element name="vfd7" ref="vfd0" state="0"> - <bounds x="73" y="200" width="9" height="17"/> - </element> - <element name="vfd8" ref="vfd0" state="0"> - <bounds x="82" y="200" width="9" height="17"/> - </element> - <element name="vfd9" ref="vfd0" state="0"> - <bounds x="91" y="200" width="9" height="17"/> - </element> - <element name="vfd10" ref="vfd0" state="0"> - <bounds x="100" y="200" width="9" height="17"/> - </element> - <element name="vfd11" ref="vfd0" state="0"> - <bounds x="109" y="200" width="9" height="17"/> - </element> - <element name="vfd12" ref="vfd0" state="0"> - <bounds x="118" y="200" width="9" height="17"/> - </element> - <element name="vfd13" ref="vfd0" state="0"> - <bounds x="127" y="200" width="9" height="17"/> - </element> - <element name="vfd14" ref="vfd0" state="0"> - <bounds x="136" y="200" width="9" height="17"/> - </element> - <element name="vfd15" ref="vfd0" state="0"> - <bounds x="145" y="200" width="9" height="17"/> - </element> - <element name="reel1" ref="Steppers" state="0"> - <bounds x="10" y="300" width="50" height="50"/> - </element> - <element name="reel2" ref="Steppers" state="0"> - <bounds x="60" y="300" width="50" height="50"/> - </element> - <element name="reel3" ref="Steppers" state="0"> - <bounds x="110" y="300" width="50" height="50"/> - </element> - <element name="reel4" ref="Steppers" state="0"> - <bounds x="160" y="300" width="50" height="50"/> - </element> - <element name="reel5" ref="Steppers" state="0"> - <bounds x="220" y="300" width="50" height="50"/> - </element> - <element name="reel6" ref="Steppers" state="0"> - <bounds x="280" y="300" width="50" height="50"/> - </element> - <element name="lamp0" ref="matrixlamp" state="0"> - <bounds x="0" y="0" width="7" height="7"/> - </element> - <element name="lamp1" ref="matrixlamp" state="0"> - <bounds x="8" y="0" width="7" height="7"/> - </element> - <element name="lamp2" ref="matrixlamp" state="0"> - <bounds x="16" y="0" width="7" height="7"/> - </element> - <element name="lamp3" ref="matrixlamp" state="0"> - <bounds x="24" y="0" width="7" height="7"/> - </element> - <element name="lamp4" ref="matrixlamp" state="0"> - <bounds x="32" y="0" width="7" height="7"/> - </element> - <element name="lamp5" ref="matrixlamp" state="0"> - <bounds x="40" y="0" width="7" height="7"/> - </element> - <element name="lamp6" ref="matrixlamp" state="0"> - <bounds x="48" y="0" width="7" height="7"/> - </element> - <element name="lamp7" ref="matrixlamp" state="0"> - <bounds x="56" y="0" width="7" height="7"/> - </element> - <element name="lamp8" ref="matrixlamp" state="0"> - <bounds x="64" y="0" width="7" height="7"/> - </element> - <element name="lamp9" ref="matrixlamp" state="0"> - <bounds x="72" y="0" width="7" height="7"/> - </element> - <element name="lamp10" ref="matrixlamp" state="0"> - <bounds x="80" y="0" width="7" height="7"/> - </element> - <element name="lamp11" ref="matrixlamp" state="0"> - <bounds x="88" y="0" width="7" height="7"/> - </element> - <element name="lamp12" ref="matrixlamp" state="0"> - <bounds x="96" y="0" width="7" height="7"/> - </element> - - <element name="lamp13" ref="matrixlamp" state="0"> - <bounds x="104" y="0" width="7" height="7"/> - </element> - <element name="lamp14" ref="matrixlamp" state="0"> - <bounds x="112" y="0" width="7" height="7"/> - </element> - <element name="lamp15" ref="matrixlamp" state="0"> - <bounds x="120" y="0" width="7" height="7"/> - </element> - <element name="lamp16" ref="matrixlamp" state="0"> - <bounds x="0" y="8" width="7" height="7"/> - </element> - <element name="lamp17" ref="matrixlamp" state="0"> - <bounds x="8" y="8" width="7" height="7"/> - </element> - <element name="lamp18" ref="matrixlamp" state="0"> - <bounds x="16" y="8" width="7" height="7"/> - </element> - <element name="lamp19" ref="matrixlamp" state="0"> - <bounds x="24" y="8" width="7" height="7"/> - </element> - <element name="lamp20" ref="matrixlamp" state="0"> - <bounds x="32" y="8" width="7" height="7"/> - </element> - <element name="lamp21" ref="matrixlamp" state="0"> - <bounds x="40" y="8" width="7" height="7"/> - </element> - <element name="lamp22" ref="matrixlamp" state="0"> - <bounds x="48" y="8" width="7" height="7"/> - </element> - <element name="lamp23" ref="matrixlamp" state="0"> - <bounds x="56" y="8" width="7" height="7"/> - </element> - <element name="lamp24" ref="matrixlamp" state="0"> - <bounds x="64" y="8" width="7" height="7"/> - </element> - <element name="lamp25" ref="matrixlamp" state="0"> - <bounds x="72" y="8" width="7" height="7"/> - </element> - <element name="lamp26" ref="matrixlamp" state="0"> - <bounds x="80" y="8" width="7" height="7"/> - </element> - <element name="lamp27" ref="matrixlamp" state="0"> - <bounds x="88" y="8" width="7" height="7"/> - </element> - <element name="lamp28" ref="matrixlamp" state="0"> - <bounds x="96" y="8" width="7" height="7"/> - </element> - <element name="lamp29" ref="matrixlamp" state="0"> - <bounds x="104" y="8" width="7" height="7"/> - </element> - <element name="lamp30" ref="matrixlamp" state="0"> - <bounds x="112" y="8" width="7" height="7"/> - </element> - <element name="lamp31" ref="matrixlamp" state="0"> - <bounds x="120" y="8" width="7" height="7"/> - </element> - <element name="lamp32" ref="matrixlamp" state="0"> - <bounds x="0" y="16" width="7" height="7"/> - </element> - <element name="lamp33" ref="matrixlamp" state="0"> - <bounds x="8" y="16" width="7" height="7"/> - </element> - <element name="lamp34" ref="matrixlamp" state="0"> - <bounds x="16" y="16" width="7" height="7"/> - </element> - <element name="lamp35" ref="matrixlamp" state="0"> - <bounds x="24" y="16" width="7" height="7"/> - </element> - <element name="lamp36" ref="matrixlamp" state="0"> - <bounds x="32" y="16" width="7" height="7"/> - </element> - <element name="lamp37" ref="matrixlamp" state="0"> - <bounds x="40" y="16" width="7" height="7"/> - </element> - <element name="lamp38" ref="matrixlamp" state="0"> - <bounds x="48" y="16" width="7" height="7"/> - </element> - <element name="lamp39" ref="matrixlamp" state="0"> - <bounds x="56" y="16" width="7" height="7"/> - </element> - <element name="lamp40" ref="matrixlamp" state="0"> - <bounds x="64" y="16" width="7" height="7"/> - </element> - <element name="lamp41" ref="matrixlamp" state="0"> - <bounds x="72" y="16" width="7" height="7"/> - </element> - <element name="lamp42" ref="matrixlamp" state="0"> - <bounds x="80" y="16" width="7" height="7"/> - </element> - <element name="lamp43" ref="matrixlamp" state="0"> - <bounds x="88" y="16" width="7" height="7"/> - </element> - <element name="lamp44" ref="matrixlamp" state="0"> - <bounds x="96" y="16" width="7" height="7"/> - </element> - <element name="lamp45" ref="matrixlamp" state="0"> - <bounds x="104" y="16" width="7" height="7"/> - </element> - <element name="lamp46" ref="matrixlamp" state="0"> - <bounds x="112" y="16" width="7" height="7"/> - </element> - <element name="lamp47" ref="matrixlamp" state="0"> - <bounds x="120" y="16" width="7" height="7"/> - </element> - <element name="lamp48" ref="matrixlamp" state="0"> - <bounds x="0" y="24" width="7" height="7"/> - </element> - <element name="lamp49" ref="matrixlamp" state="0"> - <bounds x="8" y="24" width="7" height="7"/> - </element> - <element name="lamp50" ref="matrixlamp" state="0"> - <bounds x="16" y="24" width="7" height="7"/> - </element> - <element name="lamp51" ref="matrixlamp" state="0"> - <bounds x="24" y="24" width="7" height="7"/> - </element> - <element name="lamp52" ref="matrixlamp" state="0"> - <bounds x="32" y="24" width="7" height="7"/> - </element> - <element name="lamp53" ref="matrixlamp" state="0"> - <bounds x="40" y="24" width="7" height="7"/> - </element> - <element name="lamp54" ref="matrixlamp" state="0"> - <bounds x="48" y="24" width="7" height="7"/> - </element> - <element name="lamp55" ref="matrixlamp" state="0"> - <bounds x="56" y="24" width="7" height="7"/> - </element> - <element name="lamp56" ref="matrixlamp" state="0"> - <bounds x="64" y="24" width="7" height="7"/> - </element> - <element name="lamp57" ref="matrixlamp" state="0"> - <bounds x="72" y="24" width="7" height="7"/> - </element> - <element name="lamp58" ref="matrixlamp" state="0"> - <bounds x="80" y="24" width="7" height="7"/> - </element> - <element name="lamp59" ref="matrixlamp" state="0"> - <bounds x="88" y="24" width="7" height="7"/> - </element> - <element name="lamp60" ref="matrixlamp" state="0"> - <bounds x="96" y="24" width="7" height="7"/> - </element> - <element name="lamp61" ref="matrixlamp" state="0"> - <bounds x="104" y="24" width="7" height="7"/> - </element> - <element name="lamp62" ref="matrixlamp" state="0"> - <bounds x="112" y="24" width="7" height="7"/> - </element> - <element name="lamp63" ref="matrixlamp" state="0"> - <bounds x="120" y="24" width="7" height="7"/> - </element> - <element name="lamp64" ref="matrixlamp" state="0"> - <bounds x="0" y="32" width="7" height="7"/> - </element> - <element name="lamp65" ref="matrixlamp" state="0"> - <bounds x="8" y="32" width="7" height="7"/> - </element> - <element name="lamp66" ref="matrixlamp" state="0"> - <bounds x="16" y="32" width="7" height="7"/> - </element> - <element name="lamp67" ref="matrixlamp" state="0"> - <bounds x="24" y="32" width="7" height="7"/> - </element> - <element name="lamp68" ref="matrixlamp" state="0"> - <bounds x="32" y="32" width="7" height="7"/> - </element> - <element name="lamp69" ref="matrixlamp" state="0"> - <bounds x="40" y="32" width="7" height="7"/> - </element> - <element name="lamp70" ref="matrixlamp" state="0"> - <bounds x="48" y="32" width="7" height="7"/> - </element> - <element name="lamp71" ref="matrixlamp" state="0"> - <bounds x="56" y="32" width="7" height="7"/> - </element> - <element name="lamp72" ref="matrixlamp" state="0"> - <bounds x="64" y="32" width="7" height="7"/> - </element> - <element name="lamp73" ref="matrixlamp" state="0"> - <bounds x="72" y="32" width="7" height="7"/> - </element> - <element name="lamp74" ref="matrixlamp" state="0"> - <bounds x="80" y="32" width="7" height="7"/> - </element> - <element name="lamp75" ref="matrixlamp" state="0"> - <bounds x="88" y="32" width="7" height="7"/> - </element> - <element name="lamp76" ref="matrixlamp" state="0"> - <bounds x="96" y="32" width="7" height="7"/> - </element> - <element name="lamp77" ref="matrixlamp" state="0"> - <bounds x="104" y="32" width="7" height="7"/> - </element> - <element name="lamp78" ref="matrixlamp" state="0"> - <bounds x="112" y="32" width="7" height="7"/> - </element> - <element name="lamp79" ref="matrixlamp" state="0"> - <bounds x="120" y="32" width="7" height="7"/> - </element> - <element name="lamp80" ref="matrixlamp" state="0"> - <bounds x="0" y="40" width="7" height="7"/> - </element> - <element name="lamp81" ref="matrixlamp" state="0"> - <bounds x="8" y="40" width="7" height="7"/> - </element> - <element name="lamp82" ref="matrixlamp" state="0"> - <bounds x="16" y="40" width="7" height="7"/> - </element> - <element name="lamp83" ref="matrixlamp" state="0"> - <bounds x="24" y="40" width="7" height="7"/> - </element> - <element name="lamp84" ref="matrixlamp" state="0"> - <bounds x="32" y="40" width="7" height="7"/> - </element> - <element name="lamp85" ref="matrixlamp" state="0"> - <bounds x="40" y="40" width="7" height="7"/> - </element> - <element name="lamp86" ref="matrixlamp" state="0"> - <bounds x="48" y="40" width="7" height="7"/> - </element> - <element name="lamp87" ref="matrixlamp" state="0"> - <bounds x="56" y="40" width="7" height="7"/> - </element> - <element name="lamp88" ref="matrixlamp" state="0"> - <bounds x="64" y="40" width="7" height="7"/> - </element> - <element name="lamp89" ref="matrixlamp" state="0"> - <bounds x="72" y="40" width="7" height="7"/> - </element> - <element name="lamp90" ref="matrixlamp" state="0"> - <bounds x="80" y="40" width="7" height="7"/> - </element> - <element name="lamp91" ref="matrixlamp" state="0"> - <bounds x="88" y="40" width="7" height="7"/> - </element> - <element name="lamp92" ref="matrixlamp" state="0"> - <bounds x="96" y="40" width="7" height="7"/> - </element> - <element name="lamp93" ref="matrixlamp" state="0"> - <bounds x="104" y="40" width="7" height="7"/> - </element> - <element name="lamp94" ref="matrixlamp" state="0"> - <bounds x="112" y="40" width="7" height="7"/> - </element> - <element name="lamp95" ref="matrixlamp" state="0"> - <bounds x="120" y="40" width="7" height="7"/> - </element> - <element name="lamp96" ref="matrixlamp" state="0"> - <bounds x="0" y="48" width="7" height="7"/> - </element> - <element name="lamp97" ref="matrixlamp" state="0"> - <bounds x="8" y="48" width="7" height="7"/> - </element> - <element name="lamp98" ref="matrixlamp" state="0"> - <bounds x="16" y="48" width="7" height="7"/> - </element> - <element name="lamp99" ref="matrixlamp" state="0"> - <bounds x="24" y="48" width="7" height="7"/> - </element> - <element name="lamp100" ref="matrixlamp" state="0"> - <bounds x="32" y="48" width="7" height="7"/> - </element> - <element name="lamp101" ref="matrixlamp" state="0"> - <bounds x="40" y="48" width="7" height="7"/> - </element> - <element name="lamp102" ref="matrixlamp" state="0"> - <bounds x="48" y="48" width="7" height="7"/> - </element> - <element name="lamp103" ref="matrixlamp" state="0"> - <bounds x="56" y="48" width="7" height="7"/> - </element> - <element name="lamp104" ref="matrixlamp" state="0"> - <bounds x="64" y="48" width="7" height="7"/> - </element> - <element name="lamp105" ref="matrixlamp" state="0"> - <bounds x="72" y="48" width="7" height="7"/> - </element> - <element name="lamp106" ref="matrixlamp" state="0"> - <bounds x="80" y="48" width="7" height="7"/> - </element> - <element name="lamp107" ref="matrixlamp" state="0"> - <bounds x="88" y="48" width="7" height="7"/> - </element> - <element name="lamp108" ref="matrixlamp" state="0"> - <bounds x="96" y="48" width="7" height="7"/> - </element> - <element name="lamp109" ref="matrixlamp" state="0"> - <bounds x="104" y="48" width="7" height="7"/> - </element> - <element name="lamp110" ref="matrixlamp" state="0"> - <bounds x="112" y="48" width="7" height="7"/> - </element> - <element name="lamp111" ref="matrixlamp" state="0"> - <bounds x="120" y="48" width="7" height="7"/> - </element> - <element name="lamp112" ref="matrixlamp" state="0"> - <bounds x="0" y="56" width="7" height="7"/> - </element> - <element name="lamp113" ref="matrixlamp" state="0"> - <bounds x="8" y="56" width="7" height="7"/> - </element> - <element name="lamp114" ref="matrixlamp" state="0"> - <bounds x="16" y="56" width="7" height="7"/> - </element> - <element name="lamp115" ref="matrixlamp" state="0"> - <bounds x="24" y="56" width="7" height="7"/> - </element> - <element name="lamp116" ref="matrixlamp" state="0"> - <bounds x="32" y="56" width="7" height="7"/> - </element> - <element name="lamp117" ref="matrixlamp" state="0"> - <bounds x="40" y="56" width="7" height="7"/> - </element> - <element name="lamp118" ref="matrixlamp" state="0"> - <bounds x="48" y="56" width="7" height="7"/> - </element> - <element name="lamp119" ref="matrixlamp" state="0"> - <bounds x="56" y="56" width="7" height="7"/> - </element> - <element name="lamp120" ref="matrixlamp" state="0"> - <bounds x="64" y="56" width="7" height="7"/> - </element> - <element name="lamp121" ref="matrixlamp" state="0"> - <bounds x="72" y="56" width="7" height="7"/> - </element> - <element name="lamp122" ref="matrixlamp" state="0"> - <bounds x="80" y="56" width="7" height="7"/> - </element> - <element name="lamp123" ref="matrixlamp" state="0"> - <bounds x="88" y="56" width="7" height="7"/> - </element> - <element name="lamp124" ref="matrixlamp" state="0"> - <bounds x="96" y="56" width="7" height="7"/> - </element> - <element name="lamp125" ref="matrixlamp" state="0"> - <bounds x="104" y="56" width="7" height="7"/> - </element> - <element name="lamp126" ref="matrixlamp" state="0"> - <bounds x="112" y="56" width="7" height="7"/> - </element> - <element name="lamp127" ref="matrixlamp" state="0"> - <bounds x="120" y="56" width="7" height="7"/> - </element> - <element name="lamp128" ref="matrixlamp" state="0"> - <bounds x="0" y="64" width="7" height="7"/> - </element> - <element name="lamp129" ref="matrixlamp" state="0"> - <bounds x="8" y="64" width="7" height="7"/> - </element> - <element name="lamp130" ref="matrixlamp" state="0"> - <bounds x="16" y="64" width="7" height="7"/> - </element> - <element name="lamp131" ref="matrixlamp" state="0"> - <bounds x="24" y="64" width="7" height="7"/> - </element> - <element name="lamp132" ref="matrixlamp" state="0"> - <bounds x="32" y="64" width="7" height="7"/> - </element> - <element name="lamp133" ref="matrixlamp" state="0"> - <bounds x="40" y="64" width="7" height="7"/> - </element> - <element name="lamp134" ref="matrixlamp" state="0"> - <bounds x="48" y="64" width="7" height="7"/> - </element> - <element name="lamp135" ref="matrixlamp" state="0"> - <bounds x="56" y="64" width="7" height="7"/> - </element> - <element name="lamp136" ref="matrixlamp" state="0"> - <bounds x="64" y="64" width="7" height="7"/> - </element> - <element name="lamp137" ref="matrixlamp" state="0"> - <bounds x="72" y="64" width="7" height="7"/> - </element> - <element name="lamp138" ref="matrixlamp" state="0"> - <bounds x="80" y="64" width="7" height="7"/> - </element> - <element name="lamp139" ref="matrixlamp" state="0"> - <bounds x="88" y="64" width="7" height="7"/> - </element> - <element name="lamp140" ref="matrixlamp" state="0"> - <bounds x="96" y="64" width="7" height="7"/> - </element> - <element name="lamp141" ref="matrixlamp" state="0"> - <bounds x="104" y="64" width="7" height="7"/> - </element> - <element name="lamp142" ref="matrixlamp" state="0"> - <bounds x="112" y="64" width="7" height="7"/> - </element> - <element name="lamp143" ref="matrixlamp" state="0"> - <bounds x="120" y="64" width="7" height="7"/> - </element> - <element name="lamp144" ref="matrixlamp" state="0"> - <bounds x="0" y="72" width="7" height="7"/> - </element> - <element name="lamp145" ref="matrixlamp" state="0"> - <bounds x="8" y="72" width="7" height="7"/> - </element> - <element name="lamp146" ref="matrixlamp" state="0"> - <bounds x="16" y="72" width="7" height="7"/> - </element> - <element name="lamp147" ref="matrixlamp" state="0"> - <bounds x="24" y="72" width="7" height="7"/> - </element> - <element name="lamp148" ref="matrixlamp" state="0"> - <bounds x="32" y="72" width="7" height="7"/> - </element> - <element name="lamp149" ref="matrixlamp" state="0"> - <bounds x="40" y="72" width="7" height="7"/> - </element> - <element name="lamp150" ref="matrixlamp" state="0"> - <bounds x="48" y="72" width="7" height="7"/> - </element> - <element name="lamp151" ref="matrixlamp" state="0"> - <bounds x="56" y="72" width="7" height="7"/> - </element> - <element name="lamp152" ref="matrixlamp" state="0"> - <bounds x="64" y="72" width="7" height="7"/> - </element> - <element name="lamp153" ref="matrixlamp" state="0"> - <bounds x="72" y="72" width="7" height="7"/> - </element> - <element name="lamp154" ref="matrixlamp" state="0"> - <bounds x="80" y="72" width="7" height="7"/> - </element> - <element name="lamp155" ref="matrixlamp" state="0"> - <bounds x="88" y="72" width="7" height="7"/> - </element> - <element name="lamp156" ref="matrixlamp" state="0"> - <bounds x="96" y="72" width="7" height="7"/> - </element> - <element name="lamp157" ref="matrixlamp" state="0"> - <bounds x="104" y="72" width="7" height="7"/> - </element> - <element name="lamp158" ref="matrixlamp" state="0"> - <bounds x="112" y="72" width="7" height="7"/> - </element> - <element name="lamp159" ref="matrixlamp" state="0"> - <bounds x="120" y="72" width="7" height="7"/> - </element> - <element name="lamp160" ref="matrixlamp" state="0"> - <bounds x="0" y="80" width="7" height="7"/> - </element> - <element name="lamp161" ref="matrixlamp" state="0"> - <bounds x="8" y="80" width="7" height="7"/> - </element> - <element name="lamp162" ref="matrixlamp" state="0"> - <bounds x="16" y="80" width="7" height="7"/> - </element> - <element name="lamp163" ref="matrixlamp" state="0"> - <bounds x="24" y="80" width="7" height="7"/> - </element> - <element name="lamp164" ref="matrixlamp" state="0"> - <bounds x="32" y="80" width="7" height="7"/> - </element> - <element name="lamp165" ref="matrixlamp" state="0"> - <bounds x="40" y="80" width="7" height="7"/> - </element> - <element name="lamp166" ref="matrixlamp" state="0"> - <bounds x="48" y="80" width="7" height="7"/> - </element> - <element name="lamp167" ref="matrixlamp" state="0"> - <bounds x="56" y="80" width="7" height="7"/> - </element> - <element name="lamp168" ref="matrixlamp" state="0"> - <bounds x="64" y="80" width="7" height="7"/> - </element> - <element name="lamp169" ref="matrixlamp" state="0"> - <bounds x="72" y="80" width="7" height="7"/> - </element> - <element name="lamp170" ref="matrixlamp" state="0"> - <bounds x="80" y="80" width="7" height="7"/> - </element> - <element name="lamp171" ref="matrixlamp" state="0"> - <bounds x="88" y="80" width="7" height="7"/> - </element> - <element name="lamp172" ref="matrixlamp" state="0"> - <bounds x="96" y="80" width="7" height="7"/> - </element> - <element name="lamp173" ref="matrixlamp" state="0"> - <bounds x="104" y="80" width="7" height="7"/> - </element> - <element name="lamp174" ref="matrixlamp" state="0"> - <bounds x="112" y="80" width="7" height="7"/> - </element> - <element name="lamp175" ref="matrixlamp" state="0"> - <bounds x="120" y="80" width="7" height="7"/> - </element> - <element name="lamp176" ref="matrixlamp" state="0"> - <bounds x="0" y="88" width="7" height="7"/> - </element> - <element name="lamp177" ref="matrixlamp" state="0"> - <bounds x="8" y="88" width="7" height="7"/> - </element> - <element name="lamp178" ref="matrixlamp" state="0"> - <bounds x="16" y="88" width="7" height="7"/> - </element> - <element name="lamp179" ref="matrixlamp" state="0"> - <bounds x="24" y="88" width="7" height="7"/> - </element> - <element name="lamp180" ref="matrixlamp" state="0"> - <bounds x="32" y="88" width="7" height="7"/> - </element> - <element name="lamp181" ref="matrixlamp" state="0"> - <bounds x="40" y="88" width="7" height="7"/> - </element> - <element name="lamp182" ref="matrixlamp" state="0"> - <bounds x="48" y="88" width="7" height="7"/> - </element> - <element name="lamp183" ref="matrixlamp" state="0"> - <bounds x="56" y="88" width="7" height="7"/> - </element> - <element name="lamp184" ref="matrixlamp" state="0"> - <bounds x="64" y="88" width="7" height="7"/> - </element> - <element name="lamp185" ref="matrixlamp" state="0"> - <bounds x="72" y="88" width="7" height="7"/> - </element> - <element name="lamp186" ref="matrixlamp" state="0"> - <bounds x="80" y="88" width="7" height="7"/> - </element> - <element name="lamp187" ref="matrixlamp" state="0"> - <bounds x="88" y="88" width="7" height="7"/> - </element> - <element name="lamp188" ref="matrixlamp" state="0"> - <bounds x="96" y="88" width="7" height="7"/> - </element> - <element name="lamp189" ref="matrixlamp" state="0"> - <bounds x="104" y="88" width="7" height="7"/> - </element> - <element name="lamp190" ref="matrixlamp" state="0"> - <bounds x="112" y="88" width="7" height="7"/> - </element> - <element name="lamp191" ref="matrixlamp" state="0"> - <bounds x="120" y="88" width="7" height="7"/> - </element> - <element name="lamp192" ref="matrixlamp" state="0"> - <bounds x="0" y="96" width="7" height="7"/> - </element> - <element name="lamp193" ref="matrixlamp" state="0"> - <bounds x="8" y="96" width="7" height="7"/> - </element> - <element name="lamp194" ref="matrixlamp" state="0"> - <bounds x="16" y="96" width="7" height="7"/> - </element> - <element name="lamp195" ref="matrixlamp" state="0"> - <bounds x="24" y="96" width="7" height="7"/> - </element> - <element name="lamp196" ref="matrixlamp" state="0"> - <bounds x="32" y="96" width="7" height="7"/> - </element> - <element name="lamp197" ref="matrixlamp" state="0"> - <bounds x="40" y="96" width="7" height="7"/> - </element> - <element name="lamp198" ref="matrixlamp" state="0"> - <bounds x="48" y="96" width="7" height="7"/> - </element> - <element name="lamp199" ref="matrixlamp" state="0"> - <bounds x="56" y="96" width="7" height="7"/> - </element> - <element name="lamp200" ref="matrixlamp" state="0"> - <bounds x="64" y="96" width="7" height="7"/> - </element> - <element name="lamp201" ref="matrixlamp" state="0"> - <bounds x="72" y="96" width="7" height="7"/> - </element> - <element name="lamp202" ref="matrixlamp" state="0"> - <bounds x="80" y="96" width="7" height="7"/> - </element> - <element name="lamp203" ref="matrixlamp" state="0"> - <bounds x="88" y="96" width="7" height="7"/> - </element> - <element name="lamp204" ref="matrixlamp" state="0"> - <bounds x="96" y="96" width="7" height="7"/> - </element> - <element name="lamp205" ref="matrixlamp" state="0"> - <bounds x="104" y="96" width="7" height="7"/> - </element> - <element name="lamp206" ref="matrixlamp" state="0"> - <bounds x="112" y="96" width="7" height="7"/> - </element> - <element name="lamp207" ref="matrixlamp" state="0"> - <bounds x="120" y="96" width="7" height="7"/> - </element> - <element name="lamp208" ref="matrixlamp" state="0"> - <bounds x="0" y="104" width="7" height="7"/> - </element> - <element name="lamp209" ref="matrixlamp" state="0"> - <bounds x="8" y="104" width="7" height="7"/> - </element> - <element name="lamp210" ref="matrixlamp" state="0"> - <bounds x="16" y="104" width="7" height="7"/> - </element> - <element name="lamp211" ref="matrixlamp" state="0"> - <bounds x="24" y="104" width="7" height="7"/> - </element> - <element name="lamp212" ref="matrixlamp" state="0"> - <bounds x="32" y="104" width="7" height="7"/> - </element> - <element name="lamp213" ref="matrixlamp" state="0"> - <bounds x="40" y="104" width="7" height="7"/> - </element> - <element name="lamp214" ref="matrixlamp" state="0"> - <bounds x="48" y="104" width="7" height="7"/> - </element> - <element name="lamp215" ref="matrixlamp" state="0"> - <bounds x="56" y="104" width="7" height="7"/> - </element> - <element name="lamp216" ref="matrixlamp" state="0"> - <bounds x="64" y="104" width="7" height="7"/> - </element> - <element name="lamp217" ref="matrixlamp" state="0"> - <bounds x="72" y="104" width="7" height="7"/> - </element> - <element name="lamp218" ref="matrixlamp" state="0"> - <bounds x="80" y="104" width="7" height="7"/> - </element> - <element name="lamp219" ref="matrixlamp" state="0"> - <bounds x="88" y="104" width="7" height="7"/> - </element> - <element name="lamp220" ref="matrixlamp" state="0"> - <bounds x="96" y="104" width="7" height="7"/> - </element> - <element name="lamp221" ref="matrixlamp" state="0"> - <bounds x="104" y="104" width="7" height="7"/> - </element> - <element name="lamp222" ref="matrixlamp" state="0"> - <bounds x="112" y="104" width="7" height="7"/> - </element> - <element name="lamp223" ref="matrixlamp" state="0"> - <bounds x="120" y="104" width="7" height="7"/> - </element> - <element name="lamp224" ref="matrixlamp" state="0"> - <bounds x="0" y="112" width="7" height="7"/> - </element> - <element name="lamp225" ref="matrixlamp" state="0"> - <bounds x="8" y="112" width="7" height="7"/> - </element> - <element name="lamp226" ref="matrixlamp" state="0"> - <bounds x="16" y="112" width="7" height="7"/> - </element> - <element name="lamp227" ref="matrixlamp" state="0"> - <bounds x="24" y="112" width="7" height="7"/> - </element> - <element name="lamp228" ref="matrixlamp" state="0"> - <bounds x="32" y="112" width="7" height="7"/> - </element> - <element name="lamp229" ref="matrixlamp" state="0"> - <bounds x="40" y="112" width="7" height="7"/> - </element> - <element name="lamp230" ref="matrixlamp" state="0"> - <bounds x="48" y="112" width="7" height="7"/> - </element> - <element name="lamp231" ref="matrixlamp" state="0"> - <bounds x="56" y="112" width="7" height="7"/> - </element> - <element name="lamp232" ref="matrixlamp" state="0"> - <bounds x="64" y="112" width="7" height="7"/> - </element> - <element name="lamp233" ref="matrixlamp" state="0"> - <bounds x="72" y="112" width="7" height="7"/> - </element> - <element name="lamp234" ref="matrixlamp" state="0"> - <bounds x="80" y="112" width="7" height="7"/> - </element> - <element name="lamp235" ref="matrixlamp" state="0"> - <bounds x="88" y="112" width="7" height="7"/> - </element> - <element name="lamp236" ref="matrixlamp" state="0"> - <bounds x="96" y="112" width="7" height="7"/> - </element> - <element name="lamp237" ref="matrixlamp" state="0"> - <bounds x="104" y="112" width="7" height="7"/> - </element> - <element name="lamp238" ref="matrixlamp" state="0"> - <bounds x="112" y="112" width="7" height="7"/> - </element> - <element name="lamp239" ref="matrixlamp" state="0"> - <bounds x="120" y="112" width="7" height="7"/> - </element> - <element name="lamp240" ref="matrixlamp" state="0"> - <bounds x="0" y="120" width="7" height="7"/> - </element> - <element name="lamp241" ref="matrixlamp" state="0"> - <bounds x="8" y="120" width="7" height="7"/> - </element> - <element name="lamp242" ref="matrixlamp" state="0"> - <bounds x="16" y="120" width="7" height="7"/> - </element> - <element name="lamp243" ref="matrixlamp" state="0"> - <bounds x="24" y="120" width="7" height="7"/> - </element> - <element name="lamp244" ref="matrixlamp" state="0"> - <bounds x="32" y="120" width="7" height="7"/> - </element> - <element name="lamp245" ref="matrixlamp" state="0"> - <bounds x="40" y="120" width="7" height="7"/> - </element> - <element name="lamp246" ref="matrixlamp" state="0"> - <bounds x="48" y="120" width="7" height="7"/> - </element> - <element name="lamp247" ref="matrixlamp" state="0"> - <bounds x="56" y="120" width="7" height="7"/> - </element> - <element name="lamp248" ref="matrixlamp" state="0"> - <bounds x="64" y="120" width="7" height="7"/> - </element> - <element name="lamp249" ref="matrixlamp" state="0"> - <bounds x="72" y="120" width="7" height="7"/> - </element> - <element name="lamp250" ref="matrixlamp" state="0"> - <bounds x="80" y="120" width="7" height="7"/> - </element> - <element name="lamp251" ref="matrixlamp" state="0"> - <bounds x="88" y="120" width="7" height="7"/> - </element> - <element name="lamp252" ref="matrixlamp" state="0"> - <bounds x="96" y="120" width="7" height="7"/> - </element> - <element name="lamp253" ref="matrixlamp" state="0"> - <bounds x="104" y="120" width="7" height="7"/> - </element> - <element name="lamp254" ref="matrixlamp" state="0"> - <bounds x="112" y="120" width="7" height="7"/> - </element> - <element name="lamp255" ref="matrixlamp" state="0"> - <bounds x="120" y="120" width="7" height="7"/> - </element> - </view> - <view name="VFD Display Output Only"> - <element name="vfd0" ref="vfd0" state="0"> - <bounds x="10" y="200" width="9" height="17"/> - </element> - <element name="vfd1" ref="vfd0" state="0"> - <bounds x="19" y="200" width="9" height="17"/> - </element> - <element name="vfd2" ref="vfd0" state="0"> - <bounds x="28" y="200" width="9" height="17"/> - </element> - <element name="vfd3" ref="vfd0" state="0"> - <bounds x="37" y="200" width="9" height="17"/> - </element> - <element name="vfd4" ref="vfd0" state="0"> - <bounds x="46" y="200" width="9" height="17"/> - </element> - <element name="vfd5" ref="vfd0" state="0"> - <bounds x="55" y="200" width="9" height="17"/> - </element> - <element name="vfd6" ref="vfd0" state="0"> - <bounds x="64" y="200" width="9" height="17"/> - </element> - <element name="vfd7" ref="vfd0" state="0"> - <bounds x="73" y="200" width="9" height="17"/> - </element> - <element name="vfd8" ref="vfd0" state="0"> - <bounds x="82" y="200" width="9" height="17"/> - </element> - <element name="vfd9" ref="vfd0" state="0"> - <bounds x="91" y="200" width="9" height="17"/> - </element> - <element name="vfd10" ref="vfd0" state="0"> - <bounds x="100" y="200" width="9" height="17"/> - </element> - <element name="vfd11" ref="vfd0" state="0"> - <bounds x="109" y="200" width="9" height="17"/> - </element> - <element name="vfd12" ref="vfd0" state="0"> - <bounds x="118" y="200" width="9" height="17"/> - </element> - <element name="vfd13" ref="vfd0" state="0"> - <bounds x="127" y="200" width="9" height="17"/> - </element> - <element name="vfd14" ref="vfd0" state="0"> - <bounds x="136" y="200" width="9" height="17"/> - </element> - <element name="vfd15" ref="vfd0" state="0"> - <bounds x="145" y="200" width="9" height="17"/> - </element> + <repeat count="4"> + <param name="i" start="1" increment="1" /> + <param name="x" start="20" increment="50" /> + <element ref="reel_bg"> + <bounds x="~x~" y="300" width="30" height="100"/> + </element> + <element ref="Reel" state="0"> + <bounds x="~x~" y="300" width="30" height="100"/> + <yscroll name="sreel~i~" size="0.25" wrap="yes" min="65536" max="0"/> + </element> + </repeat> + <element name="digit0" ref="LCD"><bounds x="220" y="350" width="24" height="40" /></element> + <element name="digit1" ref="LCD"><bounds x="244" y="350" width="24" height="40" /></element> + <repeat count="7"> + <param name="i" start="0" increment="8" /> + <param name="y" start="0" increment="8" /> + <repeat count="8"> + <param name="j" start="~i~" increment="1" /> + <param name="x" start="0" increment="8" /> + <element name="lamp~j~" ref="matrixlamp" state="0"> + <bounds x="~x~" y="~y~" width="7" height="7"/> + </element> + </repeat> + </repeat> </view> </mamelayout> diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 799babaa986..126fe3c4806 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -16034,8 +16034,8 @@ gstrikerj // (c) [1993] Human twcup94 // (c) 1994 Tecmo twcup94a // (c) 1994 Tecmo twcup94b // (c) 1994 Tecmo -vgoalsca // (c) 199? Tecmo -vgoalsoc // (c) 199? Tecmo +vgoalsoc // (c) 1994 Tecmo +vgoalsoca // (c) 1994 Tecmo @source:gsword.cpp gsword // AC (c) 1984 Taito Corporation @@ -19124,15 +19124,20 @@ j80wsprt2 // Winsprint (JPM) j80wsprt3 // Winsprint (JPM) @source:jpmsru.cpp -j_ewnd20 // -j_ewnda // -j_ewnud // Each Way Nudger +j_ewn // Each Way Nudger (JPM) +j_ewna // +j_ewnb // +j_ndu // Nudge Double Up (JPM) +j_ndua // +j_dud // Nudge Double Up Deluxe (JPM) +j_duda // +j_dt // +j_lan // Lite A Nudge (JPM) +j_lana // j_ews // Each Way Shifter j_ews8a // j_luck2 // Lucky Twos j_luckac // Lucky Aces -j_nuddup // Nudge Double Up -j_nuddup2 // j_plus2 // Plus 2 j_super2 // Super 2 j_unk // @@ -44547,7 +44552,6 @@ simpr8210 // Pioneer PR-8210 @source:gsz80.cpp gsz80 // Grant Searle's Simple Z-80 Machine -rc2014mini // RC2014 Mini @source:gscpm.cpp gscpm // Grant Searle's Simple CP/M Machine @@ -44563,7 +44567,12 @@ ultim809 @source:rc2014.cpp rc2014 // RC2014 Classic +rc2014bp5 // RC2014 Backplane-5 +rc2014bp8 // RC2014 Backplane-8 rc2014pro // RC2014 Pro +rc2014bppro // RC2014 Backplane Pro rc2014cl2 // RC2014 Classic II rc2014zed // RC2014 Zed rc2014zedp // RC2014 Zed Pro +rc2014mini // RC2014 Mini +rc2014minicpm // RC2014 Mini with CP/M upgrade diff --git a/src/mame/nl.lst b/src/mame/nl.lst index 17ea4c237e9..8738dc44867 100644 --- a/src/mame/nl.lst +++ b/src/mame/nl.lst @@ -282,6 +282,25 @@ gamemach // @source:hazeltin.cpp hazl1500 // Hazeltine 1500 (c) 1977 +@source:jpmsru.cpp +j_ewn // Each Way Nudger (JPM) +j_ewna // +j_ewnb // +j_ndu // Nudge Double Up (JPM) +j_ndua // +j_dud // Nudge Double Up Deluxe (JPM) +j_duda // +j_dt // +j_lan // Lite A Nudge (JPM) +j_lana // +j_ews // Each Way Shifter +j_ews8a // +j_luck2 // Lucky Twos +j_luckac // Lucky Aces +j_plus2 // Plus 2 +j_super2 // Super 2 +j_unk // + @source:m62.cpp // m62.cpp battroad // (c) 1984 horizon // (c) 1985 diff --git a/src/mame/video/gstriker.cpp b/src/mame/video/gstriker.cpp deleted file mode 100644 index a77d9a2dbb4..00000000000 --- a/src/mame/video/gstriker.cpp +++ /dev/null @@ -1,62 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Farfetch'd, David Haywood -#include "emu.h" -#include "includes/gstriker.h" - - - -/*** VIDEO UPDATE/START **********************************************/ - -void gstriker_state::video_start() -{ - // Initialize the chip for the score plane - m_tx->set_transparent_pen(0xf); - - // Initialize the chip for the screen plane - m_bg->set_transparent_pen(0xf); - - m_buffered_spriteram = std::make_unique<uint16_t[]>(0x2000); - m_buffered_spriteram2 = std::make_unique<uint16_t[]>(0x2000); - save_pointer(NAME(m_buffered_spriteram), 0x2000); - save_pointer(NAME(m_buffered_spriteram2), 0x2000); -} - -WRITE_LINE_MEMBER(gstriker_state::screen_vblank) -{ - // sprites are two frames ahead - // TODO: probably all Video System games are (Aero Fighters definitely desyncs wrt background) - if(state) - { - memcpy(m_buffered_spriteram.get(), m_CG10103_m_vram, 0x2000); - memcpy(m_buffered_spriteram2.get(), m_buffered_spriteram.get(), 0x2000); - } -} - - -uint32_t gstriker_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - bitmap.fill(m_mixerregs[8]&0x07ff, cliprect); // complete guess, causes green behind test grid in twc94 and blue behind title screen on gstriker - - /* - [4] AAAA BBBB ---- ---- sprite priority number A/B? - [5] xxxx ---- ---- ---- background layer priority number? - [6] xxxx ---- ---- ---- foreground layer priority number? - */ -// popmessage("%04x %04x %04x %04x %04x %04x %04x %04x | %04x %04x %04x %04x %04x %04x %04x %04x", m_mixerregs[0],m_mixerregs[1],m_mixerregs[2],m_mixerregs[3],m_mixerregs[4],m_mixerregs[5],m_mixerregs[6],m_mixerregs[7], m_mixerregs[8],m_mixerregs[9],m_mixerregs[10],m_mixerregs[11],m_mixerregs[12],m_mixerregs[13],m_mixerregs[14],m_mixerregs[15] ); - - m_spr->set_pal_base( (m_mixerregs[0]&0xf000)>>8 ); - m_bg->set_pal_base( (m_mixerregs[1]&0xf000)>>8 ); - m_tx->set_pal_base( (m_mixerregs[2]&0xf000)>>8 ); - - - // Sandwitched screen/sprite0/score/sprite1. Surely wrong, probably needs sprite orthogonality - m_bg->draw( screen, bitmap,cliprect, 0); - - m_spr->draw_sprites(m_buffered_spriteram2.get(), 0x2000, screen, bitmap, cliprect, 0x2, 0x0); - - m_tx->draw(screen, bitmap, cliprect, 0); - - m_spr->draw_sprites(m_buffered_spriteram2.get(), 0x2000, screen, bitmap, cliprect, 0x2, 0x2); - - return 0; -} |