X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=x6502.h;h=86f4f063d439cc7eca366aef2ec85247698d58bb;hp=414533b1934c7c6461a5ca827172cc7f2f1ad99c;hb=937bf65b1c80e9394547e5f105664bd26f3671de;hpb=c62d28102c77e19c291c78bf6bf7f0a81abd54b9 diff --git a/x6502.h b/x6502.h index 414533b..86f4f06 100644 --- a/x6502.h +++ b/x6502.h @@ -55,7 +55,15 @@ extern void FP_FASTAPASS(1) (*MapIRQHook)(int a); void X6502_Reset(void); void X6502_Power(void); -void X6502_Run(int32 cycles); +#define X6502_Run(c) \ +{ \ + int32 cycles = (c) << 4; /* *16 */ \ + if (PAL) cycles -= (c); /* *15 */ \ + X.count+=cycles; \ + if (X.count > 0) X6502_Run_(); \ +} +void X6502_Run_(void); + void TriggerIRQ(void); void TriggerNMI(void); @@ -64,3 +72,4 @@ void TriggerNMINSF(void); void FASTAPASS(1) X6502_AddCycles(int x); void FASTAPASS(1) X6502_IRQBegin(int w); void FASTAPASS(1) X6502_IRQEnd(int w); +