trunk/src/mame/includes/paradise.h
| r243021 | r243022 | |
| 5 | 5 | public: |
| 6 | 6 | paradise_state(const machine_config &mconfig, device_type type, const char *tag) |
| 7 | 7 | : driver_device(mconfig, type, tag), |
| 8 | m_maincpu(*this, "maincpu"), |
| 9 | m_oki2(*this, "oki2"), |
| 10 | m_gfxdecode(*this, "gfxdecode"), |
| 11 | m_screen(*this, "screen"), |
| 12 | m_palette(*this, "palette"), |
| 8 | 13 | m_vram_0(*this, "vram_0"), |
| 9 | 14 | m_vram_1(*this, "vram_1"), |
| 10 | 15 | m_vram_2(*this, "vram_2"), |
| 11 | 16 | m_videoram(*this, "videoram"), |
| 12 | 17 | m_paletteram(*this, "paletteram"), |
| 13 | | m_spriteram(*this, "spriteram"), |
| 14 | | m_maincpu(*this, "maincpu"), |
| 15 | | m_oki2(*this, "oki2"), |
| 16 | | m_gfxdecode(*this, "gfxdecode"), |
| 17 | | m_screen(*this, "screen"), |
| 18 | | m_palette(*this, "palette") { } |
| 18 | m_spriteram(*this, "spriteram") { } |
| 19 | |
| 20 | /* devices */ |
| 21 | required_device<cpu_device> m_maincpu; |
| 22 | optional_device<okim6295_device> m_oki2; |
| 23 | required_device<gfxdecode_device> m_gfxdecode; |
| 24 | required_device<screen_device> m_screen; |
| 25 | required_device<palette_device> m_palette; |
| 19 | 26 | |
| 20 | 27 | /* memory pointers */ |
| 21 | 28 | required_shared_ptr<UINT8> m_vram_0; |
| r243021 | r243022 | |
| 29 | 36 | tilemap_t *m_tilemap_0; |
| 30 | 37 | tilemap_t *m_tilemap_1; |
| 31 | 38 | tilemap_t *m_tilemap_2; |
| 39 | |
| 32 | 40 | bitmap_ind16 m_tmpbitmap; |
| 33 | 41 | UINT8 m_palbank; |
| 34 | 42 | UINT8 m_priority; |
| 35 | 43 | UINT8 m_pixbank; |
| 36 | 44 | int m_sprite_inc; |
| 37 | | |
| 38 | | int irq_count; |
| 45 | int m_irq_count; |
| 46 | |
| 39 | 47 | DECLARE_WRITE8_MEMBER(paradise_rombank_w); |
| 40 | 48 | DECLARE_WRITE8_MEMBER(torus_coin_counter_w); |
| 41 | 49 | DECLARE_WRITE8_MEMBER(paradise_flipscreen_w); |
| r243021 | r243022 | |
| 48 | 56 | DECLARE_WRITE8_MEMBER(paradise_pixmap_w); |
| 49 | 57 | DECLARE_WRITE8_MEMBER(paradise_priority_w); |
| 50 | 58 | DECLARE_WRITE8_MEMBER(paradise_okibank_w); |
| 59 | |
| 51 | 60 | DECLARE_DRIVER_INIT(torus); |
| 52 | 61 | DECLARE_DRIVER_INIT(paradise); |
| 53 | 62 | DECLARE_DRIVER_INIT(tgtball); |
| 63 | |
| 54 | 64 | TILE_GET_INFO_MEMBER(get_tile_info_0); |
| 55 | 65 | TILE_GET_INFO_MEMBER(get_tile_info_1); |
| 56 | 66 | TILE_GET_INFO_MEMBER(get_tile_info_2); |
| 67 | |
| 57 | 68 | virtual void machine_start(); |
| 58 | 69 | virtual void machine_reset(); |
| 59 | 70 | virtual void video_start(); |
| 71 | |
| 60 | 72 | UINT32 screen_update_paradise(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 61 | 73 | UINT32 screen_update_torus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 62 | 74 | UINT32 screen_update_madball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 75 | |
| 63 | 76 | INTERRUPT_GEN_MEMBER(paradise_irq); |
| 77 | |
| 64 | 78 | void update_pix_palbank(); |
| 65 | | void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| 66 | | required_device<cpu_device> m_maincpu; |
| 67 | | optional_device<okim6295_device> m_oki2; |
| 68 | | required_device<gfxdecode_device> m_gfxdecode; |
| 69 | | required_device<screen_device> m_screen; |
| 70 | | required_device<palette_device> m_palette; |
| 79 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 71 | 80 | }; |
trunk/src/mame/video/paradise.c
| r243021 | r243022 | |
| 164 | 164 | m_tilemap_2->set_transparent_pen(0xff); |
| 165 | 165 | |
| 166 | 166 | save_item(NAME(m_tmpbitmap)); |
| 167 | save_item(NAME(m_pixbank)); |
| 167 | 168 | } |
| 168 | 169 | |
| 169 | 170 | |
| r243021 | r243022 | |
| 179 | 180 | m_priority = data; |
| 180 | 181 | } |
| 181 | 182 | |
| 182 | | void paradise_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ) |
| 183 | void paradise_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 183 | 184 | { |
| 184 | | UINT8 *spriteram = m_spriteram; |
| 185 | | int i; |
| 186 | | for (i = 0; i < m_spriteram.bytes() ; i += m_sprite_inc) |
| 185 | for (int i = 0; i < m_spriteram.bytes() ; i += m_sprite_inc) |
| 187 | 186 | { |
| 188 | | int code = spriteram[i + 0]; |
| 189 | | int x = spriteram[i + 1]; |
| 190 | | int y = spriteram[i + 2] - 2; |
| 191 | | int attr = spriteram[i + 3]; |
| 187 | int code = m_spriteram[i + 0]; |
| 188 | int x = m_spriteram[i + 1]; |
| 189 | int y = m_spriteram[i + 2] - 2; |
| 190 | int attr = m_spriteram[i + 3]; |
| 192 | 191 | |
| 193 | 192 | int flipx = 0; // ? |
| 194 | 193 | int flipy = 0; |