| 1646 | //=========================================================================== |
| 1647 | |
| 1648 | static LPBYTE MemGetPtrBANK1(const WORD offset, const LPBYTE pMemBase) |
| 1649 | { |
| 1650 | if ((offset & 0xF000) != 0xC000) // Requesting RAM at physical addr $Cxxx (ie. 4K RAM BANK1) |
| 1651 | return NULL; |
| 1652 | |
| 1653 | // NB. This works for memaux when set to any RWpages[] value, ie. RamWork III "just works" |
| 1654 | const BYTE bank1page = (offset >> 8) & 0xF; |
| 1655 | return (g_isMemCacheValid && (memshadow[0xD0+bank1page] == pMemBase+(0xC0+bank1page)*_6502_PAGE_SIZE)) |
| 1656 | ? mem+offset+0x1000 // Return ptr to $Dxxx address - 'mem' has (a potentially dirty) 4K RAM BANK1 mapped in at $D000 |
| 1657 | : pMemBase+offset; // Else return ptr to $Cxxx address |
| 1658 | } |
| 1659 | |
| 1660 | //------------------------------------- |
| 1661 |
no outgoing calls
no test coverage detected