src/mess/machine/ti99/grom.c
| r13252 | r13253 | |
| 127 | 127 | |
| 128 | 128 | if (offset & 2) |
| 129 | 129 | { |
| 130 | | // At least GROM 0 should answer the address read request |
| 130 | // GROMs generally answer the address read request |
| 131 | 131 | // (important if GROM simulators do not serve the request but rely on |
| 132 | 132 | // 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; |
| 137 | 133 | |
| 138 | 134 | /* When reading, reset the hi/lo flag byte for writing. */ |
| 139 | 135 | /* TODO: Verify this with a real machine. */ |
src/mess/machine/ti99/gromport.c
| r13252 | r13253 | |
| 1698 | 1698 | return; |
| 1699 | 1699 | } |
| 1700 | 1700 | |
| 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++) |
| 1702 | 1703 | { |
| 1703 | | cartridge = &cartslots->cartridge[slot]; |
| 1704 | cartridge = &cartslots->cartridge[j]; |
| 1704 | 1705 | // Send the request to all mounted GROMs |
| 1705 | 1706 | if (cartridge->pcb!=NULL) |
| 1706 | 1707 | { |
| r13252 | r13253 | |
| 1762 | 1763 | if (cartslots->fixed_slot==AUTO && cartslots->next_free_slot==1) |
| 1763 | 1764 | slot=0; |
| 1764 | 1765 | |
| 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++) |
| 1766 | 1770 | { |
| 1767 | 1771 | // Select the cartridge which the multicart system is currently pointing at |
| 1768 | | cartridge = &cartslots->cartridge[slot]; |
| 1772 | cartridge = &cartslots->cartridge[j]; |
| 1769 | 1773 | // Send the request to all mounted GROMs on this PCB |
| 1770 | 1774 | if (cartridge->pcb!=NULL) |
| 1771 | 1775 | { |
| r13252 | r13253 | |
| 1773 | 1777 | { |
| 1774 | 1778 | ti99_pcb_t *pcbdef = get_safe_pcb_token(cartridge->pcb); |
| 1775 | 1779 | 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 | } |
| 1777 | 1788 | } |
| 1778 | 1789 | } |
| 1779 | 1790 | } |