From 3e2e62d3966f4620674e51a424c7c2e734e05235 Mon Sep 17 00:00:00 2001 From: Ian C Date: Wed, 6 Sep 2006 23:35:58 +0000 Subject: Updated to use a function-based memory interface. --- z80_dis.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'z80_dis.c') diff --git a/z80_dis.c b/z80_dis.c index 2fcdf4b..9d42829 100644 --- a/z80_dis.c +++ b/z80_dis.c @@ -62,7 +62,7 @@ const char *Z80_Dis_Printf(const char *format, ...) Z80Byte Z80_Dis_FetchByte(Z80 *cpu, Z80Word *pc) { - return cpu->memory[(*pc)++]; + return cpu->disread(cpu,(*pc)++); } @@ -1454,7 +1454,7 @@ static void DIS_DJNZ (Z80 *z80, Z80Byte op, Z80Word *pc) { Z80Word new; - new=*pc+(Z80Relative)z80->memory[*pc]+1; + new=*pc+(Z80Relative)z80->disread(z80,*pc)+1; (*pc)++; Z80_Dis_Set("djnz",Z80_Dis_Printf("$%.4x",new)); } @@ -1469,7 +1469,7 @@ static void DIS_JR (Z80 *z80, Z80Byte op, Z80Word *pc) Z80Word new; const char *p; - new=*pc+(Z80Relative)z80->memory[*pc]+1; + new=*pc+(Z80Relative)z80->disread(z80,*pc)+1; (*pc)++; if ((p=GetLabel(new))) @@ -1490,7 +1490,7 @@ static void DIS_JR_CO (Z80 *z80, Z80Byte op, Z80Word *pc) const char *p; con=z80_dis_condition[(op-0x20)/8]; - new=*pc+(Z80Relative)z80->memory[*pc]+1; + new=*pc+(Z80Relative)z80->disread(z80,*pc)+1; (*pc)++; if ((p=GetLabel(new))) -- cgit v1.2.3