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 - Game samples extraction mega-thread

Reply to topic Goto page Previous  1, 2, 3
Author Message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12483
  • Location: London
Reply with quote
World Series Baseball
Post Posted: Tue Mar 08, 2016 8:45 pm
The same as Nomo's World Series Baseball and World Series Baseball '95, except the "Ball" sample is played at a slower rate and the "Foul" sample is missing. 1-bit, 11.7kHz - 12.2kHz.

  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12483
  • Location: London
Reply with quote
Post Posted: Tue Mar 08, 2016 8:52 pm
And... I think that's everything. I didn't rip the prototypes or obvious SMS-GG conversions, on the assumption that they'll be the same. The various baseball games at the end were a good example of how doing the same thing over and over is really dull :)

Searching for the code seems to have been a good way to find untagged games, http://www.smspower.org/Tags/SampledAudio now lists 101 games and is probably complete (although my roms folder is not in great shape and I may have missed something).

There were a few in there where there are unresolved questions. Does Miracle Warriors play its sample? What are the Japanese voices saying? Which is the best? Why did so many of them have dreadful bugs?

After all this, do you think it's interesting enough to add these into the games' pages on the site?
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12483
  • Location: London
Reply with quote
Sonic The Hedgehog
Post Posted: Wed Mar 09, 2016 8:26 pm
Oops, I missed one - and a fairly well-known game at that! Mainly because it has a unique sample player engine.

4-bit PCM, little-endian, no log compensation, at 7927Hz. So far, so standard. The fun part with this engine is that it attempts to emit data to channels 1 and 2 at 4x the data sampling rate (31.7kHz), and it attempts to interpolate between the samples. It does this in a truncated integer fashion which means that almost all of the time it does something a bit wrong, which causes quite a lot of artefacts in the output:

1 -> 5 is 1, 2, 3, 4, 5 (OK)
5 -> 1 is 5, 4, 3, 2, 1 (OK)

1 -> 8 is 1, 2, 3, 4, 8 (a bit weird because 7/4 = 1)
8 -> 1 is 8, 6, 4, 2, 1 (not so weird because -7/4 = -2)

1 -> 6 is 1, 2, 3, 4, 6 (not too weird because 5/4 = 1)
6 -> 1 is 6, 4, 2, 0, 1 (a bit weird because -5/4 = -2)

The WAV below avoids all this and is just the 7927Hz sample.

  View user's profile Send private message Visit poster's website
  • Joined: 04 Jul 2010
  • Posts: 222
  • Location: Angers, France
Reply with quote
Post Posted: Fri Mar 11, 2016 8:44 am
Maxim, as you are the expert on samples (and many other things ^^), which parameters are the best for you to have a nice sample and a "good" size ?
("good" means to fit in a 16KB bank, like ~1sec = 8KB)
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12483
  • Location: London
Reply with quote
Post Posted: Fri Mar 11, 2016 12:59 pm
4 bits, 8kHz minimum but go as high as you can. Preprocessing the audio is super important, it needs to be loud, clean and compressed. The sampling rate seems to help more than the bit depth, particularly due to the intermediate state issue at 8 bits.

I'm currently looking at some stuff from the MSX world which is solves the intermediate state issue and offers near CD quality (pcmenc) and I'm modifying it for SMS, but the data rate can be quite high.

Emulators tend to produce worse results than a real system unless they are emulating at the native rate (115kHz for PSG) and doing high quality resampling down to a presentable rate, which I think very few do.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12483
  • Location: London
Reply with quote
Batter Up, Gear Stadium, Gear Stadium Heiseban
Post Posted: Fri Mar 11, 2016 7:13 pm
More things I missed - a unique sample player which is identical amongst these three very-similar games. Only one sample which is the same in them all. 4-bit audio at 21.4kHz, but surprisingly bad quality given the sampling rate.

  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12483
  • Location: London
Reply with quote
Madden NFL '95, Madden '96
Post Posted: Fri Mar 11, 2016 7:46 pm
Hopefully the last of my forgotten games, this is another unique engine. This one is a little bit interesting. It's 4-bit big-endian PCM, but it uses a lookup to transform the values into PSG attenuation commands; but the lookup is totally screwed up (see the attached image). Presumably this is making the results sound a bit weird.

The samples are reusing the data sometimes: "It's" and "Good" are pulled out of "It's No Good", presumably to make "It's Good", but I'm sticking to the way the game is referencing samples internally.

Madden '96 has the exact same samples as '95, except the long intro sample is missing. It retains the code to play it, though. It's also the second game (after Beavis and Butt-Head) to interleave some trivial VDP updates into the sample playback routine. This is what drives John Madden's lips moving while he talks.

  View user's profile Send private message Visit poster's website
  • Joined: 26 Dec 2004
  • Posts: 370
  • Location: Japan
Reply with quote
Post Posted: Mon May 22, 2017 1:45 am
Maxim wrote
Doraemon

Sega 4-bit engine at a pitiful 4914Hz. Again the sounds may mean something to fans of the anime.

The first sample is "SE-GA!" but needs to be sped up a bit.
The 2nd sample is "Shichatta na" or "Shikatta na(i)", I forget. He says it when meeting one of the other characters.
  View user's profile Send private message Visit poster's website
  • Joined: 29 Jun 2017
  • Posts: 6
Reply with quote
Post Posted: Thu Jun 29, 2017 10:07 pm
Maxim:
Tried taking a look at the 1-bit engine used in Master Shooter and the arcade version of SEGA's Choplifter and seeing if they share code with Sega's own SMS games?

Talking about such of the former is soooo off-topic, considering how this forum is about 8-bit SEGA consoles, but they have me at interest for this thread.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12483
  • Location: London
Reply with quote
Post Posted: Thu Jun 29, 2017 10:44 pm
I know very little about them, are they Z80?
  View user's profile Send private message Visit poster's website
  • Joined: 29 Jun 2017
  • Posts: 6
Reply with quote
Post Posted: Thu Jun 29, 2017 11:38 pm
Yes. System 2, regular SN76489 chips at 2MHz and 4MHz, sound/CPU communication via 8255 PPI and latch.

The main Z80 CPU has a weird timing scheme to it, but the audio code appears to be stored on a separate 4MHz Z80 CPU unaffected by the main CPU's timing mechanism.

EDIT: FYI the audio CPU IRQ is triggered when 32 and 96 scanlines of the video output is rendered at 60.0952Hz. There appear to be no other SEGA games on this system that have samples.

EDIT: Offsets for Shooting Master and AC Choplifter sampling code. Both do not appear to be the same, and Choplifter looks a bit optimized from what I can barely tell.

0x811 - Shooting Master, all sets. Writes to $C000 (second PSG)
0xBA3 - Choplifter, all sets. Write to $C000 (second PSG), 0xBA3 is called first. Then it loops 0xBAF and hits 0xBAB every 8 writes.
  View user's profile Send private message
  • Joined: 29 Jun 2017
  • Posts: 6
Reply with quote
Post Posted: Sat Jul 01, 2017 1:16 am
Another thing I overlooked: AC Choplifter has a second player used for 8-bit PCM(?) alone. "Sound 49" in the Sound Test is the only one that uses it.

If anyone asks, it's located, at 0xBD7 in the sound CPU code. This writes to the second PSG via $C000 just like the other routines.
  View user's profile Send private message
  • Joined: 29 Jun 2017
  • Posts: 6
Reply with quote
Post Posted: Sat Jul 01, 2017 2:17 am
Well, it turns out my guess was right after all. The arcade version of Choplifter looks to be the earliest instance known of SEGA's 1-bit sample engine for the console games.


Maxim, :D
  View user's profile Send private message
  • Joined: 22 Apr 2018
  • Posts: 94
Reply with quote
Re: Virtua fighter
Post Posted: Mon Jul 02, 2018 4:57 pm
Maxim wrote
8089Hz 4-bit PCM, inverted on playback, no log compensation. I'm going to have to pass on transcribing what they are saying... I also couldn't figure out how to get the game to play them.


I think the first sample is Akira saying "十年早いんだよォ!" (Jū-nen hayain da yo!) — You're ten years too early!

Found that and several others here: http://virtuafighter.wikia.com/wiki/Akira_Yuki

See also: https://youtube.com/watch?v=F39iOYDZim0
  View user's profile Send private message
Reply to topic Goto page Previous  1, 2, 3



Back to the top of this page

Back to SMS Power!