X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=input.c;h=dc48c716fd53c38d835a770f7ea038435d193f5a;hp=40c0ff8bb95039aea929f16b761f0ecf297b5ea7;hb=c0bf6f9f02a2b6afb961a7e9195e2168d7e9cecf;hpb=4e1934c1ee3a43796e68edc66b3c3f8e079caf7c diff --git a/input.c b/input.c index 40c0ff8..dc48c71 100644 --- a/input.c +++ b/input.c @@ -30,6 +30,11 @@ #include "input.h" #include "movie.h" +#ifdef DEBUG_ASM_6502 +extern int cpu_repeat; +extern int cpu_lastval; +#endif + extern INPUTC *FCEU_InitZapper(int w); extern INPUTC *FCEU_InitPowerpad(int w); extern INPUTC *FCEU_InitArkanoid(int w); @@ -97,6 +102,9 @@ static DECLFR(JPRead) { uint8 ret=0; +#ifdef DEBUG_ASM_6502 + if (cpu_repeat) return cpu_lastval; +#endif if(JPorts[A&1]->Read) ret|=JPorts[A&1]->Read(A&1); @@ -105,6 +113,9 @@ static DECLFR(JPRead) ret=FCExp->Read(A&1,ret); ret|=X.DB&0xC0; +#ifdef DEBUG_ASM_6502 +// cpu_lastval=ret; +#endif return(ret); }