Previous 199869 Revisions Next

r34526 Wednesday 21st January, 2015 at 19:34:54 UTC by MetalliC
update 315-5881 keys
[src/mame/machine]315-5881_crypt.c 315-5881_crypt.h 315-5881_helper.c

trunk/src/mame/machine/315-5881_crypt.c
r243037r243038
664664   // deathcox and others confirm format as 0x20000 bit as compressed bit, 0x1ff00 bits as block size 1, 0x000ff bits as block size 2
665665   // for compressed streams the 'line size' is block size 1. 
666666
667   block_numlines = ((dec_header & 0x000000ff) >> 0) + 1;
667   int blockx = ((dec_header & 0x000000ff) >> 0) + 1;
668668   int blocky = ((dec_header & 0x0001ff00) >> 8) + 1;
669   block_size = block_numlines * blocky;
669   block_size = blockx * blocky;
670670
671671   if(dec_header & FLAG_COMPRESSED) {
672672      line_buffer_size = blocky;
673673      line_buffer_pos = line_buffer_size;
674674      buffer_bit = 7;
675      buffer_bit2 = 15;
676675   }
677676
678   printf("header %08x\n", dec_header);
677//   printf("header %08x\n", dec_header);
679678   enc_ready = true;
680679}
681680
r243037r243038
776775
777776int sega_315_5881_crypt_device::get_compressed_bit()
778777{
779//   if(buffer_pos == BUFFER_SIZE)
780//      enc_fill();
781
782   if (buffer_bit2 == 15)
783   {
784      buffer_bit2 = 0;
785      UINT16 buffer2a = get_decrypted_16();
786      buffer2[0] = buffer2a;
787      buffer2[1] = buffer2a >> 8;
788   //   block_pos+=2;
789      buffer_pos = 0;
790
791   }
792   else
793   {
794      buffer_bit2++;
795   }
796
797//   if (buffer_bit ==7) printf("using byte %02x\n", buffer2[(buffer_pos&1) ^ 1]);
798
799   int res = (buffer2[(buffer_pos&1)^1] >> buffer_bit) & 1;
778   if(buffer_pos == BUFFER_SIZE)
779      enc_fill();
780   int res = (buffer[buffer_pos^1] >> buffer_bit) & 1;
800781   buffer_bit--;
801782   if(buffer_bit == -1) {
802783      buffer_bit = 7;
r243037r243038
804785   }
805786   return res;
806787}
788
807789void sega_315_5881_crypt_device::line_fill()
808790{
809791   assert(line_buffer_pos == line_buffer_size);
r243037r243038
856838         }
857839      }
858840   }
859
860   if (block_numlines == block_pos)
861   {
862      enc_start();
863   }
864   else
865   {
866      block_pos++;
867   }
868841}
trunk/src/mame/machine/315-5881_crypt.h
r243037r243038
5656
5757   bool enc_ready;
5858
59   int buffer_pos, line_buffer_pos, line_buffer_size, buffer_bit, buffer_bit2;
60   UINT8 buffer2[2];
61
59   int buffer_pos, line_buffer_pos, line_buffer_size, buffer_bit;
6260   int block_size;
6361   int block_pos;
64   int block_numlines;
6562
6663   struct sbox {
6764      UINT8 table[64];
trunk/src/mame/machine/315-5881_helper.c
r243037r243038
3535   { "twcup98",         0x05200913 }, // 25209801    1998     317-5039-COM   ST-V   (this is correct key, but not yet working with our code)
3636//   { "twcup98",         -1         }, // 25209801    1998     317-5039-COM   ST-V
3737   { "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!)
38   { "wldkicks",        0x052e2901 }, // 25209801    2000     317-5040-COM   Naomi
39   { "toukon4",         0x052e2901 }, // 25349801    2000     317-5040-COM   Naomi
4038   { "rsgun",           -1         }, //             1998     317-5041-COM   ST-V
4139   { "sss",             -1         }, //             1998     317-5042-COM   ST-V
4240   { "elandore",        -1         }, //             1998     317-5043-COM   ST-V
4341   { "ffreveng",        -1         }, //             1998     317-5049-COM   ST-V
44   { "ninjaslt",        0x000ca510 }, // 25469801    2000
45   { "ninjaslt4",       0x000ca510 }, // 25469801    2000
46   { "gunsur2e",        0x000680d0 }, // 25709801    2001
47   { "mazan",           0x000fea94 }, // 25869812    2002
48   { "f355twin",        0x0006efd4 }, // 834-13950   1999
49   { "alpiltdx",        0x00070e41 }, // 834-?????   1999
50   { "f355twn2",        0x001666c6 }, // 834-?????   2001
51   { "crzytaxi",        0x000d2f45 }, // 840-0002    1999
52   { "zombrvn",         0x00012b41 }, // 840-0003    1999
53   { "ringout",         0x000b1e40 }, // 840-0004    1999
54   { "alpilota",        0x00070e41 }, // 840-0005    1999
55   { "ggram2",          0x00074a61 }, // 840-0007    1999
56   { "vs2_2k",          0x00088b08 }, // 840-0010    1999
57   { "toyfight",        0x0002ca85 }, // 840-0011    1999
58   { "smlg99",          0x00048a01 }, // 840-0012    1999
59   { "jambo",           0x000fab95 }, // 840-0013    1999
60   { "vtennis",         0x0003eb15 }, // 840-0015    1999
61   { "derbyoc",         0x000fee35 }, // 840-0016    1999
62   { "otrigger",        0x000fea94 }, // 840-0017    1999
63   { "sgtetris",        0x0008ae51 }, // 840-0018    1999
64   { "dybb99",          0x00048a01 }, // 840-0019    1999
65   { "samba",           0x000a8b5d }, // 840-0020    1999
66   { "sambap",          0x000a8b5d }, // 840-0020    1999
67   { "virnbao",         0x00068b58 }, // 840-0021    2000
68   { "18wheelr",        0x0007cf54 }, // 840-0023    2000
69   { "marstv",          0x000b8ef5 }, // 840-0025    1999
70   { "vonot",           0x00010715 }, // 840-0028    2000
71   { "sstrkfgt",        0x00132303 }, // 840-0035    2000
72   { "18wheels",        0x0007cf54 }, // 840-0036    2000
73   { "wwfroyal",        0x001627c3 }, // 840-0040    2000
74   { "slasho",          0x001a66ca }, // 840-0041    2000
75   { "crackndj",        0x001c2347 }, // 840-0043    2000
76   { "csmash",          0x00103347 }, // 840-0044    2000
77   { "csmasho",         0x00103347 }, // 840-0044    2000
78   { "samba2k",         0x001702cf }, // 840-0047    2000
79   { "alienfnt",        0x00174343 }, // 840-0048    2001
80   { "alienfnta",       0x00174343 }, // 840-0048    2001
81   { "crackdj2",        0x00428247 }, // 840-0068    2001
82   { "vf4cart",         0x06ef2f92 }, // 840-0080    2002
83   { "pstone",          0x000e69c1 }, // 841-0001    1999
84   { "suchie3",         0x000368e1 }, // 841-0002    1999
85   { "doa2",            0x0008ad01 }, // 841-0003    1999
86   { "doa2m",           0x0008ad01 }, // 841-0003    1999
87   { "spawn",           0x00078d01 }, // 841-0005    1999
88   { "puyoda",          0x000acd40 }, // 841-0006    1999
89   { "pstone2",         0x000b8dc0 }, // 841-0008    2000
42
43   { "18wheelr",        0x0807cf54 }, // 840-0023    2000
44   { "18wheels",        0x0807cf54 }, // 840-0036    2000
45   { "18wheelu",        0x0807cf54 }, // 840-0037    2000
46   { "alienfnt",        0x08174343 }, // 840-0048    2001
47   { "alienfnta",       0x08174343 }, // 840-0048    2001
48   { "alpilota",        0x08070e41 }, // 840-0005    1999
49   { "alpiltdx",        0x08070e41 }, // 834-?????   1999
9050   { "capsnk",          0x00000000 }, // 841-0011    2000
9151   { "capsnka",         0x00000000 }, // 841-0011    2000
9252   { "capsnkb",         0x00000000 }, // 841-0011    2000
53   { "clubkrtc",        0x0ce7d742 }, // 840-0062    2001
54   { "clubkrtd",        0x0ce7d742 }, // 840-0062    2001
55   { "clubkrte",        0x0ce7d742 }, // 840-0062    2001
56   { "crackdj2",        0x08428247 }, // 840-0068    2001
57   { "crackndj",        0x081c2347 }, // 840-0043    2000
58   { "crzytaxi",        0x080d2f45 }, // 840-0002    1999
59   { "csmash",          0x08103347 }, // 840-0044    2000
60   { "csmasho",         0x08103347 }, // 840-0044    2000
9361   { "cspike",          0x000e2010 }, // 841-0012    2000
62   { "deathcox",        0x000b64d0 }, // 841-0016    2000
63   { "derbyoc",         0x080fee35 }, // 840-0016    1999
64   { "doa2",            0x0008ad01 }, // 841-0003    1999
65   { "doa2m",           0x0008ad01 }, // 841-0003    1999
66   { "dybb99",          0x0804ae71 }, // 840-0019    1999
67   { "dybbnao",         0x080e6ae1 }, // 840-0001    1998
68   { "f355",            0x080e8f84 }, // 834-13842   1999
69   { "f355twin",        0x0806efd4 }, // 834-13950   1999
70   { "f355twn2",        0x081666c6 }, // 840-0042    2001
71   { "ggram2",          0x08074a61 }, // 840-0007    1999
9472   { "ggx",             0x00076110 }, // 841-0013    2000
73   { "gundmct",         0x000e8010 }, // 841-0017    2001
74   { "gunsur2",         0x000680d0 }, // 25709801    2001
75   { "gunsur2e",        0x000680d0 }, // 25709801    2001
9576   { "gwing2",          0x000b25d0 }, // 841-0014    2000
77   { "hmgeo",           0x00038510 }, // HMG016007   2001
78   { "inunoos",         0x094bc3e3 }, // 840-0073    2001
79   { "jambo",           0x080fab95 }, // 840-0013    1999
80   { "marstv",          0x080b8ef5 }, // 840-0025    1999
81   { "mazan",           0x080fea94 }, // 25869812    2002
82   { "mazana",          0x080fea94 }, // 25869812    2002
83   { "ninjaslt",        0x000ca510 }, // 25469801    2000
84   { "ninjaslt1",       0x000ca510 }, // 25469801    2000
85   { "ninjaslt2",       0x000ca510 }, // 25469801    2000
86   { "ninjaslt4",       0x000ca510 }, // 25469801    2000
87   { "otrigger",        0x080fea94 }, // 840-0017    1999
9688   { "pjustic",         0x000725d0 }, // 841-0015    2000
97   { "deathcox",        0x000b64d0 }, // 841-0016    2000
98   { "gundmct",         0x000e8010 }, // 841-0017    2001
89   { "pstone",          0x000e69c1 }, // 841-0001    1999
90   { "pstone2",         0x000b8dc0 }, // 841-0008    2000
91   { "puyoda",          0x000acd40 }, // 841-0006    1999
92   { "ringout",         0x080b1e40 }, // 840-0004    1999
93   { "samba",           0x080a8b5d }, // 840-0020    1999
94   { "sambap",          0x080a8b5d }, // 840-0020    1999
95   { "samba2k",         0x081702cf }, // 840-0047    2000
96   { "sgtetris",        0x0808ae51 }, // 840-0018    1999
97   { "slasho",          0x081a66ca }, // 840-0041    2000
98   { "smlg99",          0x08048a01 }, // 840-0012    1999
99   { "spawn",           0x00078d01 }, // 841-0005    1999
100   { "sstrkfgt",        0x08132303 }, // 840-0035    2000
101   { "sstrkfgta",       0x08132303 }, // 840-0035    2000
102   { "suchie3",         0x000368e1 }, // 841-0002    1999
103   { "tduno",           0x08028ea5 }, // 840-0008    1999
104   { "toukon4",         0x052e2901 }, // 25349801    2000     317-5040-COM   Naomi
105   { "toyfight",        0x0802ca85 }, // 840-0011    1999
106   { "vf4cart",         0x0eef2f96 }, // 840-0080    2002
107   { "virnbao",         0x08068b58 }, // 840-0021    2000
108   { "virnbap",         0x08068b58 }, // 840-0021    2000
109   { "vonot",           0x08010715 }, // 840-0028    2000
110   { "vs2_2k",          0x08088b08 }, // 840-0010    1999
111   { "vstrik3c",        0x0cee834a }, // 840-0061    2001
112   { "vstrik3cb",       0x0cee834a }, // 840-0061    2001
113   { "vtennis",         0x0803eb15 }, // 840-0015    1999
114   { "wldkicks",        0x052e2901 }, // 25209801    2000     317-5040-COM   Naomi
115   { "wldkicksa",       0x052e2901 }, // 25209801    2000     317-5040-COM   Naomi
116   { "wldkicksb",       0x052e2901 }, // 25209801    2000     317-5040-COM   Naomi
117   { "wldrider",        0x0ce7a703 }, // 840-0046    2001
118   { "wwfroyal",        0x081627c3 }, // 840-0040    2000
99119   { "zerogu2",         0x0007c010 }, // 841-0020    2001
100   { "hmgeo",           0x00038510 }, // HMG016007   2001
120   { "zombrvn",         0x08012b41 }, // 840-0003    1999
101121
102   { "airtrix",         -1         }, //             ????  317-0294-COM  Hikaru
103   { "pharrier",        -1         }, //             ????  317-0297-COM  Hikaru
104   { "podrace",         -1         }, //             ????  317-0277-COM  Hikaru
122   { "airtrix",         0x091b02c7 }, // 834-14149   2000  317-0294-COM  Hikaru
123   { "pharrier",        0x0912c68a }, // 834-14144   2001  317-0297-COM  Hikaru
124   { "podrace",         0x0903dad5 }, // 834-14002   2001  317-0277-COM  Hikaru
105125
106126   { "vs298",           0x09234e96 }, //             ????  317-????-COM  Model 3
107127   { "vs299",           0x09222ac8 }, //             ????  317-0245-COM  Model 3


Previous 199869 Revisions Next


© 1997-2024 The MAME Team