summaryrefslogtreecommitdiff
path: root/src/Noddybox.Emulation.EightBit.Z80.Disassembler/Z80Disassembler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Noddybox.Emulation.EightBit.Z80.Disassembler/Z80Disassembler.cs')
-rw-r--r--src/Noddybox.Emulation.EightBit.Z80.Disassembler/Z80Disassembler.cs22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/Noddybox.Emulation.EightBit.Z80.Disassembler/Z80Disassembler.cs b/src/Noddybox.Emulation.EightBit.Z80.Disassembler/Z80Disassembler.cs
index 438b962..91be791 100644
--- a/src/Noddybox.Emulation.EightBit.Z80.Disassembler/Z80Disassembler.cs
+++ b/src/Noddybox.Emulation.EightBit.Z80.Disassembler/Z80Disassembler.cs
@@ -633,16 +633,10 @@ namespace Noddybox.Emulation.EightBit.Z80.Disassembler
private void DIS_BIT_IX(byte op, ref ushort pc)
{
- int reg;
int bit;
- reg = (op % 8);
bit = (op - 0x40) / 8;
-
- if (reg == 6)
- Z80_Dis_Set("bit", Z80_Dis_Printf("%d,%s", bit, IX_RelStrCB(op, ref pc)));
- else
- Z80_Dis_Set("bit", Z80_Dis_Printf("%d,%s[%s]", bit, IX_RelStrCB(op, ref pc), z80_dis_reg8[reg]));
+ Z80_Dis_Set("bit", Z80_Dis_Printf("%d,%s", bit, IX_RelStrCB(op, ref pc)));
}
private void DIS_RES_IX(byte op, ref ushort pc)
@@ -1276,16 +1270,10 @@ namespace Noddybox.Emulation.EightBit.Z80.Disassembler
private void DIS_BIT_IY(byte op, ref ushort pc)
{
- int reg;
int bit;
- reg = (op % 8);
bit = (op - 0x40) / 8;
-
- if (reg == 6)
- Z80_Dis_Set("bit", Z80_Dis_Printf("%d,%s", bit, IY_RelStrCB(op, ref pc)));
- else
- Z80_Dis_Set("bit", Z80_Dis_Printf("%d,%s[%s]", bit, IY_RelStrCB(op, ref pc), z80_dis_reg8[reg]));
+ Z80_Dis_Set("bit", Z80_Dis_Printf("%d,%s", bit, IY_RelStrCB(op, ref pc)));
}
private void DIS_RES_IY(byte op, ref ushort pc)
@@ -2403,13 +2391,13 @@ namespace Noddybox.Emulation.EightBit.Z80.Disassembler
{
address = String.Format("{0:X4}", startAddress);
- byte op = Z80_Dis_FetchByte(ref startAddress);
-
Hex.Clear();
+ byte op = Z80_Dis_FetchByte(ref startAddress);
+
dis_opcode_z80[op](op, ref startAddress);
- opcode = String.Format("{0} {1}", Opcode, Argument);
+ opcode = String.Format("{0,-5} {1}", Opcode, Argument);
hexdump = Hex.ToString();
return startAddress;