I have sound working, mostly. I need to play with the timing a bit since the sound effects seem to be delayed by a bit. It's probably related to the speed of Snes9x.
I also reorganized the video code a bit, so it uses two pre-generated dma chains for sending the texture to vram, and for drawing. I also made it more generic for other emulators.
There also seems to be a problem with the axis mapping or the values being reported.
Almost there, :D.
How was speed after sound was implemented?
Is the sound choppy, like SNES-Station at this point?
Sound and speed are the parts I'm most curious to see :)
Very good to here just can't wait but take your time yea I know counter myself but sounds good :D
Keep going. Believe in the ball, and throw yourself. You can do it! :D
Originally Posted by ragnarok2040
Keep it up Ragnarok!
It's great to see your achievements with SNES9X
Thank you very much by your dedication in this project
I added a bit of optimization, by adding aligned reads and writes, but it mostly only effects the C4 emulation and a small portion of the PPU. I didn't notice a large speedup, however.
I didn't notice any speed hit after adding the sound code. It's possible the overhead isn't noticeable since Snes9x is running slow. I just added the timing, and I've just measured the speed to be somewhere around 30-60 milliseconds per emulated frame so my settings are off by a bit. The sound is popping, and delayed by a lot, but it sounds okay~ish, at least, compared to when I first got fceultra to produce sound...
Really glad you're getting sound in, but three wise words:
Originally Posted by ragnarok2040
TAKE YOUR TIME.
We don't wanna end up with SNES-STATION two. XD
Hey man, how are things? :cool:
I was half gone because of the work, but I have followed your posts, I wonder if even with the initial problems that arose, with its enormous experience you believe that we gain an emulator with sound and very good qualities, like the work you made with FCEUltra.
I'm anxious for this valuable release, but as many have already spoken, make peace, I'm sure will leave a great emulator.
Hugs and up next, we are waiting for news.
Things are going pretty good :D. I'm still working on the timing aspect.
The APU seems to be emulated separately from the rest of Snes9x. So, essentially, what needs to be done is to emulate the APU as fast or faster than 60/50 Hz timing, and then sync the calls of S9xMainLoop with it to get the sound data.
If I use S9xSoundSync() as a condition to call S9xMainLoop() (idea from the ps3 port), it allows the sound code to run without being blocked by the emulation. By using a fps counter, I've determined that SoundInputRate at around 9000-12000 allows the loop to run at ~50-60 Hz, enough to fill the sound buffer every loop. It sounds kind of bad, and I'm still getting popping, since the fps isn't particularly stable, but it seems to be the way to do it...
Now I just need to work on the rom loading/unloading, and polish off the browser, and fix a few things with the input and configuration.
This kind of information (from you and also the one from ps3 port) remember me how much ideas are just lost in out day to day on closed-source software.
No more than once I've had to rewrite things that have a open-source counterpart, just because company XX does not want to open the source of some software that is not even sold, but given away.... :-P