How well can Metal Slug backgrounds be recreated with tiles?

Discussion of development of software for any "obsolete" computer or video game system. See the WSdev wiki and ObscureDev wiki for more information on certain platforms.
User avatar
TOUKO
Posts: 306
Joined: Mon Mar 30, 2015 10:14 am
Location: FRANCE

Re: How well can Metal Slug backgrounds be recreated with ti

Post by TOUKO »

i agree it's really strange .
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: How well can Metal Slug backgrounds be recreated with ti

Post by psycopathicteen »

93143 wrote:
Yeah, sorry, I was just taking some random data I had easily on hand and was vaguely related.
Still interesting. That sample pack sounds pretty egregious, more so than I expected... does the game even use all of the samples? Maybe there's some truth to the idea that Neo Geo developers deliberately wasted space so they could advertise bigger MEGA numbers...
The Neo Geo's YM2610 sound chip was designed to waste space.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Re: How well can Metal Slug backgrounds be recreated with ti

Post by TmEE »

You could maybe say that only if it used uncompressed samples. You could also say similar stuff about how NES uses graphics ROMs disallowing compression with most mappers (and on NG there's no mapper with graphics RAM that I know of, only ROMs).
93143
Posts: 1715
Joined: Fri Jul 04, 2014 9:31 pm

Re: How well can Metal Slug backgrounds be recreated with ti

Post by 93143 »

TOUKO wrote:This is why a good conversion on a 16 bit system is not really possible without losing tons of details,and the charm of those games .
I'm not convinced of this. Particularly since most of the game runs at 30 fps, with (IIRC) only a few BG tile animations running at 60... The obvious factor preventing a faithful Metal Slug port on 16-bit systems was ROM size - even with an S-DD1 you'd be hard-pressed to jam even the first game into a Super Mario 64-sized cart, and I can certainly imagine a would-be porting studio taking one look at the number on the original game's cartridge sleeve and noping out - but that's not a fundamental issue with either the SNES or the Mega Drive.

(I can't help but think about the N64, and how it got essentially no 2D pixel art games despite being capable of blitting opaque unscaled sprites at 250 megapixels per second...)

...

@psycopathicteen: What was the reason for your question? Have you analyzed the game for VRAM and/or DMA usage and determined that it won't fit? Or is it a ROM space issue?
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: How well can Metal Slug backgrounds be recreated with ti

Post by psycopathicteen »

I'm curious how Metal Slug would look like squeezed down to 32 or 48 megabits.
TmEE wrote:You could maybe say that only if it used uncompressed samples. You could also say similar stuff about how NES uses graphics ROMs disallowing compression with most mappers (and on NG there's no mapper with graphics RAM that I know of, only ROMs).
Most sample based sound chips are capable of pitch scaling, without recording every single note.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: How well can Metal Slug backgrounds be recreated with ti

Post by tepples »

I've tended to refer to one sample per pitch as the "Mellotron" pattern. There are valid reasons to use it even without hardware limits like that of the NES or Neo Geo sample unit. One is that an instrument may have greatly differing tonalities in the high or low pitches.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Re: How well can Metal Slug backgrounds be recreated with ti

Post by TmEE »

YM2610 is a version of YM2608 with the internal sample ROM replaced with external one. Internal sounds of 2608 do not have any freq scaling capability. You're supposed to play SFX and whatnot on those channels and that's what most games do. There aren't a whole lot of games that use all the channels for music.

Stuff like piano scales really badly, you need at least one sample for every octave to get any decent results and most pro gear actually does use one sample every few notes or even for every note as fas as pianos go.
93143
Posts: 1715
Joined: Fri Jul 04, 2014 9:31 pm

Re: How well can Metal Slug backgrounds be recreated with ti

Post by 93143 »

tepples wrote:I've tended to refer to one sample per pitch as the "Mellotron" pattern. There are valid reasons to use it even without hardware limits like that of the NES or Neo Geo sample unit. One is that an instrument may have greatly differing tonalities in the high or low pitches.
As long as you've got as much memory as you want, yes. Multisampling is an extremely common technique, but even fairly modern sound sets don't always sample every single note.

You can absolutely go nuts with multisampling if you want realism at any cost. Modern grand piano sample sets can be several gigabytes, for instance, because they have samples for every note at multiple key velocities, sometimes both with and without the sustain pedal, as well as stuff like release samples. Maybe even multiple samples per note per velocity, so as to randomize or round-robin the samples and avoid the dreaded "machine-gun effect" of absolutely identical samples playing in tight sequence. I casually searched just now and found a 67 GB grand piano set with 66,000 samples.

But if you care about storage requirements at all, the Mellotron pattern is the first thing to go - stretching a piano sample across five octaves sounds terrible, but stretching it a few semitones can be undetectable in a mix. And I suspect that a fair number of the instruments in Metal Slug were sampled from a synth module that used moderate stretching (and looping); it's very likely that the game uses a good bit more memory than the original synth did for these instruments.

The only thing I can think of at the moment for which I'd insist on the Mellotron pattern if possible is distorted rhythm guitar - there are types of lead guitar that can survive extensive repitching, but for your typical low/mid-range powerchords the fixed frequency profile is as important to the sound as the pitch-dependent component, so a stretch of even one semitone sounds clearly fake. On the other hand, repitched rhythm guitar samples are almost a separate instrument at this point, considering how common they were in '90s videogame soundtracks...
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: How well can Metal Slug backgrounds be recreated with ti

Post by psycopathicteen »

Oh yeah, I find the machine gun effect annoying with guitar samples. How do some SNES games avoid that?
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: How well can Metal Slug backgrounds be recreated with ti

Post by Drew Sebastino »

I had never heard of multiple sound samples being used for different notes of one instrument. You said that the grand piano was most affected; do you have a good comparison between a synth that is using one sample and changing the pitch vs one that isn't?
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: How well can Metal Slug backgrounds be recreated with ti

Post by rainwarrior »

Espozo wrote:I had never heard of multiple sound samples being used for different notes of one instrument.
It's usually called "multisample", but it might have other names. It's actually the reason why XM and IT formats have a separate collection of "samples" and "instruments", i.e. the instruments reference many samples. Interestingly, even Famitracker has this feature, where the instrument maps DPCM samples to keys.

There's another dimension of this called "multitimbral" where you play multiple samples per note, e.g. you could blend between a "soft" and "hard" version of an instrument depending on how fast you press the key, which could have more expressive variation of the sound than just changing the volume, like you would without this feature.
Espozo wrote:do you have a good comparison between a synth that is using one sample and changing the pitch vs one that isn't?
Piano samples are mentioned often because the disparity between a real piano and a sample pitch up or down gets very strong rather quickly, and pianos have a very large range for an instrument so there is something real to compare against, too. Pianos also have a separate set of strings and hammer for each note, designed and adjusted to give a good tone across the whole range (e.g. thicker/fewer strings on the bass, softer hammers on the treble), so it's a bit removed from the ideal thing that a samplerate change could replicate where each successive pitch should be identical components just scaled smaller.

All samples when pitched lower than their recorded frequency will start to have audibly missing high frequency components (i.e. sound too "dull") and at the same time have their envelopes lengthened (sound too "long" or "slow"). Conversely, when pitched higher, there is proportionately too strong a high frequency component compared to a natural instrument's pitch change, aliasing problems tend to build up in the high frequencies, and the envelopes become shortened too.

For a piano sample taken too far you get a very tinny short tink for high notes, and a very dull booooong for low notes. Everything is out of proportion. In reality the low pitches on a piano do have a longer envelope, but not THAT long, and high pitches do have a shorter one (but not THAT short), so you'll actually see this accounted for in synthesized approaches. Yamaha's FM synthesizers have "keyboard rate scaling" to adjust the speed of envelopes across the range of the keyboard, and "keyboard level scaling" to similarly adjust the timbral effect across the range (dampening high frequencies for high notes to keep them from sounding unnaturally harsh).

I can't point to a good example of how it sounds bad, because usually composers just avoid playing that piano outside its range, because it tends to sound bad. Maybe just find a random MOD with piano samples, open it up in OpenMPT or some other tracker and try for yourself how the individual samples sound when play them in different ranges. (This particular MOD has one "bass" piano sample, and one mid-range sample, and avoids going very high. You can easily hear the harsh tone of its higher notes though, and in general how various notes sound too bright or too dull.)

I always thought the game over screen from Super R-Type had a really fun use of a piano sample. It is used over a wide range, but outside a small range it sounds very unlike a piano. At some point it does interesting pitch sweeps in the low range that might as well be a sine wave. It also seems to avoid going very high in pitch, maybe to avoid it standing out too harshly compared to its fairly dull sound in the range it's mostly used.
psycopathicteen wrote:The Neo Geo's YM2610 sound chip was designed to waste space.
It's designed to play sound effects and drums. Wasting space to use those sound effects for music was someone else's goal. ;P They might have considered it putting that space to good use rather than wastage. The only wasted space is empty.
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: How well can Metal Slug backgrounds be recreated with ti

Post by lidnariq »

rainwarrior wrote:The only wasted space is empty.
Right. Cart costs for the Neo Geo were almost a non-issue. A game had every reason to use all 32 MiB addressable by the YM2610, and basically no reason to not.

... ok, that's not quite true, because SNK did actually make a special mapper IC that allowed all 7 voices to address the same ROM instead of having two disjoint memories. I'm having difficulty finding historical prices to support my argument, though.
93143
Posts: 1715
Joined: Fri Jul 04, 2014 9:31 pm

Re: How well can Metal Slug backgrounds be recreated with ti

Post by 93143 »

psycopathicteen wrote:Oh yeah, I find the machine gun effect annoying with guitar samples. How do some SNES games avoid that?
Hard to say without examples.

It's possible to modify the volume and/or note length per-note to produce a musical pattern and break up the sameness. Adding a bit of looseness to the timing can help too, but it can easily backfire if you're not careful/musical about it. If you've got a separate attack sample (like the lead guitars in Rock 'n' Roll Racing seem to), or even a sufficiently long and distinct attack section of the main sample, you can do quite a bit to introduce variation (pitch, volume, volume profile, length) because the attack is a large part of the perceived timbre. Proper phrasing - following a volume profile over multiple notes - can help with some instruments.

Also, in my experience, some samples just don't sound as bad as others when repeated. For example, samples with long, pronounced attacks can sound really bad when repeated, because the attack is a significant portion - sometimes all - of the note.

Speed matters. Timpani rolls in real life are nowhere near as fast as some people seem to think they are...

Which reminds me - the machine-gun effect with percussive samples can be much worse when you use only a single channel, because the sample has to be abruptly cut off right before retriggering. Some SNES music devotes multiple channels to one percussive instrument, so the decay tail can continue into the next note, which tends to sound far more natural.

With something like a wind instrument, that can only produce one sound at a time, you can emulate legato playing by just changing the pitch with the sample running, rather than having to restart and getting a gap and another attack. Guitar hammer-ons can be dealt with this way too. Unfortunately, some instruments like violins that would otherwise be ideal candidates for this technique sound fake if you use the same sample over a significant pitch range - but then, violins tend to sound fake regardless unless you use large samples or sophisticated synthesis techniques...
User avatar
TOUKO
Posts: 306
Joined: Mon Mar 30, 2015 10:14 am
Location: FRANCE

Re: How well can Metal Slug backgrounds be recreated with ti

Post by TOUKO »

Look at the PSX version :
https://www.youtube.com/watch?v=qHl5JkMDWv8

And the NG version:
https://www.youtube.com/watch?v=Yp8IK-uKNxs

And make your hown conclusions .
93143
Posts: 1715
Joined: Fri Jul 04, 2014 9:31 pm

Re: How well can Metal Slug backgrounds be recreated with ti

Post by 93143 »

The main difference I see (other than the loading pauses) is in the smoothness of the animation. I'm not sure what's driving it, but remember that the PSX didn't have full access to much more than a couple megabytes of data at a time without going through the painfully slow CD-ROM interface. My understanding is that the Saturn version was much better, partly because it employed a RAM expansion.

By contrast, a SNES with an S-DD1 can access anything in the cartridge at the speed of DMA with basically no latency, so the only limits would be DMA bandwidth and VRAM space (assuming sufficient CPU power). The SNES has enough VRAM to cover the whole screen in unique 4bpp tiles twice, with enough space left over for two double-wide tilemaps, and enough DMA bandwidth to replace all of VRAM in six frames at 30 fps. This may not be enough (I haven't tried), but the PSX version is limited by different factors and therefore doesn't really prove much.

It may be necessary to do tricks with the sprite palettes, but again, that's not something you could infer from the PlayStation version.
Post Reply