mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
ms1_tmap.cpp: initialize VRAM to sane default, fixes ugly back pen shown up in Big Run [Angelo Salese]
This commit is contained in:
parent
c0f052599e
commit
d5e347054b
@ -129,6 +129,16 @@ void megasys1_tilemap_device::device_start()
|
|||||||
save_item(NAME(m_scroll_flag));
|
save_item(NAME(m_scroll_flag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void megasys1_tilemap_device::device_reset()
|
||||||
|
{
|
||||||
|
// Big Run never sets up scrollram past 0x1000
|
||||||
|
// this causes its opaque pen to show up when the game scrolls vertically after a bump.
|
||||||
|
// we initialize the device VRAM to a sane default so that this doesn't occur.
|
||||||
|
// TODO: might be something else (smaller VRAM size?)
|
||||||
|
for(int i=0;i<m_scrollram.bytes()/2;i++)
|
||||||
|
m_scrollram[i] = 0xffff;
|
||||||
|
}
|
||||||
|
|
||||||
void megasys1_tilemap_device::device_post_load()
|
void megasys1_tilemap_device::device_post_load()
|
||||||
{
|
{
|
||||||
m_tmap = m_tilemap[(m_scroll_flag >> 4) & 1][m_scroll_flag & 3];
|
m_tmap = m_tilemap[(m_scroll_flag >> 4) & 1][m_scroll_flag & 3];
|
||||||
|
@ -66,6 +66,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
virtual void device_start() override;
|
virtual void device_start() override;
|
||||||
|
virtual void device_reset() override;
|
||||||
virtual void device_post_load() override;
|
virtual void device_post_load() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user