We're using cookies to ensure you get the best experience on our website. More info
Understood
@davinceRegistered February 15, 2010Active 1 year ago
250 Replies made

I don’t visit for a while, and holy crap, some amazing stuff pops up. The original compiler and sample source code? By Hudson, even? Wow.

Those cases from the first post are absolutely lovely. Makes it look all modern, too!

In Mednafen, it seems to freeze one second in. Could that be right?

In any case, it seems to start with Mario showing on the left side of the screen. I guess this would have played out a little differently from actual Frogger. Too bad I can’t actually see what it would look like…

Fire-WSP wrote:
my keyboard is not responding on that Mednafen Version.
How can i get that working?

I noticed I had to set up my controller a second time, so try that (except with keyboard keys of course). Alt+shift+1.

Ah, okay. Still looks cool, though. Fairly convincing. 🙂

But what is it? A palette swapped GB intro? Or an actual homebrew demo of the intro screen?

I think there’s more reasons for this to fail other than removing the 3D screen. Look at that design…

Just a note: hotlinking those pics doesn’t work; they turn up as broken here.

Looks very interesting, though a bit too orange most of the time if you ask me!

Mednafen wrote:
In case anyone wants to try it out on an emulator.

I love you.

What’s different about that version of Mednafen that makes the sound (and the game) work? I’m noticing the sound of this demo works well in it, but all other audio-related homebrew I have still seems to have audio that runs too fast.

That would truly be a Pokémon Red, haha.

But yeah, unless you feel like writing the game from scratch (something that takes a business long enough to do as it is), it’s not going to happen. Some small fan games might, or something simpler, but not fully blown Pokémon, I imagine.

Looks fantastic, and true to the original.

Looks like Mednafen doesn’t like this game. I’m only hearing some garbled background noise…

Could someone somehow make a video, perhaps? This has piqued my curiosity…

Keep making the game. Keep learning, keep having fun, and surprise us. Even though your game isn’t quite at a playable stage yet, what you’ve made so far is not bad at all! 😉

Oh man, that sounds like a real bummer. Sorry to read about that. 🙁

But hey, at least your collection’s there to help you get through your current situation!

There’s two routes I think you can go here regarding interpreting MIDI and instrumentation, by the way:

One route:
– Use the pattern the NSF to MIDI exporter uses. By which I mean MIDI channel 1-5 always translates to square, square, triangle, noise, sample in your player.

Upside is that NES MIDIs would always export and sound great. The MIDI instrument isn’t checked at all in this case, just the channel that notes are on, so it’s relatively easy to set up.

Main downside would be that a lot of existing MIDIs wouldn’t work unless they’re simple. (I suppose all classical piano MIDIs would work.) People making music for their game would also make their MIDI according to these rules. Another downside is that you can’t make more kinds of sounds than just the above five (unless you code your player to interpret channels after channel 5 as other sounds).

The other route:
– Interpret the MIDI instruments that MIDI channels use. Is something set up to sound like a piano? Generate a piano-like tone. Is it set up to use the square wave? Use that.

Upside is that a lot of existing MIDIs could be imported without issue straight away (while usually losing a lot of channels due to VB limitations, of course). Also, making the MIDIs themselves is easier and the song composer gets a lot more freedom in how it should sound.

Downsides are that it will take a lot of time and trial and error to generate 128 distinct sounds for the 128 possible MIDI instruments. There’s also the matter of how exactly you’re going to assign the available VB sound channels properly. And you would also have to edit your NSF-exported MIDIs so channel 3 is set up properly (instrument 82, titled “lead 2”, would perhaps be a smart choice).

  • This reply was modified 11 years, 5 months ago by DaVince.

Hmm… Looks like the NSF to MIDI exporter you’re using doesn’t set different instruments for different channels. Instead, it just dumps the notes into separate channels, and then it sets the channel instrument to square wave and nothing else. The piano ones you’re seeing aren’t specifically set to that – those channels aren’t being set at all, so they default to instrument 1, which is the piano.

However, since it dumps the notes into channels very consistently, this makes things easy regarding instrumentation. It seems to follow the actual NES sound hardware pattern!

From Wikipedia (regarding channels in NES sound hardware):
two square waves, one triangle wave, one noise generator and one digital sample (DPCM) channel

And indeed, channel 1 and 2 are always square waves in your provided MIDIs. Channel 3 is always a triangle wave. You can likely interpret any exported NES MIDI like that.

Since MIDI has no white noise instrument, it sets a drums track for channel 4 and tries to interpret any white noises the NSF makes as drum sounds. It also seems to be failing a lot here – In the third MIDI, only the three longer bits of white noise at the start are interpreted (as an open hi-hat sound) but all the shorter percussion bits that play throughout the rest of the song are missing entirely!

As for the NES’s digital sample channel… No clue if the NSF to MIDI exporter does anything with it at all. Zelda has no samples in its music; that was reserved for the sound effects. Convert some Mario 3 music and see if channel 5 has anything or not.

The music itself is definitely too slow in Mednafen. I wonder if this is a problem with Mednafen or not because this thread states this:

Mednafen has different timing than the Virtual Boy hardware, so its output will not be identical. You can adjust the delay between samples by pressing Up and Down on the left D-Pad.

So you might be right there (unless this only affects his code somehow). There has to be a way to make it consistent, though, considering emulated VB games play music just fine. What’s going on there?

thunderstruck wrote:
It seems to either pick squares or piano as an instrument. I just checked some of the NES specs. I might be wrong but for me it sounds like you can only choose between square and triangle waveforms or use the noise channel.

Looks like you’re right! In that case it’s a triangle wave – they sound incredibly similar so I confused the two.

Checking the VB’s sound hardware specs, to the best of my interpretation it seems that the VB can make all of the aforementioned kinds of sounds, however.

  • This reply was modified 11 years, 5 months ago by DaVince.

No, unfortunately, I can’t test it on hardware… I’m basically a VB fan without a VB. ^^’

I’m sure the NSF->MIDI conversion has some kind of standard in what instrument channels it picks. Perhaps you could base it off that? I suppose if you’re having trouble differentiating the sound of specific tones though, that might be very difficult indeed. Perhaps I can help determine what type of tone what instrument should be if you share the MIDIs you’re using?

Oh, okay. I was wondering since the NES Zelda music uses some sine waves for its bass tones (that channel that goes up an entire octave like C1-G1-C2 in the intro theme, for example). But in your example that instrument plays as a square wave indeed. Compare: https://www.youtube.com/watch?v=uyMKWJ5e1kg I also think the main melody is done with a triangle wave? Or perhaps a mix of triangle and square wave, since that melody is playing on two channels, after all.

It also has to be noted that that main tune uses one of those tiny white noise bits for its percussion! So now you’ve got a nice reference of what a hi-hat approximately should sound like.

I also suggest you just keep the original tunes handy in case you want to do a quick comparison. 😉

Edit: I suppose another observation here is that in Mednafen your tune is a bit too slow compared to the original one! Is this because of the input MIDI or is something going on with how the timing is read?

White noise is actually used a LOT in old consoles for percussion, especially on the Game Boy. It usually consists of short bursts of white noise, accompanied by a quick fade. You can generate white noise with the noise channel; any random noise that channel makes will do fine. If you can set a noise frequency, even better (to distinguish between lower and higher percussion-type sounds).

Attached are some WAV samples of NES and Gameboy white noise percussion. Perhaps they can help.

Also included: a Kick and Tom sound which are actually constructed of square waves that lower their notes and fade out quickly. This also creates percussion-like sounds.

Speaking of using other noises… Have you experimented trying to give different MIDI instruments different sounds? I’d imagine that setting a MIDI channel to bass and then having an appropriate bass-like sound coming from the player could work really well for the general sound.

Attachments:

Returned to the forums for a bit only to find this! Impressive work, great job so far! (Especially since I hear from some people how annoying MIDI files are constructed. :P)

I’m noticing the notes are (almost?) always an entire octave too high. This seems to go for all instruments, so the Zelda and SMB3 tunes all sound much too high-pitched.

As for the percussion, it might be a good idea to convert those into white noise percussion. Currently the percussion track seems to play regular notes, instead.