public void handler(int offset, int data) {
            kingball_sound = (kingball_sound & ~0x01) | data;
            if (errorlog != null) {
                fprintf(errorlog, "kingball_sample latch: %02x (%02x)\n", kingball_sound, data);
            }
        }