Jump to content
NHL'94 Forums

Editing music/sounds in NHL '94- a start


Recommended Posts

Hi all,

This is mostly to capture my thinking, as I do hope to come back to this another day, but I cannot spend any more time listening to my computer play version of "Go fight win!"... And in case anyone else has started the work or has an interest, here's some information for you!

Determine where/what the note pitches are in the NHL '94 code

Background: To be able to edit or add new music, somehow those bytes need to be translated out of code into music- then new pieces can be translated from music into code.
I'll start with "Go, Fight, Win!" (The song at offset 00184052 in DEC) Why?  It's first, and it's a simple song in '94 with only a couple of chords. 
Some background (trying not to get too music geek here)- Go Fight win is quarter notes for the first 3 notes, and the first measure's tones are 1-3-4-4#-5 on a scale.  In half steps from the root, they are 0-4-5-6-7 (So the last three notes are chromatic).  It's tempo in NHL '94 is around 90 BPM.
Process: So I'll copy the code from this song in small parts to the start of song 02 (Start of game when Boston is the home team, so it's easy to access in the game) to see if I can ID the first measure's code.  The first 64 bytes are close (the last note of the measure is cut short, but it's enough to work with)
Two patterns stick out to me in those bytes- 27-2B-2C-2D and 33-37-38-39.  27-2B might be too far of a jump, but it might be that what I'm hearing as a single note might be two notes together.  

For notes- I'm looking at decimal 184996 onward. So these are the chunks I'm looking at:  (underlined the sets of 90 for clarity)

90 27 23 00 
90 33 23 14 
80 27 37 03 
80 33 41 0E 
90 37 23 00 
90 2B 23 14 

80 2B 48 03 
80 37 47 10 
90 38 23 00 
90 2C 23 13 

80 2C 16 01 
80 38 2E 06 
90 39 23 00 
90 2D 23 1A 

80 2D 50 02
80 39 50 01

From my experiments I believe:

80/90 have to do with the instrument. Changing all the 90's to 80 met me with silence.  I think you can think of 90 as an on switch and 80 as an off swtich.   But I can't see why you'd have values after a 'off' instrument (3703, 410E for example) so I'm not sure here.  I didn't experiment with changing the 90's to different values, as my goal today was simply the pitch.

I'm certain the second set of bytes are pitches.  If you change the on and off pitches together, you can move around the pitch of the notes.  (SUCCESS!)

I can't figure out the third set, and any attempts to change them ended inconclusively.  It might be a note style?

I thought the 4th set was note length, but I'm struggling with the 00 values.  Changing the 14's up and down made the notes longer and shorter.  Maybe it loads all the notes then plays them for that length?  Again, I can't figure out the off notes bytes there.

Conclusion: I believe I found the pitches, which was my goal for today.  When I get a better grasp on note length, I can probably make the note long enough to calibrate the pitches with a tuner, which means note length will be the next project.

  • Thanks 2
Link to comment
Share on other sites

This is a short and sweet one-

I was correct on the note length.  If put in a value of 50 (32), then cut it in half on the next note at 25 (20), the notes are twice and half as long.  They could be calibrated to a metronome I suppose, but I'd guess if you're creating music you'd find out how long you want a quarter note to be by trial and error perhaps?

On the downside- with my emulator, computer and tuner app on my phone, I am consistently getting notes that are *in between* steps (almost exactly just sharp enough or flat enough that it wants to jump between F and F# for example).  Almost exactly, as I move the pitches up and down.  But- 36 is an F I'll call it (my phone picked it up around 187 Hz, FYI), 34 was an E flat.  It's a start, and I guess if you're out of tune on every note in relation... it works? 

Next step: Explore instrumentation/effects- I'm not sure if I'll focus on the 23 bytes or the 80/90's.  I may try and find other songs in the ROM that aren't organ and see what differences I notice.  I feel like I have the basics for making an organ ditty down now enough to do it though, and I may try that as well.  Lot's of new branches in this project.


A side thought I had today- maybe it could be possible to combine the real songs on organs with an attempt to match the goal horn sounds for "modern" ROM's.  It may be a pipe dream, but I think the songs part is very possible,and horns would require instrument or effect work.  I also know the lengths would need love, as someone would have to manage the pointer table or make the songs the same length as the time currently available.---- Edit- I played with this a bit tonight and was able to get a weak sounding first line of "Sweetness" for Florida's horn.  I need to learn more about tone to get a meatier organ, but I'm making real progress and can make any song with sheet music at a basic level now.

Edited by Asher413
More work today
Link to comment
Share on other sites

This is great.  I know there is some information out there on the internet, and even programs, that explain how the Sega Genesis music works and how you can create custom songs.  I looked into this a while back as well, so I can dig up stuff if you haven't.

Link to comment
Share on other sites

Kingraph- I'll see when/if I get stuck.  I don't really do well with coding (basic was the last language I understood), so I'm trying to break it down a way I understand instead of the coding I've found from Google.

Today was a little less, but more information to be taken down on the next steps:

The bytes between the FF's and the start of the notes I have a stronger grasp on (someone hinted piece of these on the boards here as well).

The C# bytes I believe are setting the channel of the instrument, and the next byte I believe is the instruments. The organ songs didn't load multiple instruments often, but the opening song is clearly a number of instruments loaded.  I found (at least in NHL '94, I haven't tested '93 or others) there appears to be instruments loaded/preset/available in the rom between 00 and 1F.  It's hard to place what all are supposed to be, but my notes on what they sounded like to me include three organ sounds, a sitar (18), and my favorite- my wife called it "Finger plucking a rubber band" (14).  I'm leaning toward thinking organ's 03 and 04 sound better than the OB that appears to be the one they used, but YMMV.

Corresponding with that- the 90's that I think are on switches earlier, I think also correspond to the channel numbers.  If you are using the instrument in channel 0 (CO), you put a 90 in those bytes.  Channel 1 (C1) is 91, etc.  The 80's appear to work the same on turning off tones.

So now starting from the start of a 'song', I'm looking to ID the third bytes after the channel, the second/third bytes after the 80/90 command, then I think I've found what makes the sounds and manipulates the sounds.


When all this is done, I'll clean this all up into one more clear post, but I'm posting as I go for personal notes, and just in case I give up on the project tomorrow, there's a starting for someone else not to go through the same steps.



  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...

Unfortunately, no.  My sound card on my laptop didn't work this whole school year.  It's on my list this summer to see if I can fix it.

Which also means it's on my list to get back into a lot of these things once I can hear the sweet sounds of Genesis hockey on the computer again.  Here's to hoping!

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Who's Online   0 Members, 0 Anonymous, 12 Guests (See full list)

    • There are no registered users currently online
  • Create New...