freebee icon indicating copy to clipboard operation
freebee copied to clipboard

Optimization needed for Raspberry Pi

Open agentbooth opened this issue 3 years ago • 4 comments

Testing on a Raspberry Pi 4, I encountered slowdown where the update wasn't getting done in the 10ms time slot allotted.

agentbooth avatar Feb 27 '21 18:02 agentbooth

Should we have the Makefile default to the release build instead of debug?

agentbooth avatar Feb 27 '21 18:02 agentbooth

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.

agentbooth avatar Feb 27 '21 18:02 agentbooth

Should we have the Makefile default to the release build instead of debug?

I'm inclined to say yes, the code's pretty stable now.

philpem avatar Mar 18 '21 17:03 philpem

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.

agentbooth avatar Mar 18 '21 18:03 agentbooth