Previous 15994 Revisions Next

r13253 Monday 14th November, 2011 at 20:23:20 UTC by Michael Zapf
ti99: Improved recent fix for grom response on different banks (no whatsnew)
[src/mess/machine/ti99]grom.c gromport.c

src/mess/machine/ti99/grom.c
r13252r13253
127127
128128   if (offset & 2)
129129   {
130      // At least GROM 0 should answer the address read request
130      // GROMs generally answer the address read request
131131      // (important if GROM simulators do not serve the request but rely on
132132      // the console GROMs) so we don't check the ident
133      // Note that we prevent cartridge GROMs to answer if they are not
134      // accessed
135      if (((grom->address >> 13)&0x07)!=grom->ident && (grom->ident!=0))
136         return;
137133
138134      /* When reading, reset the hi/lo flag byte for writing. */
139135      /* TODO: Verify this with a real machine. */
src/mess/machine/ti99/gromport.c
r13252r13253
16981698      return;
16991699   }
17001700
1701   if (slot < NUMBER_OF_CARTRIDGE_SLOTS)
1701   // We need to send the write request to all attached cartridges
1702   for (int j=0; j < NUMBER_OF_CARTRIDGE_SLOTS; j++)
17021703   {
1703      cartridge = &cartslots->cartridge[slot];
1704      cartridge = &cartslots->cartridge[j];
17041705      // Send the request to all mounted GROMs
17051706      if (cartridge->pcb!=NULL)
17061707      {
r13252r13253
17621763   if (cartslots->fixed_slot==AUTO && cartslots->next_free_slot==1)
17631764      slot=0;
17641765
1765   if (slot < NUMBER_OF_CARTRIDGE_SLOTS)
1766   // We need to send the read request to all cartriges so that
1767   // the internal address counters stay in sync. However, we only respect
1768   // the return of the selected cartridge.
1769   for (int j=0; j < NUMBER_OF_CARTRIDGE_SLOTS; j++)
17661770   {
17671771      // Select the cartridge which the multicart system is currently pointing at
1768      cartridge = &cartslots->cartridge[slot];
1772      cartridge = &cartslots->cartridge[j];
17691773      // Send the request to all mounted GROMs on this PCB
17701774      if (cartridge->pcb!=NULL)
17711775      {
r13252r13253
17731777         {
17741778            ti99_pcb_t *pcbdef = get_safe_pcb_token(cartridge->pcb);
17751779            if (pcbdef->grom[i]!=NULL)
1776               ti99grom_rz(pcbdef->grom[i], offset, value);
1780            {
1781               UINT8 newvalue = *value;
1782               ti99grom_rz(pcbdef->grom[i], offset, &newvalue);
1783               if (j==slot)
1784               {
1785                  *value = newvalue;
1786               }
1787            }
17771788         }
17781789      }
17791790   }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team