What should be done for NSFs that doesn't return from the play routine?
Any specific examples?
I'd try one of two things:
Just make it not return, emulating it at the usual NES timing. If it takes 5 frames to return, then treat it as if it ran for 5 frames.
Or
Force another interrupt anyway. If the stack blows, oh well. If will just wrap.
Quote:
Just make it not return, emulating it at the usual NES timing.
Do this, as it allows NSFs to do $4011 streaming.
The problem with NSFs is that they have a "custom rate" feature. They are not necessarily bound to the standard 60.0988 FPS speed of a NES. Some NSFs run at 75FPS, others even abuse the NSF specification to run much faster than that, and only run in NSF players that run the playback routine much faster than an actual NES would. We're talking update rates around 2000 here.
As long as the playback routine for each of those 2000 updates takes less than 800 or so cycles, I don't see how a cycle-counting IRQ couldn't be made to trigger the updates on hardware.
Maybe we could have a special value in the rate field to signify that an NSF never returns.