예제 #1
0
파일: mmc3.cpp 프로젝트: Plombo/fceux
void GenMMC3Power(void) {
	if (UNIFchrrama) setchr8(0);

	SetWriteHandler(0x8000, 0xBFFF, MMC3_CMDWrite);
	SetWriteHandler(0xC000, 0xFFFF, MMC3_IRQWrite);
	SetReadHandler(0x8000, 0xFFFF, CartBR);
	A001B = A000B = 0;
	setmirror(1);
	if (mmc3opts & 1) {
		if (WRAMSIZE == 1024) {
			FCEU_CheatAddRAM(1, 0x7000, WRAM);
			SetReadHandler(0x7000, 0x7FFF, MAWRAMMMC6);
			SetWriteHandler(0x7000, 0x7FFF, MBWRAMMMC6);
		} else {
			FCEU_CheatAddRAM(WRAMSIZE >> 10, 0x6000, WRAM);
			SetWriteHandler(0x6000, 0x6000 + ((WRAMSIZE - 1) & 0x1fff), CartBW);
			SetReadHandler(0x6000, 0x6000 + ((WRAMSIZE - 1) & 0x1fff), CartBR);
			setprg8r(0x10, 0x6000, 0);
		}
		if (!(mmc3opts & 2))
			FCEU_dwmemset(WRAM, 0, WRAMSIZE);
	}
	MMC3RegReset();
	if (CHRRAM)
		FCEU_dwmemset(CHRRAM, 0, CHRRAMSIZE);
}
예제 #2
0
파일: mmc3.cpp 프로젝트: Nolaan/fceux
void GenMMC3Power(void) {
	if (UNIFchrrama) setchr8(0);

	SetWriteHandler(0x8000, 0xBFFF, MMC3_CMDWrite);
	SetWriteHandler(0xC000, 0xFFFF, MMC3_IRQWrite);
	SetReadHandler(0x8000, 0xFFFF, CartBR);

// KT-008 boards hack 2-in-1, TODO assign to new ines mapper, most dump of KT-boards on the net are mapper 4, so need database or goodnes fix support
	SetWriteHandler(0x5000,0x5FFF, KT008HackWrite);

	A001B = A000B = 0;
	setmirror(1);
	if (mmc3opts & 1) {
		if (WRAMSIZE == 1024) {
			FCEU_CheatAddRAM(1, 0x7000, WRAM);
			SetReadHandler(0x7000, 0x7FFF, MAWRAMMMC6);
			SetWriteHandler(0x7000, 0x7FFF, MBWRAMMMC6);
		} else {
			FCEU_CheatAddRAM(WRAMSIZE >> 10, 0x6000, WRAM);
			SetWriteHandler(0x6000, 0x6000 + ((WRAMSIZE - 1) & 0x1fff), CartBW);
			SetReadHandler(0x6000, 0x6000 + ((WRAMSIZE - 1) & 0x1fff), CartBR);
			setprg8r(0x10, 0x6000, 0);
		}
		if (!(mmc3opts & 2))
			FCEU_dwmemset(WRAM, 0, WRAMSIZE);
	}
	MMC3RegReset();
	if (CHRRAM)
		FCEU_dwmemset(CHRRAM, 0, CHRRAMSIZE);
}