trunk/src/mess/drivers/snes.c
| r21787 | r21788 | |
| 2215 | 2215 | else if (m_slotcart->get_type() == SNES_OBC1 |
| 2216 | 2216 | && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) |
| 2217 | 2217 | return m_slotcart->m_cart->chip_read(space, offset); |
| 2218 | else if ((m_slotcart->get_type() == SNES_ST010 /*|| m_slotcart->get_type() == SNES_ST011*/) // why does this break moritash? |
| 2219 | && (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000)) |
| 2220 | return m_slotcart->m_cart->chip_read(space, offset); |
| 2218 | 2221 | else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011) |
| 2219 | | && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000)) |
| 2222 | && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000)) |
| 2220 | 2223 | return m_slotcart->m_cart->chip_read(space, offset); |
| 2221 | | else if ((m_slotcart->get_type() == SNES_ST010 /*|| m_slotcart->get_type() == SNES_ST011*/) // why does this freeze moritash? |
| 2222 | | && (offset == 0x600000 || offset == 0x600001)) |
| 2223 | | return m_slotcart->m_cart->chip_read(space, offset); |
| 2224 | 2224 | else if (m_slotcart->get_type() == SNES_SRTC |
| 2225 | 2225 | && (offset < 0x400000 && (offset & 0xffff) == 0x2800)) |
| 2226 | 2226 | return m_slotcart->m_cart->chip_read(space, offset & 0xffff); |
| r21787 | r21788 | |
| 2280 | 2280 | && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) |
| 2281 | 2281 | return m_slotcart->m_cart->chip_read(space, offset); |
| 2282 | 2282 | else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011) |
| 2283 | | && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000)) |
| 2283 | && (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000)) |
| 2284 | 2284 | return m_slotcart->m_cart->chip_read(space, offset); |
| 2285 | 2285 | else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011) |
| 2286 | | && (offset == 0x600000 || offset == 0x600001)) |
| 2286 | && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000)) |
| 2287 | 2287 | return m_slotcart->m_cart->chip_read(space, offset); |
| 2288 | 2288 | else if (m_slotcart->get_type() == SNES_SRTC |
| 2289 | 2289 | && (offset < 0x400000 && (offset & 0xffff) == 0x2800)) |
| r21787 | r21788 | |
| 2350 | 2350 | && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) |
| 2351 | 2351 | m_slotcart->m_cart->chip_write(space, offset, data); |
| 2352 | 2352 | else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011) |
| 2353 | | && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000)) |
| 2353 | && (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000)) |
| 2354 | 2354 | m_slotcart->m_cart->chip_write(space, offset, data); |
| 2355 | 2355 | else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011) |
| 2356 | | && (offset == 0x600000 || offset == 0x600001)) |
| 2356 | && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000)) |
| 2357 | 2357 | m_slotcart->m_cart->chip_write(space, offset, data); |
| 2358 | 2358 | else if (m_slotcart->get_type() == SNES_SRTC |
| 2359 | 2359 | && (offset < 0x400000 && (offset & 0xffff) == 0x2801)) |
| r21787 | r21788 | |
| 2425 | 2425 | && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) |
| 2426 | 2426 | return m_slotcart->m_cart->chip_write(space, offset, data); |
| 2427 | 2427 | else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011) |
| 2428 | | && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000)) |
| 2428 | && (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000)) |
| 2429 | 2429 | m_slotcart->m_cart->chip_write(space, offset, data); |
| 2430 | 2430 | else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011) |
| 2431 | | && (offset == 0x600000 || offset == 0x600001)) |
| 2431 | && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000)) |
| 2432 | 2432 | m_slotcart->m_cart->chip_write(space, offset, data); |
| 2433 | 2433 | else if (m_slotcart->get_type() == SNES_SRTC |
| 2434 | 2434 | && (offset < 0x400000 && (offset & 0xffff) == 0x2801)) |
trunk/src/mess/machine/sns_upd.c
| r21787 | r21788 | |
| 214 | 214 | |
| 215 | 215 | READ8_MEMBER( sns_rom_setadsp_device::chip_read ) |
| 216 | 216 | { |
| 217 | | if (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000) |
| 217 | if (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000) |
| 218 | m_upd96050->snesdsp_read((offset & 0x01) ? FALSE : TRUE); |
| 219 | |
| 220 | if (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000) |
| 218 | 221 | { |
| 219 | 222 | UINT16 address = offset & 0xffff; |
| 220 | 223 | UINT16 temp = m_upd96050->dataram_r(address/2); |
| r21787 | r21788 | |
| 223 | 226 | else |
| 224 | 227 | return temp & 0xff; |
| 225 | 228 | } |
| 226 | | if (offset == 0x600000 || offset == 0x600001) |
| 227 | | return (offset & 1) ? m_upd96050->snesdsp_read(FALSE) : m_upd96050->snesdsp_read(TRUE); |
| 228 | 229 | |
| 229 | 230 | return 0xff; |
| 230 | 231 | } |
| r21787 | r21788 | |
| 232 | 233 | |
| 233 | 234 | WRITE8_MEMBER( sns_rom_setadsp_device::chip_write ) |
| 234 | 235 | { |
| 235 | | if (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x1000) |
| 236 | if (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000) |
| 236 | 237 | { |
| 238 | m_upd96050->snesdsp_write((offset & 0x01) ? FALSE : TRUE, data); |
| 239 | return; |
| 240 | } |
| 241 | |
| 242 | if (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000) |
| 243 | { |
| 237 | 244 | UINT16 address = offset & 0xffff; |
| 238 | 245 | UINT16 temp = m_upd96050->dataram_r(address/2); |
| 239 | 246 | |
| r21787 | r21788 | |
| 251 | 258 | m_upd96050->dataram_w(address/2, temp); |
| 252 | 259 | return; |
| 253 | 260 | } |
| 254 | | if (offset == 0x600000) |
| 255 | | m_upd96050->snesdsp_write(TRUE, data); |
| 256 | | if (offset == 0x600001) |
| 257 | | m_upd96050->snesdsp_write(FALSE, data); |
| 258 | 261 | } |
| 259 | 262 | |
| 260 | 263 | |