notaz.gp2x.de
/
fceu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
partially working menu
[fceu.git]
/
fce.c
diff --git
a/fce.c
b/fce.c
index
d3a0f61
..
38680f9
100644
(file)
--- a/
fce.c
+++ b/
fce.c
@@
-203,6
+203,9
@@
void FlushGenieRW(void)
ARead[x+0x8000]=AReadG[x];
BWrite[x+0x8000]=BWriteG[x];
}
ARead[x+0x8000]=AReadG[x];
BWrite[x+0x8000]=BWriteG[x];
}
+#ifdef ASM_6502
+ GenieSetPages(1);
+#endif
free(AReadG);
free(BWriteG);
AReadG=0;
free(AReadG);
free(BWriteG);
AReadG=0;
@@
-586,7
+589,7
@@
static void Loop6502(void)
#endif
if(ScreenON)
{
#endif
if(ScreenON)
{
- if(scanline>=FSettings.FirstSLine && scanline<=Settings.LastSLine)
+ if(scanline>=FSettings.FirstSLine && scanline<=
F
Settings.LastSLine)
BGRender(target);
else
{
BGRender(target);
else
{
@@
-1089,7
+1092,7
@@
FCEUGI *FCEUI_LoadGame(char *name)
int have_movie = 0;
int fp;
int have_movie = 0;
int fp;
- Exit=1;
+
//
Exit=1;
ResetGameLoaded();
strncpy(name2, name, sizeof(name2));
ResetGameLoaded();
strncpy(name2, name, sizeof(name2));
@@
-1111,6
+1114,8
@@
FCEUGI *FCEUI_LoadGame(char *name)
FCEU_fclose(fp);
*p = 0;
fp=FCEU_fopen(name2,"rb");
FCEU_fclose(fp);
*p = 0;
fp=FCEU_fopen(name2,"rb");
+ if (!fp && p - name2 > 2) p[-2] = 0;
+ fp=FCEU_fopen(name2,"rb");
if (!fp) {
printf("no ROM for movie\n");
return 0;
if (!fp) {
printf("no ROM for movie\n");
return 0;
@@
-1187,7
+1192,7
@@
void FCEU_ResetVidSys(void)
FSettings.FirstSLine=FSettings.UsrFirstSLine[0];
FSettings.LastSLine=FSettings.UsrLastSLine[0];
}
FSettings.FirstSLine=FSettings.UsrFirstSLine[0];
FSettings.LastSLine=FSettings.UsrLastSLine[0];
}
- printf("PAL = %i\n", PAL);
+ printf("
ResetVidSys:
PAL = %i\n", PAL);
SetSoundVariables();
}
SetSoundVariables();
}
@@
-1353,7
+1358,7
@@
update:
if(Exit)
{
if(Exit)
{
- CloseGame();
+
//
CloseGame();
break;
}
break;
}
@@
-1425,6
+1430,18
@@
void ResetNES(void)
X6502_Reset();
}
X6502_Reset();
}
+static void FCEU_MemoryRand(uint8 *ptr, uint32 size)
+{
+ int x=0;
+ while(size)
+ {
+ *ptr=(x&4)?0xFF:0x00;
+ x++;
+ size--;
+ ptr++;
+ }
+}
+
void PowerNES(void)
{
if(!GameLoaded) return;
void PowerNES(void)
{
if(!GameLoaded) return;
@@
-1434,12
+1451,20
@@
void PowerNES(void)
GeniePower();
GeniePower();
+#ifndef DEBUG_ASM_6502
+ FCEU_MemoryRand(RAM,0x800);
+#else
memset(RAM,0x00,0x800);
memset(RAM,0x00,0x800);
+#endif
ResetMapping();
GameInterface(GI_POWER);
PowerSound();
PowerPPU();
timestampbase=0;
ResetMapping();
GameInterface(GI_POWER);
PowerSound();
PowerPPU();
timestampbase=0;
+#ifdef ASM_6502
+ if (geniestage)
+ GenieSetPages(0);
+#endif
X6502_Power();
}
X6502_Power();
}