src/mess/devices/ti99cart.c
| r8250 | r8251 | |
| 1306 | 1306 | |
| 1307 | 1307 | /***************************************************************************** |
| 1308 | 1308 | Cartridge type: paged379i |
| 1309 | | This cartridge consists of one 16 KiB, 32 KiB, or 64 KiB EEPROM which is |
| 1310 | | organised in 2, 4, or 8 pages of 8 KiB each. We assume there is only one |
| 1311 | | dump file of the respective size. |
| 1309 | This cartridge consists of one 16 KiB, 32 KiB, 64 KiB, or 128 KiB EEPROM |
| 1310 | which is organised in 2, 4, 8, or 16 pages of 8 KiB each. The complete |
| 1311 | memory contents must be stored in one dump file. |
| 1312 | 1312 | The pages are selected by writing a value to some memory locations. Due to |
| 1313 | 1313 | using the inverted outputs of the LS379 latch, setting the inputs of the |
| 1314 | 1314 | latch to all 0 selects the highest bank, while setting to all 1 selects the |
| 1315 | | lowest.There are some cartridges (16 KiB) which are using this scheme, and |
| 1315 | lowest. There are some cartridges (16 KiB) which are using this scheme, and |
| 1316 | 1316 | there are new hardware developments mainly relying on this scheme. |
| 1317 | 1317 | |
| 1318 | | Writing to selects page (16K/32K/64K) |
| 1319 | | >6000 1 / 3 / 7 |
| 1320 | | >6002 0 / 2 / 6 |
| 1321 | | >6004 1 / 1 / 5 |
| 1322 | | >6006 0 / 0 / 4 |
| 1323 | | >6008 1 / 3 / 3 |
| 1324 | | >600A 0 / 2 / 2 |
| 1325 | | >600C 1 / 1 / 1 |
| 1326 | | >600E 0 / 0 / 0 |
| 1318 | Writing to selects page (16K/32K/64K/128K) |
| 1319 | >6000 1 / 3 / 7 / 15 |
| 1320 | >6002 0 / 2 / 6 / 14 |
| 1321 | >6004 1 / 1 / 5 / 13 |
| 1322 | >6006 0 / 0 / 4 / 12 |
| 1323 | >6008 1 / 3 / 3 / 11 |
| 1324 | >600A 0 / 2 / 2 / 10 |
| 1325 | >600C 1 / 1 / 1 / 9 |
| 1326 | >600E 0 / 0 / 0 / 8 |
| 1327 | >6010 1 / 3 / 7 / 7 |
| 1328 | >6012 0 / 2 / 6 / 6 |
| 1329 | >6014 1 / 1 / 5 / 5 |
| 1330 | >6016 0 / 0 / 4 / 4 |
| 1331 | >6018 1 / 3 / 3 / 3 |
| 1332 | >601A 0 / 2 / 2 / 2 |
| 1333 | >601C 1 / 1 / 1 / 1 |
| 1334 | >601E 0 / 0 / 0 / 0 |
| 1327 | 1335 | |
| 1328 | 1336 | ******************************************************************************/ |
| 1329 | 1337 | |
| r8250 | r8251 | |
| 1370 | 1378 | if (cartridge->rom_size > 16384) |
| 1371 | 1379 | { |
| 1372 | 1380 | if (cartridge->rom_size > 32768) |
| 1373 | | mask = 7; |
| 1381 | { |
| 1382 | if (cartridge->rom_size > 65536) |
| 1383 | mask = 15; |
| 1384 | else |
| 1385 | mask = 7; |
| 1386 | } |
| 1374 | 1387 | else |
| 1375 | 1388 | mask = 3; |
| 1376 | 1389 | } |
| r8250 | r8251 | |
| 1394 | 1407 | ti99_pcb_t *pcb = (ti99_pcb_t *)device->token; |
| 1395 | 1408 | cartridge_t *cartridge = pcb->cartridge; |
| 1396 | 1409 | /* |
| 1397 | | >6000 1 / 3 / 7 |
| 1398 | | >6002 0 / 2 / 6 |
| 1399 | | >6004 1 / 1 / 5 |
| 1400 | | >6006 0 / 0 / 4 |
| 1401 | | >6008 1 / 3 / 3 |
| 1402 | | >600A 0 / 2 / 2 |
| 1403 | | >600C 1 / 1 / 1 |
| 1404 | | >600E 0 / 0 / 0 |
| 1405 | | |
| 1406 | | Bits: 011x xxxx xxxx bbbx |
| 1407 | | x = don't care, bbb = bank |
| 1410 | Bits: 011x xxxx xxxb bbbx |
| 1411 | x = don't care, bbbb = bank |
| 1408 | 1412 | 16bit access -> drop rightmost bit |
| 1409 | 1413 | */ |
| 1410 | | set_paged379i_bank(cartridge, 7 - (offset & 7)); |
| 1414 | set_paged379i_bank(cartridge, 15 - (offset & 15)); |
| 1411 | 1415 | } |
| 1412 | 1416 | |
| 1413 | 1417 | /* |
| r8250 | r8251 | |
| 1449 | 1453 | ti99_pcb_t *pcb = (ti99_pcb_t *)device->token; |
| 1450 | 1454 | cartridge_t *cartridge = pcb->cartridge; |
| 1451 | 1455 | /* |
| 1452 | | >6000 1 / 3 / 7 |
| 1453 | | >6002 0 / 2 / 6 |
| 1454 | | >6004 1 / 1 / 5 |
| 1455 | | >6006 0 / 0 / 4 |
| 1456 | | >6008 1 / 3 / 3 |
| 1457 | | >600A 0 / 2 / 2 |
| 1458 | | >600C 1 / 1 / 1 |
| 1459 | | >600E 0 / 0 / 0 |
| 1460 | | |
| 1461 | | Bits: 011x xxxx xxxx bbbx |
| 1462 | | x = don't care, bbb = bank |
| 1463 | | 16bit access -> drop rightmost bit |
| 1456 | Bits: 011x xxxx xxxb bbbx |
| 1457 | x = don't care, bbbb = bank |
| 1464 | 1458 | */ |
| 1465 | | set_paged379i_bank(cartridge, 7 - ((offset>>1) & 7)); |
| 1459 | set_paged379i_bank(cartridge, 15 - ((offset>>1) & 15)); |
| 1466 | 1460 | } |
| 1467 | 1461 | |
| 1468 | 1462 | /* |
| r8250 | r8251 | |
| 1507 | 1501 | static DEVICE_START(ti99_pcb_pagedcru) |
| 1508 | 1502 | { |
| 1509 | 1503 | /* device is ti99_cartslot:cartridge:pcb */ |
| 1510 | | // printf("DEVICE_START(ti99_pcb_paged379i), tag of device=%s\n", device->tag()); |
| 1504 | // printf("DEVICE_START(ti99_pcb_pagedcru), tag of device=%s\n", device->tag()); |
| 1511 | 1505 | set_pointers(device, get_index_from_tagname(device->owner)-1); |
| 1512 | 1506 | } |
| 1513 | 1507 | |
| r8250 | r8251 | |
| 1636 | 1630 | { |
| 1637 | 1631 | cartridge_t *cart; |
| 1638 | 1632 | |
| 1639 | | // printf("assemble_paged379i, %s\n", image->tag); |
| 1633 | // printf("assemble_pagedcru, %s\n", image->tag); |
| 1640 | 1634 | cart = assemble_common(image); |
| 1641 | 1635 | if (cart->rom_ptr==NULL) |
| 1642 | 1636 | { |