raiden.c: added save state support (nw)

This commit is contained in:
Ivan Vangelista 2015-02-02 20:22:52 +01:00
parent 028f2b1826
commit 1db4dcd963
4 changed files with 36 additions and 12 deletions

View File

@ -489,6 +489,11 @@ void seibu_adpcm_device::device_start()
m_stream = machine().sound().stream_alloc(*this, 0, 1, clock());
m_base = machine().root_device().memregion(m_rom_tag)->base();
m_adpcm.reset();
save_item(NAME(m_current));
save_item(NAME(m_end));
save_item(NAME(m_nibble));
save_item(NAME(m_playing));
}
// "decrypt" is a bit flowery here, as it's probably just line-swapping to

View File

@ -631,16 +631,16 @@ DRIVER_INIT_MEMBER(raiden_state,raidenu)
/***************************************************************************/
/* Same PCB, differ by region byte(s) */
GAME( 1990, raiden, 0, raiden, raiden, raiden_state, raiden, ROT270, "Seibu Kaihatsu", "Raiden (set 1)", 0 )
GAME( 1990, raidena, raiden, raiden, raiden, raiden_state, raiden, ROT270, "Seibu Kaihatsu", "Raiden (set 2)", 0 )
GAME( 1990, raidenu, raiden, raiden, raiden, raiden_state, raiden, ROT270, "Seibu Kaihatsu (Fabtek license)", "Raiden (US set 1)", 0 )
GAME( 1990, raident, raiden, raiden, raiden, raiden_state, raiden, ROT270, "Seibu Kaihatsu (Liang HWA Electronics license)", "Raiden (Taiwan)", 0 )
GAME( 1990, raiden, 0, raiden, raiden, raiden_state, raiden, ROT270, "Seibu Kaihatsu", "Raiden (set 1)", GAME_SUPPORTS_SAVE )
GAME( 1990, raidena, raiden, raiden, raiden, raiden_state, raiden, ROT270, "Seibu Kaihatsu", "Raiden (set 2)", GAME_SUPPORTS_SAVE )
GAME( 1990, raidenu, raiden, raiden, raiden, raiden_state, raiden, ROT270, "Seibu Kaihatsu (Fabtek license)", "Raiden (US set 1)", GAME_SUPPORTS_SAVE )
GAME( 1990, raident, raiden, raiden, raiden, raiden_state, raiden, ROT270, "Seibu Kaihatsu (Liang HWA Electronics license)", "Raiden (Taiwan)", GAME_SUPPORTS_SAVE )
/* Same as above, but the sound CPU code is not encrypted */
GAME( 1990, raidenk, raiden, raiden, raiden, raiden_state, raidenk, ROT270, "Seibu Kaihatsu (IBL Corporation license)", "Raiden (Korea)", 0 )
GAME( 1990, raidenk, raiden, raiden, raiden, raiden_state, raidenk, ROT270, "Seibu Kaihatsu (IBL Corporation license)", "Raiden (Korea)", GAME_SUPPORTS_SAVE )
/* 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 )
GAME( 1990, raidenua, raiden, raidenu, raiden, raiden_state, raidenu, ROT270, "Seibu Kaihatsu (Fabtek license)", "Raiden (US set 2)", GAME_SUPPORTS_SAVE )
/* 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 )
GAME( 1990, raidenb, raiden, raidenb, raiden, driver_device, 0, ROT270, "Seibu Kaihatsu", "Raiden (set 3)", GAME_SUPPORTS_SAVE )

View File

@ -14,26 +14,27 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_seibu_sound(*this, "seibu_sound"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_spriteram(*this, "spriteram"),
m_shared_ram(*this, "shared_ram"),
m_videoram(*this, "videoram"),
m_scroll_ram(*this, "scroll_ram"),
m_back_data(*this, "back_data"),
m_fore_data(*this, "fore_data"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette")
m_fore_data(*this, "fore_data")
{ }
required_device<cpu_device> m_maincpu;
required_device<seibu_sound_device> m_seibu_sound;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<buffered_spriteram16_device> m_spriteram;
required_shared_ptr<UINT16> m_shared_ram;
required_shared_ptr<UINT16> m_videoram;
optional_shared_ptr<UINT16> m_scroll_ram;
required_shared_ptr<UINT16> m_back_data;
required_shared_ptr<UINT16> m_fore_data;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
tilemap_t *m_bg_layer;
tilemap_t *m_fg_layer;
@ -55,15 +56,20 @@ public:
DECLARE_DRIVER_INIT(raidenu);
DECLARE_DRIVER_INIT(raidenk);
DECLARE_DRIVER_INIT(raiden);
TILE_GET_INFO_MEMBER(get_back_tile_info);
TILE_GET_INFO_MEMBER(get_fore_tile_info);
TILE_GET_INFO_MEMBER(get_text_tile_info);
virtual void video_start();
DECLARE_VIDEO_START(raidenb);
UINT32 screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16 *scrollregs);
UINT32 screen_update_raiden(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_raidenb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(raiden_interrupt);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri_mask);
void common_decrypt();
};

View File

@ -228,6 +228,12 @@ void raiden_state::video_start()
m_fg_layer->set_transparent_pen(15);
m_tx_layer->set_transparent_pen(15);
save_item(NAME(m_bg_layer_enabled));
save_item(NAME(m_fg_layer_enabled));
save_item(NAME(m_tx_layer_enabled));
save_item(NAME(m_sp_layer_enabled));
save_item(NAME(m_flipscreen));
}
VIDEO_START_MEMBER(raiden_state,raidenb)
@ -238,4 +244,11 @@ VIDEO_START_MEMBER(raiden_state,raidenb)
m_fg_layer->set_transparent_pen(15);
m_tx_layer->set_transparent_pen(15);
save_item(NAME(m_bg_layer_enabled));
save_item(NAME(m_fg_layer_enabled));
save_item(NAME(m_tx_layer_enabled));
save_item(NAME(m_sp_layer_enabled));
save_item(NAME(m_flipscreen));
save_item(NAME(m_raidenb_scroll_ram));
}