X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=sound.c;h=7d56a2d23ed5a9b41f9ad4653af6dac29b3e0c71;hp=9fb321662f801b01647a4fca8d7ec6daf7495a18;hb=92764e6252a3691033d6044b466bf716c96b62d5;hpb=d97315ac0bca825d2d50a44453bc5652946e2c67 diff --git a/sound.c b/sound.c index 9fb3216..7d56a2d 100644 --- a/sound.c +++ b/sound.c @@ -845,6 +845,7 @@ static void RDoNoise(void) DECLFW(Write_IRQFM) { + PSG[0x17]=V; V=(V&0xC0)>>6; fcnt=0; if(V&0x2) @@ -853,7 +854,7 @@ DECLFW(Write_IRQFM) fhcnt=fhinc; X6502_IRQEnd(FCEU_IQFCOUNT); SIRQStat&=~0x40; -// IRQFrameMode=V; + //IRQFrameMode=V; // IRQFrameMode is PSG[0x17] upper bits } void SetNESSoundMap(void) @@ -865,7 +866,7 @@ void SetNESSoundMap(void) SetReadHandler(0x4015,0x4015,Read_PSG); } -static int32 WaveNSF[256]; +static int32 WaveNSF[2048]; int32 highp; // 0 through 65536, 0 = no high pass, 65536 = max high pass @@ -951,12 +952,12 @@ int FlushEmulateSound(void) // printf("count %d, num ints %d\n", end, (end >> 4)); if(FCEUGameInfo.type==GIT_NSF) { - printf("IS NSF"); - int x,s=0,si=end/1024; // Only want 1/4 of the output buffer to be displayed - for(x=0;x<256;x++) + int x;//,s=0,si=end/1024; + for(x=0;x<1024;x++) { - WaveNSF[x]=WaveFinal[s>>4]; - s+=si; + //WaveNSF[x]=WaveFinal[s>>4]; + WaveNSF[x]=WaveFinalMono[x]; + //s+=si; } } @@ -1072,5 +1073,5 @@ void FCEUI_Sound(int Rate) void FCEUI_SetSoundVolume(uint32 volume) { - FSettings.SoundVolume=(volume<<16)/100; + FSettings.SoundVolume=volume; }