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

What CPU overhead can be disabled and how? #7

Closed
rjobling opened this issue Feb 14, 2024 · 8 comments
Closed

What CPU overhead can be disabled and how? #7

rjobling opened this issue Feb 14, 2024 · 8 comments

Comments

@rjobling
Copy link

Hi there
I have a routine that's extremely close to using a full frame.
It can run at 50hz in my own framework while also playing back an LSP tune (without the need for insane mode).
However, running it inside LDOS there must be additional overhead as it's going over the limit.
Can you fill me in on the additional overhead and what/how I might be able to disable that for the duration of one effect?

@arnaud-carre
Copy link
Owner

arnaud-carre commented Feb 14, 2024 via email

@rjobling
Copy link
Author

At the moment it seems like the music will also stop.

It seems like I need LSP_MusicPlayTick exposed. Then I have two options:
1 - Call LSP_MusicPlayTick every frame.
2 - Replace the CIA handler with a simple one that calls LSP_MusicPlayTick.

A third option is that I add the simple handler on the LDOS side and add a method for telling it to swap to that handler.

I can give those a try, but it seems like there's a good chance I could introduce a music glitch not matter what I do. Of the options replacing the CIA handler seems easiest and most likely to continue without glitching.

@rjobling
Copy link
Author

I gave that a try and it seems like it works.
It does save a few cycles, but not really enough to solve my problems.
Using insane player code might be another thing I'll try.

@rjobling
Copy link
Author

No need to keep this open.

@arnaud-carre
Copy link
Owner

arnaud-carre commented Feb 15, 2024 via email

@arnaud-carre
Copy link
Owner

arnaud-carre commented Feb 17, 2024 via email

@arnaud-carre
Copy link
Owner

arnaud-carre commented Feb 17, 2024 via email

@rjobling
Copy link
Author

rjobling commented Feb 17, 2024

Good to know about the vbl irq. I'll give that a go.

I think the main problem is that I was initially testing with a simpler mod file. Now I've switch to testing with the Redux mod file and the DMA usage is pushing things over the edge, along with the CIA irq and standard LSP player.

In my standalone exe it was working okay, but that was with the simpler mod.

I'm sure can eventually get it working one way or another, I might try integrating an Insane player for the final mod into LDOS, that'll help.

Worst case I can reduce the screen area I'm using, but as I'm sure you can appreciate that feels like admitting defeat!

If you are on discord (My account is: _jobbo) it'd be nice to be able to chat on there if I need help late in the day. I'm also on twitter if you follow me back we can use that (@CosmicOrbs68k).

But most likely I have enough info to go on and I'll just need to find the right mix of optimizations.

p.s. Both LSP and LDOS are absolutely awesome! So happy to be able to use them!

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