Fixed 25pacman save state crash (nw)

This commit is contained in:
Ivan Vangelista 2014-08-21 12:13:07 +00:00
parent 5cb2c5e3d7
commit 777b8f4d48
2 changed files with 13 additions and 4 deletions

View File

@ -354,7 +354,7 @@ INPUT_PORTS_END
*
*************************************/
void _20pacgal_state::machine_start()
void _20pacgal_state::common_save_state()
{
save_item(NAME(m_game_selected));
save_item(NAME(m_ram_48000));
@ -362,8 +362,17 @@ void _20pacgal_state::machine_start()
save_item(NAME(m_sprite_gfx_ram));
save_item(NAME(m_sprite_ram));
save_item(NAME(m_sprite_color_lookup));
}
void _20pacgal_state::machine_start()
{
common_save_state();
machine().save().register_postload(save_prepost_delegate(FUNC(_20pacgal_state::set_bankptr), this)); //currently not used by 25pacman
}
machine().save().register_postload(save_prepost_delegate(FUNC(_20pacgal_state::set_bankptr), this));
void _25pacman_state::machine_start()
{
common_save_state();
}
void _20pacgal_state::machine_reset()

View File

@ -68,7 +68,7 @@ public:
void draw_stars(bitmap_rgb32 &bitmap, const rectangle &cliprect );
void draw_sprite(bitmap_rgb32 &bitmap, int y, int x,
UINT8 code, UINT8 color, int flip_y, int flip_x);
void common_save_state();
};
@ -80,7 +80,7 @@ public:
{ }
DECLARE_READ8_MEMBER( _25pacman_io_87_r );
virtual void machine_start();
};
/*----------- defined in video/20pacgal.c -----------*/