mirror of
https://github.com/SourMesen/Mesen-S.git
synced 2024-06-23 06:41:55 -04:00
Debugger: Fixed read word with expressions returning lower byte only
This commit is contained in:
parent
7226e7dbe0
commit
341656e699
|
@ -95,12 +95,6 @@ bool ExpressionEvaluator::CheckSpecialTokens(string expression, size_t &pos, str
|
|||
output += std::to_string((int64_t)EvalValues::Irq);
|
||||
} else if(token == "nmi") {
|
||||
output += std::to_string((int64_t)EvalValues::Nmi);
|
||||
} else if(token == "verticalblank") {
|
||||
output += std::to_string((int64_t)EvalValues::VerticalBlank);
|
||||
} else if(token == "sprite0hit") {
|
||||
output += std::to_string((int64_t)EvalValues::Sprite0Hit);
|
||||
} else if(token == "spriteoverflow") {
|
||||
output += std::to_string((int64_t)EvalValues::SpriteOverflow);
|
||||
} else if(token == "value") {
|
||||
output += std::to_string((int64_t)EvalValues::Value);
|
||||
} else if(token == "address") {
|
||||
|
@ -111,8 +105,6 @@ bool ExpressionEvaluator::CheckSpecialTokens(string expression, size_t &pos, str
|
|||
output += std::to_string((int64_t)EvalValues::IsWrite);
|
||||
} else if(token == "isread") {
|
||||
output += std::to_string((int64_t)EvalValues::IsRead);
|
||||
} else if(token == "branched") {
|
||||
output += std::to_string((int64_t)EvalValues::Branched);
|
||||
} else {
|
||||
return false;
|
||||
//TODO LABELS
|
||||
|
@ -399,11 +391,7 @@ int32_t ExpressionEvaluator::Evaluate(ExpressionData &data, DebugState &state, E
|
|||
//case EvalValues::AbsoluteAddress: token = _debugger->GetAbsoluteAddress(operationInfo.Address); break;
|
||||
case EvalValues::IsWrite: token = operationInfo.Type == MemoryOperationType::Write || operationInfo.Type == MemoryOperationType::DmaWrite; break;
|
||||
case EvalValues::IsRead: token = operationInfo.Type != MemoryOperationType::Write && operationInfo.Type != MemoryOperationType::DmaWrite; break;
|
||||
/*case EvalValues::PreviousOpPC: token = state.CPU.PreviousDebugPC; break;
|
||||
case EvalValues::Sprite0Hit: token = state.PPU.StatusFlags.Sprite0Hit; resultType = EvalResultType::Boolean; break;
|
||||
case EvalValues::SpriteOverflow: token = state.PPU.StatusFlags.SpriteOverflow; resultType = EvalResultType::Boolean; break;
|
||||
case EvalValues::VerticalBlank: token = state.PPU.StatusFlags.VerticalBlank; resultType = EvalResultType::Boolean; break;
|
||||
case EvalValues::Branched: token = Disassembler::IsJump(_debugger->GetMemoryDumper()->GetMemoryValue(DebugMemoryType::CpuMemory, state.CPU.PreviousDebugPC, true)); resultType = EvalResultType::Boolean; break;*/
|
||||
//case EvalValues::PreviousOpPC: token = state.CPU.PreviousDebugPC; break;
|
||||
}
|
||||
}
|
||||
} else if(token >= EvalOperators::Multiplication) {
|
||||
|
|
|
@ -65,10 +65,6 @@ enum EvalValues : int64_t
|
|||
IsWrite = 20000000115,
|
||||
IsRead = 20000000116,
|
||||
PreviousOpPC = 20000000117,
|
||||
Sprite0Hit = 20000000118,
|
||||
SpriteOverflow = 20000000119,
|
||||
VerticalBlank = 20000000120,
|
||||
Branched = 20000000121,
|
||||
|
||||
FirstLabelIndex = 20000002000,
|
||||
};
|
||||
|
|
|
@ -119,7 +119,7 @@ uint8_t MemoryDumper::GetMemoryValue(SnesMemoryType memoryType, uint32_t address
|
|||
return 0;
|
||||
}
|
||||
|
||||
uint8_t MemoryDumper::GetMemoryValueWord(SnesMemoryType memoryType, uint32_t address)
|
||||
uint16_t MemoryDumper::GetMemoryValueWord(SnesMemoryType memoryType, uint32_t address)
|
||||
{
|
||||
uint32_t memorySize = GetMemorySize(memoryType);
|
||||
uint8_t lsb = GetMemoryValue(memoryType, address);
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
void GetMemoryState(SnesMemoryType type, uint8_t *buffer);
|
||||
|
||||
uint8_t GetMemoryValue(SnesMemoryType memoryType, uint32_t address, bool disableSideEffects = true);
|
||||
uint8_t GetMemoryValueWord(SnesMemoryType memoryType, uint32_t address);
|
||||
uint16_t GetMemoryValueWord(SnesMemoryType memoryType, uint32_t address);
|
||||
void SetMemoryValue(SnesMemoryType memoryType, uint32_t address, uint8_t value, bool disableSideEffects = true);
|
||||
void SetMemoryValues(SnesMemoryType memoryType, uint32_t address, uint8_t* data, uint32_t length);
|
||||
void SetMemoryState(SnesMemoryType type, uint8_t *buffer, uint32_t length);
|
||||
|
|
Loading…
Reference in a new issue