add makefile

This commit is contained in:
condret 2024-10-06 02:25:54 +02:00
parent 2052771fb3
commit eda42fb4d9
2 changed files with 6 additions and 1 deletions

5
Makefile Normal file
View File

@ -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)

View File

@ -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;