public int handler(int offs) {
            UBytePtr RAM = memory_region(REGION_CPU1);

            int data = (RAM.read(0x28d2) << 8) | RAM.read(0x28d3);

            if (data < memory_region_length(REGION_CPU1)) {
                data = (RAM.read(data) << 8) | RAM.read(data + 1);

                if (data == 0xffff) {
                    cpu_spinuntil_int();
                }
            }

            return RAM.read(0x28d2);
        }