trunk/src/mess/machine/sns_bsx.c
| r21859 | r21860 | |
| 285 | 285 | if (offset < 0x200000 && access_00_1f) |
| 286 | 286 | { |
| 287 | 287 | // 0x00-0x1f:0x8000-0xffff -> CART |
| 288 | | return m_slot->read_l(space, offset); |
| 288 | if (m_slot->m_cart && m_slot->m_cart->get_rom_size()) |
| 289 | return m_slot->m_cart->read_l(space, offset); |
| 289 | 290 | } |
| 290 | 291 | if (offset >= 0x200000 && offset < 0x400000) |
| 291 | 292 | { |
| r21859 | r21860 | |
| 334 | 335 | if (offset < 0x200000 && access_80_9f) |
| 335 | 336 | { |
| 336 | 337 | // 0x80-0x9f:0x8000-0xffff -> CART |
| 337 | | return m_slot->read_l(space, offset); |
| 338 | if (m_slot->m_cart && m_slot->m_cart->get_rom_size()) |
| 339 | return m_slot->m_cart->read_l(space, offset); |
| 338 | 340 | } |
| 339 | 341 | |
| 340 | 342 | // if not in any of the cases above... |
| r21859 | r21860 | |
| 473 | 475 | } |
| 474 | 476 | else if (offset < 0x700000) |
| 475 | 477 | { |
| 476 | | return m_slot->read_h(space, offset); |
| 478 | if (m_slot->m_cart && m_slot->m_cart->get_rom_size()) |
| 479 | return m_slot->m_cart->read_h(space, offset); |
| 477 | 480 | } |
| 478 | 481 | // RAM [70-7f] |
| 479 | 482 | return 0x00; |
| r21859 | r21860 | |
| 496 | 499 | } |
| 497 | 500 | if (offset >= 0x200000 && offset < 0x400000) |
| 498 | 501 | { |
| 499 | | if ((offset & 0xffff) >= 0x8000) |
| 500 | | return m_slot->read_h(space, offset); |
| 502 | if (m_slot->m_cart && m_slot->m_cart->get_rom_size() && (offset & 0xffff) >= 0x8000) |
| 503 | return m_slot->m_cart->read_h(space, offset); |
| 501 | 504 | } |
| 502 | 505 | if (offset >= 0x400000 && offset < 0x600000) |
| 503 | 506 | { |
| r21859 | r21860 | |
| 506 | 509 | return m_rom[rom_bank_map[bank] * 0x8000 + (offset & 0x7fff)]; |
| 507 | 510 | } |
| 508 | 511 | if (offset >= 0x600000) |
| 509 | | return m_slot->read_h(space, offset); |
| 512 | { |
| 513 | if (m_slot->m_cart && m_slot->m_cart->get_rom_size()) |
| 514 | return m_slot->m_cart->read_h(space, offset); |
| 515 | } |
| 510 | 516 | return 0xff; |
| 511 | 517 | } |
| 512 | 518 | |