Previous 199869 Revisions Next

r24604 Wednesday 31st July, 2013 at 17:00:26 UTC by David Haywood
more puzzli2 research, need to start joining the dots... (nw)
[src/mame/machine]pgmprot_igs027a_type1.c

trunk/src/mame/machine/pgmprot_igs027a_type1.c
r24603r24604
573573
574574   switch (m_ddp3lastcommand)
575575   {
576      case 0x13: // getting some kind of list maybe?
576
577      // done before writes to 31 when getting level data, always just seems to return the 0x36 response.
578      case 0x54: // ??
579         m_puzzli_54_trigger = 1;
580         hackcount2 = 0;
581         hackcount = 0;
582         m_valueresponse = 0x36<<16;
583      break;
584
585      case 0x31:
577586      {
578         hackcount++;
587         // how is this selected? command 54?
588         hackcount2++;
579589
580         if (hackcount<10)
590         /* writes the following sequence before how to play
591         00138278: 31 00fd
592         00138278: 31 0087
593         00138278: 31 0032
594         00138278: 31 0029
595         00138278: 31 0031
596         00138278: 31 003f
597         00138278: 31 00b0
598         00138278: 31 0035
599         00138278: 31 0071
600         00138278: 31 002d
601         00138278: 31 00d5
602         00138278: 31 000d
603         00138278: 31 0034
604         00138278: 31 0059
605         00138278: 31 00dd
606         00138278: 31 0023
607         00138278: 31 007a
608         00138278: 31 00f3
609         00138278: 31 0077
610         00138278: 31 0022
611         00138278: 31 0036
612         00138278: 31 002e
613         00138278: 31 00b3
614         00138278: 31 0035
615         00138278: 31 0041
616         00138278: 31 005d
617         00138278: 31 00d6
618         00138278: 31 000c
619         00138278: 31 0036
620         00138278: 31 005e
621         00138278: 31 0089
622         00138278: 31 003c
623         00138278: 31 007a
624         00138278: 31 00a2
625         00138278: 31 006d
626         00138278: 31 0023
627         00138278: 31 0037
628         00138278: 31 003f
629         00138278: 31 00b3
630         00138278: 31 0034
631         */
632
633
634         if (hackcount2<40)
581635         {
582            m_valueresponse = 0x002d0008;
636            // always d2 0000 when writing doing level data
637            // but different for the writes on startup?
638            m_valueresponse = 0x00d20000;
583639         }
584640         else
585641         {
586            hackcount=0;
587            m_valueresponse = 0x00740008;
642            hackcount2=0;
643            printf("end\n");
644
645            // 63 0006 after the last 31 write doing the how to play level data - the 06 is the width of the playfield, where does it come from?
646            m_valueresponse = 0x00630006;
588647         }
589         // 2d seems to be used when there is more data available
590         // 74 seems to be used when there isn't.. (end of buffer reached?)
591         // 2d or 74! (based on?)
592648
593649      }
594650      break;
651   
595652
596      case 0x31:
653      // this is read immediately after the 31 writes before a level / how to play
654      case 0x13: // getting some kind of list maybe?
597655      {
598         // how is this selected? command 54?
599         hackcount2++;
600656
601         if (hackcount2<30)
657         // before how to play
658         // clearly the level layout, where does it come from?
659         UINT16 retvals[61] =
660         { 0x0008,
661           0x0103, 0x0101, 0x0102, 0x0102, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // first column
662           0x0103, 0x0100, 0x0101, 0x0105, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
663           0x0100, 0x0101, 0x0105, 0x0104, 0x0104, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
664           0x0102, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
665           0x0100, 0x0101, 0x0103, 0x0102, 0x0104, 0x0100 ,0x0100, 0x0000, 0x0000, 0x0000,
666           0x0105, 0x0105, 0x0101, 0x0101, 0x0103, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000  // last column
667         };
668
669
670         if (hackcount<61)
602671         {
603            m_valueresponse = 0x00d20008;
672            m_valueresponse = 0x002d0000 | retvals[hackcount];
673            printf("returning %08x\n", m_valueresponse );
674
604675         }
605676         else
606677         {
607            hackcount2=0;
608            m_valueresponse = 0x00630008;
678            hackcount=0;
679            m_valueresponse = 0x00740054;  // 0x0074 0054 is returned after how to play reads above..
680            printf("END returning %08x\n", m_valueresponse );
681
609682         }
610683
684         hackcount++;
685
686
687         // 2d seems to be used when there is more data available
688         // 74 seems to be used when there isn't.. (end of buffer reached?)
689         // 2d or 74! (based on?)
690
611691      }
612692      break;
613693
694
695
614696      case 0x38: // Reset
615697         m_valueresponse = 0x78<<16;
616698         m_valuekey = 0x100;
r24603r24604
637719
638720
639721
640      case 0x54: // ??
641         m_puzzli_54_trigger = 1;
642         m_valueresponse = 0x36<<16;
643      break;
644722
645723      case 0x61: // ??
646724         m_valueresponse = 0x36<<16;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team