public void handler(int offset, int data) {
            int bankaddress;
            UBytePtr rom = memory_region(REGION_CPU1);

            bankaddress = 0x10000 + (((data & 0x04) >> 2) * 0x4000) + (((data & 0x40) >> 5) * 0x4000);
            cpu_setbank(1, new UBytePtr(rom, bankaddress));

            bankswitch = data;
        }