Previous 199869 Revisions Next

r24670 Friday 2nd August, 2013 at 18:08:50 UTC by David Haywood
further improvements (nw)
[src/mame/machine]pgmprot_igs027a_type1.c

trunk/src/mame/machine/pgmprot_igs027a_type1.c
r24669r24670
568568UINT8 puzzli2_level_decode[256] = {
5695690x32, 0x3e, 0xb2, 0x37, 0x31, 0x22, 0xd6, 0x0d, 0x35, 0x5c, 0x8d, 0x3c, 0x7a, 0x5f, 0xd4, 0xad,
5705700x53, 0xff, 0xe9, 0x45, 0xed, 0x11, 0x68, 0x77, 0xd8, 0x34, 0x36, 0x45, 0xa6, 0xeb, 0x1c, 0xc7,
5710x3b, 0xbd, 0xad, 0x2f, 0x18, 0xde, 0xa1, 0xaa, 0xdd, 0x50, 0x57, 0xc2, 0xe5, 0x0a, 0x01, 0x6d,
5720x67, 0x65, 0x14, 0x70, 0xb7, 0x39, 0x24, 0x79, 0x83, 0xd2, 0x71, 0xb9, 0x10, 0xf5, 0x92, 0x93,
5730xfa, 0xe4, 0x5e, 0xb0, 0xf6, 0xaf, 0x95, 0x8a, 0x7d, 0x73, 0xf9, 0x63, 0x86, 0xcb, 0x1a, 0x56,
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,
5745740xf1, 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, 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7, 0x43, 0x8b, 0x41, 0x47, 0x02, 0xda, 0x98, 0x3d, 0xa3, 0x79, 0x50, 0x4f, 0xb4, 0x55,
5835830x5a, 0x25, 0xf4, 0xc8, 0x58, 0x30, 0xc4, 0x12, 0xa9, 0x45, 0xda, 0x91, 0xa4, 0xaa, 0xfc, 0x84,
5840xfa, 0x88, 0x06, 0xce, 0xfe, 0x32, 0xd5, 0x28, 0x1d, 0x19, 0x4b, 0xb1, 0x83, 0xf2, 0x72, 0x26,
5840xfa, 0x88, 0x06, 0xcf, 0xfe, 0x33, 0xd5, 0x28, 0x1d, 0x19, 0x4b, 0xb1, 0x83, 0xf2, 0x72, 0x26,
585585};
586586
587587
r24669r24670
18251825//#define PUZZLI2_LEVEL_STRUCTURE_LOG
18261826#ifdef PUZZLI2_LEVEL_STRUCTURE_LOG
18271827   UINT8 *src2 = (UINT8 *) (machine().root_device().memregion("maincpu")->base());
1828   UINT8 new_puzzli2_level_decode[256];
18281829
1830   for (int i=0;i<256;i++)
1831      new_puzzli2_level_decode[i] = puzzli2_level_decode[i];
1832
18291833   int offset;
18301834   int limit;
1835   UINT8 coverage[256];
1836   for (int i=0;i<256;i++)
1837      coverage[i] = 0;
18311838
18321839   if (!strcmp(machine().system().name,"puzzli2"))
18331840   {
r24669r24670
19001907            }
19011908            else if (stage==2)
19021909            {   
1903               printf("%02x <- Mask value equal to number of entries\n", rawvalue);
1910               printf("%02x <- Mask value equal to number of entries (xor table location is %02x)", rawvalue, tableloc);
19041911               stage = 3;
19051912
19061913               //
r24669r24670
19091916                  // for 0 entries skip back to state 1 instead of 3, because there is nothing following
19101917                  stage = 1;
19111918                  currentcolumn++;
1919
1920                  coverage[tableloc] = 1;
1921                  if (rawvalue!=0)
1922                  {
1923                     printf(" invalid mask after 00 length?");
1924                     // attempt to correct the table
1925                     new_puzzli2_level_decode[tableloc] ^= rawvalue;
1926
1927                  }
1928
19121929               }
19131930
1931               printf("\n");
1932
19141933            }
19151934            else if (stage==3)
19161935            {
r24669r24670
19351954
19361955      printf("total number of valid columns was %02x\n", currentcolumn);
19371956
1938      if ((currentcolumn!=0x6) && (currentcolumn!=0x7) && (currentcolumn!=0x8) && (currentcolumn!=0x5))  // 5 is suspicious
1957      if ((currentcolumn!=0x6) && (currentcolumn!=0x7) && (currentcolumn!=0x8))  // 5 is suspicious
19391958         fatalerror("invalid number of columns?\n");
19401959
19411960      printf("\n");
19421961
19431962   }
1963
1964   for (int i=0;i<256;i++)
1965   {
1966      printf("%d ",coverage[i]);
1967
1968   }
1969   printf("\n");
1970
1971   int c=0;
1972   for (int i=0;i<256;i++)
1973   {
1974      printf("0x%02x, ", new_puzzli2_level_decode[i]);
1975
1976      c++;
1977      if (c==16)
1978      {
1979         printf("\n");
1980         c = 0;
1981      }
1982   }
1983
19441984#endif
19451985
19461986

Previous 199869 Revisions Next


© 1997-2024 The MAME Team