summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author David Haywood <mamehaze@users.noreply.github.com>2015-01-24 14:05:31 +0000
committer David Haywood <mamehaze@users.noreply.github.com>2015-01-24 14:05:31 +0000
commita15cfc8d52dd1b662e5a9542068d24fa21c19b3e (patch)
treeb46dd9cf503860eb16c1cb8c28f3a79d38162bac
parent83680ea2a092af43488c7ff7ec74e928a866dcd9 (diff)
parentf81e3c8ea2c7ec53a6966b183d55b9462f68e7be (diff)
Merge pull request #116 from p1pkin/model2
model2.c: Zero Gunner and Pilot Kids protection and keys
-rw-r--r--src/mame/drivers/model2.c17
-rw-r--r--src/mame/drivers/naomi.c1
-rw-r--r--src/mame/machine/315-5881_helper.c14
3 files changed, 18 insertions, 14 deletions
diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c
index 01265244d8d..8d4de7dbe33 100644
--- a/src/mame/drivers/model2.c
+++ b/src/mame/drivers/model2.c
@@ -1350,13 +1350,16 @@ WRITE32_MEMBER(model2_state::model2_5881prot_w)
if (offset == 0x0008/4)
{
- // code is copied to RAM first, so base address is always 0
- m_cryptdevice->set_addr_low(0);
- m_cryptdevice->set_addr_high(0);
-
- if (data != 0)
- printf("model2_5881prot_w address isn't 0?\n");
-
+ // Zero Gunner uses this, it's encrypted data in prot.RAM consists of several small chunks, selected using low address
+ // so far this is only known game with 315-5881 which uses not 0 offset in prot.RAM
+ if (mem_mask == 0x0000ffff)
+ m_cryptdevice->set_addr_low(data&0xffff);
+ else if (mem_mask == 0xffff0000)
+ {
+ m_cryptdevice->set_addr_high(0);
+ if (data != 0)
+ printf("model2_5881prot_w not zero high address %08x (%08x)\n", data, mem_mask);
+ }
first_read = 1;
}
else if (offset == 0x000c/4)
diff --git a/src/mame/drivers/naomi.c b/src/mame/drivers/naomi.c
index 736e9c57beb..d14354c6438 100644
--- a/src/mame/drivers/naomi.c
+++ b/src/mame/drivers/naomi.c
@@ -349,6 +349,7 @@ Virtua NBA 840-0021C-01 23073 21 (64Mb)
Virtua NBA (original) 840-0021C 22949 21 (64Mb) present 315-6213 317-0271-COM
Virtua Striker 2 Ver. 2000 (Rev C) 840-0010C 21929C 14 (64Mb)* present 315-6213 317-0258-COM joystick + 3 buttons *(+1x 32Mb)
Virtua Tennis / Power Smash 840-0015C 22927 11 (64Mb) present 315-6213 317-0263-COM
+Virtual On Oratorio Tangram M.S.B.S. ver5.66 840-0028C 23198 13 (64Mb) ? 315-6213 317-0279-COM
Zombie Revenge 840-0003C 21707 19 (64Mb) ? 315-6213 317-0249-COM joystick + 3 buttons
diff --git a/src/mame/machine/315-5881_helper.c b/src/mame/machine/315-5881_helper.c
index f58053c42b3..70c3ab942ac 100644
--- a/src/mame/machine/315-5881_helper.c
+++ b/src/mame/machine/315-5881_helper.c
@@ -31,7 +31,7 @@ struct game_keys
static const struct game_keys keys_table[] =
{
- // name key gameid # year chip label platform
+ // name key gameid # year chip label platform
{ "twcup98", 0x05200913 }, // 25209801 1998 317-5039-COM ST-V
{ "astrass", 0x052e2901 }, // 25349801 1998 317-5040-COM ST-V (yes, the 317-5040-COM chip was reused for 3 different games and on both Naomi and ST-V!)
{ "rsgun", 0x05272d01 }, // 1998 317-5041-COM ST-V
@@ -128,12 +128,12 @@ static const struct game_keys keys_table[] =
{ "dynamcopb", 0x0c2a4a93 }, // 1998 317-0236-COM Model 2
{ "dyndeka2b", 0x0c2a4a93 }, // 1998 317-0236-COM Model 2
{ "dynamcopc", 0x0c2a4a93 }, // 1998 317-0236-COM Model 2
- { "zerogun", -1 }, // 1997 317-5038-COM Model 2 // lowest numbered chip?
- { "zerogunj", -1 }, // 1997 317-5038-COM Model 2
- { "zeroguna", -1 }, // 1997 317-5038-COM Model 2
- { "zerogunaj", -1 }, // 1997 317-5038-COM Model 2
- { "pltkids", -1 }, // 1998 317-5044-COM Model 2
- { "pltkidsa", -1 }, // 1998 317-5044-COM Model 2
+ { "zerogun", 0x042c0d13 }, // 1997 317-5038-COM Model 2
+ { "zerogunj", 0x042c0d13 }, // 1997 317-5038-COM Model 2
+ { "zeroguna", 0x042c0d13 }, // 1997 317-5038-COM Model 2
+ { "zerogunaj", 0x042c0d13 }, // 1997 317-5038-COM Model 2
+ { "pltkids", 0x042e2dc1 }, // 1998 317-5044-COM Model 2
+ { "pltkidsa", 0x042e2dc1 }, // 1998 317-5044-COM Model 2
{ "von2", 0x092a0e97 }, // ???? 317-0234-COM Model 3
{ "von254g", 0x092a0e97 }, // ???? 317-0234-COM Model 3