From b3f4342b584612f95938f1f00ca2d026a3f3c304 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Thu, 20 May 2021 23:41:48 +0200 Subject: Apply asie's patch 5 for PPU fixes and cleanup --- src/uxn/uxn.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/uxn/uxn.c') diff --git a/src/uxn/uxn.c b/src/uxn/uxn.c index 8e76660..53f7983 100644 --- a/src/uxn/uxn.c +++ b/src/uxn/uxn.c @@ -16,21 +16,12 @@ WITH REGARD TO THIS SOFTWARE. /* clang-format off */ static inline void push8(Stack *s, Uint8 a) { -#ifdef CPU_ERROR_CHECKING - if (s->ptr == 0xff) { s->error = 2; return; } -#endif s->dat[s->ptr++] = a; } static inline Uint8 pop8_keep(Stack *s) { -#ifdef CPU_ERROR_CHECKING - if (s->kptr == 0) { s->error = 1; return 0; } -#endif return s->dat[--s->kptr]; } static inline Uint8 pop8_nokeep(Stack *s) { -#ifdef CPU_ERROR_CHECKING - if (s->ptr == 0) { s->error = 1; return 0; } -#endif return s->dat[--s->ptr]; } static inline void devpoke8(Device *d, Uint8 a, Uint8 b) { d->dat[a & 0xf] = b; d->talk(d, a & 0x0f, 1); } @@ -55,7 +46,7 @@ IWRAM_CODE static inline void opcuxn(Uxn *u, Uint8 instr) { -#ifdef CPU_ERROR_CHECKING +#if 1 // With CPU error checking enabled, the codebase becomes too large to fit in ITCM. // Therefore, we take some concessions. if (instr & 0x40) { @@ -155,8 +146,6 @@ int evaluxn(Uxn *u, Uint16 vec) { u->ram.ptr = vec; - u->wst.error = 0; - u->rst.error = 0; while(u->ram.ptr) { opcuxn(u, u->ram.dat[u->ram.ptr++]); } -- cgit v1.2.1