trunk/src/mame/drivers/seta.c
| r24055 | r24056 | |
| 1368 | 1368 | #include "sound/okim6295.h" |
| 1369 | 1369 | #include "sound/x1_010.h" |
| 1370 | 1370 | #include "sound/2151intf.h" |
| 1371 | | #include "video/seta001.h" |
| 1372 | 1371 | #include "machine/nvram.h" |
| 1373 | 1372 | |
| 1374 | 1373 | #if __uPD71054_TIMER |
| r24055 | r24056 | |
| 1592 | 1591 | // rising edge |
| 1593 | 1592 | if (state) |
| 1594 | 1593 | { |
| 1595 | | machine().device<seta001_device>("spritegen")->setac_eof(); |
| 1594 | m_seta001->setac_eof(); |
| 1596 | 1595 | } |
| 1597 | 1596 | } |
| 1598 | 1597 | |
| r24055 | r24056 | |
| 1630 | 1629 | AM_RANGE(0x300000, 0x300001) AM_WRITENOP // ? 0 / 1 |
| 1631 | 1630 | AM_RANGE(0x380000, 0x3803ff) AM_RAM AM_SHARE("paletteram") // Palette |
| 1632 | 1631 | /**/AM_RANGE(0x400000, 0x400001) AM_WRITENOP // ? $4000 |
| 1633 | | /**/AM_RANGE(0x600000, 0x6005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1634 | | AM_RANGE(0x600600, 0x600607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 1632 | /**/AM_RANGE(0x600000, 0x6005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1633 | AM_RANGE(0x600600, 0x600607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 1635 | 1634 | |
| 1636 | 1635 | AM_RANGE(0x800000, 0x800007) AM_WRITE(sub_ctrl_w) // Sub CPU Control? |
| 1637 | 1636 | AM_RANGE(0xa00000, 0xa00fff) AM_READWRITE(sharedram_68000_r,sharedram_68000_w) // Shared RAM |
| 1638 | | AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1637 | AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1639 | 1638 | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_SHARE("share1") // RAM (Mirrored?) |
| 1640 | 1639 | AM_RANGE(0xffc000, 0xffffff) AM_RAM AM_SHARE("share1") // RAM (Mirrored?) |
| 1641 | 1640 | ADDRESS_MAP_END |
| r24055 | r24056 | |
| 1660 | 1659 | AM_RANGE(0xa00000, 0xa00007) AM_WRITE(sub_ctrl_w) // Sub CPU Control? |
| 1661 | 1660 | AM_RANGE(0xb00000, 0xb00fff) AM_READWRITE(sharedram_68000_r,sharedram_68000_w) // Shared RAM |
| 1662 | 1661 | AM_RANGE(0xc00000, 0xc00001) AM_WRITENOP // ? $4000 |
| 1663 | | AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1664 | | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 1665 | | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1662 | AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1663 | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 1664 | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1666 | 1665 | AM_RANGE(0xf00000, 0xffffff) AM_RAM // RAM |
| 1667 | 1666 | ADDRESS_MAP_END |
| 1668 | 1667 | |
| r24055 | r24056 | |
| 1720 | 1719 | |
| 1721 | 1720 | AM_RANGE(0x904000, 0x904fff) AM_RAM // |
| 1722 | 1721 | AM_RANGE(0xa00000, 0xa00019) AM_READ(calibr50_ip_r) // Input Ports |
| 1723 | | /**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1724 | | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 1725 | | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1722 | /**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1723 | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 1724 | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1726 | 1725 | AM_RANGE(0xb00000, 0xb00001) AM_READ(soundlatch2_word_r) AM_WRITE(calibr50_soundlatch_w) // From Sub CPU |
| 1727 | 1726 | /**/AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? $4000 |
| 1728 | 1727 | ADDRESS_MAP_END |
| r24055 | r24056 | |
| 1789 | 1788 | static ADDRESS_MAP_START( usclssic_map, AS_PROGRAM, 16, seta_state ) |
| 1790 | 1789 | AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM |
| 1791 | 1790 | AM_RANGE(0xff0000, 0xffffff) AM_RAM // RAM |
| 1792 | | AM_RANGE(0x800000, 0x8005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1793 | | AM_RANGE(0x800600, 0x800607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 1791 | AM_RANGE(0x800000, 0x8005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1792 | AM_RANGE(0x800600, 0x800607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 1794 | 1793 | /**/AM_RANGE(0x900000, 0x900001) AM_RAM // ? $4000 |
| 1795 | 1794 | AM_RANGE(0xa00000, 0xa00005) AM_RAM AM_SHARE("vctrl_0") // VRAM Ctrl |
| 1796 | 1795 | /**/AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram") // Palette |
| r24055 | r24056 | |
| 1803 | 1802 | AM_RANGE(0xb40018, 0xb4001f) AM_READ(usclssic_dsw_r) // 2 DSWs |
| 1804 | 1803 | AM_RANGE(0xb40018, 0xb40019) AM_WRITE(watchdog_reset16_w) // Watchdog |
| 1805 | 1804 | AM_RANGE(0xb80000, 0xb80001) AM_READNOP // Watchdog (value is discarded)? |
| 1806 | | AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1805 | AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1807 | 1806 | AM_RANGE(0xd00000, 0xd03fff) AM_RAM_WRITE(seta_vram_0_w) AM_SHARE("vram_0") // VRAM |
| 1808 | 1807 | AM_RANGE(0xd04000, 0xd04fff) AM_RAM // |
| 1809 | 1808 | AM_RANGE(0xe00000, 0xe00fff) AM_RAM // NVRAM? (odd bytes) |
| r24055 | r24056 | |
| 1823 | 1822 | AM_RANGE(0x500000, 0x500001) AM_WRITENOP // ? (end of lev 1: bit 4 goes 1,0,1) |
| 1824 | 1823 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r) // DSW |
| 1825 | 1824 | AM_RANGE(0x700000, 0x7003ff) AM_RAM AM_SHARE("paletteram") // Palette |
| 1826 | | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1827 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 1825 | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1826 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 1828 | 1827 | AM_RANGE(0xb00000, 0xb00001) AM_READ_PORT("P1") // P1 |
| 1829 | 1828 | AM_RANGE(0xb00002, 0xb00003) AM_READ_PORT("P2") // P2 |
| 1830 | 1829 | AM_RANGE(0xb00004, 0xb00005) AM_READ_PORT("COINS") // Coins |
| 1831 | 1830 | /**/AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? 0x4000 |
| 1832 | | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1831 | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1833 | 1832 | ADDRESS_MAP_END |
| 1834 | 1833 | |
| 1835 | 1834 | |
| r24055 | r24056 | |
| 1850 | 1849 | AM_RANGE(0x700000, 0x7003ff) AM_RAM // (rezon,jjsquawk) |
| 1851 | 1850 | AM_RANGE(0x700400, 0x700fff) AM_RAM AM_SHARE("paletteram") // Palette |
| 1852 | 1851 | AM_RANGE(0x703c00, 0x7047ff) AM_RAM AM_SHARE("paletteram2") // 2nd Palette for the palette offset effect |
| 1853 | | /**/AM_RANGE(0x800000, 0x8005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1854 | | AM_RANGE(0x800600, 0x800607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 1852 | /**/AM_RANGE(0x800000, 0x8005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1853 | AM_RANGE(0x800600, 0x800607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 1855 | 1854 | AM_RANGE(0x880000, 0x880001) AM_RAM // ? 0xc000 |
| 1856 | | AM_RANGE(0x900000, 0x903fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1855 | AM_RANGE(0x900000, 0x903fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1857 | 1856 | /**/AM_RANGE(0xa00000, 0xa00005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl |
| 1858 | 1857 | /**/AM_RANGE(0xa80000, 0xa80005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl |
| 1859 | 1858 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM_WRITE(seta_vram_0_w) AM_SHARE("vram_0") // VRAM 0&1 |
| r24055 | r24056 | |
| 1891 | 1890 | AM_RANGE(0x884000, 0x88ffff) AM_RAM // (jjsquawk) |
| 1892 | 1891 | /**/AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl |
| 1893 | 1892 | /**/AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl |
| 1894 | | /**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1895 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 1893 | /**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1894 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 1896 | 1895 | /**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000 |
| 1897 | | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1896 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1898 | 1897 | AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound |
| 1899 | 1898 | AM_RANGE(0xd00000, 0xd00007) AM_WRITENOP // ? |
| 1900 | 1899 | AM_RANGE(0xe00000, 0xe00001) AM_WRITENOP // ? VBlank IRQ Ack |
| r24055 | r24056 | |
| 1971 | 1970 | AM_RANGE(0x884000, 0x88ffff) AM_RAM // (jjsquawk) |
| 1972 | 1971 | /**/AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl |
| 1973 | 1972 | /**/AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl |
| 1974 | | /**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1975 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 1973 | /**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 1974 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 1976 | 1975 | /**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000 |
| 1977 | | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1976 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 1978 | 1977 | AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound |
| 1979 | 1978 | #if __uPD71054_TIMER |
| 1980 | 1979 | AM_RANGE(0xd00000, 0xd00007) AM_WRITE(timer_regs_w) // ? |
| r24055 | r24056 | |
| 2014 | 2013 | AM_RANGE(0x902010, 0x902013) AM_READ(zingzipbl_unknown_r ) |
| 2015 | 2014 | |
| 2016 | 2015 | /**/AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl |
| 2017 | | /**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2018 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2016 | /**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2017 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2019 | 2018 | /**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000 |
| 2020 | | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2019 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2021 | 2020 | AM_RANGE(0xc00000, 0xc03fff) AM_RAM // soundram on original |
| 2022 | 2021 | #if __uPD71054_TIMER |
| 2023 | 2022 | AM_RANGE(0xd00000, 0xd00007) AM_WRITE(timer_regs_w) // ? |
| r24055 | r24056 | |
| 2047 | 2046 | AM_RANGE(0x884000, 0x88ffff) AM_RAM // (jjsquawk) |
| 2048 | 2047 | AM_RANGE(0x908000, 0x908005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl |
| 2049 | 2048 | AM_RANGE(0x909000, 0x909005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl |
| 2050 | | AM_RANGE(0xa0a000, 0xa0a5ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // RZ: Sprites Y |
| 2051 | | AM_RANGE(0xa0a600, 0xa0a607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2049 | AM_RANGE(0xa0a000, 0xa0a5ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // RZ: Sprites Y |
| 2050 | AM_RANGE(0xa0a600, 0xa0a607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2052 | 2051 | // AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000 |
| 2053 | | AM_RANGE(0xb0c000, 0xb0ffff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // RZ: Sprites Code + X + Attr |
| 2052 | AM_RANGE(0xb0c000, 0xb0ffff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // RZ: Sprites Code + X + Attr |
| 2054 | 2053 | AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound |
| 2055 | 2054 | #if __uPD71054_TIMER |
| 2056 | 2055 | AM_RANGE(0xd00000, 0xd00007) AM_WRITE(timer_regs_w) // ? |
| r24055 | r24056 | |
| 2080 | 2079 | AM_RANGE(0x800100, 0x8001ff) AM_RAM // NVRAM |
| 2081 | 2080 | AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound |
| 2082 | 2081 | AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram") // Palette |
| 2083 | | AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2082 | AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2084 | 2083 | /**/AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000 |
| 2085 | | /**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2086 | | AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2084 | /**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2085 | AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2087 | 2086 | ADDRESS_MAP_END |
| 2088 | 2087 | |
| 2089 | 2088 | /*************************************************************************** |
| r24055 | r24056 | |
| 2161 | 2160 | AM_RANGE(0x900002, 0x900003) AM_WRITE(keroppi_prize_w) // |
| 2162 | 2161 | AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound |
| 2163 | 2162 | AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram") // Palette |
| 2164 | | AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2163 | AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2165 | 2164 | /**/AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000 |
| 2166 | | /**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2167 | | AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2165 | /**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2166 | AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2168 | 2167 | ADDRESS_MAP_END |
| 2169 | 2168 | |
| 2170 | 2169 | MACHINE_START_MEMBER(seta_state,keroppi) |
| r24055 | r24056 | |
| 2192 | 2191 | AM_RANGE(0x500004, 0x500005) AM_READ_PORT("COINS") // Coins |
| 2193 | 2192 | AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound |
| 2194 | 2193 | AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram") // Palette |
| 2195 | | AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2194 | AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2196 | 2195 | /**/AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000 |
| 2197 | | /**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2198 | | AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2196 | /**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2197 | AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2199 | 2198 | ADDRESS_MAP_END |
| 2200 | 2199 | |
| 2201 | 2200 | |
| r24055 | r24056 | |
| 2221 | 2220 | AM_RANGE(0x884000, 0x88ffff) AM_RAM // |
| 2222 | 2221 | AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl |
| 2223 | 2222 | AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl |
| 2224 | | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2225 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2223 | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2224 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2226 | 2225 | |
| 2227 | 2226 | AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000 |
| 2228 | | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2227 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2229 | 2228 | AM_RANGE(0xb04000, 0xb13fff) AM_RAM |
| 2230 | 2229 | AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound |
| 2231 | 2230 | AM_RANGE(0xe00000, 0xe00001) AM_WRITENOP // |
| r24055 | r24056 | |
| 2254 | 2253 | AM_RANGE(0xb00004, 0xb00005) AM_READ_PORT("COINS") // Coins |
| 2255 | 2254 | AM_RANGE(0xb00006, 0xb00007) AM_READNOP // unused (qzkklogy) |
| 2256 | 2255 | /**/AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? $4000 |
| 2257 | | /**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2258 | | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2259 | | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2256 | /**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2257 | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2258 | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2260 | 2259 | ADDRESS_MAP_END |
| 2261 | 2260 | |
| 2262 | 2261 | /*************************************************************************** |
| r24055 | r24056 | |
| 2268 | 2267 | |
| 2269 | 2268 | WRITE16_MEMBER(seta_state::setaroul_spriteylow_w) |
| 2270 | 2269 | { |
| 2271 | | seta001_device *dev = machine().device<seta001_device>("spritegen"); |
| 2272 | | if ((offset&1)==0) spriteylow_w8(dev, space, offset>>1, (data & 0xff00) >> 8); |
| 2270 | if ((offset&1)==0) m_seta001->spriteylow_w8(space, offset>>1, (data & 0xff00) >> 8); |
| 2273 | 2271 | } |
| 2274 | 2272 | |
| 2275 | 2273 | WRITE16_MEMBER(seta_state::setaroul_spritectrl_w) |
| 2276 | 2274 | { |
| 2277 | | seta001_device *dev = machine().device<seta001_device>("spritegen"); |
| 2278 | | if ((offset&1)==0) spritectrl_w8(dev, space, offset>>1, (data & 0xff00) >> 8); |
| 2275 | if ((offset&1)==0) m_seta001->spritectrl_w8(space, offset>>1, (data & 0xff00) >> 8); |
| 2279 | 2276 | } |
| 2280 | 2277 | |
| 2281 | 2278 | WRITE16_MEMBER(seta_state::setaroul_spritecode_w) |
| 2282 | 2279 | { |
| 2283 | | seta001_device *dev = machine().device<seta001_device>("spritegen"); |
| 2284 | | if ((offset&1)==1) spritecodelow_w8(dev, space, offset>>1, (data & 0xff00) >> 8); |
| 2285 | | if ((offset&1)==0) spritecodehigh_w8(dev, space, offset>>1, (data & 0xff00) >> 8); |
| 2280 | if ((offset&1)==1) m_seta001->spritecodelow_w8(space, offset>>1, (data & 0xff00) >> 8); |
| 2281 | if ((offset&1)==0) m_seta001->spritecodehigh_w8(space, offset>>1, (data & 0xff00) >> 8); |
| 2286 | 2282 | } |
| 2287 | 2283 | |
| 2288 | 2284 | READ16_MEMBER(seta_state::setaroul_spritecode_r) |
| 2289 | 2285 | { |
| 2290 | 2286 | UINT16 ret; |
| 2291 | | seta001_device *dev = machine().device<seta001_device>("spritegen"); |
| 2292 | 2287 | if ((offset&1)==1) |
| 2293 | | ret = spritecodelow_r8(dev, space, offset>>1); |
| 2288 | ret = m_seta001->spritecodelow_r8(space, offset>>1); |
| 2294 | 2289 | else |
| 2295 | | ret = spritecodehigh_r8(dev, space, offset>>1); |
| 2290 | ret = m_seta001->spritecodehigh_r8(space, offset>>1); |
| 2296 | 2291 | return ret << 8; |
| 2297 | 2292 | } |
| 2298 | 2293 | |
| r24055 | r24056 | |
| 2353 | 2348 | AM_RANGE(0x884000, 0x88ffff) AM_RAM // |
| 2354 | 2349 | /**/AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl |
| 2355 | 2350 | /**/AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl |
| 2356 | | /**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2357 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2351 | /**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2352 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2358 | 2353 | /**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000 |
| 2359 | | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2354 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2360 | 2355 | AM_RANGE(0xb04000, 0xb13fff) AM_RAM // |
| 2361 | 2356 | AM_RANGE(0xe00000, 0xe03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound |
| 2362 | 2357 | ADDRESS_MAP_END |
| r24055 | r24056 | |
| 2385 | 2380 | AM_RANGE(0x884000, 0x887fff) AM_RAM // tested |
| 2386 | 2381 | AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl |
| 2387 | 2382 | AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl |
| 2388 | | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2389 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2383 | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2384 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2390 | 2385 | AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? $4000 |
| 2391 | | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2386 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2392 | 2387 | AM_RANGE(0xb04000, 0xb07fff) AM_RAM // tested |
| 2393 | 2388 | #if __uPD71054_TIMER |
| 2394 | 2389 | AM_RANGE(0xc00000, 0xc00007) AM_WRITE(timer_regs_w) // ? |
| r24055 | r24056 | |
| 2415 | 2410 | AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl |
| 2416 | 2411 | AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl |
| 2417 | 2412 | |
| 2418 | | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2419 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2413 | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2414 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2420 | 2415 | AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? $4000 |
| 2421 | | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2416 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2422 | 2417 | #if __uPD71054_TIMER |
| 2423 | 2418 | AM_RANGE(0xc00000, 0xc00007) AM_WRITE(timer_regs_w) // ? |
| 2424 | 2419 | #else |
| r24055 | r24056 | |
| 2461 | 2456 | AM_RANGE(0x884000, 0x887fff) AM_RAM // tested |
| 2462 | 2457 | AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl |
| 2463 | 2458 | AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl |
| 2464 | | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2465 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2459 | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2460 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2466 | 2461 | AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? $4000 |
| 2467 | | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2462 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2468 | 2463 | AM_RANGE(0xb04000, 0xb07fff) AM_RAM // tested |
| 2469 | 2464 | #if __uPD71054_TIMER |
| 2470 | 2465 | AM_RANGE(0xc00000, 0xc00007) AM_WRITE(timer_regs_w) // ? |
| r24055 | r24056 | |
| 2518 | 2513 | AM_RANGE(0x800100, 0x8001ff) AM_RAM // NVRAM |
| 2519 | 2514 | AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound |
| 2520 | 2515 | AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram") // Palette |
| 2521 | | AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2516 | AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2522 | 2517 | /**/AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000 |
| 2523 | | /**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2524 | | AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2518 | /**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2519 | AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2525 | 2520 | ADDRESS_MAP_END |
| 2526 | 2521 | |
| 2527 | 2522 | |
| r24055 | r24056 | |
| 2554 | 2549 | AM_RANGE(0x500000, 0x500005) AM_RAM_WRITE(msgundam_vregs_w) AM_SHARE("vregs") // Coin Lockout + Video Registers |
| 2555 | 2550 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r) // DSW |
| 2556 | 2551 | AM_RANGE(0x700400, 0x700fff) AM_RAM AM_SHARE("paletteram") // Palette |
| 2557 | | AM_RANGE(0x800000, 0x8005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2558 | | AM_RANGE(0x800600, 0x800607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2552 | AM_RANGE(0x800000, 0x8005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2553 | AM_RANGE(0x800600, 0x800607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2559 | 2554 | AM_RANGE(0x880000, 0x880001) AM_RAM // ? 0x4000 |
| 2560 | | AM_RANGE(0x900000, 0x903fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2555 | AM_RANGE(0x900000, 0x903fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2561 | 2556 | AM_RANGE(0xa00000, 0xa03fff) AM_RAM_WRITE(seta_vram_0_w) AM_SHARE("vram_0") // VRAM 0&1 |
| 2562 | 2557 | AM_RANGE(0xa80000, 0xa83fff) AM_RAM_WRITE(seta_vram_2_w) AM_SHARE("vram_2") // VRAM 2&3 |
| 2563 | 2558 | AM_RANGE(0xb00000, 0xb00005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl |
| r24055 | r24056 | |
| 2591 | 2586 | AM_RANGE(0x880000, 0x883fff) AM_RAM_WRITE(seta_vram_2_w) AM_SHARE("vram_2") // VRAM 2&3 |
| 2592 | 2587 | /**/AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl |
| 2593 | 2588 | /**/AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl |
| 2594 | | /**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2595 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2589 | /**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2590 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2596 | 2591 | /**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000 |
| 2597 | | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2592 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2598 | 2593 | AM_RANGE(0xc00400, 0xc00fff) AM_RAM AM_SHARE("paletteram") // Palette |
| 2599 | 2594 | ADDRESS_MAP_END |
| 2600 | 2595 | |
| r24055 | r24056 | |
| 2620 | 2615 | AM_RANGE(0x880000, 0x883fff) AM_RAM_WRITE(seta_vram_2_w) AM_SHARE("vram_2") // VRAM 2&3 |
| 2621 | 2616 | /**/AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl |
| 2622 | 2617 | /**/AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl |
| 2623 | | /**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2624 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2618 | /**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2619 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2625 | 2620 | /**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000 |
| 2626 | | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2621 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2627 | 2622 | AM_RANGE(0xc00400, 0xc00fff) AM_RAM AM_SHARE("paletteram") // Palette |
| 2628 | 2623 | ADDRESS_MAP_END |
| 2629 | 2624 | |
| r24055 | r24056 | |
| 2672 | 2667 | AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM |
| 2673 | 2668 | AM_RANGE(0x200000, 0x20ffff) AM_RAM // RAM |
| 2674 | 2669 | AM_RANGE(0xfffc00, 0xffffff) AM_READWRITE(kiwame_nvram_r, kiwame_nvram_w) AM_SHARE("kiwame_nvram") // NVRAM + Regs ? |
| 2675 | | AM_RANGE(0x800000, 0x803fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2670 | AM_RANGE(0x800000, 0x803fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2676 | 2671 | /**/AM_RANGE(0x900000, 0x900001) AM_RAM // ? 0x4000 |
| 2677 | | /**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2678 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2672 | /**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2673 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2679 | 2674 | AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram") // Palette |
| 2680 | 2675 | AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound |
| 2681 | 2676 | AM_RANGE(0xd00000, 0xd00009) AM_READ(kiwame_input_r) // mahjong panel |
| r24055 | r24056 | |
| 2716 | 2711 | AM_RANGE(0xb00008, 0xb00009) AM_READ_PORT("P3") // P3 (wits) |
| 2717 | 2712 | AM_RANGE(0xb0000a, 0xb0000b) AM_READ_PORT("P4") // P4 (wits) |
| 2718 | 2713 | /**/AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? 0x4000 |
| 2719 | | /**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2720 | | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2721 | | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2714 | /**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2715 | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2716 | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2722 | 2717 | AM_RANGE(0xe04000, 0xe07fff) AM_RAM // (wits) |
| 2723 | 2718 | ADDRESS_MAP_END |
| 2724 | 2719 | |
| r24055 | r24056 | |
| 2740 | 2735 | AM_RANGE(0xb00008, 0xb00009) AM_READ_PORT("P3") // P3 (wits) |
| 2741 | 2736 | AM_RANGE(0xb0000a, 0xb0000b) AM_READ_PORT("P4") // P4 (wits) |
| 2742 | 2737 | /**/AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? 0x4000 |
| 2743 | | /**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2744 | | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2745 | | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2738 | /**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2739 | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2740 | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2746 | 2741 | AM_RANGE(0xe04000, 0xe07fff) AM_RAM // (wits) |
| 2747 | 2742 | ADDRESS_MAP_END |
| 2748 | 2743 | |
| r24055 | r24056 | |
| 2778 | 2773 | AM_RANGE(0xb00008, 0xb00009) AM_READ_PORT("P3") // P3 (wits) |
| 2779 | 2774 | AM_RANGE(0xb0000a, 0xb0000b) AM_READ_PORT("P4") // P4 (wits) |
| 2780 | 2775 | /**/AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? 0x4000 |
| 2781 | | /**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2782 | | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2783 | | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2776 | /**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2777 | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2778 | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2784 | 2779 | AM_RANGE(0xe04000, 0xe07fff) AM_RAM // (wits) |
| 2785 | 2780 | ADDRESS_MAP_END |
| 2786 | 2781 | |
| r24055 | r24056 | |
| 2808 | 2803 | AM_RANGE(0x400004, 0x400005) AM_WRITENOP // ? (end of lev 2) |
| 2809 | 2804 | AM_RANGE(0x500000, 0x500001) AM_RAM_WRITE(seta_vregs_w) AM_SHARE("vregs") // Coin Lockout + Video Registers |
| 2810 | 2805 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r) // DSW |
| 2811 | | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2812 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2806 | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2807 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2813 | 2808 | /**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000 |
| 2814 | | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2809 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2815 | 2810 | AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound |
| 2816 | 2811 | ADDRESS_MAP_END |
| 2817 | 2812 | |
| r24055 | r24056 | |
| 2842 | 2837 | AM_RANGE(0x880000, 0x883fff) AM_RAM_WRITE(seta_vram_2_w) AM_SHARE("vram_2") // VRAM 2&3 |
| 2843 | 2838 | AM_RANGE(0x900000, 0x900005) AM_WRITEONLY AM_SHARE("vctrl_0")// VRAM 0&1 Ctrl |
| 2844 | 2839 | AM_RANGE(0x980000, 0x980005) AM_WRITEONLY AM_SHARE("vctrl_2")// VRAM 2&3 Ctrl |
| 2845 | | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2846 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2847 | | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2840 | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2841 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2842 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2848 | 2843 | AM_RANGE(0xc00000, 0xc00001) AM_WRITE(utoukond_soundlatch_w) // To Sound CPU (cause an IRQ) |
| 2849 | 2844 | AM_RANGE(0xe00000, 0xe00001) AM_WRITENOP // ? ack |
| 2850 | 2845 | ADDRESS_MAP_END |
| r24055 | r24056 | |
| 2882 | 2877 | AM_RANGE(0x900000, 0x9001ff) AM_READWRITE(pairlove_prot_r,pairlove_prot_w) |
| 2883 | 2878 | AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound |
| 2884 | 2879 | AM_RANGE(0xb00000, 0xb00fff) AM_RAM AM_SHARE("paletteram") // Palette |
| 2885 | | AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2880 | AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2886 | 2881 | AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000 |
| 2887 | | AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2888 | | AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2882 | AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2883 | AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2889 | 2884 | AM_RANGE(0xf00000, 0xf0ffff) AM_RAM // RAM |
| 2890 | 2885 | ADDRESS_MAP_END |
| 2891 | 2886 | |
| r24055 | r24056 | |
| 2911 | 2906 | AM_RANGE(0x880000, 0x883fff) AM_WRITE(seta_vram_0_w) AM_SHARE("vram_0") // VRAM 0 |
| 2912 | 2907 | AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl |
| 2913 | 2908 | AM_RANGE(0x980000, 0x980005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl |
| 2914 | | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2915 | | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2909 | AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2910 | AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2916 | 2911 | AM_RANGE(0xa80000, 0xa80001) AM_WRITENOP // ? 0x4000 |
| 2917 | | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2912 | AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2918 | 2913 | ADDRESS_MAP_END |
| 2919 | 2914 | |
| 2920 | 2915 | |
| r24055 | r24056 | |
| 2977 | 2972 | |
| 2978 | 2973 | AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? 0x4000 |
| 2979 | 2974 | |
| 2980 | | AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2981 | | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 2975 | AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 2976 | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 2982 | 2977 | |
| 2983 | | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2978 | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 2984 | 2979 | |
| 2985 | 2980 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // RAM |
| 2986 | 2981 | ADDRESS_MAP_END |
| r24055 | r24056 | |
| 3040 | 3035 | |
| 3041 | 3036 | AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? 0x4000 |
| 3042 | 3037 | |
| 3043 | | AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y |
| 3044 | | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| 3038 | AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y |
| 3039 | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16) |
| 3045 | 3040 | |
| 3046 | | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 3041 | AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr |
| 3047 | 3042 | |
| 3048 | 3043 | AM_RANGE(0xffc000, 0xffffff) AM_RAM // RAM |
| 3049 | 3044 | ADDRESS_MAP_END |
trunk/src/mame/video/seta001.c
| r24055 | r24056 | |
| 77 | 77 | { |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | | READ16_DEVICE_HANDLER( spritectrl_r16 ) |
| 80 | READ16_MEMBER( seta001_device::spritectrl_r16 ) |
| 81 | 81 | { |
| 82 | | seta001_device *dev = (seta001_device *)device; |
| 83 | | return dev->m_spritectrl[offset]; |
| 82 | return m_spritectrl[offset]; |
| 84 | 83 | } |
| 85 | 84 | |
| 86 | | WRITE16_DEVICE_HANDLER( spritectrl_w16 ) |
| 85 | WRITE16_MEMBER( seta001_device::spritectrl_w16 ) |
| 87 | 86 | { |
| 88 | | seta001_device *dev = (seta001_device *)device; |
| 89 | | |
| 90 | 87 | if (ACCESSING_BITS_0_7) |
| 91 | 88 | { |
| 92 | | dev->m_spritectrl[offset] = data; |
| 89 | m_spritectrl[offset] = data; |
| 93 | 90 | } |
| 94 | 91 | } |
| 95 | 92 | |
| 96 | | READ8_DEVICE_HANDLER( spritectrl_r8 ) |
| 93 | READ8_MEMBER( seta001_device::spritectrl_r8 ) |
| 97 | 94 | { |
| 98 | | seta001_device *dev = (seta001_device *)device; |
| 99 | | return dev->m_spritectrl[offset]; |
| 95 | return m_spritectrl[offset]; |
| 100 | 96 | } |
| 101 | 97 | |
| 102 | | WRITE8_DEVICE_HANDLER( spritectrl_w8 ) |
| 98 | WRITE8_MEMBER( seta001_device::spritectrl_w8 ) |
| 103 | 99 | { |
| 104 | | seta001_device *dev = (seta001_device *)device; |
| 105 | | dev->m_spritectrl[offset] = data; |
| 100 | m_spritectrl[offset] = data; |
| 106 | 101 | } |
| 107 | 102 | |
| 108 | | READ16_DEVICE_HANDLER( spriteylow_r16 ) |
| 103 | READ16_MEMBER( seta001_device::spriteylow_r16 ) |
| 109 | 104 | { |
| 110 | | seta001_device *dev = (seta001_device *)device; |
| 111 | | return dev->m_spriteylow[offset]; |
| 105 | return m_spriteylow[offset]; |
| 112 | 106 | } |
| 113 | 107 | |
| 114 | | WRITE16_DEVICE_HANDLER( spriteylow_w16 ) |
| 108 | WRITE16_MEMBER( seta001_device::spriteylow_w16 ) |
| 115 | 109 | { |
| 116 | | seta001_device *dev = (seta001_device *)device; |
| 117 | | |
| 118 | 110 | if (ACCESSING_BITS_0_7) |
| 119 | 111 | { |
| 120 | | dev->m_spriteylow[offset] = data; |
| 112 | m_spriteylow[offset] = data; |
| 121 | 113 | } |
| 122 | 114 | } |
| 123 | 115 | |
| 124 | | READ8_DEVICE_HANDLER( spriteylow_r8 ) |
| 116 | READ8_MEMBER( seta001_device::spriteylow_r8 ) |
| 125 | 117 | { |
| 126 | | seta001_device *dev = (seta001_device *)device; |
| 127 | | return dev->m_spriteylow[offset]; |
| 118 | return m_spriteylow[offset]; |
| 128 | 119 | } |
| 129 | 120 | |
| 130 | | WRITE8_DEVICE_HANDLER( spriteylow_w8 ) |
| 121 | WRITE8_MEMBER( seta001_device::spriteylow_w8 ) |
| 131 | 122 | { |
| 132 | | seta001_device *dev = (seta001_device *)device; |
| 133 | | dev->m_spriteylow[offset] = data; |
| 123 | m_spriteylow[offset] = data; |
| 134 | 124 | } |
| 135 | 125 | |
| 136 | 126 | |
| 137 | | READ8_DEVICE_HANDLER( spritecodelow_r8 ) |
| 127 | READ8_MEMBER( seta001_device::spritecodelow_r8 ) |
| 138 | 128 | { |
| 139 | | seta001_device *dev = (seta001_device *)device; |
| 140 | | return dev->m_spritecodelow[offset]; |
| 129 | return m_spritecodelow[offset]; |
| 141 | 130 | } |
| 142 | 131 | |
| 143 | | WRITE8_DEVICE_HANDLER( spritecodelow_w8 ) |
| 132 | WRITE8_MEMBER( seta001_device::spritecodelow_w8 ) |
| 144 | 133 | { |
| 145 | | seta001_device *dev = (seta001_device *)device; |
| 146 | | dev->m_spritecodelow[offset] = data; |
| 134 | m_spritecodelow[offset] = data; |
| 147 | 135 | } |
| 148 | 136 | |
| 149 | | READ8_DEVICE_HANDLER( spritecodehigh_r8 ) |
| 137 | READ8_MEMBER( seta001_device::spritecodehigh_r8 ) |
| 150 | 138 | { |
| 151 | | seta001_device *dev = (seta001_device *)device; |
| 152 | | return dev->m_spritecodehigh[offset]; |
| 139 | return m_spritecodehigh[offset]; |
| 153 | 140 | } |
| 154 | 141 | |
| 155 | | WRITE8_DEVICE_HANDLER( spritecodehigh_w8 ) |
| 142 | WRITE8_MEMBER( seta001_device::spritecodehigh_w8 ) |
| 156 | 143 | { |
| 157 | | seta001_device *dev = (seta001_device *)device; |
| 158 | | dev->m_spritecodehigh[offset] = data; |
| 144 | m_spritecodehigh[offset] = data; |
| 159 | 145 | } |
| 160 | 146 | |
| 161 | | READ16_DEVICE_HANDLER( spritecode_r16 ) |
| 147 | READ16_MEMBER( seta001_device::spritecode_r16 ) |
| 162 | 148 | { |
| 163 | | seta001_device *dev = (seta001_device *)device; |
| 164 | | UINT16 ret = dev->m_spritecodelow[offset]; |
| 165 | | ret |= dev->m_spritecodehigh[offset] << 8; |
| 149 | UINT16 ret = m_spritecodelow[offset]; |
| 150 | ret |= m_spritecodehigh[offset] << 8; |
| 166 | 151 | return ret; |
| 167 | 152 | } |
| 168 | 153 | |
| 169 | | WRITE16_DEVICE_HANDLER( spritecode_w16 ) |
| 154 | WRITE16_MEMBER( seta001_device::spritecode_w16 ) |
| 170 | 155 | { |
| 171 | | seta001_device *dev = (seta001_device *)device; |
| 172 | | if (ACCESSING_BITS_0_7) dev->m_spritecodelow[offset] = data & 0x00ff; |
| 173 | | if (ACCESSING_BITS_8_15) dev->m_spritecodehigh[offset] = (data & 0xff00)>>8; |
| 156 | if (ACCESSING_BITS_0_7) m_spritecodelow[offset] = data & 0x00ff; |
| 157 | if (ACCESSING_BITS_8_15) m_spritecodehigh[offset] = (data & 0xff00)>>8; |
| 174 | 158 | } |
| 175 | 159 | |
| 176 | | WRITE8_DEVICE_HANDLER( spritebgflag_w8 ) |
| 160 | WRITE8_MEMBER( seta001_device::spritebgflag_w8 ) |
| 177 | 161 | { |
| 178 | | seta001_device *dev = (seta001_device *)device; |
| 179 | | dev->m_bgflag = data; |
| 162 | m_bgflag = data; |
| 180 | 163 | } |
| 181 | 164 | |
| 182 | 165 | /*************************************************************************** |
| r24055 | r24056 | |
| 206 | 189 | |
| 207 | 190 | |
| 208 | 191 | |
| 209 | | void seta001_device::seta001_draw_background( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size, int setac_type) |
| 192 | void seta001_device::draw_background( bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size, int setac_type) |
| 210 | 193 | { |
| 211 | 194 | int transpen; |
| 212 | 195 | |
| 213 | 196 | int offs, col; |
| 214 | 197 | int xoffs, yoffs; |
| 215 | 198 | |
| 216 | | int total_color_codes = machine.config().m_gfxdecodeinfo[0].total_color_codes; |
| 199 | int total_color_codes = machine().config().m_gfxdecodeinfo[0].total_color_codes; |
| 217 | 200 | |
| 218 | 201 | int ctrl = m_spritectrl[0]; |
| 219 | 202 | int ctrl2 = m_spritectrl[1]; |
| r24055 | r24056 | |
| 293 | 276 | color = ( color >> (16-5) ) % total_color_codes; |
| 294 | 277 | code &= 0x3fff; |
| 295 | 278 | |
| 296 | | drawgfx_transpen(bitmap,cliprect,machine.gfx[0], |
| 279 | drawgfx_transpen(bitmap,cliprect,machine().gfx[0], |
| 297 | 280 | code, |
| 298 | 281 | color, |
| 299 | 282 | flipx,flipy, |
| 300 | 283 | ((sx) & 0x1ff),((sy) & 0x0ff), |
| 301 | 284 | transpen); |
| 302 | 285 | |
| 303 | | drawgfx_transpen(bitmap,cliprect,machine.gfx[0], |
| 286 | drawgfx_transpen(bitmap,cliprect,machine().gfx[0], |
| 304 | 287 | code, |
| 305 | 288 | color, |
| 306 | 289 | flipx,flipy, |
| 307 | 290 | ((sx) & 0x1ff)-512,((sy) & 0x0ff), |
| 308 | 291 | transpen); |
| 309 | 292 | |
| 310 | | drawgfx_transpen(bitmap,cliprect,machine.gfx[0], |
| 293 | drawgfx_transpen(bitmap,cliprect,machine().gfx[0], |
| 311 | 294 | code, |
| 312 | 295 | color, |
| 313 | 296 | flipx,flipy, |
| 314 | 297 | ((sx) & 0x1ff),((sy) & 0x0ff)-256, |
| 315 | 298 | transpen); |
| 316 | 299 | |
| 317 | | drawgfx_transpen(bitmap,cliprect,machine.gfx[0], |
| 300 | drawgfx_transpen(bitmap,cliprect,machine().gfx[0], |
| 318 | 301 | code, |
| 319 | 302 | color, |
| 320 | 303 | flipx,flipy, |
| r24055 | r24056 | |
| 326 | 309 | } |
| 327 | 310 | |
| 328 | 311 | |
| 329 | | void seta001_device::seta001_draw_foreground( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size) |
| 312 | void seta001_device::draw_foreground( bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size) |
| 330 | 313 | { |
| 331 | 314 | int screenflip = (m_spritectrl[0] & 0x40) >> 6; |
| 332 | 315 | int i; |
| 333 | 316 | int ctrl2 = m_spritectrl[1]; |
| 334 | 317 | int xoffs, yoffs; |
| 335 | 318 | |
| 336 | | int total_color_codes = machine.config().m_gfxdecodeinfo[0].total_color_codes; |
| 319 | int total_color_codes = machine().config().m_gfxdecodeinfo[0].total_color_codes; |
| 337 | 320 | |
| 338 | 321 | UINT8 *char_pointer = m_spritecodelow + 0x0000; |
| 339 | 322 | UINT8 *x_pointer = m_spritecodelow + 0x0200; |
| r24055 | r24056 | |
| 351 | 334 | color_pointer += bank_size; |
| 352 | 335 | } |
| 353 | 336 | |
| 354 | | int max_y = machine.primary_screen->height(); |
| 337 | int max_y = machine().primary_screen->height(); |
| 355 | 338 | |
| 356 | 339 | |
| 357 | 340 | /* Draw up to 512 sprites, mjyuugi has glitches if you draw them all.. */ |
| r24055 | r24056 | |
| 368 | 351 | flipx = ctrl_pointer[i] & 0x80; |
| 369 | 352 | flipy = ctrl_pointer[i] & 0x40; |
| 370 | 353 | |
| 371 | | if (m_bankcallback) code = m_bankcallback(machine, code, color_pointer[i]); |
| 354 | if (m_bankcallback) code = m_bankcallback(machine(), code, color_pointer[i]); |
| 372 | 355 | |
| 373 | 356 | color %= total_color_codes; |
| 374 | 357 | |
| r24055 | r24056 | |
| 377 | 360 | if (screenflip) |
| 378 | 361 | { |
| 379 | 362 | sy = max_y - sy |
| 380 | | +(machine.primary_screen->height() - (machine.primary_screen->visible_area().max_y + 1)); |
| 363 | +(machine().primary_screen->height() - (machine().primary_screen->visible_area().max_y + 1)); |
| 381 | 364 | flipx = !flipx; |
| 382 | 365 | flipy = !flipy; |
| 383 | 366 | } |
| 384 | 367 | |
| 385 | | drawgfx_transpen(bitmap,cliprect,machine.gfx[0], |
| 368 | drawgfx_transpen(bitmap,cliprect,machine().gfx[0], |
| 386 | 369 | code, |
| 387 | 370 | color, |
| 388 | 371 | flipx,flipy, |
| r24055 | r24056 | |
| 390 | 373 | max_y - ((sy + yoffs) & 0x0ff),m_transpen); |
| 391 | 374 | |
| 392 | 375 | /* wrap around x */ |
| 393 | | drawgfx_transpen(bitmap,cliprect,machine.gfx[0], |
| 376 | drawgfx_transpen(bitmap,cliprect,machine().gfx[0], |
| 394 | 377 | code, |
| 395 | 378 | color, |
| 396 | 379 | flipx,flipy, |
| r24055 | r24056 | |
| 398 | 381 | max_y - ((sy + yoffs) & 0x0ff),m_transpen); |
| 399 | 382 | |
| 400 | 383 | |
| 401 | | drawgfx_transpen(bitmap,cliprect,machine.gfx[0], |
| 384 | drawgfx_transpen(bitmap,cliprect,machine().gfx[0], |
| 402 | 385 | code, |
| 403 | 386 | color, |
| 404 | 387 | flipx,flipy, |
| r24055 | r24056 | |
| 406 | 389 | max_y - ((sy + yoffs) & 0x0ff)-256,m_transpen); |
| 407 | 390 | |
| 408 | 391 | /* wrap around x */ |
| 409 | | drawgfx_transpen(bitmap,cliprect,machine.gfx[0], |
| 392 | drawgfx_transpen(bitmap,cliprect,machine().gfx[0], |
| 410 | 393 | code, |
| 411 | 394 | color, |
| 412 | 395 | flipx,flipy, |
| r24055 | r24056 | |
| 464 | 447 | |
| 465 | 448 | } |
| 466 | 449 | |
| 467 | | void seta001_device::seta001_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size, int setac) |
| 450 | void seta001_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_size, int setac) |
| 468 | 451 | { |
| 469 | | seta001_draw_background(machine, bitmap, cliprect, bank_size, setac); |
| 470 | | seta001_draw_foreground(machine, bitmap, cliprect, bank_size); |
| 452 | draw_background(bitmap, cliprect, bank_size, setac); |
| 453 | draw_foreground(bitmap, cliprect, bank_size); |
| 471 | 454 | } |