From 998b64d14c9d055562d8c1611813d40af4cb030b Mon Sep 17 00:00:00 2001 From: Ian C Date: Fri, 9 Mar 2012 23:01:13 +0000 Subject: Further bug fixes to Z80. Now starts the Spectrum ROM OK. --- .../Z80Disassembler.cs | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'src/Noddybox.Emulation.EightBit.Z80.Disassembler') 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; -- cgit v1.2.3