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)

This commit is contained in:
David Haywood 2015-11-30 01:48:46 +00:00
parent 4ccef48447
commit e608c753b3
3 changed files with 57 additions and 18 deletions

View File

@ -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 )

View File

@ -0,0 +1,35 @@
<?xml version="1.0"?>
<mamelayout version="2">
<view name="Demultiplexed Output">
<!-- index 0 is before it's fed to the demultiplexer, don't display (has to still be present for the screen update logic to call tho) -->
<screen index="0">
<bounds x="0" y="0" width="0.00001" height="0.00001" />
</screen>
<screen index="1">
<bounds x="0" y="0" width="4" height="3" />
</screen>
<screen index="2">
<bounds x="4.03" y="0" width="4" height="3" />
</screen>
</view>
<view name="Demultiplexed Output and Multiplexed">
<screen index="0">
<bounds x="0" y="0" width="4" height="3" />
</screen>
<screen index="1">
<bounds x="4.03" y="0" width="4" height="3" />
</screen>
<screen index="2">
<bounds x="8.06" y="0" width="4" height="3" />
</screen>
</view>
<view name="Multiplexed Only">
<screen index="0">
<bounds x="0" y="0" width="4" height="3" />
</screen>
</view>
</mamelayout>

View File

@ -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)