Previous 15994 Revisions Next

r2638 Friday 16th May, 2008 at 14:24:02 UTC by Robbbert
[COMPIS] Exterminated numerous bugs, system now works.(bug #1552)
[src/mess/machine]compis.c

src/mess/machine/compis.c
r2637r2638
10431043
10441044READ16_HANDLER( i186_internal_port_r )
10451045{
1046   int shift = 8 * (offset & 1);
10471046   int temp, which;
10481047
1049   switch (offset & ~1)
1048   switch (offset)
10501049   {
10511050      case 0x11:
10521051         logerror("%05X:ERROR - read from 80186 EOI\n", activecpu_get_pc());
10531052         break;
10541053
10551054      case 0x12:
1056         if (LOG_PORTS)
1057            logerror("%05X:read 80186 interrupt poll\n", activecpu_get_pc());
1055         if (LOG_PORTS) logerror("%05X:read 80186 interrupt poll\n", activecpu_get_pc());
10581056         if (i186.intr.poll_status & 0x8000)
10591057            int_callback(machine, 0);
1060         return (i186.intr.poll_status >> shift) & 0xff;
1058         return i186.intr.poll_status;
10611059
10621060      case 0x13:
1063         if (LOG_PORTS)
1064            logerror("%05X:read 80186 interrupt poll status\n",
1065                     activecpu_get_pc());
1066         return (i186.intr.poll_status >> shift) & 0xff;
1061         if (LOG_PORTS) logerror("%05X:read 80186 interrupt poll status\n", activecpu_get_pc());
1062         return i186.intr.poll_status;
10671063
10681064      case 0x14:
1069         if (LOG_PORTS) logerror("%05X:read 80186 interrupt mask\n",
1070                                 activecpu_get_pc());
1065         if (LOG_PORTS) logerror("%05X:read 80186 interrupt mask\n", activecpu_get_pc());
10711066         temp  = (i186.intr.timer  >> 3) & 0x01;
10721067         temp |= (i186.intr.dma[0] >> 1) & 0x04;
10731068         temp |= (i186.intr.dma[1] >> 0) & 0x08;
r2637r2638
10751070         temp |= (i186.intr.ext[1] << 2) & 0x20;
10761071         temp |= (i186.intr.ext[2] << 3) & 0x40;
10771072         temp |= (i186.intr.ext[3] << 4) & 0x80;
1078         return (temp >> shift) & 0xff;
1073         return temp;
10791074
10801075      case 0x15:
1081         if (LOG_PORTS)
1082            logerror("%05X:read 80186 interrupt priority mask\n",
1083                     activecpu_get_pc());
1084         return (i186.intr.priority_mask >> shift) & 0xff;
1076         if (LOG_PORTS) logerror("%05X:read 80186 interrupt priority mask\n", activecpu_get_pc());
1077         return i186.intr.priority_mask;
10851078
10861079      case 0x16:
1087         if (LOG_PORTS)
1088            logerror("%05X:read 80186 interrupt in-service\n",
1089                     activecpu_get_pc());
1090         return (i186.intr.in_service >> shift) & 0xff;
1080         if (LOG_PORTS) logerror("%05X:read 80186 interrupt in-service\n", activecpu_get_pc());
1081         return i186.intr.in_service;
10911082
10921083      case 0x17:
1093         if (LOG_PORTS)
1094            logerror("%05X:read 80186 interrupt request\n",
1095                     activecpu_get_pc());
1084         if (LOG_PORTS) logerror("%05X:read 80186 interrupt request\n", activecpu_get_pc());
10961085         temp = i186.intr.request & ~0x0001;
10971086         if (i186.intr.status & 0x0007)
10981087            temp |= 1;
1099         return (temp >> shift) & 0xff;
1088         return temp;
11001089
11011090      case 0x18:
1102         if (LOG_PORTS)
1103            logerror("%05X:read 80186 interrupt status\n", activecpu_get_pc());
1104         return (i186.intr.status >> shift) & 0xff;
1091         if (LOG_PORTS) logerror("%05X:read 80186 interrupt status\n", activecpu_get_pc());
1092         return i186.intr.status;
11051093
11061094      case 0x19:
1107         if (LOG_PORTS)
1108            logerror("%05X:read 80186 timer interrupt control\n",
1109                     activecpu_get_pc());
1110         return (i186.intr.timer >> shift) & 0xff;
1095         if (LOG_PORTS) logerror("%05X:read 80186 timer interrupt control\n", activecpu_get_pc());
1096         return i186.intr.timer;
11111097
11121098      case 0x1a:
1113         if (LOG_PORTS)
1114            logerror("%05X:read 80186 DMA 0 interrupt control\n",
1115                     activecpu_get_pc());
1116         return (i186.intr.dma[0] >> shift) & 0xff;
1099         if (LOG_PORTS) logerror("%05X:read 80186 DMA 0 interrupt control\n", activecpu_get_pc());
1100         return i186.intr.dma[0];
11171101
11181102      case 0x1b:
1119         if (LOG_PORTS)
1120            logerror("%05X:read 80186 DMA 1 interrupt control\n",
1121                     activecpu_get_pc());
1122         return (i186.intr.dma[1] >> shift) & 0xff;
1103         if (LOG_PORTS) logerror("%05X:read 80186 DMA 1 interrupt control\n", activecpu_get_pc());
1104         return i186.intr.dma[1];
11231105
11241106      case 0x1c:
1125         if (LOG_PORTS)
1126            logerror("%05X:read 80186 INT 0 interrupt control\n",
1127                     activecpu_get_pc());
1128         return (i186.intr.ext[0] >> shift) & 0xff;
1107         if (LOG_PORTS) logerror("%05X:read 80186 INT 0 interrupt control\n", activecpu_get_pc());
1108         return i186.intr.ext[0];
11291109
11301110      case 0x1d:
1131         if (LOG_PORTS)
1132            logerror("%05X:read 80186 INT 1 interrupt control\n",
1133                     activecpu_get_pc());
1134         return (i186.intr.ext[1] >> shift) & 0xff;
1111         if (LOG_PORTS) logerror("%05X:read 80186 INT 1 interrupt control\n", activecpu_get_pc());
1112         return i186.intr.ext[1];
11351113
11361114      case 0x1e:
1137         if (LOG_PORTS)
1138            logerror("%05X:read 80186 INT 2 interrupt control\n",
1139                     activecpu_get_pc());
1140         return (i186.intr.ext[2] >> shift) & 0xff;
1115         if (LOG_PORTS) logerror("%05X:read 80186 INT 2 interrupt control\n", activecpu_get_pc());
1116         return i186.intr.ext[2];
11411117
11421118      case 0x1f:
1143         if (LOG_PORTS)
1144            logerror("%05X:read 80186 INT 3 interrupt control\n",
1145                     activecpu_get_pc());
1146         return (i186.intr.ext[3] >> shift) & 0xff;
1119         if (LOG_PORTS) logerror("%05X:read 80186 INT 3 interrupt control\n", activecpu_get_pc());
1120         return i186.intr.ext[3];
11471121
11481122      case 0x28:
11491123      case 0x2c:
11501124      case 0x30:
1151         if (LOG_PORTS)
1152            logerror("%05X:read 80186 Timer %d count\n",
1153                     activecpu_get_pc(), (offset - 0x50) / 8);
1154         which = (offset - 0x50) / 8;
1125         if (LOG_PORTS) logerror("%05X:read 80186 Timer %d count\n", activecpu_get_pc(), (offset - 0x28) / 4);
1126         which = (offset - 0x28) / 4;
11551127         if (!(offset & 1))
11561128            internal_timer_sync(which);
1157         return (i186.timer[which].count >> shift) & 0xff;
1129         return i186.timer[which].count;
11581130
11591131      case 0x29:
11601132      case 0x2d:
11611133      case 0x31:
1162         if (LOG_PORTS) logerror("%05X:read 80186 Timer %d max A\n",
1163                                 activecpu_get_pc(), (offset - 0x50) / 8);
1164         which = (offset - 0x50) / 8;
1165         return (i186.timer[which].maxA >> shift) & 0xff;
1134         if (LOG_PORTS) logerror("%05X:read 80186 Timer %d max A\n", activecpu_get_pc(), (offset - 0x29) / 4);
1135         which = (offset - 0x29) / 4;
1136         return i186.timer[which].maxA;
11661137
11671138      case 0x2a:
11681139      case 0x2e:
1169         logerror("%05X:read 80186 Timer %d max B\n",
1170                  activecpu_get_pc(), (offset - 0x50) / 8);
1171         which = (offset - 0x50) / 8;
1172         return (i186.timer[which].maxB >> shift) & 0xff;
1140         logerror("%05X:read 80186 Timer %d max B\n", activecpu_get_pc(), (offset - 0x2a) / 4);
1141         which = (offset - 0x2a) / 4;
1142         return i186.timer[which].maxB;
11731143
11741144      case 0x2b:
11751145      case 0x2f:
11761146      case 0x33:
1177         if (LOG_PORTS)
1178            logerror("%05X:read 80186 Timer %d control\n",
1179                     activecpu_get_pc(), (offset - 0x50) / 8);
1180         which = (offset - 0x50) / 8;
1181         return (i186.timer[which].control >> shift) & 0xff;
1147         if (LOG_PORTS) logerror("%05X:read 80186 Timer %d control\n", activecpu_get_pc(), (offset - 0x2b) / 4);
1148         which = (offset - 0x2b) / 4;
1149         return i186.timer[which].control;
11821150
11831151      case 0x50:
1184         if (LOG_PORTS)
1185            logerror("%05X:read 80186 upper chip select\n",
1186                     activecpu_get_pc());
1187         return (i186.mem.upper >> shift) & 0xff;
1152         if (LOG_PORTS) logerror("%05X:read 80186 upper chip select\n", activecpu_get_pc());
1153         return i186.mem.upper;
11881154
11891155      case 0x51:
1190         if (LOG_PORTS)
1191            logerror("%05X:read 80186 lower chip select\n",
1192                     activecpu_get_pc());
1193         return (i186.mem.lower >> shift) & 0xff;
1156         if (LOG_PORTS) logerror("%05X:read 80186 lower chip select\n", activecpu_get_pc());
1157         return i186.mem.lower;
11941158
11951159      case 0x52:
1196         if (LOG_PORTS)
1197            logerror("%05X:read 80186 peripheral chip select\n",
1198                     activecpu_get_pc());
1199         return (i186.mem.peripheral >> shift) & 0xff;
1160         if (LOG_PORTS) logerror("%05X:read 80186 peripheral chip select\n", activecpu_get_pc());
1161         return i186.mem.peripheral;
12001162
12011163      case 0x53:
1202         if (LOG_PORTS)
1203            logerror("%05X:read 80186 middle chip select\n",
1204                     activecpu_get_pc());
1205         return (i186.mem.middle >> shift) & 0xff;
1164         if (LOG_PORTS) logerror("%05X:read 80186 middle chip select\n", activecpu_get_pc());
1165         return i186.mem.middle;
12061166
12071167      case 0x54:
1208         if (LOG_PORTS)
1209            logerror("%05X:read 80186 middle P chip select\n",
1210                     activecpu_get_pc());
1211         return (i186.mem.middle_size >> shift) & 0xff;
1168         if (LOG_PORTS) logerror("%05X:read 80186 middle P chip select\n", activecpu_get_pc());
1169         return i186.mem.middle_size;
12121170
12131171      case 0x60:
12141172      case 0x68:
1215         if (LOG_PORTS)
1216            logerror("%05X:read 80186 DMA%d lower source address\n",
1217                     activecpu_get_pc(), (offset - 0xc0) / 0x10);
1218         which = (offset - 0xc0) / 0x10;
1173         if (LOG_PORTS) logerror("%05X:read 80186 DMA%d lower source address\n", activecpu_get_pc(), (offset - 0x60) / 8);
1174         which = (offset - 0x60) / 8;
12191175//         stream_update(dma_stream, 0);
1220         return (i186.dma[which].source >> shift) & 0xff;
1176         return i186.dma[which].source;
12211177
12221178      case 0x61:
12231179      case 0x69:
1224         if (LOG_PORTS)
1225            logerror("%05X:read 80186 DMA%d upper source address\n",
1226                     activecpu_get_pc(), (offset - 0xc0) / 0x10);
1227         which = (offset - 0xc0) / 0x10;
1180         if (LOG_PORTS) logerror("%05X:read 80186 DMA%d upper source address\n", activecpu_get_pc(), (offset - 0x61) / 8);
1181         which = (offset - 0x61) / 8;
12281182//         stream_update(dma_stream, 0);
1229         return (i186.dma[which].source >> (shift + 16)) & 0xff;
1183         return i186.dma[which].source >> 16;
12301184
12311185      case 0x62:
12321186      case 0x6a:
1233         if (LOG_PORTS)
1234            logerror("%05X:read 80186 DMA%d lower dest address\n",
1235                     activecpu_get_pc(), (offset - 0xc0) / 0x10);
1236         which = (offset - 0xc0) / 0x10;
1187         if (LOG_PORTS) logerror("%05X:read 80186 DMA%d lower dest address\n", activecpu_get_pc(), (offset - 0x62) / 8);
1188         which = (offset - 0x62) / 8;
12371189//         stream_update(dma_stream, 0);
1238         return (i186.dma[which].dest >> shift) & 0xff;
1190         return i186.dma[which].dest;
12391191
12401192      case 0x63:
12411193      case 0x6b:
1242         if (LOG_PORTS)
1243            logerror("%05X:read 80186 DMA%d upper dest address\n",
1244                     activecpu_get_pc(), (offset - 0xc0) / 0x10);
1245         which = (offset - 0xc0) / 0x10;
1194         if (LOG_PORTS) logerror("%05X:read 80186 DMA%d upper dest address\n", activecpu_get_pc(), (offset - 0x63) / 8);
1195         which = (offset - 0x63) / 8;
12461196//         stream_update(dma_stream, 0);
1247         return (i186.dma[which].dest >> (shift + 16)) & 0xff;
1197         return i186.dma[which].dest >> 16;
12481198
12491199      case 0x64:
12501200      case 0x6c:
1251         if (LOG_PORTS)
1252            logerror("%05X:read 80186 DMA%d transfer count\n",
1253                     activecpu_get_pc(), (offset - 0xc0) / 0x10);
1254         which = (offset - 0xc0) / 0x10;
1201         if (LOG_PORTS) logerror("%05X:read 80186 DMA%d transfer count\n", activecpu_get_pc(), (offset - 0x64) / 8);
1202         which = (offset - 0x64) / 8;
12551203//         stream_update(dma_stream, 0);
1256         return (i186.dma[which].count >> shift) & 0xff;
1204         return i186.dma[which].count;
12571205
12581206      case 0x65:
12591207      case 0x6d:
1260         if (LOG_PORTS)
1261            logerror("%05X:read 80186 DMA%d control\n",
1262                     activecpu_get_pc(), (offset - 0xc0) / 0x10);
1263         which = (offset - 0xc0) / 0x10;
1208         if (LOG_PORTS) logerror("%05X:read 80186 DMA%d control\n", activecpu_get_pc(), (offset - 0x65) / 8);
1209         which = (offset - 0x65) / 8;
12641210//         stream_update(dma_stream, 0);
1265         return (i186.dma[which].control >> shift) & 0xff;
1211         return i186.dma[which].control;
12661212
12671213      default:
1268         logerror("%05X:read 80186 port %02X\n",
1269                  activecpu_get_pc(), offset);
1214         logerror("%05X:read 80186 port %02X\n", activecpu_get_pc(), offset);
12701215         break;
12711216   }
12721217   return 0x00;
r2637r2638
12821227{
12831228   int temp, which, data16 = data;
12841229
1285   switch (offset & ~1)
1230   switch (offset)
12861231   {
1287      case 0x22:
1288         if (LOG_PORTS)
1289            logerror("%05X:80186 EOI = %04X\n", activecpu_get_pc(), data16);
1232      case 0x11:
1233         if (LOG_PORTS) logerror("%05X:80186 EOI = %04X\n", activecpu_get_pc(), data16);
12901234         handle_eoi(0x8000);
12911235         update_interrupt_state(machine);
12921236         break;
12931237
1294      case 0x24:
1295         logerror("%05X:ERROR - write to 80186 interrupt poll = %04X\n",
1296                  activecpu_get_pc(), data16);
1238      case 0x12:
1239         logerror("%05X:ERROR - write to 80186 interrupt poll = %04X\n", activecpu_get_pc(), data16);
12971240         break;
12981241
1299      case 0x26:
1300         logerror("%05X:ERROR - write to 80186 interrupt poll status = %04X\n",
1301                  activecpu_get_pc(), data16);
1242      case 0x13:
1243         logerror("%05X:ERROR - write to 80186 interrupt poll status = %04X\n", activecpu_get_pc(), data16);
13021244         break;
13031245
1304      case 0x28:
1305         if (LOG_PORTS)
1306            logerror("%05X:80186 interrupt mask = %04X\n",
1307                     activecpu_get_pc(), data16);
1246      case 0x14:
1247         if (LOG_PORTS) logerror("%05X:80186 interrupt mask = %04X\n", activecpu_get_pc(), data16);
13081248         i186.intr.timer  = (i186.intr.timer  & ~0x08) | ((data16 << 3) & 0x08);
13091249         i186.intr.dma[0] = (i186.intr.dma[0] & ~0x08) | ((data16 << 1) & 0x08);
13101250         i186.intr.dma[1] = (i186.intr.dma[1] & ~0x08) | ((data16 << 0) & 0x08);
r2637r2638
13151255         update_interrupt_state(machine);
13161256         break;
13171257
1318      case 0x2a:
1258      case 0x15:
13191259         if (LOG_PORTS) logerror("%05X:80186 interrupt priority mask = %04X\n", activecpu_get_pc(), data16);
13201260         i186.intr.priority_mask = data16 & 0x0007;
13211261         update_interrupt_state(machine);
13221262         break;
13231263
1324      case 0x2c:
1264      case 0x16:
13251265         if (LOG_PORTS) logerror("%05X:80186 interrupt in-service = %04X\n", activecpu_get_pc(), data16);
13261266         i186.intr.in_service = data16 & 0x00ff;
13271267         update_interrupt_state(machine);
13281268         break;
13291269
1330      case 0x2e:
1270      case 0x17:
13311271         if (LOG_PORTS) logerror("%05X:80186 interrupt request = %04X\n", activecpu_get_pc(), data16);
13321272         i186.intr.request = (i186.intr.request & ~0x00c0) | (data16 & 0x00c0);
13331273         update_interrupt_state(machine);
13341274         break;
13351275
1336      case 0x30:
1276      case 0x18:
13371277         if (LOG_PORTS) logerror("%05X:WARNING - wrote to 80186 interrupt status = %04X\n", activecpu_get_pc(), data16);
13381278         i186.intr.status = (i186.intr.status & ~0x8007) | (data16 & 0x8007);
13391279         update_interrupt_state(machine);
13401280         break;
13411281
1342      case 0x32:
1282      case 0x19:
13431283         if (LOG_PORTS) logerror("%05X:80186 timer interrupt contol = %04X\n", activecpu_get_pc(), data16);
13441284         i186.intr.timer = data16 & 0x000f;
13451285         break;
13461286
1347      case 0x34:
1287      case 0x1a:
13481288         if (LOG_PORTS) logerror("%05X:80186 DMA 0 interrupt control = %04X\n", activecpu_get_pc(), data16);
13491289         i186.intr.dma[0] = data16 & 0x000f;
13501290         break;
13511291
1352      case 0x36:
1292      case 0x1b:
13531293         if (LOG_PORTS) logerror("%05X:80186 DMA 1 interrupt control = %04X\n", activecpu_get_pc(), data16);
13541294         i186.intr.dma[1] = data16 & 0x000f;
13551295         break;
13561296
1357      case 0x38:
1297      case 0x1c:
13581298         if (LOG_PORTS) logerror("%05X:80186 INT 0 interrupt control = %04X\n", activecpu_get_pc(), data16);
13591299         i186.intr.ext[0] = data16 & 0x007f;
13601300         break;
13611301
1362      case 0x3a:
1302      case 0x1d:
13631303         if (LOG_PORTS) logerror("%05X:80186 INT 1 interrupt control = %04X\n", activecpu_get_pc(), data16);
13641304         i186.intr.ext[1] = data16 & 0x007f;
13651305         break;
13661306
1367      case 0x3c:
1307      case 0x1e:
13681308         if (LOG_PORTS) logerror("%05X:80186 INT 2 interrupt control = %04X\n", activecpu_get_pc(), data16);
13691309         i186.intr.ext[2] = data16 & 0x001f;
13701310         break;
13711311
1372      case 0x3e:
1312      case 0x1f:
13731313         if (LOG_PORTS) logerror("%05X:80186 INT 3 interrupt control = %04X\n", activecpu_get_pc(), data16);
13741314         i186.intr.ext[3] = data16 & 0x001f;
13751315         break;
13761316
1377      case 0x50:
1378      case 0x58:
1379      case 0x60:
1380         if (LOG_PORTS) logerror("%05X:80186 Timer %d count = %04X\n", activecpu_get_pc(), (offset - 0x50) / 8, data16);
1381         which = (offset - 0x50) / 8;
1317      case 0x28:
1318      case 0x2c:
1319      case 0x30:
1320         if (LOG_PORTS) logerror("%05X:80186 Timer %d count = %04X\n", activecpu_get_pc(), (offset - 0x28) / 4, data16);
1321         which = (offset - 0x28) / 4;
13821322         internal_timer_update(which, data16, -1, -1, -1);
13831323         break;
13841324
1385      case 0x52:
1386      case 0x5a:
1387      case 0x62:
1388         if (LOG_PORTS) logerror("%05X:80186 Timer %d max A = %04X\n", activecpu_get_pc(), (offset - 0x50) / 8, data16);
1389         which = (offset - 0x50) / 8;
1325      case 0x29:
1326      case 0x2d:
1327      case 0x31:
1328         if (LOG_PORTS) logerror("%05X:80186 Timer %d max A = %04X\n", activecpu_get_pc(), (offset - 0x29) / 4, data16);
1329         which = (offset - 0x29) / 4;
13901330         internal_timer_update(which, -1, data16, -1, -1);
13911331         break;
13921332
1393      case 0x54:
1394      case 0x5c:
1395         if (LOG_PORTS) logerror("%05X:80186 Timer %d max B = %04X\n", activecpu_get_pc(), (offset - 0x50) / 8, data16);
1396         which = (offset - 0x50) / 8;
1333      case 0x2a:
1334      case 0x2e:
1335         if (LOG_PORTS) logerror("%05X:80186 Timer %d max B = %04X\n", activecpu_get_pc(), (offset - 0x2a) / 4, data16);
1336         which = (offset - 0x2a) / 4;
13971337         internal_timer_update(which, -1, -1, data16, -1);
13981338         break;
13991339
1400      case 0x56:
1401      case 0x5e:
1402      case 0x66:
1403         if (LOG_PORTS) logerror("%05X:80186 Timer %d control = %04X\n", activecpu_get_pc(), (offset - 0x50) / 8, data16);
1404         which = (offset - 0x50) / 8;
1340      case 0x2b:
1341      case 0x2f:
1342      case 0x33:
1343         if (LOG_PORTS) logerror("%05X:80186 Timer %d control = %04X\n", activecpu_get_pc(), (offset - 0x2b) / 4, data16);
1344         which = (offset - 0x2b) / 4;
14051345         internal_timer_update(which, -1, -1, -1, data16);
14061346         break;
14071347
1408      case 0xa0:
1348      case 0x50:
14091349         if (LOG_PORTS) logerror("%05X:80186 upper chip select = %04X\n", activecpu_get_pc(), data16);
14101350         i186.mem.upper = data16 | 0xc038;
14111351         break;
14121352
1413      case 0xa2:
1353      case 0x51:
14141354         if (LOG_PORTS) logerror("%05X:80186 lower chip select = %04X\n", activecpu_get_pc(), data16);
1415         i186.mem.lower = (data16 & 0x3fff) | 0x0038;
1355         i186.mem.lower = (data16 & 0x3fff) | 0x0038; printf("%X",i186.mem.lower);
14161356         break;
14171357
1418      case 0xa4:
1419         if (LOG_PORTS)
1420            logerror("%05X:80186 peripheral chip select = %04X\n",
1421                     activecpu_get_pc(), data16);
1358      case 0x52:
1359         if (LOG_PORTS) logerror("%05X:80186 peripheral chip select = %04X\n", activecpu_get_pc(), data16);
14221360         i186.mem.peripheral = data16 | 0x0038;
14231361         break;
14241362
1425      case 0xa6:
1363      case 0x53:
14261364         if (LOG_PORTS) logerror("%05X:80186 middle chip select = %04X\n", activecpu_get_pc(), data16);
14271365         i186.mem.middle = data16 | 0x01f8;
14281366         break;
14291367
1430      case 0xa8:
1368      case 0x54:
14311369         if (LOG_PORTS) logerror("%05X:80186 middle P chip select = %04X\n", activecpu_get_pc(), data16);
14321370         i186.mem.middle_size = data16 | 0x8038;
14331371
r2637r2638
14501388         cpunum_set_irq_callback(0, int_callback);
14511389         break;
14521390
1453      case 0xc0:
1454      case 0xd0:
1455         if (LOG_PORTS) logerror("%05X:80186 DMA%d lower source address = %04X\n", activecpu_get_pc(), (offset - 0xc0) / 0x10, data16);
1456         which = (offset - 0xc0) / 0x10;
1391      case 0x60:
1392      case 0x68:
1393         if (LOG_PORTS) logerror("%05X:80186 DMA%d lower source address = %04X\n", activecpu_get_pc(), (offset - 0x60) / 8, data16);
1394         which = (offset - 0x60) / 8;
14571395//         stream_update(dma_stream, 0);
14581396         i186.dma[which].source = (i186.dma[which].source & ~0x0ffff) | (data16 & 0x0ffff);
14591397         break;
14601398
1461      case 0xc2:
1462      case 0xd2:
1463         if (LOG_PORTS) logerror("%05X:80186 DMA%d upper source address = %04X\n", activecpu_get_pc(), (offset - 0xc0) / 0x10, data16);
1464         which = (offset - 0xc0) / 0x10;
1399      case 0x61:
1400      case 0x69:
1401         if (LOG_PORTS) logerror("%05X:80186 DMA%d upper source address = %04X\n", activecpu_get_pc(), (offset - 0x61) / 8, data16);
1402         which = (offset - 0x61) / 8;
14651403//         stream_update(dma_stream, 0);
14661404         i186.dma[which].source = (i186.dma[which].source & ~0xf0000) | ((data16 << 16) & 0xf0000);
14671405         break;
14681406
1469      case 0xc4:
1470      case 0xd4:
1471         if (LOG_PORTS) logerror("%05X:80186 DMA%d lower dest address = %04X\n", activecpu_get_pc(), (offset - 0xc0) / 0x10, data16);
1472         which = (offset - 0xc0) / 0x10;
1407      case 0x62:
1408      case 0x6a:
1409         if (LOG_PORTS) logerror("%05X:80186 DMA%d lower dest address = %04X\n", activecpu_get_pc(), (offset - 0x62) / 8, data16);
1410         which = (offset - 0x62) / 8;
14731411//         stream_update(dma_stream, 0);
14741412         i186.dma[which].dest = (i186.dma[which].dest & ~0x0ffff) | (data16 & 0x0ffff);
14751413         break;
14761414
1477      case 0xc6:
1478      case 0xd6:
1479         if (LOG_PORTS) logerror("%05X:80186 DMA%d upper dest address = %04X\n", activecpu_get_pc(), (offset - 0xc0) / 0x10, data16);
1480         which = (offset - 0xc0) / 0x10;
1415      case 0x63:
1416      case 0x6b:
1417         if (LOG_PORTS) logerror("%05X:80186 DMA%d upper dest address = %04X\n", activecpu_get_pc(), (offset - 0x63) / 8, data16);
1418         which = (offset - 0x63) / 8;
14811419//         stream_update(dma_stream, 0);
14821420         i186.dma[which].dest = (i186.dma[which].dest & ~0xf0000) | ((data16 << 16) & 0xf0000);
14831421         break;
14841422
1485      case 0xc8:
1486      case 0xd8:
1487         if (LOG_PORTS) logerror("%05X:80186 DMA%d transfer count = %04X\n", activecpu_get_pc(), (offset - 0xc0) / 0x10, data16);
1488         which = (offset - 0xc0) / 0x10;
1423      case 0x64:
1424      case 0x6c:
1425         if (LOG_PORTS) logerror("%05X:80186 DMA%d transfer count = %04X\n", activecpu_get_pc(), (offset - 0x64) / 8, data16);
1426         which = (offset - 0x64) / 8;
14891427//         stream_update(dma_stream, 0);
14901428         i186.dma[which].count = data16;
14911429         break;
14921430
1493      case 0xca:
1494      case 0xda:
1495         if (LOG_PORTS) logerror("%05X:80186 DMA%d control = %04X\n", activecpu_get_pc(), (offset - 0xc0) / 0x10, data16);
1496         which = (offset - 0xc0) / 0x10;
1431      case 0x65:
1432      case 0x6d:
1433         if (LOG_PORTS) logerror("%05X:80186 DMA%d control = %04X\n", activecpu_get_pc(), (offset - 0x65) / 8, data16);
1434         which = (offset - 0x65) / 8;
14971435//         stream_update(dma_stream, 0);
14981436         update_dma_control(which, data16);
14991437         break;
15001438
1501      case 0xfe:
1439      case 0x7f:
15021440         if (LOG_PORTS) logerror("%05X:80186 relocation register = %04X\n", activecpu_get_pc(), data16);
15031441
15041442         /* we assume here there that this doesn't happen too often */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team