From fe46abe6ff042dc45aba4c8d4c12c7ecfb217552 Mon Sep 17 00:00:00 2001 From: ripsaw8080 Date: Fri, 5 Feb 2016 13:29:17 +0000 Subject: [PATCH] Speaker init in BIOS causes samples to be generated at startup, so for now move it to hardware. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3959 --- src/hardware/pcspeaker.cpp | 3 ++- src/ints/bios.cpp | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/hardware/pcspeaker.cpp b/src/hardware/pcspeaker.cpp index 2f22d35a..d426a66c 100644 --- a/src/hardware/pcspeaker.cpp +++ b/src/hardware/pcspeaker.cpp @@ -332,7 +332,8 @@ public: spkr.last_ticks=0; spkr.last_index=0; spkr.rate=section->Get_int("pcrate"); - spkr.pit_max=(1000.0f/PIT_TICK_RATE)*65535; + spkr.pit_mode=3; + spkr.pit_max=(1000.0f/PIT_TICK_RATE)*1320; spkr.pit_half=spkr.pit_max/2; spkr.pit_new_max=spkr.pit_max; spkr.pit_new_half=spkr.pit_half; diff --git a/src/ints/bios.cpp b/src/ints/bios.cpp index c2b087ae..77e92ae9 100644 --- a/src/ints/bios.cpp +++ b/src/ints/bios.cpp @@ -1254,10 +1254,6 @@ public: config |= 0x1000; mem_writew(BIOS_CONFIGURATION,config); CMOS_SetRegister(0x14,(Bit8u)(config&0xff)); //Should be updated on changes - /* Setup PC speaker initial state - real BIOS does this for POST beeps */ - IO_Write(0x43,0xb6); // PIT 2 mode 3 - IO_Write(0x42,0x28); // counter 1320 - IO_Write(0x42,0x05); /* Setup extended memory size */ IO_Write(0x70,0x30); size_extended=IO_Read(0x71);