mirror of
https://github.com/holub/mame
synced 2025-06-03 19:36:26 +03:00
Hooked up CRTC to Raiden (set 3)
This commit is contained in:
parent
fec33c86ea
commit
7675ad1036
@ -54,6 +54,7 @@
|
||||
#include "sound/3812intf.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "includes/raiden.h"
|
||||
#include "video/seibu_crtc.h"
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
@ -125,9 +126,7 @@ static ADDRESS_MAP_START( raidenb_main_map, AS_PROGRAM, 16, raiden_state )
|
||||
AM_RANGE(0x0b006, 0x0b007) AM_WRITE8(raidenb_control_w, 0x00ff)
|
||||
AM_RANGE(0x0c000, 0x0c7ff) AM_WRITE(raiden_text_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x0d000, 0x0d00d) AM_READWRITE_LEGACY(seibu_main_word_r, seibu_main_word_w)
|
||||
AM_RANGE(0x0d05c, 0x0d05d) AM_WRITE8(raidenb_layer_enable_w, 0x00ff)
|
||||
AM_RANGE(0x0d060, 0x0d067) AM_WRITEONLY AM_SHARE("scroll_ram")
|
||||
AM_RANGE(0x0d040, 0x0d08f) AM_WRITENOP // sei_crtc is here
|
||||
AM_RANGE(0x0d040, 0x0d08f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write)
|
||||
AM_RANGE(0xa0000, 0xfffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -311,15 +310,29 @@ static MACHINE_CONFIG_DERIVED( raidenu, raiden )
|
||||
MCFG_CPU_PROGRAM_MAP(raidenu_sub_map)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
WRITE16_MEMBER( raiden_state::raidenb_layer_scroll_w )
|
||||
{
|
||||
COMBINE_DATA(&m_raidenb_scroll_ram[offset]);
|
||||
}
|
||||
|
||||
SEIBU_CRTC_INTERFACE(crtc_intf)
|
||||
{
|
||||
"screen",
|
||||
DEVCB_DRIVER_MEMBER16(raiden_state, raidenb_layer_enable_w),
|
||||
DEVCB_DRIVER_MEMBER16(raiden_state, raidenb_layer_scroll_w),
|
||||
};
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( raidenb, raiden )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(raidenb_main_map)
|
||||
|
||||
|
||||
/* video hardware */
|
||||
MCFG_VIDEO_START_OVERRIDE(raiden_state,raidenb)
|
||||
|
||||
MCFG_SEIBU_CRTC_ADD("crtc",crtc_intf,0)
|
||||
|
||||
MCFG_SCREEN_MODIFY("screen")
|
||||
MCFG_SCREEN_UPDATE_DRIVER(raiden_state, screen_update_raidenb)
|
||||
MACHINE_CONFIG_END
|
||||
@ -635,5 +648,5 @@ GAME( 1990, raidenk, raiden, raiden, raiden, raiden_state, raidenk, ROT270, "
|
||||
/* Alternate hardware; SEI8904 + SEI9008 PCBs. Main & Sub CPU code not encrypted */
|
||||
GAME( 1990, raidenua, raiden, raidenu, raiden, raiden_state, raidenu, ROT270, "Seibu Kaihatsu (Fabtek license)", "Raiden (US set 2)", 0 )
|
||||
|
||||
/* Alternate hardware. Main, Sub & Sound CPU code not encrypted - could possibly be a bootleg?? */
|
||||
/* Alternate hardware. Main, Sub & Sound CPU code not encrypted - could possibly be a bootleg?? It also sports Seibu custom CRTC. */
|
||||
GAME( 1990, raidenb, raiden, raidenb, raiden, driver_device, 0, ROT270, "Seibu Kaihatsu", "Raiden (set 3)", 0 )
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
required_device<buffered_spriteram16_device> m_spriteram;
|
||||
required_shared_ptr<UINT16> m_shared_ram;
|
||||
required_shared_ptr<UINT16> m_videoram;
|
||||
required_shared_ptr<UINT16> m_scroll_ram;
|
||||
optional_shared_ptr<UINT16> m_scroll_ram;
|
||||
required_shared_ptr<UINT16> m_back_data;
|
||||
required_shared_ptr<UINT16> m_fore_data;
|
||||
|
||||
@ -36,13 +36,15 @@ public:
|
||||
UINT8 m_tx_layer_enabled;
|
||||
UINT8 m_sp_layer_enabled;
|
||||
UINT8 m_flipscreen;
|
||||
UINT16 m_raidenb_scroll_ram[6];
|
||||
|
||||
DECLARE_WRITE16_MEMBER(raiden_background_w);
|
||||
DECLARE_WRITE16_MEMBER(raiden_foreground_w);
|
||||
DECLARE_WRITE16_MEMBER(raiden_text_w);
|
||||
DECLARE_WRITE8_MEMBER(raiden_control_w);
|
||||
DECLARE_WRITE8_MEMBER(raidenb_control_w);
|
||||
DECLARE_WRITE8_MEMBER(raidenb_layer_enable_w);
|
||||
DECLARE_WRITE16_MEMBER(raidenb_layer_enable_w);
|
||||
DECLARE_WRITE16_MEMBER(raidenb_layer_scroll_w);
|
||||
DECLARE_DRIVER_INIT(raidenu);
|
||||
DECLARE_DRIVER_INIT(raidenk);
|
||||
DECLARE_DRIVER_INIT(raiden);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Seibu Raiden hardware
|
||||
|
||||
|
||||
Functions to emulate the video hardware
|
||||
|
||||
*******************************************************************************/
|
||||
@ -62,7 +62,7 @@ WRITE8_MEMBER(raiden_state::raidenb_control_w)
|
||||
machine().tilemap().set_flip_all(m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(raiden_state::raidenb_layer_enable_w)
|
||||
WRITE16_MEMBER(raiden_state::raidenb_layer_enable_w)
|
||||
{
|
||||
// d0: back layer disable
|
||||
// d1: fore layer disable
|
||||
@ -80,7 +80,7 @@ void raiden_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect,
|
||||
{
|
||||
if (!m_sp_layer_enabled)
|
||||
return;
|
||||
|
||||
|
||||
UINT16 *sprites = m_spriteram->buffer();
|
||||
gfx_element *gfx = machine().gfx[3];
|
||||
|
||||
@ -107,10 +107,10 @@ void raiden_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect,
|
||||
|
||||
Word #3 unused
|
||||
*/
|
||||
|
||||
|
||||
if (!(sprites[offs + 0] & 0x8000))
|
||||
continue;
|
||||
|
||||
|
||||
int priority = sprites[offs + 2] >> 14 & 0x3;
|
||||
if ((priority & pri_mask) == 0)
|
||||
continue;
|
||||
@ -181,13 +181,13 @@ UINT32 raiden_state::screen_update_raiden(screen_device &screen, bitmap_ind16 &b
|
||||
scrollregs[1] = ((m_scroll_ram[0x01] & 0xf0) << 4) | ((m_scroll_ram[0x02] & 0x7f) << 1) | ((m_scroll_ram[0x02] & 0x80) >> 7);
|
||||
scrollregs[2] = ((m_scroll_ram[0x19] & 0xf0) << 4) | ((m_scroll_ram[0x1a] & 0x7f) << 1) | ((m_scroll_ram[0x1a] & 0x80) >> 7);
|
||||
scrollregs[3] = ((m_scroll_ram[0x11] & 0xf0) << 4) | ((m_scroll_ram[0x12] & 0x7f) << 1) | ((m_scroll_ram[0x12] & 0x80) >> 7);
|
||||
|
||||
|
||||
return screen_update_common(screen, bitmap, cliprect, scrollregs);
|
||||
}
|
||||
|
||||
UINT32 raiden_state::screen_update_raidenb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
return screen_update_common(screen, bitmap, cliprect, m_scroll_ram);
|
||||
return screen_update_common(screen, bitmap, cliprect, m_raidenb_scroll_ram);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user