Added mapper 441 submapper 1.
This commit is contained in:
@@ -18,11 +18,14 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* 850335C PCB */
|
/* 850335C PCB (submapper 0)
|
||||||
|
840415C/43-170 PCB (submapper 1) */
|
||||||
|
|
||||||
#include "mapinc.h"
|
#include "mapinc.h"
|
||||||
#include "mmc3.h"
|
#include "mmc3.h"
|
||||||
|
|
||||||
|
static uint8 submapper;
|
||||||
|
|
||||||
static void Mapper441_PRGWrap(uint32 A, uint8 V) {
|
static void Mapper441_PRGWrap(uint32 A, uint8 V) {
|
||||||
int prgAND = EXPREGS[0] &0x08? 0x0F: 0x1F;
|
int prgAND = EXPREGS[0] &0x08? 0x0F: 0x1F;
|
||||||
int prgOR = EXPREGS[0] <<4 &0x30;
|
int prgOR = EXPREGS[0] <<4 &0x30;
|
||||||
@@ -43,6 +46,9 @@ static void Mapper441_CHRWrap(uint32 A, uint8 V) {
|
|||||||
|
|
||||||
static DECLFW(Mapper441_Write) {
|
static DECLFW(Mapper441_Write) {
|
||||||
if (~EXPREGS[0] &0x80) {
|
if (~EXPREGS[0] &0x80) {
|
||||||
|
if (submapper == 1)
|
||||||
|
EXPREGS[0] = V &~4 | A &4;
|
||||||
|
else
|
||||||
EXPREGS[0] = V;
|
EXPREGS[0] = V;
|
||||||
FixMMC3PRG(MMC3_cmd);
|
FixMMC3PRG(MMC3_cmd);
|
||||||
FixMMC3CHR(MMC3_cmd);
|
FixMMC3CHR(MMC3_cmd);
|
||||||
@@ -62,6 +68,7 @@ static void Mapper441_Power(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Mapper441_Init(CartInfo *info) {
|
void Mapper441_Init(CartInfo *info) {
|
||||||
|
submapper = info->submapper;
|
||||||
GenMMC3_Init(info, 256, 256, 8, 0);
|
GenMMC3_Init(info, 256, 256, 8, 0);
|
||||||
cwrap = Mapper441_CHRWrap;
|
cwrap = Mapper441_CHRWrap;
|
||||||
pwrap = Mapper441_PRGWrap;
|
pwrap = Mapper441_PRGWrap;
|
||||||
|
|||||||
Reference in New Issue
Block a user