| Previous | 199869 Revisions | Next |
| r22014 Friday 22nd March, 2013 at 05:31:09 UTC by Fabio Priuli |
|---|
| (MESS) better fix for the pmac registers in SVP. thanks Arbee for noticing this veeeeeery old out-of-bound access. I guess we originally had a single set of 12 registers... nw. |
| [src/mess/machine] | md_svp.c md_svp.h |
| r22013 | r22014 | |
|---|---|---|
| 83 | 83 | { |
| 84 | 84 | if (m_emu_status & SSP_PMC_SET) |
| 85 | 85 | { |
| 86 | m_pmac_read[write ? reg + 6 : reg] = m_pmc.d; | |
| 86 | if (write) | |
| 87 | m_pmac_write[reg] = m_pmc.d; | |
| 88 | else | |
| 89 | m_pmac_read[reg] = m_pmc.d; | |
| 90 | ||
| 87 | 91 | m_emu_status &= ~SSP_PMC_SET; |
| 88 | 92 | return 0; |
| 89 | 93 | } |
| r22013 | r22014 | |
| 155 | 159 | } |
| 156 | 160 | |
| 157 | 161 | // PMC value corresponds to last PMR accessed (not sure). |
| 158 | m_pmc.d = m_pmac_read[write ? reg + 6 : reg]; | |
| 162 | if (write) | |
| 163 | m_pmc.d = m_pmac_write[reg]; | |
| 164 | else | |
| 165 | m_pmc.d = m_pmac_read[reg]; | |
| 159 | 166 | |
| 160 | 167 | return d; |
| 161 | 168 | } |
| r22013 | r22014 | |
|---|---|---|
| 56 | 56 | |
| 57 | 57 | UINT8 *m_iram; // IRAM (0-0x7ff) |
| 58 | 58 | UINT8 *m_dram; // [0x20000]; |
| 59 | UINT32 m_pmac_read[ | |
| 59 | UINT32 m_pmac_read[6]; // read modes/addrs for PM0-PM5 | |
| 60 | 60 | UINT32 m_pmac_write[6]; // write ... |
| 61 | 61 | PAIR m_pmc; |
| 62 | 62 | UINT32 m_emu_status; |
| Previous | 199869 Revisions | Next |