NES - implement mappers 74 and 194. Added gamedb entries for the games I could find that correspond to these mappers
This commit is contained in:
parent
71865576a7
commit
d4ac95bd30
|
@ -195,6 +195,7 @@
|
|||
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper189.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper191.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper192.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper194.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper205.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper245.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\MMC3.cs" />
|
||||
|
|
|
@ -9,8 +9,6 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
{
|
||||
//http://wiki.nesdev.com/w/index.php/INES_Mapper_074
|
||||
|
||||
//TODO: fix CHR-RAM behavior
|
||||
|
||||
public override bool Configure(NES.EDetectionOrigin origin)
|
||||
{
|
||||
//analyze board type
|
||||
|
@ -52,23 +50,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
int bank = GetBankNum(addr);
|
||||
if (bank == 0x08)
|
||||
{
|
||||
byte value = VRAM[addr & 0x03FF];
|
||||
|
||||
|
||||
//adelikat: value ==255 is a hack to prevent a regression.
|
||||
//Without any chr-ram mapping this game works fine other than the missing chinese characters. This current mapping does not fix that issue.
|
||||
//In addition, the blue caret on the title screen is missing without this hack, so I put it in to prevent a regression.
|
||||
//Note: FCEUX and Nintendulator are missing this blue caret (and chinese characters) suggesting a possible logical flaw in the mapper documentation.
|
||||
//Nestopia achieves the correct behavior but I was unable to determine how its logic was any different.
|
||||
if (value == 255)
|
||||
{
|
||||
return VROM[(addr & 0x03FF) + 0x2000];
|
||||
}
|
||||
else
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
return VRAM[addr & 0x03FF];
|
||||
}
|
||||
else if (bank == 0x09)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BizHawk.Emulation.Consoles.Nintendo
|
||||
{
|
||||
class Mapper194 : MMC3Board_Base
|
||||
{
|
||||
//http://wiki.nesdev.com/w/index.php/INES_Mapper_194
|
||||
|
||||
public override bool Configure(NES.EDetectionOrigin origin)
|
||||
{
|
||||
//analyze board type
|
||||
switch (Cart.board_type)
|
||||
{
|
||||
case "MAPPER194":
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
BaseSetup();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void WritePPU(int addr, byte value)
|
||||
{
|
||||
if (addr < 0x2000)
|
||||
{
|
||||
VRAM[addr & 0x7FF] = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.WritePPU(addr, value);
|
||||
}
|
||||
}
|
||||
|
||||
private int GetBankNum(int addr)
|
||||
{
|
||||
int bank_1k = Get_CHRBank_1K(addr);
|
||||
bank_1k &= chr_mask;
|
||||
return bank_1k;
|
||||
}
|
||||
|
||||
public override byte ReadPPU(int addr)
|
||||
{
|
||||
if (addr < 0x2000)
|
||||
{
|
||||
int bank = GetBankNum(addr);
|
||||
if (bank == 0x00)
|
||||
{
|
||||
return VRAM[addr & 0x03FF];
|
||||
}
|
||||
else if (bank == 0x01)
|
||||
{
|
||||
return VRAM[(addr & 0x03FF) + 0x400];
|
||||
}
|
||||
else
|
||||
{
|
||||
addr = MapCHR(addr);
|
||||
return VROM[addr + extra_vrom];
|
||||
}
|
||||
|
||||
}
|
||||
else return base.ReadPPU(addr);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -134,8 +134,11 @@ sha1:B6D1C372A38D196112AA98905C709AD844BD6627 Super 35-in-1 (6-in-1 VT5201) NES
|
|||
sha1:BFA31777E077E64AF0E274B5A22B57C6765D36E1 Fan Kong Jing Ying (Unl) (Ch) NES board=MAPPER241;MIR=H
|
||||
sha1:17473C223453D2D80FCB9DCFA317947287DC5C52 Xing He Zhan Shi (Ch) NES board=MAPPER176
|
||||
sha1:0B58E16B7FD5ABE62B1D9B1841875582DF5A9195 Ying Lie Qun Xia Zhuan (Ch) NES board=MAPPER192
|
||||
sha1:27CB8AEAF0EA97A6C69D3D90BC056C5EB61695F6 Dai-2-Ji - Super Robot Taisen (Ch) NES board=MAPPER074;VRAM=2
|
||||
sha1:27CB8AEAF0EA97A6C69D3D90BC056C5EB61695F6 Dai-2-Ji - Super Robot Taisen (Ch) NES board=MAPPER194;VRAM=2
|
||||
sha1:0B58E16B7FD5ABE62B1D9B1841875582DF5A9195 Ying Lie Qun Xia Zhuan (Ch) NES board=MAPPER192;VRAM=4
|
||||
sha1:F5FA7807F2B70ADFE5707D9BF88F90DAC1436DB0 Di 4 Ci - Ji Qi Ren Dai Zhan (Ch) NES board=MAPPER074;VRAM=2
|
||||
sha1:A9887C308C5D0659C3AA45D003A603C9DFFB148A B Ji Jia Zhan Shi (Asia) NES board=MAPPER074;VRAM=2
|
||||
sha1:5084F25F14A61AB2799BD85D363B57B9B494601D Ji Jia Zhan Shi (Asia) NES board=MAPPER074;VRAM=2
|
||||
;;;;;;;;;;;;;;;;;;;-----------------------------------------------------------------------
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;-----------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue