trunk/src/mame/drivers/namcos22.c
| r24771 | r24772 | |
| 1 | 1 | /** |
| 2 | | * @file src/drivers/namcos22.c |
| 3 | | * |
| 4 | 2 | * This driver describes Namco's System22 and Super System 22 hardware. |
| 5 | 3 | * |
| 6 | 4 | * driver provided with thanks to: |
| r24771 | r24772 | |
| 11 | 9 | * |
| 12 | 10 | * Input |
| 13 | 11 | * - input ports require manual calibration through built-in diagnostics (or canned EEPROM) |
| 14 | | * - new input port type needed for bicycle pedal speed |
| 15 | 12 | * |
| 16 | 13 | * Output Devices |
| 17 | 14 | * - Prop Cycle fan (outputs noted at the right MCU port) |
| r24771 | r24772 | |
| 1143 | 1140 | |
| 1144 | 1141 | #define SS22_MASTER_CLOCK (XTAL_49_152MHz) /* info from Guru */ |
| 1145 | 1142 | |
| 1146 | | #define PIXEL_CLOCK ((SS22_MASTER_CLOCK*2)/4) // x 2 is due of the interlaced screen ... |
| 1143 | #define PIXEL_CLOCK ((SS22_MASTER_CLOCK*2)/4) /* x 2 is due of the interlaced screen ... */ |
| 1147 | 1144 | |
| 1148 | 1145 | // VSync - 59.9042 Hz |
| 1149 | 1146 | // HSync - 15.7248 kHz |
| r24771 | r24772 | |
| 1158 | 1155 | |
| 1159 | 1156 | #define MCU_SPEEDUP 1 /* mcu idle skipping */ |
| 1160 | 1157 | |
| 1161 | | /** |
| 1162 | | * helper function used to read a byte from a chunk of 32 bit memory |
| 1163 | | */ |
| 1164 | | static UINT8 nthbyte( const UINT32 *pSource, int offs ) |
| 1158 | |
| 1159 | /*********************************************************************************************/ |
| 1160 | |
| 1161 | // Main CPU |
| 1162 | |
| 1163 | /* SCI, prelim! */ |
| 1164 | READ32_MEMBER(namcos22_state::namcos22_sci_r) |
| 1165 | 1165 | { |
| 1166 | | pSource += offs/4; |
| 1167 | | return (pSource[0]<<((offs&3)*8))>>24; |
| 1166 | switch (offset) |
| 1167 | { |
| 1168 | case 0x0/4: |
| 1169 | return 0x0004 << 16; |
| 1170 | |
| 1171 | default: |
| 1172 | return 0; |
| 1173 | } |
| 1168 | 1174 | } |
| 1169 | 1175 | |
| 1170 | | /*********************************************************************************************/ |
| 1176 | #if 0 |
| 1177 | WRITE32_MEMBER(namcos22_state::namcos22_sci_w) |
| 1178 | { |
| 1179 | COMBINE_DATA(&m_sci_regs[offset]); |
| 1180 | /* |
| 1181 | 20020000 2 R/W RX Status |
| 1182 | 0x01 : Frame Error |
| 1183 | 0x02 : Frame Received |
| 1184 | 0x04 : ? |
| 1171 | 1185 | |
| 1172 | | /* TODO: REMOVE (THIS IS HANDLED BY "IOMCU") */ |
| 1173 | | static void HandleCoinage(running_machine &machine, int slots, int address_is_odd) |
| 1186 | 20020002 2 R/W Status/Control Flags |
| 1187 | 0x01 : |
| 1188 | 0x02 : RX flag? (cleared every vsync) |
| 1189 | 0x04 : RX flag? (cleared every vsync) |
| 1190 | 0x08 : |
| 1191 | |
| 1192 | 20020004 2 W FIFO Control Register |
| 1193 | 0x01 : sync bit enable? |
| 1194 | 0x02 : TX FIFO sync bit (bit-8) |
| 1195 | |
| 1196 | 20020006 2 W TX Control Register |
| 1197 | 0x01 : TX start/stop |
| 1198 | 0x02 : ? |
| 1199 | 0x10 : ? |
| 1200 | |
| 1201 | 20020008 2 W - |
| 1202 | 2002000a 2 W TX Frame Size |
| 1203 | 2002000c 2 R/W RX FIFO Pointer (0x0000 - 0x0fff) |
| 1204 | 2002000e 2 W TX FIFO Pointer (0x0000 - 0x1fff) |
| 1205 | */ |
| 1206 | } |
| 1207 | #endif |
| 1208 | |
| 1209 | |
| 1210 | /* system controller (super system22) |
| 1211 | |
| 1212 | 0x00: vblank irq level |
| 1213 | 0x01: hblank irq level |
| 1214 | 0x02: sci irq level |
| 1215 | 0x03: unk irq level (unused?) |
| 1216 | |
| 1217 | 0x04: vblank irq ack |
| 1218 | 0x05: hblank irq ack |
| 1219 | 0x06: sci irq ack |
| 1220 | 0x07: unk irq ack |
| 1221 | |
| 1222 | 0x08: unknown |
| 1223 | 0x09: 0x62 or 0x61 |
| 1224 | 0x0a: 0x62 |
| 1225 | 0x0b: 0x57 |
| 1226 | |
| 1227 | 0x0c: 0x40 |
| 1228 | 0x0d: 0x12 |
| 1229 | 0x0e: 0x52 or 0x50 |
| 1230 | 0x0f: 0x72 or 0x71 |
| 1231 | |
| 1232 | 0x10: 0xe0 |
| 1233 | 0x11: 0x2c |
| 1234 | 0x12: 0x50 |
| 1235 | 0x13: 0xff |
| 1236 | |
| 1237 | 0x14: watchdog |
| 1238 | 0x15: ? |
| 1239 | 0x16: subcpu enable |
| 1240 | 0x17: 0x0f |
| 1241 | |
| 1242 | 0x18: ? |
| 1243 | 0x19: ? |
| 1244 | 0x1a: ? |
| 1245 | 0x1b: 0x01 |
| 1246 | |
| 1247 | 0x1c: dsp control |
| 1248 | */ |
| 1249 | WRITE8_MEMBER(namcos22_state::namcos22s_system_controller_w) |
| 1174 | 1250 | { |
| 1175 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 1176 | | UINT16 *share16 = (UINT16 *)state->m_shareram.target(); |
| 1177 | | UINT32 coin_state; |
| 1251 | switch (offset) |
| 1252 | { |
| 1253 | // irq level / enable irqs |
| 1254 | case 0x00: // vblank |
| 1255 | case 0x01: // hblank |
| 1256 | case 0x02: // SCI |
| 1257 | case 0x03: // unknown |
| 1258 | { |
| 1259 | int line = 1 << offset; |
| 1260 | int oldlevel = m_syscontrol[offset] & 7; |
| 1261 | int newlevel = data & 7; |
| 1262 | if (m_irq_state & line && oldlevel != newlevel) |
| 1263 | { |
| 1264 | m_maincpu->set_input_line(oldlevel, CLEAR_LINE); |
| 1265 | if (newlevel) |
| 1266 | m_maincpu->set_input_line(newlevel, ASSERT_LINE); |
| 1267 | else |
| 1268 | m_irq_state &= ~line; |
| 1269 | } |
| 1270 | break; |
| 1271 | } |
| 1272 | |
| 1273 | // acknowledge irqs |
| 1274 | case 0x04: // vblank |
| 1275 | case 0x05: // hblank |
| 1276 | case 0x06: // SCI |
| 1277 | case 0x07: // unknown |
| 1278 | { |
| 1279 | int line = 1 << (offset-4); |
| 1280 | m_irq_state &= ~line; |
| 1281 | m_maincpu->set_input_line(m_syscontrol[offset-4] & 7, CLEAR_LINE); |
| 1282 | break; |
| 1283 | } |
| 1284 | |
| 1285 | // watchdog |
| 1286 | case 0x14: |
| 1287 | break; |
| 1288 | |
| 1289 | // reset mcu |
| 1290 | case 0x16: |
| 1291 | m_mcu->set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE); |
| 1292 | break; |
| 1293 | |
| 1294 | // dsp control |
| 1295 | case 0x1c: |
| 1296 | if (data != m_syscontrol[0x1c]) |
| 1297 | { |
| 1298 | if (data == 0) |
| 1299 | { |
| 1300 | /* disable DSPs */ |
| 1301 | m_master->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 1302 | m_slave->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 1303 | enable_slave_simulation(false); |
| 1304 | m_dsp_irq_enabled = false; |
| 1305 | } |
| 1306 | else if (data == 1) |
| 1307 | { |
| 1308 | /* enable dsp and rendering subsystem */ |
| 1309 | m_master->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 1310 | enable_slave_simulation(true); |
| 1311 | m_dsp_irq_enabled = true; |
| 1312 | } |
| 1313 | else if (data == 0xff) |
| 1314 | { |
| 1315 | /* used to upload game-specific code to master/slave dsps */ |
| 1316 | m_master->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 1317 | m_dsp_irq_enabled = false; |
| 1318 | } |
| 1319 | } |
| 1320 | break; |
| 1321 | |
| 1322 | // other regs: unknown |
| 1323 | default: |
| 1324 | break; |
| 1325 | } |
| 1326 | |
| 1327 | m_syscontrol[offset] = data; |
| 1328 | } |
| 1178 | 1329 | |
| 1179 | | coin_state = state->ioport("INPUTS")->read() & 0x1200; |
| 1180 | 1330 | |
| 1181 | | if (!(coin_state & 0x1000) && (state->m_old_coin_state & 0x1000)) |
| 1331 | /* |
| 1332 | 000064: 0000 8C9A (1) |
| 1333 | 000068: 0000 8CA2 (2) |
| 1334 | 00006C: 0000 8CAA (3) |
| 1335 | 000070: 0000 8CB2 (4) |
| 1336 | |
| 1337 | 00008bd8: sys[0x01] := 0x01 // scanline |
| 1338 | 00008be0: sys[0x02] := 0x02 // sci |
| 1339 | 00008be8: sys[0x03] := 0x03 // unk |
| 1340 | 00008bf0: sys[0x00] := 0x04 // vblank |
| 1341 | 00008bf8: sys[0x08] := 0xff // ? |
| 1342 | */ |
| 1343 | INTERRUPT_GEN_MEMBER(namcos22_state::namcos22s_interrupt) |
| 1344 | { |
| 1345 | if (m_syscontrol[0x00] & 7) |
| 1182 | 1346 | { |
| 1183 | | state->m_credits1++; |
| 1347 | // vblank irq |
| 1348 | m_irq_state |= (1 << 0x00); |
| 1349 | device.execute().set_input_line(m_syscontrol[0x00] & 7, ASSERT_LINE); |
| 1184 | 1350 | } |
| 1351 | } |
| 1185 | 1352 | |
| 1186 | | if (!(coin_state & 0x0200) && (state->m_old_coin_state & 0x0200)) |
| 1353 | |
| 1354 | |
| 1355 | /* system controller (system22) |
| 1356 | |
| 1357 | 0x00: IRQ (unknown) |
| 1358 | 0x01: ? |
| 1359 | 0x02: SCI IRQ level |
| 1360 | 0x03: IRQ (unknown) |
| 1361 | |
| 1362 | 0x04: VSYNC IRQ level |
| 1363 | 0x05: IRQ (unknown) acknowledge |
| 1364 | 0x06: ? |
| 1365 | 0x07: SCI IRQ acknowledge |
| 1366 | |
| 1367 | 0x08: IRQ (unknown) acknowledge |
| 1368 | 0x09: VSYNC IRQ acknowledge |
| 1369 | 0x0a: ? |
| 1370 | 0x0b: ? |
| 1371 | |
| 1372 | 0x0c: ? |
| 1373 | 0x0d: ? |
| 1374 | 0x0e: ? |
| 1375 | 0x0f: ? |
| 1376 | |
| 1377 | 0x10: ? |
| 1378 | 0x11: ? |
| 1379 | 0x12: ? |
| 1380 | 0x13: ? |
| 1381 | |
| 1382 | 0x14: ? |
| 1383 | 0x15: ? (cyc1) |
| 1384 | 0x16: Watchdog timer reset |
| 1385 | 0x17: ? |
| 1386 | |
| 1387 | 0x18: 0 or 1 -> mcu reset? |
| 1388 | 0x19: ? |
| 1389 | 0x1a: 0 or 1 or 0xff -> DSP control |
| 1390 | 0x1b: ? |
| 1391 | */ |
| 1392 | WRITE8_MEMBER(namcos22_state::namcos22_system_controller_w) |
| 1393 | { |
| 1394 | switch (offset) |
| 1187 | 1395 | { |
| 1188 | | state->m_credits2++; |
| 1396 | // irq level / enable irqs |
| 1397 | case 0x00: // unknown |
| 1398 | case 0x01: // ? |
| 1399 | case 0x02: // SCI |
| 1400 | case 0x03: // unknown |
| 1401 | case 0x04: // vblank |
| 1402 | { |
| 1403 | int line = 1 << offset; |
| 1404 | int oldlevel = m_syscontrol[offset] & 7; |
| 1405 | int newlevel = data & 7; |
| 1406 | if (m_irq_state & line && oldlevel != newlevel) |
| 1407 | { |
| 1408 | m_maincpu->set_input_line(oldlevel, CLEAR_LINE); |
| 1409 | if (newlevel) |
| 1410 | m_maincpu->set_input_line(newlevel, ASSERT_LINE); |
| 1411 | else |
| 1412 | m_irq_state &= ~line; |
| 1413 | } |
| 1414 | break; |
| 1415 | } |
| 1416 | |
| 1417 | // acknowledge irqs |
| 1418 | case 0x05: // unknown |
| 1419 | case 0x06: // ? |
| 1420 | case 0x07: // SCI |
| 1421 | case 0x08: // unknown |
| 1422 | case 0x09: // vblank |
| 1423 | { |
| 1424 | int line = 1 << (offset-5); |
| 1425 | m_irq_state &= ~line; |
| 1426 | m_maincpu->set_input_line(m_syscontrol[offset-5] & 7, CLEAR_LINE); |
| 1427 | break; |
| 1428 | } |
| 1429 | |
| 1430 | // watchdog |
| 1431 | case 0x16: |
| 1432 | break; |
| 1433 | |
| 1434 | // reset mcu |
| 1435 | case 0x18: |
| 1436 | m_mcu->set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE); |
| 1437 | break; |
| 1438 | |
| 1439 | // dsp control |
| 1440 | case 0x1a: |
| 1441 | if (data != m_syscontrol[0x1a]) |
| 1442 | { |
| 1443 | if (data == 0) |
| 1444 | { |
| 1445 | /* disable DSPs */ |
| 1446 | m_master->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 1447 | m_slave->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 1448 | enable_slave_simulation(false); |
| 1449 | m_dsp_irq_enabled = false; |
| 1450 | } |
| 1451 | else if (data == 1) |
| 1452 | { |
| 1453 | /* enable dsp and rendering subsystem */ |
| 1454 | m_master->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 1455 | enable_slave_simulation(true); |
| 1456 | m_dsp_irq_enabled = true; |
| 1457 | } |
| 1458 | else if (data == 0xff) |
| 1459 | { |
| 1460 | /* used to upload game-specific code to master/slave dsps */ |
| 1461 | m_master->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 1462 | m_dsp_irq_enabled = false; |
| 1463 | } |
| 1464 | } |
| 1465 | break; |
| 1466 | |
| 1467 | // other regs: unknown |
| 1468 | default: |
| 1469 | break; |
| 1189 | 1470 | } |
| 1190 | 1471 | |
| 1191 | | state->m_old_coin_state = coin_state; |
| 1472 | m_syscontrol[offset] = data; |
| 1473 | } |
| 1192 | 1474 | |
| 1193 | | share16[BYTE_XOR_LE(0x38/2)] = state->m_credits1 << (address_is_odd*8); |
| 1475 | /* namcos22_interrupt |
| 1476 | Ridge Racer: |
| 1477 | 1:0a0b6 |
| 1478 | 2:09fe8 (rte) |
| 1479 | 3:09fe8 (rte) |
| 1480 | 4:09f9a (vblank) |
| 1481 | 5:14dee (SCI) |
| 1482 | 6:09fe8 (rte) |
| 1483 | 7:09fe8 (rte) |
| 1194 | 1484 | |
| 1195 | | if (slots == 2) |
| 1485 | Ridge Racer 2: |
| 1486 | 1:0d10c 40000005 |
| 1487 | 2:0cfa2 (rte) |
| 1488 | 3:0cfa2 (rte) |
| 1489 | 4:0cfa2 (rte) |
| 1490 | 5:0cef0 |
| 1491 | 6:1bbcc |
| 1492 | 7:0cfa2 (rte) |
| 1493 | |
| 1494 | Ace Driver: |
| 1495 | 9f8 (rte) |
| 1496 | 9fa (rte) |
| 1497 | 9fc (rte) |
| 1498 | 9fe (rte) |
| 1499 | a00 |
| 1500 | a46 |
| 1501 | a4c (rte) |
| 1502 | |
| 1503 | Victory Lap: |
| 1504 | a54 indir to 21c2 (hblank?) |
| 1505 | a5a (rte) |
| 1506 | a5c (rte) |
| 1507 | a5e (rte) |
| 1508 | a60 irq |
| 1509 | abe indirect to 27f1e (SCI) |
| 1510 | ac4 (rte) |
| 1511 | |
| 1512 | Cyber Commando: |
| 1513 | move.b #$36, $40000002.l |
| 1514 | move.b # $0, $40000003.l |
| 1515 | move.b #$35, $40000004.l |
| 1516 | |
| 1517 | move.b #$34, $40000004.l |
| 1518 | */ |
| 1519 | INTERRUPT_GEN_MEMBER(namcos22_state::namcos22_interrupt) |
| 1520 | { |
| 1521 | switch (m_gametype) |
| 1196 | 1522 | { |
| 1197 | | share16[BYTE_XOR_LE(0x3e/2)] = state->m_credits2 << (address_is_odd*8); |
| 1523 | case NAMCOS22_RIDGE_RACER: |
| 1524 | case NAMCOS22_RIDGE_RACER2: |
| 1525 | case NAMCOS22_RAVE_RACER: |
| 1526 | case NAMCOS22_ACE_DRIVER: |
| 1527 | case NAMCOS22_VICTORY_LAP: |
| 1528 | handle_driving_io(); |
| 1529 | break; |
| 1530 | |
| 1531 | case NAMCOS22_CYBER_COMMANDO: |
| 1532 | handle_cybrcomm_io(); |
| 1533 | break; |
| 1534 | |
| 1535 | default: |
| 1536 | break; |
| 1198 | 1537 | } |
| 1538 | |
| 1539 | if (m_syscontrol[0x04] & 7) |
| 1540 | { |
| 1541 | // vblank irq |
| 1542 | m_irq_state |= (1 << 0x04); |
| 1543 | device.execute().set_input_line(m_syscontrol[0x04] & 7, ASSERT_LINE); |
| 1544 | } |
| 1199 | 1545 | } |
| 1200 | 1546 | |
| 1201 | | /* TODO: REMOVE (THIS IS HANDLED BY "IOMCU") */ |
| 1202 | | static void HandleDrivingIO( running_machine &machine ) |
| 1547 | READ8_MEMBER(namcos22_state::namcos22_system_controller_r) |
| 1203 | 1548 | { |
| 1204 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 1205 | | if( nthbyte(state->m_system_controller, 0x18) != 0 ) |
| 1549 | return m_syscontrol[offset]; |
| 1550 | } |
| 1551 | |
| 1552 | |
| 1553 | WRITE32_MEMBER(namcos22_state::namcos22s_nvmem_w) |
| 1554 | { |
| 1555 | mem_mask &= 0xff00ff00; // 8KB RAM over 16KB address &space |
| 1556 | COMBINE_DATA(&m_nvmem[offset]); |
| 1557 | } |
| 1558 | |
| 1559 | READ32_MEMBER(namcos22_state::namcos22_dspram_r) |
| 1560 | { |
| 1561 | return signed24(m_polygonram[offset]); // only d0-23 are connected |
| 1562 | } |
| 1563 | |
| 1564 | WRITE32_MEMBER(namcos22_state::namcos22_dspram_w) |
| 1565 | { |
| 1566 | if (mem_mask & 0x00ff0000) |
| 1206 | 1567 | { |
| 1207 | | UINT16 flags = state->ioport("INPUTS")->read(); |
| 1208 | | UINT16 coinram_address_is_odd = 0; |
| 1568 | // only d0-23 are connected |
| 1569 | mem_mask |= 0xff000000; |
| 1570 | data = signed24(data); // ! |
| 1571 | } |
| 1572 | COMBINE_DATA(&m_polygonram[offset]); |
| 1573 | } |
| 1209 | 1574 | |
| 1210 | | UINT16 gas = machine.root_device().ioport("GAS")->read(); |
| 1211 | | UINT16 brake = machine.root_device().ioport("BRAKE")->read(); |
| 1212 | | UINT16 steer = machine.root_device().ioport("STEER")->read(); |
| 1213 | 1575 | |
| 1214 | | switch (state->m_gametype) |
| 1215 | | { |
| 1216 | | case NAMCOS22_RIDGE_RACER: |
| 1217 | | case NAMCOS22_RIDGE_RACER2: |
| 1218 | | gas <<= 3; |
| 1219 | | gas += 884; |
| 1220 | | brake <<= 3; |
| 1221 | | brake += 809; |
| 1222 | | steer <<= 4; |
| 1223 | | steer += 0x160; |
| 1224 | | break; |
| 1576 | READ32_MEMBER(namcos22_state::namcos22_keycus_r) |
| 1577 | { |
| 1578 | // this chip is also used for reading random values in some games |
| 1579 | // for example in timecris to determine where certain enemies will emerge |
| 1580 | // but it is not yet understood how this works |
| 1581 | // printf("Hit keycus mask %x PC=%x\n", mem_mask, space.device().safe_pc()); |
| 1225 | 1582 | |
| 1226 | | case NAMCOS22_RAVE_RACER: |
| 1227 | | gas <<= 3; |
| 1228 | | gas += 992; |
| 1229 | | brake <<= 3; |
| 1230 | | brake += 3008; |
| 1231 | | steer <<= 4; |
| 1232 | | steer += 32; |
| 1233 | | break; |
| 1583 | if (ACCESSING_BITS_0_15) |
| 1584 | return m_keycus_id; |
| 1585 | if (ACCESSING_BITS_16_31) |
| 1586 | return m_keycus_id << 16; |
| 1234 | 1587 | |
| 1235 | | case NAMCOS22_VICTORY_LAP: |
| 1236 | | coinram_address_is_odd = 1; |
| 1237 | | // (fall through) |
| 1238 | | case NAMCOS22_ACE_DRIVER: |
| 1239 | | gas <<= 3; |
| 1240 | | gas += 992; |
| 1241 | | brake <<= 3; |
| 1242 | | brake += 3008; |
| 1243 | | steer <<= 4; |
| 1244 | | steer += 2048; |
| 1245 | | break; |
| 1588 | return 0; |
| 1589 | } |
| 1246 | 1590 | |
| 1247 | | default: |
| 1248 | | gas <<= 3; |
| 1249 | | brake <<= 3; |
| 1250 | | steer <<= 4; |
| 1251 | | break; |
| 1252 | | } |
| 1591 | WRITE32_MEMBER(namcos22_state::namcos22_keycus_w) |
| 1592 | { |
| 1593 | // for obfuscating keycus and/or random seed? |
| 1594 | } |
| 1253 | 1595 | |
| 1254 | | HandleCoinage(machine, 2, coinram_address_is_odd); |
| 1255 | | state->m_shareram[0x000/4] = 0x10<<16; /* SUB CPU ready */ |
| 1256 | | state->m_shareram[0x030/4] = (flags<<16)|steer; |
| 1257 | | state->m_shareram[0x034/4] = (gas<<16)|brake; |
| 1596 | /** |
| 1597 | * Some port values are read serially one bit at a time via word reads at |
| 1598 | * 0x50000008 and 0x5000000a |
| 1599 | * |
| 1600 | * Writes to 0x50000008 and 0x5000000a reset the state of the input buffer. |
| 1601 | * |
| 1602 | * Note that only the values read at 0x50000008 seem to be used in-game. |
| 1603 | * |
| 1604 | * Some of these values are redundant with respects to the work-RAM supplied input port |
| 1605 | * values supplied by the IO CPU. For example, the position of the stick shift is digital, |
| 1606 | * and may be read through this mechanism or through shared IO RAM at 0x60004030. |
| 1607 | * |
| 1608 | * Other values seem to be digital versions of analog ports, for example "the gas pedal is |
| 1609 | * pressed" as a boolean flag. IO RAM supplies it as an analog value. |
| 1610 | */ |
| 1611 | READ16_MEMBER(namcos22_state::namcos22_portbit_r) |
| 1612 | { |
| 1613 | UINT16 ret = m_portbits[offset] & 1; |
| 1614 | m_portbits[offset] = m_portbits[offset] >> 1 | 0x8000; |
| 1615 | return ret; |
| 1616 | } |
| 1617 | |
| 1618 | WRITE16_MEMBER(namcos22_state::namcos22_portbit_w) |
| 1619 | { |
| 1620 | m_portbits[offset] = ioport((offset == 0) ? "P1" : "P2")->read_safe(0xffff); |
| 1621 | } |
| 1622 | |
| 1623 | READ16_MEMBER(namcos22_state::namcos22_dipswitch_r) |
| 1624 | { |
| 1625 | return ioport("DSW0")->read(); |
| 1626 | } |
| 1627 | |
| 1628 | WRITE16_MEMBER(namcos22_state::namcos22_cpuleds_w) |
| 1629 | { |
| 1630 | // 8 leds on cpu board, 0=on 1=off |
| 1631 | // on system 22: two rows of 4 red leds |
| 1632 | // on super system 22: GYRGYRGY green/yellow/red |
| 1633 | for (int i = 0; i < 8; i++) |
| 1634 | output_set_lamp_value(i, (~data << i & 0x80) ? 0 : 1); |
| 1635 | } |
| 1636 | |
| 1637 | WRITE32_MEMBER(namcos22_state::namcos22s_chipselect_w) |
| 1638 | { |
| 1639 | // assume that this register is for chip enable/disable |
| 1640 | // it's written many times during boot-up, and most games don't touch it afterwards (last value usually 0038 or 0838) |
| 1641 | // 8000: spot related (set in dirtdash night driving) |
| 1642 | // 4000: spot related (set in dirtdash and testmode) |
| 1643 | // 0800: fade related? |
| 1644 | // other bits: no clue |
| 1645 | if (ACCESSING_BITS_16_23) |
| 1646 | m_chipselect = data >> 16; |
| 1647 | |
| 1648 | // 8-bit access? (see alpinerd) |
| 1649 | else if (ACCESSING_BITS_24_31) |
| 1650 | m_chipselect = data >> 24; |
| 1651 | } |
| 1652 | |
| 1653 | |
| 1654 | // System 22 |
| 1655 | static ADDRESS_MAP_START( namcos22_am, AS_PROGRAM, 32, namcos22_state ) |
| 1656 | /** |
| 1657 | * Program ROM (2M bytes) |
| 1658 | * Mounted position: LLB: CPU 4D, LMB: CPU 2D, UMB: CPU 8D, UUB: CPU 6D |
| 1659 | * Known ROM chip type: TI TMS27C040-10, ST M27C4001-10, M27C4001-12Z |
| 1660 | */ |
| 1661 | AM_RANGE(0x00000000, 0x001fffff) AM_ROM |
| 1662 | |
| 1663 | /** |
| 1664 | * Main RAM (128K bytes) |
| 1665 | * Mounted position: CPU 3D, 5D, 7D, 9D |
| 1666 | * Known DRAM chip type: TC55328P-25, N3441256P-15 |
| 1667 | */ |
| 1668 | AM_RANGE(0x10000000, 0x1001ffff) AM_RAM AM_MIRROR(0x08000000) |
| 1669 | |
| 1670 | /** |
| 1671 | * KEYCUS |
| 1672 | * Mounted position: CPU 13R |
| 1673 | * Known chip type: |
| 1674 | * C370 (Ridge Racer, Ridge Racer 2) |
| 1675 | * C388 (Rave Racer) |
| 1676 | * C389? (Cyber Cycles) |
| 1677 | * C392? (Ace Driver Victory Lap) |
| 1678 | */ |
| 1679 | AM_RANGE(0x20000000, 0x2000000f) AM_READWRITE(namcos22_keycus_r, namcos22_keycus_w) |
| 1680 | |
| 1681 | /** |
| 1682 | * C139 SCI Buffer |
| 1683 | * Mounted position: CPU 4N |
| 1684 | * Known chip type: M5M5179AP-25 (8k x 9bit SRAM) |
| 1685 | * |
| 1686 | * Note: Boot time check: 20010000 - 20011fff / bits=0x000001ff |
| 1687 | * |
| 1688 | * 20010000 - 20011fff TX Buffer |
| 1689 | * 20012000 - 20013fff RX FIFO Buffer (also used for TX Buffer) |
| 1690 | */ |
| 1691 | AM_RANGE(0x20010000, 0x20013fff) AM_RAM |
| 1692 | |
| 1693 | /** |
| 1694 | * C139 SCI Register |
| 1695 | * Mounted position: CPU 4R |
| 1696 | * |
| 1697 | * 20020000 2 R/W RX Status |
| 1698 | * 0x01 : Frame Error |
| 1699 | * 0x02 : Frame Received |
| 1700 | * 0x04 : ? |
| 1701 | * |
| 1702 | * 20020002 2 R/W Status/Control Flags |
| 1703 | * 0x01 : |
| 1704 | * 0x02 : RX flag? (cleared every vsync) |
| 1705 | * 0x04 : RX flag? (cleared every vsync) |
| 1706 | * 0x08 : |
| 1707 | * |
| 1708 | * 20020004 2 W FIFO Control Register |
| 1709 | * 0x01 : sync bit enable? |
| 1710 | * 0x02 : TX FIFO sync bit (bit-8) |
| 1711 | * |
| 1712 | * 20020006 2 W TX Control Register |
| 1713 | * 0x01 : TX start/stop |
| 1714 | * 0x02 : ? |
| 1715 | * 0x10 : ? |
| 1716 | * |
| 1717 | * 20020008 2 W - |
| 1718 | * 2002000a 2 W TX Frame Size |
| 1719 | * 2002000c 2 R/W RX FIFO Pointer (0x0000 - 0x0fff) |
| 1720 | * 2002000e 2 W TX FIFO Pointer (0x0000 - 0x1fff) |
| 1721 | */ |
| 1722 | AM_RANGE(0x20020000, 0x2002000f) AM_READ(namcos22_sci_r) AM_WRITEONLY |
| 1723 | |
| 1724 | /** |
| 1725 | * System Controller: Interrupt Control, Peripheral Control |
| 1726 | * |
| 1727 | */ |
| 1728 | AM_RANGE(0x40000000, 0x4000001f) AM_READWRITE8(namcos22_system_controller_r, namcos22_system_controller_w, 0xffffffff) |
| 1729 | |
| 1730 | /** |
| 1731 | * Unknown Device (optional for diagnostics?) |
| 1732 | * |
| 1733 | * zero means not-connected. |
| 1734 | * may be related to device at 0x94000000 |
| 1735 | */ |
| 1736 | AM_RANGE(0x48000000, 0x4800003f) AM_READNOP AM_WRITENOP |
| 1737 | |
| 1738 | /** |
| 1739 | * DIPSW |
| 1740 | * 0x50000000 - DIPSW3 |
| 1741 | * 0x50000001 - DIPSW2 |
| 1742 | */ |
| 1743 | AM_RANGE(0x50000000, 0x50000003) AM_READWRITE16(namcos22_dipswitch_r, namcos22_cpuleds_w, 0xffffffff) |
| 1744 | AM_RANGE(0x50000008, 0x5000000b) AM_READWRITE16(namcos22_portbit_r, namcos22_portbit_w, 0xffffffff) |
| 1745 | |
| 1746 | /** |
| 1747 | * EEPROM |
| 1748 | * Mounted position: CPU 9E |
| 1749 | * Known chip type: HN58C65P-25 (8k x 8bit EEPROM) |
| 1750 | */ |
| 1751 | AM_RANGE(0x58000000, 0x58001fff) AM_RAM AM_SHARE("nvmem") |
| 1752 | |
| 1753 | /** |
| 1754 | * C74 (Mitsubishi M37702 MCU) Shared RAM (0x60004000 - 0x6000bfff) |
| 1755 | * Mounted position: CPU 11L, 12L |
| 1756 | * Known chip type: TC55328P-25, N341256P-15 |
| 1757 | * |
| 1758 | * DATA ROM for C74 (SEQ data and external code): |
| 1759 | * Known chip type: NEC D27C4096D-12 |
| 1760 | * Notes: C74(CPU PCB) sends/receives I/O data from C74(I/O PCB) by SIO. |
| 1761 | * |
| 1762 | * 0x60004020 b4 = 1 : ??? |
| 1763 | * 0x60004022.w Volume(R) |
| 1764 | * 0x60004024.w Volume(L) |
| 1765 | * 0x60004026.w Volume(R) (maybe rear channels, not put on real PCB) |
| 1766 | * 0x60004028.w Volume(L) (maybe rear channels, not put on real PCB) |
| 1767 | * 0x60004030 b0 : system type 0 |
| 1768 | * 0x60004030 b1 = 0 : COIN2 |
| 1769 | * 0x60004030 b2 = 0 : TEST SW |
| 1770 | * 0x60004030 b3 = 0 : SERVICE SW |
| 1771 | * 0x60004030 b4 = 0 : COIN1 |
| 1772 | * 0x60004030 b5 : system type 1 |
| 1773 | * (system type on RR2 (00:50inch, 01:two in one, 20:standard, 21:deluxe)) |
| 1774 | * 0x60004031 b0 = 0 : SWITCH1 (for manual transmission) |
| 1775 | * 0x60004031 b1 = 0 : SWITCH2 |
| 1776 | * 0x60004031 b2 = 0 : SWITCH3 |
| 1777 | * 0x60004031 b3 = 0 : SWITCH4 |
| 1778 | * 0x60004031 b4 = 0 : CLUTCH |
| 1779 | * 0x60004031 b6 = 0 : VIEW SW |
| 1780 | * 0x60004032.w Handle A/D (=steering wheel, default of center value is different in each game) |
| 1781 | * 0x60004034.w Gas A/D |
| 1782 | * 0x60004036.w Brake A/D |
| 1783 | * 0x60004038.w A/D3 (reserved) |
| 1784 | * (some GOUT (general outputs for lamps, etc) is also mapped this area) |
| 1785 | * 0x60004080 Data/Code for Sub-CPU |
| 1786 | * 0x60004200 Data/Code for Sub-CPU |
| 1787 | * 0x60005000 - 0x6000bfff Sound Work |
| 1788 | * +0x0000 - 0x003f Song Request #00 to 31 |
| 1789 | * +0x0100 - 0x02ff Parameter RAM from Main MPU (for SEs) |
| 1790 | * +0x0300 - 0x03ff? Song Title (put messages here from Sound CPU) |
| 1791 | */ |
| 1792 | AM_RANGE(0x60000000, 0x60003fff) AM_WRITENOP |
| 1793 | AM_RANGE(0x60004000, 0x6000bfff) AM_RAM AM_SHARE("shareram") |
| 1794 | |
| 1795 | /** |
| 1796 | * C71 (TI TMS320C25 DSP) Shared RAM (0x70000000 - 0x70020000) |
| 1797 | * Mounted position: |
| 1798 | * C71: CPU 15R, 21R |
| 1799 | * RAM: CPU 15K, 13E, 12E |
| 1800 | * Known chip type: TC55328P-25, N341256P-15 |
| 1801 | * Notes: connected bits = 0x00ffffff (24bit) |
| 1802 | */ |
| 1803 | AM_RANGE(0x70000000, 0x7001ffff) AM_READWRITE(namcos22_dspram_r, namcos22_dspram_w) AM_SHARE("polygonram") |
| 1804 | |
| 1805 | /** |
| 1806 | * LED on PCB(?) |
| 1807 | */ |
| 1808 | AM_RANGE(0x90000000, 0x90000003) AM_RAM |
| 1809 | |
| 1810 | /** |
| 1811 | * Depth-cueing Look-up Table (fog density between near to far) |
| 1812 | * Mounted position: VIDEO 8P |
| 1813 | * Known chip type: TC55328P-25 |
| 1814 | */ |
| 1815 | AM_RANGE(0x90010000, 0x90017fff) AM_RAM AM_SHARE("czram") |
| 1816 | |
| 1817 | /** |
| 1818 | * C305 (Display Controller) |
| 1819 | * Mounted position: VIDEO 7D (C305) |
| 1820 | * Notes: Boot time check: 0x90020100 - 0x9002027f |
| 1821 | */ |
| 1822 | AM_RANGE(0x90020000, 0x90027fff) AM_RAM AM_SHARE("video_mixer") |
| 1823 | |
| 1824 | /** |
| 1825 | * Mounted position: VIDEO 6B, 7B, 8B (near C305) |
| 1826 | * Note: 0xff00-0xffff are for Tilemap (16 x 16) |
| 1827 | */ |
| 1828 | AM_RANGE(0x90028000, 0x9003ffff) AM_RAM_WRITE(namcos22_paletteram_w) AM_SHARE("paletteram") |
| 1829 | |
| 1830 | /** |
| 1831 | * unknown (option) |
| 1832 | * Note: This device may be optional. This may relate to device at 0x40000000 |
| 1833 | */ |
| 1834 | AM_RANGE(0x90040000, 0x9007ffff) AM_RAM /* diagnostic ROM? */ |
| 1835 | |
| 1836 | /** |
| 1837 | * Tilemap PCG Memory |
| 1838 | */ |
| 1839 | AM_RANGE(0x90080000, 0x9009dfff) AM_RAM_WRITE(namcos22_cgram_w) AM_SHARE("cgram") |
| 1840 | |
| 1841 | /** |
| 1842 | * Tilemap Memory (64 x 64) |
| 1843 | * Mounted position: VIDEO 2K |
| 1844 | * Known chip type: HM511664 (64k x 16bit SRAM) |
| 1845 | * Note: Self test: 90084000 - 9009ffff |
| 1846 | */ |
| 1847 | AM_RANGE(0x9009e000, 0x9009ffff) AM_RAM_WRITE(namcos22_textram_w) AM_SHARE("textram") |
| 1848 | |
| 1849 | /** |
| 1850 | * Tilemap Register |
| 1851 | * Mounted position: unknown |
| 1852 | */ |
| 1853 | AM_RANGE(0x900a0000, 0x900a000f) AM_READWRITE(namcos22_tilemapattr_r, namcos22_tilemapattr_w) AM_SHARE("tilemapattr") |
| 1854 | ADDRESS_MAP_END |
| 1855 | |
| 1856 | |
| 1857 | // Super System 22 |
| 1858 | static ADDRESS_MAP_START( namcos22s_am, AS_PROGRAM, 32, namcos22_state ) |
| 1859 | AM_RANGE(0x000000, 0x3fffff) AM_ROM |
| 1860 | AM_RANGE(0x400000, 0x40001f) AM_READWRITE(namcos22_keycus_r, namcos22_keycus_w) |
| 1861 | AM_RANGE(0x410000, 0x413fff) AM_RAM /* C139 SCI buffer */ |
| 1862 | AM_RANGE(0x420000, 0x42000f) AM_READ(namcos22_sci_r) AM_WRITEONLY /* C139 SCI registers */ |
| 1863 | AM_RANGE(0x440000, 0x440003) AM_READWRITE16(namcos22_dipswitch_r, namcos22_cpuleds_w, 0xffffffff) |
| 1864 | AM_RANGE(0x450008, 0x45000b) AM_READWRITE16(namcos22_portbit_r, namcos22_portbit_w, 0xffffffff) |
| 1865 | AM_RANGE(0x460000, 0x463fff) AM_RAM_WRITE(namcos22s_nvmem_w) AM_SHARE("nvmem") |
| 1866 | AM_RANGE(0x700000, 0x70001f) AM_READWRITE8(namcos22_system_controller_r, namcos22s_system_controller_w, 0xffffffff) |
| 1867 | AM_RANGE(0x800000, 0x800003) AM_WRITE(namcos22s_chipselect_w) |
| 1868 | AM_RANGE(0x810000, 0x81000f) AM_RAM AM_SHARE("czattr") |
| 1869 | AM_RANGE(0x810200, 0x8103ff) AM_READWRITE(namcos22s_czram_r, namcos22s_czram_w) |
| 1870 | AM_RANGE(0x820000, 0x8202ff) AM_WRITENOP /* leftover of old (non-super) video mixer device */ |
| 1871 | AM_RANGE(0x824000, 0x8243ff) AM_RAM AM_SHARE("video_mixer") |
| 1872 | AM_RANGE(0x828000, 0x83ffff) AM_RAM_WRITE(namcos22_paletteram_w) AM_SHARE("paletteram") |
| 1873 | AM_RANGE(0x860000, 0x860007) AM_READWRITE(namcos22s_spotram_r, namcos22s_spotram_w) |
| 1874 | AM_RANGE(0x880000, 0x89dfff) AM_RAM_WRITE(namcos22_cgram_w) AM_SHARE("cgram") |
| 1875 | AM_RANGE(0x89e000, 0x89ffff) AM_RAM_WRITE(namcos22_textram_w) AM_SHARE("textram") |
| 1876 | AM_RANGE(0x8a0000, 0x8a000f) AM_READWRITE(namcos22_tilemapattr_r, namcos22_tilemapattr_w) AM_SHARE("tilemapattr") |
| 1877 | AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("vics_data") |
| 1878 | AM_RANGE(0x940000, 0x94007f) AM_READWRITE(namcos22s_vics_control_r, namcos22s_vics_control_w) AM_SHARE("vics_control") |
| 1879 | AM_RANGE(0x980000, 0x9affff) AM_RAM AM_SHARE("spriteram") /* C374 */ |
| 1880 | AM_RANGE(0xa04000, 0xa0bfff) AM_RAM AM_SHARE("shareram") /* COM RAM */ |
| 1881 | AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE(namcos22_dspram_r, namcos22_dspram_w) AM_SHARE("polygonram") |
| 1882 | AM_RANGE(0xe00000, 0xe3ffff) AM_RAM /* workram */ |
| 1883 | ADDRESS_MAP_END |
| 1884 | |
| 1885 | |
| 1886 | // Time Crisis gun |
| 1887 | READ32_MEMBER(namcos22_state::namcos22_gun_r) |
| 1888 | { |
| 1889 | UINT16 xpos = ioport("LIGHTX")->read(); |
| 1890 | UINT16 ypos = ioport("LIGHTY")->read(); |
| 1891 | // ypos is not completely understood yet, there should be a difference between case 1 and 2 |
| 1892 | |
| 1893 | switch (offset) |
| 1894 | { |
| 1895 | case 0: /* 430000 */ |
| 1896 | return xpos << 16; |
| 1897 | |
| 1898 | case 1: /* 430004 */ |
| 1899 | case 2: /* 430008 */ |
| 1900 | return ypos << 16; |
| 1901 | |
| 1902 | default: |
| 1903 | return 0; |
| 1258 | 1904 | } |
| 1259 | 1905 | } |
| 1260 | 1906 | |
| 1261 | | /* TODO: REMOVE (THIS IS HANDLED BY "IOMCU") */ |
| 1262 | | static void HandleCyberCommandoIO( running_machine &machine ) |
| 1907 | static ADDRESS_MAP_START( timecris_am, AS_PROGRAM, 32, namcos22_state ) |
| 1908 | AM_RANGE(0x430000, 0x43000f) AM_READ(namcos22_gun_r) |
| 1909 | AM_IMPORT_FROM( namcos22s_am ) |
| 1910 | ADDRESS_MAP_END |
| 1911 | |
| 1912 | |
| 1913 | // Alpine Surfer protection |
| 1914 | READ32_MEMBER(namcos22_state::alpinesa_prot_r) |
| 1263 | 1915 | { |
| 1264 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 1265 | | if( nthbyte(state->m_system_controller, 0x18) != 0 ) |
| 1916 | return m_alpinesa_protection; |
| 1917 | } |
| 1918 | |
| 1919 | WRITE32_MEMBER(namcos22_state::alpinesa_prot_w) |
| 1920 | { |
| 1921 | switch (data) |
| 1266 | 1922 | { |
| 1267 | | UINT16 flags = state->ioport("INPUTS")->read(); |
| 1923 | case 0: |
| 1924 | m_alpinesa_protection = 0; |
| 1925 | break; |
| 1268 | 1926 | |
| 1269 | | UINT16 volume0 = state->ioport("STICKY1")->read() * 0x10; |
| 1270 | | UINT16 volume1 = state->ioport("STICKY2")->read() * 0x10; |
| 1271 | | UINT16 volume2 = state->ioport("STICKX1")->read() * 0x10; |
| 1272 | | UINT16 volume3 = state->ioport("STICKX2")->read() * 0x10; |
| 1927 | case 1: |
| 1928 | m_alpinesa_protection = 1; |
| 1929 | break; |
| 1273 | 1930 | |
| 1274 | | state->m_shareram[0x030/4] = (flags<<16) | volume0; |
| 1275 | | state->m_shareram[0x034/4] = (volume1<<16) | volume2; |
| 1276 | | state->m_shareram[0x038/4] = volume3<<16; |
| 1931 | case 3: |
| 1932 | m_alpinesa_protection = 2; |
| 1933 | break; |
| 1277 | 1934 | |
| 1278 | | HandleCoinage(machine, 1, 0); |
| 1935 | default: |
| 1936 | break; |
| 1279 | 1937 | } |
| 1280 | 1938 | } |
| 1281 | 1939 | |
| 1940 | static ADDRESS_MAP_START( alpinesa_am, AS_PROGRAM, 32, namcos22_state ) |
| 1941 | AM_RANGE(0x200000, 0x200003) AM_READ(alpinesa_prot_r) |
| 1942 | AM_RANGE(0x300000, 0x300003) AM_WRITE(alpinesa_prot_w) |
| 1943 | AM_IMPORT_FROM( namcos22s_am ) |
| 1944 | ADDRESS_MAP_END |
| 1945 | |
| 1946 | |
| 1947 | |
| 1282 | 1948 | /*********************************************************************************************/ |
| 1283 | 1949 | |
| 1284 | | READ16_MEMBER(namcos22_state::pdp_status_r) |
| 1950 | // DSPs |
| 1951 | |
| 1952 | void namcos22_state::enable_slave_simulation(bool enable) |
| 1285 | 1953 | { |
| 1286 | | return m_MasterBIOZ; |
| 1954 | m_slave_simulation_active = enable; |
| 1287 | 1955 | } |
| 1288 | 1956 | |
| 1289 | | void namcos22_state::WriteToPointRAM(offs_t offs, UINT32 data ) |
| 1957 | void namcos22_state::slave_halt() |
| 1290 | 1958 | { |
| 1291 | | offs &= 0xffffff; /* 24 bit addressing */ |
| 1292 | | if( m_bSuperSystem22 ) |
| 1959 | m_slave->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 1960 | enable_slave_simulation(false); |
| 1961 | } |
| 1962 | |
| 1963 | void namcos22_state::slave_enable() |
| 1964 | { |
| 1965 | // m_slave->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 1966 | enable_slave_simulation(true); |
| 1967 | } |
| 1968 | |
| 1969 | |
| 1970 | READ16_MEMBER(namcos22_state::namcos22_dspram16_r) |
| 1971 | { |
| 1972 | UINT32 value = m_polygonram[offset]; |
| 1973 | |
| 1974 | switch (m_dspram_bank) |
| 1293 | 1975 | { |
| 1294 | | if( offs>=0xf80000 && offs<=0xf9ffff ) |
| 1295 | | m_pPointRAM[offs-0xf80000] = data & 0x00ffffff; |
| 1976 | case 0: |
| 1977 | value &= 0xffff; |
| 1978 | break; |
| 1979 | |
| 1980 | case 1: |
| 1981 | value >>= 16; |
| 1982 | break; |
| 1983 | |
| 1984 | case 2: |
| 1985 | m_dspram16_latch = value >> 16; |
| 1986 | value &= 0xffff; |
| 1987 | break; |
| 1988 | |
| 1989 | default: |
| 1990 | break; |
| 1296 | 1991 | } |
| 1992 | |
| 1993 | return (UINT16)value; |
| 1994 | } |
| 1995 | |
| 1996 | WRITE16_MEMBER(namcos22_state::namcos22_dspram16_w) |
| 1997 | { |
| 1998 | UINT32 value = m_polygonram[offset]; |
| 1999 | UINT16 lo = value & 0xffff; |
| 2000 | UINT16 hi = value >> 16; |
| 2001 | |
| 2002 | switch (m_dspram_bank) |
| 2003 | { |
| 2004 | case 0: |
| 2005 | COMBINE_DATA(&lo); |
| 2006 | break; |
| 2007 | |
| 2008 | case 1: |
| 2009 | COMBINE_DATA(&hi); |
| 2010 | break; |
| 2011 | |
| 2012 | case 2: |
| 2013 | COMBINE_DATA(&lo); |
| 2014 | hi = m_dspram16_latch; |
| 2015 | break; |
| 2016 | |
| 2017 | default: |
| 2018 | break; |
| 2019 | } |
| 2020 | |
| 2021 | m_polygonram[offset] = (hi << 16) | lo; |
| 2022 | } |
| 2023 | |
| 2024 | WRITE16_MEMBER(namcos22_state::namcos22_dspram16_bank_w) |
| 2025 | { |
| 2026 | COMBINE_DATA(&m_dspram_bank); |
| 2027 | } |
| 2028 | |
| 2029 | |
| 2030 | void namcos22_state::point_write(offs_t offs, UINT32 data) |
| 2031 | { |
| 2032 | offs &= 0x00ffffff; /* 24 bit addressing */ |
| 2033 | if (m_is_ss22) |
| 2034 | { |
| 2035 | if (offs >= 0xf80000 && offs < 0xfa0000) |
| 2036 | m_pointram[offs - 0xf80000] = data & 0x00ffffff; |
| 2037 | } |
| 1297 | 2038 | else |
| 1298 | 2039 | { |
| 1299 | | if( offs>=0xf00000 && offs<=0xf1ffff ) |
| 1300 | | m_pPointRAM[offs-0xf00000] = data & 0x00ffffff; |
| 2040 | if (offs >= 0xf00000 && offs < 0xf20000) |
| 2041 | m_pointram[offs - 0xf00000] = data & 0x00ffffff; |
| 1301 | 2042 | } |
| 1302 | 2043 | } |
| 1303 | 2044 | |
| 1304 | | UINT32 namcos22_state::ReadFromCommRAM(offs_t offs ) |
| 2045 | INT32 namcos22_state::point_read(INT32 addr) |
| 1305 | 2046 | { |
| 1306 | | return m_polygonram[offs&0x7fff]; |
| 2047 | if (addr < 0) |
| 2048 | return -1; |
| 2049 | |
| 2050 | // point rom |
| 2051 | else if (addr < m_pointrom_size) |
| 2052 | return m_pointrom[addr]; |
| 2053 | |
| 2054 | // point ram, only used in ram test? |
| 2055 | INT32 result = 0; |
| 2056 | if (m_is_ss22) |
| 2057 | { |
| 2058 | if (addr >= 0xf80000 && addr < 0xfa0000) |
| 2059 | result = m_pointram[addr - 0xf80000]; |
| 2060 | else return -1; |
| 2061 | } |
| 2062 | else |
| 2063 | { |
| 2064 | if (addr >= 0xf00000 && addr < 0xf20000) |
| 2065 | result = m_pointram[addr - 0xf00000]; |
| 2066 | else return -1; |
| 2067 | } |
| 2068 | |
| 2069 | // sign extend or crop |
| 2070 | return signed24(result); |
| 1307 | 2071 | } |
| 1308 | 2072 | |
| 1309 | | void namcos22_state::WriteToCommRAM(offs_t offs, UINT32 data ) |
| 2073 | |
| 2074 | WRITE16_MEMBER(namcos22_state::point_address_w) |
| 1310 | 2075 | { |
| 1311 | | if (data & 0x00800000) m_polygonram[offs&0x7fff] = data | 0xff000000; |
| 1312 | | else m_polygonram[offs&0x7fff] = data & 0x00ffffff; |
| 2076 | m_point_address <<= 16; |
| 2077 | m_point_address |= data; |
| 1313 | 2078 | } |
| 1314 | 2079 | |
| 2080 | WRITE16_MEMBER(namcos22_state::point_loword_iw) |
| 2081 | { |
| 2082 | m_point_data |= data; |
| 2083 | point_write(m_point_address++, m_point_data); |
| 2084 | } |
| 2085 | |
| 2086 | WRITE16_MEMBER(namcos22_state::point_hiword_w) |
| 2087 | { |
| 2088 | m_point_data = data << 16; |
| 2089 | } |
| 2090 | |
| 2091 | READ16_MEMBER(namcos22_state::point_loword_r) |
| 2092 | { |
| 2093 | return point_read(m_point_address & 0x00ffffff) & 0xffff; |
| 2094 | } |
| 2095 | |
| 2096 | READ16_MEMBER(namcos22_state::point_hiword_ir) |
| 2097 | { |
| 2098 | return point_read(m_point_address++ & 0x00ffffff) >> 16 & 0xffff; |
| 2099 | } |
| 2100 | |
| 2101 | |
| 2102 | READ16_MEMBER(namcos22_state::pdp_status_r) |
| 2103 | { |
| 2104 | return m_dsp_master_bioz; |
| 2105 | } |
| 2106 | |
| 2107 | UINT32 namcos22_state::pdp_polygonram_read(offs_t offs) |
| 2108 | { |
| 2109 | return m_polygonram[offs & 0x7fff]; |
| 2110 | } |
| 2111 | |
| 2112 | void namcos22_state::pdp_polygonram_write(offs_t offs, UINT32 data) |
| 2113 | { |
| 2114 | m_polygonram[offs & 0x7fff] = data; |
| 2115 | } |
| 2116 | |
| 1315 | 2117 | READ16_MEMBER(namcos22_state::pdp_begin_r) |
| 1316 | 2118 | { |
| 1317 | 2119 | /* this feature appears to be only used on Super System22 hardware */ |
| 1318 | | if( m_bSuperSystem22 ) |
| 2120 | if (m_is_ss22) |
| 1319 | 2121 | { |
| 1320 | | UINT16 offs = m_polygonram[0x20000/4-1]; |
| 1321 | | m_MasterBIOZ = 1; |
| 1322 | | for(;;) |
| 2122 | UINT16 offs = pdp_polygonram_read(0x7fff); |
| 2123 | m_dsp_master_bioz = 1; |
| 2124 | for (;;) |
| 1323 | 2125 | { |
| 1324 | 2126 | UINT16 start = offs; |
| 1325 | | UINT16 cmd = ReadFromCommRAM(offs++); |
| 2127 | UINT16 cmd = pdp_polygonram_read(offs++); |
| 1326 | 2128 | UINT32 srcAddr; |
| 1327 | 2129 | UINT32 dstAddr; |
| 1328 | 2130 | UINT32 numWords; |
| 1329 | 2131 | UINT32 data; |
| 1330 | | switch( cmd ) |
| 2132 | switch (cmd) |
| 1331 | 2133 | { |
| 1332 | | case 0xfff0: |
| 1333 | | /* NOP? used in 'PDP LOOP TEST' */ |
| 1334 | | break; |
| 2134 | case 0xfff0: |
| 2135 | /* NOP? used in 'PDP LOOP TEST' */ |
| 2136 | break; |
| 1335 | 2137 | |
| 1336 | | case 0xfff5: /* write to point ram */ |
| 1337 | | dstAddr = ReadFromCommRAM(offs++); /* 32 bit PointRAM address */ |
| 1338 | | data = ReadFromCommRAM(offs++); /* 24 bit data */ |
| 1339 | | WriteToPointRAM(dstAddr, data ); |
| 1340 | | break; |
| 2138 | case 0xfff5: |
| 2139 | /* write to point ram */ |
| 2140 | dstAddr = pdp_polygonram_read(offs++); /* 32 bit PointRAM address */ |
| 2141 | data = pdp_polygonram_read(offs++); /* 24 bit data */ |
| 2142 | point_write(dstAddr, data); |
| 2143 | break; |
| 1341 | 2144 | |
| 1342 | | case 0xfff6: /* read word from point ram */ |
| 1343 | | srcAddr = ReadFromCommRAM(offs++); /* 32 bit PointRAM address */ |
| 1344 | | dstAddr = ReadFromCommRAM(offs++); /* CommRAM address; receives 24 bit PointRAM data */ |
| 1345 | | data = namcos22_point_rom_r( machine(), srcAddr ); |
| 1346 | | WriteToCommRAM(dstAddr, data ); |
| 1347 | | break; |
| 2145 | case 0xfff6: |
| 2146 | /* read word from point ram */ |
| 2147 | srcAddr = pdp_polygonram_read(offs++); /* 32 bit PointRAM address */ |
| 2148 | dstAddr = pdp_polygonram_read(offs++); /* CommRAM address; receives 24 bit PointRAM data */ |
| 2149 | data = point_read(srcAddr & 0x00ffffff); |
| 2150 | pdp_polygonram_write(dstAddr, data); |
| 2151 | break; |
| 1348 | 2152 | |
| 1349 | | case 0xfff7: /* block move (CommRAM to CommRAM) */ |
| 1350 | | srcAddr = ReadFromCommRAM(offs++); |
| 1351 | | dstAddr = ReadFromCommRAM(offs++); |
| 1352 | | numWords = ReadFromCommRAM(offs++); |
| 1353 | | while( numWords-- ) |
| 1354 | | { |
| 1355 | | data = ReadFromCommRAM(srcAddr++); |
| 1356 | | WriteToCommRAM(dstAddr++, data ); |
| 1357 | | } |
| 1358 | | break; |
| 2153 | case 0xfff7: |
| 2154 | /* block move (CommRAM to CommRAM) */ |
| 2155 | srcAddr = pdp_polygonram_read(offs++); |
| 2156 | dstAddr = pdp_polygonram_read(offs++); |
| 2157 | numWords = pdp_polygonram_read(offs++); |
| 2158 | while (numWords--) |
| 2159 | { |
| 2160 | data = pdp_polygonram_read(srcAddr++); |
| 2161 | pdp_polygonram_write(dstAddr++, data); |
| 2162 | } |
| 2163 | break; |
| 1359 | 2164 | |
| 1360 | | case 0xfffa: /* read block from point ram */ |
| 1361 | | srcAddr = ReadFromCommRAM(offs++); /* 32 bit PointRAM address */ |
| 1362 | | dstAddr = ReadFromCommRAM(offs++); /* CommRAM address; receives data */ |
| 1363 | | numWords = ReadFromCommRAM(offs++); /* block size */ |
| 1364 | | while( numWords-- ) |
| 1365 | | { |
| 1366 | | data = namcos22_point_rom_r( machine(), srcAddr++ ); |
| 1367 | | WriteToCommRAM(dstAddr++, data ); |
| 1368 | | } |
| 1369 | | break; |
| 2165 | case 0xfffa: |
| 2166 | /* read block from point ram */ |
| 2167 | srcAddr = pdp_polygonram_read(offs++); /* 32 bit PointRAM address */ |
| 2168 | dstAddr = pdp_polygonram_read(offs++); /* CommRAM address; receives data */ |
| 2169 | numWords = pdp_polygonram_read(offs++); /* block size */ |
| 2170 | while (numWords--) |
| 2171 | { |
| 2172 | data = point_read(srcAddr++ & 0x00ffffff); |
| 2173 | pdp_polygonram_write(dstAddr++, data); |
| 2174 | } |
| 2175 | break; |
| 1370 | 2176 | |
| 1371 | | case 0xfffb: /* write block to point ram */ |
| 1372 | | dstAddr = ReadFromCommRAM(offs++); /* 32 bit PointRAM address */ |
| 1373 | | numWords = ReadFromCommRAM(offs++); /* block size */ |
| 1374 | | while( numWords-- ) |
| 1375 | | { |
| 1376 | | data = ReadFromCommRAM(offs++ ); /* 24 bit source data */ |
| 1377 | | WriteToPointRAM(dstAddr++, data ); |
| 1378 | | } |
| 1379 | | break; |
| 2177 | case 0xfffb: |
| 2178 | /* write block to point ram */ |
| 2179 | dstAddr = pdp_polygonram_read(offs++); /* 32 bit PointRAM address */ |
| 2180 | numWords = pdp_polygonram_read(offs++); /* block size */ |
| 2181 | while (numWords--) |
| 2182 | { |
| 2183 | data = pdp_polygonram_read(offs++); /* 24 bit source data */ |
| 2184 | point_write(dstAddr++, data); |
| 2185 | } |
| 2186 | break; |
| 1380 | 2187 | |
| 1381 | | case 0xfffc: /* point ram to point ram */ |
| 1382 | | srcAddr = ReadFromCommRAM(offs++); |
| 1383 | | dstAddr = ReadFromCommRAM(offs++); |
| 1384 | | numWords = ReadFromCommRAM(offs++); |
| 1385 | | while( numWords-- ) |
| 1386 | | { |
| 1387 | | data = namcos22_point_rom_r( machine(), srcAddr++ ); |
| 1388 | | WriteToPointRAM(dstAddr++, data ); |
| 1389 | | } |
| 1390 | | break; |
| 2188 | case 0xfffc: |
| 2189 | /* point ram to point ram */ |
| 2190 | srcAddr = pdp_polygonram_read(offs++); |
| 2191 | dstAddr = pdp_polygonram_read(offs++); |
| 2192 | numWords = pdp_polygonram_read(offs++); |
| 2193 | while (numWords--) |
| 2194 | { |
| 2195 | data = point_read(srcAddr++ & 0x00ffffff); |
| 2196 | point_write(dstAddr++, data); |
| 2197 | } |
| 2198 | break; |
| 1391 | 2199 | |
| 1392 | | case 0xfffd: /* direct command to render device */ |
| 1393 | | // len -> command (eg. BB0003) -> data |
| 1394 | | numWords = ReadFromCommRAM(offs++); |
| 1395 | | while( numWords-- ) |
| 1396 | | { |
| 1397 | | data = ReadFromCommRAM(offs++); |
| 1398 | | //namcos22_WriteDataToRenderDevice( data ); |
| 1399 | | } |
| 1400 | | break; |
| 2200 | case 0xfffd: |
| 2201 | /* direct command to render device */ |
| 2202 | // len -> command (eg. BB0003) -> data |
| 2203 | numWords = pdp_polygonram_read(offs++); |
| 2204 | while (numWords--) |
| 2205 | { |
| 2206 | data = pdp_polygonram_read(offs++); |
| 2207 | //namcos22_WriteDataToRenderDevice(data); |
| 2208 | } |
| 2209 | break; |
| 1401 | 2210 | |
| 1402 | | case 0xfffe: /* unknown */ |
| 1403 | | data = ReadFromCommRAM(offs++); /* ??? (usually 0x400 or 0) */ |
| 1404 | | break; |
| 2211 | case 0xfffe: |
| 2212 | /* unknown */ |
| 2213 | data = pdp_polygonram_read(offs++); /* ??? (usually 0x400 or 0) */ |
| 2214 | break; |
| 1405 | 2215 | |
| 1406 | | case 0xffff: /* "goto" command */ |
| 1407 | | offs = ReadFromCommRAM(offs); |
| 1408 | | if( offs == start ) |
| 1409 | | { |
| 1410 | | /* most commands end with a "goto self" */ |
| 2216 | case 0xffff: |
| 2217 | /* "goto" command */ |
| 2218 | offs = pdp_polygonram_read(offs); |
| 2219 | if (offs == start) |
| 2220 | { |
| 2221 | /* most commands end with a "goto self" */ |
| 2222 | return 0; |
| 2223 | } |
| 2224 | break; |
| 2225 | |
| 2226 | default: |
| 2227 | logerror("unknown PDP cmd = 0x%04x!\n", cmd); |
| 1411 | 2228 | return 0; |
| 1412 | | } |
| 1413 | | break; |
| 1414 | | |
| 1415 | | default: |
| 1416 | | logerror( "unknown PDP cmd = 0x%04x!\n", cmd ); |
| 1417 | | return 0; |
| 1418 | 2229 | } |
| 1419 | 2230 | } |
| 1420 | 2231 | } |
| 2232 | |
| 1421 | 2233 | return 0; |
| 1422 | 2234 | } |
| 1423 | 2235 | |
| r24771 | r24772 | |
| 1428 | 2240 | |
| 1429 | 2241 | WRITE16_MEMBER(namcos22_state::slave_external_ram_w) |
| 1430 | 2242 | { |
| 1431 | | COMBINE_DATA( &m_pSlaveExternalRAM[offset] ); |
| 2243 | COMBINE_DATA(&m_pSlaveExternalRAM[offset]); |
| 1432 | 2244 | } |
| 1433 | 2245 | |
| 1434 | | static void HaltSlaveDSP( running_machine &machine ) |
| 2246 | READ16_MEMBER(namcos22_state::dsp_hold_signal_r) |
| 1435 | 2247 | { |
| 1436 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 1437 | | state->m_slave->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 1438 | | namcos22_enable_slave_simulation(machine, 0); |
| 1439 | | } |
| 1440 | | |
| 1441 | | static void EnableSlaveDSP( running_machine &machine ) |
| 1442 | | { |
| 1443 | | // namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 1444 | | // state->m_slave->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 1445 | | namcos22_enable_slave_simulation(machine, 1); |
| 1446 | | } |
| 1447 | | |
| 1448 | | READ16_MEMBER(namcos22_state::dsp_HOLD_signal_r) |
| 1449 | | { |
| 1450 | 2248 | /* STUB */ |
| 1451 | 2249 | return 0; |
| 1452 | 2250 | } |
| 1453 | 2251 | |
| 1454 | | WRITE16_MEMBER(namcos22_state::dsp_HOLD_ACK_w) |
| 2252 | WRITE16_MEMBER(namcos22_state::dsp_hold_ack_w) |
| 1455 | 2253 | { |
| 1456 | 2254 | /* STUB */ |
| 1457 | 2255 | } |
| 1458 | 2256 | |
| 1459 | | WRITE16_MEMBER(namcos22_state::dsp_XF_output_w) |
| 2257 | WRITE16_MEMBER(namcos22_state::dsp_xf_output_w) |
| 1460 | 2258 | { |
| 1461 | 2259 | /* STUB */ |
| 1462 | 2260 | } |
| 1463 | 2261 | |
| 1464 | | /************************************************************/ |
| 1465 | | |
| 1466 | | WRITE16_MEMBER(namcos22_state::point_ram_idx_w) |
| 1467 | | { |
| 1468 | | m_PointAddr<<=16; |
| 1469 | | m_PointAddr |= data; |
| 1470 | | } |
| 1471 | | |
| 1472 | | WRITE16_MEMBER(namcos22_state::point_ram_loword_iw) |
| 1473 | | { |
| 1474 | | m_PointData |= data; |
| 1475 | | WriteToPointRAM(m_PointAddr++, m_PointData ); |
| 1476 | | } |
| 1477 | | |
| 1478 | | WRITE16_MEMBER(namcos22_state::point_ram_hiword_w) |
| 1479 | | { |
| 1480 | | m_PointData = (data<<16); |
| 1481 | | } |
| 1482 | | |
| 1483 | | READ16_MEMBER(namcos22_state::point_ram_loword_r) |
| 1484 | | { |
| 1485 | | return namcos22_point_rom_r(machine(), m_PointAddr)&0xffff; |
| 1486 | | } |
| 1487 | | |
| 1488 | | READ16_MEMBER(namcos22_state::point_ram_hiword_ir) |
| 1489 | | { |
| 1490 | | return namcos22_point_rom_r(machine(), m_PointAddr++)>>16; |
| 1491 | | } |
| 1492 | | |
| 1493 | 2262 | WRITE16_MEMBER(namcos22_state::dsp_unk2_w) |
| 1494 | 2263 | { |
| 1495 | 2264 | /** |
| 1496 | | * Used by Ridge Racer (Japan) to specify baseaddr |
| 2265 | * Used by Ridge Racer (Japan) to specify baseaddr |
| 1497 | 2266 | * for post-processed display-list output. |
| 1498 | 2267 | * |
| 1499 | 2268 | * Prop Cycle doesn't use this; instead it writes this |
| r24771 | r24772 | |
| 1501 | 2270 | */ |
| 1502 | 2271 | } |
| 1503 | 2272 | |
| 1504 | | enum |
| 1505 | | { |
| 1506 | | eDSP_UPLOAD_READY, |
| 1507 | | eDSP_UPLOAD_DEST, |
| 1508 | | eDSP_UPLOAD_DATA |
| 1509 | | }; |
| 1510 | | |
| 1511 | 2273 | READ16_MEMBER(namcos22_state::dsp_unk_port3_r) |
| 1512 | 2274 | { |
| 1513 | | m_MasterBIOZ = 0; |
| 1514 | | m_DspUploadState = eDSP_UPLOAD_READY; |
| 2275 | m_dsp_master_bioz = 0; |
| 2276 | m_dsp_upload_state = NAMCOS22_DSP_UPLOAD_READY; |
| 1515 | 2277 | return 0; |
| 1516 | 2278 | } |
| 1517 | 2279 | |
| 1518 | 2280 | WRITE16_MEMBER(namcos22_state::upload_code_to_slave_dsp_w) |
| 1519 | 2281 | { |
| 1520 | | switch( m_DspUploadState ) |
| 2282 | switch (m_dsp_upload_state) |
| 1521 | 2283 | { |
| 1522 | | case eDSP_UPLOAD_READY: |
| 1523 | | logerror( "UPLOAD_READY; cmd = 0x%x\n", data ); |
| 1524 | | switch (data) |
| 1525 | | { |
| 1526 | | case 0: |
| 1527 | | HaltSlaveDSP(machine()); |
| 1528 | | break; |
| 1529 | | case 1: |
| 1530 | | m_DspUploadState = eDSP_UPLOAD_DEST; |
| 1531 | | break; |
| 1532 | | case 2: |
| 1533 | | /* custom IC poke */ |
| 1534 | | break; |
| 1535 | | case 3: |
| 1536 | | EnableSlaveDSP(machine()); |
| 1537 | | break; |
| 1538 | | case 4: |
| 1539 | | break; |
| 1540 | | case 0x10: |
| 1541 | | /* serial i/o related? */ |
| 1542 | | EnableSlaveDSP(machine()); |
| 1543 | | break; |
| 2284 | case NAMCOS22_DSP_UPLOAD_READY: |
| 2285 | logerror("UPLOAD_READY; cmd = 0x%x\n", data); |
| 1544 | 2286 | |
| 1545 | | default: |
| 1546 | | logerror( "%08x: master port#7: 0x%04x\n", space.device().safe_pcbase(), data ); |
| 1547 | | break; |
| 1548 | | } |
| 1549 | | break; |
| 2287 | switch (data) |
| 2288 | { |
| 2289 | case 0x00: |
| 2290 | slave_halt(); |
| 2291 | break; |
| 1550 | 2292 | |
| 1551 | | case eDSP_UPLOAD_DEST: |
| 1552 | | m_UploadDestIdx = data; |
| 1553 | | m_DspUploadState = eDSP_UPLOAD_DATA; |
| 1554 | | break; |
| 2293 | case 0x01: |
| 2294 | m_dsp_upload_state = NAMCOS22_DSP_UPLOAD_DEST; |
| 2295 | break; |
| 1555 | 2296 | |
| 1556 | | case eDSP_UPLOAD_DATA: |
| 1557 | | m_pSlaveExternalRAM[m_UploadDestIdx&0x1fff] = data; |
| 1558 | | m_UploadDestIdx++; |
| 1559 | | break; |
| 2297 | case 0x02: |
| 2298 | /* custom IC poke */ |
| 2299 | break; |
| 1560 | 2300 | |
| 1561 | | default: |
| 1562 | | break; |
| 2301 | case 0x03: |
| 2302 | slave_enable(); |
| 2303 | break; |
| 2304 | |
| 2305 | case 0x04: |
| 2306 | break; |
| 2307 | |
| 2308 | case 0x10: |
| 2309 | /* serial i/o related? */ |
| 2310 | slave_enable(); |
| 2311 | break; |
| 2312 | |
| 2313 | default: |
| 2314 | logerror("%08x: master port#7: 0x%04x\n", space.device().safe_pcbase(), data); |
| 2315 | break; |
| 2316 | } |
| 2317 | break; |
| 2318 | |
| 2319 | case NAMCOS22_DSP_UPLOAD_DEST: |
| 2320 | m_UploadDestIdx = data; |
| 2321 | m_dsp_upload_state = NAMCOS22_DSP_UPLOAD_DATA; |
| 2322 | break; |
| 2323 | |
| 2324 | case NAMCOS22_DSP_UPLOAD_DATA: |
| 2325 | m_pSlaveExternalRAM[m_UploadDestIdx & 0x1fff] = data; |
| 2326 | m_UploadDestIdx++; |
| 2327 | break; |
| 2328 | |
| 2329 | default: |
| 2330 | break; |
| 1563 | 2331 | } |
| 1564 | 2332 | } |
| 1565 | 2333 | |
| 1566 | 2334 | READ16_MEMBER(namcos22_state::dsp_unk8_r) |
| 1567 | 2335 | { |
| 1568 | 2336 | /* bit 0x0001 is busy signal */ |
| 1569 | | return 0; |
| 2337 | return 0x0000; |
| 1570 | 2338 | } |
| 1571 | 2339 | |
| 1572 | 2340 | READ16_MEMBER(namcos22_state::custom_ic_status_r) |
| r24771 | r24772 | |
| 1577 | 2345 | |
| 1578 | 2346 | READ16_MEMBER(namcos22_state::dsp_upload_status_r) |
| 1579 | 2347 | { |
| 1580 | | /** |
| 1581 | | * bit 0x0001 is polled to confirm that code/data has been |
| 1582 | | * successfully uploaded to the slave dsp via port 0x7. |
| 1583 | | */ |
| 2348 | /* bit 0x0001 is polled to confirm that code/data has been successfully uploaded to the slave dsp via port 0x7. */ |
| 1584 | 2349 | return 0x0000; |
| 1585 | 2350 | } |
| 1586 | 2351 | |
| r24771 | r24772 | |
| 1591 | 2356 | |
| 1592 | 2357 | WRITE16_MEMBER(namcos22_state::master_external_ram_w) |
| 1593 | 2358 | { |
| 1594 | | COMBINE_DATA( &m_pMasterExternalRAM[offset] ); |
| 2359 | COMBINE_DATA(&m_pMasterExternalRAM[offset]); |
| 1595 | 2360 | } |
| 1596 | 2361 | |
| 1597 | 2362 | WRITE16_MEMBER(namcos22_state::slave_serial_io_w) |
| 1598 | 2363 | { |
| 1599 | 2364 | m_SerialDataSlaveToMasterNext = data; |
| 1600 | | logerror( "slave_serial_io_w(%04x)\n", data ); |
| 2365 | logerror("slave_serial_io_w(%04x)\n", data); |
| 1601 | 2366 | } |
| 1602 | 2367 | |
| 1603 | 2368 | READ16_MEMBER(namcos22_state::master_serial_io_r) |
| 1604 | 2369 | { |
| 1605 | | logerror( "master_serial_io_r() == %04x\n", |
| 1606 | | m_SerialDataSlaveToMasterCurrent ); |
| 2370 | logerror("master_serial_io_r() == %04x\n", m_SerialDataSlaveToMasterCurrent); |
| 1607 | 2371 | return m_SerialDataSlaveToMasterCurrent; |
| 1608 | 2372 | } |
| 1609 | 2373 | |
| r24771 | r24772 | |
| 1611 | 2375 | { |
| 1612 | 2376 | int scanline = param; |
| 1613 | 2377 | |
| 1614 | | if( m_bEnableDspIrqs ) |
| 2378 | if (m_dsp_irq_enabled) |
| 1615 | 2379 | { |
| 1616 | 2380 | m_SerialDataSlaveToMasterCurrent = m_SerialDataSlaveToMasterNext; |
| 1617 | 2381 | |
| 1618 | | if(scanline == 480) |
| 2382 | if (scanline == 480) |
| 2383 | { |
| 1619 | 2384 | m_master->set_input_line(TMS32025_INT0, HOLD_LINE); |
| 1620 | | else if((scanline % 2) == 0) |
| 2385 | } |
| 2386 | else if ((scanline % 2) == 0) |
| 1621 | 2387 | { |
| 1622 | 2388 | m_master->set_input_line(TMS32025_RINT, HOLD_LINE); |
| 1623 | 2389 | m_master->set_input_line(TMS32025_XINT, HOLD_LINE); |
| r24771 | r24772 | |
| 1629 | 2395 | { |
| 1630 | 2396 | int scanline = param; |
| 1631 | 2397 | |
| 1632 | | if( m_bEnableDspIrqs ) |
| 2398 | if (m_dsp_irq_enabled) |
| 1633 | 2399 | { |
| 1634 | | if((scanline % 2) == 0) |
| 2400 | if ((scanline % 2) == 0) |
| 1635 | 2401 | { |
| 1636 | 2402 | m_slave->set_input_line(TMS32025_RINT, HOLD_LINE); |
| 1637 | 2403 | m_slave->set_input_line(TMS32025_XINT, HOLD_LINE); |
| r24771 | r24772 | |
| 1691 | 2457 | |
| 1692 | 2458 | WRITE16_MEMBER(namcos22_state::master_render_device_w) |
| 1693 | 2459 | { |
| 1694 | | if( m_RenderBufSize<MAX_RENDER_CMD_SEQ ) |
| 2460 | if (m_RenderBufSize < NAMCOS22_MAX_RENDER_CMD_SEQ) |
| 1695 | 2461 | { |
| 1696 | 2462 | m_RenderBufData[m_RenderBufSize++] = data; |
| 1697 | | if( m_RenderBufSize == MAX_RENDER_CMD_SEQ ) |
| 2463 | if (m_RenderBufSize == NAMCOS22_MAX_RENDER_CMD_SEQ) |
| 1698 | 2464 | { |
| 1699 | | namcos22_draw_direct_poly( machine(), m_RenderBufData ); |
| 2465 | draw_direct_poly(m_RenderBufData); |
| 1700 | 2466 | } |
| 1701 | 2467 | } |
| 1702 | 2468 | } |
| r24771 | r24772 | |
| 1713 | 2479 | ADDRESS_MAP_END |
| 1714 | 2480 | |
| 1715 | 2481 | static ADDRESS_MAP_START( master_dsp_io, AS_IO, 16, namcos22_state ) |
| 1716 | | AM_RANGE(0x0,0x0) AM_WRITE(point_ram_loword_iw) AM_READ(point_ram_loword_r) |
| 1717 | | AM_RANGE(0x1,0x1) AM_WRITE(point_ram_hiword_w) AM_READ(point_ram_hiword_ir) |
| 1718 | | AM_RANGE(0x2,0x2) AM_WRITE(dsp_unk2_w) AM_READ(pdp_begin_r) |
| 1719 | | AM_RANGE(0x3,0x3) AM_WRITE(point_ram_idx_w) AM_READ(dsp_unk_port3_r) |
| 1720 | | AM_RANGE(0x4,0x4) AM_WRITENOP /* unknown */ |
| 1721 | | AM_RANGE(0x7,0x7) AM_WRITE(upload_code_to_slave_dsp_w) |
| 1722 | | AM_RANGE(0x8,0x8) AM_WRITE(dsp_unk8_w) AM_READ(dsp_unk8_r) /* trigger irq? */ |
| 1723 | | AM_RANGE(0x9,0x9) AM_WRITENOP AM_READ(custom_ic_status_r) /* trigger irq? */ |
| 1724 | | AM_RANGE(0xa,0xa) AM_WRITE(dsp_unk_porta_w) |
| 1725 | | AM_RANGE(0xb,0xb) AM_WRITENOP /* RINT-related? */ |
| 1726 | | AM_RANGE(0xc,0xc) AM_WRITE(master_render_device_w) |
| 1727 | | AM_RANGE(0xd,0xd) AM_WRITE(namcos22_dspram16_bank_w) |
| 1728 | | AM_RANGE(0xe,0xe) AM_WRITE(dsp_led_w) |
| 1729 | | AM_RANGE(0xf,0xf) AM_WRITENOP AM_READ(dsp_upload_status_r) |
| 1730 | | AM_RANGE(TMS32025_HOLD, TMS32025_HOLD) AM_READ(dsp_HOLD_signal_r) |
| 1731 | | AM_RANGE(TMS32025_HOLDA, TMS32025_HOLDA) AM_WRITE(dsp_HOLD_ACK_w) |
| 1732 | | AM_RANGE(TMS32025_XF, TMS32025_XF) AM_WRITE(dsp_XF_output_w) |
| 2482 | AM_RANGE(0x0, 0x0) AM_READWRITE(point_loword_r, point_loword_iw) |
| 2483 | AM_RANGE(0x1, 0x1) AM_READWRITE(point_hiword_ir, point_hiword_w) |
| 2484 | AM_RANGE(0x2, 0x2) AM_READWRITE(pdp_begin_r, dsp_unk2_w) |
| 2485 | AM_RANGE(0x3, 0x3) AM_READWRITE(dsp_unk_port3_r, point_address_w) |
| 2486 | AM_RANGE(0x4, 0x4) AM_WRITENOP /* unknown */ |
| 2487 | AM_RANGE(0x7, 0x7) AM_WRITE(upload_code_to_slave_dsp_w) |
| 2488 | AM_RANGE(0x8, 0x8) AM_READWRITE(dsp_unk8_r, dsp_unk8_w) /* trigger irq? */ |
| 2489 | AM_RANGE(0x9, 0x9) AM_READ(custom_ic_status_r) AM_WRITENOP /* trigger irq? */ |
| 2490 | AM_RANGE(0xa, 0xa) AM_WRITE(dsp_unk_porta_w) |
| 2491 | AM_RANGE(0xb, 0xb) AM_WRITENOP /* RINT-related? */ |
| 2492 | AM_RANGE(0xc, 0xc) AM_WRITE(master_render_device_w) |
| 2493 | AM_RANGE(0xd, 0xd) AM_WRITE(namcos22_dspram16_bank_w) |
| 2494 | AM_RANGE(0xe, 0xe) AM_WRITE(dsp_led_w) |
| 2495 | AM_RANGE(0xf, 0xf) AM_READ(dsp_upload_status_r) AM_WRITENOP |
| 2496 | AM_RANGE(TMS32025_HOLD, TMS32025_HOLD) AM_READ(dsp_hold_signal_r) |
| 2497 | AM_RANGE(TMS32025_HOLDA, TMS32025_HOLDA) AM_WRITE(dsp_hold_ack_w) |
| 2498 | AM_RANGE(TMS32025_XF, TMS32025_XF) AM_WRITE(dsp_xf_output_w) |
| 1733 | 2499 | AM_RANGE(TMS32025_BIO, TMS32025_BIO) AM_READ(pdp_status_r) |
| 1734 | 2500 | AM_RANGE(TMS32025_DR, TMS32025_DR) AM_READ(master_serial_io_r) |
| 1735 | 2501 | ADDRESS_MAP_END |
| 1736 | 2502 | |
| 1737 | | READ16_MEMBER(namcos22_state::dsp_BIOZ_r) |
| 2503 | |
| 2504 | READ16_MEMBER(namcos22_state::dsp_bioz_r) |
| 1738 | 2505 | { |
| 1739 | 2506 | /* STUB */ |
| 1740 | 2507 | return 1; |
| r24771 | r24772 | |
| 1763 | 2530 | |
| 1764 | 2531 | READ16_MEMBER(namcos22_state::dsp_slave_port6_r) |
| 1765 | 2532 | { |
| 1766 | | /** |
| 1767 | | * bit 0x9 indicates whether device at port2 is ready to receive data |
| 1768 | | * bit 0xd indicates whether data is available from port4 |
| 1769 | | */ |
| 2533 | /* bit 0x9 indicates whether device at port2 is ready to receive data */ |
| 2534 | /* bit 0xd indicates whether data is available from port4 */ |
| 1770 | 2535 | return 0; |
| 1771 | 2536 | } |
| 1772 | 2537 | |
| r24771 | r24772 | |
| 1777 | 2542 | |
| 1778 | 2543 | READ16_MEMBER(namcos22_state::dsp_slave_port8_r) |
| 1779 | 2544 | { |
| 1780 | | /* This reports status of the device mapped at port 0xb. |
| 1781 | | * |
| 1782 | | * The slave dsp waits for bit 0x0001 to be zero before writing |
| 1783 | | * a new command sequence. |
| 1784 | | */ |
| 2545 | /* This reports status of the device mapped at port 0xb. */ |
| 2546 | /* The slave dsp waits for bit 0x0001 to be zero before writing a new command sequence. */ |
| 1785 | 2547 | return 0; /* status */ |
| 1786 | 2548 | } |
| 1787 | 2549 | |
| r24771 | r24772 | |
| 1802 | 2564 | ADDRESS_MAP_END |
| 1803 | 2565 | |
| 1804 | 2566 | static ADDRESS_MAP_START( slave_dsp_data, AS_DATA, 16, namcos22_state ) |
| 1805 | | AM_RANGE(0x8000, 0x9fff) AM_READ(slave_external_ram_r) AM_WRITE(slave_external_ram_w) |
| 2567 | AM_RANGE(0x8000, 0x9fff) AM_READWRITE(slave_external_ram_r, slave_external_ram_w) |
| 1806 | 2568 | ADDRESS_MAP_END |
| 1807 | 2569 | |
| 1808 | 2570 | static ADDRESS_MAP_START( slave_dsp_io, AS_IO, 16, namcos22_state ) |
| 1809 | 2571 | /* unknown signal */ |
| 1810 | | AM_RANGE(0x3,0x3) AM_READ(dsp_slave_port3_r) |
| 2572 | AM_RANGE(0x3, 0x3) AM_READ(dsp_slave_port3_r) |
| 1811 | 2573 | |
| 1812 | | AM_RANGE(0x4,0x4) AM_READ(dsp_slave_port4_r) |
| 1813 | | AM_RANGE(0x5,0x5) AM_READ(dsp_slave_port5_r) |
| 1814 | | AM_RANGE(0x6,0x6) AM_WRITENOP AM_READ(dsp_slave_port6_r) |
| 2574 | AM_RANGE(0x4, 0x4) AM_READ(dsp_slave_port4_r) |
| 2575 | AM_RANGE(0x5, 0x5) AM_READ(dsp_slave_port5_r) |
| 2576 | AM_RANGE(0x6, 0x6) AM_READ(dsp_slave_port6_r) AM_WRITENOP |
| 1815 | 2577 | |
| 1816 | 2578 | /* render device state */ |
| 1817 | | AM_RANGE(0x8,0x8) AM_WRITENOP AM_READ(dsp_slave_port8_r) |
| 2579 | AM_RANGE(0x8, 0x8) AM_READ(dsp_slave_port8_r) AM_WRITENOP |
| 1818 | 2580 | |
| 1819 | 2581 | /* render device */ |
| 1820 | | AM_RANGE(0xb,0xb) AM_WRITE(dsp_slave_portb_w) AM_READ(dsp_slave_portb_r) |
| 2582 | AM_RANGE(0xb, 0xb) AM_READWRITE(dsp_slave_portb_r, dsp_slave_portb_w) |
| 1821 | 2583 | |
| 1822 | | AM_RANGE(0xc,0xc) AM_WRITE(dsp_slave_portc_w) |
| 2584 | AM_RANGE(0xc, 0xc) AM_WRITE(dsp_slave_portc_w) |
| 1823 | 2585 | |
| 1824 | | AM_RANGE(TMS32025_HOLD, TMS32025_HOLD) AM_READ(dsp_HOLD_signal_r) |
| 1825 | | AM_RANGE(TMS32025_HOLDA, TMS32025_HOLDA) AM_WRITE(dsp_HOLD_ACK_w) |
| 1826 | | AM_RANGE(TMS32025_XF, TMS32025_XF) AM_WRITE(dsp_XF_output_w) |
| 1827 | | AM_RANGE(TMS32025_BIO, TMS32025_BIO) AM_READ(dsp_BIOZ_r) |
| 2586 | AM_RANGE(TMS32025_HOLD, TMS32025_HOLD) AM_READ(dsp_hold_signal_r) |
| 2587 | AM_RANGE(TMS32025_HOLDA, TMS32025_HOLDA) AM_WRITE(dsp_hold_ack_w) |
| 2588 | AM_RANGE(TMS32025_XF, TMS32025_XF) AM_WRITE(dsp_xf_output_w) |
| 2589 | AM_RANGE(TMS32025_BIO, TMS32025_BIO) AM_READ(dsp_bioz_r) |
| 1828 | 2590 | AM_RANGE(TMS32025_DX, TMS32025_DX) AM_WRITE(slave_serial_io_w) |
| 1829 | 2591 | ADDRESS_MAP_END |
| 1830 | 2592 | |
| 1831 | | static NVRAM_HANDLER( namcos22 ) |
| 1832 | | { |
| 1833 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 1834 | | int i; |
| 1835 | | UINT8 data[4]; |
| 1836 | | if( read_or_write ) |
| 1837 | | { |
| 1838 | | for( i=0; i<state->m_nvmem.bytes()/4; i++ ) |
| 1839 | | { |
| 1840 | | UINT32 dword = state->m_nvmem[i]; |
| 1841 | | data[0] = dword>>24; |
| 1842 | | data[1] = (dword&0x00ff0000)>>16; |
| 1843 | | data[2] = (dword&0x0000ff00)>>8; |
| 1844 | | data[3] = dword&0xff; |
| 1845 | | file->write( data, 4 ); |
| 1846 | | } |
| 1847 | | } |
| 1848 | | else |
| 1849 | | { |
| 1850 | | if( file ) |
| 1851 | | { |
| 1852 | | for( i=0; i<state->m_nvmem.bytes()/4; i++ ) |
| 1853 | | { |
| 1854 | | file->read( data, 4 ); |
| 1855 | | state->m_nvmem[i] = (data[0]<<24)|(data[1]<<16)|(data[2]<<8)|data[3]; |
| 1856 | | } |
| 1857 | | } |
| 1858 | | else |
| 1859 | | { |
| 1860 | | memset( state->m_nvmem, 0x00, state->m_nvmem.bytes() ); |
| 1861 | | if (machine.root_device().memregion("nvram")->bytes() == state->m_nvmem.bytes()) |
| 1862 | | { |
| 1863 | | UINT8* nvram = machine.root_device().memregion("nvram")->base(); |
| 1864 | 2593 | |
| 1865 | | for( i=0; i<state->m_nvmem.bytes()/4; i++ ) |
| 1866 | | { |
| 1867 | | state->m_nvmem[i] = (nvram[0+i*4]<<24)|(nvram[1+i*4]<<16)|(nvram[2+i*4]<<8)|nvram[3+i*4]; |
| 1868 | | } |
| 1869 | | } |
| 1870 | | } |
| 1871 | | } |
| 1872 | | } |
| 2594 | /*********************************************************************************************/ |
| 1873 | 2595 | |
| 1874 | | /* Super System22 supports a sprite layer. |
| 1875 | | * Sprites are rendered as part of the polygon draw list, based on a per-sprite Z attribute. |
| 1876 | | * Each sprite has explicit placement/color/zoom controls. |
| 1877 | | */ |
| 1878 | | static const gfx_layout sprite_layout = |
| 1879 | | { |
| 1880 | | 32,32, |
| 1881 | | RGN_FRAC(1,1), |
| 1882 | | 8, |
| 1883 | | { 0,1,2,3,4,5,6,7 }, |
| 1884 | | { |
| 1885 | | 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8, |
| 1886 | | 8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8, |
| 1887 | | 16*8,17*8,18*8,19*8,20*8,21*8,22*8,23*8, |
| 1888 | | 24*8,25*8,26*8,27*8,28*8,29*8,30*8,31*8 }, |
| 1889 | | { |
| 1890 | | 0*32*8,1*32*8,2*32*8,3*32*8,4*32*8,5*32*8,6*32*8,7*32*8, |
| 1891 | | 8*32*8,9*32*8,10*32*8,11*32*8,12*32*8,13*32*8,14*32*8,15*32*8, |
| 1892 | | 16*32*8,17*32*8,18*32*8,19*32*8,20*32*8,21*32*8,22*32*8,23*32*8, |
| 1893 | | 24*32*8,25*32*8,26*32*8,27*32*8,28*32*8,29*32*8,30*32*8,31*32*8 }, |
| 1894 | | 32*32*8 |
| 1895 | | }; |
| 1896 | | |
| 1897 | | static const gfx_layout texture_tile_layout = |
| 1898 | | { |
| 1899 | | 16,16, |
| 1900 | | RGN_FRAC(1,1), |
| 1901 | | 8, |
| 1902 | | { 0,1,2,3,4,5,6,7 }, |
| 1903 | | { |
| 1904 | | 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8,8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8 |
| 1905 | | }, |
| 1906 | | { |
| 1907 | | 0*16*8,1*16*8,2*16*8,3*16*8,4*16*8,5*16*8,6*16*8,7*16*8, |
| 1908 | | 8*16*8,9*16*8,10*16*8,11*16*8,12*16*8,13*16*8,14*16*8,15*16*8 |
| 1909 | | }, |
| 1910 | | 16*16*8 |
| 1911 | | }; |
| 1912 | | |
| 1913 | | #define XOR(a) WORD2_XOR_BE(a) |
| 1914 | | |
| 1915 | | /* text layer uses a set of 16x16x8bpp tiles defined in RAM */ |
| 1916 | | static const gfx_layout namcos22_cg_layout = |
| 1917 | | { |
| 1918 | | 16,16, |
| 1919 | | 0x400, /* 0x3c0 */ |
| 1920 | | 4, |
| 1921 | | { 0,1,2,3 }, |
| 1922 | | { XOR(0)*4, XOR(1)*4, XOR(2)*4, XOR(3)*4, XOR(4)*4, XOR(5)*4, XOR(6)*4, XOR(7)*4, |
| 1923 | | XOR(8)*4, XOR(9)*4, XOR(10)*4, XOR(11)*4, XOR(12)*4, XOR(13)*4, XOR(14)*4, XOR(15)*4 }, |
| 1924 | | { 64*0,64*1,64*2,64*3,64*4,64*5,64*6,64*7,64*8,64*9,64*10,64*11,64*12,64*13,64*14,64*15 }, |
| 1925 | | 64*16 |
| 1926 | | }; |
| 1927 | | |
| 1928 | | static GFXDECODE_START( namcos22 ) |
| 1929 | | GFXDECODE_ENTRY( NULL, 0, namcos22_cg_layout, 0, 0x800 ) |
| 1930 | | GFXDECODE_ENTRY( "textile", 0, texture_tile_layout, 0, 0x80 ) |
| 1931 | | GFXDECODE_END |
| 1932 | | |
| 1933 | | static GFXDECODE_START( super ) |
| 1934 | | GFXDECODE_ENTRY( NULL, 0, namcos22_cg_layout, 0, 0x800 ) |
| 1935 | | GFXDECODE_ENTRY( "textile", 0, texture_tile_layout, 0, 0x80 ) |
| 1936 | | GFXDECODE_ENTRY( "sprite", 0, sprite_layout, 0, 0x80 ) |
| 1937 | | GFXDECODE_END |
| 1938 | | |
| 1939 | | /* prelim! */ |
| 1940 | | READ32_MEMBER(namcos22_state::namcos22_C139_SCI_r) |
| 1941 | | { |
| 1942 | | switch( offset ) |
| 1943 | | { |
| 1944 | | case 0x0/4: |
| 1945 | | return 0x0004<<16; |
| 1946 | | default: |
| 1947 | | return 0; |
| 1948 | | } |
| 1949 | | } |
| 1950 | | |
| 1951 | | #if 0 |
| 1952 | | WRITE32_MEMBER(namcos22_state::namcos22_C139_SCI_w) |
| 1953 | | { |
| 1954 | | COMBINE_DATA( &namcos22_C139_SCI[offset] ); |
| 1955 | | /* |
| 1956 | | 20020000 2 R/W RX Status |
| 1957 | | 0x01 : Frame Error |
| 1958 | | 0x02 : Frame Received |
| 1959 | | 0x04 : ? |
| 1960 | | |
| 1961 | | 20020002 2 R/W Status/Control Flags |
| 1962 | | 0x01 : |
| 1963 | | 0x02 : RX flag? (cleared every vsync) |
| 1964 | | 0x04 : RX flag? (cleared every vsync) |
| 1965 | | 0x08 : |
| 1966 | | |
| 1967 | | 20020004 2 W FIFO Control Register |
| 1968 | | 0x01 : sync bit enable? |
| 1969 | | 0x02 : TX FIFO sync bit (bit-8) |
| 1970 | | |
| 1971 | | 20020006 2 W TX Control Register |
| 1972 | | 0x01 : TX start/stop |
| 1973 | | 0x02 : ? |
| 1974 | | 0x10 : ? |
| 1975 | | |
| 1976 | | 20020008 2 W - |
| 1977 | | 2002000a 2 W TX Frame Size |
| 1978 | | 2002000c 2 R/W RX FIFO Pointer (0x0000 - 0x0fff) |
| 1979 | | 2002000e 2 W TX FIFO Pointer (0x0000 - 0x1fff) |
| 1980 | | */ |
| 1981 | | } |
| 1982 | | #endif |
| 1983 | | |
| 1984 | | READ32_MEMBER(namcos22_state::namcos22_system_controller_r) |
| 1985 | | { |
| 1986 | | return m_system_controller[offset]; |
| 1987 | | } |
| 1988 | | |
| 1989 | | /* system controller (super system22) |
| 1990 | | |
| 1991 | | 0x00: vblank irq level |
| 1992 | | 0x01: hblank irq level |
| 1993 | | 0x02: sci irq level |
| 1994 | | 0x03: unk irq level (unused?) |
| 1995 | | |
| 1996 | | 0x04: vblank irq ack |
| 1997 | | 0x05: hblank irq ack |
| 1998 | | 0x06: sci irq ack |
| 1999 | | 0x07: unk irq ack |
| 2000 | | |
| 2001 | | 0x08: unknown |
| 2002 | | 0x09: 0x62 or 0x61 |
| 2003 | | 0x0a: 0x62 |
| 2004 | | 0x0b: 0x57 |
| 2005 | | |
| 2006 | | 0x0c: 0x40 |
| 2007 | | 0x0d: 0x12 |
| 2008 | | 0x0e: 0x52 or 0x50 |
| 2009 | | 0x0f: 0x72 or 0x71 |
| 2010 | | |
| 2011 | | 0x10: 0xe0 |
| 2012 | | 0x11: 0x2c |
| 2013 | | 0x12: 0x50 |
| 2014 | | 0x13: 0xff |
| 2015 | | |
| 2016 | | 0x14: watchdog |
| 2017 | | 0x15: ? |
| 2018 | | 0x16: subcpu enable |
| 2019 | | 0x17: 0x0f |
| 2020 | | |
| 2021 | | 0x18: ? |
| 2022 | | 0x19: ? |
| 2023 | | 0x1a: ? |
| 2024 | | 0x1b: 0x01 |
| 2025 | | |
| 2026 | | 0x1c: dsp control |
| 2027 | | */ |
| 2028 | | WRITE32_MEMBER(namcos22_state::namcos22s_system_controller_w) |
| 2029 | | { |
| 2030 | | int oldreg, newreg; |
| 2031 | | |
| 2032 | | // acknowledge irqs |
| 2033 | | if (offset == 0x04/4 && mem_mask & 0xff000000) |
| 2034 | | { |
| 2035 | | // vblank |
| 2036 | | m_irq_state &= ~1; |
| 2037 | | m_maincpu->set_input_line(nthbyte(m_system_controller, 0x00) & 7, CLEAR_LINE); |
| 2038 | | } |
| 2039 | | |
| 2040 | | // irq level / enable irqs |
| 2041 | | if (offset == 0x00/4 && mem_mask & 0xff000000) |
| 2042 | | { |
| 2043 | | // vblank |
| 2044 | | oldreg = nthbyte(m_system_controller, 0x00) & 7; |
| 2045 | | newreg = data >> 24 & 7; |
| 2046 | | if (m_irq_state & 1 && oldreg != newreg) |
| 2047 | | { |
| 2048 | | m_maincpu->set_input_line(oldreg, CLEAR_LINE); |
| 2049 | | if (newreg) |
| 2050 | | m_maincpu->set_input_line(newreg, ASSERT_LINE); |
| 2051 | | else |
| 2052 | | m_irq_state &= ~1; |
| 2053 | | } |
| 2054 | | } |
| 2055 | | |
| 2056 | | // enable mcu |
| 2057 | | if (offset == 0x16/4 && mem_mask & 0x0000ff00) |
| 2058 | | { |
| 2059 | | if (data & 0x0000ff00) |
| 2060 | | m_mcu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 2061 | | else |
| 2062 | | m_mcu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 2063 | | } |
| 2064 | | |
| 2065 | | // dsp control |
| 2066 | | if (offset == 0x1c/4 && mem_mask & 0xff000000) |
| 2067 | | { |
| 2068 | | oldreg = nthbyte(m_system_controller, 0x1c); |
| 2069 | | newreg = data >> 24 & 0xff; |
| 2070 | | if (newreg != oldreg) |
| 2071 | | { |
| 2072 | | if( newreg == 0 ) |
| 2073 | | { |
| 2074 | | /* disable DSPs */ |
| 2075 | | m_master->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); /* master DSP */ |
| 2076 | | m_slave->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); /* slave DSP */ |
| 2077 | | namcos22_enable_slave_simulation(machine(), 0); |
| 2078 | | m_bEnableDspIrqs = 0; |
| 2079 | | } |
| 2080 | | else if( newreg == 1 ) |
| 2081 | | { |
| 2082 | | /* enable dsp and rendering subsystem */ |
| 2083 | | m_master->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 2084 | | namcos22_enable_slave_simulation(machine(), 1); |
| 2085 | | m_bEnableDspIrqs = 1; |
| 2086 | | } |
| 2087 | | else if( newreg == 0xff ) |
| 2088 | | { |
| 2089 | | /* used to upload game-specific code to master/slave dsps */ |
| 2090 | | m_master->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 2091 | | m_bEnableDspIrqs = 0; |
| 2092 | | } |
| 2093 | | } |
| 2094 | | } |
| 2095 | | |
| 2096 | | COMBINE_DATA( &m_system_controller[offset] ); |
| 2097 | | |
| 2098 | | } |
| 2099 | | |
| 2100 | 2596 | /* |
| 2101 | | 000064: 0000 8C9A (1) |
| 2102 | | 000068: 0000 8CA2 (2) |
| 2103 | | 00006C: 0000 8CAA (3) |
| 2104 | | 000070: 0000 8CB2 (4) |
| 2105 | | |
| 2106 | | 00008bd8: sys[0x01] := 0x01 // scanline |
| 2107 | | 00008be0: sys[0x02] := 0x02 // sci |
| 2108 | | 00008be8: sys[0x03] := 0x03 // unk |
| 2109 | | 00008bf0: sys[0x00] := 0x04 // vblank |
| 2110 | | 00008bf8: sys[0x08] := 0xff // ? |
| 2111 | | */ |
| 2112 | | INTERRUPT_GEN_MEMBER(namcos22_state::namcos22s_interrupt) |
| 2113 | | { |
| 2114 | | if (nthbyte(m_system_controller, 0x00) & 7) |
| 2115 | | { |
| 2116 | | // vblank irq |
| 2117 | | m_irq_state |= 1; |
| 2118 | | device.execute().set_input_line(nthbyte(m_system_controller, 0x00) & 7, ASSERT_LINE); |
| 2119 | | } |
| 2120 | | } |
| 2121 | | |
| 2122 | | /* system controller (system22) |
| 2123 | | |
| 2124 | | 0x00: IRQ (unknown) |
| 2125 | | 0x01: ? |
| 2126 | | 0x02: SCI IRQ level |
| 2127 | | 0x03: IRQ (unknown) |
| 2128 | | |
| 2129 | | 0x04: VSYNC IRQ level |
| 2130 | | 0x05: IRQ (unknown) acknowledge |
| 2131 | | 0x06: ? |
| 2132 | | 0x07: SCI IRQ acknowledge |
| 2133 | | |
| 2134 | | 0x08: IRQ (unknown) acknowledge |
| 2135 | | 0x09: VSYNC IRQ acknowledge |
| 2136 | | 0x0a: ? |
| 2137 | | 0x0b: ? |
| 2138 | | |
| 2139 | | 0x0c: ? |
| 2140 | | 0x0d: ? |
| 2141 | | 0x0e: ? |
| 2142 | | 0x0f: ? |
| 2143 | | |
| 2144 | | 0x10: ? |
| 2145 | | 0x11: ? |
| 2146 | | 0x12: ? |
| 2147 | | 0x13: ? |
| 2148 | | |
| 2149 | | 0x14: ? |
| 2150 | | 0x15: ? (cyc1) |
| 2151 | | 0x16: Watchdog timer reset |
| 2152 | | 0x17: ? |
| 2153 | | |
| 2154 | | 0x18: 0 or 1 -> mcu reset? |
| 2155 | | 0x19: ? |
| 2156 | | 0x1a: 0 or 1 or 0xff -> DSP control |
| 2157 | | 0x1b: ? |
| 2158 | | */ |
| 2159 | | WRITE32_MEMBER(namcos22_state::namcos22_system_controller_w) |
| 2160 | | { |
| 2161 | | int oldreg, newreg; |
| 2162 | | |
| 2163 | | // acknowledge irqs |
| 2164 | | if (offset == 0x09/4 && mem_mask & 0x00ff0000) |
| 2165 | | { |
| 2166 | | // vblank |
| 2167 | | m_irq_state &= ~1; |
| 2168 | | m_maincpu->set_input_line(nthbyte(m_system_controller, 0x04) & 7, CLEAR_LINE); |
| 2169 | | } |
| 2170 | | |
| 2171 | | // irq level / enable irqs |
| 2172 | | if (offset == 0x04/4 && mem_mask & 0xff000000) |
| 2173 | | { |
| 2174 | | // vblank |
| 2175 | | oldreg = nthbyte(m_system_controller, 0x04) & 7; |
| 2176 | | newreg = data >> 24 & 7; |
| 2177 | | if (m_irq_state & 1 && oldreg != newreg) |
| 2178 | | { |
| 2179 | | m_maincpu->set_input_line(oldreg, CLEAR_LINE); |
| 2180 | | if (newreg) |
| 2181 | | m_maincpu->set_input_line(newreg, ASSERT_LINE); |
| 2182 | | else |
| 2183 | | m_irq_state &= ~1; |
| 2184 | | } |
| 2185 | | } |
| 2186 | | |
| 2187 | | // enable mcu |
| 2188 | | if (offset == 0x1a/4 && mem_mask & 0xff000000) |
| 2189 | | { |
| 2190 | | if (data & 0xff000000) |
| 2191 | | m_mcu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 2192 | | else |
| 2193 | | m_mcu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 2194 | | } |
| 2195 | | |
| 2196 | | // dsp control |
| 2197 | | if (offset == 0x1a/4 && mem_mask & 0x0000ff00) |
| 2198 | | { |
| 2199 | | oldreg = nthbyte(m_system_controller, 0x1a); |
| 2200 | | newreg = data >> 8 & 0xff; |
| 2201 | | if (newreg != oldreg) |
| 2202 | | { |
| 2203 | | if( newreg == 0 ) |
| 2204 | | { |
| 2205 | | /* disable DSPs */ |
| 2206 | | m_master->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); /* master DSP */ |
| 2207 | | m_slave->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); /* slave DSP */ |
| 2208 | | namcos22_enable_slave_simulation(machine(), 0); |
| 2209 | | m_bEnableDspIrqs = 0; |
| 2210 | | } |
| 2211 | | else if( newreg == 1 ) |
| 2212 | | { |
| 2213 | | /* enable dsp and rendering subsystem */ |
| 2214 | | m_master->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 2215 | | namcos22_enable_slave_simulation(machine(), 1); |
| 2216 | | m_bEnableDspIrqs = 1; |
| 2217 | | } |
| 2218 | | else if( newreg == 0xff ) |
| 2219 | | { |
| 2220 | | /* used to upload game-specific code to master/slave dsps */ |
| 2221 | | m_master->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| 2222 | | m_bEnableDspIrqs = 0; |
| 2223 | | } |
| 2224 | | } |
| 2225 | | } |
| 2226 | | |
| 2227 | | COMBINE_DATA( &m_system_controller[offset] ); |
| 2228 | | |
| 2229 | | } |
| 2230 | | |
| 2231 | | /* namcos22_interrupt |
| 2232 | | Ridge Racer: |
| 2233 | | 1:0a0b6 |
| 2234 | | 2:09fe8 (rte) |
| 2235 | | 3:09fe8 (rte) |
| 2236 | | 4:09f9a (vblank) |
| 2237 | | 5:14dee (SCI) |
| 2238 | | 6:09fe8 (rte) |
| 2239 | | 7:09fe8 (rte) |
| 2240 | | |
| 2241 | | Ridge Racer 2: |
| 2242 | | 1:0d10c 40000005 |
| 2243 | | 2:0cfa2 (rte) |
| 2244 | | 3:0cfa2 (rte) |
| 2245 | | 4:0cfa2 (rte) |
| 2246 | | 5:0cef0 |
| 2247 | | 6:1bbcc |
| 2248 | | 7:0cfa2 (rte) |
| 2249 | | |
| 2250 | | Ace Driver: |
| 2251 | | 9f8 (rte) |
| 2252 | | 9fa (rte) |
| 2253 | | 9fc (rte) |
| 2254 | | 9fe (rte) |
| 2255 | | a00 |
| 2256 | | a46 |
| 2257 | | a4c (rte) |
| 2258 | | |
| 2259 | | Victory Lap: |
| 2260 | | a54 indir to 21c2 (hblank?) |
| 2261 | | a5a (rte) |
| 2262 | | a5c (rte) |
| 2263 | | a5e (rte) |
| 2264 | | a60 irq |
| 2265 | | abe indirect to 27f1e (SCI) |
| 2266 | | ac4 (rte) |
| 2267 | | |
| 2268 | | Cyber Commando: |
| 2269 | | move.b #$36, $40000002.l |
| 2270 | | move.b # $0, $40000003.l |
| 2271 | | move.b #$35, $40000004.l |
| 2272 | | |
| 2273 | | move.b #$34, $40000004.l |
| 2274 | | */ |
| 2275 | | INTERRUPT_GEN_MEMBER(namcos22_state::namcos22_interrupt) |
| 2276 | | { |
| 2277 | | switch( m_gametype ) |
| 2278 | | { |
| 2279 | | case NAMCOS22_RIDGE_RACER: |
| 2280 | | case NAMCOS22_RIDGE_RACER2: |
| 2281 | | case NAMCOS22_RAVE_RACER: |
| 2282 | | case NAMCOS22_ACE_DRIVER: |
| 2283 | | case NAMCOS22_VICTORY_LAP: |
| 2284 | | HandleDrivingIO(machine()); |
| 2285 | | break; |
| 2286 | | |
| 2287 | | case NAMCOS22_CYBER_COMMANDO: |
| 2288 | | HandleCyberCommandoIO(machine()); |
| 2289 | | break; |
| 2290 | | |
| 2291 | | default: |
| 2292 | | break; |
| 2293 | | } |
| 2294 | | |
| 2295 | | if (nthbyte(m_system_controller, 0x04) & 7) |
| 2296 | | { |
| 2297 | | // vblank irq |
| 2298 | | m_irq_state |= 1; |
| 2299 | | device.execute().set_input_line(nthbyte(m_system_controller, 0x04) & 7, ASSERT_LINE); |
| 2300 | | } |
| 2301 | | } |
| 2302 | | |
| 2303 | | READ32_MEMBER(namcos22_state::namcos22_keycus_r) |
| 2304 | | { |
| 2305 | | // this chip is also used for reading random values in some games |
| 2306 | | // for example in timecris to determine where certain enemies will emerge |
| 2307 | | // but it is not yet understood how this works |
| 2308 | | // printf("Hit keycus mask %x PC=%x\n", mem_mask, space.device().safe_pc()); |
| 2309 | | |
| 2310 | | if (ACCESSING_BITS_0_15) |
| 2311 | | return m_keycus_id; |
| 2312 | | if (ACCESSING_BITS_16_31) |
| 2313 | | return m_keycus_id << 16; |
| 2314 | | |
| 2315 | | return 0; |
| 2316 | | } |
| 2317 | | |
| 2318 | | WRITE32_MEMBER(namcos22_state::namcos22_keycus_w) |
| 2319 | | { |
| 2320 | | // for obfuscating keycus and/or random seed? |
| 2321 | | } |
| 2322 | | |
| 2323 | | /** |
| 2324 | | * Some port values are read serially one bit at a time via word reads at |
| 2325 | | * 0x50000008 and 0x5000000a |
| 2326 | | * |
| 2327 | | * Writes to 0x50000008 and 0x5000000a reset the state of the input buffer. |
| 2328 | | * |
| 2329 | | * Note that only the values read at 0x50000008 seem to be used in-game. |
| 2330 | | * |
| 2331 | | * Some of these values are redundant with respects to the work-RAM supplied input port |
| 2332 | | * values supplied by the IO CPU. For example, the position of the stick shift is digital, |
| 2333 | | * and may be read through this mechanism or through shared IO RAM at 0x60004030. |
| 2334 | | * |
| 2335 | | * Other values seem to be digital versions of analog ports, for example "the gas pedal is |
| 2336 | | * pressed" as a boolean flag. IO RAM supplies it as an analog value. |
| 2337 | | */ |
| 2338 | | READ16_MEMBER(namcos22_state::namcos22_portbit_r) |
| 2339 | | { |
| 2340 | | UINT16 ret = m_portbits[offset] & 1; |
| 2341 | | m_portbits[offset] = m_portbits[offset] >> 1 | 0x8000; |
| 2342 | | return ret; |
| 2343 | | } |
| 2344 | | |
| 2345 | | WRITE16_MEMBER(namcos22_state::namcos22_portbit_w) |
| 2346 | | { |
| 2347 | | m_portbits[offset] = ioport((offset == 0) ? "P1" : "P2")->read_safe(0xffff); |
| 2348 | | } |
| 2349 | | |
| 2350 | | READ16_MEMBER(namcos22_state::namcos22_dipswitch_r) |
| 2351 | | { |
| 2352 | | return ioport("DSW0")->read(); |
| 2353 | | } |
| 2354 | | |
| 2355 | | READ32_MEMBER(namcos22_state::namcos22_mcuram_r) |
| 2356 | | { |
| 2357 | | return m_shareram[offset]; |
| 2358 | | } |
| 2359 | | |
| 2360 | | WRITE32_MEMBER(namcos22_state::namcos22_mcuram_w) |
| 2361 | | { |
| 2362 | | COMBINE_DATA(&m_shareram[offset]); |
| 2363 | | } |
| 2364 | | |
| 2365 | | READ32_MEMBER(namcos22_state::namcos22_gun_r) |
| 2366 | | { |
| 2367 | | UINT16 xpos = ioport("LIGHTX")->read(); |
| 2368 | | UINT16 ypos = ioport("LIGHTY")->read(); |
| 2369 | | // ypos is not completely understood yet, there should be a difference between case 1 and 2 |
| 2370 | | |
| 2371 | | switch( offset ) |
| 2372 | | { |
| 2373 | | case 0: /* 430000 */ |
| 2374 | | return xpos<<16; |
| 2375 | | |
| 2376 | | case 1: /* 430004 */ |
| 2377 | | case 2: /* 430008 */ |
| 2378 | | return ypos<<16; |
| 2379 | | |
| 2380 | | default: |
| 2381 | | return 0; |
| 2382 | | } |
| 2383 | | } |
| 2384 | | |
| 2385 | | WRITE16_MEMBER(namcos22_state::namcos22_cpuleds_w) |
| 2386 | | { |
| 2387 | | // 8 leds on cpu board, 0=on 1=off |
| 2388 | | // on system 22: two rows of 4 red leds |
| 2389 | | // on super system 22: GYRGYRGY green/yellow/red |
| 2390 | | for (int i = 0; i < 8; i++) |
| 2391 | | output_set_lamp_value(i, (~data<<i & 0x80) ? 0 : 1); |
| 2392 | | } |
| 2393 | | |
| 2394 | | READ32_MEMBER(namcos22_state::alpinesa_prot_r) |
| 2395 | | { |
| 2396 | | return m_AlpineSurferProtData; |
| 2397 | | } |
| 2398 | | |
| 2399 | | WRITE32_MEMBER(namcos22_state::alpinesa_prot_w) |
| 2400 | | { |
| 2401 | | switch( data ) |
| 2402 | | { |
| 2403 | | case 0: |
| 2404 | | m_AlpineSurferProtData = 0; |
| 2405 | | break; |
| 2406 | | case 1: |
| 2407 | | m_AlpineSurferProtData = 1; |
| 2408 | | break; |
| 2409 | | case 3: |
| 2410 | | m_AlpineSurferProtData = 2; |
| 2411 | | break; |
| 2412 | | default: |
| 2413 | | break; |
| 2414 | | } |
| 2415 | | } |
| 2416 | | |
| 2417 | | WRITE32_MEMBER(namcos22_state::namcos22s_nvmem_w) |
| 2418 | | { |
| 2419 | | mem_mask &= 0xff00ff00; // 8KB RAM over 16KB address &space |
| 2420 | | COMBINE_DATA(&m_nvmem[offset]); |
| 2421 | | } |
| 2422 | | |
| 2423 | | WRITE32_MEMBER(namcos22_state::namcos22s_chipselect_w) |
| 2424 | | { |
| 2425 | | // assume that this register is for chip enable/disable |
| 2426 | | // it's written many times during boot-up, and most games don't touch it afterwards (last value usually 0038 or 0838) |
| 2427 | | // 8000: spot related (set in dirtdash night driving) |
| 2428 | | // 4000: spot related (set in dirtdash and testmode) |
| 2429 | | // 0800: fade related? |
| 2430 | | // other bits: no clue |
| 2431 | | if (ACCESSING_BITS_16_23) |
| 2432 | | m_chipselect = data >> 16; |
| 2433 | | else if (ACCESSING_BITS_24_31) |
| 2434 | | m_chipselect = data >> 24; |
| 2435 | | } |
| 2436 | | |
| 2437 | | /* Namco Super System 22 */ |
| 2438 | | static ADDRESS_MAP_START( namcos22s_am, AS_PROGRAM, 32, namcos22_state ) |
| 2439 | | AM_RANGE(0x000000, 0x3fffff) AM_ROM |
| 2440 | | AM_RANGE(0x400000, 0x40001f) AM_READWRITE(namcos22_keycus_r, namcos22_keycus_w) |
| 2441 | | AM_RANGE(0x410000, 0x413fff) AM_RAM /* C139 SCI buffer */ |
| 2442 | | AM_RANGE(0x420000, 0x42000f) AM_READ(namcos22_C139_SCI_r) AM_WRITEONLY /* C139 SCI registers */ |
| 2443 | | AM_RANGE(0x440000, 0x440003) AM_READWRITE16(namcos22_dipswitch_r, namcos22_cpuleds_w, 0xffffffff) |
| 2444 | | AM_RANGE(0x450008, 0x45000b) AM_READWRITE16(namcos22_portbit_r, namcos22_portbit_w, 0xffffffff) |
| 2445 | | AM_RANGE(0x460000, 0x463fff) AM_RAM_WRITE(namcos22s_nvmem_w) AM_SHARE("nvmem") |
| 2446 | | AM_RANGE(0x700000, 0x70001f) AM_READWRITE(namcos22_system_controller_r, namcos22s_system_controller_w) AM_SHARE("syscontrol") |
| 2447 | | AM_RANGE(0x800000, 0x800003) AM_WRITE(namcos22s_chipselect_w) |
| 2448 | | AM_RANGE(0x810000, 0x81000f) AM_RAM AM_SHARE("czattr") |
| 2449 | | AM_RANGE(0x810200, 0x8103ff) AM_READWRITE(namcos22s_czram_r, namcos22s_czram_w) |
| 2450 | | AM_RANGE(0x820000, 0x8202ff) AM_WRITENOP /* leftover of old (non-super) video mixer device */ |
| 2451 | | AM_RANGE(0x824000, 0x8243ff) AM_READWRITE(namcos22_gamma_r, namcos22_gamma_w) AM_SHARE("gamma") |
| 2452 | | AM_RANGE(0x828000, 0x83ffff) AM_READWRITE(namcos22_paletteram_r, namcos22_paletteram_w) AM_SHARE("paletteram") |
| 2453 | | AM_RANGE(0x860000, 0x860007) AM_READWRITE(namcos22s_spotram_r, namcos22s_spotram_w) |
| 2454 | | AM_RANGE(0x880000, 0x89dfff) AM_READWRITE(namcos22_cgram_r, namcos22_cgram_w) AM_SHARE("cgram") |
| 2455 | | AM_RANGE(0x89e000, 0x89ffff) AM_READWRITE(namcos22_textram_r, namcos22_textram_w) AM_SHARE("textram") |
| 2456 | | AM_RANGE(0x8a0000, 0x8a000f) AM_READWRITE(namcos22_tilemapattr_r, namcos22_tilemapattr_w) AM_SHARE("tilemapattr") |
| 2457 | | AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("vics_data") |
| 2458 | | AM_RANGE(0x940000, 0x94007f) AM_READWRITE(namcos22s_vics_control_r, namcos22s_vics_control_w) AM_SHARE("vics_control") |
| 2459 | | AM_RANGE(0x980000, 0x9affff) AM_RAM AM_SHARE("spriteram") /* C374 */ |
| 2460 | | AM_RANGE(0xa04000, 0xa0bfff) AM_READWRITE(namcos22_mcuram_r, namcos22_mcuram_w) AM_SHARE("shareram") /* COM RAM */ |
| 2461 | | AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE(namcos22_dspram_r, namcos22_dspram_w) AM_SHARE("polygonram") |
| 2462 | | AM_RANGE(0xe00000, 0xe3ffff) AM_RAM /* workram */ |
| 2463 | | ADDRESS_MAP_END |
| 2464 | | |
| 2465 | | static ADDRESS_MAP_START( timecris_am, AS_PROGRAM, 32, namcos22_state ) |
| 2466 | | AM_RANGE(0x430000, 0x43000f) AM_READ(namcos22_gun_r) |
| 2467 | | AM_IMPORT_FROM( namcos22s_am ) |
| 2468 | | ADDRESS_MAP_END |
| 2469 | | |
| 2470 | | READ16_MEMBER(namcos22_state::s22mcu_shared_r) |
| 2471 | | { |
| 2472 | | UINT16 *share16 = (UINT16 *)m_shareram.target(); |
| 2473 | | |
| 2474 | | return share16[BYTE_XOR_BE(offset)]; |
| 2475 | | } |
| 2476 | | |
| 2477 | | WRITE16_MEMBER(namcos22_state::s22mcu_shared_w) |
| 2478 | | { |
| 2479 | | UINT16 *share16 = (UINT16 *)m_shareram.target(); |
| 2480 | | |
| 2481 | | COMBINE_DATA(&share16[BYTE_XOR_BE(offset)]); |
| 2482 | | } |
| 2483 | | |
| 2484 | | /* |
| 2485 | 2597 | MCU memory map |
| 2486 | 2598 | -------------- |
| 2487 | 2599 | 000000-00027f: internal MCU registers and RAM |
| r24771 | r24772 | |
| 2506 | 2618 | |
| 2507 | 2619 | */ |
| 2508 | 2620 | |
| 2509 | | // Super System 22 M37710 |
| 2510 | | static ADDRESS_MAP_START( mcu_program, AS_PROGRAM, 16, namcos22_state ) |
| 2511 | | AM_RANGE(0x002000, 0x002fff) AM_DEVREADWRITE("c352", c352_device, read, write) |
| 2512 | | AM_RANGE(0x004000, 0x00bfff) AM_READWRITE(s22mcu_shared_r, s22mcu_shared_w ) |
| 2513 | | AM_RANGE(0x00c000, 0x00ffff) AM_ROM AM_REGION("mcu", 0xc000) |
| 2514 | | AM_RANGE(0x080000, 0x0fffff) AM_ROM AM_REGION("mcu", 0) |
| 2515 | | AM_RANGE(0x200000, 0x27ffff) AM_ROM AM_REGION("mcu", 0) |
| 2516 | | AM_RANGE(0x280000, 0x2fffff) AM_ROM AM_REGION("mcu", 0) |
| 2517 | | AM_RANGE(0x301000, 0x301001) AM_NOP // watchdog? LEDs? |
| 2518 | | AM_RANGE(0x308000, 0x308003) AM_NOP // volume control IC? |
| 2519 | | ADDRESS_MAP_END |
| 2621 | // System 22 37702 |
| 2520 | 2622 | |
| 2521 | | // System 22 37702 |
| 2623 | READ16_MEMBER(namcos22_state::s22mcu_shared_r) |
| 2624 | { |
| 2625 | UINT16 *share16 = (UINT16 *)m_shareram.target(); |
| 2626 | return share16[BYTE_XOR_BE(offset)]; |
| 2627 | } |
| 2628 | |
| 2629 | WRITE16_MEMBER(namcos22_state::s22mcu_shared_w) |
| 2630 | { |
| 2631 | UINT16 *share16 = (UINT16 *)m_shareram.target(); |
| 2632 | COMBINE_DATA(&share16[BYTE_XOR_BE(offset)]); |
| 2633 | } |
| 2634 | |
| 2635 | READ8_MEMBER(namcos22_state::mcu_port4_s22_r) |
| 2636 | { |
| 2637 | // for C74, 0x10 selects sound MCU role, 0x00 selects control-reading role |
| 2638 | return 0x10; |
| 2639 | } |
| 2640 | |
| 2641 | READ8_MEMBER(namcos22_state::iomcu_port4_s22_r) |
| 2642 | { |
| 2643 | // for C74, 0x10 selects sound MCU role, 0x00 selects control-reading role |
| 2644 | return 0x00; |
| 2645 | } |
| 2646 | |
| 2522 | 2647 | static ADDRESS_MAP_START( mcu_s22_program, AS_PROGRAM, 16, namcos22_state ) |
| 2523 | 2648 | AM_RANGE(0x002000, 0x002fff) AM_DEVREADWRITE("c352", c352_device, read, write) |
| 2524 | 2649 | AM_RANGE(0x004000, 0x00bfff) AM_READWRITE(s22mcu_shared_r, s22mcu_shared_w ) |
| r24771 | r24772 | |
| 2534 | 2659 | AM_RANGE(0x00c000, 0x00ffff) AM_ROM AM_REGION("iomcu", 0) |
| 2535 | 2660 | ADDRESS_MAP_END |
| 2536 | 2661 | |
| 2662 | static ADDRESS_MAP_START( mcu_s22_io, AS_IO, 8, namcos22_state ) |
| 2663 | AM_RANGE(M37710_PORT4, M37710_PORT4) AM_READ(mcu_port4_s22_r) |
| 2664 | ADDRESS_MAP_END |
| 2537 | 2665 | |
| 2666 | static ADDRESS_MAP_START( iomcu_s22_io, AS_IO, 8, namcos22_state ) |
| 2667 | AM_RANGE(M37710_PORT4, M37710_PORT4) AM_READ(iomcu_port4_s22_r) |
| 2668 | AM_RANGE(0x00, 0xff) AM_NOP |
| 2669 | ADDRESS_MAP_END |
| 2670 | |
| 2671 | |
| 2672 | // Super System 22 M37710 |
| 2673 | |
| 2674 | TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::mcu_irq) |
| 2675 | { |
| 2676 | int scanline = param; |
| 2677 | |
| 2678 | /* TODO: real sources of these */ |
| 2679 | if (scanline == 480) |
| 2680 | m_mcu->set_input_line(M37710_LINE_IRQ0, HOLD_LINE); |
| 2681 | else if (scanline == 500) |
| 2682 | m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE); |
| 2683 | else if (scanline == 0) |
| 2684 | m_mcu->set_input_line(M37710_LINE_IRQ2, HOLD_LINE); |
| 2685 | } |
| 2686 | |
| 2687 | |
| 2538 | 2688 | WRITE8_MEMBER(namcos22_state::mcu_port4_w) |
| 2539 | 2689 | { |
| 2540 | 2690 | m_p4 = data; |
| r24771 | r24772 | |
| 2578 | 2728 | return 0; |
| 2579 | 2729 | } |
| 2580 | 2730 | |
| 2581 | | WRITE8_MEMBER(namcos22_state::propcycle_mcu_port5_w) |
| 2582 | | { |
| 2583 | | // prop cycle outputs: |
| 2584 | | // bit 1 = fan |
| 2585 | | // bit 2 = button light |
| 2586 | | |
| 2587 | | output_set_value("fan0", data & 1); |
| 2588 | | set_led_status(machine(), 0, data & 2); |
| 2589 | | } |
| 2590 | | |
| 2591 | 2731 | READ8_MEMBER(namcos22_state::namcos22s_mcu_adc_r) |
| 2592 | 2732 | { |
| 2593 | 2733 | static const char *const portnames[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; |
| r24771 | r24772 | |
| 2597 | 2737 | return (ioport(portnames[offset >> 1 & 3])->read_safe(0) << 2) & 0xff; |
| 2598 | 2738 | } |
| 2599 | 2739 | |
| 2600 | | TIMER_CALLBACK_MEMBER(namcos22_state::alpine_steplock_callback) |
| 2740 | static ADDRESS_MAP_START( mcu_program, AS_PROGRAM, 16, namcos22_state ) |
| 2741 | AM_RANGE(0x002000, 0x002fff) AM_DEVREADWRITE("c352", c352_device, read, write) |
| 2742 | AM_RANGE(0x004000, 0x00bfff) AM_READWRITE(s22mcu_shared_r, s22mcu_shared_w ) |
| 2743 | AM_RANGE(0x00c000, 0x00ffff) AM_ROM AM_REGION("mcu", 0xc000) |
| 2744 | AM_RANGE(0x080000, 0x0fffff) AM_ROM AM_REGION("mcu", 0) |
| 2745 | AM_RANGE(0x200000, 0x27ffff) AM_ROM AM_REGION("mcu", 0) |
| 2746 | AM_RANGE(0x280000, 0x2fffff) AM_ROM AM_REGION("mcu", 0) |
| 2747 | AM_RANGE(0x301000, 0x301001) AM_NOP // watchdog? LEDs? |
| 2748 | AM_RANGE(0x308000, 0x308003) AM_NOP // volume control IC? |
| 2749 | ADDRESS_MAP_END |
| 2750 | |
| 2751 | static ADDRESS_MAP_START( mcu_io, AS_IO, 8, namcos22_state ) |
| 2752 | AM_RANGE(M37710_PORT4, M37710_PORT4) AM_READWRITE(mcu_port4_r, mcu_port4_w) |
| 2753 | AM_RANGE(M37710_PORT5, M37710_PORT5) AM_READWRITE(mcu_port5_r, mcu_port5_w) |
| 2754 | AM_RANGE(M37710_PORT6, M37710_PORT6) AM_READWRITE(mcu_port6_r, mcu_port6_w) |
| 2755 | AM_RANGE(M37710_PORT7, M37710_PORT7) AM_READWRITE(mcu_port7_r, mcu_port7_w) |
| 2756 | AM_RANGE(M37710_ADC0_L, M37710_ADC3_H) AM_READ(namcos22s_mcu_adc_r) |
| 2757 | AM_RANGE(M37710_ADC4_L, M37710_ADC7_H) AM_READNOP |
| 2758 | ADDRESS_MAP_END |
| 2759 | |
| 2760 | /*********************************************************************************************/ |
| 2761 | |
| 2762 | // custom input handling |
| 2763 | |
| 2764 | /* TODO: REMOVE (THIS IS HANDLED BY "IOMCU") */ |
| 2765 | void namcos22_state::handle_coinage(int slots, int address_is_odd) |
| 2601 | 2766 | { |
| 2767 | UINT16 *share16 = (UINT16 *)m_shareram.target(); |
| 2768 | |
| 2769 | UINT32 coin_state = ioport("INPUTS")->read() & 0x1200; |
| 2770 | |
| 2771 | if (!(coin_state & 0x1000) && (m_old_coin_state & 0x1000)) |
| 2772 | { |
| 2773 | m_credits1++; |
| 2774 | } |
| 2775 | |
| 2776 | if (!(coin_state & 0x0200) && (m_old_coin_state & 0x0200)) |
| 2777 | { |
| 2778 | m_credits2++; |
| 2779 | } |
| 2780 | |
| 2781 | m_old_coin_state = coin_state; |
| 2782 | |
| 2783 | share16[BYTE_XOR_LE(0x38/2)] = m_credits1 << (address_is_odd*8); |
| 2784 | |
| 2785 | if (slots == 2) |
| 2786 | { |
| 2787 | share16[BYTE_XOR_LE(0x3e/2)] = m_credits2 << (address_is_odd*8); |
| 2788 | } |
| 2789 | } |
| 2790 | |
| 2791 | /* TODO: REMOVE (THIS IS HANDLED BY "IOMCU") */ |
| 2792 | void namcos22_state::handle_driving_io() |
| 2793 | { |
| 2794 | if (m_syscontrol[0x18] != 0) |
| 2795 | { |
| 2796 | UINT16 flags = ioport("INPUTS")->read(); |
| 2797 | UINT16 coinram_address_is_odd = 0; |
| 2798 | |
| 2799 | UINT16 gas = ioport("GAS")->read(); |
| 2800 | UINT16 brake = ioport("BRAKE")->read(); |
| 2801 | UINT16 steer = ioport("STEER")->read(); |
| 2802 | |
| 2803 | switch (m_gametype) |
| 2804 | { |
| 2805 | case NAMCOS22_RIDGE_RACER: |
| 2806 | case NAMCOS22_RIDGE_RACER2: |
| 2807 | gas <<= 3; |
| 2808 | gas += 884; |
| 2809 | brake <<= 3; |
| 2810 | brake += 809; |
| 2811 | steer <<= 4; |
| 2812 | steer += 0x160; |
| 2813 | break; |
| 2814 | |
| 2815 | case NAMCOS22_RAVE_RACER: |
| 2816 | gas <<= 3; |
| 2817 | gas += 992; |
| 2818 | brake <<= 3; |
| 2819 | brake += 3008; |
| 2820 | steer <<= 4; |
| 2821 | steer += 32; |
| 2822 | break; |
| 2823 | |
| 2824 | case NAMCOS22_VICTORY_LAP: |
| 2825 | coinram_address_is_odd = 1; |
| 2826 | // (fall through) |
| 2827 | case NAMCOS22_ACE_DRIVER: |
| 2828 | gas <<= 3; |
| 2829 | gas += 992; |
| 2830 | brake <<= 3; |
| 2831 | brake += 3008; |
| 2832 | steer <<= 4; |
| 2833 | steer += 2048; |
| 2834 | break; |
| 2835 | |
| 2836 | default: |
| 2837 | gas <<= 3; |
| 2838 | brake <<= 3; |
| 2839 | steer <<= 4; |
| 2840 | break; |
| 2841 | } |
| 2842 | |
| 2843 | handle_coinage(2, coinram_address_is_odd); |
| 2844 | m_shareram[0x000/4] = 0x10 << 16; /* SUB CPU ready */ |
| 2845 | m_shareram[0x030/4] = (flags << 16) | steer; |
| 2846 | m_shareram[0x034/4] = (gas << 16) | brake; |
| 2847 | } |
| 2848 | } |
| 2849 | |
| 2850 | /* TODO: REMOVE (THIS IS HANDLED BY "IOMCU") */ |
| 2851 | void namcos22_state::handle_cybrcomm_io() |
| 2852 | { |
| 2853 | if (m_syscontrol[0x18] != 0) |
| 2854 | { |
| 2855 | UINT16 flags = ioport("INPUTS")->read(); |
| 2856 | |
| 2857 | UINT16 volume0 = ioport("STICKY1")->read() * 0x10; |
| 2858 | UINT16 volume1 = ioport("STICKY2")->read() * 0x10; |
| 2859 | UINT16 volume2 = ioport("STICKX1")->read() * 0x10; |
| 2860 | UINT16 volume3 = ioport("STICKX2")->read() * 0x10; |
| 2861 | |
| 2862 | m_shareram[0x030/4] = (flags << 16) | volume0; |
| 2863 | m_shareram[0x034/4] = (volume1 << 16) | volume2; |
| 2864 | m_shareram[0x038/4] = volume3 << 16; |
| 2865 | |
| 2866 | handle_coinage(1, 0); |
| 2867 | } |
| 2868 | } |
| 2869 | |
| 2870 | |
| 2871 | // Alpine skiing games |
| 2872 | |
| 2873 | TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::alpine_steplock_callback) |
| 2874 | { |
| 2602 | 2875 | m_motor_status = param; |
| 2603 | 2876 | } |
| 2604 | 2877 | |
| r24771 | r24772 | |
| 2625 | 2898 | } |
| 2626 | 2899 | } |
| 2627 | 2900 | |
| 2628 | | static ADDRESS_MAP_START( mcu_io, AS_IO, 8, namcos22_state ) |
| 2629 | | AM_RANGE(M37710_PORT4, M37710_PORT4) AM_READ(mcu_port4_r ) AM_WRITE(mcu_port4_w ) |
| 2630 | | AM_RANGE(M37710_PORT5, M37710_PORT5) AM_READ(mcu_port5_r ) AM_WRITE(mcu_port5_w ) |
| 2631 | | AM_RANGE(M37710_PORT6, M37710_PORT6) AM_READ(mcu_port6_r ) AM_WRITE(mcu_port6_w ) |
| 2632 | | AM_RANGE(M37710_PORT7, M37710_PORT7) AM_READ(mcu_port7_r ) AM_WRITE(mcu_port7_w ) |
| 2633 | | AM_RANGE(M37710_ADC0_L, M37710_ADC3_H) AM_READ(namcos22s_mcu_adc_r) |
| 2634 | | AM_RANGE(M37710_ADC4_L, M37710_ADC7_H) AM_READNOP |
| 2901 | static ADDRESS_MAP_START( alpine_io_map, AS_IO, 8, namcos22_state ) |
| 2902 | AM_RANGE(M37710_PORT5, M37710_PORT5) AM_WRITE(alpine_mcu_port5_w) |
| 2903 | AM_IMPORT_FROM( mcu_io ) |
| 2635 | 2904 | ADDRESS_MAP_END |
| 2636 | 2905 | |
| 2637 | | READ8_MEMBER(namcos22_state::mcu_port4_s22_r) |
| 2906 | |
| 2907 | // Prop Cycle |
| 2908 | |
| 2909 | WRITE8_MEMBER(namcos22_state::propcycle_mcu_port5_w) |
| 2638 | 2910 | { |
| 2639 | | // for C74, 0x10 selects sound MCU role, 0x00 selects control-reading role |
| 2640 | | return (&space.device() == m_mcu) ? 0x10: 0x00; |
| 2911 | // prop cycle outputs: |
| 2912 | // bit 1 = fan |
| 2913 | // bit 2 = button light |
| 2914 | output_set_value("fan0", data & 1); |
| 2915 | set_led_status(machine(), 0, data & 2); |
| 2641 | 2916 | } |
| 2642 | 2917 | |
| 2643 | | static ADDRESS_MAP_START( mcu_s22_io, AS_IO, 8, namcos22_state ) |
| 2644 | | AM_RANGE(M37710_PORT4, M37710_PORT4) AM_READ(mcu_port4_s22_r ) |
| 2918 | static ADDRESS_MAP_START( propcycl_io_map, AS_IO, 8, namcos22_state ) |
| 2919 | AM_RANGE(M37710_PORT5, M37710_PORT5) AM_WRITE(propcycle_mcu_port5_w) |
| 2920 | AM_IMPORT_FROM( mcu_io ) |
| 2645 | 2921 | ADDRESS_MAP_END |
| 2646 | 2922 | |
| 2647 | | static ADDRESS_MAP_START( iomcu_s22_io, AS_IO, 8, namcos22_state ) |
| 2648 | | AM_RANGE(M37710_PORT4, M37710_PORT4) AM_READ(mcu_port4_s22_r ) |
| 2649 | | AM_RANGE(0x00, 0xff) AM_NOP |
| 2650 | | ADDRESS_MAP_END |
| 2651 | | |
| 2652 | | TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::mcu_irq) |
| 2923 | TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::propcycl_pedal_interrupt) |
| 2653 | 2924 | { |
| 2654 | | int scanline = param; |
| 2655 | | |
| 2656 | | /* TODO: real sources of these */ |
| 2657 | | if(scanline == 480) |
| 2658 | | m_mcu->set_input_line(M37710_LINE_IRQ0, HOLD_LINE); |
| 2659 | | else if(scanline == 500) |
| 2660 | | m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE); |
| 2661 | | else if(scanline == 0) |
| 2662 | | m_mcu->set_input_line(M37710_LINE_IRQ2, HOLD_LINE); |
| 2925 | generic_pulse_irq_line(m_mcu, M37710_LINE_TIMERA3TICK, 1); |
| 2663 | 2926 | } |
| 2664 | 2927 | |
| 2665 | | void namcos22_state::machine_reset() |
| 2928 | TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::propcycl_pedal_update) |
| 2666 | 2929 | { |
| 2667 | | m_master->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 2668 | | m_slave->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 2669 | | m_mcu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 2670 | | } |
| 2930 | // arbitrary timer for reading optical pedal |
| 2931 | UINT8 i = ioport("PEDAL")->read(); |
| 2671 | 2932 | |
| 2672 | | void namcos22_state::machine_start() |
| 2673 | | { |
| 2674 | | m_portbits[0] = 0xffff; |
| 2675 | | m_portbits[1] = 0xffff; |
| 2676 | | } |
| 2933 | if (i != 0) |
| 2934 | { |
| 2935 | // the pedal has a simple 1-bit "light interrupted" sensor. the faster you pedal, |
| 2936 | // the faster it pulses. this is connected to the clock input for timer A3, |
| 2937 | // and timer A3 is configured by the MCU program to cause an interrupt each time |
| 2938 | // it's clocked. by counting the number of interrupts in a frame, we can determine |
| 2939 | // how fast the user is pedaling. |
| 2677 | 2940 | |
| 2678 | | static MACHINE_CONFIG_START( namcos22s, namcos22_state ) |
| 2941 | // these values(in usec) may need tweaking: |
| 2942 | const int base = 1000; |
| 2943 | const int range = 10000; |
| 2679 | 2944 | |
| 2680 | | /* basic machine hardware */ |
| 2681 | | MCFG_CPU_ADD("maincpu", M68EC020,SS22_MASTER_CLOCK/2) |
| 2682 | | MCFG_CPU_PROGRAM_MAP(namcos22s_am) |
| 2683 | | MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos22_state, namcos22s_interrupt) |
| 2945 | attotime freq = attotime::from_usec(base + range * (1.0 / (double)i)); |
| 2946 | m_pc_pedal_interrupt->adjust(min(freq, m_pc_pedal_interrupt->time_left()), 0, freq); |
| 2947 | } |
| 2948 | else |
| 2949 | { |
| 2950 | // not moving |
| 2951 | m_pc_pedal_interrupt->adjust(attotime::never, 0, attotime::never); |
| 2952 | } |
| 2953 | } |
| 2684 | 2954 | |
| 2685 | | MCFG_CPU_ADD("master", TMS32025,SS22_MASTER_CLOCK) |
| 2686 | | MCFG_CPU_PROGRAM_MAP(master_dsp_program) |
| 2687 | | MCFG_CPU_DATA_MAP(master_dsp_data) |
| 2688 | | MCFG_CPU_IO_MAP(master_dsp_io) |
| 2689 | | MCFG_TIMER_DRIVER_ADD_SCANLINE("master_st", namcos22_state, dsp_master_serial_irq, "screen", 0, 1) |
| 2690 | 2955 | |
| 2691 | | MCFG_CPU_ADD("slave", TMS32025,SS22_MASTER_CLOCK) |
| 2692 | | MCFG_CPU_PROGRAM_MAP(slave_dsp_program) |
| 2693 | | MCFG_CPU_DATA_MAP(slave_dsp_data) |
| 2694 | | MCFG_CPU_IO_MAP(slave_dsp_io) |
| 2695 | | MCFG_TIMER_DRIVER_ADD_SCANLINE("slave_st", namcos22_state, dsp_slave_serial_irq, "screen", 0, 1) |
| 2956 | // Armadillo Racing |
| 2696 | 2957 | |
| 2697 | | MCFG_CPU_ADD("mcu", M37710, SS22_MASTER_CLOCK/3) |
| 2698 | | MCFG_CPU_PROGRAM_MAP(mcu_program) |
| 2699 | | MCFG_CPU_IO_MAP( mcu_io) |
| 2700 | | MCFG_TIMER_DRIVER_ADD_SCANLINE("mcu_st", namcos22_state, mcu_irq, "screen", 0, 1) |
| 2701 | | |
| 2702 | | MCFG_QUANTUM_TIME(attotime::from_hz(6000)) |
| 2703 | | // MCFG_QUANTUM_PERFECT_CPU("maincpu") |
| 2704 | | // MCFG_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE) |
| 2705 | | |
| 2706 | | MCFG_NVRAM_HANDLER(namcos22) |
| 2707 | | |
| 2708 | | /* video hardware */ |
| 2709 | | MCFG_SCREEN_ADD("screen", RASTER) |
| 2710 | | MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) |
| 2711 | | MCFG_SCREEN_UPDATE_DRIVER(namcos22_state, screen_update_namcos22s) |
| 2712 | | |
| 2713 | | MCFG_PALETTE_LENGTH(NAMCOS22_PALETTE_SIZE) |
| 2714 | | MCFG_GFXDECODE(super) |
| 2715 | | MCFG_VIDEO_START_OVERRIDE(namcos22_state,namcos22s) |
| 2716 | | |
| 2717 | | /* sound hardware */ |
| 2718 | | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 2719 | | |
| 2720 | | MCFG_C352_ADD("c352", SS22_MASTER_CLOCK/2) |
| 2721 | | MCFG_SOUND_ROUTE(0, "rspeaker", 1.00) |
| 2722 | | MCFG_SOUND_ROUTE(1, "lspeaker", 1.00) |
| 2723 | | MCFG_SOUND_ROUTE(2, "rspeaker", 1.00) |
| 2724 | | MCFG_SOUND_ROUTE(3, "lspeaker", 1.00) |
| 2725 | | MACHINE_CONFIG_END |
| 2726 | | |
| 2727 | | |
| 2728 | | static MACHINE_CONFIG_DERIVED( timecris, namcos22s ) |
| 2729 | | |
| 2730 | | /* basic machine hardware */ |
| 2731 | | MCFG_CPU_MODIFY("maincpu") |
| 2732 | | MCFG_CPU_PROGRAM_MAP(timecris_am) |
| 2733 | | MACHINE_CONFIG_END |
| 2734 | | |
| 2735 | | |
| 2736 | 2958 | TIMER_CALLBACK_MEMBER(namcos22_state::adillor_trackball_interrupt) |
| 2737 | 2959 | { |
| 2738 | 2960 | generic_pulse_irq_line(m_mcu, param ? M37710_LINE_TIMERA2TICK : M37710_LINE_TIMERA3TICK, 1); |
| r24771 | r24772 | |
| 2797 | 3019 | } |
| 2798 | 3020 | } |
| 2799 | 3021 | |
| 2800 | | MACHINE_START_MEMBER(namcos22_state,adillor) |
| 2801 | | { |
| 2802 | | machine_start(); |
| 2803 | 3022 | |
| 2804 | | for (int axis = 0; axis < 2; axis++) |
| 2805 | | m_ar_tb_interrupt[axis] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(namcos22_state::adillor_trackball_interrupt),this)); |
| 2806 | | } |
| 2807 | 3023 | |
| 2808 | | static MACHINE_CONFIG_DERIVED( adillor, namcos22s ) |
| 3024 | /*********************************************************************************************/ |
| 2809 | 3025 | |
| 2810 | | /* basic machine hardware */ |
| 2811 | | MCFG_TIMER_DRIVER_ADD_PERIODIC("ar_tb_upd", namcos22_state, adillor_trackball_update, attotime::from_msec(20)) |
| 3026 | static INPUT_PORTS_START( ridgera ) |
| 3027 | PORT_START("INPUTS") |
| 3028 | /* 1 3 5 When the cabinet is set to Deluxe, the stick shift is basically |
| 3029 | |-|-| an 8-way joystick that locks into place. |
| 3030 | 2 4 6 Standard (default) setup uses a racing shifter like in Ace Driver. */ |
| 3031 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Shift Down") |
| 3032 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Shift Up") |
| 3033 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("Shift Left") // not used in Standard |
| 3034 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_NAME("Shift Right") // not used in Standard |
| 3035 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Clutch Pedal") // not used in Standard |
| 3036 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3037 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3038 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3039 | PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Cabinet ) ) |
| 3040 | PORT_DIPSETTING( 0x0000, DEF_STR( Standard ) ) |
| 3041 | PORT_DIPSETTING( 0x0100, "Deluxe" ) |
| 3042 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 3043 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) // also service mode? |
| 3044 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3045 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3046 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3047 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3048 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2812 | 3049 | |
| 2813 | | MCFG_MACHINE_START_OVERRIDE(namcos22_state,adillor) |
| 2814 | | MACHINE_CONFIG_END |
| 3050 | PORT_START("DSW0") |
| 3051 | PORT_SERVICE_DIPLOC( 0x0001, IP_ACTIVE_LOW, "SW2:1") |
| 3052 | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW2:2" ) |
| 3053 | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW2:3" ) |
| 3054 | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW2:4" ) |
| 3055 | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW2:5" ) |
| 3056 | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW2:6" ) |
| 3057 | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW2:7" ) |
| 3058 | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW2:8" ) |
| 3059 | PORT_DIPUNKNOWN_DIPLOC( 0x0100, 0x0100, "SW3:1" ) |
| 3060 | PORT_DIPUNKNOWN_DIPLOC( 0x0200, 0x0200, "SW3:2" ) |
| 3061 | PORT_DIPUNKNOWN_DIPLOC( 0x0400, 0x0400, "SW3:3" ) |
| 3062 | PORT_DIPUNKNOWN_DIPLOC( 0x0800, 0x0800, "SW3:4" ) |
| 3063 | PORT_DIPUNKNOWN_DIPLOC( 0x1000, 0x1000, "SW3:5" ) |
| 3064 | PORT_DIPUNKNOWN_DIPLOC( 0x2000, 0x2000, "SW3:6" ) |
| 3065 | PORT_DIPUNKNOWN_DIPLOC( 0x4000, 0x4000, "SW3:7" ) |
| 3066 | PORT_DIPUNKNOWN_DIPLOC( 0x8000, 0x8000, "SW3:8" ) |
| 2815 | 3067 | |
| 3068 | PORT_START("GAS") |
| 3069 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Gas Pedal") |
| 2816 | 3070 | |
| 2817 | | TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::propcycl_pedal_interrupt) |
| 3071 | PORT_START("BRAKE") |
| 3072 | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Brake Pedal") |
| 3073 | |
| 3074 | PORT_START("STEER") |
| 3075 | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Steering Wheel") |
| 3076 | INPUT_PORTS_END |
| 3077 | |
| 3078 | static INPUT_PORTS_START( ridgeracf ) |
| 3079 | PORT_INCLUDE( ridgera ) |
| 3080 | |
| 3081 | PORT_MODIFY("INPUTS") |
| 3082 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Ignition Key") |
| 3083 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("AT Switch") |
| 3084 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("MT Switch") |
| 3085 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE2 ) |
| 3086 | PORT_SERVICE( 0x0400, IP_ACTIVE_LOW ) |
| 3087 | |
| 3088 | // DIP3-1 to DIP3-3 are for setting up the viewing angle (game used one board per screen?) |
| 3089 | // Some of the other dipswitches are for debugging, like with Ridge Racer 2. |
| 3090 | PORT_MODIFY("DSW0") |
| 3091 | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0000, "SW2:1" ) // always on? |
| 3092 | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0000, "SW2:2" ) // always on? |
| 3093 | PORT_DIPNAME( 0x8000, 0x8000, "Test Mode" ) PORT_DIPLOCATION("SW3:8") |
| 3094 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 3095 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 3096 | INPUT_PORTS_END |
| 3097 | |
| 3098 | static INPUT_PORTS_START( ridgera2 ) |
| 3099 | PORT_INCLUDE( ridgera ) |
| 3100 | |
| 3101 | PORT_MODIFY("INPUTS") |
| 3102 | PORT_DIPNAME( 0x2100, 0x2000, DEF_STR( Cabinet ) ) |
| 3103 | PORT_DIPSETTING( 0x0000, "50 Inch" ) |
| 3104 | PORT_DIPSETTING( 0x0100, "Twin" ) |
| 3105 | PORT_DIPSETTING( 0x2000, DEF_STR( Standard ) ) |
| 3106 | PORT_DIPSETTING( 0x2100, "Deluxe" ) |
| 3107 | |
| 3108 | /* Some dipswitches seem to be for debug purposes, for example: |
| 3109 | 2-4 : background drawing related |
| 3110 | 2-5 : background drawing related |
| 3111 | 2-6 : debug link-up |
| 3112 | 2-8 : no game over when time runs out (cheat) |
| 3113 | 3-7 : debug polygons |
| 3114 | */ |
| 3115 | PORT_MODIFY("DSW0") |
| 3116 | PORT_DIPNAME( 0x8000, 0x8000, "Test Mode" ) PORT_DIPLOCATION("SW3:8") |
| 3117 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 3118 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 3119 | INPUT_PORTS_END |
| 3120 | |
| 3121 | static INPUT_PORTS_START( raveracw ) |
| 3122 | PORT_INCLUDE( ridgera ) |
| 3123 | |
| 3124 | PORT_MODIFY("INPUTS") |
| 3125 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("View Change") |
| 3126 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no coin2 |
| 3127 | |
| 3128 | PORT_DIPNAME( 0x2100, 0x2000, DEF_STR( Cabinet ) ) |
| 3129 | PORT_DIPSETTING( 0x0000, "50 Inch" ) |
| 3130 | PORT_DIPSETTING( 0x0100, "Twin" ) |
| 3131 | PORT_DIPSETTING( 0x2000, DEF_STR( Standard ) ) |
| 3132 | PORT_DIPSETTING( 0x2100, "Deluxe" ) |
| 3133 | INPUT_PORTS_END |
| 3134 | |
| 3135 | |
| 3136 | static INPUT_PORTS_START( cybrcomm ) |
| 3137 | PORT_START("INPUTS") |
| 3138 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Gun Trigger") // placed on both sticks |
| 3139 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Missile Button") // placed on both sticks |
| 3140 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3141 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3142 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3143 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3144 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("View Change") |
| 3145 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3146 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3147 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 3148 | PORT_SERVICE( 0x0400, IP_ACTIVE_LOW ) |
| 3149 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3150 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3151 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3152 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3153 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3154 | |
| 3155 | /* Note(s) |
| 3156 | The ranges here are based on the test mode which displays +-224 |
| 3157 | The nvram is calibrated using these settings. If the SUBCPU handling changes then these might |
| 3158 | end up needing to change again too |
| 3159 | Default key arrangement is based on dual-joystick 'Tank' arrangement found in Assault and CyberSled |
| 3160 | */ |
| 3161 | PORT_START("STICKY1") /* VOLUME 0 */ |
| 3162 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_MINMAX(0x47,0xb7) /* range based on test mode */ PORT_CODE_DEC(KEYCODE_I) PORT_CODE_INC(KEYCODE_K) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) /* right joystick: vertical */ |
| 3163 | PORT_START("STICKY2") /* VOLUME 0 */ |
| 3164 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_MINMAX(0x47,0xb7) /* range based on test mode */ PORT_CODE_DEC(KEYCODE_E) PORT_CODE_INC(KEYCODE_D) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) /* left joystick: vertical */ |
| 3165 | PORT_START("STICKX1") /* VOLUME 0 */ |
| 3166 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_MINMAX(0x47,0xb7) /* range based on test mode */ PORT_CODE_DEC(KEYCODE_J) PORT_CODE_INC(KEYCODE_L) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) /* right joystick: horizontal */ |
| 3167 | PORT_START("STICKX2") /* VOLUME 0 */ |
| 3168 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_MINMAX(0x47,0xb7) /* range based on test mode */ PORT_CODE_DEC(KEYCODE_S) PORT_CODE_INC(KEYCODE_F) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) /* left joystick: horizontal */ |
| 3169 | |
| 3170 | PORT_START("DSW0") |
| 3171 | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0001, "SW2:1" ) |
| 3172 | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW2:2" ) |
| 3173 | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW2:3" ) |
| 3174 | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW2:4" ) |
| 3175 | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW2:5" ) |
| 3176 | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW2:6" ) |
| 3177 | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW2:7" ) |
| 3178 | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW2:8" ) |
| 3179 | PORT_DIPUNKNOWN_DIPLOC( 0x0100, 0x0100, "SW3:1" ) |
| 3180 | PORT_DIPUNKNOWN_DIPLOC( 0x0200, 0x0200, "SW3:2" ) |
| 3181 | PORT_DIPUNKNOWN_DIPLOC( 0x0400, 0x0400, "SW3:3" ) |
| 3182 | PORT_DIPUNKNOWN_DIPLOC( 0x0800, 0x0800, "SW3:4" ) |
| 3183 | PORT_DIPUNKNOWN_DIPLOC( 0x1000, 0x1000, "SW3:5" ) |
| 3184 | PORT_DIPUNKNOWN_DIPLOC( 0x2000, 0x2000, "SW3:6" ) |
| 3185 | PORT_DIPUNKNOWN_DIPLOC( 0x4000, 0x4000, "SW3:7" ) |
| 3186 | PORT_DIPUNKNOWN_DIPLOC( 0x8000, 0x8000, "SW3:8" ) |
| 3187 | INPUT_PORTS_END |
| 3188 | |
| 3189 | static INPUT_PORTS_START( acedrvr ) |
| 3190 | PORT_START("INPUTS") |
| 3191 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Shift Down") |
| 3192 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Shift Up") |
| 3193 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3194 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3195 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3196 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3197 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("View Change") |
| 3198 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3199 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3200 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 3201 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3202 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3203 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3204 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3205 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3206 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Motion-Stop") |
| 3207 | |
| 3208 | PORT_START("P1") |
| 3209 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("Dev Service Enter") |
| 3210 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_NAME("Dev Service Up") |
| 3211 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_NAME("Dev Service Down") |
| 3212 | PORT_BIT( 0xff3e, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3213 | |
| 3214 | PORT_START("DSW0") |
| 3215 | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0001, "SW2:1" ) |
| 3216 | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW2:2" ) |
| 3217 | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW2:3" ) |
| 3218 | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW2:4" ) |
| 3219 | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW2:5" ) |
| 3220 | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW2:6" ) |
| 3221 | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW2:7" ) |
| 3222 | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW2:8" ) |
| 3223 | PORT_DIPUNKNOWN_DIPLOC( 0x0100, 0x0100, "SW3:1" ) |
| 3224 | PORT_DIPUNKNOWN_DIPLOC( 0x0200, 0x0200, "SW3:2" ) |
| 3225 | PORT_DIPUNKNOWN_DIPLOC( 0x0400, 0x0400, "SW3:3" ) |
| 3226 | PORT_DIPUNKNOWN_DIPLOC( 0x0800, 0x0800, "SW3:4" ) |
| 3227 | PORT_DIPUNKNOWN_DIPLOC( 0x1000, 0x1000, "SW3:5" ) |
| 3228 | PORT_DIPUNKNOWN_DIPLOC( 0x2000, 0x2000, "SW3:6" ) |
| 3229 | PORT_DIPNAME( 0x4000, 0x4000, "Test Mode?" ) PORT_DIPLOCATION("SW3:7") |
| 3230 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) |
| 3231 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 3232 | PORT_DIPNAME( 0x8000, 0x8000, "Test Mode?" ) PORT_DIPLOCATION("SW3:8") |
| 3233 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 3234 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 3235 | |
| 3236 | PORT_START("GAS") |
| 3237 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Gas Pedal") |
| 3238 | |
| 3239 | PORT_START("BRAKE") |
| 3240 | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Brake Pedal") |
| 3241 | |
| 3242 | PORT_START("STEER") |
| 3243 | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Steering Wheel") |
| 3244 | INPUT_PORTS_END |
| 3245 | |
| 3246 | static INPUT_PORTS_START( victlap ) |
| 3247 | PORT_INCLUDE( acedrvr ) |
| 3248 | |
| 3249 | PORT_MODIFY("P1") |
| 3250 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_NAME("Dev Service Up") |
| 3251 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_NAME("Dev Service Down") |
| 3252 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("Dev Service Enter") |
| 3253 | PORT_BIT( 0xfe3f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3254 | INPUT_PORTS_END |
| 3255 | |
| 3256 | /*********************************************************************************************/ |
| 3257 | |
| 3258 | CUSTOM_INPUT_MEMBER(namcos22_state::alpine_motor_read) |
| 2818 | 3259 | { |
| 2819 | | generic_pulse_irq_line(m_mcu, M37710_LINE_TIMERA3TICK, 1); |
| 3260 | return m_motor_status >> (FPTR)param & 1; |
| 2820 | 3261 | } |
| 2821 | 3262 | |
| 2822 | | TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::propcycl_pedal_update) |
| 2823 | | { |
| 2824 | | // arbitrary timer for reading optical pedal |
| 2825 | | UINT8 i = ioport("PEDAL")->read(); |
| 3263 | static INPUT_PORTS_START( alpiner ) |
| 3264 | PORT_START("DSW0") |
| 3265 | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0001, "SW4:1" ) |
| 3266 | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 3267 | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 3268 | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 3269 | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 3270 | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 3271 | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 3272 | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 3273 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2826 | 3274 | |
| 2827 | | if (i != 0) |
| 2828 | | { |
| 2829 | | // the pedal has a simple 1-bit "light interrupted" sensor. the faster you pedal, |
| 2830 | | // the faster it pulses. this is connected to the clock input for timer A3, |
| 2831 | | // and timer A3 is configured by the MCU program to cause an interrupt each time |
| 2832 | | // it's clocked. by counting the number of interrupts in a frame, we can determine |
| 2833 | | // how fast the user is pedaling. |
| 3275 | PORT_START("MCUP5A") |
| 3276 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3277 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3278 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3279 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 3280 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START ) // Decision / View Change |
| 3281 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY // L Selection |
| 3282 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_16WAY // R Selection |
| 3283 | PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22_state,alpine_motor_read, (void *)0) // steps are free |
| 2834 | 3284 | |
| 2835 | | // these values(in usec) may need tweaking: |
| 2836 | | const int base = 1000; |
| 2837 | | const int range = 10000; |
| 3285 | PORT_START("MCUP5B") |
| 3286 | PORT_BIT( 0x01, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22_state,alpine_motor_read, (void *)1) // steps are locked |
| 3287 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2838 | 3288 | |
| 2839 | | attotime freq = attotime::from_usec(base + range * (1.0 / (double)i)); |
| 2840 | | m_pc_pedal_interrupt->adjust(min(freq, m_pc_pedal_interrupt->time_left()), 0, freq); |
| 3289 | PORT_START("ADC0") |
| 3290 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_NAME("Steps Swing") |
| 2841 | 3291 | |
| 2842 | | } |
| 2843 | | else |
| 2844 | | { |
| 2845 | | // not moving |
| 2846 | | m_pc_pedal_interrupt->adjust(attotime::never, 0, attotime::never); |
| 2847 | | } |
| 2848 | | } |
| 3292 | PORT_START("ADC1") |
| 3293 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_NAME("Steps Edge") |
| 3294 | INPUT_PORTS_END |
| 2849 | 3295 | |
| 2850 | | static MACHINE_CONFIG_DERIVED( propcycl, namcos22s ) |
| 3296 | static INPUT_PORTS_START( airco22 ) |
| 3297 | PORT_START("DSW0") |
| 3298 | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0001, "SW4:1" ) |
| 3299 | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 3300 | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 3301 | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 3302 | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 3303 | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 3304 | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 3305 | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 3306 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2851 | 3307 | |
| 2852 | | /* basic machine hardware */ |
| 2853 | | MCFG_TIMER_DRIVER_ADD_PERIODIC("pc_p_upd", namcos22_state, propcycl_pedal_update, attotime::from_msec(20)) |
| 2854 | | MCFG_TIMER_DRIVER_ADD("pc_p_int", namcos22_state, propcycl_pedal_interrupt) |
| 2855 | | MACHINE_CONFIG_END |
| 3308 | PORT_START("MCUP5A") |
| 3309 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3310 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3311 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3312 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 3313 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* Missile */ |
| 3314 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* Gun */ |
| 3315 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START ) |
| 3316 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2856 | 3317 | |
| 2857 | | /*********************************************************************************/ |
| 3318 | PORT_START("MCUP5B") |
| 3319 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2858 | 3320 | |
| 2859 | | /* Namco System 22 */ |
| 3321 | PORT_START("ADC0") |
| 3322 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) |
| 2860 | 3323 | |
| 2861 | | static ADDRESS_MAP_START( namcos22_am, AS_PROGRAM, 32, namcos22_state ) |
| 2862 | | /** |
| 2863 | | * Program ROM (2M bytes) |
| 2864 | | * Mounted position: LLB: CPU 4D, LMB: CPU 2D, UMB: CPU 8D, UUB: CPU 6D |
| 2865 | | * Known ROM chip type: TI TMS27C040-10, ST M27C4001-10, M27C4001-12Z |
| 2866 | | */ |
| 2867 | | AM_RANGE(0x00000000, 0x001fffff) AM_ROM |
| 3324 | PORT_START("ADC1") |
| 3325 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) |
| 2868 | 3326 | |
| 2869 | | /** |
| 2870 | | * Main RAM (128K bytes) |
| 2871 | | * Mounted position: CPU 3D, 5D, 7D, 9D |
| 2872 | | * Known DRAM chip type: TC55328P-25, N3441256P-15 |
| 2873 | | */ |
| 2874 | | AM_RANGE(0x10000000, 0x1001ffff) AM_RAM AM_MIRROR(0x08000000) |
| 3327 | PORT_START("ADC2") |
| 3328 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) |
| 3329 | INPUT_PORTS_END |
| 2875 | 3330 | |
| 2876 | | /** |
| 2877 | | * KEYCUS |
| 2878 | | * Mounted position: CPU 13R |
| 2879 | | * Known chip type: |
| 2880 | | * C370 (Ridge Racer, Ridge Racer 2) |
| 2881 | | * C388 (Rave Racer) |
| 2882 | | * C389? (Cyber Cycles) |
| 2883 | | * C392? (Ace Driver Victory Lap) |
| 2884 | | */ |
| 2885 | | AM_RANGE(0x20000000, 0x2000000f) AM_READWRITE(namcos22_keycus_r, namcos22_keycus_w) |
| 3331 | static INPUT_PORTS_START( cybrcycc ) |
| 3332 | PORT_START("DSW0") |
| 3333 | PORT_DIPNAME( 0x0001, 0x0001, "Test Mode?" ) PORT_DIPLOCATION("SW4:1") |
| 3334 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 3335 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 3336 | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 3337 | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 3338 | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 3339 | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 3340 | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 3341 | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 3342 | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 3343 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2886 | 3344 | |
| 2887 | | /** |
| 2888 | | * C139 SCI Buffer |
| 2889 | | * Mounted position: CPU 4N |
| 2890 | | * Known chip type: M5M5179AP-25 (8k x 9bit SRAM) |
| 2891 | | * |
| 2892 | | * Note: Boot time check: 20010000 - 20011fff / bits=0x000001ff |
| 2893 | | * |
| 2894 | | * 20010000 - 20011fff TX Buffer |
| 2895 | | * 20012000 - 20013fff RX FIFO Buffer (also used for TX Buffer) |
| 2896 | | */ |
| 2897 | | AM_RANGE(0x20010000, 0x20013fff) AM_RAM |
| 3345 | PORT_START("MCUP5A") |
| 3346 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3347 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3348 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3349 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 3350 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START ) // also view-change function |
| 3351 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3352 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3353 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2898 | 3354 | |
| 2899 | | /** |
| 2900 | | * C139 SCI Register |
| 2901 | | * Mounted position: CPU 4R |
| 2902 | | * |
| 2903 | | * 20020000 2 R/W RX Status |
| 2904 | | * 0x01 : Frame Error |
| 2905 | | * 0x02 : Frame Received |
| 2906 | | * 0x04 : ? |
| 2907 | | * |
| 2908 | | * 20020002 2 R/W Status/Control Flags |
| 2909 | | * 0x01 : |
| 2910 | | * 0x02 : RX flag? (cleared every vsync) |
| 2911 | | * 0x04 : RX flag? (cleared every vsync) |
| 2912 | | * 0x08 : |
| 2913 | | * |
| 2914 | | * 20020004 2 W FIFO Control Register |
| 2915 | | * 0x01 : sync bit enable? |
| 2916 | | * 0x02 : TX FIFO sync bit (bit-8) |
| 2917 | | * |
| 2918 | | * 20020006 2 W TX Control Register |
| 2919 | | * 0x01 : TX start/stop |
| 2920 | | * 0x02 : ? |
| 2921 | | * 0x10 : ? |
| 2922 | | * |
| 2923 | | * 20020008 2 W - |
| 2924 | | * 2002000a 2 W TX Frame Size |
| 2925 | | * 2002000c 2 R/W RX FIFO Pointer (0x0000 - 0x0fff) |
| 2926 | | * 2002000e 2 W TX FIFO Pointer (0x0000 - 0x1fff) |
| 2927 | | */ |
| 2928 | | AM_RANGE(0x20020000, 0x2002000f) AM_READ(namcos22_C139_SCI_r) AM_WRITEONLY |
| 3355 | PORT_START("MCUP5B") |
| 3356 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2929 | 3357 | |
| 2930 | | /** |
| 2931 | | * System Controller: Interrupt Control, Peripheral Control |
| 2932 | | * |
| 2933 | | */ |
| 2934 | | AM_RANGE(0x40000000, 0x4000001f) AM_READWRITE(namcos22_system_controller_r, namcos22_system_controller_w) AM_SHARE("syscontrol") |
| 3358 | PORT_START("ADC0") |
| 3359 | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Steering Wheel") |
| 2935 | 3360 | |
| 2936 | | /** |
| 2937 | | * Unknown Device (optional for diagnostics?) |
| 2938 | | * |
| 2939 | | * zero means not-connected. |
| 2940 | | * may be related to device at 0x94000000 |
| 2941 | | */ |
| 2942 | | AM_RANGE(0x48000000, 0x4800003f) AM_READNOP AM_WRITENOP |
| 3361 | PORT_START("ADC1") |
| 3362 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Gas Pedal") |
| 2943 | 3363 | |
| 2944 | | /** |
| 2945 | | * DIPSW |
| 2946 | | * 0x50000000 - DIPSW3 |
| 2947 | | * 0x50000001 - DIPSW2 |
| 2948 | | */ |
| 2949 | | AM_RANGE(0x50000000, 0x50000003) AM_READWRITE16(namcos22_dipswitch_r, namcos22_cpuleds_w, 0xffffffff) |
| 2950 | | AM_RANGE(0x50000008, 0x5000000b) AM_READWRITE16(namcos22_portbit_r, namcos22_portbit_w, 0xffffffff) |
| 3364 | PORT_START("ADC2") |
| 3365 | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Brake Pedal") |
| 3366 | INPUT_PORTS_END |
| 2951 | 3367 | |
| 2952 | | /** |
| 2953 | | * EEPROM |
| 2954 | | * Mounted position: CPU 9E |
| 2955 | | * Known chip type: HN58C65P-25 (8k x 8bit EEPROM) |
| 2956 | | */ |
| 2957 | | AM_RANGE(0x58000000, 0x58001fff) AM_RAM AM_SHARE("nvmem") |
| 3368 | static INPUT_PORTS_START( dirtdash ) |
| 3369 | PORT_START("DSW0") |
| 3370 | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0001, "SW4:1" ) |
| 3371 | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 3372 | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 3373 | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 3374 | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 3375 | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 3376 | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 3377 | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 3378 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2958 | 3379 | |
| 2959 | | /** |
| 2960 | | * C74 (Mitsubishi M37702 MCU) Shared RAM (0x60004000 - 0x6000bfff) |
| 2961 | | * Mounted position: CPU 11L, 12L |
| 2962 | | * Known chip type: TC55328P-25, N341256P-15 |
| 2963 | | * |
| 2964 | | * DATA ROM for C74 (SEQ data and external code): |
| 2965 | | * Known chip type: NEC D27C4096D-12 |
| 2966 | | * Notes: C74(CPU PCB) sends/receives I/O data from C74(I/O PCB) by SIO. |
| 2967 | | * |
| 2968 | | * 0x60004020 b4 = 1 : ??? |
| 2969 | | * 0x60004022.w Volume(R) |
| 2970 | | * 0x60004024.w Volume(L) |
| 2971 | | * 0x60004026.w Volume(R) (maybe rear channels, not put on real PCB) |
| 2972 | | * 0x60004028.w Volume(L) (maybe rear channels, not put on real PCB) |
| 2973 | | * 0x60004030 b0 : system type 0 |
| 2974 | | * 0x60004030 b1 = 0 : COIN2 |
| 2975 | | * 0x60004030 b2 = 0 : TEST SW |
| 2976 | | * 0x60004030 b3 = 0 : SERVICE SW |
| 2977 | | * 0x60004030 b4 = 0 : COIN1 |
| 2978 | | * 0x60004030 b5 : system type 1 |
| 2979 | | * (system type on RR2 (00:50inch, 01:two in one, 20:standard, 21:deluxe)) |
| 2980 | | * 0x60004031 b0 = 0 : SWITCH1 (for manual transmission) |
| 2981 | | * 0x60004031 b1 = 0 : SWITCH2 |
| 2982 | | * 0x60004031 b2 = 0 : SWITCH3 |
| 2983 | | * 0x60004031 b3 = 0 : SWITCH4 |
| 2984 | | * 0x60004031 b4 = 0 : CLUTCH |
| 2985 | | * 0x60004031 b6 = 0 : VIEW SW |
| 2986 | | * 0x60004032.w Handle A/D (=steering wheel, default of center value is different in each game) |
| 2987 | | * 0x60004034.w Gas A/D |
| 2988 | | * 0x60004036.w Brake A/D |
| 2989 | | * 0x60004038.w A/D3 (reserved) |
| 2990 | | * (some GOUT (general outputs for lamps, etc) is also mapped this area) |
| 2991 | | * 0x60004080 Data/Code for Sub-CPU |
| 2992 | | * 0x60004200 Data/Code for Sub-CPU |
| 2993 | | * 0x60005000 - 0x6000bfff Sound Work |
| 2994 | | * +0x0000 - 0x003f Song Request #00 to 31 |
| 2995 | | * +0x0100 - 0x02ff Parameter RAM from Main MPU (for SEs) |
| 2996 | | * +0x0300 - 0x03ff? Song Title (put messages here from Sound CPU) |
| 2997 | | */ |
| 2998 | | AM_RANGE(0x60000000, 0x60003fff) AM_WRITENOP |
| 2999 | | AM_RANGE(0x60004000, 0x6000bfff) AM_READWRITE(namcos22_mcuram_r, namcos22_mcuram_w) AM_SHARE("shareram") |
| 3380 | PORT_START("MCUP5A") |
| 3381 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3382 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3383 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3384 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 3385 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("View Change") |
| 3386 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Shift Up") |
| 3387 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Shift Down") |
| 3388 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Motion-Stop") |
| 3000 | 3389 | |
| 3001 | | /** |
| 3002 | | * C71 (TI TMS320C25 DSP) Shared RAM (0x70000000 - 0x70020000) |
| 3003 | | * Mounted position: |
| 3004 | | * C71: CPU 15R, 21R |
| 3005 | | * RAM: CPU 15K, 13E, 12E |
| 3006 | | * Known chip type: TC55328P-25, N341256P-15 |
| 3007 | | * Notes: connected bits = 0x00ffffff (24bit) |
| 3008 | | */ |
| 3009 | | AM_RANGE(0x70000000, 0x7001ffff) AM_READWRITE(namcos22_dspram_r, namcos22_dspram_w) AM_SHARE("polygonram") |
| 3390 | PORT_START("MCUP5B") |
| 3391 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3010 | 3392 | |
| 3011 | | /** |
| 3012 | | * LED on PCB(?) |
| 3013 | | */ |
| 3014 | | AM_RANGE(0x90000000, 0x90000003) AM_RAM |
| 3393 | PORT_START("ADC0") |
| 3394 | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(3) PORT_NAME("Steering Wheel") |
| 3015 | 3395 | |
| 3016 | | /** |
| 3017 | | * Depth-cueing Look-up Table (fog density between near to far) |
| 3018 | | * Mounted position: VIDEO 8P |
| 3019 | | * Known chip type: TC55328P-25 |
| 3020 | | */ |
| 3021 | | AM_RANGE(0x90010000, 0x90017fff) AM_RAM AM_SHARE("czram") |
| 3396 | PORT_START("ADC1") |
| 3397 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Gas Pedal") |
| 3022 | 3398 | |
| 3023 | | /** |
| 3024 | | * C305 (Display Controller) |
| 3025 | | * Mounted position: VIDEO 7D (C305) |
| 3026 | | * Notes: Boot time check: 0x90020100 - 0x9002027f |
| 3027 | | */ |
| 3028 | | AM_RANGE(0x90020000, 0x90027fff) AM_READWRITE(namcos22_gamma_r, namcos22_gamma_w) AM_SHARE("gamma") |
| 3399 | PORT_START("ADC2") |
| 3400 | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Brake Pedal") |
| 3401 | INPUT_PORTS_END |
| 3029 | 3402 | |
| 3030 | | /** |
| 3031 | | * Mounted position: VIDEO 6B, 7B, 8B (near C305) |
| 3032 | | * Note: 0xff00-0xffff are for Tilemap (16 x 16) |
| 3033 | | */ |
| 3034 | | AM_RANGE(0x90028000, 0x9003ffff) AM_READWRITE(namcos22_paletteram_r, namcos22_paletteram_w) AM_SHARE("paletteram") |
| 3403 | static INPUT_PORTS_START( tokyowar ) |
| 3404 | PORT_START("DSW0") |
| 3405 | PORT_DIPNAME( 0x0001, 0x0001, "Test Mode?" ) PORT_DIPLOCATION("SW4:1") |
| 3406 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 3407 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 3408 | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 3409 | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 3410 | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 3411 | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 3412 | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 3413 | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 3414 | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 3415 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3035 | 3416 | |
| 3036 | | /** |
| 3037 | | * unknown (option) |
| 3038 | | * Note: This device may be optional. This may relate to device at 0x40000000 |
| 3039 | | */ |
| 3040 | | AM_RANGE(0x90040000, 0x9007ffff) AM_RAM /* diagnostic ROM? */ |
| 3417 | PORT_START("MCUP5A") |
| 3418 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3419 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3420 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3421 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 3422 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) // also view-change function |
| 3423 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Right Trigger") |
| 3424 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Left Trigger") |
| 3425 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3041 | 3426 | |
| 3042 | | /** |
| 3043 | | * Tilemap PCG Memory |
| 3044 | | */ |
| 3045 | | AM_RANGE(0x90080000, 0x9009dfff) AM_READWRITE(namcos22_cgram_r, namcos22_cgram_w) AM_SHARE("cgram") |
| 3427 | PORT_START("MCUP5B") |
| 3428 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3046 | 3429 | |
| 3047 | | /** |
| 3048 | | * Tilemap Memory (64 x 64) |
| 3049 | | * Mounted position: VIDEO 2K |
| 3050 | | * Known chip type: HM511664 (64k x 16bit SRAM) |
| 3051 | | * Note: Self test: 90084000 - 9009ffff |
| 3052 | | */ |
| 3053 | | AM_RANGE(0x9009e000, 0x9009ffff) AM_READWRITE(namcos22_textram_r, namcos22_textram_w) AM_SHARE("textram") |
| 3430 | PORT_START("ADC0") |
| 3431 | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Steering Wheel") |
| 3054 | 3432 | |
| 3055 | | /** |
| 3056 | | * Tilemap Register |
| 3057 | | * Mounted position: unknown |
| 3058 | | */ |
| 3059 | | AM_RANGE(0x900a0000, 0x900a000f) AM_READWRITE(namcos22_tilemapattr_r, namcos22_tilemapattr_w) AM_SHARE("tilemapattr") |
| 3060 | | ADDRESS_MAP_END |
| 3433 | PORT_START("ADC2") |
| 3434 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Gas Pedal") |
| 3061 | 3435 | |
| 3436 | PORT_START("ADC3") |
| 3437 | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Brake Pedal") |
| 3438 | INPUT_PORTS_END |
| 3062 | 3439 | |
| 3440 | static INPUT_PORTS_START( aquajet ) |
| 3441 | PORT_START("DSW0") |
| 3442 | PORT_DIPNAME( 0x0001, 0x0001, "Test Mode?" ) PORT_DIPLOCATION("SW4:1") |
| 3443 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 3444 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 3445 | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 3446 | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 3447 | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 3448 | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 3449 | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 3450 | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 3451 | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 3452 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3453 | |
| 3454 | PORT_START("MCUP5A") |
| 3455 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3456 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3457 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3458 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 3459 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 3460 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3461 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3462 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3463 | |
| 3464 | PORT_START("MCUP5B") |
| 3465 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3466 | |
| 3467 | PORT_START("ADC0") |
| 3468 | PORT_BIT( 0xff, 0x7f, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE |
| 3469 | |
| 3470 | PORT_START("ADC1") |
| 3471 | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0x80) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE |
| 3472 | |
| 3473 | PORT_START("ADC2") |
| 3474 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE |
| 3475 | INPUT_PORTS_END |
| 3476 | |
| 3477 | static INPUT_PORTS_START( adillor ) |
| 3478 | PORT_START("DSW0") |
| 3479 | PORT_DIPNAME( 0x0001, 0x0001, "Test Mode?" ) PORT_DIPLOCATION("SW4:1") |
| 3480 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 3481 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 3482 | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 3483 | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 3484 | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 3485 | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 3486 | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 3487 | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 3488 | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 3489 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3490 | |
| 3491 | PORT_START("P1") |
| 3492 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("Dev Service Enter") |
| 3493 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("Dev Service Exit") |
| 3494 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_NAME("Dev Service Left") |
| 3495 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_NAME("Dev Service Right") // when in normal testmode, press this to enter the extra testmode |
| 3496 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_NAME("Dev Service Up") |
| 3497 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_NAME("Dev Service Down") |
| 3498 | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3499 | |
| 3500 | PORT_START("MCUP5A") |
| 3501 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3502 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3503 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3504 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 3505 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3506 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3507 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3508 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3509 | |
| 3510 | PORT_START("MCUP5B") |
| 3511 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 3512 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3513 | |
| 3514 | PORT_START("TRACKX") |
| 3515 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x01, 0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_NAME("Trackball X") |
| 3516 | |
| 3517 | PORT_START("TRACKY") |
| 3518 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x01, 0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_NAME("Trackball Y") |
| 3519 | INPUT_PORTS_END |
| 3520 | |
| 3521 | static INPUT_PORTS_START( propcycl ) |
| 3522 | PORT_START("DSW0") |
| 3523 | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0001, "SW4:1" ) |
| 3524 | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 3525 | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 3526 | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 3527 | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 3528 | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 3529 | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 3530 | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 3531 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3532 | |
| 3533 | PORT_START("MCUP5A") |
| 3534 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3535 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3536 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3537 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 3538 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3539 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3540 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3541 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3542 | |
| 3543 | PORT_START("MCUP5B") |
| 3544 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 3545 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3546 | |
| 3547 | PORT_START("ADC0") |
| 3548 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_MINMAX(0x00, 0xfe) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE |
| 3549 | |
| 3550 | PORT_START("ADC1") |
| 3551 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_MINMAX(0x00, 0xfe) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) |
| 3552 | |
| 3553 | PORT_START("PEDAL") |
| 3554 | PORT_BIT( 0x7f, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) |
| 3555 | INPUT_PORTS_END |
| 3556 | |
| 3557 | static INPUT_PORTS_START( timecris ) |
| 3558 | PORT_START("DSW0") |
| 3559 | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0001, "SW4:1" ) |
| 3560 | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 3561 | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 3562 | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 3563 | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 3564 | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 3565 | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 3566 | PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW4:8") |
| 3567 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3568 | |
| 3569 | PORT_START("MCUP5A") |
| 3570 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3571 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3572 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3573 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 3574 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Gun Trigger") |
| 3575 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Foot Pedal") |
| 3576 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3577 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3578 | |
| 3579 | PORT_START("MCUP5B") |
| 3580 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3581 | |
| 3582 | PORT_START( "LIGHTX" ) // tuned for CRT |
| 3583 | PORT_BIT( 0xfff, 68+626/2, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(68, 68+626) PORT_SENSITIVITY(48) PORT_KEYDELTA(10) |
| 3584 | |
| 3585 | PORT_START( "LIGHTY" ) // tuned for CRT - can't shoot below the statusbar? |
| 3586 | PORT_BIT( 0xfff, 43+241/2, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(43, 43+241) PORT_SENSITIVITY(64) PORT_KEYDELTA(4) |
| 3587 | INPUT_PORTS_END |
| 3588 | |
| 3589 | |
| 3590 | |
| 3591 | /*********************************************************************************************/ |
| 3592 | |
| 3593 | /* Super System22 supports a sprite layer. |
| 3594 | * Sprites are rendered as part of the polygon draw list, based on a per-sprite Z attribute. |
| 3595 | * Each sprite has explicit placement/color/zoom controls. |
| 3596 | */ |
| 3597 | static const gfx_layout sprite_layout = |
| 3598 | { |
| 3599 | 32,32, |
| 3600 | RGN_FRAC(1,1), |
| 3601 | 8, |
| 3602 | { 0,1,2,3,4,5,6,7 }, |
| 3603 | { |
| 3604 | 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8, |
| 3605 | 8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8, |
| 3606 | 16*8,17*8,18*8,19*8,20*8,21*8,22*8,23*8, |
| 3607 | 24*8,25*8,26*8,27*8,28*8,29*8,30*8,31*8 |
| 3608 | }, |
| 3609 | { |
| 3610 | 0*32*8,1*32*8,2*32*8,3*32*8,4*32*8,5*32*8,6*32*8,7*32*8, |
| 3611 | 8*32*8,9*32*8,10*32*8,11*32*8,12*32*8,13*32*8,14*32*8,15*32*8, |
| 3612 | 16*32*8,17*32*8,18*32*8,19*32*8,20*32*8,21*32*8,22*32*8,23*32*8, |
| 3613 | 24*32*8,25*32*8,26*32*8,27*32*8,28*32*8,29*32*8,30*32*8,31*32*8 |
| 3614 | }, |
| 3615 | 32*32*8 |
| 3616 | }; |
| 3617 | |
| 3618 | static const gfx_layout texture_tile_layout = |
| 3619 | { |
| 3620 | 16,16, |
| 3621 | RGN_FRAC(1,1), |
| 3622 | 8, |
| 3623 | { 0,1,2,3,4,5,6,7 }, |
| 3624 | { |
| 3625 | 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8,8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8 |
| 3626 | }, |
| 3627 | { |
| 3628 | 0*16*8,1*16*8,2*16*8,3*16*8,4*16*8,5*16*8,6*16*8,7*16*8, |
| 3629 | 8*16*8,9*16*8,10*16*8,11*16*8,12*16*8,13*16*8,14*16*8,15*16*8 |
| 3630 | }, |
| 3631 | 16*16*8 |
| 3632 | }; |
| 3633 | |
| 3634 | /* text layer uses a set of 16x16x8bpp tiles defined in RAM */ |
| 3635 | #define XOR(a) WORD2_XOR_BE(a) |
| 3636 | static const gfx_layout namcos22_cg_layout = |
| 3637 | { |
| 3638 | 16,16, |
| 3639 | 0x400, /* 0x3c0 */ |
| 3640 | 4, |
| 3641 | { 0,1,2,3 }, |
| 3642 | { XOR(0)*4, XOR(1)*4, XOR(2)*4, XOR(3)*4, XOR(4)*4, XOR(5)*4, XOR(6)*4, XOR(7)*4, |
| 3643 | XOR(8)*4, XOR(9)*4, XOR(10)*4, XOR(11)*4, XOR(12)*4, XOR(13)*4, XOR(14)*4, XOR(15)*4 }, |
| 3644 | { 64*0,64*1,64*2,64*3,64*4,64*5,64*6,64*7,64*8,64*9,64*10,64*11,64*12,64*13,64*14,64*15 }, |
| 3645 | 64*16 |
| 3646 | }; |
| 3647 | |
| 3648 | #undef XOR |
| 3649 | |
| 3650 | static GFXDECODE_START( namcos22 ) |
| 3651 | GFXDECODE_ENTRY( NULL, 0, namcos22_cg_layout, 0, 0x800 ) |
| 3652 | GFXDECODE_ENTRY( "textile", 0, texture_tile_layout, 0, 0x80 ) |
| 3653 | GFXDECODE_END |
| 3654 | |
| 3655 | static GFXDECODE_START( super ) |
| 3656 | GFXDECODE_ENTRY( NULL, 0, namcos22_cg_layout, 0, 0x800 ) |
| 3657 | GFXDECODE_ENTRY( "textile", 0, texture_tile_layout, 0, 0x80 ) |
| 3658 | GFXDECODE_ENTRY( "sprite", 0, sprite_layout, 0, 0x80 ) |
| 3659 | GFXDECODE_END |
| 3660 | |
| 3661 | |
| 3662 | static NVRAM_HANDLER( namcos22 ) |
| 3663 | { |
| 3664 | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 3665 | int i; |
| 3666 | UINT8 data[4]; |
| 3667 | if (read_or_write) |
| 3668 | { |
| 3669 | for (i = 0; i < state->m_nvmem.bytes() / 4; i++) |
| 3670 | { |
| 3671 | UINT32 dword = state->m_nvmem[i]; |
| 3672 | data[0] = dword>>24; |
| 3673 | data[1] = (dword&0x00ff0000)>>16; |
| 3674 | data[2] = (dword&0x0000ff00)>>8; |
| 3675 | data[3] = dword&0xff; |
| 3676 | file->write(data, 4); |
| 3677 | } |
| 3678 | } |
| 3679 | else |
| 3680 | { |
| 3681 | if (file) |
| 3682 | { |
| 3683 | for (i = 0; i < state->m_nvmem.bytes() / 4; i++) |
| 3684 | { |
| 3685 | file->read(data, 4); |
| 3686 | state->m_nvmem[i] = (data[0]<<24)|(data[1]<<16)|(data[2]<<8)|data[3]; |
| 3687 | } |
| 3688 | } |
| 3689 | else |
| 3690 | { |
| 3691 | memset(state->m_nvmem, 0x00, state->m_nvmem.bytes()); |
| 3692 | if (machine.root_device().memregion("nvram")->bytes() == state->m_nvmem.bytes()) |
| 3693 | { |
| 3694 | UINT8* nvram = machine.root_device().memregion("nvram")->base(); |
| 3695 | |
| 3696 | for (i = 0; i < state->m_nvmem.bytes() / 4; i++) |
| 3697 | { |
| 3698 | state->m_nvmem[i] = (nvram[0+i*4]<<24)|(nvram[1+i*4]<<16)|(nvram[2+i*4]<<8)|nvram[3+i*4]; |
| 3699 | } |
| 3700 | } |
| 3701 | } |
| 3702 | } |
| 3703 | } |
| 3704 | |
| 3705 | void namcos22_state::machine_reset() |
| 3706 | { |
| 3707 | m_master->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 3708 | m_slave->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 3709 | m_mcu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 3710 | |
| 3711 | m_poly->reset(); |
| 3712 | } |
| 3713 | |
| 3714 | void namcos22_state::machine_start() |
| 3715 | { |
| 3716 | m_slave_simulation_active = false; |
| 3717 | m_portbits[0] = 0xffff; |
| 3718 | m_portbits[1] = 0xffff; |
| 3719 | } |
| 3720 | |
| 3721 | // System 22 |
| 3063 | 3722 | static MACHINE_CONFIG_START( namcos22, namcos22_state ) |
| 3064 | 3723 | |
| 3065 | 3724 | /* basic machine hardware */ |
| 3066 | 3725 | MCFG_CPU_ADD("maincpu", M68020,SS22_MASTER_CLOCK/2) /* 25 MHz? */ |
| 3067 | 3726 | MCFG_CPU_PROGRAM_MAP(namcos22_am) |
| 3068 | | MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos22_state, namcos22_interrupt) |
| 3727 | MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos22_state, namcos22_interrupt) |
| 3069 | 3728 | |
| 3070 | 3729 | MCFG_CPU_ADD("master", TMS32025,SS22_MASTER_CLOCK) /* ? */ |
| 3071 | 3730 | MCFG_CPU_PROGRAM_MAP(master_dsp_program) |
| r24771 | r24772 | |
| 3079 | 3738 | MCFG_CPU_IO_MAP(slave_dsp_io) |
| 3080 | 3739 | MCFG_TIMER_DRIVER_ADD_SCANLINE("slave_st", namcos22_state, dsp_slave_serial_irq, "screen", 0, 1) |
| 3081 | 3740 | |
| 3082 | | MCFG_CPU_ADD("mcu", M37702, SS22_MASTER_CLOCK/3) // C74 on the CPU board has no periodic interrupts, it runs entirely off Timer A0 |
| 3741 | MCFG_CPU_ADD("mcu", M37702, SS22_MASTER_CLOCK/3) // C74 on the CPU board has no periodic interrupts, it runs entirely off Timer A0 |
| 3083 | 3742 | MCFG_CPU_PROGRAM_MAP( mcu_s22_program) |
| 3084 | 3743 | MCFG_CPU_IO_MAP( mcu_s22_io) |
| 3085 | 3744 | |
| 3086 | | MCFG_CPU_ADD("iomcu", M37702, XTAL_6_144MHz) // 6.144MHz XTAL on I/O board, not sure if it has a divider |
| 3745 | MCFG_CPU_ADD("iomcu", M37702, XTAL_6_144MHz) // 6.144MHz XTAL on I/O board, not sure if it has a divider |
| 3087 | 3746 | MCFG_CPU_PROGRAM_MAP( iomcu_s22_program) |
| 3088 | 3747 | MCFG_CPU_IO_MAP( iomcu_s22_io) |
| 3089 | 3748 | |
| r24771 | r24772 | |
| 3096 | 3755 | MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) |
| 3097 | 3756 | MCFG_SCREEN_UPDATE_DRIVER(namcos22_state, screen_update_namcos22) |
| 3098 | 3757 | |
| 3099 | | MCFG_PALETTE_LENGTH(NAMCOS22_PALETTE_SIZE) |
| 3758 | MCFG_PALETTE_LENGTH(0x8000) |
| 3100 | 3759 | MCFG_GFXDECODE(namcos22) |
| 3101 | 3760 | MCFG_VIDEO_START_OVERRIDE(namcos22_state,namcos22) |
| 3102 | 3761 | |
| r24771 | r24772 | |
| 3110 | 3769 | MCFG_SOUND_ROUTE(3, "lspeaker", 1.00) |
| 3111 | 3770 | MACHINE_CONFIG_END |
| 3112 | 3771 | |
| 3113 | | /*********************************************************************************/ |
| 3114 | 3772 | |
| 3115 | | ROM_START( airco22b ) |
| 3116 | | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 3117 | | ROM_LOAD32_BYTE( "acs1verb.1", 0x00003, 0x100000, CRC(062c4f61) SHA1(98e1c75dd0f493eb6ebb64b46543217c1d40116e) ) |
| 3118 | | ROM_LOAD32_BYTE( "acs1verb.2", 0x00002, 0x100000, CRC(8ae69711) SHA1(4c5323fa8f0419275e330fec66d1fb2b89bb3795) ) |
| 3119 | | ROM_LOAD32_BYTE( "acs1verb.3", 0x00001, 0x100000, CRC(71738e67) SHA1(eb8c66dedbeff911b6166ebbda466fb9656ef0fb) ) |
| 3120 | | ROM_LOAD32_BYTE( "acs1verb.4", 0x00000, 0x100000, CRC(3b193add) SHA1(5e3bca13905bfa3a2947f4f16ca01878b0a14a3a) ) |
| 3773 | // Super System 22 |
| 3774 | static MACHINE_CONFIG_START( namcos22s, namcos22_state ) |
| 3121 | 3775 | |
| 3122 | | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 3123 | | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 3776 | /* basic machine hardware */ |
| 3777 | MCFG_CPU_ADD("maincpu", M68EC020,SS22_MASTER_CLOCK/2) |
| 3778 | MCFG_CPU_PROGRAM_MAP(namcos22s_am) |
| 3779 | MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos22_state, namcos22s_interrupt) |
| 3124 | 3780 | |
| 3125 | | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 3126 | | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 3781 | MCFG_CPU_ADD("master", TMS32025,SS22_MASTER_CLOCK) |
| 3782 | MCFG_CPU_PROGRAM_MAP(master_dsp_program) |
| 3783 | MCFG_CPU_DATA_MAP(master_dsp_data) |
| 3784 | MCFG_CPU_IO_MAP(master_dsp_io) |
| 3785 | MCFG_TIMER_DRIVER_ADD_SCANLINE("master_st", namcos22_state, dsp_master_serial_irq, "screen", 0, 1) |
| 3127 | 3786 | |
| 3128 | | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* S22-BIOS ver1.20 */ |
| 3129 | | ROM_LOAD( "acs1data.8k", 0, 0x080000, CRC(33824bc9) SHA1(80ec63883770e5eec1f5f1ddc16a85ef8f22a48b) ) |
| 3787 | MCFG_CPU_ADD("slave", TMS32025,SS22_MASTER_CLOCK) |
| 3788 | MCFG_CPU_PROGRAM_MAP(slave_dsp_program) |
| 3789 | MCFG_CPU_DATA_MAP(slave_dsp_data) |
| 3790 | MCFG_CPU_IO_MAP(slave_dsp_io) |
| 3791 | MCFG_TIMER_DRIVER_ADD_SCANLINE("slave_st", namcos22_state, dsp_slave_serial_irq, "screen", 0, 1) |
| 3130 | 3792 | |
| 3131 | | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 3132 | | ROM_LOAD( "acs1scg0.12l", 0x200000*0, 0x200000,CRC(e5235404) SHA1(3133b71d1bde3a9815cd02e97382b8078b62b0bb) ) |
| 3133 | | ROM_LOAD( "acs1scg1.10l", 0x200000*1, 0x200000,CRC(828e91e7) SHA1(8383b029cd29fbad107fd49e866defb50c11c99a) ) |
| 3793 | MCFG_CPU_ADD("mcu", M37710, SS22_MASTER_CLOCK/3) |
| 3794 | MCFG_CPU_PROGRAM_MAP(mcu_program) |
| 3795 | MCFG_CPU_IO_MAP(mcu_io) |
| 3796 | MCFG_TIMER_DRIVER_ADD_SCANLINE("mcu_st", namcos22_state, mcu_irq, "screen", 0, 1) |
| 3134 | 3797 | |
| 3135 | | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 3136 | | ROM_LOAD( "acs1cg0.8d", 0x200000*0x0, 0x200000,CRC(1f31343e) SHA1(25ba730cec74e0ed0b404f5c4430b7c3368c9b52) ) |
| 3137 | | ROM_LOAD( "acs1cg1.10d", 0x200000*0x1, 0x200000,CRC(ccd5481d) SHA1(050e6fc7d4e0591f8ffc9552d140b6bd4533c06d) ) |
| 3138 | | ROM_LOAD( "acs1cg2.12d", 0x200000*0x2, 0x200000,CRC(14e5d0d2) SHA1(3147ad11098030e9cfd93fbc0a1b3aafa8b8aba6) ) |
| 3139 | | ROM_LOAD( "acs1cg3.13d", 0x200000*0x3, 0x200000,CRC(1a7bcc16) SHA1(bbc4ca5b208bea8394d1679e4e2d17d22331e2c8) ) |
| 3140 | | ROM_LOAD( "acs1cg4.14d", 0x200000*0x4, 0x200000,CRC(1920b7fb) SHA1(56318f2a96c55998bb9a8d791d56be3dfb39867e) ) |
| 3141 | | ROM_LOAD( "acs1cg5.16d", 0x200000*0x5, 0x200000,CRC(3dd109b7) SHA1(a7f914b9b80f1bca1afb6144698578a29ca74676) ) |
| 3142 | | ROM_LOAD( "acs1cg6.18d", 0x200000*0x6, 0x200000,CRC(ec71c8a3) SHA1(86892a91883d483ca0d422b78fa36042e02f3ad3) ) |
| 3143 | | ROM_LOAD( "acs1cg7.19d", 0x200000*0x7, 0x200000,CRC(82271757) SHA1(023c935e78b14da310e4c29da8785b82aa3241ac) ) |
| 3798 | MCFG_QUANTUM_TIME(attotime::from_hz(6000)) |
| 3799 | // MCFG_QUANTUM_PERFECT_CPU("maincpu") |
| 3800 | // MCFG_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE) |
| 3144 | 3801 | |
| 3145 | | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 3146 | | ROM_LOAD( "acs1ccrl.3d", 0x000000, 0x200000,CRC(07088ba1) SHA1(a962c0821d5af28ed508cfdbd613675454e306e3) ) |
| 3147 | | ROM_LOAD( "acs1ccrh.1d", 0x200000, 0x080000,CRC(62936af6) SHA1(ca80b68415aa2cd2ce4e90404f10640d0ae38be9) ) |
| 3802 | MCFG_NVRAM_HANDLER(namcos22) |
| 3148 | 3803 | |
| 3149 | | ROM_REGION( 0x80000*12, "pointrom", 0 ) /* 3d model data */ |
| 3150 | | ROM_LOAD( "acs1ptl0.18k", 0x80000*0x0, 0x80000,CRC(bd5896c7) SHA1(58ec7d0f1e0bfdbf4908e1d920bbd7f094993777) ) |
| 3151 | | ROM_LOAD( "acs1ptl1.16k", 0x80000*0x1, 0x80000,CRC(e583b975) SHA1(beb0cc2b44bc69af057c2bb744cd7e1b95de577a) ) |
| 3152 | | ROM_LOAD( "acs1ptl2.15k", 0x80000*0x2, 0x80000,CRC(802d737a) SHA1(3d99a369db70d13fb87c2ff26c82b4b39afe94d9) ) |
| 3153 | | ROM_LOAD( "acs1ptl3.14k", 0x80000*0x3, 0x80000,CRC(fe556ecb) SHA1(9d9dbbb4f1d3688fb763001834640d79d9987d47) ) |
| 3804 | /* video hardware */ |
| 3805 | MCFG_SCREEN_ADD("screen", RASTER) |
| 3806 | MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) |
| 3807 | MCFG_SCREEN_UPDATE_DRIVER(namcos22_state, screen_update_namcos22s) |
| 3154 | 3808 | |
| 3155 | | ROM_LOAD( "acs1ptm0.18j", 0x80000*0x4, 0x80000,CRC(949b6c58) SHA1(6ea016551b10f5d5764921dcc5a4b81d2b93d701) ) |
| 3156 | | ROM_LOAD( "acs1ptm1.16j", 0x80000*0x5, 0x80000,CRC(8b2b99d9) SHA1(89c3545c4035509307728a9577018c1100ce3a54) ) |
| 3157 | | ROM_LOAD( "acs1ptm2.15j", 0x80000*0x6, 0x80000,CRC(f1515080) SHA1(27a87217a140477a6840a610c95ae57abc0d01a6) ) |
| 3158 | | ROM_LOAD( "acs1ptm3.14j", 0x80000*0x7, 0x80000,CRC(e364f4aa) SHA1(3af6a864765871664cccad82c4795f677be68d51) ) |
| 3809 | MCFG_PALETTE_LENGTH(0x8000) |
| 3810 | MCFG_GFXDECODE(super) |
| 3811 | MCFG_VIDEO_START_OVERRIDE(namcos22_state,namcos22s) |
| 3159 | 3812 | |
| 3160 | | ROM_LOAD( "acs1ptu0.18f", 0x80000*0x8, 0x80000,CRC(746b3084) SHA1(73397d1f22300fb3a81a0a068da4d0a8cfdc0a36) ) |
| 3161 | | ROM_LOAD( "acs1ptu1.16f", 0x80000*0x9, 0x80000,CRC(b44f1d3b) SHA1(f3f1a85c082053653e4da7d7f01f1baef1a013c8) ) |
| 3162 | | ROM_LOAD( "acs1ptu2.15f", 0x80000*0xa, 0x80000,CRC(fdd2d778) SHA1(0269f971d778e908a1efb5a63b08fb3365d98c2a) ) |
| 3163 | | ROM_LOAD( "acs1ptu3.14f", 0x80000*0xb, 0x80000,CRC(38b425d4) SHA1(8ff6dd6775d42afdff4c9fb2232e4d72b38e515a) ) |
| 3813 | /* sound hardware */ |
| 3814 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 3164 | 3815 | |
| 3165 | | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 3166 | | ROM_LOAD( "acs1wav0.1", 0x400000, 0x400000, CRC(52fb9762) SHA1(125c163e62d701c2e17ba0b572ed27c944ca0412) ) |
| 3167 | | ROM_LOAD( "acs1wav1.2", 0x800000, 0x400000, CRC(b568dca2) SHA1(503deb277691d801acac1380ded2868a5d5ac501) ) |
| 3168 | | ROM_END |
| 3816 | MCFG_C352_ADD("c352", SS22_MASTER_CLOCK/2) |
| 3817 | MCFG_SOUND_ROUTE(0, "rspeaker", 1.00) |
| 3818 | MCFG_SOUND_ROUTE(1, "lspeaker", 1.00) |
| 3819 | MCFG_SOUND_ROUTE(2, "rspeaker", 1.00) |
| 3820 | MCFG_SOUND_ROUTE(3, "lspeaker", 1.00) |
| 3821 | MACHINE_CONFIG_END |
| 3169 | 3822 | |
| 3170 | | ROM_START( alpinerc ) |
| 3171 | | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 3172 | | ROM_LOAD32_BYTE( "ar2ver-c.1", 0x00003, 0x100000, CRC(61323842) SHA1(e3c33248340bee252f230124fa9b7fa935a60565) ) |
| 3173 | | ROM_LOAD32_BYTE( "ar2ver-c.2", 0x00002, 0x100000, CRC(43795b2d) SHA1(e060f3259661279a36300431c5ca7347bde8b6ec) ) |
| 3174 | | ROM_LOAD32_BYTE( "ar2ver-c.3", 0x00001, 0x100000, CRC(acb3003b) SHA1(ea0cbf3a1607b06b108df051f38fec1f214f42d2) ) |
| 3175 | | ROM_LOAD32_BYTE( "ar2ver-c.4", 0x00000, 0x100000, CRC(800acc21) SHA1(41d26766da2db46954a2351bbc50aea94bc1d564) ) |
| 3823 | static MACHINE_CONFIG_DERIVED( alpine, namcos22s ) |
| 3176 | 3824 | |
| 3177 | | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 3178 | | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 3825 | /* basic machine hardware */ |
| 3826 | MCFG_CPU_MODIFY("mcu") |
| 3827 | MCFG_CPU_IO_MAP(alpine_io_map) |
| 3828 | |
| 3829 | MCFG_TIMER_DRIVER_ADD("motor_timer", namcos22_state, alpine_steplock_callback) |
| 3830 | MACHINE_CONFIG_END |
| 3179 | 3831 | |
| 3180 | | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 3181 | | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 3832 | static MACHINE_CONFIG_DERIVED( alpinesa, alpine ) |
| 3182 | 3833 | |
| 3183 | | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* S22-BIOS ver1.30 */ |
| 3184 | | ROM_LOAD( "ar1datab.8k", 0, 0x080000, CRC(c26306f8) SHA1(6d8d993c076d5ced523143a86bd0938b3794478d) ) |
| 3834 | /* basic machine hardware */ |
| 3835 | MCFG_CPU_MODIFY("maincpu") |
| 3836 | MCFG_CPU_PROGRAM_MAP(alpinesa_am) |
| 3837 | MACHINE_CONFIG_END |
| 3185 | 3838 | |
| 3186 | | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 3187 | | ROM_LOAD( "ar1scg0.12f", 0x200000*0, 0x200000,CRC(e7be830a) SHA1(60e2162eecd7401a0c26c525de2715cbfb10c1c5) ) /* identical to "ar1scg0.12l" */ |
| 3188 | | ROM_LOAD( "ar1scg1.10f", 0x200000*1, 0x200000,CRC(8f15a686) SHA1(bce2d4380c6c39aa402566ddb0f62bbe6d7bfa1d) ) /* identical to "ar1scg1.10l" */ |
| 3839 | static MACHINE_CONFIG_DERIVED( timecris, namcos22s ) |
| 3189 | 3840 | |
| 3190 | | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 3191 | | ROM_LOAD( "ar1cg0.12b", 0x200000*0x0, 0x200000,CRC(93f3a9d9) SHA1(7e94c81ad5ace98a2f0d00d101d464883d38c197) ) /* identical to "ar1cg0.8d" */ |
| 3192 | | ROM_LOAD( "ar1cg1.10d", 0x200000*0x1, 0x200000,CRC(39828c8b) SHA1(424aa67eb0b898c9cab8a4749893a9c5696ac430) ) /* identical to "ar1cg1.13b" */ |
| 3193 | | ROM_LOAD( "ar1cg2.12d", 0x200000*0x2, 0x200000,CRC(f7b058d1) SHA1(fffd0f01724a26dd47b1ecceecf4a139d5746f81) ) /* identical to "ar1cg2.14b" */ |
| 3194 | | ROM_LOAD( "ar1cg3.13d", 0x200000*0x3, 0x200000,CRC(c28a3d2a) SHA1(cdc44fdbc99274e860c834e42b4cfafb478d4d26) ) /* identical to "ar1cg3.16b" */ |
| 3195 | | ROM_LOAD( "ar1cg4.14d", 0x200000*0x4, 0x200000,CRC(abdb161f) SHA1(260bff9b0e94c1b2ea4b9d7fa170fbca212e85ee) ) /* identical to "ar1cg4.18b" */ |
| 3196 | | ROM_LOAD( "ar1cg5.16d", 0x200000*0x5, 0x200000,CRC(2381cfea) SHA1(1de4c8b94df233fd74771fa47843290a3d8df0c8) ) /* identical to "ar1cg5.19b" */ |
| 3197 | | ROM_LOAD( "ar1cg6.18a", 0x200000*0x6, 0x200000,CRC(ca0b6d23) SHA1(df969e0eeec557a95584b06995b0d55f2c6ec70a) ) /* identical to "ar1cg6.18d" */ |
| 3198 | | ROM_LOAD( "ar1cg7.15a", 0x200000*0x7, 0x200000,CRC(ffb9f9f9) SHA1(2b8c75b580f77e887df7d50909a3a95cda570e20) ) /* identical to "ar1cg7.19d" */ |
| 3841 | /* basic machine hardware */ |
| 3842 | MCFG_CPU_MODIFY("maincpu") |
| 3843 | MCFG_CPU_PROGRAM_MAP(timecris_am) |
| 3844 | MACHINE_CONFIG_END |
| 3199 | 3845 | |
| 3200 | | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 3201 | | ROM_LOAD( "ar1ccrl.3d", 0x000000, 0x200000,CRC(17387b2c) SHA1(dfd7cadaf97917347c0fa98f395364a543e49612) ) /* identical to "ar1ccrl.7b" */ |
| 3202 | | ROM_LOAD( "ar1ccrh.1d", 0x200000, 0x080000,CRC(ee7a4803) SHA1(8383c9a8ef5ed94df13446ca5cefa5f9e518f175) ) /* identical to "pr1ccrh.5b" */ |
| 3846 | static MACHINE_CONFIG_DERIVED( propcycl, namcos22s ) |
| 3203 | 3847 | |
| 3204 | | ROM_REGION( 0x80000*12, "pointrom", 0 ) /* 3d model data */ |
| 3205 | | ROM_LOAD( "ar1ptrl0.18k", 0x80000*0x0, 0x80000,CRC(82405108) SHA1(0a40882a9bc8621c620bede404c78f6b1333f223) ) |
| 3206 | | ROM_LOAD( "ar1ptrl1.16k", 0x80000*0x1, 0x80000,CRC(8739b09c) SHA1(cd603c4dc2f9ffc4185f891eb83e4c383c564294) ) |
| 3207 | | ROM_LOAD( "ar1ptrl2.15k", 0x80000*0x2, 0x80000,CRC(bda693a9) SHA1(fe71dd3c63198737aa2d39527f0004e977e3be20) ) |
| 3208 | | ROM_LOAD( "ar1ptrl3.14k", 0x80000*0x3, 0x80000,CRC(82797405) SHA1(2f205fee2d33e183c80a906fb38900167c011240) ) |
| 3848 | /* basic machine hardware */ |
| 3849 | MCFG_CPU_MODIFY("mcu") |
| 3850 | MCFG_CPU_IO_MAP(propcycl_io_map) |
| 3851 | |
| 3852 | MCFG_TIMER_DRIVER_ADD_PERIODIC("pc_p_upd", namcos22_state, propcycl_pedal_update, attotime::from_msec(20)) |
| 3853 | MCFG_TIMER_DRIVER_ADD("pc_p_int", namcos22_state, propcycl_pedal_interrupt) |
| 3854 | MACHINE_CONFIG_END |
| 3209 | 3855 | |
| 3210 | | ROM_LOAD( "ar1ptrm0.18j", 0x80000*0x4, 0x80000,CRC(64bd6620) SHA1(2e33ff22208805ece304128be8887646fc890f6d) ) |
| 3211 | | ROM_LOAD( "ar1ptrm1.16j", 0x80000*0x5, 0x80000,CRC(2232f0a5) SHA1(3fccf6d4a0c4100cc85e3051024d659c4a1c769e) ) |
| 3212 | | ROM_LOAD( "ar1ptrm2.15j", 0x80000*0x6, 0x80000,CRC(8ee14e6f) SHA1(f6f1cbb748b109b365255378c18e710ba6270c1c) ) |
| 3213 | | ROM_LOAD( "ar1ptrm3.14j", 0x80000*0x7, 0x80000,CRC(1094a970) SHA1(d41b10f48e1ef312bcaf09f27fabc7252c30e648) ) |
| 3856 | MACHINE_START_MEMBER(namcos22_state,adillor) |
| 3857 | { |
| 3858 | machine_start(); |
| 3214 | 3859 | |
| 3215 | | ROM_LOAD( "ar1ptru0.18f", 0x80000*0x8, 0x80000,CRC(26d88467) SHA1(d528f989fab4dd5ac1aec9b596a05fbadcc0587a) ) |
| 3216 | | ROM_LOAD( "ar1ptru1.16f", 0x80000*0x9, 0x80000,CRC(c5e2c208) SHA1(152fde0b95a5df8c781e4a83577cfbbc7672ae0d) ) |
| 3217 | | ROM_LOAD( "ar1ptru2.15f", 0x80000*0xa, 0x80000,CRC(1321ec59) SHA1(dbd3687a4c6b1aa0b18e336f99dabb9010d36639) ) |
| 3218 | | ROM_LOAD( "ar1ptru3.14f", 0x80000*0xb, 0x80000,CRC(139d7dc1) SHA1(6d25e6ad552a91a0c5fc03db7e1a801ccf9c9556) ) |
| 3860 | for (int axis = 0; axis < 2; axis++) |
| 3861 | m_ar_tb_interrupt[axis] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(namcos22_state::adillor_trackball_interrupt),this)); |
| 3862 | } |
| 3219 | 3863 | |
| 3220 | | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 3221 | | ROM_LOAD( "ar1wavea.2l", 0, 0x200000, CRC(dbf64562) SHA1(454fd7d5b860f0e5557d8900393be95d6c992ad1) ) |
| 3864 | static MACHINE_CONFIG_DERIVED( adillor, namcos22s ) |
| 3222 | 3865 | |
| 3223 | | ROM_REGION( 0x4000, "nvram", 0 ) // default eeprom |
| 3224 | | ROM_LOAD( "alpiner_defaults.nv", 0x0000, 0x4000, CRC(46c06e51) SHA1(df3a16fe3a0858b14c51d48539d9ab3eb3a213de) ) |
| 3225 | | ROM_END |
| 3866 | /* basic machine hardware */ |
| 3867 | MCFG_TIMER_DRIVER_ADD_PERIODIC("ar_tb_upd", namcos22_state, adillor_trackball_update, attotime::from_msec(20)) |
| 3226 | 3868 | |
| 3227 | | ROM_START( alpinerd ) |
| 3228 | | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 3229 | | ROM_LOAD32_BYTE( "ar2ver-d.1", 0x00003, 0x100000, CRC(fa3380b9) SHA1(2a46988745bd2672f8082399a68ae0d0ab3d28f2) ) |
| 3230 | | ROM_LOAD32_BYTE( "ar2ver-d.2", 0x00002, 0x100000, CRC(76141352) SHA1(0f7230dd9cd6f1b83d499034affc7bc2c4385ab5) ) |
| 3231 | | ROM_LOAD32_BYTE( "ar2ver-d.3", 0x00001, 0x100000, CRC(9beffe6a) SHA1(d8efd1e3829d32bb06537d7cecb59f8df9b6d663) ) |
| 3232 | | ROM_LOAD32_BYTE( "ar2ver-d.4", 0x00000, 0x100000, CRC(1f3f1134) SHA1(0afa78444d1463d214f1afd7ec500af76d567489) ) |
| 3869 | MCFG_MACHINE_START_OVERRIDE(namcos22_state,adillor) |
| 3870 | MACHINE_CONFIG_END |
| 3233 | 3871 | |
| 3234 | | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 3235 | | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 3236 | 3872 | |
| 3237 | | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 3238 | | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 3239 | 3873 | |
| 3240 | | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* S22-BIOS ver1.30 */ |
| 3241 | | ROM_LOAD( "ar1datab.8k", 0, 0x080000, CRC(c26306f8) SHA1(6d8d993c076d5ced523143a86bd0938b3794478d) ) |
| 3874 | /*********************************************************************************************/ |
| 3242 | 3875 | |
| 3243 | | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 3244 | | ROM_LOAD( "ar1scg0.12f", 0x200000*0, 0x200000,CRC(e7be830a) SHA1(60e2162eecd7401a0c26c525de2715cbfb10c1c5) ) /* identical to "ar1scg0.12l" */ |
| 3245 | | ROM_LOAD( "ar1scg1.10f", 0x200000*1, 0x200000,CRC(8f15a686) SHA1(bce2d4380c6c39aa402566ddb0f62bbe6d7bfa1d) ) /* identical to "ar1scg1.10l" */ |
| 3876 | ROM_START( ridgerac ) |
| 3877 | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 3878 | ROM_LOAD32_BYTE( "rr3prgll.4d", 0x00003, 0x80000, CRC(856fe5ec) SHA1(72d95b8bd5da551c3d358b8ab266373a89f8aa6a) ) |
| 3879 | ROM_LOAD32_BYTE( "rr3prglm.2d", 0x00002, 0x80000, CRC(1e9ef0a9) SHA1(a4577bcdf13673568793d8a324945fca30b10f43) ) |
| 3880 | ROM_LOAD32_BYTE( "rr3prgum.8d", 0x00001, 0x80000, CRC(e160f63f) SHA1(9b4b7a13eb4bc19fcb53daedb87e4945c20a1b8e) ) |
| 3881 | ROM_LOAD32_BYTE( "rr3prguu.6d", 0x00000, 0x80000, CRC(f07c78c0) SHA1(dbed76d868b761711faf5b6e11f2c9affb91db5d) ) |
| 3246 | 3882 | |
| 3247 | | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 3248 | | ROM_LOAD( "ar1cg0.12b", 0x200000*0x0, 0x200000,CRC(93f3a9d9) SHA1(7e94c81ad5ace98a2f0d00d101d464883d38c197) ) /* identical to "ar1cg0.8d" */ |
| 3249 | | ROM_LOAD( "ar1cg1.10d", 0x200000*0x1, 0x200000,CRC(39828c8b) SHA1(424aa67eb0b898c9cab8a4749893a9c5696ac430) ) /* identical to "ar1cg1.13b" */ |
| 3250 | | ROM_LOAD( "ar1cg2.12d", 0x200000*0x2, 0x200000,CRC(f7b058d1) SHA1(fffd0f01724a26dd47b1ecceecf4a139d5746f81) ) /* identical to "ar1cg2.14b" */ |
| 3251 | | ROM_LOAD( "ar1cg3.13d", 0x200000*0x3, 0x200000,CRC(c28a3d2a) SHA1(cdc44fdbc99274e860c834e42b4cfafb478d4d26) ) /* identical to "ar1cg3.16b" */ |
| 3252 | | ROM_LOAD( "ar1cg4.14d", 0x200000*0x4, 0x200000,CRC(abdb161f) SHA1(260bff9b0e94c1b2ea4b9d7fa170fbca212e85ee) ) /* identical to "ar1cg4.18b" */ |
| 3253 | | ROM_LOAD( "ar1cg5.16d", 0x200000*0x5, 0x200000,CRC(2381cfea) SHA1(1de4c8b94df233fd74771fa47843290a3d8df0c8) ) /* identical to "ar1cg5.19b" */ |
| 3254 | | ROM_LOAD( "ar1cg6.18a", 0x200000*0x6, 0x200000,CRC(ca0b6d23) SHA1(df969e0eeec557a95584b06995b0d55f2c6ec70a) ) /* identical to "ar1cg6.18d" */ |
| 3255 | | ROM_LOAD( "ar1cg7.15a", 0x200000*0x7, 0x200000,CRC(ffb9f9f9) SHA1(2b8c75b580f77e887df7d50909a3a95cda570e20) ) /* identical to "ar1cg7.19d" */ |
| 3256 | | |
| 3257 | | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 3258 | | ROM_LOAD( "ar1ccrl.3d", 0x000000, 0x200000,CRC(17387b2c) SHA1(dfd7cadaf97917347c0fa98f395364a543e49612) ) /* identical to "ar1ccrl.7b" */ |
| 3259 | | ROM_LOAD( "ar1ccrh.1d", 0x200000, 0x080000,CRC(ee7a4803) SHA1(8383c9a8ef5ed94df13446ca5cefa5f9e518f175) ) /* identical to "pr1ccrh.5b" */ |
| 3260 | | |
| 3261 | | ROM_REGION( 0x80000*12, "pointrom", 0 ) /* 3d model data */ |
| 3262 | | ROM_LOAD( "ar1ptrl0.18k", 0x80000*0x0, 0x80000,CRC(82405108) SHA1(0a40882a9bc8621c620bede404c78f6b1333f223) ) |
| 3263 | | ROM_LOAD( "ar1ptrl1.16k", 0x80000*0x1, 0x80000,CRC(8739b09c) SHA1(cd603c4dc2f9ffc4185f891eb83e4c383c564294) ) |
| 3264 | | ROM_LOAD( "ar1ptrl2.15k", 0x80000*0x2, 0x80000,CRC(bda693a9) SHA1(fe71dd3c63198737aa2d39527f0004e977e3be20) ) |
| 3265 | | ROM_LOAD( "ar1ptrl3.14k", 0x80000*0x3, 0x80000,CRC(82797405) SHA1(2f205fee2d33e183c80a906fb38900167c011240) ) |
| 3266 | | |
| 3267 | | ROM_LOAD( "ar1ptrm0.18j", 0x80000*0x4, 0x80000,CRC(64bd6620) SHA1(2e33ff22208805ece304128be8887646fc890f6d) ) |
| 3268 | | ROM_LOAD( "ar1ptrm1.16j", 0x80000*0x5, 0x80000,CRC(2232f0a5) SHA1(3fccf6d4a0c4100cc85e3051024d659c4a1c769e) ) |
| 3269 | | ROM_LOAD( "ar1ptrm2.15j", 0x80000*0x6, 0x80000,CRC(8ee14e6f) SHA1(f6f1cbb748b109b365255378c18e710ba6270c1c) ) |
| 3270 | | ROM_LOAD( "ar1ptrm3.14j", 0x80000*0x7, 0x80000,CRC(1094a970) SHA1(d41b10f48e1ef312bcaf09f27fabc7252c30e648) ) |
| 3271 | | |
| 3272 | | ROM_LOAD( "ar1ptru0.18f", 0x80000*0x8, 0x80000,CRC(26d88467) SHA1(d528f989fab4dd5ac1aec9b596a05fbadcc0587a) ) |
| 3273 | | ROM_LOAD( "ar1ptru1.16f", 0x80000*0x9, 0x80000,CRC(c5e2c208) SHA1(152fde0b95a5df8c781e4a83577cfbbc7672ae0d) ) |
| 3274 | | ROM_LOAD( "ar1ptru2.15f", 0x80000*0xa, 0x80000,CRC(1321ec59) SHA1(dbd3687a4c6b1aa0b18e336f99dabb9010d36639) ) |
| 3275 | | ROM_LOAD( "ar1ptru3.14f", 0x80000*0xb, 0x80000,CRC(139d7dc1) SHA1(6d25e6ad552a91a0c5fc03db7e1a801ccf9c9556) ) |
| 3276 | | |
| 3277 | | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 3278 | | ROM_LOAD( "ar1wavea.2l", 0, 0x200000, CRC(dbf64562) SHA1(454fd7d5b860f0e5557d8900393be95d6c992ad1) ) |
| 3279 | | |
| 3280 | | ROM_REGION( 0x4000, "nvram", 0 ) // default eeprom |
| 3281 | | ROM_LOAD( "alpiner_defaults.nv", 0x0000, 0x4000, CRC(46c06e51) SHA1(df3a16fe3a0858b14c51d48539d9ab3eb3a213de) ) |
| 3282 | | ROM_END |
| 3283 | | |
| 3284 | | ROM_START( alpinr2b ) |
| 3285 | | ROM_REGION( 0x800000, "maincpu", 0 ) /* main program */ |
| 3286 | | ROM_LOAD32_BYTE( "ars2ver-b.2", 0x000003, 0x200000, CRC(ed977f83) SHA1(26c57cdfc15f799a999ee22f141e1c0cabfc91dc) ) |
| 3287 | | ROM_LOAD32_BYTE( "ars2ver-b.3", 0x000001, 0x200000, CRC(8e7a9983) SHA1(34c82e5f080efe04d6b77a77a8391cb48b69c1af) ) |
| 3288 | | ROM_LOAD32_BYTE( "ars2ver-b.4", 0x000002, 0x200000, CRC(610e49c2) SHA1(433c6d2216551bac31584306f748af1c912c3b07) ) |
| 3289 | | ROM_LOAD32_BYTE( "ars2ver-b.5", 0x000000, 0x200000, CRC(7f3517b0) SHA1(3e6ba1a51bf235f40f933aae1f00638b88bba522) ) |
| 3290 | | |
| 3291 | 3883 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 3292 | 3884 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 3293 | 3885 | |
| 3294 | 3886 | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 3295 | 3887 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 3296 | 3888 | |
| 3297 | | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* S22-BIOS ver1.30 */ |
| 3298 | | ROM_LOAD( "ars2data.8k", 0x000000, 0x080000, CRC(29b36dcb) SHA1(70fde130c11789c822829493a70ecefb077c0c15) ) |
| 3889 | ROM_REGION16_LE( 0x4000, "iomcu", 0 ) /* I/O MCU BIOS */ |
| 3890 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3299 | 3891 | |
| 3300 | | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 3301 | | ROM_LOAD( "ars1scg0.12f", 0x000000, 0x200000, CRC(bc49ed86) SHA1(289b39f2cb21c723dbe4ddd64ee4b2c5fa65c368) ) |
| 3892 | ROM_REGION16_LE( 0x4000, "mcu_c74", 0 ) /* SUB/SOUND MCU BIOS */ |
| 3893 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3302 | 3894 | |
| 3303 | | ROM_REGION( 0xc00000, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 3304 | | ROM_LOAD( "ars1cg0.8d", 0x000000, 0x200000, CRC(74f4515c) SHA1(1e3a96281d543213d10c962b4d387c414d76e0c3) ) |
| 3305 | | ROM_LOAD( "ars1cg1.10d", 0x200000, 0x200000, CRC(329a95c1) SHA1(2cad7fd9e5ca7c64729ca2548ef4f873a0b8de64) ) |
| 3306 | | ROM_LOAD( "ars1cg2.12d", 0x400000, 0x200000, CRC(5648345a) SHA1(0dc7aedba65b7d97687a9e38a63597f16cee6179) ) |
| 3307 | | ROM_LOAD( "ars1cg3.13d", 0x600000, 0x200000, CRC(a752f205) SHA1(373b5a69e4488bc30763568ceae512ab7039f5f8) ) |
| 3308 | | ROM_LOAD( "ars1cg4.14d", 0x800000, 0x200000, CRC(54bf35b6) SHA1(aec43b66e7597ad7d113ae785417bf26164c1bca) ) |
| 3309 | | ROM_LOAD( "ars1cg5.16d", 0xa00000, 0x200000, CRC(e24a19a2) SHA1(34c1b51eea954ae3000602e550eb1cef0a10e651) ) |
| 3895 | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 3896 | ROM_LOAD( "rr1data.6r", 0, 0x080000, CRC(18f5f748) SHA1(e0d149a66de36156edd9b55f604c9a9801aaefa8) ) |
| 3310 | 3897 | |
| 3898 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 3899 | ROM_LOAD( "rr1cg0.bin", 0x200000*0x4, 0x200000, CRC(b557a795) SHA1(f345486ffbe797246ad80a55d3c4a332ed6e2888) )//,CRC(d1b0eec6) SHA1(f66922c324dfc3ff408db7556c587ef90ca64c3b) ) |
| 3900 | ROM_LOAD( "rr1cg1.bin", 0x200000*0x5, 0x200000, CRC(0fa212d9) SHA1(a1311de0a504e2d399044fa8ac32ec6c56ec965f) )//,CRC(bb695d89) SHA1(557bac9d2718519c1f69e374d0ef9a86a43fe86c) ) |
| 3901 | ROM_LOAD( "rr1cg2.bin", 0x200000*0x6, 0x200000, CRC(18e2d2bd) SHA1(69c2ea62eeb255f27d3c69373f6716b0a34683cc) )//,CRC(8f374c0a) SHA1(94ff8581de11a03ef86525155f8433bf5858b980) ) |
| 3902 | ROM_LOAD( "rr1cg3.bin", 0x200000*0x7, 0x200000, CRC(9564488b) SHA1(6b27d1aea75d6be747c62e165cfa49ecc5d9e767) )//,CRC(072a5c47) SHA1(86b8e973ae6b78197d685fe6d14722d8e2d0dfec) ) |
| 3903 | |
| 3311 | 3904 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 3312 | | ROM_LOAD( "ars1ccrl.3d", 0x000000, 0x200000, CRC(fc8c9161) SHA1(ad0fcfae27e02d68a6f8d1d03c514dc2f12d9ee8) ) |
| 3313 | | ROM_LOAD( "ars1ccrh.1d", 0x200000, 0x080000, CRC(a17660bb) SHA1(bae2c3f20772c6cea99f271ee3f39b1f999038c6) ) |
| 3905 | ROM_LOAD( "rr1ccrl.bin",0x000000, 0x200000, CRC(6092d181) SHA1(52c0e3ac20aa23059a87d1a985d24ae641577310) )//,CRC(c15cb257) SHA1(0cb8f231c62ea37955be5d452a436a6e815af8e8) ) |
| 3906 | ROM_LOAD( "rr1ccrh.bin",0x200000, 0x080000, CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) )//,CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) ) |
| 3314 | 3907 | |
| 3315 | | ROM_REGION( 0x80000*12, "pointrom", 0 ) /* 3d model data */ |
| 3316 | | ROM_LOAD( "ars1ptrl0.18k", 0x000000, 0x080000, CRC(f04e0e61) SHA1(d58a1d3ca1d0922e134db21a04feaee7dc97b020) ) |
| 3317 | | ROM_LOAD( "ars1ptrl1.16k", 0x080000, 0x080000, CRC(8bdb4970) SHA1(a504cd4beca4bedd1a7a228c83dd6b844ca3a1e0) ) |
| 3318 | | ROM_LOAD( "ars1ptrl2.15k", 0x100000, 0x080000, CRC(ec993a4f) SHA1(883f64e3e8d951415e9cef589c354eba9406c0aa) ) |
| 3319 | | ROM_LOAD( "ars1ptrl3.14k", 0x180000, 0x080000, CRC(4d453f3c) SHA1(7a82e5d8f974d9e56d0031b35e73647fe6aeec2e) ) |
| 3908 | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 3909 | ROM_LOAD( "rr1potl0.5b", 0x80000*0, 0x80000,CRC(3ac193e3) SHA1(ff213766f15e34dc1b25187b57d94e17930090a3) ) |
| 3910 | ROM_LOAD( "rr1potl1.4b", 0x80000*1, 0x80000,CRC(ac3ffba5) SHA1(4eb4dda5faeff237e0d35725b56d309948fba900) ) |
| 3911 | ROM_LOAD( "rr1potm0.5c", 0x80000*2, 0x80000,CRC(42a3fa08) SHA1(15db0ae7ccf7f5a77b9dd9a9d82a488b67f8aaff) ) |
| 3912 | ROM_LOAD( "rr1potm1.4c", 0x80000*3, 0x80000,CRC(1bc1ea7b) SHA1(52c21eef4989c45acc5fa4deda2d0b63214731c8) ) |
| 3913 | ROM_LOAD( "rr1potu0.5d", 0x80000*4, 0x80000,CRC(5e367f72) SHA1(5887f011379dce865fef238b402678a3d2033de9) ) |
| 3914 | ROM_LOAD( "rr1potu1.4d", 0x80000*5, 0x80000,CRC(31d92475) SHA1(51d3c0baa223e1bc16ea2950f2e085597528f870) ) |
| 3320 | 3915 | |
| 3321 | | ROM_LOAD( "ars1ptrm0.18j", 0x200000, 0x080000, CRC(d1bdc524) SHA1(b898bb38de397551ada4da4677dd733bf8fa5010) ) |
| 3322 | | ROM_LOAD( "ars1ptrm1.16j", 0x280000, 0x080000, CRC(86b81c81) SHA1(45096abf46794f06a4b647f5e4222798d8467632) ) |
| 3323 | | ROM_LOAD( "ars1ptrm2.15j", 0x300000, 0x080000, CRC(24116b83) SHA1(41c6a880abce7b543c409fda767682b2537b0d99) ) |
| 3324 | | ROM_LOAD( "ars1ptrm3.14j", 0x380000, 0x080000, CRC(772bede3) SHA1(f9565b7a40f0bbf11081d619fe5a46feafce2e56) ) |
| 3916 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 3917 | ROM_LOAD( "rr1wav0.10r", 0x100000*0, 0x100000,CRC(a8e85bde) SHA1(b56677e9f6c98f7b600043f5dcfef3a482ca7455) ) |
| 3918 | ROM_LOAD( "rr1wav1.10p", 0x100000*2, 0x100000,CRC(35f47c8e) SHA1(7c3f9e942f532af8008fbead2a96fee6084bcde6) ) |
| 3919 | ROM_LOAD( "rr1wav2.10n", 0x100000*1, 0x100000,CRC(3244cb59) SHA1(b3283b30cfafbfdcbc6d482ecc4ed6a47a527ca4) ) |
| 3920 | ROM_LOAD( "rr1wav3.10l", 0x100000*3, 0x100000,CRC(c4cda1a7) SHA1(60bc96880ec79efdff3cc70c09e848692a40bea4) ) |
| 3325 | 3921 | |
| 3326 | | ROM_LOAD( "ars1ptru0.18f", 0x400000, 0x080000, CRC(a4cf197a) SHA1(ee78cc259e87395df75179bbe5b6e521e762b582) ) |
| 3327 | | ROM_LOAD( "ars1ptru1.16f", 0x480000, 0x080000, CRC(1deb1fc0) SHA1(bfd1dfcaccf5a0f851b6757995fa7195452a3965) ) |
| 3328 | | ROM_LOAD( "ars1ptru2.15f", 0x500000, 0x080000, CRC(bcfad0ba) SHA1(bee7f2f9ecd2b289c6706e19fa86863913b286b5) ) |
| 3329 | | ROM_LOAD( "ars1ptru3.14f", 0x580000, 0x080000, CRC(73ce6958) SHA1(918b0fb0fca33dbe3be3ac679b8b28f58213f75b) ) |
| 3330 | | |
| 3331 | | ROM_REGION( 0x1000000, "c352", 0 ) /* sound samples */ |
| 3332 | | ROM_LOAD( "ars1wavea.2l", 0x000000, 0x400000, CRC(f8d107e9) SHA1(5c418691f0b35403553f21f5570eda8bbb66890f) ) |
| 3333 | | ROM_LOAD( "ars2waveb.1l", 0x800000, 0x400000, CRC(deab4ad1) SHA1(580ad88d516280baaf6cc92b2e07cdc0cfc486f3) ) |
| 3334 | | |
| 3335 | | ROM_REGION( 0x4000, "nvram", 0 ) // default eeprom |
| 3336 | | ROM_LOAD( "alpiner2_defaults.nv", 0x0000, 0x4000, CRC(1d660b8b) SHA1(e6047ad2d61fa55e8f054813f5c705fd7d145a73) ) |
| 3922 | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 3923 | ROM_LOAD( "rr1gam.2d", 0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3924 | ROM_LOAD( "rr1gam.3d", 0x0100, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3925 | ROM_LOAD( "rr1gam.4d", 0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3337 | 3926 | ROM_END |
| 3338 | 3927 | |
| 3339 | | ROM_START( alpinr2a ) |
| 3340 | | ROM_REGION( 0x800000, "maincpu", 0 ) /* main program */ |
| 3341 | | ROM_LOAD32_BYTE( "ars2ver-a.2", 0x000003, 0x200000, CRC(b07b15a4) SHA1(ea3b2d7b4ef4ccf3aafeef7e7eac92e8d446f4e7) ) |
| 3342 | | ROM_LOAD32_BYTE( "ars2ver-a.3", 0x000002, 0x200000, CRC(90a92e40) SHA1(bf8083256e56e7e33e61b4cdaf9fd03dabfb36ba) ) |
| 3343 | | ROM_LOAD32_BYTE( "ars2ver-a.4", 0x000001, 0x200000, CRC(9e9d771d) SHA1(6fb983e3f4f8233544667b1bbf87864e4fb8698c) ) |
| 3344 | | ROM_LOAD32_BYTE( "ars2ver-a.5", 0x000000, 0x200000, CRC(e93c7771) SHA1(305f35488a55be1b845702df972bba8334c0726c) ) |
| 3928 | ROM_START( ridgeracb ) |
| 3929 | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 3930 | ROM_LOAD32_BYTE( "rr1prll.4d", 0x00003, 0x80000, CRC(4bb7fc86) SHA1(8291375b8ec4d37e0d9e3bf38da2d5907b0f31bd) ) |
| 3931 | ROM_LOAD32_BYTE( "rr1prlm.2d", 0x00002, 0x80000, CRC(68e13830) SHA1(ddc447c7afbb5c4238969d7e78bfe9cf8fac6061) ) |
| 3932 | ROM_LOAD32_BYTE( "rr1prum.8d", 0x00001, 0x80000, CRC(705ef78a) SHA1(881903413e66d6fd83d46eb18c4e1230531832ae) ) |
| 3933 | ROM_LOAD32_BYTE( "rr2pruu.6d", 0x00000, 0x80000, CRC(a79e456f) SHA1(049c596e01e53e3a401c5c4260517f170688d387) ) |
| 3345 | 3934 | |
| 3346 | 3935 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 3347 | 3936 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| r24771 | r24772 | |
| 3349 | 3938 | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 3350 | 3939 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 3351 | 3940 | |
| 3352 | | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* S22-BIOS ver1.30 */ |
| 3353 | | ROM_LOAD( "ars2data.8k", 0x000000, 0x080000, CRC(29b36dcb) SHA1(70fde130c11789c822829493a70ecefb077c0c15) ) |
| 3941 | ROM_REGION16_LE( 0x4000, "iomcu", 0 ) /* I/O MCU BIOS */ |
| 3942 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3354 | 3943 | |
| 3355 | | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 3356 | | ROM_LOAD( "ars1scg0.12f", 0x000000, 0x200000, CRC(bc49ed86) SHA1(289b39f2cb21c723dbe4ddd64ee4b2c5fa65c368) ) |
| 3944 | ROM_REGION16_LE( 0x4000, "mcu_c74", 0 ) /* SUB/SOUND MCU BIOS */ |
| 3945 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3357 | 3946 | |
| 3358 | | ROM_REGION( 0xc00000, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 3359 | | ROM_LOAD( "ars1cg0.8d", 0x000000, 0x200000, CRC(74f4515c) SHA1(1e3a96281d543213d10c962b4d387c414d76e0c3) ) |
| 3360 | | ROM_LOAD( "ars1cg1.10d", 0x200000, 0x200000, CRC(329a95c1) SHA1(2cad7fd9e5ca7c64729ca2548ef4f873a0b8de64) ) |
| 3361 | | ROM_LOAD( "ars1cg2.12d", 0x400000, 0x200000, CRC(5648345a) SHA1(0dc7aedba65b7d97687a9e38a63597f16cee6179) ) |
| 3362 | | ROM_LOAD( "ars1cg3.13d", 0x600000, 0x200000, CRC(a752f205) SHA1(373b5a69e4488bc30763568ceae512ab7039f5f8) ) |
| 3363 | | ROM_LOAD( "ars1cg4.14d", 0x800000, 0x200000, CRC(54bf35b6) SHA1(aec43b66e7597ad7d113ae785417bf26164c1bca) ) |
| 3364 | | ROM_LOAD( "ars1cg5.16d", 0xa00000, 0x200000, CRC(e24a19a2) SHA1(34c1b51eea954ae3000602e550eb1cef0a10e651) ) |
| 3947 | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 3948 | ROM_LOAD( "rr1data.6r", 0, 0x080000, CRC(18f5f748) SHA1(e0d149a66de36156edd9b55f604c9a9801aaefa8) ) |
| 3365 | 3949 | |
| 3950 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 3951 | ROM_LOAD( "rr1cg0.bin", 0x200000*0x4, 0x200000, CRC(b557a795) SHA1(f345486ffbe797246ad80a55d3c4a332ed6e2888) )//,CRC(d1b0eec6) SHA1(f66922c324dfc3ff408db7556c587ef90ca64c3b) ) |
| 3952 | ROM_LOAD( "rr1cg1.bin", 0x200000*0x5, 0x200000, CRC(0fa212d9) SHA1(a1311de0a504e2d399044fa8ac32ec6c56ec965f) )//,CRC(bb695d89) SHA1(557bac9d2718519c1f69e374d0ef9a86a43fe86c) ) |
| 3953 | ROM_LOAD( "rr1cg2.bin", 0x200000*0x6, 0x200000, CRC(18e2d2bd) SHA1(69c2ea62eeb255f27d3c69373f6716b0a34683cc) )//,CRC(8f374c0a) SHA1(94ff8581de11a03ef86525155f8433bf5858b980) ) |
| 3954 | ROM_LOAD( "rr1cg3.bin", 0x200000*0x7, 0x200000, CRC(9564488b) SHA1(6b27d1aea75d6be747c62e165cfa49ecc5d9e767) )//,CRC(072a5c47) SHA1(86b8e973ae6b78197d685fe6d14722d8e2d0dfec) ) |
| 3955 | |
| 3366 | 3956 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 3367 | | ROM_LOAD( "ars1ccrl.3d", 0x000000, 0x200000, CRC(fc8c9161) SHA1(ad0fcfae27e02d68a6f8d1d03c514dc2f12d9ee8) ) |
| 3368 | | ROM_LOAD( "ars1ccrh.1d", 0x200000, 0x080000, CRC(a17660bb) SHA1(bae2c3f20772c6cea99f271ee3f39b1f999038c6) ) |
| 3957 | ROM_LOAD( "rr1ccrl.bin",0x000000, 0x200000, CRC(6092d181) SHA1(52c0e3ac20aa23059a87d1a985d24ae641577310) )//,CRC(c15cb257) SHA1(0cb8f231c62ea37955be5d452a436a6e815af8e8) ) |
| 3958 | ROM_LOAD( "rr1ccrh.bin",0x200000, 0x080000, CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) )//,CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) ) |
| 3369 | 3959 | |
| 3370 | | ROM_REGION( 0x80000*12, "pointrom", 0 ) /* 3d model data */ |
| 3371 | | ROM_LOAD( "ars1ptrl0.18k", 0x000000, 0x080000, CRC(f04e0e61) SHA1(d58a1d3ca1d0922e134db21a04feaee7dc97b020) ) |
| 3372 | | ROM_LOAD( "ars1ptrl1.16k", 0x080000, 0x080000, CRC(8bdb4970) SHA1(a504cd4beca4bedd1a7a228c83dd6b844ca3a1e0) ) |
| 3373 | | ROM_LOAD( "ars1ptrl2.15k", 0x100000, 0x080000, CRC(ec993a4f) SHA1(883f64e3e8d951415e9cef589c354eba9406c0aa) ) |
| 3374 | | ROM_LOAD( "ars1ptrl3.14k", 0x180000, 0x080000, CRC(4d453f3c) SHA1(7a82e5d8f974d9e56d0031b35e73647fe6aeec2e) ) |
| 3960 | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 3961 | ROM_LOAD( "rr1potl0.5b", 0x80000*0, 0x80000,CRC(3ac193e3) SHA1(ff213766f15e34dc1b25187b57d94e17930090a3) ) |
| 3962 | ROM_LOAD( "rr1potl1.4b", 0x80000*1, 0x80000,CRC(ac3ffba5) SHA1(4eb4dda5faeff237e0d35725b56d309948fba900) ) |
| 3963 | ROM_LOAD( "rr1potm0.5c", 0x80000*2, 0x80000,CRC(42a3fa08) SHA1(15db0ae7ccf7f5a77b9dd9a9d82a488b67f8aaff) ) |
| 3964 | ROM_LOAD( "rr1potm1.4c", 0x80000*3, 0x80000,CRC(1bc1ea7b) SHA1(52c21eef4989c45acc5fa4deda2d0b63214731c8) ) |
| 3965 | ROM_LOAD( "rr1potu0.5d", 0x80000*4, 0x80000,CRC(5e367f72) SHA1(5887f011379dce865fef238b402678a3d2033de9) ) |
| 3966 | ROM_LOAD( "rr1potu1.4d", 0x80000*5, 0x80000,CRC(31d92475) SHA1(51d3c0baa223e1bc16ea2950f2e085597528f870) ) |
| 3375 | 3967 | |
| 3376 | | ROM_LOAD( "ars1ptrm0.18j", 0x200000, 0x080000, CRC(d1bdc524) SHA1(b898bb38de397551ada4da4677dd733bf8fa5010) ) |
| 3377 | | ROM_LOAD( "ars1ptrm1.16j", 0x280000, 0x080000, CRC(86b81c81) SHA1(45096abf46794f06a4b647f5e4222798d8467632) ) |
| 3378 | | ROM_LOAD( "ars1ptrm2.15j", 0x300000, 0x080000, CRC(24116b83) SHA1(41c6a880abce7b543c409fda767682b2537b0d99) ) |
| 3379 | | ROM_LOAD( "ars1ptrm3.14j", 0x380000, 0x080000, CRC(772bede3) SHA1(f9565b7a40f0bbf11081d619fe5a46feafce2e56) ) |
| 3968 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 3969 | ROM_LOAD( "rr1wav0.10r", 0x100000*0, 0x100000,CRC(a8e85bde) SHA1(b56677e9f6c98f7b600043f5dcfef3a482ca7455) ) |
| 3970 | ROM_LOAD( "rr1wav1.10p", 0x100000*2, 0x100000,CRC(35f47c8e) SHA1(7c3f9e942f532af8008fbead2a96fee6084bcde6) ) |
| 3971 | ROM_LOAD( "rr1wav2.10n", 0x100000*1, 0x100000,CRC(3244cb59) SHA1(b3283b30cfafbfdcbc6d482ecc4ed6a47a527ca4) ) |
| 3972 | ROM_LOAD( "rr1wav3.10l", 0x100000*3, 0x100000,CRC(c4cda1a7) SHA1(60bc96880ec79efdff3cc70c09e848692a40bea4) ) |
| 3380 | 3973 | |
| 3381 | | ROM_LOAD( "ars1ptru0.18f", 0x400000, 0x080000, CRC(a4cf197a) SHA1(ee78cc259e87395df75179bbe5b6e521e762b582) ) |
| 3382 | | ROM_LOAD( "ars1ptru1.16f", 0x480000, 0x080000, CRC(1deb1fc0) SHA1(bfd1dfcaccf5a0f851b6757995fa7195452a3965) ) |
| 3383 | | ROM_LOAD( "ars1ptru2.15f", 0x500000, 0x080000, CRC(bcfad0ba) SHA1(bee7f2f9ecd2b289c6706e19fa86863913b286b5) ) |
| 3384 | | ROM_LOAD( "ars1ptru3.14f", 0x580000, 0x080000, CRC(73ce6958) SHA1(918b0fb0fca33dbe3be3ac679b8b28f58213f75b) ) |
| 3385 | | |
| 3386 | | ROM_REGION( 0x1000000, "c352", 0 ) /* sound samples */ |
| 3387 | | ROM_LOAD( "ars1wavea.2l", 0x000000, 0x400000, CRC(f8d107e9) SHA1(5c418691f0b35403553f21f5570eda8bbb66890f) ) |
| 3388 | | ROM_LOAD( "ars2waveb.1l", 0x800000, 0x400000, CRC(deab4ad1) SHA1(580ad88d516280baaf6cc92b2e07cdc0cfc486f3) ) |
| 3389 | | |
| 3390 | | ROM_REGION( 0x4000, "nvram", 0 ) // default eeprom |
| 3391 | | ROM_LOAD( "alpiner2_defaults.nv", 0x0000, 0x4000, CRC(1d660b8b) SHA1(e6047ad2d61fa55e8f054813f5c705fd7d145a73) ) |
| 3974 | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 3975 | ROM_LOAD( "rr1gam.2d", 0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3976 | ROM_LOAD( "rr1gam.3d", 0x0100, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3977 | ROM_LOAD( "rr1gam.4d", 0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3392 | 3978 | ROM_END |
| 3393 | 3979 | |
| 3394 | | ROM_START( alpinesa ) |
| 3395 | | ROM_REGION( 0x800000, "maincpu", 0 ) /* main program */ |
| 3396 | | ROM_LOAD32_BYTE( "af2ver-a_ll.ic2", 0x000003, 0x200000, CRC(e776159d) SHA1(5110364afb7ec606074d58a1d216d7d687b9df62) ) |
| 3397 | | ROM_LOAD32_BYTE( "af2ver-a_lm.ic3", 0x000002, 0x200000, CRC(c5333d38) SHA1(9486cead964f95f8e56dac2f88486f3b98561aa6) ) |
| 3398 | | ROM_LOAD32_BYTE( "af2ver-a_um.ic4", 0x000001, 0x200000, CRC(5977fc6e) SHA1(19b8041789f8987934fa461972976a3570b1b87b) ) |
| 3399 | | ROM_LOAD32_BYTE( "af2ver-a_uu.ic5", 0x000000, 0x200000, CRC(54ee33a1) SHA1(0eaa8707ab13a0a66551f61a08986c98f5c9e446) ) |
| 3980 | ROM_START( ridgeracj ) |
| 3981 | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 3982 | ROM_LOAD32_BYTE( "rr1prll.4d", 0x00003, 0x80000, CRC(4bb7fc86) SHA1(8291375b8ec4d37e0d9e3bf38da2d5907b0f31bd) ) |
| 3983 | ROM_LOAD32_BYTE( "rr1prlm.2d", 0x00002, 0x80000, CRC(68e13830) SHA1(ddc447c7afbb5c4238969d7e78bfe9cf8fac6061) ) |
| 3984 | ROM_LOAD32_BYTE( "rr1prum.8d", 0x00001, 0x80000, CRC(705ef78a) SHA1(881903413e66d6fd83d46eb18c4e1230531832ae) ) |
| 3985 | ROM_LOAD32_BYTE( "rr1pruu.6d", 0x00000, 0x80000, CRC(c1371f96) SHA1(a78e0bf6c147c034487a85efa0a8470f4e8f4bf0) ) |
| 3400 | 3986 | |
| 3401 | 3987 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 3402 | 3988 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| r24771 | r24772 | |
| 3404 | 3990 | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 3405 | 3991 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 3406 | 3992 | |
| 3407 | | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* S22-BIOS ver1.41 */ |
| 3408 | | ROM_LOAD( "af1data.8k", 0x000000, 0x080000, CRC(ef13ebe8) SHA1(5d3f697994d4b5b19ee7fea1e2aef8e39449b68e) ) |
| 3993 | ROM_REGION16_LE( 0x4000, "iomcu", 0 ) /* I/O MCU BIOS */ |
| 3994 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3409 | 3995 | |
| 3410 | | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 3411 | | ROM_LOAD( "af1scg0b.12f", 0x000000, 0x200000, CRC(46a6222a) SHA1(5322ef60690625b9b8dbe1cfe0c49dcd9c8b1a4c) ) |
| 3996 | ROM_REGION16_LE( 0x4000, "mcu_c74", 0 ) /* SUB/SOUND MCU BIOS */ |
| 3997 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3412 | 3998 | |
| 3413 | | ROM_REGION( 0x200000*5, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 3414 | | ROM_LOAD( "af1cg0.8d", 0x200000*0, 0x200000, CRC(7423f3ff) SHA1(6a2fd44823ef46111deb57d328b1b75cc355d413) ) |
| 3415 | | ROM_LOAD( "af1cg1.10d", 0x200000*1, 0x200000, CRC(ea76689a) SHA1(73dd3af737a3e9903abe5ed9c9ae7eded51d8350) ) |
| 3416 | | ROM_LOAD( "af1cg2.12d", 0x200000*2, 0x200000, CRC(2a38943a) SHA1(15d737996f49bf6374ef6191bbfbe0298d398378) ) |
| 3417 | | ROM_LOAD( "af1cg3.13d", 0x200000*3, 0x200000, CRC(7f5a3e0f) SHA1(241f9995323b28df23d20a75e1f43ce6e05434cd) ) |
| 3418 | | ROM_LOAD( "af1cg4.14d", 0x200000*4, 0x200000, CRC(a5ee13e2) SHA1(48fd3c912690f21cbbc2a39bed0a82be41a0d011) ) |
| 3999 | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 4000 | ROM_LOAD( "rr1data.6r", 0, 0x080000, CRC(18f5f748) SHA1(e0d149a66de36156edd9b55f604c9a9801aaefa8) ) |
| 3419 | 4001 | |
| 4002 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 4003 | ROM_LOAD( "rr1cg0.bin", 0x200000*0x4, 0x200000, CRC(b557a795) SHA1(f345486ffbe797246ad80a55d3c4a332ed6e2888) )//,CRC(d1b0eec6) SHA1(f66922c324dfc3ff408db7556c587ef90ca64c3b) ) |
| 4004 | ROM_LOAD( "rr1cg1.bin", 0x200000*0x5, 0x200000, CRC(0fa212d9) SHA1(a1311de0a504e2d399044fa8ac32ec6c56ec965f) )//,CRC(bb695d89) SHA1(557bac9d2718519c1f69e374d0ef9a86a43fe86c) ) |
| 4005 | ROM_LOAD( "rr1cg2.bin", 0x200000*0x6, 0x200000, CRC(18e2d2bd) SHA1(69c2ea62eeb255f27d3c69373f6716b0a34683cc) )//,CRC(8f374c0a) SHA1(94ff8581de11a03ef86525155f8433bf5858b980) ) |
| 4006 | ROM_LOAD( "rr1cg3.bin", 0x200000*0x7, 0x200000, CRC(9564488b) SHA1(6b27d1aea75d6be747c62e165cfa49ecc5d9e767) )//,CRC(072a5c47) SHA1(86b8e973ae6b78197d685fe6d14722d8e2d0dfec) ) |
| 4007 | |
| 3420 | 4008 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 3421 | | ROM_LOAD( "af1ccrl.3d", 0x000000, 0x200000, CRC(6c054698) SHA1(8537607646b183883c5aa4060fb0af640da4af87) ) |
| 3422 | | ROM_LOAD( "af1ccrh.1d", 0x200000, 0x080000, CRC(95a02a27) SHA1(32ee87b76ae9fcec6d825e3cf4d5cbb97db39544) ) |
| 4009 | ROM_LOAD( "rr1ccrl.bin",0x000000, 0x200000, CRC(6092d181) SHA1(52c0e3ac20aa23059a87d1a985d24ae641577310) )//,CRC(c15cb257) SHA1(0cb8f231c62ea37955be5d452a436a6e815af8e8) ) |
| 4010 | ROM_LOAD( "rr1ccrh.bin",0x200000, 0x080000, CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) )//,CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) ) |
| 3423 | 4011 | |
| 3424 | 4012 | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 3425 | | ROM_LOAD( "af1ptrl0.18k", 0x80000*0, 0x80000, CRC(31ce46d3) SHA1(568fb9ee9ac14e613a4fd7668cb38315c10be62b) ) |
| 3426 | | ROM_LOAD( "af1ptrl1.16k", 0x80000*1, 0x80000, CRC(e869bf00) SHA1(b3c3026891ae3958d1774c905e97c3b57a414ea7) ) |
| 3427 | | ROM_LOAD( "af1ptrm0.18j", 0x80000*2, 0x80000, CRC(ef7f4d8a) SHA1(02f77c68004b7dccc99b61126e7d07960eb15028) ) |
| 3428 | | ROM_LOAD( "af1ptrm1.16j", 0x80000*3, 0x80000, CRC(7dd01d52) SHA1(adc1087435d31ed6163ad046466955f01517450f) ) |
| 3429 | | ROM_LOAD( "af1ptru0.18f", 0x80000*4, 0x80000, CRC(177f1591) SHA1(3969e780e5603eca0a65f65c1ad14d1cef918b39) ) |
| 3430 | | ROM_LOAD( "af1ptru1.16f", 0x80000*5, 0x80000, CRC(7521d18e) SHA1(dc03ef369db16f59c138ff4e22260d1c04782d1f) ) |
| 4013 | ROM_LOAD( "rr1potl0.5b", 0x80000*0, 0x80000,CRC(3ac193e3) SHA1(ff213766f15e34dc1b25187b57d94e17930090a3) ) |
| 4014 | ROM_LOAD( "rr1potl1.4b", 0x80000*1, 0x80000,CRC(ac3ffba5) SHA1(4eb4dda5faeff237e0d35725b56d309948fba900) ) |
| 4015 | ROM_LOAD( "rr1potm0.5c", 0x80000*2, 0x80000,CRC(42a3fa08) SHA1(15db0ae7ccf7f5a77b9dd9a9d82a488b67f8aaff) ) |
| 4016 | ROM_LOAD( "rr1potm1.4c", 0x80000*3, 0x80000,CRC(1bc1ea7b) SHA1(52c21eef4989c45acc5fa4deda2d0b63214731c8) ) |
| 4017 | ROM_LOAD( "rr1potu0.5d", 0x80000*4, 0x80000,CRC(5e367f72) SHA1(5887f011379dce865fef238b402678a3d2033de9) ) |
| 4018 | ROM_LOAD( "rr1potu1.4d", 0x80000*5, 0x80000,CRC(31d92475) SHA1(51d3c0baa223e1bc16ea2950f2e085597528f870) ) |
| 3431 | 4019 | |
| 3432 | | ROM_REGION( 0x1000000, "c352", 0 ) /* sound samples */ |
| 3433 | | ROM_LOAD( "af1wavea.2l", 0x000000, 0x400000, CRC(28cca494) SHA1(4ff87ab85fd17bf8dbee5b03d99cc5c31dd6349a) ) |
| 4020 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 4021 | ROM_LOAD( "rr1wav0.10r", 0x100000*0, 0x100000,CRC(a8e85bde) SHA1(b56677e9f6c98f7b600043f5dcfef3a482ca7455) ) |
| 4022 | ROM_LOAD( "rr1wav1.10p", 0x100000*2, 0x100000,CRC(35f47c8e) SHA1(7c3f9e942f532af8008fbead2a96fee6084bcde6) ) |
| 4023 | ROM_LOAD( "rr1wav2.10n", 0x100000*1, 0x100000,CRC(3244cb59) SHA1(b3283b30cfafbfdcbc6d482ecc4ed6a47a527ca4) ) |
| 4024 | ROM_LOAD( "rr1wav3.10l", 0x100000*3, 0x100000,CRC(c4cda1a7) SHA1(60bc96880ec79efdff3cc70c09e848692a40bea4) ) |
| 3434 | 4025 | |
| 3435 | | ROM_REGION( 0x4000, "nvram", 0 ) // default eeprom |
| 3436 | | ROM_LOAD( "alpinesa_defaults.nv", 0x0000, 0x4000, CRC(9744207c) SHA1(bbd34ee138c116d281c718f14740e2883a5cdf49) ) |
| 4026 | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 4027 | ROM_LOAD( "rr1gam.2d", 0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4028 | ROM_LOAD( "rr1gam.3d", 0x0100, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4029 | ROM_LOAD( "rr1gam.4d", 0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3437 | 4030 | ROM_END |
| 3438 | 4031 | |
| 3439 | | ROM_START( cybrcomm ) |
| 4032 | ROM_START( ridgerac3 ) |
| 3440 | 4033 | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 3441 | | ROM_LOAD32_BYTE( "cy1prgll.4d", 0x00003, 0x80000, CRC(b3eab156) SHA1(2a5c4e0360c3b9500687a4d70f7110a0c30da2a5) ) |
| 3442 | | ROM_LOAD32_BYTE( "cy1prglm.2d", 0x00002, 0x80000, CRC(884a5b0e) SHA1(0e27ae366b8a2695fe112b4740c8c9013bb97e26) ) |
| 3443 | | ROM_LOAD32_BYTE( "cy1prgum.8d", 0x00001, 0x80000, CRC(c9c4a921) SHA1(76a52461165a8bd8d984a34063fbeb4cb73624af) ) |
| 3444 | | ROM_LOAD32_BYTE( "cy1prguu.6d", 0x00000, 0x80000, CRC(5f22975b) SHA1(a1a5cb66358d64a3c564b912f2eeafa182786b1e) ) |
| 4034 | ROM_LOAD32_BYTE( "rr3prgll-3s.4d", 0x000003, 0x080000, CRC(2c3d8cb7) SHA1(46a7b62938fe3edde5c52ce3fdfe447000cd6af0) ) |
| 4035 | ROM_LOAD32_BYTE( "rr3prglm-3s.2d", 0x000002, 0x080000, CRC(b15343f2) SHA1(3056eb5a3036a74b2ac641a4c3221986c0be1e27) ) |
| 4036 | ROM_LOAD32_BYTE( "rr3prgum-3s.8d", 0x000001, 0x080000, CRC(8fda06ac) SHA1(7e9adba198eb0941100cda64ecedac504f6ac696) ) |
| 4037 | ROM_LOAD32_BYTE( "rr3prguu-3s.6d", 0x000000, 0x080000, CRC(868398df) SHA1(422e0f9884904b0df93fcacd1468b8da0458eb8e) ) |
| 3445 | 4038 | |
| 3446 | 4039 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 3447 | 4040 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| r24771 | r24772 | |
| 3456 | 4049 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3457 | 4050 | |
| 3458 | 4051 | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 3459 | | ROM_LOAD( "cy1data.6r", 0x00000, 0x20000, CRC(10d0005b) SHA1(10508eeaf74d24a611b44cd3bb12417ceb78904f) ) |
| 3460 | | ROM_RELOAD( 0x20000, 0x20000) |
| 3461 | | ROM_RELOAD( 0x40000, 0x20000) |
| 3462 | | ROM_RELOAD( 0x60000, 0x20000) |
| 4052 | ROM_LOAD( "rr1data.6r", 0, 0x080000, CRC(18f5f748) SHA1(e0d149a66de36156edd9b55f604c9a9801aaefa8) ) |
| 3463 | 4053 | |
| 3464 | 4054 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 3465 | | ROM_LOAD( "cyc1cg0.1a", 0x200000*0x4, 0x200000,CRC(e839b9bd) SHA1(fee43d37dcca7f1fb952a6bfb886b7ee30b7d75c) ) /* cyc1cg0.6a */ |
| 3466 | | ROM_LOAD( "cyc1cg1.2a", 0x200000*0x5, 0x200000,CRC(7d13993f) SHA1(96ac82bcc63afe395bae73f005eb66dad7742d48) ) /* cyc1cg1.7a */ |
| 3467 | | ROM_LOAD( "cyc1cg2.3a", 0x200000*0x6, 0x200000,CRC(7c464566) SHA1(69817ac3a7c6e43b960e8a904962b58b23417163) ) /* cyc1cg2.8a */ |
| 3468 | | ROM_LOAD( "cyc1cg3.5a", 0x200000*0x7, 0x200000,CRC(2222e16f) SHA1(562bcd4d43b1543303d8fd66d9f0d9a8e3702492) ) /* cyc1cg3.9a */ |
| 4055 | ROM_LOAD( "rr1cg0.bin", 0x200000*0x4, 0x200000, CRC(b557a795) SHA1(f345486ffbe797246ad80a55d3c4a332ed6e2888) )//,CRC(d1b0eec6) SHA1(f66922c324dfc3ff408db7556c587ef90ca64c3b) ) |
| 4056 | ROM_LOAD( "rr1cg1.bin", 0x200000*0x5, 0x200000, CRC(0fa212d9) SHA1(a1311de0a504e2d399044fa8ac32ec6c56ec965f) )//,CRC(bb695d89) SHA1(557bac9d2718519c1f69e374d0ef9a86a43fe86c) ) |
| 4057 | ROM_LOAD( "rr1cg2.bin", 0x200000*0x6, 0x200000, CRC(18e2d2bd) SHA1(69c2ea62eeb255f27d3c69373f6716b0a34683cc) )//,CRC(8f374c0a) SHA1(94ff8581de11a03ef86525155f8433bf5858b980) ) |
| 4058 | ROM_LOAD( "rr1cg3.bin", 0x200000*0x7, 0x200000, CRC(9564488b) SHA1(6b27d1aea75d6be747c62e165cfa49ecc5d9e767) )//,CRC(072a5c47) SHA1(86b8e973ae6b78197d685fe6d14722d8e2d0dfec) ) |
| 3469 | 4059 | |
| 3470 | 4060 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 4061 | ROM_LOAD( "rr1ccrl.bin",0x000000, 0x200000, CRC(6092d181) SHA1(52c0e3ac20aa23059a87d1a985d24ae641577310) )//,CRC(c15cb257) SHA1(0cb8f231c62ea37955be5d452a436a6e815af8e8) ) |
| 4062 | ROM_LOAD( "rr1ccrh.bin",0x200000, 0x080000, CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) )//,CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) ) |
| 3471 | 4063 | |
| 3472 | | //cyc1ccrl.1c FIXED BITS (xxxxxxxx11xxxxxx) |
| 3473 | | ROM_LOAD( "cyc1ccrl.1c", 0x000000, 0x100000,CRC(1a0dc5f0) SHA1(bf0093d9cbdcb45a82705e966c48a1f408fa344e) ) /* cyc1ccrl.8c */ |
| 4064 | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 4065 | ROM_LOAD( "rr1potl0.5b", 0x80000*0, 0x80000,CRC(3ac193e3) SHA1(ff213766f15e34dc1b25187b57d94e17930090a3) ) |
| 4066 | ROM_LOAD( "rr1potl1.4b", 0x80000*1, 0x80000,CRC(ac3ffba5) SHA1(4eb4dda5faeff237e0d35725b56d309948fba900) ) |
| 4067 | ROM_LOAD( "rr1potm0.5c", 0x80000*2, 0x80000,CRC(42a3fa08) SHA1(15db0ae7ccf7f5a77b9dd9a9d82a488b67f8aaff) ) |
| 4068 | ROM_LOAD( "rr1potm1.4c", 0x80000*3, 0x80000,CRC(1bc1ea7b) SHA1(52c21eef4989c45acc5fa4deda2d0b63214731c8) ) |
| 4069 | ROM_LOAD( "rr1potu0.5d", 0x80000*4, 0x80000,CRC(5e367f72) SHA1(5887f011379dce865fef238b402678a3d2033de9) ) |
| 4070 | ROM_LOAD( "rr1potu1.4d", 0x80000*5, 0x80000,CRC(31d92475) SHA1(51d3c0baa223e1bc16ea2950f2e085597528f870) ) |
| 3474 | 4071 | |
| 3475 | | //cyc1ccrh.2c 1xxxxxxxxxxxxxxxxxx = 0xFF |
| 3476 | | ROM_LOAD( "cyc1ccrh.2c", 0x200000, 0x080000,CRC(8c4090b8) SHA1(456d548a48833e840c5d39d47b2dcca03f8d6321) ) /* cyc1ccrh.7c */ |
| 3477 | | |
| 3478 | | ROM_REGION( 0x80000*9, "pointrom", 0 ) /* 3d model data */ |
| 3479 | | ROM_LOAD( "cyc1ptl0.5b", 0x80000*0x0, 0x80000,CRC(d91de03d) SHA1(05819d285f6111867c41337bda9c4b9ad5394b6b) ) |
| 3480 | | ROM_LOAD( "cyc1ptl1.4b", 0x80000*0x1, 0x80000,CRC(e5b98021) SHA1(7416cbf74da969f822e0363ced7a25b967277e28) ) |
| 3481 | | ROM_LOAD( "cyc1ptl2.3b", 0x80000*0x2, 0x80000,CRC(7ba786c6) SHA1(1a5319dec495453bab9d70ae773a807f0036b355) ) |
| 3482 | | ROM_LOAD( "cyc1ptm0.5c", 0x80000*0x3, 0x80000,CRC(d454b5c6) SHA1(95ae6f0455e9fd7dff066e74cd4343c94d1bc212) ) |
| 3483 | | ROM_LOAD( "cyc1ptm1.4c", 0x80000*0x4, 0x80000,CRC(74fdf8cc) SHA1(f2627f400e247b6d4c4157eaf0ec69d57212e566) ) |
| 3484 | | ROM_LOAD( "cyc1ptm2.3c", 0x80000*0x5, 0x80000,CRC(b9c99a45) SHA1(c86cf594b416776eaf9a32c3cb9d34acc79777e9) ) |
| 3485 | | ROM_LOAD( "cyc1ptu0.5d", 0x80000*0x6, 0x80000,CRC(4d40897f) SHA1(ffe2a0ab66443553c83512f9a1be94b2e385cf2f) ) |
| 3486 | | ROM_LOAD( "cyc1ptu1.4d", 0x80000*0x7, 0x80000,CRC(3bdaeeeb) SHA1(826f97e2165af8569cfec03874b16030a9486559) ) |
| 3487 | | ROM_LOAD( "cyc1ptu2.3d", 0x80000*0x8, 0x80000,CRC(a0e73674) SHA1(1e22142a564e664031c12b250664fc82e3b3d43b) ) |
| 3488 | | |
| 3489 | 4072 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 3490 | | ROM_LOAD( "cy1wav0.10r", 0x000000, 0x100000, CRC(c6f366a2) SHA1(795dbee09df159d3501c748fb3de16cca81742d6) ) |
| 3491 | | ROM_LOAD( "cy1wav1.10p", 0x200000, 0x100000, CRC(f30b5e37) SHA1(9f5a94d82741ef9688c6e415ebb9009c906737c9) ) |
| 3492 | | ROM_LOAD( "cy1wav2.10n", 0x100000, 0x100000, CRC(b98c1ca6) SHA1(4b66aa05f82be5ef3315acc30031872698ff4391) ) |
| 3493 | | ROM_LOAD( "cy1wav3.10l", 0x300000, 0x100000, CRC(43dbac19) SHA1(83fd4ae4e7ec264fc217ed18caf59bf438af0c3d) ) |
| 4073 | ROM_LOAD( "rr1wav0.10r", 0x100000*0, 0x100000,CRC(a8e85bde) SHA1(b56677e9f6c98f7b600043f5dcfef3a482ca7455) ) |
| 4074 | ROM_LOAD( "rr1wav1.10p", 0x100000*2, 0x100000,CRC(35f47c8e) SHA1(7c3f9e942f532af8008fbead2a96fee6084bcde6) ) |
| 4075 | ROM_LOAD( "rr1wav2.10n", 0x100000*1, 0x100000,CRC(3244cb59) SHA1(b3283b30cfafbfdcbc6d482ecc4ed6a47a527ca4) ) |
| 4076 | ROM_LOAD( "rr1wav3.10l", 0x100000*3, 0x100000,CRC(c4cda1a7) SHA1(60bc96880ec79efdff3cc70c09e848692a40bea4) ) |
| 3494 | 4077 | |
| 3495 | 4078 | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 3496 | 4079 | ROM_LOAD( "rr1gam.2d", 0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3497 | 4080 | ROM_LOAD( "rr1gam.3d", 0x0100, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3498 | 4081 | ROM_LOAD( "rr1gam.4d", 0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3499 | | |
| 3500 | | ROM_REGION( 0x2000, "nvram", 0 ) // default eeprom |
| 3501 | | ROM_LOAD( "cy1eeprm.9e", 0x0000, 0x2000, CRC(8432c066) SHA1(99d4bfda3f8aec288dbeaf291bce85fe9009a1de) ) |
| 3502 | 4082 | ROM_END |
| 3503 | 4083 | |
| 3504 | | ROM_START( cybrcycc ) |
| 3505 | | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 3506 | | ROM_LOAD32_BYTE( "cb2ver-c.1", 0x00003, 0x100000, CRC(a8e07a14) SHA1(9bef7068c9bf792960df922ea79e4565d7680433) ) |
| 3507 | | ROM_LOAD32_BYTE( "cb2ver-c.2", 0x00002, 0x100000, CRC(054c504f) SHA1(9bde803ff09be0402f9b0388e55407362a2508e3) ) |
| 3508 | | ROM_LOAD32_BYTE( "cb2ver-c.3", 0x00001, 0x100000, CRC(47e6306c) SHA1(39d6fc2c3cb9b4c9d3569cedb79b916a90537115) ) |
| 3509 | | ROM_LOAD32_BYTE( "cb2ver-c.4", 0x00000, 0x100000, CRC(398426e4) SHA1(f20cd4892420e7b978baa51c9129b362422a3895) ) |
| 4084 | ROM_START( ridgeracf ) |
| 4085 | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 4086 | ROM_LOAD32_BYTE( "rrf2prgll.4d", 0x00003, 0x80000, CRC(23c6144d) SHA1(99f70e2c60fba7551cafdce12b07da1f8ab8aad6) ) |
| 4087 | ROM_LOAD32_BYTE( "rrf2prglm.2d", 0x00002, 0x80000, CRC(1ad638a1) SHA1(505a7f4ba60bbc4e735865fbc5d664311b6045d9) ) |
| 4088 | ROM_LOAD32_BYTE( "rrf2prgum.8d", 0x00001, 0x80000, CRC(d7e0aa16) SHA1(cab4578cdd3af84b865114be4105cfdc2e7abf36) ) |
| 4089 | ROM_LOAD32_BYTE( "rrf2prguu.6d", 0x00000, 0x80000, CRC(12c808bb) SHA1(64e84686d4ceb8145b9a59b75d0dced830884c9d) ) |
| 3510 | 4090 | |
| 3511 | 4091 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 3512 | 4092 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| r24771 | r24772 | |
| 3514 | 4094 | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 3515 | 4095 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 3516 | 4096 | |
| 3517 | | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* S22-BIOS ver1.30 */ |
| 3518 | | ROM_LOAD( "cb1datab.8k", 0, 0x080000, CRC(e2404221) SHA1(b88810dd45aee8a5475c30806cdfded25fa14e0e) ) |
| 4097 | ROM_REGION16_LE( 0x4000, "iomcu", 0 ) /* I/O MCU BIOS */ |
| 4098 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3519 | 4099 | |
| 3520 | | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 3521 | | ROM_LOAD( "cb1scg0.12f", 0x200000*0, 0x200000,CRC(7aaca90d) SHA1(9808819db5d86d555a03bb20a2fbedf060d04f0e) ) /* identical to "cb1scg0.12l" */ |
| 4100 | ROM_REGION16_LE( 0x4000, "mcu_c74", 0 ) /* SUB/SOUND MCU BIOS */ |
| 4101 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3522 | 4102 | |
| 3523 | | ROM_REGION( 0x200000*7, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 3524 | | ROM_LOAD( "cb1cg0.12b", 0x200000*0x0, 0x200000,CRC(762a47a0) SHA1(8a49c700dca7afec5d8d6a38fedcd3ad4b0e6713) ) /* identical to "cb1cg0.8d" */ |
| 3525 | | ROM_LOAD( "cb1cg1.10d", 0x200000*0x1, 0x200000,CRC(df92c3e6) SHA1(302d7ee7e073a45e7baa948543bd30251f903a6d) ) /* identical to "cb1cg1.13b" */ |
| 3526 | | ROM_LOAD( "cb1cg2.12d", 0x200000*0x2, 0x200000,CRC(07bc508e) SHA1(7675694d10b50e57bb10b350559bd321df75d1ea) ) /* identical to "cb1cg2.14b" */ |
| 3527 | | ROM_LOAD( "cb1cg3.13d", 0x200000*0x3, 0x200000,CRC(50c86dea) SHA1(7837a1d2bd3ade470f7fbc732513dd598badd219) ) /* identical to "cb1cg3.16b" */ |
| 3528 | | ROM_LOAD( "cb1cg4.14d", 0x200000*0x4, 0x200000,CRC(e93b8894) SHA1(4d28b557b7ed2667e6af9f970f3e99cda785b940) ) /* identical to "cb1cg4.18b" */ |
| 3529 | | ROM_LOAD( "cb1cg5.16d", 0x200000*0x5, 0x200000,CRC(9ee610a1) SHA1(ebc7892b6a66461ca6b6b912a264da1594340b2d) ) /* identical to "cb1cg5.19b" */ |
| 3530 | | ROM_LOAD( "cb1cg6.18a", 0x200000*0x6, 0x200000,CRC(ddc3b5cc) SHA1(34edffee9eb6fbf4a00fce0da34d9354b1a1155f) ) /* identical to "cb1cg6.18d" */ |
| 4103 | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 4104 | ROM_LOAD( "rrf1data.6r", 0, 0x080000, CRC(ce3c6ed6) SHA1(23e033364bc967c10c49fd1d5413dda837670633) ) |
| 3531 | 4105 | |
| 3532 | | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 3533 | | ROM_LOAD( "cb1ccrl.3d", 0x000000, 0x200000,CRC(2f171c48) SHA1(52b76213e37379b4a5cea7de40cf5396dc2998d8) ) /* identical to "cb1ccrl.7b" */ |
| 3534 | | ROM_LOAD( "cb1ccrh.1d", 0x200000, 0x080000,CRC(86124b93) SHA1(f2cfd726313cbeff162d402a15de2360377630e7) ) /* identical to "cb1ccrh.5b" */ |
| 4106 | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 4107 | ROM_LOAD( "rrf2potl0.l0", 0x80000*0, 0x80000, CRC(9b762e60) SHA1(50b67ff6678bacba140bad3aedda75c30851fa7a) ) |
| 4108 | ROM_LOAD( "rrf2potl1.l1", 0x80000*1, 0x80000, CRC(ab4d66b0) SHA1(59020b3dc2efff99cd528752ca7168b64ae96ac4) ) |
| 4109 | ROM_LOAD( "rrf2potm0.m0", 0x80000*2, 0x80000, CRC(02d4daa3) SHA1(9b4e48d3234cb91146b5d31ffcf42ad199ccb903) ) |
| 4110 | ROM_LOAD( "rrf2potm1.m1", 0x80000*3, 0x80000, CRC(37e005c2) SHA1(036ae1c44aaa6a6904e6d4938572035ccc6854ed) ) |
| 4111 | ROM_LOAD( "rrf2potu0.u0", 0x80000*4, 0x80000, CRC(86b3fe98) SHA1(f242d33f7488e233ccdc0b5d309c64510d7a622d) ) |
| 4112 | ROM_LOAD( "rrf2potu1.u1", 0x80000*5, 0x80000, CRC(e0c6ce3d) SHA1(cc559a2237ccb753cb1397fecba64733455a8c43) ) |
| 3535 | 4113 | |
| 3536 | | ROM_REGION( 0x80000*12, "pointrom", 0 ) /* 3d model data */ |
| 3537 | | ROM_LOAD( "cb1ptrl0.18k", 0x80000*0x0, 0x80000,CRC(f1393a03) SHA1(c9e808601eef5839e6bff630e5f83380e073c5c0) ) |
| 3538 | | ROM_LOAD( "cb1ptrl1.16k", 0x80000*0x1, 0x80000,CRC(2ad51de7) SHA1(efd102b960ca10cda70da84661acf61e4bbb9f00) ) |
| 3539 | | ROM_LOAD( "cb1ptrl2.15k", 0x80000*0x2, 0x80000,CRC(78f77c0d) SHA1(5183a8909c2ac0a3d80e707393bcbb4441d79a3c) ) |
| 3540 | | ROM_LOAD( "cb1ptrl3.14k", 0x80000*0x3, 0x80000,CRC(804bfb4a) SHA1(74b3fc3931265398e23605d3da7ca84a002da632) ) |
| 3541 | | ROM_LOAD( "cb1ptrm0.18j", 0x80000*0x4, 0x80000,CRC(f4eece49) SHA1(3f34d1ae5986f0d340563ab0fb637bfdacb8712c) ) |
| 3542 | | ROM_LOAD( "cb1ptrm1.16j", 0x80000*0x5, 0x80000,CRC(5f3cbd7d) SHA1(d00d0a96b71d6a3b98907c4ba7c702e549dd0adb) ) |
| 3543 | | ROM_LOAD( "cb1ptrm2.15j", 0x80000*0x6, 0x80000,CRC(02c7e4af) SHA1(6a541a28163b1026a824f6f8aed05d0eb0c8ae93) ) |
| 3544 | | ROM_LOAD( "cb1ptrm3.14j", 0x80000*0x7, 0x80000,CRC(ace3123b) SHA1(2b590ed967572d77b3cc6b37e341a5bdc55c762f) ) |
| 3545 | | ROM_LOAD( "cb1ptru0.18f", 0x80000*0x8, 0x80000,CRC(58d35341) SHA1(a5fe00bdcf39521f0465743664ff0dd78be5d6e8) ) |
| 3546 | | ROM_LOAD( "cb1ptru1.16f", 0x80000*0x9, 0x80000,CRC(f4d005b0) SHA1(0862ed1dd0818bfb765d97f1f9d996c321b0ec83) ) |
| 3547 | | ROM_LOAD( "cb1ptru2.15f", 0x80000*0xa, 0x80000,CRC(68ffcd50) SHA1(5ca5f71b6b079fde14d76c869d211a815bffae68) ) |
| 3548 | | ROM_LOAD( "cb1ptru3.14f", 0x80000*0xb, 0x80000,CRC(d89c1c2b) SHA1(9c25df696b2d120ce33d7774381460297740007a) ) |
| 3549 | | |
| 3550 | 4114 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 3551 | | ROM_LOAD( "cb1wavea.2l", 0x000000, 0x400000, CRC(b79a624d) SHA1(c0ee358a183ba6d0835731dbdd191b64718fde6e) ) |
| 3552 | | ROM_LOAD( "cb1waveb.1l", 0x800000, 0x200000, CRC(33bf08f6) SHA1(bf9d68b26a8158ea1abfe8428b7454cac25242c5) ) |
| 4115 | ROM_LOAD( "rrf1wave0.10r", 0x100000*0, 0x100000,CRC(a8e85bde) SHA1(b56677e9f6c98f7b600043f5dcfef3a482ca7455) ) |
| 4116 | ROM_LOAD( "rrf1wave1.10p", 0x100000*2, 0x100000,CRC(35f47c8e) SHA1(7c3f9e942f532af8008fbead2a96fee6084bcde6) ) |
| 4117 | ROM_LOAD( "rrf1wave2.10n", 0x100000*1, 0x100000,CRC(4ceeae12) SHA1(ae3a6583f8912bc784c7bc63d32448228cf217ba) ) // differs from normal sets |
| 4118 | ROM_LOAD( "rrf1wave3.10l", 0x100000*3, 0x100000,CRC(c4cda1a7) SHA1(60bc96880ec79efdff3cc70c09e848692a40bea4) ) |
| 3553 | 4119 | |
| 3554 | | ROM_REGION( 0x4000, "nvram", 0 ) // default eeprom |
| 3555 | | ROM_LOAD( "cybrcycc_defaults.nv", 0x0000, 0x4000, CRC(1ef95c25) SHA1(26b8bead9d62a420ee0ff770df83c4207a963065) ) |
| 4120 | /* this stuff was missing from this version, and shouldn't be the same (bad textures if we use these roms) */ |
| 4121 | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 4122 | ROM_LOAD( "rrf1gam.2d", 0x0000, 0x0100, BAD_DUMP CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4123 | ROM_LOAD( "rrf1gam.3d", 0x0100, 0x0100, BAD_DUMP CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4124 | ROM_LOAD( "rrf1gam.4d", 0x0200, 0x0100, BAD_DUMP CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4125 | |
| 4126 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 4127 | ROM_LOAD( "rrf1cg0.bin", 0x200000*0x4, 0x200000, BAD_DUMP CRC(b557a795) SHA1(f345486ffbe797246ad80a55d3c4a332ed6e2888) ) |
| 4128 | ROM_LOAD( "rrf1cg1.bin", 0x200000*0x5, 0x200000, BAD_DUMP CRC(0fa212d9) SHA1(a1311de0a504e2d399044fa8ac32ec6c56ec965f) ) |
| 4129 | ROM_LOAD( "rrf1cg2.bin", 0x200000*0x6, 0x200000, BAD_DUMP CRC(18e2d2bd) SHA1(69c2ea62eeb255f27d3c69373f6716b0a34683cc) ) |
| 4130 | ROM_LOAD( "rrf1cg3.bin", 0x200000*0x7, 0x200000, BAD_DUMP CRC(9564488b) SHA1(6b27d1aea75d6be747c62e165cfa49ecc5d9e767) ) |
| 4131 | |
| 4132 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 4133 | ROM_LOAD( "rrf1ccrl.bin",0x000000, 0x200000, BAD_DUMP CRC(6092d181) SHA1(52c0e3ac20aa23059a87d1a985d24ae641577310) ) |
| 4134 | ROM_LOAD( "rrf1ccrh.bin",0x200000, 0x080000, BAD_DUMP CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) ) |
| 3556 | 4135 | ROM_END |
| 3557 | 4136 | |
| 3558 | | ROM_START( propcycl ) |
| 3559 | | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 3560 | | ROM_LOAD32_BYTE( "pr2ver-a.1", 0x00003, 0x100000, CRC(3f58594c) SHA1(5fdd8c61b47b51088a201799ce0c2f08c32ef852) ) |
| 3561 | | ROM_LOAD32_BYTE( "pr2ver-a.2", 0x00002, 0x100000, CRC(c0da354a) SHA1(f27a71a62385b842404fcd8ed6513158e3639b8f) ) |
| 3562 | | ROM_LOAD32_BYTE( "pr2ver-a.3", 0x00001, 0x100000, CRC(74bf4b74) SHA1(02713aa07238cc9e30163ae24d12c034aa972ff3) ) |
| 3563 | | ROM_LOAD32_BYTE( "pr2ver-a.4", 0x00000, 0x100000, CRC(cf4d5638) SHA1(2ddd00d6ec3b85c234820507650d201e176c94a2) ) |
| 3564 | 4137 | |
| 4138 | ROM_START( ridgera2 ) |
| 4139 | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 4140 | ROM_LOAD32_BYTE( "rrs2prll.4d", 0x00003, 0x80000, CRC(88199c0f) SHA1(5cf5bb714c3d209943a8d815eaea60afd34641ff) ) |
| 4141 | ROM_LOAD32_BYTE( "rrs1prlmb.2d", 0x00002, 0x80000, CRC(8e86f199) SHA1(7bd9ec9147ef0380864508f66203ef2c6ad1f7f6) ) |
| 4142 | ROM_LOAD32_BYTE( "rrs1prumb.8d", 0x00001, 0x80000, CRC(78c360b6) SHA1(8ee502291359cbc8aef39145c8fe7538311cc58f) ) |
| 4143 | ROM_LOAD32_BYTE( "rrs1pruub.6d", 0x00000, 0x80000, CRC(60d6d4a4) SHA1(759762a9b7d7aee7ee1b44b1721e5356898aa7ea) ) |
| 4144 | |
| 3565 | 4145 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 3566 | 4146 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 3567 | 4147 | |
| 3568 | 4148 | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 3569 | 4149 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 3570 | 4150 | |
| 3571 | | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* SS22-BIOS ver1.41 */ |
| 3572 | | ROM_LOAD( "pr1data.8k", 0, 0x080000, CRC(2e5767a4) SHA1(390bf05c90044d841fe2dd4a427177fa1570b9a6) ) |
| 4151 | ROM_REGION16_LE( 0x4000, "iomcu", 0 ) /* I/O MCU BIOS */ |
| 4152 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3573 | 4153 | |
| 3574 | | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 3575 | | ROM_LOAD( "pr1scg0.12f", 0x200000*0, 0x200000,CRC(2d09a869) SHA1(ce8beabaac255e1de29d944c9866022bad713519) ) /* identical to "pr1scg0.12l" */ |
| 3576 | | ROM_LOAD( "pr1scg1.10f", 0x200000*1, 0x200000,CRC(7433c5bd) SHA1(a8fd4e73de66e3d443c0cb5b5beef8f467014815) ) /* identical to "pr1scg1.10l" */ |
| 4154 | ROM_REGION16_LE( 0x4000, "mcu_c74", 0 ) /* SUB/SOUND MCU BIOS */ |
| 4155 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3577 | 4156 | |
| 4157 | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 4158 | ROM_LOAD( "rrs1data.6r", 0, 0x080000, CRC(b7063aa8) SHA1(08ff689e8dd529b91eee423c93f084945c6de417) ) |
| 4159 | |
| 3578 | 4160 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 3579 | | ROM_LOAD( "pr1cg0.12b", 0x200000*0x0, 0x200000,CRC(0a041238) SHA1(da5688970432f7fe39337ee9fb46ca25a53fdb11) ) /* identical to "pr1cg0.8d" */ |
| 3580 | | ROM_LOAD( "pr1cg1.10d", 0x200000*0x1, 0x200000,CRC(7d09e6a7) SHA1(892317ee0bd796fa5c70d64912ef2e696792a2d4) ) /* identical to "pr1cg1.13b" */ |
| 3581 | | ROM_LOAD( "pr1cg2.12d", 0x200000*0x2, 0x200000,CRC(659f006e) SHA1(23362a922cb1100950181fac4858b953d8fc0794) ) /* identical to "pr1cg2.14b" */ |
| 3582 | | ROM_LOAD( "pr1cg3.13d", 0x200000*0x3, 0x200000,CRC(d30bffa3) SHA1(2f05227d91d257db9fa8cae114974de602d98729) ) /* identical to "pr1cg3.16b" */ |
| 3583 | | ROM_LOAD( "pr1cg4.14d", 0x200000*0x4, 0x200000,CRC(f4636cc9) SHA1(4e01a476e418e5790878572e83a8a11536ce30ae) ) /* identical to "pr1cg4.18b" */ |
| 3584 | | ROM_LOAD( "pr1cg5.16d", 0x200000*0x5, 0x200000,CRC(97d333de) SHA1(e8f8383f49aae834dd8b57231b25899703cef966) ) /* identical to "pr1cg5.19b" */ |
| 3585 | | ROM_LOAD( "pr1cg6.18a", 0x200000*0x6, 0x200000,CRC(3e081c03) SHA1(6ccb162952f6076359b2785b5d800b39a9a3c5ce) ) /* identical to "pr1cg6.18d" */ |
| 3586 | | ROM_LOAD( "pr1cg7.15a", 0x200000*0x7, 0x200000,CRC(ec9fc5c8) SHA1(16de614b26f06bbddae3ab56cebba45efd6fe81b) ) /* identical to "pr1cg7.19d" */ |
| 4161 | ROM_LOAD( "rrs1cg0.1a", 0x200000*0x4, 0x200000,CRC(714c0091) SHA1(df29512bd6e64827660c40304051366d2c4d7977) ) |
| 4162 | ROM_LOAD( "rrs1cg1.2a", 0x200000*0x5, 0x200000,CRC(836545c1) SHA1(05e3346463d8d42b5d33216207e855033a65510d) ) |
| 4163 | ROM_LOAD( "rrs1cg2.3a", 0x200000*0x6, 0x200000,CRC(00e9799d) SHA1(280184451138420f64080efe13e5e2795f7b61d4) ) |
| 4164 | ROM_LOAD( "rrs1cg3.5a", 0x200000*0x7, 0x200000,CRC(3858983f) SHA1(feda270b71f1310ecf4c17823bc8827ca2951b40) ) |
| 3587 | 4165 | |
| 3588 | 4166 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 3589 | | ROM_LOAD( "pr1ccrl.3d", 0x000000, 0x200000,CRC(e01321fd) SHA1(5938c6eff8e1b3642728c3be733f567a97cb5aad) ) /* identical to "pr1ccrl.7b" */ |
| 3590 | | ROM_LOAD( "pr1ccrh.1d", 0x200000, 0x080000,CRC(1d68bc31) SHA1(d534d0daebe7018e83b57cc7919c294ab89bddc8) ) /* identical to "pr1ccrh.5b" */ |
| 3591 | | /* These two ROMs define a huge texture tilemap using the tiles from "textile". |
| 3592 | | * The tilemap has 0x100 columns. |
| 3593 | | * |
| 3594 | | * pr1ccrl contains little endian 16 bit words. Each word references a 16x16 tile. |
| 3595 | | * |
| 3596 | | * pr1ccrh.1d contains packed nibbles. Each nibble encodes three tile attributes: |
| 3597 | | * 0x8 = swapxy |
| 3598 | | * 0x4 = flipx |
| 3599 | | * 0x2 = flipy |
| 3600 | | * 0x1 = tile bank (used in some sys22 games) |
| 3601 | | */ |
| 4167 | ROM_LOAD( "rrs1ccrl.5a", 0x000000, 0x200000,CRC(304a8b57) SHA1(f4f3e7c194697d754375f36a0e41d0941fa5d225) ) |
| 4168 | ROM_LOAD( "rrs1ccrh.5c", 0x200000, 0x080000,CRC(bd3c86ab) SHA1(cd3a8774843c5864e651fa8989c80e2d975a13e8) ) |
| 3602 | 4169 | |
| 3603 | | ROM_REGION( 0x80000*9, "pointrom", 0 ) /* 3d model data */ |
| 3604 | | ROM_LOAD( "pr1ptrl0.18k", 0x80000*0, 0x80000,CRC(fddb27a2) SHA1(6e837b45e3f9ed7ca3d1a457d0f0124de5618d1f) ) |
| 3605 | | ROM_LOAD( "pr1ptrl1.16k", 0x80000*1, 0x80000,CRC(6964dd06) SHA1(f38a550165504693d20892a7dcfaf01db19b04ef) ) |
| 3606 | | ROM_LOAD( "pr1ptrl2.15k", 0x80000*2, 0x80000,CRC(4d7ed1d4) SHA1(8f72864a06ff8962e640cb36d062bddf5d110308) ) |
| 4170 | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 4171 | ROM_LOAD( "rrs1pol0.5b", 0x80000*0, 0x80000,CRC(9376c384) SHA1(cde0e36db1beab1523607098a760d81fac2ea90e) ) |
| 4172 | ROM_LOAD( "rrs1pol1.4b", 0x80000*1, 0x80000,CRC(094fa832) SHA1(cc59442540b1cdef068c4408b6e048c11042beb8) ) |
| 4173 | ROM_LOAD( "rrs1pom0.5c", 0x80000*2, 0x80000,CRC(b47a7f8b) SHA1(0fa0456ad8b4864a7071b5b5ba1a78877c1ac0f0) ) |
| 4174 | ROM_LOAD( "rrs1pom1.4c", 0x80000*3, 0x80000,CRC(27260361) SHA1(8775cc779eb8b6a0d79fa84d606c970ec2d6ea8d) ) |
| 4175 | ROM_LOAD( "rrs1pou0.5d", 0x80000*4, 0x80000,CRC(74d6ec84) SHA1(63f5beee51443c98100330ec04291f71e10716c4) ) |
| 4176 | ROM_LOAD( "rrs1pou1.4d", 0x80000*5, 0x80000,CRC(f527caaa) SHA1(f92bdd15323239d593ddac92a11d23a27e6635ed) ) |
| 3607 | 4177 | |
| 3608 | | ROM_LOAD( "pr1ptrm0.18j", 0x80000*3, 0x80000,CRC(b6f204b7) SHA1(3b34f240b399b6406faaf338ae0ab536247e64a6) ) |
| 3609 | | ROM_LOAD( "pr1ptrm1.16j", 0x80000*4, 0x80000,CRC(949588b7) SHA1(fdaf50ff2496200b9c981efc18b035f3c0a96ace) ) |
| 3610 | | ROM_LOAD( "pr1ptrm2.15j", 0x80000*5, 0x80000,CRC(dc1cef0a) SHA1(8cbc02cf73fac3cc110b676d77602ae628385eae) ) |
| 4178 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 4179 | ROM_LOAD( "rrs1wav0.10r", 0x100000*0, 0x100000,CRC(99d11a2d) SHA1(1f3db98a99be0f07c03b0a7817561459a58f310e) ) |
| 4180 | ROM_LOAD( "rrs1wav1.10p", 0x100000*2, 0x100000,CRC(ad28444a) SHA1(c31bbf3cae5015e5494fe4988b9b01d822224c69) ) |
| 4181 | ROM_LOAD( "rrs1wav2.10n", 0x100000*1, 0x100000,CRC(6f0d4619) SHA1(cd3d57f2ea21497f388ffa29ec7d2665647a01c0) ) |
| 4182 | ROM_LOAD( "rrs1wav3.10l", 0x100000*3, 0x100000,CRC(106e761f) SHA1(97f47b857bdcbc79b0aface53dd385e67fcc9108) ) |
| 3611 | 4183 | |
| 3612 | | ROM_LOAD( "pr1ptru0.18f", 0x80000*6, 0x80000,CRC(5d66a7c4) SHA1(c9ed1c18724192d45c1f6b40096f15d02baf2401) ) |
| 3613 | | ROM_LOAD( "pr1ptru1.16f", 0x80000*7, 0x80000,CRC(e9a3f72b) SHA1(f967e1adf8eee4fffdf4288d36a93c5bb4f9a126) ) |
| 3614 | | ROM_LOAD( "pr1ptru2.15f", 0x80000*8, 0x80000,CRC(c346a842) SHA1(299bc0a30d0e74d8adfa3dc605aebf6439f5bc18) ) |
| 3615 | | |
| 3616 | | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 3617 | | ROM_LOAD( "pr1wavea.2l", 0x000000, 0x400000, CRC(320f3913) SHA1(3887b7334ca7762794c14198dd24bab47fcd9505) ) |
| 3618 | | ROM_LOAD( "pr1waveb.1l", 0x800000, 0x400000, CRC(d91acb26) SHA1(c2161e2d70e08aed15cbc875ffee685190611daf) ) |
| 4184 | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 4185 | ROM_LOAD( "rr1gam.2d", 0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4186 | ROM_LOAD( "rr1gam.3d", 0x0100, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4187 | ROM_LOAD( "rr1gam.4d", 0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3619 | 4188 | ROM_END |
| 3620 | 4189 | |
| 3621 | | ROM_START( acedrvrw ) |
| 4190 | ROM_START( ridgera2j ) |
| 3622 | 4191 | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 3623 | | ROM_LOAD32_BYTE( "ad2prgll.4d", 0x00003, 0x80000, CRC(808c5ff8) SHA1(119c90ecb5aa099a0e5d1d7944c004beacead367) ) |
| 3624 | | ROM_LOAD32_BYTE( "ad2prglm.2d", 0x00002, 0x80000, CRC(5f726a10) SHA1(d077312c6a387fbdf906d278c73c6a3730687f32) ) |
| 3625 | | ROM_LOAD32_BYTE( "ad2prgum.8d", 0x00001, 0x80000, CRC(d5042d6e) SHA1(9ae93e7ea7126302831a879ba0aadcb6e5b842f5) ) |
| 3626 | | ROM_LOAD32_BYTE( "ad2prguu.6d", 0x00000, 0x80000, CRC(86d4661d) SHA1(2a1529a51ca5466994a2d0d84c7aab13cef95a11) ) |
| 4192 | ROM_LOAD32_BYTE( "rrs1prllb.4d", 0x00003, 0x80000, CRC(22f069e5) SHA1(fcaec3aa83853c39d713ed01c511060663027ccd) ) |
| 4193 | ROM_LOAD32_BYTE( "rrs1prlmb.2d", 0x00002, 0x80000, CRC(8e86f199) SHA1(7bd9ec9147ef0380864508f66203ef2c6ad1f7f6) ) |
| 4194 | ROM_LOAD32_BYTE( "rrs1prumb.8d", 0x00001, 0x80000, CRC(78c360b6) SHA1(8ee502291359cbc8aef39145c8fe7538311cc58f) ) |
| 4195 | ROM_LOAD32_BYTE( "rrs1pruub.6d", 0x00000, 0x80000, CRC(60d6d4a4) SHA1(759762a9b7d7aee7ee1b44b1721e5356898aa7ea) ) |
| 3627 | 4196 | |
| 3628 | 4197 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 3629 | 4198 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| r24771 | r24772 | |
| 3638 | 4207 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3639 | 4208 | |
| 3640 | 4209 | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 3641 | | ROM_LOAD( "ad1data.6r", 0, 0x080000, CRC(82024f74) SHA1(711ab0c4f027716aeab18e3a5d3d06fa82af8007) ) |
| 4210 | ROM_LOAD( "rrs1data.6r", 0, 0x080000, CRC(b7063aa8) SHA1(08ff689e8dd529b91eee423c93f084945c6de417) ) |
| 3642 | 4211 | |
| 3643 | 4212 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 3644 | | ROM_LOAD( "ad1cg0.1a", 0x200000*0x4, 0x200000,CRC(faaa1ee2) SHA1(878f2b74587ed4d06c5110a0eb0020c49ddc5dfa) ) |
| 3645 | | ROM_LOAD( "ad1cg1.2a", 0x200000*0x5, 0x200000,CRC(1aab1eb7) SHA1(b8f9eeafec7e0de340cf48e38fa55dd14404c867) ) |
| 3646 | | ROM_LOAD( "ad1cg2.3a", 0x200000*0x6, 0x200000,CRC(cdcd1874) SHA1(5a7a4a0d897cca4956b0a4f178f39f618c921861) ) |
| 3647 | | ROM_LOAD( "ad1cg3.5a", 0x200000*0x7, 0x200000,CRC(effdd2cd) SHA1(9ff156e7e38c103b8fa6f3c29776dd38482d9cf2) ) |
| 4213 | ROM_LOAD( "rrs1cg0.1a", 0x200000*0x4, 0x200000,CRC(714c0091) SHA1(df29512bd6e64827660c40304051366d2c4d7977) ) |
| 4214 | ROM_LOAD( "rrs1cg1.2a", 0x200000*0x5, 0x200000,CRC(836545c1) SHA1(05e3346463d8d42b5d33216207e855033a65510d) ) |
| 4215 | ROM_LOAD( "rrs1cg2.3a", 0x200000*0x6, 0x200000,CRC(00e9799d) SHA1(280184451138420f64080efe13e5e2795f7b61d4) ) |
| 4216 | ROM_LOAD( "rrs1cg3.5a", 0x200000*0x7, 0x200000,CRC(3858983f) SHA1(feda270b71f1310ecf4c17823bc8827ca2951b40) ) |
| 3648 | 4217 | |
| 3649 | 4218 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 3650 | | ROM_LOAD( "ad1ccrl.1c", 0x000000, 0x200000,CRC(bc3c9b12) SHA1(088e861e5c4b37c54b7f72963113a10870bf7927) ) |
| 3651 | | ROM_LOAD( "ad1ccrh.2c", 0x200000, 0x080000,CRC(71f44526) SHA1(bb4811fc5de626380ce6a17bee73e5e47926d850) ) |
| 4219 | ROM_LOAD( "rrs1ccrl.5a", 0x000000, 0x200000,CRC(304a8b57) SHA1(f4f3e7c194697d754375f36a0e41d0941fa5d225) ) |
| 4220 | ROM_LOAD( "rrs1ccrh.5c", 0x200000, 0x080000,CRC(bd3c86ab) SHA1(cd3a8774843c5864e651fa8989c80e2d975a13e8) ) |
| 3652 | 4221 | |
| 3653 | 4222 | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 3654 | | ROM_LOAD( "ad1potl0.5b", 0x80000*0, 0x80000,CRC(dfc7e729) SHA1(5e3deef66d0a5dd2ff0584b8c8be4bf5e798e4d0) ) |
| 3655 | | ROM_LOAD( "ad1potl1.4b", 0x80000*1, 0x80000,CRC(5914ef8e) SHA1(f6db9c3061ceda76eef0a9538d9c048366b71124) ) |
| 3656 | | ROM_LOAD( "ad1potm0.5c", 0x80000*2, 0x80000,CRC(844bcd6b) SHA1(629b8dc0a7e94410c08c8874b69d9f4bc22f3e4f) ) |
| 3657 | | ROM_LOAD( "ad1potm1.4c", 0x80000*3, 0x80000,CRC(515cf541) SHA1(db1522813ea3e982d479cc1903d18799bf75aea9) ) |
| 3658 | | ROM_LOAD( "ad1potu0.5d", 0x80000*4, 0x80000,CRC(e0f44949) SHA1(ffdb64d600883974b05edaa9ed3071af355ee17f) ) |
| 3659 | | ROM_LOAD( "ad1potu1.4d", 0x80000*5, 0x80000,CRC(f2cd2cbb) SHA1(19fe6e3454a1e4353c7fe0a0d7a71742fea946de) ) |
| 4223 | ROM_LOAD( "rrs1pol0.5b", 0x80000*0, 0x80000,CRC(9376c384) SHA1(cde0e36db1beab1523607098a760d81fac2ea90e) ) |
| 4224 | ROM_LOAD( "rrs1pol1.4b", 0x80000*1, 0x80000,CRC(094fa832) SHA1(cc59442540b1cdef068c4408b6e048c11042beb8) ) |
| 4225 | ROM_LOAD( "rrs1pom0.5c", 0x80000*2, 0x80000,CRC(b47a7f8b) SHA1(0fa0456ad8b4864a7071b5b5ba1a78877c1ac0f0) ) |
| 4226 | ROM_LOAD( "rrs1pom1.4c", 0x80000*3, 0x80000,CRC(27260361) SHA1(8775cc779eb8b6a0d79fa84d606c970ec2d6ea8d) ) |
| 4227 | ROM_LOAD( "rrs1pou0.5d", 0x80000*4, 0x80000,CRC(74d6ec84) SHA1(63f5beee51443c98100330ec04291f71e10716c4) ) |
| 4228 | ROM_LOAD( "rrs1pou1.4d", 0x80000*5, 0x80000,CRC(f527caaa) SHA1(f92bdd15323239d593ddac92a11d23a27e6635ed) ) |
| 3660 | 4229 | |
| 3661 | 4230 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 3662 | | ROM_LOAD( "ad1wave0.10r", 0x100000*0, 0x100000,CRC(c7879a72) SHA1(ae04d664858b0944583590ed0003a9420032d5ca) ) |
| 3663 | | ROM_LOAD( "ad1wave1.10p", 0x100000*2, 0x100000,CRC(69c1d41e) SHA1(b5cdfe7b75075c585dfd842347f8e4e692bb2781) ) |
| 3664 | | ROM_LOAD( "ad1wave2.10n", 0x100000*1, 0x100000,CRC(365a6831) SHA1(ddaa44a4436d6de120b64a5d130b1ee18f872e19) ) |
| 3665 | | ROM_LOAD( "ad1wave3.10l", 0x100000*3, 0x100000,CRC(cd8ecb0b) SHA1(7950b5a3a81f5554f57accabc7a623b8265a21a1) ) |
| 4231 | ROM_LOAD( "rrs1wav0.10r", 0x100000*0, 0x100000,CRC(99d11a2d) SHA1(1f3db98a99be0f07c03b0a7817561459a58f310e) ) |
| 4232 | ROM_LOAD( "rrs1wav1.10p", 0x100000*2, 0x100000,CRC(ad28444a) SHA1(c31bbf3cae5015e5494fe4988b9b01d822224c69) ) |
| 4233 | ROM_LOAD( "rrs1wav2.10n", 0x100000*1, 0x100000,CRC(6f0d4619) SHA1(cd3d57f2ea21497f388ffa29ec7d2665647a01c0) ) |
| 4234 | ROM_LOAD( "rrs1wav3.10l", 0x100000*3, 0x100000,CRC(106e761f) SHA1(97f47b857bdcbc79b0aface53dd385e67fcc9108) ) |
| 3666 | 4235 | |
| 3667 | 4236 | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 3668 | 4237 | ROM_LOAD( "rr1gam.2d", 0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| r24771 | r24772 | |
| 3670 | 4239 | ROM_LOAD( "rr1gam.4d", 0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3671 | 4240 | ROM_END |
| 3672 | 4241 | |
| 3673 | | ROM_START( victlapw ) |
| 4242 | ROM_START( ridgera2ja ) |
| 3674 | 4243 | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 3675 | | ROM_LOAD32_BYTE( "advprgll.4d", 0x00003, 0x80000, CRC(4dc1b0ab) SHA1(b5913388d16f824af6dbb01b5b0350d510667a87) ) |
| 3676 | | ROM_LOAD32_BYTE( "advprglm.2d", 0x00002, 0x80000, CRC(7b658bef) SHA1(cf982b49fde0c1897c4c16e77f9eb2a145d8cd42) ) |
| 3677 | | ROM_LOAD32_BYTE( "advprgum.8d", 0x00001, 0x80000, CRC(af67f2fb) SHA1(f391843ee0d053e33660c60e3718871142d932f2) ) |
| 3678 | | ROM_LOAD32_BYTE( "advprguu.6d", 0x00000, 0x80000, CRC(b60e5d2b) SHA1(f5740615c2864c5c6433275cf4388bda5122b7a7) ) |
| 4244 | ROM_LOAD32_BYTE( "rrs1prll.4d", 0x00003, 0x80000, CRC(fbf785a2) SHA1(b9333c7623f68f48aa6ae50913a22a527a19576a) ) |
| 4245 | ROM_LOAD32_BYTE( "rrs1prlm.2d", 0x00002, 0x80000, CRC(562f747a) SHA1(79d818b87c9a992fc9706fb39e6d560c2b0aa392) ) |
| 4246 | ROM_LOAD32_BYTE( "rrs1prum.8d", 0x00001, 0x80000, CRC(93259fb0) SHA1(c29787e873797a003db27adbd20d7b852e26d8c6) ) |
| 4247 | ROM_LOAD32_BYTE( "rrs1pruu.6d", 0x00000, 0x80000, CRC(31cdefe8) SHA1(ae836d389bed43dd156eb4cf3e97b6f1ad68181e) ) |
| 3679 | 4248 | |
| 3680 | 4249 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 3681 | 4250 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| r24771 | r24772 | |
| 3690 | 4259 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3691 | 4260 | |
| 3692 | 4261 | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 3693 | | ROM_LOAD( "adv1data.6r", 0, 0x080000, CRC(10eecdb4) SHA1(aaedeed166614e6670e765e0d7e4e9eb5f38ad10) ) |
| 4262 | ROM_LOAD( "rrs1data.6r", 0, 0x080000, CRC(b7063aa8) SHA1(08ff689e8dd529b91eee423c93f084945c6de417) ) |
| 3694 | 4263 | |
| 3695 | 4264 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 3696 | | ROM_LOAD( "adv1cg0.2a", 0x200000*0x0, 0x200000,CRC(13353848) SHA1(c6c7693e3cb086919daf9fcaf6bf602142213073) ) |
| 3697 | | ROM_LOAD( "adv1cg1.1c", 0x200000*0x1, 0x200000,CRC(1542066c) SHA1(20a053e919b7a81da2a17d31dc7482832a4d4ffe) ) |
| 3698 | | ROM_LOAD( "adv1cg2.2d", 0x200000*0x2, 0x200000,CRC(111f371c) SHA1(29d8062daae51b3c1712bd30baa9813a2b5b374d) ) |
| 3699 | | ROM_LOAD( "adv1cg3.1e", 0x200000*0x3, 0x200000,CRC(a077831f) SHA1(71bb95199b368e48bc474123ca84d19213f73137) ) |
| 3700 | | ROM_LOAD( "adv1cg4.2f", 0x200000*0x4, 0x200000,CRC(71abdacf) SHA1(64409e6aa40dd9e5a6dd1dc306860fbbf6ee7c3e) ) |
| 3701 | | ROM_LOAD( "adv1cg5.1j", 0x200000*0x5, 0x200000,CRC(cd6cd798) SHA1(51070997a457c0ace078174569cd548ac2226b2d) ) |
| 3702 | | ROM_LOAD( "adv1cg6.2k", 0x200000*0x6, 0x200000,CRC(94bdafba) SHA1(41e64fa99b342edd8b0ed95ae9869c23e03399e6) ) |
| 3703 | | ROM_LOAD( "adv1cg7.1n", 0x200000*0x7, 0x200000,CRC(18823475) SHA1(a3244d665b59c352593de21f5cb8d55ddf8cee5c) ) |
| 4265 | ROM_LOAD( "rrs1cg0.1a", 0x200000*0x4, 0x200000,CRC(714c0091) SHA1(df29512bd6e64827660c40304051366d2c4d7977) ) |
| 4266 | ROM_LOAD( "rrs1cg1.2a", 0x200000*0x5, 0x200000,CRC(836545c1) SHA1(05e3346463d8d42b5d33216207e855033a65510d) ) |
| 4267 | ROM_LOAD( "rrs1cg2.3a", 0x200000*0x6, 0x200000,CRC(00e9799d) SHA1(280184451138420f64080efe13e5e2795f7b61d4) ) |
| 4268 | ROM_LOAD( "rrs1cg3.5a", 0x200000*0x7, 0x200000,CRC(3858983f) SHA1(feda270b71f1310ecf4c17823bc8827ca2951b40) ) |
| 3704 | 4269 | |
| 3705 | 4270 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 3706 | | ROM_LOAD( "adv1ccrl.5a", 0x000000, 0x200000,CRC(dd2b96ae) SHA1(6337ce17e617234c27ebad578ba82451649aad9c) ) /* ident to adv1ccrl.5l */ |
| 3707 | | ROM_LOAD( "adv1ccrh.5c", 0x200000, 0x080000,CRC(5719844a) SHA1(a17d7bc239235e9f566931ba4fee1d6ad7964d83) ) /* ident to adv1ccrh.5j */ |
| 4271 | ROM_LOAD( "rrs1ccrl.5a", 0x000000, 0x200000,CRC(304a8b57) SHA1(f4f3e7c194697d754375f36a0e41d0941fa5d225) ) |
| 4272 | ROM_LOAD( "rrs1ccrh.5c", 0x200000, 0x080000,CRC(bd3c86ab) SHA1(cd3a8774843c5864e651fa8989c80e2d975a13e8) ) |
| 3708 | 4273 | |
| 3709 | | ROM_REGION( 0x80000*9, "pointrom", 0 ) /* 3d model data */ |
| 3710 | | ROM_LOAD( "adv1pot.l0", 0x80000*0, 0x80000,CRC(3b85b2a4) SHA1(84c92ed0105618d4aa5508af344b4b6cfa772567) ) |
| 3711 | | ROM_LOAD( "adv1pot.l1", 0x80000*1, 0x80000,CRC(601d6488) SHA1(c7932103ba6070e17deb3cc06060eed7789f938e) ) |
| 3712 | | ROM_LOAD( "adv1pot.l2", 0x80000*2, 0x80000,CRC(a0323a84) SHA1(deadf9a47461df7b137759d6886e676137b39fd2) ) |
| 3713 | | ROM_LOAD( "adv1pot.m0", 0x80000*3, 0x80000,CRC(20951aa2) SHA1(3de55bded443a5b78699cec4845470b53b22301a) ) |
| 3714 | | ROM_LOAD( "adv1pot.m1", 0x80000*4, 0x80000,CRC(5aed6fbf) SHA1(8cee781d8a12e00635b9a1e5cc8d82e64b17e8f1) ) |
| 3715 | | ROM_LOAD( "adv1pot.m2", 0x80000*5, 0x80000,CRC(00cbff92) SHA1(09a11ba064aafc921a7ca0add5898d91b773f10a) ) |
| 3716 | | ROM_LOAD( "adv1pot.u0", 0x80000*6, 0x80000,CRC(6b73dd2a) SHA1(e3654ab2b62e4f3314558209e37c5636f871a6c7) ) |
| 3717 | | ROM_LOAD( "adv1pot.u1", 0x80000*7, 0x80000,CRC(c8788f74) SHA1(606e10b05146e3db824aa608745de80584420d12) ) |
| 3718 | | ROM_LOAD( "adv1pot.u2", 0x80000*8, 0x80000,CRC(e67f29c5) SHA1(16222afb4f1f494711dd00ebb347c824db333bae) ) |
| 4274 | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 4275 | ROM_LOAD( "rrs1pol0.5b", 0x80000*0, 0x80000,CRC(9376c384) SHA1(cde0e36db1beab1523607098a760d81fac2ea90e) ) |
| 4276 | ROM_LOAD( "rrs1pol1.4b", 0x80000*1, 0x80000,CRC(094fa832) SHA1(cc59442540b1cdef068c4408b6e048c11042beb8) ) |
| 4277 | ROM_LOAD( "rrs1pom0.5c", 0x80000*2, 0x80000,CRC(b47a7f8b) SHA1(0fa0456ad8b4864a7071b5b5ba1a78877c1ac0f0) ) |
| 4278 | ROM_LOAD( "rrs1pom1.4c", 0x80000*3, 0x80000,CRC(27260361) SHA1(8775cc779eb8b6a0d79fa84d606c970ec2d6ea8d) ) |
| 4279 | ROM_LOAD( "rrs1pou0.5d", 0x80000*4, 0x80000,CRC(74d6ec84) SHA1(63f5beee51443c98100330ec04291f71e10716c4) ) |
| 4280 | ROM_LOAD( "rrs1pou1.4d", 0x80000*5, 0x80000,CRC(f527caaa) SHA1(f92bdd15323239d593ddac92a11d23a27e6635ed) ) |
| 3719 | 4281 | |
| 3720 | 4282 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 3721 | | ROM_LOAD( "adv1wav0.10r", 0x000000, 0x100000, CRC(f07b2d9d) SHA1(fd46c23b336d5e9a748f7f8d825c19737125d2fb) ) |
| 3722 | | ROM_LOAD( "adv1wav1.10p", 0x200000, 0x100000, CRC(737f3c7a) SHA1(4737994f146c0076e7270785f41f3a85c53c7c5f) ) |
| 3723 | | ROM_LOAD( "adv1wav2.10n", 0x100000, 0x100000, CRC(c1a5ca5e) SHA1(27e6f9256d5fe5966e91d6be1e6e80900a764af1) ) |
| 3724 | | ROM_LOAD( "adv1wav3.10l", 0x300000, 0x100000, CRC(fc6b8004) SHA1(5c9e0805895931ec2b6a43376059bdbf5777222f) ) |
| 4283 | ROM_LOAD( "rrs1wav0.10r", 0x100000*0, 0x100000,CRC(99d11a2d) SHA1(1f3db98a99be0f07c03b0a7817561459a58f310e) ) |
| 4284 | ROM_LOAD( "rrs1wav1.10p", 0x100000*2, 0x100000,CRC(ad28444a) SHA1(c31bbf3cae5015e5494fe4988b9b01d822224c69) ) |
| 4285 | ROM_LOAD( "rrs1wav2.10n", 0x100000*1, 0x100000,CRC(6f0d4619) SHA1(cd3d57f2ea21497f388ffa29ec7d2665647a01c0) ) |
| 4286 | ROM_LOAD( "rrs1wav3.10l", 0x100000*3, 0x100000,CRC(106e761f) SHA1(97f47b857bdcbc79b0aface53dd385e67fcc9108) ) |
| 3725 | 4287 | |
| 3726 | 4288 | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 3727 | 4289 | ROM_LOAD( "rr1gam.2d", 0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| r24771 | r24772 | |
| 3729 | 4291 | ROM_LOAD( "rr1gam.4d", 0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3730 | 4292 | ROM_END |
| 3731 | 4293 | |
| 4294 | |
| 3732 | 4295 | ROM_START( raveracw ) |
| 3733 | 4296 | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 3734 | 4297 | ROM_LOAD32_BYTE( "rv2prllb.4d", 0x00003, 0x80000, CRC(3017cd1e) SHA1(ccd648b4a5dfc74fd141815af2969f423311042f) ) |
| r24771 | r24772 | |
| 3924 | 4487 | ROM_LOAD( "rv1eeprm.9e", 0x0000, 0x2000, CRC(e00dd412) SHA1(f594b31ace5e5e980e904faa8b83a450cc95db17) ) |
| 3925 | 4488 | ROM_END |
| 3926 | 4489 | |
| 3927 | | ROM_START( ridgera2 ) |
| 4490 | |
| 4491 | ROM_START( cybrcomm ) |
| 3928 | 4492 | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 3929 | | ROM_LOAD32_BYTE( "rrs2prll.4d", 0x00003, 0x80000, CRC(88199c0f) SHA1(5cf5bb714c3d209943a8d815eaea60afd34641ff) ) |
| 3930 | | ROM_LOAD32_BYTE( "rrs1prlmb.2d", 0x00002, 0x80000, CRC(8e86f199) SHA1(7bd9ec9147ef0380864508f66203ef2c6ad1f7f6) ) |
| 3931 | | ROM_LOAD32_BYTE( "rrs1prumb.8d", 0x00001, 0x80000, CRC(78c360b6) SHA1(8ee502291359cbc8aef39145c8fe7538311cc58f) ) |
| 3932 | | ROM_LOAD32_BYTE( "rrs1pruub.6d", 0x00000, 0x80000, CRC(60d6d4a4) SHA1(759762a9b7d7aee7ee1b44b1721e5356898aa7ea) ) |
| 4493 | ROM_LOAD32_BYTE( "cy1prgll.4d", 0x00003, 0x80000, CRC(b3eab156) SHA1(2a5c4e0360c3b9500687a4d70f7110a0c30da2a5) ) |
| 4494 | ROM_LOAD32_BYTE( "cy1prglm.2d", 0x00002, 0x80000, CRC(884a5b0e) SHA1(0e27ae366b8a2695fe112b4740c8c9013bb97e26) ) |
| 4495 | ROM_LOAD32_BYTE( "cy1prgum.8d", 0x00001, 0x80000, CRC(c9c4a921) SHA1(76a52461165a8bd8d984a34063fbeb4cb73624af) ) |
| 4496 | ROM_LOAD32_BYTE( "cy1prguu.6d", 0x00000, 0x80000, CRC(5f22975b) SHA1(a1a5cb66358d64a3c564b912f2eeafa182786b1e) ) |
| 3933 | 4497 | |
| 3934 | 4498 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 3935 | 4499 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| r24771 | r24772 | |
| 3944 | 4508 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3945 | 4509 | |
| 3946 | 4510 | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 3947 | | ROM_LOAD( "rrs1data.6r", 0, 0x080000, CRC(b7063aa8) SHA1(08ff689e8dd529b91eee423c93f084945c6de417) ) |
| 4511 | ROM_LOAD( "cy1data.6r", 0x00000, 0x20000, CRC(10d0005b) SHA1(10508eeaf74d24a611b44cd3bb12417ceb78904f) ) |
| 4512 | ROM_RELOAD( 0x20000, 0x20000) |
| 4513 | ROM_RELOAD( 0x40000, 0x20000) |
| 4514 | ROM_RELOAD( 0x60000, 0x20000) |
| 3948 | 4515 | |
| 3949 | 4516 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 3950 | | ROM_LOAD( "rrs1cg0.1a", 0x200000*0x4, 0x200000,CRC(714c0091) SHA1(df29512bd6e64827660c40304051366d2c4d7977) ) |
| 3951 | | ROM_LOAD( "rrs1cg1.2a", 0x200000*0x5, 0x200000,CRC(836545c1) SHA1(05e3346463d8d42b5d33216207e855033a65510d) ) |
| 3952 | | ROM_LOAD( "rrs1cg2.3a", 0x200000*0x6, 0x200000,CRC(00e9799d) SHA1(280184451138420f64080efe13e5e2795f7b61d4) ) |
| 3953 | | ROM_LOAD( "rrs1cg3.5a", 0x200000*0x7, 0x200000,CRC(3858983f) SHA1(feda270b71f1310ecf4c17823bc8827ca2951b40) ) |
| 4517 | ROM_LOAD( "cyc1cg0.1a", 0x200000*0x4, 0x200000,CRC(e839b9bd) SHA1(fee43d37dcca7f1fb952a6bfb886b7ee30b7d75c) ) /* cyc1cg0.6a */ |
| 4518 | ROM_LOAD( "cyc1cg1.2a", 0x200000*0x5, 0x200000,CRC(7d13993f) SHA1(96ac82bcc63afe395bae73f005eb66dad7742d48) ) /* cyc1cg1.7a */ |
| 4519 | ROM_LOAD( "cyc1cg2.3a", 0x200000*0x6, 0x200000,CRC(7c464566) SHA1(69817ac3a7c6e43b960e8a904962b58b23417163) ) /* cyc1cg2.8a */ |
| 4520 | ROM_LOAD( "cyc1cg3.5a", 0x200000*0x7, 0x200000,CRC(2222e16f) SHA1(562bcd4d43b1543303d8fd66d9f0d9a8e3702492) ) /* cyc1cg3.9a */ |
| 3954 | 4521 | |
| 3955 | 4522 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 3956 | | ROM_LOAD( "rrs1ccrl.5a", 0x000000, 0x200000,CRC(304a8b57) SHA1(f4f3e7c194697d754375f36a0e41d0941fa5d225) ) |
| 3957 | | ROM_LOAD( "rrs1ccrh.5c", 0x200000, 0x080000,CRC(bd3c86ab) SHA1(cd3a8774843c5864e651fa8989c80e2d975a13e8) ) |
| 3958 | 4523 | |
| 3959 | | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 3960 | | ROM_LOAD( "rrs1pol0.5b", 0x80000*0, 0x80000,CRC(9376c384) SHA1(cde0e36db1beab1523607098a760d81fac2ea90e) ) |
| 3961 | | ROM_LOAD( "rrs1pol1.4b", 0x80000*1, 0x80000,CRC(094fa832) SHA1(cc59442540b1cdef068c4408b6e048c11042beb8) ) |
| 3962 | | ROM_LOAD( "rrs1pom0.5c", 0x80000*2, 0x80000,CRC(b47a7f8b) SHA1(0fa0456ad8b4864a7071b5b5ba1a78877c1ac0f0) ) |
| 3963 | | ROM_LOAD( "rrs1pom1.4c", 0x80000*3, 0x80000,CRC(27260361) SHA1(8775cc779eb8b6a0d79fa84d606c970ec2d6ea8d) ) |
| 3964 | | ROM_LOAD( "rrs1pou0.5d", 0x80000*4, 0x80000,CRC(74d6ec84) SHA1(63f5beee51443c98100330ec04291f71e10716c4) ) |
| 3965 | | ROM_LOAD( "rrs1pou1.4d", 0x80000*5, 0x80000,CRC(f527caaa) SHA1(f92bdd15323239d593ddac92a11d23a27e6635ed) ) |
| 4524 | //cyc1ccrl.1c FIXED BITS (xxxxxxxx11xxxxxx) |
| 4525 | ROM_LOAD( "cyc1ccrl.1c", 0x000000, 0x100000,CRC(1a0dc5f0) SHA1(bf0093d9cbdcb45a82705e966c48a1f408fa344e) ) /* cyc1ccrl.8c */ |
| 3966 | 4526 | |
| 4527 | //cyc1ccrh.2c 1xxxxxxxxxxxxxxxxxx = 0xFF |
| 4528 | ROM_LOAD( "cyc1ccrh.2c", 0x200000, 0x080000,CRC(8c4090b8) SHA1(456d548a48833e840c5d39d47b2dcca03f8d6321) ) /* cyc1ccrh.7c */ |
| 4529 | |
| 4530 | ROM_REGION( 0x80000*9, "pointrom", 0 ) /* 3d model data */ |
| 4531 | ROM_LOAD( "cyc1ptl0.5b", 0x80000*0x0, 0x80000,CRC(d91de03d) SHA1(05819d285f6111867c41337bda9c4b9ad5394b6b) ) |
| 4532 | ROM_LOAD( "cyc1ptl1.4b", 0x80000*0x1, 0x80000,CRC(e5b98021) SHA1(7416cbf74da969f822e0363ced7a25b967277e28) ) |
| 4533 | ROM_LOAD( "cyc1ptl2.3b", 0x80000*0x2, 0x80000,CRC(7ba786c6) SHA1(1a5319dec495453bab9d70ae773a807f0036b355) ) |
| 4534 | ROM_LOAD( "cyc1ptm0.5c", 0x80000*0x3, 0x80000,CRC(d454b5c6) SHA1(95ae6f0455e9fd7dff066e74cd4343c94d1bc212) ) |
| 4535 | ROM_LOAD( "cyc1ptm1.4c", 0x80000*0x4, 0x80000,CRC(74fdf8cc) SHA1(f2627f400e247b6d4c4157eaf0ec69d57212e566) ) |
| 4536 | ROM_LOAD( "cyc1ptm2.3c", 0x80000*0x5, 0x80000,CRC(b9c99a45) SHA1(c86cf594b416776eaf9a32c3cb9d34acc79777e9) ) |
| 4537 | ROM_LOAD( "cyc1ptu0.5d", 0x80000*0x6, 0x80000,CRC(4d40897f) SHA1(ffe2a0ab66443553c83512f9a1be94b2e385cf2f) ) |
| 4538 | ROM_LOAD( "cyc1ptu1.4d", 0x80000*0x7, 0x80000,CRC(3bdaeeeb) SHA1(826f97e2165af8569cfec03874b16030a9486559) ) |
| 4539 | ROM_LOAD( "cyc1ptu2.3d", 0x80000*0x8, 0x80000,CRC(a0e73674) SHA1(1e22142a564e664031c12b250664fc82e3b3d43b) ) |
| 4540 | |
| 3967 | 4541 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 3968 | | ROM_LOAD( "rrs1wav0.10r", 0x100000*0, 0x100000,CRC(99d11a2d) SHA1(1f3db98a99be0f07c03b0a7817561459a58f310e) ) |
| 3969 | | ROM_LOAD( "rrs1wav1.10p", 0x100000*2, 0x100000,CRC(ad28444a) SHA1(c31bbf3cae5015e5494fe4988b9b01d822224c69) ) |
| 3970 | | ROM_LOAD( "rrs1wav2.10n", 0x100000*1, 0x100000,CRC(6f0d4619) SHA1(cd3d57f2ea21497f388ffa29ec7d2665647a01c0) ) |
| 3971 | | ROM_LOAD( "rrs1wav3.10l", 0x100000*3, 0x100000,CRC(106e761f) SHA1(97f47b857bdcbc79b0aface53dd385e67fcc9108) ) |
| 4542 | ROM_LOAD( "cy1wav0.10r", 0x000000, 0x100000, CRC(c6f366a2) SHA1(795dbee09df159d3501c748fb3de16cca81742d6) ) |
| 4543 | ROM_LOAD( "cy1wav1.10p", 0x200000, 0x100000, CRC(f30b5e37) SHA1(9f5a94d82741ef9688c6e415ebb9009c906737c9) ) |
| 4544 | ROM_LOAD( "cy1wav2.10n", 0x100000, 0x100000, CRC(b98c1ca6) SHA1(4b66aa05f82be5ef3315acc30031872698ff4391) ) |
| 4545 | ROM_LOAD( "cy1wav3.10l", 0x300000, 0x100000, CRC(43dbac19) SHA1(83fd4ae4e7ec264fc217ed18caf59bf438af0c3d) ) |
| 3972 | 4546 | |
| 3973 | 4547 | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 3974 | 4548 | ROM_LOAD( "rr1gam.2d", 0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3975 | 4549 | ROM_LOAD( "rr1gam.3d", 0x0100, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 3976 | 4550 | ROM_LOAD( "rr1gam.4d", 0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4551 | |
| 4552 | ROM_REGION( 0x2000, "nvram", 0 ) // default eeprom |
| 4553 | ROM_LOAD( "cy1eeprm.9e", 0x0000, 0x2000, CRC(8432c066) SHA1(99d4bfda3f8aec288dbeaf291bce85fe9009a1de) ) |
| 3977 | 4554 | ROM_END |
| 3978 | 4555 | |
| 3979 | | ROM_START( ridgera2j ) |
| 4556 | |
| 4557 | ROM_START( acedrvrw ) |
| 3980 | 4558 | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 3981 | | ROM_LOAD32_BYTE( "rrs1prllb.4d", 0x00003, 0x80000, CRC(22f069e5) SHA1(fcaec3aa83853c39d713ed01c511060663027ccd) ) |
| 3982 | | ROM_LOAD32_BYTE( "rrs1prlmb.2d", 0x00002, 0x80000, CRC(8e86f199) SHA1(7bd9ec9147ef0380864508f66203ef2c6ad1f7f6) ) |
| 3983 | | ROM_LOAD32_BYTE( "rrs1prumb.8d", 0x00001, 0x80000, CRC(78c360b6) SHA1(8ee502291359cbc8aef39145c8fe7538311cc58f) ) |
| 3984 | | ROM_LOAD32_BYTE( "rrs1pruub.6d", 0x00000, 0x80000, CRC(60d6d4a4) SHA1(759762a9b7d7aee7ee1b44b1721e5356898aa7ea) ) |
| 4559 | ROM_LOAD32_BYTE( "ad2prgll.4d", 0x00003, 0x80000, CRC(808c5ff8) SHA1(119c90ecb5aa099a0e5d1d7944c004beacead367) ) |
| 4560 | ROM_LOAD32_BYTE( "ad2prglm.2d", 0x00002, 0x80000, CRC(5f726a10) SHA1(d077312c6a387fbdf906d278c73c6a3730687f32) ) |
| 4561 | ROM_LOAD32_BYTE( "ad2prgum.8d", 0x00001, 0x80000, CRC(d5042d6e) SHA1(9ae93e7ea7126302831a879ba0aadcb6e5b842f5) ) |
| 4562 | ROM_LOAD32_BYTE( "ad2prguu.6d", 0x00000, 0x80000, CRC(86d4661d) SHA1(2a1529a51ca5466994a2d0d84c7aab13cef95a11) ) |
| 3985 | 4563 | |
| 3986 | 4564 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 3987 | 4565 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| r24771 | r24772 | |
| 3996 | 4574 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 3997 | 4575 | |
| 3998 | 4576 | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 3999 | | ROM_LOAD( "rrs1data.6r", 0, 0x080000, CRC(b7063aa8) SHA1(08ff689e8dd529b91eee423c93f084945c6de417) ) |
| 4577 | ROM_LOAD( "ad1data.6r", 0, 0x080000, CRC(82024f74) SHA1(711ab0c4f027716aeab18e3a5d3d06fa82af8007) ) |
| 4000 | 4578 | |
| 4001 | 4579 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 4002 | | ROM_LOAD( "rrs1cg0.1a", 0x200000*0x4, 0x200000,CRC(714c0091) SHA1(df29512bd6e64827660c40304051366d2c4d7977) ) |
| 4003 | | ROM_LOAD( "rrs1cg1.2a", 0x200000*0x5, 0x200000,CRC(836545c1) SHA1(05e3346463d8d42b5d33216207e855033a65510d) ) |
| 4004 | | ROM_LOAD( "rrs1cg2.3a", 0x200000*0x6, 0x200000,CRC(00e9799d) SHA1(280184451138420f64080efe13e5e2795f7b61d4) ) |
| 4005 | | ROM_LOAD( "rrs1cg3.5a", 0x200000*0x7, 0x200000,CRC(3858983f) SHA1(feda270b71f1310ecf4c17823bc8827ca2951b40) ) |
| 4580 | ROM_LOAD( "ad1cg0.1a", 0x200000*0x4, 0x200000,CRC(faaa1ee2) SHA1(878f2b74587ed4d06c5110a0eb0020c49ddc5dfa) ) |
| 4581 | ROM_LOAD( "ad1cg1.2a", 0x200000*0x5, 0x200000,CRC(1aab1eb7) SHA1(b8f9eeafec7e0de340cf48e38fa55dd14404c867) ) |
| 4582 | ROM_LOAD( "ad1cg2.3a", 0x200000*0x6, 0x200000,CRC(cdcd1874) SHA1(5a7a4a0d897cca4956b0a4f178f39f618c921861) ) |
| 4583 | ROM_LOAD( "ad1cg3.5a", 0x200000*0x7, 0x200000,CRC(effdd2cd) SHA1(9ff156e7e38c103b8fa6f3c29776dd38482d9cf2) ) |
| 4006 | 4584 | |
| 4007 | 4585 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 4008 | | ROM_LOAD( "rrs1ccrl.5a", 0x000000, 0x200000,CRC(304a8b57) SHA1(f4f3e7c194697d754375f36a0e41d0941fa5d225) ) |
| 4009 | | ROM_LOAD( "rrs1ccrh.5c", 0x200000, 0x080000,CRC(bd3c86ab) SHA1(cd3a8774843c5864e651fa8989c80e2d975a13e8) ) |
| 4586 | ROM_LOAD( "ad1ccrl.1c", 0x000000, 0x200000,CRC(bc3c9b12) SHA1(088e861e5c4b37c54b7f72963113a10870bf7927) ) |
| 4587 | ROM_LOAD( "ad1ccrh.2c", 0x200000, 0x080000,CRC(71f44526) SHA1(bb4811fc5de626380ce6a17bee73e5e47926d850) ) |
| 4010 | 4588 | |
| 4011 | 4589 | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 4012 | | ROM_LOAD( "rrs1pol0.5b", 0x80000*0, 0x80000,CRC(9376c384) SHA1(cde0e36db1beab1523607098a760d81fac2ea90e) ) |
| 4013 | | ROM_LOAD( "rrs1pol1.4b", 0x80000*1, 0x80000,CRC(094fa832) SHA1(cc59442540b1cdef068c4408b6e048c11042beb8) ) |
| 4014 | | ROM_LOAD( "rrs1pom0.5c", 0x80000*2, 0x80000,CRC(b47a7f8b) SHA1(0fa0456ad8b4864a7071b5b5ba1a78877c1ac0f0) ) |
| 4015 | | ROM_LOAD( "rrs1pom1.4c", 0x80000*3, 0x80000,CRC(27260361) SHA1(8775cc779eb8b6a0d79fa84d606c970ec2d6ea8d) ) |
| 4016 | | ROM_LOAD( "rrs1pou0.5d", 0x80000*4, 0x80000,CRC(74d6ec84) SHA1(63f5beee51443c98100330ec04291f71e10716c4) ) |
| 4017 | | ROM_LOAD( "rrs1pou1.4d", 0x80000*5, 0x80000,CRC(f527caaa) SHA1(f92bdd15323239d593ddac92a11d23a27e6635ed) ) |
| 4590 | ROM_LOAD( "ad1potl0.5b", 0x80000*0, 0x80000,CRC(dfc7e729) SHA1(5e3deef66d0a5dd2ff0584b8c8be4bf5e798e4d0) ) |
| 4591 | ROM_LOAD( "ad1potl1.4b", 0x80000*1, 0x80000,CRC(5914ef8e) SHA1(f6db9c3061ceda76eef0a9538d9c048366b71124) ) |
| 4592 | ROM_LOAD( "ad1potm0.5c", 0x80000*2, 0x80000,CRC(844bcd6b) SHA1(629b8dc0a7e94410c08c8874b69d9f4bc22f3e4f) ) |
| 4593 | ROM_LOAD( "ad1potm1.4c", 0x80000*3, 0x80000,CRC(515cf541) SHA1(db1522813ea3e982d479cc1903d18799bf75aea9) ) |
| 4594 | ROM_LOAD( "ad1potu0.5d", 0x80000*4, 0x80000,CRC(e0f44949) SHA1(ffdb64d600883974b05edaa9ed3071af355ee17f) ) |
| 4595 | ROM_LOAD( "ad1potu1.4d", 0x80000*5, 0x80000,CRC(f2cd2cbb) SHA1(19fe6e3454a1e4353c7fe0a0d7a71742fea946de) ) |
| 4018 | 4596 | |
| 4019 | 4597 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 4020 | | ROM_LOAD( "rrs1wav0.10r", 0x100000*0, 0x100000,CRC(99d11a2d) SHA1(1f3db98a99be0f07c03b0a7817561459a58f310e) ) |
| 4021 | | ROM_LOAD( "rrs1wav1.10p", 0x100000*2, 0x100000,CRC(ad28444a) SHA1(c31bbf3cae5015e5494fe4988b9b01d822224c69) ) |
| 4022 | | ROM_LOAD( "rrs1wav2.10n", 0x100000*1, 0x100000,CRC(6f0d4619) SHA1(cd3d57f2ea21497f388ffa29ec7d2665647a01c0) ) |
| 4023 | | ROM_LOAD( "rrs1wav3.10l", 0x100000*3, 0x100000,CRC(106e761f) SHA1(97f47b857bdcbc79b0aface53dd385e67fcc9108) ) |
| 4598 | ROM_LOAD( "ad1wave0.10r", 0x100000*0, 0x100000,CRC(c7879a72) SHA1(ae04d664858b0944583590ed0003a9420032d5ca) ) |
| 4599 | ROM_LOAD( "ad1wave1.10p", 0x100000*2, 0x100000,CRC(69c1d41e) SHA1(b5cdfe7b75075c585dfd842347f8e4e692bb2781) ) |
| 4600 | ROM_LOAD( "ad1wave2.10n", 0x100000*1, 0x100000,CRC(365a6831) SHA1(ddaa44a4436d6de120b64a5d130b1ee18f872e19) ) |
| 4601 | ROM_LOAD( "ad1wave3.10l", 0x100000*3, 0x100000,CRC(cd8ecb0b) SHA1(7950b5a3a81f5554f57accabc7a623b8265a21a1) ) |
| 4024 | 4602 | |
| 4025 | 4603 | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 4026 | 4604 | ROM_LOAD( "rr1gam.2d", 0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| r24771 | r24772 | |
| 4028 | 4606 | ROM_LOAD( "rr1gam.4d", 0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4029 | 4607 | ROM_END |
| 4030 | 4608 | |
| 4031 | | ROM_START( ridgera2ja ) |
| 4609 | |
| 4610 | ROM_START( victlapw ) |
| 4032 | 4611 | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 4033 | | ROM_LOAD32_BYTE( "rrs1prll.4d", 0x00003, 0x80000, CRC(fbf785a2) SHA1(b9333c7623f68f48aa6ae50913a22a527a19576a) ) |
| 4034 | | ROM_LOAD32_BYTE( "rrs1prlm.2d", 0x00002, 0x80000, CRC(562f747a) SHA1(79d818b87c9a992fc9706fb39e6d560c2b0aa392) ) |
| 4035 | | ROM_LOAD32_BYTE( "rrs1prum.8d", 0x00001, 0x80000, CRC(93259fb0) SHA1(c29787e873797a003db27adbd20d7b852e26d8c6) ) |
| 4036 | | ROM_LOAD32_BYTE( "rrs1pruu.6d", 0x00000, 0x80000, CRC(31cdefe8) SHA1(ae836d389bed43dd156eb4cf3e97b6f1ad68181e) ) |
| 4612 | ROM_LOAD32_BYTE( "advprgll.4d", 0x00003, 0x80000, CRC(4dc1b0ab) SHA1(b5913388d16f824af6dbb01b5b0350d510667a87) ) |
| 4613 | ROM_LOAD32_BYTE( "advprglm.2d", 0x00002, 0x80000, CRC(7b658bef) SHA1(cf982b49fde0c1897c4c16e77f9eb2a145d8cd42) ) |
| 4614 | ROM_LOAD32_BYTE( "advprgum.8d", 0x00001, 0x80000, CRC(af67f2fb) SHA1(f391843ee0d053e33660c60e3718871142d932f2) ) |
| 4615 | ROM_LOAD32_BYTE( "advprguu.6d", 0x00000, 0x80000, CRC(b60e5d2b) SHA1(f5740615c2864c5c6433275cf4388bda5122b7a7) ) |
| 4037 | 4616 | |
| 4038 | 4617 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 4039 | 4618 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| r24771 | r24772 | |
| 4048 | 4627 | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 4049 | 4628 | |
| 4050 | 4629 | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 4051 | | ROM_LOAD( "rrs1data.6r", 0, 0x080000, CRC(b7063aa8) SHA1(08ff689e8dd529b91eee423c93f084945c6de417) ) |
| 4630 | ROM_LOAD( "adv1data.6r", 0, 0x080000, CRC(10eecdb4) SHA1(aaedeed166614e6670e765e0d7e4e9eb5f38ad10) ) |
| 4052 | 4631 | |
| 4053 | 4632 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 4054 | | ROM_LOAD( "rrs1cg0.1a", 0x200000*0x4, 0x200000,CRC(714c0091) SHA1(df29512bd6e64827660c40304051366d2c4d7977) ) |
| 4055 | | ROM_LOAD( "rrs1cg1.2a", 0x200000*0x5, 0x200000,CRC(836545c1) SHA1(05e3346463d8d42b5d33216207e855033a65510d) ) |
| 4056 | | ROM_LOAD( "rrs1cg2.3a", 0x200000*0x6, 0x200000,CRC(00e9799d) SHA1(280184451138420f64080efe13e5e2795f7b61d4) ) |
| 4057 | | ROM_LOAD( "rrs1cg3.5a", 0x200000*0x7, 0x200000,CRC(3858983f) SHA1(feda270b71f1310ecf4c17823bc8827ca2951b40) ) |
| 4633 | ROM_LOAD( "adv1cg0.2a", 0x200000*0x0, 0x200000,CRC(13353848) SHA1(c6c7693e3cb086919daf9fcaf6bf602142213073) ) |
| 4634 | ROM_LOAD( "adv1cg1.1c", 0x200000*0x1, 0x200000,CRC(1542066c) SHA1(20a053e919b7a81da2a17d31dc7482832a4d4ffe) ) |
| 4635 | ROM_LOAD( "adv1cg2.2d", 0x200000*0x2, 0x200000,CRC(111f371c) SHA1(29d8062daae51b3c1712bd30baa9813a2b5b374d) ) |
| 4636 | ROM_LOAD( "adv1cg3.1e", 0x200000*0x3, 0x200000,CRC(a077831f) SHA1(71bb95199b368e48bc474123ca84d19213f73137) ) |
| 4637 | ROM_LOAD( "adv1cg4.2f", 0x200000*0x4, 0x200000,CRC(71abdacf) SHA1(64409e6aa40dd9e5a6dd1dc306860fbbf6ee7c3e) ) |
| 4638 | ROM_LOAD( "adv1cg5.1j", 0x200000*0x5, 0x200000,CRC(cd6cd798) SHA1(51070997a457c0ace078174569cd548ac2226b2d) ) |
| 4639 | ROM_LOAD( "adv1cg6.2k", 0x200000*0x6, 0x200000,CRC(94bdafba) SHA1(41e64fa99b342edd8b0ed95ae9869c23e03399e6) ) |
| 4640 | ROM_LOAD( "adv1cg7.1n", 0x200000*0x7, 0x200000,CRC(18823475) SHA1(a3244d665b59c352593de21f5cb8d55ddf8cee5c) ) |
| 4058 | 4641 | |
| 4059 | 4642 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 4060 | | ROM_LOAD( "rrs1ccrl.5a", 0x000000, 0x200000,CRC(304a8b57) SHA1(f4f3e7c194697d754375f36a0e41d0941fa5d225) ) |
| 4061 | | ROM_LOAD( "rrs1ccrh.5c", 0x200000, 0x080000,CRC(bd3c86ab) SHA1(cd3a8774843c5864e651fa8989c80e2d975a13e8) ) |
| 4643 | ROM_LOAD( "adv1ccrl.5a", 0x000000, 0x200000,CRC(dd2b96ae) SHA1(6337ce17e617234c27ebad578ba82451649aad9c) ) /* ident to adv1ccrl.5l */ |
| 4644 | ROM_LOAD( "adv1ccrh.5c", 0x200000, 0x080000,CRC(5719844a) SHA1(a17d7bc239235e9f566931ba4fee1d6ad7964d83) ) /* ident to adv1ccrh.5j */ |
| 4062 | 4645 | |
| 4063 | | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 4064 | | ROM_LOAD( "rrs1pol0.5b", 0x80000*0, 0x80000,CRC(9376c384) SHA1(cde0e36db1beab1523607098a760d81fac2ea90e) ) |
| 4065 | | ROM_LOAD( "rrs1pol1.4b", 0x80000*1, 0x80000,CRC(094fa832) SHA1(cc59442540b1cdef068c4408b6e048c11042beb8) ) |
| 4066 | | ROM_LOAD( "rrs1pom0.5c", 0x80000*2, 0x80000,CRC(b47a7f8b) SHA1(0fa0456ad8b4864a7071b5b5ba1a78877c1ac0f0) ) |
| 4067 | | ROM_LOAD( "rrs1pom1.4c", 0x80000*3, 0x80000,CRC(27260361) SHA1(8775cc779eb8b6a0d79fa84d606c970ec2d6ea8d) ) |
| 4068 | | ROM_LOAD( "rrs1pou0.5d", 0x80000*4, 0x80000,CRC(74d6ec84) SHA1(63f5beee51443c98100330ec04291f71e10716c4) ) |
| 4069 | | ROM_LOAD( "rrs1pou1.4d", 0x80000*5, 0x80000,CRC(f527caaa) SHA1(f92bdd15323239d593ddac92a11d23a27e6635ed) ) |
| 4646 | ROM_REGION( 0x80000*9, "pointrom", 0 ) /* 3d model data */ |
| 4647 | ROM_LOAD( "adv1pot.l0", 0x80000*0, 0x80000,CRC(3b85b2a4) SHA1(84c92ed0105618d4aa5508af344b4b6cfa772567) ) |
| 4648 | ROM_LOAD( "adv1pot.l1", 0x80000*1, 0x80000,CRC(601d6488) SHA1(c7932103ba6070e17deb3cc06060eed7789f938e) ) |
| 4649 | ROM_LOAD( "adv1pot.l2", 0x80000*2, 0x80000,CRC(a0323a84) SHA1(deadf9a47461df7b137759d6886e676137b39fd2) ) |
| 4650 | ROM_LOAD( "adv1pot.m0", 0x80000*3, 0x80000,CRC(20951aa2) SHA1(3de55bded443a5b78699cec4845470b53b22301a) ) |
| 4651 | ROM_LOAD( "adv1pot.m1", 0x80000*4, 0x80000,CRC(5aed6fbf) SHA1(8cee781d8a12e00635b9a1e5cc8d82e64b17e8f1) ) |
| 4652 | ROM_LOAD( "adv1pot.m2", 0x80000*5, 0x80000,CRC(00cbff92) SHA1(09a11ba064aafc921a7ca0add5898d91b773f10a) ) |
| 4653 | ROM_LOAD( "adv1pot.u0", 0x80000*6, 0x80000,CRC(6b73dd2a) SHA1(e3654ab2b62e4f3314558209e37c5636f871a6c7) ) |
| 4654 | ROM_LOAD( "adv1pot.u1", 0x80000*7, 0x80000,CRC(c8788f74) SHA1(606e10b05146e3db824aa608745de80584420d12) ) |
| 4655 | ROM_LOAD( "adv1pot.u2", 0x80000*8, 0x80000,CRC(e67f29c5) SHA1(16222afb4f1f494711dd00ebb347c824db333bae) ) |
| 4070 | 4656 | |
| 4071 | 4657 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 4072 | | ROM_LOAD( "rrs1wav0.10r", 0x100000*0, 0x100000,CRC(99d11a2d) SHA1(1f3db98a99be0f07c03b0a7817561459a58f310e) ) |
| 4073 | | ROM_LOAD( "rrs1wav1.10p", 0x100000*2, 0x100000,CRC(ad28444a) SHA1(c31bbf3cae5015e5494fe4988b9b01d822224c69) ) |
| 4074 | | ROM_LOAD( "rrs1wav2.10n", 0x100000*1, 0x100000,CRC(6f0d4619) SHA1(cd3d57f2ea21497f388ffa29ec7d2665647a01c0) ) |
| 4075 | | ROM_LOAD( "rrs1wav3.10l", 0x100000*3, 0x100000,CRC(106e761f) SHA1(97f47b857bdcbc79b0aface53dd385e67fcc9108) ) |
| 4658 | ROM_LOAD( "adv1wav0.10r", 0x000000, 0x100000, CRC(f07b2d9d) SHA1(fd46c23b336d5e9a748f7f8d825c19737125d2fb) ) |
| 4659 | ROM_LOAD( "adv1wav1.10p", 0x200000, 0x100000, CRC(737f3c7a) SHA1(4737994f146c0076e7270785f41f3a85c53c7c5f) ) |
| 4660 | ROM_LOAD( "adv1wav2.10n", 0x100000, 0x100000, CRC(c1a5ca5e) SHA1(27e6f9256d5fe5966e91d6be1e6e80900a764af1) ) |
| 4661 | ROM_LOAD( "adv1wav3.10l", 0x300000, 0x100000, CRC(fc6b8004) SHA1(5c9e0805895931ec2b6a43376059bdbf5777222f) ) |
| 4076 | 4662 | |
| 4077 | 4663 | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 4078 | 4664 | ROM_LOAD( "rr1gam.2d", 0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| r24771 | r24772 | |
| 4080 | 4666 | ROM_LOAD( "rr1gam.4d", 0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4081 | 4667 | ROM_END |
| 4082 | 4668 | |
| 4083 | | ROM_START( ridgerac ) |
| 4084 | | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 4085 | | ROM_LOAD32_BYTE( "rr3prgll.4d", 0x00003, 0x80000, CRC(856fe5ec) SHA1(72d95b8bd5da551c3d358b8ab266373a89f8aa6a) ) |
| 4086 | | ROM_LOAD32_BYTE( "rr3prglm.2d", 0x00002, 0x80000, CRC(1e9ef0a9) SHA1(a4577bcdf13673568793d8a324945fca30b10f43) ) |
| 4087 | | ROM_LOAD32_BYTE( "rr3prgum.8d", 0x00001, 0x80000, CRC(e160f63f) SHA1(9b4b7a13eb4bc19fcb53daedb87e4945c20a1b8e) ) |
| 4088 | | ROM_LOAD32_BYTE( "rr3prguu.6d", 0x00000, 0x80000, CRC(f07c78c0) SHA1(dbed76d868b761711faf5b6e11f2c9affb91db5d) ) |
| 4669 | /*********************************************************************************************/ |
| 4089 | 4670 | |
| 4671 | ROM_START( propcycl ) |
| 4672 | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 4673 | ROM_LOAD32_BYTE( "pr2ver-a.1", 0x00003, 0x100000, CRC(3f58594c) SHA1(5fdd8c61b47b51088a201799ce0c2f08c32ef852) ) |
| 4674 | ROM_LOAD32_BYTE( "pr2ver-a.2", 0x00002, 0x100000, CRC(c0da354a) SHA1(f27a71a62385b842404fcd8ed6513158e3639b8f) ) |
| 4675 | ROM_LOAD32_BYTE( "pr2ver-a.3", 0x00001, 0x100000, CRC(74bf4b74) SHA1(02713aa07238cc9e30163ae24d12c034aa972ff3) ) |
| 4676 | ROM_LOAD32_BYTE( "pr2ver-a.4", 0x00000, 0x100000, CRC(cf4d5638) SHA1(2ddd00d6ec3b85c234820507650d201e176c94a2) ) |
| 4677 | |
| 4090 | 4678 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 4091 | 4679 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 4092 | 4680 | |
| 4093 | 4681 | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 4094 | 4682 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 4095 | 4683 | |
| 4096 | | ROM_REGION16_LE( 0x4000, "iomcu", 0 ) /* I/O MCU BIOS */ |
| 4097 | | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 4684 | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* SS22-BIOS ver1.41 */ |
| 4685 | ROM_LOAD( "pr1data.8k", 0, 0x080000, CRC(2e5767a4) SHA1(390bf05c90044d841fe2dd4a427177fa1570b9a6) ) |
| 4098 | 4686 | |
| 4099 | | ROM_REGION16_LE( 0x4000, "mcu_c74", 0 ) /* SUB/SOUND MCU BIOS */ |
| 4100 | | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 4687 | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 4688 | ROM_LOAD( "pr1scg0.12f", 0x200000*0, 0x200000,CRC(2d09a869) SHA1(ce8beabaac255e1de29d944c9866022bad713519) ) /* identical to "pr1scg0.12l" */ |
| 4689 | ROM_LOAD( "pr1scg1.10f", 0x200000*1, 0x200000,CRC(7433c5bd) SHA1(a8fd4e73de66e3d443c0cb5b5beef8f467014815) ) /* identical to "pr1scg1.10l" */ |
| 4101 | 4690 | |
| 4102 | | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 4103 | | ROM_LOAD( "rr1data.6r", 0, 0x080000, CRC(18f5f748) SHA1(e0d149a66de36156edd9b55f604c9a9801aaefa8) ) |
| 4104 | | |
| 4105 | 4691 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 4106 | | ROM_LOAD( "rr1cg0.bin", 0x200000*0x4, 0x200000, CRC(b557a795) SHA1(f345486ffbe797246ad80a55d3c4a332ed6e2888) )//,CRC(d1b0eec6) SHA1(f66922c324dfc3ff408db7556c587ef90ca64c3b) ) |
| 4107 | | ROM_LOAD( "rr1cg1.bin", 0x200000*0x5, 0x200000, CRC(0fa212d9) SHA1(a1311de0a504e2d399044fa8ac32ec6c56ec965f) )//,CRC(bb695d89) SHA1(557bac9d2718519c1f69e374d0ef9a86a43fe86c) ) |
| 4108 | | ROM_LOAD( "rr1cg2.bin", 0x200000*0x6, 0x200000, CRC(18e2d2bd) SHA1(69c2ea62eeb255f27d3c69373f6716b0a34683cc) )//,CRC(8f374c0a) SHA1(94ff8581de11a03ef86525155f8433bf5858b980) ) |
| 4109 | | ROM_LOAD( "rr1cg3.bin", 0x200000*0x7, 0x200000, CRC(9564488b) SHA1(6b27d1aea75d6be747c62e165cfa49ecc5d9e767) )//,CRC(072a5c47) SHA1(86b8e973ae6b78197d685fe6d14722d8e2d0dfec) ) |
| 4692 | ROM_LOAD( "pr1cg0.12b", 0x200000*0x0, 0x200000,CRC(0a041238) SHA1(da5688970432f7fe39337ee9fb46ca25a53fdb11) ) /* identical to "pr1cg0.8d" */ |
| 4693 | ROM_LOAD( "pr1cg1.10d", 0x200000*0x1, 0x200000,CRC(7d09e6a7) SHA1(892317ee0bd796fa5c70d64912ef2e696792a2d4) ) /* identical to "pr1cg1.13b" */ |
| 4694 | ROM_LOAD( "pr1cg2.12d", 0x200000*0x2, 0x200000,CRC(659f006e) SHA1(23362a922cb1100950181fac4858b953d8fc0794) ) /* identical to "pr1cg2.14b" */ |
| 4695 | ROM_LOAD( "pr1cg3.13d", 0x200000*0x3, 0x200000,CRC(d30bffa3) SHA1(2f05227d91d257db9fa8cae114974de602d98729) ) /* identical to "pr1cg3.16b" */ |
| 4696 | ROM_LOAD( "pr1cg4.14d", 0x200000*0x4, 0x200000,CRC(f4636cc9) SHA1(4e01a476e418e5790878572e83a8a11536ce30ae) ) /* identical to "pr1cg4.18b" */ |
| 4697 | ROM_LOAD( "pr1cg5.16d", 0x200000*0x5, 0x200000,CRC(97d333de) SHA1(e8f8383f49aae834dd8b57231b25899703cef966) ) /* identical to "pr1cg5.19b" */ |
| 4698 | ROM_LOAD( "pr1cg6.18a", 0x200000*0x6, 0x200000,CRC(3e081c03) SHA1(6ccb162952f6076359b2785b5d800b39a9a3c5ce) ) /* identical to "pr1cg6.18d" */ |
| 4699 | ROM_LOAD( "pr1cg7.15a", 0x200000*0x7, 0x200000,CRC(ec9fc5c8) SHA1(16de614b26f06bbddae3ab56cebba45efd6fe81b) ) /* identical to "pr1cg7.19d" */ |
| 4110 | 4700 | |
| 4111 | 4701 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 4112 | | ROM_LOAD( "rr1ccrl.bin",0x000000, 0x200000, CRC(6092d181) SHA1(52c0e3ac20aa23059a87d1a985d24ae641577310) )//,CRC(c15cb257) SHA1(0cb8f231c62ea37955be5d452a436a6e815af8e8) ) |
| 4113 | | ROM_LOAD( "rr1ccrh.bin",0x200000, 0x080000, CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) )//,CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) ) |
| 4702 | ROM_LOAD( "pr1ccrl.3d", 0x000000, 0x200000,CRC(e01321fd) SHA1(5938c6eff8e1b3642728c3be733f567a97cb5aad) ) /* identical to "pr1ccrl.7b" */ |
| 4703 | ROM_LOAD( "pr1ccrh.1d", 0x200000, 0x080000,CRC(1d68bc31) SHA1(d534d0daebe7018e83b57cc7919c294ab89bddc8) ) /* identical to "pr1ccrh.5b" */ |
| 4704 | /* These two ROMs define a huge texture tilemap using the tiles from "textile". |
| 4705 | * The tilemap has 0x100 columns. |
| 4706 | * |
| 4707 | * pr1ccrl contains little endian 16 bit words. Each word references a 16x16 tile. |
| 4708 | * |
| 4709 | * pr1ccrh.1d contains packed nibbles. Each nibble encodes three tile attributes: |
| 4710 | * 0x8 = swapxy |
| 4711 | * 0x4 = flipx |
| 4712 | * 0x2 = flipy |
| 4713 | * 0x1 = tile bank (used in some sys22 games) |
| 4714 | */ |
| 4114 | 4715 | |
| 4115 | | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 4116 | | ROM_LOAD( "rr1potl0.5b", 0x80000*0, 0x80000,CRC(3ac193e3) SHA1(ff213766f15e34dc1b25187b57d94e17930090a3) ) |
| 4117 | | ROM_LOAD( "rr1potl1.4b", 0x80000*1, 0x80000,CRC(ac3ffba5) SHA1(4eb4dda5faeff237e0d35725b56d309948fba900) ) |
| 4118 | | ROM_LOAD( "rr1potm0.5c", 0x80000*2, 0x80000,CRC(42a3fa08) SHA1(15db0ae7ccf7f5a77b9dd9a9d82a488b67f8aaff) ) |
| 4119 | | ROM_LOAD( "rr1potm1.4c", 0x80000*3, 0x80000,CRC(1bc1ea7b) SHA1(52c21eef4989c45acc5fa4deda2d0b63214731c8) ) |
| 4120 | | ROM_LOAD( "rr1potu0.5d", 0x80000*4, 0x80000,CRC(5e367f72) SHA1(5887f011379dce865fef238b402678a3d2033de9) ) |
| 4121 | | ROM_LOAD( "rr1potu1.4d", 0x80000*5, 0x80000,CRC(31d92475) SHA1(51d3c0baa223e1bc16ea2950f2e085597528f870) ) |
| 4716 | ROM_REGION( 0x80000*9, "pointrom", 0 ) /* 3d model data */ |
| 4717 | ROM_LOAD( "pr1ptrl0.18k", 0x80000*0, 0x80000,CRC(fddb27a2) SHA1(6e837b45e3f9ed7ca3d1a457d0f0124de5618d1f) ) |
| 4718 | ROM_LOAD( "pr1ptrl1.16k", 0x80000*1, 0x80000,CRC(6964dd06) SHA1(f38a550165504693d20892a7dcfaf01db19b04ef) ) |
| 4719 | ROM_LOAD( "pr1ptrl2.15k", 0x80000*2, 0x80000,CRC(4d7ed1d4) SHA1(8f72864a06ff8962e640cb36d062bddf5d110308) ) |
| 4122 | 4720 | |
| 4721 | ROM_LOAD( "pr1ptrm0.18j", 0x80000*3, 0x80000,CRC(b6f204b7) SHA1(3b34f240b399b6406faaf338ae0ab536247e64a6) ) |
| 4722 | ROM_LOAD( "pr1ptrm1.16j", 0x80000*4, 0x80000,CRC(949588b7) SHA1(fdaf50ff2496200b9c981efc18b035f3c0a96ace) ) |
| 4723 | ROM_LOAD( "pr1ptrm2.15j", 0x80000*5, 0x80000,CRC(dc1cef0a) SHA1(8cbc02cf73fac3cc110b676d77602ae628385eae) ) |
| 4724 | |
| 4725 | ROM_LOAD( "pr1ptru0.18f", 0x80000*6, 0x80000,CRC(5d66a7c4) SHA1(c9ed1c18724192d45c1f6b40096f15d02baf2401) ) |
| 4726 | ROM_LOAD( "pr1ptru1.16f", 0x80000*7, 0x80000,CRC(e9a3f72b) SHA1(f967e1adf8eee4fffdf4288d36a93c5bb4f9a126) ) |
| 4727 | ROM_LOAD( "pr1ptru2.15f", 0x80000*8, 0x80000,CRC(c346a842) SHA1(299bc0a30d0e74d8adfa3dc605aebf6439f5bc18) ) |
| 4728 | |
| 4123 | 4729 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 4124 | | ROM_LOAD( "rr1wav0.10r", 0x100000*0, 0x100000,CRC(a8e85bde) SHA1(b56677e9f6c98f7b600043f5dcfef3a482ca7455) ) |
| 4125 | | ROM_LOAD( "rr1wav1.10p", 0x100000*2, 0x100000,CRC(35f47c8e) SHA1(7c3f9e942f532af8008fbead2a96fee6084bcde6) ) |
| 4126 | | ROM_LOAD( "rr1wav2.10n", 0x100000*1, 0x100000,CRC(3244cb59) SHA1(b3283b30cfafbfdcbc6d482ecc4ed6a47a527ca4) ) |
| 4127 | | ROM_LOAD( "rr1wav3.10l", 0x100000*3, 0x100000,CRC(c4cda1a7) SHA1(60bc96880ec79efdff3cc70c09e848692a40bea4) ) |
| 4128 | | |
| 4129 | | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 4130 | | ROM_LOAD( "rr1gam.2d", 0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4131 | | ROM_LOAD( "rr1gam.3d", 0x0100, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4132 | | ROM_LOAD( "rr1gam.4d", 0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4730 | ROM_LOAD( "pr1wavea.2l", 0x000000, 0x400000, CRC(320f3913) SHA1(3887b7334ca7762794c14198dd24bab47fcd9505) ) |
| 4731 | ROM_LOAD( "pr1waveb.1l", 0x800000, 0x400000, CRC(d91acb26) SHA1(c2161e2d70e08aed15cbc875ffee685190611daf) ) |
| 4133 | 4732 | ROM_END |
| 4134 | 4733 | |
| 4135 | | ROM_START( ridgeracb ) |
| 4136 | | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 4137 | | ROM_LOAD32_BYTE( "rr1prll.4d", 0x00003, 0x80000, CRC(4bb7fc86) SHA1(8291375b8ec4d37e0d9e3bf38da2d5907b0f31bd) ) |
| 4138 | | ROM_LOAD32_BYTE( "rr1prlm.2d", 0x00002, 0x80000, CRC(68e13830) SHA1(ddc447c7afbb5c4238969d7e78bfe9cf8fac6061) ) |
| 4139 | | ROM_LOAD32_BYTE( "rr1prum.8d", 0x00001, 0x80000, CRC(705ef78a) SHA1(881903413e66d6fd83d46eb18c4e1230531832ae) ) |
| 4140 | | ROM_LOAD32_BYTE( "rr2pruu.6d", 0x00000, 0x80000, CRC(a79e456f) SHA1(049c596e01e53e3a401c5c4260517f170688d387) ) |
| 4141 | 4734 | |
| 4735 | ROM_START( airco22b ) |
| 4736 | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 4737 | ROM_LOAD32_BYTE( "acs1verb.1", 0x00003, 0x100000, CRC(062c4f61) SHA1(98e1c75dd0f493eb6ebb64b46543217c1d40116e) ) |
| 4738 | ROM_LOAD32_BYTE( "acs1verb.2", 0x00002, 0x100000, CRC(8ae69711) SHA1(4c5323fa8f0419275e330fec66d1fb2b89bb3795) ) |
| 4739 | ROM_LOAD32_BYTE( "acs1verb.3", 0x00001, 0x100000, CRC(71738e67) SHA1(eb8c66dedbeff911b6166ebbda466fb9656ef0fb) ) |
| 4740 | ROM_LOAD32_BYTE( "acs1verb.4", 0x00000, 0x100000, CRC(3b193add) SHA1(5e3bca13905bfa3a2947f4f16ca01878b0a14a3a) ) |
| 4741 | |
| 4142 | 4742 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 4143 | 4743 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 4144 | 4744 | |
| 4145 | 4745 | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 4146 | 4746 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 4147 | 4747 | |
| 4148 | | ROM_REGION16_LE( 0x4000, "iomcu", 0 ) /* I/O MCU BIOS */ |
| 4149 | | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 4748 | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* S22-BIOS ver1.20 */ |
| 4749 | ROM_LOAD( "acs1data.8k", 0, 0x080000, CRC(33824bc9) SHA1(80ec63883770e5eec1f5f1ddc16a85ef8f22a48b) ) |
| 4150 | 4750 | |
| 4151 | | ROM_REGION16_LE( 0x4000, "mcu_c74", 0 ) /* SUB/SOUND MCU BIOS */ |
| 4152 | | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 4751 | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 4752 | ROM_LOAD( "acs1scg0.12l", 0x200000*0, 0x200000,CRC(e5235404) SHA1(3133b71d1bde3a9815cd02e97382b8078b62b0bb) ) |
| 4753 | ROM_LOAD( "acs1scg1.10l", 0x200000*1, 0x200000,CRC(828e91e7) SHA1(8383b029cd29fbad107fd49e866defb50c11c99a) ) |
| 4153 | 4754 | |
| 4154 | | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 4155 | | ROM_LOAD( "rr1data.6r", 0, 0x080000, CRC(18f5f748) SHA1(e0d149a66de36156edd9b55f604c9a9801aaefa8) ) |
| 4156 | | |
| 4157 | 4755 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 4158 | | ROM_LOAD( "rr1cg0.bin", 0x200000*0x4, 0x200000, CRC(b557a795) SHA1(f345486ffbe797246ad80a55d3c4a332ed6e2888) )//,CRC(d1b0eec6) SHA1(f66922c324dfc3ff408db7556c587ef90ca64c3b) ) |
| 4159 | | ROM_LOAD( "rr1cg1.bin", 0x200000*0x5, 0x200000, CRC(0fa212d9) SHA1(a1311de0a504e2d399044fa8ac32ec6c56ec965f) )//,CRC(bb695d89) SHA1(557bac9d2718519c1f69e374d0ef9a86a43fe86c) ) |
| 4160 | | ROM_LOAD( "rr1cg2.bin", 0x200000*0x6, 0x200000, CRC(18e2d2bd) SHA1(69c2ea62eeb255f27d3c69373f6716b0a34683cc) )//,CRC(8f374c0a) SHA1(94ff8581de11a03ef86525155f8433bf5858b980) ) |
| 4161 | | ROM_LOAD( "rr1cg3.bin", 0x200000*0x7, 0x200000, CRC(9564488b) SHA1(6b27d1aea75d6be747c62e165cfa49ecc5d9e767) )//,CRC(072a5c47) SHA1(86b8e973ae6b78197d685fe6d14722d8e2d0dfec) ) |
| 4756 | ROM_LOAD( "acs1cg0.8d", 0x200000*0x0, 0x200000,CRC(1f31343e) SHA1(25ba730cec74e0ed0b404f5c4430b7c3368c9b52) ) |
| 4757 | ROM_LOAD( "acs1cg1.10d", 0x200000*0x1, 0x200000,CRC(ccd5481d) SHA1(050e6fc7d4e0591f8ffc9552d140b6bd4533c06d) ) |
| 4758 | ROM_LOAD( "acs1cg2.12d", 0x200000*0x2, 0x200000,CRC(14e5d0d2) SHA1(3147ad11098030e9cfd93fbc0a1b3aafa8b8aba6) ) |
| 4759 | ROM_LOAD( "acs1cg3.13d", 0x200000*0x3, 0x200000,CRC(1a7bcc16) SHA1(bbc4ca5b208bea8394d1679e4e2d17d22331e2c8) ) |
| 4760 | ROM_LOAD( "acs1cg4.14d", 0x200000*0x4, 0x200000,CRC(1920b7fb) SHA1(56318f2a96c55998bb9a8d791d56be3dfb39867e) ) |
| 4761 | ROM_LOAD( "acs1cg5.16d", 0x200000*0x5, 0x200000,CRC(3dd109b7) SHA1(a7f914b9b80f1bca1afb6144698578a29ca74676) ) |
| 4762 | ROM_LOAD( "acs1cg6.18d", 0x200000*0x6, 0x200000,CRC(ec71c8a3) SHA1(86892a91883d483ca0d422b78fa36042e02f3ad3) ) |
| 4763 | ROM_LOAD( "acs1cg7.19d", 0x200000*0x7, 0x200000,CRC(82271757) SHA1(023c935e78b14da310e4c29da8785b82aa3241ac) ) |
| 4162 | 4764 | |
| 4163 | 4765 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 4164 | | ROM_LOAD( "rr1ccrl.bin",0x000000, 0x200000, CRC(6092d181) SHA1(52c0e3ac20aa23059a87d1a985d24ae641577310) )//,CRC(c15cb257) SHA1(0cb8f231c62ea37955be5d452a436a6e815af8e8) ) |
| 4165 | | ROM_LOAD( "rr1ccrh.bin",0x200000, 0x080000, CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) )//,CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) ) |
| 4766 | ROM_LOAD( "acs1ccrl.3d", 0x000000, 0x200000,CRC(07088ba1) SHA1(a962c0821d5af28ed508cfdbd613675454e306e3) ) |
| 4767 | ROM_LOAD( "acs1ccrh.1d", 0x200000, 0x080000,CRC(62936af6) SHA1(ca80b68415aa2cd2ce4e90404f10640d0ae38be9) ) |
| 4166 | 4768 | |
| 4167 | | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 4168 | | ROM_LOAD( "rr1potl0.5b", 0x80000*0, 0x80000,CRC(3ac193e3) SHA1(ff213766f15e34dc1b25187b57d94e17930090a3) ) |
| 4169 | | ROM_LOAD( "rr1potl1.4b", 0x80000*1, 0x80000,CRC(ac3ffba5) SHA1(4eb4dda5faeff237e0d35725b56d309948fba900) ) |
| 4170 | | ROM_LOAD( "rr1potm0.5c", 0x80000*2, 0x80000,CRC(42a3fa08) SHA1(15db0ae7ccf7f5a77b9dd9a9d82a488b67f8aaff) ) |
| 4171 | | ROM_LOAD( "rr1potm1.4c", 0x80000*3, 0x80000,CRC(1bc1ea7b) SHA1(52c21eef4989c45acc5fa4deda2d0b63214731c8) ) |
| 4172 | | ROM_LOAD( "rr1potu0.5d", 0x80000*4, 0x80000,CRC(5e367f72) SHA1(5887f011379dce865fef238b402678a3d2033de9) ) |
| 4173 | | ROM_LOAD( "rr1potu1.4d", 0x80000*5, 0x80000,CRC(31d92475) SHA1(51d3c0baa223e1bc16ea2950f2e085597528f870) ) |
| 4769 | ROM_REGION( 0x80000*12, "pointrom", 0 ) /* 3d model data */ |
| 4770 | ROM_LOAD( "acs1ptl0.18k", 0x80000*0x0, 0x80000,CRC(bd5896c7) SHA1(58ec7d0f1e0bfdbf4908e1d920bbd7f094993777) ) |
| 4771 | ROM_LOAD( "acs1ptl1.16k", 0x80000*0x1, 0x80000,CRC(e583b975) SHA1(beb0cc2b44bc69af057c2bb744cd7e1b95de577a) ) |
| 4772 | ROM_LOAD( "acs1ptl2.15k", 0x80000*0x2, 0x80000,CRC(802d737a) SHA1(3d99a369db70d13fb87c2ff26c82b4b39afe94d9) ) |
| 4773 | ROM_LOAD( "acs1ptl3.14k", 0x80000*0x3, 0x80000,CRC(fe556ecb) SHA1(9d9dbbb4f1d3688fb763001834640d79d9987d47) ) |
| 4174 | 4774 | |
| 4775 | ROM_LOAD( "acs1ptm0.18j", 0x80000*0x4, 0x80000,CRC(949b6c58) SHA1(6ea016551b10f5d5764921dcc5a4b81d2b93d701) ) |
| 4776 | ROM_LOAD( "acs1ptm1.16j", 0x80000*0x5, 0x80000,CRC(8b2b99d9) SHA1(89c3545c4035509307728a9577018c1100ce3a54) ) |
| 4777 | ROM_LOAD( "acs1ptm2.15j", 0x80000*0x6, 0x80000,CRC(f1515080) SHA1(27a87217a140477a6840a610c95ae57abc0d01a6) ) |
| 4778 | ROM_LOAD( "acs1ptm3.14j", 0x80000*0x7, 0x80000,CRC(e364f4aa) SHA1(3af6a864765871664cccad82c4795f677be68d51) ) |
| 4779 | |
| 4780 | ROM_LOAD( "acs1ptu0.18f", 0x80000*0x8, 0x80000,CRC(746b3084) SHA1(73397d1f22300fb3a81a0a068da4d0a8cfdc0a36) ) |
| 4781 | ROM_LOAD( "acs1ptu1.16f", 0x80000*0x9, 0x80000,CRC(b44f1d3b) SHA1(f3f1a85c082053653e4da7d7f01f1baef1a013c8) ) |
| 4782 | ROM_LOAD( "acs1ptu2.15f", 0x80000*0xa, 0x80000,CRC(fdd2d778) SHA1(0269f971d778e908a1efb5a63b08fb3365d98c2a) ) |
| 4783 | ROM_LOAD( "acs1ptu3.14f", 0x80000*0xb, 0x80000,CRC(38b425d4) SHA1(8ff6dd6775d42afdff4c9fb2232e4d72b38e515a) ) |
| 4784 | |
| 4175 | 4785 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 4176 | | ROM_LOAD( "rr1wav0.10r", 0x100000*0, 0x100000,CRC(a8e85bde) SHA1(b56677e9f6c98f7b600043f5dcfef3a482ca7455) ) |
| 4177 | | ROM_LOAD( "rr1wav1.10p", 0x100000*2, 0x100000,CRC(35f47c8e) SHA1(7c3f9e942f532af8008fbead2a96fee6084bcde6) ) |
| 4178 | | ROM_LOAD( "rr1wav2.10n", 0x100000*1, 0x100000,CRC(3244cb59) SHA1(b3283b30cfafbfdcbc6d482ecc4ed6a47a527ca4) ) |
| 4179 | | ROM_LOAD( "rr1wav3.10l", 0x100000*3, 0x100000,CRC(c4cda1a7) SHA1(60bc96880ec79efdff3cc70c09e848692a40bea4) ) |
| 4786 | ROM_LOAD( "acs1wav0.1", 0x400000, 0x400000, CRC(52fb9762) SHA1(125c163e62d701c2e17ba0b572ed27c944ca0412) ) |
| 4787 | ROM_LOAD( "acs1wav1.2", 0x800000, 0x400000, CRC(b568dca2) SHA1(503deb277691d801acac1380ded2868a5d5ac501) ) |
| 4788 | ROM_END |
| 4180 | 4789 | |
| 4181 | | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 4182 | | ROM_LOAD( "rr1gam.2d", 0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4183 | | ROM_LOAD( "rr1gam.3d", 0x0100, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4184 | | ROM_LOAD( "rr1gam.4d", 0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4790 | |
| 4791 | ROM_START( cybrcycc ) |
| 4792 | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 4793 | ROM_LOAD32_BYTE( "cb2ver-c.1", 0x00003, 0x100000, CRC(a8e07a14) SHA1(9bef7068c9bf792960df922ea79e4565d7680433) ) |
| 4794 | ROM_LOAD32_BYTE( "cb2ver-c.2", 0x00002, 0x100000, CRC(054c504f) SHA1(9bde803ff09be0402f9b0388e55407362a2508e3) ) |
| 4795 | ROM_LOAD32_BYTE( "cb2ver-c.3", 0x00001, 0x100000, CRC(47e6306c) SHA1(39d6fc2c3cb9b4c9d3569cedb79b916a90537115) ) |
| 4796 | ROM_LOAD32_BYTE( "cb2ver-c.4", 0x00000, 0x100000, CRC(398426e4) SHA1(f20cd4892420e7b978baa51c9129b362422a3895) ) |
| 4797 | |
| 4798 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 4799 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 4800 | |
| 4801 | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 4802 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 4803 | |
| 4804 | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* S22-BIOS ver1.30 */ |
| 4805 | ROM_LOAD( "cb1datab.8k", 0, 0x080000, CRC(e2404221) SHA1(b88810dd45aee8a5475c30806cdfded25fa14e0e) ) |
| 4806 | |
| 4807 | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 4808 | ROM_LOAD( "cb1scg0.12f", 0x200000*0, 0x200000,CRC(7aaca90d) SHA1(9808819db5d86d555a03bb20a2fbedf060d04f0e) ) /* identical to "cb1scg0.12l" */ |
| 4809 | |
| 4810 | ROM_REGION( 0x200000*7, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 4811 | ROM_LOAD( "cb1cg0.12b", 0x200000*0x0, 0x200000,CRC(762a47a0) SHA1(8a49c700dca7afec5d8d6a38fedcd3ad4b0e6713) ) /* identical to "cb1cg0.8d" */ |
| 4812 | ROM_LOAD( "cb1cg1.10d", 0x200000*0x1, 0x200000,CRC(df92c3e6) SHA1(302d7ee7e073a45e7baa948543bd30251f903a6d) ) /* identical to "cb1cg1.13b" */ |
| 4813 | ROM_LOAD( "cb1cg2.12d", 0x200000*0x2, 0x200000,CRC(07bc508e) SHA1(7675694d10b50e57bb10b350559bd321df75d1ea) ) /* identical to "cb1cg2.14b" */ |
| 4814 | ROM_LOAD( "cb1cg3.13d", 0x200000*0x3, 0x200000,CRC(50c86dea) SHA1(7837a1d2bd3ade470f7fbc732513dd598badd219) ) /* identical to "cb1cg3.16b" */ |
| 4815 | ROM_LOAD( "cb1cg4.14d", 0x200000*0x4, 0x200000,CRC(e93b8894) SHA1(4d28b557b7ed2667e6af9f970f3e99cda785b940) ) /* identical to "cb1cg4.18b" */ |
| 4816 | ROM_LOAD( "cb1cg5.16d", 0x200000*0x5, 0x200000,CRC(9ee610a1) SHA1(ebc7892b6a66461ca6b6b912a264da1594340b2d) ) /* identical to "cb1cg5.19b" */ |
| 4817 | ROM_LOAD( "cb1cg6.18a", 0x200000*0x6, 0x200000,CRC(ddc3b5cc) SHA1(34edffee9eb6fbf4a00fce0da34d9354b1a1155f) ) /* identical to "cb1cg6.18d" */ |
| 4818 | |
| 4819 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 4820 | ROM_LOAD( "cb1ccrl.3d", 0x000000, 0x200000,CRC(2f171c48) SHA1(52b76213e37379b4a5cea7de40cf5396dc2998d8) ) /* identical to "cb1ccrl.7b" */ |
| 4821 | ROM_LOAD( "cb1ccrh.1d", 0x200000, 0x080000,CRC(86124b93) SHA1(f2cfd726313cbeff162d402a15de2360377630e7) ) /* identical to "cb1ccrh.5b" */ |
| 4822 | |
| 4823 | ROM_REGION( 0x80000*12, "pointrom", 0 ) /* 3d model data */ |
| 4824 | ROM_LOAD( "cb1ptrl0.18k", 0x80000*0x0, 0x80000,CRC(f1393a03) SHA1(c9e808601eef5839e6bff630e5f83380e073c5c0) ) |
| 4825 | ROM_LOAD( "cb1ptrl1.16k", 0x80000*0x1, 0x80000,CRC(2ad51de7) SHA1(efd102b960ca10cda70da84661acf61e4bbb9f00) ) |
| 4826 | ROM_LOAD( "cb1ptrl2.15k", 0x80000*0x2, 0x80000,CRC(78f77c0d) SHA1(5183a8909c2ac0a3d80e707393bcbb4441d79a3c) ) |
| 4827 | ROM_LOAD( "cb1ptrl3.14k", 0x80000*0x3, 0x80000,CRC(804bfb4a) SHA1(74b3fc3931265398e23605d3da7ca84a002da632) ) |
| 4828 | ROM_LOAD( "cb1ptrm0.18j", 0x80000*0x4, 0x80000,CRC(f4eece49) SHA1(3f34d1ae5986f0d340563ab0fb637bfdacb8712c) ) |
| 4829 | ROM_LOAD( "cb1ptrm1.16j", 0x80000*0x5, 0x80000,CRC(5f3cbd7d) SHA1(d00d0a96b71d6a3b98907c4ba7c702e549dd0adb) ) |
| 4830 | ROM_LOAD( "cb1ptrm2.15j", 0x80000*0x6, 0x80000,CRC(02c7e4af) SHA1(6a541a28163b1026a824f6f8aed05d0eb0c8ae93) ) |
| 4831 | ROM_LOAD( "cb1ptrm3.14j", 0x80000*0x7, 0x80000,CRC(ace3123b) SHA1(2b590ed967572d77b3cc6b37e341a5bdc55c762f) ) |
| 4832 | ROM_LOAD( "cb1ptru0.18f", 0x80000*0x8, 0x80000,CRC(58d35341) SHA1(a5fe00bdcf39521f0465743664ff0dd78be5d6e8) ) |
| 4833 | ROM_LOAD( "cb1ptru1.16f", 0x80000*0x9, 0x80000,CRC(f4d005b0) SHA1(0862ed1dd0818bfb765d97f1f9d996c321b0ec83) ) |
| 4834 | ROM_LOAD( "cb1ptru2.15f", 0x80000*0xa, 0x80000,CRC(68ffcd50) SHA1(5ca5f71b6b079fde14d76c869d211a815bffae68) ) |
| 4835 | ROM_LOAD( "cb1ptru3.14f", 0x80000*0xb, 0x80000,CRC(d89c1c2b) SHA1(9c25df696b2d120ce33d7774381460297740007a) ) |
| 4836 | |
| 4837 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 4838 | ROM_LOAD( "cb1wavea.2l", 0x000000, 0x400000, CRC(b79a624d) SHA1(c0ee358a183ba6d0835731dbdd191b64718fde6e) ) |
| 4839 | ROM_LOAD( "cb1waveb.1l", 0x800000, 0x200000, CRC(33bf08f6) SHA1(bf9d68b26a8158ea1abfe8428b7454cac25242c5) ) |
| 4840 | |
| 4841 | ROM_REGION( 0x4000, "nvram", 0 ) // default eeprom |
| 4842 | ROM_LOAD( "cybrcycc_defaults.nv", 0x0000, 0x4000, CRC(1ef95c25) SHA1(26b8bead9d62a420ee0ff770df83c4207a963065) ) |
| 4185 | 4843 | ROM_END |
| 4186 | 4844 | |
| 4187 | | ROM_START( ridgeracj ) |
| 4188 | | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 4189 | | ROM_LOAD32_BYTE( "rr1prll.4d", 0x00003, 0x80000, CRC(4bb7fc86) SHA1(8291375b8ec4d37e0d9e3bf38da2d5907b0f31bd) ) |
| 4190 | | ROM_LOAD32_BYTE( "rr1prlm.2d", 0x00002, 0x80000, CRC(68e13830) SHA1(ddc447c7afbb5c4238969d7e78bfe9cf8fac6061) ) |
| 4191 | | ROM_LOAD32_BYTE( "rr1prum.8d", 0x00001, 0x80000, CRC(705ef78a) SHA1(881903413e66d6fd83d46eb18c4e1230531832ae) ) |
| 4192 | | ROM_LOAD32_BYTE( "rr1pruu.6d", 0x00000, 0x80000, CRC(c1371f96) SHA1(a78e0bf6c147c034487a85efa0a8470f4e8f4bf0) ) |
| 4193 | 4845 | |
| 4846 | ROM_START( alpinerd ) |
| 4847 | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 4848 | ROM_LOAD32_BYTE( "ar2ver-d.1", 0x00003, 0x100000, CRC(fa3380b9) SHA1(2a46988745bd2672f8082399a68ae0d0ab3d28f2) ) |
| 4849 | ROM_LOAD32_BYTE( "ar2ver-d.2", 0x00002, 0x100000, CRC(76141352) SHA1(0f7230dd9cd6f1b83d499034affc7bc2c4385ab5) ) |
| 4850 | ROM_LOAD32_BYTE( "ar2ver-d.3", 0x00001, 0x100000, CRC(9beffe6a) SHA1(d8efd1e3829d32bb06537d7cecb59f8df9b6d663) ) |
| 4851 | ROM_LOAD32_BYTE( "ar2ver-d.4", 0x00000, 0x100000, CRC(1f3f1134) SHA1(0afa78444d1463d214f1afd7ec500af76d567489) ) |
| 4852 | |
| 4194 | 4853 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 4195 | 4854 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 4196 | 4855 | |
| 4197 | 4856 | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 4198 | 4857 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 4199 | 4858 | |
| 4200 | | ROM_REGION16_LE( 0x4000, "iomcu", 0 ) /* I/O MCU BIOS */ |
| 4201 | | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 4859 | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* S22-BIOS ver1.30 */ |
| 4860 | ROM_LOAD( "ar1datab.8k", 0, 0x080000, CRC(c26306f8) SHA1(6d8d993c076d5ced523143a86bd0938b3794478d) ) |
| 4202 | 4861 | |
| 4203 | | ROM_REGION16_LE( 0x4000, "mcu_c74", 0 ) /* SUB/SOUND MCU BIOS */ |
| 4204 | | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 4862 | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 4863 | ROM_LOAD( "ar1scg0.12f", 0x200000*0, 0x200000,CRC(e7be830a) SHA1(60e2162eecd7401a0c26c525de2715cbfb10c1c5) ) /* identical to "ar1scg0.12l" */ |
| 4864 | ROM_LOAD( "ar1scg1.10f", 0x200000*1, 0x200000,CRC(8f15a686) SHA1(bce2d4380c6c39aa402566ddb0f62bbe6d7bfa1d) ) /* identical to "ar1scg1.10l" */ |
| 4205 | 4865 | |
| 4206 | | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 4207 | | ROM_LOAD( "rr1data.6r", 0, 0x080000, CRC(18f5f748) SHA1(e0d149a66de36156edd9b55f604c9a9801aaefa8) ) |
| 4208 | | |
| 4209 | 4866 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 4210 | | ROM_LOAD( "rr1cg0.bin", 0x200000*0x4, 0x200000, CRC(b557a795) SHA1(f345486ffbe797246ad80a55d3c4a332ed6e2888) )//,CRC(d1b0eec6) SHA1(f66922c324dfc3ff408db7556c587ef90ca64c3b) ) |
| 4211 | | ROM_LOAD( "rr1cg1.bin", 0x200000*0x5, 0x200000, CRC(0fa212d9) SHA1(a1311de0a504e2d399044fa8ac32ec6c56ec965f) )//,CRC(bb695d89) SHA1(557bac9d2718519c1f69e374d0ef9a86a43fe86c) ) |
| 4212 | | ROM_LOAD( "rr1cg2.bin", 0x200000*0x6, 0x200000, CRC(18e2d2bd) SHA1(69c2ea62eeb255f27d3c69373f6716b0a34683cc) )//,CRC(8f374c0a) SHA1(94ff8581de11a03ef86525155f8433bf5858b980) ) |
| 4213 | | ROM_LOAD( "rr1cg3.bin", 0x200000*0x7, 0x200000, CRC(9564488b) SHA1(6b27d1aea75d6be747c62e165cfa49ecc5d9e767) )//,CRC(072a5c47) SHA1(86b8e973ae6b78197d685fe6d14722d8e2d0dfec) ) |
| 4867 | ROM_LOAD( "ar1cg0.12b", 0x200000*0x0, 0x200000,CRC(93f3a9d9) SHA1(7e94c81ad5ace98a2f0d00d101d464883d38c197) ) /* identical to "ar1cg0.8d" */ |
| 4868 | ROM_LOAD( "ar1cg1.10d", 0x200000*0x1, 0x200000,CRC(39828c8b) SHA1(424aa67eb0b898c9cab8a4749893a9c5696ac430) ) /* identical to "ar1cg1.13b" */ |
| 4869 | ROM_LOAD( "ar1cg2.12d", 0x200000*0x2, 0x200000,CRC(f7b058d1) SHA1(fffd0f01724a26dd47b1ecceecf4a139d5746f81) ) /* identical to "ar1cg2.14b" */ |
| 4870 | ROM_LOAD( "ar1cg3.13d", 0x200000*0x3, 0x200000,CRC(c28a3d2a) SHA1(cdc44fdbc99274e860c834e42b4cfafb478d4d26) ) /* identical to "ar1cg3.16b" */ |
| 4871 | ROM_LOAD( "ar1cg4.14d", 0x200000*0x4, 0x200000,CRC(abdb161f) SHA1(260bff9b0e94c1b2ea4b9d7fa170fbca212e85ee) ) /* identical to "ar1cg4.18b" */ |
| 4872 | ROM_LOAD( "ar1cg5.16d", 0x200000*0x5, 0x200000,CRC(2381cfea) SHA1(1de4c8b94df233fd74771fa47843290a3d8df0c8) ) /* identical to "ar1cg5.19b" */ |
| 4873 | ROM_LOAD( "ar1cg6.18a", 0x200000*0x6, 0x200000,CRC(ca0b6d23) SHA1(df969e0eeec557a95584b06995b0d55f2c6ec70a) ) /* identical to "ar1cg6.18d" */ |
| 4874 | ROM_LOAD( "ar1cg7.15a", 0x200000*0x7, 0x200000,CRC(ffb9f9f9) SHA1(2b8c75b580f77e887df7d50909a3a95cda570e20) ) /* identical to "ar1cg7.19d" */ |
| 4214 | 4875 | |
| 4215 | 4876 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 4216 | | ROM_LOAD( "rr1ccrl.bin",0x000000, 0x200000, CRC(6092d181) SHA1(52c0e3ac20aa23059a87d1a985d24ae641577310) )//,CRC(c15cb257) SHA1(0cb8f231c62ea37955be5d452a436a6e815af8e8) ) |
| 4217 | | ROM_LOAD( "rr1ccrh.bin",0x200000, 0x080000, CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) )//,CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) ) |
| 4877 | ROM_LOAD( "ar1ccrl.3d", 0x000000, 0x200000,CRC(17387b2c) SHA1(dfd7cadaf97917347c0fa98f395364a543e49612) ) /* identical to "ar1ccrl.7b" */ |
| 4878 | ROM_LOAD( "ar1ccrh.1d", 0x200000, 0x080000,CRC(ee7a4803) SHA1(8383c9a8ef5ed94df13446ca5cefa5f9e518f175) ) /* identical to "pr1ccrh.5b" */ |
| 4218 | 4879 | |
| 4219 | | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 4220 | | ROM_LOAD( "rr1potl0.5b", 0x80000*0, 0x80000,CRC(3ac193e3) SHA1(ff213766f15e34dc1b25187b57d94e17930090a3) ) |
| 4221 | | ROM_LOAD( "rr1potl1.4b", 0x80000*1, 0x80000,CRC(ac3ffba5) SHA1(4eb4dda5faeff237e0d35725b56d309948fba900) ) |
| 4222 | | ROM_LOAD( "rr1potm0.5c", 0x80000*2, 0x80000,CRC(42a3fa08) SHA1(15db0ae7ccf7f5a77b9dd9a9d82a488b67f8aaff) ) |
| 4223 | | ROM_LOAD( "rr1potm1.4c", 0x80000*3, 0x80000,CRC(1bc1ea7b) SHA1(52c21eef4989c45acc5fa4deda2d0b63214731c8) ) |
| 4224 | | ROM_LOAD( "rr1potu0.5d", 0x80000*4, 0x80000,CRC(5e367f72) SHA1(5887f011379dce865fef238b402678a3d2033de9) ) |
| 4225 | | ROM_LOAD( "rr1potu1.4d", 0x80000*5, 0x80000,CRC(31d92475) SHA1(51d3c0baa223e1bc16ea2950f2e085597528f870) ) |
| 4880 | ROM_REGION( 0x80000*12, "pointrom", 0 ) /* 3d model data */ |
| 4881 | ROM_LOAD( "ar1ptrl0.18k", 0x80000*0x0, 0x80000,CRC(82405108) SHA1(0a40882a9bc8621c620bede404c78f6b1333f223) ) |
| 4882 | ROM_LOAD( "ar1ptrl1.16k", 0x80000*0x1, 0x80000,CRC(8739b09c) SHA1(cd603c4dc2f9ffc4185f891eb83e4c383c564294) ) |
| 4883 | ROM_LOAD( "ar1ptrl2.15k", 0x80000*0x2, 0x80000,CRC(bda693a9) SHA1(fe71dd3c63198737aa2d39527f0004e977e3be20) ) |
| 4884 | ROM_LOAD( "ar1ptrl3.14k", 0x80000*0x3, 0x80000,CRC(82797405) SHA1(2f205fee2d33e183c80a906fb38900167c011240) ) |
| 4226 | 4885 | |
| 4886 | ROM_LOAD( "ar1ptrm0.18j", 0x80000*0x4, 0x80000,CRC(64bd6620) SHA1(2e33ff22208805ece304128be8887646fc890f6d) ) |
| 4887 | ROM_LOAD( "ar1ptrm1.16j", 0x80000*0x5, 0x80000,CRC(2232f0a5) SHA1(3fccf6d4a0c4100cc85e3051024d659c4a1c769e) ) |
| 4888 | ROM_LOAD( "ar1ptrm2.15j", 0x80000*0x6, 0x80000,CRC(8ee14e6f) SHA1(f6f1cbb748b109b365255378c18e710ba6270c1c) ) |
| 4889 | ROM_LOAD( "ar1ptrm3.14j", 0x80000*0x7, 0x80000,CRC(1094a970) SHA1(d41b10f48e1ef312bcaf09f27fabc7252c30e648) ) |
| 4890 | |
| 4891 | ROM_LOAD( "ar1ptru0.18f", 0x80000*0x8, 0x80000,CRC(26d88467) SHA1(d528f989fab4dd5ac1aec9b596a05fbadcc0587a) ) |
| 4892 | ROM_LOAD( "ar1ptru1.16f", 0x80000*0x9, 0x80000,CRC(c5e2c208) SHA1(152fde0b95a5df8c781e4a83577cfbbc7672ae0d) ) |
| 4893 | ROM_LOAD( "ar1ptru2.15f", 0x80000*0xa, 0x80000,CRC(1321ec59) SHA1(dbd3687a4c6b1aa0b18e336f99dabb9010d36639) ) |
| 4894 | ROM_LOAD( "ar1ptru3.14f", 0x80000*0xb, 0x80000,CRC(139d7dc1) SHA1(6d25e6ad552a91a0c5fc03db7e1a801ccf9c9556) ) |
| 4895 | |
| 4227 | 4896 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 4228 | | ROM_LOAD( "rr1wav0.10r", 0x100000*0, 0x100000,CRC(a8e85bde) SHA1(b56677e9f6c98f7b600043f5dcfef3a482ca7455) ) |
| 4229 | | ROM_LOAD( "rr1wav1.10p", 0x100000*2, 0x100000,CRC(35f47c8e) SHA1(7c3f9e942f532af8008fbead2a96fee6084bcde6) ) |
| 4230 | | ROM_LOAD( "rr1wav2.10n", 0x100000*1, 0x100000,CRC(3244cb59) SHA1(b3283b30cfafbfdcbc6d482ecc4ed6a47a527ca4) ) |
| 4231 | | ROM_LOAD( "rr1wav3.10l", 0x100000*3, 0x100000,CRC(c4cda1a7) SHA1(60bc96880ec79efdff3cc70c09e848692a40bea4) ) |
| 4897 | ROM_LOAD( "ar1wavea.2l", 0, 0x200000, CRC(dbf64562) SHA1(454fd7d5b860f0e5557d8900393be95d6c992ad1) ) |
| 4232 | 4898 | |
| 4233 | | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 4234 | | ROM_LOAD( "rr1gam.2d", 0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4235 | | ROM_LOAD( "rr1gam.3d", 0x0100, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4236 | | ROM_LOAD( "rr1gam.4d", 0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4899 | ROM_REGION( 0x4000, "nvram", 0 ) // default eeprom |
| 4900 | ROM_LOAD( "alpiner_defaults.nv", 0x0000, 0x4000, CRC(46c06e51) SHA1(df3a16fe3a0858b14c51d48539d9ab3eb3a213de) ) |
| 4237 | 4901 | ROM_END |
| 4238 | 4902 | |
| 4239 | | ROM_START( ridgerac3 ) |
| 4240 | | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 4241 | | ROM_LOAD32_BYTE( "rr3prgll-3s.4d", 0x000003, 0x080000, CRC(2c3d8cb7) SHA1(46a7b62938fe3edde5c52ce3fdfe447000cd6af0) ) |
| 4242 | | ROM_LOAD32_BYTE( "rr3prglm-3s.2d", 0x000002, 0x080000, CRC(b15343f2) SHA1(3056eb5a3036a74b2ac641a4c3221986c0be1e27) ) |
| 4243 | | ROM_LOAD32_BYTE( "rr3prgum-3s.8d", 0x000001, 0x080000, CRC(8fda06ac) SHA1(7e9adba198eb0941100cda64ecedac504f6ac696) ) |
| 4244 | | ROM_LOAD32_BYTE( "rr3prguu-3s.6d", 0x000000, 0x080000, CRC(868398df) SHA1(422e0f9884904b0df93fcacd1468b8da0458eb8e) ) |
| 4903 | ROM_START( alpinerc ) |
| 4904 | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 4905 | ROM_LOAD32_BYTE( "ar2ver-c.1", 0x00003, 0x100000, CRC(61323842) SHA1(e3c33248340bee252f230124fa9b7fa935a60565) ) |
| 4906 | ROM_LOAD32_BYTE( "ar2ver-c.2", 0x00002, 0x100000, CRC(43795b2d) SHA1(e060f3259661279a36300431c5ca7347bde8b6ec) ) |
| 4907 | ROM_LOAD32_BYTE( "ar2ver-c.3", 0x00001, 0x100000, CRC(acb3003b) SHA1(ea0cbf3a1607b06b108df051f38fec1f214f42d2) ) |
| 4908 | ROM_LOAD32_BYTE( "ar2ver-c.4", 0x00000, 0x100000, CRC(800acc21) SHA1(41d26766da2db46954a2351bbc50aea94bc1d564) ) |
| 4245 | 4909 | |
| 4246 | 4910 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 4247 | 4911 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| r24771 | r24772 | |
| 4249 | 4913 | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 4250 | 4914 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 4251 | 4915 | |
| 4252 | | ROM_REGION16_LE( 0x4000, "iomcu", 0 ) /* I/O MCU BIOS */ |
| 4253 | | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 4916 | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* S22-BIOS ver1.30 */ |
| 4917 | ROM_LOAD( "ar1datab.8k", 0, 0x080000, CRC(c26306f8) SHA1(6d8d993c076d5ced523143a86bd0938b3794478d) ) |
| 4254 | 4918 | |
| 4255 | | ROM_REGION16_LE( 0x4000, "mcu_c74", 0 ) /* SUB/SOUND MCU BIOS */ |
| 4256 | | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 4919 | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 4920 | ROM_LOAD( "ar1scg0.12f", 0x200000*0, 0x200000,CRC(e7be830a) SHA1(60e2162eecd7401a0c26c525de2715cbfb10c1c5) ) /* identical to "ar1scg0.12l" */ |
| 4921 | ROM_LOAD( "ar1scg1.10f", 0x200000*1, 0x200000,CRC(8f15a686) SHA1(bce2d4380c6c39aa402566ddb0f62bbe6d7bfa1d) ) /* identical to "ar1scg1.10l" */ |
| 4257 | 4922 | |
| 4258 | | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 4259 | | ROM_LOAD( "rr1data.6r", 0, 0x080000, CRC(18f5f748) SHA1(e0d149a66de36156edd9b55f604c9a9801aaefa8) ) |
| 4260 | | |
| 4261 | 4923 | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 4262 | | ROM_LOAD( "rr1cg0.bin", 0x200000*0x4, 0x200000, CRC(b557a795) SHA1(f345486ffbe797246ad80a55d3c4a332ed6e2888) )//,CRC(d1b0eec6) SHA1(f66922c324dfc3ff408db7556c587ef90ca64c3b) ) |
| 4263 | | ROM_LOAD( "rr1cg1.bin", 0x200000*0x5, 0x200000, CRC(0fa212d9) SHA1(a1311de0a504e2d399044fa8ac32ec6c56ec965f) )//,CRC(bb695d89) SHA1(557bac9d2718519c1f69e374d0ef9a86a43fe86c) ) |
| 4264 | | ROM_LOAD( "rr1cg2.bin", 0x200000*0x6, 0x200000, CRC(18e2d2bd) SHA1(69c2ea62eeb255f27d3c69373f6716b0a34683cc) )//,CRC(8f374c0a) SHA1(94ff8581de11a03ef86525155f8433bf5858b980) ) |
| 4265 | | ROM_LOAD( "rr1cg3.bin", 0x200000*0x7, 0x200000, CRC(9564488b) SHA1(6b27d1aea75d6be747c62e165cfa49ecc5d9e767) )//,CRC(072a5c47) SHA1(86b8e973ae6b78197d685fe6d14722d8e2d0dfec) ) |
| 4924 | ROM_LOAD( "ar1cg0.12b", 0x200000*0x0, 0x200000,CRC(93f3a9d9) SHA1(7e94c81ad5ace98a2f0d00d101d464883d38c197) ) /* identical to "ar1cg0.8d" */ |
| 4925 | ROM_LOAD( "ar1cg1.10d", 0x200000*0x1, 0x200000,CRC(39828c8b) SHA1(424aa67eb0b898c9cab8a4749893a9c5696ac430) ) /* identical to "ar1cg1.13b" */ |
| 4926 | ROM_LOAD( "ar1cg2.12d", 0x200000*0x2, 0x200000,CRC(f7b058d1) SHA1(fffd0f01724a26dd47b1ecceecf4a139d5746f81) ) /* identical to "ar1cg2.14b" */ |
| 4927 | ROM_LOAD( "ar1cg3.13d", 0x200000*0x3, 0x200000,CRC(c28a3d2a) SHA1(cdc44fdbc99274e860c834e42b4cfafb478d4d26) ) /* identical to "ar1cg3.16b" */ |
| 4928 | ROM_LOAD( "ar1cg4.14d", 0x200000*0x4, 0x200000,CRC(abdb161f) SHA1(260bff9b0e94c1b2ea4b9d7fa170fbca212e85ee) ) /* identical to "ar1cg4.18b" */ |
| 4929 | ROM_LOAD( "ar1cg5.16d", 0x200000*0x5, 0x200000,CRC(2381cfea) SHA1(1de4c8b94df233fd74771fa47843290a3d8df0c8) ) /* identical to "ar1cg5.19b" */ |
| 4930 | ROM_LOAD( "ar1cg6.18a", 0x200000*0x6, 0x200000,CRC(ca0b6d23) SHA1(df969e0eeec557a95584b06995b0d55f2c6ec70a) ) /* identical to "ar1cg6.18d" */ |
| 4931 | ROM_LOAD( "ar1cg7.15a", 0x200000*0x7, 0x200000,CRC(ffb9f9f9) SHA1(2b8c75b580f77e887df7d50909a3a95cda570e20) ) /* identical to "ar1cg7.19d" */ |
| 4266 | 4932 | |
| 4267 | 4933 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 4268 | | ROM_LOAD( "rr1ccrl.bin",0x000000, 0x200000, CRC(6092d181) SHA1(52c0e3ac20aa23059a87d1a985d24ae641577310) )//,CRC(c15cb257) SHA1(0cb8f231c62ea37955be5d452a436a6e815af8e8) ) |
| 4269 | | ROM_LOAD( "rr1ccrh.bin",0x200000, 0x080000, CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) )//,CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) ) |
| 4934 | ROM_LOAD( "ar1ccrl.3d", 0x000000, 0x200000,CRC(17387b2c) SHA1(dfd7cadaf97917347c0fa98f395364a543e49612) ) /* identical to "ar1ccrl.7b" */ |
| 4935 | ROM_LOAD( "ar1ccrh.1d", 0x200000, 0x080000,CRC(ee7a4803) SHA1(8383c9a8ef5ed94df13446ca5cefa5f9e518f175) ) /* identical to "pr1ccrh.5b" */ |
| 4270 | 4936 | |
| 4271 | | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 4272 | | ROM_LOAD( "rr1potl0.5b", 0x80000*0, 0x80000,CRC(3ac193e3) SHA1(ff213766f15e34dc1b25187b57d94e17930090a3) ) |
| 4273 | | ROM_LOAD( "rr1potl1.4b", 0x80000*1, 0x80000,CRC(ac3ffba5) SHA1(4eb4dda5faeff237e0d35725b56d309948fba900) ) |
| 4274 | | ROM_LOAD( "rr1potm0.5c", 0x80000*2, 0x80000,CRC(42a3fa08) SHA1(15db0ae7ccf7f5a77b9dd9a9d82a488b67f8aaff) ) |
| 4275 | | ROM_LOAD( "rr1potm1.4c", 0x80000*3, 0x80000,CRC(1bc1ea7b) SHA1(52c21eef4989c45acc5fa4deda2d0b63214731c8) ) |
| 4276 | | ROM_LOAD( "rr1potu0.5d", 0x80000*4, 0x80000,CRC(5e367f72) SHA1(5887f011379dce865fef238b402678a3d2033de9) ) |
| 4277 | | ROM_LOAD( "rr1potu1.4d", 0x80000*5, 0x80000,CRC(31d92475) SHA1(51d3c0baa223e1bc16ea2950f2e085597528f870) ) |
| 4937 | ROM_REGION( 0x80000*12, "pointrom", 0 ) /* 3d model data */ |
| 4938 | ROM_LOAD( "ar1ptrl0.18k", 0x80000*0x0, 0x80000,CRC(82405108) SHA1(0a40882a9bc8621c620bede404c78f6b1333f223) ) |
| 4939 | ROM_LOAD( "ar1ptrl1.16k", 0x80000*0x1, 0x80000,CRC(8739b09c) SHA1(cd603c4dc2f9ffc4185f891eb83e4c383c564294) ) |
| 4940 | ROM_LOAD( "ar1ptrl2.15k", 0x80000*0x2, 0x80000,CRC(bda693a9) SHA1(fe71dd3c63198737aa2d39527f0004e977e3be20) ) |
| 4941 | ROM_LOAD( "ar1ptrl3.14k", 0x80000*0x3, 0x80000,CRC(82797405) SHA1(2f205fee2d33e183c80a906fb38900167c011240) ) |
| 4278 | 4942 | |
| 4943 | ROM_LOAD( "ar1ptrm0.18j", 0x80000*0x4, 0x80000,CRC(64bd6620) SHA1(2e33ff22208805ece304128be8887646fc890f6d) ) |
| 4944 | ROM_LOAD( "ar1ptrm1.16j", 0x80000*0x5, 0x80000,CRC(2232f0a5) SHA1(3fccf6d4a0c4100cc85e3051024d659c4a1c769e) ) |
| 4945 | ROM_LOAD( "ar1ptrm2.15j", 0x80000*0x6, 0x80000,CRC(8ee14e6f) SHA1(f6f1cbb748b109b365255378c18e710ba6270c1c) ) |
| 4946 | ROM_LOAD( "ar1ptrm3.14j", 0x80000*0x7, 0x80000,CRC(1094a970) SHA1(d41b10f48e1ef312bcaf09f27fabc7252c30e648) ) |
| 4947 | |
| 4948 | ROM_LOAD( "ar1ptru0.18f", 0x80000*0x8, 0x80000,CRC(26d88467) SHA1(d528f989fab4dd5ac1aec9b596a05fbadcc0587a) ) |
| 4949 | ROM_LOAD( "ar1ptru1.16f", 0x80000*0x9, 0x80000,CRC(c5e2c208) SHA1(152fde0b95a5df8c781e4a83577cfbbc7672ae0d) ) |
| 4950 | ROM_LOAD( "ar1ptru2.15f", 0x80000*0xa, 0x80000,CRC(1321ec59) SHA1(dbd3687a4c6b1aa0b18e336f99dabb9010d36639) ) |
| 4951 | ROM_LOAD( "ar1ptru3.14f", 0x80000*0xb, 0x80000,CRC(139d7dc1) SHA1(6d25e6ad552a91a0c5fc03db7e1a801ccf9c9556) ) |
| 4952 | |
| 4279 | 4953 | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 4280 | | ROM_LOAD( "rr1wav0.10r", 0x100000*0, 0x100000,CRC(a8e85bde) SHA1(b56677e9f6c98f7b600043f5dcfef3a482ca7455) ) |
| 4281 | | ROM_LOAD( "rr1wav1.10p", 0x100000*2, 0x100000,CRC(35f47c8e) SHA1(7c3f9e942f532af8008fbead2a96fee6084bcde6) ) |
| 4282 | | ROM_LOAD( "rr1wav2.10n", 0x100000*1, 0x100000,CRC(3244cb59) SHA1(b3283b30cfafbfdcbc6d482ecc4ed6a47a527ca4) ) |
| 4283 | | ROM_LOAD( "rr1wav3.10l", 0x100000*3, 0x100000,CRC(c4cda1a7) SHA1(60bc96880ec79efdff3cc70c09e848692a40bea4) ) |
| 4954 | ROM_LOAD( "ar1wavea.2l", 0, 0x200000, CRC(dbf64562) SHA1(454fd7d5b860f0e5557d8900393be95d6c992ad1) ) |
| 4284 | 4955 | |
| 4285 | | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 4286 | | ROM_LOAD( "rr1gam.2d", 0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4287 | | ROM_LOAD( "rr1gam.3d", 0x0100, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4288 | | ROM_LOAD( "rr1gam.4d", 0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4956 | ROM_REGION( 0x4000, "nvram", 0 ) // default eeprom |
| 4957 | ROM_LOAD( "alpiner_defaults.nv", 0x0000, 0x4000, CRC(46c06e51) SHA1(df3a16fe3a0858b14c51d48539d9ab3eb3a213de) ) |
| 4289 | 4958 | ROM_END |
| 4290 | 4959 | |
| 4291 | | ROM_START( ridgeracf ) |
| 4292 | | ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */ |
| 4293 | | ROM_LOAD32_BYTE( "rrf2prgll.4d", 0x00003, 0x80000, CRC(23c6144d) SHA1(99f70e2c60fba7551cafdce12b07da1f8ab8aad6) ) |
| 4294 | | ROM_LOAD32_BYTE( "rrf2prglm.2d", 0x00002, 0x80000, CRC(1ad638a1) SHA1(505a7f4ba60bbc4e735865fbc5d664311b6045d9) ) |
| 4295 | | ROM_LOAD32_BYTE( "rrf2prgum.8d", 0x00001, 0x80000, CRC(d7e0aa16) SHA1(cab4578cdd3af84b865114be4105cfdc2e7abf36) ) |
| 4296 | | ROM_LOAD32_BYTE( "rrf2prguu.6d", 0x00000, 0x80000, CRC(12c808bb) SHA1(64e84686d4ceb8145b9a59b75d0dced830884c9d) ) |
| 4297 | 4960 | |
| 4961 | ROM_START( alpinr2b ) |
| 4962 | ROM_REGION( 0x800000, "maincpu", 0 ) /* main program */ |
| 4963 | ROM_LOAD32_BYTE( "ars2ver-b.2", 0x000003, 0x200000, CRC(ed977f83) SHA1(26c57cdfc15f799a999ee22f141e1c0cabfc91dc) ) |
| 4964 | ROM_LOAD32_BYTE( "ars2ver-b.3", 0x000001, 0x200000, CRC(8e7a9983) SHA1(34c82e5f080efe04d6b77a77a8391cb48b69c1af) ) |
| 4965 | ROM_LOAD32_BYTE( "ars2ver-b.4", 0x000002, 0x200000, CRC(610e49c2) SHA1(433c6d2216551bac31584306f748af1c912c3b07) ) |
| 4966 | ROM_LOAD32_BYTE( "ars2ver-b.5", 0x000000, 0x200000, CRC(7f3517b0) SHA1(3e6ba1a51bf235f40f933aae1f00638b88bba522) ) |
| 4967 | |
| 4298 | 4968 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 4299 | 4969 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 4300 | 4970 | |
| 4301 | 4971 | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 4302 | 4972 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 4303 | 4973 | |
| 4304 | | ROM_REGION16_LE( 0x4000, "iomcu", 0 ) /* I/O MCU BIOS */ |
| 4305 | | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 4974 | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* S22-BIOS ver1.30 */ |
| 4975 | ROM_LOAD( "ars2data.8k", 0x000000, 0x080000, CRC(29b36dcb) SHA1(70fde130c11789c822829493a70ecefb077c0c15) ) |
| 4306 | 4976 | |
| 4307 | | ROM_REGION16_LE( 0x4000, "mcu_c74", 0 ) /* SUB/SOUND MCU BIOS */ |
| 4308 | | ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) ) |
| 4977 | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 4978 | ROM_LOAD( "ars1scg0.12f", 0x000000, 0x200000, CRC(bc49ed86) SHA1(289b39f2cb21c723dbe4ddd64ee4b2c5fa65c368) ) |
| 4309 | 4979 | |
| 4310 | | ROM_REGION16_LE( 0x80000, "mcu", 0 ) /* sound data */ |
| 4311 | | ROM_LOAD( "rrf1data.6r", 0, 0x080000, CRC(ce3c6ed6) SHA1(23e033364bc967c10c49fd1d5413dda837670633) ) |
| 4980 | ROM_REGION( 0xc00000, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 4981 | ROM_LOAD( "ars1cg0.8d", 0x000000, 0x200000, CRC(74f4515c) SHA1(1e3a96281d543213d10c962b4d387c414d76e0c3) ) |
| 4982 | ROM_LOAD( "ars1cg1.10d", 0x200000, 0x200000, CRC(329a95c1) SHA1(2cad7fd9e5ca7c64729ca2548ef4f873a0b8de64) ) |
| 4983 | ROM_LOAD( "ars1cg2.12d", 0x400000, 0x200000, CRC(5648345a) SHA1(0dc7aedba65b7d97687a9e38a63597f16cee6179) ) |
| 4984 | ROM_LOAD( "ars1cg3.13d", 0x600000, 0x200000, CRC(a752f205) SHA1(373b5a69e4488bc30763568ceae512ab7039f5f8) ) |
| 4985 | ROM_LOAD( "ars1cg4.14d", 0x800000, 0x200000, CRC(54bf35b6) SHA1(aec43b66e7597ad7d113ae785417bf26164c1bca) ) |
| 4986 | ROM_LOAD( "ars1cg5.16d", 0xa00000, 0x200000, CRC(e24a19a2) SHA1(34c1b51eea954ae3000602e550eb1cef0a10e651) ) |
| 4312 | 4987 | |
| 4313 | | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 4314 | | ROM_LOAD( "rrf2potl0.l0", 0x80000*0, 0x80000, CRC(9b762e60) SHA1(50b67ff6678bacba140bad3aedda75c30851fa7a) ) |
| 4315 | | ROM_LOAD( "rrf2potl1.l1", 0x80000*1, 0x80000, CRC(ab4d66b0) SHA1(59020b3dc2efff99cd528752ca7168b64ae96ac4) ) |
| 4316 | | ROM_LOAD( "rrf2potm0.m0", 0x80000*2, 0x80000, CRC(02d4daa3) SHA1(9b4e48d3234cb91146b5d31ffcf42ad199ccb903) ) |
| 4317 | | ROM_LOAD( "rrf2potm1.m1", 0x80000*3, 0x80000, CRC(37e005c2) SHA1(036ae1c44aaa6a6904e6d4938572035ccc6854ed) ) |
| 4318 | | ROM_LOAD( "rrf2potu0.u0", 0x80000*4, 0x80000, CRC(86b3fe98) SHA1(f242d33f7488e233ccdc0b5d309c64510d7a622d) ) |
| 4319 | | ROM_LOAD( "rrf2potu1.u1", 0x80000*5, 0x80000, CRC(e0c6ce3d) SHA1(cc559a2237ccb753cb1397fecba64733455a8c43) ) |
| 4988 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 4989 | ROM_LOAD( "ars1ccrl.3d", 0x000000, 0x200000, CRC(fc8c9161) SHA1(ad0fcfae27e02d68a6f8d1d03c514dc2f12d9ee8) ) |
| 4990 | ROM_LOAD( "ars1ccrh.1d", 0x200000, 0x080000, CRC(a17660bb) SHA1(bae2c3f20772c6cea99f271ee3f39b1f999038c6) ) |
| 4320 | 4991 | |
| 4321 | | ROM_REGION( 0x1000000, "c352", 0 ) // Samples |
| 4322 | | ROM_LOAD( "rrf1wave0.10r", 0x100000*0, 0x100000,CRC(a8e85bde) SHA1(b56677e9f6c98f7b600043f5dcfef3a482ca7455) ) |
| 4323 | | ROM_LOAD( "rrf1wave1.10p", 0x100000*2, 0x100000,CRC(35f47c8e) SHA1(7c3f9e942f532af8008fbead2a96fee6084bcde6) ) |
| 4324 | | ROM_LOAD( "rrf1wave2.10n", 0x100000*1, 0x100000,CRC(4ceeae12) SHA1(ae3a6583f8912bc784c7bc63d32448228cf217ba) ) // differs from normal sets |
| 4325 | | ROM_LOAD( "rrf1wave3.10l", 0x100000*3, 0x100000,CRC(c4cda1a7) SHA1(60bc96880ec79efdff3cc70c09e848692a40bea4) ) |
| 4992 | ROM_REGION( 0x80000*12, "pointrom", 0 ) /* 3d model data */ |
| 4993 | ROM_LOAD( "ars1ptrl0.18k", 0x000000, 0x080000, CRC(f04e0e61) SHA1(d58a1d3ca1d0922e134db21a04feaee7dc97b020) ) |
| 4994 | ROM_LOAD( "ars1ptrl1.16k", 0x080000, 0x080000, CRC(8bdb4970) SHA1(a504cd4beca4bedd1a7a228c83dd6b844ca3a1e0) ) |
| 4995 | ROM_LOAD( "ars1ptrl2.15k", 0x100000, 0x080000, CRC(ec993a4f) SHA1(883f64e3e8d951415e9cef589c354eba9406c0aa) ) |
| 4996 | ROM_LOAD( "ars1ptrl3.14k", 0x180000, 0x080000, CRC(4d453f3c) SHA1(7a82e5d8f974d9e56d0031b35e73647fe6aeec2e) ) |
| 4326 | 4997 | |
| 4327 | | /* this stuff was missing from this version, and shouldn't be the same (bad textures if we use these roms) */ |
| 4328 | | ROM_REGION( 0x300, "gamma_proms", 0 ) |
| 4329 | | ROM_LOAD( "rrf1gam.2d", 0x0000, 0x0100, BAD_DUMP CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4330 | | ROM_LOAD( "rrf1gam.3d", 0x0100, 0x0100, BAD_DUMP CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4331 | | ROM_LOAD( "rrf1gam.4d", 0x0200, 0x0100, BAD_DUMP CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) ) |
| 4998 | ROM_LOAD( "ars1ptrm0.18j", 0x200000, 0x080000, CRC(d1bdc524) SHA1(b898bb38de397551ada4da4677dd733bf8fa5010) ) |
| 4999 | ROM_LOAD( "ars1ptrm1.16j", 0x280000, 0x080000, CRC(86b81c81) SHA1(45096abf46794f06a4b647f5e4222798d8467632) ) |
| 5000 | ROM_LOAD( "ars1ptrm2.15j", 0x300000, 0x080000, CRC(24116b83) SHA1(41c6a880abce7b543c409fda767682b2537b0d99) ) |
| 5001 | ROM_LOAD( "ars1ptrm3.14j", 0x380000, 0x080000, CRC(772bede3) SHA1(f9565b7a40f0bbf11081d619fe5a46feafce2e56) ) |
| 4332 | 5002 | |
| 4333 | | ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 4334 | | ROM_LOAD( "rrf1cg0.bin", 0x200000*0x4, 0x200000, BAD_DUMP CRC(b557a795) SHA1(f345486ffbe797246ad80a55d3c4a332ed6e2888) ) |
| 4335 | | ROM_LOAD( "rrf1cg1.bin", 0x200000*0x5, 0x200000, BAD_DUMP CRC(0fa212d9) SHA1(a1311de0a504e2d399044fa8ac32ec6c56ec965f) ) |
| 4336 | | ROM_LOAD( "rrf1cg2.bin", 0x200000*0x6, 0x200000, BAD_DUMP CRC(18e2d2bd) SHA1(69c2ea62eeb255f27d3c69373f6716b0a34683cc) ) |
| 4337 | | ROM_LOAD( "rrf1cg3.bin", 0x200000*0x7, 0x200000, BAD_DUMP CRC(9564488b) SHA1(6b27d1aea75d6be747c62e165cfa49ecc5d9e767) ) |
| 5003 | ROM_LOAD( "ars1ptru0.18f", 0x400000, 0x080000, CRC(a4cf197a) SHA1(ee78cc259e87395df75179bbe5b6e521e762b582) ) |
| 5004 | ROM_LOAD( "ars1ptru1.16f", 0x480000, 0x080000, CRC(1deb1fc0) SHA1(bfd1dfcaccf5a0f851b6757995fa7195452a3965) ) |
| 5005 | ROM_LOAD( "ars1ptru2.15f", 0x500000, 0x080000, CRC(bcfad0ba) SHA1(bee7f2f9ecd2b289c6706e19fa86863913b286b5) ) |
| 5006 | ROM_LOAD( "ars1ptru3.14f", 0x580000, 0x080000, CRC(73ce6958) SHA1(918b0fb0fca33dbe3be3ac679b8b28f58213f75b) ) |
| 4338 | 5007 | |
| 5008 | ROM_REGION( 0x1000000, "c352", 0 ) /* sound samples */ |
| 5009 | ROM_LOAD( "ars1wavea.2l", 0x000000, 0x400000, CRC(f8d107e9) SHA1(5c418691f0b35403553f21f5570eda8bbb66890f) ) |
| 5010 | ROM_LOAD( "ars2waveb.1l", 0x800000, 0x400000, CRC(deab4ad1) SHA1(580ad88d516280baaf6cc92b2e07cdc0cfc486f3) ) |
| 5011 | |
| 5012 | ROM_REGION( 0x4000, "nvram", 0 ) // default eeprom |
| 5013 | ROM_LOAD( "alpiner2_defaults.nv", 0x0000, 0x4000, CRC(1d660b8b) SHA1(e6047ad2d61fa55e8f054813f5c705fd7d145a73) ) |
| 5014 | ROM_END |
| 5015 | |
| 5016 | ROM_START( alpinr2a ) |
| 5017 | ROM_REGION( 0x800000, "maincpu", 0 ) /* main program */ |
| 5018 | ROM_LOAD32_BYTE( "ars2ver-a.2", 0x000003, 0x200000, CRC(b07b15a4) SHA1(ea3b2d7b4ef4ccf3aafeef7e7eac92e8d446f4e7) ) |
| 5019 | ROM_LOAD32_BYTE( "ars2ver-a.3", 0x000002, 0x200000, CRC(90a92e40) SHA1(bf8083256e56e7e33e61b4cdaf9fd03dabfb36ba) ) |
| 5020 | ROM_LOAD32_BYTE( "ars2ver-a.4", 0x000001, 0x200000, CRC(9e9d771d) SHA1(6fb983e3f4f8233544667b1bbf87864e4fb8698c) ) |
| 5021 | ROM_LOAD32_BYTE( "ars2ver-a.5", 0x000000, 0x200000, CRC(e93c7771) SHA1(305f35488a55be1b845702df972bba8334c0726c) ) |
| 5022 | |
| 5023 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 5024 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 5025 | |
| 5026 | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 5027 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 5028 | |
| 5029 | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* S22-BIOS ver1.30 */ |
| 5030 | ROM_LOAD( "ars2data.8k", 0x000000, 0x080000, CRC(29b36dcb) SHA1(70fde130c11789c822829493a70ecefb077c0c15) ) |
| 5031 | |
| 5032 | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 5033 | ROM_LOAD( "ars1scg0.12f", 0x000000, 0x200000, CRC(bc49ed86) SHA1(289b39f2cb21c723dbe4ddd64ee4b2c5fa65c368) ) |
| 5034 | |
| 5035 | ROM_REGION( 0xc00000, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 5036 | ROM_LOAD( "ars1cg0.8d", 0x000000, 0x200000, CRC(74f4515c) SHA1(1e3a96281d543213d10c962b4d387c414d76e0c3) ) |
| 5037 | ROM_LOAD( "ars1cg1.10d", 0x200000, 0x200000, CRC(329a95c1) SHA1(2cad7fd9e5ca7c64729ca2548ef4f873a0b8de64) ) |
| 5038 | ROM_LOAD( "ars1cg2.12d", 0x400000, 0x200000, CRC(5648345a) SHA1(0dc7aedba65b7d97687a9e38a63597f16cee6179) ) |
| 5039 | ROM_LOAD( "ars1cg3.13d", 0x600000, 0x200000, CRC(a752f205) SHA1(373b5a69e4488bc30763568ceae512ab7039f5f8) ) |
| 5040 | ROM_LOAD( "ars1cg4.14d", 0x800000, 0x200000, CRC(54bf35b6) SHA1(aec43b66e7597ad7d113ae785417bf26164c1bca) ) |
| 5041 | ROM_LOAD( "ars1cg5.16d", 0xa00000, 0x200000, CRC(e24a19a2) SHA1(34c1b51eea954ae3000602e550eb1cef0a10e651) ) |
| 5042 | |
| 4339 | 5043 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 4340 | | ROM_LOAD( "rrf1ccrl.bin",0x000000, 0x200000, BAD_DUMP CRC(6092d181) SHA1(52c0e3ac20aa23059a87d1a985d24ae641577310) ) |
| 4341 | | ROM_LOAD( "rrf1ccrh.bin",0x200000, 0x080000, BAD_DUMP CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) ) |
| 5044 | ROM_LOAD( "ars1ccrl.3d", 0x000000, 0x200000, CRC(fc8c9161) SHA1(ad0fcfae27e02d68a6f8d1d03c514dc2f12d9ee8) ) |
| 5045 | ROM_LOAD( "ars1ccrh.1d", 0x200000, 0x080000, CRC(a17660bb) SHA1(bae2c3f20772c6cea99f271ee3f39b1f999038c6) ) |
| 5046 | |
| 5047 | ROM_REGION( 0x80000*12, "pointrom", 0 ) /* 3d model data */ |
| 5048 | ROM_LOAD( "ars1ptrl0.18k", 0x000000, 0x080000, CRC(f04e0e61) SHA1(d58a1d3ca1d0922e134db21a04feaee7dc97b020) ) |
| 5049 | ROM_LOAD( "ars1ptrl1.16k", 0x080000, 0x080000, CRC(8bdb4970) SHA1(a504cd4beca4bedd1a7a228c83dd6b844ca3a1e0) ) |
| 5050 | ROM_LOAD( "ars1ptrl2.15k", 0x100000, 0x080000, CRC(ec993a4f) SHA1(883f64e3e8d951415e9cef589c354eba9406c0aa) ) |
| 5051 | ROM_LOAD( "ars1ptrl3.14k", 0x180000, 0x080000, CRC(4d453f3c) SHA1(7a82e5d8f974d9e56d0031b35e73647fe6aeec2e) ) |
| 5052 | |
| 5053 | ROM_LOAD( "ars1ptrm0.18j", 0x200000, 0x080000, CRC(d1bdc524) SHA1(b898bb38de397551ada4da4677dd733bf8fa5010) ) |
| 5054 | ROM_LOAD( "ars1ptrm1.16j", 0x280000, 0x080000, CRC(86b81c81) SHA1(45096abf46794f06a4b647f5e4222798d8467632) ) |
| 5055 | ROM_LOAD( "ars1ptrm2.15j", 0x300000, 0x080000, CRC(24116b83) SHA1(41c6a880abce7b543c409fda767682b2537b0d99) ) |
| 5056 | ROM_LOAD( "ars1ptrm3.14j", 0x380000, 0x080000, CRC(772bede3) SHA1(f9565b7a40f0bbf11081d619fe5a46feafce2e56) ) |
| 5057 | |
| 5058 | ROM_LOAD( "ars1ptru0.18f", 0x400000, 0x080000, CRC(a4cf197a) SHA1(ee78cc259e87395df75179bbe5b6e521e762b582) ) |
| 5059 | ROM_LOAD( "ars1ptru1.16f", 0x480000, 0x080000, CRC(1deb1fc0) SHA1(bfd1dfcaccf5a0f851b6757995fa7195452a3965) ) |
| 5060 | ROM_LOAD( "ars1ptru2.15f", 0x500000, 0x080000, CRC(bcfad0ba) SHA1(bee7f2f9ecd2b289c6706e19fa86863913b286b5) ) |
| 5061 | ROM_LOAD( "ars1ptru3.14f", 0x580000, 0x080000, CRC(73ce6958) SHA1(918b0fb0fca33dbe3be3ac679b8b28f58213f75b) ) |
| 5062 | |
| 5063 | ROM_REGION( 0x1000000, "c352", 0 ) /* sound samples */ |
| 5064 | ROM_LOAD( "ars1wavea.2l", 0x000000, 0x400000, CRC(f8d107e9) SHA1(5c418691f0b35403553f21f5570eda8bbb66890f) ) |
| 5065 | ROM_LOAD( "ars2waveb.1l", 0x800000, 0x400000, CRC(deab4ad1) SHA1(580ad88d516280baaf6cc92b2e07cdc0cfc486f3) ) |
| 5066 | |
| 5067 | ROM_REGION( 0x4000, "nvram", 0 ) // default eeprom |
| 5068 | ROM_LOAD( "alpiner2_defaults.nv", 0x0000, 0x4000, CRC(1d660b8b) SHA1(e6047ad2d61fa55e8f054813f5c705fd7d145a73) ) |
| 4342 | 5069 | ROM_END |
| 4343 | 5070 | |
| 5071 | |
| 5072 | ROM_START( alpinesa ) |
| 5073 | ROM_REGION( 0x800000, "maincpu", 0 ) /* main program */ |
| 5074 | ROM_LOAD32_BYTE( "af2ver-a_ll.ic2", 0x000003, 0x200000, CRC(e776159d) SHA1(5110364afb7ec606074d58a1d216d7d687b9df62) ) |
| 5075 | ROM_LOAD32_BYTE( "af2ver-a_lm.ic3", 0x000002, 0x200000, CRC(c5333d38) SHA1(9486cead964f95f8e56dac2f88486f3b98561aa6) ) |
| 5076 | ROM_LOAD32_BYTE( "af2ver-a_um.ic4", 0x000001, 0x200000, CRC(5977fc6e) SHA1(19b8041789f8987934fa461972976a3570b1b87b) ) |
| 5077 | ROM_LOAD32_BYTE( "af2ver-a_uu.ic5", 0x000000, 0x200000, CRC(54ee33a1) SHA1(0eaa8707ab13a0a66551f61a08986c98f5c9e446) ) |
| 5078 | |
| 5079 | ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */ |
| 5080 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 5081 | |
| 5082 | ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */ |
| 5083 | ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) ) |
| 5084 | |
| 5085 | ROM_REGION16_LE( 0x080000, "mcu", 0 ) /* S22-BIOS ver1.41 */ |
| 5086 | ROM_LOAD( "af1data.8k", 0x000000, 0x080000, CRC(ef13ebe8) SHA1(5d3f697994d4b5b19ee7fea1e2aef8e39449b68e) ) |
| 5087 | |
| 5088 | ROM_REGION( 0x200000*8, "sprite", ROMREGION_ERASEFF ) /* 32x32x8bpp sprite tiles */ |
| 5089 | ROM_LOAD( "af1scg0b.12f", 0x000000, 0x200000, CRC(46a6222a) SHA1(5322ef60690625b9b8dbe1cfe0c49dcd9c8b1a4c) ) |
| 5090 | |
| 5091 | ROM_REGION( 0x200000*5, "textile", 0) /* 16x16x8bpp texture tiles */ |
| 5092 | ROM_LOAD( "af1cg0.8d", 0x200000*0, 0x200000, CRC(7423f3ff) SHA1(6a2fd44823ef46111deb57d328b1b75cc355d413) ) |
| 5093 | ROM_LOAD( "af1cg1.10d", 0x200000*1, 0x200000, CRC(ea76689a) SHA1(73dd3af737a3e9903abe5ed9c9ae7eded51d8350) ) |
| 5094 | ROM_LOAD( "af1cg2.12d", 0x200000*2, 0x200000, CRC(2a38943a) SHA1(15d737996f49bf6374ef6191bbfbe0298d398378) ) |
| 5095 | ROM_LOAD( "af1cg3.13d", 0x200000*3, 0x200000, CRC(7f5a3e0f) SHA1(241f9995323b28df23d20a75e1f43ce6e05434cd) ) |
| 5096 | ROM_LOAD( "af1cg4.14d", 0x200000*4, 0x200000, CRC(a5ee13e2) SHA1(48fd3c912690f21cbbc2a39bed0a82be41a0d011) ) |
| 5097 | |
| 5098 | ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */ |
| 5099 | ROM_LOAD( "af1ccrl.3d", 0x000000, 0x200000, CRC(6c054698) SHA1(8537607646b183883c5aa4060fb0af640da4af87) ) |
| 5100 | ROM_LOAD( "af1ccrh.1d", 0x200000, 0x080000, CRC(95a02a27) SHA1(32ee87b76ae9fcec6d825e3cf4d5cbb97db39544) ) |
| 5101 | |
| 5102 | ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */ |
| 5103 | ROM_LOAD( "af1ptrl0.18k", 0x80000*0, 0x80000, CRC(31ce46d3) SHA1(568fb9ee9ac14e613a4fd7668cb38315c10be62b) ) |
| 5104 | ROM_LOAD( "af1ptrl1.16k", 0x80000*1, 0x80000, CRC(e869bf00) SHA1(b3c3026891ae3958d1774c905e97c3b57a414ea7) ) |
| 5105 | ROM_LOAD( "af1ptrm0.18j", 0x80000*2, 0x80000, CRC(ef7f4d8a) SHA1(02f77c68004b7dccc99b61126e7d07960eb15028) ) |
| 5106 | ROM_LOAD( "af1ptrm1.16j", 0x80000*3, 0x80000, CRC(7dd01d52) SHA1(adc1087435d31ed6163ad046466955f01517450f) ) |
| 5107 | ROM_LOAD( "af1ptru0.18f", 0x80000*4, 0x80000, CRC(177f1591) SHA1(3969e780e5603eca0a65f65c1ad14d1cef918b39) ) |
| 5108 | ROM_LOAD( "af1ptru1.16f", 0x80000*5, 0x80000, CRC(7521d18e) SHA1(dc03ef369db16f59c138ff4e22260d1c04782d1f) ) |
| 5109 | |
| 5110 | ROM_REGION( 0x1000000, "c352", 0 ) /* sound samples */ |
| 5111 | ROM_LOAD( "af1wavea.2l", 0x000000, 0x400000, CRC(28cca494) SHA1(4ff87ab85fd17bf8dbee5b03d99cc5c31dd6349a) ) |
| 5112 | |
| 5113 | ROM_REGION( 0x4000, "nvram", 0 ) // default eeprom |
| 5114 | ROM_LOAD( "alpinesa_defaults.nv", 0x0000, 0x4000, CRC(9744207c) SHA1(bbd34ee138c116d281c718f14740e2883a5cdf49) ) |
| 5115 | ROM_END |
| 5116 | |
| 5117 | |
| 4344 | 5118 | ROM_START( timecris ) |
| 4345 | 5119 | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 4346 | 5120 | ROM_LOAD32_BYTE( "ts2ver-b.1", 0x00003, 0x100000, CRC(29b377f7) SHA1(21864ba964602115c1268fd5edd8006a13a86cfc) ) |
| r24771 | r24772 | |
| 4445 | 5219 | ROM_LOAD( "ts1waveb.1l", 0x800000, 0x200000, CRC(bf4d7272) SHA1(c7c7b3620e7b3176644b6784ee36e679c9e31cc1) ) |
| 4446 | 5220 | ROM_END |
| 4447 | 5221 | |
| 5222 | |
| 4448 | 5223 | ROM_START( tokyowar ) |
| 4449 | 5224 | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 4450 | 5225 | ROM_LOAD32_BYTE( "tw2ver-a.1", 0x000003, 0x100000, CRC(2b17ca92) SHA1(7bcb1658059c59fb1a0131a41ede7157855130a8) ) |
| r24771 | r24772 | |
| 4502 | 5277 | ROM_LOAD( "tokyowar_defaults.nv", 0x0000, 0x4000, CRC(a1fe05e4) SHA1(39a20b35394a43e12c66a6c0f5ecb204148c58de) ) |
| 4503 | 5278 | ROM_END |
| 4504 | 5279 | |
| 5280 | |
| 4505 | 5281 | ROM_START( dirtdash ) |
| 4506 | 5282 | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 4507 | 5283 | ROM_LOAD32_WORD_SWAP( "dt2vera.1", 0x000002, 0x200000, CRC(402a3d73) SHA1(009b57ed0ea228ccedb139d945b9eaf2a36e2502) ) |
| r24771 | r24772 | |
| 4550 | 5326 | ROM_LOAD( "dt1waveb.1l", 0x800000, 0x400000, CRC(6b736f94) SHA1(ac3715480aa9a9c2dec099607f89859bb3b73a6a) ) |
| 4551 | 5327 | ROM_END |
| 4552 | 5328 | |
| 5329 | |
| 4553 | 5330 | ROM_START( aquajet ) |
| 4554 | 5331 | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 4555 | 5332 | ROM_LOAD32_BYTE( "aj2ver-b.1", 0x000003, 0x100000, CRC(3a67b9f4) SHA1(8cd51f319e082297fdb99634486fe297a0ace654) ) |
| r24771 | r24772 | |
| 4607 | 5384 | ROM_LOAD( "aquajet_defaults.nv", 0x0000, 0x4000, CRC(7d03893c) SHA1(f75ca5d996a94da4136ed0a4f0f4c869f1412e38) ) |
| 4608 | 5385 | ROM_END |
| 4609 | 5386 | |
| 5387 | |
| 4610 | 5388 | ROM_START( adillor ) |
| 4611 | 5389 | ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */ |
| 4612 | 5390 | ROM_LOAD32_BYTE( "am1vera.rom1", 0x000003, 0x100000, CRC(e99157f9) SHA1(7a200f3b5890f5badbf529a8c8ac6a8548adb801) ) |
| r24771 | r24772 | |
| 4674 | 5452 | ROM_REGION( 0x4000, "nvram", ROMREGION_ERASE00 ) // default eeprom |
| 4675 | 5453 | ROM_END |
| 4676 | 5454 | |
| 4677 | | /*******************************************************************/ |
| 4678 | 5455 | |
| 4679 | | CUSTOM_INPUT_MEMBER(namcos22_state::alpine_motor_read) |
| 4680 | | { |
| 4681 | | return m_motor_status >> (FPTR)param & 1; |
| 4682 | | } |
| 4683 | 5456 | |
| 4684 | | static INPUT_PORTS_START( alpiner ) |
| 4685 | | PORT_START("DSW0") |
| 4686 | | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0001, "SW4:1" ) |
| 4687 | | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 4688 | | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 4689 | | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 4690 | | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 4691 | | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 4692 | | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 4693 | | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 4694 | | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 5457 | /*********************************************************************************************/ |
| 4695 | 5458 | |
| 4696 | | PORT_START("MCUP5A") |
| 4697 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 4698 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4699 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4700 | | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 4701 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START ) // Decision / View Change |
| 4702 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY // L Selection |
| 4703 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_16WAY // R Selection |
| 4704 | | PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22_state,alpine_motor_read, (void *)0) // steps are free |
| 4705 | | |
| 4706 | | PORT_START("MCUP5B") |
| 4707 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22_state,alpine_motor_read, (void *)1) // steps are locked |
| 4708 | | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4709 | | |
| 4710 | | PORT_START("ADC0") |
| 4711 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_NAME("Steps Swing") |
| 4712 | | |
| 4713 | | PORT_START("ADC1") |
| 4714 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_NAME("Steps Edge") |
| 4715 | | INPUT_PORTS_END |
| 4716 | | |
| 4717 | | static INPUT_PORTS_START( airco22 ) |
| 4718 | | PORT_START("DSW0") |
| 4719 | | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0001, "SW4:1" ) |
| 4720 | | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 4721 | | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 4722 | | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 4723 | | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 4724 | | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 4725 | | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 4726 | | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 4727 | | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 4728 | | |
| 4729 | | PORT_START("MCUP5A") |
| 4730 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 4731 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4732 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4733 | | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 4734 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* Missile */ |
| 4735 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* Gun */ |
| 4736 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START ) |
| 4737 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4738 | | |
| 4739 | | PORT_START("MCUP5B") |
| 4740 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4741 | | |
| 4742 | | PORT_START("ADC0") |
| 4743 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) |
| 4744 | | |
| 4745 | | PORT_START("ADC1") |
| 4746 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) |
| 4747 | | |
| 4748 | | PORT_START("ADC2") |
| 4749 | | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) |
| 4750 | | INPUT_PORTS_END |
| 4751 | | |
| 4752 | | static INPUT_PORTS_START( cybrcycc ) |
| 4753 | | PORT_START("DSW0") |
| 4754 | | PORT_DIPNAME( 0x0001, 0x0001, "Test Mode?" ) PORT_DIPLOCATION("SW4:1") |
| 4755 | | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 4756 | | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 4757 | | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 4758 | | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 4759 | | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 4760 | | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 4761 | | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 4762 | | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 4763 | | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 4764 | | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 4765 | | |
| 4766 | | PORT_START("MCUP5A") |
| 4767 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 4768 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4769 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4770 | | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 4771 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START ) // also view-change function |
| 4772 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4773 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4774 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4775 | | |
| 4776 | | PORT_START("MCUP5B") |
| 4777 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4778 | | |
| 4779 | | PORT_START("ADC0") |
| 4780 | | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Steering Wheel") |
| 4781 | | |
| 4782 | | PORT_START("ADC1") |
| 4783 | | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Gas Pedal") |
| 4784 | | |
| 4785 | | PORT_START("ADC2") |
| 4786 | | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Brake Pedal") |
| 4787 | | INPUT_PORTS_END |
| 4788 | | |
| 4789 | | static INPUT_PORTS_START( dirtdash ) |
| 4790 | | PORT_START("DSW0") |
| 4791 | | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0001, "SW4:1" ) |
| 4792 | | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 4793 | | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 4794 | | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 4795 | | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 4796 | | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 4797 | | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 4798 | | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 4799 | | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 4800 | | |
| 4801 | | PORT_START("MCUP5A") |
| 4802 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 4803 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4804 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4805 | | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 4806 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("View Change") |
| 4807 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Shift Up") |
| 4808 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Shift Down") |
| 4809 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Motion-Stop") |
| 4810 | | |
| 4811 | | PORT_START("MCUP5B") |
| 4812 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4813 | | |
| 4814 | | PORT_START("ADC0") |
| 4815 | | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(3) PORT_NAME("Steering Wheel") |
| 4816 | | |
| 4817 | | PORT_START("ADC1") |
| 4818 | | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Gas Pedal") |
| 4819 | | |
| 4820 | | PORT_START("ADC2") |
| 4821 | | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Brake Pedal") |
| 4822 | | INPUT_PORTS_END |
| 4823 | | |
| 4824 | | static INPUT_PORTS_START( tokyowar ) |
| 4825 | | PORT_START("DSW0") |
| 4826 | | PORT_DIPNAME( 0x0001, 0x0001, "Test Mode?" ) PORT_DIPLOCATION("SW4:1") |
| 4827 | | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 4828 | | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 4829 | | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 4830 | | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 4831 | | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 4832 | | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 4833 | | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 4834 | | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 4835 | | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 4836 | | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 4837 | | |
| 4838 | | PORT_START("MCUP5A") |
| 4839 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 4840 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4841 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4842 | | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 4843 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) // also view-change function |
| 4844 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Right Trigger") |
| 4845 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Left Trigger") |
| 4846 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4847 | | |
| 4848 | | PORT_START("MCUP5B") |
| 4849 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4850 | | |
| 4851 | | PORT_START("ADC0") |
| 4852 | | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Steering Wheel") |
| 4853 | | |
| 4854 | | PORT_START("ADC2") |
| 4855 | | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Gas Pedal") |
| 4856 | | |
| 4857 | | PORT_START("ADC3") |
| 4858 | | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Brake Pedal") |
| 4859 | | INPUT_PORTS_END |
| 4860 | | |
| 4861 | | static INPUT_PORTS_START( aquajet ) |
| 4862 | | PORT_START("DSW0") |
| 4863 | | PORT_DIPNAME( 0x0001, 0x0001, "Test Mode?" ) PORT_DIPLOCATION("SW4:1") |
| 4864 | | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 4865 | | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 4866 | | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 4867 | | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 4868 | | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 4869 | | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 4870 | | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 4871 | | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 4872 | | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 4873 | | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 4874 | | |
| 4875 | | PORT_START("MCUP5A") |
| 4876 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 4877 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4878 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4879 | | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 4880 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 4881 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4882 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4883 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4884 | | |
| 4885 | | PORT_START("MCUP5B") |
| 4886 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4887 | | |
| 4888 | | PORT_START("ADC0") |
| 4889 | | PORT_BIT( 0xff, 0x7f, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE |
| 4890 | | |
| 4891 | | PORT_START("ADC1") |
| 4892 | | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0x80) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE |
| 4893 | | |
| 4894 | | PORT_START("ADC2") |
| 4895 | | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE |
| 4896 | | INPUT_PORTS_END |
| 4897 | | |
| 4898 | | static INPUT_PORTS_START( adillor ) |
| 4899 | | PORT_START("DSW0") |
| 4900 | | PORT_DIPNAME( 0x0001, 0x0001, "Test Mode?" ) PORT_DIPLOCATION("SW4:1") |
| 4901 | | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 4902 | | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 4903 | | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 4904 | | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 4905 | | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 4906 | | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 4907 | | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 4908 | | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 4909 | | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 4910 | | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 4911 | | |
| 4912 | | PORT_START("P1") |
| 4913 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("Dev Service Enter") |
| 4914 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("Dev Service Exit") |
| 4915 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_NAME("Dev Service Left") |
| 4916 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_NAME("Dev Service Right") // when in normal testmode, press this to enter the extra testmode |
| 4917 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_NAME("Dev Service Up") |
| 4918 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_NAME("Dev Service Down") |
| 4919 | | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4920 | | |
| 4921 | | PORT_START("MCUP5A") |
| 4922 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 4923 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4924 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4925 | | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 4926 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4927 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4928 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4929 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4930 | | |
| 4931 | | PORT_START("MCUP5B") |
| 4932 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 4933 | | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4934 | | |
| 4935 | | PORT_START("TRACKX") |
| 4936 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x01, 0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_NAME("Trackball X") |
| 4937 | | |
| 4938 | | PORT_START("TRACKY") |
| 4939 | | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x01, 0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_NAME("Trackball Y") |
| 4940 | | INPUT_PORTS_END |
| 4941 | | |
| 4942 | | static INPUT_PORTS_START( propcycl ) |
| 4943 | | PORT_START("DSW0") |
| 4944 | | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0001, "SW4:1" ) |
| 4945 | | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 4946 | | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 4947 | | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 4948 | | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 4949 | | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 4950 | | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 4951 | | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW4:8" ) |
| 4952 | | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 4953 | | |
| 4954 | | PORT_START("MCUP5A") |
| 4955 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 4956 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4957 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4958 | | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 4959 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4960 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4961 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4962 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4963 | | |
| 4964 | | PORT_START("MCUP5B") |
| 4965 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 4966 | | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4967 | | |
| 4968 | | PORT_START("ADC0") |
| 4969 | | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_MINMAX(0x00, 0xfe) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE |
| 4970 | | |
| 4971 | | PORT_START("ADC1") |
| 4972 | | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_MINMAX(0x00, 0xfe) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) |
| 4973 | | |
| 4974 | | PORT_START("PEDAL") |
| 4975 | | PORT_BIT( 0x7f, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) |
| 4976 | | INPUT_PORTS_END |
| 4977 | | |
| 4978 | | static INPUT_PORTS_START( timecris ) |
| 4979 | | PORT_START("DSW0") |
| 4980 | | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0001, "SW4:1" ) |
| 4981 | | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW4:2" ) |
| 4982 | | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW4:3" ) |
| 4983 | | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW4:4" ) |
| 4984 | | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW4:5" ) |
| 4985 | | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW4:6" ) |
| 4986 | | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW4:7" ) |
| 4987 | | PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW4:8") |
| 4988 | | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 4989 | | |
| 4990 | | PORT_START("MCUP5A") |
| 4991 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 4992 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4993 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4994 | | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 4995 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Gun Trigger") |
| 4996 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Foot Pedal") |
| 4997 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4998 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4999 | | |
| 5000 | | PORT_START("MCUP5B") |
| 5001 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5002 | | |
| 5003 | | PORT_START( "LIGHTX" ) // tuned for CRT |
| 5004 | | PORT_BIT( 0xfff, 68+626/2, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(68, 68+626) PORT_SENSITIVITY(48) PORT_KEYDELTA(10) |
| 5005 | | |
| 5006 | | PORT_START( "LIGHTY" ) // tuned for CRT - can't shoot below the statusbar? |
| 5007 | | PORT_BIT( 0xfff, 43+241/2, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(43, 43+241) PORT_SENSITIVITY(64) PORT_KEYDELTA(4) |
| 5008 | | INPUT_PORTS_END |
| 5009 | | |
| 5010 | | /*****************************************************************************************************/ |
| 5011 | | |
| 5012 | | static INPUT_PORTS_START( cybrcomm ) |
| 5013 | | PORT_START("INPUTS") |
| 5014 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Gun Trigger") // placed on both sticks |
| 5015 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Missile Button") // placed on both sticks |
| 5016 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5017 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5018 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5019 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5020 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("View Change") |
| 5021 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5022 | | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5023 | | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 5024 | | PORT_SERVICE( 0x0400, IP_ACTIVE_LOW ) |
| 5025 | | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5026 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 5027 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5028 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5029 | | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5030 | | |
| 5031 | | /* Note(s) |
| 5032 | | The ranges here are based on the test mode which displays +-224 |
| 5033 | | The nvram is calibrated using these settings. If the SUBCPU handling changes then these might |
| 5034 | | end up needing to change again too |
| 5035 | | Default key arrangement is based on dual-joystick 'Tank' arrangement found in Assault and CyberSled |
| 5036 | | */ |
| 5037 | | PORT_START("STICKY1") /* VOLUME 0 */ |
| 5038 | | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_MINMAX(0x47,0xb7) /* range based on test mode */ PORT_CODE_DEC(KEYCODE_I) PORT_CODE_INC(KEYCODE_K) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) /* right joystick: vertical */ |
| 5039 | | PORT_START("STICKY2") /* VOLUME 0 */ |
| 5040 | | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_MINMAX(0x47,0xb7) /* range based on test mode */ PORT_CODE_DEC(KEYCODE_E) PORT_CODE_INC(KEYCODE_D) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) /* left joystick: vertical */ |
| 5041 | | PORT_START("STICKX1") /* VOLUME 0 */ |
| 5042 | | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_MINMAX(0x47,0xb7) /* range based on test mode */ PORT_CODE_DEC(KEYCODE_J) PORT_CODE_INC(KEYCODE_L) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) /* right joystick: horizontal */ |
| 5043 | | PORT_START("STICKX2") /* VOLUME 0 */ |
| 5044 | | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_MINMAX(0x47,0xb7) /* range based on test mode */ PORT_CODE_DEC(KEYCODE_S) PORT_CODE_INC(KEYCODE_F) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) /* left joystick: horizontal */ |
| 5045 | | |
| 5046 | | PORT_START("DSW0") |
| 5047 | | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0001, "SW2:1" ) |
| 5048 | | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW2:2" ) |
| 5049 | | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW2:3" ) |
| 5050 | | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW2:4" ) |
| 5051 | | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW2:5" ) |
| 5052 | | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW2:6" ) |
| 5053 | | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW2:7" ) |
| 5054 | | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW2:8" ) |
| 5055 | | PORT_DIPUNKNOWN_DIPLOC( 0x0100, 0x0100, "SW3:1" ) |
| 5056 | | PORT_DIPUNKNOWN_DIPLOC( 0x0200, 0x0200, "SW3:2" ) |
| 5057 | | PORT_DIPUNKNOWN_DIPLOC( 0x0400, 0x0400, "SW3:3" ) |
| 5058 | | PORT_DIPUNKNOWN_DIPLOC( 0x0800, 0x0800, "SW3:4" ) |
| 5059 | | PORT_DIPUNKNOWN_DIPLOC( 0x1000, 0x1000, "SW3:5" ) |
| 5060 | | PORT_DIPUNKNOWN_DIPLOC( 0x2000, 0x2000, "SW3:6" ) |
| 5061 | | PORT_DIPUNKNOWN_DIPLOC( 0x4000, 0x4000, "SW3:7" ) |
| 5062 | | PORT_DIPUNKNOWN_DIPLOC( 0x8000, 0x8000, "SW3:8" ) |
| 5063 | | INPUT_PORTS_END |
| 5064 | | |
| 5065 | | static INPUT_PORTS_START( acedrvr ) |
| 5066 | | PORT_START("INPUTS") |
| 5067 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Shift Down") |
| 5068 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Shift Up") |
| 5069 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5070 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5071 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5072 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5073 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("View Change") |
| 5074 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5075 | | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5076 | | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 5077 | | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5078 | | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5079 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 5080 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5081 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5082 | | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Motion-Stop") |
| 5083 | | |
| 5084 | | PORT_START("P1") |
| 5085 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("Dev Service Enter") |
| 5086 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_NAME("Dev Service Up") |
| 5087 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_NAME("Dev Service Down") |
| 5088 | | PORT_BIT( 0xff3e, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5089 | | |
| 5090 | | PORT_START("DSW0") |
| 5091 | | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0001, "SW2:1" ) |
| 5092 | | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW2:2" ) |
| 5093 | | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW2:3" ) |
| 5094 | | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW2:4" ) |
| 5095 | | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW2:5" ) |
| 5096 | | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW2:6" ) |
| 5097 | | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW2:7" ) |
| 5098 | | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW2:8" ) |
| 5099 | | PORT_DIPUNKNOWN_DIPLOC( 0x0100, 0x0100, "SW3:1" ) |
| 5100 | | PORT_DIPUNKNOWN_DIPLOC( 0x0200, 0x0200, "SW3:2" ) |
| 5101 | | PORT_DIPUNKNOWN_DIPLOC( 0x0400, 0x0400, "SW3:3" ) |
| 5102 | | PORT_DIPUNKNOWN_DIPLOC( 0x0800, 0x0800, "SW3:4" ) |
| 5103 | | PORT_DIPUNKNOWN_DIPLOC( 0x1000, 0x1000, "SW3:5" ) |
| 5104 | | PORT_DIPUNKNOWN_DIPLOC( 0x2000, 0x2000, "SW3:6" ) |
| 5105 | | PORT_DIPNAME( 0x4000, 0x4000, "Test Mode?" ) PORT_DIPLOCATION("SW3:7") |
| 5106 | | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) |
| 5107 | | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 5108 | | PORT_DIPNAME( 0x8000, 0x8000, "Test Mode?" ) PORT_DIPLOCATION("SW3:8") |
| 5109 | | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 5110 | | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 5111 | | |
| 5112 | | PORT_START("GAS") |
| 5113 | | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Gas Pedal") |
| 5114 | | |
| 5115 | | PORT_START("BRAKE") |
| 5116 | | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Brake Pedal") |
| 5117 | | |
| 5118 | | PORT_START("STEER") |
| 5119 | | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Steering Wheel") |
| 5120 | | INPUT_PORTS_END |
| 5121 | | |
| 5122 | | static INPUT_PORTS_START( victlap ) |
| 5123 | | PORT_INCLUDE( acedrvr ) |
| 5124 | | |
| 5125 | | PORT_MODIFY("P1") |
| 5126 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_NAME("Dev Service Up") |
| 5127 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_NAME("Dev Service Down") |
| 5128 | | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("Dev Service Enter") |
| 5129 | | PORT_BIT( 0xfe3f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5130 | | INPUT_PORTS_END |
| 5131 | | |
| 5132 | | static INPUT_PORTS_START( ridgera ) |
| 5133 | | PORT_START("INPUTS") |
| 5134 | | /* 1 3 5 When the cabinet is set to Deluxe, the stick shift is basically |
| 5135 | | |-|-| an 8-way joystick that locks into place. |
| 5136 | | 2 4 6 Standard (default) setup uses a racing shifter like in Ace Driver. */ |
| 5137 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Shift Down") |
| 5138 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Shift Up") |
| 5139 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("Shift Left") // not used in Standard |
| 5140 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_NAME("Shift Right") // not used in Standard |
| 5141 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Clutch Pedal") // not used in Standard |
| 5142 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5143 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5144 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5145 | | PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Cabinet ) ) |
| 5146 | | PORT_DIPSETTING( 0x0000, DEF_STR( Standard ) ) |
| 5147 | | PORT_DIPSETTING( 0x0100, "Deluxe" ) |
| 5148 | | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 5149 | | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) // also service mode? |
| 5150 | | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5151 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 5152 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5153 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5154 | | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5155 | | |
| 5156 | | PORT_START("DSW0") |
| 5157 | | PORT_SERVICE_DIPLOC( 0x0001, IP_ACTIVE_LOW, "SW2:1") |
| 5158 | | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0002, "SW2:2" ) |
| 5159 | | PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW2:3" ) |
| 5160 | | PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW2:4" ) |
| 5161 | | PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW2:5" ) |
| 5162 | | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW2:6" ) |
| 5163 | | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW2:7" ) |
| 5164 | | PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW2:8" ) |
| 5165 | | PORT_DIPUNKNOWN_DIPLOC( 0x0100, 0x0100, "SW3:1" ) |
| 5166 | | PORT_DIPUNKNOWN_DIPLOC( 0x0200, 0x0200, "SW3:2" ) |
| 5167 | | PORT_DIPUNKNOWN_DIPLOC( 0x0400, 0x0400, "SW3:3" ) |
| 5168 | | PORT_DIPUNKNOWN_DIPLOC( 0x0800, 0x0800, "SW3:4" ) |
| 5169 | | PORT_DIPUNKNOWN_DIPLOC( 0x1000, 0x1000, "SW3:5" ) |
| 5170 | | PORT_DIPUNKNOWN_DIPLOC( 0x2000, 0x2000, "SW3:6" ) |
| 5171 | | PORT_DIPUNKNOWN_DIPLOC( 0x4000, 0x4000, "SW3:7" ) |
| 5172 | | PORT_DIPUNKNOWN_DIPLOC( 0x8000, 0x8000, "SW3:8" ) |
| 5173 | | |
| 5174 | | PORT_START("GAS") |
| 5175 | | PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Gas Pedal") |
| 5176 | | |
| 5177 | | PORT_START("BRAKE") |
| 5178 | | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Brake Pedal") |
| 5179 | | |
| 5180 | | PORT_START("STEER") |
| 5181 | | PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Steering Wheel") |
| 5182 | | INPUT_PORTS_END |
| 5183 | | |
| 5184 | | static INPUT_PORTS_START( ridgeracf ) |
| 5185 | | PORT_INCLUDE( ridgera ) |
| 5186 | | |
| 5187 | | PORT_MODIFY("INPUTS") |
| 5188 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Ignition Key") |
| 5189 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("AT Switch") |
| 5190 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("MT Switch") |
| 5191 | | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE2 ) |
| 5192 | | PORT_SERVICE( 0x0400, IP_ACTIVE_LOW ) |
| 5193 | | |
| 5194 | | // DIP3-1 to DIP3-3 are for setting up the viewing angle (game used one board per screen?) |
| 5195 | | // Some of the other dipswitches are for debugging, like with Ridge Racer 2. |
| 5196 | | PORT_MODIFY("DSW0") |
| 5197 | | PORT_DIPUNKNOWN_DIPLOC( 0x0001, 0x0000, "SW2:1" ) // always on? |
| 5198 | | PORT_DIPUNKNOWN_DIPLOC( 0x0002, 0x0000, "SW2:2" ) // always on? |
| 5199 | | PORT_DIPNAME( 0x8000, 0x8000, "Test Mode" ) PORT_DIPLOCATION("SW3:8") |
| 5200 | | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 5201 | | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 5202 | | INPUT_PORTS_END |
| 5203 | | |
| 5204 | | static INPUT_PORTS_START( ridgera2 ) |
| 5205 | | PORT_INCLUDE( ridgera ) |
| 5206 | | |
| 5207 | | PORT_MODIFY("INPUTS") |
| 5208 | | PORT_DIPNAME( 0x2100, 0x2000, DEF_STR( Cabinet ) ) |
| 5209 | | PORT_DIPSETTING( 0x0000, "50 Inch" ) |
| 5210 | | PORT_DIPSETTING( 0x0100, "Twin" ) |
| 5211 | | PORT_DIPSETTING( 0x2000, DEF_STR( Standard ) ) |
| 5212 | | PORT_DIPSETTING( 0x2100, "Deluxe" ) |
| 5213 | | |
| 5214 | | /* Some dipswitches seem to be for debug purposes, for example: |
| 5215 | | 2-4 : background drawing related |
| 5216 | | 2-5 : background drawing related |
| 5217 | | 2-6 : debug link-up |
| 5218 | | 2-8 : no game over when time runs out (cheat) |
| 5219 | | 3-7 : debug polygons |
| 5220 | | */ |
| 5221 | | PORT_MODIFY("DSW0") |
| 5222 | | PORT_DIPNAME( 0x8000, 0x8000, "Test Mode" ) PORT_DIPLOCATION("SW3:8") |
| 5223 | | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 5224 | | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 5225 | | INPUT_PORTS_END |
| 5226 | | |
| 5227 | | static INPUT_PORTS_START( raveracw ) |
| 5228 | | PORT_INCLUDE( ridgera ) |
| 5229 | | |
| 5230 | | PORT_MODIFY("INPUTS") |
| 5231 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("View Change") |
| 5232 | | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no coin2 |
| 5233 | | |
| 5234 | | PORT_DIPNAME( 0x2100, 0x2000, DEF_STR( Cabinet ) ) |
| 5235 | | PORT_DIPSETTING( 0x0000, "50 Inch" ) |
| 5236 | | PORT_DIPSETTING( 0x0100, "Twin" ) |
| 5237 | | PORT_DIPSETTING( 0x2000, DEF_STR( Standard ) ) |
| 5238 | | PORT_DIPSETTING( 0x2100, "Deluxe" ) |
| 5239 | | INPUT_PORTS_END |
| 5240 | | |
| 5241 | | /*****************************************************************************************************/ |
| 5242 | | |
| 5243 | 5459 | // MCU speed cheats (every bit helps with these games) |
| 5244 | 5460 | |
| 5245 | 5461 | // for MCU BIOS v1.41 |
| r24771 | r24772 | |
| 5280 | 5496 | return m_su_82; |
| 5281 | 5497 | } |
| 5282 | 5498 | |
| 5283 | | static void install_c74_speedup(running_machine &machine) |
| 5499 | void namcos22_state::install_c74_speedup() |
| 5284 | 5500 | { |
| 5285 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 5286 | 5501 | if (MCU_SPEEDUP) |
| 5287 | | state->m_mcu->space(AS_PROGRAM).install_readwrite_handler(0x80, 0x81, read16_delegate(FUNC(namcos22_state::mcuc74_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state)); |
| 5502 | m_mcu->space(AS_PROGRAM).install_readwrite_handler(0x80, 0x81, read16_delegate(FUNC(namcos22_state::mcuc74_speedup_r),this), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),this)); |
| 5288 | 5503 | } |
| 5289 | 5504 | |
| 5290 | | static void install_130_speedup(running_machine &machine) |
| 5505 | void namcos22_state::install_130_speedup() |
| 5291 | 5506 | { |
| 5292 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 5293 | 5507 | // install speedup cheat for 1.20/1.30 MCU BIOS |
| 5294 | 5508 | if (MCU_SPEEDUP) |
| 5295 | | state->m_mcu->space(AS_PROGRAM).install_readwrite_handler(0x82, 0x83, read16_delegate(FUNC(namcos22_state::mcu130_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state)); |
| 5509 | m_mcu->space(AS_PROGRAM).install_readwrite_handler(0x82, 0x83, read16_delegate(FUNC(namcos22_state::mcu130_speedup_r),this), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),this)); |
| 5296 | 5510 | } |
| 5297 | 5511 | |
| 5298 | | static void install_141_speedup(running_machine &machine) |
| 5512 | void namcos22_state::install_141_speedup() |
| 5299 | 5513 | { |
| 5300 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 5301 | 5514 | // install speedup cheat for 1.41 MCU BIOS |
| 5302 | 5515 | if (MCU_SPEEDUP) |
| 5303 | | state->m_mcu->space(AS_PROGRAM).install_readwrite_handler(0x82, 0x83, read16_delegate(FUNC(namcos22_state::mcu141_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state)); |
| 5516 | m_mcu->space(AS_PROGRAM).install_readwrite_handler(0x82, 0x83, read16_delegate(FUNC(namcos22_state::mcu141_speedup_r),this), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),this)); |
| 5304 | 5517 | } |
| 5305 | 5518 | |
| 5306 | | static void namcos22_init( running_machine &machine, int game_type ) |
| 5307 | | { |
| 5308 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 5309 | 5519 | |
| 5310 | | state->m_gametype = game_type; |
| 5311 | | state->m_keycus_id = 0; |
| 5312 | | state->m_su_82 = 0; |
| 5313 | | state->m_irq_state = 0; |
| 5314 | | state->m_p4 = 0; |
| 5315 | | state->m_old_coin_state = 0; |
| 5316 | | state->m_credits1 = state->m_credits2 = 0; |
| 5317 | 5520 | |
| 5318 | | state->m_pPointRAM = auto_alloc_array(machine, UINT32, 0x20000); |
| 5319 | | } |
| 5521 | /*********************************************************************************************/ |
| 5320 | 5522 | |
| 5321 | | static void alpine_init_common( running_machine &machine, int game_type ) |
| 5523 | void namcos22_state::namcos22_init(int game_type) |
| 5322 | 5524 | { |
| 5323 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 5324 | | namcos22_init(machine, game_type); |
| 5525 | m_gametype = game_type; |
| 5325 | 5526 | |
| 5326 | | state->m_mcu->space(AS_IO).install_write_handler(M37710_PORT5, M37710_PORT5, write8_delegate(FUNC(namcos22_state::alpine_mcu_port5_w),state)); |
| 5327 | | |
| 5328 | | state->m_motor_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(namcos22_state::alpine_steplock_callback),state)); |
| 5329 | | state->m_motor_timer->reset(); |
| 5330 | | state->m_motor_status = 2; |
| 5527 | m_keycus_id = 0; |
| 5528 | m_su_82 = 0; |
| 5529 | m_irq_state = 0; |
| 5530 | m_p4 = 0; |
| 5531 | m_old_coin_state = 0; |
| 5532 | m_credits1 = m_credits2 = 0; |
| 5331 | 5533 | } |
| 5332 | 5534 | |
| 5333 | | DRIVER_INIT_MEMBER(namcos22_state,alpiner) |
| 5535 | DRIVER_INIT_MEMBER(namcos22_state,ridgeraj) |
| 5334 | 5536 | { |
| 5335 | | alpine_init_common(machine(), NAMCOS22_ALPINE_RACER); |
| 5537 | namcos22_init(NAMCOS22_RIDGE_RACER); |
| 5538 | install_c74_speedup(); |
| 5336 | 5539 | |
| 5337 | | install_130_speedup(machine()); |
| 5338 | | |
| 5339 | | m_keycus_id = 0x0187; |
| 5540 | m_keycus_id = 0x0172; |
| 5340 | 5541 | } |
| 5341 | 5542 | |
| 5342 | | DRIVER_INIT_MEMBER(namcos22_state,alpiner2) |
| 5543 | DRIVER_INIT_MEMBER(namcos22_state,ridger2j) |
| 5343 | 5544 | { |
| 5344 | | alpine_init_common(machine(), NAMCOS22_ALPINE_RACER_2); |
| 5545 | namcos22_init(NAMCOS22_RIDGE_RACER2); |
| 5546 | install_c74_speedup(); |
| 5345 | 5547 | |
| 5346 | | install_130_speedup(machine()); |
| 5347 | | |
| 5348 | | m_keycus_id = 0x0187; |
| 5548 | m_keycus_id = 0x0172; |
| 5349 | 5549 | } |
| 5350 | 5550 | |
| 5351 | | DRIVER_INIT_MEMBER(namcos22_state,alpinesa) |
| 5551 | DRIVER_INIT_MEMBER(namcos22_state,acedrvr) |
| 5352 | 5552 | { |
| 5353 | | alpine_init_common(machine(), NAMCOS22_ALPINE_SURFER); |
| 5553 | namcos22_init(NAMCOS22_ACE_DRIVER); |
| 5554 | install_c74_speedup(); |
| 5354 | 5555 | |
| 5355 | | m_maincpu->space(AS_PROGRAM).install_read_handler (0x200000, 0x200003, read32_delegate(FUNC(namcos22_state::alpinesa_prot_r),this)); |
| 5356 | | m_maincpu->space(AS_PROGRAM).install_write_handler(0x300000, 0x300003, write32_delegate(FUNC(namcos22_state::alpinesa_prot_w),this)); |
| 5357 | | install_141_speedup(machine()); |
| 5358 | | |
| 5359 | | m_keycus_id = 0x01a9; |
| 5556 | m_keycus_id = 0x0173; |
| 5360 | 5557 | } |
| 5361 | 5558 | |
| 5362 | | DRIVER_INIT_MEMBER(namcos22_state,airco22) |
| 5559 | DRIVER_INIT_MEMBER(namcos22_state,victlap) |
| 5363 | 5560 | { |
| 5364 | | namcos22_init(machine(), NAMCOS22_AIR_COMBAT22); |
| 5561 | namcos22_init(NAMCOS22_VICTORY_LAP); |
| 5562 | install_c74_speedup(); |
| 5365 | 5563 | |
| 5366 | | // S22-BIOS ver1.20 namco all rights reserved 94/12/21 |
| 5367 | | install_130_speedup(machine()); |
| 5564 | m_keycus_id = 0x0188; |
| 5368 | 5565 | } |
| 5369 | 5566 | |
| 5370 | | DRIVER_INIT_MEMBER(namcos22_state,propcycl) |
| 5567 | DRIVER_INIT_MEMBER(namcos22_state,raveracw) |
| 5371 | 5568 | { |
| 5372 | | UINT32 *pROM = (UINT32 *)memregion("maincpu")->base(); |
| 5373 | | |
| 5374 | | /* patch out strange routine (uninitialized-eprom related?) */ |
| 5375 | | pROM[0x1992C/4] = 0x4E754E75; |
| 5376 | | |
| 5377 | | /** |
| 5378 | | * The dipswitch reading routine in Prop Cycle polls the |
| 5379 | | * dipswitch value, but promptly overwrites with zero, discarding |
| 5380 | | * it. |
| 5381 | | * |
| 5382 | | * By patching out this behavior, we expose an additional "secret" test. |
| 5383 | | * |
| 5384 | | * DIP5: real time display of "INST_CUNT, MODE_NUM, MODE_CUNT" |
| 5385 | | */ |
| 5386 | | // pROM[0x22296/4] &= 0xffff0000; |
| 5387 | | // pROM[0x22296/4] |= 0x00004e75; |
| 5388 | | |
| 5389 | | namcos22_init(machine(), NAMCOS22_PROP_CYCLE); |
| 5390 | | m_mcu->space(AS_IO).install_write_handler(M37710_PORT5, M37710_PORT5, write8_delegate(FUNC(namcos22_state::propcycle_mcu_port5_w),this)); |
| 5391 | | install_141_speedup(machine()); |
| 5569 | namcos22_init(NAMCOS22_RAVE_RACER); |
| 5570 | install_c74_speedup(); |
| 5392 | 5571 | } |
| 5393 | 5572 | |
| 5394 | | DRIVER_INIT_MEMBER(namcos22_state,ridgeraj) |
| 5573 | DRIVER_INIT_MEMBER(namcos22_state,cybrcomm) |
| 5395 | 5574 | { |
| 5396 | | namcos22_init(machine(), NAMCOS22_RIDGE_RACER); |
| 5575 | namcos22_init(NAMCOS22_CYBER_COMMANDO); |
| 5576 | install_c74_speedup(); |
| 5397 | 5577 | |
| 5398 | | install_c74_speedup(machine()); |
| 5399 | | |
| 5400 | | m_keycus_id = 0x0172; |
| 5578 | m_keycus_id = 0x0185; |
| 5401 | 5579 | } |
| 5402 | 5580 | |
| 5403 | | DRIVER_INIT_MEMBER(namcos22_state,ridger2j) |
| 5581 | |
| 5582 | DRIVER_INIT_MEMBER(namcos22_state,alpiner) |
| 5404 | 5583 | { |
| 5405 | | namcos22_init(machine(), NAMCOS22_RIDGE_RACER2); |
| 5584 | namcos22_init(NAMCOS22_ALPINE_RACER); |
| 5585 | install_130_speedup(); |
| 5406 | 5586 | |
| 5407 | | install_c74_speedup(machine()); |
| 5587 | m_keycus_id = 0x0187; |
| 5408 | 5588 | |
| 5409 | | m_keycus_id = 0x0172; |
| 5589 | m_motor_status = 2; |
| 5410 | 5590 | } |
| 5411 | 5591 | |
| 5412 | | DRIVER_INIT_MEMBER(namcos22_state,acedrvr) |
| 5592 | DRIVER_INIT_MEMBER(namcos22_state,alpiner2) |
| 5413 | 5593 | { |
| 5414 | | namcos22_init(machine(), NAMCOS22_ACE_DRIVER); |
| 5594 | namcos22_init(NAMCOS22_ALPINE_RACER_2); |
| 5595 | install_130_speedup(); |
| 5415 | 5596 | |
| 5416 | | install_c74_speedup(machine()); |
| 5597 | m_keycus_id = 0x0187; |
| 5417 | 5598 | |
| 5418 | | m_keycus_id = 0x0173; |
| 5599 | m_motor_status = 2; |
| 5419 | 5600 | } |
| 5420 | 5601 | |
| 5421 | | DRIVER_INIT_MEMBER(namcos22_state,victlap) |
| 5602 | DRIVER_INIT_MEMBER(namcos22_state,alpinesa) |
| 5422 | 5603 | { |
| 5423 | | namcos22_init(machine(), NAMCOS22_VICTORY_LAP); |
| 5604 | namcos22_init(NAMCOS22_ALPINE_SURFER); |
| 5605 | install_141_speedup(); |
| 5424 | 5606 | |
| 5425 | | install_c74_speedup(machine()); |
| 5607 | m_keycus_id = 0x01a9; |
| 5426 | 5608 | |
| 5427 | | m_keycus_id = 0x0188; |
| 5609 | m_motor_status = 2; |
| 5428 | 5610 | } |
| 5429 | 5611 | |
| 5430 | | DRIVER_INIT_MEMBER(namcos22_state,raveracw) |
| 5612 | DRIVER_INIT_MEMBER(namcos22_state,airco22) |
| 5431 | 5613 | { |
| 5432 | | namcos22_init(machine(), NAMCOS22_RAVE_RACER); |
| 5433 | | |
| 5434 | | install_c74_speedup(machine()); |
| 5614 | namcos22_init(NAMCOS22_AIR_COMBAT22); |
| 5615 | install_130_speedup(); // S22-BIOS ver1.20 namco all rights reserved 94/12/21 |
| 5435 | 5616 | } |
| 5436 | 5617 | |
| 5437 | | DRIVER_INIT_MEMBER(namcos22_state,cybrcomm) |
| 5618 | DRIVER_INIT_MEMBER(namcos22_state,propcycl) |
| 5438 | 5619 | { |
| 5439 | | namcos22_init(machine(), NAMCOS22_CYBER_COMMANDO); |
| 5620 | UINT32 *ROM = (UINT32 *)memregion("maincpu")->base(); |
| 5440 | 5621 | |
| 5441 | | install_c74_speedup(machine()); |
| 5622 | /* patch out strange routine (uninitialized-eprom related?) */ |
| 5623 | ROM[0x1992C/4] = 0x4E754E75; |
| 5442 | 5624 | |
| 5443 | | m_keycus_id = 0x0185; |
| 5625 | /** |
| 5626 | * The dipswitch reading routine in Prop Cycle polls the |
| 5627 | * dipswitch value, but promptly overwrites with zero, discarding |
| 5628 | * it. |
| 5629 | * |
| 5630 | * By patching out this behavior, we expose an additional "secret" test. |
| 5631 | * |
| 5632 | * DIP5: real time display of "INST_CUNT, MODE_NUM, MODE_CUNT" |
| 5633 | */ |
| 5634 | // ROM[0x22296/4] &= 0xffff0000; |
| 5635 | // ROM[0x22296/4] |= 0x00004e75; |
| 5636 | |
| 5637 | namcos22_init(NAMCOS22_PROP_CYCLE); |
| 5638 | install_141_speedup(); |
| 5444 | 5639 | } |
| 5445 | 5640 | |
| 5446 | 5641 | DRIVER_INIT_MEMBER(namcos22_state,cybrcyc) |
| 5447 | 5642 | { |
| 5448 | | namcos22_init(machine(), NAMCOS22_CYBER_CYCLES); |
| 5643 | namcos22_init(NAMCOS22_CYBER_CYCLES); |
| 5644 | install_130_speedup(); |
| 5449 | 5645 | |
| 5450 | | install_130_speedup(machine()); |
| 5451 | | |
| 5452 | 5646 | m_keycus_id = 0x0387; |
| 5453 | 5647 | } |
| 5454 | 5648 | |
| 5455 | 5649 | DRIVER_INIT_MEMBER(namcos22_state,timecris) |
| 5456 | 5650 | { |
| 5457 | | namcos22_init(machine(), NAMCOS22_TIME_CRISIS); |
| 5458 | | |
| 5459 | | install_130_speedup(machine()); |
| 5651 | namcos22_init(NAMCOS22_TIME_CRISIS); |
| 5652 | install_130_speedup(); |
| 5460 | 5653 | } |
| 5461 | 5654 | |
| 5462 | 5655 | DRIVER_INIT_MEMBER(namcos22_state,tokyowar) |
| 5463 | 5656 | { |
| 5464 | | namcos22_init(machine(), NAMCOS22_TOKYO_WARS); |
| 5657 | namcos22_init(NAMCOS22_TOKYO_WARS); |
| 5658 | install_141_speedup(); |
| 5465 | 5659 | |
| 5466 | | install_141_speedup(machine()); |
| 5467 | | |
| 5468 | 5660 | m_keycus_id = 0x01a8; |
| 5469 | 5661 | } |
| 5470 | 5662 | |
| 5471 | 5663 | DRIVER_INIT_MEMBER(namcos22_state,aquajet) |
| 5472 | 5664 | { |
| 5473 | | namcos22_init(machine(), NAMCOS22_AQUA_JET); |
| 5474 | | install_141_speedup(machine()); |
| 5665 | namcos22_init(NAMCOS22_AQUA_JET); |
| 5666 | install_141_speedup(); |
| 5475 | 5667 | } |
| 5476 | 5668 | |
| 5477 | 5669 | DRIVER_INIT_MEMBER(namcos22_state,adillor) |
| 5478 | 5670 | { |
| 5479 | | namcos22_init(machine(), NAMCOS22_ARMADILLO_RACING); |
| 5480 | | install_141_speedup(machine()); |
| 5671 | namcos22_init(NAMCOS22_ARMADILLO_RACING); |
| 5672 | install_141_speedup(); |
| 5481 | 5673 | |
| 5482 | 5674 | m_keycus_id = 0x59b7; |
| 5483 | 5675 | } |
| 5484 | 5676 | |
| 5485 | 5677 | DRIVER_INIT_MEMBER(namcos22_state,dirtdash) |
| 5486 | 5678 | { |
| 5487 | | namcos22_init(machine(), NAMCOS22_DIRT_DASH); |
| 5679 | namcos22_init(NAMCOS22_DIRT_DASH); |
| 5680 | install_141_speedup(); |
| 5488 | 5681 | |
| 5489 | | install_141_speedup(machine()); |
| 5490 | | |
| 5491 | 5682 | m_keycus_id = 0x01a2; |
| 5492 | 5683 | } |
| 5493 | 5684 | |
| 5494 | | /************************************************************************************/ |
| 5495 | 5685 | |
| 5686 | |
| 5687 | /*********************************************************************************************/ |
| 5688 | |
| 5496 | 5689 | /* YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MNTR, COMPANY, FULLNAME, FLAGS */ |
| 5497 | 5690 | /* System22 games */ |
| 5498 | | GAME( 1993, ridgerac, 0, namcos22, ridgera, namcos22_state, ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR3, World)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 1994-01-17 |
| 5499 | | GAME( 1993, ridgerac3, ridgerac, namcos22, ridgera, namcos22_state, ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR2 Ver.B, World, 3-screen?)", GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 1993-10-28, no indication that this really is a 3-screen version. |
| 5500 | | GAME( 1993, ridgeracb, ridgerac, namcos22, ridgera, namcos22_state, ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR2, World)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 1993-10-07 |
| 5501 | | GAME( 1993, ridgeracj, ridgerac, namcos22, ridgera, namcos22_state, ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR1, Japan)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 1993-10-07 |
| 5502 | | GAME( 1993, ridgeracf, ridgerac, namcos22, ridgeracf, namcos22_state, ridgeraj, ROT0, "Namco", "Ridge Racer Full Scale (World)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // 1993-12-13, very different version, incomplete dump. |
| 5503 | | GAME( 1994, ridgera2, 0, namcos22, ridgera2, namcos22_state, ridger2j, ROT0, "Namco", "Ridge Racer 2 (Rev. RRS2, World)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 1994-06-21 |
| 5504 | | GAME( 1994, ridgera2j, ridgera2, namcos22, ridgera2, namcos22_state, ridger2j, ROT0, "Namco", "Ridge Racer 2 (Rev. RRS1 Ver.B, Japan)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 1994-06-21 |
| 5505 | | GAME( 1994, ridgera2ja,ridgera2, namcos22, ridgera2, namcos22_state, ridger2j, ROT0, "Namco", "Ridge Racer 2 (Rev. RRS1, Japan)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 1994-06-13 |
| 5506 | | GAME( 1994, cybrcomm, 0, namcos22, cybrcomm, namcos22_state, cybrcomm, ROT0, "Namco", "Cyber Commando (Rev. CY1, Japan)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 10/14/94 |
| 5507 | | GAME( 1995, raveracw, 0, namcos22, raveracw, namcos22_state, raveracw, ROT0, "Namco", "Rave Racer (Rev. RV2, World)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 07/16/95 |
| 5508 | | GAME( 1995, raveracj, raveracw, namcos22, raveracw, namcos22_state, raveracw, ROT0, "Namco", "Rave Racer (Rev. RV1 Ver.B, Japan)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 07/16/95 |
| 5509 | | GAME( 1995, raveracja, raveracw, namcos22, raveracw, namcos22_state, raveracw, ROT0, "Namco", "Rave Racer (Rev. RV1, Japan)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 06/29/95 |
| 5510 | | GAME( 1994, acedrvrw, 0, namcos22, acedrvr, namcos22_state, acedrvr, ROT0, "Namco", "Ace Driver: Racing Evolution (Rev. AD2)", GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 94/10/20 16:22:25 |
| 5511 | | GAME( 1996, victlapw, 0, namcos22, victlap, namcos22_state, victlap, ROT0, "Namco", "Ace Driver: Victory Lap (Rev. ADV2)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 96/02/13 17:50:06 |
| 5691 | GAME( 1993, ridgerac, 0, namcos22, ridgera, namcos22_state, ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR3, World)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 1994-01-17 |
| 5692 | GAME( 1993, ridgerac3, ridgerac, namcos22, ridgera, namcos22_state, ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR2 Ver.B, World, 3-screen?)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 1993-10-28, no indication that this really is a 3-screen version. |
| 5693 | GAME( 1993, ridgeracb, ridgerac, namcos22, ridgera, namcos22_state, ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR2, World)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 1993-10-07 |
| 5694 | GAME( 1993, ridgeracj, ridgerac, namcos22, ridgera, namcos22_state, ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR1, Japan)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 1993-10-07 |
| 5695 | GAME( 1993, ridgeracf, ridgerac, namcos22, ridgeracf, namcos22_state, ridgeraj, ROT0, "Namco", "Ridge Racer Full Scale (World)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) // 1993-12-13, very different version, incomplete dump. |
| 5696 | GAME( 1994, ridgera2, 0, namcos22, ridgera2, namcos22_state, ridger2j, ROT0, "Namco", "Ridge Racer 2 (Rev. RRS2, World)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 1994-06-21 |
| 5697 | GAME( 1994, ridgera2j, ridgera2, namcos22, ridgera2, namcos22_state, ridger2j, ROT0, "Namco", "Ridge Racer 2 (Rev. RRS1 Ver.B, Japan)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 1994-06-21 |
| 5698 | GAME( 1994, ridgera2ja,ridgera2, namcos22, ridgera2, namcos22_state, ridger2j, ROT0, "Namco", "Ridge Racer 2 (Rev. RRS1, Japan)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 1994-06-13 |
| 5699 | GAME( 1994, cybrcomm, 0, namcos22, cybrcomm, namcos22_state, cybrcomm, ROT0, "Namco", "Cyber Commando (Rev. CY1, Japan)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 10/14/94 |
| 5700 | GAME( 1995, raveracw, 0, namcos22, raveracw, namcos22_state, raveracw, ROT0, "Namco", "Rave Racer (Rev. RV2, World)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 07/16/95 |
| 5701 | GAME( 1995, raveracj, raveracw, namcos22, raveracw, namcos22_state, raveracw, ROT0, "Namco", "Rave Racer (Rev. RV1 Ver.B, Japan)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 07/16/95 |
| 5702 | GAME( 1995, raveracja, raveracw, namcos22, raveracw, namcos22_state, raveracw, ROT0, "Namco", "Rave Racer (Rev. RV1, Japan)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 06/29/95 |
| 5703 | GAME( 1994, acedrvrw, 0, namcos22, acedrvr, namcos22_state, acedrvr, ROT0, "Namco", "Ace Driver: Racing Evolution (Rev. AD2)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 94/10/20 16:22:25 |
| 5704 | GAME( 1996, victlapw, 0, namcos22, victlap, namcos22_state, victlap, ROT0, "Namco", "Ace Driver: Victory Lap (Rev. ADV2)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 96/02/13 17:50:06 |
| 5512 | 5705 | |
| 5513 | 5706 | /* Super System22 games */ |
| 5514 | | GAME( 1994, alpinerd, 0, namcos22s, alpiner, namcos22_state, alpiner, ROT0, "Namco", "Alpine Racer (Rev. AR2 Ver.D)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) |
| 5515 | | GAME( 1994, alpinerc, alpinerd, namcos22s, alpiner, namcos22_state, alpiner, ROT0, "Namco", "Alpine Racer (Rev. AR2 Ver.C)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) |
| 5516 | | GAME( 1995, airco22b, 0, namcos22s, airco22, namcos22_state, airco22, ROT0, "Namco", "Air Combat 22 (Rev. ACS1 Ver.B, Japan)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // various problems |
| 5517 | | GAME( 1995, cybrcycc, 0, namcos22s, cybrcycc, namcos22_state, cybrcyc, ROT0, "Namco", "Cyber Cycles (Rev. CB2 Ver.C)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 95/04/04 |
| 5518 | | GAME( 1995, dirtdash, 0, namcos22s, dirtdash, namcos22_state, dirtdash, ROT0, "Namco", "Dirt Dash (Rev. DT2)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 95/12/20 20:01:56 |
| 5519 | | GAME( 1995, timecris, 0, timecris, timecris, namcos22_state, timecris, ROT0, "Namco", "Time Crisis (Rev. TS2 Ver.B)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 96/04/02 18:48:00 |
| 5520 | | GAME( 1995, timecrisa,timecris, timecris, timecris, namcos22_state, timecris, ROT0, "Namco", "Time Crisis (Rev. TS2 Ver.A)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 96/01/08 18:56:09 |
| 5521 | | GAME( 1996, propcycl, 0, propcycl, propcycl, namcos22_state, propcycl, ROT0, "Namco", "Prop Cycle (Rev. PR2 Ver.A)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 96/06/18 21:22:13 |
| 5522 | | GAME( 1996, alpinesa, 0, namcos22s, alpiner, namcos22_state, alpinesa, ROT0, "Namco", "Alpine Surfer (Rev. AF2 Ver.A)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // 96/07/01 15:19:23. major gfx problems, slave dsp? |
| 5523 | | GAME( 1996, tokyowar, 0, namcos22s, tokyowar, namcos22_state, tokyowar, ROT0, "Namco", "Tokyo Wars (Rev. TW2 Ver.A)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // 96/09/03 14:08:47. near-invincible tanks, maybe related to timecris helicopter bug? |
| 5524 | | GAME( 1996, aquajet, 0, namcos22s, aquajet, namcos22_state, aquajet, ROT0, "Namco", "Aqua Jet (Rev. AJ2 Ver.B)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 96/09/20 14:28:30 |
| 5525 | | GAME( 1996, alpinr2b, 0, namcos22s, alpiner, namcos22_state, alpiner2, ROT0, "Namco", "Alpine Racer 2 (Rev. ARS2 Ver.B)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 97/01/10 17:10:59 |
| 5526 | | GAME( 1996, alpinr2a, alpinr2b, namcos22s, alpiner, namcos22_state, alpiner2, ROT0, "Namco", "Alpine Racer 2 (Rev. ARS2 Ver.A)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 96/12/06 13:45:05 |
| 5527 | | GAME( 1996, adillor, 0, adillor, adillor, namcos22_state, adillor, ROT0, "Namco", "Armadillo Racing (Rev. AM1 Ver.A)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 97/04/07 19:19:41 |
| 5707 | GAME( 1994, alpinerd, 0, alpine, alpiner, namcos22_state, alpiner, ROT0, "Namco", "Alpine Racer (Rev. AR2 Ver.D)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 5708 | GAME( 1994, alpinerc, alpinerd, alpine, alpiner, namcos22_state, alpiner, ROT0, "Namco", "Alpine Racer (Rev. AR2 Ver.C)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 5709 | GAME( 1995, airco22b, 0, namcos22s, airco22, namcos22_state, airco22, ROT0, "Namco", "Air Combat 22 (Rev. ACS1 Ver.B, Japan)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) // various problems |
| 5710 | GAME( 1995, cybrcycc, 0, namcos22s, cybrcycc, namcos22_state, cybrcyc, ROT0, "Namco", "Cyber Cycles (Rev. CB2 Ver.C)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 95/04/04 |
| 5711 | GAME( 1995, dirtdash, 0, namcos22s, dirtdash, namcos22_state, dirtdash, ROT0, "Namco", "Dirt Dash (Rev. DT2)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 95/12/20 20:01:56 |
| 5712 | GAME( 1995, timecris, 0, timecris, timecris, namcos22_state, timecris, ROT0, "Namco", "Time Crisis (Rev. TS2 Ver.B)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 96/04/02 18:48:00 |
| 5713 | GAME( 1995, timecrisa,timecris, timecris, timecris, namcos22_state, timecris, ROT0, "Namco", "Time Crisis (Rev. TS2 Ver.A)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 96/01/08 18:56:09 |
| 5714 | GAME( 1996, propcycl, 0, propcycl, propcycl, namcos22_state, propcycl, ROT0, "Namco", "Prop Cycle (Rev. PR2 Ver.A)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 96/06/18 21:22:13 |
| 5715 | GAME( 1996, alpinesa, 0, alpinesa, alpiner, namcos22_state, alpinesa, ROT0, "Namco", "Alpine Surfer (Rev. AF2 Ver.A)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) // 96/07/01 15:19:23. major gfx problems, slave dsp? |
| 5716 | GAME( 1996, tokyowar, 0, namcos22s, tokyowar, namcos22_state, tokyowar, ROT0, "Namco", "Tokyo Wars (Rev. TW2 Ver.A)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) // 96/09/03 14:08:47. near-invincible tanks, maybe related to timecris helicopter bug? |
| 5717 | GAME( 1996, aquajet, 0, namcos22s, aquajet, namcos22_state, aquajet, ROT0, "Namco", "Aqua Jet (Rev. AJ2 Ver.B)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 96/09/20 14:28:30 |
| 5718 | GAME( 1996, alpinr2b, 0, alpine, alpiner, namcos22_state, alpiner2, ROT0, "Namco", "Alpine Racer 2 (Rev. ARS2 Ver.B)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 97/01/10 17:10:59 |
| 5719 | GAME( 1996, alpinr2a, alpinr2b, alpine, alpiner, namcos22_state, alpiner2, ROT0, "Namco", "Alpine Racer 2 (Rev. ARS2 Ver.A)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 96/12/06 13:45:05 |
| 5720 | GAME( 1996, adillor, 0, adillor, adillor, namcos22_state, adillor, ROT0, "Namco", "Armadillo Racing (Rev. AM1 Ver.A)" , GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // 97/04/07 19:19:41 |
trunk/src/mame/video/namcos22.c
| r24771 | r24772 | |
| 1 | 1 | /** |
| 2 | 2 | * video hardware for Namco System22 |
| 3 | 3 | * |
| 4 | | * todo (ordered by importance): |
| 4 | * TODO: |
| 5 | 5 | * |
| 6 | 6 | * - emulate slave dsp! |
| 7 | | * - texture u/v mapping is often 1 pixel off, resulting in many glitch lines/gaps between textures |
| 7 | * - texture u/v mapping is often 1 pixel off, resulting in many glitch lines/gaps between textures. The glitch may be in MAME core: |
| 8 | * it used to be much worse with the old poly.h |
| 8 | 9 | * - tokyowar tanks are not shootable, same for timecris helicopter, there's still a very small hitbox but almost impossible to hit |
| 9 | 10 | * (is this related to dsp? or cpu?) |
| 10 | 11 | * - find out how/where vics num_sprites is determined exactly, currently a workaround is needed for airco22b and dirtdash |
| r24771 | r24772 | |
| 15 | 16 | * - improve ss22 spot: |
| 16 | 17 | * + dirtdash spotlight is opaque for a short time when exiting the jungle level |
| 17 | 18 | * + dirtdash speedometer has wrong colors when in the jungle level |
| 18 | | * + dirtdash record time message creates a 'gap' in the spotlight when entering the jungle level (possibly just a game bug) |
| 19 | * + dirtdash record time message creates a 'gap' in the spotlight when entering the jungle level (possibly just a game bug?) |
| 20 | * - add layer enable in system 22, see bugs in cybrcomm and victlapw |
| 19 | 21 | * - window clipping is wrong in acedrvrw, victlapw |
| 20 | 22 | * - ridgerac waving flag title screen is missing, just an empty beach scenery instead |
| 21 | 23 | * - global offset is wrong in non-super22 servicemode video test, and above that, it flickers in acedrvrw, victlapw |
| 22 | | * - dirtdash polys are broken at the start section of the mountain level |
| 23 | | * - alpinr2b skiier selection screen should have mirrored models (easiest to see with cursor on the red pants guy) |
| 24 | * - dirtdash polys are broken at the start section of the mountain level, maybe bad rom? |
| 25 | * - alpinr2b skiier selection screen should have mirrored models (easiest to see with cursor on the red pants guy). specular reflection? |
| 24 | 26 | * - propcycl scoreboard sprite part should fade out in attract mode and just before game over, fader or fog related? |
| 25 | 27 | * - ridgerac fogging isn't applied to the upper/side part of the sky (best seen when driving down a hill), it's fine in ridgera2 |
| 26 | 28 | * czram contents is rather odd here and partly cleared (probably the cause?): |
| r24771 | r24772 | |
| 37 | 39 | |
| 38 | 40 | #include "emu.h" |
| 39 | 41 | #include "video/rgbutil.h" |
| 42 | #include "video/polynew.h" |
| 40 | 43 | #include "includes/namcos22.h" |
| 41 | | #include "video/poly.h" |
| 42 | 44 | |
| 43 | | /* for debug: allow memdump to file with D key */ |
| 44 | | #define ALLOW_MEMDUMP 0 |
| 45 | 45 | |
| 46 | | #if ALLOW_MEMDUMP |
| 47 | | static void Dump( address_space &space, FILE *f, unsigned addr1, unsigned addr2, const char *name ) |
| 48 | | { |
| 49 | | unsigned addr; |
| 50 | | fprintf( f, "%s:\n", name ); |
| 51 | | for( addr=addr1; addr<=addr2; addr+=16 ) |
| 52 | | { |
| 53 | | UINT8 data[16]; |
| 54 | | int bHasNonZero = 0; |
| 55 | | int i; |
| 56 | | for( i=0; i<16; i++ ) |
| 57 | | { |
| 58 | | data[i] = space.read_byte(addr+i ); |
| 59 | | if( data[i] ) |
| 60 | | { |
| 61 | | bHasNonZero = 1; |
| 62 | | } |
| 63 | | } |
| 64 | | if( bHasNonZero ) |
| 65 | | { |
| 66 | | fprintf( f,"%08x:", addr ); |
| 67 | | for( i=0; i<16; i++ ) |
| 68 | | { |
| 69 | | if( (i&0x03)==0 ) |
| 70 | | { |
| 71 | | fprintf( f, " " ); |
| 72 | | } |
| 73 | | fprintf( f, "%02x", data[i] ); |
| 74 | | } |
| 75 | | fprintf( f, "\n" ); |
| 76 | | } |
| 77 | | } |
| 78 | | fprintf( f, "\n" ); |
| 79 | | } |
| 80 | | #endif |
| 46 | // polynew constructor |
| 47 | namcos22_renderer::namcos22_renderer(namcos22_state &state) |
| 48 | : poly_manager<float, namcos22_object_data, 4, 8000>(state.machine()), |
| 49 | m_state(state) |
| 50 | { } |
| 81 | 51 | |
| 82 | | |
| 83 | | static UINT8 nthbyte( const UINT32 *pSource, int offs ) |
| 52 | void namcos22_renderer::reset() |
| 84 | 53 | { |
| 85 | | pSource += offs/4; |
| 86 | | return (pSource[0]<<((offs&3)*8))>>24; |
| 87 | | } |
| 54 | memset(&m_scenenode_root, 0, sizeof(m_scenenode_root)); |
| 55 | m_scenenode_cur = NULL; |
| 88 | 56 | |
| 89 | | static UINT16 nthword( const UINT32 *pSource, int offs ) |
| 90 | | { |
| 91 | | pSource += offs/2; |
| 92 | | return (pSource[0]<<((offs&1)*16))>>16; |
| 57 | m_clipx = 320; |
| 58 | m_clipy = 240; |
| 59 | m_cliprect.set(0, 639, 0, 479); |
| 93 | 60 | } |
| 94 | 61 | |
| 95 | | INLINE UINT8 Clamp256( int v ) |
| 96 | | { |
| 97 | | if( v<0 ) |
| 98 | | { |
| 99 | | v = 0; |
| 100 | | } |
| 101 | | else if( v>255 ) |
| 102 | | { |
| 103 | | v = 255; |
| 104 | | } |
| 105 | | return v; |
| 106 | | } |
| 107 | 62 | |
| 108 | 63 | |
| 109 | | static struct |
| 110 | | { |
| 111 | | int flags; |
| 112 | | int rFogColor; |
| 113 | | int gFogColor; |
| 114 | | int bFogColor; |
| 115 | | UINT32 fog_colormask; |
| 116 | | int rFogColor_per_cztype[4]; |
| 117 | | int gFogColor_per_cztype[4]; |
| 118 | | int bFogColor_per_cztype[4]; |
| 119 | | int rPolyFadeColor; |
| 120 | | int gPolyFadeColor; |
| 121 | | int bPolyFadeColor; |
| 122 | | int PolyFade_enabled; |
| 123 | | int rFadeColor; |
| 124 | | int gFadeColor; |
| 125 | | int bFadeColor; |
| 126 | | int fadeFactor; |
| 127 | | int spot_limit; |
| 128 | | int poly_translucency; |
| 129 | | int palBase; |
| 130 | | } mixer; |
| 64 | /*********************************************************************************************/ |
| 131 | 65 | |
| 132 | | static void UpdateVideoMixer( running_machine &machine ) |
| 66 | // polynew scanline callbacks |
| 67 | void namcos22_renderer::renderscanline_uvi_full(INT32 scanline, const extent_t &extent, const namcos22_object_data &extra, int threadid) |
| 133 | 68 | { |
| 134 | | int i; |
| 135 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 136 | | poly_wait(state->m_poly, "UpdateVideoMixer"); |
| 137 | | memset( &mixer, 0, sizeof(mixer) ); |
| 138 | | #if 0 // show reg contents |
| 139 | | char msg1[0x1000]={0}, msg2[0x1000]={0}; |
| 140 | | int st=0x000/16; |
| 141 | | for (i=st;i<(st+3);i++) |
| 142 | | { |
| 143 | | sprintf(msg2,"%04X %08X %08X %08X %08X\n",i*16,state->m_gamma[i*4+0],state->m_gamma[i*4+1],state->m_gamma[i*4+2],state->m_gamma[i*4+3]); |
| 144 | | strcat(msg1,msg2); |
| 145 | | } |
| 146 | | if (1) // + other non-super regs |
| 147 | | if (!state->m_bSuperSystem22) |
| 148 | | { |
| 149 | | strcat(msg1,"\n"); |
| 150 | | for (i=8;i<=0x20;i+=8) |
| 151 | | { |
| 152 | | sprintf(msg2,"%04X %08X %08X %08X %08X\n",i*16,state->m_gamma[i*4+0],state->m_gamma[i*4+1],state->m_gamma[i*4+2],state->m_gamma[i*4+3]); |
| 153 | | strcat(msg1,msg2); |
| 154 | | } |
| 155 | | } |
| 156 | | popmessage("%s",msg1); |
| 157 | | #endif |
| 158 | | |
| 159 | | if( state->m_bSuperSystem22 ) |
| 160 | | { |
| 161 | | /* |
| 162 | | 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 14 18 1c |
| 163 | | 00824000: ffffff00 00000000 0000007f 00ff0000 1000ff00 0f000000 00ff007f 00010007 // time crisis |
| 164 | | 00824000: ffffff00 00000000 1830407f 00800000 0000007f 0f000000 0000037f 00010007 // trans sprite |
| 165 | | 00824000: ffffff00 00000000 3040307f 00000000 0080007f 0f000000 0000037f 00010007 // trans poly |
| 166 | | 00824000: ffffff00 00000000 1800187f 00800000 0080007f 0f000000 0000037f 00010007 // trans poly(2) |
| 167 | | 00824000: ffffff00 00000000 1800187f 00000000 0000007f 0f800000 0000037f 00010007 // trans text |
| 168 | | |
| 169 | | 00,01,02 polygon fade rgb |
| 170 | | 03 |
| 171 | | 04 |
| 172 | | 05,06,07 world fog rgb |
| 173 | | 08,09,0a background color |
| 174 | | 0b |
| 175 | | 0c |
| 176 | | 0d spot factor limit value |
| 177 | | 0e enable spot factor limit |
| 178 | | 0f |
| 179 | | 10 |
| 180 | | 11 global polygon alpha factor |
| 181 | | 12,13 textlayer alpha pen comparison |
| 182 | | 14 textlayer alpha pen mask? |
| 183 | | 15 textlayer alpha factor |
| 184 | | 16,17,18 global fade rgb |
| 185 | | 19 global fade factor |
| 186 | | 1a fade target flags |
| 187 | | 1b textlayer palette base |
| 188 | | 1c |
| 189 | | 1d |
| 190 | | 1e |
| 191 | | 1f layer enable |
| 192 | | */ |
| 193 | | mixer.rPolyFadeColor = nthbyte( state->m_gamma, 0x00 ); |
| 194 | | mixer.gPolyFadeColor = nthbyte( state->m_gamma, 0x01 ); |
| 195 | | mixer.bPolyFadeColor = nthbyte( state->m_gamma, 0x02 ); mixer.PolyFade_enabled = (mixer.rPolyFadeColor == 0xff && mixer.gPolyFadeColor == 0xff && mixer.bPolyFadeColor == 0xff) ? 0 : 1; |
| 196 | | mixer.rFogColor = nthbyte( state->m_gamma, 0x05 ); |
| 197 | | mixer.gFogColor = nthbyte( state->m_gamma, 0x06 ); |
| 198 | | mixer.bFogColor = nthbyte( state->m_gamma, 0x07 ); |
| 199 | | mixer.spot_limit = nthbyte( state->m_gamma, 0x0d ); |
| 200 | | mixer.poly_translucency = nthbyte( state->m_gamma, 0x11 ); |
| 201 | | mixer.rFadeColor = nthbyte( state->m_gamma, 0x16 ); |
| 202 | | mixer.gFadeColor = nthbyte( state->m_gamma, 0x17 ); |
| 203 | | mixer.bFadeColor = nthbyte( state->m_gamma, 0x18 ); |
| 204 | | mixer.fadeFactor = nthbyte( state->m_gamma, 0x19 ); |
| 205 | | mixer.flags = nthbyte( state->m_gamma, 0x1a ); |
| 206 | | mixer.palBase = nthbyte( state->m_gamma, 0x1b ) & 0x7f; |
| 207 | | |
| 208 | | // put spot-specific flags into high word |
| 209 | | mixer.flags |= state->m_spot_enable << 16; |
| 210 | | mixer.flags |= (nthbyte(state->m_gamma, 0x0e) & 1) << 17; |
| 211 | | mixer.flags |= (state->m_chipselect & 0xc000) << 4; |
| 212 | | } |
| 213 | | else |
| 214 | | { |
| 215 | | /* |
| 216 | | 90020000: 4f030000 7f00007f 4d4d4d42 0c00c0c0 |
| 217 | | 90020010: c0010001 00010000 00000000 00000000 |
| 218 | | 90020080: 00010101 01010102 00000000 00000000 |
| 219 | | 900200c0: 00000000 00000000 00000000 03000000 |
| 220 | | 90020100: fff35000 00000000 00000000 00000000 |
| 221 | | 90020180: ff713700 00000000 00000000 00000000 |
| 222 | | 90020200: ff100000 00000000 00000000 00000000 |
| 223 | | |
| 224 | | 00,01 display flags |
| 225 | | 02 |
| 226 | | 03 |
| 227 | | 04 |
| 228 | | 05 |
| 229 | | 06 |
| 230 | | 07 textlayer palette base? |
| 231 | | 08,09,0a textlayer pen c shadow rgb |
| 232 | | 0b,0c,0d textlayer pen d shadow rgb |
| 233 | | 0e,0f,10 textlayer pen e shadow rgb |
| 234 | | 11,12 global fade factor red |
| 235 | | 13,14 global fade factor green |
| 236 | | 15,16 global fade factor blue |
| 237 | | 80-87 fog color mask? |
| 238 | | 100,180,200 fog rgb 0 |
| 239 | | 101,181,201 fog rgb 1 |
| 240 | | 102,182,202 fog rgb 2 |
| 241 | | 103,183,203 fog rgb 3 |
| 242 | | */ |
| 243 | | mixer.flags = nthbyte( state->m_gamma, 0x00 )*256 + nthbyte( state->m_gamma, 0x01 ); |
| 244 | | mixer.rPolyFadeColor = nthbyte( state->m_gamma, 0x11 )*256 + nthbyte( state->m_gamma, 0x12 ); // 0x0100 = 1.0 |
| 245 | | mixer.gPolyFadeColor = nthbyte( state->m_gamma, 0x13 )*256 + nthbyte( state->m_gamma, 0x14 ); |
| 246 | | mixer.bPolyFadeColor = nthbyte( state->m_gamma, 0x15 )*256 + nthbyte( state->m_gamma, 0x16 ); |
| 247 | | mixer.PolyFade_enabled = (mixer.rPolyFadeColor == 0x100 && mixer.gPolyFadeColor == 0x100 && mixer.bPolyFadeColor == 0x100) ? 0 : 1; |
| 248 | | |
| 249 | | // raveracw is the only game using multiple fog colors (city smog, cars under tunnels, brake disc in attract mode) |
| 250 | | mixer.fog_colormask = state->m_gamma[0x84/4]; |
| 251 | | |
| 252 | | // fog color per cz type |
| 253 | | for (i=0; i<4; i++) |
| 254 | | { |
| 255 | | mixer.rFogColor_per_cztype[i] = nthbyte( state->m_gamma, 0x0100+i ); |
| 256 | | mixer.gFogColor_per_cztype[i] = nthbyte( state->m_gamma, 0x0180+i ); |
| 257 | | mixer.bFogColor_per_cztype[i] = nthbyte( state->m_gamma, 0x0200+i ); |
| 258 | | } |
| 259 | | |
| 260 | | mixer.palBase = 0x7f; |
| 261 | | } |
| 262 | | } |
| 263 | | |
| 264 | | READ32_MEMBER(namcos22_state::namcos22_gamma_r) |
| 265 | | { |
| 266 | | return m_gamma[offset]; |
| 267 | | } |
| 268 | | |
| 269 | | WRITE32_MEMBER(namcos22_state::namcos22_gamma_w) |
| 270 | | { |
| 271 | | COMBINE_DATA( &m_gamma[offset] ); |
| 272 | | } |
| 273 | | |
| 274 | | static struct |
| 275 | | { |
| 276 | | int cx,cy; |
| 277 | | rectangle scissor; |
| 278 | | } mClip; |
| 279 | | |
| 280 | | static void poly3d_Clip( float vx, float vy, float vw, float vh ) |
| 281 | | { |
| 282 | | int cx = 320+vx; |
| 283 | | int cy = 240+vy; |
| 284 | | mClip.cx = cx; |
| 285 | | mClip.cy = cy; |
| 286 | | mClip.scissor.set(cx + vw, cx - vw, cy + vh, cy - vh); |
| 287 | | if( mClip.scissor.min_x<0 ) mClip.scissor.min_x = 0; |
| 288 | | if( mClip.scissor.max_x>639 ) mClip.scissor.max_x = 639; |
| 289 | | if( mClip.scissor.min_y<0 ) mClip.scissor.min_y = 0; |
| 290 | | if( mClip.scissor.max_y>479 ) mClip.scissor.max_y = 479; |
| 291 | | } |
| 292 | | |
| 293 | | static void sprite_Clip( int min_x, int max_x, int min_y, int max_y ) |
| 294 | | { |
| 295 | | // cx/cy not used |
| 296 | | mClip.scissor.set(min_x, max_x, min_y, max_y); |
| 297 | | if( mClip.scissor.min_x<0 ) mClip.scissor.min_x = 0; |
| 298 | | if( mClip.scissor.max_x>639 ) mClip.scissor.max_x = 639; |
| 299 | | if( mClip.scissor.min_y<0 ) mClip.scissor.min_y = 0; |
| 300 | | if( mClip.scissor.max_y>479 ) mClip.scissor.max_y = 479; |
| 301 | | } |
| 302 | | |
| 303 | | static void poly3d_NoClip( void ) |
| 304 | | { |
| 305 | | mClip.cx = 320; |
| 306 | | mClip.cy = 240; |
| 307 | | mClip.scissor.set(0, 639, 0, 479); |
| 308 | | } |
| 309 | | |
| 310 | | struct Poly3dVertex |
| 311 | | { |
| 312 | | float x,y,z; |
| 313 | | int u,v; /* 0..0xfff */ |
| 314 | | int bri; /* 0..0xff */ |
| 315 | | }; |
| 316 | | |
| 317 | | #define MIN_Z (10.0f) |
| 318 | | |
| 319 | | |
| 320 | | INLINE unsigned texel( namcos22_state *state, unsigned x, unsigned y ) |
| 321 | | { |
| 322 | | unsigned offs = ((y&0xfff0)<<4)|((x&0xff0)>>4); |
| 323 | | unsigned tile = state->m_pTextureTileMap16[offs]; |
| 324 | | return state->m_pTextureTileData[(tile<<8)|state->m_XYAttrToPixel[state->m_pTextureTileMapAttr[offs]][x&0xf][y&0xf]]; |
| 325 | | } |
| 326 | | |
| 327 | | |
| 328 | | |
| 329 | | struct poly_extra_data |
| 330 | | { |
| 331 | | /* poly / sprites */ |
| 332 | | running_machine *machine; |
| 333 | | rgbint fogColor; |
| 334 | | rgbint fadeColor; |
| 335 | | rgbint polyColor; |
| 336 | | const pen_t *pens; |
| 337 | | bitmap_ind8 *priority_bitmap; |
| 338 | | int bn; |
| 339 | | int flags; |
| 340 | | int prioverchar; |
| 341 | | int cmode; |
| 342 | | int fadeFactor; |
| 343 | | int pfade_enabled; |
| 344 | | int fogFactor; |
| 345 | | int zfog_enabled; |
| 346 | | int cz_adjust; |
| 347 | | int cz_sdelta; |
| 348 | | const UINT8 *czram; |
| 349 | | |
| 350 | | /* sprites */ |
| 351 | | const UINT8 *source; |
| 352 | | int alpha; |
| 353 | | int line_modulo; |
| 354 | | int flipx; |
| 355 | | int flipy; |
| 356 | | }; |
| 357 | | |
| 358 | | |
| 359 | | static void renderscanline_uvi_full(void *destbase, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid) |
| 360 | | { |
| 361 | | const poly_extra_data *extra = (const poly_extra_data *)extradata; |
| 362 | | namcos22_state *state = extra->machine->driver_data<namcos22_state>(); |
| 363 | | float z = extent->param[0].start; |
| 364 | | float u = extent->param[1].start; |
| 365 | | float v = extent->param[2].start; |
| 366 | | float i = extent->param[3].start; |
| 367 | | float dz = extent->param[0].dpdx; |
| 368 | | float du = extent->param[1].dpdx; |
| 369 | | float dv = extent->param[2].dpdx; |
| 370 | | float di = extent->param[3].dpdx; |
| 371 | | bitmap_rgb32 *destmap = (bitmap_rgb32 *)destbase; |
| 372 | | int bn = extra->bn * 0x1000; |
| 373 | | const pen_t *pens = extra->pens; |
| 374 | | const UINT8 *czram = extra->czram; |
| 375 | | int cz_adjust = extra->cz_adjust; |
| 376 | | int cz_sdelta = extra->cz_sdelta; |
| 377 | | int zfog_enabled = extra->zfog_enabled; |
| 378 | | int fogFactor = 0xff - extra->fogFactor; |
| 379 | | int fadeFactor = 0xff - extra->fadeFactor; |
| 380 | | int alphaFactor = 0xff - mixer.poly_translucency; |
| 381 | | rgbint fogColor = extra->fogColor; |
| 382 | | rgbint fadeColor = extra->fadeColor; |
| 383 | | rgbint polyColor = extra->polyColor; |
| 384 | | int polyfade_enabled = extra->pfade_enabled; |
| 69 | float z = extent.param[0].start; |
| 70 | float u = extent.param[1].start; |
| 71 | float v = extent.param[2].start; |
| 72 | float i = extent.param[3].start; |
| 73 | float dz = extent.param[0].dpdx; |
| 74 | float du = extent.param[1].dpdx; |
| 75 | float dv = extent.param[2].dpdx; |
| 76 | float di = extent.param[3].dpdx; |
| 77 | int bn = extra.bn * 0x1000; |
| 78 | const pen_t *pens = extra.pens; |
| 79 | const UINT8 *czram = extra.czram; |
| 80 | int cz_adjust = extra.cz_adjust; |
| 81 | int cz_sdelta = extra.cz_sdelta; |
| 82 | int zfog_enabled = extra.zfog_enabled; |
| 83 | int fogfactor = 0xff - extra.fogfactor; |
| 84 | int fadefactor = 0xff - extra.fadefactor; |
| 85 | int alphafactor = 0xff - m_state.m_poly_translucency; |
| 86 | rgbint fogcolor = extra.fogcolor; |
| 87 | rgbint fadecolor = extra.fadecolor; |
| 88 | rgbint polycolor = extra.polycolor; |
| 89 | int polyfade_enabled = extra.pfade_enabled; |
| 385 | 90 | int penmask = 0xff; |
| 386 | 91 | int penshift = 0; |
| 387 | | int prioverchar = extra->prioverchar; |
| 388 | | UINT32 *dest = &destmap->pix32(scanline); |
| 389 | | UINT8 *primap = &extra->priority_bitmap->pix8(scanline); |
| 390 | | int x; |
| 92 | int prioverchar = extra.prioverchar; |
| 93 | UINT32 *dest = &extra.destbase->pix32(scanline); |
| 94 | UINT8 *primap = &extra.primap->pix8(scanline); |
| 95 | UINT16 *ttmap = m_state.m_texture_tilemap; |
| 96 | UINT8 *ttattr = m_state.m_texture_tileattr; |
| 97 | UINT8 *ttdata = m_state.m_texture_tiledata; |
| 98 | UINT8 *tt_ayx_to_pixel = m_state.m_texture_ayx_to_pixel; |
| 391 | 99 | |
| 392 | | if (extra->cmode & 4) |
| 100 | if (extra.cmode & 4) |
| 393 | 101 | { |
| 394 | | pens += 0xec + ((extra->cmode & 8) << 1); |
| 102 | pens += 0xec + ((extra.cmode & 8) << 1); |
| 395 | 103 | penmask = 0x03; |
| 396 | | penshift = 2 * (~extra->cmode & 3); |
| 104 | penshift = 2 * (~extra.cmode & 3); |
| 397 | 105 | } |
| 398 | | else if (extra->cmode & 2) |
| 106 | else if (extra.cmode & 2) |
| 399 | 107 | { |
| 400 | | pens += 0xe0 + ((extra->cmode & 8) << 1); |
| 108 | pens += 0xe0 + ((extra.cmode & 8) << 1); |
| 401 | 109 | penmask = 0x0f; |
| 402 | | penshift = 4 * (~extra->cmode & 1); |
| 110 | penshift = 4 * (~extra.cmode & 1); |
| 403 | 111 | } |
| 404 | 112 | |
| 405 | 113 | // slight differences between super and non-super, do the branch here for optimization |
| 406 | 114 | // normal: 1 fader, no alpha, shading after fog |
| 407 | 115 | // super: 2 faders, alpha, shading before fog |
| 408 | | if (state->m_bSuperSystem22) |
| 116 | if (m_state.m_is_ss22) |
| 409 | 117 | { |
| 410 | | for( x=extent->startx; x<extent->stopx; x++ ) |
| 118 | for (int x = extent.startx; x < extent.stopx; x++) |
| 411 | 119 | { |
| 412 | 120 | float ooz = 1.0f / z; |
| 413 | | int pen = texel(state, (int)(u*ooz), bn+(int)(v*ooz)); |
| 121 | int tx = (int)(u * ooz); |
| 122 | int ty = (int)(v * ooz) + bn; |
| 123 | int to = ((ty & 0xfff0) << 4) | ((tx & 0xff0) >> 4); |
| 124 | int pen = ttdata[(ttmap[to] << 8) | tt_ayx_to_pixel[ttattr[to] << 8 | (ty << 4 & 0xf0) | (tx & 0xf)]]; |
| 414 | 125 | // pen = 0x55; // debug: disable textures |
| 415 | 126 | |
| 416 | 127 | rgbint rgb; |
| 417 | | rgb_to_rgbint(&rgb, pens[pen>>penshift&penmask]); |
| 128 | rgb_to_rgbint(&rgb, pens[pen >> penshift & penmask]); |
| 418 | 129 | |
| 419 | 130 | // apply shading before fog |
| 420 | 131 | int shade = i*ooz; |
| r24771 | r24772 | |
| 427 | 138 | // discard low byte and clamp to 0-1fff |
| 428 | 139 | if ((UINT32)cz < 0x200000) cz >>= 8; |
| 429 | 140 | else cz = (cz < 0) ? 0 : 0x1fff; |
| 430 | | if ((fogFactor = czram[cz] + cz_sdelta) > 0) |
| 141 | fogfactor = czram[cz] + cz_sdelta; |
| 142 | if (fogfactor > 0) |
| 431 | 143 | { |
| 432 | | if (fogFactor>0xff) fogFactor=0xff; |
| 433 | | rgbint_blend(&rgb, &fogColor, 0xff-fogFactor); |
| 144 | if (fogfactor > 0xff) fogfactor = 0xff; |
| 145 | rgbint_blend(&rgb, &fogcolor, 0xff - fogfactor); |
| 434 | 146 | } |
| 435 | 147 | } |
| 436 | | else if (fogFactor != 0xff) // direct |
| 437 | | rgbint_blend(&rgb, &fogColor, fogFactor); |
| 148 | else if (fogfactor != 0xff) // direct |
| 149 | rgbint_blend(&rgb, &fogcolor, fogfactor); |
| 438 | 150 | |
| 439 | | if( polyfade_enabled ) |
| 440 | | rgbint_scale_channel_and_clamp(&rgb, &polyColor); |
| 151 | if (polyfade_enabled) |
| 152 | rgbint_scale_channel_and_clamp(&rgb, &polycolor); |
| 441 | 153 | |
| 442 | | if( fadeFactor != 0xff ) |
| 443 | | rgbint_blend(&rgb, &fadeColor, fadeFactor); |
| 154 | if (fadefactor != 0xff) |
| 155 | rgbint_blend(&rgb, &fadecolor, fadefactor); |
| 444 | 156 | |
| 445 | | if( alphaFactor != 0xff ) |
| 157 | if (alphafactor != 0xff) |
| 446 | 158 | { |
| 447 | 159 | rgbint mix; |
| 448 | 160 | rgb_to_rgbint(&mix, dest[x]); |
| 449 | | rgbint_blend(&rgb, &mix, alphaFactor); |
| 161 | rgbint_blend(&rgb, &mix, alphafactor); |
| 450 | 162 | } |
| 451 | 163 | |
| 452 | 164 | dest[x] = rgbint_to_rgb(&rgb); |
| r24771 | r24772 | |
| 460 | 172 | } |
| 461 | 173 | else |
| 462 | 174 | { |
| 463 | | for( x=extent->startx; x<extent->stopx; x++ ) |
| 175 | for (int x = extent.startx; x < extent.stopx; x++) |
| 464 | 176 | { |
| 465 | 177 | float ooz = 1.0f / z; |
| 466 | | int pen = texel(state, (int)(u*ooz), bn+(int)(v*ooz)); |
| 178 | int tx = (int)(u * ooz); |
| 179 | int ty = (int)(v * ooz) + bn; |
| 180 | int to = ((ty & 0xfff0) << 4) | ((tx & 0xff0) >> 4); |
| 181 | int pen = ttdata[(ttmap[to] << 8) | tt_ayx_to_pixel[ttattr[to] << 8 | (ty << 4 & 0xf0) | (tx & 0xf)]]; |
| 467 | 182 | // pen = 0x55; // debug: disable textures |
| 468 | 183 | |
| 469 | 184 | rgbint rgb; |
| 470 | | rgb_to_rgbint(&rgb, pens[pen>>penshift&penmask]); |
| 185 | rgb_to_rgbint(&rgb, pens[pen >> penshift & penmask]); |
| 471 | 186 | |
| 472 | 187 | // per-z distance fogging |
| 473 | 188 | if (zfog_enabled) |
| r24771 | r24772 | |
| 476 | 191 | // discard low byte and clamp to 0-1fff |
| 477 | 192 | if ((UINT32)cz < 0x200000) cz >>= 8; |
| 478 | 193 | else cz = (cz < 0) ? 0 : 0x1fff; |
| 479 | | if ((fogFactor = czram[NATIVE_ENDIAN_VALUE_LE_BE(3,0)^cz]) != 0) |
| 480 | | rgbint_blend(&rgb, &fogColor, 0xff-fogFactor); |
| 194 | fogfactor = czram[NATIVE_ENDIAN_VALUE_LE_BE(3, 0) ^ cz]; |
| 195 | if (fogfactor != 0) |
| 196 | rgbint_blend(&rgb, &fogcolor, 0xff - fogfactor); |
| 481 | 197 | } |
| 482 | | else if (fogFactor != 0xff) // direct |
| 483 | | rgbint_blend(&rgb, &fogColor, fogFactor); |
| 198 | else if (fogfactor != 0xff) // direct |
| 199 | rgbint_blend(&rgb, &fogcolor, fogfactor); |
| 484 | 200 | |
| 485 | 201 | // apply shading after fog |
| 486 | 202 | int shade = i*ooz; |
| 487 | 203 | rgbint_scale_immediate_and_clamp(&rgb, shade << 2); |
| 488 | 204 | |
| 489 | | if( polyfade_enabled ) |
| 490 | | rgbint_scale_channel_and_clamp(&rgb, &polyColor); |
| 205 | if (polyfade_enabled) |
| 206 | rgbint_scale_channel_and_clamp(&rgb, &polycolor); |
| 491 | 207 | |
| 492 | 208 | dest[x] = rgbint_to_rgb(&rgb); |
| 493 | 209 | primap[x] |= prioverchar; |
| r24771 | r24772 | |
| 500 | 216 | } |
| 501 | 217 | } |
| 502 | 218 | |
| 503 | | static void poly3d_DrawQuad(screen_device &screen, bitmap_rgb32 &bitmap, int textureBank, int color, Poly3dVertex pv[4], int flags, int cz_adjust, int direct, int cmode ) |
| 219 | |
| 220 | void namcos22_renderer::renderscanline_sprite(INT32 scanline, const extent_t &extent, const namcos22_object_data &extra, int threadid) |
| 504 | 221 | { |
| 505 | | namcos22_state *state = screen.machine().driver_data<namcos22_state>(); |
| 506 | | poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(state->m_poly); |
| 507 | | poly_vertex v[4], clipv[6]; |
| 222 | int y_index = extent.param[1].start - extra.flipy; |
| 223 | float x_index = extent.param[0].start - extra.flipx; |
| 224 | float dx = extent.param[0].dpdx; |
| 225 | const pen_t *pal = extra.pens; |
| 226 | int prioverchar = extra.prioverchar; |
| 227 | int alphafactor = extra.alpha; |
| 228 | int fogfactor = 0xff - extra.fogfactor; |
| 229 | int fadefactor = 0xff - extra.fadefactor; |
| 230 | rgbint fogcolor = extra.fogcolor; |
| 231 | rgbint fadecolor = extra.fadecolor; |
| 232 | UINT8 *source = (UINT8 *)extra.source + y_index * extra.line_modulo; |
| 233 | UINT32 *dest = &extra.destbase->pix32(scanline); |
| 234 | UINT8 *primap = &extra.primap->pix8(scanline); |
| 235 | |
| 236 | for (int x = extent.startx; x < extent.stopx; x++) |
| 237 | { |
| 238 | int pen = source[(int)x_index]; |
| 239 | if (pen != 0xff) |
| 240 | { |
| 241 | rgbint rgb; |
| 242 | rgb_to_rgbint(&rgb, pal[pen]); |
| 243 | |
| 244 | if (fogfactor != 0xff) |
| 245 | rgbint_blend(&rgb, &fogcolor, fogfactor); |
| 246 | |
| 247 | if (fadefactor != 0xff) |
| 248 | rgbint_blend(&rgb, &fadecolor, fadefactor); |
| 249 | |
| 250 | if (alphafactor != 0xff) |
| 251 | { |
| 252 | rgbint mix; |
| 253 | rgb_to_rgbint(&mix, dest[x]); |
| 254 | rgbint_blend(&rgb, &mix, alphafactor); |
| 255 | } |
| 256 | |
| 257 | dest[x] = rgbint_to_rgb(&rgb); |
| 258 | primap[x] |= prioverchar; |
| 259 | } |
| 260 | x_index += dx; |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | |
| 265 | |
| 266 | /*********************************************************************************************/ |
| 267 | |
| 268 | void namcos22_renderer::poly3d_drawquad(screen_device &screen, bitmap_rgb32 &bitmap, struct namcos22_scenenode *node) |
| 269 | { |
| 270 | namcos22_object_data &extra = object_data_alloc(); |
| 271 | vertex_t v[4]; |
| 272 | vertex_t clipv[6]; |
| 508 | 273 | int clipverts; |
| 509 | 274 | int vertnum; |
| 275 | |
| 276 | int direct = node->data.quad.direct; |
| 277 | int flags = node->data.quad.flags; |
| 278 | int color = node->data.quad.color; |
| 279 | int cz_adjust = node->data.quad.cz_adjust; |
| 280 | |
| 281 | extra.destbase = &bitmap; |
| 282 | extra.pfade_enabled = 0; |
| 283 | extra.zfog_enabled = 0; |
| 284 | extra.fadefactor = 0; |
| 285 | extra.fogfactor = 0; |
| 510 | 286 | |
| 511 | | extra->machine = &screen.machine(); |
| 512 | | extra->pfade_enabled = 0; |
| 513 | | extra->zfog_enabled = 0; |
| 514 | | extra->fadeFactor = 0; |
| 515 | | extra->fogFactor = 0; |
| 287 | extra.pens = &screen.machine().pens[(color & 0x7f) << 8]; |
| 288 | extra.primap = &screen.priority(); |
| 289 | extra.bn = node->data.quad.texturebank; |
| 290 | extra.flags = flags; |
| 291 | extra.cz_adjust = cz_adjust; |
| 292 | extra.cmode = node->data.quad.cmode; |
| 293 | extra.prioverchar = ((node->data.quad.cmode & 7) == 1) ? 1 : 0; |
| 294 | extra.prioverchar |= m_state.m_is_ss22 ? 2 : 0; |
| 516 | 295 | |
| 517 | | extra->pens = &screen.machine().pens[(color&0x7f)<<8]; |
| 518 | | extra->priority_bitmap = &screen.priority(); |
| 519 | | extra->bn = textureBank; |
| 520 | | extra->flags = flags; |
| 521 | | extra->cz_adjust = cz_adjust; |
| 522 | | extra->cmode = cmode; |
| 523 | | extra->prioverchar = (state->m_bSuperSystem22 << 1) | ((cmode & 7) == 1); |
| 296 | // scene clip |
| 297 | int cx = 320 + node->data.quad.vx; |
| 298 | int cy = 240 + node->data.quad.vy; |
| 299 | m_clipx = cx; |
| 300 | m_clipy = cy; |
| 301 | m_cliprect.set(cx + node->data.quad.vw, cx - node->data.quad.vw, cy + node->data.quad.vh, cy - node->data.quad.vh); |
| 302 | if (m_cliprect.min_x < 0) m_cliprect.min_x = 0; |
| 303 | if (m_cliprect.max_x > 639) m_cliprect.max_x = 639; |
| 304 | if (m_cliprect.min_y < 0) m_cliprect.min_y = 0; |
| 305 | if (m_cliprect.max_y > 479) m_cliprect.max_y = 479; |
| 524 | 306 | |
| 525 | | /* non-direct case: project and z-clip */ |
| 307 | // non-direct case: project and z-clip |
| 526 | 308 | if (!direct) |
| 527 | 309 | { |
| 528 | 310 | for (vertnum = 0; vertnum < 4; vertnum++) |
| 529 | 311 | { |
| 530 | | v[vertnum].x = pv[vertnum].x; |
| 531 | | v[vertnum].y = pv[vertnum].y; |
| 532 | | v[vertnum].p[0] = pv[vertnum].z; |
| 533 | | v[vertnum].p[1] = pv[vertnum].u; |
| 534 | | v[vertnum].p[2] = pv[vertnum].v; |
| 535 | | v[vertnum].p[3] = pv[vertnum].bri; |
| 312 | v[vertnum].x = node->data.quad.v[vertnum].x; |
| 313 | v[vertnum].y = node->data.quad.v[vertnum].y; |
| 314 | v[vertnum].p[0] = node->data.quad.v[vertnum].z; |
| 315 | v[vertnum].p[1] = node->data.quad.v[vertnum].u; |
| 316 | v[vertnum].p[2] = node->data.quad.v[vertnum].v; |
| 317 | v[vertnum].p[3] = node->data.quad.v[vertnum].bri; |
| 536 | 318 | } |
| 537 | | clipverts = poly_zclip_if_less(4, v, clipv, 4, MIN_Z); |
| 319 | |
| 320 | clipverts = zclip_if_less(4, v, clipv, 4, 10.0f); |
| 321 | assert(clipverts <= ARRAY_LENGTH(clipv)); |
| 538 | 322 | if (clipverts < 3) |
| 539 | 323 | return; |
| 540 | | assert(clipverts <= ARRAY_LENGTH(clipv)); |
| 324 | |
| 541 | 325 | for (vertnum = 0; vertnum < clipverts; vertnum++) |
| 542 | 326 | { |
| 543 | 327 | float ooz = 1.0f / clipv[vertnum].p[0]; |
| 544 | | clipv[vertnum].x = mClip.cx + clipv[vertnum].x * ooz; |
| 545 | | clipv[vertnum].y = mClip.cy - clipv[vertnum].y * ooz; |
| 328 | clipv[vertnum].x = m_clipx + clipv[vertnum].x * ooz; |
| 329 | clipv[vertnum].y = m_clipy - clipv[vertnum].y * ooz; |
| 546 | 330 | clipv[vertnum].p[0] = ooz; |
| 547 | 331 | clipv[vertnum].p[1] = (clipv[vertnum].p[1] + 0.5f) * ooz; |
| 548 | 332 | clipv[vertnum].p[2] = (clipv[vertnum].p[2] + 0.5f) * ooz; |
| r24771 | r24772 | |
| 550 | 334 | } |
| 551 | 335 | } |
| 552 | 336 | |
| 553 | | /* direct case: don't clip, and treat pv->z as 1/z */ |
| 337 | // direct case: don't clip, and treat pv->z as 1/z |
| 554 | 338 | else |
| 555 | 339 | { |
| 556 | 340 | clipverts = 4; |
| 557 | 341 | for (vertnum = 0; vertnum < 4; vertnum++) |
| 558 | 342 | { |
| 559 | | float ooz = pv[vertnum].z; |
| 560 | | clipv[vertnum].x = mClip.cx + pv[vertnum].x; |
| 561 | | clipv[vertnum].y = mClip.cy - pv[vertnum].y; |
| 343 | float ooz = node->data.quad.v[vertnum].z; |
| 344 | clipv[vertnum].x = m_clipx + node->data.quad.v[vertnum].x; |
| 345 | clipv[vertnum].y = m_clipy - node->data.quad.v[vertnum].y; |
| 562 | 346 | clipv[vertnum].p[0] = ooz; |
| 563 | | clipv[vertnum].p[1] = (pv[vertnum].u + 0.5f) * ooz; |
| 564 | | clipv[vertnum].p[2] = (pv[vertnum].v + 0.5f) * ooz; |
| 565 | | clipv[vertnum].p[3] = (pv[vertnum].bri + 0.5f) * ooz; |
| 347 | clipv[vertnum].p[1] = (node->data.quad.v[vertnum].u + 0.5f) * ooz; |
| 348 | clipv[vertnum].p[2] = (node->data.quad.v[vertnum].v + 0.5f) * ooz; |
| 349 | clipv[vertnum].p[3] = (node->data.quad.v[vertnum].bri + 0.5f) * ooz; |
| 566 | 350 | } |
| 567 | 351 | } |
| 568 | 352 | |
| 569 | | if( state->m_bSuperSystem22 ) |
| 353 | if (m_state.m_is_ss22) |
| 570 | 354 | { |
| 571 | 355 | // global fade |
| 572 | | if (mixer.flags&1) |
| 356 | if (m_state.m_mixer_flags & 1) |
| 573 | 357 | { |
| 574 | | extra->fadeFactor = mixer.fadeFactor; |
| 575 | | rgb_comp_to_rgbint(&extra->fadeColor, mixer.rFadeColor, mixer.gFadeColor, mixer.bFadeColor); |
| 358 | extra.fadefactor = m_state.m_screen_fade_factor; |
| 359 | rgb_comp_to_rgbint(&extra.fadecolor, m_state.m_screen_fade_r, m_state.m_screen_fade_g, m_state.m_screen_fade_b); |
| 576 | 360 | } |
| 577 | 361 | |
| 578 | 362 | // poly fade |
| 579 | | extra->pfade_enabled = mixer.PolyFade_enabled; |
| 580 | | rgb_comp_to_rgbint(&extra->polyColor, mixer.rPolyFadeColor, mixer.gPolyFadeColor, mixer.bPolyFadeColor); |
| 363 | extra.pfade_enabled = m_state.m_poly_fade_enabled; |
| 364 | rgb_comp_to_rgbint(&extra.polycolor, m_state.m_poly_fade_r, m_state.m_poly_fade_g, m_state.m_poly_fade_b); |
| 581 | 365 | |
| 582 | 366 | /* poly fog (not completely accurate yet) |
| 583 | 367 | |
| r24771 | r24772 | |
| 644 | 428 | */ |
| 645 | 429 | if (~color & 0x80) |
| 646 | 430 | { |
| 647 | | int cztype = flags&3; |
| 648 | | if (nthword(state->m_czattr, 4) & (4<<(cztype*4))) |
| 431 | int cztype = flags & 3; |
| 432 | if (nthword(m_state.m_czattr, 4) & (4 << (cztype * 4))) |
| 649 | 433 | { |
| 650 | | int delta = (INT16)nthword(state->m_czattr, cztype); |
| 651 | | rgb_comp_to_rgbint(&extra->fogColor, mixer.rFogColor, mixer.gFogColor, mixer.bFogColor); |
| 434 | int delta = (INT16)nthword(m_state.m_czattr, cztype); |
| 435 | rgb_comp_to_rgbint(&extra.fogcolor, m_state.m_fog_r, m_state.m_fog_g, m_state.m_fog_b); |
| 652 | 436 | if (direct) |
| 653 | 437 | { |
| 654 | | int cz = ((flags&0x1fff00) + cz_adjust) >> 8; |
| 438 | int cz = ((flags & 0x1fff00) + cz_adjust) >> 8; |
| 655 | 439 | if (cz < 0) cz = 0; |
| 656 | 440 | else if (cz > 0x1fff) cz = 0x1fff; |
| 657 | 441 | |
| 658 | | int fogFactor = state->m_recalc_czram[cztype][cz] + delta; |
| 659 | | if (fogFactor>0) |
| 442 | int fogfactor = m_state.m_recalc_czram[cztype][cz] + delta; |
| 443 | if (fogfactor > 0) |
| 660 | 444 | { |
| 661 | | if (fogFactor>0xff) fogFactor = 0xff; |
| 662 | | extra->fogFactor = fogFactor; |
| 445 | if (fogfactor > 0xff) fogfactor = 0xff; |
| 446 | extra.fogfactor = fogfactor; |
| 663 | 447 | } |
| 664 | 448 | } |
| 665 | 449 | else |
| 666 | 450 | { |
| 667 | | extra->zfog_enabled = 1; |
| 668 | | extra->cz_sdelta = delta; |
| 669 | | extra->czram = state->m_recalc_czram[cztype]; |
| 451 | extra.zfog_enabled = 1; |
| 452 | extra.cz_sdelta = delta; |
| 453 | extra.czram = m_state.m_recalc_czram[cztype]; |
| 670 | 454 | } |
| 671 | 455 | } |
| 672 | 456 | } |
| r24771 | r24772 | |
| 675 | 459 | else |
| 676 | 460 | { |
| 677 | 461 | // global fade |
| 678 | | if (mixer.flags&1) |
| 462 | if (m_state.m_mixer_flags & 1) |
| 679 | 463 | { |
| 680 | | extra->pfade_enabled = mixer.PolyFade_enabled; |
| 681 | | rgb_comp_to_rgbint(&extra->polyColor, mixer.rPolyFadeColor, mixer.gPolyFadeColor, mixer.bPolyFadeColor); |
| 464 | extra.pfade_enabled = m_state.m_poly_fade_enabled; |
| 465 | rgb_comp_to_rgbint(&extra.polycolor, m_state.m_poly_fade_r, m_state.m_poly_fade_g, m_state.m_poly_fade_b); |
| 682 | 466 | } |
| 683 | 467 | |
| 684 | 468 | // poly fog |
| 685 | 469 | if (~color & 0x80) |
| 686 | 470 | { |
| 687 | | int cztype = flags&3; |
| 688 | | int czcolor = cztype & nthbyte(&mixer.fog_colormask, cztype); |
| 689 | | rgb_comp_to_rgbint(&extra->fogColor, mixer.rFogColor_per_cztype[czcolor], mixer.gFogColor_per_cztype[czcolor], mixer.bFogColor_per_cztype[czcolor]); |
| 471 | int cztype = flags & 3; |
| 472 | int czcolor = cztype & nthbyte(&m_state.m_fog_colormask, cztype); |
| 473 | rgb_comp_to_rgbint(&extra.fogcolor, m_state.m_fog_r_per_cztype[czcolor], m_state.m_fog_g_per_cztype[czcolor], m_state.m_fog_b_per_cztype[czcolor]); |
| 690 | 474 | |
| 691 | 475 | if (direct) |
| 692 | 476 | { |
| 693 | 477 | // direct case, cz value is preset |
| 694 | | int cz = ((flags&0x1fff00) + cz_adjust) >> 8; |
| 478 | int cz = ((flags & 0x1fff00) + cz_adjust) >> 8; |
| 695 | 479 | if (cz < 0) cz = 0; |
| 696 | 480 | else if (cz > 0x1fff) cz = 0x1fff; |
| 697 | | extra->fogFactor = nthbyte(state->m_czram, cztype<<13|cz); |
| 481 | extra.fogfactor = nthbyte(m_state.m_czram, cztype << 13 | cz); |
| 698 | 482 | } |
| 699 | 483 | else |
| 700 | 484 | { |
| 701 | | extra->zfog_enabled = 1; |
| 702 | | extra->czram = (UINT8*)&state->m_czram[cztype<<(13-2)]; |
| 485 | extra.zfog_enabled = 1; |
| 486 | extra.czram = (UINT8*)&m_state.m_czram[cztype << (13-2)]; |
| 703 | 487 | } |
| 704 | 488 | } |
| 705 | 489 | } |
| 706 | 490 | |
| 707 | | poly_render_triangle_fan(state->m_poly, &bitmap, mClip.scissor, renderscanline_uvi_full, 4, clipverts, clipv); |
| 491 | render_triangle_fan(m_cliprect, render_delegate(FUNC(namcos22_renderer::renderscanline_uvi_full), this), 4, clipverts, clipv); |
| 708 | 492 | } |
| 709 | 493 | |
| 710 | | static void renderscanline_sprite(void *destbase, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid) |
| 711 | | { |
| 712 | | const poly_extra_data *extra = (const poly_extra_data *)extradata; |
| 713 | | int y_index = extent->param[1].start - extra->flipy; |
| 714 | | float x_index = extent->param[0].start - extra->flipx; |
| 715 | | float dx = extent->param[0].dpdx; |
| 716 | | bitmap_rgb32 *destmap = (bitmap_rgb32 *)destbase; |
| 717 | | const pen_t *pal = extra->pens; |
| 718 | | int prioverchar = extra->prioverchar; |
| 719 | | int alphaFactor = extra->alpha; |
| 720 | | int fogFactor = 0xff - extra->fogFactor; |
| 721 | | int fadeFactor = 0xff - extra->fadeFactor; |
| 722 | | rgbint fogColor = extra->fogColor; |
| 723 | | rgbint fadeColor = extra->fadeColor; |
| 724 | | UINT8 *source = (UINT8 *)extra->source + y_index * extra->line_modulo; |
| 725 | | UINT32 *dest = &destmap->pix32(scanline); |
| 726 | | UINT8 *primap = &extra->priority_bitmap->pix8(scanline); |
| 727 | | int x; |
| 728 | 494 | |
| 729 | | for( x=extent->startx; x<extent->stopx; x++ ) |
| 730 | | { |
| 731 | | int pen = source[(int)x_index]; |
| 732 | | if( pen != 0xff ) |
| 733 | | { |
| 734 | | rgbint rgb; |
| 735 | | rgb_to_rgbint(&rgb, pal[pen]); |
| 736 | | |
| 737 | | if( fogFactor != 0xff ) |
| 738 | | rgbint_blend(&rgb, &fogColor, fogFactor); |
| 739 | | |
| 740 | | if( fadeFactor != 0xff ) |
| 741 | | rgbint_blend(&rgb, &fadeColor, fadeFactor); |
| 742 | | |
| 743 | | if( alphaFactor != 0xff ) |
| 744 | | { |
| 745 | | rgbint mix; |
| 746 | | rgb_to_rgbint(&mix, dest[x]); |
| 747 | | rgbint_blend(&rgb, &mix, alphaFactor); |
| 748 | | } |
| 749 | | |
| 750 | | dest[x] = rgbint_to_rgb(&rgb); |
| 751 | | primap[x] |= prioverchar; |
| 752 | | } |
| 753 | | x_index += dx; |
| 754 | | } |
| 755 | | } |
| 756 | | |
| 757 | | |
| 758 | | static void poly3d_DrawSprite(screen_device &screen, bitmap_rgb32 &dest_bmp, gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, int sx, int sy, int scalex, int scaley, int cz_factor, int prioverchar, int alpha) |
| 495 | void namcos22_renderer::poly3d_drawsprite( |
| 496 | screen_device &screen, |
| 497 | bitmap_rgb32 &dest_bmp, |
| 498 | UINT32 code, |
| 499 | UINT32 color, |
| 500 | int flipx, int flipy, |
| 501 | int sx, int sy, |
| 502 | int scalex, int scaley, |
| 503 | int cz_factor, |
| 504 | int prioverchar, |
| 505 | int alpha |
| 506 | ) |
| 759 | 507 | { |
| 760 | | namcos22_state *state = gfx->machine().driver_data<namcos22_state>(); |
| 761 | | int sprite_screen_height = (scaley*gfx->height()+0x8000)>>16; |
| 762 | | int sprite_screen_width = (scalex*gfx->width()+0x8000)>>16; |
| 508 | gfx_element *gfx = screen.machine().gfx[2]; |
| 509 | int sprite_screen_height = (scaley * gfx->height() + 0x8000) >> 16; |
| 510 | int sprite_screen_width = (scalex * gfx->width() + 0x8000) >> 16; |
| 763 | 511 | if (sprite_screen_width && sprite_screen_height) |
| 764 | 512 | { |
| 765 | 513 | float fsx = sx; |
| r24771 | r24772 | |
| 768 | 516 | float fheight = gfx->height(); |
| 769 | 517 | float fsw = sprite_screen_width; |
| 770 | 518 | float fsh = sprite_screen_height; |
| 771 | | poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(state->m_poly); |
| 772 | | poly_vertex vert[4]; |
| 773 | 519 | |
| 774 | | extra->fadeFactor = 0; |
| 775 | | extra->fogFactor = 0; |
| 776 | | extra->flags = 0; |
| 520 | namcos22_object_data &extra = object_data_alloc(); |
| 521 | vertex_t vert[4]; |
| 777 | 522 | |
| 778 | | extra->machine = &gfx->machine(); |
| 779 | | extra->alpha = alpha; |
| 780 | | extra->prioverchar = 2 | prioverchar; |
| 781 | | extra->line_modulo = gfx->rowbytes(); |
| 782 | | extra->flipx = flipx; |
| 783 | | extra->flipy = flipy; |
| 784 | | extra->pens = &gfx->machine().pens[gfx->colorbase() + gfx->granularity() * (color&0x7f)]; |
| 785 | | extra->priority_bitmap = &screen.priority(); |
| 786 | | extra->source = gfx->get_data(code % gfx->elements()); |
| 523 | extra.fadefactor = 0; |
| 524 | extra.fogfactor = 0; |
| 525 | extra.flags = 0; |
| 787 | 526 | |
| 527 | extra.destbase = &dest_bmp; |
| 528 | extra.alpha = alpha; |
| 529 | extra.prioverchar = 2 | prioverchar; |
| 530 | extra.line_modulo = gfx->rowbytes(); |
| 531 | extra.flipx = flipx; |
| 532 | extra.flipy = flipy; |
| 533 | extra.pens = &gfx->machine().pens[gfx->colorbase() + gfx->granularity() * (color & 0x7f)]; |
| 534 | extra.primap = &screen.priority(); |
| 535 | extra.source = gfx->get_data(code % gfx->elements()); |
| 536 | |
| 788 | 537 | vert[0].x = fsx; |
| 789 | 538 | vert[0].y = fsy; |
| 790 | 539 | vert[0].p[0] = 0; |
| r24771 | r24772 | |
| 803 | 552 | vert[3].p[1] = fheight; |
| 804 | 553 | |
| 805 | 554 | // global fade |
| 806 | | if (mixer.flags&2) |
| 555 | if (m_state.m_mixer_flags & 2) |
| 807 | 556 | { |
| 808 | | extra->fadeFactor = mixer.fadeFactor; |
| 809 | | rgb_comp_to_rgbint(&extra->fadeColor, mixer.rFadeColor, mixer.gFadeColor, mixer.bFadeColor); |
| 557 | extra.fadefactor = m_state.m_screen_fade_factor; |
| 558 | rgb_comp_to_rgbint(&extra.fadecolor, m_state.m_screen_fade_r, m_state.m_screen_fade_g, m_state.m_screen_fade_b); |
| 810 | 559 | } |
| 811 | 560 | |
| 812 | 561 | // fog, 0xfe is a special case for sprite priority over textlayer |
| 813 | 562 | if (~color & 0x80 && cz_factor > 0 && cz_factor != 0xfe) |
| 814 | 563 | { |
| 815 | 564 | // or does it fetch from poly-cz ram? that will break timecris though |
| 816 | | extra->fogFactor = cz_factor; |
| 817 | | rgb_comp_to_rgbint(&extra->fogColor, mixer.rFogColor, mixer.gFogColor, mixer.bFogColor); |
| 565 | extra.fogfactor = cz_factor; |
| 566 | rgb_comp_to_rgbint(&extra.fogcolor, m_state.m_fog_r, m_state.m_fog_g, m_state.m_fog_b); |
| 818 | 567 | } |
| 819 | 568 | |
| 820 | | poly_render_triangle_fan(state->m_poly, &dest_bmp, mClip.scissor, renderscanline_sprite, 2, 4, vert); |
| 569 | render_triangle_fan(m_cliprect, render_delegate(FUNC(namcos22_renderer::renderscanline_sprite), this), 2, 4, vert); |
| 821 | 570 | } |
| 822 | 571 | } |
| 823 | 572 | |
| 824 | | static void ApplyGamma( running_machine &machine, bitmap_rgb32 &bitmap ) |
| 825 | | { |
| 826 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 827 | | int x,y; |
| 828 | | if( state->m_bSuperSystem22 ) |
| 829 | | { |
| 830 | | /* super system 22 */ |
| 831 | | const UINT8 *rlut = (const UINT8 *)&state->m_gamma[0x100/4]; |
| 832 | | const UINT8 *glut = (const UINT8 *)&state->m_gamma[0x200/4]; |
| 833 | | const UINT8 *blut = (const UINT8 *)&state->m_gamma[0x300/4]; |
| 834 | | for( y=0; y<bitmap.height(); y++ ) |
| 835 | | { |
| 836 | | UINT32 *dest = &bitmap.pix32(y); |
| 837 | | for( x=0; x<bitmap.width(); x++ ) |
| 838 | | { |
| 839 | | int rgb = dest[x]; |
| 840 | | int r = rlut[NATIVE_ENDIAN_VALUE_LE_BE(3,0)^((rgb>>16)&0xff)]; |
| 841 | | int g = glut[NATIVE_ENDIAN_VALUE_LE_BE(3,0)^((rgb>>8)&0xff)]; |
| 842 | | int b = blut[NATIVE_ENDIAN_VALUE_LE_BE(3,0)^(rgb&0xff)]; |
| 843 | | dest[x] = (r<<16)|(g<<8)|b; |
| 844 | | } |
| 845 | | } |
| 846 | | } |
| 847 | | else |
| 848 | | { |
| 849 | | /* system 22 */ |
| 850 | | const UINT8 *rlut = 0x000+(const UINT8 *)machine.root_device().memregion("gamma_proms")->base(); |
| 851 | | const UINT8 *glut = 0x100+rlut; |
| 852 | | const UINT8 *blut = 0x200+rlut; |
| 853 | | for( y=0; y<bitmap.height(); y++ ) |
| 854 | | { |
| 855 | | UINT32 *dest = &bitmap.pix32(y); |
| 856 | | for( x=0; x<bitmap.width(); x++ ) |
| 857 | | { |
| 858 | | int rgb = dest[x]; |
| 859 | | int r = rlut[(rgb>>16)&0xff]; |
| 860 | | int g = glut[(rgb>>8)&0xff]; |
| 861 | | int b = blut[rgb&0xff]; |
| 862 | | dest[x] = (r<<16)|(g<<8)|b; |
| 863 | | } |
| 864 | | } |
| 865 | | } |
| 866 | | } |
| 867 | 573 | |
| 868 | | |
| 869 | | #define DSP_FIXED_TO_FLOAT( X ) (((INT16)(X))/(float)0x7fff) |
| 870 | | #define SPRITERAM_SIZE (0x9b0000-0x980000) |
| 871 | | #define CGRAM_SIZE 0x1e000 |
| 872 | | #define NUM_CG_CHARS ((CGRAM_SIZE*8)/(64*16)) /* 0x3c0 */ |
| 873 | | |
| 874 | | /* modal rendering properties */ |
| 875 | | static void matrix3d_Multiply( float A[4][4], float B[4][4] ) |
| 574 | void namcos22_renderer::render_sprite(screen_device &screen, bitmap_rgb32 &bitmap, struct namcos22_scenenode *node) |
| 876 | 575 | { |
| 877 | | float temp[4][4]; |
| 878 | | int row,col; |
| 576 | // scene clip |
| 577 | m_cliprect.set(node->data.sprite.cx_min, node->data.sprite.cx_max, node->data.sprite.cy_min, node->data.sprite.cy_max); |
| 578 | if (m_cliprect.min_x < 0) m_cliprect.min_x = 0; |
| 579 | if (m_cliprect.max_x > 639) m_cliprect.max_x = 639; |
| 580 | if (m_cliprect.min_y < 0) m_cliprect.min_y = 0; |
| 581 | if (m_cliprect.max_y > 479) m_cliprect.max_y = 479; |
| 879 | 582 | |
| 880 | | for( row=0;row<4;row++ ) |
| 881 | | { |
| 882 | | for(col=0;col<4;col++) |
| 883 | | { |
| 884 | | float sum = 0.0f; |
| 885 | | int i; |
| 886 | | for( i=0; i<4; i++ ) |
| 887 | | { |
| 888 | | sum += A[row][i]*B[i][col]; |
| 889 | | } |
| 890 | | temp[row][col] = sum; |
| 891 | | } |
| 892 | | } |
| 893 | | memcpy( A, temp, sizeof(temp) ); |
| 894 | | } |
| 583 | int offset = 0; |
| 895 | 584 | |
| 896 | | static void matrix3d_Identity( float M[4][4] ) |
| 897 | | { |
| 898 | | int r,c; |
| 899 | | |
| 900 | | for( r=0; r<4; r++ ) |
| 585 | for (int row = 0; row < node->data.sprite.rows; row++) |
| 901 | 586 | { |
| 902 | | for( c=0; c<4; c++ ) |
| 587 | for (int col = 0; col < node->data.sprite.cols; col++) |
| 903 | 588 | { |
| 904 | | M[r][c] = (r==c)?1.0:0.0; |
| 589 | int code = node->data.sprite.tile; |
| 590 | if (node->data.sprite.linktype == 0xff) |
| 591 | code += offset; |
| 592 | else |
| 593 | code += nthword(&m_state.m_spriteram[0x800/4], offset + node->data.sprite.linktype*4); |
| 594 | |
| 595 | poly3d_drawsprite( |
| 596 | screen, |
| 597 | bitmap, |
| 598 | code, |
| 599 | node->data.sprite.color, |
| 600 | node->data.sprite.flipx, |
| 601 | node->data.sprite.flipy, |
| 602 | node->data.sprite.xpos + col * node->data.sprite.sizex, |
| 603 | node->data.sprite.ypos + row * node->data.sprite.sizey, |
| 604 | (node->data.sprite.sizex << 16) / 32, |
| 605 | (node->data.sprite.sizey << 16) / 32, |
| 606 | node->data.sprite.cz, |
| 607 | node->data.sprite.pri, |
| 608 | 0xff - node->data.sprite.translucency |
| 609 | ); |
| 610 | offset++; |
| 905 | 611 | } |
| 906 | 612 | } |
| 907 | 613 | } |
| 908 | 614 | |
| 909 | | static void TransformPoint( float *vx, float *vy, float *vz, float m[4][4] ) |
| 910 | | { |
| 911 | | float x = *vx; |
| 912 | | float y = *vy; |
| 913 | | float z = *vz; |
| 914 | | *vx = m[0][0]*x + m[1][0]*y + m[2][0]*z + m[3][0]; |
| 915 | | *vy = m[0][1]*x + m[1][1]*y + m[2][1]*z + m[3][1]; |
| 916 | | *vz = m[0][2]*x + m[1][2]*y + m[2][2]*z + m[3][2]; |
| 917 | | } |
| 918 | 615 | |
| 919 | | static void TransformNormal( float *nx, float *ny, float *nz, float m[4][4] ) |
| 920 | | { |
| 921 | | float x = *nx; |
| 922 | | float y = *ny; |
| 923 | | float z = *nz; |
| 924 | | *nx = m[0][0]*x + m[1][0]*y + m[2][0]*z; |
| 925 | | *ny = m[0][1]*x + m[1][1]*y + m[2][1]*z; |
| 926 | | *nz = m[0][2]*x + m[1][2]*y + m[2][2]*z; |
| 927 | | } |
| 928 | 616 | |
| 617 | /*********************************************************************************************/ |
| 929 | 618 | |
| 930 | | |
| 931 | | static struct |
| 619 | void namcos22_renderer::free_scenenode(struct namcos22_scenenode *node) |
| 932 | 620 | { |
| 933 | | float zoom, vx, vy, vw, vh; |
| 934 | | float lx,ly,lz; /* unit vector for light direction */ |
| 935 | | int ambient; /* 0.0..1.0 */ |
| 936 | | int power; /* 0.0..1.0 */ |
| 937 | | } mCamera; |
| 938 | | |
| 939 | | enum SceneNodeType |
| 940 | | { |
| 941 | | eSCENENODE_NONLEAF, |
| 942 | | eSCENENODE_QUAD3D, |
| 943 | | eSCENENODE_SPRITE |
| 944 | | }; |
| 945 | | |
| 946 | | #define RADIX_BITS 4 |
| 947 | | #define RADIX_BUCKETS (1<<RADIX_BITS) |
| 948 | | #define RADIX_MASK (RADIX_BUCKETS-1) |
| 949 | | |
| 950 | | struct SceneNode |
| 951 | | { |
| 952 | | SceneNodeType type; |
| 953 | | struct SceneNode *nextInBucket; |
| 954 | | union |
| 955 | | { |
| 956 | | struct |
| 957 | | { |
| 958 | | struct SceneNode *next[RADIX_BUCKETS]; |
| 959 | | } nonleaf; |
| 960 | | |
| 961 | | struct |
| 962 | | { |
| 963 | | float vx,vy,vw,vh; |
| 964 | | int textureBank; |
| 965 | | int color; |
| 966 | | int cmode; |
| 967 | | int flags; |
| 968 | | int cz_adjust; |
| 969 | | int direct; |
| 970 | | Poly3dVertex v[4]; |
| 971 | | } quad3d; |
| 972 | | |
| 973 | | struct |
| 974 | | { |
| 975 | | int tile, color, pri; |
| 976 | | int flipx, flipy; |
| 977 | | int linkType; |
| 978 | | int numcols, numrows; |
| 979 | | int xpos, ypos; |
| 980 | | int cx_min, cx_max; |
| 981 | | int cy_min, cy_max; |
| 982 | | int sizex, sizey; |
| 983 | | int translucency; |
| 984 | | int cz; |
| 985 | | } sprite; |
| 986 | | } data; |
| 987 | | }; |
| 988 | | static struct SceneNode mSceneRoot; |
| 989 | | static struct SceneNode *mpFreeSceneNode; |
| 990 | | |
| 991 | | static void FreeSceneNode( struct SceneNode *node ) |
| 992 | | { |
| 993 | | node->nextInBucket = mpFreeSceneNode; |
| 994 | | mpFreeSceneNode = node; |
| 621 | node->next = m_scenenode_cur; |
| 622 | m_scenenode_cur = node; |
| 995 | 623 | } |
| 996 | 624 | |
| 997 | | static struct SceneNode *MallocSceneNode( running_machine &machine ) |
| 625 | struct namcos22_scenenode *namcos22_renderer::alloc_scenenode(running_machine &machine, struct namcos22_scenenode *node) |
| 998 | 626 | { |
| 999 | | struct SceneNode *node = mpFreeSceneNode; |
| 1000 | | if( node ) |
| 627 | if (node) |
| 1001 | 628 | { |
| 1002 | 629 | /* use free pool */ |
| 1003 | | mpFreeSceneNode = node->nextInBucket; |
| 630 | m_scenenode_cur = node->next; |
| 1004 | 631 | } |
| 1005 | 632 | else |
| 1006 | 633 | { |
| 1007 | | node = auto_alloc(machine, struct SceneNode); |
| 634 | node = auto_alloc(machine, struct namcos22_scenenode); |
| 1008 | 635 | } |
| 1009 | | memset( node, 0, sizeof(*node) ); |
| 636 | memset(node, 0, sizeof(*node)); |
| 1010 | 637 | return node; |
| 1011 | 638 | } |
| 1012 | 639 | |
| 1013 | | static struct SceneNode *NewSceneNode( running_machine &machine, UINT32 zsortvalue24, SceneNodeType type ) |
| 640 | struct namcos22_scenenode *namcos22_renderer::new_scenenode(running_machine &machine, UINT32 zsort, namcos22_scenenode_type type) |
| 1014 | 641 | { |
| 1015 | | struct SceneNode *node = &mSceneRoot; |
| 1016 | | struct SceneNode *prev = NULL; |
| 1017 | | int i, hash = 0; |
| 1018 | | for( i=0; i<24; i+=RADIX_BITS ) |
| 642 | struct namcos22_scenenode *node = &m_scenenode_root; |
| 643 | struct namcos22_scenenode *prev = NULL; |
| 644 | int hash; |
| 645 | |
| 646 | for (int i = 0; i < 24; i += NAMCOS22_RADIX_BITS) |
| 1019 | 647 | { |
| 1020 | | hash = (zsortvalue24>>20)&RADIX_MASK; |
| 1021 | | struct SceneNode *next = node->data.nonleaf.next[hash]; |
| 1022 | | if( !next ) |
| 648 | hash = (zsort >> 20) & NAMCOS22_RADIX_MASK; |
| 649 | struct namcos22_scenenode *next = node->data.nonleaf.next[hash]; |
| 650 | if (!next) |
| 1023 | 651 | { |
| 1024 | 652 | /* lazily allocate tree node for this radix */ |
| 1025 | | next = MallocSceneNode(machine); |
| 1026 | | next->type = eSCENENODE_NONLEAF; |
| 653 | next = alloc_scenenode(machine, m_scenenode_cur); |
| 654 | next->type = NAMCOS22_SCENENODE_NONLEAF; |
| 1027 | 655 | node->data.nonleaf.next[hash] = next; |
| 1028 | 656 | } |
| 1029 | 657 | prev = node; |
| 1030 | 658 | node = next; |
| 1031 | | zsortvalue24 <<= RADIX_BITS; |
| 659 | zsort <<= NAMCOS22_RADIX_BITS; |
| 1032 | 660 | } |
| 1033 | 661 | |
| 1034 | | if( node->type == eSCENENODE_NONLEAF ) |
| 662 | if (node->type == NAMCOS22_SCENENODE_NONLEAF) |
| 1035 | 663 | { |
| 1036 | 664 | /* first leaf allocation on this branch */ |
| 1037 | 665 | node->type = type; |
| r24771 | r24772 | |
| 1039 | 667 | } |
| 1040 | 668 | else |
| 1041 | 669 | { |
| 1042 | | struct SceneNode *leaf = MallocSceneNode(machine); |
| 670 | struct namcos22_scenenode *leaf = alloc_scenenode(machine, m_scenenode_cur); |
| 1043 | 671 | leaf->type = type; |
| 1044 | | leaf->nextInBucket = node; |
| 672 | leaf->next = node; |
| 1045 | 673 | prev->data.nonleaf.next[hash] = leaf; |
| 1046 | 674 | return leaf; |
| 1047 | 675 | } |
| 1048 | 676 | } |
| 1049 | 677 | |
| 1050 | | |
| 1051 | | static void RenderSprite(screen_device &screen, bitmap_rgb32 &bitmap, struct SceneNode *node ) |
| 678 | void namcos22_renderer::render_scene_nodes(screen_device &screen, bitmap_rgb32 &bitmap, struct namcos22_scenenode *node) |
| 1052 | 679 | { |
| 1053 | | namcos22_state *state = screen.machine().driver_data<namcos22_state>(); |
| 1054 | | int tile = node->data.sprite.tile; |
| 1055 | | int col,row; |
| 1056 | | int i = 0; |
| 1057 | | for( row=0; row<node->data.sprite.numrows; row++ ) |
| 680 | if (node) |
| 1058 | 681 | { |
| 1059 | | for( col=0; col<node->data.sprite.numcols; col++ ) |
| 682 | if (node->type == NAMCOS22_SCENENODE_NONLEAF) |
| 1060 | 683 | { |
| 1061 | | int code = tile; |
| 1062 | | if( node->data.sprite.linkType == 0xff ) |
| 1063 | | code += i; |
| 1064 | | else |
| 1065 | | code += nthword( &state->m_spriteram[0x800/4], i+node->data.sprite.linkType*4 ); |
| 1066 | | |
| 1067 | | poly3d_DrawSprite( |
| 1068 | | screen, |
| 1069 | | bitmap, |
| 1070 | | screen.machine().gfx[GFX_SPRITE], |
| 1071 | | code, |
| 1072 | | node->data.sprite.color, |
| 1073 | | node->data.sprite.flipx, |
| 1074 | | node->data.sprite.flipy, |
| 1075 | | node->data.sprite.xpos+col*node->data.sprite.sizex, |
| 1076 | | node->data.sprite.ypos+row*node->data.sprite.sizey, |
| 1077 | | (node->data.sprite.sizex<<16)/32, |
| 1078 | | (node->data.sprite.sizey<<16)/32, |
| 1079 | | node->data.sprite.cz, |
| 1080 | | node->data.sprite.pri, |
| 1081 | | 0xff - node->data.sprite.translucency |
| 1082 | | ); |
| 1083 | | i++; |
| 1084 | | } |
| 1085 | | } |
| 1086 | | } |
| 1087 | | |
| 1088 | | static void RenderSceneHelper(screen_device &screen, bitmap_rgb32 &bitmap, struct SceneNode *node ) |
| 1089 | | { |
| 1090 | | if( node ) |
| 1091 | | { |
| 1092 | | if( node->type == eSCENENODE_NONLEAF ) |
| 1093 | | { |
| 1094 | | int i; |
| 1095 | | for( i=RADIX_BUCKETS-1; i>=0; i-- ) |
| 684 | for (int i = NAMCOS22_RADIX_BUCKETS - 1; i >= 0; i--) |
| 1096 | 685 | { |
| 1097 | | RenderSceneHelper(screen, bitmap, node->data.nonleaf.next[i] ); |
| 686 | render_scene_nodes(screen, bitmap, node->data.nonleaf.next[i]); |
| 1098 | 687 | } |
| 1099 | | FreeSceneNode( node ); |
| 688 | free_scenenode(node); |
| 1100 | 689 | } |
| 1101 | 690 | else |
| 1102 | 691 | { |
| 1103 | | while( node ) |
| 692 | while (node) |
| 1104 | 693 | { |
| 1105 | | struct SceneNode *next = node->nextInBucket; |
| 694 | struct namcos22_scenenode *next = node->next; |
| 1106 | 695 | |
| 1107 | | switch( node->type ) |
| 696 | switch (node->type) |
| 1108 | 697 | { |
| 1109 | | case eSCENENODE_QUAD3D: |
| 1110 | | poly3d_Clip( |
| 1111 | | node->data.quad3d.vx, |
| 1112 | | node->data.quad3d.vy, |
| 1113 | | node->data.quad3d.vw, |
| 1114 | | node->data.quad3d.vh |
| 1115 | | ); |
| 1116 | | poly3d_DrawQuad(screen, |
| 1117 | | bitmap, |
| 1118 | | node->data.quad3d.textureBank, |
| 1119 | | node->data.quad3d.color, |
| 1120 | | node->data.quad3d.v, |
| 1121 | | node->data.quad3d.flags, |
| 1122 | | node->data.quad3d.cz_adjust, |
| 1123 | | node->data.quad3d.direct, |
| 1124 | | node->data.quad3d.cmode |
| 1125 | | ); |
| 1126 | | break; |
| 698 | case NAMCOS22_SCENENODE_QUAD: |
| 699 | poly3d_drawquad(screen, bitmap, node); |
| 700 | break; |
| 1127 | 701 | |
| 1128 | | case eSCENENODE_SPRITE: |
| 1129 | | sprite_Clip( |
| 1130 | | node->data.sprite.cx_min, |
| 1131 | | node->data.sprite.cx_max, |
| 1132 | | node->data.sprite.cy_min, |
| 1133 | | node->data.sprite.cy_max |
| 1134 | | ); |
| 1135 | | RenderSprite(screen, bitmap, node ); |
| 1136 | | break; |
| 702 | case NAMCOS22_SCENENODE_SPRITE: |
| 703 | render_sprite(screen, bitmap, node); |
| 704 | break; |
| 1137 | 705 | |
| 1138 | | default: |
| 1139 | | fatalerror("invalid node->type\n"); |
| 1140 | | break; |
| 706 | default: |
| 707 | fatalerror("invalid node->type\n"); |
| 708 | break; |
| 1141 | 709 | } |
| 1142 | | FreeSceneNode( node ); |
| 710 | free_scenenode(node); |
| 1143 | 711 | node = next; |
| 1144 | 712 | } |
| 1145 | 713 | } |
| 1146 | 714 | } |
| 1147 | 715 | } |
| 1148 | 716 | |
| 1149 | | static void RenderScene(screen_device &screen, bitmap_rgb32 &bitmap ) |
| 717 | void namcos22_renderer::render_scene(screen_device &screen, bitmap_rgb32 &bitmap) |
| 1150 | 718 | { |
| 1151 | | namcos22_state *state = screen.machine().driver_data<namcos22_state>(); |
| 1152 | | struct SceneNode *node = &mSceneRoot; |
| 1153 | | int i; |
| 1154 | | for( i=RADIX_BUCKETS-1; i>=0; i-- ) |
| 719 | struct namcos22_scenenode *node = &m_scenenode_root; |
| 720 | for (int i = NAMCOS22_RADIX_BUCKETS - 1; i >= 0; i--) |
| 1155 | 721 | { |
| 1156 | | RenderSceneHelper(screen, bitmap, node->data.nonleaf.next[i] ); |
| 722 | render_scene_nodes(screen, bitmap, node->data.nonleaf.next[i]); |
| 1157 | 723 | node->data.nonleaf.next[i] = NULL; |
| 1158 | 724 | } |
| 1159 | | poly3d_NoClip(); |
| 1160 | | poly_wait(state->m_poly, "DrawPolygons"); |
| 725 | |
| 726 | m_clipx = 320; |
| 727 | m_clipy = 240; |
| 728 | m_cliprect.set(0, 639, 0, 479); |
| 729 | |
| 730 | wait("render_scene"); |
| 1161 | 731 | } |
| 1162 | 732 | |
| 1163 | | static float DspFloatToNativeFloat( UINT32 iVal ) |
| 733 | |
| 734 | |
| 735 | /*********************************************************************************************/ |
| 736 | |
| 737 | // slave dsp render |
| 738 | |
| 739 | float namcos22_state::dspfloat_to_nativefloat(UINT32 val) |
| 1164 | 740 | { |
| 1165 | | INT16 mantissa = (INT16)iVal; |
| 741 | INT16 mantissa = (INT16)val; |
| 1166 | 742 | float result = mantissa;//?((float)mantissa):((float)0x10000); |
| 1167 | | int exponent = (iVal>>16)&0xff; |
| 1168 | | while( exponent<0x2e ) |
| 743 | int exponent = (val >> 16) & 0xff; |
| 744 | while (exponent < 0x2e) |
| 1169 | 745 | { |
| 1170 | 746 | result /= 2.0; |
| 1171 | 747 | exponent++; |
| r24771 | r24772 | |
| 1173 | 749 | return result; |
| 1174 | 750 | } |
| 1175 | 751 | |
| 1176 | | static INT32 GetPolyData( namcos22_state *state, INT32 addr ) |
| 752 | /* modal rendering properties */ |
| 753 | void namcos22_state::matrix3d_multiply(float a[4][4], float b[4][4]) |
| 1177 | 754 | { |
| 1178 | | UINT32 result; |
| 1179 | | if( addr<0 || addr>=state->m_PtRomSize ) |
| 755 | float temp[4][4]; |
| 756 | |
| 757 | for (int row = 0; row < 4; row++) |
| 1180 | 758 | { |
| 1181 | | // point ram, only used in ram test? |
| 1182 | | if( state->m_bSuperSystem22 ) |
| 759 | for (int col = 0; col < 4; col++) |
| 1183 | 760 | { |
| 1184 | | if( addr>=0xf80000 && addr<=0xf9ffff ) |
| 1185 | | result = state->m_pPointRAM[addr-0xf80000]; |
| 1186 | | else return -1; |
| 761 | float sum = 0.0f; |
| 762 | for (int i = 0; i < 4; i++) |
| 763 | { |
| 764 | sum += a[row][i] * b[i][col]; |
| 765 | } |
| 766 | temp[row][col] = sum; |
| 1187 | 767 | } |
| 1188 | | else |
| 1189 | | { |
| 1190 | | if( addr>=0xf00000 && addr<=0xf1ffff ) |
| 1191 | | result = state->m_pPointRAM[addr-0xf00000]; |
| 1192 | | else return -1; |
| 1193 | | } |
| 1194 | 768 | } |
| 1195 | | else |
| 1196 | | { |
| 1197 | | result = (state->m_pPolyH[addr]<<16)|(state->m_pPolyM[addr]<<8)|state->m_pPolyL[addr]; |
| 1198 | | } |
| 1199 | | if( result&0x00800000 ) |
| 1200 | | result |= 0xff000000; /* sign extend */ |
| 1201 | | return result; |
| 769 | |
| 770 | memcpy(a, temp, sizeof(temp)); |
| 1202 | 771 | } |
| 1203 | 772 | |
| 1204 | | UINT32 namcos22_point_rom_r( running_machine &machine, offs_t offs ) |
| 773 | void namcos22_state::matrix3d_identity(float m[4][4]) |
| 1205 | 774 | { |
| 1206 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 1207 | | return GetPolyData(state, offs & 0x00ffffff); |
| 775 | for (int r = 0; r < 4; r++) |
| 776 | { |
| 777 | for (int c = 0; c < 4; c++) |
| 778 | { |
| 779 | m[r][c] = (r == c) ? 1.0 : 0.0; |
| 780 | } |
| 781 | } |
| 1208 | 782 | } |
| 1209 | 783 | |
| 1210 | | |
| 1211 | | WRITE32_MEMBER(namcos22_state::namcos22s_czram_w) |
| 784 | void namcos22_state::transform_point(float *vx, float *vy, float *vz, float m[4][4]) |
| 1212 | 785 | { |
| 1213 | | int bank = nthword(m_czattr,0xa/2)&3; |
| 1214 | | UINT16 *czram = m_banked_czram[bank]; |
| 1215 | | UINT32 dat = (czram[offset*2]<<16)|czram[offset*2+1]; |
| 1216 | | UINT32 prev = dat; |
| 1217 | | COMBINE_DATA( &dat ); |
| 1218 | | czram[offset*2] = dat>>16; |
| 1219 | | czram[offset*2+1] = dat&0xffff; |
| 1220 | | m_cz_was_written[bank] |= (prev^dat); |
| 786 | float x = *vx; |
| 787 | float y = *vy; |
| 788 | float z = *vz; |
| 789 | |
| 790 | *vx = m[0][0]*x + m[1][0]*y + m[2][0]*z + m[3][0]; |
| 791 | *vy = m[0][1]*x + m[1][1]*y + m[2][1]*z + m[3][1]; |
| 792 | *vz = m[0][2]*x + m[1][2]*y + m[2][2]*z + m[3][2]; |
| 1221 | 793 | } |
| 1222 | 794 | |
| 1223 | | READ32_MEMBER(namcos22_state::namcos22s_czram_r) |
| 795 | void namcos22_state::transform_normal(float *nx, float *ny, float *nz, float m[4][4]) |
| 1224 | 796 | { |
| 1225 | | int bank = nthword(m_czattr,0xa/2)&3; |
| 1226 | | const UINT16 *czram = m_banked_czram[bank]; |
| 1227 | | return (czram[offset*2]<<16)|czram[offset*2+1]; |
| 797 | float x = *nx; |
| 798 | float y = *ny; |
| 799 | float z = *nz; |
| 800 | |
| 801 | *nx = m[0][0]*x + m[1][0]*y + m[2][0]*z; |
| 802 | *ny = m[0][1]*x + m[1][1]*y + m[2][1]*z; |
| 803 | *nz = m[0][2]*x + m[1][2]*y + m[2][2]*z; |
| 1228 | 804 | } |
| 1229 | 805 | |
| 1230 | | static void namcos22s_recalc_czram( running_machine &machine ) |
| 806 | void namcos22_state::register_normals(INT32 addr, float m[4][4]) |
| 1231 | 807 | { |
| 1232 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 1233 | | int i, j, table; |
| 1234 | | for (table=0; table<4; table++) |
| 808 | for (int i = 0; i < 4; i++) |
| 1235 | 809 | { |
| 1236 | | // as documented above, ss22 czram is 'just' a big compare table |
| 1237 | | // this is very slow when emulating, so let's recalculate it to a simpler lookup table |
| 1238 | | if (state->m_cz_was_written[table]) |
| 1239 | | { |
| 1240 | | const UINT16 *src = state->m_banked_czram[table]; |
| 1241 | | UINT8 *dest = state->m_recalc_czram[table]; |
| 1242 | | int small_val = 0x2000; |
| 1243 | | int small_offset = 0; |
| 1244 | | int large_val = 0; |
| 1245 | | int large_offset = 0; |
| 1246 | | int prev = 0x2000; |
| 810 | float nx = dspfixed_to_nativefloat(point_read(addr + i * 3 + 0)); |
| 811 | float ny = dspfixed_to_nativefloat(point_read(addr + i * 3 + 1)); |
| 812 | float nz = dspfixed_to_nativefloat(point_read(addr + i * 3 + 2)); |
| 1247 | 813 | |
| 1248 | | for (i=0; i<0x100; i++) |
| 1249 | | { |
| 1250 | | int val = src[i]; |
| 814 | /* transform normal vector */ |
| 815 | transform_normal(&nx, &ny, &nz, m); |
| 816 | float dotproduct = nx*m_camera_lx + ny*m_camera_ly + nz*m_camera_lz; |
| 817 | if (dotproduct < 0.0f) |
| 818 | dotproduct = 0.0f; |
| 1251 | 819 | |
| 1252 | | // discard if larger than 1fff |
| 1253 | | if (val>0x1fff) val = prev; |
| 1254 | | if (prev>0x1fff) |
| 1255 | | { |
| 1256 | | prev = val; |
| 1257 | | continue; |
| 1258 | | } |
| 1259 | | |
| 1260 | | int start = prev; |
| 1261 | | int end = val; |
| 1262 | | if (start>end) |
| 1263 | | { |
| 1264 | | start = val; |
| 1265 | | end = prev; |
| 1266 | | } |
| 1267 | | prev = val; |
| 1268 | | |
| 1269 | | // fill range |
| 1270 | | for (j=start; j<end; j++) |
| 1271 | | dest[j] = i; |
| 1272 | | |
| 1273 | | // remember largest/smallest for later |
| 1274 | | if (val<small_val) |
| 1275 | | { |
| 1276 | | small_val = val; |
| 1277 | | small_offset = i; |
| 1278 | | } |
| 1279 | | if (val>large_val) |
| 1280 | | { |
| 1281 | | large_val = val; |
| 1282 | | large_offset = i; |
| 1283 | | } |
| 1284 | | } |
| 1285 | | |
| 1286 | | // fill possible leftover ranges |
| 1287 | | for (j=0; j<small_val; j++) |
| 1288 | | dest[j] = small_offset; |
| 1289 | | for (j=large_val; j<0x2000; j++) |
| 1290 | | dest[j] = large_offset; |
| 1291 | | |
| 1292 | | state->m_cz_was_written[table] = 0; |
| 1293 | | } |
| 820 | m_LitSurfaceInfo[m_LitSurfaceCount++] = m_camera_ambient + m_camera_power * dotproduct; |
| 1294 | 821 | } |
| 1295 | 822 | } |
| 1296 | 823 | |
| 1297 | 824 | |
| 1298 | | static void InitXYAttrToPixel( namcos22_state *state ) |
| 825 | void namcos22_state::draw_direct_poly(const UINT16 *src) |
| 1299 | 826 | { |
| 1300 | | unsigned attr,x,y,ix,iy,temp; |
| 1301 | | for( attr=0; attr<16; attr++ ) |
| 1302 | | { |
| 1303 | | for( y=0; y<16; y++ ) |
| 1304 | | { |
| 1305 | | for( x=0; x<16; x++ ) |
| 1306 | | { |
| 1307 | | ix = x; iy = y; |
| 1308 | | if( attr&4 ) ix = 15-ix; |
| 1309 | | if( attr&2 ) iy = 15-iy; |
| 1310 | | if( attr&8 ){ temp = ix; ix = iy; iy = temp; } |
| 1311 | | state->m_XYAttrToPixel[attr][x][y] = (iy<<4)|ix; |
| 1312 | | } |
| 1313 | | } |
| 1314 | | } |
| 1315 | | } |
| 827 | if (machine().video().skip_this_frame()) |
| 828 | return; |
| 1316 | 829 | |
| 1317 | | static void PatchTexture( namcos22_state *state ) |
| 1318 | | { |
| 1319 | | int i; |
| 1320 | | switch( state->m_gametype ) |
| 1321 | | { |
| 1322 | | case NAMCOS22_RIDGE_RACER: |
| 1323 | | case NAMCOS22_RIDGE_RACER2: |
| 1324 | | case NAMCOS22_ACE_DRIVER: |
| 1325 | | case NAMCOS22_CYBER_COMMANDO: |
| 1326 | | for( i=0; i<0x100000; i++ ) |
| 1327 | | { |
| 1328 | | int tile = state->m_pTextureTileMap16[i]; |
| 1329 | | int attr = state->m_pTextureTileMapAttr[i]; |
| 1330 | | if( (attr&0x1)==0 ) |
| 1331 | | { |
| 1332 | | tile = (tile&0x3fff)|0x8000; |
| 1333 | | state->m_pTextureTileMap16[i] = tile; |
| 1334 | | } |
| 1335 | | } |
| 1336 | | break; |
| 1337 | | |
| 1338 | | default: |
| 1339 | | break; |
| 1340 | | } |
| 1341 | | } |
| 1342 | | |
| 1343 | | void namcos22_draw_direct_poly( running_machine &machine, const UINT16 *pSource ) |
| 1344 | | { |
| 1345 | | if (machine.video().skip_this_frame()) return; |
| 1346 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 1347 | | int polys_enabled = state->m_bSuperSystem22 ? nthbyte(state->m_gamma,0x1f)&1 : 1; |
| 830 | int polys_enabled = m_is_ss22 ? nthbyte(m_mixer, 0x1f) & 1 : 1; |
| 1348 | 831 | if (!polys_enabled) return; |
| 1349 | 832 | /** |
| 1350 | 833 | * word#0: |
| r24771 | r24772 | |
| 1371 | 854 | * xx-- ---- // BRI |
| 1372 | 855 | * --xx xxxx // zpos |
| 1373 | 856 | */ |
| 1374 | | UINT32 zsortvalue24 = ((pSource[1]&0xfff)<<12)|(pSource[0]&0xfff); |
| 1375 | | struct SceneNode *node = NewSceneNode(machine, zsortvalue24, eSCENENODE_QUAD3D); |
| 1376 | | int i, cztype = pSource[3]&3; |
| 1377 | | if( state->m_bSuperSystem22 ) |
| 857 | UINT32 zsort = ((src[1] & 0xfff) << 12) | (src[0] & 0xfff); |
| 858 | struct namcos22_scenenode *node = m_poly->new_scenenode(machine(), zsort, NAMCOS22_SCENENODE_QUAD); |
| 859 | int cztype = src[3] & 3; |
| 860 | |
| 861 | if (m_is_ss22) |
| 1378 | 862 | { |
| 1379 | 863 | cztype ^= 3; // ? not sure, but this makes testmode look like on a pcb (only 1 pcb checked) |
| 1380 | | node->data.quad3d.cmode = (pSource[2]&0x00f0)>>4; |
| 1381 | | node->data.quad3d.textureBank = (pSource[2]&0x000f); |
| 864 | node->data.quad.cmode = (src[2] & 0x00f0) >> 4; |
| 865 | node->data.quad.texturebank = (src[2] & 0x000f); |
| 1382 | 866 | } |
| 1383 | 867 | else |
| 1384 | 868 | { |
| 1385 | | node->data.quad3d.cmode = (pSource[0+4]&0xf000)>>12; |
| 1386 | | node->data.quad3d.textureBank = (pSource[1+4]&0xf000)>>12; |
| 869 | node->data.quad.cmode = (src[0 + 4] & 0xf000) >> 12; |
| 870 | node->data.quad.texturebank = (src[1 + 4] & 0xf000) >> 12; |
| 1387 | 871 | } |
| 1388 | | node->data.quad3d.cz_adjust = state->m_cz_adjust; |
| 1389 | | node->data.quad3d.flags = (pSource[3]<<6&0x1fff00) | cztype; |
| 1390 | | node->data.quad3d.color = (pSource[2]&0xff00)>>8; |
| 1391 | | pSource += 4; |
| 1392 | | for( i=0; i<4; i++ ) |
| 872 | node->data.quad.cz_adjust = m_cz_adjust; |
| 873 | node->data.quad.flags = (src[3] << 6 & 0x1fff00) | cztype; |
| 874 | node->data.quad.color = (src[2] & 0xff00) >> 8; |
| 875 | src += 4; |
| 876 | |
| 877 | for (int i = 0; i < 4; i++) |
| 1393 | 878 | { |
| 1394 | | Poly3dVertex *p = &node->data.quad3d.v[i]; |
| 1395 | | if( state->m_bSuperSystem22 ) |
| 879 | namcos22_polyvertex *p = &node->data.quad.v[i]; |
| 880 | if (m_is_ss22) |
| 1396 | 881 | { |
| 1397 | | p->u = pSource[0] >> 4; |
| 1398 | | p->v = pSource[1] >> 4; |
| 882 | p->u = src[0] >> 4; |
| 883 | p->v = src[1] >> 4; |
| 1399 | 884 | } |
| 1400 | 885 | else |
| 1401 | 886 | { |
| 1402 | | p->u = pSource[0] & 0x0fff; |
| 1403 | | p->v = pSource[1] & 0x0fff; |
| 887 | p->u = src[0] & 0x0fff; |
| 888 | p->v = src[1] & 0x0fff; |
| 1404 | 889 | } |
| 1405 | 890 | |
| 1406 | | int mantissa = (INT16)pSource[5]; |
| 891 | int mantissa = (INT16)src[5]; |
| 1407 | 892 | float zf = (float)mantissa; |
| 1408 | | int exponent = (pSource[4])&0xff; |
| 1409 | | if( mantissa ) |
| 893 | int exponent = (src[4]) & 0xff; |
| 894 | if (mantissa) |
| 1410 | 895 | { |
| 1411 | | while( exponent<0x2e ) |
| 896 | while (exponent < 0x2e) |
| 1412 | 897 | { |
| 1413 | 898 | zf /= 2.0; |
| 1414 | 899 | exponent++; |
| 1415 | 900 | } |
| 1416 | | if( state->m_bSuperSystem22 ) |
| 901 | if (m_is_ss22) |
| 1417 | 902 | p->z = zf; |
| 1418 | 903 | else |
| 1419 | | p->z = 1.0f/zf; |
| 904 | p->z = 1.0f / zf; |
| 1420 | 905 | } |
| 1421 | 906 | else |
| 1422 | 907 | { |
| 1423 | 908 | zf = (float)0x10000; |
| 1424 | | exponent = 0x40-exponent; |
| 1425 | | while( exponent<0x2e ) |
| 909 | exponent = 0x40 - exponent; |
| 910 | while (exponent < 0x2e) |
| 1426 | 911 | { |
| 1427 | 912 | zf /= 2.0; |
| 1428 | 913 | exponent++; |
| 1429 | 914 | } |
| 1430 | | p->z = 1.0f/zf; |
| 915 | p->z = 1.0f / zf; |
| 1431 | 916 | } |
| 1432 | 917 | |
| 1433 | | p->x = ((INT16)pSource[2]); |
| 1434 | | p->y = (-(INT16)pSource[3]); |
| 1435 | | p->bri = pSource[4]>>8; |
| 1436 | | pSource += 6; |
| 918 | p->x = (INT16)src[2]; |
| 919 | p->y = -(INT16)src[3]; |
| 920 | p->bri = src[4] >> 8; |
| 921 | src += 6; |
| 1437 | 922 | } |
| 1438 | | node->data.quad3d.direct = 1; |
| 1439 | | node->data.quad3d.vx = 0; |
| 1440 | | node->data.quad3d.vy = 0; |
| 1441 | | node->data.quad3d.vw = -320; |
| 1442 | | node->data.quad3d.vh = -240; |
| 923 | |
| 924 | node->data.quad.direct = 1; |
| 925 | node->data.quad.vx = 0; |
| 926 | node->data.quad.vy = 0; |
| 927 | node->data.quad.vw = -320; |
| 928 | node->data.quad.vh = -240; |
| 1443 | 929 | } |
| 1444 | 930 | |
| 1445 | | static void Prepare3dTexture( running_machine &machine, void *pTilemapROM, const void *pTextureROM ) |
| 931 | /** |
| 932 | * @brief render a single quad |
| 933 | * |
| 934 | * @param flags |
| 935 | * 00-1.----.01-0.001- ? (always set/clear) |
| 936 | * --x-.----.----.---- ? |
| 937 | * ----.xx--.----.---- cz table |
| 938 | * ----.--xx.----.---- representative z algorithm? |
| 939 | * ----.----.--x-.---- backface cull enable |
| 940 | * ----.----.----.---x ? |
| 941 | * |
| 942 | * 1163 // sky |
| 943 | * 1262 // score (front) |
| 944 | * 1242 // score (hinge) |
| 945 | * 1243 // ? |
| 946 | * 1063 // n/a |
| 947 | * 1243 // various (2-sided?) |
| 948 | * 1263 // everything else (1-sided?) |
| 949 | * 1663 // ? |
| 950 | * |
| 951 | * @param color |
| 952 | * xxxxxxxx -------- -------- flat shading factor |
| 953 | * -------- x------- -------- fog enable |
| 954 | * -------- -xxxxxxx -------- palette select |
| 955 | * -------- -------- xxxxxxxx unused? |
| 956 | * |
| 957 | * @param polyshift |
| 958 | * 0x1fbd0 - sky+sea |
| 959 | * 0x0c350 - mountains |
| 960 | * 0x09c40 - boats, surf, road, buildings |
| 961 | * 0x07350 - guardrail |
| 962 | * 0x061a8 - red car |
| 963 | */ |
| 964 | void namcos22_state::blit_single_quad(bitmap_rgb32 &bitmap, UINT32 color, UINT32 addr, float m[4][4], INT32 polyshift, int flags, int packetformat) |
| 1446 | 965 | { |
| 1447 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 966 | int absolute_priority = m_absolute_priority; |
| 967 | INT32 zsort; |
| 968 | float zmin = 0.0f; |
| 969 | float zmax = 0.0f; |
| 970 | namcos22_polyvertex v[4]; |
| 1448 | 971 | int i; |
| 1449 | | assert( pTilemapROM && pTextureROM ); |
| 972 | |
| 973 | for (i = 0; i < 4; i++) |
| 1450 | 974 | { |
| 1451 | | /* following setup is Namco System 22 specific */ |
| 1452 | | const UINT8 *pPackedTileAttr = 0x200000 + (UINT8 *)pTilemapROM; |
| 1453 | | UINT8 *pUnpackedTileAttr = auto_alloc_array(machine, UINT8, 0x080000*2); |
| 975 | namcos22_polyvertex *pv = &v[i]; |
| 976 | pv->x = point_read(0x8 + i * 3 + addr); |
| 977 | pv->y = point_read(0x9 + i * 3 + addr); |
| 978 | pv->z = point_read(0xa + i * 3 + addr); |
| 979 | transform_point(&pv->x, &pv->y, &pv->z, m); |
| 980 | } |
| 981 | |
| 982 | /* backface cull one-sided polygons */ |
| 983 | if (flags & 0x0020 && |
| 984 | (v[2].x*((v[0].z*v[1].y)-(v[0].y*v[1].z)))+ |
| 985 | (v[2].y*((v[0].x*v[1].z)-(v[0].z*v[1].x)))+ |
| 986 | (v[2].z*((v[0].y*v[1].x)-(v[0].x*v[1].y))) >= 0 && |
| 987 | |
| 988 | (v[0].x*((v[2].z*v[3].y)-(v[2].y*v[3].z)))+ |
| 989 | (v[0].y*((v[2].x*v[3].z)-(v[2].z*v[3].x)))+ |
| 990 | (v[0].z*((v[2].y*v[3].x)-(v[2].x*v[3].y))) >= 0) |
| 991 | { |
| 992 | return; |
| 993 | } |
| 994 | |
| 995 | for (i = 0; i < 4; i++) |
| 996 | { |
| 997 | namcos22_polyvertex *pv = &v[i]; |
| 998 | int bri; |
| 999 | |
| 1000 | pv->u = point_read(0 + i * 2 + addr); |
| 1001 | pv->v = point_read(1 + i * 2 + addr); |
| 1002 | |
| 1003 | if (i == 0 || pv->z > zmax) zmax = pv->z; |
| 1004 | if (i == 0 || pv->z < zmin) zmin = pv->z; |
| 1005 | |
| 1006 | if (m_LitSurfaceCount) |
| 1454 | 1007 | { |
| 1455 | | InitXYAttrToPixel(state); |
| 1456 | | state->m_pTextureTileMapAttr = pUnpackedTileAttr; |
| 1457 | | for( i=0; i<0x80000; i++ ) |
| 1008 | // lighting (prelim) |
| 1009 | bri = m_LitSurfaceInfo[m_LitSurfaceIndex % m_LitSurfaceCount]; |
| 1010 | if (m_SurfaceNormalFormat == 0x6666) |
| 1458 | 1011 | { |
| 1459 | | *pUnpackedTileAttr++ = (*pPackedTileAttr)>>4; |
| 1460 | | *pUnpackedTileAttr++ = (*pPackedTileAttr)&0xf; |
| 1461 | | pPackedTileAttr++; |
| 1012 | if (i == 3) |
| 1013 | m_LitSurfaceIndex++; |
| 1462 | 1014 | } |
| 1463 | | state->m_pTextureTileMap16 = (UINT16 *)pTilemapROM; |
| 1464 | | state->m_pTextureTileData = (UINT8 *)pTextureROM; |
| 1465 | | PatchTexture(state); |
| 1015 | else if (m_SurfaceNormalFormat == 0x4000) |
| 1016 | m_LitSurfaceIndex++; |
| 1017 | else |
| 1018 | logerror("unknown normal format: 0x%x\n", m_SurfaceNormalFormat); |
| 1466 | 1019 | } |
| 1020 | else if (packetformat & 0x40) |
| 1021 | { |
| 1022 | // gourad shading |
| 1023 | bri = (point_read(i + addr) >> 16) & 0xff; |
| 1024 | } |
| 1025 | else |
| 1026 | { |
| 1027 | // flat shading |
| 1028 | bri = color >> 16 & 0xff; |
| 1029 | } |
| 1030 | |
| 1031 | pv->bri = bri; |
| 1467 | 1032 | } |
| 1033 | |
| 1034 | if (zmin < 0.0f) zmin = 0.0f; |
| 1035 | if (zmax < 0.0f) zmax = 0.0f; |
| 1036 | |
| 1037 | switch (flags & 0x300) |
| 1038 | { |
| 1039 | case 0x000: |
| 1040 | zsort = (INT32)zmin; |
| 1041 | break; |
| 1042 | |
| 1043 | case 0x100: |
| 1044 | zsort = (INT32)zmax; |
| 1045 | break; |
| 1046 | |
| 1047 | default: |
| 1048 | zsort = (INT32)((zmin + zmax) / 2.0f); |
| 1049 | break; |
| 1050 | } |
| 1051 | |
| 1052 | /* relative: representative z + shift values |
| 1053 | * 1x.xxxx.xxxxxxxx.xxxxxxxx fixed z value |
| 1054 | * 0x.xx--.--------.-------- absolute priority shift |
| 1055 | * 0-.--xx.xxxxxxxx.xxxxxxxx z-representative value shift |
| 1056 | */ |
| 1057 | if (polyshift & 0x200000) |
| 1058 | zsort = polyshift & 0x1fffff; |
| 1059 | else |
| 1060 | { |
| 1061 | zsort += signed18(polyshift); |
| 1062 | absolute_priority += (polyshift & 0x1c0000) >> 18; |
| 1063 | } |
| 1064 | |
| 1065 | if (m_objectshift & 0x200000) |
| 1066 | zsort = m_objectshift & 0x1fffff; |
| 1067 | else |
| 1068 | { |
| 1069 | zsort += signed18(m_objectshift); |
| 1070 | absolute_priority += (m_objectshift & 0x1c0000) >> 18; |
| 1071 | } |
| 1072 | |
| 1073 | if (zsort < 0) zsort = 0; |
| 1074 | else if (zsort > 0x1fffff) zsort = 0x1fffff; |
| 1075 | absolute_priority &= 7; |
| 1076 | zsort |= (absolute_priority << 21); |
| 1077 | |
| 1078 | // allocate quad |
| 1079 | struct namcos22_scenenode *node = m_poly->new_scenenode(machine(), zsort, NAMCOS22_SCENENODE_QUAD); |
| 1080 | node->data.quad.cmode = (v[0].u >> 12) & 0xf; |
| 1081 | node->data.quad.texturebank = (v[0].v >> 12) & 0xf; |
| 1082 | node->data.quad.color = (color >> 8) & 0xff; |
| 1083 | node->data.quad.flags = flags >> 10 & 3; |
| 1084 | node->data.quad.cz_adjust = m_cz_adjust; |
| 1085 | |
| 1086 | for (i = 0; i < 4; i++) |
| 1087 | { |
| 1088 | namcos22_polyvertex *p = &node->data.quad.v[i]; |
| 1089 | p->x = v[i].x * m_camera_zoom; |
| 1090 | p->y = v[i].y * m_camera_zoom; |
| 1091 | p->z = v[i].z; |
| 1092 | p->u = v[i].u & 0xfff; |
| 1093 | p->v = v[i].v & 0xfff; |
| 1094 | p->bri = v[i].bri; |
| 1095 | } |
| 1096 | |
| 1097 | node->data.quad.direct = 0; |
| 1098 | node->data.quad.vx = m_camera_vx; |
| 1099 | node->data.quad.vy = m_camera_vy; |
| 1100 | node->data.quad.vw = m_camera_vw; |
| 1101 | node->data.quad.vh = m_camera_vh; |
| 1468 | 1102 | } |
| 1469 | 1103 | |
| 1470 | | static void DrawSpritesHelper(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT32 *pBase, const UINT32 *pSource, const UINT32 *pPal, int num_sprites, int deltax, int deltay, int y_lowres) |
| 1104 | |
| 1105 | void namcos22_state::blit_quads(bitmap_rgb32 &bitmap, INT32 addr, float m[4][4], INT32 base) |
| 1471 | 1106 | { |
| 1472 | | for( int i=0; i<num_sprites; i++ ) |
| 1107 | // int additionalnormals = 0; |
| 1108 | int chunklength = point_read(addr++); |
| 1109 | int finish = addr + chunklength; |
| 1110 | |
| 1111 | if (chunklength > 0x100) |
| 1112 | fatalerror("bad packet length\n"); |
| 1113 | |
| 1114 | while (addr < finish) |
| 1473 | 1115 | { |
| 1116 | int packetlength = point_read(addr++); |
| 1117 | int packetformat = point_read(addr + 0); |
| 1118 | int flags, color, bias; |
| 1119 | |
| 1120 | /** |
| 1121 | * packetformat: |
| 1122 | * 800000 final packet in chunk |
| 1123 | * 080000 ? |
| 1124 | * 020000 color word exists? |
| 1125 | * 010000 z-offset word exists? |
| 1126 | * 002000 ? |
| 1127 | * 001000 z-offset word exists? |
| 1128 | * 000400 ? |
| 1129 | * 000080 tex# or UV or CMODE? |
| 1130 | * 000040 use I |
| 1131 | * 000001 ? |
| 1132 | */ |
| 1133 | switch (packetlength) |
| 1134 | { |
| 1135 | case 0x17: |
| 1136 | /** |
| 1137 | * word 0: opcode (8a24c0) |
| 1138 | * word 1: flags |
| 1139 | * word 2: color |
| 1140 | */ |
| 1141 | flags = point_read(addr + 1); |
| 1142 | color = point_read(addr + 2); |
| 1143 | bias = 0; |
| 1144 | blit_single_quad(bitmap, color, addr + 3, m, bias, flags, packetformat); |
| 1145 | break; |
| 1146 | |
| 1147 | case 0x18: |
| 1148 | /** |
| 1149 | * word 0: opcode (0b3480 for first N-1 quads or 8b3480 for final quad in primitive) |
| 1150 | * word 1: flags |
| 1151 | * word 2: color |
| 1152 | * word 3: depth bias |
| 1153 | */ |
| 1154 | flags = point_read(addr + 1); |
| 1155 | color = point_read(addr + 2); |
| 1156 | bias = point_read(addr + 3); |
| 1157 | blit_single_quad(bitmap, color, addr + 4, m, bias, flags, packetformat); |
| 1158 | break; |
| 1159 | |
| 1160 | case 0x10: /* vertex lighting */ |
| 1161 | /* |
| 1162 | 333401 (opcode) |
| 1163 | 000000 [count] [type] |
| 1164 | 000000 000000 007fff // normal vector |
| 1165 | 000000 000000 007fff // normal vector |
| 1166 | 000000 000000 007fff // normal vector |
| 1167 | 000000 000000 007fff // normal vector |
| 1168 | */ |
| 1169 | // additionalnormals = point_read(addr+2); |
| 1170 | m_SurfaceNormalFormat = point_read(addr + 3); |
| 1171 | m_LitSurfaceCount = 0; |
| 1172 | m_LitSurfaceIndex = 0; |
| 1173 | register_normals(addr + 4, m); |
| 1174 | break; |
| 1175 | |
| 1176 | case 0x0d: /* additional normals */ |
| 1177 | /* |
| 1178 | 300401 (opcode) |
| 1179 | 007b09 ffdd04 0004c2 |
| 1180 | 007a08 ffd968 0001c1 |
| 1181 | ff8354 ffe401 000790 |
| 1182 | ff84f7 ffdd04 0004c2 |
| 1183 | */ |
| 1184 | register_normals(addr + 1, m); |
| 1185 | break; |
| 1186 | |
| 1187 | default: |
| 1188 | break; |
| 1189 | } |
| 1190 | addr += packetlength; |
| 1191 | } |
| 1192 | } |
| 1193 | |
| 1194 | void namcos22_state::blit_polyobject(bitmap_rgb32 &bitmap, int code, float m[4][4]) |
| 1195 | { |
| 1196 | UINT32 addr1 = point_read(code); |
| 1197 | m_LitSurfaceCount = 0; |
| 1198 | m_LitSurfaceIndex = 0; |
| 1199 | |
| 1200 | for (;;) |
| 1201 | { |
| 1202 | INT32 addr2 = point_read(addr1++); |
| 1203 | if (addr2 < 0) |
| 1204 | break; |
| 1205 | blit_quads(bitmap, addr2, m, code); |
| 1206 | } |
| 1207 | } |
| 1208 | |
| 1209 | |
| 1210 | /** |
| 1211 | * master DSP can write directly to render device via port 0xc. |
| 1212 | * This is used for "direct drawn" polygons, and "direct draw from point rom" |
| 1213 | * feature - both opcodes exist in Ridge Racer's display-list processing |
| 1214 | * |
| 1215 | * record format: |
| 1216 | * header (3 words) |
| 1217 | * polyshift |
| 1218 | * color |
| 1219 | * flags |
| 1220 | * |
| 1221 | * per-vertex data (4*6 words) |
| 1222 | * u,v |
| 1223 | * sx,sy |
| 1224 | * intensity;z.exponent |
| 1225 | * z.mantissa |
| 1226 | * |
| 1227 | * master DSP can specify 3d objects indirectly (along with view transforms), |
| 1228 | * via the "transmit" PDP opcode. the "render device" sends quad data to the slave DSP |
| 1229 | * viewspace clipping and projection |
| 1230 | * |
| 1231 | * most "3d object" references are 0x45 and greater. references less than 0x45 are "special" |
| 1232 | * commands, using a similar point rom format. the point rom header may point to point ram. |
| 1233 | * |
| 1234 | * slave DSP reads records via port 4 |
| 1235 | * its primary purpose is applying lighting calculations |
| 1236 | * the slave DSP forwards draw commands to a "draw device" |
| 1237 | */ |
| 1238 | |
| 1239 | /*******************************************************************************/ |
| 1240 | |
| 1241 | /** |
| 1242 | * 0xfffd |
| 1243 | * 0x0: transform |
| 1244 | * 0x1 |
| 1245 | * 0x2 |
| 1246 | * 0x5: transform |
| 1247 | * >=0x45: draw primitive |
| 1248 | */ |
| 1249 | void namcos22_state::slavesim_handle_bb0003(const INT32 *src) |
| 1250 | { |
| 1251 | /* |
| 1252 | bb0003 or 3b0003 |
| 1253 | |
| 1254 | 14.00c8 light.ambient light.power |
| 1255 | 01.0000 ? light.dx |
| 1256 | 06.5a82 window priority light.dy |
| 1257 | 00.a57e ? light.dz |
| 1258 | |
| 1259 | c8.0081 vx=200,vy=129 |
| 1260 | 29.6092 zoom = 772.5625 |
| 1261 | 1e.95f8 1e.95f8 0.5858154296875 0.5858154296875 // 452 |
| 1262 | 1e.b079 1e.b079 0.6893463134765 0.6893463134765 // 532 |
| 1263 | 29.58e8 711.25 (border? see time crisis) |
| 1264 | |
| 1265 | 7ffe 0000 0000 |
| 1266 | 0000 7ffe 0000 |
| 1267 | 0000 0000 7ffe |
| 1268 | */ |
| 1269 | m_camera_ambient = src[0x1] >> 16; |
| 1270 | m_camera_power = src[0x1] & 0xffff; |
| 1271 | |
| 1272 | m_camera_lx = dspfixed_to_nativefloat(src[0x2]); |
| 1273 | m_camera_ly = dspfixed_to_nativefloat(src[0x3]); |
| 1274 | m_camera_lz = dspfixed_to_nativefloat(src[0x4]); |
| 1275 | |
| 1276 | m_absolute_priority = src[0x3] >> 16; |
| 1277 | m_camera_vx = (INT16)(src[5] >> 16); |
| 1278 | m_camera_vy = (INT16)(src[5] & 0xffff); |
| 1279 | m_camera_zoom = dspfloat_to_nativefloat(src[6]); |
| 1280 | m_camera_vw = dspfloat_to_nativefloat(src[7]) * m_camera_zoom; |
| 1281 | m_camera_vh = dspfloat_to_nativefloat(src[9]) * m_camera_zoom; |
| 1282 | |
| 1283 | m_viewmatrix[0][0] = dspfixed_to_nativefloat(src[0x0c]); |
| 1284 | m_viewmatrix[1][0] = dspfixed_to_nativefloat(src[0x0d]); |
| 1285 | m_viewmatrix[2][0] = dspfixed_to_nativefloat(src[0x0e]); |
| 1286 | |
| 1287 | m_viewmatrix[0][1] = dspfixed_to_nativefloat(src[0x0f]); |
| 1288 | m_viewmatrix[1][1] = dspfixed_to_nativefloat(src[0x10]); |
| 1289 | m_viewmatrix[2][1] = dspfixed_to_nativefloat(src[0x11]); |
| 1290 | |
| 1291 | m_viewmatrix[0][2] = dspfixed_to_nativefloat(src[0x12]); |
| 1292 | m_viewmatrix[1][2] = dspfixed_to_nativefloat(src[0x13]); |
| 1293 | m_viewmatrix[2][2] = dspfixed_to_nativefloat(src[0x14]); |
| 1294 | |
| 1295 | transform_normal(&m_camera_lx, &m_camera_ly, &m_camera_lz, m_viewmatrix); |
| 1296 | } |
| 1297 | |
| 1298 | void namcos22_state::slavesim_handle_200002(bitmap_rgb32 &bitmap, const INT32 *src) |
| 1299 | { |
| 1300 | if (m_PrimitiveID >= 0x45) |
| 1301 | { |
| 1302 | float m[4][4]; /* row major */ |
| 1303 | |
| 1304 | matrix3d_identity(m); |
| 1305 | |
| 1306 | m[0][0] = dspfixed_to_nativefloat(src[0x1]); |
| 1307 | m[1][0] = dspfixed_to_nativefloat(src[0x2]); |
| 1308 | m[2][0] = dspfixed_to_nativefloat(src[0x3]); |
| 1309 | |
| 1310 | m[0][1] = dspfixed_to_nativefloat(src[0x4]); |
| 1311 | m[1][1] = dspfixed_to_nativefloat(src[0x5]); |
| 1312 | m[2][1] = dspfixed_to_nativefloat(src[0x6]); |
| 1313 | |
| 1314 | m[0][2] = dspfixed_to_nativefloat(src[0x7]); |
| 1315 | m[1][2] = dspfixed_to_nativefloat(src[0x8]); |
| 1316 | m[2][2] = dspfixed_to_nativefloat(src[0x9]); |
| 1317 | |
| 1318 | m[3][0] = src[0xa]; /* xpos */ |
| 1319 | m[3][1] = src[0xb]; /* ypos */ |
| 1320 | m[3][2] = src[0xc]; /* zpos */ |
| 1321 | |
| 1322 | matrix3d_multiply(m, m_viewmatrix); |
| 1323 | blit_polyobject(bitmap, m_PrimitiveID, m); |
| 1324 | } |
| 1325 | else if (m_PrimitiveID != 0 && m_PrimitiveID != 2) |
| 1326 | { |
| 1327 | logerror("slavesim_handle_200002:unk code=0x%x\n", m_PrimitiveID); |
| 1328 | // ridgerac title screen waving flag: 0x5 |
| 1329 | } |
| 1330 | } |
| 1331 | |
| 1332 | void namcos22_state::slavesim_handle_300000(const INT32 *src) |
| 1333 | { |
| 1334 | m_viewmatrix[0][0] = dspfixed_to_nativefloat(src[1]); |
| 1335 | m_viewmatrix[1][0] = dspfixed_to_nativefloat(src[2]); |
| 1336 | m_viewmatrix[2][0] = dspfixed_to_nativefloat(src[3]); |
| 1337 | |
| 1338 | m_viewmatrix[0][1] = dspfixed_to_nativefloat(src[4]); |
| 1339 | m_viewmatrix[1][1] = dspfixed_to_nativefloat(src[5]); |
| 1340 | m_viewmatrix[2][1] = dspfixed_to_nativefloat(src[6]); |
| 1341 | |
| 1342 | m_viewmatrix[0][2] = dspfixed_to_nativefloat(src[7]); |
| 1343 | m_viewmatrix[1][2] = dspfixed_to_nativefloat(src[8]); |
| 1344 | m_viewmatrix[2][2] = dspfixed_to_nativefloat(src[9]); |
| 1345 | } |
| 1346 | |
| 1347 | void namcos22_state::slavesim_handle_233002(const INT32 *src) |
| 1348 | { |
| 1349 | /* |
| 1350 | 00233002 |
| 1351 | 00000000 // cz adjust (signed24) |
| 1352 | 0003dd00 // z bias adjust |
| 1353 | 001fffff // far plane? |
| 1354 | 00007fff 00000000 00000000 |
| 1355 | 00000000 00007fff 00000000 |
| 1356 | 00000000 00000000 00007fff |
| 1357 | 00000000 00000000 00000000 |
| 1358 | */ |
| 1359 | m_cz_adjust = signed24(src[1]); |
| 1360 | m_objectshift = src[2]; |
| 1361 | } |
| 1362 | |
| 1363 | void namcos22_state::simulate_slavedsp(bitmap_rgb32 &bitmap) |
| 1364 | { |
| 1365 | const INT32 *src = 0x300 + (INT32 *)m_polygonram.target(); |
| 1366 | INT16 len; |
| 1367 | |
| 1368 | matrix3d_identity(m_viewmatrix); |
| 1369 | |
| 1370 | if (m_is_ss22) |
| 1371 | { |
| 1372 | src += 4; /* FFFE 0400 */ |
| 1373 | } |
| 1374 | else |
| 1375 | { |
| 1376 | src--; |
| 1377 | } |
| 1378 | |
| 1379 | for (;;) |
| 1380 | { |
| 1381 | INT16 next; |
| 1382 | m_PrimitiveID = *src++; |
| 1383 | len = (INT16)*src++; |
| 1384 | |
| 1385 | switch (len) |
| 1386 | { |
| 1387 | case 0x15: |
| 1388 | slavesim_handle_bb0003(src); /* define viewport */ |
| 1389 | break; |
| 1390 | |
| 1391 | case 0x10: |
| 1392 | slavesim_handle_233002(src); /* set modal rendering options */ |
| 1393 | break; |
| 1394 | |
| 1395 | case 0x0a: |
| 1396 | slavesim_handle_300000(src); /* modify view transform */ |
| 1397 | break; |
| 1398 | |
| 1399 | case 0x0d: |
| 1400 | slavesim_handle_200002(bitmap, src); /* render primitive */ |
| 1401 | break; |
| 1402 | |
| 1403 | default: |
| 1404 | logerror("unk 3d data(%d) addr=0x%x!", len, (int)(src-(INT32*)m_polygonram.target())); |
| 1405 | { |
| 1406 | int i; |
| 1407 | for (i = 0; i < len; i++) |
| 1408 | { |
| 1409 | logerror(" %06x", src[i] & 0xffffff); |
| 1410 | } |
| 1411 | logerror("\n"); |
| 1412 | } |
| 1413 | return; |
| 1414 | } |
| 1415 | |
| 1416 | /* hackery! commands should be streamed, not parsed here */ |
| 1417 | src += len; |
| 1418 | src++; /* always 0xffff */ |
| 1419 | next = (INT16)*src++; /* link to next command */ |
| 1420 | if ((next & 0x7fff) != (src - (INT32 *)m_polygonram.target())) |
| 1421 | { |
| 1422 | /* end of list */ |
| 1423 | break; |
| 1424 | } |
| 1425 | } |
| 1426 | } |
| 1427 | |
| 1428 | void namcos22_state::draw_polygons(bitmap_rgb32 &bitmap) |
| 1429 | { |
| 1430 | if (m_slave_simulation_active) |
| 1431 | { |
| 1432 | simulate_slavedsp(bitmap); |
| 1433 | m_poly->wait("draw_polygons"); |
| 1434 | } |
| 1435 | } |
| 1436 | |
| 1437 | |
| 1438 | |
| 1439 | /*********************************************************************************************/ |
| 1440 | |
| 1441 | WRITE32_MEMBER(namcos22_state::namcos22s_czram_w) |
| 1442 | { |
| 1443 | int bank = nthword(m_czattr, 0xa/2) & 3; |
| 1444 | UINT32 prev = (m_banked_czram[bank][offset * 2] << 16) | m_banked_czram[bank][offset * 2 + 1]; |
| 1445 | UINT32 temp = prev; |
| 1446 | COMBINE_DATA(&temp); |
| 1447 | data = temp; |
| 1448 | m_banked_czram[bank][offset * 2] = data >> 16; |
| 1449 | m_banked_czram[bank][offset * 2 + 1] = data & 0xffff; |
| 1450 | m_cz_was_written[bank] |= (prev ^ data); |
| 1451 | } |
| 1452 | |
| 1453 | READ32_MEMBER(namcos22_state::namcos22s_czram_r) |
| 1454 | { |
| 1455 | int bank = nthword(m_czattr, 0xa/2) & 3; |
| 1456 | return (m_banked_czram[bank][offset * 2] << 16) | m_banked_czram[bank][offset * 2 + 1]; |
| 1457 | } |
| 1458 | |
| 1459 | void namcos22_state::recalc_czram() |
| 1460 | { |
| 1461 | for (int table = 0; table < 4; table++) |
| 1462 | { |
| 1463 | // as documented above, ss22 czram is 'just' a big compare table |
| 1464 | // this is very slow when emulating, so let's recalculate it to a simpler lookup table |
| 1465 | if (m_cz_was_written[table]) |
| 1466 | { |
| 1467 | int small_val = 0x2000; |
| 1468 | int small_offset = 0; |
| 1469 | int large_val = 0; |
| 1470 | int large_offset = 0; |
| 1471 | int prev = 0x2000; |
| 1472 | |
| 1473 | for (int i = 0; i < 0x100; i++) |
| 1474 | { |
| 1475 | int val = m_banked_czram[table][i]; |
| 1476 | |
| 1477 | // discard if larger than 1fff |
| 1478 | if (val > 0x1fff) val = prev; |
| 1479 | if (prev > 0x1fff) |
| 1480 | { |
| 1481 | prev = val; |
| 1482 | continue; |
| 1483 | } |
| 1484 | |
| 1485 | int start = prev; |
| 1486 | int end = val; |
| 1487 | if (start > end) |
| 1488 | { |
| 1489 | start = val; |
| 1490 | end = prev; |
| 1491 | } |
| 1492 | prev = val; |
| 1493 | |
| 1494 | // fill range |
| 1495 | for (int j = start; j < end; j++) |
| 1496 | m_recalc_czram[table][j] = i; |
| 1497 | |
| 1498 | // remember largest/smallest for later |
| 1499 | if (val < small_val) |
| 1500 | { |
| 1501 | small_val = val; |
| 1502 | small_offset = i; |
| 1503 | } |
| 1504 | if (val > large_val) |
| 1505 | { |
| 1506 | large_val = val; |
| 1507 | large_offset = i; |
| 1508 | } |
| 1509 | } |
| 1510 | |
| 1511 | // fill possible leftover ranges |
| 1512 | for (int j = 0; j < small_val; j++) |
| 1513 | m_recalc_czram[table][j] = small_offset; |
| 1514 | for (int j = large_val; j < 0x2000; j++) |
| 1515 | m_recalc_czram[table][j] = large_offset; |
| 1516 | |
| 1517 | m_cz_was_written[table] = 0; |
| 1518 | } |
| 1519 | } |
| 1520 | } |
| 1521 | |
| 1522 | |
| 1523 | |
| 1524 | /*********************************************************************************************/ |
| 1525 | |
| 1526 | void namcos22_state::draw_sprite_group(bitmap_rgb32 &bitmap, const rectangle &cliprect, const UINT32 *src, const UINT32 *attr, int num_sprites, int deltax, int deltay, int y_lowres) |
| 1527 | { |
| 1528 | for (int i = 0; i < num_sprites; i++) |
| 1529 | { |
| 1474 | 1530 | /* |
| 1475 | | pSource[0] |
| 1531 | src[0] |
| 1476 | 1532 | xxxx.xxxx.xxxx.xxxx | ----.----.----.---- x pos |
| 1477 | 1533 | ----.----.----.---- | xxxx.xxxx.xxxx.xxxx y pos |
| 1478 | 1534 | |
| 1479 | | pSource[1] |
| 1535 | src[1] |
| 1480 | 1536 | xxxx.xxxx.xxxx.xxxx | ----.----.----.---- x size |
| 1481 | 1537 | ----.----.----.---- | xxxx.xxxx.xxxx.xxxx y size |
| 1482 | 1538 | |
| 1483 | | pSource[2] |
| 1539 | src[2] |
| 1484 | 1540 | xxxx.x---.----.---- | ----.----.----.---- no function |
| 1485 | 1541 | ----.-xxx.----.---- | ----.----.----.---- clip target |
| 1486 | 1542 | ----.----.xxxx.xxxx | ----.----.----.---- linktype |
| r24771 | r24772 | |
| 1488 | 1544 | ----.----.----.---- | ----.--x-.----.---- right justify |
| 1489 | 1545 | ----.----.----.---- | ----.---x.----.---- bottom justify |
| 1490 | 1546 | ----.----.----.---- | ----.----.x---.---- flipx |
| 1491 | | ----.----.----.---- | ----.----.-xxx.---- numcols |
| 1547 | ----.----.----.---- | ----.----.-xxx.---- cols |
| 1492 | 1548 | ----.----.----.---- | ----.----.----.x--- flipy |
| 1493 | | ----.----.----.---- | ----.----.----.-xxx numrows |
| 1549 | ----.----.----.---- | ----.----.----.-xxx rows |
| 1494 | 1550 | |
| 1495 | | pSource[3] |
| 1551 | src[3] |
| 1496 | 1552 | xxxx.xxxx.xxxx.xxxx | ----.----.----.---- tile number |
| 1497 | 1553 | ----.----.----.---- | xxxx.xxxx.----.---- translucency |
| 1498 | 1554 | ----.----.----.---- | ----.----.xxxx.xxxx no function(?) - set in timecris |
| 1499 | 1555 | |
| 1500 | | pPal[0] |
| 1556 | attr[0] |
| 1501 | 1557 | xxxx.xxxx.----.---- | ----.----.----.---- no function |
| 1502 | 1558 | ----.----.xxxx.xxxx | xxxx.xxxx.xxxx.xxxx z pos |
| 1503 | 1559 | |
| 1504 | | pPal[1] |
| 1560 | attr[1] |
| 1505 | 1561 | xxxx.xxxx.----.---- | ----.----.----.---- no function |
| 1506 | 1562 | ----.----.x---.---- | ----.----.----.---- cz enable |
| 1507 | 1563 | ----.----.-xxx.xxxx | ----.----.----.---- color |
| 1508 | 1564 | ----.----.----.---- | xxxx.xxxx.----.---- no function(?) - set in airco22b, propcycl |
| 1509 | 1565 | ----.----.----.---- | ----.----.xxxx.xxxx cz factor (fog aka depth cueing) |
| 1510 | 1566 | */ |
| 1511 | | int xpos = (pSource[0]>>16) - deltax; |
| 1512 | | int ypos = (pSource[0]&0xffff) - deltay; |
| 1513 | | int sizex = pSource[1]>>16; |
| 1514 | | int sizey = pSource[1]&0xffff; |
| 1515 | | UINT32 attrs = pSource[2]; |
| 1516 | | int flipy = attrs>>3&0x1; |
| 1517 | | int numrows = attrs&0x7; |
| 1518 | | int linkType = (attrs&0x00ff0000)>>16; |
| 1519 | | int flipx = (attrs>>7)&0x1; |
| 1520 | | int numcols = (attrs>>4)&0x7; |
| 1521 | | UINT32 code = pSource[3]; |
| 1522 | | int tile = code>>16; |
| 1523 | | int translucency = (code&0xff00)>>8; |
| 1567 | int xpos = (src[0] >> 16) - deltax; |
| 1568 | int ypos = (src[0] & 0xffff) - deltay; |
| 1569 | int sizex = src[1] >> 16; |
| 1570 | int sizey = src[1] & 0xffff; |
| 1571 | int flipy = src[2] >> 3 & 0x1; |
| 1572 | int rows = src[2] & 0x7; |
| 1573 | int linktype = (src[2] & 0x00ff0000) >> 16; |
| 1574 | int flipx = (src[2] >> 7) & 0x1; |
| 1575 | int cols = (src[2] >> 4) & 0x7; |
| 1576 | UINT32 code = src[3]; |
| 1577 | int tile = code >> 16; |
| 1578 | int translucency = (code & 0xff00) >> 8; |
| 1524 | 1579 | |
| 1525 | | UINT32 zcoord = pPal[0]&0x00ffffff; |
| 1526 | | int color = pPal[1]>>16; |
| 1527 | | int cz = pPal[1]&0xff; |
| 1580 | UINT32 zcoord = attr[0] & 0x00ffffff; |
| 1581 | int color = attr[1] >> 16; |
| 1582 | int cz = attr[1] & 0xff; |
| 1528 | 1583 | |
| 1529 | 1584 | // priority over textlayer, trusted by testmode and timecris |
| 1530 | | int pri = ((pPal[1] & 0xffff) == 0x00fe); |
| 1585 | int pri = ((attr[1] & 0xffff) == 0x00fe); |
| 1531 | 1586 | |
| 1532 | 1587 | // set window clipping |
| 1533 | | int clip = attrs>>23&0xe; |
| 1534 | | int cx_min = -deltax + (INT16)(pBase[0x80|clip]>>16); |
| 1535 | | int cx_max = -deltax + (INT16)(pBase[0x80|clip]&0xffff); |
| 1536 | | int cy_min = -deltay + (INT16)(pBase[0x81|clip]>>16); |
| 1537 | | int cy_max = -deltay + (INT16)(pBase[0x81|clip]&0xffff); |
| 1588 | int clip = src[2] >> 23 & 0xe; |
| 1589 | int cx_min = -deltax + (INT16)(m_spriteram[0x80|clip] >> 16); |
| 1590 | int cx_max = -deltax + (INT16)(m_spriteram[0x80|clip] & 0xffff); |
| 1591 | int cy_min = -deltay + (INT16)(m_spriteram[0x81|clip] >> 16); |
| 1592 | int cy_max = -deltay + (INT16)(m_spriteram[0x81|clip] & 0xffff); |
| 1538 | 1593 | |
| 1539 | | if (numrows == 0) numrows = 8; |
| 1540 | | if (numcols == 0) numcols = 8; |
| 1594 | if (rows == 0) rows = 8; |
| 1595 | if (cols == 0) cols = 8; |
| 1541 | 1596 | |
| 1542 | 1597 | /* right justify */ |
| 1543 | | if (attrs & 0x0200) |
| 1544 | | xpos -= sizex*numcols-1; |
| 1598 | if (src[2] & 0x0200) |
| 1599 | xpos -= sizex * cols - 1; |
| 1545 | 1600 | |
| 1546 | 1601 | /* bottom justify */ |
| 1547 | | if (attrs & 0x0100) |
| 1548 | | ypos -= sizey*numrows-1; |
| 1602 | if (src[2] & 0x0100) |
| 1603 | ypos -= sizey * rows - 1; |
| 1549 | 1604 | |
| 1550 | 1605 | if (flipy) |
| 1551 | 1606 | { |
| 1552 | | ypos += sizey*numrows-1; |
| 1607 | ypos += sizey * rows - 1; |
| 1553 | 1608 | sizey = -sizey; |
| 1554 | 1609 | } |
| 1555 | 1610 | |
| 1556 | 1611 | if (flipx) |
| 1557 | 1612 | { |
| 1558 | | xpos += sizex*numcols-1; |
| 1613 | xpos += sizex * cols - 1; |
| 1559 | 1614 | sizex = -sizex; |
| 1560 | 1615 | } |
| 1561 | 1616 | |
| r24771 | r24772 | |
| 1567 | 1622 | |
| 1568 | 1623 | if (sizex && sizey) |
| 1569 | 1624 | { |
| 1570 | | struct SceneNode *node = NewSceneNode(machine, zcoord, eSCENENODE_SPRITE); |
| 1625 | struct namcos22_scenenode *node = m_poly->new_scenenode(machine(), zcoord, NAMCOS22_SCENENODE_SPRITE); |
| 1571 | 1626 | |
| 1572 | 1627 | node->data.sprite.tile = tile; |
| 1573 | 1628 | node->data.sprite.flipx = flipx; |
| 1574 | 1629 | node->data.sprite.flipy = flipy; |
| 1575 | | node->data.sprite.numcols = numcols; |
| 1576 | | node->data.sprite.numrows = numrows; |
| 1577 | | node->data.sprite.linkType = linkType; |
| 1630 | node->data.sprite.cols = cols; |
| 1631 | node->data.sprite.rows = rows; |
| 1632 | node->data.sprite.linktype = linktype; |
| 1578 | 1633 | node->data.sprite.xpos = xpos; |
| 1579 | 1634 | node->data.sprite.ypos = ypos; |
| 1580 | 1635 | node->data.sprite.cx_min = cx_min; |
| r24771 | r24772 | |
| 1588 | 1643 | node->data.sprite.cz = cz; |
| 1589 | 1644 | node->data.sprite.pri = pri; |
| 1590 | 1645 | } |
| 1591 | | pSource += 4; |
| 1592 | | pPal += 2; |
| 1646 | src += 4; |
| 1647 | attr += 2; |
| 1593 | 1648 | } |
| 1594 | 1649 | } |
| 1595 | 1650 | |
| 1596 | | static void DrawSprites( running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect ) |
| 1651 | void namcos22_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 1597 | 1652 | { |
| 1598 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 1599 | | UINT32 *spriteram32 = state->m_spriteram; |
| 1600 | | const UINT32 *pSource; |
| 1601 | | const UINT32 *pPal; |
| 1653 | const UINT32 *src; |
| 1654 | const UINT32 *attr; |
| 1602 | 1655 | |
| 1603 | 1656 | #if 0 // show reg contents |
| 1604 | 1657 | int i; |
| 1605 | 1658 | char msg1[0x1000]={0}, msg2[0x1000]={0}; |
| 1606 | 1659 | // 980000-98023f (spriteram header) |
| 1607 | 1660 | for (i=0x00;i<0x02;i++) { |
| 1608 | | sprintf(msg2,"98%04X %08X %08X %08X %08X\n",i*16,spriteram32[i*4+0],spriteram32[i*4+1],spriteram32[i*4+2],spriteram32[i*4+3]); |
| 1661 | sprintf(msg2,"98%04X %08X %08X %08X %08X\n",i*16,m_spriteram[i*4+0],m_spriteram[i*4+1],m_spriteram[i*4+2],m_spriteram[i*4+3]); |
| 1609 | 1662 | strcat(msg1,msg2); |
| 1610 | 1663 | } |
| 1611 | 1664 | for (i=0x20;i<0x24;i++) { |
| 1612 | | sprintf(msg2,"98%04X %08X %08X %08X %08X\n",i*16,spriteram32[i*4+0],spriteram32[i*4+1],spriteram32[i*4+2],spriteram32[i*4+3]); |
| 1665 | sprintf(msg2,"98%04X %08X %08X %08X %08X\n",i*16,m_spriteram[i*4+0],m_spriteram[i*4+1],m_spriteram[i*4+2],m_spriteram[i*4+3]); |
| 1613 | 1666 | strcat(msg1,msg2); |
| 1614 | 1667 | } |
| 1615 | 1668 | strcat(msg1,"\n"); |
| 1616 | 1669 | // 940000-94007c (vics control) |
| 1617 | 1670 | for (i=0x00;i<0x08;i++) { |
| 1618 | | sprintf(msg2,"94%04X %08X %08X %08X %08X\n",i*16,state->m_vics_control[i*4+0],state->m_vics_control[i*4+1],state->m_vics_control[i*4+2],state->m_vics_control[i*4+3]); |
| 1671 | sprintf(msg2,"94%04X %08X %08X %08X %08X\n",i*16,m_vics_control[i*4+0],m_vics_control[i*4+1],m_vics_control[i*4+2],m_vics_control[i*4+3]); |
| 1619 | 1672 | strcat(msg1,msg2); |
| 1620 | 1673 | } |
| 1621 | | if (machine.input().code_pressed(KEYCODE_S)) |
| 1674 | if (machine().input().code_pressed(KEYCODE_S)) |
| 1622 | 1675 | popmessage("%s",msg1); |
| 1623 | 1676 | else popmessage("[S] shows sprite/vics regs"); |
| 1624 | 1677 | #endif |
| r24771 | r24772 | |
| 1649 | 1702 | bit 1: ??? (always set, except in alpinr2b. it's not x-resolution) |
| 1650 | 1703 | bit 2: y-resolution? (always set, except in cybrcycc) |
| 1651 | 1704 | */ |
| 1652 | | int sprites_on = (spriteram32[0]>>16 & 1) ? 0 : 1; |
| 1653 | | int y_lowres = (spriteram32[0]>>16 & 4) ? 0 : 1; |
| 1705 | int sprites_on = (m_spriteram[0] >> 16 & 1) ? 0 : 1; |
| 1706 | int y_lowres = (m_spriteram[0] >> 16 & 4) ? 0 : 1; |
| 1654 | 1707 | |
| 1655 | | int deltax = (spriteram32[1]&0xffff) + (spriteram32[2]&0xffff) + 0x2d; |
| 1656 | | int deltay = (spriteram32[3]>>16) + (0x2a >> y_lowres); |
| 1708 | int deltax = (m_spriteram[1] & 0xffff) + (m_spriteram[2] & 0xffff) + 0x2d; |
| 1709 | int deltay = (m_spriteram[3] >> 16) + (0x2a >> y_lowres); |
| 1657 | 1710 | |
| 1658 | | int base = spriteram32[0] & 0xffff; // alpinesa/alpinr2b |
| 1659 | | int num_sprites = ((spriteram32[1]>>16) - base) + 1; |
| 1711 | int base = m_spriteram[0] & 0xffff; // alpinesa/alpinr2b |
| 1712 | int num_sprites = ((m_spriteram[1] >> 16) - base) + 1; |
| 1660 | 1713 | |
| 1661 | | if( sprites_on && num_sprites > 0 && num_sprites < 0x400 ) |
| 1714 | if (sprites_on && num_sprites > 0 && num_sprites < 0x400) |
| 1662 | 1715 | { |
| 1663 | | pSource = &spriteram32[0x04000/4 + base*4]; |
| 1664 | | pPal = &spriteram32[0x20000/4 + base*2]; |
| 1665 | | DrawSpritesHelper( machine, bitmap, cliprect, spriteram32, pSource, pPal, num_sprites, deltax, deltay, y_lowres ); |
| 1716 | src = &m_spriteram[0x04000/4 + base*4]; |
| 1717 | attr = &m_spriteram[0x20000/4 + base*2]; |
| 1718 | draw_sprite_group(bitmap, cliprect, src, attr, num_sprites, deltax, deltay, y_lowres); |
| 1666 | 1719 | } |
| 1667 | 1720 | |
| 1668 | 1721 | /* VICS RAM provides two additional banks (also many unknown regs here) */ |
| r24771 | r24772 | |
| 1681 | 1734 | 0x940060..0x94007c set#2 |
| 1682 | 1735 | */ |
| 1683 | 1736 | |
| 1684 | | sprites_on = (state->m_vics_control[0x30/4]>>24 & 1) ? 0 : 1; |
| 1685 | | y_lowres = (state->m_vics_control[0x30/4]>>24 & 4) ? 0 : 1; |
| 1737 | sprites_on = (m_vics_control[0x30/4] >> 24 & 1) ? 0 : 1; |
| 1738 | y_lowres = (m_vics_control[0x30/4] >> 24 & 4) ? 0 : 1; |
| 1686 | 1739 | |
| 1687 | 1740 | // where do the games store the number of sprites to be processed by vics??? |
| 1688 | 1741 | // the current default implementation (using spritelist size) is clearly wrong and causes problems in dirtdash and airco22b |
| 1689 | | num_sprites = state->m_vics_control[0x40/4] >> 4 & 0x1ff; // no +1 |
| 1742 | num_sprites = m_vics_control[0x40/4] >> 4 & 0x1ff; // no +1 |
| 1690 | 1743 | |
| 1691 | 1744 | // dirtdash sprite list starts at xxx4, number of sprites is stored in xxx0, it doesn't use set#2 |
| 1692 | | if (state->m_gametype == NAMCOS22_DIRT_DASH) |
| 1693 | | num_sprites = (state->m_vics_data[(state->m_vics_control[0x48/4]&0x4000)/4] & 0xff) + 1; |
| 1745 | if (m_gametype == NAMCOS22_DIRT_DASH) |
| 1746 | num_sprites = (m_vics_data[(m_vics_control[0x48/4] & 0x4000)/4] & 0xff) + 1; |
| 1694 | 1747 | |
| 1695 | | if( sprites_on && num_sprites > 0 ) |
| 1748 | if (sprites_on && num_sprites > 0) |
| 1696 | 1749 | { |
| 1697 | | pSource = &state->m_vics_data[(state->m_vics_control[0x48/4]&0xffff)/4]; |
| 1698 | | pPal = &state->m_vics_data[(state->m_vics_control[0x58/4]&0xffff)/4]; |
| 1699 | | DrawSpritesHelper( machine, bitmap, cliprect, spriteram32, pSource, pPal, num_sprites, deltax, deltay, y_lowres ); |
| 1750 | src = &m_vics_data[(m_vics_control[0x48/4] & 0xffff)/4]; |
| 1751 | attr = &m_vics_data[(m_vics_control[0x58/4] & 0xffff)/4]; |
| 1752 | draw_sprite_group(bitmap, cliprect, src, attr, num_sprites, deltax, deltay, y_lowres); |
| 1700 | 1753 | } |
| 1701 | 1754 | |
| 1702 | | num_sprites = state->m_vics_control[0x60/4] >> 4 & 0x1ff; // no +1 |
| 1755 | num_sprites = m_vics_control[0x60/4] >> 4 & 0x1ff; // no +1 |
| 1703 | 1756 | |
| 1704 | 1757 | // airco22b number of sprites for set#2 is stored in set#1 - it does not use set 1, or main set for sprites |
| 1705 | | if (state->m_gametype == NAMCOS22_AIR_COMBAT22) |
| 1758 | if (m_gametype == NAMCOS22_AIR_COMBAT22) |
| 1706 | 1759 | { |
| 1707 | | sprites_on = (state->m_vics_data[(state->m_vics_control[0x48/4]&0xffff)/4]>>16&1) ? 0 : 1; |
| 1708 | | num_sprites = (state->m_vics_data[(state->m_vics_control[0x48/4]&0xffff)/4+1]>>16)+1; |
| 1760 | sprites_on = (m_vics_data[(m_vics_control[0x48/4] & 0xffff)/4] >> 16 & 1) ? 0 : 1; |
| 1761 | num_sprites = (m_vics_data[(m_vics_control[0x48/4] & 0xffff)/4+1] >> 16) + 1; |
| 1709 | 1762 | } |
| 1710 | 1763 | |
| 1711 | | if( sprites_on && num_sprites > 0 ) |
| 1764 | if (sprites_on && num_sprites > 0) |
| 1712 | 1765 | { |
| 1713 | | pSource = &state->m_vics_data[(state->m_vics_control[0x68/4]&0xffff)/4]; |
| 1714 | | pPal = &state->m_vics_data[(state->m_vics_control[0x78/4]&0xffff)/4]; |
| 1715 | | DrawSpritesHelper( machine, bitmap, cliprect, spriteram32, pSource, pPal, num_sprites, deltax, deltay, y_lowres ); |
| 1766 | src = &m_vics_data[(m_vics_control[0x68/4] & 0xffff)/4]; |
| 1767 | attr = &m_vics_data[(m_vics_control[0x78/4] & 0xffff)/4]; |
| 1768 | draw_sprite_group(bitmap, cliprect, src, attr, num_sprites, deltax, deltay, y_lowres); |
| 1716 | 1769 | } |
| 1717 | 1770 | } |
| 1718 | 1771 | |
| r24771 | r24772 | |
| 1746 | 1799 | } |
| 1747 | 1800 | |
| 1748 | 1801 | |
| 1749 | | static void UpdatePalette(running_machine &machine) |
| 1750 | | { |
| 1751 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 1752 | | int i,j; |
| 1753 | | for( i=0; i<NAMCOS22_PALETTE_SIZE/4; i++ ) |
| 1754 | | { |
| 1755 | | if( state->m_dirtypal[i] ) |
| 1756 | | { |
| 1757 | | for( j=0; j<4; j++ ) |
| 1758 | | { |
| 1759 | | int which = i*4+j; |
| 1760 | | int r = nthbyte(state->m_generic_paletteram_32,which+0x00000); |
| 1761 | | int g = nthbyte(state->m_generic_paletteram_32,which+0x08000); |
| 1762 | | int b = nthbyte(state->m_generic_paletteram_32,which+0x10000); |
| 1763 | | palette_set_color( machine,which,MAKE_RGB(r,g,b) ); |
| 1764 | | } |
| 1765 | | state->m_dirtypal[i] = 0; |
| 1766 | | } |
| 1767 | | } |
| 1768 | | } |
| 1769 | 1802 | |
| 1803 | /*********************************************************************************************/ |
| 1770 | 1804 | |
| 1771 | | TILE_GET_INFO_MEMBER(namcos22_state::TextTilemapGetInfo) |
| 1805 | TILE_GET_INFO_MEMBER(namcos22_state::get_text_tile_info) |
| 1772 | 1806 | { |
| 1773 | | UINT16 data = nthword( m_textram,tile_index ); |
| 1807 | UINT16 data = nthword(m_textram, tile_index); |
| 1774 | 1808 | /** |
| 1775 | 1809 | * xxxx.----.----.---- palette select |
| 1776 | 1810 | * ----.xx--.----.---- flip |
| 1777 | 1811 | * ----.--xx.xxxx.xxxx code |
| 1778 | 1812 | */ |
| 1779 | | SET_TILE_INFO_MEMBER( GFX_CHAR,data&0x03ff,data>>12,TILE_FLIPYX((data&0x0c00)>>10) ); |
| 1813 | SET_TILE_INFO_MEMBER(0, data & 0x03ff, data >> 12, TILE_FLIPYX((data & 0x0c00) >> 10)); |
| 1780 | 1814 | } |
| 1781 | 1815 | |
| 1782 | | READ32_MEMBER(namcos22_state::namcos22_textram_r) |
| 1816 | WRITE32_MEMBER(namcos22_state::namcos22_textram_w) |
| 1783 | 1817 | { |
| 1784 | | return m_textram[offset]; |
| 1818 | COMBINE_DATA(&m_textram[offset]); |
| 1819 | m_bgtilemap->mark_tile_dirty(offset * 2); |
| 1820 | m_bgtilemap->mark_tile_dirty(offset * 2 + 1); |
| 1785 | 1821 | } |
| 1786 | 1822 | |
| 1787 | | WRITE32_MEMBER(namcos22_state::namcos22_textram_w) |
| 1823 | WRITE32_MEMBER(namcos22_state::namcos22_cgram_w) |
| 1788 | 1824 | { |
| 1789 | | COMBINE_DATA( &m_textram[offset] ); |
| 1790 | | m_bgtilemap->mark_tile_dirty(offset*2 ); |
| 1791 | | m_bgtilemap->mark_tile_dirty(offset*2+1 ); |
| 1825 | COMBINE_DATA(&m_cgram[offset]); |
| 1826 | machine().gfx[0]->mark_dirty(offset/32); |
| 1792 | 1827 | } |
| 1793 | 1828 | |
| 1794 | 1829 | READ32_MEMBER(namcos22_state::namcos22_tilemapattr_r) |
| r24771 | r24772 | |
| 1797 | 1832 | { |
| 1798 | 1833 | case 2: |
| 1799 | 1834 | { |
| 1800 | | UINT16 lo,hi = (m_tilemapattr[offset] & 0xffff0000) >> 16; |
| 1835 | UINT16 lo, hi = (m_tilemapattr[offset] & 0xffff0000) >> 16; |
| 1801 | 1836 | // assume current scanline, 0x1ff if in vblank (used in alpinesa) |
| 1802 | 1837 | // or maybe relative to posirq? |
| 1803 | 1838 | if (m_screen->vblank()) lo = 0x1ff; |
| 1804 | 1839 | else lo = m_screen->vpos() >> 1; |
| 1805 | 1840 | // dirtdash has slowdowns if high bit is clear, why?? |
| 1806 | | return hi<<16 | lo | 0x8000; |
| 1841 | return hi << 16 | lo | 0x8000; |
| 1807 | 1842 | } |
| 1808 | 1843 | |
| 1809 | 1844 | case 3: |
| r24771 | r24772 | |
| 1830 | 1865 | 3.hiword ? unused? |
| 1831 | 1866 | 3.loword R ??? |
| 1832 | 1867 | */ |
| 1833 | | COMBINE_DATA( &m_tilemapattr[offset] ); |
| 1868 | COMBINE_DATA(&m_tilemapattr[offset]); |
| 1834 | 1869 | // popmessage("%08x\n%08x\n%08x\n%08x\n",m_tilemapattr[0],m_tilemapattr[1],m_tilemapattr[2],m_tilemapattr[3]); |
| 1835 | 1870 | } |
| 1836 | 1871 | |
| r24771 | r24772 | |
| 1886 | 1921 | if (ACCESSING_BITS_16_31) |
| 1887 | 1922 | { |
| 1888 | 1923 | // set address |
| 1889 | | m_spot_read_address = data>>(16+1); |
| 1890 | | m_spot_write_address = data>>(16+1); |
| 1924 | m_spot_read_address = data >> (16 + 1); |
| 1925 | m_spot_write_address = data >> (16 + 1); |
| 1891 | 1926 | } |
| 1892 | 1927 | else |
| 1893 | 1928 | { |
| r24771 | r24772 | |
| 1909 | 1944 | } |
| 1910 | 1945 | } |
| 1911 | 1946 | |
| 1912 | | static void namcos22s_mix_textlayer( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int prival ) |
| 1947 | void namcos22_state::namcos22s_mix_text_layer(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int prival) |
| 1913 | 1948 | { |
| 1914 | | namcos22_state *state = screen.machine().driver_data<namcos22_state>(); |
| 1915 | | const pen_t *pens = screen.machine().pens; |
| 1949 | const pen_t *pens = machine().pens; |
| 1916 | 1950 | UINT16 *src; |
| 1917 | 1951 | UINT32 *dest; |
| 1918 | 1952 | UINT8 *pri; |
| 1919 | | int x,y; |
| 1920 | 1953 | |
| 1921 | 1954 | // prepare alpha |
| 1922 | | UINT8 alpha_check12 = nthbyte(state->m_gamma, 0x12); |
| 1923 | | UINT8 alpha_check13 = nthbyte(state->m_gamma, 0x13); |
| 1924 | | UINT8 alpha_mask = nthbyte(state->m_gamma, 0x14); |
| 1925 | | UINT8 alpha_factor = nthbyte(state->m_gamma, 0x15); |
| 1955 | UINT8 alpha_check12 = nthbyte(m_mixer, 0x12); |
| 1956 | UINT8 alpha_check13 = nthbyte(m_mixer, 0x13); |
| 1957 | UINT8 alpha_mask = nthbyte(m_mixer, 0x14); |
| 1958 | UINT8 alpha_factor = nthbyte(m_mixer, 0x15); |
| 1926 | 1959 | |
| 1927 | 1960 | // prepare spot |
| 1928 | | int spot_flags = mixer.flags >> 16; |
| 1929 | | bool spot_enabled = spot_flags&1 && spot_flags&0xc; |
| 1930 | | int spot_limit = (spot_flags&2) ? mixer.spot_limit : 0xff; |
| 1961 | int spot_flags = m_mixer_flags >> 16; |
| 1962 | bool spot_enabled = (spot_flags & 1) && (spot_flags & 0xc); |
| 1963 | int spot_limit = (spot_flags & 2) ? m_spot_limit : 0xff; |
| 1931 | 1964 | |
| 1932 | 1965 | // prepare fader |
| 1933 | | bool fade_enabled = mixer.flags&2 && mixer.fadeFactor; |
| 1934 | | int fade_factor = 0xff - mixer.fadeFactor; |
| 1966 | bool fade_enabled = (m_mixer_flags & 2) && m_screen_fade_factor; |
| 1967 | int fade_factor = 0xff - m_screen_fade_factor; |
| 1935 | 1968 | rgbint fade_color; |
| 1936 | | rgb_comp_to_rgbint(&fade_color, mixer.rFadeColor, mixer.gFadeColor, mixer.bFadeColor); |
| 1969 | rgb_comp_to_rgbint(&fade_color, m_screen_fade_r, m_screen_fade_g, m_screen_fade_b); |
| 1937 | 1970 | |
| 1938 | 1971 | // mix textlayer with poly/sprites |
| 1939 | | for (y=0;y<480;y++) |
| 1972 | for (int y = cliprect.min_y; y <= cliprect.max_y; y++) |
| 1940 | 1973 | { |
| 1941 | | src = &state->m_mix_bitmap->pix16(y); |
| 1974 | src = &m_mix_bitmap->pix16(y); |
| 1942 | 1975 | dest = &bitmap.pix32(y); |
| 1943 | 1976 | pri = &screen.priority().pix8(y); |
| 1944 | | for (x=0;x<640;x++) |
| 1977 | for (int x = cliprect.min_x; x <= cliprect.max_x; x++) |
| 1945 | 1978 | { |
| 1946 | 1979 | // skip if transparent or under poly/sprite |
| 1947 | 1980 | if (pri[x] == prival) |
| r24771 | r24772 | |
| 1952 | 1985 | // apply alpha |
| 1953 | 1986 | if (alpha_factor) |
| 1954 | 1987 | { |
| 1955 | | UINT8 pen = src[x]&0xff; |
| 1956 | | if ((pen&0xf) == alpha_mask || pen == alpha_check12 || pen == alpha_check13) |
| 1988 | UINT8 pen = src[x] & 0xff; |
| 1989 | if ((pen & 0xf) == alpha_mask || pen == alpha_check12 || pen == alpha_check13) |
| 1957 | 1990 | { |
| 1958 | 1991 | rgbint mix; |
| 1959 | 1992 | rgb_to_rgbint(&mix, dest[x]); |
| r24771 | r24772 | |
| 1964 | 1997 | // apply spot |
| 1965 | 1998 | if (spot_enabled) |
| 1966 | 1999 | { |
| 1967 | | UINT8 pen = src[x]&0xff; |
| 2000 | UINT8 pen = src[x] & 0xff; |
| 1968 | 2001 | rgbint mix; |
| 1969 | 2002 | rgb_to_rgbint(&mix, dest[x]); |
| 1970 | 2003 | if (spot_flags & 8) |
| r24771 | r24772 | |
| 1972 | 2005 | // mix with per-channel brightness |
| 1973 | 2006 | rgbint shade; |
| 1974 | 2007 | rgb_comp_to_rgbint(&shade, |
| 1975 | | (0xff - (state->m_spotram[pen<<2|1] & 0xff)) << 2, |
| 1976 | | (0xff - (state->m_spotram[pen<<2|2] & 0xff)) << 2, |
| 1977 | | (0xff - (state->m_spotram[pen<<2|3] & 0xff)) << 2 |
| 2008 | (0xff - (m_spotram[pen << 2 | 1] & 0xff)) << 2, |
| 2009 | (0xff - (m_spotram[pen << 2 | 2] & 0xff)) << 2, |
| 2010 | (0xff - (m_spotram[pen << 2 | 3] & 0xff)) << 2 |
| 1978 | 2011 | ); |
| 1979 | 2012 | rgbint_scale_channel_and_clamp(&mix, &shade); |
| 1980 | 2013 | } |
| 1981 | 2014 | |
| 1982 | | int spot_factor = 0xff - (state->m_spotram[pen<<2] & 0xff); |
| 2015 | int spot_factor = 0xff - (m_spotram[pen << 2] & 0xff); |
| 1983 | 2016 | if (spot_factor < spot_limit) |
| 1984 | 2017 | rgbint_blend(&rgb, &mix, spot_factor); |
| 1985 | 2018 | } |
| r24771 | r24772 | |
| 1993 | 2026 | } |
| 1994 | 2027 | } |
| 1995 | 2028 | |
| 1996 | | static void namcos22_mix_textlayer( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect ) |
| 2029 | void namcos22_state::namcos22_mix_text_layer(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 1997 | 2030 | { |
| 1998 | | namcos22_state *state = screen.machine().driver_data<namcos22_state>(); |
| 1999 | | const pen_t *pens = screen.machine().pens; |
| 2031 | const pen_t *pens = machine().pens; |
| 2000 | 2032 | UINT16 *src; |
| 2001 | 2033 | UINT32 *dest; |
| 2002 | 2034 | UINT8 *pri; |
| 2003 | | int x,y; |
| 2004 | 2035 | |
| 2005 | 2036 | // prepare fader and shadow factor |
| 2006 | | bool fade_enabled = mixer.flags&2 && mixer.PolyFade_enabled; |
| 2007 | | bool shadow_enabled = mixer.flags&0x100; // ? (ridgerac is the only game not using shadow) |
| 2037 | bool fade_enabled = m_mixer_flags & 2 && m_poly_fade_enabled; |
| 2038 | bool shadow_enabled = (m_mixer_flags & 0x100) != 0; // ? (ridgerac is the only game not using shadow) |
| 2008 | 2039 | rgbint fade_color, rgb_mix[3]; |
| 2009 | 2040 | |
| 2010 | | rgb_comp_to_rgbint(&fade_color, mixer.rPolyFadeColor, mixer.gPolyFadeColor, mixer.bPolyFadeColor); |
| 2011 | | rgb_comp_to_rgbint(&rgb_mix[0], nthbyte(state->m_gamma, 0x08), nthbyte(state->m_gamma, 0x09), nthbyte(state->m_gamma, 0x0a)); // pen c |
| 2012 | | rgb_comp_to_rgbint(&rgb_mix[1], nthbyte(state->m_gamma, 0x0b), nthbyte(state->m_gamma, 0x0c), nthbyte(state->m_gamma, 0x0d)); // pen d |
| 2013 | | rgb_comp_to_rgbint(&rgb_mix[2], nthbyte(state->m_gamma, 0x0e), nthbyte(state->m_gamma, 0x0f), nthbyte(state->m_gamma, 0x10)); // pen e |
| 2041 | rgb_comp_to_rgbint(&fade_color, m_poly_fade_r, m_poly_fade_g, m_poly_fade_b); |
| 2042 | rgb_comp_to_rgbint(&rgb_mix[0], nthbyte(m_mixer, 0x08), nthbyte(m_mixer, 0x09), nthbyte(m_mixer, 0x0a)); // pen c |
| 2043 | rgb_comp_to_rgbint(&rgb_mix[1], nthbyte(m_mixer, 0x0b), nthbyte(m_mixer, 0x0c), nthbyte(m_mixer, 0x0d)); // pen d |
| 2044 | rgb_comp_to_rgbint(&rgb_mix[2], nthbyte(m_mixer, 0x0e), nthbyte(m_mixer, 0x0f), nthbyte(m_mixer, 0x10)); // pen e |
| 2014 | 2045 | |
| 2015 | 2046 | // mix textlayer with poly/sprites |
| 2016 | | for (y=0;y<480;y++) |
| 2047 | for (int y = cliprect.min_y; y <= cliprect.max_y; y++) |
| 2017 | 2048 | { |
| 2018 | | src = &state->m_mix_bitmap->pix16(y); |
| 2049 | src = &m_mix_bitmap->pix16(y); |
| 2019 | 2050 | dest = &bitmap.pix32(y); |
| 2020 | 2051 | pri = &screen.priority().pix8(y); |
| 2021 | | for (x=0;x<640;x++) |
| 2052 | for (int x = cliprect.min_x; x <= cliprect.max_x; x++) |
| 2022 | 2053 | { |
| 2023 | 2054 | // skip if transparent or under poly |
| 2024 | 2055 | if (pri[x] == 2) |
| r24771 | r24772 | |
| 2033 | 2064 | if (shadow_enabled) |
| 2034 | 2065 | { |
| 2035 | 2066 | rgb_to_rgbint(&rgb, dest[x]); |
| 2036 | | rgbint_scale_channel_and_clamp(&rgb, &rgb_mix[(src[x]&0xf)-0xc]); |
| 2067 | rgbint_scale_channel_and_clamp(&rgb, &rgb_mix[(src[x] & 0xf) - 0xc]); |
| 2037 | 2068 | break; |
| 2038 | 2069 | } |
| 2039 | 2070 | // (fall through) |
| r24771 | r24772 | |
| 2055 | 2086 | } |
| 2056 | 2087 | } |
| 2057 | 2088 | |
| 2058 | | static void DrawCharacterLayer(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect ) |
| 2089 | void namcos22_state::draw_text_layer(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 2059 | 2090 | { |
| 2060 | | namcos22_state *state = screen.machine().driver_data<namcos22_state>(); |
| 2061 | | int scroll_x = (state->m_tilemapattr[0]>>16) - 0x35c; |
| 2062 | | int scroll_y = state->m_tilemapattr[0]&0xffff; |
| 2091 | int scroll_x = (m_tilemapattr[0] >> 16) - 0x35c; |
| 2092 | int scroll_y = m_tilemapattr[0] & 0xffff; |
| 2063 | 2093 | |
| 2064 | | state->m_bgtilemap->set_scrollx(0, scroll_x & 0x3ff ); |
| 2065 | | state->m_bgtilemap->set_scrolly(0, scroll_y & 0x3ff ); |
| 2066 | | state->m_bgtilemap->set_palette_offset(mixer.palBase*256 ); |
| 2094 | m_bgtilemap->set_scrollx(0, scroll_x & 0x3ff); |
| 2095 | m_bgtilemap->set_scrolly(0, scroll_y & 0x3ff); |
| 2096 | m_bgtilemap->set_palette_offset(m_text_palbase * 256); |
| 2067 | 2097 | |
| 2068 | | if (state->m_bSuperSystem22) |
| 2098 | if (m_is_ss22) |
| 2069 | 2099 | { |
| 2070 | | state->m_bgtilemap->draw(screen, *state->m_mix_bitmap, cliprect, 0, 4, 4); |
| 2071 | | namcos22s_mix_textlayer(screen, bitmap, cliprect, 4); |
| 2100 | m_bgtilemap->draw(screen, *m_mix_bitmap, cliprect, 0, 4, 4); |
| 2101 | namcos22s_mix_text_layer(screen, bitmap, cliprect, 4); |
| 2072 | 2102 | } |
| 2073 | 2103 | else |
| 2074 | 2104 | { |
| 2075 | | state->m_bgtilemap->draw(screen, *state->m_mix_bitmap, cliprect, 0, 2, 3); |
| 2076 | | namcos22_mix_textlayer(screen, bitmap, cliprect); |
| 2105 | m_bgtilemap->draw(screen, *m_mix_bitmap, cliprect, 0, 2, 3); |
| 2106 | namcos22_mix_text_layer(screen, bitmap, cliprect); |
| 2077 | 2107 | } |
| 2078 | 2108 | } |
| 2079 | 2109 | |
| 2110 | |
| 2111 | |
| 2080 | 2112 | /*********************************************************************************************/ |
| 2081 | 2113 | |
| 2114 | WRITE32_MEMBER(namcos22_state::namcos22_paletteram_w) |
| 2115 | { |
| 2116 | COMBINE_DATA(&m_paletteram[offset]); |
| 2117 | m_dirtypal[offset & (0x7fff/4)] = 1; |
| 2118 | } |
| 2082 | 2119 | |
| 2083 | | static INT32 Signed18( UINT32 value ) |
| 2120 | void namcos22_state::update_palette() |
| 2084 | 2121 | { |
| 2085 | | INT32 offset = value&0x03ffff; |
| 2086 | | if( offset&0x20000 ) |
| 2122 | for (int i = 0; i < 0x8000/4; i++) |
| 2087 | 2123 | { |
| 2088 | | /* sign extend */ |
| 2089 | | offset |= ~0x03ffff; |
| 2124 | if (m_dirtypal[i]) |
| 2125 | { |
| 2126 | for (int j = 0; j < 4; j++) |
| 2127 | { |
| 2128 | int which = i * 4 + j; |
| 2129 | int r = nthbyte(m_paletteram, which + 0x00000); |
| 2130 | int g = nthbyte(m_paletteram, which + 0x08000); |
| 2131 | int b = nthbyte(m_paletteram, which + 0x10000); |
| 2132 | palette_set_color(machine(), which, MAKE_RGB(r, g, b)); |
| 2133 | } |
| 2134 | m_dirtypal[i] = 0; |
| 2135 | } |
| 2090 | 2136 | } |
| 2091 | | return offset; |
| 2092 | 2137 | } |
| 2093 | 2138 | |
| 2094 | | /** |
| 2095 | | * @brief render a single quad |
| 2096 | | * |
| 2097 | | * @param flags |
| 2098 | | * 00-1.----.01-0.001- ? (always set/clear) |
| 2099 | | * --x-.----.----.---- ? |
| 2100 | | * ----.xx--.----.---- cz table |
| 2101 | | * ----.--xx.----.---- representative z algorithm? |
| 2102 | | * ----.----.--x-.---- backface cull enable |
| 2103 | | * ----.----.----.---x ? |
| 2104 | | * |
| 2105 | | * 1163 // sky |
| 2106 | | * 1262 // score (front) |
| 2107 | | * 1242 // score (hinge) |
| 2108 | | * 1243 // ? |
| 2109 | | * 1063 // n/a |
| 2110 | | * 1243 // various (2-sided?) |
| 2111 | | * 1263 // everything else (1-sided?) |
| 2112 | | * 1663 // ? |
| 2113 | | * |
| 2114 | | * @param color |
| 2115 | | * xxxxxxxx -------- -------- flat shading factor |
| 2116 | | * -------- x------- -------- fog enable |
| 2117 | | * -------- -xxxxxxx -------- palette select |
| 2118 | | * -------- -------- xxxxxxxx unused? |
| 2119 | | * |
| 2120 | | * @param polygonShiftValue22 |
| 2121 | | * 0x1fbd0 - sky+sea |
| 2122 | | * 0x0c350 - mountains |
| 2123 | | * 0x09c40 - boats, surf, road, buildings |
| 2124 | | * 0x07350 - guardrail |
| 2125 | | * 0x061a8 - red car |
| 2126 | | */ |
| 2127 | | static void BlitQuadHelper(running_machine &machine, bitmap_rgb32 &bitmap, unsigned color, unsigned addr, float m[4][4], INT32 polygonShiftValue22, int flags, int packetFormat) |
| 2139 | |
| 2140 | void namcos22_state::update_mixer() |
| 2128 | 2141 | { |
| 2129 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 2130 | | int absolutePriority = state->m_AbsolutePriority; |
| 2131 | | INT32 zsortvalue24; |
| 2132 | | float zmin = 0.0f; |
| 2133 | | float zmax = 0.0f; |
| 2134 | | Poly3dVertex v[4]; |
| 2135 | 2142 | int i; |
| 2136 | | |
| 2137 | | for( i=0; i<4; i++ ) |
| 2143 | m_poly->wait("update_mixer"); |
| 2144 | #if 0 // show reg contents |
| 2145 | char msg1[0x1000] = {0}, msg2[0x1000] = {0}; |
| 2146 | int st = 0x000 / 16; |
| 2147 | for (i = st; i < (st+3); i++) |
| 2138 | 2148 | { |
| 2139 | | Poly3dVertex *pVerTex = &v[i]; |
| 2140 | | pVerTex->x = GetPolyData( state, 8+i*3+addr ); |
| 2141 | | pVerTex->y = GetPolyData( state, 9+i*3+addr ); |
| 2142 | | pVerTex->z = GetPolyData( state, 10+i*3+addr ); |
| 2143 | | TransformPoint( &pVerTex->x, &pVerTex->y, &pVerTex->z, m ); |
| 2149 | sprintf(msg2,"%04X %08X %08X %08X %08X\n", i*16, m_mixer[i*4+0], m_mixer[i*4+1], m_mixer[i*4+2], m_mixer[i*4+3]); |
| 2150 | strcat(msg1,msg2); |
| 2144 | 2151 | } |
| 2145 | | |
| 2146 | | /* backface cull one-sided polygons */ |
| 2147 | | if( flags&0x0020 && |
| 2148 | | (v[2].x*((v[0].z*v[1].y)-(v[0].y*v[1].z)))+ |
| 2149 | | (v[2].y*((v[0].x*v[1].z)-(v[0].z*v[1].x)))+ |
| 2150 | | (v[2].z*((v[0].y*v[1].x)-(v[0].x*v[1].y))) >= 0 && |
| 2151 | | |
| 2152 | | (v[0].x*((v[2].z*v[3].y)-(v[2].y*v[3].z)))+ |
| 2153 | | (v[0].y*((v[2].x*v[3].z)-(v[2].z*v[3].x)))+ |
| 2154 | | (v[0].z*((v[2].y*v[3].x)-(v[2].x*v[3].y))) >= 0 ) |
| 2152 | if (1) // + other non-super regs |
| 2153 | if (!m_is_ss22) |
| 2155 | 2154 | { |
| 2156 | | return; |
| 2157 | | } |
| 2158 | | |
| 2159 | | for( i=0; i<4; i++ ) |
| 2160 | | { |
| 2161 | | Poly3dVertex *pVerTex = &v[i]; |
| 2162 | | int bri; |
| 2163 | | |
| 2164 | | pVerTex->u = GetPolyData( state, 0+i*2+addr ); |
| 2165 | | pVerTex->v = GetPolyData( state, 1+i*2+addr ); |
| 2166 | | |
| 2167 | | if( i==0 || pVerTex->z > zmax ) zmax = pVerTex->z; |
| 2168 | | if( i==0 || pVerTex->z < zmin ) zmin = pVerTex->z; |
| 2169 | | |
| 2170 | | if( state->m_LitSurfaceCount ) |
| 2155 | strcat(msg1,"\n"); |
| 2156 | for (i = 8; i <= 0x20; i += 8) |
| 2171 | 2157 | { |
| 2172 | | // lighting (prelim) |
| 2173 | | bri = state->m_LitSurfaceInfo[state->m_LitSurfaceIndex%state->m_LitSurfaceCount]; |
| 2174 | | if( state->m_SurfaceNormalFormat == 0x6666 ) |
| 2175 | | { |
| 2176 | | if( i==3 ) |
| 2177 | | state->m_LitSurfaceIndex++; |
| 2178 | | } |
| 2179 | | else if( state->m_SurfaceNormalFormat == 0x4000 ) |
| 2180 | | state->m_LitSurfaceIndex++; |
| 2181 | | else |
| 2182 | | logerror( "unknown normal format: 0x%x\n", state->m_SurfaceNormalFormat ); |
| 2158 | sprintf(msg2,"%04X %08X %08X %08X %08X\n", i*16, m_mixer[i*4+0], m_mixer[i*4+1], m_mixer[i*4+2], m_mixer[i*4+3]); |
| 2159 | strcat(msg1,msg2); |
| 2183 | 2160 | } |
| 2184 | | else if( packetFormat & 0x40 ) |
| 2185 | | { |
| 2186 | | // gourad shading |
| 2187 | | bri = (GetPolyData(state, i+addr)>>16)&0xff; |
| 2188 | | } |
| 2189 | | else |
| 2190 | | { |
| 2191 | | // flat shading |
| 2192 | | bri = color>>16&0xff; |
| 2193 | | } |
| 2194 | | |
| 2195 | | pVerTex->bri = bri; |
| 2196 | 2161 | } |
| 2162 | popmessage("%s",msg1); |
| 2163 | #endif |
| 2197 | 2164 | |
| 2198 | | if( zmin<0.0f ) zmin = 0.0f; |
| 2199 | | if( zmax<0.0f ) zmax = 0.0f; |
| 2200 | | |
| 2201 | | switch (flags & 0x300) |
| 2165 | if (m_is_ss22) |
| 2202 | 2166 | { |
| 2203 | | case 0x000: |
| 2204 | | zsortvalue24 = (INT32)zmin; |
| 2205 | | break; |
| 2167 | /* |
| 2168 | 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 14 18 1c |
| 2169 | 00824000: ffffff00 00000000 0000007f 00ff0000 1000ff00 0f000000 00ff007f 00010007 // time crisis |
| 2170 | 00824000: ffffff00 00000000 1830407f 00800000 0000007f 0f000000 0000037f 00010007 // trans sprite |
| 2171 | 00824000: ffffff00 00000000 3040307f 00000000 0080007f 0f000000 0000037f 00010007 // trans poly |
| 2172 | 00824000: ffffff00 00000000 1800187f 00800000 0080007f 0f000000 0000037f 00010007 // trans poly(2) |
| 2173 | 00824000: ffffff00 00000000 1800187f 00000000 0000007f 0f800000 0000037f 00010007 // trans text |
| 2206 | 2174 | |
| 2207 | | case 0x100: |
| 2208 | | zsortvalue24 = (INT32)zmax; |
| 2209 | | break; |
| 2175 | 00,01,02 polygon fade rgb |
| 2176 | 03 |
| 2177 | 04 |
| 2178 | 05,06,07 world fog rgb |
| 2179 | 08,09,0a background color |
| 2180 | 0b |
| 2181 | 0c |
| 2182 | 0d spot factor limit value |
| 2183 | 0e enable spot factor limit |
| 2184 | 0f |
| 2185 | 10 |
| 2186 | 11 global polygon alpha factor |
| 2187 | 12,13 textlayer alpha pen comparison |
| 2188 | 14 textlayer alpha pen mask? |
| 2189 | 15 textlayer alpha factor |
| 2190 | 16,17,18 global fade rgb |
| 2191 | 19 global fade factor |
| 2192 | 1a fade target flags |
| 2193 | 1b textlayer palette base |
| 2194 | 1c |
| 2195 | 1d |
| 2196 | 1e |
| 2197 | 1f layer enable |
| 2198 | */ |
| 2199 | m_poly_fade_r = nthbyte(m_mixer, 0x00); |
| 2200 | m_poly_fade_g = nthbyte(m_mixer, 0x01); |
| 2201 | m_poly_fade_b = nthbyte(m_mixer, 0x02); m_poly_fade_enabled = (m_poly_fade_r == 0xff && m_poly_fade_g == 0xff && m_poly_fade_b == 0xff) ? 0 : 1; |
| 2202 | m_fog_r = nthbyte(m_mixer, 0x05); |
| 2203 | m_fog_g = nthbyte(m_mixer, 0x06); |
| 2204 | m_fog_b = nthbyte(m_mixer, 0x07); |
| 2205 | m_spot_limit = nthbyte(m_mixer, 0x0d); |
| 2206 | m_poly_translucency = nthbyte(m_mixer, 0x11); |
| 2207 | m_screen_fade_r = nthbyte(m_mixer, 0x16); |
| 2208 | m_screen_fade_g = nthbyte(m_mixer, 0x17); |
| 2209 | m_screen_fade_b = nthbyte(m_mixer, 0x18); |
| 2210 | m_screen_fade_factor = nthbyte(m_mixer, 0x19); |
| 2211 | m_mixer_flags = nthbyte(m_mixer, 0x1a); |
| 2212 | m_text_palbase = nthbyte(m_mixer, 0x1b) & 0x7f; |
| 2210 | 2213 | |
| 2211 | | default: |
| 2212 | | zsortvalue24 = (INT32)((zmin+zmax)/2.0f); |
| 2213 | | break; |
| 2214 | // put spot-specific flags into high word |
| 2215 | m_mixer_flags |= m_spot_enable << 16; |
| 2216 | m_mixer_flags |= (nthbyte(m_mixer, 0x0e) & 1) << 17; |
| 2217 | m_mixer_flags |= (m_chipselect & 0xc000) << 4; |
| 2214 | 2218 | } |
| 2215 | | |
| 2216 | | /* relative: representative z + shift values |
| 2217 | | * 1x.xxxx.xxxxxxxx.xxxxxxxx fixed z value |
| 2218 | | * 0x.xx--.--------.-------- absolute priority shift |
| 2219 | | * 0-.--xx.xxxxxxxx.xxxxxxxx z-representative value shift |
| 2220 | | */ |
| 2221 | | if( polygonShiftValue22 & 0x200000 ) |
| 2222 | | zsortvalue24 = polygonShiftValue22 & 0x1fffff; |
| 2223 | 2219 | else |
| 2224 | 2220 | { |
| 2225 | | zsortvalue24 += Signed18( polygonShiftValue22 ); |
| 2226 | | absolutePriority += (polygonShiftValue22&0x1c0000)>>18; |
| 2227 | | } |
| 2221 | /* |
| 2222 | 90020000: 4f030000 7f00007f 4d4d4d42 0c00c0c0 |
| 2223 | 90020010: c0010001 00010000 00000000 00000000 |
| 2224 | 90020080: 00010101 01010102 00000000 00000000 |
| 2225 | 900200c0: 00000000 00000000 00000000 03000000 |
| 2226 | 90020100: fff35000 00000000 00000000 00000000 |
| 2227 | 90020180: ff713700 00000000 00000000 00000000 |
| 2228 | 90020200: ff100000 00000000 00000000 00000000 |
| 2228 | 2229 | |
| 2229 | | if( state->m_ObjectShiftValue22 & 0x200000 ) |
| 2230 | | zsortvalue24 = state->m_ObjectShiftValue22 & 0x1fffff; |
| 2231 | | else |
| 2232 | | { |
| 2233 | | zsortvalue24 += Signed18( state->m_ObjectShiftValue22 ); |
| 2234 | | absolutePriority += (state->m_ObjectShiftValue22&0x1c0000)>>18; |
| 2235 | | } |
| 2230 | 00,01 display flags |
| 2231 | 02 |
| 2232 | 03 |
| 2233 | 04 |
| 2234 | 05 |
| 2235 | 06 |
| 2236 | 07 textlayer palette base? |
| 2237 | 08,09,0a textlayer pen c shadow rgb |
| 2238 | 0b,0c,0d textlayer pen d shadow rgb |
| 2239 | 0e,0f,10 textlayer pen e shadow rgb |
| 2240 | 11,12 global fade factor red |
| 2241 | 13,14 global fade factor green |
| 2242 | 15,16 global fade factor blue |
| 2243 | 80-87 fog color mask? |
| 2244 | 100,180,200 fog rgb 0 |
| 2245 | 101,181,201 fog rgb 1 |
| 2246 | 102,182,202 fog rgb 2 |
| 2247 | 103,183,203 fog rgb 3 |
| 2248 | */ |
| 2249 | m_mixer_flags = nthbyte(m_mixer, 0x00) << 8 | nthbyte(m_mixer, 0x01); |
| 2250 | m_poly_fade_r = nthbyte(m_mixer, 0x11) << 8 | nthbyte(m_mixer, 0x12); // 0x0100 = 1.0 |
| 2251 | m_poly_fade_g = nthbyte(m_mixer, 0x13) << 8 | nthbyte(m_mixer, 0x14); |
| 2252 | m_poly_fade_b = nthbyte(m_mixer, 0x15) << 8 | nthbyte(m_mixer, 0x16); |
| 2253 | m_poly_fade_enabled = (m_poly_fade_r == 0x100 && m_poly_fade_g == 0x100 && m_poly_fade_b == 0x100) ? 0 : 1; |
| 2236 | 2254 | |
| 2237 | | if (zsortvalue24 < 0) zsortvalue24 = 0; |
| 2238 | | else if (zsortvalue24 > 0x1fffff) zsortvalue24 = 0x1fffff; |
| 2239 | | absolutePriority &= 7; |
| 2240 | | zsortvalue24 |= (absolutePriority<<21); |
| 2255 | // raveracw is the only game using multiple fog colors (city smog, cars under tunnels, brake disc in attract mode) |
| 2256 | m_fog_colormask = m_mixer[0x84/4]; |
| 2241 | 2257 | |
| 2242 | | // allocate quad |
| 2243 | | struct SceneNode *node = NewSceneNode(machine, zsortvalue24, eSCENENODE_QUAD3D); |
| 2244 | | node->data.quad3d.cmode = (v[0].u>>12)&0xf; |
| 2245 | | node->data.quad3d.textureBank = (v[0].v>>12)&0xf; |
| 2246 | | node->data.quad3d.color = (color>>8)&0xff; |
| 2247 | | node->data.quad3d.flags = flags>>10&3; |
| 2248 | | node->data.quad3d.cz_adjust = state->m_cz_adjust; |
| 2258 | // fog color per cz type |
| 2259 | for (i = 0; i < 4; i++) |
| 2260 | { |
| 2261 | m_fog_r_per_cztype[i] = nthbyte(m_mixer, 0x0100+i); |
| 2262 | m_fog_g_per_cztype[i] = nthbyte(m_mixer, 0x0180+i); |
| 2263 | m_fog_b_per_cztype[i] = nthbyte(m_mixer, 0x0200+i); |
| 2264 | } |
| 2249 | 2265 | |
| 2250 | | for( i=0; i<4; i++ ) |
| 2251 | | { |
| 2252 | | Poly3dVertex *p = &node->data.quad3d.v[i]; |
| 2253 | | p->x = v[i].x*mCamera.zoom; |
| 2254 | | p->y = v[i].y*mCamera.zoom; |
| 2255 | | p->z = v[i].z; |
| 2256 | | p->u = v[i].u&0xfff; |
| 2257 | | p->v = v[i].v&0xfff; |
| 2258 | | p->bri = v[i].bri; |
| 2266 | m_text_palbase = 0x7f; |
| 2259 | 2267 | } |
| 2260 | | |
| 2261 | | node->data.quad3d.direct = 0; |
| 2262 | | node->data.quad3d.vx = mCamera.vx; |
| 2263 | | node->data.quad3d.vy = mCamera.vy; |
| 2264 | | node->data.quad3d.vw = mCamera.vw; |
| 2265 | | node->data.quad3d.vh = mCamera.vh; |
| 2266 | 2268 | } |
| 2267 | 2269 | |
| 2268 | | static void RegisterNormals( namcos22_state *state, INT32 addr, float m[4][4] ) |
| 2269 | | { |
| 2270 | | int i; |
| 2271 | | for( i=0; i<4; i++ ) |
| 2272 | | { |
| 2273 | | float nx = DSP_FIXED_TO_FLOAT(GetPolyData(state, addr+i*3+0)); |
| 2274 | | float ny = DSP_FIXED_TO_FLOAT(GetPolyData(state, addr+i*3+1)); |
| 2275 | | float nz = DSP_FIXED_TO_FLOAT(GetPolyData(state, addr+i*3+2)); |
| 2276 | | float dotproduct; |
| 2277 | 2270 | |
| 2278 | | /* transform normal vector */ |
| 2279 | | TransformNormal( &nx, &ny, &nz, m ); |
| 2280 | | dotproduct = nx*mCamera.lx + ny*mCamera.ly + nz*mCamera.lz; |
| 2281 | | if( dotproduct<0.0f ) |
| 2282 | | dotproduct = 0.0f; |
| 2283 | | state->m_LitSurfaceInfo[state->m_LitSurfaceCount++] = mCamera.ambient + mCamera.power*dotproduct; |
| 2284 | | } |
| 2285 | | } |
| 2286 | | |
| 2287 | | static void BlitQuads( running_machine &machine, bitmap_rgb32 &bitmap, INT32 addr, float m[4][4], INT32 base ) |
| 2271 | UINT32 namcos22_state::screen_update_namcos22s(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 2288 | 2272 | { |
| 2289 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 2290 | | // int numAdditionalNormals = 0; |
| 2291 | | int chunkLength = GetPolyData(state, addr++); |
| 2292 | | int finish = addr + chunkLength; |
| 2273 | update_mixer(); |
| 2274 | update_palette(); |
| 2275 | recalc_czram(); |
| 2276 | screen.priority().fill(0, cliprect); |
| 2293 | 2277 | |
| 2294 | | if( chunkLength>0x100 ) |
| 2295 | | fatalerror( "bad packet length\n" ); |
| 2296 | | |
| 2297 | | while( addr<finish ) |
| 2278 | // background color |
| 2279 | rgbint bg_color; |
| 2280 | rgb_comp_to_rgbint(&bg_color, nthbyte(m_mixer, 0x08), nthbyte(m_mixer, 0x09), nthbyte(m_mixer, 0x0a)); |
| 2281 | if (m_mixer_flags & 1 && m_screen_fade_factor) |
| 2298 | 2282 | { |
| 2299 | | int packetLength = GetPolyData( state, addr++ ); |
| 2300 | | int packetFormat = GetPolyData( state, addr+0 ); |
| 2301 | | int flags, color, bias; |
| 2283 | rgbint fade_color; |
| 2284 | rgb_comp_to_rgbint(&fade_color, m_screen_fade_r, m_screen_fade_g, m_screen_fade_b); |
| 2285 | rgbint_blend(&bg_color, &fade_color, 0xff - m_screen_fade_factor); |
| 2286 | } |
| 2287 | bitmap.fill(rgbint_to_rgb(&bg_color), cliprect); |
| 2302 | 2288 | |
| 2303 | | /** |
| 2304 | | * packetFormat: |
| 2305 | | * 800000 final packet in chunk |
| 2306 | | * 080000 ? |
| 2307 | | * 020000 color word exists? |
| 2308 | | * 010000 z-offset word exists? |
| 2309 | | * 002000 ? |
| 2310 | | * 001000 z-offset word exists? |
| 2311 | | * 000400 ? |
| 2312 | | * 000080 tex# or UV or CMODE? |
| 2313 | | * 000040 use I |
| 2314 | | * 000001 ? |
| 2315 | | */ |
| 2316 | | switch( packetLength ) |
| 2289 | // layers |
| 2290 | UINT8 layer = nthbyte(m_mixer, 0x1f); |
| 2291 | if (layer & 4) draw_text_layer(screen, bitmap, cliprect); |
| 2292 | if (layer & 2) draw_sprites(bitmap, cliprect); |
| 2293 | if (layer & 1) draw_polygons(bitmap); |
| 2294 | m_poly->render_scene(screen, bitmap); |
| 2295 | if (layer & 4) namcos22s_mix_text_layer(screen, bitmap, cliprect, 6); |
| 2296 | |
| 2297 | // apply gamma |
| 2298 | const UINT8 *rlut = (const UINT8 *)&m_mixer[0x100/4]; |
| 2299 | const UINT8 *glut = (const UINT8 *)&m_mixer[0x200/4]; |
| 2300 | const UINT8 *blut = (const UINT8 *)&m_mixer[0x300/4]; |
| 2301 | for (int y = cliprect.min_y; y <= cliprect.max_y; y++) |
| 2302 | { |
| 2303 | UINT32 *dest = &bitmap.pix32(y); |
| 2304 | for (int x = cliprect.min_x; x <= cliprect.max_x; x++) |
| 2317 | 2305 | { |
| 2318 | | case 0x17: |
| 2319 | | /** |
| 2320 | | * word 0: opcode (8a24c0) |
| 2321 | | * word 1: flags |
| 2322 | | * word 2: color |
| 2323 | | */ |
| 2324 | | flags = GetPolyData(state, addr+1); |
| 2325 | | color = GetPolyData(state, addr+2); |
| 2326 | | bias = 0; |
| 2327 | | BlitQuadHelper( machine,bitmap,color,addr+3,m,bias,flags,packetFormat ); |
| 2328 | | break; |
| 2329 | | |
| 2330 | | case 0x18: |
| 2331 | | /** |
| 2332 | | * word 0: opcode (0b3480 for first N-1 quads or 8b3480 for final quad in primitive) |
| 2333 | | * word 1: flags |
| 2334 | | * word 2: color |
| 2335 | | * word 3: depth bias |
| 2336 | | */ |
| 2337 | | flags = GetPolyData(state, addr+1); |
| 2338 | | color = GetPolyData(state, addr+2); |
| 2339 | | bias = GetPolyData(state, addr+3); |
| 2340 | | BlitQuadHelper( machine,bitmap,color,addr+4,m,bias,flags,packetFormat ); |
| 2341 | | break; |
| 2342 | | |
| 2343 | | case 0x10: /* vertex lighting */ |
| 2344 | | /* |
| 2345 | | 333401 (opcode) |
| 2346 | | 000000 [count] [type] |
| 2347 | | 000000 000000 007fff // normal vector |
| 2348 | | 000000 000000 007fff // normal vector |
| 2349 | | 000000 000000 007fff // normal vector |
| 2350 | | 000000 000000 007fff // normal vector |
| 2351 | | */ |
| 2352 | | // numAdditionalNormals = GetPolyData(state, addr+2); |
| 2353 | | state->m_SurfaceNormalFormat = GetPolyData(state, addr+3); |
| 2354 | | state->m_LitSurfaceCount = 0; |
| 2355 | | state->m_LitSurfaceIndex = 0; |
| 2356 | | RegisterNormals( state, addr+4, m ); |
| 2357 | | break; |
| 2358 | | |
| 2359 | | case 0x0d: /* additional normals */ |
| 2360 | | /* |
| 2361 | | 300401 (opcode) |
| 2362 | | 007b09 ffdd04 0004c2 |
| 2363 | | 007a08 ffd968 0001c1 |
| 2364 | | ff8354 ffe401 000790 |
| 2365 | | ff84f7 ffdd04 0004c2 |
| 2366 | | */ |
| 2367 | | RegisterNormals( state, addr+1, m ); |
| 2368 | | break; |
| 2369 | | |
| 2370 | | default: |
| 2371 | | break; |
| 2306 | int rgb = dest[x]; |
| 2307 | int r = rlut[NATIVE_ENDIAN_VALUE_LE_BE(3, 0) ^ ((rgb >> 16) & 0xff)]; |
| 2308 | int g = glut[NATIVE_ENDIAN_VALUE_LE_BE(3, 0) ^ ((rgb >> 8) & 0xff)]; |
| 2309 | int b = blut[NATIVE_ENDIAN_VALUE_LE_BE(3, 0) ^ (rgb & 0xff)]; |
| 2310 | dest[x] = (r << 16) | (g << 8) | b; |
| 2372 | 2311 | } |
| 2373 | | addr += packetLength; |
| 2374 | 2312 | } |
| 2375 | | } |
| 2376 | 2313 | |
| 2377 | | static void BlitPolyObject( running_machine &machine, bitmap_rgb32 &bitmap, int code, float M[4][4] ) |
| 2378 | | { |
| 2379 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 2380 | | unsigned addr1 = GetPolyData(state, code); |
| 2381 | | state->m_LitSurfaceCount = 0; |
| 2382 | | state->m_LitSurfaceIndex = 0; |
| 2383 | | for(;;) |
| 2384 | | { |
| 2385 | | INT32 addr2 = GetPolyData(state, addr1++); |
| 2386 | | if( addr2<0 ) |
| 2387 | | break; |
| 2388 | | BlitQuads( machine, bitmap, addr2, M, code ); |
| 2389 | | } |
| 2314 | return 0; |
| 2390 | 2315 | } |
| 2391 | 2316 | |
| 2392 | | /*******************************************************************************/ |
| 2393 | | |
| 2394 | | READ32_MEMBER(namcos22_state::namcos22_dspram_r) |
| 2317 | UINT32 namcos22_state::screen_update_namcos22(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 2395 | 2318 | { |
| 2396 | | return m_polygonram[offset] | 0xff000000; // only d0-23 are connected |
| 2397 | | } |
| 2398 | | |
| 2399 | | WRITE32_MEMBER(namcos22_state::namcos22_dspram_w) |
| 2400 | | { |
| 2401 | | if (mem_mask & 0x00ff0000) |
| 2319 | update_mixer(); |
| 2320 | update_palette(); |
| 2321 | screen.priority().fill(0, cliprect); |
| 2322 | |
| 2323 | // background color |
| 2324 | bitmap.fill(screen.machine().pens[0x7fff], cliprect); |
| 2325 | |
| 2326 | // layers |
| 2327 | draw_polygons(bitmap); |
| 2328 | m_poly->render_scene(screen, bitmap); |
| 2329 | draw_text_layer(screen, bitmap, cliprect); |
| 2330 | |
| 2331 | // apply gamma |
| 2332 | const UINT8 *rlut = (const UINT8 *)m_gamma_proms->base(); |
| 2333 | const UINT8 *glut = (const UINT8 *)m_gamma_proms->base() + 0x100; |
| 2334 | const UINT8 *blut = (const UINT8 *)m_gamma_proms->base() + 0x200; |
| 2335 | for (int y = cliprect.min_y; y <= cliprect.max_y; y++) |
| 2402 | 2336 | { |
| 2403 | | // sign extend or crop |
| 2404 | | mem_mask |= 0xff000000; |
| 2405 | | if (data & 0x00800000) |
| 2406 | | data |= 0xff000000; |
| 2407 | | else |
| 2408 | | data &= 0xffffff; |
| 2337 | UINT32 *dest = &bitmap.pix32(y); |
| 2338 | for (int x = cliprect.min_x; x <= cliprect.max_x; x++) |
| 2339 | { |
| 2340 | int rgb = dest[x]; |
| 2341 | int r = rlut[(rgb >> 16) & 0xff]; |
| 2342 | int g = glut[(rgb >> 8) & 0xff]; |
| 2343 | int b = blut[rgb & 0xff]; |
| 2344 | dest[x] = (r << 16) | (g << 8) | b; |
| 2345 | } |
| 2409 | 2346 | } |
| 2410 | 2347 | |
| 2411 | | COMBINE_DATA( &m_polygonram[offset] ); |
| 2348 | return 0; |
| 2412 | 2349 | } |
| 2413 | 2350 | |
| 2414 | | /*******************************************************************************/ |
| 2415 | 2351 | |
| 2416 | | /** |
| 2417 | | * master DSP can write directly to render device via port 0xc. |
| 2418 | | * This is used for "direct drawn" polygons, and "direct draw from point rom" |
| 2419 | | * feature - both opcodes exist in Ridge Racer's display-list processing |
| 2420 | | * |
| 2421 | | * record format: |
| 2422 | | * header (3 words) |
| 2423 | | * polygonShiftValue22 |
| 2424 | | * color |
| 2425 | | * flags |
| 2426 | | * |
| 2427 | | * per-vertex data (4*6 words) |
| 2428 | | * u,v |
| 2429 | | * sx,sy |
| 2430 | | * intensity;z.exponent |
| 2431 | | * z.mantissa |
| 2432 | | * |
| 2433 | | * master DSP can specify 3d objects indirectly (along with view transforms), |
| 2434 | | * via the "transmit" PDP opcode. the "render device" sends quad data to the slave DSP |
| 2435 | | * viewspace clipping and projection |
| 2436 | | * |
| 2437 | | * most "3d object" references are 0x45 and greater. references less than 0x45 are "special" |
| 2438 | | * commands, using a similar point rom format. the point rom header may point to point ram. |
| 2439 | | * |
| 2440 | | * slave DSP reads records via port 4 |
| 2441 | | * its primary purpose is applying lighting calculations |
| 2442 | | * the slave DSP forwards draw commands to a "draw device" |
| 2443 | | */ |
| 2444 | 2352 | |
| 2445 | | /*******************************************************************************/ |
| 2353 | /*********************************************************************************************/ |
| 2446 | 2354 | |
| 2447 | | /** |
| 2448 | | * 0xfffd |
| 2449 | | * 0x0: transform |
| 2450 | | * 0x1 |
| 2451 | | * 0x2 |
| 2452 | | * 0x5: transform |
| 2453 | | * >=0x45: draw primitive |
| 2454 | | */ |
| 2455 | | static void HandleBB0003( namcos22_state *state, const INT32 *pSource ) |
| 2355 | void namcos22_state::init_tables() |
| 2456 | 2356 | { |
| 2457 | | /* |
| 2458 | | bb0003 or 3b0003 |
| 2357 | m_dirtypal = auto_alloc_array(machine(), UINT8, 0x8000/4); |
| 2358 | memset(m_dirtypal, 1, 0x8000/4); |
| 2359 | memset(m_paletteram, 0, 0x8000); |
| 2459 | 2360 | |
| 2460 | | 14.00c8 light.ambient light.power |
| 2461 | | 01.0000 ? light.dx |
| 2462 | | 06.5a82 window priority light.dy |
| 2463 | | 00.a57e ? light.dz |
| 2361 | memset(m_polygonram, 0xcc, m_polygonram.bytes()); |
| 2464 | 2362 | |
| 2465 | | c8.0081 vx=200,vy=129 |
| 2466 | | 29.6092 zoom = 772.5625 |
| 2467 | | 1e.95f8 1e.95f8 0.5858154296875 0.5858154296875 // 452 |
| 2468 | | 1e.b079 1e.b079 0.6893463134765 0.6893463134765 // 532 |
| 2469 | | 29.58e8 711.25 (border? see time crisis) |
| 2363 | // init spotram (super22 only) |
| 2364 | if (m_is_ss22) |
| 2365 | m_spotram = auto_alloc_array_clear(machine(), UINT16, SPOTRAM_SIZE); |
| 2470 | 2366 | |
| 2471 | | 7ffe 0000 0000 |
| 2472 | | 0000 7ffe 0000 |
| 2473 | | 0000 0000 7ffe |
| 2474 | | */ |
| 2475 | | mCamera.ambient = pSource[0x1]>>16; |
| 2476 | | mCamera.power = pSource[0x1]&0xffff; |
| 2477 | | |
| 2478 | | mCamera.lx = DSP_FIXED_TO_FLOAT(pSource[0x2]); |
| 2479 | | mCamera.ly = DSP_FIXED_TO_FLOAT(pSource[0x3]); |
| 2480 | | mCamera.lz = DSP_FIXED_TO_FLOAT(pSource[0x4]); |
| 2481 | | |
| 2482 | | state->m_AbsolutePriority = pSource[0x3]>>16; |
| 2483 | | mCamera.vx = (INT16)(pSource[5]>>16); |
| 2484 | | mCamera.vy = (INT16)pSource[5]; |
| 2485 | | mCamera.zoom = DspFloatToNativeFloat(pSource[6]); |
| 2486 | | mCamera.vw = DspFloatToNativeFloat(pSource[7])*mCamera.zoom; |
| 2487 | | mCamera.vh = DspFloatToNativeFloat(pSource[9])*mCamera.zoom; |
| 2488 | | |
| 2489 | | state->m_ViewMatrix[0][0] = DSP_FIXED_TO_FLOAT(pSource[0x0c]); |
| 2490 | | state->m_ViewMatrix[1][0] = DSP_FIXED_TO_FLOAT(pSource[0x0d]); |
| 2491 | | state->m_ViewMatrix[2][0] = DSP_FIXED_TO_FLOAT(pSource[0x0e]); |
| 2492 | | |
| 2493 | | state->m_ViewMatrix[0][1] = DSP_FIXED_TO_FLOAT(pSource[0x0f]); |
| 2494 | | state->m_ViewMatrix[1][1] = DSP_FIXED_TO_FLOAT(pSource[0x10]); |
| 2495 | | state->m_ViewMatrix[2][1] = DSP_FIXED_TO_FLOAT(pSource[0x11]); |
| 2496 | | |
| 2497 | | state->m_ViewMatrix[0][2] = DSP_FIXED_TO_FLOAT(pSource[0x12]); |
| 2498 | | state->m_ViewMatrix[1][2] = DSP_FIXED_TO_FLOAT(pSource[0x13]); |
| 2499 | | state->m_ViewMatrix[2][2] = DSP_FIXED_TO_FLOAT(pSource[0x14]); |
| 2500 | | |
| 2501 | | TransformNormal( &mCamera.lx, &mCamera.ly, &mCamera.lz, state->m_ViewMatrix ); |
| 2502 | | } |
| 2503 | | |
| 2504 | | static void Handle200002( running_machine &machine, bitmap_rgb32 &bitmap, const INT32 *pSource ) |
| 2505 | | { |
| 2506 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 2507 | | if( state->m_PrimitiveID>=0x45 ) |
| 2367 | // init czram tables (super22 only) |
| 2368 | if (m_is_ss22) |
| 2508 | 2369 | { |
| 2509 | | float m[4][4]; /* row major */ |
| 2510 | | |
| 2511 | | matrix3d_Identity( m ); |
| 2512 | | |
| 2513 | | m[0][0] = DSP_FIXED_TO_FLOAT(pSource[0x1]); |
| 2514 | | m[1][0] = DSP_FIXED_TO_FLOAT(pSource[0x2]); |
| 2515 | | m[2][0] = DSP_FIXED_TO_FLOAT(pSource[0x3]); |
| 2516 | | |
| 2517 | | m[0][1] = DSP_FIXED_TO_FLOAT(pSource[0x4]); |
| 2518 | | m[1][1] = DSP_FIXED_TO_FLOAT(pSource[0x5]); |
| 2519 | | m[2][1] = DSP_FIXED_TO_FLOAT(pSource[0x6]); |
| 2520 | | |
| 2521 | | m[0][2] = DSP_FIXED_TO_FLOAT(pSource[0x7]); |
| 2522 | | m[1][2] = DSP_FIXED_TO_FLOAT(pSource[0x8]); |
| 2523 | | m[2][2] = DSP_FIXED_TO_FLOAT(pSource[0x9]); |
| 2524 | | |
| 2525 | | m[3][0] = pSource[0xa]; /* xpos */ |
| 2526 | | m[3][1] = pSource[0xb]; /* ypos */ |
| 2527 | | m[3][2] = pSource[0xc]; /* zpos */ |
| 2528 | | |
| 2529 | | matrix3d_Multiply( m, state->m_ViewMatrix ); |
| 2530 | | BlitPolyObject( machine, bitmap, state->m_PrimitiveID, m ); |
| 2370 | for (int table = 0; table < 4; table++) |
| 2371 | { |
| 2372 | m_banked_czram[table] = auto_alloc_array_clear(machine(), UINT16, 0x100); |
| 2373 | m_recalc_czram[table] = auto_alloc_array_clear(machine(), UINT8, 0x2000); |
| 2374 | m_cz_was_written[table] = 1; |
| 2375 | } |
| 2531 | 2376 | } |
| 2532 | | else if( state->m_PrimitiveID !=0 && state->m_PrimitiveID !=2 ) |
| 2377 | |
| 2378 | // init pointrom |
| 2379 | m_pointrom_size = memregion("pointrom")->bytes()/3; |
| 2380 | m_pointrom = auto_alloc_array(machine(), INT32, m_pointrom_size); |
| 2381 | UINT8* pointrom_low = memregion("pointrom")->base(); |
| 2382 | UINT8* pointrom_mid = pointrom_low + m_pointrom_size; |
| 2383 | UINT8* pointrom_high = pointrom_mid + m_pointrom_size; |
| 2384 | for (int i = 0; i < m_pointrom_size; i++) |
| 2533 | 2385 | { |
| 2534 | | logerror( "Handle200002:unk code=0x%x\n", state->m_PrimitiveID ); |
| 2535 | | // ridgerac title screen waving flag: 0x5 |
| 2386 | m_pointrom[i] = signed24(pointrom_high[i] << 16 | pointrom_mid[i] << 8 | pointrom_low[i]); |
| 2536 | 2387 | } |
| 2537 | | } |
| 2388 | |
| 2389 | m_pointram = auto_alloc_array_clear(machine(), UINT32, 0x20000); |
| 2538 | 2390 | |
| 2539 | | static void Handle300000( namcos22_state *state, const INT32 *pSource ) |
| 2540 | | { |
| 2541 | | state->m_ViewMatrix[0][0] = DSP_FIXED_TO_FLOAT(pSource[1]); |
| 2542 | | state->m_ViewMatrix[1][0] = DSP_FIXED_TO_FLOAT(pSource[2]); |
| 2543 | | state->m_ViewMatrix[2][0] = DSP_FIXED_TO_FLOAT(pSource[3]); |
| 2391 | // textures |
| 2392 | for (int i = 0; i < machine().gfx[1]->elements(); i++) |
| 2393 | machine().gfx[1]->decode(i); |
| 2544 | 2394 | |
| 2545 | | state->m_ViewMatrix[0][1] = DSP_FIXED_TO_FLOAT(pSource[4]); |
| 2546 | | state->m_ViewMatrix[1][1] = DSP_FIXED_TO_FLOAT(pSource[5]); |
| 2547 | | state->m_ViewMatrix[2][1] = DSP_FIXED_TO_FLOAT(pSource[6]); |
| 2548 | | |
| 2549 | | state->m_ViewMatrix[0][2] = DSP_FIXED_TO_FLOAT(pSource[7]); |
| 2550 | | state->m_ViewMatrix[1][2] = DSP_FIXED_TO_FLOAT(pSource[8]); |
| 2551 | | state->m_ViewMatrix[2][2] = DSP_FIXED_TO_FLOAT(pSource[9]); |
| 2552 | | } /* Handle300000 */ |
| 2553 | | |
| 2554 | | static void Handle233002( namcos22_state *state, const INT32 *pSource ) |
| 2555 | | { |
| 2556 | | /* |
| 2557 | | 00233002 |
| 2558 | | 00000000 // cz adjust (signed24) |
| 2559 | | 0003dd00 // z bias adjust |
| 2560 | | 001fffff // far plane? |
| 2561 | | 00007fff 00000000 00000000 |
| 2562 | | 00000000 00007fff 00000000 |
| 2563 | | 00000000 00000000 00007fff |
| 2564 | | 00000000 00000000 00000000 |
| 2565 | | */ |
| 2566 | | state->m_cz_adjust = (pSource[1] & 0x00800000) ? pSource[1] | 0xff000000 : pSource[1] & 0x00ffffff; |
| 2567 | | state->m_ObjectShiftValue22 = pSource[2]; |
| 2568 | | } |
| 2569 | | |
| 2570 | | static void SimulateSlaveDSP( running_machine &machine, bitmap_rgb32 &bitmap ) |
| 2571 | | { |
| 2572 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 2573 | | const INT32 *pSource = 0x300 + (INT32 *)state->m_polygonram.target(); |
| 2574 | | INT16 len; |
| 2575 | | |
| 2576 | | matrix3d_Identity( state->m_ViewMatrix ); |
| 2577 | | |
| 2578 | | if( state->m_bSuperSystem22 ) |
| 2395 | m_texture_tilemap = (UINT16 *)memregion("textilemap")->base(); |
| 2396 | m_texture_tiledata = (UINT8 *)machine().gfx[1]->get_data(0); |
| 2397 | m_texture_tileattr = auto_alloc_array(machine(), UINT8, 0x080000*2); |
| 2398 | |
| 2399 | // unpack textures |
| 2400 | UINT8 *packed_tileattr = 0x200000 + (UINT8 *)memregion("textilemap")->base(); |
| 2401 | UINT8 *unpacked_tileattr = m_texture_tileattr; |
| 2402 | for (int i = 0; i < 0x80000; i++) |
| 2579 | 2403 | { |
| 2580 | | pSource += 4; /* FFFE 0400 */ |
| 2404 | *unpacked_tileattr++ = (*packed_tileattr) >> 4; |
| 2405 | *unpacked_tileattr++ = (*packed_tileattr) & 0xf; |
| 2406 | packed_tileattr++; |
| 2581 | 2407 | } |
| 2582 | | else |
| 2408 | |
| 2409 | // make attr/y/x lookup table |
| 2410 | m_texture_ayx_to_pixel = auto_alloc_array(machine(), UINT8, 16*16*16); |
| 2411 | for (int attr = 0; attr < 16; attr++) |
| 2583 | 2412 | { |
| 2584 | | pSource--; |
| 2585 | | } |
| 2586 | | |
| 2587 | | for(;;) |
| 2588 | | { |
| 2589 | | INT16 next; |
| 2590 | | state->m_PrimitiveID = *pSource++; |
| 2591 | | len = (INT16)*pSource++; |
| 2592 | | |
| 2593 | | switch( len ) |
| 2413 | for (int y = 0; y < 16; y++) |
| 2594 | 2414 | { |
| 2595 | | case 0x15: |
| 2596 | | HandleBB0003( state, pSource ); /* define viewport */ |
| 2597 | | break; |
| 2415 | for (int x = 0; x < 16; x++) |
| 2416 | { |
| 2417 | int ix = x, iy = y; |
| 2598 | 2418 | |
| 2599 | | case 0x10: |
| 2600 | | Handle233002( state, pSource ); /* set modal rendering options */ |
| 2601 | | break; |
| 2419 | if (attr & 4) |
| 2420 | ix = 15 - ix; |
| 2602 | 2421 | |
| 2603 | | case 0x0a: |
| 2604 | | Handle300000( state, pSource ); /* modify view transform */ |
| 2605 | | break; |
| 2422 | if (attr & 2) |
| 2423 | iy = 15 - iy; |
| 2606 | 2424 | |
| 2607 | | case 0x0d: |
| 2608 | | Handle200002( machine, bitmap, pSource ); /* render primitive */ |
| 2609 | | break; |
| 2425 | if (attr & 8) |
| 2426 | { |
| 2427 | int temp = ix; |
| 2428 | ix = iy; |
| 2429 | iy = temp; |
| 2430 | } |
| 2610 | 2431 | |
| 2611 | | default: |
| 2612 | | logerror( "unk 3d data(%d) addr=0x%x!", len, (int)(pSource-(INT32*)state->m_polygonram.target()) ); |
| 2432 | m_texture_ayx_to_pixel[attr << 8 | y << 4 | x] = (iy << 4) | ix; |
| 2433 | } |
| 2434 | } |
| 2435 | } |
| 2436 | |
| 2437 | // following setup is Namco System 22 specific |
| 2438 | switch (m_gametype) |
| 2439 | { |
| 2440 | case NAMCOS22_RIDGE_RACER: |
| 2441 | case NAMCOS22_RIDGE_RACER2: |
| 2442 | case NAMCOS22_ACE_DRIVER: |
| 2443 | case NAMCOS22_CYBER_COMMANDO: |
| 2444 | { |
| 2445 | for (int i = 0; i < 0x100000; i++) |
| 2613 | 2446 | { |
| 2614 | | int i; |
| 2615 | | for( i=0; i<len; i++ ) |
| 2447 | int tile = m_texture_tilemap[i]; |
| 2448 | int attr = m_texture_tileattr[i]; |
| 2449 | if ((attr & 0x1) == 0) |
| 2616 | 2450 | { |
| 2617 | | logerror( " %06x", pSource[i]&0xffffff ); |
| 2451 | tile = (tile & 0x3fff) | 0x8000; |
| 2452 | m_texture_tilemap[i] = tile; |
| 2618 | 2453 | } |
| 2619 | | logerror( "\n" ); |
| 2620 | 2454 | } |
| 2621 | | return; |
| 2455 | break; |
| 2622 | 2456 | } |
| 2623 | 2457 | |
| 2624 | | /* hackery! commands should be streamed, not parsed here */ |
| 2625 | | pSource += len; |
| 2626 | | pSource++; /* always 0xffff */ |
| 2627 | | next = (INT16)*pSource++; /* link to next command */ |
| 2628 | | if( (next&0x7fff) != (pSource - (INT32 *)state->m_polygonram.target()) ) |
| 2629 | | { |
| 2630 | | /* end of list */ |
| 2458 | default: |
| 2631 | 2459 | break; |
| 2632 | | } |
| 2633 | 2460 | } |
| 2634 | 2461 | } |
| 2635 | 2462 | |
| 2636 | | static void DrawPolygons( running_machine &machine, bitmap_rgb32 &bitmap ) |
| 2637 | | { |
| 2638 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 2639 | | if( state->m_bDSPisActive ) |
| 2640 | | { |
| 2641 | | SimulateSlaveDSP( machine, bitmap ); |
| 2642 | | poly_wait(state->m_poly, "DrawPolygons"); |
| 2643 | | } |
| 2644 | | } |
| 2645 | 2463 | |
| 2646 | | void namcos22_enable_slave_simulation( running_machine &machine, int enable ) |
| 2647 | | { |
| 2648 | | namcos22_state *state = machine.driver_data<namcos22_state>(); |
| 2649 | | state->m_bDSPisActive = enable; |
| 2650 | | } |
| 2651 | | |
| 2652 | | /*********************************************************************************************/ |
| 2653 | | |
| 2654 | | READ32_MEMBER(namcos22_state::namcos22_cgram_r) |
| 2655 | | { |
| 2656 | | return m_cgram[offset]; |
| 2657 | | } |
| 2658 | | |
| 2659 | | WRITE32_MEMBER(namcos22_state::namcos22_cgram_w) |
| 2660 | | { |
| 2661 | | COMBINE_DATA( &m_cgram[offset] ); |
| 2662 | | machine().gfx[GFX_CHAR]->mark_dirty(offset/32); |
| 2663 | | } |
| 2664 | | |
| 2665 | | READ32_MEMBER(namcos22_state::namcos22_paletteram_r) |
| 2666 | | { |
| 2667 | | return m_generic_paletteram_32[offset]; |
| 2668 | | } |
| 2669 | | |
| 2670 | | WRITE32_MEMBER(namcos22_state::namcos22_paletteram_w) |
| 2671 | | { |
| 2672 | | COMBINE_DATA( &m_generic_paletteram_32[offset] ); |
| 2673 | | m_dirtypal[offset&(0x7fff/4)] = 1; |
| 2674 | | } |
| 2675 | | |
| 2676 | | void namcos22_state::namcos22_reset() |
| 2677 | | { |
| 2678 | | memset(&mSceneRoot, 0, sizeof(mSceneRoot)); |
| 2679 | | mpFreeSceneNode = NULL; |
| 2680 | | } |
| 2681 | | |
| 2682 | | void namcos22_state::namcos22_exit() |
| 2683 | | { |
| 2684 | | poly_free(m_poly); |
| 2685 | | } |
| 2686 | | |
| 2687 | 2464 | VIDEO_START_MEMBER(namcos22_state,common) |
| 2688 | 2465 | { |
| 2689 | | int code; |
| 2466 | init_tables(); |
| 2690 | 2467 | |
| 2691 | | m_mix_bitmap = auto_bitmap_ind16_alloc(machine(),640,480); |
| 2692 | | m_bgtilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(namcos22_state::TextTilemapGetInfo),this),TILEMAP_SCAN_ROWS,16,16,64,64 ); |
| 2468 | m_mix_bitmap = auto_bitmap_ind16_alloc(machine(), 640, 480); |
| 2469 | m_bgtilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(namcos22_state::get_text_tile_info), this), TILEMAP_SCAN_ROWS, 16, 16, 64, 64); |
| 2693 | 2470 | m_bgtilemap->set_transparent_pen(0xf); |
| 2694 | 2471 | |
| 2695 | | m_bDSPisActive = 0; |
| 2696 | | memset( m_polygonram, 0xcc, 0x20000 ); |
| 2472 | machine().gfx[0]->set_source((UINT8 *)m_cgram.target()); |
| 2697 | 2473 | |
| 2698 | | for (code = 0; code < machine().gfx[GFX_TEXTURE_TILE]->elements(); code++) |
| 2699 | | machine().gfx[GFX_TEXTURE_TILE]->decode(code); |
| 2700 | | |
| 2701 | | Prepare3dTexture(machine(), memregion("textilemap")->base(), machine().gfx[GFX_TEXTURE_TILE]->get_data(0) ); |
| 2702 | | m_dirtypal = auto_alloc_array(machine(), UINT8, NAMCOS22_PALETTE_SIZE/4); |
| 2703 | | m_PtRomSize = memregion("pointrom")->bytes()/3; |
| 2704 | | m_pPolyL = memregion("pointrom")->base(); |
| 2705 | | m_pPolyM = m_pPolyL + m_PtRomSize; |
| 2706 | | m_pPolyH = m_pPolyM + m_PtRomSize; |
| 2707 | | |
| 2708 | | m_poly = poly_alloc(machine(), 4000, sizeof(poly_extra_data), 0); |
| 2709 | | machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(namcos22_state::namcos22_reset), this)); |
| 2710 | | machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(namcos22_state::namcos22_exit), this)); |
| 2711 | | |
| 2712 | | machine().gfx[GFX_CHAR]->set_source((UINT8 *)m_cgram.target()); |
| 2474 | m_poly = auto_alloc(machine(), namcos22_renderer(*this)); |
| 2713 | 2475 | } |
| 2714 | 2476 | |
| 2715 | 2477 | VIDEO_START_MEMBER(namcos22_state,namcos22) |
| 2716 | 2478 | { |
| 2717 | | m_bSuperSystem22 = 0; |
| 2479 | m_is_ss22 = 0; |
| 2480 | |
| 2718 | 2481 | VIDEO_START_CALL_MEMBER(common); |
| 2719 | 2482 | } |
| 2720 | 2483 | |
| 2721 | 2484 | VIDEO_START_MEMBER(namcos22_state,namcos22s) |
| 2722 | 2485 | { |
| 2723 | | m_bSuperSystem22 = 1; |
| 2486 | m_is_ss22 = 1; |
| 2724 | 2487 | |
| 2725 | | // init spotram |
| 2726 | | m_spotram = auto_alloc_array(machine(), UINT16, SPOTRAM_SIZE); |
| 2727 | | memset(m_spotram, 0, SPOTRAM_SIZE*2); |
| 2728 | | |
| 2729 | | // init czram tables |
| 2730 | | int table; |
| 2731 | | for (table=0; table<4; table++) |
| 2732 | | { |
| 2733 | | m_banked_czram[table] = auto_alloc_array(machine(), UINT16, 0x100); |
| 2734 | | memset(m_banked_czram[table], 0, 0x100*2); |
| 2735 | | m_recalc_czram[table] = auto_alloc_array(machine(), UINT8, 0x2000); |
| 2736 | | memset(m_recalc_czram[table], 0, 0x2000); |
| 2737 | | m_cz_was_written[table] = 0; |
| 2738 | | } |
| 2739 | | |
| 2740 | 2488 | VIDEO_START_CALL_MEMBER(common); |
| 2741 | 2489 | } |
| 2742 | | |
| 2743 | | UINT32 namcos22_state::screen_update_namcos22s(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 2744 | | { |
| 2745 | | UpdateVideoMixer(machine()); |
| 2746 | | UpdatePalette(machine()); |
| 2747 | | namcos22s_recalc_czram(machine()); |
| 2748 | | screen.priority().fill(0, cliprect); |
| 2749 | | |
| 2750 | | // background color |
| 2751 | | rgbint bg_color; |
| 2752 | | rgb_comp_to_rgbint(&bg_color, nthbyte(m_gamma,0x08), nthbyte(m_gamma,0x09), nthbyte(m_gamma,0x0a)); |
| 2753 | | if (mixer.flags&1 && mixer.fadeFactor) |
| 2754 | | { |
| 2755 | | rgbint fade_color; |
| 2756 | | rgb_comp_to_rgbint(&fade_color, mixer.rFadeColor, mixer.gFadeColor, mixer.bFadeColor); |
| 2757 | | rgbint_blend(&bg_color, &fade_color, 0xff - mixer.fadeFactor); |
| 2758 | | } |
| 2759 | | bitmap.fill(rgbint_to_rgb(&bg_color), cliprect); |
| 2760 | | |
| 2761 | | // layers |
| 2762 | | UINT8 layer = nthbyte(m_gamma,0x1f); |
| 2763 | | if (layer&4) DrawCharacterLayer(screen, bitmap, cliprect); |
| 2764 | | if (layer&2) DrawSprites(machine(), bitmap, cliprect); |
| 2765 | | if (layer&1) DrawPolygons(machine(), bitmap); |
| 2766 | | RenderScene(screen, bitmap ); |
| 2767 | | if (layer&4) namcos22s_mix_textlayer(screen, bitmap, cliprect, 6); |
| 2768 | | ApplyGamma(machine(), bitmap); |
| 2769 | | |
| 2770 | | // debug stuff |
| 2771 | | #if ALLOW_MEMDUMP |
| 2772 | | if( machine().input().code_pressed(KEYCODE_D) ) |
| 2773 | | { |
| 2774 | | FILE *f = fopen( "dump.txt", "wb" ); |
| 2775 | | if( f ) |
| 2776 | | { |
| 2777 | | address_space &space = m_maincpu->space(AS_PROGRAM); |
| 2778 | | |
| 2779 | | if (1) // czram |
| 2780 | | { |
| 2781 | | int i,bank; |
| 2782 | | for( bank=0; bank<4; bank++ ) |
| 2783 | | { |
| 2784 | | fprintf( f, "czram[%d] =", bank ); |
| 2785 | | for( i=0; i<256; i++ ) |
| 2786 | | { |
| 2787 | | fprintf( f, " %04x", m_banked_czram[bank][i] ); |
| 2788 | | } |
| 2789 | | fprintf( f, "\n" ); |
| 2790 | | } |
| 2791 | | fprintf( f, "\n" ); |
| 2792 | | } |
| 2793 | | |
| 2794 | | if (0) // spotram |
| 2795 | | { |
| 2796 | | int i; |
| 2797 | | fprintf(f, "spotram:\n"); |
| 2798 | | for (i=0; i<256; i++) |
| 2799 | | { |
| 2800 | | fprintf(f, "%02X: %04X %04X %04X %04X\n", i, m_spotram[i*4+0], m_spotram[i*4+1], m_spotram[i*4+2], m_spotram[i*4+3]); |
| 2801 | | } |
| 2802 | | fprintf(f, "\n"); |
| 2803 | | } |
| 2804 | | |
| 2805 | | Dump(space, f,0x810000, 0x81000f, "cz attr" ); |
| 2806 | | Dump(space, f,0x824000, 0x8243ff, "gamma"); |
| 2807 | | //Dump(space, f,0x828000, 0x83ffff, "palette" ); |
| 2808 | | //Dump(space, f,0x8a0000, 0x8a000f, "tilemap_attr"); |
| 2809 | | //Dump(space, f,0x880000, 0x89ffff, "cgram/textram"); |
| 2810 | | //Dump(space, f,0x900000, 0x90ffff, "vics_data"); |
| 2811 | | //Dump(space, f,0x940000, 0x94007f, "vics_control"); |
| 2812 | | //Dump(space, f,0x980000, 0x9affff, "sprite374" ); |
| 2813 | | //Dump(space, f,0xc00000, 0xc1ffff, "polygonram"); |
| 2814 | | fclose( f ); |
| 2815 | | } |
| 2816 | | while( machine().input().code_pressed(KEYCODE_D) ){} |
| 2817 | | } |
| 2818 | | #endif |
| 2819 | | |
| 2820 | | // popmessage("%08X %08X %08X %08X",m_czattr[0],m_czattr[1],m_czattr[2],m_czattr[3]); |
| 2821 | | |
| 2822 | | return 0; |
| 2823 | | } |
| 2824 | | |
| 2825 | | UINT32 namcos22_state::screen_update_namcos22(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 2826 | | { |
| 2827 | | UpdateVideoMixer(machine()); |
| 2828 | | UpdatePalette(machine()); |
| 2829 | | screen.priority().fill(0, cliprect); |
| 2830 | | bitmap.fill(0, cliprect); |
| 2831 | | DrawPolygons(machine(), bitmap); |
| 2832 | | RenderScene(screen, bitmap); |
| 2833 | | DrawCharacterLayer(screen, bitmap, cliprect); |
| 2834 | | ApplyGamma(machine(), bitmap); |
| 2835 | | |
| 2836 | | #if ALLOW_MEMDUMP |
| 2837 | | if( machine().input().code_pressed(KEYCODE_D) ) |
| 2838 | | { |
| 2839 | | FILE *f = fopen( "dump.txt", "wb" ); |
| 2840 | | if( f ) |
| 2841 | | { |
| 2842 | | address_space &space = m_maincpu->space(AS_PROGRAM); |
| 2843 | | |
| 2844 | | //Dump(space, f,0x90000000, 0x90000003, "led?" ); |
| 2845 | | Dump(space, f,0x90010000, 0x90017fff, "cz_ram"); |
| 2846 | | //Dump(space, f,0x900a0000, 0x900a000f, "tilemap_attr"); |
| 2847 | | Dump(space, f,0x90020000, 0x90027fff, "gamma"); |
| 2848 | | //Dump(space, f,0x70000000, 0x7001ffff, "polygonram"); |
| 2849 | | fclose( f ); |
| 2850 | | } |
| 2851 | | while( machine().input().code_pressed(KEYCODE_D) ){} |
| 2852 | | } |
| 2853 | | #endif |
| 2854 | | |
| 2855 | | return 0; |
| 2856 | | } |
| 2857 | | |
| 2858 | | WRITE16_MEMBER(namcos22_state::namcos22_dspram16_bank_w) |
| 2859 | | { |
| 2860 | | COMBINE_DATA( &m_dspram_bank ); |
| 2861 | | } |
| 2862 | | |
| 2863 | | READ16_MEMBER(namcos22_state::namcos22_dspram16_r) |
| 2864 | | { |
| 2865 | | UINT32 value = m_polygonram[offset]; |
| 2866 | | switch( m_dspram_bank ) |
| 2867 | | { |
| 2868 | | case 0: |
| 2869 | | value &= 0xffff; |
| 2870 | | break; |
| 2871 | | |
| 2872 | | case 1: |
| 2873 | | value>>=16; |
| 2874 | | break; |
| 2875 | | |
| 2876 | | case 2: |
| 2877 | | m_UpperWordLatch = value>>16; |
| 2878 | | value &= 0xffff; |
| 2879 | | break; |
| 2880 | | |
| 2881 | | default: |
| 2882 | | break; |
| 2883 | | } |
| 2884 | | return (UINT16)value; |
| 2885 | | } |
| 2886 | | |
| 2887 | | WRITE16_MEMBER(namcos22_state::namcos22_dspram16_w) |
| 2888 | | { |
| 2889 | | UINT32 value = m_polygonram[offset]; |
| 2890 | | UINT16 lo = value&0xffff; |
| 2891 | | UINT16 hi = value>>16; |
| 2892 | | switch( m_dspram_bank ) |
| 2893 | | { |
| 2894 | | case 0: |
| 2895 | | COMBINE_DATA( &lo ); |
| 2896 | | break; |
| 2897 | | |
| 2898 | | case 1: |
| 2899 | | COMBINE_DATA( &hi ); |
| 2900 | | break; |
| 2901 | | |
| 2902 | | case 2: |
| 2903 | | COMBINE_DATA( &lo ); |
| 2904 | | hi = m_UpperWordLatch; |
| 2905 | | break; |
| 2906 | | |
| 2907 | | default: |
| 2908 | | break; |
| 2909 | | } |
| 2910 | | m_polygonram[offset] = (hi<<16)|lo; |
| 2911 | | } |