trunk/src/mess/machine/ti99/datamux.c
| r25477 | r25478 | |
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | // FIXME: Allow for a separate debugger access, or it will spoil the whole |
| 138 | // addressing process! |
| 139 | |
| 137 | 140 | /* |
| 138 | 141 | Read access. We are using two loops because the delay between both |
| 139 | 142 | accesses must not occur within the loop. So we have one access on the bus, |
| r25477 | r25478 | |
| 142 | 145 | */ |
| 143 | 146 | READ16_MEMBER( ti99_datamux_device::read ) |
| 144 | 147 | { |
| 148 | if (space.debugger_access()) |
| 149 | { |
| 150 | // FIXME, or the debugger will become blind for addresses outside |
| 151 | // ROM and scratch pad RAM. |
| 152 | return 0; |
| 153 | } |
| 154 | |
| 145 | 155 | // Looks ugly, but this is close to the real thing. If the 16bit |
| 146 | 156 | // memory expansion is installed in the console, and the access hits its |
| 147 | 157 | // space, just respond to the memory access and don't bother the |
| 148 | 158 | // datamux in any way. In particular, do not make the datamux insert wait |
| 149 | 159 | // states. |
| 160 | |
| 150 | 161 | if (m_base32k != 0) |
| 151 | 162 | { |
| 152 | 163 | UINT16 reply = m_ram16b[offset-m_base32k]; |
| r25477 | r25478 | |
| 169 | 180 | */ |
| 170 | 181 | WRITE16_MEMBER( ti99_datamux_device::write ) |
| 171 | 182 | { |
| 172 | | // Although MESS allows for using mem_mask to address parts of the |
| 173 | | // data bus, this is not used in the TMS implementation. In fact, all |
| 174 | | // accesses are true 16-bit accesses. We check for mem_mask always |
| 175 | | // being ffff. |
| 183 | // Addresses below 0x2000 are ROM and should be handled in the address map |
| 184 | // by the ROM entry, but as the write handler for ROM is not mapped, we end up |
| 185 | // here when there are invalid accesses, and this will mess up everything. |
| 186 | if (offset < 0x1000) return; |
| 176 | 187 | |
| 188 | if (space.debugger_access()) |
| 189 | { |
| 190 | // Do not accept write operations from the debugger (later maybe). |
| 191 | return; |
| 192 | } |
| 193 | |
| 177 | 194 | // Handle the internal 32K expansion |
| 178 | 195 | if (m_base32k != 0) |
| 179 | 196 | { |
| r25477 | r25478 | |
| 277 | 294 | void ti99_datamux_device::dbin_in(int state) |
| 278 | 295 | { |
| 279 | 296 | m_read_mode = (state==ASSERT_LINE); |
| 280 | | if (VERBOSE>6) LOG("datamux: data bus in = %d\n", m_read_mode? 1:0 ); |
| 297 | if (VERBOSE>7) LOG("datamux: data bus in = %d\n", m_read_mode? 1:0 ); |
| 281 | 298 | } |
| 282 | 299 | |
| 283 | 300 | /*************************************************************************** |