Ram Search Engine - fix searching for signed 1-byte and 2-byte (many other types still broken)

This commit is contained in:
adelikat 2013-09-28 18:02:08 +00:00
parent b26972a4fc
commit 06330c1c12
1 changed files with 24 additions and 3 deletions

View File

@ -619,13 +619,34 @@ namespace BizHawk.MultiClient
default: default:
case Watch.WatchSize.Byte: case Watch.WatchSize.Byte:
var theByte = _settings.Domain.PeekByte(addr); var theByte = _settings.Domain.PeekByte(addr);
return theByte; if (_settings.Type == Watch.DisplayType.Signed)
{
return (sbyte)theByte;
}
else
{
return theByte;
}
case Watch.WatchSize.Word: case Watch.WatchSize.Word:
var theWord = _settings.Domain.PeekWord(addr, _settings.BigEndian ? Endian.Big : Endian.Little); var theWord = _settings.Domain.PeekWord(addr, _settings.BigEndian ? Endian.Big : Endian.Little);
return theWord; if (_settings.Type == Watch.DisplayType.Signed)
{
return (short)theWord;
}
else
{
return theWord;
}
case Watch.WatchSize.DWord: case Watch.WatchSize.DWord:
var theDWord = _settings.Domain.PeekDWord(addr, _settings.BigEndian ? Endian.Big : Endian.Little); var theDWord = _settings.Domain.PeekDWord(addr, _settings.BigEndian ? Endian.Big : Endian.Little);
return (int)theDWord; if (_settings.Type == Watch.DisplayType.Signed)
{
return (int)theDWord;
}
else
{
return (int)theDWord; //TODO
}
} }
} }