mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-22 00:32:44 +00:00
log global page memory access
This commit is contained in:
parent
c8da211026
commit
cb519a626a
36
cpu/memory.c
36
cpu/memory.c
@ -55,6 +55,12 @@ void memorySetMemory(uint8_t *memory, uint32_t size)
|
|||||||
|
|
||||||
UBY memoryReadByte(ULO address)
|
UBY memoryReadByte(ULO address)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (address < 0x10000)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "memoryReadByte(%08x)\n", address);
|
||||||
|
}
|
||||||
|
|
||||||
// hmmm... 32-bit clean addresses?
|
// hmmm... 32-bit clean addresses?
|
||||||
if (address < MemorySize)
|
if (address < MemorySize)
|
||||||
return Memory[address];
|
return Memory[address];
|
||||||
@ -63,6 +69,13 @@ UBY memoryReadByte(ULO address)
|
|||||||
|
|
||||||
UWO memoryReadWord(ULO address)
|
UWO memoryReadWord(ULO address)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (address < 0x10000)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "memoryReadWord(%08x)\n", address);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (address & 0x01) memoryOddRead(address);
|
if (address & 0x01) memoryOddRead(address);
|
||||||
|
|
||||||
if (address + 1 < MemorySize)
|
if (address + 1 < MemorySize)
|
||||||
@ -74,6 +87,11 @@ UWO memoryReadWord(ULO address)
|
|||||||
|
|
||||||
ULO memoryReadLong(ULO address)
|
ULO memoryReadLong(ULO address)
|
||||||
{
|
{
|
||||||
|
if (address < 0x10000)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "memoryReadLong(%08x)\n", address);
|
||||||
|
}
|
||||||
|
|
||||||
if (address & 0x01) memoryOddRead(address);
|
if (address & 0x01) memoryOddRead(address);
|
||||||
|
|
||||||
if (address + 1 < MemorySize)
|
if (address + 1 < MemorySize)
|
||||||
@ -87,6 +105,11 @@ ULO memoryReadLong(ULO address)
|
|||||||
}
|
}
|
||||||
void memoryWriteByte(UBY data, ULO address)
|
void memoryWriteByte(UBY data, ULO address)
|
||||||
{
|
{
|
||||||
|
if (address < 0x10000)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "memoryWriteByte(%02x, %08x)\n", data, address);
|
||||||
|
}
|
||||||
|
|
||||||
if (address < MemorySize)
|
if (address < MemorySize)
|
||||||
{
|
{
|
||||||
Memory[address] = data;
|
Memory[address] = data;
|
||||||
@ -95,6 +118,12 @@ void memoryWriteByte(UBY data, ULO address)
|
|||||||
|
|
||||||
void memoryWriteWord(UWO data, ULO address)
|
void memoryWriteWord(UWO data, ULO address)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (address < 0x10000)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "memoryWriteWord(%04x, %08x)\n", data, address);
|
||||||
|
}
|
||||||
|
|
||||||
if (address & 0x01) memoryOddWrite(address);
|
if (address & 0x01) memoryOddWrite(address);
|
||||||
|
|
||||||
if (address + 1 < MemorySize)
|
if (address + 1 < MemorySize)
|
||||||
@ -106,6 +135,13 @@ void memoryWriteWord(UWO data, ULO address)
|
|||||||
|
|
||||||
void memoryWriteLong(ULO data, ULO address)
|
void memoryWriteLong(ULO data, ULO address)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (address < 0x10000)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "memoryWriteLong(%08x, %08x)\n", data, address);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (address & 0x01) memoryOddWrite(address);
|
if (address & 0x01) memoryOddWrite(address);
|
||||||
|
|
||||||
if (address + 3 < MemorySize)
|
if (address + 3 < MemorySize)
|
||||||
|
Loading…
Reference in New Issue
Block a user