diff --git a/include/mixer.h b/include/mixer.h index 3c02d93a..3144a8be 100644 --- a/include/mixer.h +++ b/include/mixer.h @@ -39,7 +39,6 @@ void MIXER_Enable(MIXER_Channel * chan,bool enable); /* PC Speakers functions, tightly related to the timer functions */ -void PCSPEAKER_Enable(bool enable); void PCSPEAKER_SetCounter(Bitu cntr,Bitu mode); - +void PCSPEAKER_SetType(Bitu mode); diff --git a/src/hardware/keyboard.cpp b/src/hardware/keyboard.cpp index b0f053c9..373483c6 100644 --- a/src/hardware/keyboard.cpp +++ b/src/hardware/keyboard.cpp @@ -195,17 +195,13 @@ static Bit8u read_p61(Bit32u port) { } static void write_p61(Bit32u port,Bit8u val) { - port_61_data=val; /* if (val & 128) if (!keyb.read_active) KEYBOARD_ReadBuffer(); Keys should get acknowledged just by reading 0x60. Perhaps disable controller when bit 7=1 */ - if ((val & 3)==3) { - PCSPEAKER_Enable(true); - } else { - PCSPEAKER_Enable(false); - } + if ((port_61_data ^val) & 3) PCSPEAKER_SetType(val & 3); + port_61_data=val; } static void write_p64(Bit32u port,Bit8u val) {