public void handler(int offset, int data) {

            /* Bit 0-2 Explosion select (triggered by Bit 2 of the other port */
            if (start_explosion != 0) {
                if ((data & 0x04) != 0) {
                    /* This is really a compound effect, made up of I believe 3 sound
                     effects, but since our sample contains them all, disable playing
                     the other effects while the explosion is playing */
                    if (bosskill_playing == 0) {
                        sample_start(CHANNEL_EXPLOSION, SAMPLE_BOSSKILL, 0);
                        bosskill_playing = 1;
                    }
                } else if ((data & 0x02) != 0) {
                    sample_start(CHANNEL_EXPLOSION, SAMPLE_BOSSHIT, 0);
                } else if ((data & 0x01) != 0) {
                    sample_start(CHANNEL_EXPLOSION, SAMPLE_EKILLED, 0);
                } else {
                    if (death_playing == 0) {
                        sample_start(CHANNEL_EXPLOSION, SAMPLE_DEATH, 0);
                        death_playing = 1;
                    }
                }

                start_explosion = 0;
            }

            /* Bit 3 - Low Fuel Warning */
            if ((data & 0x08) != 0 && (last_b & 0x08) == 0) {
                sample_start(CHANNEL_FUEL, SAMPLE_FUEL, 0);
            }

            last_b = data;
        }