From f878b8abae77a5e1c584f151200b72f7cd2bb1be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 25 Jan 2014 16:23:27 +0000 Subject: [PATCH] [NTVDM] Welcome sound in Advanced NetWars! However it won't work totally due to problems in the PIT or in the sound emulation (and as a result, the emulator will "hang"). svn path=/branches/ntvdm/; revision=61809 --- subsystems/ntvdm/bios/bios.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/subsystems/ntvdm/bios/bios.c b/subsystems/ntvdm/bios/bios.c index 3d133dce598..cad2c6c19f7 100644 --- a/subsystems/ntvdm/bios/bios.c +++ b/subsystems/ntvdm/bios/bios.c @@ -269,10 +269,23 @@ static VOID BiosHwSetup(VOID) IOWriteB(PIC_SLAVE_DATA , 0xFF); - /* Initialize the PIT */ + /* Initialize PIT Counter 0 */ IOWriteB(PIT_COMMAND_PORT, 0x34); IOWriteB(PIT_DATA_PORT(0), 0x00); IOWriteB(PIT_DATA_PORT(0), 0x00); + // PitSetGate(0, TRUE); + + /* Initialize PIT Counter 1 */ + IOWriteB(PIT_COMMAND_PORT, 0x74); + IOWriteB(PIT_DATA_PORT(1), 0x00); + IOWriteB(PIT_DATA_PORT(1), 0x00); + // PitSetGate(1, TRUE); + + /* Initialize PIT Counter 2 */ + IOWriteB(PIT_COMMAND_PORT, 0xB4); + IOWriteB(PIT_DATA_PORT(2), 0x00); + IOWriteB(PIT_DATA_PORT(2), 0x00); + // PitSetGate(2, FALSE); // PitSetGate(2, TRUE); EnableHwIRQ(0, BiosTimerIrq); }