From 3c9284193ebe6fab4812bc27f00be8878ad434f0 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Sun, 30 Mar 2003 22:53:08 +0000 Subject: [PATCH] Changes for new pc-speaker effects. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@849 --- include/mixer.h | 3 +-- src/hardware/keyboard.cpp | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-) 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) {