-static void DoAYNoise(void)
-{
- int V;
- uint32 freq;
- unsigned char amp;
- int32 start,end;
-
- start=CAYBC[3];
- end=(timestamp<<16)/soundtsinc;
- if(end<=start) return;
- CAYBC[3]=end;
-
- amp=0;
- for(V=0;V<3;V++)
- {
- if(!(MapperExRAM[0x7]&(8<<V)))
- {
- //if(MapperExRAM[0x8+V]&0x10) amp+=MapperExRAM[0x20]&15;
- //else
- amp+=MapperExRAM[0x8+V]&15;
- }
- }
- amp<<=3;
-
- if(amp)
- {
- freq=PSG_base/(MapperExRAM[0x6]+1);
- if(freq>44100)
- inc=((freq<<11)/(FSettings.SndRate OVERSAMPLE))<<4;
- else
- inc=(freq<<15)/(FSettings.SndRate OVERSAMPLE);