public int handler(int offset) {
            int res;
            /* bit 0 is EEPROM data */
            /* bit 1 is EEPROM ready */
            /* bit 2 is VBLANK (???) */
            /* bit 7 is service button */
            res = EEPROM_read_bit() | input_port_3_r.handler(0);
            if (init_eeprom_count != 0) {
                init_eeprom_count--;
                res &= 0x7f;
            }
            toggle_ss ^= 0x04;
            return res ^ toggle_ss;
        }