trunk/src/mame/video/tc0180vcu.h
| r29447 | r29448 | |
| 1 | | #ifndef _TC0180VCU_H_ |
| 2 | | #define _TC0180VCU_H_ |
| 1 | #ifndef __TC0180VCU_H__ |
| 2 | #define __TC0180VCU_H__ |
| 3 | 3 | |
| 4 | | struct tc0180vcu_interface |
| 4 | class tc0180vcu_device : public device_t |
| 5 | 5 | { |
| 6 | | int m_bg_color_base; |
| 7 | | int m_fg_color_base; |
| 8 | | int m_tx_color_base; |
| 9 | | }; |
| 10 | | |
| 11 | | class tc0180vcu_device : public device_t, |
| 12 | | public tc0180vcu_interface |
| 13 | | { |
| 14 | 6 | public: |
| 15 | 7 | tc0180vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 16 | 8 | ~tc0180vcu_device() {} |
| 17 | 9 | |
| 18 | 10 | // static configuration |
| 19 | 11 | static void static_set_gfxdecode_tag(device_t &device, const char *tag); |
| 12 | static void set_bg_colorbase(device_t &device, int color) { downcast<tc0180vcu_device &>(device).m_bg_color_base = color; } |
| 13 | static void set_fg_colorbase(device_t &device, int color) { downcast<tc0180vcu_device &>(device).m_fg_color_base = color; } |
| 14 | static void set_tx_colorbase(device_t &device, int color) { downcast<tc0180vcu_device &>(device).m_tx_color_base = color; } |
| 20 | 15 | |
| 21 | 16 | DECLARE_READ8_MEMBER( get_fb_page ); |
| 22 | 17 | DECLARE_WRITE8_MEMBER( set_fb_page ); |
| r29447 | r29448 | |
| 31 | 26 | |
| 32 | 27 | protected: |
| 33 | 28 | // device-level overrides |
| 34 | | virtual void device_config_complete(); |
| 35 | 29 | virtual void device_start(); |
| 36 | 30 | virtual void device_reset(); |
| 37 | 31 | |
| 38 | | private: |
| 32 | private: |
| 39 | 33 | // internal state |
| 40 | 34 | UINT16 m_ctrl[0x10]; |
| 41 | 35 | |
| r29447 | r29448 | |
| 47 | 41 | UINT16 m_bg_rambank[2], m_fg_rambank[2], m_tx_rambank; |
| 48 | 42 | UINT8 m_framebuffer_page; |
| 49 | 43 | UINT8 m_video_control; |
| 44 | |
| 45 | int m_bg_color_base; |
| 46 | int m_fg_color_base; |
| 47 | int m_tx_color_base; |
| 48 | |
| 50 | 49 | required_device<gfxdecode_device> m_gfxdecode; |
| 51 | 50 | |
| 52 | 51 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| r29447 | r29448 | |
| 58 | 57 | |
| 59 | 58 | extern const device_type TC0180VCU; |
| 60 | 59 | |
| 61 | | #define MCFG_TC0180VCU_ADD(_tag, _interface) \ |
| 62 | | MCFG_DEVICE_ADD(_tag, TC0180VCU, 0) \ |
| 63 | | MCFG_DEVICE_CONFIG(_interface) |
| 60 | #define MCFG_TC0180VCU_BG_COLORBASE(_color) \ |
| 61 | tc0180vcu_device::set_bg_colorbase(*device, _color); |
| 64 | 62 | |
| 63 | #define MCFG_TC0180VCU_FG_COLORBASE(_color) \ |
| 64 | tc0180vcu_device::set_fg_colorbase(*device, _color); |
| 65 | |
| 66 | #define MCFG_TC0180VCU_TX_COLORBASE(_color) \ |
| 67 | tc0180vcu_device::set_tx_colorbase(*device, _color); |
| 68 | |
| 65 | 69 | #define MCFG_TC0180VCU_GFXDECODE(_gfxtag) \ |
| 66 | 70 | tc0180vcu_device::static_set_gfxdecode_tag(*device, "^" _gfxtag); |
| 71 | |
| 67 | 72 | #endif |
trunk/src/mame/drivers/taito_b.c
| r29447 | r29448 | |
| 1906 | 1906 | } |
| 1907 | 1907 | } |
| 1908 | 1908 | |
| 1909 | | /* this is the basic layout used in: Nastar, Ashura Blaster, Hit the Ice, Rambo3, Tetris */ |
| 1910 | | static const tc0180vcu_interface color0_tc0180vcu_intf = |
| 1911 | | { |
| 1912 | | 0xc0, /* background */ |
| 1913 | | 0x80, /* foreground */ |
| 1914 | | 0x00 /* text */ |
| 1915 | | }; |
| 1916 | 1909 | |
| 1917 | | /* this is the reversed layout used in: Crime City, Puzzle Bobble */ |
| 1918 | | static const tc0180vcu_interface color1_tc0180vcu_intf = |
| 1919 | | { |
| 1920 | | 0x00, /* background */ |
| 1921 | | 0x40, /* foreground */ |
| 1922 | | 0xc0 /* text */ |
| 1923 | | }; |
| 1924 | | |
| 1925 | | /* this is used in: rambo3a, masterw, silentd, selfeena, ryujin */ |
| 1926 | | static const tc0180vcu_interface color2_tc0180vcu_intf = |
| 1927 | | { |
| 1928 | | 0x30, /* background */ |
| 1929 | | 0x20, /* foreground */ |
| 1930 | | 0x00 /* text */ |
| 1931 | | }; |
| 1932 | | |
| 1933 | | |
| 1934 | 1910 | void taitob_state::machine_start() |
| 1935 | 1911 | { |
| 1936 | 1912 | m_ym = machine().device("ymsnd"); |
| r29447 | r29448 | |
| 1981 | 1957 | |
| 1982 | 1958 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order0) |
| 1983 | 1959 | |
| 1984 | | MCFG_TC0180VCU_ADD("tc0180vcu", color0_tc0180vcu_intf) |
| 1960 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 1961 | MCFG_TC0180VCU_BG_COLORBASE(0xc0) |
| 1962 | MCFG_TC0180VCU_FG_COLORBASE(0x80) |
| 1963 | MCFG_TC0180VCU_TX_COLORBASE(0x00) |
| 1985 | 1964 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 1986 | 1965 | |
| 1987 | 1966 | /* sound hardware */ |
| r29447 | r29448 | |
| 2034 | 2013 | |
| 2035 | 2014 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order2) |
| 2036 | 2015 | |
| 2037 | | MCFG_TC0180VCU_ADD("tc0180vcu", color2_tc0180vcu_intf) |
| 2016 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2017 | MCFG_TC0180VCU_BG_COLORBASE(0x30) |
| 2018 | MCFG_TC0180VCU_FG_COLORBASE(0x20) |
| 2019 | MCFG_TC0180VCU_TX_COLORBASE(0x00) |
| 2038 | 2020 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2039 | 2021 | |
| 2040 | 2022 | /* sound hardware */ |
| r29447 | r29448 | |
| 2106 | 2088 | |
| 2107 | 2089 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order0) |
| 2108 | 2090 | |
| 2109 | | MCFG_TC0180VCU_ADD("tc0180vcu", color0_tc0180vcu_intf) |
| 2091 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2092 | MCFG_TC0180VCU_BG_COLORBASE(0xc0) |
| 2093 | MCFG_TC0180VCU_FG_COLORBASE(0x80) |
| 2094 | MCFG_TC0180VCU_TX_COLORBASE(0x00) |
| 2110 | 2095 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2111 | 2096 | |
| 2112 | 2097 | /* sound hardware */ |
| r29447 | r29448 | |
| 2159 | 2144 | |
| 2160 | 2145 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order1) |
| 2161 | 2146 | |
| 2162 | | MCFG_TC0180VCU_ADD("tc0180vcu", color1_tc0180vcu_intf) |
| 2147 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2148 | MCFG_TC0180VCU_BG_COLORBASE(0x00) |
| 2149 | MCFG_TC0180VCU_FG_COLORBASE(0x40) |
| 2150 | MCFG_TC0180VCU_TX_COLORBASE(0xc0) |
| 2163 | 2151 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2164 | 2152 | |
| 2165 | 2153 | /* sound hardware */ |
| r29447 | r29448 | |
| 2213 | 2201 | MCFG_VIDEO_START_OVERRIDE(taitob_state,hitice) |
| 2214 | 2202 | MCFG_VIDEO_RESET_OVERRIDE(taitob_state,hitice) |
| 2215 | 2203 | |
| 2216 | | MCFG_TC0180VCU_ADD("tc0180vcu", color0_tc0180vcu_intf) |
| 2204 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2205 | MCFG_TC0180VCU_BG_COLORBASE(0xc0) |
| 2206 | MCFG_TC0180VCU_FG_COLORBASE(0x80) |
| 2207 | MCFG_TC0180VCU_TX_COLORBASE(0x00) |
| 2217 | 2208 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2218 | 2209 | |
| 2219 | 2210 | /* sound hardware */ |
| r29447 | r29448 | |
| 2271 | 2262 | |
| 2272 | 2263 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order0) |
| 2273 | 2264 | |
| 2274 | | MCFG_TC0180VCU_ADD("tc0180vcu", color0_tc0180vcu_intf) |
| 2265 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2266 | MCFG_TC0180VCU_BG_COLORBASE(0xc0) |
| 2267 | MCFG_TC0180VCU_FG_COLORBASE(0x80) |
| 2268 | MCFG_TC0180VCU_TX_COLORBASE(0x00) |
| 2275 | 2269 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2276 | 2270 | |
| 2277 | 2271 | /* sound hardware */ |
| r29447 | r29448 | |
| 2324 | 2318 | |
| 2325 | 2319 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order2) |
| 2326 | 2320 | |
| 2327 | | MCFG_TC0180VCU_ADD("tc0180vcu", color2_tc0180vcu_intf) |
| 2321 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2322 | MCFG_TC0180VCU_BG_COLORBASE(0x30) |
| 2323 | MCFG_TC0180VCU_FG_COLORBASE(0x20) |
| 2324 | MCFG_TC0180VCU_TX_COLORBASE(0x00) |
| 2328 | 2325 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2329 | 2326 | |
| 2330 | 2327 | /* sound hardware */ |
| r29447 | r29448 | |
| 2383 | 2380 | |
| 2384 | 2381 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order1) |
| 2385 | 2382 | |
| 2386 | | MCFG_TC0180VCU_ADD("tc0180vcu", color1_tc0180vcu_intf) |
| 2383 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2384 | MCFG_TC0180VCU_BG_COLORBASE(0x00) |
| 2385 | MCFG_TC0180VCU_FG_COLORBASE(0x40) |
| 2386 | MCFG_TC0180VCU_TX_COLORBASE(0xc0) |
| 2387 | 2387 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2388 | 2388 | |
| 2389 | 2389 | /* sound hardware */ |
| r29447 | r29448 | |
| 2442 | 2442 | |
| 2443 | 2443 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order1) |
| 2444 | 2444 | |
| 2445 | | MCFG_TC0180VCU_ADD("tc0180vcu", color1_tc0180vcu_intf) |
| 2445 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2446 | MCFG_TC0180VCU_BG_COLORBASE(0x00) |
| 2447 | MCFG_TC0180VCU_FG_COLORBASE(0x40) |
| 2448 | MCFG_TC0180VCU_TX_COLORBASE(0xc0) |
| 2446 | 2449 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2447 | 2450 | |
| 2448 | 2451 | /* sound hardware */ |
| r29447 | r29448 | |
| 2495 | 2498 | |
| 2496 | 2499 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order2) |
| 2497 | 2500 | |
| 2498 | | MCFG_TC0180VCU_ADD("tc0180vcu", color2_tc0180vcu_intf) |
| 2501 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2502 | MCFG_TC0180VCU_BG_COLORBASE(0x30) |
| 2503 | MCFG_TC0180VCU_FG_COLORBASE(0x20) |
| 2504 | MCFG_TC0180VCU_TX_COLORBASE(0x00) |
| 2499 | 2505 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2500 | 2506 | |
| 2501 | 2507 | /* sound hardware */ |
| r29447 | r29448 | |
| 2554 | 2560 | |
| 2555 | 2561 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order1) |
| 2556 | 2562 | |
| 2557 | | MCFG_TC0180VCU_ADD("tc0180vcu", color1_tc0180vcu_intf) |
| 2563 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2564 | MCFG_TC0180VCU_BG_COLORBASE(0x00) |
| 2565 | MCFG_TC0180VCU_FG_COLORBASE(0x40) |
| 2566 | MCFG_TC0180VCU_TX_COLORBASE(0xc0) |
| 2558 | 2567 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2559 | 2568 | |
| 2560 | 2569 | /* sound hardware */ |
| r29447 | r29448 | |
| 2607 | 2616 | |
| 2608 | 2617 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order2) |
| 2609 | 2618 | |
| 2610 | | MCFG_TC0180VCU_ADD("tc0180vcu", color2_tc0180vcu_intf) |
| 2619 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2620 | MCFG_TC0180VCU_BG_COLORBASE(0x30) |
| 2621 | MCFG_TC0180VCU_FG_COLORBASE(0x20) |
| 2622 | MCFG_TC0180VCU_TX_COLORBASE(0x00) |
| 2611 | 2623 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2612 | 2624 | |
| 2613 | 2625 | /* sound hardware */ |
| r29447 | r29448 | |
| 2665 | 2677 | |
| 2666 | 2678 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order2) |
| 2667 | 2679 | |
| 2668 | | MCFG_TC0180VCU_ADD("tc0180vcu", color2_tc0180vcu_intf) |
| 2680 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2681 | MCFG_TC0180VCU_BG_COLORBASE(0x30) |
| 2682 | MCFG_TC0180VCU_FG_COLORBASE(0x20) |
| 2683 | MCFG_TC0180VCU_TX_COLORBASE(0x00) |
| 2669 | 2684 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2670 | 2685 | |
| 2671 | 2686 | /* sound hardware */ |
| r29447 | r29448 | |
| 2718 | 2733 | |
| 2719 | 2734 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order2) |
| 2720 | 2735 | |
| 2721 | | MCFG_TC0180VCU_ADD("tc0180vcu", color2_tc0180vcu_intf) |
| 2736 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2737 | MCFG_TC0180VCU_BG_COLORBASE(0x30) |
| 2738 | MCFG_TC0180VCU_FG_COLORBASE(0x20) |
| 2739 | MCFG_TC0180VCU_TX_COLORBASE(0x00) |
| 2722 | 2740 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2723 | 2741 | |
| 2724 | 2742 | /* sound hardware */ |
| r29447 | r29448 | |
| 2780 | 2798 | |
| 2781 | 2799 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order2) |
| 2782 | 2800 | |
| 2783 | | MCFG_TC0180VCU_ADD("tc0180vcu", color2_tc0180vcu_intf) |
| 2801 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2802 | MCFG_TC0180VCU_BG_COLORBASE(0x30) |
| 2803 | MCFG_TC0180VCU_FG_COLORBASE(0x20) |
| 2804 | MCFG_TC0180VCU_TX_COLORBASE(0x00) |
| 2784 | 2805 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2785 | 2806 | |
| 2786 | 2807 | /* sound hardware */ |
| r29447 | r29448 | |
| 2840 | 2861 | |
| 2841 | 2862 | MCFG_VIDEO_START_OVERRIDE(taitob_state,taitob_color_order0) |
| 2842 | 2863 | |
| 2843 | | MCFG_TC0180VCU_ADD("tc0180vcu", color0_tc0180vcu_intf) |
| 2864 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2865 | MCFG_TC0180VCU_BG_COLORBASE(0xc0) |
| 2866 | MCFG_TC0180VCU_FG_COLORBASE(0x80) |
| 2867 | MCFG_TC0180VCU_TX_COLORBASE(0x00) |
| 2844 | 2868 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2845 | 2869 | |
| 2846 | 2870 | /* sound hardware */ |
| r29447 | r29448 | |
| 2899 | 2923 | |
| 2900 | 2924 | MCFG_HD63484_ADD("hd63484", realpunc_hd63484_intf) |
| 2901 | 2925 | |
| 2902 | | MCFG_TC0180VCU_ADD("tc0180vcu", color0_tc0180vcu_intf) |
| 2926 | MCFG_DEVICE_ADD("tc0180vcu", TC0180VCU, 0) |
| 2927 | MCFG_TC0180VCU_BG_COLORBASE(0xc0) |
| 2928 | MCFG_TC0180VCU_FG_COLORBASE(0x80) |
| 2929 | MCFG_TC0180VCU_TX_COLORBASE(0x00) |
| 2903 | 2930 | MCFG_TC0180VCU_GFXDECODE("gfxdecode") |
| 2904 | 2931 | |
| 2905 | 2932 | /* sound hardware */ |