summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author David Haywood <mamehaze@gmail.com>2019-01-19 15:46:44 +0000
committer MooglyGuy <MooglyGuy@users.noreply.github.com>2019-01-19 16:46:44 +0100
commit9259b14fc5226632cf4e9bab8d4d55df41587067 (patch)
tree4a966a1797e6b07043893a5aebde5ed357f56d24
parent96bef80924f0388157d628d8ae7eb8a6f73399c9 (diff)
allow JAKKS GameKeys to boot without debugger trick (#4530)
-vii: Fixed JAKKS GameKeys to boot without debugger trick. [David Haywood]
-rw-r--r--hash/jakks_gamekey_dy.xml22
-rw-r--r--hash/jakks_gamekey_nk.xml9
-rw-r--r--src/mame/drivers/vii.cpp56
3 files changed, 75 insertions, 12 deletions
diff --git a/hash/jakks_gamekey_dy.xml b/hash/jakks_gamekey_dy.xml
index 09fddae21b1..1eb4a801760 100644
--- a/hash/jakks_gamekey_dy.xml
+++ b/hash/jakks_gamekey_dy.xml
@@ -7,39 +7,45 @@
<!-- One of them doesn't use the /OE signal from the game, and has 16 10K resistors tying the data lines high.
Silkscreened onto both PCBs is the text A1 A2 A3 A4 with 2 boxes next to each with H and L. Both PCBs are marked A1 H A3 L. -->
- <!-- in debugger do "go 14ca4" then "do r1 = ffff" (it checks for compatible base board using magic value / response on port a) -->
<software name="sbwlgoof" supported="no"> <!-- AT24C04 SEEPROM -->
<description>Sports Bowling &amp; Goofy's Underwater Adventure</description>
<year>2005</year>
<publisher>JAKKS Pacific / HotGen Ltd</publisher>
<part name="cart" interface="jakks_gamekey">
- <dataarea name="rom" size="0x200000">
+ <dataarea name="rom" size="0x800000">
<rom name="dy_disneygkbowlinggoofy.bin" size="0x200000" crc="d2147aa4" sha1="0db986aac68868a2ff4936e93178da8c592ac81d" offset="0" />
+ <rom size="0x200000" offset="0x200000" loadflag="reload" />
+ <rom size="0x200000" offset="0x400000" loadflag="reload" />
+ <rom size="0x200000" offset="0x600000" loadflag="reload" />
</dataarea>
</part>
</software>
- <!-- in debugger do "go fbdb" then "do r1 = ffff" (it checks for compatible base board using magic value / response on port a) -->
<software name="stenfchs" supported="no"> <!-- AT24C04 SEEPROM -->
<description>Sports Tennis &amp; Face Chase</description>
<year>2005</year>
<publisher>JAKKS Pacific / HotGen Ltd</publisher>
<part name="cart" interface="jakks_gamekey">
- <dataarea name="rom" size="0x200000">
+ <dataarea name="rom" size="0x800000">
<rom name="dy_disneygktennisfacechase.bin" size="0x200000" crc="ba37ccf2" sha1="c7204a0499b6949f3f70f0f5c042d353435406fb" offset="0" />
- </dataarea>
+ <rom size="0x200000" offset="0x200000" loadflag="reload" />
+ <rom size="0x200000" offset="0x400000" loadflag="reload" />
+ <rom size="0x200000" offset="0x600000" loadflag="reload" />
+ </dataarea>
</part>
</software>
- <!-- in debugger do "go fbdc" then "do r1 = ffff" (it checks for compatible base board using magic value / response on port a) -->
<software name="stenfcha" supported="no"> <!-- AT24C04 SEEPROM -->
<description>Sports Tennis &amp; Face Chase &amp; Riches of Agrabah</description>
<year>2005</year>
<publisher>JAKKS Pacific / HotGen Ltd</publisher>
<part name="cart" interface="jakks_gamekey">
- <dataarea name="rom" size="0x200000">
+ <dataarea name="rom" size="0x800000">
<rom name="disneygktennisfaceagrabah.bin" size="0x200000" crc="f3fd0759" sha1="1272e7e34acfce5dbe55b39bff888f5dd16c63f9" offset="0" />
- </dataarea>
+ <rom size="0x200000" offset="0x200000" loadflag="reload" />
+ <rom size="0x200000" offset="0x400000" loadflag="reload" />
+ <rom size="0x200000" offset="0x600000" loadflag="reload" />
+ </dataarea>
</part>
</software>
diff --git a/hash/jakks_gamekey_nk.xml b/hash/jakks_gamekey_nk.xml
index cd4044cb2e3..d95389638ab 100644
--- a/hash/jakks_gamekey_nk.xml
+++ b/hash/jakks_gamekey_nk.xml
@@ -5,12 +5,15 @@
<!-- This list is for the 'NK' coded Game Keys, for Nicktoons and related systems -->
<software name="dora" supported="no">
- <description>Dora the Explorer</description>
+ <description>Soccer Shootout &amp; Juego De Futbol De Dora &amp; Dora's Star Mountain Adventure</description>
<year>2005</year>
- <publisher>JAKKS Pacific</publisher>
+ <publisher>JAKKS Pacific / Handheld Games</publisher>
<part name="cart" interface="jakks_gamekey">
- <dataarea name="rom" size="0x200000">
+ <dataarea name="rom" size="0x800000">
<rom name="nk_dora.bin" size="0x200000" crc="2bcdf9a5" sha1="ac86d967b269cb8c4ecc9c8b99fb5c16424da7be" offset="0" />
+ <rom size="0x200000" offset="0x200000" loadflag="reload" />
+ <rom size="0x200000" offset="0x400000" loadflag="reload" />
+ <rom size="0x200000" offset="0x600000" loadflag="reload" />
</dataarea>
</part>
</software>
diff --git a/src/mame/drivers/vii.cpp b/src/mame/drivers/vii.cpp
index 16321836cbd..ba586013476 100644
--- a/src/mame/drivers/vii.cpp
+++ b/src/mame/drivers/vii.cpp
@@ -127,6 +127,9 @@ protected:
DECLARE_READ16_MEMBER(rad_portb_r);
DECLARE_READ16_MEMBER(rad_portc_r);
+ DECLARE_WRITE16_MEMBER(jakks_porta_w);
+ DECLARE_WRITE16_MEMBER(jakks_portb_w);
+
required_device<unsp_device> m_maincpu;
required_device<screen_device> m_screen;
required_device<spg2xx_device> m_spg;
@@ -157,6 +160,7 @@ class jakks_gkr_state : public spg2xx_game_state
public:
jakks_gkr_state(const machine_config &mconfig, device_type type, const char *tag)
: spg2xx_game_state(mconfig, type, tag)
+ , m_porta_key_mode(false)
, m_cart(*this, "cartslot")
, m_cart_region(nullptr)
{ }
@@ -168,6 +172,10 @@ public:
private:
virtual void machine_start() override;
+ DECLARE_WRITE16_MEMBER(jakks_porta_key_io_w);
+ DECLARE_READ16_MEMBER(jakks_porta_key_io_r);
+ bool m_porta_key_mode;
+
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(gamekey_cart);
required_device<generic_slot_device> m_cart;
@@ -305,9 +313,50 @@ WRITE16_MEMBER(spg2xx_game_state::walle_portc_w)
READ16_MEMBER(spg2xx_game_state::jakks_porta_r)
{
+ //logerror("%s: jakks_porta_r\n", machine().describe_context());
return m_io_p1->read();
}
+WRITE16_MEMBER(spg2xx_game_state::jakks_porta_w)
+{
+ //logerror("%s: jakks_porta_w %04x\n", machine().describe_context(), data);
+}
+
+WRITE16_MEMBER(spg2xx_game_state::jakks_portb_w)
+{
+ //logerror("%s: jakks_portb_w %04x\n", machine().describe_context(), data);
+}
+
+READ16_MEMBER(jakks_gkr_state::jakks_porta_key_io_r)
+{
+ //logerror("%s: jakks_porta_key_io_r\n", machine().describe_context());
+ if (m_porta_key_mode == false)
+ {
+ return m_io_p1->read();
+ }
+ else
+ {
+ /* masks with 0xf, inverts, and combines it with a previous read (when data written to jakks_porta_key_io_w was 0x0000) and expects result to be 0x0000
+ could just expect data written to be returned, but that would be a strange check.
+ all systems seem to respond to the same result, so how is the per-system lock implemented? */
+ return (m_io_p1->read() & 0xfff0) | 0x000f;
+ }
+}
+
+WRITE16_MEMBER(jakks_gkr_state::jakks_porta_key_io_w)
+{
+ //logerror("%s: jakks_porta_key_io_w %04x\n", machine().describe_context(), data);
+ // only seen 0xffff and 0x0000 written here.. writes 0xffff before the 2nd part of the port a gamekey check read.
+ if (data == 0xffff)
+ {
+ m_porta_key_mode = true;
+ }
+ else
+ {
+ m_porta_key_mode = false;
+ }
+}
+
READ16_MEMBER(spg2xx_game_state::rad_porta_r)
{
uint16_t data = m_io_p1->read();
@@ -828,6 +877,8 @@ void spg2xx_game_state::jakks(machine_config &config)
spg2xx_base(config);
m_spg->porta_in().set(FUNC(spg2xx_game_state::jakks_porta_r));
+ m_spg->porta_out().set(FUNC(spg2xx_game_state::jakks_porta_w));
+ m_spg->portb_out().set(FUNC(spg2xx_game_state::jakks_portb_w));
I2CMEM(config, m_i2cmem, 0).set_data_size(0x200);
}
@@ -861,6 +912,9 @@ void jakks_gkr_state::jakks_gkr(machine_config &config)
{
walle(config);
+ m_spg->porta_in().set(FUNC(jakks_gkr_state::jakks_porta_key_io_r));
+ m_spg->porta_out().set(FUNC(jakks_gkr_state::jakks_porta_key_io_w));
+
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "jakks_gamekey");
m_cart->set_width(GENERIC_ROM16_WIDTH);
m_cart->set_device_load(device_image_load_delegate(&jakks_gkr_state::device_image_load_gamekey_cart, this));
@@ -1182,7 +1236,7 @@ CONS( 2008, jak_wall, 0, 0, walle, walle, spg2xx_game_state, empty_init, "JAKKS
CONS( 2005, jak_wwe, 0, 0, jakks_gkr, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "WWE (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // WW (no game-keys released)
CONS( 2005, jak_fan4, 0, 0, jakks_gkr, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Digital Eclipse", "Fantastic Four (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // F4 (no game-keys released)
CONS( 2005, jak_just, 0, 0, jakks_gkr, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Taniko", "Justice League (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // DC (no game-keys released)
-CONS( 2005, jak_dora, 0, 0, jakks_gkr_nk, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Handheld Games", "Dora the Explorer (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NK keys (same as Nicktoons & Spongebob) (3+ released)
+CONS( 2005, jak_dora, 0, 0, jakks_gkr_nk, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Handheld Games", "Dora the Explorer - Race To Play Park (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NK keys (same as Nicktoons & Spongebob) (3+ released)
CONS( 2005, jak_sdoo, 0, 0, jakks_gkr, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Jolliford Management","Scooby-Doo! and the Mystery of the Castle (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // SD (no game-keys released)
CONS( 2005, jak_disf, 0, 0, jakks_gkr_dy, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "Disney Friends (JAKKS Pacific TV Game, Game-Key Ready)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses DY keys (3 released)