small fixes

This commit is contained in:
dborth 2009-07-17 18:01:31 +00:00
parent 6cd1e80ef1
commit a44b9cf52e
4 changed files with 33 additions and 111 deletions

View File

@ -1,90 +0,0 @@
my_list = Split("""
01-222.cpp
103.cpp
106.cpp
108.cpp
112.cpp
117.cpp
120.cpp
121.cpp
15.cpp
164.cpp
175.cpp
176.cpp
177.cpp
178.cpp
179.cpp
183.cpp
185.cpp
186.cpp
187.cpp
189.cpp
199.cpp
208.cpp
222.cpp
23.cpp
235.cpp
3d-block.cpp
411120-c.cpp
43.cpp
57.cpp
603-5052.cpp
68.cpp
8157.cpp
8237.cpp
830118C.cpp
88.cpp
90.cpp
95.cpp
a9711.cpp
a9746.cpp
addrlatch.cpp
ax5705.cpp
bandai.cpp
bmc13in1jy110.cpp
bmc42in1r.cpp
bmc64in1nr.cpp
bmc70in1.cpp
bonza.cpp
bs-5.cpp
copyfami_mmc3.cpp
dance.cpp
datalatch.cpp
deirom.cpp
dream.cpp
__dummy_mapper.cpp
edu2000.cpp
fk23c.cpp
ghostbusters63in1.cpp
gs-2004.cpp
gs-2013.cpp
h2288.cpp
karaoke.cpp
kof97.cpp
konami-qtai.cpp
ks7032.cpp
malee.cpp
mmc1.cpp
mmc3.cpp
mmc5.cpp
n-c22m.cpp
n106.cpp
n625092.cpp
novel.cpp
sachen.cpp
sc-127.cpp
sheroes.cpp
sl1632.cpp
smb2j.cpp
subor.cpp
super24.cpp
supervision.cpp
t-227-1.cpp
t-262.cpp
tengen.cpp
tf-1201.cpp
""")
for x in range(len(my_list)):
my_list[x] = 'boards/' + my_list[x]
Return('my_list')

View File

@ -65,8 +65,12 @@
#include "drivers/win/memwatch.h" #include "drivers/win/memwatch.h"
#include "drivers/win/tracer.h" #include "drivers/win/tracer.h"
#else #else
#ifdef GEKKO
#include "driver.h"
#else
#include "drivers/sdl/sdl.h" #include "drivers/sdl/sdl.h"
#endif #endif
#endif
using namespace std; using namespace std;
@ -284,7 +288,7 @@ static void AllocBuffers()
void win_AllocBuffers(uint8 **GameMemBlock, uint8 **RAM); void win_AllocBuffers(uint8 **GameMemBlock, uint8 **RAM);
win_AllocBuffers(&GameMemBlock, &RAM); win_AllocBuffers(&GameMemBlock, &RAM);
#else #else
GameMemBlock = (uint8*)FCEU_gmalloc(131072); GameMemBlock = (uint8*)FCEU_gmalloc(131072);
RAM = (uint8*)FCEU_gmalloc(0x800); RAM = (uint8*)FCEU_gmalloc(0x800);
@ -296,7 +300,7 @@ static void FreeBuffers() {
#ifdef _USE_SHARED_MEMORY_ #ifdef _USE_SHARED_MEMORY_
void win_FreeBuffers(uint8 *GameMemBlock, uint8 *RAM); void win_FreeBuffers(uint8 *GameMemBlock, uint8 *RAM);
win_FreeBuffers(GameMemBlock, RAM); win_FreeBuffers(GameMemBlock, RAM);
#else #else
FCEU_free(GameMemBlock); FCEU_free(GameMemBlock);
FCEU_free(RAM); FCEU_free(RAM);
#endif #endif
@ -306,7 +310,7 @@ static void FreeBuffers() {
uint8 PAL=0; uint8 PAL=0;
static DECLFW(BRAML) static DECLFW(BRAML)
{ {
RAM[A]=V; RAM[A]=V;
#ifdef _S9XLUA_H #ifdef _S9XLUA_H
FCEU_LuaWriteInform(); FCEU_LuaWriteInform();
@ -604,7 +608,7 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
r = FCEUPPU_Loop(skip); r = FCEUPPU_Loop(skip);
if (skip != 2) ssize=FlushEmulateSound(); //If skip = 2 we are skipping sound processing if (skip != 2) ssize=FlushEmulateSound(); //If skip = 2 we are skipping sound processing
#ifdef WIN32 #ifdef WIN32
//These Windows only dialogs need to be updated only once per frame so they are included here //These Windows only dialogs need to be updated only once per frame so they are included here
UpdateCheatList(); UpdateCheatList();
@ -623,12 +627,12 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
*SoundBuf=0; *SoundBuf=0;
*SoundBufSize=0; *SoundBufSize=0;
} }
else else
{ {
*SoundBuf=WaveFinal; *SoundBuf=WaveFinal;
*SoundBufSize=ssize; *SoundBufSize=ssize;
} }
if (EmulationPaused&2 && ( !frameAdvanceLagSkip || !lagFlag) ) if (EmulationPaused&2 && ( !frameAdvanceLagSkip || !lagFlag) )
//Lots of conditions here. EmulationPaused&2 must be true. In addition frameAdvanceLagSkip or lagFlag must be false //Lots of conditions here. EmulationPaused&2 must be true. In addition frameAdvanceLagSkip or lagFlag must be false
{ {
@ -638,12 +642,12 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
if(soundoptions&SO_MUTEFA) //mute the frame advance if the user requested it if(soundoptions&SO_MUTEFA) //mute the frame advance if the user requested it
*SoundBufSize=0; //keep sound muted *SoundBufSize=0; //keep sound muted
#endif #endif
} }
currMovieData.TryDumpIncremental(); currMovieData.TryDumpIncremental();
if (lagFlag) if (lagFlag)
{ {
lagCounter++; lagCounter++;
justLagged = true; justLagged = true;
@ -655,8 +659,8 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
} }
void FCEUI_CloseGame(void) void FCEUI_CloseGame(void)
{ {
if(!FCEU_IsValidUI(FCEUI_CLOSEGAME)) if(!FCEU_IsValidUI(FCEUI_CLOSEGAME))
return; return;
CloseGame(); CloseGame();
} }
@ -693,7 +697,7 @@ void hand(X6502 *X, int type, unsigned int A)
} }
int suppressAddPowerCommand=0; // hack... yeah, I know... int suppressAddPowerCommand=0; // hack... yeah, I know...
void PowerNES(void) void PowerNES(void)
{ {
//void MapperInit(); //void MapperInit();
//MapperInit(); //MapperInit();
@ -732,7 +736,7 @@ void PowerNES(void)
extern int disableBatteryLoading; extern int disableBatteryLoading;
if(disableBatteryLoading) if(disableBatteryLoading)
GameInterface(GI_RESETSAVE); GameInterface(GI_RESETSAVE);
timestampbase=0; timestampbase=0;
LagCounterReset(); LagCounterReset();
@ -749,9 +753,9 @@ void FCEU_ResetVidSys(void)
int w; int w;
if(GameInfo->vidsys==GIV_NTSC) if(GameInfo->vidsys==GIV_NTSC)
w=0; w=0;
else if(GameInfo->vidsys==GIV_PAL) else if(GameInfo->vidsys==GIV_PAL)
w=1; w=1;
else else
w=FSettings.PAL; w=FSettings.PAL;
@ -891,7 +895,7 @@ void UpdateAutosave(void)
{ {
if(!EnableAutosave) if(!EnableAutosave)
return; return;
char * f; char * f;
AutosaveCounter = (AutosaveCounter + 1) % 256; AutosaveCounter = (AutosaveCounter + 1) % 256;
if(AutosaveCounter == 0) if(AutosaveCounter == 0)
@ -1075,7 +1079,7 @@ bool FCEUXLoad(const char *name, FCEUFILE *fp)
cart->chrPages = head.VROM_size; cart->chrPages = head.VROM_size;
cart->mirroring = (head.ROM_type&1); cart->mirroring = (head.ROM_type&1);
if(head.ROM_type&8) cart->mirroring=2; if(head.ROM_type&8) cart->mirroring=2;
//skip trainer //skip trainer
@ -1097,7 +1101,7 @@ bool FCEUXLoad(const char *name, FCEUFILE *fp)
ResetCartMapping(); ResetCartMapping();
SetupCartPRGMapping(0,(uint8*)cart->PRG,cart->prgSize,0); SetupCartPRGMapping(0,(uint8*)cart->PRG,cart->prgSize,0);
SetupCartCHRMapping(0,(uint8*)cart->CHR,cart->chrSize,0); SetupCartCHRMapping(0,(uint8*)cart->CHR,cart->chrSize,0);
return true; return true;
} }
@ -1108,4 +1112,4 @@ uint8 FCEU_ReadRomByte(uint32 i) {
if(i < 16+PRGsize[0])return PRGptr[0][i-16]; if(i < 16+PRGsize[0])return PRGptr[0][i-16];
if(i < 16+PRGsize[0]+CHRsize[0])return CHRptr[0][i-16-PRGsize[0]]; if(i < 16+PRGsize[0]+CHRsize[0])return CHRptr[0][i-16-PRGsize[0]];
return 0; return 0;
} }

View File

@ -122,7 +122,9 @@ void iNESGI(GI h) //bbit edited: removed static keyword
break; break;
case GI_CLOSE: case GI_CLOSE:
{ {
#ifndef GEKKO
FCEU_SaveGameSave(&iNESCart); FCEU_SaveGameSave(&iNESCart);
#endif
if(iNESCart.Close) iNESCart.Close(); if(iNESCart.Close) iNESCart.Close();
#ifdef _USE_SHARED_MEMORY_ #ifdef _USE_SHARED_MEMORY_
@ -696,7 +698,9 @@ int iNESLoad(const char *name, FCEUFILE *fp, int OverwriteVidMode)
GameInfo->mappernum = MapperNo; GameInfo->mappernum = MapperNo;
MapperInit(); MapperInit();
#ifndef GEKKO
FCEU_LoadGameSave(&iNESCart); FCEU_LoadGameSave(&iNESCart);
#endif
strcpy(LoadedRomFName,name); //bbit edited: line added strcpy(LoadedRomFName,name); //bbit edited: line added
GameInterface=iNESGI; GameInterface=iNESGI;

View File

@ -545,7 +545,9 @@ static void UNIFGI(GI h)
if(UNIFchrrama) memset(UNIFchrrama,0,8192); if(UNIFchrrama) memset(UNIFchrrama,0,8192);
break; break;
case GI_CLOSE: case GI_CLOSE:
#ifndef GEKKO
FCEU_SaveGameSave(&UNIFCart); FCEU_SaveGameSave(&UNIFCart);
#endif
if(UNIFCart.Close) if(UNIFCart.Close)
UNIFCart.Close(); UNIFCart.Close();
FreeUNIF(); FreeUNIF();
@ -591,8 +593,10 @@ int UNIFLoad(const char *name, FCEUFILE *fp)
if(!InitializeBoard()) if(!InitializeBoard())
goto aborto; goto aborto;
#ifndef GEKKO
FCEU_LoadGameSave(&UNIFCart); FCEU_LoadGameSave(&UNIFCart);
#endif
GameInterface=UNIFGI; GameInterface=UNIFGI;
return 1; return 1;