summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatarGravatar cam900 <dbtlrchl@naver.com>2019-08-13 18:43:43 +0900
committerGravatarGravatar cam900 <dbtlrchl@naver.com>2019-08-13 18:43:43 +0900
commit90550a26e5fc872007dc9117d4ccbed557ecdd65 (patch) (github)
treec85e5ee4650f3317434a7ff8056685c112b4ff50 /src
parentf7ef94dfe5f2cc905a40893cf18060383ecca619 (diff)
downloadmame-90550a26e5fc872007dc9117d4ccbed557ecdd65.tar.bz2
mame-90550a26e5fc872007dc9117d4ccbed557ecdd65.zip
nmk16.cpp : Reduce duplicates, Add notes for screen raw params
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/nmk16.cpp4
-rw-r--r--src/mame/includes/nmk16.h2
-rw-r--r--src/mame/video/nmk16.cpp63
3 files changed, 12 insertions, 57 deletions
diff --git a/src/mame/drivers/nmk16.cpp b/src/mame/drivers/nmk16.cpp
index acc034c671b..ad6e3f46374 100644
--- a/src/mame/drivers/nmk16.cpp
+++ b/src/mame/drivers/nmk16.cpp
@@ -4110,6 +4110,7 @@ void nmk16_state::set_hacky_interrupt_timing(machine_config &config)
void nmk16_state::set_hacky_screen_lowres(machine_config &config)
{
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ //m_screen->set_raw(XTAL(12'000'000)/2, 384, 0, 256, 278, 16, 240); // confirmed
m_screen->set_refresh_hz(56.18);
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(3450));
m_screen->set_size(256, 256);
@@ -4120,6 +4121,7 @@ void nmk16_state::set_hacky_screen_lowres(machine_config &config)
void nmk16_state::set_hacky_screen_hires(machine_config &config)
{
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ //m_screen->set_raw(XTAL(16'000'000)/2, 512, 0, 384, 278, 16, 240); // confirmed
m_screen->set_refresh_hz(56.18);
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(3450));
m_screen->set_size(512, 256);
@@ -5417,7 +5419,7 @@ void afega_state::stagger1(machine_config &config)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_macross);
PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 768);
- MCFG_VIDEO_START_OVERRIDE(afega_state,afega)
+ MCFG_VIDEO_START_OVERRIDE(afega_state,macross)
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/includes/nmk16.h b/src/mame/includes/nmk16.h
index bd29bef9fbe..def0caf7585 100644
--- a/src/mame/includes/nmk16.h
+++ b/src/mame/includes/nmk16.h
@@ -264,9 +264,7 @@ private:
void spec2k_oki1_banking_w(u8 data);
template<unsigned Scroll> void afega_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
- TILE_GET_INFO_MEMBER(get_bg_tile_info_4bit);
TILE_GET_INFO_MEMBER(get_bg_tile_info_8bit);
- DECLARE_VIDEO_START(afega);
DECLARE_VIDEO_START(grdnstrm);
u32 screen_update_afega(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
u32 screen_update_firehawk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
diff --git a/src/mame/video/nmk16.cpp b/src/mame/video/nmk16.cpp
index e2c60ca0ea2..7ed266eebe7 100644
--- a/src/mame/video/nmk16.cpp
+++ b/src/mame/video/nmk16.cpp
@@ -99,7 +99,7 @@ VIDEO_START_MEMBER(nmk16_state, bioship)
// ROM Based Tilemap
m_bg_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(nmk16_state::bioship_get_bg_tile_info), this), tilemap_mapper_delegate(FUNC(nmk16_state::tilemap_scan_pages), this), 16, 16, 256, 32);
m_bg_tilemap[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(&nmk16_state::common_get_bg_tile_info<1, 1>, "bg1_gfx1", this), tilemap_mapper_delegate(FUNC(nmk16_state::tilemap_scan_pages), this), 16, 16, 256, 32);
- m_tx_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(nmk16_state::common_get_tx_tile_info), this),TILEMAP_SCAN_COLS, 8, 8, 32, 32);
+ m_tx_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(nmk16_state::common_get_tx_tile_info), this), TILEMAP_SCAN_COLS, 8, 8, 32, 32);
m_bg_tilemap[1]->set_transparent_pen(15);
m_tx_tilemap->set_transparent_pen(15);
@@ -113,7 +113,7 @@ VIDEO_START_MEMBER(nmk16_state,macross)
{
m_sprlimit = 384 * 263;
m_bg_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(&nmk16_state::common_get_bg_tile_info<0, 1>, "bg0_gfx1", this), tilemap_mapper_delegate(FUNC(nmk16_state::tilemap_scan_pages), this), 16, 16, 256, 32);
- m_tx_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(nmk16_state::common_get_tx_tile_info), this),TILEMAP_SCAN_COLS, 8, 8, 32, 32);
+ m_tx_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(nmk16_state::common_get_tx_tile_info), this), TILEMAP_SCAN_COLS, 8, 8, 32, 32);
m_tx_tilemap->set_transparent_pen(15);
@@ -133,7 +133,7 @@ VIDEO_START_MEMBER(nmk16_state,macross2)
{
m_sprlimit = 512 * 263; // not verified
m_bg_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(&nmk16_state::common_get_bg_tile_info<0, 1>, "bg0_gfx1", this), tilemap_mapper_delegate(FUNC(nmk16_state::tilemap_scan_pages), this), 16, 16, 256, 32);
- m_tx_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(nmk16_state::common_get_tx_tile_info), this),TILEMAP_SCAN_COLS, 8, 8, 64, 32);
+ m_tx_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(nmk16_state::common_get_tx_tile_info), this), TILEMAP_SCAN_COLS, 8, 8, 64, 32);
m_tx_tilemap->set_transparent_pen(15);
@@ -151,7 +151,7 @@ VIDEO_START_MEMBER(nmk16_state,gunnail)
VIDEO_START_MEMBER(nmk16_state, bjtwin)
{
m_sprlimit = 512 * 263; // not verified
- m_bg_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(nmk16_state::bjtwin_get_bg_tile_info), this),TILEMAP_SCAN_COLS, 8, 8, 64, 32);
+ m_bg_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(nmk16_state::bjtwin_get_bg_tile_info), this), TILEMAP_SCAN_COLS, 8, 8, 64, 32);
video_init();
m_videoshift = 64; /* 384x224 screen, leftmost 64 pixels have to be retrieved */
@@ -500,67 +500,22 @@ u32 nmk16_state::screen_update_bjtwin(screen_device &screen, bitmap_ind16 &bitma
***************************************************************************/
-TILE_GET_INFO_MEMBER(afega_state::get_bg_tile_info_4bit)
-{
- const u16 code = m_bgvideoram[0][tile_index];
- SET_TILE_INFO_MEMBER(1, code & 0xfff, code >> 12, 0);
-}
-
TILE_GET_INFO_MEMBER(afega_state::get_bg_tile_info_8bit)
{
const u16 code = m_bgvideoram[0][tile_index];
SET_TILE_INFO_MEMBER(1, code, 0, 0);
}
-VIDEO_START_MEMBER(afega_state,afega)
-{
- m_sprlimit = 384 * 263;
- m_sprclk = 0;
- m_spriteram_old = make_unique_clear<u16[]>(0x1000/2);
- m_spriteram_old2 = make_unique_clear<u16[]>(0x1000/2);
-
- m_bg_tilemap[0] = &machine().tilemap().create(
- *m_gfxdecode,
- tilemap_get_info_delegate(FUNC(afega_state::get_bg_tile_info_4bit), this),
- tilemap_mapper_delegate(FUNC(afega_state::tilemap_scan_pages), this),
- 16, 16, 256, 32);
-
- m_tx_tilemap = &machine().tilemap().create(
- *m_gfxdecode,
- tilemap_get_info_delegate(FUNC(afega_state::common_get_tx_tile_info), this),
- TILEMAP_SCAN_COLS,
- 8, 8, 32, 32);
-
- m_tx_tilemap->set_transparent_pen(0xf);
- save_pointer(NAME(m_spriteram_old), 0x1000/2);
- save_pointer(NAME(m_spriteram_old2), 0x1000/2);
- save_item(NAME(m_sprclk));
-}
-
-
VIDEO_START_MEMBER(afega_state,grdnstrm)
{
m_sprlimit = 384 * 263;
- m_sprclk = 0;
- m_spriteram_old = make_unique_clear<u16[]>(0x1000/2);
- m_spriteram_old2 = make_unique_clear<u16[]>(0x1000/2);
+ // 8bpp Tilemap
+ m_bg_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(afega_state::get_bg_tile_info_8bit), this), tilemap_mapper_delegate(FUNC(afega_state::tilemap_scan_pages), this), 16, 16, 256, 32);
+ m_tx_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(afega_state::common_get_tx_tile_info), this), TILEMAP_SCAN_COLS, 8, 8, 32, 32);
- m_bg_tilemap[0] = &machine().tilemap().create(
- *m_gfxdecode,
- tilemap_get_info_delegate(FUNC(afega_state::get_bg_tile_info_8bit), this),
- tilemap_mapper_delegate(FUNC(afega_state::tilemap_scan_pages), this),
- 16, 16, 256, 32);
-
- m_tx_tilemap = &machine().tilemap().create(
- *m_gfxdecode,
- tilemap_get_info_delegate(FUNC(afega_state::common_get_tx_tile_info), this),
- TILEMAP_SCAN_COLS,
- 8, 8, 32, 32);
+ m_tx_tilemap->set_transparent_pen(15);
- m_tx_tilemap->set_transparent_pen(0xf);
- save_pointer(NAME(m_spriteram_old), 0x1000/2);
- save_pointer(NAME(m_spriteram_old2), 0x1000/2);
- save_item(NAME(m_sprclk));
+ video_init();
}