Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization needed for Raspberry Pi #45

Open
agentbooth opened this issue Feb 27, 2021 · 4 comments
Open

Optimization needed for Raspberry Pi #45

agentbooth opened this issue Feb 27, 2021 · 4 comments

Comments

@agentbooth
Copy link
Contributor

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

@agentbooth
Copy link
Contributor Author

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

@agentbooth
Copy link
Contributor Author

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.

@philpem
Copy link
Owner

philpem commented Mar 18, 2021

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.

@agentbooth
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants