From ea8d47bcc072fd18b1b5374954659e70f10374ad Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 5 Aug 2012 21:34:00 +0000 Subject: [PATCH] Start Mapper 197 (based on MMC3) and sort out the use of this vs Mapper 91. --- BizHawk.Emulation/BizHawk.Emulation.csproj | 1 + .../Consoles/Nintendo/NES/Boards/Mapper091.cs | 69 +------------------ BizHawk.MultiClient/output/gamedb.txt | 1 - 3 files changed, 4 insertions(+), 67 deletions(-) diff --git a/BizHawk.Emulation/BizHawk.Emulation.csproj b/BizHawk.Emulation/BizHawk.Emulation.csproj index 5f57af24c9..e08c7f161c 100644 --- a/BizHawk.Emulation/BizHawk.Emulation.csproj +++ b/BizHawk.Emulation/BizHawk.Emulation.csproj @@ -200,6 +200,7 @@ + diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Mapper091.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Mapper091.cs index f176324ce1..87f8b7e577 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Mapper091.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/Boards/Mapper091.cs @@ -8,70 +8,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo class Mapper91 : NES.NESBoardBase { /* - * Here are Disch's original notes: - ======================== - = Mapper 091 = - ======================== - - - Example Game: - -------------------------- - Street Fighter 3 - - - Notes: - --------------------------- - Regs exist at $6000-7FFF, so this mapper has no SRAM. - - - Registers: - --------------------------- - - Range,Mask: $6000-7FFF, $7003 - - $6000-6003: CHR Regs - $7000-7001: [.... PPPP] PRG Regs - - $7002 [.... ....] IRQ Stop - $7003 [.... ....] IRQ Start - - - - CHR Setup: - --------------------------- - - $0000 $0400 $0800 $0C00 $1000 $1400 $1800 $1C00 - +---------------+---------------+---------------+---------------+ - | $6000 | $6001 | $6002 | $6003 | - +---------------+---------------+---------------+---------------+ - - PRG Setup: - --------------------------- - - $8000 $A000 $C000 $E000 - +-------+-------+-------+-------+ - | $7000 | $7001 | { -2} | { -1} | - +-------+-------+-------+-------+ - - - IRQs: - --------------------------- - - IRQs on this mapper seem to behave exactly like MMC3 -- except it's fixed so that it will only fire after 8 - scanlines. This is easily emulatable by using MMC3 logic. - - Write to $7002/$7003 can translate directly to write(s) to the following MMC3 registers: - - on $7002 write: - a) write to $E000 - - on $7003 write: - a) write $07 to $C000 - b) write to $C001 - c) write to $E001 - - - For details on MMC3 IRQ operation, see mapper 004 + *Note: Street Fighter III (Unl) is actually mapper 197. However variations such as Street Fighter III (9 Fighter) and Mari Street Fighter III use this mapper + //http://wiki.nesdev.com/w/index.php/INES_Mapper_091 */ ByteBuffer chr_regs_2k = new ByteBuffer(4); @@ -84,7 +22,6 @@ namespace BizHawk.Emulation.Consoles.Nintendo switch (Cart.board_type) { case "MAPPER091": - case "MAPPER197": //GoodNES reports 197 instead of 91 break; default: return false; @@ -164,7 +101,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo { if (addr < 0x2000) { - int bank_2k = (addr >> 11); + int bank_2k = (addr >> 11) - 1; bank_2k = chr_regs_2k[bank_2k]; bank_2k &= chr_bank_mask_2k; return VROM[(bank_2k * 0x800) + addr]; diff --git a/BizHawk.MultiClient/output/gamedb.txt b/BizHawk.MultiClient/output/gamedb.txt index d4d2260c45..2f0f3eceb2 100644 --- a/BizHawk.MultiClient/output/gamedb.txt +++ b/BizHawk.MultiClient/output/gamedb.txt @@ -114,7 +114,6 @@ sha1:6DF9AECF5787C0833B0F05A9A83D0E58A6153977 Rumblestation 15-in-1 (Unl) NES sha1:E4BFD5AB3C3649DBD36B9A7280CF431641BCBCEC Peek-A-Boo Poker (Unl) NES board=NES-CNROM;PRG=32;CHR=24;WRAM=0 sha1:39294394A0631708F58397371CE14075AE1FB7E6 Peek-A-Boo Poker (Panesian) NES board=NES-CNROM;PRG=32;CHR=64;WRAM=0 sha1:C87E7E6A68DD9C7E24652CD2C7D390A14E8ADF04 Lagrange Point NES board=KONAMI-VRC-7;PRG=512;CHR=0;WRAM=8;PRAM=8;PCB=352402 -sha1:E05B0FCA7EA2F6433FA06DD204F7265417B91BBE Street Fighter III NES board=MAPPER091;PRG=128;CHR=512 ;;;;;;;;;;;;;;;;;;;----------------------------------------------------------------------- ;;;;;;;;;;;;;;;;;;;-----------------------------------------------------------------------