diff options
author | wilbertpol <wilbertpol@users.noreply.github.com> | 2020-12-30 06:27:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-30 16:27:25 +1100 |
commit | 47079db1b013aacfb92073483a4a9c4bd611e21f (patch) | |
tree | 15148f296275108ae50f0a2866c419bf671e588b | |
parent | 6b076025fc3ddf8ad7f3e3da809cf661c326c0ff (diff) |
WonderSwan updates: (#7428)
bus/wswan: Add preliminary support for wonderwitch. [Wilbert Pol]
cpu/v30mz: [Wilbert Pol]
- Rename segment registers.
- Add a callback to retrieve the interrupt vector.
- Add prefetch queue and PFP register.
- Add 1 cycle penalty when reading or writing a word from an unaligned address.
- Add 1 cycle penalty when calculating effective address from multiple registers.
- Removed not supported nec extended instructions.
- Change address space width to word.
wswan: [Wilbert Pol]
- Adjust cpu cycles when performing DMA.
- Updated default internal eeprom for WonderSwan Color with name ‘WONDERSWANCOLOR’.
- Fix off-by-one error in window drawing.
- Major update to the software lists documenting hardware and rom labels and locations.
wscolor - New working software list additions
----------------------------------------------
Digimon Adventure 02 - D1 Tamers (Rev 1)
Digital Monster Card Game - Ver. WonderSwan Color (Rev 2)
Digital Monster - D-Project (Rev 1)
Digimon Tamers - Digimon Medley
Hunter X Hunter - Greed Island (Rev 1)
From TV Animation One Piece - Treasure Wars (Rev 1)
wscolor - New not working software list additions
-------------------------------------------------
mama Mitte'
wscolor - Replaced software list items
--------------------------------------
Dicing Knight. [anon]
Judgement Silversword - Rebirth Edition (Rev. SC21)
wswan - New working software list additions
---------------------------------------------
Chocobo no Fushigi na Dungeon for WonderSwan (Rev 3)
Chocobo no Fushigi na Dungeon for WonderSwan (Rev 1)
Digimon Adventure 02 - Tag Tamers (Rev 0)
Digimon Adventure - Anode Tamer (Rev 1)
Digimon Adventure Campaign Limited Version
Keitai Gyogun Tanchiki - WonderSwan Handy Sonar (Rev 2)
Harobots (Rev 1)
Hunter X Hunter - Ishi o Tsugu Mono (Rev 1)
Mahjong Touryuumon (Rev 1)
Super Robot Taisen Compact (Rev 1)
SD Gundam - Emotional Jam (Rev 2)
SD Gundam Gashapon Senki - Episode 1 (alt)
wscolor - Software list items promoted to working
--------------------------------------------------
Super Robot Taisen Compact for WonderSwan Color
Cardcaptor Sakura - Sakura to Fushigi na Clow Card
wswan - Replaced software list items
-------------------------------------
Armored Unit
Crazy Climber
Clock Tower for WonderSwan
Glocal Hexcite
Gomoku Narabe & Reversi - Touryuumon
Hanafuda Shiyouyo
Keiba Yosou Shien Soft - Yosou Shinkaron
Morita Shougi for WonderSwan
Nobunaga no Yabou for WonderSwan
Sangokushi II for WonderSwan
Shougi Touryuumon
Slither Link
Soccer Yarou! - Challenge the World
Taikyoku Igo - Heisei Kiin
Trump Collection 2 - Bottom-Up Teki Sekaiisshuu no Tabi
Trump Collection - Bottom-Up Teki Trump Seikatsu
wswan - Software list items promoted to working
-------------------------------------------------
Clock Tower for WonderSwan
Meitantei Conan - Nishi no Meitantei Saidai no Kiki!
Super Robot Taisen Compact 2 - Dai-1-bu - Chijou Gekidou Hen
Super Robot Taisen Compact 2 - Dai-2-bu - Uchuu Gekishin Hen (Rev 4)
Super Robot Taisen Compact 2 - Dai-3-bu - Ginga Kessen Hen (Rev 2)
Super Robot Taisen Compact (Rev 0)
wswan - Software list items demoted to not working
----------------------------------------------------
Magical Drop for WonderSwan
MobileWonderGate (Rev 1)
Wonder Borg Robot Works
Robot Works (Asia)
-rw-r--r-- | hash/wscolor.xml | 1354 | ||||
-rw-r--r-- | hash/wswan.xml | 1861 | ||||
-rw-r--r-- | src/devices/bus/wswan/rom.cpp | 579 | ||||
-rw-r--r-- | src/devices/bus/wswan/rom.h | 96 | ||||
-rw-r--r-- | src/devices/bus/wswan/slot.cpp | 125 | ||||
-rw-r--r-- | src/devices/bus/wswan/slot.h | 59 | ||||
-rw-r--r-- | src/devices/cpu/v30mz/v30mz.cpp | 2860 | ||||
-rw-r--r-- | src/devices/cpu/v30mz/v30mz.h | 198 | ||||
-rw-r--r-- | src/mame/audio/wswan.cpp | 374 | ||||
-rw-r--r-- | src/mame/audio/wswan.h | 70 | ||||
-rw-r--r-- | src/mame/drivers/wswan.cpp | 816 | ||||
-rw-r--r-- | src/mame/video/wswan.cpp | 787 | ||||
-rw-r--r-- | src/mame/video/wswan.h | 118 |
13 files changed, 5608 insertions, 3689 deletions
diff --git a/hash/wscolor.xml b/hash/wscolor.xml index 0502cfb1e98..46f7ae7e20f 100644 --- a/hash/wscolor.xml +++ b/hash/wscolor.xml @@ -2,8 +2,10 @@ <!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> <!-- license:CC0 ---> +See the wswan software list for the full game list. + +--> <softwarelist name="wscolor" description="Bandai Wonderswan Color cartridges"> <software name="anotherh"> <!-- WSC --> @@ -14,12 +16,15 @@ license:CC0 <info name="release" value="20001221"/> <info name="alt_title" value="アナザヘヴン ~memory of those days~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-ommc03.bin" size="4194304" crc="d7a0ab74" sha1="caf4a8de853ded732b2a72619acf2784eeceafc7" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e133b.u3" size="4194304" crc="d7a0ab74" sha1="caf4a8de853ded732b2a72619acf2784eeceafc7" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -33,11 +38,16 @@ license:CC0 <info name="release" value="20020704"/> <info name="alt_title" value="アークザラッド 機神復活"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108 or PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC or HY62KT081ED70C SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-banc2a.bin" size="8388608" crc="e2317345" sha1="68981c05d8118d4189100eed462ee6639328dc59" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s208d.u3" size="8388608" crc="e2317345" sha1="68981c05d8118d4189100eed462ee6639328dc59" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -51,33 +61,68 @@ license:CC0 <info name="release" value="20011025"/> <info name="alt_title" value="マリー&エリー ~ふたりのアトリエ~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-htrc01.bin" size="4194304" crc="b18cdc0d" sha1="99d9d7f951ae589059f34e76aea7489ae4cd79f1" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s182c.u3" size="4194304" crc="b18cdc0d" sha1="99d9d7f951ae589059f34e76aea7489ae4cd79f1" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="battlesp"> <!-- WSC only --> - <description>Battle Spirit - Digimon Frontier</description> + <description>Battle Spirit - Digimon Frontier (Rev 1)</description> <year>2002</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BANC31"/> <info name="release" value="20021207"/> <info name="alt_title" value="バトルスピリット デジモンフロンティア"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="HY62KT081ED70C SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc31.bin" size="4194304" crc="8ba49dab" sha1="fffb1aea34e0a96113cd10ba9de515000d27bfe6" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <!-- SD32M256S224D / MR27V3202F-NT / 2455M53 at U3 --> + <rom name="sd32m256s224d.u3" size="4194304" crc="8ba49dab" sha1="fffb1aea34e0a96113cd10ba9de515000d27bfe6" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> +<!-- + <software name="battlespa" cloneof="battlesp"> + <description>Battle Spirit - Digimon Frontier (Rev 0)</description> + <year>2002</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BANC31"/> + <info name="release" value="20021207"/> + <info name="alt_title" value="バトルスピリット デジモンフロンティア"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="HY62KT081ED70C SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s222d.u3" size="4194304" crc="a28d3dc5" sha1="" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> +--> + <software name="bluewing"> <!-- WSC --> <description>Blue Wing Blitz</description> @@ -87,11 +132,16 @@ license:CC0 <info name="release" value="20010705"/> <info name="alt_title" value="ブルー ウイング ブリッツ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-sqrc05.bin" size="2097152" crc="99027238" sha1="02103fc5fc97c3a38834ced32a3cfe6523832535" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s164c.u3" size="2097152" crc="99027238" sha1="02103fc5fc97c3a38834ced32a3cfe6523832535" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -105,11 +155,16 @@ license:CC0 <info name="release" value="20020810"/> <info name="alt_title" value="激闘! クラッシュギア ターボギアチャンピオンリーグ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="HY62KT081ED70C SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-wizc01.bin" size="4194304" crc="8a8b827c" sha1="1bc1e831b9e2aefc59f2cac5f19f7d22be574fc1" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s214d.u3" size="4194304" crc="8a8b827c" sha1="1bc1e831b9e2aefc59f2cac5f19f7d22be574fc1" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> @@ -123,11 +178,16 @@ license:CC0 <info name="release" value="20010315"/> <info name="alt_title" value="バトルゲート ダークアイズ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc08.bin" size="4194304" crc="12ae932c" sha1="c2188171dc0f78fb6a13bbb55b4e85bdf7b82fd5" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s151c.u3" size="4194304" crc="12ae932c" sha1="c2188171dc0f78fb6a13bbb55b4e85bdf7b82fd5" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -140,30 +200,63 @@ license:CC0 <info name="release" value="20040531"/> <info name="alt_title" value="だいしんぐないと・ピリオド"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0101" /> + <feature name="u1" value="ROM" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="BANDAI 2003" /> + <feature name="u4" value="CS18LV40963DC SRAM" /> <feature name="slot" value="ws_sram" /> <feature name="rtc" value="yes" /> - <dataarea name="rom" size="524288"> - <rom name="dicing knight. (japan).bin" size="524288" crc="d28dc930" sha1="79658575c736fcad18e9225aa0e62398b086093b" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="dk040428.u1" size="2097152" crc="1887389c" sha1="1e4d8e8b3d16083968055cc76b604da91fa0a132" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x40000"> + <dataarea name="sram" size="262144" width="16" endianness="little"> </dataarea> </part> </software> <software name="digi2d1"> <!-- WSC --> - <description>Digimon Adventure 02 - D1 Tamers</description> + <description>Digimon Adventure 02 - D1 Tamers (Rev 1)</description> + <year>2000</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BANC03"/> + <info name="release" value="20001209"/> + <info name="alt_title" value="デジモンアドベンチャー02 ディーワンテイマーズ"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0129" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM (epoxy blob)" /> + <feature name="u4" value="BS62LV256TC SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="143.u3" size="4194304" crc="62f4e4b4" sha1="6fbb07bfefac7832436ec56e4d95678428b0f7ba" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="digi2d1a" cloneof="digi2d1"> + <!-- WSC --> + <description>Digimon Adventure 02 - D1 Tamers (Rev 0)</description> <year>2000</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BANC03"/> <info name="release" value="20001209"/> <info name="alt_title" value="デジモンアドベンチャー02 ディーワンテイマーズ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc03.bin" size="4194304" crc="4d28637e" sha1="18d3dfe25d82964ab7bb61af363d368fd12f4d4b" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s135b.u3" size="4194304" crc="4d28637e" sha1="18d3dfe25d82964ab7bb61af363d368fd12f4d4b" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -175,37 +268,91 @@ license:CC0 <publisher>Bandai</publisher> <info name="serial" value="SWJ-BAN001"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-ban001digiasia.bin" size="4194304" crc="77689273" sha1="7a6411cf8a4d91e8a4e0532779f11bdd25b92363" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s175c.u3" size="4194304" crc="77689273" sha1="7a6411cf8a4d91e8a4e0532779f11bdd25b92363" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="digicard"> <!-- WSC only --> - <description>Digital Monster Card Game - Ver. WonderSwan Color</description> + <description>Digital Monster Card Game - Ver. WonderSwan Color (Rev 2)</description> + <year>2002</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BANC22"/> + <info name="release" value="20020316"/> + <info name="alt_title" value="デジタルモンスター カードゲーム バージョン ワンダースワンカラー"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0132" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> + <feature name="slot" value="ws_eeprom" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m16e203d.u3" size="4194304" crc="1e760c41" sha1="e31bfa54cbf539a9d28090b372d8e669a93c3e28" offset="000000" /> + </dataarea> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="digicarda" cloneof="digicard"> + <!-- WSC only --> + <description>Digital Monster Card Game - Ver. WonderSwan Color (Rev 0)</description> <year>2002</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BANC22"/> <info name="release" value="20020316"/> <info name="alt_title" value="デジタルモンスター カードゲーム バージョン ワンダースワンカラー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100 or PTS-0132" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc22.bin" size="4194304" crc="603cb5e6" sha1="ba16a0770f7a71dd49e2879799fd04a4f04f7e60" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m16e198d.u3" size="4194304" crc="603cb5e6" sha1="ba16a0770f7a71dd49e2879799fd04a4f04f7e60" offset="000000" /> + </dataarea> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> + </dataarea> + </part> + </software> + +<!-- + <software name="digimdp"> + <description>Digital Monster - D-Project (Rev 2)</description> + <year>2002</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BANC2E"/> + <info name="release" value="20020803"/> + <info name="alt_title" value="デジタルモンスター ディープロジェクト"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="HY62KT081ED70C SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s217d.u3" size="4194304" crc="0e40829c" sha1="" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> +--> <software name="digimdp"> <!-- WSC only --> - <description>Digital Monster - D-Project</description> + <description>Digital Monster - D-Project (Rev 1)</description> <year>2002</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BANC2E"/> @@ -213,10 +360,33 @@ license:CC0 <info name="alt_title" value="デジタルモンスター ディープロジェクト"/> <part name="cart" interface="wswan_cart"> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc2e.bin" size="4194304" crc="faaefbcb" sha1="3e8fffe1f607ea5f855397d9d877cecb285507f7" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="swj-banc2e.bin" size="4194304" crc="bd83b82d" sha1="7dab09df13e65aa778e3bc9100efffb10b93b8a9" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="digimdpa" cloneof="digimdp"> + <!-- WSC only --> + <description>Digital Monster - D-Project (Rev 0)</description> + <year>2002</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BANC2E"/> + <info name="release" value="20020803"/> + <info name="alt_title" value="デジタルモンスター ディープロジェクト"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="HY62KT081ED70C SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s213d.u3" size="4194304" crc="faaefbcb" sha1="3e8fffe1f607ea5f855397d9d877cecb285507f7" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -230,11 +400,16 @@ license:CC0 <info name="release" value="20020427"/> <info name="alt_title" value="デジモンテイマーズ バトルスピリット Ver.1.5"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-banc30.bin" size="8388608" crc="6caad4a2" sha1="3f39ff494a3d8dd9d55a2e7cf86b47f1c8e8a156" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s201d.u3" size="8388608" crc="6caad4a2" sha1="3f39ff494a3d8dd9d55a2e7cf86b47f1c8e8a156" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -248,18 +423,24 @@ license:CC0 <info name="release" value="20011006"/> <info name="alt_title" value="デジモンテイマーズ バトルスピリット"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133 or PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC (PTS-0133) or CY62256VLL (PTS-0133A) SRAM" /> <feature name="slot" value="ws_sram" /> <feature name="rtc" value="yes" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc1a.bin" size="4194304" crc="c927bfcb" sha1="757e92177385a14d979227edee1cb544b4c56bd6" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s179c.u3" size="4194304" crc="c927bfcb" sha1="757e92177385a14d979227edee1cb544b4c56bd6" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="digitbt"> <!-- WSC only --> + <!-- Rev 1 --> <description>Digimon Tamers - Brave Tamer</description> <year>2001</year> <publisher>Bandai</publisher> @@ -267,11 +448,15 @@ license:CC0 <info name="release" value="20011229"/> <info name="alt_title" value="デジモンテイマーズ ブレイブテイマー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0132" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc1d.bin" size="4194304" crc="f1f4d41f" sha1="31a718cfbcff2dab56ab9606a0b5b2dfccecbbcb" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e191c.u3" size="4194304" crc="f1f4d41f" sha1="31a718cfbcff2dab56ab9606a0b5b2dfccecbbcb" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -285,17 +470,44 @@ license:CC0 <info name="release" value="20010712"/> <info name="alt_title" value="デジモンテイマーズ デジモンメドレー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0132" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> + <feature name="slot" value="ws_eeprom" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e173c.u3" size="4194304" crc="84a46949" sha1="6c5a2dc7e231ebd278fe22bb7f01b1a7cc3785d6" offset="000000" /> + </dataarea> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="digitmeda" cloneof="digitmed"> + <!-- WSC --> + <description>Digimon Tamers - Digimon Medley (alt)</description> + <year>2001</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BANC14"/> + <info name="release" value="20010712"/> + <info name="alt_title" value="デジモンテイマーズ デジモンメドレー"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc14.bin" size="4194304" crc="fa92418d" sha1="8638737e5a35c6be05a888dc81e504e0d80fd756" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e166c.u3" size="4194304" crc="fa92418d" sha1="8638737e5a35c6be05a888dc81e504e0d80fd756" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> <software name="dokodem3"> <!-- WSC --> + <!-- Rev 2 --> <description>Dokodemo Hamster 3 - Odekake Saffron</description> <year>2000</year> <publisher>BEC</publisher> @@ -303,12 +515,18 @@ license:CC0 <info name="release" value="20001214"/> <info name="alt_title" value="どこでもハムスター3 おでかけサフラン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0111" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> + <feature name="x1" value="32K" /> <feature name="slot" value="ws_sram" /> <feature name="rtc" value="yes" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-becc01.bin" size="2097152" crc="93e19f13" sha1="66b4bd15ef67dc324736a1cc78d6aca335f03389" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m134b.u3" size="2097152" crc="93e19f13" sha1="66b4bd15ef67dc324736a1cc78d6aca335f03389" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -322,11 +540,15 @@ license:CC0 <info name="release" value="20010524"/> <info name="alt_title" value="ポケットの中の ドラえもん"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc0d.bin" size="4194304" crc="2b61bb2b" sha1="57338999b949589c36ce116a30f433e9618685e4" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e156c.u3" size="4194304" crc="2b61bb2b" sha1="57338999b949589c36ce116a30f433e9618685e4" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -340,9 +562,14 @@ license:CC0 <info name="release" value="20031120"/> <info name="alt_title" value="ドラゴンボール"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0116" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="empty" /> <feature name="slot" value="ws_rom" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-banc3c.bin" size="2097152" crc="067238d1" sha1="5384f9974c66e5e26129a4709976de0bb1ae1f17" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="sd16m0e239d.u3" size="2097152" crc="067238d1" sha1="5384f9974c66e5e26129a4709976de0bb1ae1f17" offset="000000" /> </dataarea> </part> </software> @@ -356,11 +583,16 @@ license:CC0 <info name="release" value="20001209"/> <info name="alt_title" value="ファイナルファンタジー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108 or PTS-0129" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-sqrc01.bin" size="4194304" crc="b7243e88" sha1="26628eb76c16880b6faf2e706778d91a60144078" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s129b.u3" size="4194304" crc="b7243e88" sha1="26628eb76c16880b6faf2e706778d91a60144078" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -374,11 +606,16 @@ license:CC0 <info name="release" value="20010502"/> <info name="alt_title" value="ファイナルファンタジーII"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133 or PTS-0116 or PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-sqrc02.bin" size="4194304" crc="f09e752f" sha1="959321e3b971516e38a4cbf95b0fc3efc0b0a825" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s160c.u3" size="4194304" crc="f09e752f" sha1="959321e3b971516e38a4cbf95b0fc3efc0b0a825" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -392,11 +629,16 @@ license:CC0 <info name="release" value="20020328"/> <info name="alt_title" value="ファイナルファンタジーIV"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-sqrc09.bin" size="4194304" crc="f699d6d1" sha1="6d707e88c85d1b5ef708631e709668006a9ee244" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s200d.u3" size="4194304" crc="f699d6d1" sha1="6d707e88c85d1b5ef708631e709668006a9ee244" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -410,11 +652,15 @@ license:CC0 <info name="release" value="20011115"/> <info name="alt_title" value="ファイナルラップスペシャル"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc23.bin" size="4194304" crc="b07e6a56" sha1="4c3f092b095bdb0afdaf8d32d4c54b4d6c209c96" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e184c.u3" size="4194304" crc="b07e6a56" sha1="4c3f092b095bdb0afdaf8d32d4c54b4d6c209c96" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -428,11 +674,15 @@ license:CC0 <info name="release" value="20001228"/> <info name="alt_title" value="フラッシュ 恋人クン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-kbsc01.bin" size="2097152" crc="69d8d433" sha1="a3d6717efdb8f243fe86b4c3d869a9734a2e02d3" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m16e140b.u3" size="2097152" crc="69d8d433" sha1="a3d6717efdb8f243fe86b4c3d869a9734a2e02d3" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -446,11 +696,16 @@ license:CC0 <info name="release" value="20020712"/> <info name="alt_title" value="フロントミッション"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-sqrc10.bin" size="8388608" crc="2f9e2560" sha1="3c752694ab651f9a00ccd39c334a2e3ff78f5cb2" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s211d.u3" size="8388608" crc="2f9e2560" sha1="3c752694ab651f9a00ccd39c334a2e3ff78f5cb2" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -463,17 +718,22 @@ license:CC0 <info name="serial" value="SWJ-BANC2B"/> <info name="release" value="20020228"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc2b.bin" size="4194304" crc="bc944a98" sha1="87661841ca63e99b04c0f6dc4ba3454c897e0c6d" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m1e196c.u3" size="4194304" crc="bc944a98" sha1="87661841ca63e99b04c0f6dc4ba3454c897e0c6d" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x80"> + <dataarea name="eeprom" size="128" width="16" endianness="little"> </dataarea> </part> </software> <software name="gmsayuki"> <!-- WSC only --> + <!-- Rev 2 --> <description>Gensou Maden Saiyuuki Retribution - Hi no Ataru Basho de</description> <year>2001</year> <publisher>Movic ~ Soeishinsha</publisher> @@ -481,11 +741,15 @@ license:CC0 <info name="release" value="20010607"/> <info name="alt_title" value="幻想魔伝最遊記 Retribution ~陽のあたる場所で~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0132" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-sesc01.bin" size="2097152" crc="446e2581" sha1="adbe6e38a0bc6a2d19da64a444071977b771f14f" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m16e162c.u3" size="2097152" crc="446e2581" sha1="adbe6e38a0bc6a2d19da64a444071977b771f14f" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -499,11 +763,16 @@ license:CC0 <info name="release" value="20010125"/> <info name="alt_title" value="ギルティギア プチ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-sumc07.bin" size="2097152" crc="9750bc2a" sha1="6d8f8fd330f32374b55cf6b998196a7db2131073" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s144b.u3" size="2097152" crc="9750bc2a" sha1="6d8f8fd330f32374b55cf6b998196a7db2131073" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -517,11 +786,16 @@ license:CC0 <info name="release" value="20010927"/> <info name="alt_title" value="ギルティギア プチ2"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-sumc08.bin" size="4194304" crc="d7a12bd5" sha1="f7aeab6724154f7ef6a389f9f18b7100045e1064" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s177c.u3" size="4194304" crc="d7a12bd5" sha1="f7aeab6724154f7ef6a389f9f18b7100045e1064" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -535,11 +809,16 @@ license:CC0 <info name="release" value="20020613"/> <info name="alt_title" value="グランスタ クロニクル"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-mgtc01.bin" size="8388608" crc="af24f95c" sha1="3a4c5d1c08b74cf05b4cb64cbfd7c3dd8b1c3789" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s205d.u3" size="8388608" crc="af24f95c" sha1="3a4c5d1c08b74cf05b4cb64cbfd7c3dd8b1c3789" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -553,11 +832,16 @@ license:CC0 <info name="release" value="20030315"/> <info name="alt_title" value="機動戦士ガンダム シード"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="WSS-0003 or PTS-0116 or WSS-0004" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc36.bin" size="4194304" crc="bce15137" sha1="e933ff8eace56a462019ae4654b0bab1b21b1d6c" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s229d.u3" size="4194304" crc="bce15137" sha1="e933ff8eace56a462019ae4654b0bab1b21b1d6c" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -571,11 +855,16 @@ license:CC0 <info name="release" value="20030502"/> <info name="alt_title" value="機動戦士ガンダム ギレンの野望 特別編 蒼き星の覇者"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc3a.bin" size="4194304" crc="d4061551" sha1="20b671bc14a8ab6373deecc641479d09658ac21f" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s232d.u3" size="4194304" crc="d4061551" sha1="20b671bc14a8ab6373deecc641479d09658ac21f" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -589,11 +878,16 @@ license:CC0 <info name="release" value="20010201"/> <info name="alt_title" value="機動戦士ガンダム Vol.1 サイドセブン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0129" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM (epoxy blob)" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc07.bin" size="4194304" crc="08c0247b" sha1="29e72e7f96f145a0ff56e447f577310df2ec463b" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="142.u3" size="4194304" crc="08c0247b" sha1="29e72e7f96f145a0ff56e447f577310df2ec463b" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -607,11 +901,16 @@ license:CC0 <info name="release" value="20010816"/> <info name="alt_title" value="機動戦士ガンダム Vol.2 ジャブロー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-banc17.bin" size="8388608" crc="39a1391a" sha1="df1a794f7e3992b1e1e9de14141b607746202202" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="mh64m256s171c.u3" size="8388608" crc="39a1391a" sha1="df1a794f7e3992b1e1e9de14141b607746202202" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -625,11 +924,16 @@ license:CC0 <info name="release" value="20020525"/> <info name="alt_title" value="機動戦士ガンダム Vol.3 ア・バオア・クー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-banc25.bin" size="8388608" crc="a9f5bf54" sha1="35443e2ef8a20a0ad82da1274b2768c16239dd46" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s204d.u3" size="8388608" crc="a9f5bf54" sha1="35443e2ef8a20a0ad82da1274b2768c16239dd46" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -643,18 +947,26 @@ license:CC0 <info name="release" value="20001209"/> <info name="alt_title" value="グンペイEX"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-banc02.bin" size="1048576" crc="0c9cb12c" sha1="1eb729aa9ab0a7df6f8a3470a6fede59d7622d4a" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m16e131b.u3" size="1048576" crc="0c9cb12c" sha1="1eb729aa9ab0a7df6f8a3470a6fede59d7622d4a" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> - <software name="hanjuher" supported="no"> <!-- it freezes --> + <!-- hangs after story scroll when starting a new game --> + <!-- The IRQ routine at 22F13 expects the counter at 0F22A to have a valid + value. This will likely get fixed with more accurate cycle counting. + --> + <software name="hanjuher" supported="no"> <!-- WSC only --> + <!-- Rev 1 --> <description>Hanjuku Hero - Ah, Sekai yo Hanjuku Nare...!!</description> <year>2002</year> <publisher>Square</publisher> @@ -662,11 +974,16 @@ license:CC0 <info name="release" value="20020214"/> <info name="alt_title" value="はんじゅくヒーロー半熟英雄 ああ、世界よ半熟なれ...!!"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-sqrc06.bin" size="4194304" crc="31e09bed" sha1="2e3f221d6965f53b29586d2019ee81dec6d1ac30" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s195c.u3" size="4194304" crc="31e09bed" sha1="2e3f221d6965f53b29586d2019ee81dec6d1ac30" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -680,29 +997,62 @@ license:CC0 <info name="release" value="20000921"/> <info name="alt_title" value="はたらくチョコボ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="W242580 SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-sqr004.bin" size="1048576" crc="7a29e9a6" sha1="9bd63ed48926b27be70333fbe07da2ceed56328a" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s123b.u3" size="1048576" crc="7a29e9a6" sha1="9bd63ed48926b27be70333fbe07da2ceed56328a" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="hxhgrisl"> <!-- WSC only, Rated "Everyone" --> - <description>Hunter X Hunter - Greed Island</description> + <description>Hunter X Hunter - Greed Island (Rev 1)</description> + <year>2003</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BANC39"/> + <info name="release" value="20030424"/> + <info name="alt_title" value="ハンター×ハンター グリードアイランド"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0116" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s233d.u3" size="8388608" crc="130af567" sha1="e26410d4eee4cc8cec5e2e369604aedf26d69d0c" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="hxhgrisla" cloneof="hxhgrisl"> + <!-- WSC only, Rated "Everyone" --> + <description>Hunter X Hunter - Greed Island (Rev 0)</description> <year>2003</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BANC39"/> <info name="release" value="20030424"/> <info name="alt_title" value="ハンター×ハンター グリードアイランド"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-banc39.bin" size="8388608" crc="a487b7a8" sha1="f66335b5af87e7cb72ae311eb9b339534722f738" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s231d.u3" size="8388608" crc="a487b7a8" sha1="f66335b5af87e7cb72ae311eb9b339534722f738" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -716,11 +1066,15 @@ license:CC0 <info name="release" value="20010823"/> <info name="alt_title" value="ハンター×ハンター 導かれし者"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc18.bin" size="4194304" crc="9402bca9" sha1="bc591fc24d3f8e94b70503fd8b6a35fa58151139" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e172c.u3" size="4194304" crc="9402bca9" sha1="bc591fc24d3f8e94b70503fd8b6a35fa58151139" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -734,11 +1088,15 @@ license:CC0 <info name="release" value="20010426"/> <info name="alt_title" value="ハンター×ハンター ~それぞれの決意~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc0f.bin" size="4194304" crc="d0b20c5a" sha1="2da2a9bcff4813abcb5b2c88095258d89a575378" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e155c.u3" size="4194304" crc="d0b20c5a" sha1="2da2a9bcff4813abcb5b2c88095258d89a575378" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -752,11 +1110,16 @@ license:CC0 <info name="release" value="20020727"/> <info name="alt_title" value="犬夜叉 風雲絵巻"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc26.bin" size="4194304" crc="3ff5791f" sha1="99d5bdde193685a1d09ea73bb79a54b4da82625d" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s212d.u3" size="4194304" crc="3ff5791f" sha1="99d5bdde193685a1d09ea73bb79a54b4da82625d" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -770,12 +1133,18 @@ license:CC0 <info name="release" value="20011102"/> <info name="alt_title" value="犬夜叉 かごめの戦国日記"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0111 or PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> + <feature name="x1" value="32K" /> <feature name="slot" value="ws_sram" /> <feature name="rtc" value="yes" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-banc1b.bin" size="2097152" crc="0c23d551" sha1="b4fbea1a2c50d8566685f72820b360af4b54f82f" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s183c.u3" size="2097152" crc="0c23d551" sha1="b4fbea1a2c50d8566685f72820b360af4b54f82f" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -789,11 +1158,15 @@ license:CC0 <info name="release" value="20021116"/> <info name="alt_title" value="犬夜叉 かごめの夢日記"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0132" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc32.bin" size="4194304" crc="44453234" sha1="f7c8f8b6b6d036df8fc4bde72fcfac2846dffe35" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m16e221d.u3" size="4194304" crc="44453234" sha1="f7c8f8b6b6d036df8fc4bde72fcfac2846dffe35" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -807,11 +1180,10 @@ license:CC0 <part name="cart" interface="wswan_cart"> <feature name="slot" value="ws_sram" /> <feature name="rtc" value="yes" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="524288"> + <dataarea name="rom" size="524288" width="16" endianness="little"> <rom name="judgement silversword - rebirth edition (japan) (rev 4321).bin" size="524288" crc="60191872" sha1="657aea8377e207b9b5a182b13966a27f46633640" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x40000"> + <dataarea name="sram" size="262144" width="16" endianness="little"> </dataarea> </part> </software> @@ -819,17 +1191,19 @@ license:CC0 <software name="jsilver1" cloneof="jsilver"> <!-- WSC only --> <description>Judgement Silversword - Rebirth Edition (Rev. SC21)</description> - <year>2004</year> + <year>2005</year> <publisher>Qute</publisher> <info name="release" value="20040205"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="no label" /> + <feature name="uX" value="BANDAI 2003" /><!-- no markings on pcb --> + <feature name="uX" value="CS18LV40963DCR70 SRAM" /> <feature name="slot" value="ws_sram" /> <feature name="rtc" value="yes" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="524288"> - <rom name="judgement silversword - rebirth edition (japan) (rev sc21).bin" size="524288" crc="4fce380d" sha1="a1d910123b6be0b941f699ef70c745d16350d029" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="jss2_051125.bin" size="2097152" crc="85c4c9a1" sha1="58c691cb31f96eea5689693fd23768d02e8b133f" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x40000"> + <dataarea name="sram" size="262144" width="16" endianness="little"> </dataarea> </part> </software> @@ -843,11 +1217,15 @@ license:CC0 <info name="release" value="20030130"/> <info name="alt_title" value="キン肉マンII世 超人聖戦史"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0132" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc34.bin" size="4194304" crc="6142fd9d" sha1="efcf8f92357ffc6f6ec0e4aa960cd97a5070836e" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m16e227d.u3" size="4194304" crc="6142fd9d" sha1="efcf8f92357ffc6f6ec0e4aa960cd97a5070836e" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -861,17 +1239,22 @@ license:CC0 <info name="release" value="20020302"/> <info name="alt_title" value="キン肉マンII世 ドリームタッグマッチ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0132" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-banc20.bin" size="2097152" crc="462f9275" sha1="81dd3124cce8a1aafd423bfe0814187fb7c646cb" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m1e197c.u3" size="2097152" crc="462f9275" sha1="81dd3124cce8a1aafd423bfe0814187fb7c646cb" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x80"> + <dataarea name="eeprom" size="128" width="16" endianness="little"> </dataarea> </part> </software> <software name="kurupara"> <!-- WSC only --> + <!-- Rev 1 --> <description>Kurupara!</description> <year>2001</year> <publisher>Tom Create</publisher> @@ -879,12 +1262,15 @@ license:CC0 <info name="release" value="20010614"/> <info name="alt_title" value="くるパラ!"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0132" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-tmcc01.bin" size="2097152" crc="274719f5" sha1="9942d1b7d1c00126b9891e560e6a3e264f8fdc2e" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m16u161c.u3" size="2097152" crc="274719f5" sha1="9942d1b7d1c00126b9891e560e6a3e264f8fdc2e" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -898,12 +1284,41 @@ license:CC0 <info name="release" value="20010726"/> <info name="alt_title" value="ラストアライブ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0132" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc15.bin" size="4194304" crc="da4479bf" sha1="b019f41207e396d9fe3509dccdbe1cc6e7ac46bb" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e167c.u3" size="4194304" crc="da4479bf" sha1="b019f41207e396d9fe3509dccdbe1cc6e7ac46bb" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <!-- Needs flash emulated --> + <software name="mamamit" supported="no"> + <!-- WSC only --> + <description>mama Mitte'</description> + <year>2002</year> + <publisher>Tanita</publisher> + <info name="serial" value="MM-280"/> + <info name="release" value="20021103"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="WSS-0001-T" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="?" /> + <feature name="u3" value="29LV800TA Flash" /> + <feature name="u4" value="?" /> + <feature name="x1" value="32K" /> + <feature name="led1" value="led1" /> + <feature name="slot" value="ws_sram" /> + <feature name="rtc" value="yes" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="29lv800ta.u3" size="1048576" crc="f366172e" sha1="196190b24297008ab4e48b418ff29b2f8d4bc610" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -917,11 +1332,16 @@ license:CC0 <info name="release" value="20020320"/> <info name="alt_title" value="魔界塔士 サ・ガ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-sqrc08.bin" size="4194304" crc="1b6f5f30" sha1="6b7a9b810c932974cbda4de7178cf0ea5a90e628" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s199d.u3" size="4194304" crc="1b6f5f30" sha1="6b7a9b810c932974cbda4de7178cf0ea5a90e628" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -935,11 +1355,16 @@ license:CC0 <info name="release" value="20010405"/> <info name="alt_title" value="名探偵コナン ~夕暮れの皇女~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133 or PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc0e.bin" size="4194304" crc="9f6e3f8d" sha1="36d8bc2ce7920d940943358d48f056f81055ab34" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s153c.u3" size="4194304" crc="9f6e3f8d" sha1="36d8bc2ce7920d940943358d48f056f81055ab34" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -953,11 +1378,16 @@ license:CC0 <info name="release" value="20010308"/> <info name="alt_title" value="メモリーズオフ フェスタ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-kdkc01.bin" size="2097152" crc="8e123373" sha1="f47b4ab9197999bbec351750601baa20fbbd7177" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s147b.u3" size="2097152" crc="8e123373" sha1="f47b4ab9197999bbec351750601baa20fbbd7177" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -971,12 +1401,15 @@ license:CC0 <info name="release" value="20010426"/> <info name="alt_title" value="サウンドコミック - 三毛猫ホームズ ゴーストパニック"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0132" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-kbsc02.bin" size="4194304" crc="d75effc2" sha1="2358701531e8a38419859cd70bf2fbbd967b6745" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e154c.u3" size="4194304" crc="d75effc2" sha1="2358701531e8a38419859cd70bf2fbbd967b6745" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -990,11 +1423,16 @@ license:CC0 <info name="release" value="20010405"/> <info name="alt_title" value="ミスタードリラー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-nmcc01.bin" size="2097152" crc="5555d95c" sha1="209232f1e91c05140529d466c0ef6b7ad3386de1" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s152c.u3" size="2097152" crc="5555d95c" sha1="209232f1e91c05140529d466c0ef6b7ad3386de1" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1008,11 +1446,16 @@ license:CC0 <info name="release" value="20030327"/> <info name="alt_title" value="Naruto ナルト- 木ノ葉忍法帖"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc38.bin" size="4194304" crc="71556e6a" sha1="dbaa50fd56e69e72fdfe49362ef5fe4437d66667" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s230d.u3" size="4194304" crc="71556e6a" sha1="dbaa50fd56e69e72fdfe49362ef5fe4437d66667" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1026,14 +1469,43 @@ license:CC0 <info name="release" value="20020712"/> <info name="alt_title" value="フロムテレビアニメーション ワンピース グランドバトル スワンコロシアム"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s209d.u3" size="8388608" crc="f8a1dd2b" sha1="01e765bf356cdcb413bfd27c6321f7449465766a" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + +<!-- + <software name="onepbatla" cloneof="onepbatl"> + <description>From TV Animation One Piece - Grand Battle Swan Colosseum Sample Edition</description> + <year>2002</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWC-BANC29"/> + <info name="release" value="20020712"/> + <info name="alt_title" value="フロムテレビアニメーション ワンピース グランドバトル スワンコロシアム"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-banc29.bin" size="8388608" crc="f8a1dd2b" sha1="01e765bf356cdcb413bfd27c6321f7449465766a" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s210d.u3" size="8388608" crc="23853305" sha1="" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> +--> <software name="onepchop"> <!-- WSC only, Rated "Everyone" --> @@ -1044,11 +1516,16 @@ license:CC0 <info name="release" value="20031016"/> <info name="alt_title" value="フロムテレビアニメーション ワンピース チョッパーの大冒険"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc3b.bin" size="4194304" crc="8e120b5a" sha1="221f48e97ec2c6d0046213956e1f36e923c0dec2" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s238d.u3" size="4194304" crc="8e120b5a" sha1="221f48e97ec2c6d0046213956e1f36e923c0dec2" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1062,29 +1539,62 @@ license:CC0 <info name="release" value="20010913"/> <info name="alt_title" value="フロムテレビアニメーション ワンピース 虹の島伝説"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133 or PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC (PTS-0133) or CY62256VLL (PTS-0133A) SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc19.bin" size="4194304" crc="427056c4" sha1="2410690ad46667c52b63402df9e95fc8a75cee62" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s178c.u3" size="4194304" crc="427056c4" sha1="2410690ad46667c52b63402df9e95fc8a75cee62" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="oneptwar"> <!-- WSC only --> - <description>From TV Animation One Piece - Treasure Wars</description> + <description>From TV Animation One Piece - Treasure Wars (Rev 1)</description> + <year>2002</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BANC1E"/> + <info name="release" value="20020103"/> + <info name="alt_title" value="フロムテレビアニメーション ワンピース トレジャーウォーズ"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s198c.u3" size="4194304" crc="3df3e34c" sha1="55088795164170c24b243a1b572506f123064c0f" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="oneptwara" cloneof="oneptwar"> + <!-- WSC only --> + <description>From TV Animation One Piece - Treasure Wars (Rev 0)</description> <year>2002</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BANC1E"/> <info name="release" value="20020103"/> <info name="alt_title" value="フロムテレビアニメーション ワンピース トレジャーウォーズ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc1e.bin" size="4194304" crc="205503c3" sha1="dd1e6e5467b72fcb5848f07a9747aa66bb207d45" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s190c.u3" size="4194304" crc="205503c3" sha1="dd1e6e5467b72fcb5848f07a9747aa66bb207d45" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1098,12 +1608,17 @@ license:CC0 <info name="release" value="20021220"/> <info name="alt_title" value="フロムテレビアニメーション ワンピース トレジャーウォーズ2 バギーランドへようこそ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="WSS-0003" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="HY62KT081ED70C SRAM" /> <feature name="slot" value="ws_sram" /> <feature name="rtc" value="yes" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-banc33.bin" size="8388608" crc="0d1048f0" sha1="b7775e8f60fd62dc07f2865f8fad29a11e12dbb5" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s225d.u3" size="8388608" crc="0d1048f0" sha1="b7775e8f60fd62dc07f2865f8fad29a11e12dbb5" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1117,11 +1632,15 @@ license:CC0 <info name="release" value="20010531"/> <info name="alt_title" value="落雀"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-banc10.bin" size="1048576" crc="fe4ff701" sha1="977d5830e45c78b9020e9d06a63a9ad6bc623745" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m1e157c.u3" size="1048576" crc="fe4ff701" sha1="977d5830e45c78b9020e9d06a63a9ad6bc623745" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x80"> + <dataarea name="eeprom" size="128" width="16" endianness="little"> </dataarea> </part> </software> @@ -1135,11 +1654,16 @@ license:CC0 <info name="release" value="20001209"/> <info name="alt_title" value="ライムライダー ケロリカン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc01.bin" size="4194304" crc="60706555" sha1="5973306a864c3804ee10b209e45067807d39a4de" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s132b.u3" size="4194304" crc="60706555" sha1="5973306a864c3804ee10b209e45067807d39a4de" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1153,52 +1677,67 @@ license:CC0 <info name="release" value="20020712"/> <info name="alt_title" value="Riviera ~約束の地 リヴィエラ~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-banc27.bin" size="8388608" crc="2460b45a" sha1="a8f8d3efc9b2d5741081e05f517d746ee5437f87" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s207d.u3" size="8388608" crc="2460b45a" sha1="a8f8d3efc9b2d5741081e05f517d746ee5437f87" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="srobotc3a" cloneof="srobotc3"> <!-- WSC only, Rated "Everyone" --> - <description>Super Robot Taisen Compact 3 (v1.5)</description> + <description>Super Robot Taisen Compact 3 (Rev 5)</description> <year>2003</year> <publisher>Banpresto</publisher> <info name="serial" value="SWJ-BPRC09"/> <info name="release" value="20030717"/> <info name="alt_title" value="スーパーロボット大戦 コンパクト3"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-bprc09.bin" size="8388608" crc="6918c824" sha1="b579f204be604ebef4e8238e5883152b70399c4d" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s234d.u3" size="8388608" crc="6918c824" sha1="b579f204be604ebef4e8238e5883152b70399c4d" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="srobotc3"> <!-- WSC only, Rated "Everyone" --> - <description>Super Robot Taisen Compact 3 (v1.6)</description> + <description>Super Robot Taisen Compact 3 (Rev 6)</description> <year>2003</year> <publisher>Banpresto</publisher> <info name="serial" value="SWJ-BPRC09"/> <info name="release" value="20030717"/> <info name="alt_title" value="スーパーロボット大戦 コンパクト3"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-bprc09-1.bin" size="8388608" crc="188ca644" sha1="dd6fe0f278cdec2670d3be8552dbb0cf6a3a2841" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s237d.u3" size="8388608" crc="188ca644" sha1="dd6fe0f278cdec2670d3be8552dbb0cf6a3a2841" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> - <software name="srobotwc" supported="no"> <!-- it freezes --> + <software name="srobotwc"> <!-- WSC only --> <description>Super Robot Taisen Compact for WonderSwan Color</description> <year>2001</year> @@ -1207,11 +1746,16 @@ license:CC0 <info name="release" value="20011213"/> <info name="alt_title" value="フォー ワンダースワンカラーコンパクト スーパーロボット大戦"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A or PTS-0116" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL (PTS-0133A) or BS62LV256TC (PTS-0116) SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-bprc08.bin" size="4194304" crc="16e0d929" sha1="bf212cecbbc51ee32ee2655a072f55e7bf70b9ec" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s185c.u3" size="4194304" crc="16e0d929" sha1="bf212cecbbc51ee32ee2655a072f55e7bf70b9ec" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1225,17 +1769,23 @@ license:CC0 <info name="release" value="20030208"/> <info name="alt_title" value="ロックマンエグゼ ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc35.bin" size="4194304" crc="658c4b98" sha1="b4a3ff3b72639f27d1a6f449b0335074aeb9e603" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s228d.u3" size="4194304" crc="658c4b98" sha1="b4a3ff3b72639f27d1a6f449b0335074aeb9e603" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="rockmnxn"> <!-- WSC only, Rated "Everyone" --> + <!-- Rev 1 --> <description>Rockman EXE - N1 Battle</description> <year>2003</year> <publisher>Capcom</publisher> @@ -1243,11 +1793,16 @@ license:CC0 <info name="release" value="20030808"/> <info name="alt_title" value="ロックマンエグゼ N1バトル"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-cpcc01.bin" size="4194304" crc="1f10ca75" sha1="9b4786adca7b83fe66a9d4b9fd4ffaf32abe7656" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s235d.u3" size="4194304" crc="1f10ca75" sha1="9b4786adca7b83fe66a9d4b9fd4ffaf32abe7656" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1261,11 +1816,16 @@ license:CC0 <info name="release" value="20011220"/> <info name="alt_title" value="ロマンシング サ・ガ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-sqrc07.bin" size="4194304" crc="9c98d97d" sha1="06fcc9aad3ae478db6eed27621af4f56a6488a67" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s187c.u3" size="4194304" crc="9c98d97d" sha1="06fcc9aad3ae478db6eed27621af4f56a6488a67" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1279,11 +1839,16 @@ license:CC0 <info name="release" value="20020207"/> <info name="alt_title" value="ランディム Return To Earth"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ddjc01.bin" size="2097152" crc="15c4552e" sha1="3a41a3b8fc126da07e2a82c21056a45c15efbc98" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s193c.u3" size="2097152" crc="15c4552e" sha1="3a41a3b8fc126da07e2a82c21056a45c15efbc98" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1297,11 +1862,16 @@ license:CC0 <info name="release" value="20010315"/> <info name="alt_title" value="SDガンダム英雄伝 ~騎士伝説~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc0a.bin" size="4194304" crc="c60e5162" sha1="ebd4b37ade6df717f7b637747a4d3c45a6cca037" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s149c.u3" size="4194304" crc="c60e5162" sha1="ebd4b37ade6df717f7b637747a4d3c45a6cca037" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1315,11 +1885,16 @@ license:CC0 <info name="release" value="20010315"/> <info name="alt_title" value="SDガンダム英雄伝 ~武者伝説~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc0b.bin" size="4194304" crc="18ecffb8" sha1="d8097e25431f0ad5183b2479ee0837599677a300" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s150c.u3" size="4194304" crc="18ecffb8" sha1="d8097e25431f0ad5183b2479ee0837599677a300" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1333,29 +1908,63 @@ license:CC0 <info name="release" value="20010614"/> <info name="alt_title" value="SDガンダム Gジェネレーション ギャザービート2"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0109" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-banc12.bin" size="8388608" crc="4d21a347" sha1="016ff46509cbfe57a7440a1755d3a41ef49c048f" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="mh64m159c.u3" size="8388608" crc="4d21a347" sha1="016ff46509cbfe57a7440a1755d3a41ef49c048f" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> +<!-- + <software name="sdgundg2"> + <description>SD Gundam G-Generation - Mono-Eye Gundams (Rev 2)</description> + <year>2002</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BANC2F"/> + <info name="release" value="20020926"/> + <info name="alt_title" value="SDガンダム ジージェネレーション モノアイガンダムズ"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="HY62KT081ED70C SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s226d.u3" size="8388608" crc="a3ecc9ac" sha1="" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> +--> + <software name="sdgundg2"> <!-- WSC only --> - <description>SD Gundam G-Generation - Mono-Eye Gundams</description> + <description>SD Gundam G-Generation - Mono-Eye Gundams (Rev 0)</description> <year>2002</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BANC2F"/> <info name="release" value="20020926"/> <info name="alt_title" value="SDガンダム ジージェネレーション モノアイガンダムズ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="HY62KT081ED70C SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-banc2f.bin" size="8388608" crc="6aca1f04" sha1="91e087056207fce21e782e25e383c203bc046897" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="sd64m256s218d.u3" size="8388608" crc="6aca1f04" sha1="91e087056207fce21e782e25e383c203bc046897" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1369,11 +1978,16 @@ license:CC0 <info name="release" value="20020216"/> <info name="alt_title" value="SDガンダム オペレーション U.C."/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-banc21.bin" size="2097152" crc="f0acda5c" sha1="152c4d63b1b17f2c717a43efc75d718b614f9ddc" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s194c.u3" size="2097152" crc="f0acda5c" sha1="152c4d63b1b17f2c717a43efc75d718b614f9ddc" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1387,53 +2001,70 @@ license:CC0 <info name="release" value="20001221"/> <info name="alt_title" value="仙界伝 弐~TVアニメーション仙界伝封神演義より~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc04.bin" size="4194304" crc="9f35d00f" sha1="df9e831842072d9af613effbee7162229849de58" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s137b.u3" size="4194304" crc="9f35d00f" sha1="df9e831842072d9af613effbee7162229849de58" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="shamking"> <!-- WSC only --> - <description>Shaman King - Asu e no Ishi (v1.1)</description> + <description>Shaman King - Asu e no Ishi (Rev 1)</description> <year>2002</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BANC2D"/> <info name="release" value="20020829"/> <info name="alt_title" value="シャーマンキング 未来への意志"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="HY62KT081ED70C SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc2d-1.bin" size="4194304" crc="34908cb4" sha1="473195666a633573c777d3be98d7e8f46569c84b" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s219d.u3" size="4194304" crc="34908cb4" sha1="473195666a633573c777d3be98d7e8f46569c84b" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="shamking1" cloneof="shamking"> <!-- WSC only --> - <description>Shaman King - Asu e no Ishi</description> + <description>Shaman King - Asu e no Ishi (Rev 0)</description> <year>2002</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BANC2D"/> <info name="release" value="20020829"/> <info name="alt_title" value="シャーマンキング 未来への意志"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="HY62KT081ED70C SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc2d.bin" size="4194304" crc="6c029674" sha1="1e735d1e83a7bfa06c5c717c7e8a386d55a8e3f0" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m256s215d.u3" size="4194304" crc="6c029674" sha1="1e735d1e83a7bfa06c5c717c7e8a386d55a8e3f0" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> + <!-- bad background graphics during game play --> <software name="sorobang" supported="partial"> <!-- WSC --> + <!-- Rev 1 --> <description>Sorobang</description> <year>2000</year> <publisher>Kaga Tech</publisher> @@ -1441,12 +2072,16 @@ license:CC0 <info name="release" value="20001209"/> <info name="alt_title" value="そろばんぐ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-kgtc09.bin" size="1048576" crc="0e467d97" sha1="983582fe8d18839df30b6d29fb75780a9e32f4ec" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s130b.u3" size="1048576" crc="0e467d97" sha1="983582fe8d18839df30b6d29fb75780a9e32f4ec" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1460,9 +2095,14 @@ license:CC0 <info name="release" value="20030731"/> <info name="alt_title" value="聖闘士星矢 黄金伝説編 パーフェクトエディション"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0116" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="empty" /> <feature name="slot" value="ws_rom" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-banc3d.bin" size="2097152" crc="6e8a792d" sha1="8542649963efe0976015759382c180b7c056be9a" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="sd16m0e236d.u3" size="2097152" crc="6e8a792d" sha1="8542649963efe0976015759382c180b7c056be9a" offset="000000" /> </dataarea> </part> </software> @@ -1476,11 +2116,16 @@ license:CC0 <info name="release" value="20010827"/> <info name="alt_title" value="スターハーツ ~星と大地の使者~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc16.bin" size="4194304" crc="138d1018" sha1="2b2c2a0566646156bcdde2a00b728c5b8218aa23" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="170.u3" size="4194304" crc="138d1018" sha1="2b2c2a0566646156bcdde2a00b728c5b8218aa23" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> @@ -1491,11 +2136,16 @@ license:CC0 <year>2001</year> <publisher>Bandai</publisher> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0116" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="star hearts - hoshi to daichi no shisha - taikenban (japan).bin" size="4194304" crc="9874e9a2" sha1="44940ae0140df1bd91d742a166c459df1b6c2339" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s168c.u3" size="4194304" crc="9874e9a2" sha1="44940ae0140df1bd91d742a166c459df1b6c2339" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> @@ -1509,11 +2159,16 @@ license:CC0 <info name="release" value="20021031"/> <info name="alt_title" value="ナムコスーパーウォーズ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0116" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="HY62KT081ED70C SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-banc28.bin" size="2097152" crc="8ce4652f" sha1="c48569fd0a46ab7b7ceafeb5698be90420cd4fbe" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="sd16m256s220d.u3" size="2097152" crc="8ce4652f" sha1="c48569fd0a46ab7b7ceafeb5698be90420cd4fbe" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1527,12 +2182,15 @@ license:CC0 <info name="release" value="20001221"/> <info name="alt_title" value="テラーズ2"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0130-2" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc05.bin" size="4194304" crc="9bd8f08c" sha1="9532113e14b03c95f034c015168e21273d42eff1" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e128b.u3" size="4194304" crc="9bd8f08c" sha1="9532113e14b03c95f034c015168e21273d42eff1" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -1546,17 +2204,21 @@ license:CC0 <info name="release" value="20020418"/> <info name="alt_title" value="テトリス"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0132" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-vgdc01.bin" size="1048576" crc="7b0caea9" sha1="1a86403d7896d60fcb7a4c09367f5a976c7ea5a5" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="sd8m1e202d.u3" size="1048576" crc="7b0caea9" sha1="1a86403d7896d60fcb7a4c09367f5a976c7ea5a5" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x80"> + <dataarea name="eeprom" size="128" width="16" endianness="little"> </dataarea> </part> </software> - <software name="tonpuuso" supported="no"> <!-- it freezes --> + <!-- Freezes at game selection --> + <software name="tonpuuso" supported="no"> <!-- WSC --> <description>Tonpuusou</description> <year>2001</year> @@ -1565,11 +2227,15 @@ license:CC0 <info name="release" value="20010628"/> <info name="alt_title" value="東風荘"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-banc13.bin" size="1048576" crc="47659b2c" sha1="fb53c28bd48174d3829467f1ab81d3f87f9a7f5b" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m1e165c.u3" size="1048576" crc="47659b2c" sha1="fb53c28bd48174d3829467f1ab81d3f87f9a7f5b" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x80"> + <dataarea name="eeprom" size="128" width="16" endianness="little"> </dataarea> </part> </software> @@ -1583,11 +2249,16 @@ license:CC0 <info name="release" value="20010208"/> <info name="alt_title" value="宇宙戦艦ヤマト"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc09.bin" size="4194304" crc="5793bdda" sha1="dd1878279a6667fb66dd1ac44a2cdb9a5acbe415" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s145b.u3" size="4194304" crc="5793bdda" sha1="dd1878279a6667fb66dd1ac44a2cdb9a5acbe415" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1601,11 +2272,16 @@ license:CC0 <info name="release" value="20010621"/> <info name="alt_title" value="ウルトラマン 光の国の使者"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-banc11.bin" size="2097152" crc="de2208ab" sha1="bd107befe5ce6c5508d2da8be351b9984166ae1d" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s163c.u3" size="2097152" crc="de2208ab" sha1="bd107befe5ce6c5508d2da8be351b9984166ae1d" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1619,12 +2295,16 @@ license:CC0 <info name="release" value="20010118"/> <info name="alt_title" value="ナムコワンダークラシック"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0129" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM (epoxy blob)" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc06.bin" size="4194304" crc="12f10b27" sha1="55b54944efd6e277fa7140925ed2457a8cfb40b8" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="136.u3" size="4194304" crc="12f10b27" sha1="55b54944efd6e277fa7140925ed2457a8cfb40b8" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1638,11 +2318,16 @@ license:CC0 <info name="release" value="20010329"/> <info name="alt_title" value="ワイルドカード"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0131" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM (epoxy blob)" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-sqrc04.bin" size="2097152" crc="d9401f0a" sha1="ea878a485a20abd5251065fd66e82d9d8b8a669d" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="146.u3" size="2097152" crc="d9401f0a" sha1="ea878a485a20abd5251065fd66e82d9d8b8a669d" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1656,11 +2341,15 @@ license:CC0 <info name="release" value="20010125"/> <info name="alt_title" value="ウィズ・ユー ~みつめていたい~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0130" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM (epoxy blob)" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-shlc01.bin" size="4194304" crc="e14e9d36" sha1="6a4f4a03c367ccf00aa7462191c929a2736eb44b" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="139.u3" size="4194304" crc="e14e9d36" sha1="6a4f4a03c367ccf00aa7462191c929a2736eb44b" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -1674,11 +2363,16 @@ license:CC0 <info name="release" value="20010301"/> <info name="alt_title" value="ウィザードリィ シナリオ1 狂王の試練場"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0133" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-banc0c.bin" size="2097152" crc="15e55706" sha1="c1ad383d337dba8a63295cfb8c7ca8470c893c67" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s148b.u3" size="2097152" crc="15e55706" sha1="c1ad383d337dba8a63295cfb8c7ca8470c893c67" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1691,8 +2385,22 @@ license:CC0 <info name="release" value="20000718"/> <info name="alt_title" value="ワンダーウィッチ"/> <part name="cart" interface="wswan_cart"> - <dataarea name="rom" size="524288"> - <rom name="wonderwitch [freyaos 1.2.0].bin" size="524288" crc="8e5e9633" sha1="d9dd280972ec45e56de98f3d425533dd49713caf" offset="000000" /> + <feature name="pcb" value="PTS-0101" /> + <feature name="u1" value="29DL400TC Flash" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="BANDAI 2003" /> + <feature name="u4" value="D442000LGU SRAM" /> + <feature name="slot" value="wwitch" /> + <feature name="rtc" value="yes" /> + <!-- 17P8 / S3511A at U5 --> + <!-- 512KB Flash rom 29DL400TC --> + <!-- The last, 8th, 64KB page is protected and contains the main rom --> + <!-- The 7th page contains the Freya OS and fonts --> + <!-- The remaining 384KB is available for storing code --> + <dataarea name="rom" size="524288" width="16" endianness="little"> + <rom name="wonderwitch [freyaos 1.2.0].u1" size="524288" crc="8e5e9633" sha1="d9dd280972ec45e56de98f3d425533dd49713caf" offset="000000" /> + </dataarea> + <dataarea name="sram" size="262144" width="16" endianness="little"> </dataarea> </part> </software> @@ -1705,8 +2413,17 @@ license:CC0 <info name="release" value="20000718"/> <info name="alt_title" value="ワンダーウィッチ"/> <part name="cart" interface="wswan_cart"> - <dataarea name="rom" size="524288"> - <rom name="wonderwitch [freyaos 1.1.5].bin" size="524288" crc="45ba7287" sha1="905cca29fd6188b2c6237b1fb71e89d7b6a1f842" offset="000000" /> + <feature name="pcb" value="PTS-0101" /> + <feature name="u1" value="29DL400TC Flash" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="BANDAI 2003" /> + <feature name="u4" value="D442000LGU SRAM" /> + <feature name="slot" value="wwitch" /> + <feature name="rtc" value="yes" /> + <dataarea name="rom" size="524288" width="16" endianness="little"> + <rom name="wonderwitch [freyaos 1.1.5].u1" size="524288" crc="45ba7287" sha1="905cca29fd6188b2c6237b1fb71e89d7b6a1f842" offset="000000" /> + </dataarea> + <dataarea name="sram" size="262144" width="16" endianness="little"> </dataarea> </part> </software> @@ -1720,11 +2437,15 @@ license:CC0 <info name="release" value="200206??"/> <info name="alt_title" value="エックス カード オブ フェイト"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0132" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-banc2c.bin" size="4194304" crc="66b617d5" sha1="c1ab4e24f261615ca59f937b866fcf7047b67796" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="sd32m16e206d.u3" size="4194304" crc="66b617d5" sha1="c1ab4e24f261615ca59f937b866fcf7047b67796" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -1738,11 +2459,16 @@ license:CC0 <info name="release" value="20011220"/> <info name="alt_title" value="サイ リトル"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-banc1f.bin" size="2097152" crc="25e2ba75" sha1="97c29917a78918a6905fd61a1466971cfd2a33c6" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh256s186c.u3" size="2097152" crc="25e2ba75" sha1="97c29917a78918a6905fd61a1466971cfd2a33c6" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> diff --git a/hash/wswan.xml b/hash/wswan.xml index 512cac21c1d..dda6bcf55bb 100644 --- a/hash/wswan.xml +++ b/hash/wswan.xml @@ -2,6 +2,285 @@ <!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> <!-- license:CC0 + +This is a full list of known WonderSwan and WonderSwan Color games. ++===+=====+==========+============+=====+================================================================================================+ +| D | ROM | CRC | Serial | Rev | Name | ++===+=====+==========|============+=====+================================================================================================+ +| X | 001 | a1656bbb | SWJ-BAN010 | 0 | GunPey / グンペイ +| X | 002 | 5a41a7ba | SWJ-BAN004 | 0 | Puyo Puyo Tsuu / ぷよぷよ通 +| X | 003 | c2ed122e | SWJ-SUM001 | 1 | Mahjong Touryuumon / 麻雀 登龍門 +| X | 004 | 04531734 | SWL-KEX001 | 0 | Nobunaga no Yabou for WonderSwan / 信長の野望 for ワンダースワン +| X | 005 | b62e5dd0 | SWJ-TAT001 | 1 | Densha de Go! / 電車でGO! +| X | 006 | ab59de2e | SWJ-BAN005 | 1 | Digital Monster - Ver. WonderSwan / デジタルモンスター バージョン ワンダースワン +| X | 007 | 5b76f901 | SWJ-TMY001 | 1 | Shin Nihon Pro Wrestling Toukon Retsuden / 新日本プロレスリング 闘魂烈伝 +| X | 008 | 23bc0309 | SWJ-BAN003 | 0 | Wonder Stadium / ワンダースタジアム +| X | 009 | a607a350 | SWJ-BAN002 | 1 | Chocobo no Fushigi na Dungeon for WonderSwan / チョコボの不思議なダンジョン for ワンダースワン +| X | 010 | e385ee88 | SWJ-KEX002 | 0 | Sangokushi for WonderSwan / 三国志 for ワンダースワン +| X | 011 | 86b56511 | SWJ-CCJ001 | 0 | Umizuri ni Ikou! / 海釣りに行こう! +| X | 012 | a193458c | SWJ-JLC001 | 0 | Ganso Jajamaru-kun / 元祖じゃじゃ丸くん +| X | 013 | 1c489351 | SWJ-SUN001 | 0 | Shanghai Pocket / 上海 ポケット +| X | 014 | 00137e86 | SWJ-PAW001 | 2 | Goraku Ou Tango! / 語楽王 タンゴ ! +| X | 015 | b5dbcf12 | SWJ-SUM002 | 1 | Nice On / ナイスオン +| X | 016 | 324622c9 | SWJ-KNM001 | 0 | Beatmania for WonderSwan / ビートマニア for ワンダースワン +| X | 017 | ccaa4853 | SWJ-BAN002 | 2 | Chocobo no Fushigi na Dungeon for WonderSwan / チョコボの不思議なダンジョン for ワンダースワン +| | 018 | | | | likely SD Gundam - Emotional Jam (Rev 2), no proof yet +| X | 019 | 4c48624c | SWJ-BAN007 | 0 | Kosodate Quiz Dokodemo - My Angel / 子育てクイズ どこでもマイエンジェル +| X | 020 | 12fb8b28 | SWJ-MGA001 | 0 | Medarot Perfect Edition - Kabuto Version / メダロット パーフェクトエディション - カブトバージョン +| X | 021 | 2b40745d | SWJ-MGA002 | 0 | Medarot Perfect Edition - Kuwagata Version / メダロット パーフェクトエディション - クワガタバージョン +| X | 022 | 8d83014f | SWJ-SUN002 | 0 | Space Invaders / スペースインベーダー +| X | 023 | 8a8c5aa8 | SWJ-BPR001 | 0 | Super Robot Taisen Compact / スーパーロボット大戦 コンパクト +| X | 024 | 80c6ef12 | SWJ-BAN008 | 0 | Kaze no Klonoa - Moonlight Museum / 風のクロノアムーンライトミュージアム +| X | 025 | cccaf8a1 | SWJ-BAN009 | 0 | Last Stand / ラストスタンド +| X | 026 | ae83f873 | SWJ-BAN006 | 3 | SD Gundam - Emotional Jam / SDガンダム エモーショナルジャム +| X | 027 | aa53971d | SWJ-BAN002 | 3 | Chocobo no Fushigi na Dungeon for WonderSwan / チョコボの不思議なダンジョン for ワンダースワン +| X | 028 | e7e7fd4c | SWJ-SUM001 | 3 | Mahjong Touryuumon / 麻雀 登龍門 +| X | 029 | 7572e478 | SWJ-BPR001 | 1 | Super Robot Taisen Compact / スーパーロボット大戦 コンパクト +| X | 030 | e7c608e5 | SWJ-BAN00D | 0 | Tekken Card Challenge / 鉄拳カードチャレンジ +| X | 031 | 27b3cc18 | SWJ-BAN00B | 0 | Chaos Gear - Michibikareshi Mono / カオスギア 導かれし者 +| X | 032 | c283ec5f | SWJ-BTM001 | 1 | Trump Collection - Bottom-Up Teki Trump Seikatsu / トランプコレクション2 ボトムアップ的世界一周の旅 +| X | 033 | 425eb893 | SWJ-SUM004 | 0 | Anchorz Field / アンカーズ・フィールド +| X | 034 | 302499b9 | SWJ-SUN003 | 0 | Puzzle Bobble / パズルボブル +| X | 035 | 8fc9e145 | SWJ-BAN00C | 1 | Vaitz Blade / ヴァイツブレイド +| X | 036 | 44b3e67c | SWJ-KGT001 | 2 | Nihon Pro Mahjong Renmei Kounin Tetsuman / 日本プロ麻雀連盟公認 徹萬 +| X | 037 | 7021d54f | SWJ-BPR001 | 2 | Super Robot Taisen Compact / スーパーロボット大戦 コンパクト +| X | 038 | 0cb57376 | SWJ-NHB001 | 0 | Crazy Climber / クレイジー・クライマー +| X | 039 | 00b31fbb | SWJ-BAN011 | 0 | Makaimura for WonderSwan / 魔界村 for ワンダースワン +| X | 040 | bf8d9212 | SWJ-BAN00E | 0 | Neon Genesis Evangelion - Shito Ikusei / 新世紀エヴァンゲリオン シト育成 +| X | 041 | 53b9fef8 | SWJ-BAN015 | 0 | Kidou Senshi Gundam MSVS / 機動戦士ガンダム エムエスバーサス +| X | 042 | ef5b6b82 | SWJ-BAN014 | 0 | Terrors / テラーズ +| X | 043 | 92fbf7fb | SWJ-BAN012 | 0 | Meitantei Conan - Majutsushi no Chousenjou! / 名探偵コナン 魔術師の挑戦状! +| X | 044 | 1263da65 | SWJ-CCJ002 | 0 | Soccer Yarou! - Challenge the World / サッカーやろう! チャレンジ・ザ・ワールド +| X | 045 | 517f962e | SWJ-MDE001 | 0 | Keiba Yosou Shien Soft - Yosou Shinkaron / 競馬予想支援ソフト 予想進化論 +| X | 046 | 4d103236 | SWJ-BPR002 | 0 | Kakutou Ryouri Densetsu Bistro Recipe - Wonder Battle Hen / 格闘料理伝説 ビストロレシピ ワンダーバトル編 +| X | 047 | 90f7e6d6 | SWJ-ATN001 | 1 | Pro Mahjong Kiwame for WonderSwan / プロ麻雀 極 フォー ワンダースワン +| X | 048 | af9d8f42 | SWJ-CFT001 | 0 | Densha de Go! 2 / 電車でGO ! 2 +| X | 049 | 4e467626 | SWJ-NAP001 | 0 | Engacho! for WonderSwan / えんがちょ! for ワンダースワン +| X | 050 | e252919d | SWJ-BAN019 | 0 | Wonder Stadium '99 / ワンダースタジアム'99 +| X | 051 | 637ada93 | SWJ-DTE002 | 0 | Magical Drop for WonderSwan / マジカルドロップ for ワンダースワン +| X | 052 | aa525c04 | SWJ-SRV001 | 0 | Harobots / ハロボッツ +| X | 053 | 3ad194eb | SWJ-SUM005 | 0 | Shougi Touryuumon / 将棋 登龍門 +| X | 054 | 9baac7bb | SWJ-HAL002 | 1 | Mingle Magnet / ミングルマグネット +| X | 055 | cd206a9e | SWJ-BAN013 | 0 | Rockman & Forte - Mirai Kara no Chousensha / ロックマン&フォルテ 未来からの挑戦者 +| X | 056 | 0d5171f0 | SWJ-BAN017 | 0 | Turntablist - DJ Battle / タ→ンテ→ブリスト DJバトル +| X | 057 | ecfbcb1d | SWJ-BEC001 | 1 | Kyousouba Ikusei Simulation - Keiba / 競走馬育成シミュレーション ケイバ +| X | 058 | 3b4c60c6 | SWJ-KDX001 | 2 | Kiss Yori... - Seaside Serenade / キスより... ~シーサイドセレナーデ~ +| X | 059 | 4ed8820c | SWJ-BVL001 | 0 | Nazo Ou Pocket / 謎王 Pocket +| X | 060 | 04366d92 | SWJ-SUM003 | 0 | Armored Unit / アーマードユニット +| X | 061 | 7f3a14c0 | SWJ-BAN01A | 0 | Cardcaptor Sakura - Sakura to Fushigi na Clow Card / カードキャプターさくら ~さくらとふしぎなクロウカード~ +| X | 062 | b25a0635 | SWJ-BAN01B | 0 | Buffers Evolution / バッファーズエボリューション +| X | 063 | 8655269e | SWJ-DTE001 | 0 | Side Pocket for WonderSwan / サイドポケット for ワンダースワン +| X | 064 | 56e2c069 | SWJ-KBS002 | 3 | Chou Denki Card Game - Youfu Makai - Kikuchi Shuukou / 超伝奇カードバトル 妖符魔界 菊地秀行 +| X | 065 | 4e8909d1 | SWJ-KGT002 | 1 | Clock Tower for WonderSwan / クロックタワー フォー ワンダースワン +| X | 066 | fc6946f0 | SWJ-BAN01C | 0 | Digimon Adventure - Anode Tamer / デジモンアドベンチャー アノードテイマー +| X | 067 | 42ad238b | SWJ-BAN01D | 0 | Digimon Adventure - Cathode Tamer / デジモンアドベンチャー カソードテイマー +| X | 068 | a5643aa3 | SWJ-BAN01F | 0 | Tare Panda no GunPey / たれぱんだのぐんぺい +| X | 069 | 8922dd0b | SWJ-BEC002 | 0 | Fever - Sankyo Koushiki Pachinko Simulation for WonderSwan / フィーバー サンキョー 公式パチンコシミュレーション フォー ワンダースワン +| X | 070 | d675c265 | SWJ-YKE001 | 0 | Morita Shougi for WonderSwan / 森田将棋 フォー ワンダースワン +| X | 071 | f016dfe1 | SWJ-BVL002 | 1 | Sotsugyou for WonderSwan / 卒業 フォー ワンダースワン +| X | 072 | 6f304dca | SWJ-MGH001 | 0 | Tetsujin 28 Gou / 鉄人28号 +| X | 073 | b1caec06 | SWJ-BAN01E | 0 | Tane o Maku Tori / たねをまく鳥 / boxart: D'sGarage21公募ゲーム たねをまく鳥 +| X | 074 | 631bd97a | SWJ-SUN004 | 0 | O-chan no Oekaki Logic / おーちゃんのお絵かきロジック +| X | 075 | 89e7d950 | SWJ-BEC003 | 0 | Dokodemo Hamster / どこでもハムスター +| X | 076 | 392dd813 | SWJ-KGT003 | 0 | Bakusou Dekotora Densetsu for WonderSwan / 爆走デコトラ伝説 フォー ワンダースワン +| X | 077 | 21eb4c59 | SWJ-BAN020 | 0 | SD Gundam Gashapon Senki - Episode 1 / SD ガンダム ガシャポン戦記 -エピソード1- +| X | 078 | 21eb4c59 | SWJ-BAN020 | 0 | SD Gundam Gashapon Senki - Episode 1 / SD ガンダム ガシャポン戦記 -エピソード1- +| X | 079 | f75ce82c | SWJ-SRV001 | 1 | Harobots / ハロボッツ +| X | 080 | a9f11523 | SWJ-SUM006 | 0 | Gomoku Narabe & Reversi - Touryuumon / 五目並べ&リバーシ 登龍門 +| X | 081 | 4b22270d | SWJ-KGT005 | 0 | Hanafuda Shiyouyo / 花札しようよ +| X | 082 | 812020ef | SWJ-OMM001 | 4 | Uzumaki - Denshi Kaiki Hen / うずまき ~電視怪奇篇~ +| X | 083 | 7fff2520 | SWJ-BAN023 | 4 | Chou Aniki - Otoko no Tamafuda / 超兄貴 男の魂札 +| X | 084 | 50b7a742 | SWJ-KGT004 | 0 | Taikyoku Igo - Heisei Kiin / 対局囲碁 平成棋院 +| X | 085 | 8b74f59a | SWJ-BVL003 | 1 | Tanjou Debut for WonderSwan / 誕生 デビュー フォー ワンダースワン +| X | 086 | a1fb16fc | SWJ-BEC004 | 0 | Fishing Freaks - Bass Rise for WonderSwan / フィッシングフリークス バスライズ フォー ワンダースワン +| X | 087 | 07a3dd46 | SWJ-BAN022 | 0 | Senkaiden - TV Animation Senkaiden Houshin Engi Yori / 仙界伝 ~TVアニメーション仙界伝封神演義より~ +| X | 088 | 9e0854e2 | SWJ-BAN024 | 1 | Langrisser Millennium WS - The Last Century / ラングリッサーミレニアム WS ~The LastCentury~ +| X | 089 | a3ead689 | SWJ-KGT006 | 0 | Metakomi Theraphy - Nee Kiite! / メタコミセラピー ねぇ聞いて! +| X | 090 | ca3f0b00 | SWJ-OMM002 | 0 | Itou Junji Uzumaki - Noroi Simulation / うずまき 呪いシミュレーション +| | 091 | | | | +| X | 092 | 301436ac | SWJ-BAN025 | 0 | Sennou Millennium / 線脳 ミレニアム +| X | 093 | 62d419cd | SWJ-LAY001 | 0 | Macross - True Love Song / 超時空要塞マクロス トゥルーラブソング +| X | 094 | ce2f1a1d | SWJ-BAN026 | 0 | Final Lap 2000 / ファイナルラップ2000 +| X | 095 | eb995e86 | SWJ-JLC002 | 0 | Moero!! Pro Yakyuu Rookies / 燃えろ!!プロ野球 ルーキーズ +| X | 096 | 440b2630 | SWJ-KEX004 | 0 | Sangokushi II for WonderSwan / 三国志II フォー ワンダースワン +| X | 097 | 6e9dd148 | SWJ-BAN01C | 1 | Digimon Adventure - Anode Tamer / デジモンアドベンチャー アノードテイマー +| X | 098 | 782877bc | SWJ-BPR003 | 0 | Super Robot Taisen Compact 2 - Dai-1-bu - Chijou Gekidou Hen / スーパーロボット大戦 コンパクト2 第1部:地上激闘篇 +| X | 099 | 21279e82 | SWJ-BPR004 | 0 | Lode Runner for WonderSwan / ロードランナー フォー ワンダースワン +| X | 100 | 1860b655 | SWJ-BAN028 | 0 | Wasabi Produce - Street Dancer / ワサビ プロデュース ストリートダンサー +| X | 101 | 35361250 | SWJ-BAN00A | 0 | Pocket Fighter / ポケットファイター +| X | 102 | 352a570d | SWJ-BAN029 | 0 | Slither Link / スリザーリンク +| X | 103 | 7da6acb9 | SWJ-BPR005 | 0 | Time Bokan Series - Bokan Densetsu - Butamo Odaterya Doronbou / タイム ボカン シリーズ ボカン伝説 ブタもおだてりゃドロンボー +| X | 104 | 64aaf392 | SWJ-BTM002 | 1 | Trump Collection 2 - Bottom-Up Teki Sekaiisshuu no Tabi / トランプコレクション ボトムアップ的トランプ生活 +| X | 105 | bd6fc68a | SWJ-BAN02A | 1 | Hunter X Hunter - Ishi o Tsugu Mono / ハンター×ハンター 意志を継ぐ者 +| | 106 | | | | +| X | 107 | b5e675ae | SWJ-BAN02C | 0 | Digital Partner / デジモンアドベンチャー02 デジタルパートナー +| | | | SWJ-BAN02F | | / +| X | 108 | 4aed3911 | SWJ-KGT008 | 0 | Glocal Hexcite / グローカルヘキサイト +| X | 109 | 80de367d | SWJ-SCC001 | 1 | MobileWonderGate +| X | 110 | 8f8608ad | SWJ-MGH003 \ 0 | Rainbow Islands - Putty's Party / レインボーアイランド パティーズ☆パーティ! +| X | 111 | e4eb3ab1 | SWJ-BAN030 | 0 | SD Gundam G-Generation - Gather Beat / SDガンダム Gジェネレーション ギャザービート +| X | 112 | f2e362b8 | SWJ-BAN02B | 0 | From TV Animation One Piece - Mezase Kaizoku Ou! / フロムテレビアニメーション ワンピース めざせ海賊王! +| X | 113 | e226863b | SWJ-BAN027 | 0 | Meitantei Conan - Nishi no Meitantei Saidai no Kiki! / 名探偵コナン 西の名探偵 最大の危機!? +| | 114 | | SWJ-KDK001 | 0 | Ring Infinity / リング インフィニティ +| | 115 | | SWJ-KDK001 | | / (cartridge contains 2 roms, combined contents same as 119) +| X | 116 | 70aa800e | SWJ-BAN02A | 2 | Hunter X Hunter - Ishi o Tsugu Mono / ハンター×ハンター 意志を継ぐ者 +| X | 117 | 56ce1bc5 | SWJ-BAN032 | 0 | Digimon Adventure 02 - Tag Tamers / デジモンアドベンチャー02 タッグテイマーズ +| X | 118 | 6adf0e32 | SWJ-BAN033 | 0 | Wonder Borg Robot Works / ワンダーボーグ 完 +| X | 119 | 14adbd4b | SWJ-KDK001 | 0 | Ring Infinity / リング インフィニティ +| X | 120 | f246a68e | SWJ-KGT007 | 5 | Fire Pro Wrestling for WonderSwan / ファイヤープロレスリング フォー ワンダースワン +| | 121 | | | | +| | 122 | | | | +| X | 123 | 7a29e9a6 | SWJ-SQR004 | 0 | Hataraku Chocobo / はたらくチョコボ +| X | 124 | ecbb46de | SWJ-BPR006 | 4 | Super Robot Taisen Compact 2 - Dai-2-bu - Uchuu Gekishin Hen / スーパーロボット大戦 コンパクト2 第2部:宇宙激震篇 +| X | 125 | 91117d1b | SWJ-AAE001 | 0 | Tokyo Majin Gakuen - Fuju Houroku / 東京魔人学園 符咒封録 +| X | 126 | 6ededaf8 | SWJ-BAN032 | 1 | Digimon Adventure 02 - Tag Tamers / デジモンアドベンチャー02 タッグテイマーズ +| X | 127 | be6be690 | SWJ-BAN033 | 1 | Robot Works (Asia) / ワンダーボーグ 完 +| X | 128 | 9bd8f08c | SWJ-BANC05 | 0 | Terrors 2 / テラーズ2 +| X | 129 | b7243e88 | SWJ-SQRC01 | 0 | Final Fantasy / ファイナルファンタジー +| X | 130 | 0e467d97 | SWJ-KGTC09 | 1 | Sorobang / そろばんぐ +| X | 131 | 0c9cb12c | SWJ-BANC02 | 0 | GunPey EX / グンペイEX +| X | 132 | 60706555 | SWJ-BANC01 | 0 | Rhyme Rider Kerorican / ライムライダー ケロリカン +| X | 133 | d7a0ab74 | SWJ-OMMC03 | 0 | Another Heaven - Memory of those Days / アナザヘヴン ~memory of those days~ +| X | 134 | 93e19f13 | SWJ-BECC01 | 2 | Dokodemo Hamster 3 - Odekake Saffron / どこでもハムスター3 おでかけサフラン +| X | 135 | 4d28637e | SWJ-BANC03 | 0 | Digimon Adventure 02 - D1 Tamers / デジモンアドベンチャー02 ディーワンテイマーズ +| X | 136 | 12f10b27 | SWJ-BANC06 | 0 | Wonder Classic / ナムコワンダークラシック +| X | 137 | 9f35d00f | SWJ-BANC04 | 0 | Senkaiden Ni - TV Animation Senkaiden Houshin Engi Yori / 仙界伝 弐~TVアニメーション仙界伝封神演義より~ +| X | 138 | 0b0f8981 | SWJ-BPR007 | 2 | Super Robot Taisen Compact 2 - Dai-3-bu - Ginga Kessen Hen / スーパーロボット大戦 コンパクト2 第3部:銀河決戦篇 +| X | 139 | e14e9d36 | SWJ-SHLC01 | 0 | With You - Mitsumete Itai / ウィズ・ユー ~みつめていたい~ +| X | 140 | 69d8d433 | SWJ-KBSC01 | 0 | Flash Koibito-kun / フラッシュ 恋人クン +| X | 141 | 94ea6ffc | SWJ-BAN001 | 0 | Digimon - Ver. WonderSwan (Asia) +| X | 142 | 08c0247b \ SWJ-BANC07 | 0 | Kidou Senshi Gundam Vol. 1 - Side 7 / 機動戦士ガンダム Vol.1 サイドセブン +| X | 143 | 62f4e4b4 | SWJ-BANC03 | 1 | Digimon Adventure 02 - D1 Tamers / デジモンアドベンチャー02 ディーワンテイマーズ +| X | 144 | 9750bc2a | SWJ-SUMC07 | 0 | Guilty Gear Petit / ギルティギア プチ +| X | 145 | 5793bdda | SWJ-BANC09 | 0 | Uchuu Senkan Yamato / 宇宙戦艦ヤマト +| X | 146 | d9401f0a | SWJ-SQRC04 | 0 | Wild Card / ワイルドカード +| X | 147 | 8e123373 | SWJ-KDKC01 | 0 | Memories Off - Festa / メモリーズオフ フェスタ +| X | 148 | 15e55706 | SWJ-BANC0C | 0 | Wizardry Scenario 1 - Proving Grounds of the Mad Overlord / ウィザードリィ シナリオ1 狂王の試練場 +| X | 149 | c60e5162 | SWJ-BANC0A | 0 | SD Gundam Eiyuu Den - Kishi Densetsu / SDガンダム英雄伝 ~騎士伝説~ +| X | 150 | 18ecffb8 | SWJ-BANC0B | 0 | SD Gundam Eiyuu Den - Musha Densetsu / SDガンダム英雄伝 ~武者伝説~ +| X | 151 | 12ae932c | SWJ-BANC08 | 0 | Dark Eyes - Battle Gate / バトルゲート ダークアイズ +| X | 152 | 5555d95c | SWJ-NMCC01 | 0 | Mr. Driller / ミスタードリラー +| X | 153 | 9f6e3f8d | SWJ-BANC0E | 0 | Meitantei Conan - Yuugure no Koujo / 名探偵コナン ~夕暮れの皇女~ +| X | 154 | d75effc2 \ SWJ-KBSC02 | 0 | Mikeneko Holmes - Ghost Panic / サウンドコミック - 三毛猫ホームズ ゴーストパニック +| X | 155 | d0b20c5a | SWJ-BANC0F | 0 | Hunter X Hunter - Sorezore no Ketsui / ハンター×ハンター ~それぞれの決意~ +| X | 156 | 2b61bb2b | SWJ-BANC0D | 0 | Pocket no Naka no Doraemon / ポケットの中の ドラえもん +| X | 157 | fe4ff701 | SWJ-BANC10 | 0 | Raku Jongg / 落雀 +| | 158 | | | | +| X | 159 | 4d21a347 | SWJ-BANC12 | 0 | SD Gundam G-Generation - Gather Beat 2 / SDガンダム Gジェネレーション ギャザービート2 +| X | 160 | f09e752f | SWJ-SQRC02 | 0 | Final Fantasy II / ファイナルファンタジーII +| X | 161 | 274719f5 | SWJ-TMCC01 | 1 | Kurupara! / くるパラ! +| X | 162 | 446e2581 | SWJ-SESC01 | 2 | Gensou Maden Saiyuuki Retribution - Hi no Ataru Basho de / 幻想魔伝最遊記 Retribution ~陽のあたる場所で~ +| X | 163 | de2208ab | SWJ-BANC11 | 0 | Ultraman - Hikari no Kuni no Shisha / ウルトラマン 光の国の使者 +| X | 164 | 99027238 | SWJ-SQRC05 | 0 | Blue Wing Blitz / ブルー ウイング ブリッツ +| X | 165 | 47659b2c | SWJ-BANC13 | 0 | Tonpuusou / 東風荘 +| X | 166 | fa92418d | SWJ-BANC14 | 0 | Digimon Tamers - Digimon Medley / デジモンテイマーズ デジモンメドレー +| X | 167 | da4479bf | SWJ-BANC15 | 0 | Last Alive / ラストアライブ +| X | 168 | 9874e9a2 | | 0 | Star Hearts - Hoshi to Daichi no Shisha - Taikenban / スターハーツ ~星と大地の使者~ +| | 169 | | | | +| X | 170 | 138d1018 | SWJ-BANC16 | 0 | Star Hearts - Hoshi to Daichi no Shisha / スターハーツ ~星と大地の使者~ +| X | 171 | 39a1391a | SWJ-BANC17 | 0 | Kidou Senshi Gundam Vol. 2 - Jaburo / 機動戦士ガンダム Vol.2 ジャブロー +| X | 172 | 9402bca9 | SWJ-BANC18 | 0 | Hunter X Hunter - Michibikareshi Mono / ハンター×ハンター 導かれし者 +| X | 173 | 84a46949 | SWJ-BANC14 | 0 | Digimon Tamers - Digimon Medley / デジモンテイマーズ デジモンメドレー +| | 174 | | | | +| X | 175 | 77689273 \ SWJ-BAN001 | 0 | Digimon - Anode Tamer & Cathode Tamer +| | 176 | | | | +| X | 177 | d7a12bd5 | SWJ-SUMC08 | 0 | Guilty Gear Petit 2 / ギルティギア プチ2 +| X | 178 | 427056c4 | SWJ-BANC19 | 0 | From TV Animation One Piece - Niji no Shima Densetsu / フロムテレビアニメーション ワンピース 虹の島伝説 +| X | 179 | c927bfcb | SWJ-BANC1A | 0 | Digimon Tamers - Battle Spirit / デジモンテイマーズ バトルスピリット +| | | | SWJ-BANC24 | | / +| | 180 | | | | Digimon Tamers - Battle Spirit / デジモンテイマーズ バトルスピリット prototype? +| | 181 | | | | +| X | 182 | b18cdc0d | SWJ-HTRC01 | 0 | Alchemist Marie & Elie - Futari no Atelier / マリー&エリー ~ふたりのアトリエ~ +| X | 183 | 0c23d551 | SWJ-BANC1B | 0 | Inuyasha - Kagome no Sengoku Nikki / 犬夜叉 かごめの戦国日記 +| X | 184 | b07e6a56 | SWJ-BANC23 | 0 | Final Lap Special - GT & Formula Machine / ファイナルラップスペシャル +| X | 185 | 16e0d929 | SWJ-BPRC08 | 0 | Super Robot Taisen Compact for WonderSwan Color / フォー ワンダースワンカラーコンパクト スーパーロボット大戦 +| X | 186 | 25e2ba75 | SWJ-BANC1F | 0 | XI[sai] Little / サイ リトル +| X | 187 | 9c98d97d | SWJ-SQRC07 | 0 | Romancing Sa-Ga / ロマンシング サ・ガ +| | 188 | | | | +| | 189 | | | | +| X | 190 | 205503c3 | SWJ-BANC1E | 0 | From TV Animation One Piece - Treasure Wars / フロムテレビアニメーション ワンピース トレジャーウォーズ +| X | 191 | f1f4d41f | SWJ-BANC1D | 1 | Digimon Tamers - Brave Tamer / デジモンテイマーズ ブレイブテイマー +| | 192 | | | | +| X | 193 | 15c4552e | SWJ-DDJC01 | 0 | RUN=DIM - Return to Earth / ランディム Return To Earth +| X | 194 | f0acda5c | SWJ-BANC21 | 0 | SD Gundam - Operation U.C. / SDガンダム オペレーション U.C. +| X | 195 | 31e09bed | SWJ-SQRC06 | 1 | Hanjuku Hero - Ah, Sekai yo Hanjuku Nare...!! / はんじゅくヒーロー半熟英雄 ああ、世界よ半熟なれ...!! +| X | 196 | bc944a98 | SWJ-BANC2B | 0 | Golden Axe +| X | 197 | 462f9275 | SWJ-BANC20 | 0 | Kinnikuman IIsei - Dream Tag Match / キン肉マンII世 ドリームタッグマッチ +| X | 198 | 3df3e34c | SWJ-BANC1E | 1 | From TV Animation One Piece - Treasure Wars / From TV Animation One Piece - Treasure Wars +| X | 199 | 1b6f5f30 | SWJ-SQRC08 | 0 | Makai Toushi Sa-Ga / 魔界塔士 サ・ガ +| X | 200 | f699d6d1 | SWJ-SQRC09 | 0 | Final Fantasy IV / ファイナルファンタジーIV +| X | 201 | 6caad4a2 | SWJ-BANC30 | 0 | Digimon Tamers - Battle Spirit Ver. 1.5 / デジモンテイマーズ バトルスピリット Ver.1.5 +| X | 202 | 7b0caea9 | SWJ-VGDC01 | 0 | Tetris / テトリス +| X | 203 | 1e760c41 | SWJ-BANC22 | 2 | Digital Monster Card Game - Ver. WonderSwan Color / デジタルモンスター カードゲーム バージョン ワンダースワンカラー +| X | 204 | a9f5bf54 | SWJ-BANC25 | 0 | Kidou Senshi Gundam Vol. 3 - A Baoa Qu / 機動戦士ガンダム Vol.3 ア・バオア・クー +| X | 205 | af24f95c | SWJ-MGTC01 | 0 | Gransta Chronicle / グランスタ クロニクル +| X | 206 | 66b617d5 | SWJ-BANC2C | 0 | X - Card of Fate / エックス カード オブ フェイト +| X | 207 | 2460b45a | SWJ-BANC27 | 0 | Riviera - Yakusoku no Chi Riviera / Riviera ~約束の地 リヴィエラ~ +| X | 208 | e2317345 | SWJ-BANC2A | 0 | Arc the Lad - Kishin Fukkatsu / アークザラッド 機神復活 +| X | 209 | f8a1dd2b | SWJ-BANC29 | 0 | From TV Animation One Piece - Grand Battle Swan Colosseum / フロムテレビアニメーション ワンピース グランドバトル スワンコロシアム +| | 210 | 23853305 | SWC-BANC29 | 0 | Sample edition for From TV Animation One Piece - Grand Battle Swan Colosseum / フロムテレビアニメーション ワンピース グランドバトル スワンコロシアム +| X | 211 | 2f9e2560 \ SWJ-SQRC10 | 0 | Front Mission / フロントミッション +| X | 212 | 3ff5791f | SWJ-BANC26 | 0 | Inuyasha - Fuuun Emaki / 犬夜叉 風雲絵巻 +| X | 213 | faaefbcb | SWJ-BANC2E | 0 | Digital Monster - D-Project / デジタルモンスター ディープロジェクト +| X | 214 | 8a8b827c | SWJ-WIZC01 | 0 | Gekitou! Crash Gear Turbo - Gear Champion League / 激闘! クラッシュギア ターボギアチャンピオンリーグ +| X | 215 | 6c029674 | SWJ-BANC2D | 0 | Shaman King - Asu e no Ishi / シャーマンキング 未来への意志 +| X | 216 | 2460b45a?| SWJ-BANC27 | 1 | Riviera - Yakusoku no Chi Riviera +| | 216 | 62CB398B?| SWJ-BANC27 | 1 | Riviera - Yakusoku no Chi Riviera +| | 217 | 0E40829C | SWJ-BANC2E | 2 | Digital Monster - D-Project / デジタルモンスター ディープロジェクト +| X | 218 | 6aca1f04 | SWJ-BANC2F | 0 | SD Gundam G-Generation - Mono-Eye Gundams / SDガンダム ジージェネレーション モノアイガンダムズ +| X | 219 | 34908cb4 | SWJ-BANC2D | 1 | Shaman King - Asu e no Ishi / シャーマンキング 未来への意志 +| X | 220 | 8ce4652f | SWJ-BANC28 | 0 | Namco Super Wars / ナムコスーパーウォーズ +| X | 221 | 44453234 | SWJ-BANC32 | 0 | Inuyasha - Kagome no Yume Nikki / 犬夜叉 かごめの夢日記 +| | 222 | A28D3DC5 | SWJ-BANC31 | 0 | Battle Spirit - Digimon Frontier / バトルスピリット デジモンフロンティア +| | 223 | | | | +| X | 224 | 8ba49dab | SWJ-BANC31 | 1 | Battle Spirit - Digimon Frontier / バトルスピリット デジモンフロンティア +| X | 225 | 0d1048f0 | SWJ-BANC33 | 0 | From TV Animation One Piece - Treasure Wars 2 - Buggy Land e Youkoso / フロムテレビアニメーション ワンピース トレジャーウォーズ2 バギーランドへようこそ +| | 226 | A3ECC9AC | SWJ-BANC2F | 2 | SD Gundam G-Generation - Mono-Eye Gundams / SDガンダム ジージェネレーション モノアイガンダムズ +| X | 227 | 6142fd9d | SWJ-BANC34 | 0 | Kinnikuman IIsei - Choujin Seisenshi / キン肉マンII世 超人聖戦史 +| X | 228 | 658c4b98 | SWJ-BANC35 | 0 | Rockman EXE WS / ロックマンエグゼ ワンダースワン +| X | 229 | bce15137 | SWJ-BANC36 | 0 | Kidou Senshi Gundam Seed / 機動戦士ガンダム シード +| X | 230 | 71556e6a | SWJ-BANC38 | 0 | Naruto - Konoha Ninpouchou / Naruto ナルト- 木ノ葉忍法帖 +| X | 231 | a487b7a8 | SWJ-BANC39 | 0 | Hunter X Hunter - Greed Island / ハンター×ハンター グリードアイランド +| X | 232 | d4061551 | SWJ-BANC3A | 0 | Kidou Senshi Gundam - Giren no Yabou - Tokubetsu Hen - Aoki Hoshi no Hasha / 機動戦士ガンダム ギレンの野望 特別編 蒼き星の覇者 +| X | 233 | 130af567 | SWJ-BANC39 | 1 | Hunter X Hunter - Greed Island / ハンター×ハンター グリードアイランド +| X | 234 | 6918c824 | SWJ-BPRC09 | 5 | Super Robot Taisen Compact 3 / スーパーロボット大戦 コンパクト3 +| X | 235 | 1f10ca75 | SWJ-CPCC01 | 1 | Rockman EXE - N1 Battle / ロックマンエグゼ N1バトル +| X | 236 | 6e8a792d | SWJ-BANC3D | 0 | Saint Seiya - Ougon Densetsu Hen - Perfect Edition / 聖闘士星矢 黄金伝説編 パーフェクトエディション +| X | 237 | 188ca644 | SWJ-BPRC09 | 6 | Super Robot Taisen Compact 3 / スーパーロボット大戦 コンパクト3 +| X | 238 | 8e120b5a | SWJ-BANC3B | 0 | From TV Animation One Piece - Chopper no Daibouken / フロムテレビアニメーション ワンピース チョッパーの大冒険 +| X | 239 | 067238d1 | SWJ-BANC3C | 0 | Dragon Ball / ドラゴンボール +| X | n/a | 2ab9852d | SWJ-BAN00F | 1 | Keitai Gyogun Tanchiki - WonderSwan Handy Sonar / 携帯魚群探知機 ワンダースワン ハンディーソナー +| X | n/a | d4188811 | SWJ-BAN00F | 2 | Keitai Gyogun Tanchiki - WonderSwan Handy Sonar / 携帯魚群探知機 ワンダースワン ハンディーソナー +| X | ??? | bd83b82d | SWJ-BANC2E | 1 | Digital Monster - D-Project / デジタルモンスター ディープロジェクト +| X | n/a | 1887389c | WWGP2002B | 80 | Dicing Knight. / だいしんぐないと・ピリオド +| X | n/a | 85c4c9a1 | WWGP2001A3 | 80 | Judgement Silversword - Rebirth Edition (Rev. SC21) +| X | m/a | 60191872 | | 80 | Judgement Silversword - Rebirth Edition (Rev. 4321) +| | n/a | 7e03e8da | | 1 | Digimon Adventure Campaign Limited Version / デジモンアドベンチャー キャンペーン限定バージョン +| | | f366172e | MM-280 | 0 | mama Mitte' + + +Dumped but not available: +- a28d3dc5 Battle Spirit - Digimon Frontier (Rev 0) +- 0e40829c Digital Monster - D-Project (Rev 2) +- 23853305 From TV Animation One Piece - Grand Battle Swan Colosseum Sample Edition +- a3ecc9ac SD Gundam G-Generation - Mono-Eye Gundams (Rev 2) + + +Other missing: +2001/08/03 TENORI-ON +2003/07/19 Dicing knight +2004/02/05 Judgement Silversword - Rebirth Edition = rev 4321? +2004/04/26 Judgement Silversword - Rebirth Edition = rev 4321? + + +Notes: + +mama Mitte' saves data on the flash rom so this can cause each dump to be different. +After manually clearing the save area the CRC becomes the one listed in here. The +game will boot up and start to initialize the save area. + +The GIZA chip used on a lot of cartridges is a sram voltage switch. + --> <softwarelist name="wswan" description="Bandai Wonderswan cartridges"> @@ -13,11 +292,16 @@ license:CC0 <info name="release" value="19990624"/> <info name="alt_title" value="アンカーズ・フィールド"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-sum004.bin" size="1048576" crc="425eb893" sha1="06447c248afce04c4f4a1c3b5f7a4ab6f383c94b" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s033a.u3" size="1048576" crc="425eb893" sha1="06447c248afce04c4f4a1c3b5f7a4ab6f383c94b" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> @@ -30,11 +314,16 @@ license:CC0 <info name="release" value="19991118"/> <info name="alt_title" value="アーマードユニット"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="524288"> - <rom name="swj-sum003.bin" size="524288" crc="c11639af" sha1="ae5e4f06f07fe13a48f414a1cd437a816e9ad2e7" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s060a.u3" size="1048576" crc="04366d92" sha1="1578669c1fcf59ab5f5e603c6a65121d7ae209b1" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> @@ -47,11 +336,16 @@ license:CC0 <info name="release" value="19991229"/> <info name="alt_title" value="爆走デコトラ伝説 フォー ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="LP62S256AV SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-kgt003.bin" size="2097152" crc="392dd813" sha1="821bb81917445b63ac663c706ab4ce27de28543f" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s076a.u3" size="2097152" crc="392dd813" sha1="821bb81917445b63ac663c706ab4ce27de28543f" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> @@ -64,12 +358,16 @@ license:CC0 <info name="release" value="19990428"/> <info name="alt_title" value="ビートマニア for ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0016" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="16777216"> - <rom name="swj-knm001.bin" size="16777216" crc="324622c9" sha1="544e76133fa53fc0ae5e00e3465b9cf634f14fd0" offset="000000" /> + <dataarea name="rom" size="16777216" width="16" endianness="little"> + <rom name="mh128m256s016a.u3" size="16777216" crc="324622c9" sha1="544e76133fa53fc0ae5e00e3465b9cf634f14fd0" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -82,11 +380,15 @@ license:CC0 <info name="release" value="19991209"/> <info name="alt_title" value="バッファーズエボリューション"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0032B" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-ban01b.bin" size="4194304" crc="b25a0635" sha1="35eea568f756bacf533bb9aaad7e3239ba00e411" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e062a.u3" size="4194304" crc="b25a0635" sha1="35eea568f756bacf533bb9aaad7e3239ba00e411" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -99,15 +401,18 @@ license:CC0 <info name="release" value="19990729"/> <info name="alt_title" value="クレイジー・クライマー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_rom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="524288"> - <rom name="swj-nhb001.bin" size="524288" crc="c995274b" sha1="67a80b7fb00c3afe0ce9b0f8975c6d250a2cd49d" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m0e038a.u3" size="1048576" crc="0cb57376" sha1="a88882426bf435416616191902a26b2b066f2491" offset="000000" /> </dataarea> </part> </software> - <software name="ccsakura" supported="partial"> <!-- freezes if you don't press Start immediately --> + <software name="ccsakura"> <description>Cardcaptor Sakura - Sakura to Fushigi na Clow Card</description> <year>1999</year> <publisher>Bandai</publisher> @@ -115,11 +420,16 @@ license:CC0 <info name="release" value="19991202"/> <info name="alt_title" value="カードキャプターさくら ~さくらとふしぎなクロウカード~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban01a.bin" size="2097152" crc="7f3a14c0" sha1="39e9a897b681b2c326b052827d7c534f22290286" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s061a.u3" size="2097152" crc="7f3a14c0" sha1="39e9a897b681b2c326b052827d7c534f22290286" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -132,33 +442,88 @@ license:CC0 <info name="release" value="19990610"/> <info name="alt_title" value="カオスギア 導かれし者"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban00b.bin" size="2097152" crc="27b3cc18" sha1="e212bba4fac51bbfcf440966da0e67b1686dcfc5" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s031a.u3" size="2097152" crc="27b3cc18" sha1="e212bba4fac51bbfcf440966da0e67b1686dcfc5" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="chocodng"> - <description>Chocobo no Fushigi na Dungeon for WonderSwan</description> + <description>Chocobo no Fushigi na Dungeon for WonderSwan (Rev 3)</description> + <year>1999</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BAN002"/> + <info name="release" value="19990304"/> + <info name="alt_title" value="チョコボの不思議なダンジョン for ワンダースワン"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s027a.u3" size="2097152" crc="aa53971d" sha1="f7a65e95a8e97f35ec2419897ad96af1e1d49676" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="chocodnga" cloneof="chocodng"> + <description>Chocobo no Fushigi na Dungeon for WonderSwan (Rev 2)</description> <year>1999</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BAN002"/> <info name="release" value="19990304"/> <info name="alt_title" value="チョコボの不思議なダンジョン for ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban002.bin" size="2097152" crc="ccaa4853" sha1="3b62fd2841602f1077270848ab7a3aad58712ee9" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s017a.u3" size="2097152" crc="ccaa4853" sha1="3b62fd2841602f1077270848ab7a3aad58712ee9" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="chocodngb" cloneof="chocodng"> + <description>Chocobo no Fushigi na Dungeon for WonderSwan (Rev 1)</description> + <year>1999</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BAN002"/> + <info name="release" value="19990304"/> + <info name="alt_title" value="チョコボの不思議なダンジョン for ワンダースワン"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="UM62S256AV SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s009a.u3" size="2097152" crc="a607a350" sha1="a8c4f423429a8683cfebd05370ea122613349033" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="choaniki"> + <!-- Rev 4 --> <description>Chou Aniki - Otoko no Tamafuda</description> <year>2000</year> <publisher>Bandai</publisher> @@ -166,16 +531,22 @@ license:CC0 <info name="release" value="20000210"/> <info name="alt_title" value="超兄貴 男の魂札"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban023.bin" size="1048576" crc="7fff2520" sha1="eb538b82c5516fae8ce38778e41fb118aa5c830f" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s083a.u3" size="1048576" crc="7fff2520" sha1="eb538b82c5516fae8ce38778e41fb118aa5c830f" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> - <software name="youfumak"> <!-- needs initialized SRAM? --> + <software name="youfumak"> + <!-- Rev 3 --> <description>Chou Denki Card Game - Youfu Makai - Kikuchi Shuukou</description> <year>1999</year> <publisher>Kobunsha</publisher> @@ -183,16 +554,22 @@ license:CC0 <info name="release" value="19991216"/> <info name="alt_title" value="超伝奇カードバトル 妖符魔界 菊地秀行"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-kbs002.bin" size="2097152" crc="56e2c069" sha1="c4436a59fd830ba6af2d63462f71e1ab1cfa3212" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s064a.u3" size="2097152" crc="56e2c069" sha1="c4436a59fd830ba6af2d63462f71e1ab1cfa3212" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> - <software name="clocktow" supported="no"> <!-- freezes short after starting a game --> + <software name="clocktow"> + <!-- Rev 1 --> <description>Clock Tower for WonderSwan</description> <year>1999</year> <publisher>Kaga Tech</publisher> @@ -200,11 +577,16 @@ license:CC0 <info name="release" value="19991209"/> <info name="alt_title" value="クロックタワー フォー ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-kgt002.bin" size="2097152" crc="a9936941" sha1="4ba44f23d3b43ee730ce34d56f4cadaf429b6d1b" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s065a.u3" size="4194304" crc="4e8909d1" sha1="db9b3308336b59aeff7bd173d687953a37739381" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -217,14 +599,19 @@ license:CC0 <info name="release" value="19991007"/> <info name="alt_title" value="電車でGO ! 2"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_rom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-cft001.bin" size="4194304" crc="af9d8f42" sha1="c07f776ac4374b648d1a49efd9d6fcd0db2ac1fa" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m0e048a.u3" size="4194304" crc="af9d8f42" sha1="c07f776ac4374b648d1a49efd9d6fcd0db2ac1fa" offset="000000" /> </dataarea> </part> </software> <software name="dendego"> + <!-- Rev 1 --> <description>Densha de Go!</description> <year>1999</year> <publisher>Taito</publisher> @@ -232,43 +619,101 @@ license:CC0 <info name="release" value="19990304"/> <info name="alt_title" value="電車でGO!"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_rom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-tat001.bin" size="4194304" crc="b62e5dd0" sha1="d3da0ae529c6f78162682141154a95879f288ca7" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m0e005a.u3" size="4194304" crc="b62e5dd0" sha1="d3da0ae529c6f78162682141154a95879f288ca7" offset="000000" /> </dataarea> </part> </software> <software name="digi2tag"> - <description>Digimon Adventure 02 - Tag Tamers</description> + <description>Digimon Adventure 02 - Tag Tamers (Rev 1)</description> <year>2000</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BAN032"/> <info name="release" value="20000803"/> <info name="alt_title" value="デジモンアドベンチャー02 タッグテイマーズ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108 or PTS-0116" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="W242580 SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban032.bin" size="2097152" crc="6ededaf8" sha1="44a5502b70ea75926b87377e3f634c8093bc574a" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s126b.u3" size="2097152" crc="6ededaf8" sha1="44a5502b70ea75926b87377e3f634c8093bc574a" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="digi2taga" cloneof="digi2tag"> + <description>Digimon Adventure 02 - Tag Tamers (Rev 0)</description> + <year>2000</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BAN032"/> + <info name="release" value="20000803"/> + <info name="alt_title" value="デジモンアドベンチャー02 タッグテイマーズ"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s117b.u3" size="2097152" crc="56ce1bc5" sha1="521754084afc6321ae329421b9d2ab0f0cac8c70" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="digianod"> - <description>Digimon Adventure - Anode Tamer</description> + <description>Digimon Adventure - Anode Tamer (Rev 1)</description> + <year>1999</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BAN01C"/> + <info name="release" value="19991216"/> + <info name="alt_title" value="デジモンアドベンチャー アノードテイマー"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s097b.u3" size="2097152" crc="6e9dd148" sha1="9db54826c2887dea07aac774bd15e092596e37af" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="digianoda" cloneof="digianod"> + <description>Digimon Adventure - Anode Tamer (Rev 0)</description> <year>1999</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BAN01C"/> <info name="release" value="19991216"/> <info name="alt_title" value="デジモンアドベンチャー アノードテイマー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban01c.bin" size="2097152" crc="6e9dd148" sha1="9db54826c2887dea07aac774bd15e092596e37af" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s066a.u3" size="2097152" crc="fc6946f0" sha1="c49bd00c95bca49a183d59f85e81815efb1a2fb9" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -281,16 +726,45 @@ license:CC0 <info name="release" value="20000120"/> <info name="alt_title" value="デジモンアドベンチャー カソードテイマー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="W242580 SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s067a.u3" size="2097152" crc="42ad238b" sha1="0b54cc1d350ab92c42ce8214784389b994562bf6" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <!-- + <software name="digiadvc"> + <description>Digimon Adventure Campaign Limited Version</description> + <year>2000</year> + <publisher>Bandai</publisher> + <info name="alt_title" value="デジモンアドベンチャー キャンペーン限定バージョン"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0022A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban01d.bin" size="2097152" crc="42ad238b" sha1="0b54cc1d350ab92c42ce8214784389b994562bf6" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="m5m29ft160avp.u3" size="2097152" crc="7e03e8da" sha1="" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> + --> + <!-- how to play? --> <software name="digimon"> + <!-- Rev 1 --> <description>Digital Monster - Ver. WonderSwan</description> <year>1999</year> <publisher>Bandai</publisher> @@ -298,11 +772,16 @@ license:CC0 <info name="release" value="19990325"/> <info name="alt_title" value="デジタルモンスター バージョン ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0016" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban005.bin" size="2097152" crc="ab59de2e" sha1="ecea24db6e65254ab4d6e312de0eb951c7df716f" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s006a.u3" size="2097152" crc="ab59de2e" sha1="ecea24db6e65254ab4d6e312de0eb951c7df716f" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -314,11 +793,16 @@ license:CC0 <publisher>Bandai</publisher> <info name="serial" value="SWJ-BAN001"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban001asia.bin" size="2097152" crc="94ea6ffc" sha1="5cc59ec1687fe83ec5fb048d3dfc37849747df34" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s141b.u3" size="2097152" crc="94ea6ffc" sha1="5cc59ec1687fe83ec5fb048d3dfc37849747df34" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -331,11 +815,16 @@ license:CC0 <info name="release" value="20000525"/> <info name="alt_title" value="デジモンアドベンチャー02 デジタルパートナー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban02c.bin" size="2097152" crc="b5e675ae" sha1="c622f6742ca3f0129fc12dce0a1c17d292388ffb" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s107b.u3" size="2097152" crc="b5e675ae" sha1="c622f6742ca3f0129fc12dce0a1c17d292388ffb" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> @@ -348,11 +837,16 @@ license:CC0 <info name="release" value="20000106"/> <info name="alt_title" value="どこでもハムスター"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="sw-bec003.bin" size="1048576" crc="89e7d950" sha1="3d5a1ed77e721908eb1145aaedef17c0ee6355ae" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s075a.u3" size="1048576" crc="89e7d950" sha1="3d5a1ed77e721908eb1145aaedef17c0ee6355ae" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -365,12 +859,15 @@ license:CC0 <info name="release" value="19991222"/> <info name="alt_title" value="たねをまく鳥 / boxart: D'sGarage21公募ゲーム たねをまく鳥 (D's Garage 21 Koubo Game - Tane o Maku Tori)"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban01e.bin" size="1048576" crc="b1caec06" sha1="83e190af2e25fbb3e93b1d5835c52fe6f1d279ce" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m1e073a.u3" size="1048576" crc="b1caec06" sha1="83e190af2e25fbb3e93b1d5835c52fe6f1d279ce" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x80"> + <dataarea name="eeprom" size="0x80" width="16" endianness="little"> </dataarea> </part> </software> @@ -383,11 +880,15 @@ license:CC0 <info name="release" value="19991028"/> <info name="alt_title" value="えんがちょ! for ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-nap001.bin" size="1048576" crc="4e467626" sha1="f79451034b6d844f0e10c825306bbc26f26a5466" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m1e049a.u3" size="1048576" crc="4e467626" sha1="f79451034b6d844f0e10c825306bbc26f26a5466" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x80"> + <dataarea name="eeprom" size="0x80" width="16" endianness="little"> </dataarea> </part> </software> @@ -400,11 +901,16 @@ license:CC0 <info name="release" value="19990722"/> <info name="alt_title" value="新世紀エヴァンゲリオン シト育成"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban00e.bin" size="2097152" crc="bf8d9212" sha1="ae31488cee1c91f383efbe3083b4abec092dda36" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s040a.u3" size="2097152" crc="bf8d9212" sha1="ae31488cee1c91f383efbe3083b4abec092dda36" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -417,11 +923,15 @@ license:CC0 <info name="release" value="19991209"/> <info name="alt_title" value="フィーバー サンキョー 公式パチンコシミュレーション フォー ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0032B" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-bec002.bin" size="2097152" crc="8922dd0b" sha1="f26b0215c49e04cb8ef6f031b627dff6a49d2015" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m1e069a.u3" size="2097152" crc="8922dd0b" sha1="f26b0215c49e04cb8ef6f031b627dff6a49d2015" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x80"> + <dataarea name="eeprom" size="0x80" width="16" endianness="little"> </dataarea> </part> </software> @@ -434,12 +944,16 @@ license:CC0 <info name="release" value="20000224"/> <info name="alt_title" value="フィッシングフリークス バスライズ フォー ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-bec004.bin" size="1048576" crc="a1fb16fc" sha1="f8f077da30f227f3793e97c7f1d656559f08b9d4" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s086a.u3" size="1048576" crc="a1fb16fc" sha1="f8f077da30f227f3793e97c7f1d656559f08b9d4" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -452,16 +966,21 @@ license:CC0 <info name="release" value="20000323"/> <info name="alt_title" value="ファイナルラップ2000"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban026.bin" size="1048576" crc="ce2f1a1d" sha1="cfcb14be6d2f1dbffdfcefb8c8d83b4f39bc102b" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m16e094b.u3" size="1048576" crc="ce2f1a1d" sha1="cfcb14be6d2f1dbffdfcefb8c8d83b4f39bc102b" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> <software name="fireprow"> + <!-- Rev 5 --> <description>Fire Pro Wrestling for WonderSwan</description> <year>2000</year> <publisher>Kaga Tech</publisher> @@ -469,11 +988,16 @@ license:CC0 <info name="release" value="20000831"/> <info name="alt_title" value="ファイヤープロレスリング フォー ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="W242580 SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-kgt007.bin" size="4194304" crc="f246a68e" sha1="fbb745b016cc710ff6f82ec3091a181415d8de61" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s120b.u3" size="4194304" crc="f246a68e" sha1="fbb745b016cc710ff6f82ec3091a181415d8de61" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -486,9 +1010,13 @@ license:CC0 <info name="release" value="19990415"/> <info name="alt_title" value="元祖じゃじゃ丸くん"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_rom" /> - <dataarea name="rom" size="524288"> - <rom name="swj-jlc001.bin" size="524288" crc="a193458c" sha1="cbf6455e89b20a000b6121e5c485be1a20d1f726" offset="000000" /> + <dataarea name="rom" size="524288" width="16" endianness="little"> + <rom name="mh4m0e012a.u3" size="524288" crc="a193458c" sha1="cbf6455e89b20a000b6121e5c485be1a20d1f726" offset="000000" /> </dataarea> </part> </software> @@ -501,9 +1029,13 @@ license:CC0 <info name="release" value="20000629"/> <info name="alt_title" value="グローカルヘキサイト"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0032B" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_rom" /> - <dataarea name="rom" size="524288"> - <rom name="swj-kgt008.bin" size="524288" crc="8fcd6d2c" sha1="e100d54e5c63512dbd655f0439870e08ced439dd" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m0e108b.u3" size="1048576" crc="4aed3911" sha1="837528b9d95e309f7b1e8c4ffd46ca3e2b68a5a3" offset="000000" /> </dataarea> </part> </software> @@ -516,16 +1048,22 @@ license:CC0 <info name="release" value="20000113"/> <info name="alt_title" value="五目並べ&リバーシ 登龍門"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="524288"> - <rom name="swj-sum006.bin" size="524288" crc="6cd1411e" sha1="867f23963e33b26a781aa96851748e483e41fcad" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s080a.u3" size="1048576" crc="a9f11523" sha1="0931ddec058eefb32a68a1752716ed2ba68b78bf" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="gorakuta"> + <!-- Rev 2 --> <description>Goraku Ou Tango!</description> <year>1999</year> <publisher>Moebius</publisher> @@ -533,11 +1071,15 @@ license:CC0 <info name="release" value="19990401"/> <info name="alt_title" value="語楽王 タンゴ !"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-paw001.bin" size="1048576" crc="00137e86" sha1="af3fe9da3f5ee0f5a7b06b0440223db88fcb3bf2" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m8e014a.u3" size="1048576" crc="00137e86" sha1="af3fe9da3f5ee0f5a7b06b0440223db88fcb3bf2" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x400"> + <dataarea name="eeprom" size="0x400" width="16" endianness="little"> </dataarea> </part> </software> @@ -550,12 +1092,16 @@ license:CC0 <info name="release" value="19990826"/> <info name="alt_title" value="機動戦士ガンダム エムエスバーサス"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="LP62S256AV SRAM" /> <feature name="slot" value="ws_sram" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban015.bin" size="2097152" crc="53b9fef8" sha1="2688ca67ac31ce3d5c3523b0e11cad55e70fa257" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s041a.u3" size="2097152" crc="53b9fef8" sha1="2688ca67ac31ce3d5c3523b0e11cad55e70fa257" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -568,12 +1114,14 @@ license:CC0 <info name="release" value="19990304"/> <info name="alt_title" value="グンペイ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban010.bin" size="1048576" crc="a1656bbb" sha1="ee4b777f029bac9561e60c19407d08360e733822" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m16e001a.u3" size="1048576" crc="a1656bbb" sha1="ee4b777f029bac9561e60c19407d08360e733822" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -586,60 +1134,141 @@ license:CC0 <info name="release" value="20000217"/> <info name="alt_title" value="花札しようよ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="524288"> - <rom name="swj-kgt005.bin" size="524288" crc="8e027330" sha1="4504b62212e1637dfd92e4f985a8497fa38941cd" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s081a.u3" size="1048576" crc="4b22270d" sha1="1eda3327eb9b5a5844a95ac789f71b669f4cb6a7" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="handsonr"> - <description>Keitai Gyogun Tanchiki - WonderSwan Handy Sonar</description> + <description>Keitai Gyogun Tanchiki - WonderSwan Handy Sonar (Rev 2)</description> <year>1999</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BAN00F"/> <info name="release" value="19990513"/> <info name="alt_title" value="携帯魚群探知機 ワンダースワン ハンディーソナー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="04041009EAC0003?" /> + <feature name="ic1" value="BANDAI 2001" /> + <feature name="ic2" value="ROM" /> + <feature name="ic3" value="74HCT373A" /> <feature name="slot" value="ws_rom" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban00f.bin" size="1048576" crc="2ab9852d" sha1="70d65a936ee1dfc2b89c543312c205285d955efb" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="handy sonar-2.ic2" size="1048576" crc="d4188811" sha1="a1691ef96097c409b56c77f1d4c731fbfb3f386b" offset="000000" /> </dataarea> </part> </software> + <software name="handsonra" cloneof="handsonr"> + <description>Keitai Gyogun Tanchiki - WonderSwan Handy Sonar (Rev 1)</description> + <year>1999</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BAN00F"/> + <info name="release" value="19990513"/> + <info name="alt_title" value="携帯魚群探知機 ワンダースワン ハンディーソナー"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="04041009EAC0003" /> + <feature name="ic1" value="BANDAI 2001" /> + <feature name="ic2" value="ROM" /> + <feature name="ic3" value="74HCT373A" /> + <feature name="slot" value="ws_rom" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="handy sonar-1.ic2" size="1048576" crc="2ab9852d" sha1="70d65a936ee1dfc2b89c543312c205285d955efb" offset="000000" /> + </dataarea> + </part> + </software> + + <!-- background incorrect during bot transform? --> <software name="harobots"> - <description>Harobots</description> + <description>Harobots (Rev 1)</description> <year>1999</year> <publisher>Sunrise Interactive</publisher> <info name="serial" value="SWJ-SRV001"/> <info name="release" value="19991007"/> <info name="alt_title" value="ハロボッツ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="LP62S256AV SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-srv001.bin" size="2097152" crc="aa525c04" sha1="1f42c5694a798de8ff3c68f63dfc7395be1669a5" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s079a.u3" size="2097152" crc="f75ce82c" sha1="ecbaf210f92c75a55df9dff4777ea364596ae0c9" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="harobotsa" cloneof="harobots"> + <description>Harobots (Rev 0)</description> + <year>1999</year> + <publisher>Sunrise Interactive</publisher> + <info name="serial" value="SWJ-SRV001"/> + <info name="release" value="19991007"/> + <info name="alt_title" value="ハロボッツ"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s052a.u3" size="2097152" crc="aa525c04" sha1="1f42c5694a798de8ff3c68f63dfc7395be1669a5" offset="000000" /> + </dataarea> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> <software name="hxhishi"> - <description>Hunter X Hunter - Ishi o Tsugu Mono</description> + <description>Hunter X Hunter - Ishi o Tsugu Mono (Rev 2)</description> + <year>2000</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BAN02A"/> + <info name="release" value="20000601"/> + <info name="alt_title" value="ハンター×ハンター 意志を継ぐ者"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> + <feature name="slot" value="ws_eeprom" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e116b.u3" size="4194304" crc="70aa800e" sha1="57b4278fc5812f52413ca65f45225922d4f2ec3d" offset="000000" /> + </dataarea> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="hxhishia" cloneof="hxhishi"> + <description>Hunter X Hunter - Ishi o Tsugu Mono (Rev 1)</description> <year>2000</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BAN02A"/> <info name="release" value="20000601"/> <info name="alt_title" value="ハンター×ハンター 意志を継ぐ者"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100 or PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-ban02a.bin" size="4194304" crc="70aa800e" sha1="57b4278fc5812f52413ca65f45225922d4f2ec3d" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e105b.u3" size="4194304" crc="bd6fc68a" sha1="43d985b31848e1ae58d07231da80ee7aa8d3f686" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -652,11 +1281,15 @@ license:CC0 <info name="release" value="20000304"/> <info name="alt_title" value="うずまき 呪いシミュレーション"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-omm002.bin" size="2097152" crc="ca3f0b00" sha1="38f708a4c0c4fcec0cf4d6ce051d1ff76466d617" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m16e090a.u3" size="2097152" crc="ca3f0b00" sha1="38f708a4c0c4fcec0cf4d6ce051d1ff76466d617" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -669,11 +1302,16 @@ license:CC0 <info name="release" value="19990930"/> <info name="alt_title" value="格闘料理伝説 ビストロレシピ ワンダーバトル編"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="LP62S256AV SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-bpr002.bin" size="1048576" crc="4d103236" sha1="b40fbc7b72921c9ac31330831c0f77e4133ec7d6" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s046a.u3" size="1048576" crc="4d103236" sha1="b40fbc7b72921c9ac31330831c0f77e4133ec7d6" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> @@ -686,17 +1324,22 @@ license:CC0 <info name="release" value="19990914"/> <info name="alt_title" value="競馬予想支援ソフト 予想進化論"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="524288"> - <rom name="swj-mde001.bin" size="524288" crc="945fc213" sha1="461f87e6e301b0dbb6324d908d4ca7efd7518e20" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s045a.u3" size="1048576" crc="517f962e" sha1="12d26522665cb8ecb3178bc242d984deae438e5c" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="kissyori"> + <!-- Rev 2 --> <description>Kiss Yori... - Seaside Serenade</description> <year>1999</year> <publisher>Kid</publisher> @@ -704,11 +1347,16 @@ license:CC0 <info name="release" value="19991202"/> <info name="alt_title" value="キスより... ~シーサイドセレナーデ~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-kdx001.bin" size="2097152" crc="3b4c60c6" sha1="9ef89b6fe68c5a06d34344e8c783ec24114ad959" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s058a.u3" size="2097152" crc="3b4c60c6" sha1="9ef89b6fe68c5a06d34344e8c783ec24114ad959" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> @@ -721,11 +1369,16 @@ license:CC0 <info name="release" value="19990520"/> <info name="alt_title" value="風のクロノアムーンライトミュージアム"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban008.bin" size="1048576" crc="80c6ef12" sha1="207a3ceb9a09eabca6e455deeb7035e7e04c9795" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s024a.u3" size="1048576" crc="80c6ef12" sha1="207a3ceb9a09eabca6e455deeb7035e7e04c9795" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> @@ -738,16 +1391,22 @@ license:CC0 <info name="release" value="19990415"/> <info name="alt_title" value="子育てクイズ どこでもマイエンジェル"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0016" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban007.bin" size="2097152" crc="4c48624c" sha1="52b154a3e36d01357649a9f7f614139ce6cc46b8" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s019a.u3" size="2097152" crc="4c48624c" sha1="52b154a3e36d01357649a9f7f614139ce6cc46b8" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> <software name="kyousoub"> + <!-- Rev 1 --> <description>Kyousouba Ikusei Simulation - Keiba</description> <year>1999</year> <publisher>BEC</publisher> @@ -755,16 +1414,22 @@ license:CC0 <info name="release" value="19991118"/> <info name="alt_title" value="競走馬育成シミュレーション ケイバ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-bec001.bin" size="1048576" crc="ecfbcb1d" sha1="a309a430fbbed6c42f41d8ccaf4aba82e96d6a7b" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s057a.u3" size="1048576" crc="ecfbcb1d" sha1="a309a430fbbed6c42f41d8ccaf4aba82e96d6a7b" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="langriss"> + <!-- Rev 1 --> <description>Langrisser Millennium WS - The Last Century</description> <year>2000</year> <publisher>Bandai</publisher> @@ -772,11 +1437,16 @@ license:CC0 <info name="release" value="20000309"/> <info name="alt_title" value="ラングリッサーミレニアム WS ~The LastCentury~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban024.bin" size="1048576" crc="9e0854e2" sha1="9fdf3f5821f2a4488139525fe49e87b23de4571f" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s088a.u3" size="1048576" crc="9e0854e2" sha1="9fdf3f5821f2a4488139525fe49e87b23de4571f" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -789,11 +1459,16 @@ license:CC0 <info name="release" value="19990527"/> <info name="alt_title" value="ラストスタンド"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="sw-ban009.bin" size="2097152" crc="cccaf8a1" sha1="d524da01f2bfad92c2fa080950229955a3030ef2" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s025a.u3" size="2097152" crc="cccaf8a1" sha1="d524da01f2bfad92c2fa080950229955a3030ef2" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -806,11 +1481,15 @@ license:CC0 <info name="release" value="20000420"/> <info name="alt_title" value="ロードランナー フォー ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="524288"> - <rom name="swj-bpr004.bin" size="524288" crc="e407cabf" sha1="91595cd5d5192db50eda883157852ff81994990c" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m16e099b.u3" size="1048576" crc="21279e82" sha1="847f51592f181aa68061900700149b86cdba651b" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -823,16 +1502,22 @@ license:CC0 <info name="release" value="20000323"/> <info name="alt_title" value="超時空要塞マクロス トゥルーラブソング"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-lay001.bin" size="4194304" crc="62d419cd" sha1="211e051db3fd4d7ae1ea143e043f87cfbcec5f1c" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s093a.u3" size="4194304" crc="62d419cd" sha1="211e051db3fd4d7ae1ea143e043f87cfbcec5f1c" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> - <software name="magdrop"> + <!-- Small graphics glitch between 4th and 5th column --> + <software name="magdrop" supported="partial"> <description>Magical Drop for WonderSwan</description> <year>1999</year> <publisher>Data East Corp.</publisher> @@ -840,27 +1525,57 @@ license:CC0 <info name="release" value="19991014"/> <info name="alt_title" value="マジカルドロップ for ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_rom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-dte002.bin" size="1048576" crc="637ada93" sha1="a25944969068ee495254f94c2c48dfffcb66ce8d" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m0e051a.u3" size="1048576" crc="637ada93" sha1="a25944969068ee495254f94c2c48dfffcb66ce8d" offset="000000" /> </dataarea> </part> </software> <software name="mahjongt"> - <description>Mahjong Touryuumon</description> + <description>Mahjong Touryuumon (Rev 3)</description> + <year>1999</year> + <publisher>Sammy</publisher> + <info name="serial" value="SWJ-SUM001"/> + <info name="release" value="19990311"/> + <info name="alt_title" value="麻雀 登龍門"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0016" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="LP62S256AV SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s028a.u3" size="1048576" crc="e7e7fd4c" sha1="281079b22cb213ee4dda5c304b5b5be028130929" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="mahjongta" cloneof="mahjongt"> + <description>Mahjong Touryuumon (Rev 1)</description> <year>1999</year> <publisher>Sammy</publisher> <info name="serial" value="SWJ-SUM001"/> <info name="release" value="19990311"/> <info name="alt_title" value="麻雀 登龍門"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0016" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="LP62S256AV SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-sum001.bin" size="1048576" crc="e7e7fd4c" sha1="281079b22cb213ee4dda5c304b5b5be028130929" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s003a.u3" size="1048576" crc="c2ed122e" sha1="748ca335d39515a6650352449972684be749052a" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -873,11 +1588,16 @@ license:CC0 <info name="release" value="19990722"/> <info name="alt_title" value="魔界村 for ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban011.bin" size="2097152" crc="00b31fbb" sha1="5eaeab859e5f647fac354dad285a311387ea126b" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s039a.u3" size="2097152" crc="00b31fbb" sha1="5eaeab859e5f647fac354dad285a311387ea126b" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -890,16 +1610,21 @@ license:CC0 <info name="release" value="19990805"/> <info name="alt_title" value="名探偵コナン 魔術師の挑戦状!"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban012.bin" size="1048576" crc="92fbf7fb" sha1="8f3f97be31f3bd0e6922ab7795aa6f04bc5cfe2a" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s043a.u3" size="1048576" crc="92fbf7fb" sha1="8f3f97be31f3bd0e6922ab7795aa6f04bc5cfe2a" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> - <software name="mconannm" supported="no"> <!-- freezes --> + <software name="mconannm"> <description>Meitantei Conan - Nishi no Meitantei Saidai no Kiki!</description> <year>2000</year> <publisher>Bandai</publisher> @@ -907,11 +1632,16 @@ license:CC0 <info name="release" value="20000727"/> <info name="alt_title" value="名探偵コナン 西の名探偵 最大の危機!?"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban027.bin" size="2097152" crc="e226863b" sha1="e5684789e81f9d739010db575022a12a448b5509" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s113b.u3" size="2097152" crc="e226863b" sha1="e5684789e81f9d739010db575022a12a448b5509" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -924,11 +1654,16 @@ license:CC0 <info name="release" value="19990504"/> <info name="alt_title" value="メダロット パーフェクトエディション - カブトバージョン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0016" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="LP62S256AV SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-mga001.bin" size="1048576" crc="12fb8b28" sha1="509e5748e5efdfb56093c78ae886153dd1838215" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s020a.u3" size="1048576" crc="12fb8b28" sha1="509e5748e5efdfb56093c78ae886153dd1838215" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -941,16 +1676,22 @@ license:CC0 <info name="release" value="19990504"/> <info name="alt_title" value="メダロット パーフェクトエディション - クワガタバージョン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0016" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="LP62S256AV SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-mga002.bin" size="1048576" crc="2b40745d" sha1="315061e4739e947175d6ad7f006498cd61a33f8c" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s021a.u3" size="1048576" crc="2b40745d" sha1="315061e4739e947175d6ad7f006498cd61a33f8c" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="mingmagn"> + <!-- Rev 1 --> <description>Mingle Magnet</description> <year>1999</year> <publisher>Hal Corporation</publisher> @@ -958,15 +1699,19 @@ license:CC0 <info name="release" value="19991102"/> <info name="alt_title" value="ミングルマグネット"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0032B" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_rom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="524288"> - <rom name="swj-hal002.bin" size="524288" crc="9baac7bb" sha1="c7230ef709f6ceaef9a220541c8cdc05c0cd549f" offset="000000" /> + <dataarea name="rom" size="524288" width="16" endianness="little"> + <rom name="mh4m0e054a.u3" size="524288" crc="9baac7bb" sha1="c7230ef709f6ceaef9a220541c8cdc05c0cd549f" offset="000000" /> </dataarea> </part> </software> <software name="mjkiwame"> + <!-- Rev 1 --> <description>Pro Mahjong Kiwame for WonderSwan</description> <year>1999</year> <publisher>Athena</publisher> @@ -974,16 +1719,22 @@ license:CC0 <info name="release" value="19991007"/> <info name="alt_title" value="プロ麻雀 極 フォー ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="LP62S256AV SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-atn001.bin" size="1048576" crc="90f7e6d6" sha1="32013a7a745a3aa2fd63cc9427c5e1f2635655ed" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s047a.u3" size="1048576" crc="90f7e6d6" sha1="32013a7a745a3aa2fd63cc9427c5e1f2635655ed" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> <software name="mjtetsu"> + <!-- Rev 2 --> <description>Nihon Pro Mahjong Renmei Kounin Tetsuman</description> <year>1999</year> <publisher>Kaga Tech</publisher> @@ -991,25 +1742,38 @@ license:CC0 <info name="release" value="19990715"/> <info name="alt_title" value="日本プロ麻雀連盟公認 徹萬"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-kgt001.bin" size="1048576" crc="44b3e67c" sha1="4eefc5a51008c2ab33e8d04064ec9bdcbc03d036" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s036a.u3" size="1048576" crc="44b3e67c" sha1="4eefc5a51008c2ab33e8d04064ec9bdcbc03d036" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> - <software name="mobilewg"> - <description>MobileWonderGate</description> + <!-- wondergate hardware is not emulated yet --> + <software name="mobilewg" supported="partial"> + <!-- Rev 1 --> + <description>MobileWonderGate (Rev 1)</description> <year>19??</year> <publisher><unknown></publisher> + <info name="serial" value="SWJ-SCC001"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0110 or PTS-0105" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV4000STC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="mobilewondergate (japan).bin" size="2097152" crc="80de367d" sha1="92d4a6ff6f2b1152d8935025f38f910155e5d709" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m4ms109b.u3" size="2097152" crc="80de367d" sha1="92d4a6ff6f2b1152d8935025f38f910155e5d709" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x10000"> + <dataarea name="sram" size="0x10000" width="16" endianness="little"> </dataarea> </part> </software> @@ -1022,11 +1786,16 @@ license:CC0 <info name="release" value="20000330"/> <info name="alt_title" value="燃えろ!!プロ野球 ルーキーズ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-jlc002.bin" size="1048576" crc="eb995e86" sha1="e88e659cc04fc08a04b8c881f62fe086c5cdab06" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s095b.u3" size="1048576" crc="eb995e86" sha1="e88e659cc04fc08a04b8c881f62fe086c5cdab06" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> @@ -1039,11 +1808,16 @@ license:CC0 <info name="release" value="19991102"/> <info name="alt_title" value="森田将棋 フォー ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="524288"> - <rom name="swj-yke001.bin" size="524288" crc="b159c30d" sha1="d70fbc6be9a9a0f12cea8a9f7c98aa415e41aafd" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s070a.u3" size="1048576" crc="d675c265" sha1="3ce41c90cfc1d53a89ade2c88e0b16cdc92c0268" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1056,11 +1830,16 @@ license:CC0 <info name="release" value="20000323"/> <info name="alt_title" value="メタコミセラピー ねぇ聞いて!"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-kgt006.bin" size="2097152" crc="a3ead689" sha1="dc94e17a942acfdc1eb0c38d91bf72460a4bb8f9" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s089a.u3" size="2097152" crc="a3ead689" sha1="dc94e17a942acfdc1eb0c38d91bf72460a4bb8f9" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1073,16 +1852,21 @@ license:CC0 <info name="release" value="19991118"/> <info name="alt_title" value="謎王 Pocket"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0032B" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-bvl001.bin" size="1048576" crc="4ed8820c" sha1="b358c65bae818c4b3de6bf668d16c311534036c2" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m16e059a.u3" size="1048576" crc="4ed8820c" sha1="b358c65bae818c4b3de6bf668d16c311534036c2" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> <software name="niceon"> + <!-- Rev 1 --> <description>Nice On</description> <year>1999</year> <publisher>Sammy</publisher> @@ -1090,11 +1874,15 @@ license:CC0 <info name="release" value="19990408"/> <info name="alt_title" value="ナイスオン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-sum002.bin" size="1048576" crc="b5dbcf12" sha1="6a479ee45e69cd3d6cc6cdda5a60eff3077953b0" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m16e015a.u3" size="1048576" crc="b5dbcf12" sha1="6a479ee45e69cd3d6cc6cdda5a60eff3077953b0" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -1107,11 +1895,16 @@ license:CC0 <info name="release" value="19990311"/> <info name="alt_title" value="信長の野望 for ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0016" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="524288"> - <rom name="swj-kex001.bin" size="524288" crc="c1734309" sha1="b143cece1e7db9d9f660f4e9ca3a95b02a71dcd3" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s004a.u3" size="1048576" crc="04531734" sha1="785ebb7528f5268e1a1fc10dffbe95ccf6d39560" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1124,11 +1917,15 @@ license:CC0 <info name="release" value="20000106"/> <info name="alt_title" value="おーちゃんのお絵かきロジック"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0032B" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="524288"> - <rom name="swj-sun004.bin" size="524288" crc="631bd97a" sha1="0f73d3112b1184f74e728cf1252ffbee6a146fa6" offset="000000" /> + <dataarea name="rom" size="524288" width="16" endianness="little"> + <rom name="mh4m16e074a.u3" size="524288" crc="631bd97a" sha1="0f73d3112b1184f74e728cf1252ffbee6a146fa6" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -1141,11 +1938,15 @@ license:CC0 <info name="release" value="20000719"/> <info name="alt_title" value="フロムテレビアニメーション ワンピース めざせ海賊王!"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban02b.bin" size="1048576" crc="f2e362b8" sha1="99c831c27c478064e3d3fa8f9f089cc28f0e946f" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m16e112b.u3" size="1048576" crc="f2e362b8" sha1="99c831c27c478064e3d3fa8f9f089cc28f0e946f" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -1158,12 +1959,15 @@ license:CC0 <info name="release" value="19990701"/> <info name="alt_title" value="パズルボブル"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0032" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="524288"> - <rom name="swj-sun003.bin" size="524288" crc="302499b9" sha1="5e7dabb66b0ca580481aa79ee8b8a5b0c6ce6592" offset="000000" /> + <dataarea name="rom" size="524288" width="16" endianness="little"> + <rom name="mh8m1e034a.u3" size="524288" crc="302499b9" sha1="5e7dabb66b0ca580481aa79ee8b8a5b0c6ce6592" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x80"> + <dataarea name="eeprom" size="0x80" width="16" endianness="little"> </dataarea> </part> </software> @@ -1176,11 +1980,16 @@ license:CC0 <info name="release" value="20000406"/> <info name="alt_title" value="ポケットファイター"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban00a.bin" size="2097152" crc="35361250" sha1="fb8d0f4e58a4192989ec71eb6e392d182aaa3eec" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s101b.u3" size="2097152" crc="35361250" sha1="fb8d0f4e58a4192989ec71eb6e392d182aaa3eec" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1193,9 +2002,13 @@ license:CC0 <info name="release" value="19990311"/> <info name="alt_title" value="ぷよぷよ通"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_rom" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban004.bin" size="1048576" crc="5a41a7ba" sha1="d72c1221c2ce3e281a0ee288a3d079aa8e1b714b" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m0e002a.u3" size="1048576" crc="5a41a7ba" sha1="d72c1221c2ce3e281a0ee288a3d079aa8e1b714b" offset="000000" /> </dataarea> </part> </software> @@ -1208,12 +2021,16 @@ license:CC0 <info name="release" value="20000629"/> <info name="alt_title" value="レインボーアイランド パティーズ☆パーティ!"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-mgh003.bin" size="2097152" crc="8f8608ad" sha1="759deb79a3fc3befed705d7264e4b88adbadacc7" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s110b.u3" size="2097152" crc="8f8608ad" sha1="759deb79a3fc3befed705d7264e4b88adbadacc7" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1226,17 +2043,44 @@ license:CC0 <info name="release" value="20000810"/> <info name="alt_title" value="リング インフィニティ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100 or PTE-0032B" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-kdk001.bin" size="4194304" crc="14adbd4b" sha1="9896d93c97381dc06b6f044de6c9bd112ca0c94b" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e119b.u3" size="4194304" crc="14adbd4b" sha1="9896d93c97381dc06b6f044de6c9bd112ca0c94b" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> - <software name="srobot2a" supported="no"> <!-- freezes --> + <software name="ringa" cloneof="ring"> + <description>Ring Infinity (alt)</description> + <year>2000</year> + <publisher>Kid</publisher> + <info name="serial" value="SWJ-KDK001"/> + <info name="release" value="20000810"/> + <info name="alt_title" value="リング インフィニティ"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0120" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u4" value="ROM (on PTS-0120)" /> + <feature name="u5" value="ROM (on PTS-0120)" /> + <feature name="slot" value="ws_eeprom" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <!-- these roms are a simple split of mh32m16e119b.u3. Need to be verified --> + <rom name="mh16m16e114b.u4" size="2097152" crc="1bed45b0" sha1="46eff2164d8fccac161b0fd1cde8098e3bc08fd6" offset="000000" status="baddump" /> + <rom name="mh16m16e115b.u5" size="2097152" crc="baeb4a36" sha1="d5d8220dadc41e5dbaa13ac188d642dacbed68c3" offset="2097152" status="baddump" /> + </dataarea> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="srobot2a"> <description>Super Robot Taisen Compact 2 - Dai-1-bu - Chijou Gekidou Hen</description> <year>2000</year> <publisher>Banpresto</publisher> @@ -1244,62 +2088,126 @@ license:CC0 <info name="release" value="20000330"/> <info name="alt_title" value="スーパーロボット大戦 コンパクト2 第1部:地上激闘篇"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-bpr003.bin" size="4194304" crc="782877bc" sha1="e6911e5bb0a742ba299e05b20ee81f2faa4854a5" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s098b.u3" size="4194304" crc="782877bc" sha1="e6911e5bb0a742ba299e05b20ee81f2faa4854a5" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> - <software name="srobot2b" supported="no"> <!-- freezes --> - <description>Super Robot Taisen Compact 2 - Dai-2-bu - Uchuu Gekishin Hen</description> + <software name="srobot2b"> + <description>Super Robot Taisen Compact 2 - Dai-2-bu - Uchuu Gekishin Hen (Rev 4)</description> <year>2000</year> <publisher>Banpresto</publisher> <info name="serial" value="SWJ-BPR006"/> <info name="release" value="20000914"/> <info name="alt_title" value="スーパーロボット大戦 コンパクト2 第2部:宇宙激震篇"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0108" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-bpr006.bin" size="4194304" crc="ecbb46de" sha1="6014ac0b8978e710f26c9cc41180cdf788584743" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s124b.u3" size="4194304" crc="ecbb46de" sha1="6014ac0b8978e710f26c9cc41180cdf788584743" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> - <software name="srobot2c" supported="no"> <!-- freezes --> - <description>Super Robot Taisen Compact 2 - Dai-3-bu - Ginga Kessen Hen</description> + <software name="srobot2c"> + <description>Super Robot Taisen Compact 2 - Dai-3-bu - Ginga Kessen Hen (Rev 2)</description> <year>2001</year> <publisher>Banpresto</publisher> <info name="serial" value="SWJ-BPR007"/> <info name="release" value="20010118"/> <info name="alt_title" value="スーパーロボット大戦 コンパクト2 第3部:銀河決戦篇"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0129" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM (epoxy blob)" /> + <feature name="u4" value="BS62LV256TC SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="138.u3" size="4194304" crc="0b0f8981" sha1="d24d8cea57c5c487e877eaa523eefb0dd184556d" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="srobotc"> + <description>Super Robot Taisen Compact (Rev 2)</description> + <year>1999</year> + <publisher>Banpresto</publisher> + <info name="serial" value="SWJ-BPR001"/> + <info name="release" value="19990428"/> + <info name="alt_title" value="スーパーロボット大戦 コンパクト"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s037a.u3" size="2097152" crc="7021d54f" sha1="e93d58ab5819992e54223f5d1c4d5aeb6983d6a3" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="srobotca" cloneof="srobotc"> + <description>Super Robot Taisen Compact (Rev 1)</description> + <year>1999</year> + <publisher>Banpresto</publisher> + <info name="serial" value="SWJ-BPR001"/> + <info name="release" value="19990428"/> + <info name="alt_title" value="スーパーロボット大戦 コンパクト"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-bpr007.bin" size="4194304" crc="0b0f8981" sha1="d24d8cea57c5c487e877eaa523eefb0dd184556d" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s029a.u3" size="2097152" crc="7572e478" sha1="c4a21084bff1f2a63784fe7d11e046f305ad310a" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> - <software name="srobotc" supported="no"> <!-- freezes --> - <description>Super Robot Taisen Compact</description> + <software name="srobotcb" cloneof="srobotc"> + <description>Super Robot Taisen Compact (Rev 0)</description> <year>1999</year> <publisher>Banpresto</publisher> <info name="serial" value="SWJ-BPR001"/> <info name="release" value="19990428"/> <info name="alt_title" value="スーパーロボット大戦 コンパクト"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-bpr001.bin" size="2097152" crc="7021d54f" sha1="e93d58ab5819992e54223f5d1c4d5aeb6983d6a3" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s023a.u3" size="2097152" crc="8a8c5aa8" sha1="a957111681951eb6a971a6b4f75bca7f89b29628" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1309,7 +2217,7 @@ license:CC0 external robot (the Wonder Borg). The Wonder Borg itself uses an Elan EM78P451AQ MCU (undumped). --> - <software name="robworks"> + <software name="robworks" supported="partial"> <description>Wonder Borg Robot Works</description> <year>2000</year> <publisher>Bandai</publisher> @@ -1317,12 +2225,17 @@ license:CC0 <info name="release" value="20000804"/> <info name="alt_title" value="ワンダーボーグ 完"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0123" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> <feature name="rtc" value="yes" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban033.bin" size="1048576" crc="6adf0e32" sha1="4d4d4a3fde6b1dbbc8f008fbd035fb59624dfba7" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s118b.u3" size="1048576" crc="6adf0e32" sha1="4d4d4a3fde6b1dbbc8f008fbd035fb59624dfba7" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1332,7 +2245,8 @@ license:CC0 external robot (the Wonder Borg). The Wonder Borg itself uses an Elan EM78P451AQ MCU (undumped). --> - <software name="robworks1" cloneof="robworks"> + <software name="robworks1" cloneof="robworks" supported="partial"> + <!-- Rev 1 --> <description>Robot Works (Asia)</description> <year>2000</year> <publisher>Bandai</publisher> @@ -1340,12 +2254,17 @@ license:CC0 <info name="release" value="20000804"/> <info name="alt_title" value="ワンダーボーグ 完"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0123A" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> <feature name="rtc" value="yes" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban033asia.bin" size="1048576" crc="be6be690" sha1="2117ed92e8cb4ae61868535f1d4d16851b480890" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s127b.u3" size="1048576" crc="be6be690" sha1="2117ed92e8cb4ae61868535f1d4d16851b480890" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1358,11 +2277,16 @@ license:CC0 <info name="release" value="19991028"/> <info name="alt_title" value="ロックマン&フォルテ 未来からの挑戦者"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban013.bin" size="2097152" crc="cd206a9e" sha1="9f8829aa8ea523e8370cbb2acd2acce056bb7958" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s055a.u3" size="2097152" crc="cd206a9e" sha1="9f8829aa8ea523e8370cbb2acd2acce056bb7958" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1375,11 +2299,16 @@ license:CC0 <info name="release" value="19990401"/> <info name="alt_title" value="三国志 for ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="524288"> - <rom name="swj-kex002.bin" size="524288" crc="e385ee88" sha1="d064b94f31b15564c9a3dbd3a68690244ea043ac" offset="000000" /> + <dataarea name="rom" size="524288" width="16" endianness="little"> + <rom name="mh4m256s010a.u3" size="524288" crc="e385ee88" sha1="d064b94f31b15564c9a3dbd3a68690244ea043ac" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1392,28 +2321,55 @@ license:CC0 <info name="release" value="20000406"/> <info name="alt_title" value="三国志II フォー ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="524288"> - <rom name="swj-kex004.bin" size="524288" crc="812b720d" sha1="59d904149c3f405357b2715468d509095388a194" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s096b.u3" size="1048576" crc="440b2630" sha1="3e7492478059d142a6a41b40219eba0c688a8e3f" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="sdgundem"> - <description>SD Gundam - Emotional Jam</description> + <description>SD Gundam - Emotional Jam (Rev 3)</description> <year>1999</year> <publisher>Bandai</publisher> <info name="serial" value="SWJ-BAN006"/> <info name="release" value="19990527"/> <info name="alt_title" value="SDガンダム エモーショナルジャム"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban006.bin" size="2097152" crc="ae83f873" sha1="ae54a1f8916a2d37a1e0c82c5a9b5d8fe0eeae51" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s026a.u3" size="2097152" crc="ae83f873" sha1="ae54a1f8916a2d37a1e0c82c5a9b5d8fe0eeae51" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="sdgundema" cloneof="sdgundem"> + <description>SD Gundam - Emotional Jam (Rev 2)</description> + <year>1999</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BAN006"/> + <info name="release" value="19990527"/> + <info name="alt_title" value="SDガンダム エモーショナルジャム"/> + <part name="cart" interface="wswan_cart"> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="swj-ban006.bin" size="2097152" crc="adfc3048" sha1="b3b4cf8e996c2a1fb149074725dc4b07922b3133" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1426,11 +2382,38 @@ license:CC0 <info name="release" value="19991229"/> <info name="alt_title" value="SD ガンダム ガシャポン戦記 -エピソード1-"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="LP62S256AV SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban020.bin" size="1048576" crc="21eb4c59" sha1="e6899de5b53f73c8978e3330dca0f2daaf95f140" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s077a.u3" size="1048576" crc="21eb4c59" sha1="e6899de5b53f73c8978e3330dca0f2daaf95f140" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> + </dataarea> + </part> + </software> + + <software name="sdgundgaa" cloneof="sdgundga"> + <description>SD Gundam Gashapon Senki - Episode 1 (alt)</description> + <year>1999</year> + <publisher>Bandai</publisher> + <info name="serial" value="SWJ-BAN020"/> + <info name="release" value="19991229"/> + <info name="alt_title" value="SD ガンダム ガシャポン戦記 -エピソード1-"/> + <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="LP62S256AV SRAM" /> + <feature name="slot" value="ws_sram" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s078a.u3" size="2097152" crc="2ec1e9c8" sha1="80eff574c75c2168fd0991c0efd16f9a9cadc24c" offset="000000" /> + </dataarea> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1443,11 +2426,16 @@ license:CC0 <info name="release" value="20000713"/> <info name="alt_title" value="SDガンダム Gジェネレーション ギャザービート"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-ban030.bin" size="4194304" crc="e4eb3ab1" sha1="5e5db8b066e1b41c5c12a2d4ffa97b73ed6c3f03" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s111b.u3" size="4194304" crc="e4eb3ab1" sha1="5e5db8b066e1b41c5c12a2d4ffa97b73ed6c3f03" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1460,11 +2448,16 @@ license:CC0 <info name="release" value="20000224"/> <info name="alt_title" value="仙界伝 ~TVアニメーション仙界伝封神演義より~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-ban022.bin" size="2097152" crc="07a3dd46" sha1="fc8b0b9b7efeac54812e7ae54153b7ae0cb9c12f" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s087a.u3" size="2097152" crc="07a3dd46" sha1="fc8b0b9b7efeac54812e7ae54153b7ae0cb9c12f" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1477,12 +2470,15 @@ license:CC0 <info name="release" value="20000316"/> <info name="alt_title" value="線脳 ミレニアム"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0032B" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban025.bin" size="1048576" crc="301436ac" sha1="708288e70b3186f6c0ef07acaef1b50fe6b7ab22" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m1e092a.u3" size="1048576" crc="301436ac" sha1="708288e70b3186f6c0ef07acaef1b50fe6b7ab22" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x80"> + <dataarea name="eeprom" size="0x80" width="16" endianness="little"> </dataarea> </part> </software> @@ -1495,16 +2491,22 @@ license:CC0 <info name="release" value="19990401"/> <info name="alt_title" value="上海 ポケット"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="LP62S256AV SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="524288"> - <rom name="swj-sun001.bin" size="524288" crc="1c489351" sha1="d64b9b2d567d1cea5960f64e5bdf83d4514446da" offset="000000" /> + <dataarea name="rom" size="524288" width="16" endianness="little"> + <rom name="mh4m256s013a.u3" size="524288" crc="1c489351" sha1="d64b9b2d567d1cea5960f64e5bdf83d4514446da" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> <software name="sprowres"> + <!-- Rev 1 --> <description>Shin Nihon Pro Wrestling Toukon Retsuden</description> <year>1999</year> <publisher>Tomy</publisher> @@ -1512,11 +2514,15 @@ license:CC0 <info name="release" value="19990304"/> <info name="alt_title" value="新日本プロレスリング 闘魂烈伝"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-tmy001.bin" size="1048576" crc="5b76f901" sha1="7324c5939b8b64858c96bd9726f5b5c483a11e22" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m1e007a.u3" size="1048576" crc="5b76f901" sha1="7324c5939b8b64858c96bd9726f5b5c483a11e22" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x80"> + <dataarea name="eeprom" size="0x80" width="16" endianness="little"> </dataarea> </part> </software> @@ -1529,11 +2535,16 @@ license:CC0 <info name="release" value="19991028"/> <info name="alt_title" value="将棋 登龍門"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="LP62S256AV SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="524288"> - <rom name="swj-sum005.bin" size="524288" crc="fff1c0d6" sha1="c42339590a6d7864cb4f5728b84c4cce09779f0a" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s053a.u3" size="1048576" crc="3ad194eb" sha1="0bc88b0affa97225e22c531306e9930ddb8f8905" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1546,9 +2557,13 @@ license:CC0 <info name="release" value="19991125"/> <info name="alt_title" value="サイドポケット for ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0032B" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_rom" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-dte001.bin" size="1048576" crc="8655269e" sha1="4a756dab81e0101475dc2e5494270f3df7dac1e6" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m0e063a.u3" size="1048576" crc="8655269e" sha1="4a756dab81e0101475dc2e5494270f3df7dac1e6" offset="000000" /> </dataarea> </part> </software> @@ -1561,12 +2576,15 @@ license:CC0 <info name="release" value="20000420"/> <info name="alt_title" value="スリザーリンク"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="524288"> - <rom name="swj-ban029.bin" size="524288" crc="f00a0330" sha1="3e31beaca985ac5041c6e95e0d07f163168e190d" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m1e102b.u3" size="1048576" crc="352a570d" sha1="9a087b0e6031e7e5e6d133ac82fecb8faa30816a" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x80"> + <dataarea name="eeprom" size="0x80" width="16" endianness="little"> </dataarea> </part> </software> @@ -1579,14 +2597,19 @@ license:CC0 <info name="release" value="19990812"/> <info name="alt_title" value="サッカーやろう! チャレンジ・ザ・ワールド"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_rom" /> - <dataarea name="rom" size="524288"> - <rom name="swj-ccj002.bin" size="524288" crc="d7438e58" sha1="6eec04244f4d85807988a2331e7031d0c3549646" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m0e044a.u3" size="1048576" crc="1263da65" sha1="435f207cce79ad6ac5b564e8a37e0d4395bd3739" offset="000000" /> </dataarea> </part> </software> <software name="sotsugyo"> + <!-- Rev 1 --> <description>Sotsugyou for WonderSwan</description> <year>1999</year> <publisher>Bandai Visual</publisher> @@ -1594,11 +2617,16 @@ license:CC0 <info name="release" value="19991216"/> <info name="alt_title" value="卒業 フォー ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-bvl002.bin" size="2097152" crc="f016dfe1" sha1="e461762566d529d1b103f119da50353902d180d7" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s071a.u3" size="2097152" crc="f016dfe1" sha1="e461762566d529d1b103f119da50353902d180d7" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1611,9 +2639,13 @@ license:CC0 <info name="release" value="19990513"/> <info name="alt_title" value="スペースインベーダー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_rom" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-sun002.bin" size="1048576" crc="8d83014f" sha1="54dd6e3fe81a8a384a0ffdd7a39211a5de9174c7" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m0e022a.u3" size="1048576" crc="8d83014f" sha1="54dd6e3fe81a8a384a0ffdd7a39211a5de9174c7" offset="000000" /> </dataarea> </part> </software> @@ -1626,11 +2658,16 @@ license:CC0 <info name="release" value="20000427"/> <info name="alt_title" value="ワサビ プロデュース ストリートダンサー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-ban028.bin" size="4194304" crc="1860b655" sha1="672cfc0e4547b2721d11b67476391b6e6cca81ae" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s100b.u3" size="4194304" crc="1860b655" sha1="672cfc0e4547b2721d11b67476391b6e6cca81ae" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1643,28 +2680,22 @@ license:CC0 <info name="release" value="20000224"/> <info name="alt_title" value="対局囲碁 平成棋院"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0018" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="524288"> - <rom name="swj-kgt004.bin" size="524288" crc="9597f37f" sha1="813f296b5b0ddaa34f1d3e5aa9955b1db1918f7d" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m1ms084a.u3" size="1048576" crc="50b7a742" sha1="be4559d6f48d7cb9550c8776f877c5c9cda0efa1" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x20000"> + <dataarea name="sram" size="0x20000" width="16" endianness="little"> </dataarea> </part> </software> - <!-- is this an overdump?!? - <software name="taikyigo"> - <description>Taikyoku Igo - Heisei Kiin</description> - <year>2000</year> - <publisher>Kaga Tech</publisher> - <part name="cart" interface="wswan_cart"> - <dataarea name="rom" size="1048576"> - <rom name="swj-kgt004.bin" size="1048576" crc="50b7a742" sha1="be4559d6f48d7cb9550c8776f877c5c9cda0efa1" offset="000000" /> - </dataarea> - </part> - </software--> - <software name="tanjodeb"> + <!-- Rev 1 --> <description>Tanjou Debut for WonderSwan</description> <year>2000</year> <publisher>Bandai Visual</publisher> @@ -1672,11 +2703,16 @@ license:CC0 <info name="release" value="20000224"/> <info name="alt_title" value="誕生 デビュー フォー ワンダースワン"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-bvl003.bin" size="2097152" crc="8b74f59a" sha1="2f35d250b8ddeb98ca3a2704a4ad85713f4c71b0" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m256s085a.u3" size="2097152" crc="8b74f59a" sha1="2f35d250b8ddeb98ca3a2704a4ad85713f4c71b0" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1689,11 +2725,16 @@ license:CC0 <info name="release" value="19990617"/> <info name="alt_title" value="鉄拳カードチャレンジ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban00d.bin" size="1048576" crc="e7c608e5" sha1="96a9ce5e56dc0c9648027ad4454e6f35e88d9a07" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s030a.u3" size="1048576" crc="e7c608e5" sha1="96a9ce5e56dc0c9648027ad4454e6f35e88d9a07" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> @@ -1706,12 +2747,16 @@ license:CC0 <info name="release" value="19990508"/> <info name="alt_title" value="テラーズ"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-ban014.bin" size="4194304" crc="ef5b6b82" sha1="7148d750f12b5da9a0efd99f5a5a7ccadecbdf60" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s042a.u3" size="4194304" crc="ef5b6b82" sha1="7148d750f12b5da9a0efd99f5a5a7ccadecbdf60" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1724,11 +2769,15 @@ license:CC0 <info name="release" value="19991222"/> <info name="alt_title" value="鉄人28号"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0032B" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-mgh001.bin" size="4194304" crc="6f304dca" sha1="65c4c6aaa36328bba5d56419af59af5d3420ed78" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m1e072a.u3" size="4194304" crc="6f304dca" sha1="65c4c6aaa36328bba5d56419af59af5d3420ed78" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x80"> + <dataarea name="eeprom" size="0x80" width="16" endianness="little"> </dataarea> </part> </software> @@ -1741,11 +2790,16 @@ license:CC0 <info name="release" value="20000427"/> <info name="alt_title" value="タイム ボカン シリーズ ボカン伝説 ブタもおだてりゃドロンボー"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-bpr005.bin" size="1048576" crc="7da6acb9" sha1="ad77d2e8429d5ed926d514d926050086f4edbeee" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s103b.u3" size="1048576" crc="7da6acb9" sha1="ad77d2e8429d5ed926d514d926050086f4edbeee" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1758,12 +2812,16 @@ license:CC0 <info name="release" value="20001012"/> <info name="alt_title" value="東京魔人学園 符咒封録"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0111" /> + <feature name="u1" value="BANDAI 2003" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="CY62256VLL SRAM" /> <feature name="slot" value="ws_sram" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="8388608"> - <rom name="swj-aae001.bin" size="8388608" crc="91117d1b" sha1="866c67737a4fbb5f09a0b13bbdb89397bcab1f55" offset="000000" /> + <dataarea name="rom" size="8388608" width="16" endianness="little"> + <rom name="mh64m125b.u3" size="8388608" crc="91117d1b" sha1="866c67737a4fbb5f09a0b13bbdb89397bcab1f55" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1776,17 +2834,21 @@ license:CC0 <info name="release" value="19991209"/> <info name="alt_title" value="たれぱんだのぐんぺい"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0032B" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban01f.bin" size="1048576" crc="a5643aa3" sha1="9622c65c939f05a9dfae288919ec5bd15c348f14" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m16e068a.u3" size="1048576" crc="a5643aa3" sha1="9622c65c939f05a9dfae288919ec5bd15c348f14" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> <software name="trumpcl2"> + <!-- Rev 1 --> <description>Trump Collection 2 - Bottom-Up Teki Sekaiisshuu no Tabi</description> <year>2000</year> <publisher>Bottom Up</publisher> @@ -1794,26 +2856,19 @@ license:CC0 <info name="release" value="20000928"/> <info name="alt_title" value="トランプコレクション ボトムアップ的トランプ生活"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTS-0100" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_rom" /> - <dataarea name="rom" size="524288"> - <rom name="swj-btm002.bin" size="524288" crc="a18aa7af" sha1="64a3053c0f92681eb514e55adabc8ba0da1cb1a1" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m0e104b.u3" size="1048576" crc="64aaf392" sha1="b25ff8fc79168e439ba913a2cea6195094be9ac2" offset="000000" /> </dataarea> </part> </software> - <!-- is this an overdump?!? - <software name="trumpcl2"> - <description>Trump Collection 2 - Bottom-Up Teki Sekaiisshuu no Tabi</description> - <year>2000</year> - <publisher>Bottom Up</publisher> - <part name="cart" interface="wswan_cart"> - <dataarea name="rom" size="1048576"> - <rom name="swj-btm002.bin" size="1048576" crc="64aaf392" sha1="b25ff8fc79168e439ba913a2cea6195094be9ac2" offset="000000" /> - </dataarea> - </part> - </software--> - <software name="trumpcol"> + <!-- Rev 1 --> <description>Trump Collection - Bottom-Up Teki Trump Seikatsu</description> <year>1999</year> <publisher>Bottom Up</publisher> @@ -1821,9 +2876,13 @@ license:CC0 <info name="release" value="19990701"/> <info name="alt_title" value="トランプコレクション2 ボトムアップ的世界一周の旅"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0032" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_rom" /> - <dataarea name="rom" size="524288"> - <rom name="swj-btm001.bin" size="524288" crc="07a3b862" sha1="ab3c925bf1bfd36403335af0c0365be8a2950ca8" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m0e032a.u3" size="1048576" crc="c283ec5f" sha1="9313e6d7090e91cca0304dc450b2f2f87329ae7a" offset="000000" /> </dataarea> </part> </software> @@ -1836,11 +2895,15 @@ license:CC0 <info name="release" value="19991125"/> <info name="alt_title" value="タ→ンテ→ブリスト DJバトル"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0032B" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-ban017.bin" size="4194304" crc="0d5171f0" sha1="858f1f57b5522a1701cc8a0abae43cec948e26a6" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m16e056a.u3" size="4194304" crc="0d5171f0" sha1="858f1f57b5522a1701cc8a0abae43cec948e26a6" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x800"> + <dataarea name="eeprom" size="2048" width="16" endianness="little"> </dataarea> </part> </software> @@ -1853,14 +2916,19 @@ license:CC0 <info name="release" value="19990401"/> <info name="alt_title" value="海釣りに行こう!"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0012A" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="empty" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_rom" /> - <dataarea name="rom" size="524288"> - <rom name="swj-ccj001.bin" size="524288" crc="86b56511" sha1="4f739292d11a45490851eaf40c0a7081824ad75a" offset="000000" /> + <dataarea name="rom" size="524288" width="16" endianness="little"> + <rom name="mh4m0e011a.u3" size="524288" crc="86b56511" sha1="4f739292d11a45490851eaf40c0a7081824ad75a" offset="000000" /> </dataarea> </part> </software> <software name="uzumaki"> + <!-- Rev 4 --> <description>Uzumaki - Denshi Kaiki Hen</description> <year>2000</year> <publisher>Omage Micott, Inc.</publisher> @@ -1868,17 +2936,21 @@ license:CC0 <info name="release" value="20000203"/> <info name="alt_title" value="うずまき ~電視怪奇篇~"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0032B" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="EEPROM" /> + <feature name="u3" value="ROM" /> <feature name="slot" value="ws_eeprom" /> - <feature name="rotated" value="yes" /> - <dataarea name="rom" size="2097152"> - <rom name="swj-omm001.bin" size="2097152" crc="812020ef" sha1="4c8166e0632bdb8c098d586a7b1522ed7b63b5f7" offset="000000" /> + <dataarea name="rom" size="2097152" width="16" endianness="little"> + <rom name="mh16m1e082a.u3" size="2097152" crc="812020ef" sha1="4c8166e0632bdb8c098d586a7b1522ed7b63b5f7" offset="000000" /> </dataarea> - <dataarea name="eeprom" size="0x80"> + <dataarea name="eeprom" size="0x80" width="16" endianness="little"> </dataarea> </part> </software> <software name="vaitzbla"> + <!-- Rev 1 --> <description>Vaitz Blade</description> <year>1999</year> <publisher>Bandai</publisher> @@ -1886,11 +2958,16 @@ license:CC0 <info name="release" value="19990624"/> <info name="alt_title" value="ヴァイツブレイド"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="4194304"> - <rom name="swj-ban00c.bin" size="4194304" crc="8fc9e145" sha1="cfb877f0988920c8fe4da5cdd7583197799df621" offset="000000" /> + <dataarea name="rom" size="4194304" width="16" endianness="little"> + <rom name="mh32m256s035a.u3" size="4194304" crc="8fc9e145" sha1="cfb877f0988920c8fe4da5cdd7583197799df621" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x8000"> + <dataarea name="sram" size="32768" width="16" endianness="little"> </dataarea> </part> </software> @@ -1903,11 +2980,16 @@ license:CC0 <info name="release" value="1999-09"/> <info name="alt_title" value="ワンダースタジアム'99"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="LP62S256AV SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban019.bin" size="1048576" crc="e252919d" sha1="bb138765346d9f4d77615444d090b1328a59818a" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s050a.u3" size="1048576" crc="e252919d" sha1="bb138765346d9f4d77615444d090b1328a59818a" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> @@ -1920,11 +3002,16 @@ license:CC0 <info name="release" value="1999-03"/> <info name="alt_title" value="ワンダースタジアム"/> <part name="cart" interface="wswan_cart"> + <feature name="pcb" value="PTE-0037" /> + <feature name="u1" value="BANDAI 2001" /> + <feature name="u2" value="GIZA" /> + <feature name="u3" value="ROM" /> + <feature name="u4" value="BS62LV256TC SRAM" /> <feature name="slot" value="ws_sram" /> - <dataarea name="rom" size="1048576"> - <rom name="swj-ban003.bin" size="1048576" crc="23bc0309" sha1="cb9454a8277bb2a7d5a6e3b4ddc84194fcbb1231" offset="000000" /> + <dataarea name="rom" size="1048576" width="16" endianness="little"> + <rom name="mh8m256s008a.u3" size="1048576" crc="23bc0309" sha1="cb9454a8277bb2a7d5a6e3b4ddc84194fcbb1231" offset="000000" /> </dataarea> - <dataarea name="sram" size="0x2000"> + <dataarea name="sram" size="8192" width="16" endianness="little"> </dataarea> </part> </software> diff --git a/src/devices/bus/wswan/rom.cpp b/src/devices/bus/wswan/rom.cpp index 68d4c1d0500..9b1501c885f 100644 --- a/src/devices/bus/wswan/rom.cpp +++ b/src/devices/bus/wswan/rom.cpp @@ -24,9 +24,10 @@ enum DEFINE_DEVICE_TYPE(WS_ROM_STD, ws_rom_device, "ws_rom", "Wonderswan Standard Carts") DEFINE_DEVICE_TYPE(WS_ROM_SRAM, ws_rom_sram_device, "ws_sram", "Wonderswan Carts w/SRAM") DEFINE_DEVICE_TYPE(WS_ROM_EEPROM, ws_rom_eeprom_device, "ws_eeprom", "Wonderswan Carts w/EEPROM") +DEFINE_DEVICE_TYPE(WS_ROM_WWITCH, ws_wwitch_device, "ws_wwitch", "WonderWitch") -ws_rom_device::ws_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +ws_rom_device::ws_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, type, tag, owner, clock), device_ws_cart_interface(mconfig, *this), m_base20(0), @@ -45,25 +46,35 @@ ws_rom_device::ws_rom_device(const machine_config &mconfig, device_type type, co { } -ws_rom_device::ws_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ws_rom_device::ws_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : ws_rom_device(mconfig, WS_ROM_STD, tag, owner, clock) { } -ws_rom_sram_device::ws_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ws_rom_sram_device::ws_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : ws_rom_device(mconfig, WS_ROM_SRAM, tag, owner, clock), m_nvram_base(0) { } +ws_rom_sram_device::ws_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : + ws_rom_device(mconfig, type, tag, owner, clock), + m_nvram_base(0) +{ +} -ws_rom_eeprom_device::ws_rom_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ws_rom_eeprom_device::ws_rom_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : ws_rom_device(mconfig, WS_ROM_EEPROM, tag, owner, clock), m_eeprom_mode(0), m_eeprom_address(0), m_eeprom_command(0), m_eeprom_start(0), m_eeprom_write_enabled(0) { } +ws_wwitch_device::ws_wwitch_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : + ws_rom_sram_device(mconfig, WS_ROM_WWITCH, tag, owner, clock) +{ +} + //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- @@ -91,15 +102,17 @@ void ws_rom_device::device_start() save_item(NAME(m_rtc_minute)); save_item(NAME(m_rtc_second)); save_item(NAME(m_rtc_index)); + save_item(NAME(m_rom_mask)); } void ws_rom_device::device_reset() { - m_base20 = ((0xff & m_bank_mask) << 16) & (m_rom_size - 1); - m_base30 = ((0xff & m_bank_mask) << 16) & (m_rom_size - 1); - m_base40 = (((0xf0 & m_bank_mask) | 4) << 16) & (m_rom_size - 1); + m_rom_mask = (m_rom_size >> 1) - 1; + m_base20 = ((0xff & m_bank_mask) << 15) & m_rom_mask; + m_base30 = ((0xff & m_bank_mask) << 15) & m_rom_mask; + m_base40 = (((0xf0 & m_bank_mask) | 4) << 15) & m_rom_mask; - memset(m_io_regs, 0, sizeof(m_io_regs)); + memset(m_io_regs, 0xff, sizeof(m_io_regs)); // Initialize RTC m_rtc_index = 0; @@ -135,6 +148,30 @@ void ws_rom_eeprom_device::device_start() save_item(NAME(m_eeprom_write_enabled)); } +void ws_wwitch_device::device_start() +{ + save_item(NAME(m_flash_seq)); + save_item(NAME(m_flash_command)); + save_item(NAME(m_write_flash)); + save_item(NAME(m_writing_flash)); + save_item(NAME(m_write_resetting)); + save_item(NAME(m_flash_mode)); + save_item(NAME(m_flash_status)); + ws_rom_sram_device::device_start(); +} + +void ws_wwitch_device::device_reset() +{ + m_flash_seq = 0; + m_flash_command = 0; + m_write_flash = false; + m_writing_flash = false; + m_write_resetting = false; + m_flash_mode = READ_MODE; + m_flash_status = 0; + ws_rom_sram_device::device_reset(); +} + void ws_rom_eeprom_device::device_reset() { m_eeprom_address = 0; @@ -205,48 +242,52 @@ void ws_rom_device::device_timer(emu_timer &timer, device_timer_id id, int param mapper specific handlers -------------------------------------------------*/ -uint8_t ws_rom_device::read_rom20(offs_t offset) +u16 ws_rom_device::read_rom20(offs_t offset, u16 mem_mask) { return m_rom[offset + m_base20]; } -uint8_t ws_rom_device::read_rom30(offs_t offset) +u16 ws_rom_device::read_rom30(offs_t offset, u16 mem_mask) { return m_rom[offset + m_base30]; } -uint8_t ws_rom_device::read_rom40(offs_t offset) +u16 ws_rom_device::read_rom40(offs_t offset, u16 mem_mask) { // we still need to mask in some cases, e.g. when game is 512K - return m_rom[(offset + m_base40) & (m_rom_size - 1)]; + return m_rom[(offset + m_base40) & m_rom_mask]; } -uint8_t ws_rom_device::read_io(offs_t offset) +u16 ws_rom_device::read_io(offs_t offset, u16 mem_mask) { - uint8_t value = m_io_regs[offset]; + u16 value = m_io_regs[offset]; switch (offset) { - case 0x0b: // RTC data + case 0x0a / 2: if (!m_has_rtc) break; - if (m_io_regs[0x0a] == 0x95 && (m_rtc_index < 7)) + // RTC data + if (ACCESSING_BITS_8_15) { - switch (m_rtc_index) + if ((m_io_regs[0x0a / 2] & 0xff) == 0x95 && (m_rtc_index < 7)) { - case 0: value = m_rtc_year; break; - case 1: value = m_rtc_month; break; - case 2: value = m_rtc_day; break; - case 3: value = m_rtc_day_of_week; break; - case 4: value = m_rtc_hour; break; - case 5: value = m_rtc_minute; break; - case 6: value = m_rtc_second; break; + switch (m_rtc_index) + { + case 0: value = (value & 0xff) | (m_rtc_year << 8); break; + case 1: value = (value & 0xff) | (m_rtc_month << 8); break; + case 2: value = (value & 0xff) | (m_rtc_day << 8); break; + case 3: value = (value & 0xff) | (m_rtc_day_of_week << 8); break; + case 4: value = (value & 0xff) | (m_rtc_hour << 8); break; + case 5: value = (value & 0xff) | (m_rtc_minute << 8); break; + case 6: value = (value & 0xff) | (m_rtc_second << 8); break; + } + m_rtc_index++; } - m_rtc_index++; } break; } @@ -254,146 +295,164 @@ uint8_t ws_rom_device::read_io(offs_t offset) return value; } -void ws_rom_device::write_io(offs_t offset, uint8_t data) +void ws_rom_device::write_io(offs_t offset, u16 data, u16 mem_mask) { switch (offset) { - case 0x00: - // Bit 0-3 - ROM bank base register for segments 3-15 + case 0x00 / 2: + // Bit 0-3 - ROM bank base register for segments 4-15 // Bit 4-7 - Unknown - data = ((data & 0x0f) << 4) | 4; - m_base40 = ((data & m_bank_mask) << 16) & (m_rom_size - 1); - break; - case 0x02: // ROM bank for segment 2 (0x20000 - 0x2ffff) - m_base20 = ((data & m_bank_mask) << 16) & (m_rom_size - 1); - break; - case 0x03: // ROM bank for segment 3 (0x30000 - 0x3ffff) - m_base30 = ((data & m_bank_mask) << 16) & (m_rom_size - 1); + if (ACCESSING_BITS_0_7) + { + m_base40 = (((((data & 0x0f) << 4) | 4) & m_bank_mask) << 15) & m_rom_mask; + } break; - case 0x0a: // RTC Command - // Bit 0-4 - RTC command - // 10000 - Reset - // 10010 - Write timer settings (alarm) - // 10011 - Read timer settings (alarm) - // 10100 - Set time/date - // 10101 - Get time/date - // Bit 5-6 - Unknown - // Bit 7 - Command done (read only) - if (!m_has_rtc) - break; - - switch (data) + case 0x02 / 2: + // ROM bank for segment 2 (0x20000 - 0x2ffff) + if (ACCESSING_BITS_0_7) { - case 0x10: // Reset - m_rtc_index = 8; - m_rtc_year = 0; - m_rtc_month = 1; - m_rtc_day = 1; - m_rtc_day_of_week = 0; - m_rtc_hour = 0; - m_rtc_minute = 0; - m_rtc_second = 0; - m_rtc_setting = 0xff; - data |= 0x80; - break; - case 0x12: // Write Timer Settings (Alarm) - m_rtc_index = 8; - m_rtc_setting = m_io_regs[0x0b]; - data |= 0x80; - break; - case 0x13: // Read Timer Settings (Alarm) - m_rtc_index = 8; - m_io_regs[0x0b] = m_rtc_setting; - data |= 0x80; - break; - case 0x14: // Set Time/Date - m_rtc_year = m_io_regs[0x0b]; - m_rtc_index = 1; - data |= 0x80; - break; - case 0x15: // Get Time/Date - m_rtc_index = 0; - data |= 0x80; - m_io_regs[0x0b] = m_rtc_year; - break; - default: - logerror( "Unknown RTC command (%X) requested\n", data); + m_base20 = (((data & 0xff) & m_bank_mask) << 15) & m_rom_mask; + } + // ROM bank for segment 3 (0x30000 - 0x3ffff) + if (ACCESSING_BITS_8_15) + { + m_base30 = (((data >> 8) & m_bank_mask) << 15) & m_rom_mask; } break; - case 0x0b: // RTC Data + case 0x0a / 2: if (!m_has_rtc) break; - - if (m_io_regs[0x0a] == 0x94 && m_rtc_index < 7) + // RTC Command + // Bit 0-4 - RTC command + // 10000 - Reset + // 10010 - Write timer settings (alarm) + // 10011 - Read timer settings (alarm) + // 10100 - Set time/date + // 10101 - Get time/date + // Bit 5-6 - Unknown + // Bit 7 - Command done (read only) + if (ACCESSING_BITS_0_7) + { + switch (data & 0xff) + { + case 0x10: // Reset + m_rtc_index = 8; + m_rtc_year = 0; + m_rtc_month = 1; + m_rtc_day = 1; + m_rtc_day_of_week = 0; + m_rtc_hour = 0; + m_rtc_minute = 0; + m_rtc_second = 0; + m_rtc_setting = 0xff; + data |= 0x80; + break; + case 0x12: // Write Timer Settings (Alarm) + m_rtc_index = 8; + m_rtc_setting = m_io_regs[0x0a / 2] >> 8; + data |= 0x80; + break; + case 0x13: // Read Timer Settings (Alarm) + m_rtc_index = 8; + m_io_regs[0x0a / 2] = (m_io_regs[0x0a / 2] & 0x00ff) | (m_rtc_setting << 8); + data |= 0x80; + break; + case 0x14: // Set Time/Date + m_rtc_year = m_io_regs[0x0a / 2] >> 8; + m_rtc_index = 1; + data |= 0x80; + break; + case 0x15: // Get Time/Date + m_rtc_index = 0; + data |= 0x80; + m_io_regs[0x0a / 2] = (m_io_regs[0x0a / 2] & 0x00ff) | (m_rtc_year << 8); + break; + default: + logerror( "Unknown RTC command (%X) requested\n", data & 0xff); + } + } + // RTC Data + if (ACCESSING_BITS_8_15) { - switch (m_rtc_index) + if ((m_io_regs[0x0a / 2] & 0xff) == 0x94 && m_rtc_index < 7) { - case 0: m_rtc_year = data; break; - case 1: m_rtc_month = data; break; - case 2: m_rtc_day = data; break; - case 3: m_rtc_day_of_week = data; break; - case 4: m_rtc_hour = data; break; - case 5: m_rtc_minute = data; break; - case 6: m_rtc_second = data; break; + switch (m_rtc_index) + { + case 0: m_rtc_year = data >> 8; break; + case 1: m_rtc_month = data >> 8; break; + case 2: m_rtc_day = data >> 8; break; + case 3: m_rtc_day_of_week = data >> 8; break; + case 4: m_rtc_hour = data >> 8; break; + case 5: m_rtc_minute = data >> 8; break; + case 6: m_rtc_second = data >> 8; break; + } + m_rtc_index++; } - m_rtc_index++; } break; } - m_io_regs[offset] = data; + COMBINE_DATA(&m_io_regs[offset]); } -uint8_t ws_rom_sram_device::read_ram(offs_t offset) +u16 ws_rom_sram_device::read_ram(offs_t offset, u16 mem_mask) { - return m_nvram[m_nvram_base + offset]; + u32 nvram_address = (m_nvram_base + (offset << 1)) & (m_nvram_size - 1); + return m_nvram[nvram_address] | (m_nvram[nvram_address + 1] << 8); } -void ws_rom_sram_device::write_ram(offs_t offset, uint8_t data) +void ws_rom_sram_device::write_ram(offs_t offset, u16 data, u16 mem_mask) { - m_nvram[m_nvram_base + offset] = data; + u32 nvram_address = (m_nvram_base + (offset << 1)) & (m_nvram_size - 1); + if (ACCESSING_BITS_0_7) + m_nvram[nvram_address] = data & 0xff; + if (ACCESSING_BITS_8_15) + m_nvram[nvram_address + 1] = data >> 8; } -void ws_rom_sram_device::write_io(offs_t offset, uint8_t data) +void ws_rom_sram_device::write_io(offs_t offset, u16 data, u16 mem_mask) { switch (offset) { - case 0x01: // SRAM bank to select - m_nvram_base = (data * 0x10000) & (m_nvram.size() - 1); + case 0x00 / 2: + // SRAM bank to select + if (ACCESSING_BITS_8_15) + { + m_nvram_base = ((data >> 8) * 0x10000) & (m_nvram.size() - 1); + } [[fallthrough]]; default: - ws_rom_device::write_io(offset, data); + ws_rom_device::write_io(offset, data, mem_mask); break; } } -uint8_t ws_rom_eeprom_device::read_io(offs_t offset) +u16 ws_rom_eeprom_device::read_io(offs_t offset, u16 mem_mask) { - uint8_t value = m_io_regs[offset]; + u16 value = m_io_regs[offset]; switch (offset) { - case 0x04: - case 0x05: - case 0x06: - case 0x07: - case 0x08: + case 0x04 / 2: + case 0x06 / 2: + case 0x08 / 2: // EEPROM reads, taken from regs break; default: - value = ws_rom_device::read_io(offset); + value = ws_rom_device::read_io(offset, mem_mask); break; } return value; } -void ws_rom_eeprom_device::write_io(offs_t offset, uint8_t data) +void ws_rom_eeprom_device::write_io(offs_t offset, u16 data, u16 mem_mask) { switch (offset) { - case 0x06: /* EEPROM address lower bits port/EEPROM address and command port + case 0x06 / 2: + /* EEPROM address lower bits port/EEPROM address and command port 1KBit EEPROM: Bit 0-5 - EEPROM address bit 1-6 Bit 6-7 - Command @@ -408,27 +467,28 @@ void ws_rom_eeprom_device::write_io(offs_t offset, uint8_t data) 16KBit EEPROM: Bit 0-7 - EEPROM address bit 1-8 */ - switch (m_eeprom_mode) + if (ACCESSING_BITS_0_7) { - case EEPROM_1K: + switch (m_eeprom_mode) + { + case EEPROM_1K: m_eeprom_address = data & 0x3f; - m_eeprom_command = data >> 4; - if ((m_eeprom_command & 0x0c) != 0x00) - m_eeprom_command = m_eeprom_command & 0x0c; - break; + m_eeprom_command = (data >> 4) & 0x0f; + if ((m_eeprom_command & 0x0c) != 0x00) + m_eeprom_command = m_eeprom_command & 0x0c; + break; - case EEPROM_8K: - case EEPROM_16K: - m_eeprom_address = (m_eeprom_address & 0xff00) | data; - break; + case EEPROM_8K: + case EEPROM_16K: + m_eeprom_address = (m_eeprom_address & 0xff00) | (data & 0xff); + break; - default: - logerror( "Write EEPROM address/register register C6 for unsupported EEPROM type\n" ); - break; + default: + logerror( "Write EEPROM address/register register C6 for unsupported EEPROM type\n" ); + break; + } } - break; - - case 0x07: /* EEPROM higher bits/command bits port + /* EEPROM higher bits/command bits port 1KBit EEPROM: Bit 0 - Start Bit 1-7 - Unknown @@ -446,35 +506,39 @@ void ws_rom_eeprom_device::write_io(offs_t offset, uint8_t data) Bit 4 - Start Bit 5-7 - Unknown */ - switch (m_eeprom_mode) + if (ACCESSING_BITS_8_15) { - case EEPROM_1K: - m_eeprom_start = data & 0x01; - break; + switch (m_eeprom_mode) + { + case EEPROM_1K: + m_eeprom_start = (data >> 8) & 0x01; + break; - case EEPROM_8K: - m_eeprom_address = ((data & 0x01) << 8) | (m_eeprom_address & 0xff); - m_eeprom_command = data & 0x0f; - if ((m_eeprom_command & 0x0c) != 0x00) - m_eeprom_command = m_eeprom_command & 0x0c; - m_eeprom_start = (data >> 4) & 0x01; - break; + case EEPROM_8K: + m_eeprom_address = (data & 0x0100) | (m_eeprom_address & 0xff); + m_eeprom_command = (data >> 8) & 0x0f; + if ((m_eeprom_command & 0x0c) != 0x00) + m_eeprom_command = m_eeprom_command & 0x0c; + m_eeprom_start = (data >> 12) & 0x01; + break; - case EEPROM_16K: - m_eeprom_address = ((data & 0x03) << 8) | (m_eeprom_address & 0xff); - m_eeprom_command = data & 0x0f; - if ((m_eeprom_command & 0x0c) != 0x00) - m_eeprom_command = m_eeprom_command & 0x0c; - m_eeprom_start = (data >> 4) & 0x01; - break; + case EEPROM_16K: + m_eeprom_address = (data & 0x0300) | (m_eeprom_address & 0xff); + m_eeprom_command = (data >> 8) & 0x0f; + if ((m_eeprom_command & 0x0c) != 0x00) + m_eeprom_command = m_eeprom_command & 0x0c; + m_eeprom_start = (data >> 12) & 0x01; + break; - default: - logerror( "Write EEPROM address/command register C7 for unsupported EEPROM type\n" ); - break; + default: + logerror( "Write EEPROM address/command register C7 for unsupported EEPROM type\n" ); + break; + } } break; - case 0x08: /* EEPROM command + case 0x08 / 2: + /* EEPROM command Bit 0 - Read complete (read only) Bit 1 - Write complete (read only) Bit 2-3 - Unknown @@ -483,57 +547,200 @@ void ws_rom_eeprom_device::write_io(offs_t offset, uint8_t data) Bit 6 - Protect Bit 7 - Initialize */ - if (data & 0x80) // Initialize - logerror("Unsupported EEPROM command 'Initialize'\n"); - - if (data & 0x40) // Protect + if (ACCESSING_BITS_0_7) { - switch (m_eeprom_command) - { - case 0x00: - m_eeprom_write_enabled = 0; - data |= 0x02; - break; - case 0x03: - m_eeprom_write_enabled = 1; - data |= 0x02; - break; - default: - logerror("Unsupported 'Protect' command %X\n", m_eeprom_command); - break; - } - } + if (data & 0x80) // Initialize + logerror("Unsupported EEPROM command 'Initialize'\n"); - if (data & 0x20) // Write - { - if (m_eeprom_write_enabled) + if (data & 0x40) // Protect { switch (m_eeprom_command) { - case 0x04: - m_nvram[(m_eeprom_address << 1) + 1] = m_io_regs[0x04]; - m_nvram[m_eeprom_address << 1] = m_io_regs[0x05]; + case 0x00: + m_eeprom_write_enabled = 0; + data |= 0x02; + break; + case 0x03: + m_eeprom_write_enabled = 1; data |= 0x02; break; default: - logerror("Unsupported 'Write' command %X\n", m_eeprom_command); + logerror("Unsupported 'Protect' command %X\n", m_eeprom_command); break; } } - } - if (data & 0x10) // Read - { - m_io_regs[0x04] = m_nvram[(m_eeprom_address << 1) + 1]; - m_io_regs[0x05] = m_nvram[m_eeprom_address << 1]; - data |= 0x01; + if (data & 0x20) // Write + { + if (m_eeprom_write_enabled) + { + switch (m_eeprom_command) + { + case 0x04: + m_nvram[(m_eeprom_address << 1) + 1] = m_io_regs[0x04 / 2] & 0xff; + m_nvram[m_eeprom_address << 1] = m_io_regs[0x04 / 2] >> 8; + data |= 0x02; + break; + default: + logerror("Unsupported 'Write' command %X\n", m_eeprom_command); + break; + } + } + } + + if (data & 0x10) // Read + { + m_io_regs[0x04] = m_nvram[(m_eeprom_address << 1) + 1]; + m_io_regs[0x05] = m_nvram[m_eeprom_address << 1]; + data |= 0x01; + } } break; default: - ws_rom_device::write_io(offset, data); + ws_rom_device::write_io(offset, data, mem_mask); break; } - m_io_regs[offset] = data; + COMBINE_DATA(&m_io_regs[offset]); +} + + +u16 ws_wwitch_device::read_ram(offs_t offset, u16 mem_mask) +{ + if (m_flash_mode == COMMAND_MODE) + { + if (!machine().side_effects_disabled()) + { + if (m_writing_flash) + { + m_flash_status ^= 0x40; + m_flash_count++; + if (m_flash_count > 4) { + m_writing_flash = false; + m_flash_mode = READ_MODE; + } + } + // After initiating an erase block command the wwitch expects to see bit 7 set + if (m_flash_command == 0x30) + { + m_flash_status |= 0x80; + m_flash_mode = READ_MODE; + } + } + return m_flash_status; + } + if (m_io_regs[0x01] >= 8 && m_io_regs[0x01] < 16) + { + return m_rom[((m_io_regs[0x01] * 0x8000) | offset) & m_rom_mask]; + } + if (m_io_regs[0x01] < 8) + { + return ws_rom_sram_device::read_ram(offset, mem_mask); + } + else + { + return 0xffff; + } +} + + +void ws_wwitch_device::write_ram(offs_t offset, u16 data, u16 mem_mask) +{ + if (m_flash_seq == 0 && offset == (0xaaa >> 1) && ACCESSING_BITS_0_7 && data == 0xaa) + { + m_flash_seq = 1; + } + else if (m_flash_seq == 1 && offset == (0x555 >> 1) && ACCESSING_BITS_8_15 && data == 0x55) + { + m_flash_seq = 2; + } + else if (m_flash_seq == 2 && offset == (0xaaa >> 1) && ACCESSING_BITS_0_7) + { + switch (data) + { + case 0x10: // Chip erase + if (m_flash_command == 0x80) + { + // TODO + } + break; + case 0x20: // Set to fast mode + m_flash_command = data; + m_flash_mode = COMMAND_MODE; + break; + case 0x30: // (Erase) block + // TODO: Any write to a block address triggers the block erase + if (m_flash_command == 0x80) + { + if ((m_io_regs[0x01] & 0x07) < 7) + { + u32 block_base = (m_io_regs[0x01] & 0x07) << 15; + for (u32 address = 0; address < 0x8000; address++) + { + m_rom[(block_base | address) & m_rom_mask] = 0xffff; + } + } + + m_flash_command = data; + m_flash_mode = COMMAND_MODE; + } + break; + case 0x80: // Erase (chip or block) + m_flash_command = data; + break; + default: // Unknown command + m_flash_command = 0; + } + m_flash_seq = 0; + } + else if (m_io_regs[0x01] >= 8 && m_io_regs[0x01] < 15) + { + if (m_write_flash) + { + // perform write + if (!ACCESSING_BITS_0_7) + data |= 0xff; + if (!ACCESSING_BITS_8_15) + data |= 0xff00; + m_rom[((m_io_regs[0x01] * 0x8000) | offset) & m_rom_mask] &= data; + m_flash_status = (m_flash_status & 0x7f) | ((data ^ 0x80) & 0x80); + m_writing_flash = true; + m_flash_count = 0; + m_write_flash = false; + } + else if (m_flash_command == 0x20) + { + switch (data) + { + case 0x00: + if (m_write_resetting) + { + m_write_flash = false; + m_write_resetting = false; + m_flash_mode = READ_MODE; + } + break; + case 0xF0: // Reset from fast mode #2 + m_write_flash = false; + m_write_resetting = false; + m_flash_mode = READ_MODE; + break; + case 0x90: // Reset from fast mode #1 + m_write_resetting = true; + break; + case 0xA0: // Fast program + if (m_flash_command == 0x20) + { + m_write_flash = true; + m_flash_mode = COMMAND_MODE; + } + break; + } + } + } + else if (m_io_regs[0x01] < 8) + { + ws_rom_sram_device::write_ram(offset, data, mem_mask); + } } diff --git a/src/devices/bus/wswan/rom.h b/src/devices/bus/wswan/rom.h index 916562ab6e2..e61efd904de 100644 --- a/src/devices/bus/wswan/rom.h +++ b/src/devices/bus/wswan/rom.h @@ -13,38 +13,39 @@ class ws_rom_device : public device_t, { public: // construction/destruction - ws_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ws_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // reading and writing - virtual uint8_t read_rom20(offs_t offset) override; - virtual uint8_t read_rom30(offs_t offset) override; - virtual uint8_t read_rom40(offs_t offset) override; - virtual uint8_t read_io(offs_t offset) override; - virtual void write_io(offs_t offset, uint8_t data) override; + virtual u16 read_rom20(offs_t offset, u16 mem_mask) override; + virtual u16 read_rom30(offs_t offset, u16 mem_mask) override; + virtual u16 read_rom40(offs_t offset, u16 mem_mask) override; + virtual u16 read_io(offs_t offset, u16 mem_mask) override; + virtual void write_io(offs_t offset, u16 data, u16 mem_mask) override; protected: static constexpr device_timer_id TIMER_RTC = 0; - ws_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ws_rom_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 void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - uint8_t m_io_regs[0x10]; - uint32_t m_base20, m_base30, m_base40; + u16 m_io_regs[8]; + u32 m_base20, m_base30, m_base40; + u32 m_rom_mask; // RTC - uint8_t m_rtc_setting; /* Timer setting byte */ - uint8_t m_rtc_year; /* Year */ - uint8_t m_rtc_month; /* Month */ - uint8_t m_rtc_day; /* Day */ - uint8_t m_rtc_day_of_week; /* Day of the week */ - uint8_t m_rtc_hour; /* Hour, high bit = 0 => AM, high bit = 1 => PM */ - uint8_t m_rtc_minute; /* Minute */ - uint8_t m_rtc_second; /* Second */ - uint8_t m_rtc_index; /* index for reading/writing of current of alarm time */ + u8 m_rtc_setting; /* Timer setting byte */ + u8 m_rtc_year; /* Year */ + u8 m_rtc_month; /* Month */ + u8 m_rtc_day; /* Day */ + u8 m_rtc_day_of_week; /* Day of the week */ + u8 m_rtc_hour; /* Hour, high bit = 0 => AM, high bit = 1 => PM */ + u8 m_rtc_minute; /* Minute */ + u8 m_rtc_second; /* Second */ + u8 m_rtc_index; /* index for reading/writing of current of alarm time */ emu_timer *rtc_timer; }; @@ -56,20 +57,22 @@ class ws_rom_sram_device : public ws_rom_device { public: // construction/destruction - ws_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ws_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // reading and writing - virtual uint8_t read_ram(offs_t offset) override; - virtual void write_ram(offs_t offset, uint8_t data) override; - virtual void write_io(offs_t offset, uint8_t data) override; + virtual u16 read_ram(offs_t offset, u16 mem_mask) override; + virtual void write_ram(offs_t offset, u16 data, u16 mem_mask) override; + virtual void write_io(offs_t offset, u16 data, u16 mem_mask) override; protected: + ws_rom_sram_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; private: - uint32_t m_nvram_base; + u32 m_nvram_base; }; @@ -79,11 +82,11 @@ class ws_rom_eeprom_device : public ws_rom_device { public: // construction/destruction - ws_rom_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ws_rom_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // reading and writing - virtual uint8_t read_io(offs_t offset) override; - virtual void write_io(offs_t offset, uint8_t data) override; + virtual u16 read_io(offs_t offset, u16 mem_mask) override; + virtual void write_io(offs_t offset, u16 data, u16 mem_mask) override; protected: // device-level overrides @@ -91,18 +94,49 @@ protected: virtual void device_reset() override; private: - uint8_t m_eeprom_mode; /* eeprom mode */ - uint16_t m_eeprom_address; /* Read/write address */ - uint8_t m_eeprom_command; /* Commands: 00, 01, 02, 03, 04, 08, 0C */ - uint8_t m_eeprom_start; /* start bit */ - uint8_t m_eeprom_write_enabled; /* write enabled yes/no */ + u8 m_eeprom_mode; /* eeprom mode */ + u16 m_eeprom_address; /* Read/write address */ + u8 m_eeprom_command; /* Commands: 00, 01, 02, 03, 04, 08, 0C */ + u8 m_eeprom_start; /* start bit */ + u8 m_eeprom_write_enabled; /* write enabled yes/no */ }; +class ws_wwitch_device : public ws_rom_sram_device +{ +public: + // construction/destruction + ws_wwitch_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + // reading and writing + virtual u16 read_ram(offs_t offset, u16 mem_mask) override; + virtual void write_ram(offs_t offset, u16 data, u16 mem_mask) override; + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + +private: + enum { + READ_MODE = 0, + COMMAND_MODE + }; + u8 m_flash_seq; + u8 m_flash_command; + bool m_write_flash; + bool m_writing_flash; + bool m_write_resetting; + u8 m_flash_mode; + u8 m_flash_status; + u8 m_flash_count; +}; + // device type definition DECLARE_DEVICE_TYPE(WS_ROM_STD, ws_rom_device) DECLARE_DEVICE_TYPE(WS_ROM_SRAM, ws_rom_sram_device) DECLARE_DEVICE_TYPE(WS_ROM_EEPROM, ws_rom_eeprom_device) +DECLARE_DEVICE_TYPE(WS_ROM_WWITCH, ws_wwitch_device) #endif // MAME_BUS_WSWAN_ROM_H diff --git a/src/devices/bus/wswan/slot.cpp b/src/devices/bus/wswan/slot.cpp index fd0c8cdc9fa..7cb338e2cc9 100644 --- a/src/devices/bus/wswan/slot.cpp +++ b/src/devices/bus/wswan/slot.cpp @@ -29,9 +29,9 @@ device_ws_cart_interface::device_ws_cart_interface(const machine_config &mconfig device_interface(device, "wswancart"), m_rom(nullptr), m_rom_size(0), + m_nvram_size(0), m_bank_mask(0), - m_has_rtc(false), - m_is_rotated(false) + m_has_rtc(false) { } @@ -48,11 +48,11 @@ device_ws_cart_interface::~device_ws_cart_interface() // rom_alloc - alloc the space for the cart //------------------------------------------------- -void device_ws_cart_interface::rom_alloc(uint32_t size, const char *tag) +void device_ws_cart_interface::rom_alloc(u32 size, const char *tag) { if (m_rom == nullptr) { - m_rom = device().machine().memory().region_alloc(std::string(tag).append(WSSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = (u16 *)device().machine().memory().region_alloc(std::string(tag).append(WSSLOT_ROM_REGION_TAG).c_str(), size, 2, ENDIANNESS_LITTLE)->base(); m_rom_size = size; m_bank_mask = ((m_rom_size >> 16) - 1); } @@ -63,8 +63,9 @@ void device_ws_cart_interface::rom_alloc(uint32_t size, const char *tag) // nvram_alloc - alloc the space for the ram //------------------------------------------------- -void device_ws_cart_interface::nvram_alloc(uint32_t size) +void device_ws_cart_interface::nvram_alloc(u32 size) { + m_nvram_size = size; m_nvram.resize(size); } @@ -76,7 +77,7 @@ void device_ws_cart_interface::nvram_alloc(uint32_t size) //------------------------------------------------- // ws_cart_slot_device - constructor //------------------------------------------------- -ws_cart_slot_device::ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ws_cart_slot_device::ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, WS_CART_SLOT, tag, owner, clock), device_image_interface(mconfig, *this), device_single_card_slot_interface<device_ws_cart_interface>(mconfig, *this), @@ -119,7 +120,8 @@ static const ws_slot slot_list[] = { { WS_STD, "ws_rom" }, { WS_SRAM, "ws_sram" }, - { WS_EEPROM, "ws_eeprom" } + { WS_EEPROM, "ws_eeprom" }, + { WWITCH, "wwitch"} }; static int ws_get_pcb_id(const char *slot) @@ -153,9 +155,9 @@ image_init_result ws_cart_slot_device::call_load() { if (m_cart) { - uint8_t *ROM; - uint32_t size = !loaded_through_softlist() ? length() : get_software_region_length("rom"); - uint32_t nvram_size = 0; + u16 *ROM; + u32 size = !loaded_through_softlist() ? length() : get_software_region_length("rom"); + u32 nvram_size = 0; m_cart->rom_alloc(size, tag()); ROM = m_cart->get_rom_base(); @@ -167,14 +169,11 @@ image_init_result ws_cart_slot_device::call_load() if (!loaded_through_softlist()) { - int chunks = size / 0x10000; // get cart type and nvram length m_type = get_cart_type(ROM, size, nvram_size); - if (ROM[(chunks - 1) * 0x10000 + 0xfffd]) + if (ROM[(size >> 1) - 2] & 0xff00) m_cart->set_has_rtc(true); - if (ROM[(chunks - 1) * 0x10000 + 0xfffc] & 0x01) - m_cart->set_is_rotated(true); } else { @@ -182,7 +181,7 @@ image_init_result ws_cart_slot_device::call_load() if (pcb_name) m_type = ws_get_pcb_id(pcb_name); - if (m_type == WS_SRAM) + if (m_type == WS_SRAM || m_type == WWITCH) nvram_size = get_software_region_length("sram"); if (m_type == WS_EEPROM) nvram_size = get_software_region_length("eeprom"); @@ -192,15 +191,8 @@ image_init_result ws_cart_slot_device::call_load() if (!core_stricmp(get_feature("rtc"), "yes")) m_cart->set_has_rtc(true); } - if (get_feature("rotated")) - { - if (!core_stricmp(get_feature("rotated"), "yes")) - m_cart->set_is_rotated(true); - } } - //printf("Type: %s\n", ws_get_slot(m_type)); - if (nvram_size) { // allocate NVRAM @@ -230,12 +222,11 @@ void ws_cart_slot_device::call_unload() get cart type from cart file -------------------------------------------------*/ -int ws_cart_slot_device::get_cart_type(const uint8_t *ROM, uint32_t len, uint32_t &nvram_len) const +int ws_cart_slot_device::get_cart_type(const u16 *ROM, u32 len, u32 &nvram_len) const { - int chunks = len / 0x10000; int type = WS_STD; - switch (ROM[(chunks - 1) * 0x10000 + 0xfffb]) + switch (ROM[(len >> 1) - 3] >> 8) { case 0x00: break; @@ -272,8 +263,7 @@ int ws_cart_slot_device::get_cart_type(const uint8_t *ROM, uint32_t len, uint32_ nvram_len = 0x800; break; default: - printf("Unknown RAM size [0x%X]\n", ROM[(chunks - 1) * 0x10000 + 0xfffb]); - logerror("Unknown RAM size [0x%X]\n", ROM[(chunks - 1) * 0x10000 + 0xfffb]); + logerror("Unknown RAM size [0x%X]\n", ROM[(len >> 1) - 3] >> 8); break; } @@ -289,10 +279,10 @@ std::string ws_cart_slot_device::get_default_card_software(get_default_card_soft if (hook.image_file()) { const char *slot_string; - uint32_t size = hook.image_file()->size(); - std::vector<uint8_t> rom(size); + u32 size = hook.image_file()->size(); + std::vector<u16> rom(size); int type; - uint32_t nvram; + u32 nvram; hook.image_file()->read(&rom[0], size); @@ -300,8 +290,6 @@ std::string ws_cart_slot_device::get_default_card_software(get_default_card_soft type = get_cart_type(&rom[0], size, nvram); slot_string = ws_get_slot(type); - //printf("type: %s\n", slot_string); - return std::string(slot_string); } @@ -312,80 +300,80 @@ std::string ws_cart_slot_device::get_default_card_software(get_default_card_soft read_rom20 -------------------------------------------------*/ -uint8_t ws_cart_slot_device::read_rom20(offs_t offset) +u16 ws_cart_slot_device::read_rom20(offs_t offset, u16 mem_mask) { if (m_cart) - return m_cart->read_rom20(offset); + return m_cart->read_rom20(offset, mem_mask); else - return 0xff; + return 0xffff; } /*------------------------------------------------- read_rom30 -------------------------------------------------*/ -uint8_t ws_cart_slot_device::read_rom30(offs_t offset) +u16 ws_cart_slot_device::read_rom30(offs_t offset, u16 mem_mask) { if (m_cart) - return m_cart->read_rom30(offset); + return m_cart->read_rom30(offset, mem_mask); else - return 0xff; + return 0xffff; } /*------------------------------------------------- read_rom40 -------------------------------------------------*/ -uint8_t ws_cart_slot_device::read_rom40(offs_t offset) +u16 ws_cart_slot_device::read_rom40(offs_t offset, u16 mem_mask) { if (m_cart) - return m_cart->read_rom40(offset); + return m_cart->read_rom40(offset, mem_mask); else - return 0xff; + return 0xffff; } /*------------------------------------------------- read_ram -------------------------------------------------*/ -uint8_t ws_cart_slot_device::read_ram(offs_t offset) +u16 ws_cart_slot_device::read_ram(offs_t offset, u16 mem_mask) { if (m_cart) - return m_cart->read_ram(offset); + return m_cart->read_ram(offset, mem_mask); else - return 0xff; + return 0xffff; } /*------------------------------------------------- write_ram -------------------------------------------------*/ -void ws_cart_slot_device::write_ram(offs_t offset, uint8_t data) +void ws_cart_slot_device::write_ram(offs_t offset, u16 data, u16 mem_mask) { if (m_cart) - m_cart->write_ram(offset, data); + m_cart->write_ram(offset, data, mem_mask); } /*------------------------------------------------- read_io -------------------------------------------------*/ -uint8_t ws_cart_slot_device::read_io(offs_t offset) +u16 ws_cart_slot_device::read_io(offs_t offset, u16 mem_mask) { if (m_cart) - return m_cart->read_io(offset); + return m_cart->read_io(offset & 0x07, mem_mask); else - return 0xff; + return 0xffff; } /*------------------------------------------------- write_io -------------------------------------------------*/ -void ws_cart_slot_device::write_io(offs_t offset, uint8_t data) +void ws_cart_slot_device::write_io(offs_t offset, u16 data, u16 mem_mask) { if (m_cart) - m_cart->write_io(offset, data); + m_cart->write_io(offset & 0x07, data, mem_mask); } @@ -398,36 +386,37 @@ static const char *const sram_str[] = { "none", "64Kbit SRAM", "256Kbit SRAM", " static const char *const eeprom_str[] = { "none", "1Kbit EEPROM", "16Kbit EEPROM", "Unknown", "Unknown", "8Kbit EEPROM" }; static const char *const romsize_str[] = { "Unknown", "Unknown", "4Mbit", "8Mbit", "16Mbit", "Unknown", "32Mbit", "Unknown", "64Mbit", "128Mbit" }; -void ws_cart_slot_device::internal_header_logging(uint8_t *ROM, uint32_t offs, uint32_t len) +void ws_cart_slot_device::internal_header_logging(const u16 *ROM, u32 offs, u32 len) { - int sum = 0, banks = len / 0x10000; - uint8_t romsize, ramtype, ramsize; - romsize = ROM[offs + 0xfffa]; - ramtype = (ROM[offs + 0xfffb] & 0xf0) ? 1 : 0; // 1 = EEPROM, 0 = SRAM - ramsize = ramtype ? ((ROM[offs + 0xfffb] & 0xf0) >> 4) : (ROM[offs + 0xfffb] & 0x0f); - + const int banks = len / 0x10000; + const int words = len >> 1; + const u8 romsize = ROM[words - 3] & 0xff; + const u8 ramtype = (ROM[words - 3] & 0xf000) ? 1 : 0; // 1 = EEPROM, 0 = SRAM + const u8 ramsize = ramtype ? (((ROM[words - 3] >> 8) & 0xf0) >> 4) : ((ROM[words - 3] >> 8) & 0x0f); + u16 sum = 0; logerror( "ROM DETAILS\n" ); logerror( "===========\n\n" ); - logerror("\tDeveloper ID: %X\n", ROM[offs + 0xfff6]); - logerror("\tMinimum system: %s\n", ROM[offs + 0xfff7] ? "WonderSwan Color" : "WonderSwan"); - logerror("\tCart ID: %X\n", ROM[offs + 0xfff8]); + logerror("\tDeveloper ID: %X\n", ROM[words - 5] & 0xff); + logerror("\tMinimum system: %s\n", ROM[words - 5] & 0xff00 ? "WonderSwan Color" : "WonderSwan"); + logerror("\tCart ID: %X\n", ROM[words - 4] & 0xff); logerror("\tROM size: %s\n", romsize_str[romsize]); if (ramtype) logerror("\tEEPROM size: %s\n", (ramsize < 6) ? eeprom_str[ramsize] : "Unknown"); else logerror("\tSRAM size: %s\n", (ramsize < 6) ? sram_str[ramsize] : "Unknown"); - logerror("\tFeatures: %X\n", ROM[offs + 0xfffc]); - logerror("\tRTC: %s\n", ROM[offs + 0xfffd] ? "yes" : "no"); + logerror("\tFeatures: %X\n", ROM[words - 2] & 0xff); + logerror("\tRTC: %s\n", (ROM[words - 2] & 0xff00) ? "yes" : "no"); for (int i = 0; i < banks; i++) { - for (int count = 0; count < 0x10000; count++) + for (int count = 0; count < 0x8000; count++) { - sum += ROM[(i * 0x10000) + count]; + sum += ROM[i * 0x8000 + count] & 0xff; + sum += ROM[i * 0x8000 + count] >> 8; } } - sum -= ROM[offs + 0xffff]; - sum -= ROM[offs + 0xfffe]; + sum -= ROM[words - 1] & 0xff; + sum -= ROM[words - 1] >> 8; sum &= 0xffff; - logerror("\tChecksum: %.2X%.2X (calculated: %04X)\n", ROM[offs + 0xffff], ROM[offs + 0xfffe], sum); + logerror("\tChecksum: %04X (calculated: %04X)\n", ROM[words - 1], sum); } diff --git a/src/devices/bus/wswan/slot.h b/src/devices/bus/wswan/slot.h index 85bda911c89..21abdb7fc13 100644 --- a/src/devices/bus/wswan/slot.h +++ b/src/devices/bus/wswan/slot.h @@ -79,7 +79,8 @@ enum { WS_STD = 0, WS_SRAM, - WS_EEPROM + WS_EEPROM, + WWITCH }; @@ -92,36 +93,35 @@ public: virtual ~device_ws_cart_interface(); // reading and writing - virtual uint8_t read_rom20(offs_t offset) { return 0xff; } - virtual uint8_t read_rom30(offs_t offset) { return 0xff; } - virtual uint8_t read_rom40(offs_t offset) { return 0xff; } - virtual uint8_t read_ram(offs_t offset) { return 0xff; } - virtual void write_ram(offs_t offset, uint8_t data) {} - virtual uint8_t read_io(offs_t offset) { return 0xff; } - virtual void write_io(offs_t offset, uint8_t data) { } - - void rom_alloc(uint32_t size, const char *tag); - void nvram_alloc(uint32_t size); - uint8_t* get_rom_base() { return m_rom; } + virtual u16 read_rom20(offs_t offset, u16 mem_mask) { return 0xffff; } + virtual u16 read_rom30(offs_t offset, u16 mem_mask) { return 0xffff; } + virtual u16 read_rom40(offs_t offset, u16 mem_mask) { return 0xffff; } + virtual u16 read_ram(offs_t offset, u16 mem_mask) { return 0xffff; } + virtual void write_ram(offs_t offset, u16 data, u16 mem_mask) {} + virtual u16 read_io(offs_t offset, u16 mem_mask) { return 0xffff; } + virtual void write_io(offs_t offset, u16 data, u16 mem_mask) { } + + void rom_alloc(u32 size, const char *tag); + void nvram_alloc(u32 size); + u16* get_rom_base() { return m_rom; } uint8_t* get_nvram_base() { return &m_nvram[0]; } uint32_t get_rom_size() { return m_rom_size; } uint32_t get_nvram_size() { return m_nvram.size(); } void save_nvram() { device().save_item(NAME(m_nvram)); } void set_has_rtc(bool val) { m_has_rtc = val; } - void set_is_rotated(bool val) { m_is_rotated = val; } - int get_is_rotated() { return m_is_rotated ? 1 : 0; } protected: device_ws_cart_interface(const machine_config &mconfig, device_t &device); // internal state - uint8_t *m_rom; - uint32_t m_rom_size; - std::vector<uint8_t> m_nvram; + u16 *m_rom; + u32 m_rom_size; + std::vector<u8> m_nvram; + u32 m_nvram_size; int m_bank_mask; - bool m_has_rtc, m_is_rotated; + bool m_has_rtc; }; @@ -134,7 +134,7 @@ class ws_cart_slot_device : public device_t, public: // construction/destruction template <typename T> - ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt) + ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&opts, const char *dflt) : ws_cart_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -142,7 +142,7 @@ public: set_default_option(dflt); set_fixed(false); } - ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual ~ws_cart_slot_device(); // image-level overrides @@ -162,20 +162,19 @@ public: virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; int get_type() { return m_type; } - int get_is_rotated() { return m_cart->get_is_rotated(); } - int get_cart_type(const uint8_t *ROM, uint32_t len, uint32_t &nvram_len) const; - void internal_header_logging(uint8_t *ROM, uint32_t offs, uint32_t len); + int get_cart_type(const u16 *ROM, u32 len, u32 &nvram_len) const; + void internal_header_logging(const u16 *ROM, u32 offs, u32 len); void save_nvram() { if (m_cart && m_cart->get_nvram_size()) m_cart->save_nvram(); } // reading and writing - virtual uint8_t read_rom20(offs_t offset); - virtual uint8_t read_rom30(offs_t offset); - virtual uint8_t read_rom40(offs_t offset); - virtual uint8_t read_ram(offs_t offset); - virtual void write_ram(offs_t offset, uint8_t data); - virtual uint8_t read_io(offs_t offset); - virtual void write_io(offs_t offset, uint8_t data); + virtual u16 read_rom20(offs_t offset, u16 mem_mask); + virtual u16 read_rom30(offs_t offset, u16 mem_mask); + virtual u16 read_rom40(offs_t offset, u16 mem_mask); + virtual u16 read_ram(offs_t offset, u16 mem_mask); + virtual void write_ram(offs_t offset, u16 data, u16 mem_mask); + virtual u16 read_io(offs_t offset, u16 mem_mask); + virtual void write_io(offs_t offset, u16 data, u16 mem_mask); protected: // device-level overrides diff --git a/src/devices/cpu/v30mz/v30mz.cpp b/src/devices/cpu/v30mz/v30mz.cpp index db96c6b92e5..2042932b1eb 100644 --- a/src/devices/cpu/v30mz/v30mz.cpp +++ b/src/devices/cpu/v30mz/v30mz.cpp @@ -2,43 +2,20 @@ // copyright-holders:Wilbert Pol,Bryan McPhail /**************************************************************************** - NEC V20/V30/V33 emulator modified to a v30mz emulator + v30mz emulator based on NEC V20/V30/V33 emulator. - (Re)Written June-September 2000 by Bryan McPhail (mish@tendril.co.uk) based - on code by Oliver Bergmann (Raul_Bloodworth@hotmail.com) who based code - on the i286 emulator by Fabrice Frances which had initial work based on - David Hedley's pcemu(!). - - This new core features 99% accurate cycle counts for each processor, - there are still some complex situations where cycle counts are wrong, - typically where a few instructions have differing counts for odd/even - source and odd/even destination memory operands. - - Flag settings are also correct for the NEC processors rather than the - I86 versions. - - Changelist: - - 22/02/2003: - Removed cycle counts from memory accesses - they are certainly wrong, - and there is already a memory access cycle penalty in the opcodes - using them. - - Fixed save states. - - Fixed ADJBA/ADJBS/ADJ4A/ADJ4S flags/return values for all situations. - (Fixes bugs in Geostorm and Thunderblaster) - - Fixed carry flag on NEG (I thought this had been fixed circa Mame 0.58, - but it seems I never actually submitted the fix). - - Fixed many cycle counts in instructions and bug in cycle count - macros (odd word cases were testing for odd instruction word address - not data address). + The internal details of the prefetch queue are not exactly known. We + keep a prefetch queue a 8 bytes even though the documentation mentions + a prefetch queue of 8 words/16 bytes. Using 8 bytes keeps the amount of + fetches limited on tight loops and is more than enough for the longest + instruction. Todo! - Double check cycle timing is 100%. - Fix memory interface (should be 16 bit). + - Double check cycle timing is 100%. + - Add penalties when BW, BP, SP, IX, IY etc are changed in the immediately + preceding instruction. + - wswan mjkiwame (at 0x40141) has rep in al,$b5 (f3 e4 b5). Should this + repeat the in instruction or is this a bug made by the programmer? ****************************************************************************/ @@ -48,11 +25,9 @@ #include "debugger.h" -enum SREGS { ES=0, CS, SS, DS }; +enum SREGS { DS1=0, PS, SS, DS0 }; enum WREGS { AW=0, CW, DW, BW, SP, BP, IX, IY }; -#define NEC_NMI_INT_VECTOR 2 - enum BREGS { AL = NATIVE_ENDIAN_VALUE_LE_BE(0x0, 0x1), AH = NATIVE_ENDIAN_VALUE_LE_BE(0x1, 0x0), @@ -72,6 +47,15 @@ enum BREGS { IYH = NATIVE_ENDIAN_VALUE_LE_BE(0xf, 0xe) }; +enum nec_irqs { + DIVIDE_ERROR_INT = 0, + BREAK_INT = 1, + NMI_INT = 2, + BRK_3_INT = 3, + BRKV_INT = 4, + CHKIND_INT = 5 +}; + #define CF (m_CarryVal!=0) #define SF (m_SignVal<0) @@ -82,35 +66,30 @@ enum BREGS { #define MD (m_MF!=0) -/***************************************************************************/ -/* cpu state */ -/***************************************************************************/ - - -/* The interrupt number of a pending external interrupt pending NMI is 2. */ -/* For INTR interrupts, the level is caught on the bus during an INTA cycle */ +// The interrupt number of a pending external interrupt pending NMI is 2. +// For INTR interrupts, the level is caught on the bus during an INTA cycle #define INT_IRQ 0x01 #define NMI_IRQ 0x02 -/***************************************************************************/ DEFINE_DEVICE_TYPE(V30MZ, v30mz_cpu_device, "v30mz", "NEC V30MZ") v30mz_cpu_device::v30mz_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cpu_device(mconfig, V30MZ, tag, owner, clock) - , m_program_config("program", ENDIANNESS_LITTLE, 8, 20, 0) - , m_io_config("io", ENDIANNESS_LITTLE, 8, 16, 0) + , m_program_config("program", ENDIANNESS_LITTLE, 16, 20, 0) + , m_io_config("io", ENDIANNESS_LITTLE, 16, 16, 0) , m_ip(0) , m_TF(0) , m_int_vector(0) , m_pc(0) + , m_vector_func(*this) { static const BREGS reg_name[8]={ AL, CL, DL, BL, AH, CH, DH, BH }; - /* Set up parity lookup table. */ - for (uint16_t i = 0;i < 256; i++) + // Set up parity lookup table. + for (uint16_t i = 0; i < 256; i++) { uint16_t c = 0; for (uint16_t j = i; j > 0; j >>= 1) @@ -128,11 +107,12 @@ v30mz_cpu_device::v30mz_cpu_device(const machine_config &mconfig, const char *ta for (uint16_t i = 0xc0; i < 0x100; i++) { - m_Mod_RM.RM.w[i] = (WREGS)( i & 7 ); + m_Mod_RM.RM.w[i] = (WREGS)(i & 7); m_Mod_RM.RM.b[i] = (BREGS)reg_name[i & 7]; } - memset(&m_regs, 0x00, sizeof(m_regs)); + std::fill(std::begin(m_regs.w), std::end(m_regs.w), 0); + std::fill(std::begin(m_prefetch_queue), std::end(m_prefetch_queue), 0); } device_memory_interface::space_config_vector v30mz_cpu_device::memory_space_config() const @@ -150,6 +130,8 @@ void v30mz_cpu_device::device_start() space(AS_PROGRAM).specific(m_program); space(AS_IO).specific(m_io); + m_vector_func.resolve_safe(0); + save_item(NAME(m_regs.w)); save_item(NAME(m_sregs)); save_item(NAME(m_ip)); @@ -169,23 +151,28 @@ void v30mz_cpu_device::device_start() save_item(NAME(m_ParityVal)); save_item(NAME(m_seg_prefix)); save_item(NAME(m_seg_prefix_next)); + save_item(NAME(m_pfp)); + save_item(NAME(m_prefetch_queue)); + save_item(NAME(m_prefetch_queue_head)); + save_item(NAME(m_prefetch_queue_tail)); // Register state for debugger -// state_add( NEC_PC, "PC", m_PC ).callimport().callexport().formatstr("%04X"); - state_add( NEC_IP, "IP", m_ip ).callimport().callexport().formatstr("%04X"); - state_add( NEC_SP, "SP", m_regs.w[SP] ).callimport().callexport().formatstr("%04X"); - state_add( NEC_AW, "AW", m_regs.w[AW] ).callimport().callexport().formatstr("%04X"); - state_add( NEC_CW, "CW", m_regs.w[CS] ).callimport().callexport().formatstr("%04X"); - state_add( NEC_DW, "DW", m_regs.w[DW] ).callimport().callexport().formatstr("%04X"); - state_add( NEC_BW, "BW", m_regs.w[BW] ).callimport().callexport().formatstr("%04X"); - state_add( NEC_BP, "BP", m_regs.w[BP] ).callimport().callexport().formatstr("%04X"); - state_add( NEC_IX, "IX", m_regs.w[IX] ).callimport().callexport().formatstr("%04X"); - state_add( NEC_IY, "IY", m_regs.w[IY] ).callimport().callexport().formatstr("%04X"); - state_add( NEC_ES, "ES", m_sregs[ES] ).callimport().callexport().formatstr("%04X"); - state_add( NEC_CS, "CS", m_sregs[CS] ).callimport().callexport().formatstr("%04X"); - state_add( NEC_SS, "SS", m_sregs[SS] ).callimport().callexport().formatstr("%04X"); - state_add( NEC_DS, "DS", m_sregs[DS] ).callimport().callexport().formatstr("%04X"); - state_add( NEC_VECTOR, "V", m_int_vector).callimport().callexport().formatstr("%02X"); + state_add(NEC_IP, "IP", m_ip).callimport().callexport().formatstr("%04X"); + state_add(NEC_SP, "SP", m_regs.w[SP]).callimport().callexport().formatstr("%04X"); + state_add(NEC_AW, "AW", m_regs.w[AW]).callimport().callexport().formatstr("%04X"); + state_add(NEC_BW, "BW", m_regs.w[BW]).callimport().callexport().formatstr("%04X"); + state_add(NEC_CW, "CW", m_regs.w[CW]).callimport().callexport().formatstr("%04X"); + state_add(NEC_DW, "DW", m_regs.w[DW]).callimport().callexport().formatstr("%04X"); + state_add(NEC_BP, "BP", m_regs.w[BP]).callimport().callexport().formatstr("%04X"); + state_add(NEC_IX, "IX", m_regs.w[IX]).callimport().callexport().formatstr("%04X"); + state_add(NEC_IY, "IY", m_regs.w[IY]).callimport().callexport().formatstr("%04X"); + state_add(NEC_PS, "PS", m_sregs[PS]).callimport().callexport().formatstr("%04X"); + state_add(NEC_SS, "SS", m_sregs[SS]).callimport().callexport().formatstr("%04X"); + state_add(NEC_DS0, "DS0", m_sregs[DS0]).callimport().callexport().formatstr("%04X"); + state_add(NEC_DS1, "DS1", m_sregs[DS1]).callimport().callexport().formatstr("%04X"); + state_add(NEC_FLAGS, "PSW", m_debugger_temp).callimport().callexport().formatstr("%04X"); + state_add(NEC_VECTOR, "V", m_int_vector).callimport().callexport().formatstr("%02X"); + state_add(NEC_PFP, "PFP", m_pfp).callimport().callexport().formatstr("%04X"); state_add(STATE_GENPC, "GENPC", m_pc).callexport().formatstr("%05X"); state_add(STATE_GENPCBASE, "CURPC", m_pc).callexport().formatstr("%05X"); @@ -195,18 +182,40 @@ void v30mz_cpu_device::device_start() } +void v30mz_cpu_device::state_import(const device_state_entry &entry) +{ + switch (entry.index()) + { + case NEC_FLAGS: + expand_flags(m_debugger_temp); + break; + } +} + + +void v30mz_cpu_device::state_export(const device_state_entry &entry) +{ + switch (entry.index()) + { + case NEC_FLAGS: + m_debugger_temp = compress_flags(); + break; + } +} + + void v30mz_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const { switch (entry.index()) { case STATE_GENPC: case STATE_GENPCBASE: - str = string_format("%08X", ( m_sregs[CS] << 4 ) + m_ip); + str = string_format("%08X", (m_sregs[PS] << 4) + m_ip); break; case STATE_GENFLAGS: { - uint16_t flags = CompressFlags(); + uint16_t flags = compress_flags(); str = string_format("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", flags & 0x8000 ? 'M':'.', flags & 0x4000 ? '?':'.', @@ -222,7 +231,7 @@ void v30mz_cpu_device::state_string_export(const device_state_entry &entry, std: flags & 0x0010 ? 'A':'.', flags & 0x0008 ? '?':'.', flags & 0x0004 ? 'P':'.', - flags & 0x0002 ? 'N':'.', + flags & 0x0002 ? '?':'.', flags & 0x0001 ? 'C':'.'); } break; @@ -242,11 +251,12 @@ void v30mz_cpu_device::device_reset() m_regs.w[BP] = 0; m_regs.w[IX] = 0; m_regs.w[IY] = 0; - m_sregs[ES] = 0; - m_sregs[CS] = 0xffff; + m_sregs[DS1] = 0; + m_sregs[PS] = 0xffff; m_sregs[SS] = 0; - m_sregs[DS] = 0; + m_sregs[DS0] = 0; m_ip = 0; + m_pfp = 0; m_SignVal = 0; m_AuxVal = 0; m_OverVal = 0; @@ -264,44 +274,77 @@ void v30mz_cpu_device::device_reset() m_prefix_base = 0; m_seg_prefix = false; m_seg_prefix_next = false; - m_ea = 0; + m_ea_seg = 0; m_eo = 0; - m_e16 = 0; m_modrm = 0; m_dst = 0; m_src = 0; + init_prefetch(); } -inline uint32_t v30mz_cpu_device::pc() +uint32_t v30mz_cpu_device::pc() { - m_pc = ( m_sregs[CS] << 4 ) + m_ip; + m_pc = (m_sregs[PS] << 4) + m_ip; return m_pc; } -inline uint8_t v30mz_cpu_device::read_byte(uint32_t addr) +void v30mz_cpu_device::read_prefetch() +{ + uint8_t data = m_cache.read_byte((m_sregs[PS] << 4) + m_pfp); + m_prefetch_queue[m_prefetch_queue_head] = data; + m_prefetch_queue_head = (m_prefetch_queue_head + 1) % PREFETCH_MAX_SIZE; + m_pfp++; +} + + +void v30mz_cpu_device::init_prefetch() { - return m_program.read_byte(addr); + m_pfp = m_ip; + m_prefetch_queue_tail = 0; + m_prefetch_queue_head = 0; + m_prefetch_fill_needed = true; + if (m_ip & 1) + clk(1); } -inline uint16_t v30mz_cpu_device::read_word(uint32_t addr) +inline uint8_t v30mz_cpu_device::read_byte(uint16_t segment, uint16_t addr) { - return m_program.read_byte(addr) | ( m_program.read_byte(addr+1) << 8 ); + return m_program.read_byte((segment << 4) + addr); } -inline void v30mz_cpu_device::write_byte(uint32_t addr, uint8_t data) +inline uint16_t v30mz_cpu_device::read_word(uint16_t segment, uint16_t addr) { - m_program.write_byte(addr, data); + if (addr & 1) { + // penalty cycle when reading from an unaligned address + clk(1); + return m_program.read_byte((segment << 4)+ addr) | + (m_program.read_byte((segment << 4) + ((addr + 1) & 0xffff)) << 8); + } else { + return m_program.read_word((segment << 4) + addr); + } } -inline void v30mz_cpu_device::write_word(uint32_t addr, uint16_t data) +inline void v30mz_cpu_device::write_byte(uint16_t segment, uint16_t addr, uint8_t data) { - m_program.write_byte( addr, data & 0xff ); - m_program.write_byte( addr + 1, data >> 8 ); + m_program.write_byte((segment << 4) + addr, data); +} + + +inline void v30mz_cpu_device::write_word(uint16_t segment, uint16_t addr, uint16_t data) +{ + if (addr & 1) { + m_program.write_byte((segment << 4) + addr, data); + m_program.write_byte((segment << 4) + ((addr + 1) & 0xffff), data >> 8); + // penalty cycle when writing to an unaligned address + clk(1); + } else { + m_program.write_word((segment << 4) + addr, data); + } } @@ -311,15 +354,35 @@ inline uint8_t v30mz_cpu_device::read_port(uint16_t port) } +inline uint16_t v30mz_cpu_device::read_port_word(uint16_t port) +{ + if (port & 1) + // penalty cycle when reading from an unaligned address + clk(1); + return m_io.read_word_unaligned(port); +} + + inline void v30mz_cpu_device::write_port(uint16_t port, uint8_t data) { m_io.write_byte(port, data); } +inline void v30mz_cpu_device::write_port_word(uint16_t port, uint16_t data) +{ + if (port & 1) + // penalty cycle when writing to an unaligned address + clk(1); + m_io.write_word_unaligned(port, data); +} + + inline uint8_t v30mz_cpu_device::fetch_op() { - uint8_t data = m_cache.read_byte( pc() ); + uint8_t data = m_prefetch_queue[m_prefetch_queue_tail]; + m_prefetch_queue_tail = (m_prefetch_queue_tail + 1) % PREFETCH_MAX_SIZE; + read_prefetch(); m_ip++; return data; } @@ -327,7 +390,9 @@ inline uint8_t v30mz_cpu_device::fetch_op() inline uint8_t v30mz_cpu_device::fetch() { - uint8_t data = m_cache.read_byte( pc() ); + uint8_t data = m_prefetch_queue[m_prefetch_queue_tail]; + m_prefetch_queue_tail = (m_prefetch_queue_tail + 1) % PREFETCH_MAX_SIZE; + read_prefetch(); m_ip++; return data; } @@ -336,7 +401,7 @@ inline uint8_t v30mz_cpu_device::fetch() inline uint16_t v30mz_cpu_device::fetch_word() { uint16_t data = fetch(); - data |= ( fetch() << 8 ); + data |= (fetch() << 8); return data; } @@ -351,11 +416,11 @@ inline uint8_t v30mz_cpu_device::repx_op() { case 0x26: seg_prefix = true; - seg = ES; + seg = DS1; break; case 0x2e: seg_prefix = true; - seg = CS; + seg = PS; break; case 0x36: seg_prefix = true; @@ -363,438 +428,430 @@ inline uint8_t v30mz_cpu_device::repx_op() break; case 0x3e: seg_prefix = true; - seg = DS; + seg = DS0; break; } - if ( seg_prefix ) + if (seg_prefix) { m_seg_prefix = true; m_seg_prefix_next = true; - m_prefix_base = m_sregs[seg] << 4; + m_prefix_base = m_sregs[seg]; next = fetch_op(); - CLK(2); + clk(2); } return next; } -inline void v30mz_cpu_device::CLK(uint32_t cycles) +inline void v30mz_cpu_device::clk(uint32_t cycles) { m_icount -= cycles; } -inline void v30mz_cpu_device::CLKM(uint32_t cycles_reg, uint32_t cycles_mem) +inline void v30mz_cpu_device::clkm(uint32_t cycles_reg, uint32_t cycles_mem) { - m_icount -= ( m_modrm >= 0xc0 ) ? cycles_reg : cycles_mem; + m_icount -= (m_modrm >= 0xc0) ? cycles_reg : cycles_mem; } -inline uint32_t v30mz_cpu_device::default_base(int seg) +inline uint16_t v30mz_cpu_device::default_base(int seg) { - if ( m_seg_prefix && (seg==DS || seg==SS) ) + if (m_seg_prefix && (seg==DS0 || seg==SS)) { return m_prefix_base; } else { - return m_sregs[seg] << 4; + return m_sregs[seg]; } } -inline uint32_t v30mz_cpu_device::get_ea() +inline void v30mz_cpu_device::get_ea() { - switch( m_modrm & 0xc7 ) + switch (m_modrm & 0xc7) { case 0x00: m_eo = m_regs.w[BW] + m_regs.w[IX]; - m_ea = default_base(DS) + m_eo; + m_ea_seg = default_base(DS0); + clk(1); break; case 0x01: m_eo = m_regs.w[BW] + m_regs.w[IY]; - m_ea = default_base(DS) + m_eo; + m_ea_seg = default_base(DS0); + clk(1); break; case 0x02: m_eo = m_regs.w[BP] + m_regs.w[IX]; - m_ea = default_base(SS) + m_eo; + m_ea_seg = default_base(SS); + clk(1); break; case 0x03: m_eo = m_regs.w[BP] + m_regs.w[IY]; - m_ea = default_base(SS) + m_eo; + m_ea_seg = default_base(SS); + clk(1); break; case 0x04: m_eo = m_regs.w[IX]; - m_ea = default_base(DS) + m_eo; + m_ea_seg = default_base(DS0); break; case 0x05: m_eo = m_regs.w[IY]; - m_ea = default_base(DS) + m_eo; + m_ea_seg = default_base(DS0); break; case 0x06: m_eo = fetch_word(); - m_ea = default_base(DS) + m_eo; + m_ea_seg = default_base(DS0); break; case 0x07: m_eo = m_regs.w[BW]; - m_ea = default_base(DS) + m_eo; + m_ea_seg = default_base(DS0); break; case 0x40: m_eo = m_regs.w[BW] + m_regs.w[IX] + (int8_t)fetch(); - m_ea = default_base(DS) + m_eo; + m_ea_seg = default_base(DS0); + clk(1); break; case 0x41: m_eo = m_regs.w[BW] + m_regs.w[IY] + (int8_t)fetch(); - m_ea = default_base(DS) + m_eo; + m_ea_seg = default_base(DS0); + clk(1); break; case 0x42: m_eo = m_regs.w[BP] + m_regs.w[IX] + (int8_t)fetch(); - m_ea = default_base(SS) + m_eo; + m_ea_seg = default_base(SS); + clk(1); break; case 0x43: m_eo = m_regs.w[BP] + m_regs.w[IY] + (int8_t)fetch(); - m_ea = default_base(SS) + m_eo; + m_ea_seg = default_base(SS); + clk(1); break; case 0x44: m_eo = m_regs.w[IX] + (int8_t)fetch(); - m_ea = default_base(DS) + m_eo; + m_ea_seg = default_base(DS0); break; case 0x45: m_eo = m_regs.w[IY] + (int8_t)fetch(); - m_ea = default_base(DS) + m_eo; + m_ea_seg = default_base(DS0); break; case 0x46: m_eo = m_regs.w[BP] + (int8_t)fetch(); - m_ea = default_base(SS) + m_eo; + m_ea_seg = default_base(SS); break; case 0x47: m_eo = m_regs.w[BW] + (int8_t)fetch(); - m_ea = default_base(DS) + m_eo; + m_ea_seg = default_base(DS0); break; case 0x80: - m_e16 = fetch_word(); - m_eo = m_regs.w[BW] + m_regs.w[IX] + (int16_t)m_e16; - m_ea = default_base(DS) + m_eo; + m_eo = m_regs.w[BW] + m_regs.w[IX] + (int16_t)fetch_word(); + m_ea_seg = default_base(DS0); + clk(1); break; case 0x81: - m_e16 = fetch_word(); - m_eo = m_regs.w[BW] + m_regs.w[IY] + (int16_t)m_e16; - m_ea = default_base(DS) + m_eo; + m_eo = m_regs.w[BW] + m_regs.w[IY] + (int16_t)fetch_word(); + m_ea_seg = default_base(DS0); + clk(1); break; case 0x82: - m_e16 = fetch_word(); - m_eo = m_regs.w[BP] + m_regs.w[IX] + (int16_t)m_e16; - m_ea = default_base(SS) + m_eo; + m_eo = m_regs.w[BP] + m_regs.w[IX] + (int16_t)fetch_word(); + m_ea_seg = default_base(SS); + clk(1); break; case 0x83: - m_e16 = fetch_word(); - m_eo = m_regs.w[BP] + m_regs.w[IY] + (int16_t)m_e16; - m_ea = default_base(SS) + m_eo; + m_eo = m_regs.w[BP] + m_regs.w[IY] + (int16_t)fetch_word(); + m_ea_seg = default_base(SS); + clk(1); break; case 0x84: - m_e16 = fetch_word(); - m_eo = m_regs.w[IX] + (int16_t)m_e16; - m_ea = default_base(DS) + m_eo; + m_eo = m_regs.w[IX] + (int16_t)fetch_word(); + m_ea_seg = default_base(DS0); break; case 0x85: - m_e16 = fetch_word(); - m_eo = m_regs.w[IY] + (int16_t)m_e16; - m_ea = default_base(DS) + m_eo; + m_eo = m_regs.w[IY] + (int16_t)fetch_word(); + m_ea_seg = default_base(DS0); break; case 0x86: - m_e16 = fetch_word(); - m_eo = m_regs.w[BP] + (int16_t)m_e16; - m_ea = default_base(SS) + m_eo; + m_eo = m_regs.w[BP] + (int16_t)fetch_word(); + m_ea_seg = default_base(SS); break; case 0x87: - m_e16 = fetch_word(); - m_eo = m_regs.w[BW] + (int16_t)m_e16; - m_ea = default_base(DS) + m_eo; + m_eo = m_regs.w[BW] + (int16_t)fetch_word(); + m_ea_seg = default_base(DS0); break; } - - return m_ea; } -inline void v30mz_cpu_device::PutbackRMByte(uint8_t data) +inline void v30mz_cpu_device::store_ea_rm_byte(uint8_t data) { - if ( m_modrm >= 0xc0 ) + if (m_modrm >= 0xc0) { - m_regs.b[ m_Mod_RM.RM.b[ m_modrm ] ] = data; + m_regs.b[m_Mod_RM.RM.b[m_modrm]] = data; } else { - write_byte( m_ea, data ); + write_byte(m_ea_seg, m_eo, data); } } -inline void v30mz_cpu_device::PutbackRMWord(uint16_t data) +inline void v30mz_cpu_device::store_ea_rm_word(uint16_t data) { - if ( m_modrm >= 0xc0 ) + if (m_modrm >= 0xc0) { - m_regs.w[ m_Mod_RM.RM.w[ m_modrm ] ] = data; + m_regs.w[m_Mod_RM.RM.w[m_modrm]] = data; } else { - write_word( m_ea, data ); + write_word(m_ea_seg, m_eo, data); } } -inline void v30mz_cpu_device::PutImmRMWord() + +inline void v30mz_cpu_device::put_imm_rm_word() { - if ( m_modrm >= 0xc0 ) + if (m_modrm >= 0xc0) { - m_regs.w[ m_Mod_RM.RM.w[ m_modrm ] ] = fetch_word(); + m_regs.w[m_Mod_RM.RM.w[m_modrm]] = fetch_word(); } else { - uint32_t addr = get_ea(); - write_word( addr, fetch_word() ); + get_ea(); + write_word(m_ea_seg, m_eo, fetch_word()); } } -inline void v30mz_cpu_device::PutRMWord(uint16_t val) + +inline void v30mz_cpu_device::put_rm_word(uint16_t val) { - if ( m_modrm >= 0xc0 ) + if (m_modrm >= 0xc0) { - m_regs.w[ m_Mod_RM.RM.w[ m_modrm ] ] = val; + m_regs.w[m_Mod_RM.RM.w[m_modrm]] = val; } else { - write_word( get_ea(), val ); + get_ea(); + write_word(m_ea_seg, m_eo, val); } } -inline void v30mz_cpu_device::PutRMByte(uint8_t val) +inline void v30mz_cpu_device::put_rm_byte(uint8_t val) { - if ( m_modrm >= 0xc0 ) + if (m_modrm >= 0xc0) { - m_regs.b[ m_Mod_RM.RM.b[ m_modrm ] ] = val; + m_regs.b[m_Mod_RM.RM.b[m_modrm]] = val; } else { - write_byte( get_ea(), val ); + get_ea(); + write_byte(m_ea_seg, m_eo, val); } } -inline void v30mz_cpu_device::PutImmRMByte() +inline void v30mz_cpu_device::put_imm_rm_byte() { - if ( m_modrm >= 0xc0 ) + if (m_modrm >= 0xc0) { - m_regs.b[ m_Mod_RM.RM.b[ m_modrm ] ] = fetch(); + m_regs.b[m_Mod_RM.RM.b[m_modrm]] = fetch(); } else { - uint32_t addr = get_ea(); - write_byte( addr, fetch() ); + get_ea(); + write_byte(m_ea_seg, m_eo, fetch()); } } -inline void v30mz_cpu_device::DEF_br8() +inline void v30mz_cpu_device::def_br8() { m_modrm = fetch(); - m_src = RegByte(); - m_dst = GetRMByte(); + m_src = reg_byte(); + m_dst = get_rm_byte(); } -inline void v30mz_cpu_device::DEF_wr16() +inline void v30mz_cpu_device::def_wr16() { m_modrm = fetch(); - m_src = RegWord(); - m_dst = GetRMWord(); + m_src = reg_word(); + m_dst = get_rm_word(); } -inline void v30mz_cpu_device::DEF_r8b() +inline void v30mz_cpu_device::def_r8b() { m_modrm = fetch(); - m_dst = RegByte(); - m_src = GetRMByte(); + m_src = get_rm_byte(); + m_dst = reg_byte(); } -inline void v30mz_cpu_device::DEF_r16w() +inline void v30mz_cpu_device::def_r16w() { m_modrm = fetch(); - m_dst = RegWord(); - m_src = GetRMWord(); + m_src = get_rm_word(); + m_dst = reg_word(); } -inline void v30mz_cpu_device::DEF_ald8() +inline void v30mz_cpu_device::def_ald8() { m_src = fetch(); m_dst = m_regs.b[AL]; } -inline void v30mz_cpu_device::DEF_axd16() +inline void v30mz_cpu_device::def_awd16() { m_src = fetch_word(); m_dst = m_regs.w[AW]; } - -inline void v30mz_cpu_device::RegByte(uint8_t data) +inline void v30mz_cpu_device::reg_byte(uint8_t data) { - m_regs.b[ m_Mod_RM.reg.b[ m_modrm ] ] = data; + m_regs.b[m_Mod_RM.reg.b[m_modrm]] = data; } -inline void v30mz_cpu_device::RegWord(uint16_t data) +inline void v30mz_cpu_device::reg_word(uint16_t data) { - m_regs.w[ m_Mod_RM.reg.w[ m_modrm ] ] = data; + m_regs.w[m_Mod_RM.reg.w[m_modrm]] = data; } -inline uint8_t v30mz_cpu_device::RegByte() +inline uint8_t v30mz_cpu_device::reg_byte() { - return m_regs.b[ m_Mod_RM.reg.b[ m_modrm ] ]; + return m_regs.b[m_Mod_RM.reg.b[m_modrm]]; } -inline uint16_t v30mz_cpu_device::RegWord() +inline uint16_t v30mz_cpu_device::reg_word() { - return m_regs.w[ m_Mod_RM.reg.w[ m_modrm ] ]; + return m_regs.w[m_Mod_RM.reg.w[m_modrm]]; } -inline uint16_t v30mz_cpu_device::GetRMWord() +inline uint16_t v30mz_cpu_device::get_rm_word() { - if ( m_modrm >= 0xc0 ) + if (m_modrm >= 0xc0) { - return m_regs.w[ m_Mod_RM.RM.w[ m_modrm ] ]; + return m_regs.w[m_Mod_RM.RM.w[m_modrm]]; } else { - return read_word( get_ea() ); + get_ea(); + return read_word(m_ea_seg, m_eo); } } -inline uint16_t v30mz_cpu_device::GetnextRMWord() +inline uint16_t v30mz_cpu_device::get_next_rm_word() { - uint32_t addr = ( m_ea & 0xf0000 ) | ( ( m_ea + 2 ) & 0xffff ); - - return read_word( addr ); + return read_word(m_ea_seg, m_eo + 2); } -inline uint8_t v30mz_cpu_device::GetRMByte() +inline uint8_t v30mz_cpu_device::get_rm_byte() { - if ( m_modrm >= 0xc0 ) + if (m_modrm >= 0xc0) { - return m_regs.b[ m_Mod_RM.RM.b[ m_modrm ] ]; + return m_regs.b[m_Mod_RM.RM.b[m_modrm]]; } else { - return read_byte( get_ea() ); + get_ea(); + return read_byte(m_ea_seg, m_eo); } } -inline void v30mz_cpu_device::PutMemB(int seg, uint16_t offset, uint8_t data) -{ - write_byte( default_base( seg ) + offset, data); -} - - -inline void v30mz_cpu_device::PutMemW(int seg, uint16_t offset, uint16_t data) -{ - PutMemB( seg, offset, data & 0xff); - PutMemB( seg, offset+1, data >> 8); -} - - -inline uint8_t v30mz_cpu_device::GetMemB(int seg, uint16_t offset) -{ - return read_byte( default_base(seg) + offset ); -} - - -inline uint16_t v30mz_cpu_device::GetMemW(int seg, uint16_t offset) -{ - return GetMemB(seg, offset) | ( GetMemB(seg, offset + 1) << 8 ); -} - - // Setting flags -inline void v30mz_cpu_device::set_CFB(uint32_t x) +inline void v30mz_cpu_device::set_CF_byte(uint32_t x) { m_CarryVal = x & 0x100; } -inline void v30mz_cpu_device::set_CFW(uint32_t x) + +inline void v30mz_cpu_device::set_CF_word(uint32_t x) { m_CarryVal = x & 0x10000; } -inline void v30mz_cpu_device::set_AF(uint32_t x,uint32_t y,uint32_t z) + +inline void v30mz_cpu_device::set_AF(uint32_t x, uint32_t y, uint32_t z) { m_AuxVal = (x ^ (y ^ z)) & 0x10; } + inline void v30mz_cpu_device::set_SF(uint32_t x) { m_SignVal = x; } + inline void v30mz_cpu_device::set_ZF(uint32_t x) { m_ZeroVal = x; } + inline void v30mz_cpu_device::set_PF(uint32_t x) { m_ParityVal = x; } -inline void v30mz_cpu_device::set_SZPF_Byte(uint32_t x) + +inline void v30mz_cpu_device::set_SZPF_byte(uint32_t x) { m_SignVal = m_ZeroVal = m_ParityVal = (int8_t)x; } -inline void v30mz_cpu_device::set_SZPF_Word(uint32_t x) + +inline void v30mz_cpu_device::set_SZPF_word(uint32_t x) { m_SignVal = m_ZeroVal = m_ParityVal = (int16_t)x; } -inline void v30mz_cpu_device::set_OFW_Add(uint32_t x,uint32_t y,uint32_t z) + +inline void v30mz_cpu_device::set_OF_word_add(uint32_t x, uint32_t y, uint32_t z) { m_OverVal = (x ^ y) & (x ^ z) & 0x8000; } -inline void v30mz_cpu_device::set_OFB_Add(uint32_t x,uint32_t y,uint32_t z) + +inline void v30mz_cpu_device::set_OF_byte_add(uint32_t x, uint32_t y, uint32_t z) { m_OverVal = (x ^ y) & (x ^ z) & 0x80; } -inline void v30mz_cpu_device::set_OFW_Sub(uint32_t x,uint32_t y,uint32_t z) + +inline void v30mz_cpu_device::set_OF_word_sub(uint32_t x, uint32_t y, uint32_t z) { m_OverVal = (z ^ y) & (z ^ x) & 0x8000; } -inline void v30mz_cpu_device::set_OFB_Sub(uint32_t x,uint32_t y,uint32_t z) + +inline void v30mz_cpu_device::set_OF_byte_sub(uint32_t x, uint32_t y, uint32_t z) { m_OverVal = (z ^ y) & (z ^ x) & 0x80; } -inline uint16_t v30mz_cpu_device::CompressFlags() const +inline uint16_t v30mz_cpu_device::compress_flags() const { - return (CF ? 1 : 0) + return 0x7002 + | (CF ? 1 : 0) | (PF ? 4 : 0) | (AF ? 0x10 : 0) | (ZF ? 0x40 : 0) @@ -806,7 +863,8 @@ inline uint16_t v30mz_cpu_device::CompressFlags() const | (MD << 15); } -inline void v30mz_cpu_device::ExpandFlags(uint16_t f) + +inline void v30mz_cpu_device::expand_flags(uint16_t f) { m_CarryVal = (f) & 1; m_ParityVal = !((f) & 4); @@ -820,127 +878,139 @@ inline void v30mz_cpu_device::ExpandFlags(uint16_t f) m_MF = ((f) & 0x8000) == 0x8000; } + inline void v30mz_cpu_device::i_insb() { - PutMemB( ES, m_regs.w[IY], read_port( m_regs.w[DW] ) ); + write_byte(m_sregs[DS1], m_regs.w[IY], read_port(m_regs.w[DW])); m_regs.w[IY] += -2 * m_DF + 1; - CLK(6); + clk(6); } + inline void v30mz_cpu_device::i_insw() { - PutMemB( ES, m_regs.w[IY], read_port( m_regs.w[DW] ) ); - PutMemB( ES, (m_regs.w[IY] + 1) & 0xffff, read_port((m_regs.w[DW]+1)&0xffff)); + write_word(m_sregs[DS1], m_regs.w[IY], read_port_word(m_regs.w[DW])); m_regs.w[IY] += -4 * m_DF + 2; - CLK(6); + clk(6); } + inline void v30mz_cpu_device::i_outsb() { - write_port( m_regs.w[DW], GetMemB( DS, m_regs.w[IX] ) ); + write_port(m_regs.w[DW], read_byte(default_base(DS0), m_regs.w[IX])); m_regs.w[IX] += -2 * m_DF + 1; - CLK(7); + clk(7); } + inline void v30mz_cpu_device::i_outsw() { - write_port( m_regs.w[DW], GetMemB( DS, m_regs.w[IX] ) ); - write_port( (m_regs.w[DW]+1)&0xffff, GetMemB( DS, (m_regs.w[IX]+1)&0xffff ) ); + write_port_word(m_regs.w[DW], read_word(default_base(DS0), m_regs.w[IX])); m_regs.w[IX] += -4 * m_DF + 2; - CLK(7); + clk(7); } + inline void v30mz_cpu_device::i_movsb() { - uint8_t tmp = GetMemB( DS, m_regs.w[IX] ); - PutMemB( ES, m_regs.w[IY], tmp); + uint8_t tmp = read_byte(default_base(DS0), m_regs.w[IX]); + write_byte(m_sregs[DS1], m_regs.w[IY], tmp); m_regs.w[IY] += -2 * m_DF + 1; m_regs.w[IX] += -2 * m_DF + 1; - CLK(5); + clk(5); } + inline void v30mz_cpu_device::i_movsw() { - uint16_t tmp = GetMemW( DS, m_regs.w[IX] ); - PutMemW( ES, m_regs.w[IY], tmp ); + uint16_t tmp = read_word(default_base(DS0), m_regs.w[IX]); + write_word(m_sregs[DS1], m_regs.w[IY], tmp); m_regs.w[IY] += -4 * m_DF + 2; m_regs.w[IX] += -4 * m_DF + 2; - CLK(5); + clk(5); } + inline void v30mz_cpu_device::i_cmpsb() { - m_src = GetMemB( ES, m_regs.w[IY] ); - m_dst = GetMemB( DS, m_regs.w[IX] ); - SUBB(); + m_src = read_byte(m_sregs[DS1], m_regs.w[IY]); + m_dst = read_byte(default_base(DS0), m_regs.w[IX]); + sub_byte(); m_regs.w[IY] += -2 * m_DF + 1; m_regs.w[IX] += -2 * m_DF + 1; - CLK(6); + clk(6); } + inline void v30mz_cpu_device::i_cmpsw() { - m_src = GetMemW( ES, m_regs.w[IY] ); - m_dst = GetMemW( DS, m_regs.w[IX] ); - SUBW(); + m_src = read_word(m_sregs[DS1], m_regs.w[IY]); + m_dst = read_word(default_base(DS0), m_regs.w[IX]); + sub_word(); m_regs.w[IY] += -4 * m_DF + 2; m_regs.w[IX] += -4 * m_DF + 2; - CLK(6); + clk(6); } + inline void v30mz_cpu_device::i_stosb() { - PutMemB( ES, m_regs.w[IY], m_regs.b[AL] ); + write_byte(m_sregs[DS1], m_regs.w[IY], m_regs.b[AL]); m_regs.w[IY] += -2 * m_DF + 1; - CLK(3); + clk(3); } + inline void v30mz_cpu_device::i_stosw() { - PutMemW( ES, m_regs.w[IY], m_regs.w[AW] ); + write_word(m_sregs[DS1], m_regs.w[IY], m_regs.w[AW]); m_regs.w[IY] += -4 * m_DF + 2; - CLK(3); + clk(3); } + inline void v30mz_cpu_device::i_lodsb() { - m_regs.b[AL] = GetMemB( DS, m_regs.w[IX] ); + m_regs.b[AL] = read_byte(default_base(DS0), m_regs.w[IX]); m_regs.w[IX] += -2 * m_DF + 1; - CLK(3); + clk(3); } + inline void v30mz_cpu_device::i_lodsw() { - m_regs.w[AW] = GetMemW( DS, m_regs.w[IX] ); + m_regs.w[AW] = read_word(default_base(DS0), m_regs.w[IX]); m_regs.w[IX] += -4 * m_DF + 2; - CLK(3); + clk(3); } + inline void v30mz_cpu_device::i_scasb() { - m_src = GetMemB( ES, m_regs.w[IY] ); + m_src = read_byte(m_sregs[DS1], m_regs.w[IY]); m_dst = m_regs.b[AL]; - SUBB(); + sub_byte(); m_regs.w[IY] += -2 * m_DF + 1; - CLK(4); + clk(4); } + inline void v30mz_cpu_device::i_scasw() { - m_src = GetMemW( ES, m_regs.w[IY] ); + m_src = read_word(m_sregs[DS1], m_regs.w[IY]); m_dst = m_regs.w[AW]; - SUBW(); + sub_word(); m_regs.w[IY] += -4 * m_DF + 2; - CLK(4); + clk(4); } inline void v30mz_cpu_device::i_popf() { - uint32_t tmp = POP(); + uint32_t tmp = pop(); - ExpandFlags(tmp); - CLK(3); + expand_flags(tmp); + clk(3); if (m_TF) { m_fire_trap = 1; @@ -948,212 +1018,225 @@ inline void v30mz_cpu_device::i_popf() } -inline void v30mz_cpu_device::ADDB() +inline void v30mz_cpu_device::add_byte() { - uint32_t res = m_dst + m_src; + uint32_t res = (m_dst & 0xff) + (m_src & 0xff); - set_CFB(res); - set_OFB_Add(res,m_src,m_dst); - set_AF(res,m_src,m_dst); - set_SZPF_Byte(res); + set_CF_byte(res); + set_OF_byte_add(res, m_src, m_dst); + set_AF(res, m_src, m_dst); + set_SZPF_byte(res); m_dst = res & 0xff; } -inline void v30mz_cpu_device::ADDW() +inline void v30mz_cpu_device::add_word() { - uint32_t res = m_dst + m_src; + uint32_t res = (m_dst & 0xffff) + (m_src & 0xffff); - set_CFW(res); - set_OFW_Add(res,m_src,m_dst); - set_AF(res,m_src,m_dst); - set_SZPF_Word(res); + set_CF_word(res); + set_OF_word_add(res, m_src, m_dst); + set_AF(res, m_src, m_dst); + set_SZPF_word(res); m_dst = res & 0xffff; } -inline void v30mz_cpu_device::SUBB() +inline void v30mz_cpu_device::sub_byte() { - uint32_t res = m_dst - m_src; + uint32_t res = (m_dst & 0xff) - (m_src & 0xff); - set_CFB(res); - set_OFB_Sub(res,m_src,m_dst); - set_AF(res,m_src,m_dst); - set_SZPF_Byte(res); + set_CF_byte(res); + set_OF_byte_sub(res, m_src, m_dst); + set_AF(res, m_src, m_dst); + set_SZPF_byte(res); m_dst = res & 0xff; } -inline void v30mz_cpu_device::SUBW() +inline void v30mz_cpu_device::sub_word() { - uint32_t res = m_dst - m_src; + uint32_t res = (m_dst & 0xffff) - (m_src & 0xffff); - set_CFW(res); - set_OFW_Sub(res,m_src,m_dst); - set_AF(res,m_src,m_dst); - set_SZPF_Word(res); + set_CF_word(res); + set_OF_word_sub(res, m_src, m_dst); + set_AF(res, m_src, m_dst); + set_SZPF_word(res); m_dst = res & 0xffff; } -inline void v30mz_cpu_device::ORB() +inline void v30mz_cpu_device::or_byte() { m_dst |= m_src; m_CarryVal = m_OverVal = m_AuxVal = 0; - set_SZPF_Byte(m_dst); + set_SZPF_byte(m_dst); } -inline void v30mz_cpu_device::ORW() +inline void v30mz_cpu_device::or_word() { m_dst |= m_src; m_CarryVal = m_OverVal = m_AuxVal = 0; - set_SZPF_Word(m_dst); + set_SZPF_word(m_dst); } -inline void v30mz_cpu_device::ANDB() +inline void v30mz_cpu_device::and_byte() { m_dst &= m_src; m_CarryVal = m_OverVal = m_AuxVal = 0; - set_SZPF_Byte(m_dst); + set_SZPF_byte(m_dst); } -inline void v30mz_cpu_device::ANDW() +inline void v30mz_cpu_device::and_word() { m_dst &= m_src; m_CarryVal = m_OverVal = m_AuxVal = 0; - set_SZPF_Word(m_dst); + set_SZPF_word(m_dst); } -inline void v30mz_cpu_device::XORB() +inline void v30mz_cpu_device::xor_byte() { m_dst ^= m_src; m_CarryVal = m_OverVal = m_AuxVal = 0; - set_SZPF_Byte(m_dst); + set_SZPF_byte(m_dst); } -inline void v30mz_cpu_device::XORW() +inline void v30mz_cpu_device::xor_word() { m_dst ^= m_src; m_CarryVal = m_OverVal = m_AuxVal = 0; - set_SZPF_Word(m_dst); + set_SZPF_word(m_dst); } -inline void v30mz_cpu_device::ROL_BYTE() +inline void v30mz_cpu_device::rol_byte() { m_CarryVal = m_dst & 0x80; - m_dst = (m_dst << 1) | ( CF ? 1 : 0 ); + m_dst = (m_dst << 1) | (CF ? 1 : 0); } -inline void v30mz_cpu_device::ROL_WORD() + +inline void v30mz_cpu_device::rol_word() { m_CarryVal = m_dst & 0x8000; - m_dst = (m_dst << 1) | ( CF ? 1 : 0 ); + m_dst = (m_dst << 1) | (CF ? 1 : 0); } -inline void v30mz_cpu_device::ROR_BYTE() + +inline void v30mz_cpu_device::ror_byte() { m_CarryVal = m_dst & 0x1; m_dst = (m_dst >> 1) | (CF ? 0x80 : 0x00); } -inline void v30mz_cpu_device::ROR_WORD() + +inline void v30mz_cpu_device::ror_word() { m_CarryVal = m_dst & 0x1; m_dst = (m_dst >> 1) + (CF ? 0x8000 : 0x0000); } -inline void v30mz_cpu_device::ROLC_BYTE() + +inline void v30mz_cpu_device::rolc_byte() { - m_dst = (m_dst << 1) | ( CF ? 1 : 0 ); - set_CFB(m_dst); + m_dst = (m_dst << 1) | (CF ? 1 : 0); + set_CF_byte(m_dst); } -inline void v30mz_cpu_device::ROLC_WORD() + +inline void v30mz_cpu_device::rolc_word() { - m_dst = (m_dst << 1) | ( CF ? 1 : 0 ); - set_CFW(m_dst); + m_dst = (m_dst << 1) | (CF ? 1 : 0); + set_CF_word(m_dst); } -inline void v30mz_cpu_device::RORC_BYTE() + +inline void v30mz_cpu_device::rorc_byte() { - m_dst |= ( CF ? 0x100 : 0x00); + m_dst |= (CF ? 0x100 : 0x00); m_CarryVal = m_dst & 0x01; m_dst >>= 1; } -inline void v30mz_cpu_device::RORC_WORD() + +inline void v30mz_cpu_device::rorc_word() { - m_dst |= ( CF ? 0x10000 : 0); + m_dst |= (CF ? 0x10000 : 0); m_CarryVal = m_dst & 0x01; m_dst >>= 1; } -inline void v30mz_cpu_device::SHL_BYTE(uint8_t c) + +inline void v30mz_cpu_device::shl_byte(uint8_t c) { m_icount -= c; m_dst <<= c; - set_CFB(m_dst); - set_SZPF_Byte(m_dst); - PutbackRMByte(m_dst); + set_CF_byte(m_dst); + set_SZPF_byte(m_dst); + store_ea_rm_byte(m_dst); } -inline void v30mz_cpu_device::SHL_WORD(uint8_t c) + +inline void v30mz_cpu_device::shl_word(uint8_t c) { m_icount -= c; m_dst <<= c; - set_CFW(m_dst); - set_SZPF_Word(m_dst); - PutbackRMWord(m_dst); + set_CF_word(m_dst); + set_SZPF_word(m_dst); + store_ea_rm_word(m_dst); } -inline void v30mz_cpu_device::SHR_BYTE(uint8_t c) + +inline void v30mz_cpu_device::shr_byte(uint8_t c) { m_icount -= c; m_dst >>= c-1; m_CarryVal = m_dst & 0x1; m_dst >>= 1; - set_SZPF_Byte(m_dst); - PutbackRMByte(m_dst); + set_SZPF_byte(m_dst); + store_ea_rm_byte(m_dst); } -inline void v30mz_cpu_device::SHR_WORD(uint8_t c) + +inline void v30mz_cpu_device::shr_word(uint8_t c) { m_icount -= c; m_dst >>= c-1; m_CarryVal = m_dst & 0x1; m_dst >>= 1; - set_SZPF_Word(m_dst); - PutbackRMWord(m_dst); + set_SZPF_word(m_dst); + store_ea_rm_word(m_dst); } -inline void v30mz_cpu_device::SHRA_BYTE(uint8_t c) + +inline void v30mz_cpu_device::shra_byte(uint8_t c) { m_icount -= c; m_dst = ((int8_t)m_dst) >> (c-1); m_CarryVal = m_dst & 0x1; m_dst = m_dst >> 1; - set_SZPF_Byte(m_dst); - PutbackRMByte(m_dst); + set_SZPF_byte(m_dst); + store_ea_rm_byte(m_dst); } -inline void v30mz_cpu_device::SHRA_WORD(uint8_t c) + +inline void v30mz_cpu_device::shra_word(uint8_t c) { m_icount -= c; m_dst = ((int16_t)m_dst) >> (c-1); m_CarryVal = m_dst & 0x1; m_dst = m_dst >> 1; - set_SZPF_Word(m_dst); - PutbackRMWord(m_dst); + set_SZPF_word(m_dst); + store_ea_rm_word(m_dst); } -inline void v30mz_cpu_device::XchgAWReg(uint8_t reg) +inline void v30mz_cpu_device::xchg_AW_reg(uint8_t reg) { uint16_t tmp = m_regs.w[reg]; @@ -1162,60 +1245,61 @@ inline void v30mz_cpu_device::XchgAWReg(uint8_t reg) } -inline void v30mz_cpu_device::IncWordReg(uint8_t reg) +inline void v30mz_cpu_device::inc_word_reg(uint8_t reg) { uint32_t tmp = m_regs.w[reg]; uint32_t tmp1 = tmp+1; m_OverVal = (tmp == 0x7fff); - set_AF(tmp1,tmp,1); - set_SZPF_Word(tmp1); + set_AF(tmp1, tmp, 1); + set_SZPF_word(tmp1); m_regs.w[reg] = tmp1; } -inline void v30mz_cpu_device::DecWordReg(uint8_t reg) +inline void v30mz_cpu_device::dec_word_reg(uint8_t reg) { uint32_t tmp = m_regs.w[reg]; uint32_t tmp1 = tmp-1; m_OverVal = (tmp == 0x8000); - set_AF(tmp1,tmp,1); - set_SZPF_Word(tmp1); + set_AF(tmp1, tmp, 1); + set_SZPF_word(tmp1); m_regs.w[reg] = tmp1; } -inline void v30mz_cpu_device::PUSH(uint16_t data) +inline void v30mz_cpu_device::push(uint16_t data) { m_regs.w[SP] -= 2; - write_word( ( m_sregs[SS] << 4 ) + m_regs.w[SP], data ); + write_word(m_sregs[SS], m_regs.w[SP], data); } -inline uint16_t v30mz_cpu_device::POP() +inline uint16_t v30mz_cpu_device::pop() { - uint16_t data = read_word( ( m_sregs[SS] << 4 ) + m_regs.w[SP] ); + uint16_t data = read_word(m_sregs[SS], m_regs.w[SP]); m_regs.w[SP] += 2; return data; } -inline void v30mz_cpu_device::JMP(bool cond) +inline void v30mz_cpu_device::jmp(bool cond) { int rel = (int)((int8_t)fetch()); if (cond) { m_ip += rel; - CLK(9); + init_prefetch(); + clk(9); } - CLK(1); + clk(1); } -inline void v30mz_cpu_device::ADJ4(int8_t param1,int8_t param2) +inline void v30mz_cpu_device::adj4(int8_t param1, int8_t param2) { if (AF || ((m_regs.b[AL] & 0xf) > 9)) { @@ -1230,18 +1314,18 @@ inline void v30mz_cpu_device::ADJ4(int8_t param1,int8_t param2) m_regs.b[AL] += param2; m_CarryVal = 1; } - set_SZPF_Byte(m_regs.b[AL]); + set_SZPF_byte(m_regs.b[AL]); } -inline void v30mz_cpu_device::ADJB(int8_t param1, int8_t param2) +inline void v30mz_cpu_device::adjb(int8_t param1, int8_t param2) { if (AF || ((m_regs.b[AL] & 0xf) > 9)) { m_regs.b[AL] += param1; m_regs.b[AH] += param2; + m_CarryVal = m_AuxVal; m_AuxVal = 1; - m_CarryVal = 1; } else { @@ -1254,33 +1338,35 @@ inline void v30mz_cpu_device::ADJB(int8_t param1, int8_t param2) void v30mz_cpu_device::interrupt(int int_num) { - PUSH( CompressFlags() ); - CLK(2); + push(compress_flags()); + clk(2); m_TF = m_IF = 0; if (int_num == -1) { - int_num = standard_irq_callback(0); + standard_irq_callback(0); + int_num = m_vector_func(); m_irq_state = CLEAR_LINE; m_pending_irq &= ~INT_IRQ; } - uint16_t dest_off = read_word( int_num * 4 + 0 ); - uint16_t dest_seg = read_word( int_num * 4 + 2 ); + uint16_t dest_off = read_word(0, int_num * 4 + 0); + uint16_t dest_seg = read_word(0, int_num * 4 + 2); - PUSH(m_sregs[CS]); - PUSH(m_ip); + push(m_sregs[PS]); + push(m_ip); m_ip = dest_off; - m_sregs[CS] = dest_seg; + m_sregs[PS] = dest_seg; + init_prefetch(); } -void v30mz_cpu_device::execute_set_input( int inptnum, int state ) +void v30mz_cpu_device::execute_set_input(int inptnum, int state) { if (inptnum == INPUT_LINE_NMI) { - if ( m_nmi_state == state ) + if (m_nmi_state == state) { return; } @@ -1313,9 +1399,9 @@ std::unique_ptr<util::disasm_interface> v30mz_cpu_device::create_disassembler() void v30mz_cpu_device::execute_run() { - while(m_icount > 0 ) + while (m_icount > 0) { - if ( m_seg_prefix_next ) + if (m_seg_prefix_next) { m_seg_prefix = true; m_seg_prefix_next = false; @@ -1324,34 +1410,34 @@ void v30mz_cpu_device::execute_run() { m_seg_prefix = false; - /* Dispatch IRQ */ - if ( m_pending_irq && m_no_interrupt == 0 ) + // Dispatch IRQ + if (m_pending_irq && m_no_interrupt == 0) { - if ( m_pending_irq & NMI_IRQ ) + if (m_pending_irq & NMI_IRQ) { - interrupt(NEC_NMI_INT_VECTOR); + interrupt(NMI_INT); m_pending_irq &= ~NMI_IRQ; } - else if ( m_IF ) + else if (m_IF) { - /* the actual vector is retrieved after pushing flags */ - /* and clearing the IF */ + // the actual vector is retrieved after pushing flags + // and clearing the IF interrupt(-1); } } - /* No interrupt allowed between last instruction and this one */ - if ( m_no_interrupt ) + // No interrupt allowed between last instruction and this one + if (m_no_interrupt) { m_no_interrupt--; } - /* trap should allow one instruction to be executed */ - if ( m_fire_trap ) + // trap should allow one instruction to be executed + if (m_fire_trap) { - if ( m_fire_trap >= 2 ) + if (m_fire_trap >= 2) { - interrupt(1); + interrupt(BREAK_INT); m_fire_trap = 0; } else @@ -1361,880 +1447,613 @@ void v30mz_cpu_device::execute_run() } } - debugger_instruction_hook( pc() ); + if (m_prefetch_fill_needed) { + for (int i = 0; i < PREFETCH_QUEUE_SIZE; i++) { + read_prefetch(); + } + m_prefetch_fill_needed = false; + } + + debugger_instruction_hook(pc()); uint8_t op = fetch_op(); - switch(op) + switch (op) { case 0x00: // i_add_br8 - DEF_br8(); - ADDB(); - PutbackRMByte(m_dst); - CLKM(1,3); + def_br8(); + add_byte(); + store_ea_rm_byte(m_dst); + clkm(1,3); break; case 0x01: // i_add_wr16 - DEF_wr16(); - ADDW(); - PutbackRMWord(m_dst); - CLKM(1,3); + def_wr16(); + add_word(); + store_ea_rm_word(m_dst); + clkm(1,3); break; case 0x02: // i_add_r8b - DEF_r8b(); - ADDB(); - RegByte(m_dst); - CLKM(1,2); + def_r8b(); + add_byte(); + reg_byte(m_dst); + clkm(1,2); break; case 0x03: // i_add_r16w - DEF_r16w(); - ADDW(); - RegWord(m_dst); - CLKM(1,2); + def_r16w(); + add_word(); + reg_word(m_dst); + clkm(1,2); break; case 0x04: // i_add_ald8 - DEF_ald8(); - ADDB(); + def_ald8(); + add_byte(); m_regs.b[AL] = m_dst; - CLK(1); + clk(1); break; case 0x05: // i_add_axd16 - DEF_axd16(); - ADDW(); + def_awd16(); + add_word(); m_regs.w[AW] = m_dst; - CLK(1); + clk(1); break; case 0x06: // i_push_es - PUSH(m_sregs[ES]); - CLK(2); + push(m_sregs[DS1]); + clk(2); break; case 0x07: // i_pop_es - m_sregs[ES] = POP(); - CLK(3); + m_sregs[DS1] = pop(); + clk(3); break; case 0x08: // i_or_br8 - DEF_br8(); - ORB(); - PutbackRMByte(m_dst); - CLKM(1,3); + def_br8(); + or_byte(); + store_ea_rm_byte(m_dst); + clkm(1,3); break; case 0x09: // i_or_wr16 - DEF_wr16(); - ORW(); - PutbackRMWord(m_dst); - CLKM(1,3); + def_wr16(); + or_word(); + store_ea_rm_word(m_dst); + clkm(1,3); break; case 0x0a: // i_or_r8b - DEF_r8b(); - ORB(); - RegByte(m_dst); - CLKM(1,2); + def_r8b(); + or_byte(); + reg_byte(m_dst); + clkm(1,2); break; case 0x0b: // i_or_r16w - DEF_r16w(); - ORW(); - RegWord(m_dst); - CLKM(1,2); + def_r16w(); + or_word(); + reg_word(m_dst); + clkm(1,2); break; case 0x0c: // i_or_ald8 - DEF_ald8(); - ORB(); + def_ald8(); + or_byte(); m_regs.b[AL] = m_dst; - CLK(1); + clk(1); break; case 0x0d: // i_or_axd16 - DEF_axd16(); - ORW(); + def_awd16(); + or_word(); m_regs.w[AW] = m_dst; - CLK(1); + clk(1); break; case 0x0e: // i_push_cs - PUSH(m_sregs[CS]); - CLK(2); + push(m_sregs[PS]); + clk(2); break; case 0x0f: // i_pre_nec - { - uint32_t tmp, tmp2; - - switch ( fetch() ) - { - case 0x10: /* Test */ - m_modrm = fetch(); - tmp = GetRMByte(); - tmp2 = m_regs.b[CL] & 0x7; - m_ZeroVal = (tmp & (1<<tmp2)) ? 1 : 0; - m_CarryVal = m_OverVal = 0; - break; - case 0x11: /* Test */ - m_modrm = fetch(); - tmp = GetRMWord(); - tmp2 = m_regs.b[CL] & 0xf; - m_ZeroVal = (tmp & (1<<tmp2)) ? 1 : 0; - m_CarryVal = m_OverVal = 0; - break; - case 0x12: /* Clr */ - m_modrm = fetch(); - tmp = GetRMByte(); - tmp2 = m_regs.b[CL] & 0x7; - tmp &= ~(1<<tmp2); - PutbackRMByte(tmp); - break; - case 0x13: /* Clr */ - m_modrm = fetch(); - tmp = GetRMWord(); - tmp2 = m_regs.b[CL] & 0xf; - tmp &= ~(1<<tmp2); - PutbackRMWord(tmp); - break; - case 0x14: /* Set */ - m_modrm = fetch(); - tmp = GetRMByte(); - tmp2 = m_regs.b[CL] & 0x7; - tmp |= (1<<tmp2); - PutbackRMByte(tmp); - break; - case 0x15: /* Set */ - m_modrm = fetch(); - tmp = GetRMWord(); - tmp2 = m_regs.b[CL] & 0xf; - tmp |= (1<<tmp2); - PutbackRMWord(tmp); - break; - case 0x16: /* Not */ - m_modrm = fetch(); - tmp = GetRMByte(); - tmp2 = m_regs.b[CL] & 0x7; - tmp ^= (1 << tmp2); - PutbackRMByte(tmp); - break; - case 0x17: /* Not */ - m_modrm = fetch(); - tmp = GetRMWord(); - tmp2 = m_regs.b[CL] & 0xf; - tmp ^= (1 << tmp2); - PutbackRMWord(tmp); - break; - - case 0x18: /* Test */ - m_modrm = fetch(); - tmp = GetRMByte(); - tmp2 = fetch() & 0x7; - m_ZeroVal = (tmp & (1<<tmp2)) ? 1 : 0; - m_CarryVal = m_OverVal = 0; - break; - case 0x19: /* Test */ - m_modrm = fetch(); - tmp = GetRMWord(); - tmp2 = fetch() & 0xf; - m_ZeroVal = (tmp & (1<<tmp2)) ? 1 : 0; - m_CarryVal = m_OverVal = 0; - break; - case 0x1a: /* Clr */ - m_modrm = fetch(); - tmp = GetRMByte(); - tmp2 = fetch() & 0x7; - tmp &= ~(1<<tmp2); - PutbackRMByte(tmp); - break; - case 0x1b: /* Clr */ - m_modrm = fetch(); - tmp = GetRMWord(); - tmp2 = fetch() & 0xf; - tmp &= ~(1<<tmp2); - PutbackRMWord(tmp); - break; - case 0x1c: /* Set */ - m_modrm = fetch(); - tmp = GetRMByte(); - tmp2 = fetch() & 0x7; - tmp |= (1<<tmp2); - PutbackRMByte(tmp); - break; - case 0x1d: /* Set */ - m_modrm = fetch(); - tmp = GetRMWord(); - tmp2 = fetch() & 0xf; - tmp |= (1<<tmp2); - PutbackRMWord(tmp); - break; - case 0x1e: /* Not */ - m_modrm = fetch(); - tmp = GetRMByte(); - tmp2 = fetch() & 0x7; - tmp ^= (1 << tmp2); - PutbackRMByte(tmp); - break; - case 0x1f: /* Not */ - m_modrm = fetch(); - tmp = GetRMWord(); - tmp2 = fetch() & 0xf; - tmp ^= (1 << tmp2); - PutbackRMWord(tmp); - break; - - case 0x20: - { - int count = (m_regs.b[CL]+1)/2; - uint16_t di = m_regs.w[IY]; - uint16_t si = m_regs.w[IX]; - if (m_seg_prefix) - { - logerror("%s: %06x: Warning: seg_prefix defined for add4s\n", tag(), pc()); - } - m_ZeroVal = m_CarryVal = 0; - for (int i=0;i<count;i++) - { - CLK(19); - tmp = GetMemB(DS, si); - tmp2 = GetMemB(ES, di); - int v1 = (tmp>>4)*10 + (tmp&0xf); - int v2 = (tmp2>>4)*10 + (tmp2&0xf); - int result = v1 + v2 + m_CarryVal; - m_CarryVal = result > 99 ? 1 : 0; - result = result % 100; - v1 = ((result/10)<<4) | (result % 10); - PutMemB(ES, di,v1); - if (v1) - { - m_ZeroVal = 1; - } - si++; - di++; - } - } - break; - case 0x22: - { - int count = (m_regs.b[CL]+1)/2; - uint16_t di = m_regs.w[IY]; - uint16_t si = m_regs.w[IX]; - if (m_seg_prefix) - { - logerror("%s: %06x: Warning: seg_prefix defined for sub4s\n", tag(), pc()); - } - m_ZeroVal = m_CarryVal = 0; - for (int i=0; i<count; i++) - { - int result; - CLK(19); - tmp = GetMemB(ES, di); - tmp2 = GetMemB(DS, si); - int v1 = (tmp>>4)*10 + (tmp&0xf); - int v2 = (tmp2>>4)*10 + (tmp2&0xf); - if (v1 < (v2+m_CarryVal)) - { - v1+=100; - result = v1-(v2+m_CarryVal); - m_CarryVal = 1; - } - else - { - result = v1-(v2+m_CarryVal); - m_CarryVal = 0; - } - v1 = ((result/10)<<4) | (result % 10); - PutMemB(ES, di,v1); - if (v1) - { - m_ZeroVal = 1; - } - si++; - di++; - } - } - break; - case 0x26: - { - int count = (m_regs.b[CL]+1)/2; - uint16_t di = m_regs.w[IY]; - uint16_t si = m_regs.w[IX]; - if (m_seg_prefix) - { - logerror("%s: %06x: Warning: seg_prefix defined for cmp4s\n", tag(), pc()); - } - m_ZeroVal = m_CarryVal = 0; - for (int i=0; i<count; i++) - { - int result; - CLK(19); - tmp = GetMemB(ES, di); - tmp2 = GetMemB(DS, si); - int v1 = (tmp>>4)*10 + (tmp&0xf); - int v2 = (tmp2>>4)*10 + (tmp2&0xf); - if (v1 < (v2+m_CarryVal)) - { - v1+=100; - result = v1-(v2+m_CarryVal); - m_CarryVal = 1; - } - else - { - result = v1-(v2+m_CarryVal); - m_CarryVal = 0; - } - v1 = ((result/10)<<4) | (result % 10); - if (v1) - { - m_ZeroVal = 1; - } - si++; - di++; - } - } - break; - case 0x28: - m_modrm = fetch(); - tmp = GetRMByte(); - tmp <<= 4; - tmp |= m_regs.b[AL] & 0xf; - m_regs.b[AL] = (m_regs.b[AL] & 0xf0) | ((tmp>>8)&0xf); - tmp &= 0xff; - PutbackRMByte(tmp); - CLKM(9,15); - break; - case 0x2a: - m_modrm = fetch(); - tmp = GetRMByte(); - tmp2 = (m_regs.b[AL] & 0xf)<<4; - m_regs.b[AL] = (m_regs.b[AL] & 0xf0) | (tmp&0xf); - tmp = tmp2 | (tmp>>4); - PutbackRMByte(tmp); - CLKM(13,19); - break; - case 0x31: - m_modrm = fetch(); m_modrm = 0; logerror("%s: %06x: Unimplemented bitfield INS\n", tag(), pc()); break; - case 0x33: - m_modrm = fetch(); m_modrm = 0; logerror("%s: %06x: Unimplemented bitfield EXT\n", tag(), pc()); break; - case 0x92: /* V25/35 FINT */ - CLK(2); - break; - case 0xe0: - m_modrm = fetch(); - m_modrm = 0; - logerror("%s: %06x: V33 unimplemented BRKXA (break to expansion address)\n", tag(), pc()); - break; - case 0xf0: - m_modrm = fetch(); - m_modrm = 0; - logerror("%s: %06x: V33 unimplemented RETXA (return from expansion address)\n", tag(), pc()); - break; - case 0xff: - m_modrm = fetch(); - m_modrm = 0; - logerror("%s: %06x: unimplemented BRKEM (break to 8080 emulation mode)\n", tag(), pc()); - break; - default: - logerror("%s: %06x: Unknown V20 instruction\n", tag(), pc()); - break; - } - } + clk(1); break; case 0x10: // i_adc_br8 - DEF_br8(); + def_br8(); m_src += CF ? 1 : 0; - ADDB(); - PutbackRMByte(m_dst); - CLKM(1,3); + add_byte(); + store_ea_rm_byte(m_dst); + clkm(1,3); break; case 0x11: // i_adc_wr16 - DEF_wr16(); + def_wr16(); m_src += CF ? 1 : 0; - ADDW(); - PutbackRMWord(m_dst); - CLKM(1,3); + add_word(); + store_ea_rm_word(m_dst); + clkm(1,3); break; case 0x12: // i_adc_r8b - DEF_r8b(); + def_r8b(); m_src += CF ? 1 : 0; - ADDB(); - RegByte(m_dst); - CLKM(1,2); + add_byte(); + reg_byte(m_dst); + clkm(1,2); break; case 0x13: // i_adc_r16w - DEF_r16w(); + def_r16w(); m_src += CF ? 1 : 0; - ADDW(); - RegWord(m_dst); - CLKM(1,2); + add_word(); + reg_word(m_dst); + clkm(1,2); break; case 0x14: // i_adc_ald8 - DEF_ald8(); + def_ald8(); m_src += CF ? 1 : 0; - ADDB(); + add_byte(); m_regs.b[AL] = m_dst; - CLK(1); + clk(1); break; case 0x15: // i_adc_axd16 - DEF_axd16(); + def_awd16(); m_src += CF ? 1 : 0; - ADDW(); + add_word(); m_regs.w[AW] = m_dst; - CLK(1); + clk(1); break; case 0x16: // i_push_ss - PUSH(m_sregs[SS]); - CLK(2); + push(m_sregs[SS]); + clk(2); break; case 0x17: // i_pop_ss - m_sregs[SS] = POP(); - CLK(3); + m_sregs[SS] = pop(); + clk(3); m_no_interrupt = 1; break; case 0x18: // i_sbb_br8 - DEF_br8(); + def_br8(); m_src += CF ? 1 : 0; - SUBB(); - PutbackRMByte(m_dst); - CLKM(1,3); + sub_byte(); + store_ea_rm_byte(m_dst); + clkm(1,3); break; case 0x19: // i_sbb_wr16 - DEF_wr16(); + def_wr16(); m_src += CF ? 1 : 0; - SUBW(); - PutbackRMWord(m_dst); - CLKM(1,3); + sub_word(); + store_ea_rm_word(m_dst); + clkm(1,3); break; case 0x1a: // i_sbb_r8b - DEF_r8b(); + def_r8b(); m_src += CF ? 1 : 0; - SUBB(); - RegByte(m_dst); - CLKM(1,2); + sub_byte(); + reg_byte(m_dst); + clkm(1,2); break; case 0x1b: // i_sbb_r16w - DEF_r16w(); + def_r16w(); m_src += CF ? 1 : 0; - SUBW(); - RegWord(m_dst); - CLKM(1,2); + sub_word(); + reg_word(m_dst); + clkm(1,2); break; case 0x1c: // i_sbb_ald8 - DEF_ald8(); + def_ald8(); m_src += CF ? 1 : 0; - SUBB(); + sub_byte(); m_regs.b[AL] = m_dst; - CLK(1); + clk(1); break; case 0x1d: // i_sbb_axd16 - DEF_axd16(); + def_awd16(); m_src += CF ? 1 : 0; - SUBW(); + sub_word(); m_regs.w[AW] = m_dst; - CLK(1); + clk(1); break; case 0x1e: // i_push_ds - PUSH(m_sregs[DS]); - CLK(2); + push(m_sregs[DS0]); + clk(2); break; case 0x1f: // i_pop_ds - m_sregs[DS] = POP(); - CLK(3); + m_sregs[DS0] = pop(); + clk(3); break; case 0x20: // i_and_br8 - DEF_br8(); - ANDB(); - PutbackRMByte(m_dst); - CLKM(1,3); + def_br8(); + and_byte(); + store_ea_rm_byte(m_dst); + clkm(1,3); break; case 0x21: // i_and_wr16 - DEF_wr16(); - ANDW(); - PutbackRMWord(m_dst); - CLKM(1,3); + def_wr16(); + and_word(); + store_ea_rm_word(m_dst); + clkm(1,3); break; case 0x22: // i_and_r8b - DEF_r8b(); - ANDB(); - RegByte(m_dst); - CLKM(1,2); + def_r8b(); + and_byte(); + reg_byte(m_dst); + clkm(1,2); break; case 0x23: // i_and_r16w - DEF_r16w(); - ANDW(); - RegWord(m_dst); - CLKM(1,2); + def_r16w(); + and_word(); + reg_word(m_dst); + clkm(1,2); break; case 0x24: // i_and_ald8 - DEF_ald8(); - ANDB(); + def_ald8(); + and_byte(); m_regs.b[AL] = m_dst; - CLK(1); + clk(1); break; case 0x25: // i_and_axd16 - DEF_axd16(); - ANDW(); + def_awd16(); + and_word(); m_regs.w[AW] = m_dst; - CLK(1); + clk(1); break; case 0x26: // i_es m_seg_prefix_next = true; - m_prefix_base = m_sregs[ES]<<4; - CLK(1); + m_prefix_base = m_sregs[DS1]; + clk(1); break; case 0x27: // i_daa - ADJ4(6,0x60); - CLK(10); + adj4(6,0x60); + clk(10); break; case 0x28: // i_sub_br8 - DEF_br8(); - SUBB(); - PutbackRMByte(m_dst); - CLKM(1,3); + def_br8(); + sub_byte(); + store_ea_rm_byte(m_dst); + clkm(1,3); break; case 0x29: // i_sub_wr16 - DEF_wr16(); - SUBW(); - PutbackRMWord(m_dst); - CLKM(1,3); + def_wr16(); + sub_word(); + store_ea_rm_word(m_dst); + clkm(1,3); break; case 0x2a: // i_sub_r8b - DEF_r8b(); - SUBB(); - RegByte(m_dst); - CLKM(1,2); + def_r8b(); + sub_byte(); + reg_byte(m_dst); + clkm(1,2); break; case 0x2b: // i_sub_r16w - DEF_r16w(); - SUBW(); - RegWord(m_dst); - CLKM(1,2); + def_r16w(); + sub_word(); + reg_word(m_dst); + clkm(1,2); break; case 0x2c: // i_sub_ald8 - DEF_ald8(); - SUBB(); + def_ald8(); + sub_byte(); m_regs.b[AL] = m_dst; - CLK(1); + clk(1); break; case 0x2d: // i_sub_axd16 - DEF_axd16(); - SUBW(); + def_awd16(); + sub_word(); m_regs.w[AW] = m_dst; - CLK(1); + clk(1); break; case 0x2e: // i_cs m_seg_prefix_next = true; - m_prefix_base = m_sregs[CS]<<4; - CLK(1); + m_prefix_base = m_sregs[PS]; + clk(1); break; case 0x2f: // i_das - ADJ4(-6,-0x60); - CLK(10); + adj4(-6, -0x60); + clk(10); break; case 0x30: // i_xor_br8 - DEF_br8(); - XORB(); - PutbackRMByte(m_dst); - CLKM(1,3); + def_br8(); + xor_byte(); + store_ea_rm_byte(m_dst); + clkm(1,3); break; case 0x31: // i_xor_wr16 - DEF_wr16(); - XORW(); - PutbackRMWord(m_dst); - CLKM(1,3); + def_wr16(); + xor_word(); + store_ea_rm_word(m_dst); + clkm(1,3); break; case 0x32: // i_xor_r8b - DEF_r8b(); - XORB(); - RegByte(m_dst); - CLKM(1,2); + def_r8b(); + xor_byte(); + reg_byte(m_dst); + clkm(1,2); break; case 0x33: // i_xor_r16w - DEF_r16w(); - XORW(); - RegWord(m_dst); - CLKM(1,2); + def_r16w(); + xor_word(); + reg_word(m_dst); + clkm(1,2); break; case 0x34: // i_xor_ald8 - DEF_ald8(); - XORB(); + def_ald8(); + xor_byte(); m_regs.b[AL] = m_dst; - CLK(1); + clk(1); break; case 0x35: // i_xor_axd16 - DEF_axd16(); - XORW(); + def_awd16(); + xor_word(); m_regs.w[AW] = m_dst; - CLK(1); + clk(1); break; case 0x36: // i_ss m_seg_prefix_next = true; - m_prefix_base = m_sregs[SS]<<4; - CLK(1); + m_prefix_base = m_sregs[SS]; + clk(1); break; case 0x37: // i_aaa - ADJB(6, (m_regs.b[AL] > 0xf9) ? 2 : 1); - CLK(9); + adjb(6, (m_regs.b[AL] > 0xf9) ? 2 : 1); + clk(9); break; case 0x38: // i_cmp_br8 - DEF_br8(); - SUBB(); - CLKM(1,2); + def_br8(); + sub_byte(); + clkm(1,2); break; case 0x39: // i_cmp_wr16 - DEF_wr16(); - SUBW(); - CLKM(1,2); + def_wr16(); + sub_word(); + clkm(1,2); break; case 0x3a: // i_cmp_r8b - DEF_r8b(); - SUBB(); - CLKM(1,2); + def_r8b(); + sub_byte(); + clkm(1,2); break; case 0x3b: // i_cmp_r16w - DEF_r16w(); - SUBW(); - CLKM(1,2); + def_r16w(); + sub_word(); + clkm(1,2); break; case 0x3c: // i_cmp_ald8 - DEF_ald8(); - SUBB(); - CLK(1); + def_ald8(); + sub_byte(); + clk(1); break; case 0x3d: // i_cmp_axd16 - DEF_axd16(); - SUBW(); - CLK(1); + def_awd16(); + sub_word(); + clk(1); break; case 0x3e: // i_ds m_seg_prefix_next = true; - m_prefix_base = m_sregs[DS]<<4; - CLK(1); + m_prefix_base = m_sregs[DS0]; + clk(1); break; case 0x3f: // i_aas - ADJB(-6, (m_regs.b[AL] < 6) ? -2 : -1); - CLK(9); + adjb(-6, (m_regs.b[AL] < 6) ? -2 : -1); + clk(9); break; case 0x40: // i_inc_ax - IncWordReg(AW); - CLK(1); + inc_word_reg(AW); + clk(1); break; case 0x41: // i_inc_cx - IncWordReg(CW); - CLK(1); + inc_word_reg(CW); + clk(1); break; case 0x42: // i_inc_dx - IncWordReg(DW); - CLK(1); + inc_word_reg(DW); + clk(1); break; case 0x43: // i_inc_bx - IncWordReg(BW); - CLK(1); + inc_word_reg(BW); + clk(1); break; case 0x44: // i_inc_sp - IncWordReg(SP); - CLK(1); + inc_word_reg(SP); + clk(1); break; case 0x45: // i_inc_bp - IncWordReg(BP); - CLK(1); + inc_word_reg(BP); + clk(1); break; case 0x46: // i_inc_si - IncWordReg(IX); - CLK(1); + inc_word_reg(IX); + clk(1); break; case 0x47: // i_inc_di - IncWordReg(IY); - CLK(1); + inc_word_reg(IY); + clk(1); break; case 0x48: // i_dec_ax - DecWordReg(AW); - CLK(1); + dec_word_reg(AW); + clk(1); break; case 0x49: // i_dec_cx - DecWordReg(CW); - CLK(1); + dec_word_reg(CW); + clk(1); break; case 0x4a: // i_dec_dx - DecWordReg(DW); - CLK(1); + dec_word_reg(DW); + clk(1); break; case 0x4b: // i_dec_bx - DecWordReg(BW); - CLK(1); + dec_word_reg(BW); + clk(1); break; case 0x4c: // i_dec_sp - DecWordReg(SP); - CLK(1); + dec_word_reg(SP); + clk(1); break; case 0x4d: // i_dec_bp - DecWordReg(BP); - CLK(1); + dec_word_reg(BP); + clk(1); break; case 0x4e: // i_dec_si - DecWordReg(IX); - CLK(1); + dec_word_reg(IX); + clk(1); break; case 0x4f: // i_dec_di - DecWordReg(IY); - CLK(1); + dec_word_reg(IY); + clk(1); break; case 0x50: // i_push_ax - PUSH(m_regs.w[AW]); - CLK(1); + push(m_regs.w[AW]); + clk(1); break; case 0x51: // i_push_cx - PUSH(m_regs.w[CW]); - CLK(1); + push(m_regs.w[CW]); + clk(1); break; case 0x52: // i_push_dx - PUSH(m_regs.w[DW]); - CLK(1); + push(m_regs.w[DW]); + clk(1); break; case 0x53: // i_push_bx - PUSH(m_regs.w[BW]); - CLK(1); + push(m_regs.w[BW]); + clk(1); break; case 0x54: // i_push_sp - PUSH(m_regs.w[SP]); - CLK(1); + push(m_regs.w[SP]); + clk(1); break; case 0x55: // i_push_bp - PUSH(m_regs.w[BP]); - CLK(1); + push(m_regs.w[BP]); + clk(1); break; case 0x56: // i_push_si - PUSH(m_regs.w[IX]); - CLK(1); + push(m_regs.w[IX]); + clk(1); break; case 0x57: // i_push_di - PUSH(m_regs.w[IY]); - CLK(1); + push(m_regs.w[IY]); + clk(1); break; case 0x58: // i_pop_ax - m_regs.w[AW] = POP(); - CLK(1); + m_regs.w[AW] = pop(); + clk(1); break; case 0x59: // i_pop_cx - m_regs.w[CW] = POP(); - CLK(1); + m_regs.w[CW] = pop(); + clk(1); break; case 0x5a: // i_pop_dx - m_regs.w[DW] = POP(); - CLK(1); + m_regs.w[DW] = pop(); + clk(1); break; case 0x5b: // i_pop_bx - m_regs.w[BW] = POP(); - CLK(1); + m_regs.w[BW] = pop(); + clk(1); break; case 0x5c: // i_pop_sp - m_regs.w[SP] = POP(); - CLK(1); + m_regs.w[SP] = pop(); + clk(1); break; case 0x5d: // i_pop_bp - m_regs.w[BP] = POP(); - CLK(1); + m_regs.w[BP] = pop(); + clk(1); break; case 0x5e: // i_pop_si - m_regs.w[IX] = POP(); - CLK(1); + m_regs.w[IX] = pop(); + clk(1); break; case 0x5f: // i_pop_di - m_regs.w[IY] = POP(); - CLK(1); + m_regs.w[IY] = pop(); + clk(1); break; @@ -2242,106 +2061,126 @@ void v30mz_cpu_device::execute_run() { uint32_t tmp = m_regs.w[SP]; - PUSH(m_regs.w[AW]); - PUSH(m_regs.w[CW]); - PUSH(m_regs.w[DW]); - PUSH(m_regs.w[BW]); - PUSH(tmp); - PUSH(m_regs.w[BP]); - PUSH(m_regs.w[IX]); - PUSH(m_regs.w[IY]); - CLK(9); + push(m_regs.w[AW]); + push(m_regs.w[CW]); + push(m_regs.w[DW]); + push(m_regs.w[BW]); + push(tmp); + push(m_regs.w[BP]); + push(m_regs.w[IX]); + push(m_regs.w[IY]); + clk(9); } break; case 0x61: // i_popa - m_regs.w[IY] = POP(); - m_regs.w[IX] = POP(); - m_regs.w[BP] = POP(); - POP(); - m_regs.w[BW] = POP(); - m_regs.w[DW] = POP(); - m_regs.w[CW] = POP(); - m_regs.w[AW] = POP(); - CLK(8); + m_regs.w[IY] = pop(); + m_regs.w[IX] = pop(); + m_regs.w[BP] = pop(); + pop(); + m_regs.w[BW] = pop(); + m_regs.w[DW] = pop(); + m_regs.w[CW] = pop(); + m_regs.w[AW] = pop(); + clk(8); break; case 0x62: // i_chkind { uint32_t low,high,tmp; m_modrm = fetch(); - low = GetRMWord(); - high = GetnextRMWord(); - tmp = RegWord(); - if (tmp<low || tmp>high) + low = get_rm_word(); + high = get_next_rm_word(); + tmp = reg_word(); + if (tmp < low || tmp > high) { - interrupt(5); - CLK(20); + interrupt(CHKIND_INT); + clk(20); } else { - CLK(13); + clk(13); } logerror("%s: %06x: bound %04x high %04x low %04x tmp\n", tag(), pc(), high, low, tmp); } break; - case 0x64: // i_repnc + case 0x64: // REPNC not supported by v30mz + fatalerror("%s: %06x: REPNC is not supported by v30mz\n", tag(), pc()); { uint8_t next = repx_op(); uint16_t c = m_regs.w[CW]; switch (next) { - case 0x6c: CLK(2); if (c) do { i_insb(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0x6d: CLK(2); if (c) do { i_insw(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0x6e: CLK(2); if (c) do { i_outsb(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0x6f: CLK(2); if (c) do { i_outsw(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa4: CLK(2); if (c) do { i_movsb(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa5: CLK(2); if (c) do { i_movsw(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa6: CLK(2); if (c) do { i_cmpsb(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa7: CLK(2); if (c) do { i_cmpsw(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xaa: CLK(2); if (c) do { i_stosb(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xab: CLK(2); if (c) do { i_stosw(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xac: CLK(2); if (c) do { i_lodsb(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xad: CLK(2); if (c) do { i_lodsw(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xae: CLK(2); if (c) do { i_scasb(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xaf: CLK(2); if (c) do { i_scasw(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6c: clk(2); if (c) do { i_insb(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6d: clk(2); if (c) do { i_insw(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6e: clk(2); if (c) do { i_outsb(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6f: clk(2); if (c) do { i_outsw(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa4: clk(2); if (c) do { i_movsb(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa5: clk(2); if (c) do { i_movsw(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa6: clk(2); if (c) do { i_cmpsb(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa7: clk(2); if (c) do { i_cmpsw(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xaa: clk(2); if (c) do { i_stosb(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xab: clk(2); if (c) do { i_stosw(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xac: clk(2); if (c) do { i_lodsb(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xad: clk(2); if (c) do { i_lodsw(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xae: clk(2); if (c) do { i_scasb(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xaf: clk(2); if (c) do { i_scasw(); c--; } while (c>0 && !CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; default: - logerror("%s: %06x: REPNC invalid\n", tag(), pc() ); + logerror("%s: %06x: REPNC invalid\n", tag(), pc()); // Decrement IP so the normal instruction will be executed next m_ip--; + m_pfp--; + if (m_prefetch_queue_tail == 0) + m_prefetch_queue_tail = PREFETCH_QUEUE_SIZE - 1; + else + m_prefetch_queue_tail--; + if (m_prefetch_queue_head == 0) + m_prefetch_queue_head = PREFETCH_QUEUE_SIZE - 1; + else + m_prefetch_queue_head--; break; } } break; - case 0x65: // i_repc + case 0x65: // REPC not supported by v30mz + fatalerror("%s: %06x: REPC is not supported by v30mz\n", tag(), pc()); { uint8_t next = repx_op(); uint16_t c = m_regs.w[CW]; switch (next) { - case 0x6c: CLK(2); if (c) do { i_insb(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0x6d: CLK(2); if (c) do { i_insw(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0x6e: CLK(2); if (c) do { i_outsb(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0x6f: CLK(2); if (c) do { i_outsw(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa4: CLK(2); if (c) do { i_movsb(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa5: CLK(2); if (c) do { i_movsw(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa6: CLK(2); if (c) do { i_cmpsb(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa7: CLK(2); if (c) do { i_cmpsw(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xaa: CLK(2); if (c) do { i_stosb(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xab: CLK(2); if (c) do { i_stosw(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xac: CLK(2); if (c) do { i_lodsb(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xad: CLK(2); if (c) do { i_lodsw(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xae: CLK(2); if (c) do { i_scasb(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xaf: CLK(2); if (c) do { i_scasw(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6c: clk(2); if (c) do { i_insb(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6d: clk(2); if (c) do { i_insw(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6e: clk(2); if (c) do { i_outsb(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6f: clk(2); if (c) do { i_outsw(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa4: clk(2); if (c) do { i_movsb(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa5: clk(2); if (c) do { i_movsw(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa6: clk(2); if (c) do { i_cmpsb(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa7: clk(2); if (c) do { i_cmpsw(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xaa: clk(2); if (c) do { i_stosb(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xab: clk(2); if (c) do { i_stosw(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xac: clk(2); if (c) do { i_lodsb(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xad: clk(2); if (c) do { i_lodsw(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xae: clk(2); if (c) do { i_scasb(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xaf: clk(2); if (c) do { i_scasw(); c--; } while (c>0 && CF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; default: logerror("%s: %06x: REPC invalid\n", tag(), pc()); // Decrement IP so the normal instruction will be executed next m_ip--; + m_pfp--; + if (m_prefetch_queue_tail == 0) + m_prefetch_queue_tail = PREFETCH_QUEUE_SIZE - 1; + else + m_prefetch_queue_tail--; + if (m_prefetch_queue_head == 0) + m_prefetch_queue_head = PREFETCH_QUEUE_SIZE - 1; + else + m_prefetch_queue_head--; break; } } @@ -2349,36 +2188,36 @@ void v30mz_cpu_device::execute_run() case 0x68: // i_push_d16 - PUSH( fetch_word() ); - CLK(1); + push(fetch_word()); + clk(1); break; case 0x69: // i_imul_d16 { uint32_t tmp; - DEF_r16w(); + def_r16w(); tmp = fetch_word(); - m_dst = (int32_t)((int16_t)m_src)*(int32_t)((int16_t)tmp); + m_dst = (int32_t)((int16_t)m_src) * (int32_t)((int16_t)tmp); m_CarryVal = m_OverVal = (((int32_t)m_dst) >> 15 != 0) && (((int32_t)m_dst) >> 15 != -1); - RegWord(m_dst); - CLKM(3,4); + reg_word(m_dst); + clkm(3,4); } break; case 0x6a: // i_push_d8 - PUSH( (uint16_t)((int16_t)((int8_t)fetch())) ); - CLK(1); + push( (uint16_t)((int16_t)((int8_t)fetch()))); + clk(1); break; case 0x6b: // i_imul_d8 { uint32_t src2; - DEF_r16w(); - src2= (uint16_t)((int16_t)((int8_t)fetch())); - m_dst = (int32_t)((int16_t)m_src)*(int32_t)((int16_t)src2); + def_r16w(); + src2 = (uint16_t)((int16_t)((int8_t)fetch())); + m_dst = (int32_t)((int16_t)m_src) * (int32_t)((int16_t)src2); m_CarryVal = m_OverVal = (((int32_t)m_dst) >> 15 != 0) && (((int32_t)m_dst) >> 15 != -1); - RegWord(m_dst); - CLKM(3,4); + reg_word(m_dst); + clkm(3,4); } break; @@ -2400,239 +2239,239 @@ void v30mz_cpu_device::execute_run() case 0x70: // i_jo - JMP( OF); + jmp( OF); break; case 0x71: // i_jno - JMP(!OF); + jmp(!OF); break; case 0x72: // i_jc - JMP( CF); + jmp( CF); break; case 0x73: // i_jnc - JMP(!CF); + jmp(!CF); break; case 0x74: // i_jz - JMP( ZF); + jmp( ZF); break; case 0x75: // i_jnz - JMP(!ZF); + jmp(!ZF); break; case 0x76: // i_jce - JMP(CF || ZF); + jmp(CF || ZF); break; case 0x77: // i_jnce - JMP(!(CF || ZF)); + jmp(!(CF || ZF)); break; case 0x78: // i_js - JMP( SF); + jmp( SF); break; case 0x79: // i_jns - JMP(!SF); + jmp(!SF); break; case 0x7a: // i_jp - JMP( PF); + jmp( PF); break; case 0x7b: // i_jnp - JMP(!PF); + jmp(!PF); break; case 0x7c: // i_jl - JMP((SF!=OF)&&(!ZF)); + jmp((SF != OF) && (!ZF)); break; case 0x7d: // i_jnl - JMP((ZF)||(SF==OF)); + jmp((ZF) || (SF == OF)); break; case 0x7e: // i_jle - JMP((ZF)||(SF!=OF)); + jmp((ZF) || (SF != OF)); break; case 0x7f: // i_jnle - JMP((SF==OF)&&(!ZF)); + jmp((SF == OF) && (!ZF)); break; case 0x80: // i_80pre m_modrm = fetch(); - m_dst = GetRMByte(); + m_dst = get_rm_byte(); m_src = fetch(); - if (m_modrm >=0xc0 ) { CLK(1); } - else if ((m_modrm & 0x38)==0x38) { CLK(2); } - else { CLK(3); } + if (m_modrm >=0xc0) { clk(1); } + else if ((m_modrm & 0x38)==0x38) { clk(2); } + else { clk(3); } switch (m_modrm & 0x38) { - case 0x00: ADDB(); PutbackRMByte(m_dst); break; - case 0x08: ORB(); PutbackRMByte(m_dst); break; - case 0x10: m_src += CF ? 1 : 0; ADDB(); PutbackRMByte(m_dst); break; - case 0x18: m_src += CF ? 1 : 0; SUBB(); PutbackRMByte(m_dst); break; - case 0x20: ANDB(); PutbackRMByte(m_dst); break; - case 0x28: SUBB(); PutbackRMByte(m_dst); break; - case 0x30: XORB(); PutbackRMByte(m_dst); break; - case 0x38: SUBB(); break; /* CMP */ + case 0x00: add_byte(); store_ea_rm_byte(m_dst); break; + case 0x08: or_byte(); store_ea_rm_byte(m_dst); break; + case 0x10: m_src += CF ? 1 : 0; add_byte(); store_ea_rm_byte(m_dst); break; + case 0x18: m_src += CF ? 1 : 0; sub_byte(); store_ea_rm_byte(m_dst); break; + case 0x20: and_byte(); store_ea_rm_byte(m_dst); break; + case 0x28: sub_byte(); store_ea_rm_byte(m_dst); break; + case 0x30: xor_byte(); store_ea_rm_byte(m_dst); break; + case 0x38: sub_byte(); break; // CMP } break; case 0x81: // i_81pre m_modrm = fetch(); - m_dst = GetRMWord(); + m_dst = get_rm_word(); m_src = fetch_word(); - if (m_modrm >=0xc0 ) { CLK(1); } - else if ((m_modrm & 0x38)==0x38) { CLK(2); } - else { CLK(3); } + if (m_modrm >=0xc0) { clk(1); } + else if ((m_modrm & 0x38)==0x38) { clk(2); } + else { clk(3); } switch (m_modrm & 0x38) { - case 0x00: ADDW(); PutbackRMWord(m_dst); break; - case 0x08: ORW(); PutbackRMWord(m_dst); break; - case 0x10: m_src += CF ? 1 : 0; ADDW(); PutbackRMWord(m_dst); break; - case 0x18: m_src += CF ? 1 : 0; SUBW(); PutbackRMWord(m_dst); break; - case 0x20: ANDW(); PutbackRMWord(m_dst); break; - case 0x28: SUBW(); PutbackRMWord(m_dst); break; - case 0x30: XORW(); PutbackRMWord(m_dst); break; - case 0x38: SUBW(); break; /* CMP */ + case 0x00: add_word(); store_ea_rm_word(m_dst); break; + case 0x08: or_word(); store_ea_rm_word(m_dst); break; + case 0x10: m_src += CF ? 1 : 0; add_word(); store_ea_rm_word(m_dst); break; + case 0x18: m_src += CF ? 1 : 0; sub_word(); store_ea_rm_word(m_dst); break; + case 0x20: and_word(); store_ea_rm_word(m_dst); break; + case 0x28: sub_word(); store_ea_rm_word(m_dst); break; + case 0x30: xor_word(); store_ea_rm_word(m_dst); break; + case 0x38: sub_word(); break; // CMP } break; case 0x82: // i_82pre m_modrm = fetch(); - m_dst = GetRMByte(); + m_dst = get_rm_byte(); m_src = (int8_t)fetch(); - if (m_modrm >=0xc0 ) { CLK(1); } - else if ((m_modrm & 0x38)==0x38) { CLK(2); } - else { CLK(3); } + if (m_modrm >=0xc0) { clk(1); } + else if ((m_modrm & 0x38) == 0x38) { clk(2); } + else { clk(3); } switch (m_modrm & 0x38) { - case 0x00: ADDB(); PutbackRMByte(m_dst); break; - case 0x08: ORB(); PutbackRMByte(m_dst); break; - case 0x10: m_src += CF ? 1 : 0; ADDB(); PutbackRMByte(m_dst); break; - case 0x18: m_src += CF ? 1 : 0; SUBB(); PutbackRMByte(m_dst); break; - case 0x20: ANDB(); PutbackRMByte(m_dst); break; - case 0x28: SUBB(); PutbackRMByte(m_dst); break; - case 0x30: XORB(); PutbackRMByte(m_dst); break; - case 0x38: SUBB(); break; /* CMP */ + case 0x00: add_byte(); store_ea_rm_byte(m_dst); break; + case 0x08: or_byte(); store_ea_rm_byte(m_dst); break; + case 0x10: m_src += CF ? 1 : 0; add_byte(); store_ea_rm_byte(m_dst); break; + case 0x18: m_src += CF ? 1 : 0; sub_byte(); store_ea_rm_byte(m_dst); break; + case 0x20: and_byte(); store_ea_rm_byte(m_dst); break; + case 0x28: sub_byte(); store_ea_rm_byte(m_dst); break; + case 0x30: xor_byte(); store_ea_rm_byte(m_dst); break; + case 0x38: sub_byte(); break; // CMP } break; case 0x83: // i_83pre m_modrm = fetch(); - m_dst = GetRMWord(); - m_src = ((int16_t)((int8_t)fetch())); - if ( m_modrm >= 0xc0 ) { CLK(1); } - else if (( m_modrm & 0x38 ) == 0x38) { CLK(2); } - else { CLK(3); } + m_dst = get_rm_word(); + m_src = (int8_t)fetch(); + if ( m_modrm >= 0xc0) { clk(1); } + else if ((m_modrm & 0x38) == 0x38) { clk(2); } + else { clk(3); } switch (m_modrm & 0x38) { - case 0x00: ADDW(); PutbackRMWord(m_dst); break; - case 0x08: ORW(); PutbackRMWord(m_dst); break; - case 0x10: m_src += CF ? 1 : 0; ADDW(); PutbackRMWord(m_dst); break; - case 0x18: m_src += CF ? 1 : 0; SUBW(); PutbackRMWord(m_dst); break; - case 0x20: ANDW(); PutbackRMWord(m_dst); break; - case 0x28: SUBW(); PutbackRMWord(m_dst); break; - case 0x30: XORW(); PutbackRMWord(m_dst); break; - case 0x38: SUBW(); break; /* CMP */ + case 0x00: add_word(); store_ea_rm_word(m_dst); break; + case 0x08: or_word(); store_ea_rm_word(m_dst); break; + case 0x10: m_src += CF ? 1 : 0; add_word(); store_ea_rm_word(m_dst); break; + case 0x18: m_src += CF ? 1 : 0; sub_word(); store_ea_rm_word(m_dst); break; + case 0x20: and_word(); store_ea_rm_word(m_dst); break; + case 0x28: sub_word(); store_ea_rm_word(m_dst); break; + case 0x30: xor_word(); store_ea_rm_word(m_dst); break; + case 0x38: sub_word(); break; // CMP } break; case 0x84: // i_test_br8 - DEF_br8(); - ANDB(); - CLKM(1,2); + def_br8(); + and_byte(); + clkm(1,2); break; case 0x85: // i_test_wr16 - DEF_wr16(); - ANDW(); - CLKM(1,2); + def_wr16(); + and_word(); + clkm(1,2); break; case 0x86: // i_xchg_br8 - DEF_br8(); - RegByte(m_dst); - PutbackRMByte(m_src); - CLKM(3,5); + def_br8(); + reg_byte(m_dst); + store_ea_rm_byte(m_src); + clkm(3,5); break; case 0x87: // i_xchg_wr16 - DEF_wr16(); - RegWord(m_dst); - PutbackRMWord(m_src); - CLKM(3,5); + def_wr16(); + reg_word(m_dst); + store_ea_rm_word(m_src); + clkm(3,5); break; case 0x88: // i_mov_br8 m_modrm = fetch(); - m_src = RegByte(); - PutRMByte(m_src); - CLK(1); + m_src = reg_byte(); + put_rm_byte(m_src); + clk(1); break; case 0x89: // i_mov_wr16 m_modrm = fetch(); - m_src = RegWord(); - PutRMWord(m_src); - CLK(1); + m_src = reg_word(); + put_rm_word(m_src); + clk(1); break; case 0x8a: // i_mov_r8b m_modrm = fetch(); - m_src = GetRMByte(); - RegByte(m_src); - CLK(1); + m_src = get_rm_byte(); + reg_byte(m_src); + clk(1); break; case 0x8b: // i_mov_r16w m_modrm = fetch(); - m_src = GetRMWord(); - RegWord(m_src); - CLK(1); + m_src = get_rm_word(); + reg_word(m_src); + clk(1); break; case 0x8c: // i_mov_wsreg m_modrm = fetch(); - PutRMWord(m_sregs[(m_modrm & 0x38) >> 3]); - CLKM(1,3); + put_rm_word(m_sregs[(m_modrm & 0x38) >> 3]); + clkm(1,3); break; case 0x8d: // i_lea m_modrm = fetch(); get_ea(); - RegWord(m_eo); - CLK(1); + reg_word(m_eo); + clk(1); break; case 0x8e: // i_mov_sregw m_modrm = fetch(); - m_src = GetRMWord(); - CLKM(2,3); + m_src = get_rm_word(); + clkm(2,3); switch (m_modrm & 0x38) { - case 0x00: /* mov es,ew */ - m_sregs[ES] = m_src; + case 0x00: // mov ds1,ew + m_sregs[DS1] = m_src; break; - case 0x08: /* mov cs,ew */ - m_sregs[CS] = m_src; + case 0x08: // mov cs,ew + m_sregs[PS] = m_src; break; - case 0x10: /* mov ss,ew */ + case 0x10: // mov ss,ew m_sregs[SS] = m_src; break; - case 0x18: /* mov ds,ew */ - m_sregs[DS] = m_src; + case 0x18: // mov ds0,ew + m_sregs[DS0] = m_src; break; default: logerror("%s: %06x: Mov Sreg - Invalid register\n", tag(), pc()); @@ -2642,69 +2481,70 @@ void v30mz_cpu_device::execute_run() case 0x8f: // i_popw m_modrm = fetch(); - PutRMWord( POP() ); - CLKM(1,3); + put_rm_word(pop()); + clkm(1,3); break; case 0x90: // i_nop - CLK(1); + clk(1); break; case 0x91: // i_xchg_axcx - XchgAWReg(CW); - CLK(3); + xchg_AW_reg(CW); + clk(3); break; case 0x92: // i_xchg_axdx - XchgAWReg(DW); - CLK(3); + xchg_AW_reg(DW); + clk(3); break; case 0x93: // i_xchg_axbx - XchgAWReg(BW); - CLK(3); + xchg_AW_reg(BW); + clk(3); break; case 0x94: // i_xchg_axsp - XchgAWReg(SP); - CLK(3); + xchg_AW_reg(SP); + clk(3); break; case 0x95: // i_xchg_axbp - XchgAWReg(BP); - CLK(3); + xchg_AW_reg(BP); + clk(3); break; case 0x96: // i_xchg_axsi - XchgAWReg(IX); - CLK(3); + xchg_AW_reg(IX); + clk(3); break; case 0x97: // i_xchg_axdi - XchgAWReg(IY); - CLK(3); + xchg_AW_reg(IY); + clk(3); break; case 0x98: // i_cbw m_regs.b[AH] = (m_regs.b[AL] & 0x80) ? 0xff : 0; - CLK(1); + clk(1); break; case 0x99: // i_cwd m_regs.w[DW] = (m_regs.b[AH] & 0x80) ? 0xffff : 0; - CLK(1); + clk(1); break; case 0x9a: // i_call_far { uint16_t tmp = fetch_word(); uint16_t tmp2 = fetch_word(); - PUSH(m_sregs[CS]); - PUSH(m_ip); + push(m_sregs[PS]); + push(m_ip); m_ip = tmp; - m_sregs[CS] = tmp2; - CLK(10); + m_sregs[PS] = tmp2; + init_prefetch(); + clk(10); } break; @@ -2713,8 +2553,8 @@ void v30mz_cpu_device::execute_run() break; case 0x9c: // i_pushf - PUSH( CompressFlags() ); - CLK(2); + push(compress_flags()); + clk(2); break; case 0x9d: // i_popf @@ -2723,50 +2563,36 @@ void v30mz_cpu_device::execute_run() case 0x9e: // i_sahf { - uint32_t tmp = (CompressFlags() & 0xff00) | (m_regs.b[AH] & 0xd5); - ExpandFlags(tmp); - CLK(4); + uint32_t tmp = (compress_flags() & 0xff00) | (m_regs.b[AH] & 0xd5); + expand_flags(tmp); + clk(4); } break; case 0x9f: // i_lahf - m_regs.b[AH] = CompressFlags(); - CLK(2); + m_regs.b[AH] = compress_flags(); + clk(2); break; case 0xa0: // i_mov_aldisp - { - uint32_t addr = fetch_word(); - m_regs.b[AL] = GetMemB(DS, addr); - CLK(1); - } + m_regs.b[AL] = read_byte(default_base(DS0), fetch_word()); + clk(1); break; case 0xa1: // i_mov_axdisp - { - uint32_t addr = fetch_word(); - m_regs.b[AL] = GetMemB(DS, addr); - m_regs.b[AH] = GetMemB(DS, addr+1); - CLK(1); - } + m_regs.w[AW] = read_word(default_base(DS0), fetch_word()); + clk(1); break; case 0xa2: // i_mov_dispal - { - uint32_t addr = fetch_word(); - PutMemB(DS, addr, m_regs.b[AL]); - CLK(1); - } + write_byte(default_base(DS0), fetch_word(), m_regs.b[AL]); + clk(1); break; case 0xa3: // i_mov_dispax - { - uint32_t addr = fetch_word(); - PutMemB(DS, addr, m_regs.b[AL]); - PutMemB(DS, addr+1, m_regs.b[AH]); - CLK(1); - } + write_word(default_base(DS0), fetch_word(), m_regs.w[AW]); + clk(1); break; case 0xa4: // i_movsb @@ -2787,15 +2613,15 @@ void v30mz_cpu_device::execute_run() case 0xa8: // i_test_ald8 - DEF_ald8(); - ANDB(); - CLK(1); + def_ald8(); + and_byte(); + clk(1); break; case 0xa9: // i_test_axd16 - DEF_axd16(); - ANDW(); - CLK(1); + def_awd16(); + and_word(); + clk(1); break; case 0xaa: // i_stosb @@ -2825,91 +2651,83 @@ void v30mz_cpu_device::execute_run() case 0xb0: // i_mov_ald8 m_regs.b[AL] = fetch(); - CLK(1); + clk(1); break; case 0xb1: // i_mov_cld8 m_regs.b[CL] = fetch(); - CLK(1); + clk(1); break; case 0xb2: // i_mov_dld8 m_regs.b[DL] = fetch(); - CLK(1); + clk(1); break; case 0xb3: // i_mov_bld8 m_regs.b[BL] = fetch(); - CLK(1); + clk(1); break; case 0xb4: // i_mov_ahd8 m_regs.b[AH] = fetch(); - CLK(1); + clk(1); break; case 0xb5: // i_mov_chd8 m_regs.b[CH] = fetch(); - CLK(1); + clk(1); break; case 0xb6: // i_mov_dhd8 m_regs.b[DH] = fetch(); - CLK(1); + clk(1); break; case 0xb7: // i_mov_bhd8 m_regs.b[BH] = fetch(); - CLK(1); + clk(1); break; case 0xb8: // i_mov_axd16 - m_regs.b[AL] = fetch(); - m_regs.b[AH] = fetch(); - CLK(1); + m_regs.w[AW] = fetch_word(); + clk(1); break; case 0xb9: // i_mov_cxd16 - m_regs.b[CL] = fetch(); - m_regs.b[CH] = fetch(); - CLK(1); + m_regs.w[CW] = fetch_word(); + clk(1); break; case 0xba: // i_mov_dxd16 - m_regs.b[DL] = fetch(); - m_regs.b[DH] = fetch(); - CLK(1); + m_regs.w[DW] = fetch_word(); + clk(1); break; case 0xbb: // i_mov_bxd16 - m_regs.b[BL] = fetch(); - m_regs.b[BH] = fetch(); - CLK(1); + m_regs.w[BW] = fetch_word(); + clk(1); break; case 0xbc: // i_mov_spd16 - m_regs.b[SPL] = fetch(); - m_regs.b[SPH] = fetch(); - CLK(1); + m_regs.w[SP] = fetch_word(); + clk(1); break; case 0xbd: // i_mov_bpd16 - m_regs.b[BPL] = fetch(); - m_regs.b[BPH] = fetch(); - CLK(1); + m_regs.w[BP] = fetch_word(); + clk(1); break; case 0xbe: // i_mov_sid16 - m_regs.b[IXL] = fetch(); - m_regs.b[IXH] = fetch(); - CLK(1); + m_regs.w[IX] = fetch_word(); + clk(1); break; case 0xbf: // i_mov_did16 - m_regs.b[IYL] = fetch(); - m_regs.b[IYH] = fetch(); - CLK(1); + m_regs.w[IY] = fetch_word(); + clk(1); break; @@ -2917,22 +2735,22 @@ void v30mz_cpu_device::execute_run() { uint8_t c; m_modrm = fetch(); - m_src = GetRMByte(); + m_src = get_rm_byte(); m_dst = m_src; c = fetch(); - CLKM(3,5); + clkm(3,5); if (c) { - switch ( m_modrm & 0x38 ) + switch (m_modrm & 0x38) { - case 0x00: do { ROL_BYTE(); c--; } while (c>0); PutbackRMByte(m_dst); break; - case 0x08: do { ROR_BYTE(); c--; } while (c>0); PutbackRMByte(m_dst); break; - case 0x10: do { ROLC_BYTE(); c--; } while (c>0); PutbackRMByte(m_dst); break; - case 0x18: do { RORC_BYTE(); c--; } while (c>0); PutbackRMByte(m_dst); break; - case 0x20: SHL_BYTE(c); break; - case 0x28: SHR_BYTE(c); break; + case 0x00: do { rol_byte(); c--; } while (c > 0); store_ea_rm_byte(m_dst); break; + case 0x08: do { ror_byte(); c--; } while (c > 0); store_ea_rm_byte(m_dst); break; + case 0x10: do { rolc_byte(); c--; } while (c > 0); store_ea_rm_byte(m_dst); break; + case 0x18: do { rorc_byte(); c--; } while (c > 0); store_ea_rm_byte(m_dst); break; + case 0x20: shl_byte(c); break; + case 0x28: shr_byte(c); break; case 0x30: logerror("%s: %06x: Undefined opcode 0xc0 0x30 (SHLA)\n", tag(), pc()); break; - case 0x38: SHRA_BYTE(c); break; + case 0x38: shra_byte(c); break; } } } @@ -2942,22 +2760,22 @@ void v30mz_cpu_device::execute_run() { uint8_t c; m_modrm = fetch(); - m_src = GetRMWord(); + m_src = get_rm_word(); m_dst = m_src; c = fetch(); - CLKM(3,5); + clkm(3,5); if (c) { - switch ( m_modrm & 0x38 ) + switch (m_modrm & 0x38) { - case 0x00: do { ROL_WORD(); c--; } while (c>0); PutbackRMWord(m_dst); break; - case 0x08: do { ROR_WORD(); c--; } while (c>0); PutbackRMWord(m_dst); break; - case 0x10: do { ROLC_WORD(); c--; } while (c>0); PutbackRMWord(m_dst); break; - case 0x18: do { RORC_WORD(); c--; } while (c>0); PutbackRMWord(m_dst); break; - case 0x20: SHL_WORD(c); break; - case 0x28: SHR_WORD(c); break; + case 0x00: do { rol_word(); c--; } while (c > 0); store_ea_rm_word(m_dst); break; + case 0x08: do { ror_word(); c--; } while (c > 0); store_ea_rm_word(m_dst); break; + case 0x10: do { rolc_word(); c--; } while (c > 0); store_ea_rm_word(m_dst); break; + case 0x18: do { rorc_word(); c--; } while (c > 0); store_ea_rm_word(m_dst); break; + case 0x20: shl_word(c); break; + case 0x28: shr_word(c); break; case 0x30: logerror("%s: %06x: Undefined opcode 0xc1 0x30 (SHLA)\n", tag(), pc()); break; - case 0x38: SHRA_WORD(c); break; + case 0x38: shra_word(c); break; } } } @@ -2967,41 +2785,43 @@ void v30mz_cpu_device::execute_run() case 0xc2: // i_ret_d16 { uint32_t count = fetch_word(); - m_ip = POP(); + m_ip = pop(); m_regs.w[SP] += count; - CLK(6); + init_prefetch(); + clk(6); } break; case 0xc3: // i_ret - m_ip = POP(); - CLK(6); + m_ip = pop(); + init_prefetch(); + clk(6); break; case 0xc4: // i_les_dw m_modrm = fetch(); - RegWord( GetRMWord() ); - m_sregs[ES] = GetnextRMWord(); - CLK(6); + reg_word(get_rm_word()); + m_sregs[DS1] = get_next_rm_word(); + clk(6); break; case 0xc5: // i_lds_dw m_modrm = fetch(); - RegWord( GetRMWord() ); - m_sregs[DS] = GetnextRMWord(); - CLK(6); + reg_word(get_rm_word()); + m_sregs[DS0] = get_next_rm_word(); + clk(6); break; case 0xc6: // i_mov_bd8 m_modrm = fetch(); - PutImmRMByte(); - CLK(1); + put_imm_rm_byte(); + clk(1); break; case 0xc7: // i_mov_wd16 m_modrm = fetch(); - PutImmRMWord(); - CLK(1); + put_imm_rm_word(); + clk(1); break; @@ -3010,107 +2830,110 @@ void v30mz_cpu_device::execute_run() uint16_t nb = fetch(); uint32_t level; - CLK(8); + clk(8); nb |= fetch() << 8; level = fetch(); - PUSH(m_regs.w[BP]); + push(m_regs.w[BP]); m_regs.w[BP] = m_regs.w[SP]; m_regs.w[SP] -= nb; - for (int i=1; i<level; i++) + for (int i = 1; i < level; i++) { - PUSH( GetMemW(SS,m_regs.w[BP] - i*2) ); - CLK(4); + push(read_word(default_base(SS), m_regs.w[BP] - i*2)); + clk(4); } if (level) { - PUSH(m_regs.w[BP]); - CLK( ( level == 1 ) ? 2 : 3 ); + push(m_regs.w[BP]); + clk((level == 1) ? 2 : 3); } } break; case 0xc9: // i_leave m_regs.w[SP] = m_regs.w[BP]; - m_regs.w[BP] = POP(); - CLK(2); + m_regs.w[BP] = pop(); + clk(2); break; case 0xca: // i_retf_d16 { uint32_t count = fetch_word(); - m_ip = POP(); - m_sregs[CS] = POP(); + m_ip = pop(); + m_sregs[PS] = pop(); m_regs.w[SP] += count; - CLK(9); + init_prefetch(); + clk(9); } break; case 0xcb: // i_retf - m_ip = POP(); - m_sregs[CS] = POP(); - CLK(8); + m_ip = pop(); + m_sregs[PS] = pop(); + init_prefetch(); + clk(8); break; case 0xcc: // i_int3 - interrupt(3); - CLK(9); + interrupt(BRK_3_INT); + clk(9); break; case 0xcd: // i_int interrupt(fetch()); - CLK(10); + clk(10); break; case 0xce: // i_into if (OF) { - interrupt(4); - CLK(7); + interrupt(BRKV_INT); + clk(7); } - CLK(6); + clk(6); break; case 0xcf: // i_iret - m_ip = POP(); - m_sregs[CS] = POP(); + m_ip = pop(); + m_sregs[PS] = pop(); i_popf(); - CLK(10); + init_prefetch(); + clk(10); break; case 0xd0: // i_rotshft_b m_modrm = fetch(); - m_src = GetRMByte(); + m_src = get_rm_byte(); m_dst = m_src; - CLKM(1,3); - switch ( m_modrm & 0x38 ) + clkm(1,3); + switch (m_modrm & 0x38) { - case 0x00: ROL_BYTE(); PutbackRMByte(m_dst); m_OverVal = (m_src ^ m_dst) & 0x80; break; - case 0x08: ROR_BYTE(); PutbackRMByte(m_dst); m_OverVal = (m_src ^ m_dst) & 0x80; break; - case 0x10: ROLC_BYTE(); PutbackRMByte(m_dst); m_OverVal = (m_src ^ m_dst) & 0x80; break; - case 0x18: RORC_BYTE(); PutbackRMByte(m_dst); m_OverVal = (m_src ^ m_dst) & 0x80; break; - case 0x20: SHL_BYTE(1); m_OverVal = (m_src ^ m_dst) & 0x80; break; - case 0x28: SHR_BYTE(1); m_OverVal = (m_src ^ m_dst) & 0x80; break; + case 0x00: rol_byte(); store_ea_rm_byte(m_dst); m_OverVal = (m_src ^ m_dst) & 0x80; break; + case 0x08: ror_byte(); store_ea_rm_byte(m_dst); m_OverVal = (m_src ^ m_dst) & 0x80; break; + case 0x10: rolc_byte(); store_ea_rm_byte(m_dst); m_OverVal = (m_src ^ m_dst) & 0x80; break; + case 0x18: rorc_byte(); store_ea_rm_byte(m_dst); m_OverVal = (m_src ^ m_dst) & 0x80; break; + case 0x20: shl_byte(1); m_OverVal = (m_src ^ m_dst) & 0x80; break; + case 0x28: shr_byte(1); m_OverVal = (m_src ^ m_dst) & 0x80; break; case 0x30: logerror("%s: %06x: Undefined opcode 0xd0 0x30 (SHLA)\n", tag(), pc()); break; - case 0x38: SHRA_BYTE(1); m_OverVal = 0; break; + case 0x38: shra_byte(1); m_OverVal = 0; break; } break; case 0xd1: // i_rotshft_w m_modrm = fetch(); - m_src = GetRMWord(); + m_src = get_rm_word(); m_dst = m_src; - CLKM(1,3); - switch ( m_modrm & 0x38 ) + clkm(1,3); + switch (m_modrm & 0x38) { - case 0x00: ROL_WORD(); PutbackRMWord(m_dst); m_OverVal = (m_src ^ m_dst) & 0x8000; break; - case 0x08: ROR_WORD(); PutbackRMWord(m_dst); m_OverVal = (m_src ^ m_dst) & 0x8000; break; - case 0x10: ROLC_WORD(); PutbackRMWord(m_dst); m_OverVal = (m_src ^ m_dst) & 0x8000; break; - case 0x18: RORC_WORD(); PutbackRMWord(m_dst); m_OverVal = (m_src ^ m_dst) & 0x8000; break; - case 0x20: SHL_WORD(1); m_OverVal = (m_src ^ m_dst) & 0x8000; break; - case 0x28: SHR_WORD(1); m_OverVal = (m_src ^ m_dst) & 0x8000; break; + case 0x00: rol_word(); store_ea_rm_word(m_dst); m_OverVal = (m_src ^ m_dst) & 0x8000; break; + case 0x08: ror_word(); store_ea_rm_word(m_dst); m_OverVal = (m_src ^ m_dst) & 0x8000; break; + case 0x10: rolc_word(); store_ea_rm_word(m_dst); m_OverVal = (m_src ^ m_dst) & 0x8000; break; + case 0x18: rorc_word(); store_ea_rm_word(m_dst); m_OverVal = (m_src ^ m_dst) & 0x8000; break; + case 0x20: shl_word(1); m_OverVal = (m_src ^ m_dst) & 0x8000; break; + case 0x28: shr_word(1); m_OverVal = (m_src ^ m_dst) & 0x8000; break; case 0x30: logerror("%s: %06x: Undefined opcode 0xd1 0x30 (SHLA)\n", tag(), pc()); break; - case 0x38: SHRA_WORD(1); m_OverVal = 0; break; + case 0x38: shra_word(1); m_OverVal = 0; break; } break; @@ -3119,22 +2942,22 @@ void v30mz_cpu_device::execute_run() uint8_t c; m_modrm = fetch(); - m_src = GetRMByte(); + m_src = get_rm_byte(); m_dst = m_src; c = m_regs.b[CL]; - CLKM(3,5); + clkm(3,5); if (c) { - switch ( m_modrm & 0x38 ) + switch (m_modrm & 0x38) { - case 0x00: do { ROL_BYTE(); c--; } while (c>0); PutbackRMByte(m_dst); break; - case 0x08: do { ROR_BYTE(); c--; } while (c>0); PutbackRMByte(m_dst); break; - case 0x10: do { ROLC_BYTE(); c--; } while (c>0); PutbackRMByte(m_dst); break; - case 0x18: do { RORC_BYTE(); c--; } while (c>0); PutbackRMByte(m_dst); break; - case 0x20: SHL_BYTE(c); break; - case 0x28: SHR_BYTE(c); break; + case 0x00: do { rol_byte(); c--; } while (c > 0); store_ea_rm_byte(m_dst); break; + case 0x08: do { ror_byte(); c--; } while (c > 0); store_ea_rm_byte(m_dst); break; + case 0x10: do { rolc_byte(); c--; } while (c > 0); store_ea_rm_byte(m_dst); break; + case 0x18: do { rorc_byte(); c--; } while (c > 0); store_ea_rm_byte(m_dst); break; + case 0x20: shl_byte(c); break; + case 0x28: shr_byte(c); break; case 0x30: logerror("%s: %06x: Undefined opcode 0xd2 0x30 (SHLA)\n", tag(), pc()); break; - case 0x38: SHRA_BYTE(c); break; + case 0x38: shra_byte(c); break; } } } @@ -3145,57 +2968,57 @@ void v30mz_cpu_device::execute_run() uint8_t c; m_modrm = fetch(); - m_src = GetRMWord(); + m_src = get_rm_word(); m_dst = m_src; c = m_regs.b[CL]; - CLKM(3,5); + clkm(3,5); if (c) { - switch ( m_modrm & 0x38 ) + switch (m_modrm & 0x38) { - case 0x00: do { ROL_WORD(); c--; } while (c>0); PutbackRMWord(m_dst); break; - case 0x08: do { ROR_WORD(); c--; } while (c>0); PutbackRMWord(m_dst); break; - case 0x10: do { ROLC_WORD(); c--; } while (c>0); PutbackRMWord(m_dst); break; - case 0x18: do { RORC_WORD(); c--; } while (c>0); PutbackRMWord(m_dst); break; - case 0x20: SHL_WORD(c); break; - case 0x28: SHR_WORD(c); break; + case 0x00: do { rol_word(); c--; } while (c > 0); store_ea_rm_word(m_dst); break; + case 0x08: do { ror_word(); c--; } while (c > 0); store_ea_rm_word(m_dst); break; + case 0x10: do { rolc_word(); c--; } while (c > 0); store_ea_rm_word(m_dst); break; + case 0x18: do { rorc_word(); c--; } while (c > 0); store_ea_rm_word(m_dst); break; + case 0x20: shl_word(c); break; + case 0x28: shr_word(c); break; case 0x30: logerror("%s: %06x: Undefined opcode 0xd3 0x30 (SHLA)\n", tag(), pc()); break; - case 0x38: SHRA_WORD(c); break; + case 0x38: shra_word(c); break; } } } break; - case 0xd4: // i_aam + case 0xd4: // cvtbd fetch(); m_regs.b[AH] = m_regs.b[AL] / 10; m_regs.b[AL] %= 10; - set_SZPF_Word(m_regs.w[AW]); - CLK(17); + set_SZPF_word(m_regs.w[AW]); + clk(17); break; - case 0xd5: // i_aad + case 0xd5: // cvtdb fetch(); m_regs.b[AL] = m_regs.b[AH] * 10 + m_regs.b[AL]; m_regs.b[AH] = 0; - set_SZPF_Byte(m_regs.b[AL]); - CLK(5); + set_SZPF_byte(m_regs.b[AL]); + clk(5); break; case 0xd6: // i_setalc m_regs.b[AL] = (CF) ? 0xff : 0x00; - CLK(3); - logerror("%s: %06x: Undefined opcode (SETALC)\n", tag(), pc() ); + clk(3); + logerror("%s: %06x: Undefined opcode (SETALC)\n", tag(), pc()); break; case 0xd7: // i_trans - m_regs.b[AL] = GetMemB( DS, m_regs.w[BW] + m_regs.b[AL] ); - CLK(5); + m_regs.b[AL] = read_byte(default_base(DS0), m_regs.w[BW] + m_regs.b[AL]); + clk(5); break; - case 0xd8: // i_fpo + case 0xd8: // FPO1 not supported by v30mz m_modrm = fetch(); - CLK(1); + clk(1); logerror("%s: %06x: Unimplemented floating point control %04x\n", tag(), pc(), m_modrm); break; @@ -3208,9 +3031,10 @@ void v30mz_cpu_device::execute_run() if (!ZF && m_regs.w[CW]) { m_ip = m_ip + disp; - CLK(3); + init_prefetch(); + clk(3); } - CLK(3); + clk(3); } break; @@ -3222,9 +3046,10 @@ void v30mz_cpu_device::execute_run() if (ZF && m_regs.w[CW]) { m_ip = m_ip + disp; - CLK(3); + init_prefetch(); + clk(3); } - CLK(3); + clk(3); } break; @@ -3236,9 +3061,10 @@ void v30mz_cpu_device::execute_run() if (m_regs.w[CW]) { m_ip = m_ip + disp; - CLK(3); + init_prefetch(); + clk(3); } - CLK(2); + clk(2); } break; @@ -3249,40 +3075,31 @@ void v30mz_cpu_device::execute_run() if (m_regs.w[CW] == 0) { m_ip = m_ip + disp; - CLK(3); + init_prefetch(); + clk(3); } - CLK(1); + clk(1); } break; case 0xe4: // i_inal - m_regs.b[AL] = read_port( fetch() ); - CLK(6); + m_regs.b[AL] = read_port(fetch()); + clk(6); break; case 0xe5: // i_inax - { - uint8_t port = fetch(); - - m_regs.b[AL] = read_port(port); - m_regs.b[AH] = read_port(port+1); - CLK(6); - } + m_regs.w[AW] = read_port_word(fetch()); + clk(6); break; case 0xe6: // i_outal - write_port( fetch(), m_regs.b[AL]); - CLK(6); + write_port(fetch(), m_regs.b[AL]); + clk(6); break; case 0xe7: // i_outax - { - uint8_t port = fetch(); - - write_port(port, m_regs.b[AL]); - write_port(port+1, m_regs.b[AH]); - CLK(6); - } + write_port_word(fetch(), m_regs.w[AW]); + clk(6); break; @@ -3290,9 +3107,10 @@ void v30mz_cpu_device::execute_run() { int16_t tmp = (int16_t)fetch_word(); - PUSH(m_ip); + push(m_ip); m_ip = m_ip + tmp; - CLK(5); + init_prefetch(); + clk(5); } break; @@ -3300,7 +3118,8 @@ void v30mz_cpu_device::execute_run() { int16_t offset = (int16_t)fetch_word(); m_ip += offset; - CLK(4); + init_prefetch(); + clk(4); } break; @@ -3309,9 +3128,10 @@ void v30mz_cpu_device::execute_run() uint16_t tmp = fetch_word(); uint16_t tmp1 = fetch_word(); - m_sregs[CS] = tmp1; + m_sregs[PS] = tmp1; m_ip = tmp; - CLK(7); + init_prefetch(); + clk(7); } break; @@ -3319,50 +3139,41 @@ void v30mz_cpu_device::execute_run() { int tmp = (int)((int8_t)fetch()); - CLK(4); - if (tmp==-2 && m_no_interrupt==0 && (m_pending_irq==0) && m_icount>0) + clk(4); + if (tmp == -2 && m_no_interrupt == 0 && (m_pending_irq == 0) && m_icount > 0) { - m_icount%=12; /* cycle skip */ + m_icount %= 12; // cycle skip } - m_ip = (uint16_t)(m_ip+tmp); + m_ip = (uint16_t)(m_ip + tmp); + init_prefetch(); } break; case 0xec: // i_inaldx m_regs.b[AL] = read_port(m_regs.w[DW]); - CLK(6); + clk(6); break; case 0xed: // i_inaxdx - { - uint32_t port = m_regs.w[DW]; - - m_regs.b[AL] = read_port(port); - m_regs.b[AH] = read_port(port+1); - CLK(6); - } + m_regs.w[AW] = read_port_word(m_regs.w[DW]); + clk(6); break; case 0xee: // i_outdxal write_port(m_regs.w[DW], m_regs.b[AL]); - CLK(6); + clk(6); break; case 0xef: // i_outdxax - { - uint32_t port = m_regs.w[DW]; - - write_port(port, m_regs.b[AL]); - write_port(port+1, m_regs.b[AH]); - CLK(6); - } + write_port_word(m_regs.w[DW], m_regs.w[AW]); + clk(6); break; case 0xf0: // i_lock logerror("%s: %06x: Warning - BUSLOCK\n", tag(), pc()); m_no_interrupt = 1; - CLK(1); + clk(1); break; case 0xf2: // i_repne @@ -3372,24 +3183,33 @@ void v30mz_cpu_device::execute_run() switch (next) { - case 0x6c: CLK(3); if (c) do { i_insb(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0x6d: CLK(3); if (c) do { i_insw(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0x6e: CLK(3); if (c) do { i_outsb(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0x6f: CLK(3); if (c) do { i_outsw(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa4: CLK(3); if (c) do { i_movsb(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa5: CLK(3); if (c) do { i_movsw(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa6: CLK(3); if (c) do { i_cmpsb(); c--; } while (c>0 && !ZF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa7: CLK(3); if (c) do { i_cmpsw(); c--; } while (c>0 && !ZF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xaa: CLK(3); if (c) do { i_stosb(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xab: CLK(3); if (c) do { i_stosw(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xac: CLK(3); if (c) do { i_lodsb(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xad: CLK(3); if (c) do { i_lodsw(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xae: CLK(3); if (c) do { i_scasb(); c--; } while (c>0 && !ZF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xaf: CLK(3); if (c) do { i_scasw(); c--; } while (c>0 && !ZF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6c: clk(3); if (c) do { i_insb(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6d: clk(3); if (c) do { i_insw(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6e: clk(3); if (c) do { i_outsb(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6f: clk(3); if (c) do { i_outsw(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa4: clk(3); if (c) do { i_movsb(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa5: clk(3); if (c) do { i_movsw(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa6: clk(3); if (c) do { i_cmpsb(); c--; } while (c > 0 && !ZF); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa7: clk(3); if (c) do { i_cmpsw(); c--; } while (c > 0 && !ZF); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xaa: clk(3); if (c) do { i_stosb(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xab: clk(3); if (c) do { i_stosw(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xac: clk(3); if (c) do { i_lodsb(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xad: clk(3); if (c) do { i_lodsw(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xae: clk(3); if (c) do { i_scasb(); c--; } while (c > 0 && !ZF); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xaf: clk(3); if (c) do { i_scasw(); c--; } while (c > 0 && !ZF); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; default: logerror("%s: %06x: REPNE invalid\n", tag(), pc()); // Decrement IP so the normal instruction will be executed next m_ip--; + m_pfp--; + if (m_prefetch_queue_tail == 0) + m_prefetch_queue_tail = PREFETCH_MAX_SIZE - 1; + else + m_prefetch_queue_tail--; + if (m_prefetch_queue_head == 0) + m_prefetch_queue_head = PREFETCH_MAX_SIZE - 1; + else + m_prefetch_queue_head--; break; } } @@ -3402,89 +3222,97 @@ void v30mz_cpu_device::execute_run() switch (next) { - case 0x6c: CLK(3); if (c) do { i_insb(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0x6d: CLK(3); if (c) do { i_insw(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0x6e: CLK(3); if (c) do { i_outsb(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0x6f: CLK(3); if (c) do { i_outsw(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa4: CLK(3); if (c) do { i_movsb(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa5: CLK(3); if (c) do { i_movsw(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa6: CLK(3); if (c) do { i_cmpsb(); c--; } while (c>0 && ZF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xa7: CLK(3); if (c) do { i_cmpsw(); c--; } while (c>0 && ZF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xaa: CLK(3); if (c) do { i_stosb(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xab: CLK(3); if (c) do { i_stosw(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xac: CLK(3); if (c) do { i_lodsb(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xad: CLK(3); if (c) do { i_lodsw(); c--; } while (c>0); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xae: CLK(3); if (c) do { i_scasb(); c--; } while (c>0 && ZF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; - case 0xaf: CLK(3); if (c) do { i_scasw(); c--; } while (c>0 && ZF); m_regs.w[CW]=c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6c: clk(3); if (c) do { i_insb(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6d: clk(3); if (c) do { i_insw(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6e: clk(3); if (c) do { i_outsb(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0x6f: clk(3); if (c) do { i_outsw(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa4: clk(3); if (c) do { i_movsb(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa5: clk(3); if (c) do { i_movsw(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa6: clk(3); if (c) do { i_cmpsb(); c--; } while (c > 0 && ZF); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xa7: clk(3); if (c) do { i_cmpsw(); c--; } while (c > 0 && ZF); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xaa: clk(3); if (c) do { i_stosb(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xab: clk(3); if (c) do { i_stosw(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xac: clk(3); if (c) do { i_lodsb(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xad: clk(3); if (c) do { i_lodsw(); c--; } while (c > 0); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xae: clk(3); if (c) do { i_scasb(); c--; } while (c > 0 && ZF); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; + case 0xaf: clk(3); if (c) do { i_scasw(); c--; } while (c > 0 && ZF); m_regs.w[CW] = c; m_seg_prefix = false; m_seg_prefix_next = false; break; default: logerror("%s: %06x: REPE invalid\n", tag(), pc()); // Decrement IP so the normal instruction will be executed next m_ip--; + m_pfp--; + if (m_prefetch_queue_tail == 0) + m_prefetch_queue_tail = PREFETCH_MAX_SIZE - 1; + else + m_prefetch_queue_tail--; + if (m_prefetch_queue_head == 0) + m_prefetch_queue_head = PREFETCH_MAX_SIZE - 1; + else + m_prefetch_queue_head--; break; } } break; case 0xf4: // i_hlt - logerror("%s: %06x: HALT\n", tag(), pc()); m_icount = 0; break; case 0xf5: // i_cmc - m_CarryVal ^= 1; - CLK(4); + m_CarryVal = (CF ? 0 : 1); + clk(4); break; case 0xf6: // i_f6pre { - uint32_t tmp; - uint32_t uresult,uresult2; - int32_t result,result2; - m_modrm = fetch(); - tmp = GetRMByte(); - switch ( m_modrm & 0x38 ) + uint32_t tmp = get_rm_byte(); + switch (m_modrm & 0x38) { - case 0x00: /* TEST */ + case 0x00: // TEST tmp &= fetch(); m_CarryVal = m_OverVal = 0; - set_SZPF_Byte(tmp); - CLKM(1,2); + set_SZPF_byte(tmp); + clkm(1,2); break; case 0x08: logerror("%s: %06x: Undefined opcode 0xf6 0x08\n", tag(), pc()); break; - case 0x10: /* NOT */ - PutbackRMByte(~tmp); - CLKM(1,3); + case 0x10: // NOT + store_ea_rm_byte(~tmp); + clkm(1,3); break; - case 0x18: /* NEG */ - m_CarryVal = (tmp!=0) ? 1 : 0; - tmp = (~tmp)+1; - set_SZPF_Byte(tmp); - PutbackRMByte(tmp&0xff); - CLKM(1,3); + case 0x18: // NEG, AF? + m_CarryVal = (tmp != 0) ? 1 : 0; + tmp = (~tmp) + 1; + set_SZPF_byte(tmp); + store_ea_rm_byte(tmp & 0xff); + clkm(1,3); break; - case 0x20: /* MULU */ - uresult = m_regs.b[AL] * tmp; - m_regs.w[AW] = (uint16_t)uresult; - m_CarryVal = m_OverVal = (m_regs.b[AH]!=0) ? 1 : 0; - CLKM(3,4); + case 0x20: // MULU + { + uint32_t uresult = m_regs.b[AL] * tmp; + m_regs.w[AW] = (uint16_t)uresult; + m_CarryVal = m_OverVal = (m_regs.b[AH] != 0) ? 1 : 0; + clkm(3,4); + } break; - case 0x28: /* MUL */ - result = (int16_t)((int8_t)m_regs.b[AL])*(int16_t)((int8_t)tmp); - m_regs.w[AW] = (uint16_t)result; - m_CarryVal = m_OverVal = (m_regs.b[AH]!=0) ? 1 : 0; - CLKM(3,4); + case 0x28: // MUL + { + int32_t result = (int16_t)((int8_t)m_regs.b[AL]) * (int16_t)((int8_t)tmp); + m_regs.w[AW] = (uint16_t)result; + m_CarryVal = m_OverVal = (m_regs.b[AH] != 0) ? 1 : 0; + clkm(3,4); + } break; - case 0x30: /* DIVU */ + case 0x30: // DIVU if (tmp) { - uresult = m_regs.w[AW]; - uresult2 = uresult % tmp; + uint32_t uresult = m_regs.w[AW]; + uint32_t uresult2 = uresult % tmp; if ((uresult /= tmp) > 0xff) { - interrupt(0); + interrupt(DIVIDE_ERROR_INT); } else { @@ -3494,18 +3322,18 @@ void v30mz_cpu_device::execute_run() } else { - interrupt(0); + interrupt(DIVIDE_ERROR_INT); } - CLKM(15,16); + clkm(15,16); break; - case 0x38: /* DIV */ + case 0x38: // DIV if (tmp) { - result = (int16_t)m_regs.w[AW]; - result2 = result % (int16_t)((int8_t)tmp); + int32_t result = (int16_t)m_regs.w[AW]; + int32_t result2 = result % (int16_t)((int8_t)tmp); if ((result /= (int16_t)((int8_t)tmp)) > 0xff) { - interrupt(0); + interrupt(DIVIDE_ERROR_INT); } else { @@ -3515,9 +3343,9 @@ void v30mz_cpu_device::execute_run() } else { - interrupt(0); + interrupt(DIVIDE_ERROR_INT); } - CLKM(17,18); + clkm(17,18); break; } } @@ -3531,52 +3359,52 @@ void v30mz_cpu_device::execute_run() int32_t result,result2; m_modrm = fetch(); - tmp = GetRMWord(); - switch ( m_modrm & 0x38 ) + tmp = get_rm_word(); + switch (m_modrm & 0x38) { - case 0x00: /* TEST */ + case 0x00: // TEST tmp2 = fetch_word(); tmp &= tmp2; m_CarryVal = m_OverVal = 0; - set_SZPF_Word(tmp); - CLKM(1,2); + set_SZPF_word(tmp); + clkm(1,2); break; case 0x08: logerror("%s: %06x: Undefined opcode 0xf7 0x08\n", tag(), pc()); break; - case 0x10: /* NOT */ - PutbackRMWord(~tmp); - CLKM(1,3); + case 0x10: // NOT + store_ea_rm_word(~tmp); + clkm(1,3); break; - case 0x18: /* NEG */ + case 0x18: // NEG m_CarryVal = (tmp!=0) ? 1 : 0; tmp = (~tmp) + 1; - set_SZPF_Word(tmp); - PutbackRMWord(tmp); - CLKM(1,3); + set_SZPF_word(tmp); + store_ea_rm_word(tmp); + clkm(1,3); break; - case 0x20: /* MULU */ + case 0x20: // MULU uresult = m_regs.w[AW]*tmp; m_regs.w[AW] = uresult & 0xffff; - m_regs.w[DW] = ((uint32_t)uresult)>>16; + m_regs.w[DW] = ((uint32_t)uresult) >> 16; m_CarryVal = m_OverVal = (m_regs.w[DW] != 0) ? 1 : 0; - CLKM(3,4); + clkm(3,4); break; - case 0x28: /* MUL */ + case 0x28: // MUL result = (int32_t)((int16_t)m_regs.w[AW]) * (int32_t)((int16_t)tmp); m_regs.w[AW] = result & 0xffff; m_regs.w[DW] = result >> 16; m_CarryVal = m_OverVal = (m_regs.w[DW] != 0) ? 1 : 0; - CLKM(3,4); + clkm(3,4); break; - case 0x30: /* DIVU */ + case 0x30: // DIVU if (tmp) { uresult = (((uint32_t)m_regs.w[DW]) << 16) | m_regs.w[AW]; uresult2 = uresult % tmp; if ((uresult /= tmp) > 0xffff) { - interrupt(0); + interrupt(DIVIDE_ERROR_INT); } else { @@ -3586,18 +3414,18 @@ void v30mz_cpu_device::execute_run() } else { - interrupt(0); + interrupt(DIVIDE_ERROR_INT); } - CLKM(23,24); + clkm(23,24); break; - case 0x38: /* DIV */ + case 0x38: // DIV if (tmp) { result = ((uint32_t)m_regs.w[DW] << 16) + m_regs.w[AW]; result2 = result % (int32_t)((int16_t)tmp); if ((result /= (int32_t)((int16_t)tmp)) > 0xffff) { - interrupt(0); + interrupt(DIVIDE_ERROR_INT); } else { @@ -3607,9 +3435,9 @@ void v30mz_cpu_device::execute_run() } else { - interrupt(0); + interrupt(DIVIDE_ERROR_INT); } - CLKM(24,25); + clkm(24,25); break; } } @@ -3618,56 +3446,56 @@ void v30mz_cpu_device::execute_run() case 0xf8: // i_clc m_CarryVal = 0; - CLK(4); + clk(4); break; case 0xf9: // i_stc m_CarryVal = 1; - CLK(4); + clk(4); break; case 0xfa: // i_di m_IF = 0; - CLK(4); + clk(4); break; case 0xfb: // i_ei m_IF = 1; - CLK(4); + clk(4); break; case 0xfc: // i_cld m_DF = 0; - CLK(4); + clk(4); break; case 0xfd: // i_std m_DF = 1; - CLK(4); + clk(4); break; case 0xfe: // i_fepre { uint32_t tmp, tmp1; m_modrm = fetch(); - tmp = GetRMByte(); - switch ( m_modrm & 0x38 ) + tmp = get_rm_byte(); + switch (m_modrm & 0x38) { - case 0x00: /* INC */ - tmp1 = tmp+1; - m_OverVal = (tmp==0x7f); + case 0x00: // INC + tmp1 = tmp + 1; + m_OverVal = (tmp == 0x7f); set_AF(tmp1,tmp,1); - set_SZPF_Byte(tmp1); - PutbackRMByte(tmp1); - CLKM(1,3); + set_SZPF_byte(tmp1); + store_ea_rm_byte(tmp1); + clkm(1,3); break; - case 0x08: /* DEC */ - tmp1 = tmp-1; - m_OverVal = (tmp==0x80); + case 0x08: // DEC + tmp1 = tmp - 1; + m_OverVal = (tmp == 0x80); set_AF(tmp1,tmp,1); - set_SZPF_Byte(tmp1); - PutbackRMByte(tmp1); - CLKM(1,3); + set_SZPF_byte(tmp1); + store_ea_rm_byte(tmp1); + clkm(1,3); break; default: logerror("%s: %06x: FE Pre with unimplemented mod\n", tag(), pc()); @@ -3680,50 +3508,54 @@ void v30mz_cpu_device::execute_run() { uint32_t tmp, tmp1; m_modrm = fetch(); - tmp = GetRMWord(); - switch ( m_modrm & 0x38 ) + tmp = get_rm_word(); + switch (m_modrm & 0x38) { - case 0x00: /* INC */ - tmp1 = tmp+1; - m_OverVal = (tmp==0x7fff); - set_AF(tmp1,tmp,1); - set_SZPF_Word(tmp1); - PutbackRMWord(tmp1); - CLKM(1,3); + case 0x00: // INC + tmp1 = tmp + 1; + m_OverVal = (tmp == 0x7fff); + set_AF(tmp1, tmp, 1); + set_SZPF_word(tmp1); + store_ea_rm_word(tmp1); + clkm(1,3); break; - case 0x08: /* DEC */ - tmp1 = tmp-1; - m_OverVal = (tmp==0x8000); - set_AF(tmp1,tmp,1); - set_SZPF_Word(tmp1); - PutbackRMWord(tmp1); - CLKM(1,3); + case 0x08: // DEC + tmp1 = tmp - 1; + m_OverVal = (tmp == 0x8000); + set_AF(tmp1, tmp, 1); + set_SZPF_word(tmp1); + store_ea_rm_word(tmp1); + clkm(1,3); break; - case 0x10: /* CALL */ - PUSH(m_ip); + case 0x10: // CALL + push(m_ip); m_ip = tmp; - CLKM(5,6); + init_prefetch(); + clkm(5,6); break; - case 0x18: /* CALL FAR */ - tmp1 = m_sregs[CS]; - m_sregs[CS] = GetnextRMWord(); - PUSH(tmp1); - PUSH(m_ip); + case 0x18: // CALL FAR + tmp1 = m_sregs[PS]; + m_sregs[PS] = get_next_rm_word(); + push(tmp1); + push(m_ip); m_ip = tmp; - CLKM(5,12); + init_prefetch(); + clkm(5,12); break; - case 0x20: /* JMP */ + case 0x20: // jmp m_ip = tmp; - CLKM(4,5); + init_prefetch(); + clkm(4,5); break; - case 0x28: /* JMP FAR */ + case 0x28: // jmp FAR m_ip = tmp; - m_sregs[CS] = GetnextRMWord(); - CLK(10); + m_sregs[PS] = get_next_rm_word(); + init_prefetch(); + clk(10); break; case 0x30: - PUSH(tmp); - CLK(1); + push(tmp); + clk(1); break; default: logerror("%s: %06x: FF Pre with unimplemented mod\n", tag(), pc()); diff --git a/src/devices/cpu/v30mz/v30mz.h b/src/devices/cpu/v30mz/v30mz.h index 7d8d06c7b68..770da50d954 100644 --- a/src/devices/cpu/v30mz/v30mz.h +++ b/src/devices/cpu/v30mz/v30mz.h @@ -5,17 +5,12 @@ #include "cpu/nec/necdasm.h" -struct nec_config -{ - const uint8_t* v25v35_decryptiontable; // internal decryption table -}; - enum { NEC_PC=0, NEC_IP, NEC_AW, NEC_CW, NEC_DW, NEC_BW, NEC_SP, NEC_BP, NEC_IX, NEC_IY, - NEC_FLAGS, NEC_ES, NEC_CS, NEC_SS, NEC_DS, - NEC_VECTOR, NEC_PENDING + NEC_FLAGS, NEC_DS1, NEC_PS, NEC_SS, NEC_DS0, + NEC_VECTOR, NEC_PENDING, NEC_PFP }; @@ -29,6 +24,9 @@ public: // construction/destruction v30mz_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + auto vector_cb() { return m_vector_func.bind(); } + uint32_t pc(); + protected: // device-level overrides virtual void device_start() override; @@ -47,6 +45,8 @@ protected: // device_state_interface overrides virtual void state_string_export(const device_state_entry &entry, std::string &str) const override; + virtual void state_import(const device_state_entry &entry) override; + virtual void state_export(const device_state_entry &entry) override; // device_disasm_interface overrides virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; @@ -54,67 +54,66 @@ protected: void interrupt(int int_num); - inline uint32_t pc(); // Accessing memory and io - inline uint8_t read_byte(uint32_t addr); - inline uint16_t read_word(uint32_t addr); - inline void write_byte(uint32_t addr, uint8_t data); - inline void write_word(uint32_t addr, uint16_t data); + inline uint8_t read_byte(uint16_t segment, uint16_t addr); + inline uint16_t read_word(uint16_t segment, uint16_t addr); + inline void write_byte(uint16_t segment, uint16_t addr, uint8_t data); + inline void write_word(uint16_t segment, uint16_t addr, uint16_t data); inline uint8_t read_port(uint16_t port); + inline uint16_t read_port_word(uint16_t port); inline void write_port(uint16_t port, uint8_t data); + inline void write_port_word(uint16_t port, uint16_t data); // Executing instructions + void read_prefetch(); + void init_prefetch(); inline uint8_t fetch_op(); inline uint8_t fetch(); inline uint16_t fetch_word(); inline uint8_t repx_op(); // Cycles passed while executing instructions - inline void CLK(uint32_t cycles); - inline void CLKM(uint32_t cycles_reg, uint32_t cycles_mem); + inline void clk(uint32_t cycles); + inline void clkm(uint32_t cycles_reg, uint32_t cycles_mem); // Memory handling while executing instructions - inline uint32_t default_base(int seg); - inline uint32_t get_ea(); - inline void PutbackRMByte(uint8_t data); - inline void PutbackRMWord(uint16_t data); - inline void RegByte(uint8_t data); - inline void RegWord(uint16_t data); - inline uint8_t RegByte(); - inline uint16_t RegWord(); - inline uint16_t GetRMWord(); - inline uint16_t GetnextRMWord(); - inline uint8_t GetRMByte(); - inline void PutMemB(int seg, uint16_t offset, uint8_t data); - inline void PutMemW(int seg, uint16_t offset, uint16_t data); - inline uint8_t GetMemB(int seg, uint16_t offset); - inline uint16_t GetMemW(int seg, uint16_t offset); - inline void PutImmRMWord(); - inline void PutRMWord(uint16_t val); - inline void PutRMByte(uint8_t val); - inline void PutImmRMByte(); - inline void DEF_br8(); - inline void DEF_wr16(); - inline void DEF_r8b(); - inline void DEF_r16w(); - inline void DEF_ald8(); - inline void DEF_axd16(); + inline uint16_t default_base(int seg); + inline void get_ea(); + inline void store_ea_rm_byte(uint8_t data); + inline void store_ea_rm_word(uint16_t data); + inline void reg_byte(uint8_t data); + inline void reg_word(uint16_t data); + inline uint8_t reg_byte(); + inline uint16_t reg_word(); + inline uint16_t get_rm_word(); + inline uint16_t get_next_rm_word(); + inline uint8_t get_rm_byte(); + inline void put_imm_rm_word(); + inline void put_rm_word(uint16_t val); + inline void put_rm_byte(uint8_t val); + inline void put_imm_rm_byte(); + inline void def_br8(); + inline void def_wr16(); + inline void def_r8b(); + inline void def_r16w(); + inline void def_ald8(); + inline void def_awd16(); // Flags - inline void set_CFB(uint32_t x); - inline void set_CFW(uint32_t x); - inline void set_AF(uint32_t x,uint32_t y,uint32_t z); + inline void set_CF_byte(uint32_t x); + inline void set_CF_word(uint32_t x); + inline void set_AF(uint32_t x, uint32_t y, uint32_t z); inline void set_SF(uint32_t x); inline void set_ZF(uint32_t x); inline void set_PF(uint32_t x); - inline void set_SZPF_Byte(uint32_t x); - inline void set_SZPF_Word(uint32_t x); - inline void set_OFW_Add(uint32_t x,uint32_t y,uint32_t z); - inline void set_OFB_Add(uint32_t x,uint32_t y,uint32_t z); - inline void set_OFW_Sub(uint32_t x,uint32_t y,uint32_t z); - inline void set_OFB_Sub(uint32_t x,uint32_t y,uint32_t z); - inline uint16_t CompressFlags() const; - inline void ExpandFlags(uint16_t f); + inline void set_SZPF_byte(uint32_t x); + inline void set_SZPF_word(uint32_t x); + inline void set_OF_word_add(uint32_t x, uint32_t y, uint32_t z); + inline void set_OF_byte_add(uint32_t x, uint32_t y, uint32_t z); + inline void set_OF_word_sub(uint32_t x, uint32_t y, uint32_t z); + inline void set_OF_byte_sub(uint32_t x, uint32_t y, uint32_t z); + inline uint16_t compress_flags() const; + inline void expand_flags(uint16_t f); // rep instructions inline void i_insb(); @@ -134,54 +133,61 @@ protected: inline void i_popf(); // sub implementations - inline void ADDB(); - inline void ADDW(); - inline void SUBB(); - inline void SUBW(); - inline void ORB(); - inline void ORW(); - inline void ANDB(); - inline void ANDW(); - inline void XORB(); - inline void XORW(); - inline void ROL_BYTE(); - inline void ROL_WORD(); - inline void ROR_BYTE(); - inline void ROR_WORD(); - inline void ROLC_BYTE(); - inline void ROLC_WORD(); - inline void RORC_BYTE(); - inline void RORC_WORD(); - inline void SHL_BYTE(uint8_t c); - inline void SHL_WORD(uint8_t c); - inline void SHR_BYTE(uint8_t c); - inline void SHR_WORD(uint8_t c); - inline void SHRA_BYTE(uint8_t c); - inline void SHRA_WORD(uint8_t c); - inline void XchgAWReg(uint8_t reg); - inline void IncWordReg(uint8_t reg); - inline void DecWordReg(uint8_t reg); - inline void PUSH(uint16_t data); - inline uint16_t POP(); - inline void JMP(bool cond); - inline void ADJ4(int8_t param1, int8_t param2); - inline void ADJB(int8_t param1, int8_t param2); + inline void add_byte(); + inline void add_word(); + inline void sub_byte(); + inline void sub_word(); + inline void or_byte(); + inline void or_word(); + inline void and_byte(); + inline void and_word(); + inline void xor_byte(); + inline void xor_word(); + inline void rol_byte(); + inline void rol_word(); + inline void ror_byte(); + inline void ror_word(); + inline void rolc_byte(); + inline void rolc_word(); + inline void rorc_byte(); + inline void rorc_word(); + inline void shl_byte(uint8_t c); + inline void shl_word(uint8_t c); + inline void shr_byte(uint8_t c); + inline void shr_word(uint8_t c); + inline void shra_byte(uint8_t c); + inline void shra_word(uint8_t c); + inline void xchg_AW_reg(uint8_t reg); + inline void inc_word_reg(uint8_t reg); + inline void dec_word_reg(uint8_t reg); + inline void push(uint16_t data); + inline uint16_t pop(); + inline void jmp(bool cond); + inline void adj4(int8_t param1, int8_t param2); + inline void adjb(int8_t param1, int8_t param2); address_space_config m_program_config; address_space_config m_io_config; union - { /* eight general registers */ - uint16_t w[8]; /* viewed as 16 bits registers */ - uint8_t b[16]; /* or as 8 bit registers */ + { // eight general registers + uint16_t w[8]; // viewed as 16 bits registers + uint8_t b[16]; // or as 8 bit registers } m_regs; uint16_t m_sregs[4]; uint16_t m_ip; + uint16_t m_pfp; // prefetch pointer + static const size_t PREFETCH_MAX_SIZE = 16; + static const size_t PREFETCH_QUEUE_SIZE = 8; + uint8_t m_prefetch_queue[PREFETCH_MAX_SIZE]; + int m_prefetch_queue_head; + int m_prefetch_queue_tail; + bool m_prefetch_fill_needed; int32_t m_SignVal; - uint32_t m_AuxVal, m_OverVal, m_ZeroVal, m_CarryVal, m_ParityVal; /* 0 or non-0 valued flags */ - uint8_t m_TF, m_IF, m_DF, m_MF; /* 0 or 1 valued flags */ /* OB[19.07.99] added Mode Flag V30 */ + uint32_t m_AuxVal, m_OverVal, m_ZeroVal, m_CarryVal, m_ParityVal; // 0 or non-0 valued flags + uint8_t m_TF, m_IF, m_DF, m_MF; // 0 or 1 valued flags. OB[19.07.99] added Mode Flag V30 uint32_t m_int_vector; uint32_t m_pending_irq; uint32_t m_nmi_state; @@ -189,18 +195,17 @@ protected: uint8_t m_no_interrupt; uint8_t m_fire_trap; - memory_access<20, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; - memory_access<20, 0, 0, ENDIANNESS_LITTLE>::specific m_program; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_io; + memory_access<20, 1, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<20, 1, 0, ENDIANNESS_LITTLE>::specific m_program; + memory_access<16, 1, 0, ENDIANNESS_LITTLE>::specific m_io; int m_icount; - uint32_t m_prefix_base; /* base address of the latest prefix segment */ - bool m_seg_prefix; /* prefix segment indicator */ - bool m_seg_prefix_next; /* prefix segment for next instruction */ + uint16_t m_prefix_base; // base address of the latest prefix segment + bool m_seg_prefix; // prefix segment indicator + bool m_seg_prefix_next; // prefix segment for next instruction - uint32_t m_ea; uint16_t m_eo; - uint16_t m_e16; + uint16_t m_ea_seg; // Used during execution of instructions uint8_t m_modrm; @@ -220,6 +225,9 @@ protected: int b[256]; } RM; } m_Mod_RM; + + devcb_read32 m_vector_func; + uint16_t m_debugger_temp; }; #endif // MAME_CPU_V32MZ_V30MZ_H diff --git a/src/mame/audio/wswan.cpp b/src/mame/audio/wswan.cpp index 6f956ffb57c..35c9e5f54d6 100644 --- a/src/mame/audio/wswan.cpp +++ b/src/mame/audio/wswan.cpp @@ -54,7 +54,7 @@ wswan_sound_device::wswan_sound_device(const machine_config &mconfig, const char { } -constexpr int clk_div = 64; +static constexpr int clk_div = 64; //------------------------------------------------- // device_start - device-specific startup @@ -80,42 +80,15 @@ void wswan_sound_device::device_start() save_item(NAME(m_external_speaker)); save_item(NAME(m_noise_shift)); save_item(NAME(m_master_volume)); - - save_item(NAME(m_audio1.freq)); - save_item(NAME(m_audio1.period)); - save_item(NAME(m_audio1.pos)); - save_item(NAME(m_audio1.vol_left)); - save_item(NAME(m_audio1.vol_right)); - save_item(NAME(m_audio1.on)); - save_item(NAME(m_audio1.offset)); - save_item(NAME(m_audio1.signal)); - - save_item(NAME(m_audio2.freq)); - save_item(NAME(m_audio2.period)); - save_item(NAME(m_audio2.pos)); - save_item(NAME(m_audio2.vol_left)); - save_item(NAME(m_audio2.vol_right)); - save_item(NAME(m_audio2.on)); - save_item(NAME(m_audio2.offset)); - save_item(NAME(m_audio2.signal)); - - save_item(NAME(m_audio3.freq)); - save_item(NAME(m_audio3.period)); - save_item(NAME(m_audio3.pos)); - save_item(NAME(m_audio3.vol_left)); - save_item(NAME(m_audio3.vol_right)); - save_item(NAME(m_audio3.on)); - save_item(NAME(m_audio3.offset)); - save_item(NAME(m_audio3.signal)); - - save_item(NAME(m_audio4.freq)); - save_item(NAME(m_audio4.period)); - save_item(NAME(m_audio4.pos)); - save_item(NAME(m_audio4.vol_left)); - save_item(NAME(m_audio4.vol_right)); - save_item(NAME(m_audio4.on)); - save_item(NAME(m_audio4.offset)); - save_item(NAME(m_audio4.signal)); + save_item(NAME(m_system_volume)); + save_item(STRUCT_MEMBER(m_audio, freq)); + save_item(STRUCT_MEMBER(m_audio, period)); + save_item(STRUCT_MEMBER(m_audio, pos)); + save_item(STRUCT_MEMBER(m_audio, vol_left)); + save_item(STRUCT_MEMBER(m_audio, vol_right)); + save_item(STRUCT_MEMBER(m_audio, on)); + save_item(STRUCT_MEMBER(m_audio, offset)); + save_item(STRUCT_MEMBER(m_audio, signal)); } void wswan_sound_device::device_clock_changed() @@ -134,33 +107,21 @@ void wswan_sound_device::rom_bank_updated() void wswan_sound_device::device_reset() { - m_audio1.on = 0; - m_audio1.signal = 0; - m_audio1.offset = 0; - m_audio1.pos = 0; - m_audio2.on = 0; - m_audio2.signal = 0; - m_audio2.offset = 0; - m_audio2.pos = 0; - m_audio3.on = 0; - m_audio3.signal = 0; - m_audio3.offset = 0; - m_audio3.pos = 0; - m_audio4.on = 0; - m_audio4.signal = 0; - m_audio4.offset = 0; - m_audio4.pos = 0; + for (int i = 0; i < 4; i++) + { + m_audio[i].on = 0; + m_audio[i].signal = 0; + m_audio[i].offset = 0; + m_audio[i].pos = 0; + } m_noise_output = 0; } int wswan_sound_device::fetch_sample(int channel, int offset) { - uint8_t b = read_byte(m_sample_address + ((channel & 3) << 4) + ((offset & 0x1f) >> 1)); + u16 w = read_word(m_sample_address + ((channel & 3) << 4) + ((offset >> 1) & 0x0e)); - if (offset & 1) - return b >> 4; - else - return b & 0xf; + return (w >> ((offset & 0x03) * 4)) & 0x0f; } //------------------------------------------------- @@ -169,85 +130,83 @@ int wswan_sound_device::fetch_sample(int channel, int offset) void wswan_sound_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) { - s32 sample, left, right; - auto &outputl = outputs[0]; auto &outputr = outputs[1]; for (int sampindex = 0; sampindex < outputl.samples(); sampindex++) { - left = right = 0; + s32 left = 0, right = 0; - if ( m_audio1.on ) + if (m_audio[0].on) { - sample = m_audio1.signal; - m_audio1.pos += clk_div; - if (m_audio1.pos >= m_audio1.period) + s32 sample = m_audio[0].signal; + m_audio[0].pos += clk_div; + if (m_audio[0].pos >= m_audio[0].period) { - m_audio1.pos -= m_audio1.period; - m_audio1.signal = fetch_sample(0, m_audio1.offset++); + m_audio[0].pos -= m_audio[0].period; + m_audio[0].signal = fetch_sample(0, m_audio[0].offset++); } - left += m_audio1.vol_left * sample; - right += m_audio1.vol_right * sample; + left += m_audio[0].vol_left * sample; + right += m_audio[0].vol_right * sample; } - if ( m_audio2.on ) + if (m_audio[1].on) { - if ( m_audio2_voice ) + if (m_audio2_voice) { - uint8_t voice_data = m_audio2.vol_left << 4 | m_audio2.vol_right; + u8 voice_data = (m_audio[1].vol_left << 4) | m_audio[1].vol_right; left += voice_data * (m_master_volume & 0x0f); right += voice_data * (m_master_volume & 0x0f); } else { - sample = m_audio2.signal; - m_audio2.pos += clk_div; - if (m_audio2.pos >= m_audio2.period) + s32 sample = m_audio[1].signal; + m_audio[1].pos += clk_div; + if (m_audio[1].pos >= m_audio[1].period) { - m_audio2.pos -= m_audio2.period; - m_audio2.signal = fetch_sample(1, m_audio2.offset++); + m_audio[1].pos -= m_audio[1].period; + m_audio[1].signal = fetch_sample(1, m_audio[1].offset++); } - left += m_audio2.vol_left * sample; - right += m_audio2.vol_right * sample; + left += m_audio[1].vol_left * sample; + right += m_audio[1].vol_right * sample; } } - if ( m_audio3.on ) + if (m_audio[2].on) { - sample = m_audio3.signal; - m_audio3.pos += clk_div; - if (m_audio3.pos >= m_audio3.period) + s32 sample = m_audio[2].signal; + m_audio[2].pos += clk_div; + if (m_audio[2].pos >= m_audio[2].period) { - m_audio3.pos -= m_audio3.period; - m_audio3.signal = fetch_sample(2, m_audio3.offset++); + m_audio[2].pos -= m_audio[2].period; + m_audio[2].signal = fetch_sample(2, m_audio[2].offset++); } - if ( m_audio3_sweep && m_sweep_time ) + if (m_audio3_sweep && m_sweep_time) { m_sweep_count += clk_div; - if ( m_sweep_count >= m_sweep_time ) + if (m_sweep_count >= m_sweep_time) { m_sweep_count -= m_sweep_time; - m_audio3.freq += m_sweep_step; - m_audio3.freq &= 0x7ff; - m_audio3.period = 2048 - m_audio3.freq; + m_audio[2].freq += m_sweep_step; + m_audio[2].freq &= 0x7ff; + m_audio[2].period = 2048 - m_audio[2].freq; } } - left += m_audio3.vol_left * sample; - right += m_audio3.vol_right * sample; + left += m_audio[2].vol_left * sample; + right += m_audio[2].vol_right * sample; } - if ( m_audio4.on ) + if (m_audio[3].on) { - sample = m_audio4.signal; - m_audio4.pos += clk_div; - if (m_audio4.pos >= m_audio4.period) + s32 sample = m_audio[3].signal; + m_audio[3].pos += clk_div; + if (m_audio[3].pos >= m_audio[3].period) { if (m_audio4_noise) - m_audio4.signal = m_noise_output ? 0xf : 0; + m_audio[3].signal = m_noise_output ? 0xf : 0; else - m_audio4.signal = fetch_sample(3, m_audio4.offset++); + m_audio[3].signal = fetch_sample(3, m_audio[3].offset++); - m_audio4.pos -= m_audio4.period; + m_audio[3].pos -= m_audio[3].period; if (m_noise_reset) { @@ -264,8 +223,8 @@ void wswan_sound_device::sound_stream_update(sound_stream &stream, std::vector<r m_noise_shift = m_noise_shift << 1 | m_noise_output; } } - left += m_audio4.vol_left * sample; - right += m_audio4.vol_right * sample; + left += m_audio[3].vol_left * sample; + right += m_audio[3].vol_right * sample; } outputl.put_int(sampindex, left, 32768 >> 5); @@ -274,116 +233,155 @@ void wswan_sound_device::sound_stream_update(sound_stream &stream, std::vector<r } -void wswan_sound_device::wswan_ch_set_freq( CHAN *ch, uint16_t freq ) +u16 wswan_sound_device::port_r(offs_t offset, u16 mem_mask) { - freq &= 0x7ff; // docs say freq is 11bits and a few games (Morita Shougi, World Stadium + others) write 0x800 causing a divide by 0 crash - ch->freq = freq; - ch->period = 2048 - freq; + m_channel->update(); + switch (offset) { + case 0x80 / 2: + case 0x82 / 2: + case 0x84 / 2: + case 0x86 / 2: + return m_audio[offset & 0x03].freq; + case 0x88 / 2: + return (m_audio[0].vol_left << 4) | m_audio[0].vol_right | + (m_audio[1].vol_left << 12) | (m_audio[1].vol_right << 8); + case 0x8a / 2: + return (m_audio[2].vol_left << 4) | m_audio[2].vol_right | + (m_audio[3].vol_left << 12) | (m_audio[3].vol_right << 8); + case 0x8c / 2: + return m_sweep_step | (((m_sweep_time / 8192) - 1) << 8); + case 0x8e / 2: + return m_noise_type | (m_noise_reset ? 0x08 : 0x00) | (m_noise_enable ? 0x10 : 0x00) | + ((m_sample_address << 2) & 0xff00); + case 0x90 / 2: + return (m_audio[0].on ? 0x01 : 0x00) | + (m_audio[1].on ? 0x02 : 0x00) | + (m_audio[2].on ? 0x04 : 0x00) | + (m_audio[3].on ? 0x08 : 0x00) | + (m_audio2_voice ? 0x20 : 0x00) | + (m_audio3_sweep ? 0x40 : 0x00) | + (m_audio4_noise ? 0x80 : 0x00) | + (m_mono ? 0x0100 : 0x00) | (m_output_volume << 9) | + (m_external_stereo ? 0x0800 : 0x00) | + (m_external_speaker ? 0x00 : 0x00); // TODO 0x80 is set when external speaker is connected + case 0x92 / 2: + return m_noise_shift; + case 0x94 / 2: + return m_master_volume; + case 0x9e / 2: + return m_system_volume; + } + return 0; } -void wswan_sound_device::port_w(offs_t offset, uint8_t data) +void wswan_sound_device::port_w(offs_t offset, u16 data, u16 mem_mask) { m_channel->update(); - switch( offset ) + switch (offset) { - case 0x80: /* Audio 1 freq (lo) */ - wswan_ch_set_freq(&m_audio1, (m_audio1.freq & 0xff00) | data); - break; - - case 0x81: /* Audio 1 freq (hi) */ - wswan_ch_set_freq(&m_audio1, (data << 8 ) | (m_audio1.freq & 0x00ff)); - break; - - case 0x82: /* Audio 2 freq (lo) */ - wswan_ch_set_freq(&m_audio2, (m_audio2.freq & 0xff00) | data); - break; - - case 0x83: /* Audio 2 freq (hi) */ - wswan_ch_set_freq(&m_audio2, (data << 8 ) | (m_audio2.freq & 0x00ff)); - break; - - case 0x84: /* Audio 3 freq (lo) */ - wswan_ch_set_freq(&m_audio3, (m_audio3.freq & 0xff00) | data); - break; - - case 0x85: /* Audio 3 freq (hi) */ - wswan_ch_set_freq(&m_audio3, (data << 8) | (m_audio3.freq & 0x00ff)); - break; - - case 0x86: /* Audio 4 freq (lo) */ - wswan_ch_set_freq(&m_audio4, (m_audio4.freq & 0xff00) | data); - break; - - case 0x87: /* Audio 4 freq (hi) */ - wswan_ch_set_freq(&m_audio4, (data << 8) | (m_audio4.freq & 0x00ff)); - break; - - case 0x88: /* Audio 1 volume */ - m_audio1.vol_left = ( data & 0xF0 ) >> 4; - m_audio1.vol_right = data & 0x0F; - break; - - case 0x89: /* Audio 2 volume */ - m_audio2.vol_left = ( data & 0xF0 ) >> 4; - m_audio2.vol_right = data & 0x0F; - break; - - case 0x8A: /* Audio 3 volume */ - m_audio3.vol_left = ( data & 0xF0 ) >> 4; - m_audio3.vol_right = data & 0x0F; - break; - - case 0x8B: /* Audio 4 volume */ - m_audio4.vol_left = ( data & 0xF0 ) >> 4; - m_audio4.vol_right = data & 0x0F; + case 0x80 / 2: // Audio 1 freq + case 0x82 / 2: // Audio 2 freq + case 0x84 / 2: // Audio 3 freq + case 0x86 / 2: // Audio 4 freq + COMBINE_DATA(&m_audio[offset & 0x03].freq); + m_audio[offset & 0x03].freq &= 0x7ff; + m_audio[offset & 0x03].period = 2048 - m_audio[offset & 0x03].freq; break; - case 0x8C: /* Sweep step */ - m_sweep_step = (int8_t)data; - break; - - case 0x8D: /* Sweep time */ - m_sweep_time = 8192 * (data + 1); + case 0x88 / 2: + // Audio 1 volume + if (ACCESSING_BITS_0_7) + { + m_audio[0].vol_left = (data >> 4) & 0x0f; + m_audio[0].vol_right = data & 0x0f; + } + // Audio 2 volume + if (ACCESSING_BITS_8_15) + { + m_audio[1].vol_left = (data >> 12) & 0x0f; + m_audio[1].vol_right = (data >> 8) & 0x0f; + } break; - case 0x8E: /* Noise control */ - m_noise_type = data & 0x07; - m_noise_reset = ( data & 0x08 ) >> 3; - m_noise_enable = ( data & 0x10 ) >> 4; + case 0x8a / 2: + // Audio 3 volume + if (ACCESSING_BITS_0_7) + { + m_audio[2].vol_left = (data >> 4) & 0x0f; + m_audio[2].vol_right = data & 0x0f; + } + // Audio 4 volume + if (ACCESSING_BITS_8_15) + { + m_audio[3].vol_left = (data >> 12) & 0x0f; + m_audio[3].vol_right = (data >> 8) & 0x0f; + } break; - case 0x8F: /* Sample location */ - m_sample_address = data << 6; + case 0x8c / 2: + // Sweep step + if (ACCESSING_BITS_0_7) + { + m_sweep_step = (int8_t)(data & 0xff); + } + // Sweep time + if (ACCESSING_BITS_8_15) + { + m_sweep_time = 8192 * ((data >> 8) + 1); + } break; - case 0x90: /* Audio control */ - m_audio1.on = data & 0x01; - m_audio2.on = ( data & 0x02 ) >> 1; - m_audio3.on = ( data & 0x04 ) >> 2; - m_audio4.on = ( data & 0x08 ) >> 3; - m_audio2_voice = ( data & 0x20 ) >> 5; - m_audio3_sweep = ( data & 0x40 ) >> 6; - m_audio4_noise = ( data & 0x80 ) >> 7; + case 0x8e / 2: + // Noise control + if (ACCESSING_BITS_0_7) + { + m_noise_type = data & 0x07; + m_noise_reset = BIT(data, 3); + m_noise_enable = BIT(data, 4); + } + // Sample location + if (ACCESSING_BITS_8_15) + { + m_sample_address = (data & 0xff00) >> 2; + } break; - case 0x91: /* Audio output */ - m_mono = data & 0x01; - m_output_volume = ( data & 0x06 ) >> 1; - m_external_stereo = ( data & 0x08 ) >> 3; - m_external_speaker = 1; + case 0x90 / 2: + // Audio control + if (ACCESSING_BITS_0_7) + { + m_audio[0].on = BIT(data, 0); + m_audio[1].on = BIT(data, 1); + m_audio[2].on = BIT(data, 2); + m_audio[3].on = BIT(data, 3); + m_audio2_voice = BIT(data, 5); + m_audio3_sweep = BIT(data, 6); + m_audio4_noise = BIT(data, 7); + } + // Audio output + if (ACCESSING_BITS_8_15) + { + m_mono = BIT(data, 8); + m_output_volume = ((data >> 9) & 0x03); + m_external_stereo = BIT(data, 11); + m_external_speaker = 1; + } break; - case 0x92: /* Noise counter shift register (lo) */ - m_noise_shift = ( m_noise_shift & 0xFF00 ) | data; + case 0x92 / 2: // Noise counter shift register + COMBINE_DATA(&m_noise_shift); + m_noise_shift &= 0x7fff; break; - case 0x93: /* Noise counter shift register (hi) */ - m_noise_shift = ( ( data & 0x7f ) << 8 ) | ( m_noise_shift & 0x00FF ); + case 0x94 / 2: // Master volume + if (ACCESSING_BITS_0_7) + m_master_volume = data & 0xff; break; - case 0x94: /* Master volume */ - m_master_volume = data; + case 0x9e / 2: // WSC volume setting (0, 1, 2, 3) (TODO) + if (ACCESSING_BITS_0_7) + m_system_volume = data & 0x03; break; } } diff --git a/src/mame/audio/wswan.h b/src/mame/audio/wswan.h index f21ad6adbc5..4029d0f23a1 100644 --- a/src/mame/audio/wswan.h +++ b/src/mame/audio/wswan.h @@ -1,11 +1,5 @@ // license:BSD-3-Clause // copyright-holders:Wilbert Pol -/***************************************************************************** - * - * includes/wswan.h - * - ****************************************************************************/ - #ifndef MAME_AUDIO_WSWAN_H #define MAME_AUDIO_WSWAN_H @@ -21,12 +15,13 @@ class wswan_sound_device : public device_t, public device_sound_interface, - public device_rom_interface<14> + public device_rom_interface<14,1> { public: - wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - void port_w(offs_t offset, uint8_t data); + void port_w(offs_t offset, u16 data, u16 mem_mask); + u16 port_r(offs_t offset, u16 mem_mask); protected: struct CHAN @@ -41,14 +36,14 @@ protected: offset(0), signal(0) { } - uint16_t freq; /* frequency */ - uint16_t period; /* period */ - uint32_t pos; /* position */ - uint8_t vol_left; /* volume left */ - uint8_t vol_right; /* volume right */ - uint8_t on; /* on/off */ - uint8_t offset; /* sample offset */ - uint8_t signal; /* signal */ + u16 freq; + u16 period; + u32 pos; + u8 vol_left; + u8 vol_right; + u8 on; + u8 offset; + u8 signal; }; // device-level overrides @@ -62,31 +57,28 @@ protected: virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override; private: - void wswan_ch_set_freq( CHAN *ch, uint16_t freq ); int fetch_sample(int channel, int offset); sound_stream *m_channel; - CHAN m_audio1; /* Audio channel 1 */ - CHAN m_audio2; /* Audio channel 2 */ - CHAN m_audio3; /* Audio channel 3 */ - CHAN m_audio4; /* Audio channel 4 */ - int8_t m_sweep_step; /* Sweep step */ - uint32_t m_sweep_time; /* Sweep time */ - uint32_t m_sweep_count; /* Sweep counter */ - uint8_t m_noise_type; /* Noise generator type */ - uint8_t m_noise_reset; /* Noise reset */ - uint8_t m_noise_enable; /* Noise enable */ - uint8_t m_noise_output; /* Noise output */ - uint16_t m_sample_address; /* Sample address */ - uint8_t m_audio2_voice; /* Audio 2 voice */ - uint8_t m_audio3_sweep; /* Audio 3 sweep */ - uint8_t m_audio4_noise; /* Audio 4 noise */ - uint8_t m_mono; /* mono */ - uint8_t m_output_volume; /* output volume */ - uint8_t m_external_stereo; /* external stereo */ - uint8_t m_external_speaker; /* external speaker */ - uint16_t m_noise_shift; /* Noise counter shift register */ - uint8_t m_master_volume; /* Master volume */ + CHAN m_audio[4]; + s8 m_sweep_step; + u32 m_sweep_time; + u32 m_sweep_count; + u8 m_noise_type; + u8 m_noise_reset; + u8 m_noise_enable; + u8 m_noise_output; + u16 m_sample_address; + u8 m_audio2_voice; + u8 m_audio3_sweep; + u8 m_audio4_noise; + u8 m_mono; + u8 m_output_volume; + u8 m_external_stereo; + u8 m_external_speaker; + u16 m_noise_shift; + u8 m_master_volume; + u8 m_system_volume; }; DECLARE_DEVICE_TYPE(WSWAN_SND, wswan_sound_device) diff --git a/src/mame/drivers/wswan.cpp b/src/mame/drivers/wswan.cpp index dc1cc0d09a5..c770f0c5207 100644 --- a/src/mame/drivers/wswan.cpp +++ b/src/mame/drivers/wswan.cpp @@ -17,18 +17,10 @@ configuration menu. Known issues/TODOs: - - Add support for noise sound. - - Add support for voice sound. - - Add support for enveloped sound. - Perform video DMA at proper timing. - Add (real/proper) RTC support. - - Swan Crystal can handle up to 512Mbit ROMs?????? - - SRAM sizes should be in kbit instead of kbytes(?). This raises a few - interesting issues: - - mirror of smaller <64KBYTE/512kbit SRAM sizes - - banking when using 1M or 2M sram sizes - - The units likely came with the name "WONDERSWAN" configured in the - internal EEPOM + - Fix wonderwitch + - Make the flash rom changes save. ***************************************************************************/ @@ -64,34 +56,38 @@ public: m_region_maincpu(*this, "maincpu"), m_cursx(*this, "CURSX"), m_cursy(*this, "CURSY"), - m_buttons(*this, "BUTTONS") + m_buttons(*this, "BUTTONS"), + m_icons(*this, "icon%u", 0U) { } void wswan(machine_config &config); protected: // Interrupt flags - static const u8 WSWAN_IFLAG_STX = 0x01; - static const u8 WSWAN_IFLAG_KEY = 0x02; - static const u8 WSWAN_IFLAG_RTC = 0x04; - static const u8 WSWAN_IFLAG_SRX = 0x08; - static const u8 WSWAN_IFLAG_LCMP = 0x10; - static const u8 WSWAN_IFLAG_VBLTMR = 0x20; - static const u8 WSWAN_IFLAG_VBL = 0x40; - static const u8 WSWAN_IFLAG_HBLTMR = 0x80; + static constexpr u8 WSWAN_IFLAG_STX = 0x01; + static constexpr u8 WSWAN_IFLAG_KEY = 0x02; + static constexpr u8 WSWAN_IFLAG_RTC = 0x04; + static constexpr u8 WSWAN_IFLAG_SRX = 0x08; + static constexpr u8 WSWAN_IFLAG_LCMP = 0x10; + static constexpr u8 WSWAN_IFLAG_VBLTMR = 0x20; + static constexpr u8 WSWAN_IFLAG_VBL = 0x40; + static constexpr u8 WSWAN_IFLAG_HBLTMR = 0x80; // Interrupts - static const u8 WSWAN_INT_STX = 0; - static const u8 WSWAN_INT_KEY = 1; - static const u8 WSWAN_INT_RTC = 2; - static const u8 WSWAN_INT_SRX = 3; - static const u8 WSWAN_INT_LCMP = 4; - static const u8 WSWAN_INT_VBLTMR = 5; - static const u8 WSWAN_INT_VBL = 6; - static const u8 WSWAN_INT_HBLTMR = 7; - - static const u32 INTERNAL_EEPROM_SIZE = 1024; // 16kbit on WSC - static const u32 INTERNAL_EEPROM_SIZE_WS = 64; // 1kbit on WS + static constexpr u8 WSWAN_INT_STX = 0; + static constexpr u8 WSWAN_INT_KEY = 1; + static constexpr u8 WSWAN_INT_RTC = 2; + static constexpr u8 WSWAN_INT_SRX = 3; + static constexpr u8 WSWAN_INT_LCMP = 4; + static constexpr u8 WSWAN_INT_VBLTMR = 5; + static constexpr u8 WSWAN_INT_VBL = 6; + static constexpr u8 WSWAN_INT_HBLTMR = 7; + + static constexpr u32 INTERNAL_EEPROM_SIZE = 1024; // 16kbit on WSC + static constexpr u32 INTERNAL_EEPROM_SIZE_WS = 64; // 1kbit on WS + + // Labeled 12.3FXA on wonderswan color pcb + static constexpr XTAL X1 = 12.288_MHz_XTAL; enum enum_system { TYPE_WSWAN=0, TYPE_WSC }; @@ -104,26 +100,43 @@ protected: u8 enable = 0; // Enabled }; - required_device<cpu_device> m_maincpu; + required_device<v30mz_cpu_device> m_maincpu; required_device<wswan_video_device> m_vdp; required_device<wswan_sound_device> m_sound; required_device<ws_cart_slot_device> m_cart; - u8 m_ws_portram[256]; + u16 m_ws_portram[128]; u8 m_internal_eeprom[INTERNAL_EEPROM_SIZE * 2]; u8 m_system_type; sound_dma_t m_sound_dma; + u16 m_dma_source_offset; + u16 m_dma_source_segment; + u16 m_dma_destination; + u16 m_dma_length; + u16 m_dma_control; u8 m_bios_disabled; u8 m_rotate; + u32 m_vector; + u8 m_sys_control; + u8 m_irq_vector_base; + u8 m_serial_data; + u8 m_serial_control; + u8 m_irq_enable; + u8 m_irq_active; + u16 m_internal_eeprom_data; + u16 m_internal_eeprom_address; + u8 m_internal_eeprom_command; + u8 m_keypad; required_memory_region m_region_maincpu; required_ioport m_cursx; required_ioport m_cursy; required_ioport m_buttons; + output_finder<6> m_icons; - u8 bios_r(offs_t offset); - u8 port_r(offs_t offset); - void port_w(offs_t offset, u8 data); + u16 bios_r(offs_t offset, u16 mem_mask); + u16 port_r(offs_t offset, u16 mem_mask); + void port_w(offs_t offset, u16 data, u16 mem_mask); void set_irq_line(int irq); void dma_sound_cb(); @@ -140,8 +153,12 @@ protected: void handle_irqs(); void clear_irq_line(int irq); virtual u16 get_internal_eeprom_address(); + u32 get_vector() { return m_vector; } + void set_icons(u8 data); + void set_rotate_view(); }; + class wscolor_state : public wswan_state { public: @@ -155,25 +172,6 @@ protected: virtual u16 get_internal_eeprom_address() override; }; -static const uint8_t ws_portram_init[256] = -{ - 0x00, 0x00, 0x00/*?*/, 0xbb, 0x00, 0x00, 0x00, 0x26, 0xfe, 0xde, 0xf9, 0xfb, 0xdb, 0xd7, 0x7f, 0xf5, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x9e, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x99, 0xfd, 0xb7, 0xdf, - 0x30, 0x57, 0x75, 0x76, 0x15, 0x73, 0x70/*77?*/, 0x77, 0x20, 0x75, 0x50, 0x36, 0x70, 0x67, 0x50, 0x77, - 0x57, 0x54, 0x75, 0x77, 0x75, 0x17, 0x37, 0x73, 0x50, 0x57, 0x60, 0x77, 0x70, 0x77, 0x10, 0x73, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, - 0x87, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x4f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xdb, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x83, 0x00, - 0x2f, 0x3f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, - 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, - 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, - 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1 -}; void wswan_state::mem_map(address_map &map) { @@ -202,7 +200,7 @@ void wswan_state::snd_map(address_map &map) } -static INPUT_PORTS_START( wswan ) +static INPUT_PORTS_START(wswan) PORT_START("CURSX") PORT_BIT( 0x8, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("X4 - Left") PORT_BIT( 0x4, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("X3 - Down") @@ -221,7 +219,8 @@ static INPUT_PORTS_START( wswan ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Y1 - Up") PORT_CODE(KEYCODE_W) INPUT_PORTS_END -static GFXDECODE_START( gfx_wswan ) + +static GFXDECODE_START(gfx_wswan) GFXDECODE_END @@ -230,7 +229,7 @@ void wswan_state::palette(palette_device &palette) const { for (int i = 0; i < 16; i++) { - uint8_t const shade = i * (256 / 16); + u8 const shade = i * (256 / 16); palette.set_pen_color(15 - i, shade, shade, shade); } } @@ -253,29 +252,28 @@ static void wswan_cart(device_slot_interface &device) device.option_add_internal("ws_rom", WS_ROM_STD); device.option_add_internal("ws_sram", WS_ROM_SRAM); device.option_add_internal("ws_eeprom", WS_ROM_EEPROM); + device.option_add_internal("wwitch", WS_ROM_WWITCH); } void wswan_state::wswan(machine_config &config) { // Basic machine hardware - V30MZ(config, m_maincpu, 3.072_MHz_XTAL); + V30MZ(config, m_maincpu, X1 / 4); m_maincpu->set_addrmap(AS_PROGRAM, &wswan_state::mem_map); m_maincpu->set_addrmap(AS_IO, &wswan_state::io_map); + m_maincpu->vector_cb().set(FUNC(wswan_state::get_vector)); - WSWAN_VIDEO(config, m_vdp, 0); + WSWAN_VIDEO(config, m_vdp, X1 / 4); m_vdp->set_screen("screen"); m_vdp->set_vdp_type(wswan_video_device::VDP_TYPE_WSWAN); m_vdp->set_irq_callback(FUNC(wswan_state::set_irq_line)); m_vdp->set_dmasnd_callback(FUNC(wswan_state::dma_sound_cb)); + m_vdp->icons_cb().set(FUNC(wswan_state::set_icons)); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); -// screen.set_refresh_rate(75); -// screen.set_vblank_time(0); screen.set_screen_update("vdp", FUNC(wswan_video_device::screen_update)); -// screen.set_size(WSWAN_X_PIXELS, WSWAN_Y_PIXELS); -// screen.set_visarea(0*8, WSWAN_X_PIXELS - 1, 0, WSWAN_Y_PIXELS - 1); - screen.set_raw(3.072_MHz_XTAL, 256, 0, wswan_video_device::WSWAN_X_PIXELS, 159, 0, wswan_video_device::WSWAN_Y_PIXELS); + screen.set_raw(X1 / 4, 256, 0, wswan_video_device::WSWAN_X_PIXELS, 159, 0, wswan_video_device::WSWAN_Y_PIXELS); screen.set_palette("palette"); config.set_default_layout(layout_wswan); @@ -290,13 +288,13 @@ void wswan_state::wswan(machine_config &config) // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - WSWAN_SND(config, m_sound, 3.072_MHz_XTAL); + WSWAN_SND(config, m_sound, X1 / 4); m_sound->set_addrmap(0, &wswan_state::snd_map); m_sound->add_route(0, "lspeaker", 0.50); m_sound->add_route(1, "rspeaker", 0.50); // cartridge - WS_CART_SLOT(config, m_cart, 3.072_MHz_XTAL / 8, wswan_cart, nullptr); + WS_CART_SLOT(config, m_cart, X1 / 32, wswan_cart, nullptr); // software lists SOFTWARE_LIST(config, "cart_list").set_original("wswan"); @@ -327,50 +325,56 @@ void wscolor_state::wscolor(machine_config &config) void wswan_state::handle_irqs() { - if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_HBLTMR) + bool set_irq_line = false; + if (m_irq_enable & m_irq_active & WSWAN_IFLAG_HBLTMR) { - m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_HBLTMR); // V30MZ + m_vector = m_irq_vector_base + WSWAN_INT_HBLTMR; + set_irq_line = true; } - else if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_VBL) + else if (m_irq_enable & m_irq_active & WSWAN_IFLAG_VBL) { - m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_VBL); // V30MZ + m_vector = m_irq_vector_base + WSWAN_INT_VBL; + set_irq_line = true; } - else if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_VBLTMR) + else if (m_irq_enable & m_irq_active & WSWAN_IFLAG_VBLTMR) { - m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_VBLTMR); // V30MZ + m_vector = m_irq_vector_base + WSWAN_INT_VBLTMR; + set_irq_line = true; } - else if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_LCMP) + else if (m_irq_enable & m_irq_active & WSWAN_IFLAG_LCMP) { - m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_LCMP); // V30MZ + m_vector = m_irq_vector_base + WSWAN_INT_LCMP; + set_irq_line = true; } - else if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_SRX) + else if (m_irq_enable & m_irq_active & WSWAN_IFLAG_SRX) { - m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_SRX); // V30MZ + m_vector = m_irq_vector_base + WSWAN_INT_SRX; + set_irq_line = true; } - else if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_RTC) + else if (m_irq_enable & m_irq_active & WSWAN_IFLAG_RTC) { - m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_RTC); // V30MZ + m_vector = m_irq_vector_base + WSWAN_INT_RTC; + set_irq_line = true; } - else if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_KEY) + else if (m_irq_enable & m_irq_active & WSWAN_IFLAG_KEY) { - m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_KEY); // V30MZ + m_vector = m_irq_vector_base + WSWAN_INT_KEY; + set_irq_line = true; } - else if (m_ws_portram[0xb2] & m_ws_portram[0xb6] & WSWAN_IFLAG_STX) + else if (m_irq_enable & m_irq_active & WSWAN_IFLAG_STX) { - m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_ws_portram[0xb0] + WSWAN_INT_STX); // V30MZ - } - else - { - m_maincpu->set_input_line(0, CLEAR_LINE); + m_vector = m_irq_vector_base + WSWAN_INT_STX; + set_irq_line = true; } + m_maincpu->set_input_line(0, set_irq_line ? ASSERT_LINE : CLEAR_LINE); } void wswan_state::set_irq_line(int irq) { - if (m_ws_portram[0xb2] & irq) + if (m_irq_enable & irq) { - m_ws_portram[0xb6] |= irq; + m_irq_active |= irq; handle_irqs(); } } @@ -382,7 +386,7 @@ void wswan_state::dma_sound_cb() { address_space &space = m_maincpu->space(AS_PROGRAM); /* TODO: Output sound DMA byte */ - port_w(0x89, space.read_byte(m_sound_dma.source)); + port_w(0x88 > 2, space.read_byte(m_sound_dma.source) << 8, 0xff00); m_sound_dma.size--; m_sound_dma.source = (m_sound_dma.source + 1) & 0x0fffff; if (m_sound_dma.size == 0) @@ -395,7 +399,7 @@ void wswan_state::dma_sound_cb() void wswan_state::clear_irq_line(int irq) { - m_ws_portram[0xb6] &= ~irq; + m_irq_active &= ~irq; handle_irqs(); } @@ -410,6 +414,23 @@ void wswan_state::register_save() save_item(NAME(m_sound_dma.source)); save_item(NAME(m_sound_dma.size)); save_item(NAME(m_sound_dma.enable)); + save_item(NAME(m_vector)); + + save_item(NAME(m_dma_source_offset)); + save_item(NAME(m_dma_source_segment)); + save_item(NAME(m_dma_destination)); + save_item(NAME(m_dma_length)); + save_item(NAME(m_dma_control)); + save_item(NAME(m_sys_control)); + save_item(NAME(m_irq_vector_base)); + save_item(NAME(m_serial_data)); + save_item(NAME(m_serial_control)); + save_item(NAME(m_irq_enable)); + save_item(NAME(m_irq_active)); + save_item(NAME(m_internal_eeprom_data)); + save_item(NAME(m_internal_eeprom_address)); + save_item(NAME(m_internal_eeprom_command)); + save_item(NAME(m_keypad)); if (m_cart->exists()) m_cart->save_nvram(); @@ -420,18 +441,20 @@ void wswan_state::common_start() { register_save(); + m_icons.resolve(); + if (m_cart->exists()) { // ROM - m_maincpu->space(AS_PROGRAM).install_read_handler(0x20000, 0x2ffff, read8sm_delegate(*m_cart, FUNC(ws_cart_slot_device::read_rom20))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x30000, 0x3ffff, read8sm_delegate(*m_cart, FUNC(ws_cart_slot_device::read_rom30))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x40000, 0xeffff, read8sm_delegate(*m_cart, FUNC(ws_cart_slot_device::read_rom40))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x20000, 0x2ffff, read16s_delegate(*m_cart, FUNC(ws_cart_slot_device::read_rom20))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x30000, 0x3ffff, read16s_delegate(*m_cart, FUNC(ws_cart_slot_device::read_rom30))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x40000, 0xeffff, read16s_delegate(*m_cart, FUNC(ws_cart_slot_device::read_rom40))); // SRAM - if (m_cart->get_type() == WS_SRAM) + if (m_cart->get_type() == WS_SRAM || m_cart->get_type() == WWITCH) { - m_maincpu->space(AS_PROGRAM).install_read_handler(0x10000, 0x1ffff, read8sm_delegate(*m_cart, FUNC(ws_cart_slot_device::read_ram))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x10000, 0x1ffff, write8sm_delegate(*m_cart, FUNC(ws_cart_slot_device::write_ram))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x10000, 0x1ffff, read16s_delegate(*m_cart, FUNC(ws_cart_slot_device::read_ram))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x10000, 0x1ffff, write16s_delegate(*m_cart, FUNC(ws_cart_slot_device::write_ram))); } } } @@ -457,97 +480,111 @@ void wswan_state::machine_reset() { m_bios_disabled = 0; - if (m_cart->exists()) - m_rotate = m_cart->get_is_rotated(); - else - m_rotate = 0; + m_rotate = 0; + + m_vector = 0; + m_irq_vector_base = 0; + m_serial_control = 0; + m_irq_enable = 0; + m_irq_active = 0; + m_internal_eeprom_data = 0; + m_internal_eeprom_address = 0; + m_internal_eeprom_command = 0; + m_sys_control = (m_system_type == TYPE_WSC) ? 2 : 0; /* Intialize ports */ - std::copy(std::begin(ws_portram_init), std::end(ws_portram_init), std::begin(m_ws_portram)); + std::fill(std::begin(m_ws_portram), std::end(m_ws_portram), 0); - render_target *target = machine().render().first_target(); - target->set_view(m_rotate); + set_rotate_view(); /* Initialize sound DMA */ m_sound_dma = sound_dma_t(); } -u8 wswan_state::bios_r(offs_t offset) +u16 wswan_state::bios_r(offs_t offset, u16 mem_mask) { if (!m_bios_disabled) - return m_region_maincpu->base()[offset & (m_region_maincpu->bytes() - 1)]; + return m_region_maincpu->as_u16(offset & ((m_region_maincpu->bytes() >> 1) - 1)); else - return m_cart->read_rom40(offset + 0xb0000); + return m_cart->read_rom40(offset + (0xb0000 >> 1), mem_mask); } -u8 wswan_state::port_r(offs_t offset) +u16 wswan_state::port_r(offs_t offset, u16 mem_mask) { - u8 value = m_ws_portram[offset]; - - if (offset != 2) - logerror("PC=%X: port read %02X\n", m_maincpu->pc(), offset); + u16 value = m_ws_portram[offset]; - if (offset < 0x40 || (offset >= 0xa1 && offset < 0xb0)) - return m_vdp->reg_r(offset); + if (offset < 0x40 / 2 || (offset > 0xa0 / 2 && offset < 0xb0 / 2)) + { + return m_vdp->reg_r(offset, mem_mask); + } + if (offset >= 0x80 / 2 && offset <= 0x9f / 2) + { + return m_sound->port_r(offset, mem_mask); + } switch (offset) { - case 0x4a: // Sound DMA source address (low) - value = m_sound_dma.source & 0xff; - break; - case 0x4b: // Sound DMA source address (high) - value = (m_sound_dma.source >> 8) & 0xff; - break; - case 0x4c: // Sound DMA source memory segment - value = (m_sound_dma.source >> 16) & 0xff; - break; - case 0x4e: // Sound DMA transfer size (low) - value = m_sound_dma.size & 0xff; - break; - case 0x4f: // Sound DMA transfer size (high) - value = (m_sound_dma.size >> 8) & 0xff; - break; - case 0x52: // Sound DMA start/stop - value = m_sound_dma.enable; - break; - case 0x60: - value = m_vdp->reg_r(offset); - break; - case 0xa0: // Hardware type + case 0x40 / 2: // DMA source address + return m_dma_source_offset; + case 0x42 / 2: // DMA source bank/segment + return m_dma_source_segment; + case 0x44 / 2: // DMA destination address + return m_dma_destination; + case 0x46 / 2: // DMA size (in bytes) + return m_dma_length; + case 0x48 / 2: // DMA control + return m_dma_control; + case 0x4a / 2: + // Sound DMA source address + return m_sound_dma.source & 0xffff; + case 0x4c / 2: + // Sound DMA source memory segment + return (m_sound_dma.source >> 16) & 0xffff; + case 0x4e / 2: + // Sound DMA transfer size + return m_sound_dma.size; + case 0x52 / 2: + // Sound DMA start/stop + return m_sound_dma.enable; + case 0x60 / 2: + return m_vdp->reg_r(offset, mem_mask); + case 0xa0 / 2: + // Hardware type // Bit 0 - Disable/enable Bios // Bit 1 - Determine mono/color // Bit 2 - Unknown, used to determine color/crystal // Bit 3 - Unknown - // Bit 7 - Checked during start up, expects bit 7 set - value = value & ~ 0x02; - if (m_system_type == TYPE_WSC) - value |= 2; - value |= 0x80; - break; - case 0xb5: // Read controls - // Bit 0-3 - Current state of input lines (read-only) - // Bit 4-6 - Select line of inputs to read - // 001 - Read Y cursors - // 010 - Read X cursors - // 100 - Read START,A,B buttons - // Bit 7 - Unknown - value = value & 0xf0; - switch (value) + // Bit 7 - Checked during start up, expects bit 7 set (part of cart unlock sequence?) + return m_sys_control | 0x80; + case 0xb0 / 2: + return m_irq_vector_base | (m_serial_data << 8); + case 0xb2 / 2: + return m_irq_enable | (m_serial_control << 8); + case 0xb4 / 2: + // Read controls + // Bit 8-11 - Current state of input lines (read-only) + // Bit 12-14 - Select line of inputs to read + // 001 - Read Y cursors + // 010 - Read X cursors + // 100 - Read START,A,B buttons + // Bit 15 - Unknown + value = (m_keypad << 8) & 0xf0ff; + switch (m_keypad & 0x70) { case 0x10: // Read Y cursors: Y1 - Y2 - Y3 - Y4 { u8 input = m_cursy->read(); if (m_rotate) // reorient controls if the console is rotated { - if (input & 0x01) value |= 0x02; - if (input & 0x02) value |= 0x04; - if (input & 0x04) value |= 0x08; - if (input & 0x08) value |= 0x01; + if (input & 0x01) value |= 0x0200; + if (input & 0x02) value |= 0x0400; + if (input & 0x04) value |= 0x0800; + if (input & 0x08) value |= 0x0100; } else - value = value | input; + value = value | (input << 8); } break; case 0x20: // Read X cursors: X1 - X2 - X3 - X4 @@ -555,155 +592,154 @@ u8 wswan_state::port_r(offs_t offset) u8 input = m_cursx->read(); if (m_rotate) // reorient controls if the console is rotated { - if (input & 0x01) value |= 0x02; - if (input & 0x02) value |= 0x04; - if (input & 0x04) value |= 0x08; - if (input & 0x08) value |= 0x01; + if (input & 0x01) value |= 0x0200; + if (input & 0x02) value |= 0x0400; + if (input & 0x04) value |= 0x0800; + if (input & 0x08) value |= 0x0100; } else - value = value | input; + value = value | (input << 8); } break; case 0x40: // Read buttons: START - A - B - value = value | m_buttons->read(); + value = value | (m_buttons->read() << 8); break; } - break; - case 0xc0: - case 0xc1: - case 0xc2: - case 0xc3: - case 0xc4: // Cartridge EEPROM data - case 0xc5: // Cartridge EEPROM data - case 0xc6: - case 0xc7: - case 0xc8: - case 0xc9: - case 0xca: - case 0xcb: // RTC data - case 0xcc: - case 0xcd: - case 0xce: - case 0xcf: - value = m_cart->read_io(offset & 0x0f); - break; + return value; + case 0xb6 / 2: + return m_irq_active; + case 0xba / 2: + return m_internal_eeprom_data; + case 0xbc / 2: + return m_internal_eeprom_address; + case 0xbe / 2: + return m_internal_eeprom_command; + case 0xc0 / 2: + case 0xc2 / 2: + case 0xc4 / 2: // Cartridge EEPROM data + case 0xc6 / 2: + case 0xc8 / 2: + case 0xca / 2: // RTC command & data + case 0xcc / 2: + case 0xce / 2: + return m_cart->read_io(offset, mem_mask); } return value; } -void wswan_state::port_w(offs_t offset, u8 data) +void wswan_state::port_w(offs_t offset, u16 data, u16 mem_mask) { - address_space &mem = m_maincpu->space(AS_PROGRAM); - logerror("PC=%X: port write %02X <- %02X\n", m_maincpu->pc(), offset, data); - - if (offset < 0x40 || (offset >= 0xa1 && offset < 0xb0)) + if (offset < 0x40 / 2 || (offset > 0xa0 / 2 && offset < 0xb0 / 2)) { - m_vdp->reg_w(offset, data); + m_vdp->reg_w(offset, data, mem_mask); return; } switch (offset) { - case 0x40: // DMA source address (low) - case 0x41: // DMA source address (high) - case 0x42: // DMA source bank - case 0x43: // DMA destination bank - case 0x44: // DMA destination address (low) - case 0x45: // DMA destination address (high) - case 0x46: // Size of copied data (low) - case 0x47: // Size of copied data (high) + case 0x40 / 2: // DMA source address + COMBINE_DATA(&m_dma_source_offset); + m_dma_source_offset &= 0xfffe; + break; + case 0x42 / 2: // DMA source bank/segment + COMBINE_DATA(&m_dma_source_segment); + m_dma_source_segment &= 0x000f; + break; + case 0x44 / 2: // DMA destination address + COMBINE_DATA(&m_dma_destination); + m_dma_destination &= 0xfffe; break; - case 0x48: // DMA control + case 0x46 / 2: // DMA size (in bytes) + COMBINE_DATA(&m_dma_length); + break; + case 0x48 / 2: // DMA control // Bit 0-6 - Unknown // Bit 7 - DMA stop/start - if (data & 0x80) + if (ACCESSING_BITS_0_7) { - u32 src, dst; - u16 length; - - src = m_ws_portram[0x40] + (m_ws_portram[0x41] << 8) + (m_ws_portram[0x42] << 16); - dst = m_ws_portram[0x44] + (m_ws_portram[0x45] << 8) + (m_ws_portram[0x43] << 16); - length = m_ws_portram[0x46] + (m_ws_portram[0x47] << 8); - for ( ; length > 0; length--) + if (data & 0x80) { - mem.write_byte(dst, mem.read_byte(src)); - src++; - dst++; + address_space &mem = m_maincpu->space(AS_PROGRAM); + u32 src = m_dma_source_offset | (m_dma_source_segment << 16); + u32 dst = m_dma_destination; + u16 length = m_dma_length; + if (length) + m_maincpu->adjust_icount(-(5 + length)); + for ( ; length > 0; length -= 2) + { + mem.write_word(dst, mem.read_word(src)); + src += 2; + dst += 2; + } + m_dma_source_offset = src & 0xffff; + m_dma_source_segment = src >> 16; + m_dma_destination = dst & 0xffff; + m_dma_length = length & 0xffff; + data &= 0x7f; + m_dma_control = data; } -#ifdef MAME_DEBUG - logerror("DMA src:%X dst:%X length:%d\n", src, dst, length); -#endif - m_ws_portram[0x40] = src & 0xff; - m_ws_portram[0x41] = (src >> 8) & 0xff; - m_ws_portram[0x44] = dst & 0xff; - m_ws_portram[0x45] = (dst >> 8) & 0xff; - m_ws_portram[0x46] = length & 0xff; - m_ws_portram[0x47] = (length >> 8) & 0xff; - data &= 0x7f; } break; - case 0x4a: // Sound DMA source address (low) - m_sound_dma.source = (m_sound_dma.source & 0x0fff00) | data; - break; - case 0x4b: // Sound DMA source address (high) - m_sound_dma.source = (m_sound_dma.source & 0x0f00ff) | (data << 8); + case 0x4a / 2: + // Sound DMA source address (low) + if (ACCESSING_BITS_0_7) + m_sound_dma.source = (m_sound_dma.source & 0x0fff00) | (data & 0xff); + // Sound DMA source address (high) + if (ACCESSING_BITS_8_15) + m_sound_dma.source = (m_sound_dma.source & 0x0f00ff) | (data & 0xff00); break; - case 0x4c: // Sound DMA source memory segment + case 0x4c / 2: + // Sound DMA source memory segment // Bit 0-3 - Sound DMA source address segment // Bit 4-7 - Unknown - m_sound_dma.source = (m_sound_dma.source & 0xffff) | ((data & 0x0f) << 16); + if (ACCESSING_BITS_0_7) + m_sound_dma.source = (m_sound_dma.source & 0xffff) | ((data & 0x0f) << 16); break; - case 0x4d: // Unknown + case 0x4e / 2: + // Sound DMA transfer size + COMBINE_DATA(&m_sound_dma.size); break; - case 0x4e: // Sound DMA transfer size (low) - m_sound_dma.size = (m_sound_dma.size & 0xff00) | data; - break; - case 0x4f: // Sound DMA transfer size (high) - m_sound_dma.size = (m_sound_dma.size & 0xff) | (data << 8); - break; - case 0x50: // Unknown - case 0x51: // Unknown - break; - case 0x52: // Sound DMA start/stop + case 0x52 / 2: + // Sound DMA start/stop // Bit 0-6 - Unknown // Bit 7 - Sound DMA stop/start - m_sound_dma.enable = data; - break; - case 0x60: - m_vdp->reg_w(offset, data); - break; - case 0x80: // Audio 1 freq (lo) - case 0x81: // Audio 1 freq (hi) - case 0x82: // Audio 2 freq (lo) - case 0x83: // Audio 2 freq (hi) - case 0x84: // Audio 3 freq (lo) - case 0x85: // Audio 3 freq (hi) - case 0x86: // Audio 4 freq (lo) - case 0x87: // Audio 4 freq (hi) - case 0x88: // Audio 1 volume + if (ACCESSING_BITS_0_7) + m_sound_dma.enable = data & 0xff; + break; + case 0x60 / 2: + m_vdp->reg_w(offset, data, mem_mask); + break; + case 0x80 / 2: // Audio 1 freq + case 0x82 / 2: // Audio 2 freq + case 0x84 / 2: // Audio 3 freq + case 0x86 / 2: // Audio 4 freq + case 0x88 / 2: + // Audio 1 volume // Bit 0-3 - Right volume audio channel 1 // Bit 4-7 - Left volume audio channel 1 - case 0x89: // Audio 2 volume - // Bit 0-3 - Right volume audio channel 2 - // Bit 4-7 - Left volume audio channel 2 - case 0x8a: // Audio 3 volume + // Audio 2 volume + // Bit 8-11 - Right volume audio channel 2 + // Bit 12-15 - Left volume audio channel 2 + case 0x8a / 2: + // Audio 3 volume // Bit 0-3 - Right volume audio channel 3 // Bit 4-7 - Left volume audio channel 3 - case 0x8b: // Audio 4 volume - // Bit 0-3 - Right volume audio channel 4 - // Bit 4-7 - Left volume audio channel 4 - case 0x8c: // Sweep step - case 0x8d: // Sweep time - case 0x8e: // Noise control + // Audio 4 volume + // Bit 8-11 - Right volume audio channel 4 + // Bit 12-15 - Left volume audio channel 4 + case 0x8c / 2: // Sweep step / sweep time + case 0x8e / 2: + // Noise control // Bit 0-2 - Noise generator type // Bit 3 - Reset // Bit 4 - Enable // Bit 5-7 - Unknown - case 0x8f: // Sample location - // Bit 0-7 - Sample address location 0 00xxxxxx xx000000 - case 0x90: // Audio control + // Sample location + // Bit 8-15 - Sample address location 0 00xxxxxx xx000000 + case 0x90 / 2: + // Audio control // Bit 0 - Audio 1 enable // Bit 1 - Audio 2 enable // Bit 2 - Audio 3 enable @@ -711,40 +747,51 @@ void wswan_state::port_w(offs_t offset, u8 data) // Bit 4 - Unknown // Bit 5 - Audio 2 voice mode enable // Bit 6 - Audio 3 sweep mode enable - // Bit 7 - Audio 4 noise mode enable - case 0x91: // Audio output - // Bit 0 - Mono select - // Bit 1-2 - Output volume - // Bit 3 - External stereo - // Bit 4-6 - Unknown - // Bit 7 - External speaker (Read-only, set by hardware) - case 0x92: // Noise counter shift register (lo) - case 0x93: // Noise counter shift register (hi) - // Bit 0-6 - Noise counter shift register bit 8-14 - // bit 7 - Unknown - case 0x94: // Master volume + // Bit 7 - Audio 4 noise mode enable + // Audio output + // Bit 8 - Mono select + // Bit 9-10 - Output volume + // Bit 11 - External stereo + // Bit 12-14 - Unknown + // Bit 15 - External speaker (Read-only, set by hardware) + case 0x92 / 2: // Noise counter shift register + case 0x94 / 2: + // Master volume // Bit 0-3 - Master volume // Bit 4-7 - Unknown - m_sound->port_w(offset, data); - break; - case 0x9E: // WSC volume setting (0, 1, 2, 3) + case 0x9e / 2: // WSC volume setting (0, 1, 2, 3) (TODO) + m_sound->port_w(offset, data, mem_mask); break; - case 0xa0: // Hardware type/system control - // Bit 0 - Enable cartridge slot and/or disable bios + case 0xa0 / 2: + // Hardware type/system control + // Bit 0 - Disable bios // Bit 1 - Hardware type: 0 = WS, 1 = WSC - // Bit 2 - Unknown, written during boot - // Bit 3 - Unknown, written during boot + // Bit 2 - External bus width + // Bit 3 - Cart ROM cycles (0 = 3 cycles, 1 = 1 cycle) // Bit 4-6 - Unknown // Bit 7 - Unknown, read during boot - if ((data & 0x01) && !m_bios_disabled) - m_bios_disabled = 1; + if (ACCESSING_BITS_0_7) + { + m_sys_control = (data & 0xfd) | ((m_system_type == TYPE_WSC) ? 2 : 0); + if ((data & 0x01) && !m_bios_disabled) + { + m_bios_disabled = 1; + if (m_cart->exists()) + m_maincpu->space(AS_PROGRAM).install_read_handler(0x40000, 0xfffff, read16s_delegate(*m_cart, FUNC(ws_cart_slot_device::read_rom40))); + } + } break; - case 0xb0: // Interrupt base vector + case 0xb0 / 2: + // Interrupt base vector + if (ACCESSING_BITS_0_7) + m_irq_vector_base = data & 0xff; + // Serial data (bit 8-15) + if (ACCESSING_BITS_8_15) + m_serial_data = data >> 8; break; - case 0xb1: // Communication byte - break; - case 0xb2: // Interrupt enable + case 0xb2 / 2: + // Interrupt enable // Bit 0 - Serial transmit interrupt enable // Bit 1 - Key press interrupt enable // Bit 2 - RTC alarm interrupt enable @@ -753,57 +800,64 @@ void wswan_state::port_w(offs_t offset, u8 data) // Bit 5 - VBlank timer interrupt enable // Bit 6 - VBlank interrupt enable // Bit 7 - HBlank timer interrupt enable - break; - case 0xb3: // serial communication control - // Bit 0 - Receive complete - // Bit 1 - Error - // Bit 2 - Send complete - // Bit 3-4 - Unknown - // Bit 5 - Send data interrupt generation - // Bit 6 - Connection speed: 0 = 9600 bps, 1 = 38400 bps - // Bit 7 - Receive data interrupt generation - m_ws_portram[0xb1] = 0xff; - if (data & 0x80) + if (ACCESSING_BITS_0_7) + m_irq_enable = data & 0xff; + // serial communication control + // Bit 8 - Receive complete + // Bit 9 - Error + // Bit 10 - Send complete + // Bit 11-12 - Unknown + // Bit 13 - Send data interrupt generation + // Bit 14 - Connection speed: 0 = 9600 bps, 1 = 38400 bps + // Bit 15 - Receive data interrupt generation + if (ACCESSING_BITS_8_15) { - // m_ws_portram[0xb1] = 0x00; - data |= 0x04; + m_serial_data = 0xff; + m_serial_control = data >> 8; + if (m_serial_control & 0x80) + { + // m_serial_data = 0x00; + m_serial_control |= 0x04; + } + if (m_serial_control & 0x20) + { + // m_serial_control |= 0x01; + } } - if (data & 0x20) + break; + case 0xb4 / 2: + if (ACCESSING_BITS_8_15) { - // data |= 0x01; + m_keypad = (data & 0xf0ff) >> 8; } break; - case 0xb5: // Read controls - // Bit 0-3 - Current state of input lines (read-only) - // Bit 4-6 - Select line of inputs to read - // 001 - Read Y cursors - // 010 - Read X cursors - // 100 - Read START,A,B buttons - // Bit 7 - Unknown - break; - case 0xb6: // Interrupt acknowledge - // Bit 0 - Serial transmit interrupt acknowledge - // Bit 1 - Key press interrupt acknowledge - // Bit 2 - RTC alarm interrupt acknowledge - // Bit 3 - Serial receive interrupt acknowledge - // Bit 4 - Drawing line detection interrupt acknowledge - // Bit 5 - VBlank timer interrupt acknowledge - // Bit 6 - VBlank interrupt acknowledge - // Bit 7 - HBlank timer interrupt acknowledge - clear_irq_line(data); - data = m_ws_portram[0xb6]; + case 0xb6 / 2: + // Interrupt acknowledge + // Bit 0 - Serial transmit interrupt acknowledge + // Bit 1 - Key press interrupt acknowledge + // Bit 2 - RTC alarm interrupt acknowledge + // Bit 3 - Serial receive interrupt acknowledge + // Bit 4 - Drawing line detection interrupt acknowledge + // Bit 5 - VBlank timer interrupt acknowledge + // Bit 6 - VBlank interrupt acknowledge + // Bit 7 - HBlank timer interrupt acknowledge + if (ACCESSING_BITS_0_7) + { + clear_irq_line(data & 0xff); + data = m_irq_active; + } break; - case 0xba: // Internal EEPROM data (low) - case 0xbb: // Internal EEPROM data (high) + case 0xba / 2: // Internal EEPROM data + COMBINE_DATA(&m_internal_eeprom_data); break; - case 0xbc: // Internal EEPROM address (low) - // (WS) Bit 0-5 = Internal EEPROM address - // (WSC) Bit 0-7 - Internal EEPROM address bit 1-8 - case 0xbd: // Internal EEPROM address (high) - // (WSC) Bit 0 - Internal EEPROM address bit 9(?) - // Bit 1-7 - Unknown + case 0xbc / 2: // Internal EEPROM address + // (WS) Bit 0-5 - Internal EEPROM address + // (WSC) Bit 0-8 - Internal EEPROM address bit 1-9 + // Bit 9-15 - Unknown + COMBINE_DATA(&m_internal_eeprom_address); break; - case 0xbe: // Internal EEPROM command/status + case 0xbe / 2: + // Internal EEPROM command/status // Bit 0 - Read complete (read only) // Bit 1 - Write complete (read only) // Bit 2-3 - Unknown @@ -811,60 +865,84 @@ void wswan_state::port_w(offs_t offset, u8 data) // Bit 5 - Write // Bit 6 - Protect // Bit 7 - Initialize - if (data & 0x20) + if (ACCESSING_BITS_0_7) { - u16 addr = get_internal_eeprom_address(); - m_internal_eeprom[addr] = m_ws_portram[0xba]; - m_internal_eeprom[addr + 1] = m_ws_portram[0xbb]; - data |= 0x02; - } - else if ( data & 0x10 ) - { - u16 addr = get_internal_eeprom_address(); - m_ws_portram[0xba] = m_internal_eeprom[addr]; - m_ws_portram[0xbb] = m_internal_eeprom[addr + 1]; - data |= 0x01; - } - else - { - logerror( "Unsupported internal EEPROM command: %X\n", data ); + m_internal_eeprom_command = data & 0xfc; + if (m_internal_eeprom_command & 0x20) + { + u16 addr = get_internal_eeprom_address(); + m_internal_eeprom[addr] = m_internal_eeprom_data & 0xff; + m_internal_eeprom[addr + 1] = m_internal_eeprom_data >> 8; + m_internal_eeprom_command |= 0x02; + } + else if (m_internal_eeprom_command & 0x10) + { + u16 addr = get_internal_eeprom_address(); + m_internal_eeprom_data = m_internal_eeprom[addr] | (m_internal_eeprom[addr + 1] << 8); + m_internal_eeprom_command |= 0x01; + } + else + { + logerror("Unsupported internal EEPROM command: %X\n", data); + } } break; - case 0xc0: // ROM bank $40000-$fffff - case 0xc1: // SRAM bank - case 0xc2: // ROM bank $20000-$2ffff - case 0xc3: // ROM bank $30000-$3ffff - case 0xc4: - case 0xc5: - case 0xc6: // EEPROM address / command - case 0xc7: // EEPROM address / command - case 0xc8: // EEPROM command - case 0xc9: - case 0xca: // RTC command - case 0xcb: // RTC data - case 0xcc: - case 0xcd: - case 0xce: - case 0xcf: - m_cart->write_io(offset & 0x0f, data); + case 0xc0 / 2: // ROM bank $40000-$fffff and SRAM bank + case 0xc2 / 2: // ROM bank $20000-$2ffff and ROM bank $30000-$3ffff + case 0xc4 / 2: + case 0xc6 / 2: // EEPROM address / command + case 0xc8 / 2: // EEPROM command + case 0xca / 2: // RTC command and RTC data + case 0xcc / 2: + case 0xce / 2: + m_cart->write_io(offset, data, mem_mask); break; default: - logerror( "Write to unsupported port: %X - %X\n", offset, data ); + logerror("Write to unsupported port: %x - %x\n", offset, data); break; } // Update the port value - m_ws_portram[offset] = data; + COMBINE_DATA(&m_ws_portram[offset]); +} + + +void wswan_state::set_icons(u8 data) { + // Bit 0 - LCD sleep icon enable + // Bit 1 - Vertical position icon enable + // Bit 2 - Horizontal position icon enable + // Bit 3 - Dot 1 icon enable + // Bit 4 - Dot 2 icon enable + // Bit 5 - Dot 3 icon enable + for (int i = 0; i < 6; i++) { + m_icons[i] = BIT(data, i); + } + + u8 old_rotate = m_rotate; + + if ((!BIT(data, 2) && BIT(data, 1)) || (BIT(data, 2) && !BIT(data, 1))) { + m_rotate = (!BIT(data, 2) && BIT(data, 1)) ? 1 : 0; + + if (old_rotate != m_rotate) { + set_rotate_view(); + } + } +} + + +void wswan_state::set_rotate_view() { + render_target *target = machine().render().first_target(); + target->set_view(m_rotate); } u16 wswan_state::get_internal_eeprom_address() { - return (m_ws_portram[0xbc] & 0x3f) << 1; + return (m_internal_eeprom_address & 0x3f) << 1; } u16 wscolor_state::get_internal_eeprom_address() { - return (((m_ws_portram[0xbd] << 8) | m_ws_portram[0xbc]) & 0x1FF) << 1; + return (m_internal_eeprom_address & 0x1ff) << 1; } /*************************************************************************** @@ -889,10 +967,12 @@ ROM_START(wscolor) ROM_REGION(0x800, "nvram", 0) // Need a dump from an original new unit - // Empty file containing just the name 'WONDERSAN' - ROM_LOAD("internal_eeprom.wsc", 0x000, 0x800, BAD_DUMP CRC(9e29725c) SHA1(a903c2cb5f4bb94b67326ff87a2d91605dceffff)) + // Empty file containing just the name 'WONDERSWANCOLOR' (from Youtube videos) + ROM_LOAD("internal_eeprom.wsc", 0x000, 0x800, BAD_DUMP CRC(ca11afc9) SHA1(0951845f01f83bee497268a63b5fb7baccfeff7c)) ROM_END +// SwanCrystal has the name 'SWANCRYSTAL' (from Youtube videos) + } // anonymous namespace diff --git a/src/mame/video/wswan.cpp b/src/mame/video/wswan.cpp index 541e1277f42..a845117e6b2 100644 --- a/src/mame/video/wswan.cpp +++ b/src/mame/video/wswan.cpp @@ -8,9 +8,8 @@ Wilbert Pol TODO: - - remove the redundant parts of m_regs - split the Color VDP from the Mono VDP - - Add support for WSC high/low contrast (register 14, bit 1) + - Add support for WSC high/low contrast (register 14, bit 1) ***************************************************************************/ @@ -21,12 +20,13 @@ DEFINE_DEVICE_TYPE(WSWAN_VIDEO, wswan_video_device, "wswan_video", "Bandai WonderSwam VDP") -wswan_video_device::wswan_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wswan_video_device::wswan_video_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, WSWAN_VIDEO, tag, owner, clock) , device_video_interface(mconfig, *this) , m_set_irq_cb(*this) , m_snd_dma_cb(*this) , m_vdp_type(VDP_TYPE_WSWAN) + , m_icons_cb(*this) { } @@ -72,7 +72,6 @@ void wswan_video_device::common_save() save_item(NAME(m_layer_fg_scroll_x)); save_item(NAME(m_layer_fg_scroll_y)); save_item(NAME(m_lcd_control)); - save_item(NAME(m_icons)); save_item(NAME(m_color_mode)); save_item(NAME(m_colors_16)); save_item(NAME(m_tile_packed)); @@ -92,7 +91,7 @@ void wswan_video_device::device_start() screen().register_screen_bitmap(m_bitmap); m_timer = timer_alloc(TIMER_SCANLINE); - m_timer->adjust(attotime::from_ticks(256, 3072000), 0, attotime::from_ticks(256, 3072000)); + m_timer->adjust(attotime::from_ticks(256, clock()), 0, attotime::from_ticks(256, clock())); // bind callbacks m_set_irq_cb.resolve(); @@ -100,41 +99,21 @@ void wswan_video_device::device_start() if (m_vdp_type == VDP_TYPE_WSC) { - m_vram.resize(0x10000); - memset(&m_vram[0], 0, 0x10000); - m_palette_vram = &m_vram[0xfe00]; + m_vram.resize(WSC_VRAM_SIZE); + m_palette_vram = &m_vram[WSC_VRAM_PALETTE]; } else { - m_vram.resize(0x4000); - memset(&m_vram[0], 0, 0x4000); + m_vram.resize(WS_VRAM_SIZE); m_palette_vram = &m_vram[0]; } + std::fill(std::begin(m_vram), std::end(m_vram), 0); + common_save(); -} -// This is a copy of ws_portram_init -// TODO: remove unneeded parts! -static const uint8_t vdp_regs_init[256] = -{ - 0x00, 0x00, 0x00/*?*/, 0xbb, 0x00, 0x00, 0x00, 0x26, 0xfe, 0xde, 0xf9, 0xfb, 0xdb, 0xd7, 0x7f, 0xf5, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x9e, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x99, 0xfd, 0xb7, 0xdf, - 0x30, 0x57, 0x75, 0x76, 0x15, 0x73, 0x70/*77?*/, 0x77, 0x20, 0x75, 0x50, 0x36, 0x70, 0x67, 0x50, 0x77, - 0x57, 0x54, 0x75, 0x77, 0x75, 0x17, 0x37, 0x73, 0x50, 0x57, 0x60, 0x77, 0x70, 0x77, 0x10, 0x73, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, - 0x87, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x4f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xdb, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x83, 0x00, - 0x2f, 0x3f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, - 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, - 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, - 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1, 0xd1 -}; + m_icons_cb.resolve(); +} void wswan_video_device::device_reset() @@ -145,7 +124,7 @@ void wswan_video_device::device_reset() m_window_sprites_enable = 0; m_window_fg_mode = 0; m_bg_control = 0; - m_current_line = 145; // Randomly chosen, beginning of VBlank period to give cart some time to boot up + m_current_line = 0; m_line_compare = 0; m_sprite_table_address = 0; m_sprite_first = 0; @@ -166,8 +145,7 @@ void wswan_video_device::device_reset() m_layer_bg_scroll_y = 0; m_layer_fg_scroll_x = 0; m_layer_fg_scroll_y = 0; - m_lcd_control = 0x01; - m_icons = 0; + m_lcd_control = 0; m_color_mode = 0; m_colors_16 = 0; m_tile_packed = 0; @@ -178,13 +156,12 @@ void wswan_video_device::device_reset() m_timer_vblank_enable = 0; m_timer_vblank_mode = 0; m_timer_vblank_reload = 0; - m_timer_vblank_count = 0; /* Vertical blank timer counter value */ + m_timer_vblank_count = 0; - memset(m_sprite_table_buffer, 0, sizeof(m_sprite_table_buffer)); - memset(m_main_palette, 0, sizeof(m_main_palette)); - memcpy(m_regs, vdp_regs_init, 256); - for (int i = 0; i < 0x20; i++) - m_palette_port[i] = m_regs[i + 0x20]; + std::fill(std::begin(m_sprite_table_buffer), std::end(m_sprite_table_buffer), 0); + std::fill(std::begin(m_main_palette), std::end(m_main_palette), 0); + std::fill(std::begin(m_regs), std::end(m_regs), 0); + std::fill(std::begin(m_palette_port), std::end(m_palette_port), 0); setup_palettes(); } @@ -207,33 +184,38 @@ void wswan_video_device::setup_palettes() { for (int i = 0; i < 16; i++) for (int j = 0; j < 16; j++) - m_pal[i][j] = ((m_palette_vram[(i << 5) + j * 2 + 1] << 8) | m_palette_vram[(i << 5) + j * 2]) & 0x0fff; + m_pal[i][j] = m_palette_vram[(i << 4) + j] & 0x0fff; } else { for (int i = 0; i < 16; i++) { - m_pal[i][0] = (m_palette_port[(i << 1)] >> 0) & 0x07; - m_pal[i][1] = (m_palette_port[(i << 1)] >> 4) & 0x07; - m_pal[i][2] = (m_palette_port[(i << 1) + 1] >> 0) & 0x07; - m_pal[i][3] = (m_palette_port[(i << 1) + 1] >> 4) & 0x07; + m_pal[i][0] = (m_palette_port[i] >> 0) & 0x07; + m_pal[i][1] = (m_palette_port[i] >> 4) & 0x07; + m_pal[i][2] = (m_palette_port[i] >> 8) & 0x07; + m_pal[i][3] = (m_palette_port[i] >> 12) & 0x07; } } } + +inline u16 wswan_video_device::swap_bytes(u16 word) { + return (word << 8) | (word >> 8); +} + + void wswan_video_device::draw_background() { - uint16_t map_addr = m_layer_bg_address + (((m_current_line + m_layer_bg_scroll_y) & 0xf8) << 3); - uint8_t start_column = (m_layer_bg_scroll_x >> 3); + const u16 map_addr = m_layer_bg_address + (((m_current_line + m_layer_bg_scroll_y) & 0xf8) << 2); + const u8 start_column = (m_layer_bg_scroll_x >> 3); for (int column = 0; column < 29; column++) { - uint32_t plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; - int x_offset, tile_line, tile_address; - int tile_data = (m_vram[map_addr + (((start_column + column) & 0x1f) << 1) + 1] << 8) - | m_vram[map_addr + (((start_column + column) & 0x1f) << 1)]; - int tile_number = tile_data & 0x01ff; - int tile_palette = (tile_data >> 9) & 0x0f; + u32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; + int x_offset, tile_line; + const u16 tile_data = m_vram[map_addr + ((start_column + column) & 0x1f)]; + const u16 tile_number = tile_data & 0x01ff; + const u16 tile_palette = (tile_data >> 9) & 0x0f; tile_line = (m_current_line + m_layer_bg_scroll_y) & 0x07; if (tile_data & 0x8000) // vflip @@ -241,30 +223,30 @@ void wswan_video_device::draw_background() if (m_colors_16) { - tile_address = ((tile_data & 0x2000) ? 0x8000 : 0x4000) + (tile_number * 32) + (tile_line << 2); + const u16 tile_address = ((tile_data & 0x2000) ? 0x4000 : 0x2000) + (tile_number * 16) + (tile_line << 1); if (m_tile_packed) { - plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3]; + plane0 = (swap_bytes(m_vram[tile_address]) << 16) | swap_bytes(m_vram[tile_address + 1]); } else { - plane0 = m_vram[tile_address + 0]; - plane1 = m_vram[tile_address + 1] << 1; - plane2 = m_vram[tile_address + 2] << 2; - plane3 = m_vram[tile_address + 3] << 3; + plane0 = m_vram[tile_address] & 0xff; + plane1 = (m_vram[tile_address] & 0xff00) >> 7; + plane2 = (m_vram[tile_address + 1] & 0xff) << 2; + plane3 = (m_vram[tile_address + 1] & 0xff00) >> 5; } } else { - tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1); + const u16 tile_address = 0x1000 + (tile_number * 8) + tile_line; if (m_tile_packed) { - plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1]; + plane0 = m_vram[tile_address]; } else { - plane0 = m_vram[tile_address + 0]; - plane1 = m_vram[tile_address + 1] << 1; + plane0 = m_vram[tile_address] & 0xff; + plane1 = (m_vram[tile_address] & 0xff00) >> 7; plane2 = 0; plane3 = 0; } @@ -306,13 +288,7 @@ void wswan_video_device::draw_background() { if (col) { - if (m_color_mode) - m_bitmap.pix(m_current_line, x_offset) = m_pal[tile_palette][col]; - else - { - /* Hmmmm, what should we do here... Is this correct?? */ - m_bitmap.pix(m_current_line, x_offset) = m_pal[tile_palette][col]; - } + m_bitmap.pix(m_current_line, x_offset) = m_pal[tile_palette][col]; } } else @@ -332,17 +308,16 @@ void wswan_video_device::draw_background() void wswan_video_device::draw_foreground_0() { - uint16_t map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8) << 3); - uint8_t start_column = (m_layer_fg_scroll_x >> 3); + const u16 map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8) << 2); + const u8 start_column = (m_layer_fg_scroll_x >> 3); for (int column = 0; column < 29; column++) { - uint32_t plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; - int x_offset, tile_line, tile_address; - int tile_data = (m_vram[map_addr + (((start_column + column) & 0x1f) << 1) + 1] << 8) - | m_vram[map_addr + (((start_column + column) & 0x1f) << 1)]; - int tile_number = tile_data & 0x01ff; - int tile_palette = (tile_data >> 9) & 0x0f; + u32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; + int x_offset, tile_line; + const u16 tile_data = m_vram[map_addr + ((start_column + column) & 0x1f)]; + const u16 tile_number = tile_data & 0x01ff; + const u16 tile_palette = (tile_data >> 9) & 0x0f; tile_line = (m_current_line + m_layer_fg_scroll_y) & 0x07; if (tile_data & 0x8000) // vflip @@ -350,30 +325,30 @@ void wswan_video_device::draw_foreground_0() if (m_colors_16) { - tile_address = ((tile_data & 0x2000) ? 0x8000 : 0x4000) + (tile_number * 32) + (tile_line << 2); + const u16 tile_address = ((tile_data & 0x2000) ? 0x4000 : 0x2000) + (tile_number * 16) + (tile_line << 1); if (m_tile_packed) { - plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3]; + plane0 = (swap_bytes(m_vram[tile_address]) << 16) | swap_bytes(m_vram[tile_address + 1]); } else { - plane0 = m_vram[tile_address + 0]; - plane1 = m_vram[tile_address + 1] << 1; - plane2 = m_vram[tile_address + 2] << 2; - plane3 = m_vram[tile_address + 3] << 3; + plane0 = m_vram[tile_address] & 0xff; + plane1 = (m_vram[tile_address] & 0xff00) >> 7; + plane2 = (m_vram[tile_address + 1] & 0xff) << 2; + plane3 = (m_vram[tile_address + 1] & 0xff00) >> 5; } } else { - tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1); + const u16 tile_address = 0x1000 + (tile_number * 8) + tile_line; if (m_tile_packed) { - plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1]; + plane0 = m_vram[tile_address]; } else { - plane0 = m_vram[tile_address + 0]; - plane1 = m_vram[tile_address + 1] << 1; + plane0 = m_vram[tile_address] & 0xff; + plane1 = (m_vram[tile_address] & 0xff00) >> 7; plane2 = 0; plane3 = 0; } @@ -415,12 +390,7 @@ void wswan_video_device::draw_foreground_0() { if (col) { -// if (m_color_mode) { m_bitmap.pix(m_current_line, x_offset) = m_pal[tile_palette][col]; -// } else { -// /* Hmmmm, what should we do here... Is this correct?? */ -// m_bitmap.pix(m_current_line, x_offset) = m_pal[tile_palette][col]; -// } } } else @@ -440,17 +410,16 @@ void wswan_video_device::draw_foreground_0() void wswan_video_device::draw_foreground_2() { - uint16_t map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8) << 3); - uint8_t start_column = (m_layer_fg_scroll_x >> 3); + const u16 map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8) << 2); + const u8 start_column = (m_layer_fg_scroll_x >> 3); for (int column = 0; column < 29; column++) { - uint32_t plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; - int x_offset, tile_line, tile_address; - int tile_data = (m_vram[map_addr + (((start_column + column) & 0x1f) << 1) + 1] << 8) - | m_vram[map_addr + (((start_column + column) & 0x1f) << 1)]; - int tile_number = tile_data & 0x01ff; - int tile_palette = (tile_data >> 9) & 0x0f; + u32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; + int x_offset, tile_line; + const u16 tile_data = m_vram[map_addr + ((start_column + column) & 0x1f)]; + const u16 tile_number = tile_data & 0x01ff; + const u16 tile_palette = (tile_data >> 9) & 0x0f; tile_line = (m_current_line + m_layer_fg_scroll_y) & 0x07; if (tile_data & 0x8000) // vflip @@ -459,30 +428,30 @@ void wswan_video_device::draw_foreground_2() if (m_colors_16) { - tile_address = ((tile_data & 0x2000) ? 0x8000 : 0x4000) + (tile_number * 32) + (tile_line << 2); + const u16 tile_address = ((tile_data & 0x2000) ? 0x4000 : 0x2000) + (tile_number * 16) + (tile_line << 1); if (m_tile_packed) { - plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3]; + plane0 = (swap_bytes(m_vram[tile_address]) << 16) | swap_bytes(m_vram[tile_address + 1]); } else { - plane0 = m_vram[tile_address + 0]; - plane1 = m_vram[tile_address + 1] << 1; - plane2 = m_vram[tile_address + 2] << 2; - plane3 = m_vram[tile_address + 3] << 3; + plane0 = m_vram[tile_address] & 0xff; + plane1 = (m_vram[tile_address] & 0xff00) >> 7; + plane2 = (m_vram[tile_address + 1] & 0xff) << 2; + plane3 = (m_vram[tile_address + 1] & 0xff00) >> 5; } } else { - tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1); + const u16 tile_address = 0x1000 + (tile_number * 8) + tile_line; if (m_tile_packed) { - plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1]; + plane0 = m_vram[tile_address]; } else { - plane0 = m_vram[tile_address + 0]; - plane1 = m_vram[tile_address + 1] << 1; + plane0 = m_vram[tile_address] & 0xff; + plane1 = (m_vram[tile_address] & 0xff00) >> 7; plane2 = 0; plane3 = 0; } @@ -518,17 +487,13 @@ void wswan_video_device::draw_foreground_2() else x_offset = 7 - x + (column << 3) - (m_layer_fg_scroll_x & 0x07); - if (x_offset >= 0 && x_offset >= m_window_fg_left && x_offset < m_window_fg_right && x_offset < WSWAN_X_PIXELS) + if (x_offset >= 0 && x_offset >= m_window_fg_left && x_offset <= m_window_fg_right && x_offset < WSWAN_X_PIXELS) { if (m_colors_16) { if (col) { - if (m_color_mode) - m_bitmap.pix(m_current_line, x_offset) = m_pal[tile_palette][col]; - else - /* Hmmmm, what should we do here... Is this correct?? */ - m_bitmap.pix(m_current_line, x_offset) = m_pal[tile_palette][col]; + m_bitmap.pix(m_current_line, x_offset) = m_pal[tile_palette][col]; } } else @@ -548,17 +513,16 @@ void wswan_video_device::draw_foreground_2() void wswan_video_device::draw_foreground_3() { - uint16_t map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8) << 3); - uint8_t start_column = (m_layer_fg_scroll_x >> 3); + const u16 map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8) << 2); + const u8 start_column = (m_layer_fg_scroll_x >> 3); for (int column = 0; column < 29; column++) { - uint32_t plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; - int x_offset, tile_line, tile_address; - int tile_data = (m_vram[map_addr + (((start_column + column) & 0x1f) << 1) + 1] << 8) - | m_vram[map_addr + (((start_column + column) & 0x1f) << 1)]; - int tile_number = tile_data & 0x01ff; - int tile_palette = (tile_data >> 9) & 0x0f; + u32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; + int x_offset, tile_line; + const u16 tile_data = m_vram[map_addr + ((start_column + column) & 0x1f)]; + const u16 tile_number = tile_data & 0x01ff; + const u16 tile_palette = (tile_data >> 9) & 0x0f; tile_line = (m_current_line + m_layer_fg_scroll_y) & 0x07; if (tile_data & 0x8000) // vflip @@ -566,30 +530,30 @@ void wswan_video_device::draw_foreground_3() if (m_colors_16) { - tile_address = ((tile_data & 0x2000) ? 0x8000 : 0x4000) + (tile_number * 32) + (tile_line << 2); + const u16 tile_address = ((tile_data & 0x2000) ? 0x4000 : 0x2000) + (tile_number * 16) + (tile_line << 1); if (m_tile_packed) { - plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3]; + plane0 = (swap_bytes(m_vram[tile_address]) << 16) | swap_bytes(m_vram[tile_address + 1]); } else { - plane0 = m_vram[tile_address + 0]; - plane1 = m_vram[tile_address + 1] << 1; - plane2 = m_vram[tile_address + 2] << 2; - plane3 = m_vram[tile_address + 3] << 3; + plane0 = m_vram[tile_address] & 0xff; + plane1 = (m_vram[tile_address] & 0xff00) >> 7; + plane2 = (m_vram[tile_address + 1] & 0xff) << 2; + plane3 = (m_vram[tile_address + 1] & 0xff00) >> 5; } } else { - tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1); + const u16 tile_address = 0x1000 + (tile_number * 8) + tile_line; if (m_tile_packed) { - plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1]; + plane0 = m_vram[tile_address]; } else { - plane0 = m_vram[tile_address + 0]; - plane1 = m_vram[tile_address + 1] << 1; + plane0 = m_vram[tile_address] & 0xff; + plane1 = (m_vram[tile_address] & 0xff00) >> 7; plane2 = 0; plane3 = 0; } @@ -625,17 +589,13 @@ void wswan_video_device::draw_foreground_3() else x_offset = 7 - x + (column << 3) - (m_layer_fg_scroll_x & 0x07); - if ((x_offset >= 0 && x_offset < m_window_fg_left) || (x_offset >= m_window_fg_right && x_offset < WSWAN_X_PIXELS)) + if ((x_offset >= 0 && x_offset < m_window_fg_left) || (x_offset > m_window_fg_right && x_offset < WSWAN_X_PIXELS)) { if (m_colors_16) { if (col) { - if (m_color_mode) - m_bitmap.pix(m_current_line, x_offset) = m_pal[tile_palette][col]; - else - /* Hmmmm, what should we do here... Is this correct?? */ - m_bitmap.pix(m_current_line, x_offset) = m_pal[tile_palette][col]; + m_bitmap.pix(m_current_line, x_offset) = m_pal[tile_palette][col]; } } else @@ -660,17 +620,17 @@ void wswan_video_device::handle_sprites(int mask) for (int i = m_sprite_first + m_sprite_count - 1; i >= m_sprite_first; i--) { - uint16_t tile_data = (m_sprite_table_buffer[i * 4 + 1] << 8) | m_sprite_table_buffer[i * 4]; - uint8_t y = m_sprite_table_buffer[ i * 4 + 2 ]; - uint8_t x = m_sprite_table_buffer[ i * 4 + 3 ]; + const u16 tile_data = m_sprite_table_buffer[i * 2]; + const u8 y = m_sprite_table_buffer[(i * 2) + 1] & 0xff; + const u8 x = m_sprite_table_buffer[(i * 2) + 1] >> 8; int tile_line = (m_current_line - y) & 0xff; if ((tile_line >= 0) && (tile_line < 8) && ((tile_data & 0x2000) == mask)) { - uint32_t plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; - int x_offset, tile_address; - int tile_number = tile_data & 0x01ff; - int tile_palette = 8 + ((tile_data >> 9) & 0x07); + u32 plane0 = 0, plane1 = 0, plane2 = 0, plane3 = 0; + int x_offset; + const int tile_number = tile_data & 0x01ff; + const int tile_palette = 8 + ((tile_data >> 9) & 0x07); int check_clip = 0; if (tile_data & 0x8000) @@ -678,30 +638,30 @@ void wswan_video_device::handle_sprites(int mask) if (m_colors_16) { - tile_address = 0x4000 + (tile_number * 32) + (tile_line << 2); + const u16 tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1); if (m_tile_packed) { - plane0 = (m_vram[tile_address + 0] << 24) | (m_vram[tile_address + 1] << 16) | (m_vram[tile_address + 2] << 8) | m_vram[tile_address + 3]; + plane0 = (swap_bytes(m_vram[tile_address]) << 16) | swap_bytes(m_vram[tile_address + 1]); } else { - plane0 = m_vram[tile_address + 0]; - plane1 = m_vram[tile_address + 1] << 1; - plane2 = m_vram[tile_address + 2] << 2; - plane3 = m_vram[tile_address + 3] << 3; + plane0 = m_vram[tile_address] & 0xff; + plane1 = (m_vram[tile_address] & 0xff00) >> 7; + plane2 = (m_vram[tile_address + 1] & 0xff) << 2; + plane3 = (m_vram[tile_address + 1] & 0xff00) >> 5; } } else { - tile_address = 0x2000 + (tile_number * 16) + (tile_line << 1); + const u16 tile_address = 0x1000 + (tile_number * 8) + tile_line; if (m_tile_packed) { - plane0 = (m_vram[tile_address + 0] << 8) | m_vram[tile_address + 1]; + plane0 = m_vram[tile_address]; } else { - plane0 = m_vram[tile_address + 0]; - plane1 = m_vram[tile_address + 1] << 1; + plane0 = m_vram[tile_address] & 0xff; + plane1 = (m_vram[tile_address] & 0xff00) >> 7; plane2 = 0; plane3 = 0; } @@ -774,11 +734,7 @@ void wswan_video_device::handle_sprites(int mask) { if (col) { - if (m_color_mode) - m_bitmap.pix(m_current_line, x_offset) = m_pal[tile_palette][col]; - else - /* Hmmmm, what should we do here... Is this correct?? */ - m_bitmap.pix(m_current_line, x_offset) = m_pal[tile_palette][col]; + m_bitmap.pix(m_current_line, x_offset) = m_pal[tile_palette][col]; } } else @@ -855,297 +811,307 @@ void wswan_video_device::refresh_scanline() -uint32_t wswan_video_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +u32 wswan_video_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect); return 0; } -uint8_t wswan_video_device::reg_r(offs_t offset) +u16 wswan_video_device::reg_r(offs_t offset, u16 mem_mask) { - uint8_t value = m_regs[offset]; - - if (offset >= 0x20 && offset < 0x40) - return m_palette_port[offset & 0x1f]; + u16 value = m_regs[offset & 0x7f]; switch (offset) { - case 0x01: - value = m_bg_control; - break; - case 0x02: - value = m_current_line; - break; - case 0x14: - value = m_lcd_control; - break; - case 0xa8: - value = m_timer_hblank_count & 0xff; - break; - case 0xa9: - value = m_timer_hblank_count >> 8; - break; - case 0xaa: - value = m_timer_vblank_count & 0xff; - break; - case 0xab: - value = m_timer_vblank_count >> 8; - break; + case 0x02 / 2: + return (value & 0xff00) | m_current_line; + case 0xa8 / 2: + return m_timer_hblank_count; + case 0xaa / 2: + return m_timer_vblank_count; } return value; } -void wswan_video_device::reg_w(offs_t offset, uint8_t data) +void wswan_video_device::reg_w(offs_t offset, u16 data, u16 mem_mask) { - if (offset >= 0x20 && offset < 0x40) - { - // 0x20-0x3f tile/sprite palette settings - // even offs - // Bit 0-3 - Palette (offs & 0x1f)/2 index 0 - // Bit 4-7 - Palette (offs & 0x1f)/2 index 1 - // odd offs - // Bit 0-3 - Palette (offs & 0x1f)/2 index 2 - // Bit 4-7 - Palette (offs & 0x1f)/2 index 3 - m_palette_port[offset & 0x1f] = data; - return; - } - switch (offset) { - case 0x00: // Display control - // Bit 0 - Background layer enable - // Bit 1 - Foreground layer enable - // Bit 2 - Sprites enable - // Bit 3 - Sprite window enable - // Bit 4-5 - Foreground window configuration - // 00 - Foreground layer is displayed inside and outside foreground window area - // 01 - Unknown - // 10 - Foreground layer is displayed only inside foreground window area - // 11 - Foreground layer is displayed outside foreground window area - // Bit 6-7 - Unknown - m_layer_bg_enable = data & 0x1; - m_layer_fg_enable = (data & 0x2) >> 1; - m_sprites_enable = (data & 0x4) >> 2; - m_window_sprites_enable = (data & 0x8) >> 3; - m_window_fg_mode = (data & 0x30) >> 4; - break; - case 0x01: // Background colour - // In 16 colour mode: - // Bit 0-3 - Palette index - // Bit 4-7 - Palette number - // Otherwise: - // Bit 0-2 - Main palette index - // Bit 3-7 - Unknown - m_bg_control = data; - break; - case 0x02: // Current scanline (Most likely read-only) - logerror("Write to current scanline! Current value: %d Data to write: %d\n", m_current_line, data); - // Returning so we don't overwrite the value here, not that it really matters - return; - case 0x03: // Line compare - m_line_compare = data; - logerror("Write to line compare: %d\n", data); - break; - case 0x04: // Sprite table base address - // Bit 0-5 - Determine sprite table base address 0 0xxxxxx0 00000000 - // Bit 6-7 - Unknown - m_sprite_table_address = (data & 0x3f) << 9; - break; - case 0x05: // First sprite number (the one we start drawing with) - m_sprite_first_latch = data; - if (data) logerror("non-zero first sprite %d\n", data); - break; - case 0x06: // Number of sprites to draw - m_sprite_count_latch = data; - break; - case 0x07: // Background/Foreground table base addresses - // Bit 0-2 - Determine background table base address 00xxx000 00000000 - // Bit 3 - Unknown - // Bit 4-6 - Determine foreground table base address 00xxx000 00000000 - // Bit 7 - Unknown - m_layer_bg_address = (data & 0x7) << 11; - m_layer_fg_address = (data & 0x70) << 7; - break; - case 0x08: // Left coordinate of foreground window - m_window_fg_left = data; - break; - case 0x09: // Top coordinate of foreground window - m_window_fg_top = data; - break; - case 0x0a: // Right coordinate of foreground window - m_window_fg_right = data; - break; - case 0x0b: // Bottom coordinate of foreground window - m_window_fg_bottom = data; + case 0x00 / 2: + // Display control + // Bit 0 - Background layer enable + // Bit 1 - Foreground layer enable + // Bit 2 - Sprites enable + // Bit 3 - Sprite window enable + // Bit 4-5 - Foreground window configuration + // 00 - Foreground layer is displayed inside and outside foreground window area + // 01 - Unknown + // 10 - Foreground layer is displayed only inside foreground window area + // 11 - Foreground layer is displayed outside foreground window area + // Bit 6-7 - Unknown + if (ACCESSING_BITS_0_7) + { + m_layer_bg_enable = data & 0x1; + m_layer_fg_enable = (data & 0x2) >> 1; + m_sprites_enable = (data & 0x4) >> 2; + m_window_sprites_enable = (data & 0x8) >> 3; + m_window_fg_mode = (data & 0x30) >> 4; + } + // Background colour + // In 16 colour mode: + // Bit 0-3 - Palette index + // Bit 4-7 - Palette number + // Otherwise: + // Bit 0-2 - Main palette index + // Bit 3-7 - Unknown + if (ACCESSING_BITS_8_15) + m_bg_control = data >> 8; break; - case 0x0c: // Left coordinate of sprite window - m_window_sprites_left = data; + case 0x02 / 2: + // Current scanline (read-only) + if (ACCESSING_BITS_0_7) + logerror("Write to current scanline! Current value: %d Data to write: %d\n", m_current_line, data); + // Line compare + if (ACCESSING_BITS_8_15) + m_line_compare = data >> 8; break; - case 0x0d: // Top coordinate of sprite window - m_window_sprites_top = data; + case 0x04 / 2: + // Sprite table base address + // Bit 0-5 - Determine sprite table base address 0 0xxxxxx0 00000000 + // Bit 6-7 - Unknown + if (ACCESSING_BITS_0_7) + { + if (m_vdp_type == VDP_TYPE_WSC && !m_color_mode) + m_sprite_table_address = (data & 0x3f) << 8; + else + m_sprite_table_address = (data & 0x1f) << 8; + } + // First sprite number (the one we start drawing with) + if (ACCESSING_BITS_8_15) + m_sprite_first_latch = data >> 8; break; - case 0x0e: // Right coordinate of sprite window - m_window_sprites_right = data; + case 0x06 / 2: + // Number of sprites to draw + if (ACCESSING_BITS_0_7) + m_sprite_count_latch = data & 0xff; + // Background/Foreground table base addresses + // Bit 8-10 - Determine background table base address 00xxx000 00000000 (in bytes) + // Bit 11 - Unknown + // Bit 12-14 - Determine foreground table base address 00xxx000 00000000 (in bytes) + // Bit 15 - Unknown + if (ACCESSING_BITS_8_15) + { + m_layer_bg_address = (data & 0x0700) << 2; + m_layer_fg_address = (data & 0x7000) >> 2; + } break; - case 0x0f: // Bottom coordinate of sprite window - m_window_sprites_bottom = data; + case 0x08 / 2: + // Left coordinate of foreground window + if (ACCESSING_BITS_0_7) + m_window_fg_left = data & 0xff; + // Top coordinate of foreground window + if (ACCESSING_BITS_8_15) + m_window_fg_top = data >> 8; break; - case 0x10: // Background layer X scroll - m_layer_bg_scroll_x = data; + case 0x0a / 2: + // Right coordinate of foreground window + if (ACCESSING_BITS_0_7) + m_window_fg_right = data & 0xff; + // Bottom coordinate of foreground window + if (ACCESSING_BITS_8_15) + m_window_fg_bottom = data >> 8; break; - case 0x11: // Background layer Y scroll - m_layer_bg_scroll_y = data; + case 0x0c / 2: + // Left coordinate of sprite window + if (ACCESSING_BITS_0_7) + m_window_sprites_left = data & 0xff; + // Top coordinate of sprite window + if (ACCESSING_BITS_8_15) + m_window_sprites_top = data >> 8; break; - case 0x12: // Foreground layer X scroll - m_layer_fg_scroll_x = data; + case 0x0e / 2: + // Right coordinate of sprite window + if (ACCESSING_BITS_0_7) + m_window_sprites_right = data & 0xff; + // Bottom coordinate of sprite window + if (ACCESSING_BITS_8_15) + m_window_sprites_bottom = data >> 8; break; - case 0x13: // Foreground layer Y scroll - m_layer_fg_scroll_y = data; + case 0x10 / 2: + // Background layer X scroll + if (ACCESSING_BITS_0_7) + m_layer_bg_scroll_x = data & 0xff; + // Background layer Y scroll + if (ACCESSING_BITS_8_15) + m_layer_bg_scroll_y = data >> 8; break; - case 0x14: // LCD control - // Bit 0 - LCD enable - // Bit 1 - WSC only, brightness low/high - // Bit 2-7 - Unknown - m_lcd_control = data; + case 0x12 / 2: + // Foreground layer X scroll + if (ACCESSING_BITS_0_7) + m_layer_fg_scroll_x = data & 0xff; + // Foreground layer Y scroll + if (ACCESSING_BITS_8_15) + m_layer_fg_scroll_y = data >> 8; break; - case 0x15: // LCD icons - // Bit 0 - LCD sleep icon enable - // Bit 1 - Vertical position icon enable - // Bit 2 - Horizontal position icon enable - // Bit 3 - Dot 1 icon enable - // Bit 4 - Dot 2 icon enable - // Bit 5 - Dot 3 icon enable - // Bit 6-7 - Unknown - m_icons = data; /* ummmmm */ + case 0x14 / 2: + // LCD control + // Bit 0 - LCD enable + // Bit 1 - WSC only, brightness low/high + // Bit 2-7 - Unknown + if (ACCESSING_BITS_0_7) + m_lcd_control = data & 0xff; + // LCD icons + // Bit 8 - LCD sleep icon enable + // Bit 9 - Vertical position icon enable + // Bit 10 - Horizontal position icon enable + // Bit 11 - Dot 1 icon enable + // Bit 12 - Dot 2 icon enable + // Bit 13 - Dot 3 icon enable + // Bit 14-15 - Unknown + if (ACCESSING_BITS_8_15) + m_icons_cb(data >> 8); break; - case 0x1c: // Palette colors 0 and 1 - // Bit 0-3 - Gray tone setting for main palette index 0 - // Bit 4-7 - Gray tone setting for main palette index 1 - if (m_vdp_type == VDP_TYPE_WSC) + case 0x1c / 2: + // Palette colors 0 and 1 + // Bit 0-3 - Gray tone setting for main palette index 0 + // Bit 4-7 - Gray tone setting for main palette index 1 + if (ACCESSING_BITS_0_7) { - int i = 15 - (data & 0x0f); - int j = 15 - ((data & 0xf0) >> 4); - m_main_palette[0] = (i << 8) | (i << 4) | i; - m_main_palette[1] = (j << 8) | (j << 4) | j; + if (m_vdp_type == VDP_TYPE_WSC) + { + int i = 15 - (data & 0x0f); + int j = 15 - ((data >> 4) & 0x0f); + m_main_palette[0] = (i << 8) | (i << 4) | i; + m_main_palette[1] = (j << 8) | (j << 4) | j; + } + else + { + m_main_palette[0] = data & 0x0f; + m_main_palette[1] = (data >> 4) & 0x0f; + } } - else + // Palette colors 2 and 3 + // Bit 8-11 - Gray tone setting for main palette index 2 + // Bit 12-15 - Gray tone setting for main palette index 3 + if (ACCESSING_BITS_8_15) { - m_main_palette[0] = data & 0x0f; - m_main_palette[1] = (data & 0xf0) >> 4; + if (m_vdp_type == VDP_TYPE_WSC) + { + int i = 15 - ((data >> 8) & 0x0f); + int j = 15 - ((data >> 12) & 0x0f); + m_main_palette[2] = (i << 8) | (i << 4) | i; + m_main_palette[3] = (j << 8) | (j << 4) | j; + } + else + { + m_main_palette[2] = (data >> 8) & 0x0f; + m_main_palette[3] = (data >> 12) & 0x0f; + } } break; - case 0x1d: // Palette colors 2 and 3 - // Bit 0-3 - Gray tone setting for main palette index 2 - // Bit 4-7 - Gray tone setting for main palette index 3 - if (m_vdp_type == VDP_TYPE_WSC) + case 0x1e / 2: + // Palette colors 4 and 5 + // Bit 0-3 - Gray tone setting for main palette index 4 + // Bit 4-7 - Gray tone setting for main palette index 5 + if (ACCESSING_BITS_0_7) { - int i = 15 - (data & 0x0f); - int j = 15 - ((data & 0xf0) >> 4); - m_main_palette[2] = (i << 8) | (i << 4) | i; - m_main_palette[3] = (j << 8) | (j << 4) | j; + if (m_vdp_type == VDP_TYPE_WSC) + { + int i = 15 - (data & 0x0f); + int j = 15 - ((data >> 4) & 0x0f); + m_main_palette[4] = (i << 8) | (i << 4) | i; + m_main_palette[5] = (j << 8) | (j << 4) | j; + } + else + { + m_main_palette[4] = data & 0x0f; + m_main_palette[5] = (data >> 4) & 0x0f; + } } - else + // Palette colors 6 and 7 + // Bit 0-3 - Gray tone setting for main palette index 6 + // Bit 4-7 - Gray tone setting for main palette index 7 + if (ACCESSING_BITS_8_15) { - m_main_palette[2] = data & 0x0f; - m_main_palette[3] = (data & 0xf0) >> 4; + if (m_vdp_type == VDP_TYPE_WSC) + { + int i = 15 - ((data >> 8) & 0x0f); + int j = 15 - ((data >> 12) & 0x0f); + m_main_palette[6] = (i << 8) | (i << 4) | i; + m_main_palette[7] = (j << 8) | (j << 4) | j; + } + else + { + m_main_palette[6] = (data >> 8) & 0x0f; + m_main_palette[7] = (data >> 12) & 0x0f; + } } break; - case 0x1e: // Palette colors 4 and 5 - // Bit 0-3 - Gray tone setting for main palette index 4 - // Bit 4-7 - Gray tone setting for main palette index 5 - if (m_vdp_type == VDP_TYPE_WSC) - { - int i = 15 - (data & 0x0f); - int j = 15 - ((data & 0xf0) >> 4); - m_main_palette[4] = (i << 8) | (i << 4) | i; - m_main_palette[5] = (j << 8) | (j << 4) | j; - } - else - { - m_main_palette[4] = data & 0x0f; - m_main_palette[5] = (data & 0xf0) >> 4; - } + case 0x20 / 2: case 0x22 / 2: case 0x24 / 2: case 0x26 / 2: + case 0x28 / 2: case 0x2a / 2: case 0x2c / 2: case 0x2e / 2: + case 0x30 / 2: case 0x32 / 2: case 0x34 / 2: case 0x36 / 2: + case 0x38 / 2: case 0x3a / 2: case 0x3c / 2: case 0x3e / 2: + // 0x20-0x3f tile/sprite palette settings + // Bit 0- 3 - Palette (offs & 0x1f)/2 index 0 + // Bit 4- 7 - Palette (offs & 0x1f)/2 index 1 + // Bit 8-11 - Palette (offs & 0x1f)/2 index 2 + // Bit 12-15 - Palette (offs & 0x1f)/2 index 3 + data &= 0x7777; + COMBINE_DATA(&m_palette_port[offset & 0x0f]); break; - case 0x1f: // Palette colors 6 and 7 - // Bit 0-3 - Gray tone setting for main palette index 6 - // Bit 4-7 - Gray tone setting for main palette index 7 - if (m_vdp_type == VDP_TYPE_WSC) + case 0x60 / 2: + // Video mode + // Bit 0-4 - Unknown + // Bit 5 - Packed mode 0 = not packed mode, 1 = packed mode + // Bit 6 - 4/16 colour mode select: 0 = 4 colour mode, 1 = 16 colour mode + // Bit 7 - monochrome/colour mode select: 0 = monochrome mode, 1 = colour mode + // 111 - packed, 16 color, use 4000/8000, color + // 110 - not packed, 16 color, use 4000/8000, color + // 101 - packed, 4 color, use 2000, color + // 100 - not packed, 4 color, use 2000, color + // 011 - packed, 16 color, use 4000/8000, monochrome + // 010 - not packed, 16 color , use 4000/8000, monochrome + // 001 - packed, 4 color, use 2000, monochrome + // 000 - not packed, 4 color, use 2000, monochrome - Regular WS monochrome + if (ACCESSING_BITS_0_7) { - int i = 15 - (data & 0x0f); - int j = 15 - ((data & 0xf0) >> 4); - m_main_palette[6] = (i << 8) | (i << 4) | i; - m_main_palette[7] = (j << 8) | (j << 4) | j; - } - else - { - m_main_palette[6] = data & 0x0f; - m_main_palette[7] = (data & 0xf0) >> 4; + if (m_vdp_type == VDP_TYPE_WSC) + { + m_color_mode = data & 0x80; + m_colors_16 = data & 0x40; + m_tile_packed = data & 0x20; + } } break; - case 0x60: // Video mode - // Bit 0-4 - Unknown - // Bit 5 - Packed mode 0 = not packed mode, 1 = packed mode - // Bit 6 - 4/16 colour mode select: 0 = 4 colour mode, 1 = 16 colour mode - // Bit 7 - monochrome/colour mode select: 0 = monochrome mode, 1 = colour mode - /* - * 111 - packed, 16 color, use 4000/8000, color - * 110 - not packed, 16 color, use 4000/8000, color - * 101 - packed, 4 color, use 2000, color - * 100 - not packed, 4 color, use 2000, color - * 011 - packed, 16 color, use 4000/8000, monochrome - * 010 - not packed, 16 color , use 4000/8000, monochrome - * 001 - packed, 4 color, use 2000, monochrome - * 000 - not packed, 4 color, use 2000, monochrome - Regular WS monochrome - */ - if (m_vdp_type == VDP_TYPE_WSC) + case 0xa2 / 2: + // Timer control + // Bit 0 - HBlank Timer enable + // Bit 1 - HBlank Timer mode: 0 = one shot, 1 = auto reset + // Bit 2 - VBlank Timer(1/75s) enable + // Bit 3 - VBlank Timer mode: 0 = one shot, 1 = auto reset + // Bit 4-7 - Unknown + if (ACCESSING_BITS_0_7) { - m_color_mode = data & 0x80; - m_colors_16 = data & 0x40; - m_tile_packed = data & 0x20; + m_timer_hblank_enable = BIT(data, 0); + m_timer_hblank_mode = BIT(data, 1); + m_timer_vblank_enable = BIT(data, 2); + m_timer_vblank_mode = BIT(data, 3); } break; - case 0xa2: // Timer control - // Bit 0 - HBlank Timer enable - // Bit 1 - HBlank Timer mode: 0 = one shot, 1 = auto reset - // Bit 2 - VBlank Timer(1/75s) enable - // Bit 3 - VBlank Timer mode: 0 = one shot, 1 = auto reset - // Bit 4-7 - Unknown - m_timer_hblank_enable = BIT(data, 0); - m_timer_hblank_mode = BIT(data, 1); - m_timer_vblank_enable = BIT(data, 2); - m_timer_vblank_mode = BIT(data, 3); - break; - case 0xa4: // HBlank timer frequency reload value (bits 0-7) - m_timer_hblank_reload &= 0xff00; - m_timer_hblank_reload += data; - m_timer_hblank_count = m_timer_hblank_reload; - break; - case 0xa5: // HBlank timer frequency reload value (bits 8-15) - m_timer_hblank_reload &= 0xff; - m_timer_hblank_reload += data << 8; + case 0xa4 / 2: // HBlank timer frequency reload value + COMBINE_DATA(&m_timer_hblank_reload); m_timer_hblank_count = m_timer_hblank_reload; break; - case 0xa6: // VBlank timer frequency reload value (bits 0-7) - m_timer_vblank_reload &= 0xff00; - m_timer_vblank_reload += data; + case 0xa6 / 2: // VBlank timer frequency reload value + COMBINE_DATA(&m_timer_vblank_reload); m_timer_vblank_count = m_timer_vblank_reload; break; - case 0xa7: // VBlank timer frequency reload value (bits 8-15) - m_timer_vblank_reload &= 0xff; - m_timer_vblank_reload += data << 8; - m_timer_vblank_count = m_timer_vblank_reload; - break; - case 0xa8: // HBlank counter (bits 0-7) - case 0xa9: // HBlank counter (bits 8-15) - case 0xaa: // VBlank counter (bits 0-7) - case 0xab: // VBlank counter (bits 8-15) - break; } - m_regs[offset] = data; + COMBINE_DATA(&m_regs[offset & 0x7f]); } @@ -1158,7 +1124,6 @@ void wswan_video_device::scanline_interrupt() if (m_timer_hblank_enable && m_timer_hblank_reload != 0) { m_timer_hblank_count--; - logerror("timer_hblank_count: %X\n", m_timer_hblank_count); if (m_timer_hblank_count == 0) { if (m_timer_hblank_mode) @@ -1166,7 +1131,6 @@ void wswan_video_device::scanline_interrupt() else m_timer_hblank_reload = 0; - logerror( "triggering hbltmr interrupt\n" ); m_set_irq_cb(WSWAN_VIDEO_IFLAG_HBLTMR); } } @@ -1174,12 +1138,10 @@ void wswan_video_device::scanline_interrupt() // Handle Sound DMA m_snd_dma_cb(); -// m_current_line = (m_current_line + 1) % 159; - if (m_current_line == 144) // buffer sprite table { memcpy(m_sprite_table_buffer, &m_vram[m_sprite_table_address], 512); - m_sprite_first = m_sprite_first_latch; // always zero? + m_sprite_first = m_sprite_first_latch; m_sprite_count = m_sprite_count_latch; } @@ -1190,7 +1152,6 @@ void wswan_video_device::scanline_interrupt() if (m_timer_vblank_enable && m_timer_vblank_reload != 0) { m_timer_vblank_count--; - logerror("timer_vblank_count: %X\n", m_timer_vblank_count); if (m_timer_vblank_count == 0) { if (m_timer_vblank_mode) @@ -1198,14 +1159,11 @@ void wswan_video_device::scanline_interrupt() else m_timer_vblank_reload = 0; - logerror("triggering vbltmr interrupt\n"); m_set_irq_cb(WSWAN_VIDEO_IFLAG_VBLTMR); } } } -// m_current_line = (m_current_line + 1) % 159; - if (m_current_line == m_line_compare) m_set_irq_cb(WSWAN_VIDEO_IFLAG_LCMP); @@ -1213,12 +1171,13 @@ void wswan_video_device::scanline_interrupt() } -uint8_t wswan_video_device::vram_r(offs_t offset) +u16 wswan_video_device::vram_r(offs_t offset, u16 mem_mask) { return m_vram[offset]; } -void wswan_video_device::vram_w(offs_t offset, uint8_t data) + +void wswan_video_device::vram_w(offs_t offset, u16 data, u16 mem_mask) { - m_vram[offset] = data; + COMBINE_DATA(&m_vram[offset]); } diff --git a/src/mame/video/wswan.h b/src/mame/video/wswan.h index 0ca4b6d3c1d..f532ae5d3ab 100644 --- a/src/mame/video/wswan.h +++ b/src/mame/video/wswan.h @@ -30,12 +30,14 @@ public: template <typename... T> void set_dmasnd_callback(T &&... args) { m_snd_dma_cb.set(std::forward<T>(args)...); } void set_vdp_type(int type) { m_vdp_type = type; } - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint8_t vram_r(offs_t offset); - void vram_w(offs_t offset, uint8_t data); - uint8_t reg_r(offs_t offset); - void reg_w(offs_t offset, uint8_t data); + u16 vram_r(offs_t offset, u16 mem_mask); + void vram_w(offs_t offset, u16 data, u16 mem_mask); + u16 reg_r(offs_t offset, u16 mem_mesk); + void reg_w(offs_t offset, u16 data, u16 mem_mask); + + auto icons_cb() { return m_icons_cb.bind(); } enum { @@ -61,71 +63,77 @@ protected: void refresh_scanline(); void scanline_interrupt(); void common_save(); + u16 swap_bytes(u16 word); bitmap_ind16 m_bitmap; - uint8_t m_layer_bg_enable; /* Background layer on/off */ - uint8_t m_layer_fg_enable; /* Foreground layer on/off */ - uint8_t m_sprites_enable; /* Sprites on/off */ - uint8_t m_window_sprites_enable; /* Sprite window on/off */ - uint8_t m_window_fg_mode; /* 0:inside/outside, 1:??, 2:inside, 3:outside */ - uint8_t m_bg_control; - uint8_t m_current_line; /* Current scanline : 0-158 (159?) */ - uint8_t m_line_compare; /* Line to trigger line interrupt on */ - uint32_t m_sprite_table_address; /* Address of the sprite table */ - uint8_t m_sprite_table_buffer[512]; - uint8_t m_sprite_first; /* First sprite to draw */ - uint8_t m_sprite_count; /* Number of sprites to draw */ - uint8_t m_sprite_first_latch; - uint8_t m_sprite_count_latch; - uint16_t m_layer_bg_address; /* Address of the background screen map */ - uint16_t m_layer_fg_address; /* Address of the foreground screen map */ - uint8_t m_window_fg_left; /* Left coordinate of foreground window */ - uint8_t m_window_fg_top; /* Top coordinate of foreground window */ - uint8_t m_window_fg_right; /* Right coordinate of foreground window */ - uint8_t m_window_fg_bottom; /* Bottom coordinate of foreground window */ - uint8_t m_window_sprites_left; /* Left coordinate of sprites window */ - uint8_t m_window_sprites_top; /* Top coordinate of sprites window */ - uint8_t m_window_sprites_right; /* Right coordinate of sprites window */ - uint8_t m_window_sprites_bottom; /* Bottom coordinate of sprites window */ - uint8_t m_layer_bg_scroll_x; /* Background layer X scroll */ - uint8_t m_layer_bg_scroll_y; /* Background layer Y scroll */ - uint8_t m_layer_fg_scroll_x; /* Foreground layer X scroll */ - uint8_t m_layer_fg_scroll_y; /* Foreground layer Y scroll */ - uint8_t m_lcd_control; /* LCD on/off */ - uint8_t m_icons; /* FIXME: What do we do with these? Maybe artwork? */ - uint8_t m_color_mode; /* monochrome/color mode */ - uint8_t m_colors_16; /* 4/16 colors mode */ - uint8_t m_tile_packed; /* layered/packed tile mode switch */ - uint8_t m_timer_hblank_enable; /* Horizontal blank interrupt on/off */ - uint8_t m_timer_hblank_mode; /* Horizontal blank timer mode */ - uint16_t m_timer_hblank_reload; /* Horizontal blank timer reload value */ - uint16_t m_timer_hblank_count; /* Horizontal blank timer counter value */ - uint8_t m_timer_vblank_enable; /* Vertical blank interrupt on/off */ - uint8_t m_timer_vblank_mode; /* Vertical blank timer mode */ - uint16_t m_timer_vblank_reload; /* Vertical blank timer reload value */ - uint16_t m_timer_vblank_count; /* Vertical blank timer counter value */ + u8 m_layer_bg_enable; // Background layer on/off + u8 m_layer_fg_enable; // Foreground layer on/off + u8 m_sprites_enable; // Sprites on/off + u8 m_window_sprites_enable; // Sprite window on/off + u8 m_window_fg_mode; // 0:inside/outside, 1:??, 2:inside, 3:outside + u8 m_bg_control; + u8 m_current_line; // Current scanline : 0-158 (159?) + u8 m_line_compare; // Line to trigger line interrupt on + u32 m_sprite_table_address; // Address of the sprite table + u16 m_sprite_table_buffer[256]; + u8 m_sprite_first; // First sprite to draw + u8 m_sprite_count; // Number of sprites to draw + u8 m_sprite_first_latch; + u8 m_sprite_count_latch; + u16 m_layer_bg_address; // Address of the background screen map + u16 m_layer_fg_address; // Address of the foreground screen map + u8 m_window_fg_left; // Left coordinate of foreground window + u8 m_window_fg_top; // Top coordinate of foreground window + u8 m_window_fg_right; // Right coordinate of foreground window + u8 m_window_fg_bottom; // Bottom coordinate of foreground window + u8 m_window_sprites_left; // Left coordinate of sprites window + u8 m_window_sprites_top; // Top coordinate of sprites window + u8 m_window_sprites_right; // Right coordinate of sprites window + u8 m_window_sprites_bottom; // Bottom coordinate of sprites window + u8 m_layer_bg_scroll_x; // Background layer X scroll + u8 m_layer_bg_scroll_y; // Background layer Y scroll + u8 m_layer_fg_scroll_x; // Foreground layer X scroll + u8 m_layer_fg_scroll_y; // Foreground layer Y scroll + u8 m_lcd_control; // LCD on/off + u8 m_color_mode; // monochrome/color mode + u8 m_colors_16; // 4/16 colors mode + u8 m_tile_packed; // layered/packed tile mode switch + u8 m_timer_hblank_enable; // Horizontal blank interrupt on/off + u8 m_timer_hblank_mode; // Horizontal blank timer mode + u16 m_timer_hblank_reload; // Horizontal blank timer reload value + u16 m_timer_hblank_count; // Horizontal blank timer counter value + u8 m_timer_vblank_enable; // Vertical blank interrupt on/off + u8 m_timer_vblank_mode; // Vertical blank timer mode + u16 m_timer_vblank_reload; // Vertical blank timer reload value + u16 m_timer_vblank_count; // Vertical blank timer counter value int m_main_palette[8]; emu_timer *m_timer; - std::vector<uint8_t> m_vram; - uint8_t *m_palette_vram; - uint8_t m_palette_port[0x20]; + std::vector<u16> m_vram; + u16 *m_palette_vram; + u16 m_palette_port[0x10]; int m_pal[16][16]; - uint8_t m_regs[256]; + u16 m_regs[128]; irq_cb_delegate m_set_irq_cb; dmasnd_cb_delegate m_snd_dma_cb; int m_vdp_type; + devcb_write8 m_icons_cb; + // timer IDs - static const device_timer_id TIMER_SCANLINE = 0; + static constexpr device_timer_id TIMER_SCANLINE = 0; // interrupt flags // these are the same as the wswan.h ones - static const uint8_t WSWAN_VIDEO_IFLAG_LCMP = 0x10; - static const uint8_t WSWAN_VIDEO_IFLAG_VBLTMR = 0x20; - static const uint8_t WSWAN_VIDEO_IFLAG_VBL = 0x40; - static const uint8_t WSWAN_VIDEO_IFLAG_HBLTMR = 0x80; + static constexpr u8 WSWAN_VIDEO_IFLAG_LCMP = 0x10; + static constexpr u8 WSWAN_VIDEO_IFLAG_VBLTMR = 0x20; + static constexpr u8 WSWAN_VIDEO_IFLAG_VBL = 0x40; + static constexpr u8 WSWAN_VIDEO_IFLAG_HBLTMR = 0x80; + + static constexpr size_t WS_VRAM_SIZE = 0x4000 >> 1; + static constexpr size_t WSC_VRAM_SIZE = 0x10000 >> 1; + static constexpr size_t WSC_VRAM_PALETTE = 0xfe00 >> 1; }; DECLARE_DEVICE_TYPE(WSWAN_VIDEO, wswan_video_device) |