MSVC compatibility fixes

This commit is contained in:
Twinaphex
2014-04-15 01:59:54 -07:00
parent a5a1a476b1
commit 514448258e
20 changed files with 55 additions and 37 deletions

View File

@@ -35,11 +35,11 @@ static SFORMAT StateRegs[] =
};
static void Sync(void) {
int i;
setprg8(0x8000, prgreg[0]);
setprg8(0xa000, prgreg[1]);
setprg8(0xc000, prgreg[2]);
setprg8(0xe000, prgreg[3]);
int i;
for (i = 0; i < 8; i++)
setchr1(i << 10, chrreg[i]);
setmirror(mirror ^ 1);

View File

@@ -81,12 +81,12 @@ static void MRestore(int version) {
}
void Mapper185_Init(CartInfo *info) {
int x;
Sync = Sync185;
info->Power = MPower;
info->Close = MClose;
GameStateRestore = MRestore;
DummyCHR = (uint8*)FCEU_gmalloc(8192);
int x;
for (x = 0; x < 8192; x++)
DummyCHR[x] = 0xff;
SetupCartCHRMapping(0x10, DummyCHR, 8192, 0);
@@ -94,12 +94,12 @@ void Mapper185_Init(CartInfo *info) {
}
void Mapper181_Init(CartInfo *info) {
int x;
Sync = Sync181;
info->Power = MPower;
info->Close = MClose;
GameStateRestore = MRestore;
DummyCHR = (uint8*)FCEU_gmalloc(8192);
int x;
for (x = 0; x < 8192; x++)
DummyCHR[x] = 0xff;
SetupCartCHRMapping(0x10, DummyCHR, 8192, 0);

View File

@@ -31,9 +31,9 @@ static SFORMAT StateRegs[] =
};
static void Sync(void) {
int x;
setchr2(0x0000, DRegs[0]);
setchr2(0x0800, DRegs[1]);
int x;
for (x = 0; x < 4; x++)
setchr1(0x1000 + (x << 10), DRegs[2 + x]);
setprg8(0x8000, DRegs[6]);

View File

@@ -50,9 +50,9 @@ static void M222IRQ(void) {
}
static void Sync(void) {
int i;
setprg8(0x8000, prg_reg[0]);
setprg8(0xA000, prg_reg[1]);
int i;
for (i = 0; i < 8; i++)
setchr1(i << 10, chr_reg[i]);
setmirror(mirr ^ 1);

View File

@@ -34,6 +34,7 @@ static SFORMAT StateRegs[] =
};
static void Sync(void) {
uint8 i;
uint16 swap = ((mirr & 2) << 13);
setmirror((mirr & 1) ^ 1);
setprg8r(0x10, 0x6000, 0);
@@ -41,7 +42,6 @@ static void Sync(void) {
setprg8(0xA000, preg[1]);
setprg8(0xC000 ^ swap, ~1);
setprg8(0xE000, ~0);
uint8 i;
for (i = 0; i < 8; i++)
setchr1(i << 10, creg[i]);
}

View File

@@ -50,11 +50,11 @@ static void UNLAX5705IRQ(void) {
}*/
static void Sync(void) {
int i;
setprg8(0x8000, prg_reg[0]);
setprg8(0xA000, prg_reg[1]);
setprg8(0xC000, ~1);
setprg8(0xE000, ~0);
int i;
for (i = 0; i < 8; i++)
setchr1(i << 10, chr_reg[i]);
setmirror(mirr ^ 1);

View File

@@ -40,10 +40,10 @@ static SFORMAT StateRegs[] =
};
static void Sync(void) {
int i;
setprg32(0x8000, prg_reg >> 2);
if (!prg_mode)
setprg8(0xC000, prg_reg);
int i;
for (i = 0; i < 8; i++)
setchr1(i << 10, chr_reg[i]);
switch (mirr) {

View File

@@ -330,10 +330,10 @@ static void DoNamcoSound(int32 *Wave, int Count) {
}
static void Mapper19_StateRestore(int version) {
int x;
SyncPRG();
FixNTAR();
FixCRR();
int x;
for (x = 0x40; x < 0x80; x++)
FixCache(x, IRAM[x]);
}