trunk/src/mame/drivers/dcon.c
| r243346 | r243347 | |
| 26 | 26 | AM_RANGE(0x00000, 0x7ffff) AM_ROM |
| 27 | 27 | AM_RANGE(0x80000, 0x8bfff) AM_RAM |
| 28 | 28 | |
| 29 | | AM_RANGE(0x8c000, 0x8c7ff) AM_RAM_WRITE(dcon_background_w) AM_SHARE("back_data") |
| 30 | | AM_RANGE(0x8c800, 0x8cfff) AM_RAM_WRITE(dcon_foreground_w) AM_SHARE("fore_data") |
| 31 | | AM_RANGE(0x8d000, 0x8d7ff) AM_RAM_WRITE(dcon_midground_w) AM_SHARE("mid_data") |
| 32 | | AM_RANGE(0x8d800, 0x8e7ff) AM_RAM_WRITE(dcon_text_w) AM_SHARE("textram") |
| 29 | AM_RANGE(0x8c000, 0x8c7ff) AM_RAM_WRITE(background_w) AM_SHARE("back_data") |
| 30 | AM_RANGE(0x8c800, 0x8cfff) AM_RAM_WRITE(foreground_w) AM_SHARE("fore_data") |
| 31 | AM_RANGE(0x8d000, 0x8d7ff) AM_RAM_WRITE(midground_w) AM_SHARE("mid_data") |
| 32 | AM_RANGE(0x8d800, 0x8e7ff) AM_RAM_WRITE(text_w) AM_SHARE("textram") |
| 33 | 33 | AM_RANGE(0x8e800, 0x8f7ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") |
| 34 | 34 | AM_RANGE(0x8f800, 0x8ffff) AM_RAM AM_SHARE("spriteram") |
| 35 | | AM_RANGE(0x9d000, 0x9d7ff) AM_WRITE(dcon_gfxbank_w) |
| 35 | AM_RANGE(0x9d000, 0x9d7ff) AM_WRITE(gfxbank_w) |
| 36 | 36 | |
| 37 | 37 | AM_RANGE(0xa0000, 0xa000d) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w) |
| 38 | 38 | AM_RANGE(0xc0000, 0xc004f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write) |
| r243346 | r243347 | |
| 403 | 403 | } |
| 404 | 404 | |
| 405 | 405 | |
| 406 | | GAME( 1991, sdgndmps, 0, sdgndmps, sdgndmps, dcon_state, sdgndmps, ROT0, "Banpresto / Bandai", "SD Gundam Psycho Salamander no Kyoui", GAME_NO_COCKTAIL ) |
| 407 | | GAME( 1992, dcon, 0, dcon, dcon, driver_device, 0, ROT0, "Success", "D-Con", GAME_NO_COCKTAIL ) |
| 406 | GAME( 1991, sdgndmps, 0, sdgndmps, sdgndmps, dcon_state, sdgndmps, ROT0, "Banpresto / Bandai", "SD Gundam Psycho Salamander no Kyoui", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) |
| 407 | GAME( 1992, dcon, 0, dcon, dcon, driver_device, 0, ROT0, "Success", "D-Con", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) |
trunk/src/mame/includes/dcon.h
| r243346 | r243347 | |
| 3 | 3 | public: |
| 4 | 4 | dcon_state(const machine_config &mconfig, device_type type, const char *tag) |
| 5 | 5 | : driver_device(mconfig, type, tag), |
| 6 | m_maincpu(*this, "maincpu"), |
| 7 | m_gfxdecode(*this, "gfxdecode"), |
| 8 | m_palette(*this, "palette"), |
| 6 | 9 | m_back_data(*this, "back_data"), |
| 7 | 10 | m_fore_data(*this, "fore_data"), |
| 8 | 11 | m_mid_data(*this, "mid_data"), |
| 9 | 12 | m_textram(*this, "textram"), |
| 10 | | m_spriteram(*this, "spriteram"), |
| 11 | | m_maincpu(*this, "maincpu"), |
| 12 | | m_gfxdecode(*this, "gfxdecode"), |
| 13 | | m_palette(*this, "palette") { } |
| 13 | m_spriteram(*this, "spriteram") { } |
| 14 | 14 | |
| 15 | required_device<cpu_device> m_maincpu; |
| 16 | required_device<gfxdecode_device> m_gfxdecode; |
| 17 | required_device<palette_device> m_palette; |
| 18 | |
| 15 | 19 | required_shared_ptr<UINT16> m_back_data; |
| 16 | 20 | required_shared_ptr<UINT16> m_fore_data; |
| 17 | 21 | required_shared_ptr<UINT16> m_mid_data; |
| 18 | 22 | required_shared_ptr<UINT16> m_textram; |
| 19 | 23 | required_shared_ptr<UINT16> m_spriteram; |
| 24 | |
| 20 | 25 | tilemap_t *m_background_layer; |
| 21 | 26 | tilemap_t *m_foreground_layer; |
| 22 | 27 | tilemap_t *m_midground_layer; |
| 23 | 28 | tilemap_t *m_text_layer; |
| 24 | | UINT16 m_enable; |
| 29 | |
| 25 | 30 | int m_gfx_bank_select; |
| 26 | 31 | int m_last_gfx_bank; |
| 27 | 32 | UINT16 m_scroll_ram[6]; |
| 33 | UINT16 m_layer_en; |
| 34 | |
| 28 | 35 | DECLARE_WRITE16_MEMBER(layer_en_w); |
| 29 | 36 | DECLARE_WRITE16_MEMBER(layer_scroll_w); |
| 30 | | UINT16 m_layer_en; |
| 37 | DECLARE_WRITE16_MEMBER(gfxbank_w); |
| 38 | DECLARE_WRITE16_MEMBER(background_w); |
| 39 | DECLARE_WRITE16_MEMBER(foreground_w); |
| 40 | DECLARE_WRITE16_MEMBER(midground_w); |
| 41 | DECLARE_WRITE16_MEMBER(text_w); |
| 31 | 42 | |
| 32 | | DECLARE_WRITE16_MEMBER(dcon_gfxbank_w); |
| 33 | | DECLARE_WRITE16_MEMBER(dcon_background_w); |
| 34 | | DECLARE_WRITE16_MEMBER(dcon_foreground_w); |
| 35 | | DECLARE_WRITE16_MEMBER(dcon_midground_w); |
| 36 | | DECLARE_WRITE16_MEMBER(dcon_text_w); |
| 37 | | DECLARE_DRIVER_INIT(sdgndmps); |
| 38 | 43 | TILE_GET_INFO_MEMBER(get_back_tile_info); |
| 39 | 44 | TILE_GET_INFO_MEMBER(get_fore_tile_info); |
| 40 | 45 | TILE_GET_INFO_MEMBER(get_mid_tile_info); |
| 41 | 46 | TILE_GET_INFO_MEMBER(get_text_tile_info); |
| 47 | |
| 48 | DECLARE_DRIVER_INIT(sdgndmps); |
| 42 | 49 | virtual void video_start(); |
| 50 | |
| 43 | 51 | UINT32 screen_update_dcon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 44 | 52 | UINT32 screen_update_sdgndmps(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 45 | 53 | void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect); |
| 46 | | required_device<cpu_device> m_maincpu; |
| 47 | | required_device<gfxdecode_device> m_gfxdecode; |
| 48 | | required_device<palette_device> m_palette; |
| 49 | 54 | }; |
trunk/src/mame/video/dcon.c
| r243346 | r243347 | |
| 10 | 10 | |
| 11 | 11 | /******************************************************************************/ |
| 12 | 12 | |
| 13 | | WRITE16_MEMBER(dcon_state::dcon_gfxbank_w) |
| 13 | WRITE16_MEMBER(dcon_state::gfxbank_w) |
| 14 | 14 | { |
| 15 | 15 | if (data&1) |
| 16 | 16 | m_gfx_bank_select=0x1000; |
| r243346 | r243347 | |
| 18 | 18 | m_gfx_bank_select=0; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | | WRITE16_MEMBER(dcon_state::dcon_background_w) |
| 21 | WRITE16_MEMBER(dcon_state::background_w) |
| 22 | 22 | { |
| 23 | 23 | COMBINE_DATA(&m_back_data[offset]); |
| 24 | 24 | m_background_layer->mark_tile_dirty(offset); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | | WRITE16_MEMBER(dcon_state::dcon_foreground_w) |
| 27 | WRITE16_MEMBER(dcon_state::foreground_w) |
| 28 | 28 | { |
| 29 | 29 | COMBINE_DATA(&m_fore_data[offset]); |
| 30 | 30 | m_foreground_layer->mark_tile_dirty(offset); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | | WRITE16_MEMBER(dcon_state::dcon_midground_w) |
| 33 | WRITE16_MEMBER(dcon_state::midground_w) |
| 34 | 34 | { |
| 35 | 35 | COMBINE_DATA(&m_mid_data[offset]); |
| 36 | 36 | m_midground_layer->mark_tile_dirty(offset); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | | WRITE16_MEMBER(dcon_state::dcon_text_w) |
| 39 | WRITE16_MEMBER(dcon_state::text_w) |
| 40 | 40 | { |
| 41 | 41 | COMBINE_DATA(&m_textram[offset]); |
| 42 | 42 | m_text_layer->mark_tile_dirty(offset); |
| r243346 | r243347 | |
| 106 | 106 | m_text_layer->set_transparent_pen(15); |
| 107 | 107 | |
| 108 | 108 | m_gfx_bank_select = 0; |
| 109 | |
| 110 | save_item(NAME(m_gfx_bank_select)); |
| 111 | save_item(NAME(m_last_gfx_bank)); |
| 112 | save_item(NAME(m_scroll_ram)); |
| 113 | save_item(NAME(m_layer_en)); |
| 109 | 114 | } |
| 110 | 115 | |
| 111 | 116 | void dcon_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect) |