r8637 Monday 26th July, 2010 at 19:42:12 UTC by Wilbert Pol
[3DO] Some expansion bus updates.
[src/mess/machine]3do.c

src/mess/machine/3do.c
r8636r8637
4646this data comes from 00010100 stored by the loop at 1cba4 (read from 00010100, store to 00013917)
4747this data comes from 0300d4f8 stored to 00010100 (done by loop at 000000a8)
4848
49
50Expansion bus stuff:
5100022ba4 - init exp bus, write 17x 00 to the selection register to let all expansion devices determine their id on the bus.
5200022bd0 - write 0x8f to the selection register to determine if there are too many devices attached.
53
4954*/
5055
5156#include "emu.h"
r8636r8637
165170                     /* DMA */
166171   UINT32   dmareqdis;      /* 03400308 */
167172                     /* Expansion bus */
168   UINT32   setexpctl;      /* 03400400 */
169   UINT32   clrexpctl;      /* 03400404 */
173   UINT32   expctl;         /* 03400400/03400404 */
170174   UINT32   type0_4;      /* 03400408 */
171175   UINT32   dipir1;         /* 03400410 */
172176   UINT32   dipir2;         /* 03400414 */
173177                     /* 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 */
178182                     /* DSPP */
179183   UINT32   semaphore;      /* 034017d0 */
180184   UINT32   semaack;      /* 034017d4 */
r8636r8637
736740   case 0x0088/4:
737741      return clio.adbctl;
738742
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
739808   case 0x0200/4:
740809      return clio.settm0;
741810   case 0x0204/4:
r8636r8637
749818      return clio.slack;
750819
751820   case 0x0400/4:
752      return clio.setexpctl | 0x80;      /* bit 7 - ARM has bus control */
821   case 0x0404/4:
822      return clio.expctl;
753823   case 0x0410/4:
754824      return clio.dipir1;
755825   case 0x0414/4:
r8636r8637
759829   case 0x0510/4: case 0x0514/4: case 0x0518/4: case 0x051c/4:
760830   case 0x0520/4: case 0x0524/4: case 0x0528/4: case 0x052c/4:
761831   case 0x0530/4: case 0x0534/4: case 0x0538/4: case 0x053c/4:
762      return clio.sel[offset & 0x1f];
832      return clio.sel;
763833
764834   case 0x0540/4: case 0x0544/4: case 0x0548/4: case 0x054c/4:
765835   case 0x0550/4: case 0x0554/4: case 0x0558/4: case 0x055c/4:
766836   case 0x0560/4: case 0x0564/4: case 0x0568/4: case 0x056c/4:
767837   case 0x0570/4: case 0x0574/4: case 0x0578/4: case 0x057c/4:
768      return clio.poll[offset & 0x1f];
838      return clio.poll;
769839
770840   case 0xc000/4:
771841      return clio.unclerev;
r8636r8637
9841054      clio.dmareqdis = data;
9851055      break;
9861056
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;
9871063   case 0x0408/4:
9881064      clio.type0_4 = data;
9891065      break;
r8636r8637
9921068   case 0x0510/4: case 0x0514/4: case 0x0518/4: case 0x051c/4:
9931069   case 0x0520/4: case 0x0524/4: case 0x0528/4: case 0x052c/4:
9941070   case 0x0530/4: case 0x0534/4: case 0x0538/4: case 0x053c/4:
995      clio.sel[offset & 0x1f] = data;
1071      clio.sel = data & 0xff;
9961072      /* 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      }
9981084      break;
9991085
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
10001093   case 0xc000/4:
10011094   case 0xc004/4:
10021095   case 0xc00c/4:
r8636r8637
10191112   clio.revision = 0x02022000 /* 0x04000000 */;
10201113   clio.cstatbits = 0x01;   /* bit 0 = reset of clio caused by power on */
10211114   clio.unclerev = 0x03800000;
1115   clio.expctl = 0x80;   /* ARM has the expansion bus */
10221116}
10231117
10241118

Previous 509070 RevisionsNext 50


© 1998-2010 The MESS Team