X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fcz80%2Fcz80.c;h=461b46a761826531ca25c0b791ebc89cf94c9ddb;hb=81fda4e8d854c96e70dc2e6b7cd2f48a51f55d86;hp=bcff740aca14b7aab90ae6116ce919ad485172b2;hpb=a4221917e147ba303f2cf6c09d12362bf2802084;p=picodrive.git diff --git a/cpu/cz80/cz80.c b/cpu/cz80/cz80.c index bcff740..461b46a 100644 --- a/cpu/cz80/cz80.c +++ b/cpu/cz80/cz80.c @@ -13,6 +13,10 @@ #include #include "cz80.h" +#if PICODRIVE_HACKS +#include +#endif + #ifndef ALIGN_DATA #define ALIGN_DATA __attribute__((aligned(4))) #endif @@ -203,6 +207,13 @@ void Cz80_Reset(cz80_struc *CPU) Cz80_Set_Reg(CPU, CZ80_PC, 0); } +/* */ +#if PICODRIVE_HACKS +static inline unsigned char picodrive_read(unsigned short a) +{ + return (a < 0x4000) ? Pico.zram[a&0x1fff] : z80_read(a); +} +#endif /*-------------------------------------------------------- CPUŽÀs @@ -248,7 +259,10 @@ Cz80_Exec: { afterEI = 0; Cz80_Check_Interrupt: - CHECK_INT + if (CPU->IRQState != CLEAR_LINE) + { + CHECK_INT + } goto Cz80_Exec; } }