X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fcz80%2Fcz80.c;h=20e8053fe93c9f3da85416e41ccc5b0c0088852f;hb=eaa9417a9b52389534f0dcbae6263781ea809ab2;hp=461b46a761826531ca25c0b791ebc89cf94c9ddb;hpb=b542be4686241c9e0722ff8e452980f9ac2b4d7c;p=picodrive.git diff --git a/cpu/cz80/cz80.c b/cpu/cz80/cz80.c index 461b46a..20e8053 100644 --- a/cpu/cz80/cz80.c +++ b/cpu/cz80/cz80.c @@ -14,12 +14,20 @@ #include "cz80.h" #if PICODRIVE_HACKS +#undef EMU_M68K #include #endif #ifndef ALIGN_DATA +#ifdef _MSC_VER +#define ALIGN_DATA +#define inline +#undef CZ80_USE_JUMPTABLE +#define CZ80_USE_JUMPTABLE 0 +#else #define ALIGN_DATA __attribute__((aligned(4))) #endif +#endif #define CF 0x01 #define NF 0x02 @@ -234,6 +242,7 @@ INT32 Cz80_Exec(cz80_struc *CPU, INT32 cycles) UINT32 res; UINT32 val; int afterEI = 0; + union16 *data; PC = CPU->PC; #if CZ80_ENCRYPTED_ROM @@ -247,7 +256,8 @@ INT32 Cz80_Exec(cz80_struc *CPU, INT32 cycles) Cz80_Exec: if (CPU->ICount > 0) { - union16 *data = pzHL; +Cz80_Exec_nocheck: + data = pzHL; Opcode = READ_OP(); #if CZ80_EMULATE_R_EXACTLY zR++; @@ -262,6 +272,8 @@ Cz80_Check_Interrupt: if (CPU->IRQState != CLEAR_LINE) { CHECK_INT + CPU->ICount -= CPU->ExtraCycles; + CPU->ExtraCycles = 0; } goto Cz80_Exec; }