| 791 | } |
| 792 | |
| 793 | U64 KMemory::readq(U32 address) { |
| 794 | #if !defined(UNALIGNED_MEMORY) |
| 795 | if ((address & 0xFFF) < 0xFF9) { |
| 796 | int index = address >> 12; |
| 797 | MMU& mmu = data->mmu[index]; |
| 798 | if (mmu.canReadRam) { |
| 799 | return *(U64*)(&(ramPageGet((RamPage)mmu.ramIndex)[address & 0xFFF])); |
| 800 | } |
| 801 | } |
| 802 | #endif |
| 803 | return readd(address) | ((U64)readd(address + 4) << 32); |
| 804 | } |
| 805 | |
| 806 | U32 KMemory::readd(U32 address) { |
| 807 | if ((address & 0xFFF) < 0xFFD) { |