Debugger: GB - Fixed disassembly for CB prefixed instructions
This commit is contained in:
parent
b22f514ae5
commit
d1952d33f9
3 changed files with 5 additions and 7 deletions
|
@ -58,7 +58,7 @@ constexpr const uint8_t _opSize[256] = {
|
|||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,3,3,3,1,2,1,1,1,3,1,3,3,2,1,
|
||||
1,1,3,3,3,1,2,1,1,1,3,2,3,3,2,1,
|
||||
1,1,3,1,3,1,2,1,1,1,3,1,3,1,2,1,
|
||||
2,1,1,1,1,1,2,1,2,1,3,1,1,1,2,1,
|
||||
2,1,1,1,1,1,2,1,2,1,3,1,1,1,2,1,
|
||||
|
@ -80,7 +80,7 @@ void GameboyDisUtils::GetDisassembly(DisassemblyInfo& info, string& out, uint32_
|
|||
};
|
||||
|
||||
uint8_t* byteCode = info.GetByteCode();
|
||||
const char* op = byteCode[0] == 0xCB ? _cbTemplate[byteCode[0]] : _opTemplate[byteCode[0]];
|
||||
const char* op = byteCode[0] == 0xCB ? _cbTemplate[byteCode[1]] : _opTemplate[byteCode[0]];
|
||||
if(byteCode[0] == 0xCB) {
|
||||
byteCode++;
|
||||
}
|
||||
|
|
|
@ -214,8 +214,6 @@ namespace Mesen.GUI.Debugger
|
|||
return;
|
||||
}
|
||||
|
||||
EmuApi.WriteLogEntry("Old: " + _lastPos.ToString() + " new: " + newPos.ToString());
|
||||
|
||||
Dictionary<string, string> values;
|
||||
if(_isGameboy) {
|
||||
values = new Dictionary<string, string>() {
|
||||
|
|
|
@ -177,8 +177,8 @@ namespace Mesen.GUI.Debugger
|
|||
new RegEntry("$FF40.7", "LCD Enabled", ppu.LcdEnabled),
|
||||
|
||||
new RegEntry("$FF41", "LCD Status (STAT)", null),
|
||||
new RegEntry("$FF41.0-1", "Mode", (ppu.Status & 0x03)),
|
||||
new RegEntry("$FF41.2", "Coincidence Flag", (ppu.Status & 0x04) != 0),
|
||||
new RegEntry("$FF41.0-1", "Mode", (int)ppu.Mode),
|
||||
new RegEntry("$FF41.2", "Coincidence Flag", ppu.LyCoincidenceFlag),
|
||||
new RegEntry("$FF41.3", "Mode 0 H-Blank IRQ", (ppu.Status & 0x08) != 0),
|
||||
new RegEntry("$FF41.4", "Mode 1 V-Blank IRQ", (ppu.Status & 0x10) != 0),
|
||||
new RegEntry("$FF41.5", "Mode 2 OAM IRQ", (ppu.Status & 0x20) != 0),
|
||||
|
@ -187,7 +187,7 @@ namespace Mesen.GUI.Debugger
|
|||
new RegEntry("", "LCD Registers", null),
|
||||
new RegEntry("$FF42", "Scroll Y (SCY)", ppu.ScrollY, Format.X8),
|
||||
new RegEntry("$FF43", "Scroll X (SCX)", ppu.ScrollX, Format.X8),
|
||||
new RegEntry("$FF44", "Y-Coordinate (LY)", ppu.Scanline, Format.X8),
|
||||
new RegEntry("$FF44", "Y-Coordinate (LY)", (ppu.Scanline < 153 || ppu.Cycle < 4) ? ppu.Scanline : 0, Format.X8),
|
||||
new RegEntry("$FF45", "LY Compare (LYC)", ppu.LyCompare, Format.X8),
|
||||
new RegEntry("$FF47", "BG Palette (BGP)", ppu.BgPalette, Format.X8),
|
||||
new RegEntry("$FF48", "OBJ Palette 0 (OBP0)", ppu.ObjPalette0, Format.X8),
|
||||
|
|
Loading…
Add table
Reference in a new issue