Previous 199869 Revisions Next

r24800 Wednesday 7th August, 2013 at 19:22:00 UTC by David Haywood
improved some puzzli2 notes, decided to mark the games as working, I can't find any remaining issues.

new working games
Puzzli 2 [David Haywood, rtw]
Puzzli 2 Super [David Haywood, rtw]
[src/mame/drivers]pgm.c
[src/mame/machine]pgmprot_igs027a_type1.c

trunk/src/mame/drivers/pgm.c
r24799r24800
40744074
40754075GAME( 2003, espgal,       0,         pgm_arm_type1_cave,    pgm, pgm_arm_type1_state,     espgal,    ROT270, "Cave", "Espgaluda (2003/10/15 Master Ver)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
40764076
4077// protection simulated, but should be correct
4078GAME( 1999, puzzli2,      pgm,       pgm_arm_type1_sim,  puzzli2, pgm_arm_type1_state,    puzzli2,    ROT0,   "IGS", "Puzzli 2 (ver. 100)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // ROM label is V100 ( V0001, 11/22/99 09:27:58 in program ROM )
4079GAME( 2001, puzzli2s,     puzzli2,   pgm_arm_type1_sim,  puzzli2, pgm_arm_type1_state,    puzzli2,    ROT0,   "IGS", "Puzzli 2 Super (ver. 200)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )  // ( V200, 12/28/01 12:53:34 in program ROM )
40774080
4081
4082
40784083/* -----------------------------------------------------------------------------------------------------------------------
40794084   Partially Working, playable, but some imperfections
40804085   -----------------------------------------------------------------------------------------------------------------------*/
r24799r24800
41164121GAME( 2001, py2k2,        pgm,       pgm_arm_type1_sim,    py2k2, pgm_arm_type1_state,    py2k2,      ROT0,   "IGS", "Photo Y2K 2", GAME_NOT_WORKING )  /* need internal rom of IGS027A */
41174122GAME( 2004, pgm3in1,      pgm,       pgm_arm_type1_sim,    py2k2, pgm_arm_type1_state,    pgm3in1,      ROT0,   "IGS", "Photo Y2K 2 (Flash 3-in-1)", GAME_NOT_WORKING )  /* need internal rom of IGS027A */
41184123
4119GAME( 1999, puzzli2,      pgm,       pgm_arm_type1_sim,  puzzli2, pgm_arm_type1_state,    puzzli2,    ROT0,   "IGS", "Puzzli 2 (ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // ROM label is V100 ( V0001, 11/22/99 09:27:58 in program ROM )
4120GAME( 2001, puzzli2s,     puzzli2,   pgm_arm_type1_sim,  puzzli2, pgm_arm_type1_state,    puzzli2,    ROT0,   "IGS", "Puzzli 2 Super (ver. 200)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )  // ( V200, 12/28/01 12:53:34 in program ROM )
41214124
4122
41234125/* Games below this point are known to have an 'execute only' internal ROM area covering an area at the start of the internal ROM.  This can't be read when running code from either internal or external ROM space. */
41244126
41254127// all 3 68k roms still have V100 strings, but are clearly different builds, there don't appear to be build string dates in them.  Two of the external ARM roms are marked V100 but are different builds, it's possible the single PCB version 100 is based on a later main revision
trunk/src/mame/machine/pgmprot_igs027a_type1.c
r24799r24800
569569
570570/* preliminary */
571571
572// fairly accurate now, although could still do with finding a way to verify on hw
572// should be correct, note each value only appears once
573573UINT8 puzzli2_level_decode[256] = {
574574  // 0  ,  1  ,  2  ,  3  ,  4  ,  5   , 6  ,  7  ,  8  ,  9  ,  a  ,  b  ,  c  ,  d  ,  e  ,  f  ,
575575   0x32, 0x3e, 0xb2, 0x37, 0x31, 0x22, 0xd6, 0x0d, 0x35, 0x5c, 0x8d, 0x3c, 0x7a, 0x5f, 0xd7, 0xac, // 0x0
r24799r24800
607607};
608608
609609
610#define puzzli2_printf logerror
610611
611
612612void pgm_arm_type1_state::command_handler_puzzli2(int pc)
613613{
614614
r24799r24800
687687
688688         if (command_31_write_type==2)
689689         {
690            printf("%08x: %02x %04x | ",pc, m_ddp3lastcommand, m_value0);
690            puzzli2_printf("%08x: %02x %04x | ",pc, m_ddp3lastcommand, m_value0);
691691
692692            // this shouldn't apply to the stuff written on startup, only the level data..
693693
r24799r24800
700700               hackcount2++;
701701               m_valueresponse = 0x00d20000;
702702
703               //printf("(set xor table offset)\n");
703               //puzzli2_printf("(set xor table offset)\n");
704704            }
705705            else  // how do we decide end?
706706            {
r24799r24800
715715
716716                  //UINT8 tableaddr = (hack_31_table_offset + (hack_31_table_offset2&0xf))&0xff;
717717                  //UINT8 xoredval = m_value0 ^ puzzli2_level_decode[tableaddr];
718                  //printf("value %02x, after xor is %02x (table address,value %02x,%02x)\n", m_value0, xoredval, tableaddr, puzzli2_level_decode[tableaddr]);
718                  //puzzli2_printf("value %02x, after xor is %02x (table address,value %02x,%02x)\n", m_value0, xoredval, tableaddr, puzzli2_level_decode[tableaddr]);
719719           
720720                  hackcount2++;
721721                  hack_31_table_offset2++;
r24799r24800
729729           
730730                  //UINT8 tableaddr = (hack_31_table_offset + (hack_31_table_offset2&0xf))&0xff;
731731                  //UINT8 xoredval = m_value0 ^ puzzli2_level_decode[tableaddr];
732                  //printf("value %02x, after xor is %02x (table address,value %02x,%02x) (end, returning %02x as playfield width)\n", m_value0, xoredval, tableaddr, puzzli2_level_decode[tableaddr], m_valueresponse);
732                  //puzzli2_printf("value %02x, after xor is %02x (table address,value %02x,%02x) (end, returning %02x as playfield width)\n", m_value0, xoredval, tableaddr, puzzli2_level_decode[tableaddr], m_valueresponse);
733733
734734
735735               }
r24799r24800
740740         else
741741         {
742742            // todo, responses when uploading the startup values are different
743            printf("%08x: %02x %04x (for z80 address?)\n ",pc, m_ddp3lastcommand, m_value0);
743            puzzli2_printf("%08x: %02x %04x (for z80 address?)\n ",pc, m_ddp3lastcommand, m_value0);
744744
745745            m_valueresponse = 0x00d20000 | p2_31_retcounter;
746746            p2_31_retcounter++; // returns 0xc for the first one, 0x19 for the last one
r24799r24800
754754      // the game expects to read back a fully formed level structure from the ARM
755755      case 0x13:
756756      {
757         printf("%08x: %02x %04x (READ LEVEL DATA) | ",pc, m_ddp3lastcommand, m_value0);
757         puzzli2_printf("%08x: %02x %04x (READ LEVEL DATA) | ",pc, m_ddp3lastcommand, m_value0);
758758
759759         // this is the how to play screen, correctly returned with current code
760760         /*
r24799r24800
774774         if (hackcount==0)
775775         {
776776            m_valueresponse = 0x002d0000 | ((depth>>4)+1); // this *seems* to come from upper bits of the first real value written to the device during the level stream (verify, seems wrong for some levels because you get a black bar on the bottom of the screen, but might be bad xors)
777            printf("level depth returning %08x\n", m_valueresponse );
777            puzzli2_printf("level depth returning %08x\n", m_valueresponse );
778778         }
779779         else if (hackcount<((10*numbercolumns)+1))
780780         {
781781            m_valueresponse = 0x002d0000 | leveldata[hackcount-1];
782            printf("level data returning %08x\n", m_valueresponse );
782            puzzli2_printf("level data returning %08x\n", m_valueresponse );
783783         }
784784         else
785785         {
786786            hackcount=0;
787787            m_valueresponse = 0x00740054;  // 0x0074 0054 is returned after how to play reads above.. where does 0x54 come from?
788            printf("END returning %08x\n", m_valueresponse );
788            puzzli2_printf("END returning %08x\n", m_valueresponse );
789789
790790         }
791791
r24799r24800
802802
803803
804804      case 0x38: // Reset
805         printf("%08x: %02x %04x (RESET)\n",pc, m_ddp3lastcommand, m_value0);
805         puzzli2_printf("%08x: %02x %04x (RESET)\n",pc, m_ddp3lastcommand, m_value0);
806806         m_simregion = ioport("Region")->read();
807807         m_valueresponse = 0x780000 | m_simregion<<8; // this must also return the cart region or the game will act in odd ways when inserting a coin on continue, or during the game on later levels
808808         m_valuekey = 0x100;
r24799r24800
817817      // also some other gfx?
818818      // logic here seems correct, not sure where the 0x19 and 0x5 etc. come from tho!
819819      case 0x47:
820         printf("%08x: %02x %04x (GFX OFF PART 1)\n",pc, m_ddp3lastcommand, m_value0);
820         puzzli2_printf("%08x: %02x %04x (GFX OFF PART 1)\n",pc, m_ddp3lastcommand, m_value0);
821821
822822         hack_47_value = m_value0;
823823
824824         //hack_47_value = ((m_value0 & 0x0700)>>8) * 0x19;
825825         //hack_47_value +=((m_value0 & 0x0007)>>0) * 0x05;
826         if (m_value0 & 0xf0f0) printf("unhandled 0x47 bits %04x\n", m_value0);
826         if (m_value0 & 0xf0f0) puzzli2_printf("unhandled 0x47 bits %04x\n", m_value0);
827827
828         //printf("0x47 value was %04x - using %04x\n", m_value0, hack_47_value);
828         //puzzli2_printf("0x47 value was %04x - using %04x\n", m_value0, hack_47_value);
829829
830830         m_valueresponse = 0x00740047;
831831
832832      break;
833833
834834      case 0x52:
835         printf("%08x: %02x %04x (GFX OFF PART 2)\n",pc, m_ddp3lastcommand, m_value0);
835         puzzli2_printf("%08x: %02x %04x (GFX OFF PART 2)\n",pc, m_ddp3lastcommand, m_value0);
836836
837         //printf("which %04x\n", m_value0);
838         if (m_value0 & 0xfff0) printf("unhandled 0x52 bits %04x\n", m_value0);
837         //puzzli2_printf("which %04x\n", m_value0);
838         if (m_value0 & 0xfff0) puzzli2_printf("unhandled 0x52 bits %04x\n", m_value0);
839839
840840         // it writes a value of 0x0000 then expects to read back like
841841         // this for the lower part of the game backgrounds
r24799r24800
861861
862862
863863      case 0x61: // ??
864         printf("%08x: %02x %04x\n",pc, m_ddp3lastcommand, m_value0);
864         puzzli2_printf("%08x: %02x %04x\n",pc, m_ddp3lastcommand, m_value0);
865865         
866866         // this command is written before the values used to decrypt the z80 addresses (assumed) are uploaded with command 31
867867         command_31_write_type = 1;
r24799r24800
871871      break;
872872
873873      case 0x41: // ASIC status?
874         printf("%08x: %02x %04x (UNK)\n",pc, m_ddp3lastcommand, m_value0);
874         puzzli2_printf("%08x: %02x %04x (UNK)\n",pc, m_ddp3lastcommand, m_value0);
875875
876876         // this command is written after the values used to decrypt the z80 addresses (assumed) are uploaded with command 31
877877         command_31_write_type = 0;
r24799r24800
881881      break;
882882
883883      case 0x54: // ??
884         printf("%08x: %02x %04x\n",pc, m_ddp3lastcommand, m_value0);
884         puzzli2_printf("%08x: %02x %04x\n",pc, m_ddp3lastcommand, m_value0);
885885         
886886         // this command is written before uploading the compressed level data stream with command 31
887887
r24799r24800
900900      break;
901901
902902   /*
903     these are probably scrambled with some kind of rotating xor?
904     note puzzli2   004e  == 0016?
905          puzzli2s  0051  == 0019?
906         maybe...
907903
908     puzzli2 on startup
904  puzzli2 on startup (00148a84)         puzzli2s on startup (0014cf58)
905                                               
906      (001489f6: 61 0202  0014ceca: 61 0202)
907                                             always
908      : 31 004e a6f7 | : 31 | 0051 14c9       + 26DD2
909      : 31 279e 534f | : 31 | 27a0 c121 
910      : 31 ab5c a7cf | : 31 | ab5f 15a1 
911      : 31 145f 7054 | : 31 | 1461 de26 
912      : 31 85a0 7b7f | : 31 | 85a2 e951 
913      : 31 7003 c5ab | : 31 | 7006 337d 
914      : 31 456d f3aa | : 31 | 4570 617c 
909915
910      001489f6: 61 0202
911      00148a84: 31 004e
912      00148acc: 31 a6f7
913      00148a84: 31 279e
914      00148acc: 31 534f
915      00148a84: 31 ab5c
916      00148acc: 31 a7cf
917      00148a84: 31 145f
918      00148acc: 31 7054
919      00148a84: 31 85a0
920      00148acc: 31 7b7f
921     
922      00148a84: 31 7003
923      00148acc: 31 c5ab
924      00148a84: 31 456d
925      00148acc: 31 f3aa
926      00148b34: 41 e2bb
927   
928     puzzli2 super on startup
929      0014ceca: 61 0202
930      0014cf58: 31 0051
931      0014cfa0: 31 14c9
932      0014cf58: 31 27a0
933      0014cfa0: 31 c121
934      0014cf58: 31 ab5f
935      0014cfa0: 31 15a1
936      0014cf58: 31 1461
937      0014cfa0: 31 de26
938      0014cf58: 31 85a2
939      0014cfa0: 31 e951
940     
941      0014cf58: 31 7006
942      0014cfa0: 31 337d
943      0014cf58: 31 4570
944      0014cfa0: 31 617c
945      0014d008: 41 706d
916      (00148b34: 41 e2bb  0014d008: 41 706d)
946917
918      actual values needed       always
919      0x001694a8 / 0x0019027a  + 26DD2
920      0x0016cfae / 0x00193D80
921      0x0016ebf2 / 0x001959c4
922      0x0016faa8 / 0x0019687a
923      0x00174416 / 0x0019b1e8
924
925      0x00166178 / 0x0018cf4a
926      0x00166e72 / 0x0018dc44
927
928       as you can see the difference between the values written is always 26dd2, as is the difference between offsets expected
929       this makes it impossible to know which value is for which address without further tests!
930   
931   
947932   */
948933
949934      // I think the values returned here must be connected to the values written to command 31 on startup
950935      // 63/67 are used on startup to get the z80 music at least
951936      case 0x63: // used as a read address by the 68k code (related to previous uploaded values like cave?) should point at a table of ~0x80 in size? seems to use values as further pointers?
952         printf("%08x: %02x %04x (Z80 ADDR PART 1)\n",pc, m_ddp3lastcommand, m_value0);
937         puzzli2_printf("%08x: %02x %04x (Z80 ADDR PART 1)\n",pc, m_ddp3lastcommand, m_value0);
953938
954939         if (!strcmp(machine().system().name,"puzzli2"))
955940         {
r24799r24800
975960            }
976961            else
977962            {
978               printf("unk case x63\n");
963               puzzli2_printf("unk case x63\n");
979964               m_valueresponse = 0x00600000; // wrong
980965
981966            }
r24799r24800
1004989            }
1005990            else
1006991            {
1007               printf("unk case x63\n");
992               puzzli2_printf("unk case x63\n");
1008993               m_valueresponse = 0x00600000; // wrong
1009994            }
1010995         }
1011996      break;
1012997
1013998      case 0x67: // used as a read address by the 68k code (related to previous uploaded values like cave?) directly reads ~0xDBE from the address..
1014         printf("%08x: %02x %04x (Z80 ADDR PART 2)\n",pc, m_ddp3lastcommand, m_value0);
999         puzzli2_printf("%08x: %02x %04x (Z80 ADDR PART 2)\n",pc, m_ddp3lastcommand, m_value0);
10151000
10161001         if (!strcmp(machine().system().name,"puzzli2"))
10171002         {
r24799r24800
10251010            }
10261011            else
10271012            {
1028               printf("unk case x67\n");
1013               puzzli2_printf("unk case x67\n");
10291014               m_valueresponse = 0x00400000; // wrong
10301015            }
10311016         }
r24799r24800
10411026            }
10421027            else
10431028            {
1044               printf("unk case x67\n");
1029               puzzli2_printf("unk case x67\n");
10451030               m_valueresponse = 0x00600000; // wrong
10461031            }
10471032         }
10481033      break;
10491034
10501035      default:
1051         printf("%08x: %02x %04x\n",pc, m_ddp3lastcommand, m_value0);
1036         puzzli2_printf("%08x: %02x %04x\n",pc, m_ddp3lastcommand, m_value0);
10521037
10531038         m_valueresponse = 0x74<<16;
10541039      break;
r24799r24800
10611046   switch (m_ddp3lastcommand)
10621047   {
10631048      default:
1064         printf("%06x command %02x | %04x\n", pc, m_ddp3lastcommand, m_value0);
1049         puzzli2_printf("%06x command %02x | %04x\n", pc, m_ddp3lastcommand, m_value0);
10651050         m_valueresponse = 0x880000;
10661051         break;
10671052
10681053      case 0xc0:
1069         printf("%06x command %02x | %04x\n", pc, m_ddp3lastcommand, m_value0);
1054         puzzli2_printf("%06x command %02x | %04x\n", pc, m_ddp3lastcommand, m_value0);
10701055         m_valueresponse = 0x880000;
10711056         break;
10721057
r24799r24800
18851870      depth = 0;
18861871      m_row_bitmask = 0;
18871872
1888      printf("%02x <- table offset\n", datvalue);
1873      puzzli2_printf("%02x <- table offset\n", datvalue);
18891874      tableoffs = datvalue;
18901875      tableoffs2 = 0;
18911876      stage = 0;
r24799r24800
19091894         numbercolumns = (rawvalue & 0x0f);
19101895         numbercolumns++;
19111896
1912         printf("%02x <- Sizes (level depth %01x) (number of columns %01x)", rawvalue, depth>>4, numbercolumns);
1897         puzzli2_printf("%02x <- Sizes (level depth %01x) (number of columns %01x)", rawvalue, depth>>4, numbercolumns);
19131898
19141899
19151900         if ((depth != 0x80) && (depth != 0x70) && (depth != 0x50))
r24799r24800
19221907         if ((numbercolumns != 0x6) && (numbercolumns != 0x7) && (numbercolumns != 0x8))
19231908            fatalerror("number of columns specified isn't 6,7, or 8");
19241909
1925         printf("\n");
1910         puzzli2_printf("\n");
19261911
19271912      }
19281913      else if (stage==1)
19291914      {
1930         printf("%02x <- Number of Entries for this Column (and upper mask) (column is %d) (xor table location is %02x) ", rawvalue, currentcolumn, tableloc);
1915         puzzli2_printf("%02x <- Number of Entries for this Column (and upper mask) (column is %d) (xor table location is %02x) ", rawvalue, currentcolumn, tableloc);
19311916         stage = 2;
19321917         entries_left = (rawvalue >> 4);
19331918         m_row_bitmask = (rawvalue & 0x0f)<<8;
r24799r24800
19391924
19401925         if (num_entries == 0x00)
19411926         {
1942            printf("0 entries for this column?"); // seems a valid condition based on the data
1927            puzzli2_printf("0 entries for this column?"); // seems a valid condition based on the data
19431928         }
19441929
19451930
19461931
1947         printf("\n");
1932         puzzli2_printf("\n");
19481933
19491934               
19501935      }
19511936      else if (stage==2)
19521937      {   
1953         printf("%02x <- Mask value equal to number of entries (xor table location is %02x)", rawvalue, tableloc);
1938         puzzli2_printf("%02x <- Mask value equal to number of entries (xor table location is %02x)", rawvalue, tableloc);
19541939         stage = 3;
19551940
19561941         m_row_bitmask |= rawvalue;
r24799r24800
19581943         int num_mask_bits = count_bits(m_row_bitmask);
19591944
19601945         if (num_mask_bits != num_entries)
1961            printf(" error - number of mask bits != number of entries - ");
1946            puzzli2_printf(" error - number of mask bits != number of entries - ");
19621947
19631948         //
19641949         if (entries_left == 0)
r24799r24800
19721957            coverage[tableloc] = 1;
19731958            if (rawvalue!=0)
19741959            {
1975               printf(" invalid mask after 00 length?");
1960               puzzli2_printf(" invalid mask after 00 length?");
19761961               // attempt to correct the table
19771962               //new_puzzli2_level_decode[tableloc] = new_puzzli2_level_decode[tableloc] ^ rawvalue;
19781963
r24799r24800
19801965            coverage[prev_tablloc] = 1;
19811966            if (full_entry!=0)
19821967            {
1983               printf(" previous value wasn't 0x00");
1968               puzzli2_printf(" previous value wasn't 0x00");
19841969            }
19851970
19861971            if (currentcolumn==numbercolumns)
r24799r24800
19931978         {
19941979            if (num_entries> 0xa)
19951980            {
1996               printf(" more than 10 entries?");
1981               puzzli2_printf(" more than 10 entries?");
19971982            }
19981983            else
19991984            {
r24799r24800
20182003
20192004               if (rawvalue!=desired_mask)
20202005               {
2021                  printf(" possible wrong mask?");
2006                  puzzli2_printf(" possible wrong mask?");
20222007               }
20232008
20242009
r24799r24800
20262011
20272012         }
20282013
2029         printf("\n");
2014         puzzli2_printf("\n");
20302015
20312016      }
20322017      else if (stage==3)
r24799r24800
20482033         // 110 - renders as a flashing fish you can't catch? glitches game?
20492034         // 111 - repeat of other fish type you can't catch...
20502035
2036         if (rawvalue<=0x10) // regular fish
2037         {
2038            int fishtype = rawvalue;
2039            puzzli2_printf("%02x <- fish type %d", rawvalue, fishtype);
2040            object_value = 0x0100 + fishtype;
2041            // 0x110 is a flashy fish? might be glitchy and need a special number..
2042         }
2043         else if (rawvalue<=0x21) // fish in bubbles
2044         {
2045            int fishtype = rawvalue - 0x11;
2046            puzzli2_printf("%02x <- fish in bubble %d", rawvalue, fishtype);
2047            object_value = 0x0120 + fishtype;
2048            // 0x130 is a flashy fish? might be glitchy and need a special number..
2049         }
2050         else if (rawvalue<=0x32) // fish in eggs
2051         {
2052            int fishtype = rawvalue - 0x22;
2053            puzzli2_printf("%02x <- fish in egg %d", rawvalue, fishtype);
2054            object_value = 0x0140 + fishtype;
2055            // 0x150 is a flashy fish? might be glitchy and need a special number..
20512056
2052         // some of these might be due to bad decrypt values in the table
2053         ////////////////////// regular fish group
2054         if (rawvalue==0x00)      {object_value = 0x0100; printf("%02x <- fish type 0", rawvalue);}
2055         else if (rawvalue==0x01) {object_value = 0x0101; printf("%02x <- fish type 1", rawvalue);}
2056         else if (rawvalue==0x02) {object_value = 0x0102; printf("%02x <- fish type 2", rawvalue);}
2057         else if (rawvalue==0x03) {object_value = 0x0103; printf("%02x <- fish type 3", rawvalue);}
2058         else if (rawvalue==0x04) {object_value = 0x0104; printf("%02x <- fish type 4", rawvalue);}
2059         else if (rawvalue==0x05) {object_value = 0x0105; printf("%02x <- fish type 5", rawvalue);}
2060         else if (rawvalue==0x06) {object_value = 0x0106; printf("%02x <- fish type 6", rawvalue);}
2061         else if (rawvalue==0x07) {object_value = 0x0107; printf("%02x <- fish type 7", rawvalue);}
2062         else if (rawvalue==0x08) {object_value = 0x0108; printf("%02x <- fish type 8", rawvalue);} // usually used to have the 2nd stripey type in a level
2063         // 09?
2064         // 0a?
2065         else if (rawvalue==0x0b) {object_value = 0x010b; printf("%02x <- unk object ?? 0b", rawvalue);}
2066         else if (rawvalue==0x0c) {object_value = 0x010c; printf("%02x <- unk object ?? 0c", rawvalue);}
2067         else if (rawvalue==0x0d) {object_value = 0x010d; printf("%02x <- unk object ?? 0d", rawvalue);}
2068         else if (rawvalue==0x0e) {object_value = 0x010e; printf("%02x <- unk object ?? 0e", rawvalue);}
2069         else if (rawvalue==0x0f) {object_value = 0x010f; printf("%02x <- unk object ?? 0f", rawvalue);}
2070         else if (rawvalue==0x10) {object_value = 0x0110; printf("%02x <- unk object ?? 10", rawvalue);} // broken flashy fish thing??
2071         ////////////////////// fish in bubble group
2072         else if (rawvalue==0x11) {object_value = 0x0120; printf("%02x <- unk object ?? 11", rawvalue);} // bubble type 0?
2073         else if (rawvalue==0x12) {object_value = 0x0121; printf("%02x <- fish in bubble (type 1?)", rawvalue);}
2074         else if (rawvalue==0x13) {object_value = 0x0122; printf("%02x <- fish in bubble (type 2?)", rawvalue);}
2075         else if (rawvalue==0x14) {object_value = 0x0123; printf("%02x <- fish in bubble (type 3?)??", rawvalue);}
2076         else if (rawvalue==0x15) {object_value = 0x0124; printf("%02x <- fish in bubble (type 4?)??", rawvalue);}
2077         else if (rawvalue==0x16) {object_value = 0x0125; printf("%02x <- fish in bubble (type 5?)??", rawvalue);}
2078         else if (rawvalue==0x17) {object_value = 0x0126; printf("%02x <- fish in bubble (type 6?)", rawvalue);}
2079         else if (rawvalue==0x18) {object_value = 0x0127; printf("%02x <- fish in bubble (type 7?)", rawvalue);}
2080         else if (rawvalue==0x19) {object_value = 0x0128; printf("%02x <- fish in bubble (type 8?)", rawvalue);}
2081         // 1a
2082         // 1b
2083         // 1c
2084         // 1d
2085         else if (rawvalue==0x1e) {object_value = 0x012d; printf("%02x <- unk object ?? 1e", rawvalue);}
2086         // 1f
2087         // 20
2088         else if (rawvalue==0x21) {object_value = 0x0130; printf("%02x <- unk object ?? 21", rawvalue);}// puzzli2  // broken flashy thing in a bubble?
2089         ////////////////////// fish in egg group
2090         else if (rawvalue==0x22) {object_value = 0x0140; printf("%02x <- fish in egg (type 0)", rawvalue);}
2091         else if (rawvalue==0x23) {object_value = 0x0141; printf("%02x <- fish in egg (type 1)", rawvalue);}
2092         else if (rawvalue==0x24) {object_value = 0x0142; printf("%02x <- fish in egg (type 2)", rawvalue);}
2093         else if (rawvalue==0x25) {object_value = 0x0143; printf("%02x <- fish in egg (type 3)", rawvalue);}
2094         else if (rawvalue==0x26) {object_value = 0x0144; printf("%02x <- fish in egg (type 4)", rawvalue);}
2095         else if (rawvalue==0x27) {object_value = 0x0145; printf("%02x <- fish in egg (type 5)", rawvalue);}
2096         else if (rawvalue==0x28) {object_value = 0x0146; printf("%02x <- fish in egg (type 6)", rawvalue);}
2097         else if (rawvalue==0x29) {object_value = 0x0147; printf("%02x <- fish in egg (type 7)", rawvalue);}
2098         else if (rawvalue==0x2a) {object_value = 0x0148; printf("%02x <- unk object ?? 2a", rawvalue);}
2099         // 2b
2100         // 2c
2101         // 2d
2102         // 2e
2103         // 2f
2104         // 30
2105         // 31
2106         else if (rawvalue==0x32) {object_value = 0x0150; printf("%02x <- unk object ?? 32", rawvalue);} // puzzli2  // broken flashy thing in an egg?
2107         ////////////////////// going to assume these are the hook graphics because other object types are too glitch (verify) (why would these be in a level tho?)
2108         else if (rawvalue==0x33) {object_value = 0x0180; printf("%02x <- unk object ?? 33", rawvalue);} // puzzli2
2109         // 34
2110         else if (rawvalue==0x35) {object_value = 0x0182; printf("%02x <- unk object ?? 35", rawvalue);}
2111         // 36
2112         // 37
2113         else if (rawvalue==0x38) {object_value = 0x0185; printf("%02x <- unk object ?? 38", rawvalue);} // puzzli2
2114         // 39
2115         // 3a
2116         // 3b
2117         // 3c
2118         // 3d
2119         // 3e
2120         // 3f
2121         // 40
2122         else if (rawvalue==0x41) {object_value = 0x018e; printf("%02x <- unk object ?? 41", rawvalue);} // puzzli2
2123         // 42
2124         else if (rawvalue==0x43) {object_value = 0x0190; printf("%02x <- unk object ?? 43", rawvalue);} // puzzli2  (this would be broken flashy thing on a hook?!)
2057         }
2058         else if (rawvalue<=0x43) // fish on hook cases, seem to be base 0x180
2059         {
2060            int fishtype = rawvalue - 0x33;
2061            puzzli2_printf("%02x <- fish on hook %d", rawvalue, fishtype);
2062            object_value = 0x0180 + fishtype;
2063            // 0x190 is a flashy fish? might be glitchy and need a special number..
2064
2065         }
21252066         ////////////////////// special objects follow
2126         else if (rawvalue==0xd0) {object_value = 0x0200; printf("%02x <- generic bubbles", rawvalue);}
2067         else if (rawvalue==0xd0) {object_value = 0x0200; puzzli2_printf("%02x <- generic bubbles", rawvalue);}
21272068
2128         else if (rawvalue==0xe0) {object_value = 0x8000; printf("%02x <- solid middle", rawvalue);}
2129         else if (rawvalue==0xe1) {object_value = 0x8020; printf("%02x <- solid top slant down", rawvalue);} // solid slant top down
2130         else if (rawvalue==0xe2) {object_value = 0x8040; printf("%02x <- solid top slant up", rawvalue);} // solid slant top up
2131         else if (rawvalue==0xe3) {object_value = 0x8060; printf("%02x <- solid bottom slant up", rawvalue);}
2132         else if (rawvalue==0xe4) {object_value = 0x8080; printf("%02x <- solid bottom slant down", rawvalue);} // sold slant bottom up
2069         else if (rawvalue==0xe0) {object_value = 0x8000; puzzli2_printf("%02x <- solid middle", rawvalue);}
2070         else if (rawvalue==0xe1) {object_value = 0x8020; puzzli2_printf("%02x <- solid top slant down", rawvalue);} // solid slant top down
2071         else if (rawvalue==0xe2) {object_value = 0x8040; puzzli2_printf("%02x <- solid top slant up", rawvalue);} // solid slant top up
2072         else if (rawvalue==0xe3) {object_value = 0x8060; puzzli2_printf("%02x <- solid bottom slant up", rawvalue);}
2073         else if (rawvalue==0xe4) {object_value = 0x8080; puzzli2_printf("%02x <- solid bottom slant down", rawvalue);} // sold slant bottom up
21332074
21342075
2135         else                     {object_value = 0xffff; printf("%02x <- unknown object", rawvalue);}
2076         else                     {object_value = 0xffff; puzzli2_printf("%02x <- unknown object", rawvalue);}
21362077
2137         printf("  (xor table location is %02x)\n",tableloc);
2078         puzzli2_printf("  (xor table location is %02x)\n",tableloc);
21382079
21392080         if (object_value==0xffff)
21402081         {

Previous 199869 Revisions Next


© 1997-2024 The MAME Team