From 57c8f809ff48fdd0cb76745315d5ab34864d83d0 Mon Sep 17 00:00:00 2001 From: "Alex W. Jackson" Date: Fri, 7 Nov 2014 17:02:53 -0500 Subject: twin16: fix savestate regression after tilemap conversion (nw) --- src/mame/includes/twin16.h | 10 ++++++---- src/mame/video/twin16.c | 8 ++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/mame/includes/twin16.h b/src/mame/includes/twin16.h index c682190bb86..bd7cf94855b 100644 --- a/src/mame/includes/twin16.h +++ b/src/mame/includes/twin16.h @@ -77,10 +77,6 @@ public: INTERRUPT_GEN_MEMBER(CPUA_interrupt); INTERRUPT_GEN_MEMBER(CPUB_interrupt); TIMER_CALLBACK_MEMBER(sprite_tick); - int set_sprite_timer( ); - void spriteram_process( ); - void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap ); - int spriteram_process_enable( ); DECLARE_WRITE8_MEMBER(volume_callback); protected: virtual void machine_start(); @@ -88,6 +84,12 @@ protected: virtual void video_start(); virtual void tile_get_info(tile_data &tileinfo, UINT16 data, int color_base); +private: + int set_sprite_timer(); + void spriteram_process(); + void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap ); + int spriteram_process_enable(); + void twin16_postload(); }; class fround_state : public twin16_state diff --git a/src/mame/video/twin16.c b/src/mame/video/twin16.c index d8ebb702d97..2af6e1b2b10 100644 --- a/src/mame/video/twin16.c +++ b/src/mame/video/twin16.c @@ -62,6 +62,11 @@ WRITE16_MEMBER(twin16_state::zipram_w) m_gfxdecode->gfx(1)->mark_dirty(offset / 16); } +void twin16_state::twin16_postload() +{ + m_gfxdecode->gfx(1)->mark_all_dirty(); +} + WRITE16_MEMBER(fround_state::gfx_bank_w) { int changed = 0; @@ -452,6 +457,9 @@ void twin16_state::video_start() save_item(NAME(m_need_process_spriteram)); save_item(NAME(m_video_register)); save_item(NAME(m_sprite_busy)); + + if (!m_is_fround) + machine().save().register_postload(save_prepost_delegate(FUNC(twin16_state::twin16_postload), this)); } void fround_state::video_start() -- cgit v1.2.3