X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fcz80%2Fcz80.h;h=f3f79b394486534127d574312be3329613336856;hb=48c9e01be8ad93a7902e22f9ad07aba4527e6572;hp=4e846423c8a915a19aa271339747e02aedf78d43;hpb=c299a73848342a745422a2e1980ed7fcf7960f26;p=picodrive.git diff --git a/cpu/cz80/cz80.h b/cpu/cz80/cz80.h index 4e84642..f3f79b3 100644 --- a/cpu/cz80/cz80.h +++ b/cpu/cz80/cz80.h @@ -11,6 +11,12 @@ #ifndef CZ80_H #define CZ80_H +// uintptr_t +#include +#ifndef _MSC_VER +#include +#endif + #ifdef __cplusplus extern "C" { #endif @@ -43,6 +49,10 @@ extern "C" { #define INT32 signed int #endif +#ifndef FPTR +#define FPTR uintptr_t +#endif + /*************************************/ /* Z80 core Structures & definitions */ /*************************************/ @@ -222,7 +232,7 @@ typedef struct cz80_t union16 IX; union16 IY; union16 SP; - UINT32 PC; + UINT32 unusedPC; /* left for binary compat */ union16 BC2; union16 DE2; @@ -242,11 +252,12 @@ typedef struct cz80_t INT32 ICount; INT32 ExtraCycles; - UINT32 BasePC; - UINT32 Fetch[CZ80_FETCH_BANK]; + FPTR BasePC; + FPTR PC; + FPTR Fetch[CZ80_FETCH_BANK]; #if CZ80_ENCRYPTED_ROM - INT32 OPBase; - INT32 OPFetch[CZ80_FETCH_BANK]; + FPTR OPBase; + FPTR OPFetch[CZ80_FETCH_BANK]; #endif UINT8 *pzR8[8]; @@ -284,7 +295,7 @@ void Cz80_Set_IRQ(cz80_struc *CPU, INT32 line, INT32 state); UINT32 Cz80_Get_Reg(cz80_struc *CPU, INT32 regnum); void Cz80_Set_Reg(cz80_struc *CPU, INT32 regnum, UINT32 value); -void Cz80_Set_Fetch(cz80_struc *CPU, UINT32 low_adr, UINT32 high_adr, UINT32 fetch_adr); +void Cz80_Set_Fetch(cz80_struc *CPU, UINT32 low_adr, UINT32 high_adr, FPTR fetch_adr); #if CZ80_ENCRYPTED_ROM void Cz80_Set_Encrypt_Range(cz80_struc *CPU, UINT32 low_adr, UINT32 high_adr, UINT32 decrypted_rom); #endif