From e608c753b3afcee354d971feb328afd61058934d Mon Sep 17 00:00:00 2001 From: David Haywood Date: Mon, 30 Nov 2015 01:48:46 +0000 Subject: [PATCH] use a layout so that the multiplexed output of rungun is still available before it hits the splitter, means you can use your own video splitter if you want (nw) --- src/mame/drivers/rungun.cpp | 14 +++++++++---- src/mame/layout/rungun_dual.lay | 35 +++++++++++++++++++++++++++++++++ src/mame/video/rungun.cpp | 26 +++++++++++------------- 3 files changed, 57 insertions(+), 18 deletions(-) create mode 100644 src/mame/layout/rungun_dual.lay diff --git a/src/mame/drivers/rungun.cpp b/src/mame/drivers/rungun.cpp index 8fe3b2c3638..cc1a01b172c 100644 --- a/src/mame/drivers/rungun.cpp +++ b/src/mame/drivers/rungun.cpp @@ -49,6 +49,7 @@ #include "sound/k054539.h" #include "includes/konamipt.h" #include "includes/rungun.h" +#include "rungun_dual.lh" @@ -438,11 +439,16 @@ MACHINE_CONFIG_END // this means when operated as a single dedicated cabinet the game runs at 60fps, and has smoother animations than when operated as a twin setup where each // screen only gets an update every other frame. static MACHINE_CONFIG_DERIVED( rng_dual, rng ) - - MCFG_SCREEN_MODIFY("screen") + MCFG_SCREEN_ADD("demultiplex1", RASTER) + MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) + MCFG_SCREEN_REFRESH_RATE(60) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) + MCFG_SCREEN_SIZE(64*8, 32*8) + MCFG_SCREEN_VISIBLE_AREA(88, 88+384-1, 24, 24+224-1) MCFG_SCREEN_UPDATE_DRIVER(rungun_state, screen_update_rng_dual_left) + MCFG_SCREEN_PALETTE("palette") - MCFG_SCREEN_ADD("screen2", RASTER) + MCFG_SCREEN_ADD("demultiplex2", RASTER) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) @@ -717,4 +723,4 @@ GAME( 1993, rungunua, rungun, rng, rng, driver_device, 0, ROT0, "Konami", "Run a GAME( 1993, slmdunkj, rungun, rng, rng, driver_device, 0, ROT0, "Konami", "Slam Dunk (ver JAA 1993 10.8)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // this set has no dipswitches to select single screen mode (they're not even displayed in test menu) it's twin cabinet ONLY -GAME( 1993, rungunu, rungun, rng_dual, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver UAB 1993 10.12, dedicated twin cabinet)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +GAMEL( 1993, rungunu, rungun, rng_dual, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver UAB 1993 10.12, dedicated twin cabinet)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING, layout_rungun_dual ) diff --git a/src/mame/layout/rungun_dual.lay b/src/mame/layout/rungun_dual.lay new file mode 100644 index 00000000000..8b8a9a1b41d --- /dev/null +++ b/src/mame/layout/rungun_dual.lay @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/video/rungun.cpp b/src/mame/video/rungun.cpp index 77c5782f811..efab92da0f1 100644 --- a/src/mame/video/rungun.cpp +++ b/src/mame/video/rungun.cpp @@ -119,6 +119,17 @@ UINT32 rungun_state::screen_update_rng(screen_device &screen, bitmap_ind16 &bitm m_ttl_tilemap->mark_all_dirty(); m_ttl_tilemap->draw(screen, bitmap, cliprect, 0, 0); + + // copy frame output to temp buffers so we can demultiplex it for the dual screen output + // (really only need to do this for dual setup) + if (machine().first_screen()->frame_number() & 1) + { + copybitmap(m_rng_dual_demultiplex_right_temp, bitmap, 0, 0, 0, 0, cliprect); + } + else + { + copybitmap(m_rng_dual_demultiplex_left_temp, bitmap, 0, 0, 0, 0, cliprect); + } return 0; } @@ -126,21 +137,8 @@ UINT32 rungun_state::screen_update_rng(screen_device &screen, bitmap_ind16 &bitm // the 60hz signal gets split between 2 screens UINT32 rungun_state::screen_update_rng_dual_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT32 ret = 0; - - if (machine().first_screen()->frame_number() & 1) - { - ret = screen_update_rng(screen, m_rng_dual_demultiplex_left_temp, cliprect); - } - else - { - // render every other frame to a temp bitmap - ret = screen_update_rng(screen, m_rng_dual_demultiplex_right_temp, cliprect); - } - copybitmap( bitmap, m_rng_dual_demultiplex_left_temp, 0, 0, 0, 0, cliprect); - - return ret; + return 0; } UINT32 rungun_state::screen_update_rng_dual_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)