Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - [PCM Voice Pack] Krusty's Fun House (SMS/GG)

Reply to topic
Author Message
  • Joined: 28 Nov 2014
  • Posts: 365
Reply with quote
[PCM Voice Pack] Krusty's Fun House (SMS/GG)
Post Posted: Sun Dec 20, 2015 7:27 pm
Last edited by sherpa on Mon Dec 21, 2015 8:48 am; edited 5 times in total
The data is the same I compared byte by byte. Moving forward I will only present an additional set if the wave data changes. Of the few sets worked on, they are identical. All that changes is the sampling rate.

I may stop including vgms, since they take time. I've been logging them as I check the clock, This pack was especially accurate. Cycles changed not at all as far as I could tell. In fact, they were the same for both versions. Exactly the same. I was about to ask a question, but just answered it. The game seems to play back the same whether in 50hz or 60hz mode. Cycles wise. Either way, the only thing that changes is the sample rate, but this game eliminates even tiny differences. I even tested the GG version, it also stays the same in either mode. Almost makes me think there is something wrong with the emulator :)

I guess an sgc of this game would ignore the ntsc/pal system byte.

Ok so here's the table

Game Name Sample Clock cycles full length avg cycle TV Type smp/nbl s rate hx s rate dec PH Loc length
Krusty's Fun House (GG) He-He-ey 2880615 3183 905 NTSC 3955 1EE6 7910 1408C C6F
Krusty's Fun House (GG) Hi Kids! 3623620 4004 905 NTSC 3955 1EE6 7910 14CFB Fa4
Krusty's Fun House (GG) He-He-Ha-Ha-Ha-Ha 3632670 4014 905 NTSC 3955 1EE6 7910 15C9F FAE
Krusty's Fun House (GG) Hoo-Hey 2932200 3240 905 NTSC 3955 1EE6 7910 16C4D CA8
Krusty's Fun House (SMS) He-He-ey 2880615 3183 905 PAL 3919 1E9E 7838 1408C C6F
Krusty's Fun House (SMS) Hi Kids! 3623620 4004 905 PAL 3919 1E9E 7838 14CFB Fa4
Krusty's Fun House (SMS) He-He-Ha-Ha-Ha-Ha 3632670 4014 905 PAL 3919 1E9E 7838 15C9F FAE
Krusty's Fun House (SMS) Hoo-Hey 2932200 3240 905 PAL 3919 1E9E 7838 16C4D CA8

The important values are GG import using 7910 samples, SMS use 7838. It's a bit higher than the others we've looked at so far. Voice quality is higher also. Still, only 4 samples. Uncompressed.

Mp3s are for the GG version. I used logarithmic conversion, thinking it might work better with the higher quality more nuanced samples.

update: sms conversions linear setting
Krusty's Fun House (SMS-GG)(WAV).zip (37.3 KB)
wave file sets

  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14741
  • Location: London
Reply with quote
Post Posted: Sun Dec 20, 2015 8:14 pm
These sound pretty bad, are you sure the conversion is right? Logarithmic is probably the best option only in a minority of cases.
  View user's profile Send private message Visit poster's website
  • Joined: 28 Nov 2014
  • Posts: 365
Reply with quote
Post Posted: Sun Dec 20, 2015 8:52 pm
(added linear versions to first post)

I also thought they sounded rough, but i thought it was my speakers. I reconverted at the SMS sample rate (wasn't going to do it) using the linear setting. At first I thought it sounded better, but it doesn't to my ears.

And yes. This set was easiest to get all the values, since if you look carefully they are all in the same bank one right after the other. I checked it with both sets..and like I said, this game is surprisingly reliable. I wonder where the compensating code is located. I didn't dig through much.

And yes..I guess this is what they sound like. Or I used the same process I used for the other psg data. Your tool>audacity>mp3 exported at 32000 or 44100 and 192 CBR.

Feel free to investigate the files if you like. I've posted the pre-mp3 conversions if you think it might give a clue what's going on. They sound better in game (I think) but it could also be the web plugin blasting it. The other samples were (I think) louder, so maybe it wasn't noticeable.


Not sure why. I haven't changed my process.


update: I noticed I had joint stereo instead of stereo selected for the mp3 export options in audacity. Could that be causing issues? my lame converted mp3s sounded even worse, so I went with audacity since it sounds more like the original.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14741
  • Location: London
Reply with quote
Post Posted: Sun Dec 20, 2015 11:13 pm
I think this game is little-endian 4-bit. The samples sound best that way (plus linear).
  View user's profile Send private message Visit poster's website
  • Joined: 16 May 2002
  • Posts: 1356
  • Location: italy
Reply with quote
Post Posted: Sun Dec 20, 2015 11:29 pm
sherpa: why in the world are you saving them as stereo? You're storing twice as data in the same bitrate, thus halving the quality. Joint stereo isn't as bad because it saves one channel and the differences so the overhead would be minimal, but please, save them as mono so all the bitrate is dedicated to one channel. Personally I prefer VBR, too, so the bitrate is allocated dynamically. Of all the major formats, mp3 is probably the only one which still allows CBR, because both aac and ogg are VBR by nature, it's just superior. I'm not sure if I'm still motivated to post advices about this whole thing, I have a feeling it's taking a direction I don't like anymore.
  View user's profile Send private message Visit poster's website
  • Joined: 28 Nov 2014
  • Posts: 365
Reply with quote
Post Posted: Mon Dec 21, 2015 12:02 am
@Maxim. 4 bit is my preference, if only because I would like to stay closest to the original source. But modern tools don't play friendly with that. Audacity was basically fooling me by converting any imported 4 bit samples to 8 bit and not telling me about it thus introducing noise into what was already a bit confusing for me. If you have a method of conversion, please share!

@Tom Well, the reason they are stereo is that audacity only allows eporting of mp3 in stereo - either joint or normal. I read up on it and joint seems to result in slightly lower file sizes. I don't know if the reason it won't export mono mp3 is the same reason vgm software will not export mono wav even though it's more appropriate. I'm just an end user here :) If you have some concrete advice, I will happily accept it. I didn't use the vbr function because I don't know enough about sound to know how vbr will affect square wave playback of voice samples.

I can't address your comment of stereo conversion halving the quality, I've assumed the best intentions in the tools I use. I'm not knowledgeable enough to second guess the results. There are enough exceptions to this process in the few sets here such as Alex Kidd's AHHH! which will not play as a converted 4 bit sample despite the other effects processing fine, not to assume the distorted effect found here is exclusive to this set of samples. All the other sets sound fine to me using the same process. mp3s made using other tools did not.

If you'd like to private message me with some advice on using lame/sox or any other command line tool I will be happy to change my current process. Beggars can't be choosers, and unless I write my own tools, I have to work with the knowledge I have and the tools I have access to - which in this area isn't much.

It's still early in the process. Nothing has been decided at this point. The mp3s in this forum are not intended as preservation. They are there to have something to listen to. I personally prefer wav, but they don't attach directly.

Anyone who's interested can grab the raw stubs of data and convert them using their own means or convert the wav files to mp3 using their own methods and offer them to the community.

I'm always happy to see others working. Having a little back and forth makes things a bit more fun, and there's always room for improvement.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14741
  • Location: London
Reply with quote
Post Posted: Mon Dec 21, 2015 12:20 am
What are you doing if not using the conversion tools already? Please hold up on posting stuff until you know what you are doing, and instead let's take a thread to its logical conclusion. It's very easy with audio data to do something wrong and have it sound bad, and we don't want to get into a mess with that.

If you export the station from Krusty's using my tool set to 4-bit little-endian, linear, you get clean data in the form of a 16-bit unsigned WAV at the sampling rate you choose (by timing the playback code). You can convert this to MP3 but it involves resampling it to a "standard" sampling rate, such as 44100Hz. Then you need to save it as a mono format, preferably some sort of VBR setting.

Maybe we should just serve the WAV, maybe even at 8 bit precision, as apparently all modern browsers support it now (Internet Explorer not being included in that definition) but we probably need to check if out non standard rates will work...
  View user's profile Send private message Visit poster's website
  • Joined: 16 May 2002
  • Posts: 1356
  • Location: italy
Reply with quote
Post Posted: Mon Dec 21, 2015 12:22 am
(this is a reply to sherpa, Maxim posted while I was typing)

Basically, assume you have a 128 kbps mp3.

If it's mono, all those 128 kbps are dedicated to the only channel you have.

If it's stereo, those 128 kbps are split for the two channels, so 64 kbps for the right channel and 64 kbps for the left channel. Since the two channels are identical, you're storing the same data twice, and each channel uses half of the bitrate so it mathematically sounds worse.

If it's joint stereo, some bitrate is used to save one channel, and some other bitrate is used to save the delta between the other channel and the first one. In most practical cases, joint stereo is better than stereo since most music in general has strong central components plus some panned parts. When used to save purely mono data, the differences are null so the overhead is minimal.

As for CBR versus VBR. Constant Bit Rate was good for streaming when you had to make sure you wouldn't go above a certain bitrate (e.g. the popular 128 kbps bitrate was designed for dual ISDN lines). It has downsides, however. Not all the kinds of sounds have the same complexity. Again, I won't bring Fourier to the table, but you can guess that a pure sine wave is less complex than a song by Metallica. Therefore, using the same bitrate for those two things doesn't sound efficient. Variable Bit Rate solves this problem by using a different bitrate in each mp3 frame with no real disadvantages (it only makes it harder to calculate the duration and seek through the file, and to allocate the (maximum) bandwidth for a stream). It comes with no additional cost in size because each mp3 frame comes with a full mp3 header anyway (you can technically change the sample rate and the number of channels at the middle of an mp3 as well, though I doubt any sane software would support that). So, what I think and is therefore only my opinion, is that VBR should be used unless there's a valid reason not to. Personally, I use it with a full range of allowed bitrates (for 32000 / 44100 / 48000 Hz, that's 32 kbps to 320 kbps) with the quality set to maximum. Realistically, the only 32 kbps sections will be silent ones, but still, better than nothing.
  View user's profile Send private message Visit poster's website
  • Joined: 28 Nov 2014
  • Posts: 365
Reply with quote
Post Posted: Mon Dec 21, 2015 1:00 am
update: I think the stereo thing was a false alarm. I looked it up, and it seems audacity exports mono waves as mono mp3 regardless of what those settings say. I didn't have it associated with mp3s at all, but looking closer at the mp3s they seem to be mono...so false alarm?

I'll look into why it might sound bad even though the data is correct.

@Maxim I'm sure you've realized by now that the tool I had access to didn't have those options :) Wave files would be preferred since they resemble the original source (at least linear conversions do). I'm currently doing all pcm>wav and wav>>mp3 conversions manually, one by one, and the tools I use don't have a mono option at all. Also all wave files have been created using your tool, so you'd have to lay all concerns as to the accuracy of the data post conversion at the creator's feet :)

Does the bit setting actually change the quality of the output? All the sample rates are correct, as well as the raw data, so if you have access to a pc, it should be trivial to recreate/improve my work.

@Tom Halving half the rate per channel doesn't sound to appealing. I still figured 192 was being generous. That's what I've given music in the past. My audacity vbr setting is 220-240 at the highest. It doesn't have the wide ranges you mention. It also doesn't do mono mp3. I even tried re importing the mp3 to see if there was some trick to getting that option.

I'll be happy to postpone mp3 processes. They're time consuming (though not as much as ripping/verification) and I'm really doing it as a gimme. I'm not that motivated to learn new tools just to do it, if someone else would like to do it instead. But I don't know who has access to a pc or when, and I don't assume someone else will do it if I don't so I do the best I can with what I know.

I'll do some new tests with the new software, and maybe see if i can do some commandline mp3 mono conversions easily that i find acceptable.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14741
  • Location: London
Reply with quote
Post Posted: Mon Dec 21, 2015 1:16 am
Audacity does a slightly annoying thing where your files are just tracks in a containing project, so your 4kHz mono file is extended to 44kHz stereo by default and it takes some effort to avoid this. Older tools are more oriented to this task, try Cool Edit 2000 for example.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!