Previous 199869 Revisions Next

r26052 Friday 8th November, 2013 at 11:52:17 UTC by Dirk Best
Oops - unsaved changes: The addresses when trying to modify m_ucode dwords seem to be byte offsets. The -log output is closer to what I expect, but region seems too short.
[/branches/alto2/src/emu/cpu/alto2]alto2.c

branches/alto2/src/emu/cpu/alto2/alto2.c
r26051r26052
206206   m_icountptr = &m_icount;
207207
208208   // reverse dwords and invert hardware specific bits
209   const UINT32 addrxor = 2 * (ALTO2_UCODE_PAGE_SIZE - 1);
209   const UINT32 addrxor = 4 * (ALTO2_UCODE_PAGE_SIZE - 1);
210210   UINT32* temp = auto_alloc_array(machine(), UINT32, 2 * ALTO2_UCODE_PAGE_SIZE);
211211   UINT32 ucode;
212212   for (UINT32 addr = 0; addr < ALTO2_UCODE_PAGE_SIZE; addr++) {
213      ucode = m_ucode->read_dword(2*addr ^ addrxor);
213      ucode = m_ucode->read_dword(4*addr ^ addrxor);
214214      temp[addr] = ucode ^ ALTO2_UCODE_INVERTED;
215      ucode = m_ucode->read_dword(2*(ALTO2_UCODE_PAGE_SIZE+addr) ^ addrxor);
215      ucode = m_ucode->read_dword(4*(ALTO2_UCODE_PAGE_SIZE+addr) ^ addrxor);
216216      temp[ALTO2_UCODE_PAGE_SIZE+addr] = ucode ^ ALTO2_UCODE_INVERTED;
217217   }
218218   for (UINT32 addr = 0; addr < 2*ALTO2_UCODE_PAGE_SIZE; addr++) {
219      m_ucode->write_dword(2*addr, temp[addr]);
219      m_ucode->write_dword(4*addr, temp[addr]);
220220   }
221221
222222   hard_reset();

Previous 199869 Revisions Next


© 1997-2024 The MAME Team