src/mess/machine/c64.c
| r5537 | r5538 | |
| 1127 | 1127 | case FINAL_CART_I: /* Type # 13 */ |
| 1128 | 1128 | case C64GS: /* Type # 15 */ |
| 1129 | 1129 | case DINAMIC: /* Type # 17 */ |
| 1130 | case ZAXXON: /* Type # 18 */ |
| 1130 | 1131 | case COMAL_80: /* Type # 21 */ |
| 1131 | 1132 | case GENERIC_CRT: /* Type # 0 */ |
| 1132 | 1133 | printf("Currently supported cart type (Type %d)\n", c64_cart_type); |
| r5537 | r5538 | |
| 1284 | 1285 | } |
| 1285 | 1286 | } |
| 1286 | 1287 | */ |
| 1287 | | memcpy(roml, cart + 0 * 0x2000, 0x2000); |
| 1288 | | memcpy(romh, cart + 1 * 0x2000, 0x2000); |
| 1288 | switch( c64_mapper ) |
| 1289 | { |
| 1290 | case ZAXXON: |
| 1291 | // c64_game = 0; |
| 1292 | // c64_exrom = 0; |
| 1293 | memcpy(romh, cart + 0x1000, 0x2000); |
| 1294 | break; |
| 1295 | default: |
| 1296 | memcpy(roml, cart + 0 * 0x2000, 0x2000); |
| 1297 | memcpy(romh, cart + 1 * 0x2000, 0x2000); |
| 1298 | } |
| 1289 | 1299 | |
| 1290 | 1300 | c64_cart_n_banks = n_banks; // this is needed so that we only set mappers if a cart is present! |
| 1301 | |
| 1291 | 1302 | return INIT_PASS; |
| 1292 | 1303 | } |
| 1293 | 1304 | |
| r5537 | r5538 | |
| 1465 | 1476 | return 0; |
| 1466 | 1477 | } |
| 1467 | 1478 | |
| 1479 | static READ8_HANDLER( zaxxon_bank_r ) |
| 1480 | { |
| 1481 | // Type # 18 |
| 1482 | // working: |
| 1483 | // not working: |
| 1484 | |
| 1485 | UINT8 bank; |
| 1486 | UINT8 *cart = memory_region(space->machine, "cart"); |
| 1487 | |
| 1488 | if (offset < 0x1000) |
| 1489 | bank = 0; |
| 1490 | else |
| 1491 | bank = 1; |
| 1492 | |
| 1493 | // c64_game = 0; |
| 1494 | // c64_exrom = 0; |
| 1495 | |
| 1496 | memcpy(romh, cart + bank * 0x2000 + 0x1000, 0x2000); |
| 1497 | |
| 1498 | return cart[offset & 0x0fff]; |
| 1499 | } |
| 1500 | |
| 1468 | 1501 | static WRITE8_HANDLER( comal80_bank_w ) |
| 1469 | 1502 | { |
| 1470 | 1503 | // Type # 21 |
| r5537 | r5538 | |
| 1535 | 1568 | case DINAMIC: /* Type # 17 - 16 8k banks, loaded at 0x8000, banks chosen by reading to 0xde00 + bank */ |
| 1536 | 1569 | memory_install_read8_handler( space, 0xde00, 0xdeff, 0, 0, dinamic_bank_r ); |
| 1537 | 1570 | break; |
| 1571 | case ZAXXON: /* Type # 18 */ |
| 1572 | memory_install_read8_handler( space, 0x8000, 0x9fff, 0, 0, zaxxon_bank_r ); |
| 1573 | break; |
| 1538 | 1574 | case COMAL_80: /* Type # 21 - 4 16k banks, loaded at 0x8000, banks chosen by writing to 0xde00 */ |
| 1539 | 1575 | memory_install_write8_handler( space, 0xde00, 0xde00, 0, 0, comal80_bank_w ); |
| 1540 | 1576 | break; |