From 7339615890d10732d015a74ddd36ce7a93aaad74 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sat, 17 Nov 2012 08:16:02 +0000 Subject: [PATCH] nes-change memory initialization pattern; fixes Huang Di. Doesnt seem to break any of the other known memory-initialization-dependent cases --- BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs b/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs index 40da6a4736..773255a299 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/NES/Core.cs @@ -190,11 +190,9 @@ namespace BizHawk.Emulation.Consoles.Nintendo goto case "NES-NTSC"; } - //fceux uses this technique, which presumably tricks some games into thinking the memory is randomized - for (int i = 0; i < 0x800; i++) - { - if ((i & 4) != 0) ram[i] = 0xFF; else ram[i] = 0x00; - } + //check fceux's PowerNES function for more information: + //relevant games: Cybernoid; Minna no Taabou no Nakayoshi Daisakusen; Huang Di; and maybe mechanized attack + for(int i=0;i<0x800;i++) if((i&1)!=0) ram[i] = 0xAA; else ram[i] = 0x55; SetupMemoryDomains();