X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fcz80%2Fcz80.c;h=461b46a761826531ca25c0b791ebc89cf94c9ddb;hb=b542be4686241c9e0722ff8e452980f9ac2b4d7c;hp=f2ab0032d952c03bf43449f0a99664f9c1145802;hpb=8022f53da61b8e70420a3bac97250119bbe26457;p=picodrive.git diff --git a/cpu/cz80/cz80.c b/cpu/cz80/cz80.c index f2ab003..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