From 2be736d99d09e76c79be3705720b4cc7a9663258 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 15 Oct 2016 08:49:18 -0500 Subject: [PATCH] More nes junk support --- Assets/gamedb/gamedb.txt | 2 ++ .../Consoles/Nintendo/NES/Boards/Mapper132.cs | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Assets/gamedb/gamedb.txt b/Assets/gamedb/gamedb.txt index b55479c2c2..6c6bbc6511 100644 --- a/Assets/gamedb/gamedb.txt +++ b/Assets/gamedb/gamedb.txt @@ -105,6 +105,8 @@ sha1:83264E3F8807998D09E9FBA19B13BBEA7C888D88 O Bakushou!! Jinsei Gekijou 3 (J) sha1:E79FC613112CC5AB0FC8B1150E182670FB042F4A G Contra Fighter (Unl) NES board=MAPPER238 sha1:2C512DE4079AF45D7B9218E40BB68E308ABE288C B Magic Johnson's Fast Break (U) NES board=MAPPER001;PRG=64;CHR=128 sha1:D2BE67170DDED1E1108EED2D4D8CA9D9CEE9F9E2 G Super Mario Bros 2 (Lost LEvels) (Unl) NES board=MAPPER040;WRAM=0;PAD_H=1;PAD_V=0 +sha1:77D5D7A162B61DEFC6B66B6A39B8D51E124AC534 B Tagin' Dragon (Bunch) [b] NES board=COLORDREAMS-74*377;CHR=16;PRG=32;WRAM=0 +sha1:2028940CF7C757A3A7931A741D5EC79C3554D38C O Wally Bear and the No Gang (AVE) [o] NES board=AVE-NINA-07;WRAM=0 ;;;;;;;;;;;;;;;;;;;----------------------------------------------------------------------- ;;;;;;;;;;;;;;;;;;;----------------------------------------------------------------------- diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper132.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper132.cs index db452e233b..6c0444a40f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper132.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper132.cs @@ -87,7 +87,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override byte ReadPRG(int addr) { - return ROM[addr + (prg << 15)]; + // Xiao Ma Li (Ch) has 16k prg (mapped to both 0x8000 and 0xC000) + if (Cart.prg_size == 16) + { + return ROM[addr & 0x3FFF]; + } + else + { + return ROM[addr + ((prg & prg_mask) << 15)]; + } } public override byte ReadPPU(int addr)