MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / ReadByteFromMemory

Function ReadByteFromMemory

source/Memory.cpp:474–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474uint8_t ReadByteFromMemory(uint16_t addr)
475{
476 if (GetIsMemCacheValid())
477 return mem[addr];
478
479 if (memreadPageType[addr >> 8] != MEM_FloatingBus) // MEM_Normal or MEM_IORead
480 {
481 _ASSERT(memshadow[addr >> 8]); // Should never be NULL
482 if (memshadow[addr >> 8] == NULL)
483 return 0x00;
484
485 return *(memshadow[addr >> 8] + (addr & 0xff));
486 }
487
488 // Read floating-bus
489 // NB. Can't call MemReadFloatingBus(), as don't have 'uExecutedCycles' - needed when g_FullSpeed == true
490 return 0;
491}
492
493uint16_t ReadWordFromMemory(uint16_t addr)
494{

Callers 15

ReadWordFromMemoryFunction · 0.85
ReadByteFromROMFunction · 0.85
IO_CxxxFunction · 0.85
ReadUINT24FromMemoryFunction · 0.85
IOReadInternalMethod · 0.85
IOWriteInternalMethod · 0.85
GetOpcodeCyclesMethod · 0.85
IsOpcodeRMWabsMethod · 0.85

Calls 1

GetIsMemCacheValidFunction · 0.70

Tested by

no test coverage detected