Previous 199869 Revisions Next

r24673 Friday 2nd August, 2013 at 19:09:10 UTC by David Haywood
more corrections (nw)
[src/mame/machine]pgmprot_igs027a_type1.c

trunk/src/mame/machine/pgmprot_igs027a_type1.c
r24672r24673
564564
565565/* preliminary */
566566
567// not accurate, low bits (0x03 mask) are certainly wrong, possibly others
567// not accurate, low bits (0x03 mask) are certainly wrong, possibly others, 0/1 below each shows if i've attempted to automatically verify the value
568568UINT8 puzzli2_level_decode[256] = {
5690x32, 0x3e, 0xb2, 0x37, 0x31, 0x22, 0xd6, 0x0d, 0x35, 0x5c, 0x8d, 0x3c, 0x7a, 0x5f, 0xd4, 0xad,
5700x53, 0xff, 0xe9, 0x45, 0xed, 0x11, 0x68, 0x77, 0xd8, 0x34, 0x36, 0x45, 0xa6, 0xeb, 0x1c, 0xc7,
5710x3b, 0xbd, 0xad, 0x2f, 0x18, 0xde, 0xa1, 0xaa, 0xdd, 0x52, 0x57, 0xc2, 0xe5, 0x0a, 0x01, 0x6d,
5720x67, 0x65, 0x14, 0x70, 0xb7, 0x39, 0x27, 0x78, 0x83, 0xd2, 0x71, 0xb9, 0x10, 0xf5, 0x92, 0x93,
5730xfa, 0xe4, 0x5e, 0xb0, 0xf6, 0xaf, 0x95, 0x8a, 0x7c, 0x73, 0xf9, 0x63, 0x86, 0xcb, 0x1a, 0x56,
5740xf1, 0x3a, 0xae, 0x63, 0x01, 0x29, 0x96, 0x22, 0x8f, 0x5d, 0x9a, 0x65, 0x74, 0x21, 0x20, 0x40,
5750xd3, 0x05, 0xa2, 0xe3, 0xbc, 0x9e, 0x1e, 0x10, 0x15, 0x0c, 0x8a, 0x9c, 0xec, 0x38, 0xb5, 0x9d,
5760x2d, 0xf7, 0x14, 0x0e, 0x85, 0xc7, 0x7f, 0xce, 0x94, 0x16, 0x48, 0xa9, 0x80, 0x6e, 0x7b, 0xd8,
5770xa7, 0x7e, 0x42, 0xe6, 0xa2, 0x2a, 0xef, 0xee, 0x24, 0xba, 0xb8, 0x7e, 0xc9, 0x2b, 0x90, 0xcc,
5780x58, 0xd1, 0xf3, 0xe2, 0x6f, 0xed, 0x9f, 0xf0, 0x4a, 0x54, 0x8d, 0x08, 0xf8, 0x51, 0x68, 0xc8,
5790x03, 0x0b, 0xbb, 0xc1, 0xe3, 0x4c, 0x04, 0xc5, 0x8f, 0x09, 0x0e, 0xbf, 0x62, 0x49, 0x76, 0x59,
5800x1d, 0x80, 0xde, 0x60, 0x07, 0xe2, 0x1b, 0x67, 0xa5, 0xbf, 0xcd, 0x86, 0xdc, 0xc3, 0x6a, 0x4e,
5810xd0, 0xfc, 0xd5, 0x3f, 0x98, 0x96, 0x2e, 0x4c, 0xb3, 0xea, 0x2d, 0x75, 0xe6, 0xc0, 0x6c, 0x69,
5820x9b, 0xb7, 0x43, 0x8b, 0x41, 0x47, 0x02, 0xda, 0x98, 0x3d, 0xa3, 0x79, 0x50, 0x4f, 0xb4, 0x55,
5830x5a, 0x25, 0xf4, 0xc8, 0x58, 0x30, 0xc4, 0x12, 0xa9, 0x45, 0xda, 0x91, 0xa4, 0xaa, 0xfc, 0x84,
5840xfa, 0x88, 0x06, 0xcf, 0xfe, 0x33, 0xd5, 0x28, 0x1d, 0x19, 0x4b, 0xb1, 0x83, 0xf2, 0x72, 0x26,
569    0x32, 0x3e, 0xb2, 0x37, 0x31, 0x22, 0xd6, 0x0d, 0x35, 0x5c, 0x8d, 0x3c, 0x7a, 0x5f, 0xd4, 0xad,
570//   0  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  0  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,
571//   0  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  0  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,
572    0x53, 0xff, 0xe9, 0x45, 0xed, 0x11, 0x68, 0x77, 0xd8, 0x34, 0x36, 0x45, 0xa6, 0xeb, 0x1c, 0xc7,
573//   0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,
574//   0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,
575   0x3b, 0xbd, 0xad, 0x2e, 0x18, 0xdf, 0xa1, 0xaa, 0xdd, 0x52, 0x57, 0xc2, 0xe5, 0x0a, 0x01, 0x6d,
576//   0  ,  0  ,  0  ,  1  ,  1  ,  1  ,  1  ,  0  ,  1  ,  1  ,  0  ,  0  ,  1  ,  1  ,  0  ,  0  ,
577//   0  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  0  ,  1  ,  1  ,  0  ,  0  ,  1  ,  1  ,  0  ,  0  ,
578   0x67, 0x65, 0x15, 0x70, 0xb7, 0x39, 0x27, 0x78, 0x82, 0xd2, 0x71, 0xb9, 0x10, 0xf5, 0x92, 0x93,
579//   0  ,  0  ,  1  ,  1  ,  0  ,  1  ,  1  ,  1  ,  1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,
580//   0  ,  0  ,  1  ,  1  ,  0  ,  0  ,  1  ,  1  ,  1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,
581   0xfa, 0xe7, 0x5e, 0xb0, 0xf6, 0xaf, 0x95, 0x8a, 0x7c, 0x73, 0xf9, 0x63, 0x86, 0xcb, 0x1a, 0x56,
582//   0  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  1  ,  1  ,  0  ,  1  ,  1  ,  1  ,  0  ,
583//   0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  0  ,
584    0xf1, 0x3a, 0xae, 0x61, 0x01, 0x29, 0x96, 0x22, 0x8f, 0x5d, 0x9a, 0x65, 0x74, 0x21, 0x20, 0x40,
585//   0  ,  1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  1  ,  1  ,  1  ,
586//   0  ,  1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  1  ,  1  ,  1  ,
587    0xd3, 0x05, 0xa2, 0xe3, 0xbc, 0x9e, 0x1e, 0x10, 0x15, 0x0c, 0x8a, 0x9c, 0xec, 0x38, 0xb5, 0x9d,
588//   1  ,  0  ,  0  ,  0  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  1  ,
589//   1  ,  0  ,  0  ,  0  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  1  ,
590    0x2d, 0xf7, 0x17, 0x0e, 0x85, 0xc7, 0x7f, 0xce, 0x94, 0x16, 0x48, 0xa9, 0x80, 0x6e, 0x7b, 0xd8,
591//   1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  1  ,  0  ,  0  ,  1  ,  1  ,  1  ,
592//   1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  1  ,  0  ,  0  ,  1  ,  1  ,  1  ,
593    0xa7, 0x7e, 0x42, 0xe6, 0xa0, 0x2a, 0xef, 0xee, 0x24, 0xba, 0xb8, 0x7e, 0xc9, 0x2b, 0x90, 0xcc,
594//   1  ,  0  ,  1  ,  1  ,  1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,
595//   1  ,  0  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,
596    0x58, 0xd1, 0xf3, 0xe2, 0x6f, 0xed, 0x9f, 0xf0, 0x4a, 0x54, 0x8d, 0x08, 0xf8, 0x51, 0x68, 0xc8,
597//   0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  1  ,
598//   0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  1  ,
599    0x03, 0x0b, 0xbb, 0xc1, 0xe3, 0x4c, 0x04, 0xc5, 0x8f, 0x09, 0x0e, 0xbf, 0x62, 0x49, 0x76, 0x59,
600//   1  ,  1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  1  ,  1  ,  0  ,  0  ,  1  ,  1  ,  1  ,  1  ,  0  ,
601//   1  ,  1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  1  ,  1  ,  0  ,  0  ,  1  ,  1  ,  1  ,  1  ,  0  ,
602    0x1d, 0x80, 0xde, 0x60, 0x07, 0xe2, 0x1b, 0x67, 0xa5, 0xbf, 0xcd, 0x87, 0xdc, 0xc3, 0x6b, 0x4e,
603//   0  ,  1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  0  ,  1  ,  1  ,
604//   0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  0  ,  1  ,  1  ,
605    0xd0, 0xfc, 0xd4, 0x3f, 0x98, 0x96, 0x2f, 0x4c, 0xb3, 0xea, 0x2c, 0x75, 0xe6, 0xc0, 0x6c, 0x6a,
606//   0  ,  0  ,  1  ,  1  ,  0  ,  1  ,  1  ,  1  ,  1  ,  0  ,  1  ,  1  ,  0  ,  1  ,  1  ,  1  ,
607//   0  ,  0  ,  1  ,  1  ,  0  ,  1  ,  1  ,  1  ,  0  ,  0  ,  1  ,  1  ,  0  ,  1  ,  1  ,  1  ,
608    0x9b, 0xb7, 0x43, 0x8b, 0x41, 0x47, 0x02, 0xda, 0x98, 0x3d, 0xa3, 0x79, 0x50, 0x4f, 0xb4, 0x55,
609//   1  ,  0  ,  0  ,  0  ,  1  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  1  ,  0  ,  1  ,  1  ,  1  ,
610//   1  ,  0  ,  0  ,  0  ,  1  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  1  ,  0  ,  1  ,  1  ,  1  ,
611    0x5a, 0x25, 0xf4, 0xca, 0x58, 0x30, 0xc4, 0x12, 0xa9, 0x46, 0xda, 0x91, 0xa4, 0xaa, 0xfc, 0x84,
612//   1  ,  1  ,  0  ,  1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  0  ,
613//   1  ,  1  ,  0  ,  1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  0  ,
614    0xfa, 0x88, 0x06, 0xcf, 0xfe, 0x33, 0xd5, 0x28, 0x1d, 0x19, 0x4a, 0xb1, 0x83, 0xf2, 0x72, 0x26,
615//   0  ,  0  ,  1  ,  1  ,  1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  1  ,  1  ,  1  ,  1  ,  1  ,  1  ,
616//   0  ,  0  ,  1  ,  1  ,  1  ,  1  ,  1  ,  1  ,  0  ,  0  ,  0  ,  0  ,  1  ,  1  ,  0  ,  0  ,
585617};
586618
587619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
588654static int hackcount = 0;
589655static int hackcount2 = 0;
590656static int hack_47_value = 0;
r24672r24673
18321898
18331899   int offset;
18341900   int limit;
1835   UINT8 coverage[256];
1901   UINT8 coverage[256]; // coverage is how much of the table we've managed to verify using known facts about the table structure
18361902   for (int i=0;i<256;i++)
18371903      coverage[i] = 0;
18381904
r24672r24673
18631929      int entries_left = 0;
18641930      int currentcolumn = 0;
18651931      int num_entries = 0;
1866
1932      int full_entry = 0;
1933      int prev_tablloc = 0;
18671934      int x  =  0;
18681935      for (x=val1; x<val2;x++)
18691936      {
r24672r24673
18941961               printf("%02x <- Number of Entries for this Column (column is %d) (xor table location is %02x) ", rawvalue, currentcolumn, tableloc);
18951962               stage = 2;
18961963               entries_left = (rawvalue >> 4);
1964               full_entry = rawvalue;
1965               prev_tablloc = tableloc;
18971966
18981967               num_entries = entries_left;
18991968
r24672r24673
19251994                     new_puzzli2_level_decode[tableloc] ^= rawvalue;
19261995
19271996                  }
1997                  coverage[prev_tablloc] = 1;
1998                  if (full_entry!=0)
1999                  {
2000                     printf(" previous value wasn't 0x00");
2001                  }
19282002
19292003               }
19302004
r24672r24673
19602034      printf("\n");
19612035
19622036   }
1963
2037   int c=0;
19642038   for (int i=0;i<256;i++)
19652039   {
1966      printf("%d ",coverage[i]);
1967
2040      printf(" %d  , ",coverage[i]);
2041      c++;
2042      if (c==16)
2043      {
2044         printf("\n");
2045         c = 0;
2046      }
19682047   }
19692048   printf("\n");
19702049
1971   int c=0;
2050   c=0;
2051
19722052   for (int i=0;i<256;i++)
19732053   {
19742054      printf("0x%02x, ", new_puzzli2_level_decode[i]);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team