trunk/src/mame/machine/pgmprot_igs027a_type1.c
r24611 | r24612 | |
718 | 718 | |
719 | 719 | |
720 | 720 | |
721 | | |
722 | | |
723 | 721 | case 0x61: // ?? |
724 | 722 | m_valueresponse = 0x36<<16; |
725 | 723 | break; |
726 | 724 | |
727 | 725 | |
| 726 | /* |
| 727 | these are probably scrambled with some kind of rotating xor? |
| 728 | note puzzli2 004e == 0016? |
| 729 | puzzli2s 0051 == 0019? |
| 730 | maybe... |
728 | 731 | |
| 732 | puzzli2 on startup |
| 733 | |
| 734 | 001489f6: 61 0202 |
| 735 | 00148a84: 31 004e |
| 736 | 00148acc: 31 a6f7 |
| 737 | 00148a84: 31 279e |
| 738 | 00148acc: 31 534f |
| 739 | 00148a84: 31 ab5c |
| 740 | 00148acc: 31 a7cf |
| 741 | 00148a84: 31 145f |
| 742 | 00148acc: 31 7054 |
| 743 | 00148a84: 31 85a0 |
| 744 | 00148acc: 31 7b7f |
| 745 | |
| 746 | 00148a84: 31 7003 |
| 747 | 00148acc: 31 c5ab |
| 748 | 00148a84: 31 456d |
| 749 | 00148acc: 31 f3aa |
| 750 | 00148b34: 41 e2bb |
| 751 | |
| 752 | puzzli2 super on startup |
| 753 | 0014ceca: 61 0202 |
| 754 | 0014cf58: 31 0051 |
| 755 | 0014cfa0: 31 14c9 |
| 756 | 0014cf58: 31 27a0 |
| 757 | 0014cfa0: 31 c121 |
| 758 | 0014cf58: 31 ab5f |
| 759 | 0014cfa0: 31 15a1 |
| 760 | 0014cf58: 31 1461 |
| 761 | 0014cfa0: 31 de26 |
| 762 | 0014cf58: 31 85a2 |
| 763 | 0014cfa0: 31 e951 |
| 764 | |
| 765 | 0014cf58: 31 7006 |
| 766 | 0014cfa0: 31 337d |
| 767 | 0014cf58: 31 4570 |
| 768 | 0014cfa0: 31 617c |
| 769 | 0014d008: 41 706d |
| 770 | |
| 771 | */ |
| 772 | |
729 | 773 | // I think the values returned here must be connected to the values written to command 31 on startup |
730 | 774 | // 63/67 are used on startup to get the z80 music at least |
731 | 775 | 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? |
732 | | if (m_value0==0x0000) |
| 776 | if (!strcmp(machine().system().name,"puzzli2")) |
733 | 777 | { |
734 | | m_valueresponse = 0x001694a8; |
| 778 | if (m_value0==0x0000) |
| 779 | { |
| 780 | m_valueresponse = 0x001694a8; |
| 781 | } |
| 782 | else if (m_value0==0x0001) |
| 783 | { |
| 784 | m_valueresponse = 0x0016cfae; |
| 785 | } |
| 786 | else if (m_value0==0x0002) |
| 787 | { |
| 788 | m_valueresponse = 0x0016ebf2; // right for puzzli2 , wrong for puzzli2s, probably calculated from the writes then? |
| 789 | } |
| 790 | else if (m_value0==0x0003) // before 'cast' screen |
| 791 | { |
| 792 | m_valueresponse = 0x0016faa8; |
| 793 | } |
| 794 | else if (m_value0==0x0004) // 2 player demo |
| 795 | { |
| 796 | m_valueresponse = 0x00174416; |
| 797 | } |
| 798 | else |
| 799 | { |
| 800 | printf("unk case x63\n"); |
| 801 | m_valueresponse = 0x00600000; // wrong |
| 802 | |
| 803 | } |
735 | 804 | } |
736 | | else if (m_value0==0x0001) |
| 805 | else // puzzli2 super |
737 | 806 | { |
738 | | m_valueresponse = 0x0016cfae; |
| 807 | if (m_value0==0x0000) |
| 808 | { |
| 809 | m_valueresponse = 0x19027a; |
| 810 | } |
| 811 | else if (m_value0==0x0001) |
| 812 | { |
| 813 | m_valueresponse = 0x193D80; |
| 814 | } |
| 815 | else if (m_value0==0x0002) |
| 816 | { |
| 817 | m_valueresponse = 0x1959c4; |
| 818 | } |
| 819 | else if (m_value0==0x0003) |
| 820 | { |
| 821 | m_valueresponse = 0x19687a; |
| 822 | } |
| 823 | else if (m_value0==0x0004) |
| 824 | { |
| 825 | m_valueresponse = 0x19b1e8; |
| 826 | } |
| 827 | else |
| 828 | { |
| 829 | printf("unk case x63\n"); |
| 830 | m_valueresponse = 0x00600000; // wrong |
| 831 | } |
739 | 832 | } |
740 | | else if (m_value0==0x0002) |
741 | | { |
742 | | m_valueresponse = 0x0016ebf2; // right for puzzli2 , wrong for puzzli2s, probably calculated from the writes then? |
743 | | } |
744 | | else if (m_value0==0x0003) // before 'cast' screen |
745 | | { |
746 | | m_valueresponse = 0x0016faa8; |
747 | | } |
748 | | else if (m_value0==0x0004) // 2 player demo |
749 | | { |
750 | | m_valueresponse = 0x00174416; |
751 | | } |
752 | | else |
753 | | { |
754 | | printf("unk case x63\n"); |
755 | | m_valueresponse = 0x00600000; // wrong |
756 | | |
757 | | } |
758 | 833 | break; |
759 | 834 | |
760 | 835 | case 0x67: // used as a read address by the 68k code (related to previous uploaded values like cave?) directly reads ~0xDBE from the address.. |
761 | | if ( (m_value0==0x0000) || (m_value0==0x0001) || (m_value0==0x0002) || (m_value0==0x0003) ) |
| 836 | if (!strcmp(machine().system().name,"puzzli2")) |
762 | 837 | { |
763 | | m_valueresponse = 0x00166178; // right for puzzli2 , wrong for puzzli2s, probably calculated from the writes then? |
| 838 | if ( (m_value0==0x0000) || (m_value0==0x0001) || (m_value0==0x0002) || (m_value0==0x0003) ) |
| 839 | { |
| 840 | m_valueresponse = 0x00166178; // right for puzzli2 , wrong for puzzli2s, probably calculated from the writes then? |
| 841 | } |
| 842 | else if ( (m_value0==0x0004) ) // 2 player demo |
| 843 | { |
| 844 | m_valueresponse = 0x00166e72; |
| 845 | } |
| 846 | else |
| 847 | { |
| 848 | printf("unk case x67\n"); |
| 849 | m_valueresponse = 0x00400000; // wrong |
| 850 | } |
764 | 851 | } |
765 | | else if ( (m_value0==0x0004) ) // 2 player demo |
| 852 | else // puzzli2 super |
766 | 853 | { |
767 | | m_valueresponse = 0x00166e72; |
| 854 | if ((m_value0==0x0000) || (m_value0==0x0001) || (m_value0==0x0002) || (m_value0==0x0003)) |
| 855 | { |
| 856 | m_valueresponse = 0x18cf4a; |
| 857 | } |
| 858 | else if ( (m_value0==0x0004) ) // 2 player demo |
| 859 | { |
| 860 | m_valueresponse = 0x0018dc44; |
| 861 | } |
| 862 | else |
| 863 | { |
| 864 | printf("unk case x67\n"); |
| 865 | m_valueresponse = 0x00600000; // wrong |
| 866 | } |
768 | 867 | } |
769 | | else |
770 | | { |
771 | | printf("unk case x67\n"); |
772 | | m_valueresponse = 0x00400000; // wrong |
773 | | } |
774 | 868 | break; |
775 | 869 | |
776 | 870 | default: |