Previous 15994 Revisions Next

r8251 Tuesday 8th June, 2010 at 20:03:55 UTC by Michael Zapf
Extending cartridge type paged379i to 128 KiB dumps
[src/mess/devices]ti99cart.c

src/mess/devices/ti99cart.c
r8250r8251
13061306
13071307/*****************************************************************************
13081308  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.
13121312    The pages are selected by writing a value to some memory locations. Due to
13131313    using the inverted outputs of the LS379 latch, setting the inputs of the
13141314    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
13161316    there are new hardware developments mainly relying on this scheme.
13171317
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
13271335
13281336******************************************************************************/
13291337
r8250r8251
13701378   if (cartridge->rom_size > 16384)
13711379   {
13721380      if (cartridge->rom_size > 32768)
1373         mask = 7;
1381      {
1382         if (cartridge->rom_size > 65536)
1383            mask = 15;
1384         else
1385            mask = 7;
1386      }
13741387      else
13751388         mask = 3;
13761389   }
r8250r8251
13941407   ti99_pcb_t *pcb = (ti99_pcb_t *)device->token;
13951408   cartridge_t *cartridge = pcb->cartridge;
13961409/*
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
14081412    16bit access -> drop rightmost bit
14091413*/
1410   set_paged379i_bank(cartridge, 7 - (offset & 7));
1414   set_paged379i_bank(cartridge, 15 - (offset & 15));
14111415}
14121416
14131417/*
r8250r8251
14491453   ti99_pcb_t *pcb = (ti99_pcb_t *)device->token;
14501454   cartridge_t *cartridge = pcb->cartridge;
14511455/*
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
14641458*/
1465   set_paged379i_bank(cartridge, 7 - ((offset>>1) & 7));
1459   set_paged379i_bank(cartridge, 15 - ((offset>>1) & 15));
14661460}
14671461
14681462/*
r8250r8251
15071501static DEVICE_START(ti99_pcb_pagedcru)
15081502{
15091503   /* 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());
15111505   set_pointers(device, get_index_from_tagname(device->owner)-1);
15121506}
15131507
r8250r8251
16361630{
16371631   cartridge_t *cart;
16381632
1639//  printf("assemble_paged379i, %s\n", image->tag);
1633//  printf("assemble_pagedcru, %s\n", image->tag);
16401634   cart = assemble_common(image);
16411635   if (cart->rom_ptr==NULL)
16421636   {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team