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

Function ReadByteFromROM

source/Memory.cpp:544–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

542}
543
544uint8_t ReadByteFromROM(uint16_t addr)
545{
546 if (addr < APPLE_IO_BEGIN) // $0000-BFFF
547 return ReadByteFromMemory(addr);
548
549 if (addr < APPLE_SLOT_BEGIN) // $C000-C0FF
550 return ReadByteFromMemory(addr);
551
552 if (addr < (FIRMWARE_EXPANSION_END + 1)) // $C100-CFFF
553 {
554 if (IsApple2PlusOrClone(GetApple2Type()))
555 return ReadByteFromMemory(addr);
556 return pCxRomInternal[addr - APPLE_IO_BEGIN];
557 }
558
559 return memrom[addr - APPLE_ROM_BEGIN]; // $D000-FFFF
560}
561
562//=============================================================================
563

Callers 1

Calls 3

ReadByteFromMemoryFunction · 0.85
IsApple2PlusOrCloneFunction · 0.85
GetApple2TypeFunction · 0.85

Tested by

no test coverage detected