mirror of
https://github.com/ksherlock/mpw.git
synced 2025-01-08 22:30:25 +00:00
fix sequencing with memory reads.
This commit is contained in:
parent
d1c067e47a
commit
4895cfbf10
12
cpu/memory.c
12
cpu/memory.c
@ -97,8 +97,8 @@ UWO memoryReadWord(ULO address)
|
||||
if (address & 0x01) memoryOddRead(address);
|
||||
|
||||
if (address + 1 < MemorySize)
|
||||
return (Memory[address++] << 8)
|
||||
| (Memory[address++] << 0);
|
||||
return (Memory[address + 0] << 8)
|
||||
| (Memory[address + 1] << 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -112,10 +112,10 @@ ULO memoryReadLong(ULO address)
|
||||
if (address & 0x01) memoryOddRead(address);
|
||||
|
||||
if (address + 3 < MemorySize)
|
||||
return (Memory[address++] << 24)
|
||||
| (Memory[address++] << 16)
|
||||
| (Memory[address++] << 8)
|
||||
| (Memory[address++] << 0);
|
||||
return (Memory[address + 0] << 24)
|
||||
| (Memory[address + 1] << 16)
|
||||
| (Memory[address + 2] << 8)
|
||||
| (Memory[address + 3] << 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user