mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
likely resolve sunplus crashes on linux (nw)
This commit is contained in:
parent
c8efa6607c
commit
3f63c559b7
@ -194,8 +194,6 @@ void unsp_device::device_start()
|
||||
m_core = (internal_unsp_state *)m_cache.alloc_near(sizeof(internal_unsp_state));
|
||||
memset(m_core, 0, sizeof(internal_unsp_state));
|
||||
|
||||
m_core->m_r.resize(m_numregs);
|
||||
|
||||
#if ENABLE_UNSP_DRC
|
||||
m_enable_drc = allow_drc() && (m_iso < 12);
|
||||
#else
|
||||
@ -299,7 +297,12 @@ void unsp_20_device::device_start()
|
||||
void unsp_device::device_reset()
|
||||
{
|
||||
for (int i = 0; i < m_numregs; i++)
|
||||
m_core->m_r[i] = 0;
|
||||
{
|
||||
if (i < m_numregs)
|
||||
m_core->m_r[i] = 0;
|
||||
else
|
||||
m_core->m_r[i] = 0xdeadbeef;
|
||||
}
|
||||
|
||||
m_core->m_r[REG_PC] = read16(0xfff7);
|
||||
m_core->m_enable_irq = 0;
|
||||
|
@ -164,7 +164,7 @@ protected:
|
||||
|
||||
struct internal_unsp_state
|
||||
{
|
||||
std::vector<u32> m_r; // why are these 32-bit? they're 16-bit regs? (changing to uint16_t causes crashes tho, so something is depending on this)
|
||||
uint32_t m_r[16]; // why are these 32-bit? they're 16-bit regs? (changing to uint16_t causes crashes tho, so something is depending on this)
|
||||
uint32_t m_enable_irq;
|
||||
uint32_t m_enable_fiq;
|
||||
uint32_t m_irq;
|
||||
|
Loading…
Reference in New Issue
Block a user