From 3477a2663eaee9705d0e494865fca1b87c31963d Mon Sep 17 00:00:00 2001 From: RokkumanX <85066613+RokkumanX@users.noreply.github.com> Date: Tue, 22 Jun 2021 19:47:00 +0200 Subject: [PATCH] Better support for MMC3_198 Courtesy to @Rabenda I took the liberty of polishing and tidying up the comments, otherwise it should work as intended. --- Core/MMC3_198.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Core/MMC3_198.h b/Core/MMC3_198.h index 38b3e5a1..90558d2d 100644 --- a/Core/MMC3_198.h +++ b/Core/MMC3_198.h @@ -4,9 +4,12 @@ #include "MMC3.h" //Most likely incorrect/incomplete, but works (with minor glitches) with the 2 games marked as mapper 198 that I am aware of. -//Game 1: 吞食天地2 (CHR RAM, but uses chr banking?, has save ram at 6000-7FFF?) -//Game 2: Cheng Ji Si Han (ES-1110) (Ch) (CHR RAM, work ram mirrored from 5000-7FFF?, doesn't use chr banking) -//These games may actually use different mappers. +//Game 1: 吞食天地: 三国外传 (Tūnshí Tiāndì - Sānguó Wàizhuàn) (CHR RAM, but uses chr banking?, has save ram at 6000-7FFF) +// 吞食天地: 三国外传 (Tūnshí Tiāndì - Sānguó Wàizhuàn) uses ram 5000-7FFF (Add Chinese character process program in 5000-5FFF) +// Original 1994 Hong Kong release by an unknown publisher, 640 KiB PRG-ROM. +//Game 2: 成吉思汗 (Chéngjísīhán) (CHR RAM, work ram mirrored from 5000-7FFF?, doesn't use chr banking) +// 成吉思汗 (Chéngjísīhán) could actually be using MMC3_199 in reality according to the Nesdev wiki. +//These games may actually use different mappers altogether. class MMC3_198 : public MMC3 { private: @@ -44,7 +47,7 @@ protected: void WriteRegister(uint16_t addr, uint8_t value) override { if(addr == 0x8001 && (GetState().Reg8000 & 0x07) >= 6) { - _exRegs[(GetState().Reg8000 & 0x07) - 6] = value & (value >= 0x40 ? 0x4F : 0x3F); + _exRegs[(GetState().Reg8000 & 0x07) - 6] = value & 0x7F; } MMC3::WriteRegister(addr, value); } @@ -62,4 +65,4 @@ protected: MMC3::UpdateChrMapping(); } } -}; \ No newline at end of file +};