Pocketsnes 6.5.0 Source?


pder

Member
Joined
Nov 6, 2007
Messages
148
This was recently released for the Wiz. I was wondering if the source code of this is available? I am interested in seeing if any of the changes would benefit the GP2X.
 
I'm also interested in the source code for PocketSNES 6.5.0. I would like to add some form of audio interpolation as an option. The sound quality right now is very sub optimal.
 
trentg said:
I'm also interested in the source code for PocketSNES 6.5.0. I would like to add some form of audio interpolation as an option. The sound quality right now is very sub optimal.
Would the interpolation fix the issues with some of the sounds in Super Mario World? e.g. the spin jump, pipes, etc.
 
Last edited by a moderator:
I'm not sure, but it would fix the issues of it sounding very bad. I would actually probably do a "gaussian interpolation" which is like a blur or smoothing, and it shouldn't hit performance much at all. I can't get the source though :-/... Right now every game sounds like below NES quality sound...
 
trentg said:
I'm not sure, but it would fix the issues of it sounding very bad. I would actually probably do a "gaussian interpolation" which is like a blur or smoothing, and it shouldn't hit performance much at all. I can't get the source though :-/... Right now every game sounds like below NES quality sound...
Huh. You must have golden ears, because I think the sound is fine. Why don't you try to fix the sound in Lemonboy? It could use someone new. I don't think the developers of Lemonboy have been working on it...
 
Last edited by a moderator:
trentg said:
I'm also interested in the source code for PocketSNES 6.5.0. I would like to add some form of audio interpolation as an option. The sound quality right now is very sub optimal.

If you set the sound quality to 44khz Stereo an set the sound hack OFF the sound is exactly the same as it is in a original SNES console.
 
Last edited by a moderator:
Sorry, but no. The DAC on the SNES did a kind of interpolation that is the same as a gaussian interpolation. It's true that what you hear from PocketSnes matches the sound that was on the console, but once it was sent to your tv speakers it's much different. I can record an example if you don't believe me. Try Snes9x with interpolated sound on. That's how a real snes sounds when plugged into a tv.
 
Actually it seems you may be right Rivroner... though the real snes sounds much better IMO just listening to it on my tv, while recording it it just seems to add a fuzzy noise... On PocketSnes it just sounds too crisp and not what I'm used to, maybe that's why it sounds jarring to me... One way or another, I'd still like to have a go at adding interpolation and see if it can get closer to the original sound... but nobody is offering the source code, unfortunately (even though parts are GPL :x).
 
chickendung said:
trentg said:
I'm also interested in the source code for PocketSNES 6.5.0. I would like to add some form of audio interpolation as an option. The sound quality right now is very sub optimal.
Would the interpolation fix the issues with some of the sounds in Super Mario World? e.g. the spin jump, pipes, etc.

To get around the Mario sound issue on my laptop I've always played the GBA version. That's right. I'd rather have to hear those awful mario voice sounds than listen to the rather messed up sounds you get in zsnes. Plus the wide screen is nice.
 
Last edited by a moderator:
Snes9x with interpolation on has perfect sound IMO... sounds just like the real thing in the few games I've played.
 
trentg said:
Actually it seems you may be right Rivroner... though the real snes sounds much better IMO just listening to it on my tv, while recording it it just seems to add a fuzzy noise... On PocketSnes it just sounds too crisp and not what I'm used to, maybe that's why it sounds jarring to me... One way or another, I'd still like to have a go at adding interpolation and see if it can get closer to the original sound... but nobody is offering the source code, unfortunately (even though parts are GPL :x).
I think you may be refering to the sharper and at times more "aliasy" sound. I think the reason is that the SNES had a low-pass filter to help filter out some of the high frequency aliasing caused by low sample rate samples (memory). The emu does not have this filter (probably a few capacitors?) as a real SNES does. The downside to this filter though is that it removes high frequencies making the sound a bit muffled sounding (while hiding aliasing). I remember plugging in a real SNES a while ago and it hit me how muffly it sounded after playing it on emus. It sounded like all of the treble was stripped out.

This problem is made worse on the emu because to gain speed it is common to reduce sample rate even more. So now you are adding more aliasing to aliased sound and not filtering any of it. I would think adding a kind of software EQ would really impact speed.
 
Last edited by a moderator:
I was talking to an emulator writer and she said that a smoothing effect would do the trick and have very little impact on performance. This is what I had planned to implement if I could have gotten the source code (come on!). It works something like this:

1) take sample a
2) take next sample b
3) set current sample to (b+b+b+a)/4 (or b+a/2 or whatever works best)
4) current sample becomes a
5) goto 2
 
trentg said:
I was talking to an emulator writer and she said that a smoothing effect would do the trick and have very little impact on performance. This is what I had planned to implement if I could have gotten the source code (come on!). It works something like this:

1) take sample a
2) take next sample b
3) set current sample to (b+b+b+a)/4 (or b+a/2 or whatever works best)
4) current sample becomes a
5) goto 2

A female emulator author who loves audio interpolation? It was the author of Mednafen, right? ;p This is a very simple FIR filter that on paper seems barely better than a box filter, but I haven't done frequency response analysis on it or anything so I could be way off.

The actual filtering on an SNES is, like mentioned, a 4-tap gaussian filter. It's digital and it's applied to voices BEFORE mixing, in other words as part of the resampling process, presumably roughly meant to remove frequencies above the final 32KHz output. Just applying a filter to the final output won't be the same, especially without any oversampling above the output frequency.

Also, there are what appear to be three fixed filters that are applied before the gaussian filter is applied: these are selectable (or nothing can be used). These look to be effectively FIR filters with some caveats. I don't know if PocketSNES emulates them or not.

I haven't used PocketSNES for Wiz, but if you seriously think that the audio is at 44KHz is worse than NES quality then you're either grossly exaggerating or something more serious is wrong with the audio than a lack of filtering.
 
Last edited by a moderator:
It might actually not be worse than NES, but I put it at about the same level. It's very aliased. It's so bad I do not even use my wiz anymore (main purpose I got it was for playing SNES and porting my own games. I will do more porting of my games but for now I'll use a real snes or something with interpolation like snes9x). But I'm very particular about how my audio sounds, as evidenced by me being the only one to really take it as far as not playing it because of the quality.
 
trentg said:
It might actually not be worse than NES, but I put it at about the same level. It's very aliased. It's so bad I do not even use my wiz anymore (main purpose I got it was for playing SNES and porting my own games. I will do more porting of my games but for now I'll use a real snes or something with interpolation like snes9x). But I'm very particular about how my audio sounds, as evidenced by me being the only one to really take it as far as not playing it because of the quality.
If you are truly willing to enhance the sound quality, then perhaps Juanvvc could send the developer a message. Juan is an active member at GP32Spain. Shall I ask Juan, or will you do it?
 
Last edited by a moderator:
trentg said:
It might actually not be worse than NES, but I put it at about the same level. It's very aliased. It's so bad I do not even use my wiz anymore (main purpose I got it was for playing SNES and porting my own games. I will do more porting of my games but for now I'll use a real snes or something with interpolation like snes9x). But I'm very particular about how my audio sounds, as evidenced by me being the only one to really take it as far as not playing it because of the quality.

Do you have issues with audio in other emulators for Wiz? Because it could be something beyond aliasing.
 
Last edited by a moderator:
Well lemonbody is pretty bad, but I think that's a known issue for everyone. Actually I do have issue with audio on the wiz in general, which I just confirmed to myself the other day. I was somehow underwhelmed by the quality of music playing with my nice speakers hooked up to the headphone jack, but I couldn't really be sure it wasn't my imagination. Anyway, I decided to backup all my albums (bought everything on iTunes) to CDs. I used my wiz SD card as the source for all the disks. Now when I play an audio cd with my old portable cd player connected to the same speakers, it sounds noticably better than the wiz. So as someone suggested, it could be a cheap/bad DAC in the Wiz. My other possible theory is that the cd player has some form of equalizer to make the sound not so flat, but I'm not sure about that.
 
chickendung said:
trentg said:
It might actually not be worse than NES, but I put it at about the same level. It's very aliased. It's so bad I do not even use my wiz anymore (main purpose I got it was for playing SNES and porting my own games. I will do more porting of my games but for now I'll use a real snes or something with interpolation like snes9x). But I'm very particular about how my audio sounds, as evidenced by me being the only one to really take it as far as not playing it because of the quality.
If you are truly willing to enhance the sound quality, then perhaps Juanvvc could send the developer a message. Juan is an active member at GP32Spain. Shall I ask Juan, or will you do it?

I tried to contact someone on gp32spain already, but it wasn't Juan AFAIK. If you could get me the source I will certainly at least try to implement some interpolation. I don't think it will be that difficult, just may take a while because I'm fairly busy already. If you know him and he agrees to share the source then he can contact me here by pm or on gp32spain as I have an account there but if he does that then please inform me because I do not go there regularly.
 
Last edited by a moderator:
trentg said:
chickendung said:
trentg said:
It might actually not be worse than NES, but I put it at about the same level. It's very aliased. It's so bad I do not even use my wiz anymore (main purpose I got it was for playing SNES and porting my own games. I will do more porting of my games but for now I'll use a real snes or something with interpolation like snes9x). But I'm very particular about how my audio sounds, as evidenced by me being the only one to really take it as far as not playing it because of the quality.
If you are truly willing to enhance the sound quality, then perhaps Juanvvc could send the developer a message. Juan is an active member at GP32Spain. Shall I ask Juan, or will you do it?

I tried to contact someone on gp32spain already, but it wasn't Juan AFAIK. If you could get me the source I will certainly at least try to implement some interpolation. I don't think it will be that difficult, just may take a while because I'm fairly busy already. If you know him and he agrees to share the source then he can contact me here by pm or on gp32spain as I have an account there but if he does that then please inform me because I do not go there regularly.

I meant contacting him here, at GP32X. He is a member here as well, and therefore speaks English also. ;)
 
Last edited by a moderator:
I too purchased the Wiz solely for SNES emulation and am pleased with the image quality and (almost) perfect frame rates but would love to see the audio worked on and the horizontal tearing fixed. Should I give up on waiting? I'd donate damn near anything to this project.

I mean the Sega Genesis/MegaDrive emulator is so fantastic. I know SNES is harder to write emulators for but if it ever got that good I'd be in heaven.
 
Back
Top