@@ -1,7 +1,7 @@
|
|||||||
/* FCEUmm - NES/Famicom Emulator
|
/* FCEUmm - NES/Famicom Emulator
|
||||||
*
|
*
|
||||||
* Copyright notice for this file:
|
* Copyright notice for this file:
|
||||||
* Copyright (C) 2020 negativeExponent
|
* Copyright (C) 2022
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ static void Sync (void) {
|
|||||||
setprg16(0x8000, reg[1] << 3 | reg[0] & 7);
|
setprg16(0x8000, reg[1] << 3 | reg[0] & 7);
|
||||||
setprg16(0xC000, reg[1] << 3 | 7);
|
setprg16(0xC000, reg[1] << 3 | 7);
|
||||||
setchr8(0);
|
setchr8(0);
|
||||||
setmirror(reg[1] &0x60? 0: 1);
|
setmirror(reg[1] & 0x60 ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DECLFW(M396WriteInnerBank) {
|
static DECLFW(M396WriteInnerBank) {
|
||||||
|
|||||||
@@ -24,34 +24,34 @@
|
|||||||
#include "mmc3.h"
|
#include "mmc3.h"
|
||||||
|
|
||||||
static void M432CW(uint32 A, uint8 V) {
|
static void M432CW(uint32 A, uint8 V) {
|
||||||
int chrAND = EXPREGS[1] &0x04? 0x7F: 0xFF;
|
int chrAND = (EXPREGS[1] & 0x04) ? 0x7F : 0xFF;
|
||||||
int chrOR = EXPREGS[1] <<7 &0x080 | EXPREGS[1] <<5 &0x100;
|
int chrOR = (EXPREGS[1] << 7) & 0x080 | (EXPREGS[1] << 5) & 0x100;
|
||||||
setchr1(A, V &chrAND | chrOR &~chrAND);
|
setchr1(A, (V & chrAND) | (chrOR & ~chrAND));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void M432PW(uint32 A, uint8 V) {
|
static void M432PW(uint32 A, uint8 V) {
|
||||||
int prgAND = EXPREGS[1] &0x02? 0x0F: 0x1F;
|
int prgAND = (EXPREGS[1] & 0x02) ? 0x0F : 0x1F;
|
||||||
int prgOR = EXPREGS[1] <<4 &0x10 | EXPREGS[1] <<1 &0x20;
|
int prgOR = ((EXPREGS[1] << 4) & 0x10) | (EXPREGS[1] << 1) & 0x20;
|
||||||
if (A <0xC000 || ~EXPREGS[1] &0x40) setprg8(A, V &prgAND | prgOR &~prgAND);
|
if ((A < 0xC000) || (~EXPREGS[1] & 0x40)) setprg8(A, (V & prgAND) | (prgOR & ~prgAND));
|
||||||
if (A <0xC000 && EXPREGS[1] &0x40) setprg8(A |0x4000, V &prgAND | prgOR &~prgAND);
|
if ((A < 0xC000) && (EXPREGS[1] & 0x40)) setprg8(A | 0x4000, (V & prgAND) | (prgOR & ~prgAND));
|
||||||
}
|
}
|
||||||
|
|
||||||
static DECLFR(M432Read) {
|
static DECLFR(M432Read) {
|
||||||
if (EXPREGS[0] &1)
|
if (EXPREGS[0] & 1)
|
||||||
return EXPREGS[2];
|
return EXPREGS[2];
|
||||||
return CartBR(A);
|
return CartBR(A);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DECLFW(M432Write) {
|
static DECLFW(M432Write) {
|
||||||
EXPREGS[A &1] = V;
|
EXPREGS[A & 1] = V;
|
||||||
FixMMC3PRG(MMC3_cmd);
|
FixMMC3PRG(MMC3_cmd);
|
||||||
FixMMC3CHR(MMC3_cmd);
|
FixMMC3CHR(MMC3_cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void M432Reset(void) {
|
static void M432Reset(void) {
|
||||||
EXPREGS[0] = 0;
|
EXPREGS[0] = 0;
|
||||||
EXPREGS[1] = 0;
|
EXPREGS[1] = 0;
|
||||||
EXPREGS[2] = (EXPREGS[2] +1) &3;
|
EXPREGS[2] = (EXPREGS[2] +1) & 3;
|
||||||
MMC3RegReset();
|
MMC3RegReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* FCEUmm - NES/Famicom Emulator
|
/* FCEUmm - NES/Famicom Emulator
|
||||||
*
|
*
|
||||||
* Copyright notice for this file:
|
* Copyright notice for this file:
|
||||||
* Copyright (C) 2020 negativeExponent
|
* Copyright (C) 2022
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* FCEUmm - NES/Famicom Emulator
|
/* FCEUmm - NES/Famicom Emulator
|
||||||
*
|
*
|
||||||
* Copyright notice for this file:
|
* Copyright notice for this file:
|
||||||
* Copyright (C) 2020 negativeExponent
|
* Copyright (C) 2022
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
Reference in New Issue
Block a user