trunk/src/mess/drivers/snes.c
| r21852 | r21853 | |
| 1609 | 1609 | // take care of add-on IO |
| 1610 | 1610 | if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011) |
| 1611 | 1611 | && (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000)) |
| 1612 | | return m_slotcart->m_cart->chip_read(space, offset); |
| 1612 | return m_slotcart->chip_read(space, offset); |
| 1613 | 1613 | else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011) |
| 1614 | 1614 | && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000)) |
| 1615 | | return m_slotcart->m_cart->chip_read(space, offset); |
| 1615 | return m_slotcart->chip_read(space, offset); |
| 1616 | 1616 | else if (m_slotcart->get_type() == SNES_CX4 |
| 1617 | 1617 | && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) // hack until we emulate the real CPU |
| 1618 | 1618 | return CX4_read((offset & 0xffff) - 0x6000); |
| r21852 | r21853 | |
| 1626 | 1626 | else if (address < 0x8000) |
| 1627 | 1627 | return snes_open_bus_r(space, 0); |
| 1628 | 1628 | else |
| 1629 | | return m_slotcart->m_cart->read_h(space, offset); |
| 1629 | return m_slotcart->read_h(space, offset); |
| 1630 | 1630 | } |
| 1631 | 1631 | else if (offset < 0x700000) |
| 1632 | 1632 | { |
| 1633 | 1633 | if (address < 0x8000) |
| 1634 | 1634 | return snes_open_bus_r(space, 0); |
| 1635 | 1635 | else |
| 1636 | | return m_slotcart->m_cart->read_h(space, offset); |
| 1636 | return m_slotcart->read_h(space, offset); |
| 1637 | 1637 | } |
| 1638 | 1638 | else |
| 1639 | 1639 | { |
| 1640 | 1640 | if (m_type == SNES_SUFAMITURBO && address >= 0x8000 && offset < 0x740000) |
| 1641 | | return m_slotcart->m_cart->read_h(space, offset); |
| 1641 | return m_slotcart->read_h(space, offset); |
| 1642 | 1642 | |
| 1643 | 1643 | // here usually there is SRAM mirrored in the whole range, but if ROM is very large then arrives here too (see tokimeki and wizardg4) |
| 1644 | 1644 | if (m_slotcart->m_cart->get_rom_size() > 0x200000 && address >= 0x8000) |
| 1645 | | return m_slotcart->m_cart->read_h(space, offset); |
| 1645 | return m_slotcart->read_h(space, offset); |
| 1646 | 1646 | else |
| 1647 | 1647 | { |
| 1648 | 1648 | if (m_slotcart->m_cart->get_nvram_size() > 0x8000) |
| 1649 | 1649 | { |
| 1650 | 1650 | // In this case, SRAM is mapped in 0x8000 chunks at diff offsets: 0x700000-0x707fff, 0x710000-0x717fff, etc. |
| 1651 | 1651 | offset = ((offset - 0x700000) / 0x10000) * 0x8000 + (offset & 0x7fff); |
| 1652 | | return m_slotcart->m_cart->read_ram(space, offset); |
| 1652 | return m_slotcart->read_ram(space, offset); |
| 1653 | 1653 | } |
| 1654 | 1654 | else if (m_slotcart->m_cart->get_nvram_size() > 0) |
| 1655 | | return m_slotcart->m_cart->read_ram(space, offset); |
| 1655 | return m_slotcart->read_ram(space, offset); |
| 1656 | 1656 | else |
| 1657 | 1657 | return snes_open_bus_r(space, 0); |
| 1658 | 1658 | } |
| r21852 | r21853 | |
| 1666 | 1666 | // take care of add-on IO |
| 1667 | 1667 | if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011) |
| 1668 | 1668 | && (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000)) |
| 1669 | | { m_slotcart->m_cart->chip_write(space, offset, data); return; } |
| 1669 | { m_slotcart->chip_write(space, offset, data); return; } |
| 1670 | 1670 | else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011) |
| 1671 | 1671 | && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000)) |
| 1672 | | { m_slotcart->m_cart->chip_write(space, offset, data); return; } |
| 1672 | { m_slotcart->chip_write(space, offset, data); return; } |
| 1673 | 1673 | else if (m_slotcart->get_type() == SNES_CX4 |
| 1674 | 1674 | && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) // hack until we emulate the real CPU |
| 1675 | 1675 | { CX4_write(space.machine(), (offset & 0xffff) - 0x6000, data); return; } |
| 1676 | 1676 | else if (m_type == SNES_SUFAMITURBO |
| 1677 | 1677 | && address >= 0x8000 && ((offset >= 0x600000 && offset < 0x640000) || (offset >= 0x700000 && offset < 0x740000))) |
| 1678 | | { m_slotcart->m_cart->write_h(space, offset, data); return; } |
| 1678 | { m_slotcart->write_h(space, offset, data); return; } |
| 1679 | 1679 | |
| 1680 | 1680 | if (offset < 0x400000) |
| 1681 | 1681 | { |
| r21852 | r21853 | |
| 1690 | 1690 | { |
| 1691 | 1691 | // In this case, SRAM is mapped in 0x8000 chunks at diff offsets: 0x700000-0x707fff, 0x710000-0x717fff, etc. |
| 1692 | 1692 | offset = ((offset - 0x700000) / 0x10000) * 0x8000 + (offset & 0x7fff); |
| 1693 | | m_slotcart->m_cart->write_ram(space, offset, data); |
| 1693 | m_slotcart->write_ram(space, offset, data); |
| 1694 | 1694 | } |
| 1695 | 1695 | else if (m_slotcart->m_cart->get_nvram_size() > 0) |
| 1696 | | m_slotcart->m_cart->write_ram(space, offset, data); |
| 1696 | m_slotcart->write_ram(space, offset, data); |
| 1697 | 1697 | } |
| 1698 | 1698 | } |
| 1699 | 1699 | |
| r21852 | r21853 | |
| 1704 | 1704 | // take care of add-on IO |
| 1705 | 1705 | if ((m_slotcart->get_type() == SNES_ST010 /*|| m_slotcart->get_type() == SNES_ST011*/) // why does this break moritash? |
| 1706 | 1706 | && (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000)) |
| 1707 | | return m_slotcart->m_cart->chip_read(space, offset); |
| 1707 | return m_slotcart->chip_read(space, offset); |
| 1708 | 1708 | else if ((m_slotcart->get_type() == SNES_ST010 || m_slotcart->get_type() == SNES_ST011) |
| 1709 | 1709 | && (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000)) |
| 1710 | | return m_slotcart->m_cart->chip_read(space, offset); |
| 1710 | return m_slotcart->chip_read(space, offset); |
| 1711 | 1711 | else if (m_slotcart->get_type() == SNES_CX4 |
| 1712 | 1712 | && (offset < 0x400000 && (offset & 0xffff) >= 0x6000 && (offset & 0xffff) < 0x8000)) // hack until we emulate the real CPU |
| 1713 | 1713 | return CX4_read((offset & 0xffff) - 0x6000); |
| r21852 | r21853 | |
| 1721 | 1721 | else if (address < 0x8000) |
| 1722 | 1722 | return snes_open_bus_r(space, 0); |
| 1723 | 1723 | else |
| 1724 | | return m_slotcart->m_cart->read_l(space, offset); |
| 1724 | return m_slotcart->read_l(space, offset); |
| 1725 | 1725 | } |
| 1726 | 1726 | else if (offset < 0x700000) |
| 1727 | 1727 | { |
| 1728 | 1728 | if (address < 0x8000) |
| 1729 | 1729 | return snes_open_bus_r(space, 0); |
| 1730 | 1730 | else |
| 1731 | | return m_slotcart->m_cart->read_l(space, offset); |
| 1731 | return m_slotcart->read_l(space, offset); |
| 1732 | 1732 | } |
| 1733 | 1733 | else |
| 1734 | 1734 | { |
| 1735 | 1735 | if (m_type == SNES_SUFAMITURBO && address >= 0x8000 && offset < 0x740000) |
| 1736 | | return m_slotcart->m_cart->read_l(space, offset); |
| 1736 | return m_slotcart->read_l(space, offset); |
| 1737 | 1737 | |
| 1738 | 1738 | // here usually there is SRAM mirrored in the whole range, but if ROM is very large then arrives here too (see tokimeki and wizardg4) |
| 1739 | 1739 | if (m_slotcart->m_cart->get_rom_size() > 0x200000 && address >= 0x8000) |
| 1740 | | return m_slotcart->m_cart->read_l(space, offset); |
| 1740 | return m_slotcart->read_l(space, offset); |
| 1741 | 1741 | else |
| 1742 | 1742 | { |
| 1743 | 1743 | if (m_slotcart->m_cart->get_nvram_size() > 0x8000) |
| 1744 | 1744 | { |
| 1745 | 1745 | // In this case, SRAM is mapped in 0x8000 chunks at diff offsets: 0x700000-0x707fff, 0x710000-0x717fff, etc. |
| 1746 | 1746 | offset = ((offset - 0x700000) / 0x10000) * 0x8000 + (offset & 0x7fff); |
| 1747 | | return m_slotcart->m_cart->read_ram(space, offset); |
| 1747 | return m_slotcart->read_ram(space, offset); |
| 1748 | 1748 | } |
| 1749 | 1749 | else if (m_slotcart->m_cart->get_nvram_size() > 0) |
| 1750 | | return m_slotcart->m_cart->read_ram(space, offset); |
| 1750 | return m_slotcart->read_ram(space, offset); |
| 1751 | 1751 | else |
| 1752 | 1752 | return snes_open_bus_r(space, 0); |
| 1753 | 1753 | } |
| r21852 | r21853 | |
| 1758 | 1758 | { |
| 1759 | 1759 | if (m_type == SNES_SUFAMITURBO |
| 1760 | 1760 | && (offset & 0xffff) >= 0x8000 && ((offset >= 0x600000 && offset < 0x640000) || (offset >= 0x700000 && offset < 0x740000))) |
| 1761 | | { m_slotcart->m_cart->write_l(space, offset, data); return; } |
| 1761 | { m_slotcart->write_l(space, offset, data); return; } |
| 1762 | 1762 | |
| 1763 | 1763 | // other add-on writes matches the hi handler |
| 1764 | 1764 | snes20_hi_w(space, offset, data, 0xff); |
| r21852 | r21853 | |
| 1784 | 1784 | if (m_type == SNES_BSXHI && m_slotcart->m_cart->get_nvram_size() && offset >= 0x200000) |
| 1785 | 1785 | { |
| 1786 | 1786 | int mask = (m_slotcart->m_cart->get_nvram_size() - 1) & 0x7fff; |
| 1787 | | return m_slotcart->m_cart->read_ram(space, (offset - 0x6000) & mask); |
| 1787 | return m_slotcart->read_ram(space, (offset - 0x6000) & mask); |
| 1788 | 1788 | } |
| 1789 | 1789 | |
| 1790 | 1790 | if (m_slotcart->m_cart->get_nvram_size() && offset >= 0x300000) |
| r21852 | r21853 | |
| 1792 | 1792 | /* Donkey Kong Country checks this and detects a copier if 0x800 is not masked out due to sram size */ |
| 1793 | 1793 | /* OTOH Secret of Mana does not work properly if sram is not mirrored on later banks */ |
| 1794 | 1794 | int mask = (m_slotcart->m_cart->get_nvram_size() - 1) & 0x7fff; /* Limit SRAM size to what's actually present */ |
| 1795 | | return m_slotcart->m_cart->read_ram(space, (offset - 0x6000) & mask); |
| 1795 | return m_slotcart->read_ram(space, (offset - 0x6000) & mask); |
| 1796 | 1796 | } |
| 1797 | 1797 | else |
| 1798 | 1798 | return snes_open_bus_r(space, 0); |
| r21852 | r21853 | |
| 1800 | 1800 | } |
| 1801 | 1801 | |
| 1802 | 1802 | // ROM access |
| 1803 | | return m_slotcart->m_cart->read_l(space, offset); |
| 1803 | return m_slotcart->read_l(space, offset); |
| 1804 | 1804 | } |
| 1805 | 1805 | |
| 1806 | 1806 | WRITE8_MEMBER( snsnew_state::snes21_lo_w ) |
| r21852 | r21853 | |
| 1817 | 1817 | if (m_type == SNES_BSXHI && m_slotcart->m_cart->get_nvram_size() && offset >= 0x200000) |
| 1818 | 1818 | { |
| 1819 | 1819 | int mask = (m_slotcart->m_cart->get_nvram_size() - 1) & 0x7fff; |
| 1820 | | m_slotcart->m_cart->write_ram(space, (offset - 0x6000) & mask, data); |
| 1820 | m_slotcart->write_ram(space, (offset - 0x6000) & mask, data); |
| 1821 | 1821 | return; |
| 1822 | 1822 | } |
| 1823 | 1823 | if (m_slotcart->m_cart->get_nvram_size() && offset >= 0x300000) |
| r21852 | r21853 | |
| 1825 | 1825 | /* Donkey Kong Country checks this and detects a copier if 0x800 is not masked out due to sram size */ |
| 1826 | 1826 | /* OTOH Secret of Mana does not work properly if sram is not mirrored on later banks */ |
| 1827 | 1827 | int mask = (m_slotcart->m_cart->get_nvram_size() - 1) & 0x7fff; /* Limit SRAM size to what's actually present */ |
| 1828 | | m_slotcart->m_cart->write_ram(space, (offset - 0x6000) & mask, data); |
| 1828 | m_slotcart->write_ram(space, (offset - 0x6000) & mask, data); |
| 1829 | 1829 | } |
| 1830 | 1830 | } |
| 1831 | 1831 | } |
| r21852 | r21853 | |
| 1846 | 1846 | if (m_type == SNES_BSXHI && m_slotcart->m_cart->get_nvram_size() && offset >= 0x200000) |
| 1847 | 1847 | { |
| 1848 | 1848 | int mask = (m_slotcart->m_cart->get_nvram_size() - 1) & 0x7fff; |
| 1849 | | return m_slotcart->m_cart->read_ram(space, (offset - 0x6000) & mask); |
| 1849 | return m_slotcart->read_ram(space, (offset - 0x6000) & mask); |
| 1850 | 1850 | } |
| 1851 | 1851 | |
| 1852 | 1852 | if (m_slotcart->m_cart->get_nvram_size() && offset >= 0x300000) |
| r21852 | r21853 | |
| 1854 | 1854 | /* Donkey Kong Country checks this and detects a copier if 0x800 is not masked out due to sram size */ |
| 1855 | 1855 | /* OTOH Secret of Mana does not work properly if sram is not mirrored on later banks */ |
| 1856 | 1856 | int mask = (m_slotcart->m_cart->get_nvram_size() - 1) & 0x7fff; /* Limit SRAM size to what's actually present */ |
| 1857 | | return m_slotcart->m_cart->read_ram(space, (offset - 0x6000) & mask); |
| 1857 | return m_slotcart->read_ram(space, (offset - 0x6000) & mask); |
| 1858 | 1858 | } |
| 1859 | 1859 | else |
| 1860 | 1860 | return snes_open_bus_r(space, 0); |
| r21852 | r21853 | |
| 1862 | 1862 | } |
| 1863 | 1863 | |
| 1864 | 1864 | // ROM access |
| 1865 | | return m_slotcart->m_cart->read_h(space, offset); |
| 1865 | return m_slotcart->read_h(space, offset); |
| 1866 | 1866 | } |
| 1867 | 1867 | |
| 1868 | 1868 | WRITE8_MEMBER( snsnew_state::snes21_hi_w ) |
| r21852 | r21853 | |
| 1879 | 1879 | if (m_type == SNES_BSXHI && m_slotcart->m_cart->get_nvram_size() && offset >= 0x200000) |
| 1880 | 1880 | { |
| 1881 | 1881 | int mask = (m_slotcart->m_cart->get_nvram_size() - 1) & 0x7fff; |
| 1882 | | m_slotcart->m_cart->write_ram(space, (offset - 0x6000) & mask, data); |
| 1882 | m_slotcart->write_ram(space, (offset - 0x6000) & mask, data); |
| 1883 | 1883 | return; |
| 1884 | 1884 | } |
| 1885 | 1885 | if (m_slotcart->m_cart->get_nvram_size() && offset >= 0x300000) |
| r21852 | r21853 | |
| 1887 | 1887 | /* Donkey Kong Country checks this and detects a copier if 0x800 is not masked out due to sram size */ |
| 1888 | 1888 | /* OTOH Secret of Mana does not work properly if sram is not mirrored on later banks */ |
| 1889 | 1889 | int mask = (m_slotcart->m_cart->get_nvram_size() - 1) & 0x7fff; /* Limit SRAM size to what's actually present */ |
| 1890 | | m_slotcart->m_cart->write_ram(space, (offset - 0x6000) & mask, data); |
| 1890 | m_slotcart->write_ram(space, (offset - 0x6000) & mask, data); |
| 1891 | 1891 | } |
| 1892 | 1892 | } |
| 1893 | 1893 | } |
| r21852 | r21853 | |
| 1908 | 1908 | else if (address < 0x6000) |
| 1909 | 1909 | { |
| 1910 | 1910 | if (address >= 0x3000 && address < 0x3300) |
| 1911 | | return m_slotcart->m_cart->chip_read(space, offset); |
| 1911 | return m_slotcart->chip_read(space, offset); |
| 1912 | 1912 | else |
| 1913 | 1913 | return snes_r_io(space, address); |
| 1914 | 1914 | } |
| 1915 | 1915 | else if (address < 0x8000) |
| 1916 | | return m_slotcart->m_cart->read_ram(space, offset & 0x1fff); |
| 1916 | return m_slotcart->read_ram(space, offset & 0x1fff); |
| 1917 | 1917 | else |
| 1918 | | return m_slotcart->m_cart->read_h(space, offset); |
| 1918 | return m_slotcart->read_h(space, offset); |
| 1919 | 1919 | } |
| 1920 | 1920 | else if (offset < 0x600000) |
| 1921 | | return m_slotcart->m_cart->read_h(space, offset); |
| 1921 | return m_slotcart->read_h(space, offset); |
| 1922 | 1922 | else |
| 1923 | | return m_slotcart->m_cart->read_ram(space, offset); |
| 1923 | return m_slotcart->read_ram(space, offset); |
| 1924 | 1924 | } |
| 1925 | 1925 | |
| 1926 | 1926 | READ8_MEMBER( snsnew_state::snessfx_lo_r ) |
| r21852 | r21853 | |
| 1934 | 1934 | else if (address < 0x6000) |
| 1935 | 1935 | { |
| 1936 | 1936 | if (address >= 0x3000 && address < 0x3300) |
| 1937 | | return m_slotcart->m_cart->chip_read(space, offset); |
| 1937 | return m_slotcart->chip_read(space, offset); |
| 1938 | 1938 | else |
| 1939 | 1939 | return snes_r_io(space, address); |
| 1940 | 1940 | } |
| 1941 | 1941 | else if (address < 0x8000) |
| 1942 | | return m_slotcart->m_cart->read_ram(space, offset & 0x1fff); |
| 1942 | return m_slotcart->read_ram(space, offset & 0x1fff); |
| 1943 | 1943 | else |
| 1944 | | return m_slotcart->m_cart->read_l(space, offset); |
| 1944 | return m_slotcart->read_l(space, offset); |
| 1945 | 1945 | } |
| 1946 | 1946 | else if (offset < 0x600000) |
| 1947 | | return m_slotcart->m_cart->read_l(space, offset); |
| 1947 | return m_slotcart->read_l(space, offset); |
| 1948 | 1948 | else |
| 1949 | | return m_slotcart->m_cart->read_ram(space, offset); |
| 1949 | return m_slotcart->read_ram(space, offset); |
| 1950 | 1950 | } |
| 1951 | 1951 | |
| 1952 | 1952 | WRITE8_MEMBER( snsnew_state::snessfx_hi_w ) |
| r21852 | r21853 | |
| 1959 | 1959 | else if (address < 0x6000) |
| 1960 | 1960 | { |
| 1961 | 1961 | if (address >= 0x3000 && address < 0x3300) |
| 1962 | | m_slotcart->m_cart->chip_write(space, offset, data); |
| 1962 | m_slotcart->chip_write(space, offset, data); |
| 1963 | 1963 | else |
| 1964 | 1964 | snes_w_io(space, address, data); |
| 1965 | 1965 | } |
| 1966 | 1966 | else if (address < 0x8000) |
| 1967 | | m_slotcart->m_cart->write_ram(space, offset & 0x1fff, data); |
| 1967 | m_slotcart->write_ram(space, offset & 0x1fff, data); |
| 1968 | 1968 | } |
| 1969 | 1969 | else if (offset >= 0x600000) |
| 1970 | | m_slotcart->m_cart->write_ram(space, offset, data); |
| 1970 | m_slotcart->write_ram(space, offset, data); |
| 1971 | 1971 | } |
| 1972 | 1972 | |
| 1973 | 1973 | WRITE8_MEMBER( snsnew_state::snessfx_lo_w ) |
| r21852 | r21853 | |
| 1991 | 1991 | { |
| 1992 | 1992 | UINT16 limit = (m_slotcart->get_type() == SNES_SPC7110_RTC) ? 0x4843 : 0x4840; |
| 1993 | 1993 | if (address >= 0x4800 && address < limit) |
| 1994 | | return m_slotcart->m_cart->chip_read(space, address); |
| 1994 | return m_slotcart->chip_read(space, address); |
| 1995 | 1995 | |
| 1996 | 1996 | return snes_r_io(space, address); |
| 1997 | 1997 | } |
| 1998 | 1998 | else if (address < 0x8000) |
| 1999 | 1999 | { |
| 2000 | 2000 | if (offset < 0x10000) |
| 2001 | | return m_slotcart->m_cart->read_ram(space, offset); |
| 2001 | return m_slotcart->read_ram(space, offset); |
| 2002 | 2002 | if (offset >= 0x300000 && offset < 0x310000) |
| 2003 | | return m_slotcart->m_cart->read_ram(space, offset); |
| 2003 | return m_slotcart->read_ram(space, offset); |
| 2004 | 2004 | } |
| 2005 | 2005 | else |
| 2006 | | return m_slotcart->m_cart->read_h(space, offset); |
| 2006 | return m_slotcart->read_h(space, offset); |
| 2007 | 2007 | } |
| 2008 | | return m_slotcart->m_cart->read_h(space, offset); |
| 2008 | return m_slotcart->read_h(space, offset); |
| 2009 | 2009 | } |
| 2010 | 2010 | |
| 2011 | 2011 | READ8_MEMBER( snsnew_state::snes7110_lo_r ) |
| r21852 | r21853 | |
| 2020 | 2020 | { |
| 2021 | 2021 | UINT16 limit = (m_slotcart->get_type() == SNES_SPC7110_RTC) ? 0x4843 : 0x4840; |
| 2022 | 2022 | if (address >= 0x4800 && address < limit) |
| 2023 | | return m_slotcart->m_cart->chip_read(space, address); |
| 2023 | return m_slotcart->chip_read(space, address); |
| 2024 | 2024 | |
| 2025 | 2025 | return snes_r_io(space, address); |
| 2026 | 2026 | } |
| 2027 | 2027 | else if (address < 0x8000) |
| 2028 | 2028 | { |
| 2029 | 2029 | if (offset < 0x10000) |
| 2030 | | return m_slotcart->m_cart->read_ram(space, offset); |
| 2030 | return m_slotcart->read_ram(space, offset); |
| 2031 | 2031 | if (offset >= 0x300000 && offset < 0x310000) |
| 2032 | | return m_slotcart->m_cart->read_ram(space, offset); |
| 2032 | return m_slotcart->read_ram(space, offset); |
| 2033 | 2033 | } |
| 2034 | 2034 | else |
| 2035 | | return m_slotcart->m_cart->read_l(space, offset); |
| 2035 | return m_slotcart->read_l(space, offset); |
| 2036 | 2036 | } |
| 2037 | 2037 | if (offset >= 0x500000 && offset < 0x510000) |
| 2038 | | return m_slotcart->m_cart->chip_read(space, 0x4800); |
| 2038 | return m_slotcart->chip_read(space, 0x4800); |
| 2039 | 2039 | |
| 2040 | 2040 | return snes_open_bus_r(space, 0); |
| 2041 | 2041 | } |
| r21852 | r21853 | |
| 2057 | 2057 | UINT16 limit = (m_slotcart->get_type() == SNES_SPC7110_RTC) ? 0x4843 : 0x4840; |
| 2058 | 2058 | if (address >= 0x4800 && address < limit) |
| 2059 | 2059 | { |
| 2060 | | m_slotcart->m_cart->chip_write(space, address, data); |
| 2060 | m_slotcart->chip_write(space, address, data); |
| 2061 | 2061 | return; |
| 2062 | 2062 | } |
| 2063 | 2063 | snes_w_io(space, address, data); |
| r21852 | r21853 | |
| 2065 | 2065 | else if (address < 0x8000) |
| 2066 | 2066 | { |
| 2067 | 2067 | if (offset < 0x10000) |
| 2068 | | m_slotcart->m_cart->write_ram(space, offset, data); |
| 2068 | m_slotcart->write_ram(space, offset, data); |
| 2069 | 2069 | if (offset >= 0x300000 && offset < 0x310000) |
| 2070 | | m_slotcart->m_cart->write_ram(space, offset, data); |
| 2070 | m_slotcart->write_ram(space, offset, data); |
| 2071 | 2071 | } |
| 2072 | 2072 | } |
| 2073 | 2073 | } |
| r21852 | r21853 | |
| 2088 | 2088 | else if (address < 0x6000) |
| 2089 | 2089 | { |
| 2090 | 2090 | if (address >= 0x4800 && address < 0x4808) |
| 2091 | | return m_slotcart->m_cart->chip_read(space, address); |
| 2091 | return m_slotcart->chip_read(space, address); |
| 2092 | 2092 | |
| 2093 | 2093 | return snes_r_io(space, address); |
| 2094 | 2094 | } |
| 2095 | 2095 | else if (address < 0x8000) |
| 2096 | 2096 | return snes_open_bus_r(space, 0); |
| 2097 | 2097 | else |
| 2098 | | return m_slotcart->m_cart->read_l(space, offset); |
| 2098 | return m_slotcart->read_l(space, offset); |
| 2099 | 2099 | } |
| 2100 | 2100 | else if (offset >= 0x700000 && address < 0x8000 && m_slotcart->m_cart->get_nvram_size()) // NVRAM access |
| 2101 | | return m_slotcart->m_cart->read_ram(space, offset); |
| 2101 | return m_slotcart->read_ram(space, offset); |
| 2102 | 2102 | else // ROM access |
| 2103 | | return m_slotcart->m_cart->read_l(space, offset); |
| 2103 | return m_slotcart->read_l(space, offset); |
| 2104 | 2104 | } |
| 2105 | 2105 | |
| 2106 | 2106 | READ8_MEMBER( snsnew_state::snessdd1_hi_r ) |
| 2107 | 2107 | { |
| 2108 | 2108 | if (offset >= 0x400000) |
| 2109 | | return m_slotcart->m_cart->read_h(space, offset); |
| 2109 | return m_slotcart->read_h(space, offset); |
| 2110 | 2110 | else |
| 2111 | 2111 | return snessdd1_lo_r(space, offset, 0xff); |
| 2112 | 2112 | } |
| r21852 | r21853 | |
| 2127 | 2127 | { |
| 2128 | 2128 | if (address >= 0x4300 && address < 0x4380) |
| 2129 | 2129 | { |
| 2130 | | m_slotcart->m_cart->chip_write(space, address, data); |
| 2130 | m_slotcart->chip_write(space, address, data); |
| 2131 | 2131 | // here we don't return, but we let the w_io happen... |
| 2132 | 2132 | } |
| 2133 | 2133 | if (address >= 0x4800 && address < 0x4808) |
| 2134 | 2134 | { |
| 2135 | | m_slotcart->m_cart->chip_write(space, address, data); |
| 2135 | m_slotcart->chip_write(space, address, data); |
| 2136 | 2136 | return; |
| 2137 | 2137 | } |
| 2138 | 2138 | snes_w_io(space, address, data); |
| 2139 | 2139 | } |
| 2140 | 2140 | } |
| 2141 | 2141 | if (offset >= 0x700000 && address < 0x8000 && m_slotcart->m_cart->get_nvram_size()) |
| 2142 | | return m_slotcart->m_cart->write_ram(space, offset, data); |
| 2142 | return m_slotcart->write_ram(space, offset, data); |
| 2143 | 2143 | } |
| 2144 | 2144 | |
| 2145 | 2145 | |
| r21852 | r21853 | |
| 2158 | 2158 | else if (address < 0x6000) |
| 2159 | 2159 | { |
| 2160 | 2160 | if (address >= 0x2188 && address < 0x21a0) |
| 2161 | | return m_slotcart->m_cart->chip_read(space, offset); |
| 2161 | return m_slotcart->chip_read(space, offset); |
| 2162 | 2162 | if (address >= 0x5000) |
| 2163 | | return m_slotcart->m_cart->chip_read(space, offset); |
| 2163 | return m_slotcart->chip_read(space, offset); |
| 2164 | 2164 | return snes_r_io(space, address); |
| 2165 | 2165 | } |
| 2166 | 2166 | else if (address < 0x8000) |
| 2167 | 2167 | { |
| 2168 | 2168 | if (offset >= 0x200000) |
| 2169 | | return m_slotcart->m_cart->read_h(space, offset); |
| 2169 | return m_slotcart->read_h(space, offset); |
| 2170 | 2170 | else |
| 2171 | 2171 | return snes_open_bus_r(space, 0); |
| 2172 | 2172 | } |
| 2173 | 2173 | else |
| 2174 | | return m_slotcart->m_cart->read_h(space, offset); |
| 2174 | return m_slotcart->read_h(space, offset); |
| 2175 | 2175 | } |
| 2176 | | return m_slotcart->m_cart->read_h(space, offset); |
| 2176 | return m_slotcart->read_h(space, offset); |
| 2177 | 2177 | } |
| 2178 | 2178 | |
| 2179 | 2179 | WRITE8_MEMBER( snsnew_state::snesbsx_hi_w ) |
| r21852 | r21853 | |
| 2187 | 2187 | { |
| 2188 | 2188 | if (address >= 0x2188 && address < 0x21a0) |
| 2189 | 2189 | { |
| 2190 | | m_slotcart->m_cart->chip_write(space, offset, data); |
| 2190 | m_slotcart->chip_write(space, offset, data); |
| 2191 | 2191 | return; |
| 2192 | 2192 | } |
| 2193 | 2193 | if (address >= 0x5000) |
| 2194 | 2194 | { |
| 2195 | | m_slotcart->m_cart->chip_write(space, offset, data); |
| 2195 | m_slotcart->chip_write(space, offset, data); |
| 2196 | 2196 | return; |
| 2197 | 2197 | } |
| 2198 | 2198 | snes_w_io(space, address, data); |
| r21852 | r21853 | |
| 2200 | 2200 | else if (address < 0x8000) |
| 2201 | 2201 | { |
| 2202 | 2202 | if (offset >= 0x200000) |
| 2203 | | return m_slotcart->m_cart->write_l(space, offset, data); |
| 2203 | return m_slotcart->write_l(space, offset, data); |
| 2204 | 2204 | } |
| 2205 | 2205 | else |
| 2206 | | return m_slotcart->m_cart->write_l(space, offset, data); |
| 2206 | return m_slotcart->write_l(space, offset, data); |
| 2207 | 2207 | } |
| 2208 | | return m_slotcart->m_cart->write_l(space, offset, data); |
| 2208 | return m_slotcart->write_l(space, offset, data); |
| 2209 | 2209 | } |
| 2210 | 2210 | |
| 2211 | 2211 | READ8_MEMBER( snsnew_state::snesbsx_lo_r ) |
| r21852 | r21853 | |
| 2219 | 2219 | else if (address < 0x6000) |
| 2220 | 2220 | { |
| 2221 | 2221 | if (address >= 0x2188 && address < 0x21a0) |
| 2222 | | return m_slotcart->m_cart->chip_read(space, offset); |
| 2222 | return m_slotcart->chip_read(space, offset); |
| 2223 | 2223 | if (address >= 0x5000) |
| 2224 | | return m_slotcart->m_cart->chip_read(space, offset); |
| 2224 | return m_slotcart->chip_read(space, offset); |
| 2225 | 2225 | return snes_r_io(space, address); |
| 2226 | 2226 | } |
| 2227 | 2227 | else if (address < 0x8000) |
| 2228 | 2228 | { |
| 2229 | 2229 | if (offset >= 0x200000) |
| 2230 | | return m_slotcart->m_cart->read_l(space, offset); |
| 2230 | return m_slotcart->read_l(space, offset); |
| 2231 | 2231 | else |
| 2232 | 2232 | return snes_open_bus_r(space, 0); |
| 2233 | 2233 | } |
| 2234 | 2234 | else |
| 2235 | | return m_slotcart->m_cart->read_l(space, offset); |
| 2235 | return m_slotcart->read_l(space, offset); |
| 2236 | 2236 | } |
| 2237 | | return m_slotcart->m_cart->read_l(space, offset); |
| 2237 | return m_slotcart->read_l(space, offset); |
| 2238 | 2238 | } |
| 2239 | 2239 | |
| 2240 | 2240 | WRITE8_MEMBER( snsnew_state::snesbsx_lo_w ) |
| r21852 | r21853 | |
| 2303 | 2303 | case SNES_ST011: // this requires two diff kinds of chip access, so we handle it in snes20_lo/hi_r/w |
| 2304 | 2304 | break; |
| 2305 | 2305 | case SNES_DSP: |
| 2306 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x208000, 0x20ffff, 0, 0x9f0000, read8_delegate(FUNC(device_sns_cart_interface::chip_read),state->m_slotcart->m_cart)); |
| 2307 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x208000, 0x20ffff, 0, 0x9f0000, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart)); |
| 2306 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x208000, 0x20ffff, 0, 0x9f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2307 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x208000, 0x20ffff, 0, 0x9f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2308 | 2308 | break; |
| 2309 | 2309 | case SNES_DSP_2MB: |
| 2310 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x600000, 0x607fff, 0, 0x8f0000, read8_delegate(FUNC(device_sns_cart_interface::chip_read),state->m_slotcart->m_cart)); |
| 2311 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x600000, 0x607fff, 0, 0x8f0000, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart)); |
| 2310 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x600000, 0x607fff, 0, 0x8f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2311 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x600000, 0x607fff, 0, 0x8f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2312 | 2312 | break; |
| 2313 | 2313 | case SNES_DSP4: |
| 2314 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x308000, 0x30ffff, 0, 0x8f0000, read8_delegate(FUNC(device_sns_cart_interface::chip_read),state->m_slotcart->m_cart)); |
| 2315 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x308000, 0x30ffff, 0, 0x8f0000, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart)); |
| 2314 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x308000, 0x30ffff, 0, 0x8f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2315 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x308000, 0x30ffff, 0, 0x8f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2316 | 2316 | break; |
| 2317 | 2317 | case SNES_OBC1: |
| 2318 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x006000, 0x007fff, 0, 0xbf0000, read8_delegate(FUNC(device_sns_cart_interface::chip_read),state->m_slotcart->m_cart)); |
| 2319 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x006000, 0x007fff, 0, 0xbf0000, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart)); |
| 2318 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x006000, 0x007fff, 0, 0xbf0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2319 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x006000, 0x007fff, 0, 0xbf0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2320 | 2320 | break; |
| 2321 | 2321 | case SNES_SFX: |
| 2322 | 2322 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snsnew_state::snessfx_lo_r),state), write8_delegate(FUNC(snsnew_state::snessfx_lo_w),state)); |
| r21852 | r21853 | |
| 2343 | 2343 | case SNES_DSP_MODE21: |
| 2344 | 2344 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snsnew_state::snes21_lo_r),state), write8_delegate(FUNC(snsnew_state::snes21_lo_w),state)); |
| 2345 | 2345 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snsnew_state::snes21_hi_r),state), write8_delegate(FUNC(snsnew_state::snes21_hi_w),state)); |
| 2346 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x006000, 0x007fff, 0, 0x9f0000, read8_delegate(FUNC(device_sns_cart_interface::chip_read),state->m_slotcart->m_cart)); |
| 2347 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x006000, 0x007fff, 0, 0x9f0000, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart)); |
| 2346 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x006000, 0x007fff, 0, 0x9f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2347 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x006000, 0x007fff, 0, 0x9f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2348 | 2348 | set_5a22_map(*state->m_maincpu); |
| 2349 | 2349 | break; |
| 2350 | 2350 | case SNES_SRTC: |
| 2351 | 2351 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snsnew_state::snes21_lo_r),state), write8_delegate(FUNC(snsnew_state::snes21_lo_w),state)); |
| 2352 | 2352 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snsnew_state::snes21_hi_r),state), write8_delegate(FUNC(snsnew_state::snes21_hi_w),state)); |
| 2353 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x002800, 0x002800, 0, 0xbf0000, read8_delegate(FUNC(device_sns_cart_interface::chip_read),state->m_slotcart->m_cart)); |
| 2354 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x002801, 0x002801, 0, 0xbf0000, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart)); |
| 2353 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x002800, 0x002800, 0, 0xbf0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2354 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x002801, 0x002801, 0, 0xbf0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2355 | 2355 | set_5a22_map(*state->m_maincpu); |
| 2356 | 2356 | break; |
| 2357 | 2357 | case SNES_SPC7110: |
| r21852 | r21853 | |
| 2362 | 2362 | break; |
| 2363 | 2363 | // pirate 'mappers' |
| 2364 | 2364 | case SNES_POKEMON: |
| 2365 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x800000, 0x80ffff, 0, 0x780000, read8_delegate(FUNC(device_sns_cart_interface::chip_read),state->m_slotcart->m_cart)); |
| 2366 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x800000, 0x80ffff, 0, 0x780000, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart)); |
| 2365 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x800000, 0x80ffff, 0, 0x780000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2366 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x800000, 0x80ffff, 0, 0x780000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2367 | 2367 | break; |
| 2368 | 2368 | case SNES_TEKKEN2: |
| 2369 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x808000, 0x8087ff, 0, 0x3f0000, read8_delegate(FUNC(device_sns_cart_interface::chip_read),state->m_slotcart->m_cart)); |
| 2370 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x808000, 0x8087ff, 0, 0x3f0000, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart)); |
| 2369 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x808000, 0x8087ff, 0, 0x3f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2370 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x808000, 0x8087ff, 0, 0x3f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2371 | 2371 | break; |
| 2372 | 2372 | case SNES_MCPIR1: |
| 2373 | 2373 | case SNES_MCPIR2: |
| 2374 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0xffff00, 0xffffff, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart)); |
| 2374 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0xffff00, 0xffffff, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2375 | 2375 | break; |
| 2376 | 2376 | case SNES_20COL: |
| 2377 | 2377 | // why is this not working? investigate... |
| 2378 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x008000, 0x008fff, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart)); |
| 2378 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x008000, 0x008fff, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2379 | 2379 | break; |
| 2380 | 2380 | case SNES_SOULBLAD: |
| 2381 | 2381 | // reads from xxx0-xxx3in range [80-bf] return a fixed sequence of 4bits; reads in range [c0-ff] return open bus |
| 2382 | | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x808000, 0x808003, 0, 0x3f7ff0, read8_delegate(FUNC(device_sns_cart_interface::chip_read),state->m_slotcart->m_cart)); |
| 2382 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x808000, 0x808003, 0, 0x3f7ff0, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2383 | 2383 | machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_read_handler(0xc00000, 0xffffff, FUNC(snes_open_bus_r)); |
| 2384 | 2384 | break; |
| 2385 | 2385 | case SNES_BUGS: |
| 2386 | 2386 | case SNES_BANANA: |
| 2387 | | // machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x808000, 0x80ffff, 0, 0x780000, read8_delegate(FUNC(device_sns_cart_interface::chip_read),state->m_slotcart->m_cart)); |
| 2388 | | // machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x808000, 0x80ffff, 0, 0x780000, write8_delegate(FUNC(device_sns_cart_interface::chip_write),state->m_slotcart->m_cart)); |
| 2387 | // machine.device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x808000, 0x80ffff, 0, 0x780000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2388 | // machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x808000, 0x80ffff, 0, 0x780000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)state->m_slotcart)); |
| 2389 | 2389 | // set_5a22_map(*state->m_maincpu); |
| 2390 | 2390 | break; |
| 2391 | 2391 | } |