From f76b8997620b8fb22f3b3c650c6fa9005b7d660b Mon Sep 17 00:00:00 2001 From: Ian C Date: Sat, 16 Sep 2006 22:54:59 +0000 Subject: Added newer version of the Z80 core --- src/z80_dis.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/z80_dis.c') diff --git a/src/z80_dis.c b/src/z80_dis.c index 9d42829..6204f0d 100644 --- a/src/z80_dis.c +++ b/src/z80_dis.c @@ -25,6 +25,8 @@ */ static const char ident[]="$Id$"; +#include "z80_config.h" + #ifdef ENABLE_DISASSEM #include @@ -62,7 +64,11 @@ const char *Z80_Dis_Printf(const char *format, ...) Z80Byte Z80_Dis_FetchByte(Z80 *cpu, Z80Word *pc) { +#ifdef ENABLE_ARRAY_MEMORY + return Z80_MEMORY[(*pc)++]; +#else return cpu->disread(cpu,(*pc)++); +#endif } @@ -1454,7 +1460,11 @@ static void DIS_DJNZ (Z80 *z80, Z80Byte op, Z80Word *pc) { Z80Word new; +#ifdef ENABLE_ARRAY_MEMORY + new=*pc+(Z80Relative)Z80_MEMORY[*pc]+1; +#else new=*pc+(Z80Relative)z80->disread(z80,*pc)+1; +#endif (*pc)++; Z80_Dis_Set("djnz",Z80_Dis_Printf("$%.4x",new)); } @@ -1469,7 +1479,11 @@ static void DIS_JR (Z80 *z80, Z80Byte op, Z80Word *pc) Z80Word new; const char *p; +#ifdef ENABLE_ARRAY_MEMORY + new=*pc+(Z80Relative)Z80_MEMORY[*pc]+1; +#else new=*pc+(Z80Relative)z80->disread(z80,*pc)+1; +#endif (*pc)++; if ((p=GetLabel(new))) @@ -1490,7 +1504,11 @@ static void DIS_JR_CO (Z80 *z80, Z80Byte op, Z80Word *pc) const char *p; con=z80_dis_condition[(op-0x20)/8]; +#ifdef ENABLE_ARRAY_MEMORY + new=*pc+(Z80Relative)Z80_MEMORY[*pc]+1; +#else new=*pc+(Z80Relative)z80->disread(z80,*pc)+1; +#endif (*pc)++; if ((p=GetLabel(new))) -- cgit v1.2.3