Fix Mod table writes

(mostly) fixes sword sounds in FDS Zelda 1.

Numerous other problems remain.
This commit is contained in:
alyosha-tas 2016-09-09 21:22:53 -04:00 committed by GitHub
parent ef445c90c7
commit addaf2fa91
1 changed files with 8 additions and 4 deletions

View File

@ -326,9 +326,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
break;
case 0x4088:
// write twice into virtual 64 unit buffer
Buffer.BlockCopy(modtable, 2, modtable, 0, 62);
modtable[62] = (byte)(value & 7);
modtable[63] = (byte)(value & 7);
//Buffer.BlockCopy(modtable, 2, modtable, 0, 62);
modtable[modtablepos] = (byte)(value & 7);
modtablepos++;
modtablepos &= 63;
modtable[modtablepos] = (byte)(value & 7);
modtablepos++;
modtablepos &= 63;
break;
case 0x4089:
switch (value & 3)
@ -368,4 +372,4 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
return ret;
}
}
}
}