public void handler(int offset, int data) {
            /*
             Z80 bank register for music note data. It's odd that it isn't encrypted
             though.
             */
            UBytePtr RAM = memory_region(REGION_CPU2);
            int bankaddress = 0x10000 + ((data & 0x0f) * 0x4000);
            if (bankaddress >= memory_region_length(REGION_CPU2)) {
                if (errorlog != null) {
                    fprintf(errorlog, "WARNING: Q sound bank overflow (%02x)\n", data);
                }
                bankaddress = 0x10000;
            }
            cpu_setbank(1, new UBytePtr(RAM, bankaddress));
        }