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

Function ReadFloatingBus

source/Memory.cpp:2458–2471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2456//===========================================================================
2457
2458static BYTE ReadFloatingBus(const ULONG uExecutedCycles, const bool fullSpeed, const bool auxEmpty = false)
2459{
2460 BYTE* pMain = MemGetMainPtr(0x0000);
2461
2462 if (auxEmpty && (SW_AUXREAD || (SW_80STORE && SW_PAGE2)))
2463 {
2464 // Special case: Aux slot empty and in 80-col mode: video generator reading floating bus. (GH#1341)
2465 // Can't rely on using "mem" (ie. the CPU read cache), since "80STORE && PAGE2" will have switched in the non-existent memory from "memaux"!
2466 // NB. Only care about $400-7FF (ie. TEXT page 1)
2467 pMain = memmain;
2468 }
2469
2470 return pMain[NTSC_VideoGetScannerAddress(uExecutedCycles, fullSpeed)]; // OK: This does the 2-cycle adjust for ANSI STORY (End Credits)
2471}
2472
2473BYTE MemReadFloatingBus(const ULONG uExecutedCycles)
2474{

Callers 2

MemReadFloatingBusFunction · 0.85

Calls 2

MemGetMainPtrFunction · 0.85

Tested by

no test coverage detected