notaz.gp2x.de
/
fceu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
random warning fixes
[fceu.git]
/
fce.c
diff --git
a/fce.c
b/fce.c
index
098d3b9
..
282a264
100644
(file)
--- a/
fce.c
+++ b/
fce.c
@@
-56,8
+56,8
@@
#include "dprintf.h"
#include "dprintf.h"
-#ifdef
GP2X
-#include "drivers/
gp2x
/asmutils.h"
+#ifdef
__arm__
+#include "drivers/
arm
/asmutils.h"
#endif
#define Pal (PALRAM)
#endif
#define Pal (PALRAM)
@@
-98,6
+98,7
@@
static uint8 deemp=0;
static int deempcnt[8];
FCEUGI FCEUGameInfo;
static int deempcnt[8];
FCEUGI FCEUGameInfo;
+FCEUGI *GameInfo = &FCEUGameInfo;
void (*GameInterface)(int h, void *param);
void FP_FASTAPASS(1) (*PPU_hook)(uint32 A);
void (*GameInterface)(int h, void *param);
void FP_FASTAPASS(1) (*PPU_hook)(uint32 A);
@@
-631,7
+632,14
@@
static void LineUpdate(uint8 *target)
return;
}
return;
}
- if(scanline < FSettings.FirstSLine || scanline > FSettings.LastSLine)
+ if(!ScreenON)
+ {
+ tem=Pal[0]|0x40;
+ tem|=tem << 8;
+ tem|=tem << 16;
+ FCEU_dwmemset(target,tem,256);
+ }
+ else if(scanline < FSettings.FirstSLine || scanline > FSettings.LastSLine)
{
if(PPU_hook)
PRefreshLine();
{
if(PPU_hook)
PRefreshLine();
@@
-640,17
+648,7
@@
static void LineUpdate(uint8 *target)
}
else
{
}
else
{
- if(ScreenON)
- {
- BGRender(target);
- }
- else
- {
- tem=Pal[0]|0x40;
- tem|=tem << 8;
- tem|=tem << 16;
- FCEU_dwmemset(target,tem,256);
- }
+ BGRender(target);
}
if(InputScanlineHook)
}
if(InputScanlineHook)
@@
-660,7
+658,7
@@
static void LineUpdate(uint8 *target)
static void LineUpdateEnd(uint8 *target)
{
static void LineUpdateEnd(uint8 *target)
{
-#ifdef
GP2X
+#ifdef
__arm__
if(ScreenON || SpriteON) // Yes, very el-cheapo.
{
if(PPU[1]&0x01)
if(ScreenON || SpriteON) // Yes, very el-cheapo.
{
if(PPU[1]&0x01)
@@
-1117,7
+1115,7
@@
void ResetGameLoaded(void)
char lastLoadedGameName [2048];
int LoadGameLastError = 0;
int UNIFLoad(const char *name, int fp);
char lastLoadedGameName [2048];
int LoadGameLastError = 0;
int UNIFLoad(const char *name, int fp);
-int iNESLoad(const char *name, int fp);
+int iNESLoad(const char *name, int fp
, int OverwriteVidMode
);
int FDSLoad(const char *name, int fp);
int NSFLoad(int fp);
int FDSLoad(const char *name, int fp);
int NSFLoad(int fp);
@@
-1178,7
+1176,7
@@
FCEUGI *FCEUI_LoadGame(char *name)
}
GetFileBase(name2);
}
GetFileBase(name2);
- if(iNESLoad(name2,fp))
+ if(iNESLoad(name2,fp
,1
))
goto endlseq;
if(NSFLoad(fp))
goto endlseq;
goto endlseq;
if(NSFLoad(fp))
goto endlseq;
@@
-1521,9
+1519,9
@@
void ResetNES081(void)
X6502_Reset();
}
X6502_Reset();
}
-#ifndef DEBUG_ASM_6502
-static void FCEU_MemoryRand(uint8 *ptr, uint32 size)
+void FCEU_MemoryRand(uint8 *ptr, uint32 size)
{
{
+#ifndef DEBUG_ASM_6502
int x=0;
while(size)
{
int x=0;
while(size)
{
@@
-1532,8
+1530,8
@@
static void FCEU_MemoryRand(uint8 *ptr, uint32 size)
size--;
ptr++;
}
size--;
ptr++;
}
-}
#endif
#endif
+}
void PowerNES(void)
{
void PowerNES(void)
{
@@
-1544,9
+1542,8
@@
void PowerNES(void)
GeniePower();
GeniePower();
-#ifndef DEBUG_ASM_6502
FCEU_MemoryRand(RAM,0x800);
FCEU_MemoryRand(RAM,0x800);
-#
else
+#
ifdef DEBUG_ASM_6502
memset(RAM,0x00,0x800);
memset(nes_internal_ram,0x00,0x800);
#endif
memset(RAM,0x00,0x800);
memset(nes_internal_ram,0x00,0x800);
#endif