trunk/src/mess/drivers/snes.c
| r21793 | r21794 | |
| 2226 | 2226 | return m_slotcart->m_cart->chip_read(space, offset); |
| 2227 | 2227 | else if (m_slotcart->get_type() == SNES_SRTC |
| 2228 | 2228 | && (offset < 0x400000 && (offset & 0xffff) == 0x2800)) |
| 2229 | | return m_slotcart->m_cart->chip_read(space, offset & 0xffff); |
| 2229 | return m_slotcart->m_cart->chip_read(space, offset & 0xffff); |
| 2230 | else if (m_slotcart->get_type() == SNES_CX4 |
| 2231 | && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) // hack until we emulate the real CPU |
| 2232 | return CX4_read((offset & 0xffff) - 0x6000); |
| 2230 | 2233 | else |
| 2231 | 2234 | { |
| 2232 | 2235 | switch (m_type) |
| 2233 | 2236 | { |
| 2234 | 2237 | case SNES_MODE20: |
| 2238 | case SNES_CX4: |
| 2235 | 2239 | case SNES_ST010: |
| 2236 | 2240 | case SNES_ST011: |
| 2237 | 2241 | case SNES_DSP: |
| r21793 | r21794 | |
| 2294 | 2298 | return m_slotcart->m_cart->chip_read(space, offset); |
| 2295 | 2299 | else if (m_slotcart->get_type() == SNES_SRTC |
| 2296 | 2300 | && (offset < 0x400000 && (offset & 0xffff) == 0x2800)) |
| 2297 | | return m_slotcart->m_cart->chip_read(space, offset & 0xffff); |
| 2301 | return m_slotcart->m_cart->chip_read(space, offset & 0xffff); |
| 2302 | else if (m_slotcart->get_type() == SNES_CX4 |
| 2303 | && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) // hack until we emulate the real CPU |
| 2304 | return CX4_read((offset & 0xffff) - 0x6000); |
| 2298 | 2305 | else if ((m_slotcart->get_type() == SNES_POKEMON || m_slotcart->get_type() == SNES_BANANA) |
| 2299 | 2306 | && (offset & 0x70000) == 0x0000) |
| 2300 | 2307 | { |
| r21793 | r21794 | |
| 2306 | 2313 | switch (m_type) |
| 2307 | 2314 | { |
| 2308 | 2315 | case SNES_MODE20: |
| 2316 | case SNES_CX4: |
| 2309 | 2317 | case SNES_ST010: |
| 2310 | 2318 | case SNES_ST011: |
| 2311 | 2319 | case SNES_DSP: |
| r21793 | r21794 | |
| 2369 | 2377 | else if (m_slotcart->get_type() == SNES_SRTC |
| 2370 | 2378 | && (offset < 0x400000 && (offset & 0xffff) == 0x2801)) |
| 2371 | 2379 | m_slotcart->m_cart->chip_write(space, offset & 0xffff, data); |
| 2380 | else if (m_slotcart->get_type() == SNES_CX4 |
| 2381 | && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) // hack until we emulate the real CPU |
| 2382 | CX4_write(space.machine(), (offset & 0xffff) - 0x6000, data); |
| 2372 | 2383 | else if (m_slotcart->get_type() == SNES_BANANA |
| 2373 | 2384 | && (offset & 0x78000) == 0x8000) |
| 2374 | 2385 | { |
| r21793 | r21794 | |
| 2380 | 2391 | switch (m_type) |
| 2381 | 2392 | { |
| 2382 | 2393 | case SNES_MODE20: |
| 2394 | case SNES_CX4: |
| 2383 | 2395 | case SNES_ST010: |
| 2384 | 2396 | case SNES_ST011: |
| 2385 | 2397 | case SNES_DSP: |
| r21793 | r21794 | |
| 2448 | 2460 | else if (m_slotcart->get_type() == SNES_SRTC |
| 2449 | 2461 | && (offset < 0x400000 && (offset & 0xffff) == 0x2801)) |
| 2450 | 2462 | m_slotcart->m_cart->chip_write(space, offset & 0xffff, data); |
| 2463 | else if (m_slotcart->get_type() == SNES_CX4 |
| 2464 | && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) // hack until we emulate the real CPU |
| 2465 | CX4_write(space.machine(), (offset & 0xffff) - 0x6000, data); |
| 2451 | 2466 | else if ((m_slotcart->get_type() == SNES_POKEMON) |
| 2452 | 2467 | && (offset & 0x70000) == 0x0000) |
| 2453 | 2468 | { |
| r21793 | r21794 | |
| 2459 | 2474 | switch (m_type) |
| 2460 | 2475 | { |
| 2461 | 2476 | case SNES_MODE20: |
| 2477 | case SNES_CX4: |
| 2462 | 2478 | case SNES_ST010: |
| 2463 | 2479 | case SNES_ST011: |
| 2464 | 2480 | case SNES_DSP: |