public void handler(int offset, int data) {

            if ((data & 0x00ff0000) == 0) {
                /* bit 0 is data */
                /* bit 1 is cs (active low) */
                /* bit 2 is clock (active high) */
                EEPROM_write_bit(data & 0x01);
                EEPROM_set_cs_line((data & 0x02) != 0 ? CLEAR_LINE : ASSERT_LINE);
                EEPROM_set_clock_line((data & 0x04) != 0 ? ASSERT_LINE : CLEAR_LINE);

                /* bit 5 triggers IRQ on sound cpu */
                if (last_thndrx2 == 0 && (data & 0x20) != 0) {
                    cpu_cause_interrupt(1, 0xff);
                }
                last_thndrx2 = data & 0x20;

                /* bit 6 = enable char ROM reading through the video RAM */
                K052109_set_RMRD_line((data & 0x40) != 0 ? ASSERT_LINE : CLEAR_LINE);
            }
        }