Merge pull request #271 from retro-wertz/mappers
Assign a few more games as mapper 215
This commit is contained in:
@@ -335,6 +335,9 @@
|
|||||||
{0xb3be2f71, 3, 0}, /* Yanshan Chess (Unl) */
|
{0xb3be2f71, 3, 0}, /* Yanshan Chess (Unl) */
|
||||||
{0x8dedea07, 3, 1}, /* Shui Guo Li (Ch) [a1] */
|
{0x8dedea07, 3, 1}, /* Shui Guo Li (Ch) [a1] */
|
||||||
{0x1a71fd06, 1, 1}, /* Kujaku Ou (J) [T+Eng1.1_Snark] */
|
{0x1a71fd06, 1, 1}, /* Kujaku Ou (J) [T+Eng1.1_Snark] */
|
||||||
|
{0x99748230, 215, 0}, /* EarthWorm Jim 2 (SuperGame) */
|
||||||
|
{0x37876ac7, 215, 0}, /* Golden Card 6-in-1 (Unl) [!] */
|
||||||
|
{0x1a3320a3, 215, 0}, /* Mortal Kombat 3 (SuperGame) */
|
||||||
|
|
||||||
{0x00000000, -1, -1}
|
{0x00000000, -1, -1}
|
||||||
|
|
||||||
|
|||||||
17
src/ines.c
17
src/ines.c
@@ -295,6 +295,8 @@ static void CheckHInfo(void) {
|
|||||||
};
|
};
|
||||||
int32 tofix = 0, x;
|
int32 tofix = 0, x;
|
||||||
uint64 partialmd5 = 0;
|
uint64 partialmd5 = 0;
|
||||||
|
int current_mapper = 0;
|
||||||
|
int cur_mirr = 0;
|
||||||
|
|
||||||
for (x = 0; x < 8; x++)
|
for (x = 0; x < 8; x++)
|
||||||
partialmd5 |= (uint64)iNESCart.MD5[15 - x] << (x * 8);
|
partialmd5 |= (uint64)iNESCart.MD5[15 - x] << (x * 8);
|
||||||
@@ -312,10 +314,12 @@ static void CheckHInfo(void) {
|
|||||||
}
|
}
|
||||||
if (MapperNo != (moo[x].mapper & 0xFF)) {
|
if (MapperNo != (moo[x].mapper & 0xFF)) {
|
||||||
tofix |= 1;
|
tofix |= 1;
|
||||||
|
current_mapper = MapperNo;
|
||||||
MapperNo = moo[x].mapper & 0xFF;
|
MapperNo = moo[x].mapper & 0xFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (moo[x].mirror >= 0) {
|
if (moo[x].mirror >= 0) {
|
||||||
|
cur_mirr = Mirroring;
|
||||||
if (moo[x].mirror == 8) {
|
if (moo[x].mirror == 8) {
|
||||||
if (Mirroring == 2) { /* Anything but hard-wired(four screen). */
|
if (Mirroring == 2) { /* Anything but hard-wired(four screen). */
|
||||||
tofix |= 2;
|
tofix |= 2;
|
||||||
@@ -361,12 +365,12 @@ static void CheckHInfo(void) {
|
|||||||
|
|
||||||
if (tofix) {
|
if (tofix) {
|
||||||
char gigastr[768];
|
char gigastr[768];
|
||||||
strcpy(gigastr, "The iNES header contains incorrect information. For now, the information will be corrected in RAM. ");
|
strcpy(gigastr, "The iNES header contains incorrect information. For now, the information will be corrected in RAM. ");
|
||||||
if (tofix & 1)
|
if (tofix & 1)
|
||||||
sprintf(gigastr + strlen(gigastr), "The mapper number should be set to %d. ", MapperNo);
|
sprintf(gigastr + strlen(gigastr), "Current mapper # is %d. The mapper number should be set to %d. ", current_mapper, MapperNo);
|
||||||
if (tofix & 2) {
|
if (tofix & 2) {
|
||||||
uint8 *mstr[3] = { (uint8_t*)"Horizontal", (uint8_t*)"Vertical", (uint8_t*)"Four-screen" };
|
uint8 *mstr[3] = { (uint8_t*)"Horizontal", (uint8_t*)"Vertical", (uint8_t*)"Four-screen" };
|
||||||
sprintf(gigastr + strlen(gigastr), "Mirroring should be set to \"%s\". ", mstr[Mirroring & 3]);
|
sprintf(gigastr + strlen(gigastr), "Current mirroring is %s. Mirroring should be set to \"%s\". ", mstr[cur_mirr & 3], mstr[Mirroring & 3]);
|
||||||
}
|
}
|
||||||
if (tofix & 4)
|
if (tofix & 4)
|
||||||
strcat(gigastr, "The battery-backed bit should be set. ");
|
strcat(gigastr, "The battery-backed bit should be set. ");
|
||||||
@@ -604,7 +608,7 @@ static BMAPPINGLocal bmap[] = {
|
|||||||
{(uint8_t*)"", 212, Mapper212_Init},
|
{(uint8_t*)"", 212, Mapper212_Init},
|
||||||
{(uint8_t*)"", 213, Mapper213_Init},
|
{(uint8_t*)"", 213, Mapper213_Init},
|
||||||
{(uint8_t*)"", 214, Mapper214_Init},
|
{(uint8_t*)"", 214, Mapper214_Init},
|
||||||
{(uint8_t*)"", 215, UNL8237_Init},
|
{(uint8_t*)"UNL-8237", 215, UNL8237_Init},
|
||||||
{(uint8_t*)"", 216, Mapper216_Init},
|
{(uint8_t*)"", 216, Mapper216_Init},
|
||||||
{(uint8_t*)"", 217, Mapper217_Init}, /* Redefined to a new Discrete BMC mapper */
|
{(uint8_t*)"", 217, Mapper217_Init}, /* Redefined to a new Discrete BMC mapper */
|
||||||
/* {(uint8_t*)"", 218, Mapper218_Init}, */
|
/* {(uint8_t*)"", 218, Mapper218_Init}, */
|
||||||
@@ -743,6 +747,8 @@ int iNESLoad(const char *name, FCEUFILE *fp) {
|
|||||||
|
|
||||||
iNESCart.CRC32 = iNESGameCRC32;
|
iNESCart.CRC32 = iNESGameCRC32;
|
||||||
|
|
||||||
|
SetInput();
|
||||||
|
CheckHInfo();
|
||||||
mappername = "Not Listed";
|
mappername = "Not Listed";
|
||||||
|
|
||||||
for (mappertest = 0; mappertest < (sizeof bmap / sizeof bmap[0]) - 1; mappertest++) {
|
for (mappertest = 0; mappertest < (sizeof bmap / sizeof bmap[0]) - 1; mappertest++) {
|
||||||
@@ -751,9 +757,6 @@ int iNESLoad(const char *name, FCEUFILE *fp) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetInput();
|
|
||||||
CheckHInfo();
|
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
uint64 partialmd5 = 0;
|
uint64 partialmd5 = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user