From b91cdd39ead9c251daf08ade738009f04e7cda22 Mon Sep 17 00:00:00 2001 From: Fabio Priuli Date: Fri, 22 Mar 2013 05:31:44 +0000 Subject: [PATCH] (MESS) same fix to the non-slot implementation. nw. --- src/mess/machine/megasvp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mess/machine/megasvp.c b/src/mess/machine/megasvp.c index 015ffe094b2..c577e7ad55a 100644 --- a/src/mess/machine/megasvp.c +++ b/src/mess/machine/megasvp.c @@ -56,7 +56,10 @@ static UINT32 pm_io(address_space &space, int reg, int write, UINT32 d) mdsvp_state *state = space.machine().driver_data(); if (state->m_emu_status & SSP_PMC_SET) { - state->m_pmac_read[write ? reg + 6 : reg] = state->m_pmc.d; + if (write) + state->m_pmac_write[reg] = state->m_pmc.d; + else + state->m_pmac_read[reg] = state->m_pmc.d; state->m_emu_status &= ~SSP_PMC_SET; return 0; } @@ -126,7 +129,10 @@ static UINT32 pm_io(address_space &space, int reg, int write, UINT32 d) } // PMC value corresponds to last PMR accessed (not sure). - state->m_pmc.d = state->m_pmac_read[write ? reg + 6 : reg]; + if (write) + state->m_pmc.d = state->m_pmac_write[reg]; + else + state->m_pmc.d = state->m_pmac_read[reg]; return d; }