notaz.gp2x.de
/
fceu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
098 renderer added
[fceu.git]
/
nsf.c
diff --git
a/nsf.c
b/nsf.c
index
7e8d3cb
..
52da5e5
100644
(file)
--- a/
nsf.c
+++ b/
nsf.c
@@
-100,7
+100,7
@@
static NSF_HEADER NSFHeader;
void NSFMMC5_Close(void);
\r
static uint8 *ExWRAM=0;
\r
\r
void NSFMMC5_Close(void);
\r
static uint8 *ExWRAM=0;
\r
\r
-void NSFGI(int h)
\r
+void NSFGI(int h
, void *param
)
\r
{
\r
switch(h)
\r
{
\r
{
\r
switch(h)
\r
{
\r
@@
-123,6
+123,9
@@
void NSFGI(int h)
break;
\r
case GI_RESETM2:
\r
case GI_POWER: NSF_init();break;
\r
break;
\r
case GI_RESETM2:
\r
case GI_POWER: NSF_init();break;
\r
+ case GI_INFOSTRING:
\r
+ sprintf(param, "NSF, %s", PAL?"PAL":"NTSC");
\r
+ break;
\r
}
\r
}
\r
\r
}
\r
}
\r
\r
@@
-300,6
+303,7
@@
void NSF_init(void)
SetReadHandler(0x2000,0x37ff,0);
\r
SetReadHandler(0x3836,0x3FFF,0);
\r
SetReadHandler(0x3800,0x3835,NSFROMRead);
\r
SetReadHandler(0x2000,0x37ff,0);
\r
SetReadHandler(0x3836,0x3FFF,0);
\r
SetReadHandler(0x3800,0x3835,NSFROMRead);
\r
+ Page[0x3800>>11]=NSFROM-0x3800; // this is required for asm core to work.
\r
\r
SetWriteHandler(0x5ff6,0x5fff,NSF_write);
\r
\r
\r
SetWriteHandler(0x5ff6,0x5fff,NSF_write);
\r
\r
@@
-402,24
+406,25
@@
static int special=0;
void DrawNSF(uint8 *XBuf)
\r
{
\r
char snbuf[16];
\r
void DrawNSF(uint8 *XBuf)
\r
{
\r
char snbuf[16];
\r
+ int32 mul=0;
\r
int x;
\r
\r
if(vismode==0) return;
\r
\r
int x;
\r
\r
if(vismode==0) return;
\r
\r
- memset(XBuf,0,320*240);
\r
+ for (x=0;x<240;x++)
\r
+ memset(XBuf+SCREEN_OFFS+x*SCREEN_WIDTH,0,256);
\r
\r
\r
+ if(FSettings.SoundVolume)
\r
+ mul=8192*240/(16384*FSettings.SoundVolume/50);
\r
\r
{
\r
\r
{
\r
- int32 *Bufpl;
\r
- int32 mul=0;
\r
+ int16 *Bufpl;
\r
\r
int l;
\r
l=GetSoundBuffer(&Bufpl);
\r
\r
if(special==0)
\r
{
\r
\r
int l;
\r
l=GetSoundBuffer(&Bufpl);
\r
\r
if(special==0)
\r
{
\r
- if(FSettings.SoundVolume)
\r
- mul=8192*240/(16384*FSettings.SoundVolume/50);
\r
for(x=0;x<256;x++)
\r
{
\r
uint32 y;
\r
for(x=0;x<256;x++)
\r
{
\r
uint32 y;
\r
@@
-430,8
+435,6
@@
void DrawNSF(uint8 *XBuf)
}
\r
else if(special==1)
\r
{
\r
}
\r
else if(special==1)
\r
{
\r
- if(FSettings.SoundVolume)
\r
- mul=8192*240/(8192*FSettings.SoundVolume/50);
\r
for(x=0;x<256;x++)
\r
{
\r
double r;
\r
for(x=0;x<256;x++)
\r
{
\r
double r;
\r
@@
-448,8
+451,6
@@
void DrawNSF(uint8 *XBuf)
else if(special==2)
\r
{
\r
static double theta=0;
\r
else if(special==2)
\r
{
\r
static double theta=0;
\r
- if(FSettings.SoundVolume)
\r
- mul=8192*240/(16384*FSettings.SoundVolume/50);
\r
for(x=0;x<128;x++)
\r
{
\r
double xc,yc;
\r
for(x=0;x<128;x++)
\r
{
\r
double xc,yc;
\r