mirror of
https://github.com/holub/mame
synced 2025-04-18 22:49:58 +03:00
(MESS) nes: Properly implemented the Bandai Datach as a passthru cart.
Datach games have now to be loaded with the following commands "mess nes -cart datach -cart2 gamename" where gamename can be either a shortname from the datach softlist, or a fullpath to the iNES files (or to headerless 256k dump of the Datach minicarts). This is accurate to the hardware, because Datach carts could not be mounted in the main Famicom cartridge slot. [Fabio Priuli]
This commit is contained in:
parent
3b41f5f4fb
commit
ad550cb7b8
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -182,6 +182,7 @@ hash/neocd.xml svneol=native#text/xml
|
||||
hash/neogeo.xml svneol=native#text/xml
|
||||
hash/nes.hsi svneol=native#text/xml
|
||||
hash/nes.xml svneol=native#text/xml
|
||||
hash/nes_datach.xml svneol=native#text/xml
|
||||
hash/nes_ntbrom.xml svneol=native#text/xml
|
||||
hash/next.xml svneol=native#text/xml
|
||||
hash/ngp.xml svneol=native#text/xml
|
||||
@ -8161,6 +8162,8 @@ src/mess/machine/nes_cne.c svneol=native#text/plain
|
||||
src/mess/machine/nes_cne.h svneol=native#text/plain
|
||||
src/mess/machine/nes_cony.c svneol=native#text/plain
|
||||
src/mess/machine/nes_cony.h svneol=native#text/plain
|
||||
src/mess/machine/nes_datach.c svneol=native#text/plain
|
||||
src/mess/machine/nes_datach.h svneol=native#text/plain
|
||||
src/mess/machine/nes_discrete.c svneol=native#text/plain
|
||||
src/mess/machine/nes_discrete.h svneol=native#text/plain
|
||||
src/mess/machine/nes_event.c svneol=native#text/plain
|
||||
|
170
hash/nes.xml
170
hash/nes.xml
@ -44570,139 +44570,6 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="dtc_brsh" supported="partial">
|
||||
<description>Datach - Battle Rush - Build Up Robot Tournament (Jpn)</description>
|
||||
<year>1993</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<info name="serial" value="DATACH-BURT"/>
|
||||
<info name="release" value="19931112"/>
|
||||
<info name="alt_title" value="データック バトルラッシュ"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="datach" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<dataarea name="prg" size="262144">
|
||||
<rom name="datach - battle rush - build up robot tournament (japan).prg" size="262144" crc="983d8175" sha1="29cc759d5ca214eefc0cc1c6ce0f8b9111e58124" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
<!-- 8k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="8192">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="dtc_cray" supported="partial">
|
||||
<description>Datach - Crayon Shin-Chan - Ora to Poi Poi (Jpn)</description>
|
||||
<year>1993</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<info name="serial" value="DATACH-CSOPP"/>
|
||||
<info name="release" value="19930827"/>
|
||||
<info name="alt_title" value="データック クレヨンしんちゃん オラとポイポイ"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="datach" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<dataarea name="prg" size="262144">
|
||||
<rom name="datach - crayon shin-chan - ora to poi poi (japan).prg" size="262144" crc="894efdbc" sha1="6f3c65bd945fe13305a7a39d8cd884a5bf314a8f" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
<!-- 8k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="8192">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="dtc_dbz" supported="partial">
|
||||
<description>Datach - Dragon Ball Z - Gekitou Tenkaichi Budou Kai (Jpn)</description>
|
||||
<year>1992</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<info name="serial" value="DATACH-DBZ"/>
|
||||
<info name="release" value="19921229"/>
|
||||
<info name="alt_title" value="データック ドラゴンボールZ 激闘天下一武道会"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="datach" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<dataarea name="prg" size="262144">
|
||||
<rom name="datach - dragon ball z - gekitou tenkaichi budou kai (japan).prg" size="262144" crc="19e81461" sha1="87478b635fefb25fa13c4876e20f505a97426c1b" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
<!-- 8k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="8192">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="dtc_jltp" supported="partial">
|
||||
<description>Datach - J League Super Top Players (Jpn)</description>
|
||||
<year>1994</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<info name="serial" value="DATACH-STP"/>
|
||||
<info name="release" value="19940422"/>
|
||||
<info name="alt_title" value="データック Jリーグスーパートッププレイヤーズ"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="datach" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<dataarea name="prg" size="262144">
|
||||
<rom name="datach - j league super top players (japan).prg" size="262144" crc="be06853f" sha1="b2089533e05fe95814d0d77f2729944cbeb95988" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
<!-- 8k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="8192">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="dtc_sdgn" supported="partial">
|
||||
<description>Datach - SD Gundam - Gundam Wars (Jpn)</description>
|
||||
<year>1993</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<info name="serial" value="DATACH-SDGW"/>
|
||||
<info name="release" value="19930423"/>
|
||||
<info name="alt_title" value="データック SDガンダム ガンダムウォーズ"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="datach" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<dataarea name="prg" size="262144">
|
||||
<rom name="datach - sd gundam - gundam wars (japan).prg" size="262144" crc="0be0a328" sha1="edd7a45a7f27e396b6d686f1861642d509863132" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
<!-- 8k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="8192">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="dtc_ultr" supported="partial">
|
||||
<description>Datach - Ultraman Club - Supokon Fight! (Jpn)</description>
|
||||
<year>1993</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<info name="serial" value="DATACH-UCSF"/>
|
||||
<info name="release" value="19930423"/>
|
||||
<info name="alt_title" value="データック ウルトラマン倶楽部 スポ根ファイト!"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="datach" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<dataarea name="prg" size="262144">
|
||||
<rom name="datach - ultraman club - supokon fight! (japan).prg" size="262144" crc="5b457641" sha1="533170d5eb685231ccd27b9c136ffa4fad68a7b8" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
<!-- 8k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="8192">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="dtc_yuyu" supported="partial">
|
||||
<description>Datach - Yu Yu Hakusho - Bakutou Ankoku Bujutsu Kai (Jpn)</description>
|
||||
<year>1993</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<info name="serial" value="DATACH-BABK"/>
|
||||
<info name="release" value="19931022"/>
|
||||
<info name="alt_title" value="データック 幽遊白書 爆闘暗黒武術会"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="datach" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<dataarea name="prg" size="262144">
|
||||
<rom name="datach - yuu yuu hakusho - bakutou ankoku bujutsu kai (japan).prg" size="262144" crc="f51a7f46" sha1="74218aae93e4febfb2284bcf15811453418a2029" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
<!-- 8k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="8192">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="deblock">
|
||||
<description>De-Block (Jpn)</description>
|
||||
<year>1991</year>
|
||||
@ -55934,7 +55801,7 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
|
||||
<info name="serial" value="NJ064"/>
|
||||
<info name="alt_title" value="数独"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="waixing_h" /> <!-- Not exactly -->
|
||||
<feature name="slot" value="waixing_h" /> <!-- Not exactly -->
|
||||
<feature name="pcb" value="WAIXING-H" />
|
||||
<feature name="mirroring" value="vertical" />
|
||||
<dataarea name="prg" size="262144">
|
||||
@ -58250,7 +58117,7 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
|
||||
<info name="serial" value="ES-0122"/>
|
||||
<info name="alt_title" value="亚特鲁战记"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="txrom" /> <!-- marked as mapper 74, but it's not... -->
|
||||
<feature name="slot" value="txrom" /> <!-- marked as mapper 74, but it's not... -->
|
||||
<feature name="pcb" value="NES-TLROM" />
|
||||
<dataarea name="prg" size="524288">
|
||||
<rom name="[es-0122] ya te lu zhan ji (c).prg" size="524288" crc="7696573a" sha1="b88cc75517e9a5f73a26eda6c29de2dfd5a32536" offset="00000" status="baddump" />
|
||||
@ -58271,7 +58138,7 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
|
||||
<info name="alt_title" value="口袋钻石之宠物小精灵2"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="waixing_sgzlz" />
|
||||
<feature name="pcb" value="WAIXING-SGZLZ" /> <!-- mapper 178? -->
|
||||
<feature name="pcb" value="WAIXING-SGZLZ" /> <!-- mapper 178? -->
|
||||
<dataarea name="prg" size="1048576">
|
||||
<rom name="[coolboy] kou dai zuan shi zhi chong wu xiao jing ling 2 (c).prg" size="1048576" crc="925926bc" sha1="41acb3938636bc1f964005aafc54c74c47e27913" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
@ -59737,7 +59604,7 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
|
||||
<feature name="slot" value="cnrom" />
|
||||
<feature name="pcb" value="NES-CNROM" />
|
||||
<feature name="mirroring" value="vertical" />
|
||||
<feature name="peripheral" value="sub_keyboard" /> <!-- Actually it shall use a custom controller, but it works if you control it with this! -->
|
||||
<feature name="peripheral" value="sub_keyboard" /> <!-- Actually it shall use a custom controller, but it works if you control it with this! -->
|
||||
<dataarea name="chr" size="16384">
|
||||
<rom name="bai-bai dino (unl).chr" size="16384" crc="e84dab0a" sha1="fdf8004229f58a9f9ae4a266abd0561980794e7b" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
@ -59798,7 +59665,7 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
|
||||
</software>
|
||||
|
||||
<software name="scche" cloneof="bbcar" supported="partial">
|
||||
<description>Super Car (Chi)</description> <!-- This is not the correct title! -->
|
||||
<description>Super Car (Chi)</description> <!-- This is not the correct title! -->
|
||||
<year>19??</year>
|
||||
<publisher><unknown></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
@ -60136,18 +60003,19 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="dbz4" cloneof="dtc_dbz" supported="partial">
|
||||
<!-- This is an hacked version of the Datach DBZ game, without the need of a barcode reader: you press Select and choose the barcode sequence in game -->
|
||||
<software name="dbz4">
|
||||
<description>Dragon Ball Z IV (Asia)</description>
|
||||
<year>19??</year>
|
||||
<publisher><unknown></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="datach" />
|
||||
<feature name="slot" value="t230" />
|
||||
<feature name="pcb" value="UNL-T-230" />
|
||||
<dataarea name="prg" size="262144">
|
||||
<rom name="dragon ball z iv (unl) [u].prg" size="262144" crc="da25c8c3" sha1="2f367dbaf621ebcffc07df6105650c0db3e1de6c" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
<!-- 8k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="262144">
|
||||
<dataarea name="vram" size="8192">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
@ -60732,7 +60600,7 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
|
||||
<publisher>Subor</publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="txc_commandos" />
|
||||
<feature name="pcb" value="TXC-MXMDHTWO" /> <!-- This was marked as mapper 168, but not the Racermate one. it's not mapper 241 either => new pcb to be emulated, eventually! -->
|
||||
<feature name="pcb" value="TXC-MXMDHTWO" /> <!-- This was marked as mapper 168, but not the Racermate one. it's not mapper 241 either => new pcb to be emulated, eventually! -->
|
||||
<dataarea name="prg" size="1048576">
|
||||
<rom name="[subor] karaoke (c).prg" size="1048576" crc="0a9808ae" sha1="57086cc965ba6828082a7c8c4617093ea6c1434a" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
@ -78470,6 +78338,22 @@ that the real dumps might surface -->
|
||||
</part>
|
||||
</software>
|
||||
|
||||
|
||||
<!-- Romless passthrough cart for the unit containing VRAM + barcode reader + EEPROM + subslot -->
|
||||
<software name="datach">
|
||||
<description>Datach Joint ROM System</description>
|
||||
<year>1988</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="datach" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<!-- This is a fake and unused PRG dataarea to avoid changing the loading routines for the moment-->
|
||||
<dataarea name="prg" size="32768">
|
||||
<rom value="0xff" size="32768" offset="0" loadflag="fill" />
|
||||
</dataarea>
|
||||
<!-- 8k VRAM on cartridge -->
|
||||
<dataarea name="vram" size="8192">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
</softwarelist>
|
||||
|
117
hash/nes_datach.xml
Normal file
117
hash/nes_datach.xml
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
|
||||
<softwarelist name="nes_datach" description="Nintendo Entertainment System - Datach Joint ROM System mini-cartridges">
|
||||
|
||||
<software name="dtc_brsh" supported="partial">
|
||||
<description>Datach - Battle Rush - Build Up Robot Tournament (Jpn)</description>
|
||||
<year>1993</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<info name="serial" value="DATACH-BURT"/>
|
||||
<info name="release" value="19931112"/>
|
||||
<info name="alt_title" value="データック バトルラッシュ"/>
|
||||
<part name="cart" interface="datach_cart">
|
||||
<feature name="slot" value="datach_rom" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<dataarea name="rom" size="262144">
|
||||
<rom name="datach - battle rush - build up robot tournament (japan).prg" size="262144" crc="983d8175" sha1="29cc759d5ca214eefc0cc1c6ce0f8b9111e58124" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="dtc_cray">
|
||||
<description>Datach - Crayon Shin-Chan - Ora to Poi Poi (Jpn)</description>
|
||||
<year>1993</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<info name="serial" value="DATACH-CSOPP"/>
|
||||
<info name="release" value="19930827"/>
|
||||
<info name="alt_title" value="データック クレヨンしんちゃん オラとポイポイ"/>
|
||||
<part name="cart" interface="datach_cart">
|
||||
<feature name="slot" value="datach_rom" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<dataarea name="rom" size="262144">
|
||||
<rom name="datach - crayon shin-chan - ora to poi poi (japan).prg" size="262144" crc="894efdbc" sha1="6f3c65bd945fe13305a7a39d8cd884a5bf314a8f" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="dtc_dbz">
|
||||
<description>Datach - Dragon Ball Z - Gekitou Tenkaichi Budou Kai (Jpn)</description>
|
||||
<year>1992</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<info name="serial" value="DATACH-DBZ"/>
|
||||
<info name="release" value="19921229"/>
|
||||
<info name="alt_title" value="データック ドラゴンボールZ 激闘天下一武道会"/>
|
||||
<part name="cart" interface="datach_cart">
|
||||
<feature name="slot" value="datach_rom" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<dataarea name="rom" size="262144">
|
||||
<rom name="datach - dragon ball z - gekitou tenkaichi budou kai (japan).prg" size="262144" crc="19e81461" sha1="87478b635fefb25fa13c4876e20f505a97426c1b" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="dtc_jltp">
|
||||
<description>Datach - J League Super Top Players (Jpn)</description>
|
||||
<year>1994</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<info name="serial" value="DATACH-STP"/>
|
||||
<info name="release" value="19940422"/>
|
||||
<info name="alt_title" value="データック Jリーグスーパートッププレイヤーズ"/>
|
||||
<part name="cart" interface="datach_cart">
|
||||
<feature name="slot" value="datach_rom" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<dataarea name="rom" size="262144">
|
||||
<rom name="datach - j league super top players (japan).prg" size="262144" crc="be06853f" sha1="b2089533e05fe95814d0d77f2729944cbeb95988" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="dtc_sdgn">
|
||||
<description>Datach - SD Gundam - Gundam Wars (Jpn)</description>
|
||||
<year>1993</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<info name="serial" value="DATACH-SDGW"/>
|
||||
<info name="release" value="19930423"/>
|
||||
<info name="alt_title" value="データック SDガンダム ガンダムウォーズ"/>
|
||||
<part name="cart" interface="datach_cart">
|
||||
<feature name="slot" value="datach_rom" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<dataarea name="rom" size="262144">
|
||||
<rom name="datach - sd gundam - gundam wars (japan).prg" size="262144" crc="0be0a328" sha1="edd7a45a7f27e396b6d686f1861642d509863132" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="dtc_ultr">
|
||||
<description>Datach - Ultraman Club - Supokon Fight! (Jpn)</description>
|
||||
<year>1993</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<info name="serial" value="DATACH-UCSF"/>
|
||||
<info name="release" value="19930423"/>
|
||||
<info name="alt_title" value="データック ウルトラマン倶楽部 スポ根ファイト!"/>
|
||||
<part name="cart" interface="datach_cart">
|
||||
<feature name="slot" value="datach_rom" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<dataarea name="rom" size="262144">
|
||||
<rom name="datach - ultraman club - supokon fight! (japan).prg" size="262144" crc="5b457641" sha1="533170d5eb685231ccd27b9c136ffa4fad68a7b8" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="dtc_yuyu">
|
||||
<description>Datach - Yu Yu Hakusho - Bakutou Ankoku Bujutsu Kai (Jpn)</description>
|
||||
<year>1993</year>
|
||||
<publisher>Bandai</publisher>
|
||||
<info name="serial" value="DATACH-BABK"/>
|
||||
<info name="release" value="19931022"/>
|
||||
<info name="alt_title" value="データック 幽遊白書 爆闘暗黒武術会"/>
|
||||
<part name="cart" interface="datach_cart">
|
||||
<feature name="slot" value="datach_rom" />
|
||||
<feature name="pcb" value="BANDAI-DATACH" />
|
||||
<dataarea name="rom" size="262144">
|
||||
<rom name="datach - yuu yuu hakusho - bakutou ankoku bujutsu kai (japan).prg" size="262144" crc="f51a7f46" sha1="74218aae93e4febfb2284bcf15811453418a2029" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
</softwarelist>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
|
||||
<softwarelist name="nes_ntbrom" description="Nintendo Entertainment System Nantettatte!! Baseball mini-cartridges">
|
||||
<softwarelist name="nes_ntbrom" description="Nintendo Entertainment System - Nantettatte!! Baseball mini-cartridges">
|
||||
|
||||
<software name="ntb_91">
|
||||
<description>Nantettatte!! Baseball '91 Kaimaku Hen (Jpn)</description>
|
||||
|
@ -1070,7 +1070,8 @@ static MACHINE_CONFIG_START( nes, nes_state )
|
||||
|
||||
MCFG_NES_CARTRIDGE_ADD("nes_slot", nes_crt_interface, nes_cart, NULL)
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list", "nes")
|
||||
MCFG_SOFTWARE_LIST_ADD("ntb_list", "nes_ntbrom") // Nantettate Baseball mini_carts
|
||||
MCFG_SOFTWARE_LIST_ADD("ntb_list", "nes_ntbrom") // Sunsoft Nantettate! Baseball mini-carts
|
||||
MCFG_SOFTWARE_LIST_ADD("datach_list", "nes_datach") // Bandai Datach Joint ROM System mini-carts
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( nespal, nes )
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "machine/nes_mmc3.h"
|
||||
#include "machine/nes_mmc5.h"
|
||||
#include "machine/nes_bandai.h"
|
||||
#include "machine/nes_datach.h"
|
||||
#include "machine/nes_discrete.h"
|
||||
#include "machine/nes_event.h"
|
||||
#include "machine/nes_irem.h"
|
||||
|
@ -159,7 +159,7 @@ void nes_state::machine_start()
|
||||
m_ppu->set_latch(ppu2c0x_latch_delegate(FUNC(device_nes_cart_interface::ppu_latch),m_cartslot->m_cart));
|
||||
|
||||
// install additional handlers (read_h, read_ex, write_ex)
|
||||
if (m_cartslot->get_pcb_id() == STD_NROM368 || m_cartslot->get_pcb_id() == GG_NROM || m_cartslot->get_pcb_id() == SUNSOFT_DCS
|
||||
if (m_cartslot->get_pcb_id() == STD_NROM368 || m_cartslot->get_pcb_id() == GG_NROM || m_cartslot->get_pcb_id() == SUNSOFT_DCS || m_cartslot->get_pcb_id() == BANDAI_DATACH
|
||||
|| m_cartslot->get_pcb_id() == AVE_MAXI15 || m_cartslot->get_pcb_id() == KAISER_KS7022 || m_cartslot->get_pcb_id() == KAISER_KS7031 || m_cartslot->get_pcb_id() == BMC_VT5201
|
||||
|| m_cartslot->get_pcb_id() == UNL_LH32 || m_cartslot->get_pcb_id() == UNL_LH10 || m_cartslot->get_pcb_id() == UNL_2708
|
||||
|| m_cartslot->get_pcb_id() == UNL_43272 || m_cartslot->get_pcb_id() == BMC_G63IN1 || m_cartslot->get_pcb_id() == BMC_8157
|
||||
|
@ -14,10 +14,14 @@
|
||||
* Bandai LZ93D50 + 24C01 EEPROM [mapper 159]
|
||||
* Bandai LZ93D50 + 24C02 EEPROM [mapper 16]
|
||||
* Bandai Famicom Jump 2 (aka LZ93D50 + SRAM) [mapper 153]
|
||||
* Bandai LZ93D50 + Datach Barcode reader [mapper 157]
|
||||
* Bandai Karaoke Studio [mapper 188]
|
||||
* Bandai Oeka Kids [mapper 96]
|
||||
|
||||
* Bandai Datach Joint ROM System [mapper 157] is emulated in a separate source file
|
||||
to implement also the subslot, but the PCB is basically a Bandai LZ93D50 + 24C02 EEPROM
|
||||
pcb with added barcode reader and subslot
|
||||
|
||||
|
||||
TODO:
|
||||
- investigate why EEPROM does not work
|
||||
- try to implement some sort of Karaoke emulation
|
||||
@ -52,7 +56,6 @@ const device_type NES_FCG = &device_creator<nes_fcg_device>;
|
||||
const device_type NES_LZ93D50 = &device_creator<nes_lz93d50_device>;
|
||||
const device_type NES_LZ93D50_24C01 = &device_creator<nes_lz93d50_24c01_device>;
|
||||
const device_type NES_LZ93D50_24C02 = &device_creator<nes_lz93d50_24c02_device>;
|
||||
const device_type NES_DATACH = &device_creator<nes_datach_device>;
|
||||
const device_type NES_FJUMP2 = &device_creator<nes_fjump2_device>;
|
||||
|
||||
|
||||
@ -103,12 +106,6 @@ nes_lz93d50_24c02_device::nes_lz93d50_24c02_device(const machine_config &mconfig
|
||||
{
|
||||
}
|
||||
|
||||
nes_datach_device::nes_datach_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: nes_lz93d50_device(mconfig, NES_DATACH, "NES Cart Bandai Datach PCB", tag, owner, clock, "nes_datach", __FILE__),
|
||||
m_reader(*this, "datach")
|
||||
{
|
||||
}
|
||||
|
||||
nes_fjump2_device::nes_fjump2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: nes_lz93d50_device(mconfig, NES_FJUMP2, "NES Cart Bandai Famicom Jump II PCB", tag, owner, clock, "nes_fjump2", __FILE__)
|
||||
{
|
||||
@ -191,31 +188,6 @@ void nes_lz93d50_24c01_device::pcb_reset()
|
||||
m_i2c_dir = 0;
|
||||
}
|
||||
|
||||
void nes_datach_device::device_start()
|
||||
{
|
||||
common_start();
|
||||
irq_timer = timer_alloc(TIMER_IRQ);
|
||||
serial_timer = timer_alloc(TIMER_SERIAL);
|
||||
irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1));
|
||||
serial_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1000));
|
||||
|
||||
save_item(NAME(m_irq_enable));
|
||||
save_item(NAME(m_irq_count));
|
||||
save_item(NAME(m_datach_latch));
|
||||
}
|
||||
|
||||
void nes_datach_device::pcb_reset()
|
||||
{
|
||||
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
|
||||
prg16_89ab(0);
|
||||
prg16_cdef(m_prg_chunks - 1);
|
||||
chr8(0, m_chr_source);
|
||||
|
||||
m_irq_enable = 0;
|
||||
m_irq_count = 0;
|
||||
m_datach_latch = 0;
|
||||
}
|
||||
|
||||
void nes_fjump2_device::device_start()
|
||||
{
|
||||
common_start();
|
||||
@ -470,7 +442,6 @@ machine_config_constructor nes_lz93d50_24c01_device::device_mconfig_additions()
|
||||
}
|
||||
|
||||
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( bandai_i2c_24c02 )
|
||||
MCFG_24C02_ADD("i2cmem")
|
||||
MACHINE_CONFIG_END
|
||||
@ -543,99 +514,3 @@ WRITE8_MEMBER(nes_fjump2_device::write_h)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
Bandai LZ93D50 + Datach barcode reader emulation
|
||||
|
||||
Games: Datach Games
|
||||
|
||||
iNES: mappers 157
|
||||
|
||||
In MESS: Supported
|
||||
|
||||
TODO: Datach carts should actually be handled
|
||||
separately! Original carts were minicarts to be
|
||||
inserted in a smaller slot of the Barcode reader
|
||||
FC cart. The Barcode reader acts as a passthrough
|
||||
but it has no internal ROM (it does not work if
|
||||
you don't have any minicart inserted)
|
||||
|
||||
TODO2: This class should be derived from the
|
||||
LZ93D50 + X24C02 class, since the main board
|
||||
has this EEPROM. Moreover, Datach - Battle Rush
|
||||
has a second X24C01 EEPROM that we don't emulate yet...
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
|
||||
void nes_datach_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||
{
|
||||
if (id == TIMER_IRQ)
|
||||
{
|
||||
if (m_irq_enable)
|
||||
{
|
||||
// 16bit counter, IRQ fired when the counter goes from 1 to 0
|
||||
// after firing, the counter is *not* reloaded, but next clock
|
||||
// counter wraps around from 0 to 0xffff
|
||||
if (!m_irq_count)
|
||||
m_irq_count = 0xffff;
|
||||
else
|
||||
m_irq_count--;
|
||||
|
||||
if (!m_irq_count)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
|
||||
m_irq_enable = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (id == TIMER_SERIAL)
|
||||
{
|
||||
m_datach_latch = (m_reader->read_pixel() << 3);
|
||||
}
|
||||
}
|
||||
|
||||
READ8_MEMBER(nes_datach_device::read_m)
|
||||
{
|
||||
LOG_MMC(("Datach read_m, offset: %04x\n", offset));
|
||||
return m_datach_latch;
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(nes_datach_device::write_h)
|
||||
{
|
||||
LOG_MMC(("Datach write_h, offset: %04x, data: %02x\n", offset, data));
|
||||
|
||||
switch (offset & 0x0f)
|
||||
{
|
||||
case 0: case 1: case 2: case 3:
|
||||
case 4: case 5: case 6: case 7:
|
||||
// these don't switch CHR bank, but are SCL output
|
||||
// of the oncart I2C EEPROM!
|
||||
break;
|
||||
case 0x0d:
|
||||
// these should go to the I2C EEPROM on the Datach base
|
||||
// but SDA line is shared with the oncart I2C EEPROM if
|
||||
// there is one (only in Datach - Battle Rush )
|
||||
break;
|
||||
default:
|
||||
fcg_write(space, offset & 0x0f, data, mem_mask);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// BARCODE READER DEVICE
|
||||
//-------------------------------------------------
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( bandai_datach )
|
||||
MCFG_BARCODE_READER_ADD("datach")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor nes_datach_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( bandai_datach );
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include "machine/nes_nxrom.h"
|
||||
#include "machine/i2cmem.h"
|
||||
#include "machine/bcreader.h"
|
||||
|
||||
|
||||
// ======================> nes_karaokestudio_device
|
||||
@ -125,32 +124,6 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// ======================> nes_datach_device
|
||||
|
||||
class nes_datach_device : public nes_lz93d50_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_datach_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
virtual DECLARE_READ8_MEMBER(read_m);
|
||||
virtual DECLARE_WRITE8_MEMBER(write_h);
|
||||
|
||||
virtual void pcb_reset();
|
||||
|
||||
protected:
|
||||
UINT8 m_datach_latch;
|
||||
required_device<barcode_reader_device> m_reader;
|
||||
|
||||
static const device_timer_id TIMER_SERIAL = 1;
|
||||
emu_timer *serial_timer;
|
||||
};
|
||||
|
||||
|
||||
// ======================> nes_fjump2_device
|
||||
|
||||
class nes_fjump2_device : public nes_lz93d50_device
|
||||
@ -180,7 +153,6 @@ extern const device_type NES_FCG;
|
||||
extern const device_type NES_LZ93D50;
|
||||
extern const device_type NES_LZ93D50_24C01;
|
||||
extern const device_type NES_LZ93D50_24C02;
|
||||
extern const device_type NES_DATACH;
|
||||
extern const device_type NES_FJUMP2;
|
||||
|
||||
#endif
|
||||
|
356
src/mess/machine/nes_datach.c
Normal file
356
src/mess/machine/nes_datach.c
Normal file
@ -0,0 +1,356 @@
|
||||
/***********************************************************************************************************
|
||||
|
||||
|
||||
NES/Famicom cartridge emulation for Bandai Datach PCBs
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
||||
|
||||
Here we emulate the Bandai Datach Joint ROM System [mapper 157].
|
||||
The base unit features: a Bandai LZ93D50 + 24C02 EEPROM PCB
|
||||
+ barcode reader + subslot for PRG cart
|
||||
|
||||
|
||||
***********************************************************************************************************/
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/nes_datach.h"
|
||||
#include "cpu/m6502/m6502.h"
|
||||
|
||||
#ifdef NES_PCB_DEBUG
|
||||
#define VERBOSE 1
|
||||
#else
|
||||
#define VERBOSE 0
|
||||
#endif
|
||||
|
||||
#define LOG_MMC(x) do { if (VERBOSE) logerror x; } while (0)
|
||||
|
||||
|
||||
//--------------------------------
|
||||
//
|
||||
// Datach Cartslot implementation
|
||||
//
|
||||
//--------------------------------
|
||||
|
||||
//-------------------------------------------------
|
||||
// sub-cart interface
|
||||
//-------------------------------------------------
|
||||
|
||||
datach_cart_interface::datach_cart_interface(const machine_config &mconfig, device_t &device)
|
||||
: device_slot_card_interface(mconfig, device),
|
||||
m_rom(NULL),
|
||||
m_rom_size(0)
|
||||
{
|
||||
}
|
||||
|
||||
datach_cart_interface::~datach_cart_interface()
|
||||
{
|
||||
}
|
||||
|
||||
READ8_MEMBER(datach_cart_interface::read)
|
||||
{
|
||||
if (offset < 0x4000)
|
||||
return m_rom[(m_bank * 0x4000) + (offset & 0x3fff)];
|
||||
else
|
||||
return m_rom[(0x0f * 0x4000) + (offset & 0x3fff)];
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// sub-cart slot device
|
||||
//-------------------------------------------------
|
||||
|
||||
const device_type NES_DATACH_SLOT = &device_creator<nes_datach_slot_device>;
|
||||
|
||||
nes_datach_slot_device::nes_datach_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, NES_DATACH_SLOT, "NES Datach Cartridge Slot", tag, owner, clock, "nes_datach_slot", __FILE__),
|
||||
device_image_interface(mconfig, *this),
|
||||
device_slot_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
nes_datach_slot_device::~nes_datach_slot_device()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void nes_datach_slot_device::device_start()
|
||||
{
|
||||
m_cart = dynamic_cast<datach_cart_interface *>(get_card_device());
|
||||
}
|
||||
|
||||
READ8_MEMBER(nes_datach_slot_device::read)
|
||||
{
|
||||
if (m_cart)
|
||||
return m_cart->read(space, offset, mem_mask);
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
bool nes_datach_slot_device::call_load()
|
||||
{
|
||||
if (m_cart)
|
||||
{
|
||||
UINT8 *ROM = m_cart->get_cart_base();
|
||||
|
||||
if (!ROM)
|
||||
return IMAGE_INIT_FAIL;
|
||||
|
||||
// Existing Datach carts are all 256K, so we only load files of this size
|
||||
if (software_entry() == NULL)
|
||||
{
|
||||
if (length() != 0x40000 && length() != 0x40010)
|
||||
return IMAGE_INIT_FAIL;
|
||||
|
||||
int shift = length() - 0x40000;
|
||||
UINT8 temp[0x40010];
|
||||
fread(&temp, length());
|
||||
memcpy(ROM, temp + shift, 0x40000);
|
||||
|
||||
// double check that iNES files are really mapper 157
|
||||
// (or 16, since some older .nes files marked Datach as mapper 16)
|
||||
if (length() == 0x40010)
|
||||
{
|
||||
UINT8 mapper = (temp[6] & 0xf0) >> 4;
|
||||
mapper |= temp[7] & 0xf0;
|
||||
if (mapper != 157 && mapper != 16)
|
||||
{
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (get_software_region_length("rom") != 0x40000)
|
||||
return IMAGE_INIT_FAIL;
|
||||
|
||||
memcpy(ROM, get_software_region("rom"), 0x40000);
|
||||
}
|
||||
}
|
||||
|
||||
return IMAGE_INIT_PASS;
|
||||
}
|
||||
|
||||
|
||||
bool nes_datach_slot_device::call_softlist_load(char *swlist, char *swname, rom_entry *start_entry)
|
||||
{
|
||||
load_software_part_region(this, swlist, swname, start_entry );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
const char * nes_datach_slot_device::get_default_card_software(const machine_config &config, emu_options &options)
|
||||
{
|
||||
return software_get_default_slot(config, options, this, "datach_rom");
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------
|
||||
//
|
||||
// Datach Minicart implementation
|
||||
//
|
||||
//--------------------------------
|
||||
|
||||
ROM_START( datach_rom )
|
||||
ROM_REGION(0x40000, "datachrom", ROMREGION_ERASEFF)
|
||||
ROM_END
|
||||
|
||||
const device_type NES_DATACH_ROM = &device_creator<nes_datach_rom_device>;
|
||||
|
||||
nes_datach_rom_device::nes_datach_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, NES_DATACH_ROM, "NES Datach ROM", tag, owner, clock, "nes_datach_rom", __FILE__),
|
||||
datach_cart_interface( mconfig, *this )
|
||||
{
|
||||
}
|
||||
|
||||
void nes_datach_rom_device::device_start()
|
||||
{
|
||||
m_rom = (UINT8*)memregion("datachrom")->base();
|
||||
save_item(NAME(m_bank));
|
||||
}
|
||||
|
||||
void nes_datach_rom_device::device_reset()
|
||||
{
|
||||
m_bank = 0;
|
||||
}
|
||||
|
||||
const rom_entry *nes_datach_rom_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( datach_rom );
|
||||
}
|
||||
|
||||
UINT8 *nes_datach_rom_device::get_cart_base()
|
||||
{
|
||||
return m_rom;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------
|
||||
//
|
||||
// Datach Base Unit implementation
|
||||
//
|
||||
//---------------------------------
|
||||
|
||||
const device_type NES_DATACH = &device_creator<nes_datach_device>;
|
||||
|
||||
|
||||
nes_datach_device::nes_datach_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: nes_lz93d50_device(mconfig, NES_DATACH, "NES Cart Bandai Datach PCB", tag, owner, clock, "nes_datach", __FILE__),
|
||||
m_i2cmem(*this, "i2cmem"),
|
||||
m_reader(*this, "datach"),
|
||||
m_subslot(*this, "datach_slot")
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void nes_datach_device::device_start()
|
||||
{
|
||||
common_start();
|
||||
irq_timer = timer_alloc(TIMER_IRQ);
|
||||
serial_timer = timer_alloc(TIMER_SERIAL);
|
||||
irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1));
|
||||
serial_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1000));
|
||||
|
||||
save_item(NAME(m_irq_enable));
|
||||
save_item(NAME(m_irq_count));
|
||||
save_item(NAME(m_datach_latch));
|
||||
}
|
||||
|
||||
void nes_datach_device::pcb_reset()
|
||||
{
|
||||
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
|
||||
prg16_89ab(0);
|
||||
prg16_cdef(m_prg_chunks - 1);
|
||||
chr8(0, m_chr_source);
|
||||
|
||||
m_irq_enable = 0;
|
||||
m_irq_count = 0;
|
||||
m_datach_latch = 0;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
mapper specific handlers
|
||||
-------------------------------------------------*/
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
Bandai LZ93D50 + Datach barcode reader emulation
|
||||
|
||||
Games: Datach Games
|
||||
|
||||
iNES: mappers 157
|
||||
|
||||
In MESS: Supported
|
||||
|
||||
TODO: Datach carts should actually be handled
|
||||
separately! Original carts were minicarts to be
|
||||
inserted in a smaller slot of the Barcode reader
|
||||
FC cart. The Barcode reader acts as a passthrough
|
||||
but it has no internal ROM (it does not work if
|
||||
you don't have any minicart inserted)
|
||||
|
||||
TODO2: This class should be derived from the
|
||||
LZ93D50 + X24C02 class, since the main board
|
||||
has this EEPROM. Moreover, Datach - Battle Rush
|
||||
has a second X24C01 EEPROM that we don't emulate yet...
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
|
||||
READ8_MEMBER(nes_datach_device::read_m)
|
||||
{
|
||||
LOG_MMC(("Datach read_m, offset: %04x\n", offset));
|
||||
return m_datach_latch;
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(nes_datach_device::read_h)
|
||||
{
|
||||
LOG_MMC(("Datach read_h, offset: %04x\n", offset));
|
||||
// this shall be the proper code, but it's a bit slower, so we access directly the subcart below
|
||||
//return m_subslot->read(space, offset, mem_mask);
|
||||
|
||||
if (m_subslot->m_cart)
|
||||
return m_subslot->m_cart->read(space, offset, mem_mask);
|
||||
else // this is "fake" in the sense that we fill CPU space with 0xff if no Datach cart is loaded
|
||||
return hi_access_rom(offset);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(nes_datach_device::write_h)
|
||||
{
|
||||
LOG_MMC(("Datach write_h, offset: %04x, data: %02x\n", offset, data));
|
||||
|
||||
switch (offset & 0x0f)
|
||||
{
|
||||
case 0: case 1: case 2: case 3:
|
||||
case 4: case 5: case 6: case 7:
|
||||
// these don't switch CHR bank, but are SCL output
|
||||
// of the oncart I2C EEPROM!
|
||||
break;
|
||||
case 0x08:
|
||||
m_subslot->write_prg_bank(data & 0x0f);
|
||||
break;
|
||||
case 0x0d:
|
||||
// these should go to the I2C EEPROM on the Datach base
|
||||
// but SDA line is shared with the oncart I2C EEPROM if
|
||||
// there is one (only in Datach - Battle Rush)
|
||||
break;
|
||||
default:
|
||||
fcg_write(space, offset & 0x0f, data, mem_mask);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// BARCODE READER + CART SLOT + X24C02
|
||||
//-------------------------------------------------
|
||||
|
||||
static SLOT_INTERFACE_START(datach_cart)
|
||||
SLOT_INTERFACE("datach_rom", NES_DATACH_ROM)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_FRAGMENT( bandai_datach )
|
||||
MCFG_BARCODE_READER_ADD("datach")
|
||||
MCFG_DATACH_MINICART_ADD("datach_slot", datach_cart)
|
||||
MCFG_24C02_ADD("i2cmem")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor nes_datach_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( bandai_datach );
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_timer - handler timer events
|
||||
//-------------------------------------------------
|
||||
|
||||
void nes_datach_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||
{
|
||||
if (id == TIMER_IRQ)
|
||||
{
|
||||
if (m_irq_enable)
|
||||
{
|
||||
// 16bit counter, IRQ fired when the counter goes from 1 to 0
|
||||
// after firing, the counter is *not* reloaded, but next clock
|
||||
// counter wraps around from 0 to 0xffff
|
||||
if (!m_irq_count)
|
||||
m_irq_count = 0xffff;
|
||||
else
|
||||
m_irq_count--;
|
||||
|
||||
if (!m_irq_count)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
|
||||
m_irq_enable = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (id == TIMER_SERIAL)
|
||||
{
|
||||
m_datach_latch = (m_reader->read_pixel() << 3);
|
||||
}
|
||||
}
|
152
src/mess/machine/nes_datach.h
Normal file
152
src/mess/machine/nes_datach.h
Normal file
@ -0,0 +1,152 @@
|
||||
#ifndef __NES_DATACH_H
|
||||
#define __NES_DATACH_H
|
||||
|
||||
#include "machine/nes_bandai.h"
|
||||
#include "machine/i2cmem.h"
|
||||
#include "machine/bcreader.h"
|
||||
|
||||
//--------------------------------
|
||||
//
|
||||
// Datach Cartslot implementation
|
||||
//
|
||||
//--------------------------------
|
||||
|
||||
// ======================> datach_cart_interface
|
||||
|
||||
class datach_cart_interface : public device_slot_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
datach_cart_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual ~datach_cart_interface();
|
||||
|
||||
// reading and writing
|
||||
virtual DECLARE_READ8_MEMBER(read);
|
||||
|
||||
UINT8 *get_cart_base() { return m_rom; }
|
||||
void write_prg_bank(UINT8 bank) { m_bank = bank; }
|
||||
|
||||
protected:
|
||||
// internal state
|
||||
UINT8 *m_rom;
|
||||
UINT32 m_rom_size;
|
||||
// ROM is accessed via two 16K banks, but only the first one can be switched
|
||||
UINT8 m_bank;
|
||||
};
|
||||
|
||||
// ======================> nes_datach_slot_device
|
||||
|
||||
class nes_datach_slot_device : public device_t,
|
||||
public device_image_interface,
|
||||
public device_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_datach_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~nes_datach_slot_device();
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_config_complete() { update_names(); }
|
||||
|
||||
// image-level overrides
|
||||
virtual bool call_load();
|
||||
virtual bool call_softlist_load(char *swlist, char *swname, rom_entry *start_entry);
|
||||
|
||||
virtual iodevice_t image_type() const { return IO_CARTSLOT; }
|
||||
virtual bool is_readable() const { return 1; }
|
||||
virtual bool is_writeable() const { return 0; }
|
||||
virtual bool is_creatable() const { return 0; }
|
||||
virtual bool must_be_loaded() const { return 0; }
|
||||
virtual bool is_reset_on_load() const { return 1; }
|
||||
virtual const char *image_interface() const { return "datach_cart"; }
|
||||
virtual const char *file_extensions() const { return "nes,bin"; }
|
||||
virtual const option_guide *create_option_guide() const { return NULL; }
|
||||
|
||||
// slot interface overrides
|
||||
virtual const char * get_default_card_software(const machine_config &config, emu_options &options);
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(read);
|
||||
void write_prg_bank(UINT8 bank) { if (m_cart) m_cart->write_prg_bank(bank); }
|
||||
|
||||
datach_cart_interface* m_cart;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type NES_DATACH_SLOT;
|
||||
|
||||
|
||||
#define MCFG_DATACH_MINICART_ADD(_tag, _slot_intf) \
|
||||
MCFG_DEVICE_ADD(_tag, NES_DATACH_SLOT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, NULL, false)
|
||||
|
||||
|
||||
//--------------------------------
|
||||
//
|
||||
// Datach Minicart implementation
|
||||
//
|
||||
//--------------------------------
|
||||
|
||||
// ======================> nes_datach_rom_device
|
||||
|
||||
class nes_datach_rom_device : public device_t,
|
||||
public datach_cart_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_datach_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
virtual UINT8* get_cart_base();
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type NES_DATACH_ROM;
|
||||
|
||||
|
||||
//---------------------------------
|
||||
//
|
||||
// Datach Base Unit implementation
|
||||
//
|
||||
//---------------------------------
|
||||
|
||||
// ======================> nes_datach_device
|
||||
|
||||
class nes_datach_device : public nes_lz93d50_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_datach_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
virtual DECLARE_READ8_MEMBER(read_m);
|
||||
virtual DECLARE_READ8_MEMBER(read_h);
|
||||
virtual DECLARE_WRITE8_MEMBER(write_h);
|
||||
|
||||
virtual void pcb_reset();
|
||||
|
||||
protected:
|
||||
UINT8 m_datach_latch;
|
||||
required_device<i2cmem_device> m_i2cmem;
|
||||
required_device<barcode_reader_device> m_reader;
|
||||
required_device<nes_datach_slot_device> m_subslot;
|
||||
UINT8 m_i2c_dir;
|
||||
|
||||
static const device_timer_id TIMER_SERIAL = 1;
|
||||
emu_timer *serial_timer;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type NES_DATACH;
|
||||
|
||||
#endif
|
@ -25,8 +25,14 @@
|
||||
#define LOG_MMC(x) do { if (VERBOSE) logerror x; } while (0)
|
||||
|
||||
|
||||
//-----------------------------------------------
|
||||
//
|
||||
// Nantettate!! Baseball Cartslot implementation
|
||||
//
|
||||
//-----------------------------------------------
|
||||
|
||||
//-------------------------------------------------
|
||||
// sub-cart device
|
||||
// sub-cart interface
|
||||
//-------------------------------------------------
|
||||
|
||||
ntb_cart_interface::ntb_cart_interface(const machine_config &mconfig, device_t &device)
|
||||
@ -112,9 +118,11 @@ const char * nes_ntb_slot_device::get_default_card_software(const machine_config
|
||||
return software_get_default_slot(config, options, this, "ntbrom");
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// NTB ROM device
|
||||
//-------------------------------------------------
|
||||
//-----------------------------------------------
|
||||
//
|
||||
// Nantettate!! Baseball Minicart implementation
|
||||
//
|
||||
//-----------------------------------------------
|
||||
|
||||
ROM_START( ntb_rom )
|
||||
ROM_REGION(0x8000, "ntbrom", ROMREGION_ERASEFF)
|
||||
@ -143,9 +151,15 @@ UINT8 *nes_ntb_rom_device::get_cart_base()
|
||||
return m_rom;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
//
|
||||
// Nantettate!! Baseball base cart implementation
|
||||
// a.k.a. Sunsoft Dual Cassette System
|
||||
// (variant of Sunsoft-4 PCB)
|
||||
//
|
||||
//------------------------------------------------
|
||||
|
||||
const device_type NES_SUNSOFT_DCS = &device_creator<nes_sunsoft_dcs_device>;
|
||||
|
||||
|
@ -4,6 +4,12 @@
|
||||
#include "machine/nes_sunsoft.h"
|
||||
|
||||
|
||||
//-----------------------------------------------
|
||||
//
|
||||
// Nantettate!! Baseball Cartslot implementation
|
||||
//
|
||||
//-----------------------------------------------
|
||||
|
||||
// ======================> ntb_cart_interface
|
||||
|
||||
class ntb_cart_interface : public device_slot_card_interface
|
||||
@ -65,18 +71,16 @@ public:
|
||||
extern const device_type NES_NTB_SLOT;
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
DEVICE CONFIGURATION MACROS
|
||||
***************************************************************************/
|
||||
|
||||
#define MCFG_NTB_MINICART_ADD(_tag, _slot_intf) \
|
||||
MCFG_DEVICE_ADD(_tag, NES_NTB_SLOT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, NULL, false)
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
//-----------------------------------------------
|
||||
//
|
||||
// Nantettate!! Baseball Minicart implementation
|
||||
//
|
||||
//-----------------------------------------------
|
||||
|
||||
// ======================> nes_ntb_rom_device
|
||||
|
||||
@ -101,6 +105,14 @@ extern const device_type NES_NTB_ROM;
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
//
|
||||
// Nantettate!! Baseball base cart implementation
|
||||
// a.k.a. Sunsoft Dual Cassette System
|
||||
// (variant of Sunsoft-4 PCB)
|
||||
//
|
||||
//------------------------------------------------
|
||||
|
||||
// ======================> nes_sunsoft_dcs_device
|
||||
|
||||
class nes_sunsoft_dcs_device : public nes_sunsoft_4_device
|
||||
|
@ -1543,6 +1543,7 @@ $(MESSOBJ)/nintendo.a: \
|
||||
$(MESS_MACHINE)/nes_camerica.o \
|
||||
$(MESS_MACHINE)/nes_cne.o \
|
||||
$(MESS_MACHINE)/nes_cony.o \
|
||||
$(MESS_MACHINE)/nes_datach.o \
|
||||
$(MESS_MACHINE)/nes_discrete.o \
|
||||
$(MESS_MACHINE)/nes_event.o \
|
||||
$(MESS_MACHINE)/nes_ggenie.o \
|
||||
|
Loading…
Reference in New Issue
Block a user