(mapper) Silence -Wunused-variablewarning
This commit is contained in:
@@ -56,7 +56,7 @@ static DECLFR(ReadLow) {
|
||||
case 0x5100: return reg[2] | reg[0] | reg[1] | (reg[3] ^ 0xff); break;
|
||||
case 0x5500:
|
||||
if (trigger)
|
||||
return reg[2] | reg[1]; // Lei Dian Huang Bi Ka Qiu Chuan Shuo (NJ046) may broke other games
|
||||
return reg[2] | reg[1]; /* Lei Dian Huang Bi Ka Qiu Chuan Shuo (NJ046) may broke other games */
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
@@ -72,8 +72,8 @@ static void M163HB(void) {
|
||||
setchr4(0x0000, 1);
|
||||
setchr4(0x1000, 1);
|
||||
}
|
||||
/*
|
||||
if(scanline>=127) // Hu Lu Jin Gang (NJ039) (Ch) [!] don't like it
|
||||
#if 0
|
||||
if(scanline>=127) /* Hu Lu Jin Gang (NJ039) (Ch) [!] don't like it */
|
||||
{
|
||||
setchr4(0x0000,1);
|
||||
setchr4(0x1000,1);
|
||||
@@ -83,7 +83,7 @@ static void M163HB(void) {
|
||||
setchr4(0x0000,0);
|
||||
setchr4(0x1000,0);
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ static DECLFW(Write2) {
|
||||
trigger ^= 1;
|
||||
}
|
||||
laststrobe = V;
|
||||
} else if (A == 0x5100 && V == 6) //damn thoose protected games
|
||||
} else if (A == 0x5100 && V == 6) /* damn thoose protected games */
|
||||
setprg32(0x8000, 3);
|
||||
else
|
||||
switch (A & 0x7300) {
|
||||
@@ -195,7 +195,7 @@ static void Sync3(void) {
|
||||
}
|
||||
|
||||
static DECLFW(Write3) {
|
||||
// FCEU_printf("bs %04x %02x\n",A,V);
|
||||
/* FCEU_printf("bs %04x %02x\n",A,V); */
|
||||
reg[(A >> 8) & 3] = V;
|
||||
WSync();
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ static SFORMAT StateRegs[] =
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
/*
|
||||
#if 0
|
||||
|
||||
cmd[0] = response on/off
|
||||
0x00 - on
|
||||
@@ -82,7 +82,8 @@ _MANAGE_CHANNEL: .BYTE 0,$70, 0, 0, 8
|
||||
byte_8CE5: .BYTE 0,$74, 0, 0,$12
|
||||
byte_8C29: .BYTE 0,$76, 0, 0, 8
|
||||
byte_8CC6: .BYTE 0,$78, 0, 0,$12
|
||||
*/
|
||||
|
||||
|
||||
|
||||
static uint8 sim0reset[0x1F] = {
|
||||
0x3B, 0xE9, 0x00, 0xFF, 0xC1, 0x10, 0x31, 0xFE,
|
||||
@@ -91,6 +92,8 @@ static uint8 sim0reset[0x1F] = {
|
||||
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
static void Sync(void) {
|
||||
setprg32(0x8000, prg_reg);
|
||||
setchr8(chr_reg);
|
||||
@@ -107,11 +110,11 @@ static DECLFW(M216WriteHi) {
|
||||
}
|
||||
|
||||
static DECLFW(M216Write5000) {
|
||||
// FCEU_printf("WRITE: %04x:%04x (PC=%02x cnt=%02x)\n",A,V,X.PC,sim0bcnt);
|
||||
/* FCEU_printf("WRITE: %04x:%04x (PC=%02x cnt=%02x)\n",A,V,X.PC,sim0bcnt); */
|
||||
}
|
||||
|
||||
static DECLFR(M216Read5000) {
|
||||
// FCEU_printf("READ: %04x PC=%04x out=%02x byte=%02x cnt=%02x bit=%02x\n",A,X.PC,sim0out,sim0byte,sim0bcnt,sim0bit);
|
||||
/* FCEU_printf("READ: %04x PC=%04x out=%02x byte=%02x cnt=%02x bit=%02x\n",A,X.PC,sim0out,sim0byte,sim0bcnt,sim0bit); */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ static const unsigned char default_inst[15][8] = {
|
||||
|
||||
/* AM speed(Hz) and depth(dB) */
|
||||
#define AM_SPEED 3.7
|
||||
//#define AM_DEPTH 4.8
|
||||
/* #define AM_DEPTH 4.8 */
|
||||
#define AM_DEPTH 2.4
|
||||
|
||||
/* Cut the lower b bit(s) off. */
|
||||
@@ -545,7 +545,7 @@ static void maketables(uint32 c, uint32 r) {
|
||||
makeTllTable();
|
||||
makeRksTable();
|
||||
makeSinTable();
|
||||
//makeDefaultPatch ();
|
||||
/* makeDefaultPatch (); */
|
||||
}
|
||||
|
||||
if (r != rate) {
|
||||
@@ -595,7 +595,7 @@ void OPLL_reset(OPLL * opll) {
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
opll->key_status[i] = 0;
|
||||
//setPatch (opll, i, 0);
|
||||
/* setPatch (opll, i, 0); */
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x40; i++)
|
||||
|
||||
@@ -46,55 +46,58 @@ static void BMCFK23CCW(uint32 A, uint8 V) {
|
||||
}
|
||||
}
|
||||
|
||||
//some games are wired differently, and this will need to be changed.
|
||||
//all the WXN games require prg_bonus = 1, and cah4e3's multicarts require prg_bonus = 0
|
||||
//we'll populate this from a game database
|
||||
/* some games are wired differently, and this will need to be changed.
|
||||
* all the WXN games require prg_bonus = 1, and cah4e3's multicarts require prg_bonus = 0
|
||||
* we'll populate this from a game database
|
||||
*/
|
||||
static int prg_mask;
|
||||
static int prg_bonus = 1;
|
||||
|
||||
//prg_bonus = 0
|
||||
//4-in-1 (FK23C8021)[p1][!].nes
|
||||
//4-in-1 (FK23C8033)[p1][!].nes
|
||||
//4-in-1 (FK23C8043)[p1][!].nes
|
||||
//4-in-1 (FK23Cxxxx, S-0210A PCB)[p1][!].nes
|
||||
/*
|
||||
* prg_bonus = 0
|
||||
* 4-in-1 (FK23C8021)[p1][!].nes
|
||||
* 4-in-1 (FK23C8033)[p1][!].nes
|
||||
* 4-in-1 (FK23C8043)[p1][!].nes
|
||||
* 4-in-1 (FK23Cxxxx, S-0210A PCB)[p1][!].nes
|
||||
|
||||
//prg_bonus = 1
|
||||
//[m176]大富翁2-上海大亨.wxn.nes
|
||||
//[m176]宠物翡翠.fix.nes
|
||||
//[m176]格兰帝亚.wxn.nes
|
||||
//[m176]梦幻之星.wxn.nes
|
||||
//[m176]水浒神兽.fix.nes
|
||||
//[m176]西楚霸王.fix.nes
|
||||
//[m176]超级大富翁.wxn.nes
|
||||
//[m176]雄霸天下.wxn.nes
|
||||
* prg_bonus = 1
|
||||
* [m176]大富翁2-上海大亨.wxn.nes
|
||||
* [m176]宠物翡翠.fix.nes
|
||||
* [m176]格兰帝亚.wxn.nes
|
||||
* [m176]梦幻之星.wxn.nes
|
||||
* [m176]水浒神兽.fix.nes
|
||||
* [m176]西楚霸王.fix.nes
|
||||
* [m176]超级大富翁.wxn.nes
|
||||
* [m176]雄霸天下.wxn.nes
|
||||
|
||||
//works as-is under virtuanes m176
|
||||
//[m176]三侠五义.wxn.nes
|
||||
//[m176]口袋金.fix.nes
|
||||
//[m176]爆笑三国.fix.nes
|
||||
* works as-is under virtuanes m176
|
||||
* [m176]三侠五义.wxn.nes
|
||||
* [m176]口袋金.fix.nes
|
||||
* [m176]爆笑三国.fix.nes
|
||||
|
||||
//needs other tweaks
|
||||
//[m176]三国忠烈传.wxn.nes
|
||||
//[m176]破釜沉舟.fix.nes
|
||||
* needs other tweaks
|
||||
* [m176]三国忠烈传.wxn.nes
|
||||
* [m176]破釜沉舟.fix.nes
|
||||
*/
|
||||
|
||||
static uint64 CartList[] =
|
||||
{
|
||||
0x1606b8c2aff8d942LL, // 4-in-1 (BS-8088) [p1][!].nes
|
||||
0x62b51b108a01d2beLL, // 4-in-1 (FK23C8021) [p1][!].nes
|
||||
0xa37eb9163e001a46LL, // 4-in-1 (FK23C8026) [p1][!].nes
|
||||
0x8bb48490d8d22711LL, // 4-in-1 (FK23C8033) [p1][!].nes
|
||||
0xc75888d7b48cd378LL, // 4-in-1 (FK23C8043) [p1][!].nes
|
||||
0xde5ce25860233f7eLL, // 4-in-1 (FK23C8045) [p1][!].nes
|
||||
0x8b6c9fc7769a5500LL, // 4-in-1 (FK23C8052) [p1][!].nes
|
||||
0x5b3aa4cdc484a088LL, // 4-in-1 (FK23C8056) [p1][!].nes
|
||||
0x497344d14c308a1aLL, // 4-in-1 (FK23C8078) (Ch) [p1].nes
|
||||
0x9342bf9bae1c798aLL, // 4-in-1 (FK23C8079) [p1][!].nes
|
||||
0xf81a376fa54fdd69LL, // 4-in-1 (FK23Cxxxx, S-0210A PCB)[p1][!].nes
|
||||
0x8fd9c235957a6df0LL, // 5-in-1 (K5003) [p1][!]-1125) (Ch).nes
|
||||
0x0315924d00dd7807LL, // Mortal Kombat 30 Peoples (DH1043) (Ch).nes
|
||||
0x4b99c39fdb66128aLL, // 4-in-1 (FK23C8078) (Ch) [p1][U][!].unf
|
||||
0x22a0ba5743191778LL, // Rockman 4 MI (Hack)
|
||||
0 /* Abandon all hope if the game has 0 in the lower 64-bits of its MD5 hash */
|
||||
0x1606b8c2aff8d942LL, /* 4-in-1 (BS-8088) [p1][!].nes */
|
||||
0x62b51b108a01d2beLL, /* 4-in-1 (FK23C8021) [p1][!].nes */
|
||||
0xa37eb9163e001a46LL, /* 4-in-1 (FK23C8026) [p1][!].nes */
|
||||
0x8bb48490d8d22711LL, /* 4-in-1 (FK23C8033) [p1][!].nes */
|
||||
0xc75888d7b48cd378LL, /* 4-in-1 (FK23C8043) [p1][!].nes */
|
||||
0xde5ce25860233f7eLL, /* 4-in-1 (FK23C8045) [p1][!].nes */
|
||||
0x8b6c9fc7769a5500LL, /* 4-in-1 (FK23C8052) [p1][!].nes */
|
||||
0x5b3aa4cdc484a088LL, /* 4-in-1 (FK23C8056) [p1][!].nes */
|
||||
0x497344d14c308a1aLL, /* 4-in-1 (FK23C8078) (Ch) [p1].nes */
|
||||
0x9342bf9bae1c798aLL, /* 4-in-1 (FK23C8079) [p1][!].nes */
|
||||
0xf81a376fa54fdd69LL, /* 4-in-1 (FK23Cxxxx, S-0210A PCB)[p1][!].nes */
|
||||
0x8fd9c235957a6df0LL, /* 5-in-1 (K5003) [p1][!]-1125) (Ch).nes */
|
||||
0x0315924d00dd7807LL, /* Mortal Kombat 30 Peoples (DH1043) (Ch).nes */
|
||||
0x4b99c39fdb66128aLL, /* 4-in-1 (FK23C8078) (Ch) [p1][U][!].unf */
|
||||
0x22a0ba5743191778LL, /* Rockman 4 MI (Hack) */
|
||||
0
|
||||
};
|
||||
|
||||
int DetectPRGbonus(CartInfo *tmp) {
|
||||
@@ -115,8 +118,8 @@ int DetectPRGbonus(CartInfo *tmp) {
|
||||
static void BMCFK23CPW(uint32 A, uint8 V) {
|
||||
/* Modified (c)May 2017 - Backport older implementations from FCEUmm
|
||||
* to support big sized FK23CA carts which broke in latest commits.
|
||||
*/
|
||||
uint32 bank = (EXPREGS[1] & 0x1F);
|
||||
*/
|
||||
/* uint32 bank = (EXPREGS[1] & 0x1F); */
|
||||
uint32 hiblock = ((EXPREGS[0] & 8) << 4) | ((EXPREGS[0] & 0x80) << 1) | (UNIFchrrama ? ((EXPREGS[2] & 0x40) << 3) : 0);
|
||||
uint32 block = (EXPREGS[1] & 0x60) | hiblock;
|
||||
uint32 extra = (EXPREGS[3] & 2);
|
||||
@@ -134,7 +137,7 @@ static void BMCFK23CPW(uint32 A, uint8 V) {
|
||||
uint32 blocksize = (6) - (EXPREGS[0] & 3);
|
||||
uint32 mask = (1 << blocksize) - 1;
|
||||
V &= mask;
|
||||
//V &= 63; //? is this a good idea?
|
||||
/* V &= 63; */ /* ??? is this a good idea? */
|
||||
V |= EXPREGS[1] << 1;
|
||||
setprg8(A, (V | (hiblock << 1)));
|
||||
} else
|
||||
@@ -163,8 +166,9 @@ static DECLFW(BMCFK23CHiWrite) {
|
||||
FixMMC3CHR(MMC3_cmd);
|
||||
} else
|
||||
if (A < 0xC000) {
|
||||
if (UNIFchrrama) { // hacky... strange behaviour, must be bit scramble due to pcb layot restrictions
|
||||
// check if it not interfer with other dumps
|
||||
if (UNIFchrrama) { /* hacky... strange behaviour, must be bit scramble due to pcb layot restrictions
|
||||
* check if it not interfer with other dumps
|
||||
*/
|
||||
if ((A == 0x8000) && (V == 0x46))
|
||||
V = 0x47;
|
||||
else if ((A==0x8000) && (V == 0x47))
|
||||
@@ -182,14 +186,18 @@ static DECLFW(BMCFK23CWrite) {
|
||||
int remap = 0;
|
||||
EXPREGS[A & 3] = V;
|
||||
|
||||
//sometimes writing to reg0 causes remappings to occur. we think the 2 signifies this.
|
||||
//if not, 0x24 is a value that is known to work
|
||||
//however, the low 4 bits are known to control the mapping mode, so 0x20 is more likely to be the immediate remap flag
|
||||
/* sometimes writing to reg0 causes remappings to occur. we think the 2 signifies this.
|
||||
* if not, 0x24 is a value that is known to work
|
||||
* however, the low 4 bits are known to control the mapping mode,
|
||||
* so 0x20 is more likely to be the immediate remap flag
|
||||
*/
|
||||
remap |= ((EXPREGS[0] & 0xF0) == 0x20);
|
||||
|
||||
//this is an actual mapping reg. i think reg0 controls what happens when reg1 is written. anyway, we have to immediately remap these
|
||||
/* this is an actual mapping reg. i think reg0 controls what happens
|
||||
* when reg1 is written. anyway, we have to immediately remap these
|
||||
*/
|
||||
remap |= (A & 3) == 1;
|
||||
//this too.
|
||||
/* this too. */
|
||||
remap |= (A & 3) == 2;
|
||||
|
||||
if (remap) {
|
||||
@@ -200,15 +208,20 @@ static DECLFW(BMCFK23CWrite) {
|
||||
|
||||
if (is_BMCFK23CA)
|
||||
if(EXPREGS[3] & 2)
|
||||
EXPREGS[0] &= ~7; // hacky hacky! if someone wants extra banking, then for sure doesn't want mode 4 for it! (allow to run A version boards on normal mapper)
|
||||
EXPREGS[0] &= ~7; /* hacky hacky! if someone wants extra banking,
|
||||
* then for sure doesn't want mode 4 for it!
|
||||
* (allow to run A version boards on normal mapper)
|
||||
*/
|
||||
}
|
||||
|
||||
static void BMCFK23CReset(void) {
|
||||
//NOT NECESSARY ANYMORE
|
||||
//this little hack makes sure that we try all the dip switch settings eventually, if we reset enough
|
||||
// dipswitch++;
|
||||
// dipswitch&=7;
|
||||
//printf("BMCFK23C dipswitch set to %d\n",dipswitch);
|
||||
/* !NOT NECESSARY ANYMORE!
|
||||
*
|
||||
* this little hack makes sure that we try all the dip switch settings eventually, if we reset enough
|
||||
* dipswitch++;
|
||||
* dipswitch&=7;
|
||||
* printf("BMCFK23C dipswitch set to %d\n",dipswitch);
|
||||
*/
|
||||
|
||||
EXPREGS[0] = EXPREGS[1] = EXPREGS[2] = EXPREGS[3] = 0;
|
||||
EXPREGS[4] = EXPREGS[5] = EXPREGS[6] = EXPREGS[7] = 0xFF;
|
||||
|
||||
@@ -28,7 +28,6 @@ static uint8 cmd, mirr, regs[11];
|
||||
static uint8 rmode, IRQmode, IRQCount, IRQa, IRQLatch;
|
||||
|
||||
static void (*cwrap)(uint32 A, uint8 V);
|
||||
static void (*mwrap)(uint8 V);
|
||||
static int _isM158;
|
||||
|
||||
static SFORMAT StateRegs[] = {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* The UNIF names are UNROM-512-8K, UNROM-512-16K and UNROM-512-32K
|
||||
*
|
||||
* The battery flag in the NES header enables flash, Mirrror mode 2 Enables MI_0 and MI_1 mode.
|
||||
* Known games to use this board are:
|
||||
* Known games to use this board are:
|
||||
* Battle Kid 2: Mountain of Torment (512K PRG, 8K CHR RAM, Horizontal Mirroring, Flash disabled)
|
||||
* Study Hall (128K PRG (in 512K flash chip), 8K CHR RAM, Horizontal Mirroring, Flash enabled)
|
||||
* Although Xmas 2013 uses a different board, where LEDs can be controlled (with writes to the $8000-BFFF space),
|
||||
@@ -41,8 +41,8 @@ static uint16 latcha;
|
||||
static uint8 *flashdata;
|
||||
static uint32 *flash_write_count;
|
||||
static uint8 *FlashPage[32];
|
||||
static uint32 *FlashWriteCountPage[32];
|
||||
static uint8 flashloaded = 0;
|
||||
/* static uint32 *FlashWriteCountPage[32]; */
|
||||
/* static uint8 flashloaded = 0; */
|
||||
|
||||
static uint8 flash_save=0, flash_state=0, flash_mode=0, flash_bank;
|
||||
static void (*WLSync)(void);
|
||||
@@ -184,7 +184,7 @@ static void UNROM512LSync() {
|
||||
flash_state=0;
|
||||
}
|
||||
}
|
||||
else if(flash_mode==1) //Chip Erase or Sector Erase
|
||||
else if(flash_mode==1) /* Chip Erase or Sector Erase */
|
||||
{
|
||||
if(latche==0x30)
|
||||
{
|
||||
@@ -196,12 +196,12 @@ static void UNROM512LSync() {
|
||||
uint32 i;
|
||||
for(i=0;i<(ROM_size*4);i++)
|
||||
inc_flash_write_count(i>>2,i<<12);
|
||||
memset(flashdata,0xFF,ROM_size*0x4000); //Erasing the rom chip as instructed. Crash rate calulated to be 99.9% :)
|
||||
memset(flashdata,0xFF,ROM_size*0x4000); /* Erasing the rom chip as instructed. Crash rate calulated to be 99.9% :) */
|
||||
}
|
||||
flash_state=0;
|
||||
flash_mode=0;
|
||||
}
|
||||
else if(flash_mode==2) //Byte Program
|
||||
else if(flash_mode==2) /* Byte Program */
|
||||
{
|
||||
if(!GetFlashWriteCount(flash_bank,latcha))
|
||||
{
|
||||
@@ -216,7 +216,7 @@ static void UNROM512LSync() {
|
||||
|
||||
static void UNROM512HSync() {
|
||||
flash_bank=latche&(ROM_size-1);
|
||||
|
||||
|
||||
setprg16(0x8000, flash_bank);
|
||||
setprg16(0xc000, ~0);
|
||||
setfprg16(0x8000, flash_bank);
|
||||
@@ -236,7 +236,7 @@ void UNROM512_Init(CartInfo *info) {
|
||||
chrram_mask = 0x20;
|
||||
else
|
||||
chrram_mask = 0x60;
|
||||
|
||||
|
||||
SetupCartMirroring(info->mirror, (info->mirror >= MI_0) ? 0 : 1, 0);
|
||||
bus_conflict = !info->battery;
|
||||
latcheinit = 0;
|
||||
|
||||
Reference in New Issue
Block a user