trunk/src/mess/drivers/snes.c
| r21789 | r21790 | |
| 2204 | 2204 | { |
| 2205 | 2205 | // take care of add-on IO |
| 2206 | 2206 | if (m_slotcart->get_type() == SNES_DSP |
| 2207 | | && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000)) |
| 2207 | && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000)) |
| 2208 | 2208 | return m_slotcart->m_cart->chip_read(space, offset & 0x7fff); |
| 2209 | else if (m_slotcart->get_type() == SNES_DSP_2MB |
| 2210 | && (offset >= 0x600000 && offset < 0x700000 && (offset & 0x8000) == 0x0000)) |
| 2211 | return m_slotcart->m_cart->chip_read(space, offset & 0x7fff); |
| 2209 | 2212 | else if (m_slotcart->get_type() == SNES_DSP_MODE21 |
| 2210 | 2213 | && (offset < 0x200000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) |
| 2211 | 2214 | return m_slotcart->m_cart->chip_read(space, offset & 0x1fff); |
| r21789 | r21790 | |
| 2232 | 2235 | case SNES_ST010: |
| 2233 | 2236 | case SNES_ST011: |
| 2234 | 2237 | case SNES_DSP: |
| 2238 | case SNES_DSP_2MB: |
| 2235 | 2239 | case SNES_DSP4: |
| 2236 | 2240 | case SNES_OBC1: |
| 2237 | 2241 | case SNES_SUFAMITURBO: |
| r21789 | r21790 | |
| 2268 | 2272 | { |
| 2269 | 2273 | // take care of add-on IO |
| 2270 | 2274 | if (m_slotcart->get_type() == SNES_DSP |
| 2271 | | && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000)) |
| 2275 | && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000)) |
| 2272 | 2276 | return m_slotcart->m_cart->chip_read(space, offset & 0x7fff); |
| 2277 | else if (m_slotcart->get_type() == SNES_DSP_2MB |
| 2278 | && (offset >= 0x600000 && offset < 0x700000 && (offset & 0x8000) == 0x0000)) |
| 2279 | return m_slotcart->m_cart->chip_read(space, offset & 0x7fff); |
| 2273 | 2280 | else if (m_slotcart->get_type() == SNES_DSP_MODE21 |
| 2274 | 2281 | && (offset < 0x200000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) |
| 2275 | 2282 | return m_slotcart->m_cart->chip_read(space, offset & 0x1fff); |
| r21789 | r21790 | |
| 2302 | 2309 | case SNES_ST010: |
| 2303 | 2310 | case SNES_ST011: |
| 2304 | 2311 | case SNES_DSP: |
| 2312 | case SNES_DSP_2MB: |
| 2305 | 2313 | case SNES_DSP4: |
| 2306 | 2314 | case SNES_OBC1: |
| 2307 | 2315 | case SNES_SUFAMITURBO: |
| r21789 | r21790 | |
| 2338 | 2346 | { |
| 2339 | 2347 | // take care of add-on IO |
| 2340 | 2348 | if (m_slotcart->get_type() == SNES_DSP |
| 2341 | | && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000)) |
| 2349 | && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000)) |
| 2342 | 2350 | m_slotcart->m_cart->chip_write(space, offset & 0x7fff, data); |
| 2351 | else if (m_slotcart->get_type() == SNES_DSP_2MB |
| 2352 | && (offset >= 0x600000 && offset < 0x700000 && (offset & 0x8000) == 0x0000)) |
| 2353 | m_slotcart->m_cart->chip_write(space, offset & 0x7fff, data); |
| 2343 | 2354 | else if (m_slotcart->get_type() == SNES_DSP_MODE21 |
| 2344 | 2355 | && (offset < 0x200000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) |
| 2345 | 2356 | m_slotcart->m_cart->chip_write(space, offset & 0x1fff, data); |
| r21789 | r21790 | |
| 2372 | 2383 | case SNES_ST010: |
| 2373 | 2384 | case SNES_ST011: |
| 2374 | 2385 | case SNES_DSP: |
| 2386 | case SNES_DSP_2MB: |
| 2375 | 2387 | case SNES_DSP4: |
| 2376 | 2388 | case SNES_OBC1: |
| 2377 | 2389 | case SNES_SUFAMITURBO: |
| r21789 | r21790 | |
| 2413 | 2425 | { |
| 2414 | 2426 | // take care of add-on IO |
| 2415 | 2427 | if (m_slotcart->get_type() == SNES_DSP |
| 2416 | | && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000)) |
| 2428 | && (offset >= 0x200000 && offset < 0x400000 && (offset & 0x8000) == 0x8000)) |
| 2417 | 2429 | m_slotcart->m_cart->chip_write(space, offset & 0x7fff, data); |
| 2430 | else if (m_slotcart->get_type() == SNES_DSP_2MB |
| 2431 | && (offset >= 0x600000 && offset < 0x700000 && (offset & 0x8000) == 0x0000)) |
| 2432 | m_slotcart->m_cart->chip_write(space, offset & 0x7fff, data); |
| 2418 | 2433 | else if (m_slotcart->get_type() == SNES_DSP_MODE21 |
| 2419 | 2434 | && (offset < 0x200000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) |
| 2420 | 2435 | m_slotcart->m_cart->chip_write(space, offset & 0x1fff, data); |
| r21789 | r21790 | |
| 2447 | 2462 | case SNES_ST010: |
| 2448 | 2463 | case SNES_ST011: |
| 2449 | 2464 | case SNES_DSP: |
| 2465 | case SNES_DSP_2MB: |
| 2450 | 2466 | case SNES_DSP4: |
| 2451 | 2467 | case SNES_OBC1: |
| 2452 | 2468 | case SNES_SUFAMITURBO: |