X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=boards%2Fn106.c;h=0b14ccfdd3adc7a4cf48984b73821801005f7d82;hp=6ccfe2b1d4ee9da1049b0c709218e4c37f302e1c;hb=43725da7349c85fa13e828fdbf20cc7ac8d298d6;hpb=92764e6252a3691033d6044b466bf716c96b62d5 diff --git a/boards/n106.c b/boards/n106.c index 6ccfe2b..0b14ccf 100644 --- a/boards/n106.c +++ b/boards/n106.c @@ -47,7 +47,7 @@ static uint8 gorko; static void NamcoSound(int Count); static void NamcoSoundHack(void); static void DoNamcoSound(int32 *Wave, int Count); -//static void DoNamcoSoundHQ(void); +static void DoNamcoSoundHQ(void); static void SyncHQ(int32 ts); static int is210; /* Lesser mapper. */ @@ -88,7 +88,9 @@ static DECLFR(Namco_Read4800) { uint8 ret=IRAM[dopol&0x7f]; /* Maybe I should call NamcoSoundHack() here? */ + #ifdef FCEUDEF_DEBUGGER if(!fceuindbg) + #endif if(dopol&0x80) dopol=(dopol&0x80)|((dopol+1)&0x7f); return ret; @@ -179,7 +181,7 @@ static DECLFW(Mapper19_write) { NamcoSoundHack(); GameExpSound.Fill=NamcoSound; - GameExpSound.HiFill=0;//DoNamcoSoundHQ; + GameExpSound.HiFill=DoNamcoSoundHQ; GameExpSound.HiSync=SyncHQ; } FixCache(dopol,V); @@ -220,16 +222,14 @@ static int dwave=0; static void NamcoSoundHack(void) { int32 z,a; -#if 0 if(FSettings.soundq>=1) { DoNamcoSoundHQ(); return; } -#endif z=((SOUNDTS<<16)/soundtsinc)>>4; a=z-dwave; - if(a) DoNamcoSound((int32 *)&Wave[dwave], a); + if(a) DoNamcoSound(&Wave[dwave], a); dwave+=a; } @@ -238,7 +238,7 @@ static void NamcoSound(int Count) int32 z,a; z=((SOUNDTS<<16)/soundtsinc)>>4; a=z-dwave; - if(a) DoNamcoSound((int32 *)&Wave[dwave], a); + if(a) DoNamcoSound(&Wave[dwave], a); dwave=0; } @@ -274,7 +274,6 @@ static INLINE uint32 FetchDuff(uint32 P, uint32 envelope) return(duff); } -#if 0 static void DoNamcoSoundHQ(void) { int32 P,V; @@ -311,7 +310,7 @@ static void DoNamcoSoundHQ(void) } CVBC=SOUNDTS; } -#endif + static void DoNamcoSound(int32 *Wave, int Count) { @@ -445,7 +444,7 @@ void Mapper19_Init(CartInfo *info) Mapper19_ESI(); AddExState(WRAM, 8192, 0, "WRAM"); - AddExState(IRAM, 128, 0, "WRAM"); + AddExState(IRAM, 128, 0, "IRAM"); AddExState(N106_StateRegs, ~0, 0, 0); if(info->battery) @@ -469,4 +468,5 @@ void Mapper210_Init(CartInfo *info) GameStateRestore=Mapper210_StateRestore; info->Power=N106_Power; AddExState(WRAM, 8192, 0, "WRAM"); + AddExState(N106_StateRegs, ~0, 0, 0); }