X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=nsf.c;h=52da5e5ac842ca6de45345dc323f881e81f83258;hp=7e8d3cbb46b14b4852b8c384ae1ad5db0d3f0422;hb=078eb4c0d0ff99a90f5ea0f9a9dbf9ec780650cc;hpb=92764e6252a3691033d6044b466bf716c96b62d5 diff --git a/nsf.c b/nsf.c index 7e8d3cb..52da5e5 100644 --- a/nsf.c +++ b/nsf.c @@ -100,7 +100,7 @@ static NSF_HEADER NSFHeader; void NSFMMC5_Close(void); static uint8 *ExWRAM=0; -void NSFGI(int h) +void NSFGI(int h, void *param) { switch(h) { @@ -123,6 +123,9 @@ void NSFGI(int h) break; case GI_RESETM2: case GI_POWER: NSF_init();break; + case GI_INFOSTRING: + sprintf(param, "NSF, %s", PAL?"PAL":"NTSC"); + break; } } @@ -300,6 +303,7 @@ void NSF_init(void) SetReadHandler(0x2000,0x37ff,0); SetReadHandler(0x3836,0x3FFF,0); SetReadHandler(0x3800,0x3835,NSFROMRead); + Page[0x3800>>11]=NSFROM-0x3800; // this is required for asm core to work. SetWriteHandler(0x5ff6,0x5fff,NSF_write); @@ -402,24 +406,25 @@ static int special=0; void DrawNSF(uint8 *XBuf) { char snbuf[16]; + int32 mul=0; int x; if(vismode==0) return; - memset(XBuf,0,320*240); + for (x=0;x<240;x++) + memset(XBuf+SCREEN_OFFS+x*SCREEN_WIDTH,0,256); + if(FSettings.SoundVolume) + mul=8192*240/(16384*FSettings.SoundVolume/50); { - int32 *Bufpl; - int32 mul=0; + int16 *Bufpl; int l; l=GetSoundBuffer(&Bufpl); if(special==0) { - if(FSettings.SoundVolume) - mul=8192*240/(16384*FSettings.SoundVolume/50); for(x=0;x<256;x++) { uint32 y; @@ -430,8 +435,6 @@ void DrawNSF(uint8 *XBuf) } else if(special==1) { - if(FSettings.SoundVolume) - mul=8192*240/(8192*FSettings.SoundVolume/50); for(x=0;x<256;x++) { double r; @@ -448,8 +451,6 @@ void DrawNSF(uint8 *XBuf) else if(special==2) { static double theta=0; - if(FSettings.SoundVolume) - mul=8192*240/(16384*FSettings.SoundVolume/50); for(x=0;x<128;x++) { double xc,yc;