diff options
author | cam900 <dbtlrchl@naver.com> | 2018-07-09 00:35:08 +0900 |
---|---|---|
committer | Vas Crabb <cuavas@users.noreply.github.com> | 2018-07-09 01:35:08 +1000 |
commit | e6f78ae943c95dcff114b538bf318a688338c265 (patch) | |
tree | e0c1972e6026d9c35c1cd69fcd97a503dd314b93 /src/mame/includes/namcos2.h | |
parent | da1d649df82e5a6b507e0f56f2b0c264ab695f50 (diff) |
namcoic.cpp : Simpler bit-swapped values (#3609)
* namcoic.cpp : Simpler bit-swapped values
* namcoic.cpp : Fix Lucky & Wild
* namcoic.cpp : Fix bitswap
* namcoic.cpp : Convert ROZ tilemap code mangles into callback, Split config for each game when tilemap mangle is different, Reduce duplicates, Move metalhawk swap xy function into gfxdecode, Fix metalhawk zoom
namcos2.cpp : Add notes, demote with MACHINE_IMPERFECT_GRAPHICS because tilemap and ROZ issue, Reduce duplicate
fix gfxdecode name for namconb2, namcofl
* namcoic.cpp : Add notes, Fix finalapr* Title screen, Fix mask, Add c169 wraparound disable bit, Fix mask
namconb1.cpp : Fix builds
Diffstat (limited to 'src/mame/includes/namcos2.h')
-rw-r--r-- | src/mame/includes/namcos2.h | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/mame/includes/namcos2.h b/src/mame/includes/namcos2.h index 3695b3e4333..a8a685a9850 100644 --- a/src/mame/includes/namcos2.h +++ b/src/mame/includes/namcos2.h @@ -160,12 +160,7 @@ protected: DECLARE_READ16_MEMBER( c123_tilemap_videoram_r ); DECLARE_WRITE16_MEMBER( c123_tilemap_control_w ); DECLARE_READ16_MEMBER( c123_tilemap_control_r ); - TILE_GET_INFO_MEMBER( get_tile_info0 ); - TILE_GET_INFO_MEMBER( get_tile_info1 ); - TILE_GET_INFO_MEMBER( get_tile_info2 ); - TILE_GET_INFO_MEMBER( get_tile_info3 ); - TILE_GET_INFO_MEMBER( get_tile_info4 ); - TILE_GET_INFO_MEMBER( get_tile_info5 ); + template<int Offset> TILE_GET_INFO_MEMBER( get_tile_info ); typedef delegate<void (uint16_t, int*, int*)> c123_tilemap_delegate; void c123_tilemap_init(int gfxbank, void *pMaskROM, c123_tilemap_delegate tilemap_cb); void c123_tilemap_invalidate(void); @@ -198,7 +193,8 @@ protected: c123_mTilemapInfo m_c123_TilemapInfo; // C169 ROZ Layer Emulation - void c169_roz_init(int gfxbank, const char *maskregion); + typedef delegate<void (uint16_t, int*, int*, int)> c169_tilemap_delegate; + void c169_roz_init(int gfxbank, const char *maskregion, c169_tilemap_delegate tilemap_cb); void c169_roz_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri); DECLARE_READ16_MEMBER( c169_roz_control_r ); DECLARE_WRITE16_MEMBER( c169_roz_control_w ); @@ -207,19 +203,20 @@ protected: DECLARE_READ16_MEMBER( c169_roz_videoram_r ); DECLARE_WRITE16_MEMBER( c169_roz_videoram_w ); + c169_tilemap_delegate m_c169_cb; struct roz_parameters { uint32_t left, top, size; uint32_t startx, starty; int incxx, incxy, incyx, incyy; int color, priority; + int wrap; }; void c169_roz_unpack_params(const uint16_t *source, roz_parameters ¶ms); void c169_roz_draw_helper(screen_device &screen, bitmap_ind16 &bitmap, tilemap_t &tmap, const rectangle &clip, const roz_parameters ¶ms); void c169_roz_draw_scanline(screen_device &screen, bitmap_ind16 &bitmap, int line, int which, int pri, const rectangle &cliprect); void c169_roz_get_info(tile_data &tileinfo, int tile_index, int which); - TILE_GET_INFO_MEMBER( c169_roz_get_info0 ); - TILE_GET_INFO_MEMBER( c169_roz_get_info1 ); + template<int Which> TILE_GET_INFO_MEMBER( c169_roz_get_info ); TILEMAP_MAPPER_MEMBER( c169_roz_mapper ); static const int ROZ_TILEMAP_COUNT = 2; @@ -286,14 +283,14 @@ protected: class namcos2_state : public namcos2_shared_state { public: - namcos2_state(const machine_config &mconfig, device_type type, const char *tag) - : namcos2_shared_state(mconfig, type, tag), - m_dpram(*this, "dpram"), - m_paletteram(*this, "paletteram"), - m_spriteram(*this, "spriteram"), - m_rozram(*this, "rozram"), - m_roz_ctrl(*this, "rozctrl"), - m_c45_road(*this, "c45_road") + namcos2_state(const machine_config &mconfig, device_type type, const char *tag) : + namcos2_shared_state(mconfig, type, tag), + m_dpram(*this, "dpram"), + m_paletteram(*this, "paletteram"), + m_spriteram(*this, "spriteram"), + m_rozram(*this, "rozram"), + m_roz_ctrl(*this, "rozctrl"), + m_c45_road(*this, "c45_road") { } void configure_c148_standard(machine_config &config); @@ -303,6 +300,7 @@ public: void sgunner2(machine_config &config); void base2(machine_config &config); void finallap(machine_config &config); + void finalap2(machine_config &config); void luckywld(machine_config &config); void base3(machine_config &config); void sgunner(machine_config &config); @@ -354,6 +352,7 @@ private: virtual void video_start() override; void video_start_finallap(); + void video_start_finalap2(); void video_start_luckywld(); void video_start_metlhawk(); void video_start_sgunner(); @@ -405,6 +404,9 @@ private: void GollyGhostUpdateLED_ca( int data ); void GollyGhostUpdateDiorama_c0( int data ); void TilemapCB(uint16_t code, int *tile, int *mask); + void TilemapCB_finalap2(uint16_t code, int *tile, int *mask); + void RozCB_luckywld(uint16_t code, int *tile, int *mask, int which); + void RozCB_metlhawk(uint16_t code, int *tile, int *mask, int which); void c68_default_am(address_map &map); void common_default_am(address_map &map); |