Debugger: Fix writing to specific segment in command-line debugger

This commit is contained in:
Vicki Pfau 2023-05-28 21:29:11 -07:00
parent a161dfeb31
commit cbc8e4f11a
2 changed files with 4 additions and 3 deletions

View File

@ -13,6 +13,7 @@ Emulation fixes:
- GBA BIOS: Fix clobbering registers with word-sized CpuSet
- GBA Video: Disable BG target 1 blending when OBJ blending (fixes mgba.io/i/2722)
Other fixes:
- Debugger: Fix writing to specific segment in command-line debugger
- mGUI: Fix cases where an older save state screenshot would be shown. (fixes mgba.io/i/2183)
- Qt: Fix savestate preview sizes with different scales (fixes mgba.io/i/2560)
Misc:

View File

@ -438,7 +438,7 @@ static void _writeByte(struct CLIDebugger* debugger, struct CLIDebugVector* dv)
return;
}
if (dv->segmentValue >= 0) {
debugger->d.p->core->rawWrite8(debugger->d.p->core, address, value, dv->segmentValue);
debugger->d.p->core->rawWrite8(debugger->d.p->core, address, dv->segmentValue, value);
} else {
debugger->d.p->core->busWrite8(debugger->d.p->core, address, value);
}
@ -460,7 +460,7 @@ static void _writeHalfword(struct CLIDebugger* debugger, struct CLIDebugVector*
return;
}
if (dv->segmentValue >= 0) {
debugger->d.p->core->rawWrite16(debugger->d.p->core, address, value, dv->segmentValue);
debugger->d.p->core->rawWrite16(debugger->d.p->core, address, dv->segmentValue, value);
} else {
debugger->d.p->core->busWrite16(debugger->d.p->core, address, value);
}
@ -492,7 +492,7 @@ static void _writeWord(struct CLIDebugger* debugger, struct CLIDebugVector* dv)
uint32_t address = dv->intValue;
uint32_t value = dv->next->intValue;
if (dv->segmentValue >= 0) {
debugger->d.p->core->rawWrite32(debugger->d.p->core, address, value, dv->segmentValue);
debugger->d.p->core->rawWrite32(debugger->d.p->core, address, dv->segmentValue, value);
} else {
debugger->d.p->core->busWrite32(debugger->d.p->core, address, value);
}