src/mess/machine/3do.c
| r8636 | r8637 | |
| 46 | 46 | this data comes from 00010100 stored by the loop at 1cba4 (read from 00010100, store to 00013917) |
| 47 | 47 | this data comes from 0300d4f8 stored to 00010100 (done by loop at 000000a8) |
| 48 | 48 | |
| 49 | |
| 50 | Expansion bus stuff: |
| 51 | 00022ba4 - init exp bus, write 17x 00 to the selection register to let all expansion devices determine their id on the bus. |
| 52 | 00022bd0 - write 0x8f to the selection register to determine if there are too many devices attached. |
| 53 | |
| 49 | 54 | */ |
| 50 | 55 | |
| 51 | 56 | #include "emu.h" |
| r8636 | r8637 | |
| 165 | 170 | /* DMA */ |
| 166 | 171 | UINT32 dmareqdis; /* 03400308 */ |
| 167 | 172 | /* Expansion bus */ |
| 168 | | UINT32 setexpctl; /* 03400400 */ |
| 169 | | UINT32 clrexpctl; /* 03400404 */ |
| 173 | UINT32 expctl; /* 03400400/03400404 */ |
| 170 | 174 | UINT32 type0_4; /* 03400408 */ |
| 171 | 175 | UINT32 dipir1; /* 03400410 */ |
| 172 | 176 | UINT32 dipir2; /* 03400414 */ |
| 173 | 177 | /* Bus signals */ |
| 174 | | UINT32 sel[16]; /* 03400500 - 0340053f */ |
| 175 | | UINT32 poll[16]; /* 03400540 - 0340057f */ |
| 176 | | UINT32 cmdstat[16]; /* 03400580 - 034005bf */ |
| 177 | | UINT32 data[16]; /* 034005c0 - 034005ff */ |
| 178 | UINT32 sel; /* 03400500 - 0340053f */ |
| 179 | UINT32 poll; /* 03400540 - 0340057f */ |
| 180 | UINT32 cmdstat; /* 03400580 - 034005bf */ |
| 181 | UINT32 data; /* 034005c0 - 034005ff */ |
| 178 | 182 | /* DSPP */ |
| 179 | 183 | UINT32 semaphore; /* 034017d0 */ |
| 180 | 184 | UINT32 semaack; /* 034017d4 */ |
| r8636 | r8637 | |
| 736 | 740 | case 0x0088/4: |
| 737 | 741 | return clio.adbctl; |
| 738 | 742 | |
| 743 | case 0x0100/4: |
| 744 | return clio.timer0; |
| 745 | case 0x0104/4: |
| 746 | return clio.timerback0; |
| 747 | case 0x0108/4: |
| 748 | return clio.timer1; |
| 749 | case 0x010c/4: |
| 750 | return clio.timerback1; |
| 751 | case 0x0110/4: |
| 752 | return clio.timer2; |
| 753 | case 0x0114/4: |
| 754 | return clio.timerback2; |
| 755 | case 0x0118/4: |
| 756 | return clio.timer3; |
| 757 | case 0x011c/4: |
| 758 | return clio.timerback3; |
| 759 | case 0x0120/4: |
| 760 | return clio.timer4; |
| 761 | case 0x0124/4: |
| 762 | return clio.timerback4; |
| 763 | case 0x0128/4: |
| 764 | return clio.timer5; |
| 765 | case 0x012c/4: |
| 766 | return clio.timerback5; |
| 767 | case 0x0130/4: |
| 768 | return clio.timer6; |
| 769 | case 0x0134/4: |
| 770 | return clio.timerback6; |
| 771 | case 0x0138/4: |
| 772 | return clio.timer7; |
| 773 | case 0x013c/4: |
| 774 | return clio.timerback7; |
| 775 | case 0x0140/4: |
| 776 | return clio.timer8; |
| 777 | case 0x0144/4: |
| 778 | return clio.timerback8; |
| 779 | case 0x0148/4: |
| 780 | return clio.timer9; |
| 781 | case 0x014c/4: |
| 782 | return clio.timerback9; |
| 783 | case 0x0150/4: |
| 784 | return clio.timer10; |
| 785 | case 0x0154/4: |
| 786 | return clio.timerback10; |
| 787 | case 0x0158/4: |
| 788 | return clio.timer11; |
| 789 | case 0x015c/4: |
| 790 | return clio.timerback11; |
| 791 | case 0x0160/4: |
| 792 | return clio.timer12; |
| 793 | case 0x0164/4: |
| 794 | return clio.timerback12; |
| 795 | case 0x0168/4: |
| 796 | return clio.timer13; |
| 797 | case 0x016c/4: |
| 798 | return clio.timerback13; |
| 799 | case 0x0170/4: |
| 800 | return clio.timer14; |
| 801 | case 0x0174/4: |
| 802 | return clio.timerback14; |
| 803 | case 0x0178/4: |
| 804 | return clio.timer15; |
| 805 | case 0x017c/4: |
| 806 | return clio.timerback15; |
| 807 | |
| 739 | 808 | case 0x0200/4: |
| 740 | 809 | return clio.settm0; |
| 741 | 810 | case 0x0204/4: |
| r8636 | r8637 | |
| 749 | 818 | return clio.slack; |
| 750 | 819 | |
| 751 | 820 | case 0x0400/4: |
| 752 | | return clio.setexpctl | 0x80; /* bit 7 - ARM has bus control */ |
| 821 | case 0x0404/4: |
| 822 | return clio.expctl; |
| 753 | 823 | case 0x0410/4: |
| 754 | 824 | return clio.dipir1; |
| 755 | 825 | case 0x0414/4: |
| r8636 | r8637 | |
| 759 | 829 | case 0x0510/4: case 0x0514/4: case 0x0518/4: case 0x051c/4: |
| 760 | 830 | case 0x0520/4: case 0x0524/4: case 0x0528/4: case 0x052c/4: |
| 761 | 831 | case 0x0530/4: case 0x0534/4: case 0x0538/4: case 0x053c/4: |
| 762 | | return clio.sel[offset & 0x1f]; |
| 832 | return clio.sel; |
| 763 | 833 | |
| 764 | 834 | case 0x0540/4: case 0x0544/4: case 0x0548/4: case 0x054c/4: |
| 765 | 835 | case 0x0550/4: case 0x0554/4: case 0x0558/4: case 0x055c/4: |
| 766 | 836 | case 0x0560/4: case 0x0564/4: case 0x0568/4: case 0x056c/4: |
| 767 | 837 | case 0x0570/4: case 0x0574/4: case 0x0578/4: case 0x057c/4: |
| 768 | | return clio.poll[offset & 0x1f]; |
| 838 | return clio.poll; |
| 769 | 839 | |
| 770 | 840 | case 0xc000/4: |
| 771 | 841 | return clio.unclerev; |
| r8636 | r8637 | |
| 984 | 1054 | clio.dmareqdis = data; |
| 985 | 1055 | break; |
| 986 | 1056 | |
| 1057 | case 0x0400/4: |
| 1058 | clio.expctl = clio.expctl | ( data & 0xca00 ); |
| 1059 | break; |
| 1060 | case 0x0404/4: |
| 1061 | clio.expctl = clio.expctl & ~( data & 0xca00 ); |
| 1062 | break; |
| 987 | 1063 | case 0x0408/4: |
| 988 | 1064 | clio.type0_4 = data; |
| 989 | 1065 | break; |
| r8636 | r8637 | |
| 992 | 1068 | case 0x0510/4: case 0x0514/4: case 0x0518/4: case 0x051c/4: |
| 993 | 1069 | case 0x0520/4: case 0x0524/4: case 0x0528/4: case 0x052c/4: |
| 994 | 1070 | case 0x0530/4: case 0x0534/4: case 0x0538/4: case 0x053c/4: |
| 995 | | clio.sel[offset & 0x1f] = data; |
| 1071 | clio.sel = data & 0xff; |
| 996 | 1072 | /* Start WRSEL cycle */ |
| 997 | | clio.poll[offset & 0x1f] = 0x10; |
| 1073 | |
| 1074 | /* Detection of too many devices on the bus */ |
| 1075 | switch ( data & 0xff ) |
| 1076 | { |
| 1077 | case 0x8f: |
| 1078 | /* Everything is fine, there are not too many devices in the system */ |
| 1079 | clio.poll = ( clio.poll & 0x0f ); |
| 1080 | break; |
| 1081 | default: |
| 1082 | clio.poll = ( clio.poll & 0x0f ) | 0x90; |
| 1083 | } |
| 998 | 1084 | break; |
| 999 | 1085 | |
| 1086 | case 0x0540/4: case 0x0544/4: case 0x0548/4: case 0x054c/4: |
| 1087 | case 0x0550/4: case 0x0554/4: case 0x0558/4: case 0x055c/4: |
| 1088 | case 0x0560/4: case 0x0564/4: case 0x0568/4: case 0x056c/4: |
| 1089 | case 0x0570/4: case 0x0574/4: case 0x0578/4: case 0x057c/4: |
| 1090 | clio.poll = ( clio.poll & 0xf8 ) | ( data & 0x07 ); |
| 1091 | break; |
| 1092 | |
| 1000 | 1093 | case 0xc000/4: |
| 1001 | 1094 | case 0xc004/4: |
| 1002 | 1095 | case 0xc00c/4: |
| r8636 | r8637 | |
| 1019 | 1112 | clio.revision = 0x02022000 /* 0x04000000 */; |
| 1020 | 1113 | clio.cstatbits = 0x01; /* bit 0 = reset of clio caused by power on */ |
| 1021 | 1114 | clio.unclerev = 0x03800000; |
| 1115 | clio.expctl = 0x80; /* ARM has the expansion bus */ |
| 1022 | 1116 | } |
| 1023 | 1117 | |
| 1024 | 1118 | |