DiztinGUIsh
DiztinGUIsh copied to clipboard
error in Relative16 addressing?
The highlighted cell magenta should (I think) be one byte after it.
the instruction "PER $0003" is using Relative16 addressing, and I think we're going wrong somewhere in CPU65816.cs GetIntermediateAddress():
case Cpu65C816Constants.AddressMode.Relative16:
{
// something may be wrong here with the "PER" instruction (opcode 0x62).
programCounter = data.ConvertPCtoSnes(offset + 3);
bank = programCounter >> 16;
var romByte = data.GetRomWord(offset + 1);
if (!romByte.HasValue)
return -1;
return (bank << 16) | ((programCounter + (short)romByte) & 0xFFFF);
}
can't track it down at the moment