diff options
| author | 2014-02-21 12:09:38 +0000 | |
|---|---|---|
| committer | 2014-02-21 12:09:38 +0000 | |
| commit | b40ea2dac45ee03c6f218a096f1cced1a0ed4e6f (patch) | |
| tree | 218bfce56eae00b2c7e0fe4136c15fda1c82b33e | |
| parent | 88afb1b6afae27f79c40c97ee43bbe213ae4ed37 (diff) | |
(MESS) nes: properly implemented Aladdin Deck Enhancer as a
pass-through cart. Correct syntax to launch e.g. Dizzy The Adventurer
is now "mess nes -cart ade -cart2 dizzyadv". Moved Aladdin minicart
dumps to a separate softlist (but you can load in -cart2 iNES files from
fullpath, if you like) [Fabio Priuli]
nes_camerica: simplified emulation of the BF9096 board and fixed
emulation of GoldenFive board (used by the Polish Pegasus 5 in 1
cart). [Fabio Priuli]
out of whatsnew: this commit completes the recent work about emulating properly the
different pass-through NES/Famicom devices and their corresponding mini-carts...
there should be no more games requiring non-standard syntax to be launched.
| -rw-r--r-- | .gitattributes | 3 | ||||
| -rw-r--r-- | hash/nes.xml | 135 | ||||
| -rw-r--r-- | hash/nes_ade.xml | 102 | ||||
| -rw-r--r-- | hash/nes_ntbrom.xml | 6 | ||||
| -rw-r--r-- | src/mess/drivers/nes.c | 2 | ||||
| -rw-r--r-- | src/mess/includes/nes.h | 1 | ||||
| -rw-r--r-- | src/mess/machine/nes.c | 2 | ||||
| -rw-r--r-- | src/mess/machine/nes_aladdin.c | 341 | ||||
| -rw-r--r-- | src/mess/machine/nes_aladdin.h | 165 | ||||
| -rw-r--r-- | src/mess/machine/nes_camerica.c | 60 | ||||
| -rw-r--r-- | src/mess/machine/nes_camerica.h | 5 | ||||
| -rw-r--r-- | src/mess/machine/nes_datach.c | 5 | ||||
| -rw-r--r-- | src/mess/machine/nes_datach.h | 1 | ||||
| -rw-r--r-- | src/mess/machine/nes_karastudio.c | 3 | ||||
| -rw-r--r-- | src/mess/machine/nes_karastudio.h | 1 | ||||
| -rw-r--r-- | src/mess/machine/nes_pcb.inc | 1 | ||||
| -rw-r--r-- | src/mess/machine/nes_slot.h | 2 | ||||
| -rw-r--r-- | src/mess/machine/nes_sunsoft_dcs.c | 13 | ||||
| -rw-r--r-- | src/mess/machine/nes_sunsoft_dcs.h | 3 | ||||
| -rw-r--r-- | src/mess/mess.mak | 1 |
20 files changed, 708 insertions, 144 deletions
diff --git a/.gitattributes b/.gitattributes index fe03ae78f02..22777cf8e15 100644 --- a/.gitattributes +++ b/.gitattributes @@ -183,6 +183,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_ade.xml svneol=native#text/xml hash/nes_datach.xml svneol=native#text/xml hash/nes_kstudio.xml svneol=native#text/xml hash/nes_ntbrom.xml svneol=native#text/xml @@ -8178,6 +8179,8 @@ src/mess/machine/ne2000.h svneol=native#text/plain src/mess/machine/nes.c svneol=native#text/plain src/mess/machine/nes_act53.c svneol=native#text/plain src/mess/machine/nes_act53.h svneol=native#text/plain +src/mess/machine/nes_aladdin.c svneol=native#text/plain +src/mess/machine/nes_aladdin.h svneol=native#text/plain src/mess/machine/nes_ave.c svneol=native#text/plain src/mess/machine/nes_ave.h svneol=native#text/plain src/mess/machine/nes_bandai.c svneol=native#text/plain diff --git a/hash/nes.xml b/hash/nes.xml index ef06a39fa86..d351c0e12db 100644 --- a/hash/nes.xml +++ b/hash/nes.xml @@ -4084,15 +4084,14 @@ </software> <software name="bignfo"> - <description>Big Nose Freaks Out (Aladdin Deck Enhancer & regular cart) (USA)</description> + <description>Big Nose Freaks Out (USA)</description> <year>1992</year> <publisher>Camerica</publisher> - <info name="serial" value="COBIC-7413-BFO-ALGN"/> + <info name="serial" value="CAM-BFO"/> <part name="cart" interface="nes_cart"> <feature name="slot" value="bf9093" /> - <feature name="pcb" value="CAMERICA-ALGN" /> <!-- also found with CAMERICA-BF9093 pcb --> + <feature name="pcb" value="CAMERICA-BF9093" /> <feature name="mirroring" value="vertical" /> - <feature name="peripheral" value="aladdin" /> <dataarea name="prg" size="262144"> <rom name="icros7413bfo" size="262144" crc="ccdcbfc6" sha1="00dfb78ac0e10f46bede9850636e2f3c6a305858" offset="00000" /> </dataarea> @@ -8544,25 +8543,6 @@ </part> </software> - <software name="dizzyadv"> - <description>Dizzy The Adventurer (Aladdin Deck Enhancer) (USA)</description> - <year>1991</year> - <publisher>Camerica</publisher> - <info name="serial" value="COBIC-74xx-DA-ALGN"/> - <part name="cart" interface="nes_cart"> - <feature name="slot" value="bf9093" /> - <feature name="pcb" value="CAMERICA-ALGN" /> - <feature name="mirroring" value="vertical" /> - <feature name="peripheral" value="aladdin" /> - <dataarea name="prg" size="131072"> - <rom name="dizzy the adventurer daca7d" size="131072" crc="db99d0cb" sha1="5a4ef3b2f5880d3b4609ae4f3381d688b3a02cac" offset="00000" /> - </dataarea> - <!-- 8k VRAM on cartridge --> - <dataarea name="vram" size="8192"> - </dataarea> - </part> - </software> - <software name="dokiyuen" cloneof="trollscl"> <description>Doki! Doki! Yuuenchi - Crazyland Daisakusen (Jpn)</description> <year>1991</year> @@ -12076,11 +12056,11 @@ </part> </software> - <software name="advdizzy"> + <software name="fntdizzy"> <description>The Fantastic Adventures of Dizzy (USA)</description> <year>1991</year> <publisher>Camerica</publisher> - <info name="serial" value="COBIC-7404-DZ"/> + <info name="serial" value="CAM-DZ"/> <part name="cart" interface="nes_cart"> <feature name="slot" value="bf9093" /> <feature name="pcb" value="CAMERICA-BF9093" /> @@ -12094,28 +12074,6 @@ </part> </software> - <software name="advdizzya" cloneof="advdizzy"> - <description>The Fantastic Adventures of Dizzy (Aladdin Deck Enhancer) (USA)</description> - <year>1991</year> - <publisher>Camerica</publisher> - <info name="serial" value="COBIC-7404-DZ"/> - <part name="cart" interface="nes_cart"> - <feature name="slot" value="bf9093" /> - <feature name="pcb" value="CAMERICA-ALGN" /> - <feature name="mirroring" value="vertical" /> - <feature name="peripheral" value="aladdin" /> - <dataarea name="prg" size="262144"> - <rom name="fantastic adv of dizzy dz7a47" size="262144" crc="f732c8fd" sha1="102bd0c46c5718c979eb1ac387dade6f6eb70ee4" offset="00000" /> - </dataarea> - <!-- 8k VRAM on cartridge --> - <dataarea name="vram" size="8192"> - </dataarea> - <!-- 8k VRAM on cartridge --> - <dataarea name="vram2" size="8192"> - </dataarea> - </part> - </software> - <software name="fantzonej" cloneof="fantzone"> <description>Fantasy Zone (Jpn)</description> <year>1987</year> @@ -21363,16 +21321,15 @@ </part> </software> - <software name="linuscc"> - <description>Linus Spacehead's Cosmic Crusade (Aladdin Deck Enhancer & regular cart) (USA)</description> + <software name="linuscc" cloneof="cosmic"> + <description>Linus Spacehead's Cosmic Crusade (USA)</description> <year>1992</year> <publisher>Camerica</publisher> <info name="serial" value="COBIC-7415-LN-ALGN"/> <part name="cart" interface="nes_cart"> <feature name="slot" value="bf9093" /> - <feature name="pcb" value="CAMERICA-ALGN" /> <!-- also found with CAMERICA-BF9093 pcb --> + <feature name="pcb" value="CAMERICA-BF9093" /> <feature name="mirroring" value="vertical" /> - <feature name="peripheral" value="aladdin" /> <dataarea name="prg" size="262144"> <rom name="icros74151-ln" size="262144" crc="9e379698" sha1="52621d0e0782cd94b588b50860a6de3da94f2e63" offset="00000" /> </dataarea> @@ -24088,33 +24045,6 @@ </part> </software> - <software name="micromacua" cloneof="micromac"> - <description>Micro Machines (Aladdin Deck Enhancer) (USA)</description> - <year>1992</year> - <publisher>Camerica</publisher> - <info name="serial" value="COBIC-7403-MM"/> - <part name="cart" interface="nes_cart"> - <feature name="slot" value="bf9093" /> - <feature name="pcb" value="CAMERICA-ALGN" /> - <feature name="peripheral" value="aladdin" /> - <feature name="pcb_model" value="ALGNV1-1" /> - <feature name="u1_cart" value="U1 PRG" /> - <feature name="u1_aladdin" value="U1 VRAM" /> - <feature name="u2_aladdin" value="U2 CIC" /> - <feature name="u3_aladdin" value="U3 MMC" /> - <feature name="mirroring" value="vertical" /> - <dataarea name="prg" size="262144"> - <rom name="micro machine mmd27f.u1" size="262144" crc="24ba12dd" sha1="c7fd43041fc139dc8440c95c28a0115dc79e2691" offset="00000" /> - </dataarea> - <!-- 8k VRAM on cartridge --> - <dataarea name="vram" size="8192"> - </dataarea> - <!-- 8k VRAM on cartridge --> - <dataarea name="vram2" size="8192"> - </dataarea> - </part> - </software> - <software name="mightmagj" cloneof="mightmag"> <description>Might and Magic - Book One - Secret of the Inner Sanctum (Jpn)</description> <year>1990</year> @@ -29166,15 +29096,14 @@ </software> <software name="quatradv"> - <description>Quattro Adventure (Aladdin Deck Enhancer & regular cart) (USA)</description> + <description>Quattro Adventure (USA)</description> <year>1991</year> <publisher>Camerica</publisher> - <info name="serial" value="COBIC-7406-QA-ALGQ"/> + <info name="serial" value="CAM-QA"/> <part name="cart" interface="nes_cart"> <feature name="slot" value="bf9096" /> - <feature name="pcb" value="CAMERICA-ALGQ" /> <!-- also found with CAMERICA-BF9096 pcb --> + <feature name="pcb" value="CAMERICA-BF9096" /> <feature name="mirroring" value="vertical" /> - <feature name="peripheral" value="aladdin" /> <dataarea name="prg" size="262144"> <rom name="cobic 7406 qa" size="262144" crc="b89888c9" sha1="06990c8573128e5548c5dcd39479fabf67234926" offset="00000" /> </dataarea> @@ -29188,7 +29117,7 @@ <description>Quattro Arcade (USA)</description> <year>1992</year> <publisher>Camerica</publisher> - <info name="serial" value="COBIC-74xx-QR"/> + <info name="serial" value="CAM-QR"/> <part name="cart" interface="nes_cart"> <feature name="slot" value="bf9096" /> <feature name="pcb" value="CAMERICA-BF9096" /> @@ -29203,17 +29132,16 @@ </software> <software name="quatrspt" cloneof="supsport"> - <description>Quattro Sports (Aladdin Deck Enhancer & regular cart) (USA)</description> + <description>Quattro Sports (USA)</description> <year>1991</year> <publisher>Camerica</publisher> - <info name="serial" value="COBIC-7408-QS-ALGQ"/> + <info name="serial" value="CAM-QS"/> <part name="cart" interface="nes_cart"> <feature name="slot" value="bf9096" /> - <feature name="pcb" value="CAMERICA-ALGQ" /> <!-- also found with CAMERICA-BF9096 pcb --> + <feature name="pcb" value="CAMERICA-BF9096" /> <feature name="mirroring" value="vertical" /> - <feature name="peripheral" value="aladdin" /> <dataarea name="prg" size="262144"> - <rom name="cobic 7408-qs" size="262144" crc="cccaf368" sha1="29599ea4a52b88c06b80aa0bab987e6eb329e707" offset="00000" /> + <rom name="cobic 7405-qs" size="262144" crc="cccaf368" sha1="29599ea4a52b88c06b80aa0bab987e6eb329e707" offset="00000" /> </dataarea> <!-- 8k VRAM on cartridge --> <dataarea name="vram" size="8192"> @@ -77036,8 +76964,9 @@ to check why this is different --> </part> </software> +<!-- Pegasus was a Polish NES clone --> <software name="mc_pega4" supported="partial"> - <description>Pegasus 4 in 1</description> + <description>Pegasus 4 in 1 ~ Golden Four (Pol)</description> <year>19??</year> <publisher><pirate></publisher> <part name="cart" interface="nes_cart"> @@ -77053,8 +76982,9 @@ to check why this is different --> </part> </software> - <software name="mc_pega5" supported="partial"> - <description>Pegasus 5 in 1 (Golden Five)</description> +<!-- Pegasus was a Polish NES clone --> + <software name="mc_pega5"> + <description>Pegasus 5 in 1 ~ Golden Five (Pol)</description> <year>19??</year> <publisher><pirate></publisher> <part name="cart" interface="nes_cart"> @@ -78310,4 +78240,27 @@ that the real dumps might surface --> </part> </software> + +<!-- Romless passthrough cart for the unit containing VRAM + protection bypass chip + subslot --> + <software name="ade"> + <description>Aladdin Deck Enhancer (USA)</description> + <year>1991</year> + <publisher>Camerica</publisher> + <part name="cart" interface="nes_cart"> + <feature name="slot" value="ade" /> + <feature name="pcb_model" value="ALGNV1-1" /> + <feature name="u1" value="U1 VRAM" /> + <feature name="u2" value="U2 CIC" /> + <feature name="u3" value="U3 MMC" /> + <feature name="mirroring" value="vertical" /> + <!-- 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> diff --git a/hash/nes_ade.xml b/hash/nes_ade.xml new file mode 100644 index 00000000000..244a4524217 --- /dev/null +++ b/hash/nes_ade.xml @@ -0,0 +1,102 @@ +<?xml version="1.0"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> +<softwarelist name="nes_ade" description="Nintendo Entertainment System - Aladdin Deck Enhancer cartridges"> + +<!-- + +TODO: Investigate European Codemasters Plug-Thru games (see e.g. Super Sports Challenge) which are still in the main nes.xml list + +--> + + <software name="dizzyadv"> + <description>Dizzy The Adventurer (USA)</description> + <year>1991</year> + <publisher>Camerica</publisher> + <info name="serial" value="ALG-DA"/> + <part name="cart" interface="ade_cart"> + <feature name="slot" value="algn" /> + <dataarea name="rom" size="131072"> + <rom name="dizzy the adventurer daca7d.u1" size="131072" crc="db99d0cb" sha1="5a4ef3b2f5880d3b4609ae4f3381d688b3a02cac" offset="00000" /> + </dataarea> + </part> + </software> + + <software name="bignfo" supported="partial"> + <description>Big Nose Freaks Out (USA)</description> + <year>1992</year> + <publisher>Camerica</publisher> + <info name="serial" value="ALG-BFO"/> + <part name="cart" interface="ade_cart"> + <feature name="slot" value="algn" /> + <dataarea name="rom" size="262144"> + <rom name="icros7413bfo.u1" size="262144" crc="ccdcbfc6" sha1="00dfb78ac0e10f46bede9850636e2f3c6a305858" offset="00000" /> + </dataarea> + </part> + </software> + + <software name="fntdizzy"> + <description>The Fantastic Adventures of Dizzy (USA)</description> + <year>1991</year> + <publisher>Camerica</publisher> + <info name="serial" value="ALG-DZ"/> + <part name="cart" interface="ade_cart"> + <feature name="slot" value="algn" /> + <dataarea name="rom" size="262144"> + <rom name="fantastic adv of dizzy dz7a47.u1" size="262144" crc="f732c8fd" sha1="102bd0c46c5718c979eb1ac387dade6f6eb70ee4" offset="00000" /> + </dataarea> + </part> + </software> + + <software name="linuscc"> + <description>Linus Spacehead's Cosmic Crusade (USA)</description> + <year>1992</year> + <publisher>Camerica</publisher> + <info name="serial" value="ALG-LN"/> + <part name="cart" interface="ade_cart"> + <feature name="slot" value="algn" /> + <dataarea name="rom" size="262144"> + <rom name="icros74151-ln.u1" size="262144" crc="9e379698" sha1="52621d0e0782cd94b588b50860a6de3da94f2e63" offset="00000" /> + </dataarea> + </part> + </software> + + <software name="micromac"> + <description>Micro Machines (USA)</description> + <year>1992</year> + <publisher>Camerica</publisher> + <info name="serial" value="ALG-MM"/> + <part name="cart" interface="ade_cart"> + <feature name="slot" value="algn" /> + <dataarea name="rom" size="262144"> + <rom name="micro machine mmd27f.u1" size="262144" crc="24ba12dd" sha1="c7fd43041fc139dc8440c95c28a0115dc79e2691" offset="00000" /> + </dataarea> + </part> + </software> + + <software name="quatradv"> + <description>Quattro Adventure (USA)</description> + <year>1991</year> + <publisher>Camerica</publisher> + <info name="serial" value="ALG-QA"/> + <part name="cart" interface="ade_cart"> + <feature name="slot" value="algq" /> + <dataarea name="rom" size="262144"> + <rom name="cobic 7406 qa.u1" size="262144" crc="b89888c9" sha1="06990c8573128e5548c5dcd39479fabf67234926" offset="00000" /> + </dataarea> + </part> + </software> + + <software name="quatrspt"> + <description>Quattro Sports (USA)</description> + <year>1991</year> + <publisher>Camerica</publisher> + <info name="serial" value="ALG-QS"/> + <part name="cart" interface="ade_cart"> + <feature name="slot" value="algq" /> + <dataarea name="rom" size="262144"> + <rom name="cobic 7408-qs.u1" size="262144" crc="cccaf368" sha1="29599ea4a52b88c06b80aa0bab987e6eb329e707" offset="00000" /> + </dataarea> + </part> + </software> + +</softwarelist> diff --git a/hash/nes_ntbrom.xml b/hash/nes_ntbrom.xml index 7d3bd28224a..77f52d85a8a 100644 --- a/hash/nes_ntbrom.xml +++ b/hash/nes_ntbrom.xml @@ -10,9 +10,8 @@ <info name="alt_title" value="なんてったって!! ベースボール 子ガメカセット '91開幕編"/> <part name="cart" interface="ntb_cart"> <feature name="slot" value="ntbrom" /> - <dataarea name="rom" size="32768"> + <dataarea name="rom" size="16384"> <rom name="nantettatte!! baseball '91 kaimaku hen (j) [u].bin" size="16384" crc="fdb61142" sha1="134d2999eca761133236d7abc7cafbd703c628b7" offset="00000" status="baddump" /> - <rom size="16384" offset="0x4000" loadflag="reload" /> </dataarea> </part> </software> @@ -25,9 +24,8 @@ <info name="alt_title" value="なんてったって!!ベースボール 子ガメカセット OBオールスター編"/> <part name="cart" interface="ntb_cart"> <feature name="slot" value="ntbrom" /> - <dataarea name="rom" size="32768"> + <dataarea name="rom" size="16384"> <rom name="nantettatte!! baseball ob allstar hen (j) [u].bin" size="16384" crc="dc0bd3c3" sha1="89ba2b4bf7ba7f7db4f902e4ce20c6dee526433b" offset="00000" status="baddump" /> - <rom size="16384" offset="0x4000" loadflag="reload" /> </dataarea> </part> </software> diff --git a/src/mess/drivers/nes.c b/src/mess/drivers/nes.c index ba8a7ec19f5..3c60574bfb0 100644 --- a/src/mess/drivers/nes.c +++ b/src/mess/drivers/nes.c @@ -813,6 +813,7 @@ SLOT_INTERFACE_START(nes_cart) SLOT_INTERFACE_INTERNAL("bf9093", NES_BF9093) SLOT_INTERFACE_INTERNAL("bf9096", NES_BF9096) SLOT_INTERFACE_INTERNAL("goldenfive", NES_GOLDEN5) + SLOT_INTERFACE_INTERNAL("ade", NES_ALADDIN) SLOT_INTERFACE_INTERNAL("cne_decathl", NES_CNE_DECATHL) SLOT_INTERFACE_INTERNAL("cne_fsb", NES_CNE_FSB) SLOT_INTERFACE_INTERNAL("cne_shlz", NES_CNE_SHLZ) @@ -1070,6 +1071,7 @@ 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("ade_list", "nes_ade") // Camerica/Codemasters Aladdin Deck Enhancer mini-carts MCFG_SOFTWARE_LIST_ADD("ntb_list", "nes_ntbrom") // Sunsoft Nantettate! Baseball mini-carts MCFG_SOFTWARE_LIST_ADD("kstudio_list", "nes_kstudio") // Bandai Karaoke Studio expansion carts MCFG_SOFTWARE_LIST_ADD("datach_list", "nes_datach") // Bandai Datach Joint ROM System mini-carts diff --git a/src/mess/includes/nes.h b/src/mess/includes/nes.h index d9a28dc6b0d..1e67a0e2622 100644 --- a/src/mess/includes/nes.h +++ b/src/mess/includes/nes.h @@ -36,6 +36,7 @@ #include "machine/nes_taito.h" // unlicensed/bootleg/pirate PCBs #include "machine/nes_act53.h" +#include "machine/nes_aladdin.h" #include "machine/nes_ave.h" #include "machine/nes_benshieng.h" #include "machine/nes_camerica.h" diff --git a/src/mess/machine/nes.c b/src/mess/machine/nes.c index d3d2461df6c..a8d133ec120 100644 --- a/src/mess/machine/nes.c +++ b/src/mess/machine/nes.c @@ -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() == CAMERICA_ALADDIN || m_cartslot->get_pcb_id() == SUNSOFT_DCS || m_cartslot->get_pcb_id() == BANDAI_DATACH || m_cartslot->get_pcb_id() == BANDAI_KARAOKE || 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 diff --git a/src/mess/machine/nes_aladdin.c b/src/mess/machine/nes_aladdin.c new file mode 100644 index 00000000000..38e6e15996e --- /dev/null +++ b/src/mess/machine/nes_aladdin.c @@ -0,0 +1,341 @@ +/*********************************************************************************************************** + + + NES/Famicom cartridge emulation for Camerica/Codemasters Aladdin Deck Enhancer pass-through cart + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + + + Here we emulate the following PCBs + + * Camerica ALGNV11 [mapper 71] + * Camerica ALGQV11 [mapper 232] + + ***********************************************************************************************************/ + + +#include "emu.h" +#include "machine/nes_aladdin.h" + + +#ifdef NES_PCB_DEBUG +#define VERBOSE 1 +#else +#define VERBOSE 0 +#endif + +#define LOG_MMC(x) do { if (VERBOSE) logerror x; } while (0) + + + +//---------------------------------- +// +// Aladdin Cartslot implementation +// +//---------------------------------- + +//------------------------------------------------- +// sub-cart interface +//------------------------------------------------- + +aladdin_cart_interface::aladdin_cart_interface(const machine_config &mconfig, device_t &device) + : device_slot_card_interface(mconfig, device), + m_rom(NULL), + m_rom_size(0), + m_rom_mask(0xff) +{ +} + +aladdin_cart_interface::~aladdin_cart_interface() +{ +} + +READ8_MEMBER(aladdin_cart_interface::read) +{ + if (offset < 0x4000) + return m_rom[(m_lobank * 0x4000) + (offset & 0x3fff)]; + else + return m_rom[(m_hibank * 0x4000) + (offset & 0x3fff)]; +} + +//------------------------------------------------- +// sub-cart slot device +//------------------------------------------------- + +const device_type NES_ALADDIN_SLOT = &device_creator<nes_aladdin_slot_device>; + +nes_aladdin_slot_device::nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, NES_ALADDIN_SLOT, "NES Aladdin Deck Enhancer Cartridge Slot", tag, owner, clock, "nes_ade_slot", __FILE__), + device_image_interface(mconfig, *this), + device_slot_interface(mconfig, *this) +{ +} + +nes_aladdin_slot_device::~nes_aladdin_slot_device() +{ +} + + +void nes_aladdin_slot_device::device_start() +{ + m_cart = dynamic_cast<aladdin_cart_interface *>(get_card_device()); +} + +READ8_MEMBER(nes_aladdin_slot_device::read) +{ + if (m_cart) + return m_cart->read(space, offset, mem_mask); + + return 0xff; +} + +// 128K for Dizzy The Adventurer, 256K for the others +bool nes_aladdin_slot_device::call_load() +{ + if (m_cart) + { + UINT8 *ROM = m_cart->get_cart_base(); + UINT32 size = 0; + + if (!ROM) + return IMAGE_INIT_FAIL; + + if (software_entry() == NULL) + { + if (length() != 0x20010 && length() != 0x40010) + return IMAGE_INIT_FAIL; + + UINT8 temp[0x40010]; + size = length() - 0x10; + fread(&temp, length()); + memcpy(ROM, temp + 0x10, size); + + // double check that iNES files are really mapper 71 or 232 + { + UINT8 mapper = (temp[6] & 0xf0) >> 4; + mapper |= temp[7] & 0xf0; + if (mapper != 71 && mapper != 232) + return IMAGE_INIT_FAIL; + } + } + else + { + if (get_software_region_length("rom") != 0x20000 && get_software_region_length("rom") != 0x40000) + return IMAGE_INIT_FAIL; + + size = get_software_region_length("rom"); + memcpy(ROM, get_software_region("rom"), size); + } + + m_cart->set_cart_size(size); + } + + return IMAGE_INIT_PASS; +} + + +bool nes_aladdin_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_aladdin_slot_device::get_default_card_software(const machine_config &config, emu_options &options) +{ + if (open_image_file(options)) + { + const char *slot_string = "algn"; + UINT32 len = core_fsize(m_file); + UINT8 *ROM = global_alloc_array(UINT8, len); + UINT8 mapper; + + core_fread(m_file, ROM, len); + + mapper = (ROM[6] & 0xf0) >> 4; + mapper |= ROM[7] & 0xf0; + +// if (mapper == 71) +// slot_string = "algn"; + if (mapper == 232) + slot_string = "algq"; + + global_free(ROM); + clear(); + + return slot_string; + } + else + return software_get_default_slot(config, options, this, "algn"); +} + + +//---------------------------------- +// +// Aladdin Minicart implementation +// +//---------------------------------- + +ROM_START( ade_rom ) + ROM_REGION(0x40000, "aderom", ROMREGION_ERASEFF) +ROM_END + +const device_type NES_ALGN_ROM = &device_creator<nes_algn_rom_device>; +const device_type NES_ALGQ_ROM = &device_creator<nes_algq_rom_device>; + +nes_algn_rom_device::nes_algn_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) + : device_t(mconfig, type, name, tag, owner, clock, shortname, source), + aladdin_cart_interface( mconfig, *this ) +{ +} + +nes_algn_rom_device::nes_algn_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, NES_ALGN_ROM, "NES Aladdin Deck Enhancer ALGN ROM", tag, owner, clock, "nes_algn_rom", __FILE__), + aladdin_cart_interface( mconfig, *this ) +{ +} + +nes_algq_rom_device::nes_algq_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : nes_algn_rom_device(mconfig, NES_ALGQ_ROM, "NES Aladdin Deck Enhancer ALGQ ROM", tag, owner, clock, "nes_algq_rom", __FILE__) +{ +} + +void nes_algn_rom_device::device_start() +{ + m_rom = (UINT8*)memregion("aderom")->base(); + save_item(NAME(m_lobank)); +} + +void nes_algn_rom_device::device_reset() +{ + m_lobank = 0; + m_hibank = 0x0f & m_rom_mask; +} + +void nes_algq_rom_device::device_start() +{ + m_rom = (UINT8*)memregion("aderom")->base(); + save_item(NAME(m_lobank)); + save_item(NAME(m_hibank)); + save_item(NAME(m_bank_base)); +} + +void nes_algq_rom_device::device_reset() +{ + m_lobank = 0; + m_hibank = 3; + m_bank_base = 0; +} + +const rom_entry *nes_algn_rom_device::device_rom_region() const +{ + return ROM_NAME( ade_rom ); +} + +UINT8 *nes_algn_rom_device::get_cart_base() +{ + return m_rom; +} + +void nes_algn_rom_device::write_prg(UINT32 offset, UINT8 data) +{ + // m_hibank is fixed to the last available bank! + if (offset >= 0x4000) + m_lobank = data & m_rom_mask; +} + +void nes_algq_rom_device::write_prg(UINT32 offset, UINT8 data) +{ + // here hibank & lobank variables are used differently + // m_bank_base = 64K block + // m_lobank = 16K page inside the block + // m_hibank = 3rd page inside the block + if (offset < 0x4000) + { + m_bank_base = ((data >> 3) & 3) << 2; + m_lobank = m_bank_base | (m_lobank & 3); + m_hibank = m_bank_base | 3; + } + else + m_lobank = m_bank_base | (data & 3); +} + + +//----------------------------------------------- +// +// Camerica/Codemasters Aladdin passthru +// implementation +// +//----------------------------------------------- + +const device_type NES_ALADDIN = &device_creator<nes_aladdin_device>; + +nes_aladdin_device::nes_aladdin_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : nes_nrom_device(mconfig, NES_ALADDIN, "NES Cart Camerica Aladdin PCB", tag, owner, clock, "nes_aladdin", __FILE__), + m_subslot(*this, "ade_slot") +{ +} + + +void nes_aladdin_device::device_start() +{ + common_start(); +} + +void nes_aladdin_device::pcb_reset() +{ + prg32(0xff); + chr8(0, CHRRAM); +} + + +/*------------------------------------------------- + mapper specific handlers + -------------------------------------------------*/ + +/*------------------------------------------------- + + Camerica/Codemasters Aladdin Deck Enhancer + + iNES: mapper 71 & 232 + + In MESS: Supported (but timing issues in some games) + + -------------------------------------------------*/ + +READ8_MEMBER(nes_aladdin_device::read_h) +{ + LOG_MMC(("aladdin 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 Aladdin cart is loaded + return hi_access_rom(offset); +} + +WRITE8_MEMBER(nes_aladdin_device::write_h) +{ + LOG_MMC(("aladdin write_h, offset: %04x, data: %02x\n", offset, data)); + m_subslot->write_prg(offset, data); +} + +//------------------------------------------------- +// CART SLOT +//------------------------------------------------- + +static SLOT_INTERFACE_START(ade_cart) + SLOT_INTERFACE("algn", NES_ALGN_ROM) + SLOT_INTERFACE("algq", NES_ALGQ_ROM) +SLOT_INTERFACE_END + + +MACHINE_CONFIG_FRAGMENT( camerica_aladdin ) + MCFG_ALADDIN_MINICART_ADD("ade_slot", ade_cart) +MACHINE_CONFIG_END + +machine_config_constructor nes_aladdin_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( camerica_aladdin ); +} diff --git a/src/mess/machine/nes_aladdin.h b/src/mess/machine/nes_aladdin.h new file mode 100644 index 00000000000..c7009f70a73 --- /dev/null +++ b/src/mess/machine/nes_aladdin.h @@ -0,0 +1,165 @@ +#ifndef __NES_ALADDIN_H +#define __NES_ALADDIN_H + +#include "machine/nes_nxrom.h" + + +//---------------------------------- +// +// Aladdin Cartslot implementation +// +//---------------------------------- + +// ======================> aladdin_cart_interface + +class aladdin_cart_interface : public device_slot_card_interface +{ +public: + // construction/destruction + aladdin_cart_interface(const machine_config &mconfig, device_t &device); + virtual ~aladdin_cart_interface(); + + // reading and writing + virtual DECLARE_READ8_MEMBER(read); + + UINT8 *get_cart_base() { return m_rom; } + void set_cart_size(UINT32 size) { m_rom_size = size; m_rom_mask = (size / 0x4000) - 1; } + virtual void write_prg(UINT32 offset, UINT8 data) { } + +protected: + // internal state + UINT8 *m_rom; + UINT32 m_rom_size; + UINT8 m_lobank, m_hibank, m_rom_mask; +}; + +// ======================> nes_aladdin_slot_device + +class nes_aladdin_slot_device : public device_t, + public device_image_interface, + public device_slot_interface +{ +public: + // construction/destruction + nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~nes_aladdin_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 "ade_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(UINT32 offset, UINT8 data) { if (m_cart) m_cart->write_prg(offset, data); } + + aladdin_cart_interface* m_cart; +}; + +// device type definition +extern const device_type NES_ALADDIN_SLOT; + + +#define MCFG_ALADDIN_MINICART_ADD(_tag, _slot_intf) \ + MCFG_DEVICE_ADD(_tag, NES_ALADDIN_SLOT, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, NULL, false) + + +//---------------------------------- +// +// Aladdin Minicart implementation +// +//---------------------------------- + +// ======================> nes_algn_rom_device + +class nes_algn_rom_device : public device_t, + public aladdin_cart_interface +{ +public: + // construction/destruction + nes_algn_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + nes_algn_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(); + virtual void write_prg(UINT32 offset, UINT8 data); + +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); +}; + + +// ======================> nes_algq_rom_device + +class nes_algq_rom_device : public nes_algn_rom_device +{ +public: + // construction/destruction + nes_algq_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual void write_prg(UINT32 offset, UINT8 data); + +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + UINT8 m_bank_base; +}; + +// device type definition +extern const device_type NES_ALGN_ROM; +extern const device_type NES_ALGQ_ROM; + + +//----------------------------------------------- +// +// Codemasters Aladdin passthru implementation +// +//----------------------------------------------- + +// ======================> nes_aladdin_device + +class nes_aladdin_device : public nes_nrom_device +{ +public: + // construction/destruction + nes_aladdin_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual machine_config_constructor device_mconfig_additions() const; + virtual DECLARE_READ8_MEMBER(read_h); + virtual DECLARE_WRITE8_MEMBER(write_h); + + virtual void pcb_reset(); + +protected: + required_device<nes_aladdin_slot_device> m_subslot; +}; + + +// device type definition +extern const device_type NES_ALADDIN; + +#endif diff --git a/src/mess/machine/nes_camerica.c b/src/mess/machine/nes_camerica.c index cb5bc520c16..6c1f72b3425 100644 --- a/src/mess/machine/nes_camerica.c +++ b/src/mess/machine/nes_camerica.c @@ -9,11 +9,14 @@ Here we emulate the following PCBs - * Camerica BF9093, BF9097, BF909X & ALGNV11 [mapper 71, two variants] - * Camerica BF9096 & ALGQV11 Boards [mapper 232] + * Camerica BF9093, BF9097, BF909X [mapper 71, two variants] + * Camerica BF9096 Boards [mapper 232] * Camerica Golden Five [mapper 104] + Aladdin Deck Enhancer pass-thru cart and the corresponding minicarts + (ALGNV11 & ALGQV11 PCBs) are emulated in a separate source file. + TODO: - check what causes flickering from PPU in Fire Hawk, Poogie and Big Nose (same PPU issue as Back to Future 2&3?) @@ -77,8 +80,8 @@ void nes_bf9093_device::pcb_reset() void nes_bf9096_device::device_start() { common_start(); - save_item(NAME(m_latch1)); - save_item(NAME(m_latch2)); + save_item(NAME(m_latch)); + save_item(NAME(m_bank_base)); } void nes_bf9096_device::pcb_reset() @@ -86,9 +89,10 @@ void nes_bf9096_device::pcb_reset() m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; chr8(0, m_chr_source); - m_latch1 = 0x18; - m_latch2 = 0x00; - set_prg(); + m_latch = 0x00; + m_bank_base = 0x0c; + prg16_89ab(m_bank_base | m_latch); + prg16_cdef(m_bank_base | 3); } void nes_golden5_device::device_start() @@ -100,11 +104,12 @@ void nes_golden5_device::device_start() void nes_golden5_device::pcb_reset() { m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; - prg16_89ab(0x00); - prg16_cdef(0x0f); chr8(0, m_chr_source); - m_latch = 0; + m_latch = 0x00; + m_bank_base = 0x00; + prg16_89ab(m_bank_base | m_latch); + prg16_cdef(m_bank_base | 0x0f); } @@ -158,8 +163,8 @@ WRITE8_MEMBER(nes_bf9093_device::write_h) Games: Quattro Adventure, Quattro Arcade, Quattro Sports - Writes to 0x8000-0x9fff set prg block to (data&0x18)>>1, - writes to 0xa000-0xbfff set prg page to data&3. selected + Writes to 0x8000-0xbfff set prg block to (data&0x18)>>1, + writes to 0xc000-0xffff set prg page to data&3. selected prg are: prg16_89ab = block|page, prg_cdef = 3|page. For more info on the hardware to bypass the NES lockout, see Kevtris' Camerica Mappers documentation. @@ -170,22 +175,21 @@ WRITE8_MEMBER(nes_bf9093_device::write_h) -------------------------------------------------*/ -void nes_bf9096_device::set_prg() -{ - prg16_89ab((m_latch2 & 0x03) | ((m_latch1 & 0x18) >> 1)); - prg16_cdef(0x03 | ((m_latch1 & 0x18) >> 1)); -} - WRITE8_MEMBER(nes_bf9096_device::write_h) { LOG_MMC(("bf9096 write_h, offset: %04x, data: %02x\n", offset, data)); - if (offset < 0x2000) - m_latch1 = data; + if (offset < 0x4000) + { + m_bank_base = ((data >> 3) & 3) << 2; + prg16_89ab(m_bank_base | m_latch); + prg16_cdef(m_bank_base | 3); + } else - m_latch2 = data; - - set_prg(); + { + m_latch = data & 3; + prg16_89ab(m_bank_base | m_latch); + } } /*------------------------------------------------- @@ -208,15 +212,15 @@ WRITE8_MEMBER(nes_golden5_device::write_h) { if (data & 0x08) { - m_latch = ((data & 0x07) << 4) | (m_latch & 0x0f); - prg16_89ab(m_latch); - prg16_cdef(((data & 0x07) << 4) | 0x0f); + m_bank_base = (data & 0x07) << 4; + prg16_89ab(m_bank_base | m_latch); + prg16_cdef(m_bank_base | 0x0f); } } else { - m_latch = (m_latch & 0x70) | (data & 0x0f); - prg16_89ab(m_latch); + m_latch = data & 0x0f; + prg16_89ab(m_bank_base | m_latch); } } diff --git a/src/mess/machine/nes_camerica.h b/src/mess/machine/nes_camerica.h index b24411be908..c067af668e6 100644 --- a/src/mess/machine/nes_camerica.h +++ b/src/mess/machine/nes_camerica.h @@ -36,8 +36,7 @@ public: virtual void pcb_reset(); private: - void set_prg(); - UINT8 m_latch1, m_latch2; + UINT8 m_bank_base, m_latch; }; @@ -56,7 +55,7 @@ public: virtual void pcb_reset(); private: - UINT8 m_latch; + UINT8 m_bank_base, m_latch; }; diff --git a/src/mess/machine/nes_datach.c b/src/mess/machine/nes_datach.c index aac7648e1ec..5346817cdee 100644 --- a/src/mess/machine/nes_datach.c +++ b/src/mess/machine/nes_datach.c @@ -46,8 +46,7 @@ datach_cart_interface::datach_cart_interface(const machine_config &mconfig, device_t &device) : device_slot_card_interface(mconfig, device), m_i2cmem(*this, "i2cmem"), - m_rom(NULL), - m_rom_size(0) + m_rom(NULL) { } @@ -171,7 +170,7 @@ const device_type NES_DATACH_ROM = &device_creator<nes_datach_rom_device>; const device_type NES_DATACH_24C01 = &device_creator<nes_datach_24c01_device>; nes_datach_rom_device::nes_datach_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) - : device_t(mconfig, type, name, tag, owner, clock, "nes_datach_24c01", __FILE__), + : device_t(mconfig, type, name, tag, owner, clock, shortname, source), datach_cart_interface( mconfig, *this ) { } diff --git a/src/mess/machine/nes_datach.h b/src/mess/machine/nes_datach.h index 82902b47c0b..9dbe2413ceb 100644 --- a/src/mess/machine/nes_datach.h +++ b/src/mess/machine/nes_datach.h @@ -31,7 +31,6 @@ public: 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; }; diff --git a/src/mess/machine/nes_karastudio.c b/src/mess/machine/nes_karastudio.c index 5335d8a9c7e..cdc4ee012aa 100644 --- a/src/mess/machine/nes_karastudio.c +++ b/src/mess/machine/nes_karastudio.c @@ -53,8 +53,7 @@ kstudio_cart_interface::kstudio_cart_interface(const machine_config &mconfig, device_t &device) : device_slot_card_interface(mconfig, device), - m_rom(NULL), - m_rom_size(0) + m_rom(NULL) { } diff --git a/src/mess/machine/nes_karastudio.h b/src/mess/machine/nes_karastudio.h index 9043dc5c38a..df06a462b31 100644 --- a/src/mess/machine/nes_karastudio.h +++ b/src/mess/machine/nes_karastudio.h @@ -28,7 +28,6 @@ public: 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; }; diff --git a/src/mess/machine/nes_pcb.inc b/src/mess/machine/nes_pcb.inc index ebfb4776cad..af5b449beca 100644 --- a/src/mess/machine/nes_pcb.inc +++ b/src/mess/machine/nes_pcb.inc @@ -100,6 +100,7 @@ static const nes_pcb pcb_list[] = { "bf9093", CAMERICA_BF9093 }, { "bf9096", CAMERICA_BF9096 }, { "goldenfive", CAMERICA_GOLDENFIVE }, + { "ade" , CAMERICA_ALADDIN }, { "cne_decathl", CNE_DECATHLON }, { "cne_fsb", CNE_FSB }, { "cne_shlz", CNE_SHLZ }, diff --git a/src/mess/machine/nes_slot.h b/src/mess/machine/nes_slot.h index 2394bf3d4d5..a264caa64f5 100644 --- a/src/mess/machine/nes_slot.h +++ b/src/mess/machine/nes_slot.h @@ -38,7 +38,7 @@ enum /* Caltron */ CALTRON_6IN1, /* Camerica */ - CAMERICA_BF9093, CAMERICA_BF9096, + CAMERICA_BF9093, CAMERICA_BF9096, CAMERICA_ALADDIN, CAMERICA_GOLDENFIVE, GG_NROM, /* Dreamtech */ DREAMTECH_BOARD, diff --git a/src/mess/machine/nes_sunsoft_dcs.c b/src/mess/machine/nes_sunsoft_dcs.c index 3fc0d4a4b4a..f2cfa3090da 100644 --- a/src/mess/machine/nes_sunsoft_dcs.c +++ b/src/mess/machine/nes_sunsoft_dcs.c @@ -37,8 +37,7 @@ ntb_cart_interface::ntb_cart_interface(const machine_config &mconfig, device_t &device) : device_slot_card_interface(mconfig, device), - m_rom(NULL), - m_rom_size(0) + m_rom(NULL) { } @@ -89,17 +88,17 @@ bool nes_ntb_slot_device::call_load() if (software_entry() == NULL) { - if (length() != 0x8000) + if (length() != 0x4000) return IMAGE_INIT_FAIL; - fread(&ROM, 0x8000); + fread(&ROM, 0x4000); } else { - if (get_software_region_length("rom") != 0x8000) + if (get_software_region_length("rom") != 0x4000) return IMAGE_INIT_FAIL; - memcpy(ROM, get_software_region("rom"), 0x8000); + memcpy(ROM, get_software_region("rom"), 0x4000); } } @@ -125,7 +124,7 @@ const char * nes_ntb_slot_device::get_default_card_software(const machine_config //----------------------------------------------- ROM_START( ntb_rom ) - ROM_REGION(0x8000, "ntbrom", ROMREGION_ERASEFF) + ROM_REGION(0x4000, "ntbrom", ROMREGION_ERASEFF) ROM_END const device_type NES_NTB_ROM = &device_creator<nes_ntb_rom_device>; diff --git a/src/mess/machine/nes_sunsoft_dcs.h b/src/mess/machine/nes_sunsoft_dcs.h index b12a366b568..2c76f0b022d 100644 --- a/src/mess/machine/nes_sunsoft_dcs.h +++ b/src/mess/machine/nes_sunsoft_dcs.h @@ -20,14 +20,13 @@ public: virtual ~ntb_cart_interface(); // reading and writing - virtual DECLARE_READ8_MEMBER(read) { return m_rom[offset & (m_rom_size - 1)]; } + virtual DECLARE_READ8_MEMBER(read) { return m_rom[offset]; } UINT8 *get_cart_base() { return m_rom; } protected: // internal state UINT8 *m_rom; - UINT32 m_rom_size; }; // ======================> nes_ntb_slot_device diff --git a/src/mess/mess.mak b/src/mess/mess.mak index 9db1d0aa161..7ef4a3e12b2 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -1536,6 +1536,7 @@ $(MESSOBJ)/nintendo.a: \ $(MESS_MACHINE)/nes_mmc3_clones.o \ $(MESS_MACHINE)/nes_mmc5.o \ $(MESS_MACHINE)/nes_act53.o \ + $(MESS_MACHINE)/nes_aladdin.o \ $(MESS_MACHINE)/nes_ave.o \ $(MESS_MACHINE)/nes_bandai.o \ $(MESS_MACHINE)/nes_benshieng.o \ |
