public byte getCHRMappedMemory(int address, boolean isDirect) {
        // read BEFORE we potentially bank switch
        byte b = chrData[((address < 0x1000) ? lowBank : highBank) * 0x1000 + (address & 0xFFF)];
        if(! isDirect) {
        //PPU reads $0FD0 through $0FDF: latch 0 is set to $FD for subsequent reads
        //PPU reads $0FE0 through $0FEF: latch 0 is set to $FE for subsequent reads
        //PPU reads $1FD0 through $1FDF: latch 1 is set to $FD for subsequent reads
        //PPU reads $1FE0 through $1FEF: latch 1 is set to $FE for subsequent reads
            if( (address & 0x1FD0) == 0x0FD0) {
                lowBank = fdLowCHR;
                lowTrigger = 0xFD;
            }
        else if( (address & 0x1FE0) == 0x0FE0) {
                lowBank = feLowCHR;
                lowTrigger = 0xFE;
        }
        else if( (address & 0x1FD0) == 0x1FD0) {
                highBank = fdHighCHR;
                highTrigger = 0xFD;
            }
        else if( (address & 0x1FE0) == 0x1FE0) {
                highBank = feHighCHR;
                highTrigger = 0xFE;
            }
        }
        return b;
    }