Support and General Use > Plugins/Viewers

Discuss Mikhail Tkach's InfoNES port

<< < (5/11) > >>

criznach:

--- Quote from: MikeT on October 09, 2007, 08:45:32 PM ---No, no working sound unfortunately.

--- End quote ---

I downloaded your broken sound files and discovered a few clues...

First, the performance hit from sound isn't as big as I thought, because if I turn on the mute flag to prevent InfoNES_pAPUVsync from being called, the framerate doesn't increase by much.  I guess profiling a windows build of InfoNES isn't going to give me very useful data.

It looks like rockbox's pcm_play_data function is expecting stereo samples, while infones is feeding it mono samples.  So I tried doubling the final buffer and writing each byte twice.  I then pass pcm_play_data samples*2 as it's length parameter.  This makes the sound almost tolerable.  It's still very chunky and not pleasant.  But it sounds a bit more like what I expect :)  I thought changing the pAPU_QUALITY define and the sample rate would improve the performance, but something isn't right when I do that.

criznach:
I just noticed that the InfoNES_Wait function is empty in the system_rockbox code.  That normally regulates the frame skipping and times the sound buffers to prevent skipping.  I think implementing that using another platform as a model will even things out.  Look at the windows src for a good example.  On windows the timer runs in the UI thread and the emu thread checks a flag.  On rockbox, we could put the timer in a thread or if there are other benefits, put the emu in another thread.  Looks like multi-core firmware is just about ready to tinker with :)

MikeT: have you been able to work on the InfoNes lately?

Chronon:
criznach, please "modify" your posts instead of double posting.

MikeT:

--- Quote from: criznach on October 16, 2007, 02:00:18 PM ---
MikeT: have you been able to work on the InfoNes lately?

--- End quote ---

I've been wrecking my brains out trying to understand why sim build was acting so strangely. Turns out I forgot rb->yield(). So I've been working on it but haven't got much done.

criznach:

--- Quote from: Chronon on October 16, 2007, 02:05:33 PM ---criznach, please "modify" your posts instead of double posting.

--- End quote ---

Oops - what did I double post?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version