diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9e12564 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +LDFLAGS = $(shell pkg-config --libs sdl2 r_util r_io) +CFLAGS = -Wall -I include/ $(shell pkg-config --cflags sdl2 r_util r_io) + +io/timers.o: + gcc -c io/timers.c -o io/timers.o $(CFLAGS) diff --git a/io/timers.c b/io/timers.c index 2b80f9f..6198abc 100644 --- a/io/timers.c +++ b/io/timers.c @@ -167,7 +167,7 @@ void gb_timers_update (GBTimers *timers, ut32 cycles) { mask = 0x1 << 7; break; } - if ((timers->odiv & mask) && !(timers->div & mask) || + if (((timers->odiv & mask) && !(timers->div & mask)) || ((timers->odiv & mask) && (timers->div & mask) && timers->check_fedge)) { if (timers->buf[GB_TIMERS_TIMA] == 0xff) { timers->tima_wait = 4;