GB: Disassemble/Tracelog fixes for CB xx
- Print bit numbers for BIT/RES/SET properly - Don't print HL address for Bit ops that don't actually have one.
This commit is contained in:
parent
b74d47ae5b
commit
d2e3cf9927
2 changed files with 4 additions and 4 deletions
|
@ -248,7 +248,7 @@ namespace
|
||||||
case 2: addr = get_de(instance); break;
|
case 2: addr = get_de(instance); break;
|
||||||
case 3: addr = get_hl(instance); break;
|
case 3: addr = get_hl(instance); break;
|
||||||
case 4: addr = 0xFF00 + instance->get_cpureg(gambatte::GB::REG_C); break;
|
case 4: addr = 0xFF00 + instance->get_cpureg(gambatte::GB::REG_C); break;
|
||||||
case 5: if(opcode & 7) addr = get_hl(instance); break;
|
case 5: if((opcode & 7) == 6) addr = get_hl(instance); break;
|
||||||
}
|
}
|
||||||
while(s.str().length() < 28) s << " ";
|
while(s.str().length() < 28) s << " ";
|
||||||
if(addr >= 0) {
|
if(addr >= 0) {
|
||||||
|
|
|
@ -89,9 +89,9 @@ std::string disassemble_gb_opcode(uint16_t pc, std::function<uint8_t()> fetch, i
|
||||||
case 6: return (stringfmt() << "SWAP " << regs[reg]).str();
|
case 6: return (stringfmt() << "SWAP " << regs[reg]).str();
|
||||||
case 7: return (stringfmt() << "SRL " << regs[reg]).str();
|
case 7: return (stringfmt() << "SRL " << regs[reg]).str();
|
||||||
};
|
};
|
||||||
case 1: return (stringfmt() << "BIT " << bit << "," << regs[reg]).str();
|
case 1: return (stringfmt() << "BIT " << (int)bit << "," << regs[reg]).str();
|
||||||
case 2: return (stringfmt() << "RES " << bit << "," << regs[reg]).str();
|
case 2: return (stringfmt() << "RES " << (int)bit << "," << regs[reg]).str();
|
||||||
case 3: return (stringfmt() << "SET " << bit << "," << regs[reg]).str();
|
case 3: return (stringfmt() << "SET " << (int)bit << "," << regs[reg]).str();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
std::ostringstream o;
|
std::ostringstream o;
|
||||||
|
|
Loading…
Add table
Reference in a new issue