Mapper42: Support for 256K prg rom fds conversion of Green Beret
This commit is contained in:
@@ -18,7 +18,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
* FDS Conversion
|
* FDS Conversion
|
||||||
*
|
* - Ai Senshi Nicol (256K PRG, 128K CHR)
|
||||||
|
* - Bio Miracle Bokutte Upa (J) (128K PRG, 0K CHR)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mapinc.h"
|
#include "mapinc.h"
|
||||||
@@ -76,6 +77,11 @@ static void StateRestore(int version) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Mapper42_Init(CartInfo *info) {
|
void Mapper42_Init(CartInfo *info) {
|
||||||
|
if (info->CHRRomSize == 0 && info->PRGRomSize > 131072) {
|
||||||
|
/* Green Beret FDS Conversion can be 160K or 256K */
|
||||||
|
AC08_Init(info);
|
||||||
|
return;
|
||||||
|
}
|
||||||
info->Power = M42Power;
|
info->Power = M42Power;
|
||||||
MapIRQHook = M42IRQHook;
|
MapIRQHook = M42IRQHook;
|
||||||
GameStateRestore = StateRestore;
|
GameStateRestore = StateRestore;
|
||||||
|
|||||||
@@ -18,12 +18,15 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
* FDS Conversion
|
* FDS Conversion
|
||||||
|
* - [UNIF] Green Beret (FDS Conversion, LH09) (Unl) [U][!][t1] (160K PRG)
|
||||||
|
* - Green Beret (FDS Conversion) (Unl) (256K PRG)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mapinc.h"
|
#include "mapinc.h"
|
||||||
|
|
||||||
static uint8 reg, mirr;
|
static uint8 reg, mirr;
|
||||||
|
static uint8 prg;
|
||||||
|
|
||||||
static SFORMAT StateRegs[] =
|
static SFORMAT StateRegs[] =
|
||||||
{
|
{
|
||||||
@@ -34,7 +37,7 @@ static SFORMAT StateRegs[] =
|
|||||||
|
|
||||||
static void Sync(void) {
|
static void Sync(void) {
|
||||||
setprg8(0x6000, reg);
|
setprg8(0x6000, reg);
|
||||||
setprg32(0x8000, 4);
|
setprg32(0x8000, prg);
|
||||||
setchr8(0);
|
setchr8(0);
|
||||||
setmirror(mirr);
|
setmirror(mirr);
|
||||||
}
|
}
|
||||||
@@ -45,7 +48,7 @@ static DECLFW(AC08Mirr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static DECLFW(AC08Write) {
|
static DECLFW(AC08Write) {
|
||||||
if (A == 0x8001) /* Green Berret bank switching is only 100x xxxx xxxx xxx1 mask */
|
if (A == 0x8001) /* Green Berret prg switching is only 100x xxxx xxxx xxx1 mask */
|
||||||
reg = (V >> 1) & 0xf;
|
reg = (V >> 1) & 0xf;
|
||||||
else
|
else
|
||||||
reg = V & 0xf; /* Sad But True, 2-in-1 mapper, Green Berret need value shifted left one byte, Castlevania doesn't */
|
reg = V & 0xf; /* Sad But True, 2-in-1 mapper, Green Berret need value shifted left one byte, Castlevania doesn't */
|
||||||
@@ -65,6 +68,7 @@ static void StateRestore(int version) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AC08_Init(CartInfo *info) {
|
void AC08_Init(CartInfo *info) {
|
||||||
|
prg = (info->PRGRomSize / 16384) & 0x0F ? 4 : 7;
|
||||||
info->Power = AC08Power;
|
info->Power = AC08Power;
|
||||||
GameStateRestore = StateRestore;
|
GameStateRestore = StateRestore;
|
||||||
AddExState(&StateRegs, ~0, 0, 0);
|
AddExState(&StateRegs, ~0, 0, 0);
|
||||||
|
|||||||
@@ -133,6 +133,14 @@
|
|||||||
{0x4c7c1af3, 34, 1}, /* Caesar's Palace */
|
{0x4c7c1af3, 34, 1}, /* Caesar's Palace */
|
||||||
{0x932ff06e, 34, 1}, /* Classic Concentration */
|
{0x932ff06e, 34, 1}, /* Classic Concentration */
|
||||||
{0xf46ef39a, 37, -1}, /* Super Mario Bros. + Tetris + Nintendo World Cup (E) [!] */
|
{0xf46ef39a, 37, -1}, /* Super Mario Bros. + Tetris + Nintendo World Cup (E) [!] */
|
||||||
|
{0x090C0C17, 42, 1}, /* Ai Senshi Nicol (FDS Conversion) [p1][!].nes */
|
||||||
|
{0x4DF84825, 42, 1}, /* Ai Senshi Nicol (FDS Conversion) [p2][!].nes */
|
||||||
|
{0x579E5BC5, 42, 1}, /* Ai Senshi Nicol (FDS Conversion) [p3].nes */
|
||||||
|
{0xC744F205, 42, 1}, /* Ai Senshi Nicol (FDS Conversion) [p3][t1].nes */
|
||||||
|
{0x71699765, 42, -1}, /* Love Warrior Nicol.nes */
|
||||||
|
{0x6BF3F6A3, 42, -1}, /* Bio Miracle Bokutte Upa (J) (Mario Baby - FDS Conversion).nes */
|
||||||
|
{0x5BA1C5CF, 42, -1}, /* Green Beret (FDS Conversion) (Unl).nes (256K PRG) */
|
||||||
|
{0x50AB1AB2, 42, -1}, /* Green Beret (FDS Conversion, LH09) (Unl) [U][!][t1] (160K PRG */
|
||||||
{0x7ccb12a3, 43, -1}, /* SMB2j */
|
{0x7ccb12a3, 43, -1}, /* SMB2j */
|
||||||
{0x6c71feae, 45, -1}, /* Kunio 8-in-1 */
|
{0x6c71feae, 45, -1}, /* Kunio 8-in-1 */
|
||||||
{0x40c0ad47, 48, 8}, /* Flintstones 2 */
|
{0x40c0ad47, 48, 8}, /* Flintstones 2 */
|
||||||
|
|||||||
@@ -783,8 +783,6 @@ int UNIFLoad(const char *name, FCEUFILE *fp) {
|
|||||||
UNIFCart.CHRCRC32 = CalcCRC32(0, VROM, CHRptr);
|
UNIFCart.CHRCRC32 = CalcCRC32(0, VROM, CHRptr);
|
||||||
UNIFCart.CRC32 = CalcCRC32(UNIFCart.PRGCRC32, VROM, CHRptr);
|
UNIFCart.CRC32 = CalcCRC32(UNIFCart.PRGCRC32, VROM, CHRptr);
|
||||||
|
|
||||||
FCEU_printf("CHR CRC32 = %08x\n", UNIFCart.CHRCRC32);
|
|
||||||
|
|
||||||
md5_starts(&md5);
|
md5_starts(&md5);
|
||||||
md5_update(&md5, ROM, PRGptr);
|
md5_update(&md5, ROM, PRGptr);
|
||||||
if (UNIF_CHRROMSize)
|
if (UNIF_CHRROMSize)
|
||||||
|
|||||||
Reference in New Issue
Block a user