notaz.gp2x.de
/
fceu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge x6502 code FCEUX
[fceu.git]
/
sound.c
diff --git
a/sound.c
b/sound.c
index
f95b050
..
f0eeaf8
100644
(file)
--- a/
sound.c
+++ b/
sound.c
@@
-40,6
+40,7
@@
#include "sound.h"
uint32 Wave[2048+512];
#include "sound.h"
uint32 Wave[2048+512];
+int32 WaveHi[40000]; // unused
int16 WaveFinalMono[2048+512];
EXPSOUND GameExpSound={0,0,0,0,0,0};
int16 WaveFinalMono[2048+512];
EXPSOUND GameExpSound={0,0,0,0,0,0};
@@
-554,6
+555,31
@@
static void FASTAPASS(1) CalcRectAmp(int P)
*b=V;
}
*b=V;
}
+void FCEU_SoundCPUHook(int cycles48)
+{
+ fhcnt-=cycles48;
+ if(fhcnt<=0)
+ {
+ FrameSoundUpdate();
+ fhcnt+=fhinc;
+ }
+
+ if(PCMIRQCount>0)
+ {
+ PCMIRQCount-=cycles48;
+ if(PCMIRQCount<=0)
+ {
+ vdis=1;
+ if((PSG[0x10]&0x80) && !(PSG[0x10]&0x40))
+ {
+ extern uint8 SIRQStat;
+ SIRQStat|=0x80;
+ X6502_IRQBegin(FCEU_IQDPCM);
+ }
+ }
+ }
+}
+
static void RDoPCM(int32 end)
{
int32 V;
static void RDoPCM(int32 end)
{
int32 V;