From 090ce3201db4f3ba4ac08673de7f9758d00340db Mon Sep 17 00:00:00 2001 From: qeed Date: Fri, 12 Jun 2009 15:23:31 +0000 Subject: [PATCH] default the NoiseFreqTable to the NTSC one, to avoid cases where there might be NULL dereference --- src/sound.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/sound.cpp b/src/sound.cpp index 289c7571..0f37263a 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -103,7 +103,7 @@ static const uint32 NoiseFreqTablePAL[0x10] = 236, 354, 472, 708, 944, 1890, 3778 }; -static const uint32 *NoiseFreqTable; +static const uint32 *NoiseFreqTable = NoiseFreqTableNTSC; static const uint32 NTSCDMCTable[0x10]= { @@ -973,12 +973,20 @@ DECLFW(Write_IRQFM) FrameSoundUpdate(); fcnt=1; fhcnt=fhinc; +<<<<<<< .mine + if (V & 0x01) + { + X6502_IRQEnd(FCEU_IQFCOUNT); + SIRQStat&=~0x40; + } +======= //X6502_IRQEnd(FCEU_IQFCOUNT); if (V & 0x1) { X6502_IRQEnd(FCEU_IQFCOUNT); SIRQStat&=~0x40; } +>>>>>>> .r1322 IRQFrameMode=V; }