mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
demultiplex the video output to 2 screens to simulate the konami demux board on rungunu (only this set for now, as it's a dedicated 2 twin only set with no single screen option)
unfortunately the sprites and tilemaps seem to end up on switched screens, which is .. confusing
This commit is contained in:
parent
67c0cd4f7c
commit
25bfcfd03a
@ -413,9 +413,11 @@ static MACHINE_CONFIG_START( rng, rungun_state )
|
||||
MCFG_K055673_CONFIG("gfx2", 1, K055673_LAYOUT_RNG, -8, 15)
|
||||
MCFG_K055673_GFXDECODE("gfxdecode")
|
||||
MCFG_K055673_PALETTE("palette")
|
||||
MCFG_K055673_SET_SCREEN("screen")
|
||||
|
||||
MCFG_DEVICE_ADD("k053252", K053252, 16000000/2)
|
||||
MCFG_K053252_OFFSETS(9*8, 24)
|
||||
MCFG_VIDEO_SET_SCREEN("screen")
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
@ -432,6 +434,24 @@ static MACHINE_CONFIG_START( rng, rungun_state )
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
// for dual-screen output Run and Gun requires the video de-multiplexer board connected to the Jamma output, this gives you 2 Jamma connectors, one for each screen.
|
||||
// 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_UPDATE_DRIVER(rungun_state, screen_update_rng_dual_left)
|
||||
|
||||
MCFG_SCREEN_ADD("screen2", 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_right)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
// Older non-US 53936/A13 roms were all returning bad from the mask ROM check. Using the US ROM on non-US reports good therefore I guess that data matches for that
|
||||
// across all sets.
|
||||
|
||||
@ -689,9 +709,12 @@ ROM_START( slmdunkj )
|
||||
ROM_END
|
||||
|
||||
|
||||
// these sets operate as single screen / dual screen depending on if you have the video de-multiplexer plugged in, and the dipswitch set to 1 or 2 monitors
|
||||
GAME( 1993, rungun, 0, rng, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver EAA 1993 10.8)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1993, runguna, rungun, rng, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver EAA 1993 10.4)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1993, rungunb, rungun, rng, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver EAA 1993 9.10, prototype?)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1993, rungunu, rungun, rng, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver UAB 1993 10.12)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // runs twice as fast as it should, broken inputs!
|
||||
GAME( 1993, rungunua, rungun, rng, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver UBA 1993 10.8)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // runs twice as fast as it should, broken inputs! broken attract!
|
||||
GAME( 1993, rungunua, rungun, rng, rng, driver_device, 0, ROT0, "Konami", "Run and Gun (ver UBA 1993 10.8)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
|
||||
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 )
|
||||
|
@ -26,7 +26,9 @@ public:
|
||||
m_sysreg(*this, "sysreg"),
|
||||
m_936_videoram(*this, "936_videoram"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette") { }
|
||||
m_palette(*this, "palette"),
|
||||
m_screen(*this, "screen")
|
||||
{ }
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
@ -43,6 +45,7 @@ public:
|
||||
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<screen_device> m_screen;
|
||||
|
||||
/* video-related */
|
||||
tilemap_t *m_ttl_tilemap;
|
||||
@ -84,6 +87,12 @@ public:
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_rng(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
UINT32 screen_update_rng_dual_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_rng_dual_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
bitmap_ind16 m_rng_dual_demultiplex_left_temp;
|
||||
bitmap_ind16 m_rng_dual_demultiplex_right_temp;
|
||||
|
||||
INTERRUPT_GEN_MEMBER(rng_interrupt);
|
||||
INTERRUPT_GEN_MEMBER(audio_interrupt);
|
||||
};
|
||||
|
@ -96,6 +96,9 @@ void rungun_state::video_start()
|
||||
m_ttl_tilemap->set_transparent_pen(0);
|
||||
|
||||
m_sprite_colorbase = 0x20;
|
||||
|
||||
m_screen->register_screen_bitmap(m_rng_dual_demultiplex_left_temp);
|
||||
m_screen->register_screen_bitmap(m_rng_dual_demultiplex_right_temp);
|
||||
}
|
||||
|
||||
UINT32 rungun_state::screen_update_rng(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
@ -118,3 +121,30 @@ UINT32 rungun_state::screen_update_rng(screen_device &screen, bitmap_ind16 &bitm
|
||||
m_ttl_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
UINT32 rungun_state::screen_update_rng_dual_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
copybitmap( bitmap, m_rng_dual_demultiplex_right_temp, 0, 0, 0, 0, cliprect);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user