mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
sinclair: Reset caches after loading a saved state. (#12700)
Updated sinclair/specnext_sprites.cpp, sinclair/sprinter.cpp and sinclair/tsconf.cpp.
This commit is contained in:
parent
ffc49cad9a
commit
33cfe5e253
5 changed files with 23 additions and 3 deletions
|
@ -317,6 +317,11 @@ void specnext_sprites_device::device_reset()
|
|||
update_config();
|
||||
}
|
||||
|
||||
void specnext_sprites_device::device_post_load()
|
||||
{
|
||||
m_sprites_cache.clear();
|
||||
}
|
||||
|
||||
|
||||
// device type definition
|
||||
DEFINE_DEVICE_TYPE(SPECNEXT_SPRITES, specnext_sprites_device, "sprites", "Spectrum Next Sprites")
|
||||
|
|
|
@ -44,6 +44,7 @@ protected:
|
|||
virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
|
||||
virtual void device_start() override ATTR_COLD;
|
||||
virtual void device_reset() override ATTR_COLD;
|
||||
virtual void device_post_load() override ATTR_COLD;
|
||||
|
||||
memory_share_creator<u8> m_sprite_pattern_ram;
|
||||
memory_share_creator<u8> m_sprite_attr_ram;
|
||||
|
|
|
@ -108,9 +108,10 @@ public:
|
|||
INPUT_CHANGED_MEMBER(turbo_changed);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
virtual void machine_start() override ATTR_COLD;
|
||||
virtual void machine_reset() override ATTR_COLD;
|
||||
virtual void video_start() override ATTR_COLD;
|
||||
virtual void device_post_load() override ATTR_COLD;
|
||||
|
||||
void map_io(address_map &map);
|
||||
void map_mem(address_map &map);
|
||||
|
@ -1416,6 +1417,12 @@ void sprinter_state::machine_reset()
|
|||
update_memory();
|
||||
}
|
||||
|
||||
void sprinter_state::device_post_load()
|
||||
{
|
||||
spectrum_128_state::device_post_load();
|
||||
m_ints.clear();
|
||||
}
|
||||
|
||||
static const gfx_layout sprinter_charlayout =
|
||||
{
|
||||
8, 8, // 8 x 8 characters
|
||||
|
|
|
@ -237,6 +237,12 @@ void tsconf_state::machine_reset()
|
|||
while (m_keyboard->read() != 0) { /* invalidate buffer */ }
|
||||
}
|
||||
|
||||
void tsconf_state::device_post_load()
|
||||
{
|
||||
spectrum_128_state::device_post_load();
|
||||
m_sprites_cache.clear();
|
||||
}
|
||||
|
||||
INPUT_PORTS_START( tsconf )
|
||||
PORT_INCLUDE( spec_plus )
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ protected:
|
|||
virtual void video_start() override ATTR_COLD;
|
||||
virtual void machine_start() override ATTR_COLD;
|
||||
virtual void machine_reset() override ATTR_COLD;
|
||||
virtual void device_post_load() override ATTR_COLD;
|
||||
|
||||
virtual TIMER_CALLBACK_MEMBER(irq_off) override;
|
||||
TIMER_CALLBACK_MEMBER(irq_frame);
|
||||
|
|
Loading…
Reference in a new issue