freebee
freebee copied to clipboard
Optimization needed for Raspberry Pi
Testing on a Raspberry Pi 4, I encountered slowdown where the update wasn't getting done in the 10ms time slot allotted.
Should we have the Makefile default to the release
build instead of debug
?
I did some profiling with valgrind, the memory access functions get called A LOT: m68k_read_memory_16 (36%) m68k_read_memory_32 (19%) m68k_write_memory_32 (8%)
checkMemoryAccess () and mapAddr() getting called a lot. I'm going to look into some more. Main thing I think would help is avoiding the SUPERVISOR_MODE check in checkMemoryAccess() as it calls m68k_get_reg()
I think inline'ing PutPixel will help too. I'll play around with some more.
Should we have the Makefile default to the
release
build instead ofdebug
?
I'm inclined to say yes, the code's pretty stable now.
OK, I just pushed a new Makefile that defaults to release
build. And moved -O flag from CFLAGS to debug flags as we were getting -O and -O2 in release build -- which I'm sure was fine regardless. Or even can just turn off -O flag in debug if preferred.