help changing n64 song lookup tables by Volkov73 at 2:57 AM EDT on May 2, 2024
Previously I was using seq64 to edit the music lookup-table for first-party games. It's essentially a table in the rom which has a list of all the locations and lengths of the sequences.

This meant I could have the menu music in Mario 64 be any song from the game. Now I am intending to do the exact same thing for non-first party games.

Can anyone tell me how I'd do this?

Starting with Goldeneye. The menu music is called "folders" (length '03e2' and offset '42812c')
I want to be able to have any other song from the game play, instead of the menu music.

I also intend to do this for other games later on. SubDrag tool lists the length and location of each sequence - but I cannot find any table where I would edit it so when the game reaches the main menu - it instead plays a different audio sequence.

Basically, how should I reliably find these tables in various games (if they even exist). Then I should be able to edit them accordingly


edited 3:07 AM EDT May 2, 2024
by Volkov73 at 7:33 AM EDT on May 2, 2024
Oh, there was also changing of the "instrument set" so yeh I'm not sure now.

My goal is to get clean audio recordings and having the tracks play on the menu screen made for convenient playing of every song in the game in a real setting (official hardware + edited rom).

I managed to do it on other games due to "sound menu" existing, but for Goldeneye there is no such thing. I tried to just start each level but then I get sound effects from the game so I can't record the music cleanly
by WDLmaster at 6:36 AM EDT on May 4, 2024
There's no reliable way to find offset lists. The database used by SubDrag's tools was assembled mostly by hand for each game individually, which basically took years to complete. In the tool's folder is a file called gameconfigmidi.ini which contains the start offsets for each list/song. BUT:

* Different games have different table formats
* Table and sequence data are not necessarily grouped together in ROM
* The table is compressed in some games
* The table might be in the first megabyte of ROM data in which case you need to recalculate the checksum in the ROM header or the game won't boot
* the table might be part of the code section instead of a separated chunk of data.

As for the instrument sets:

Not all formats have that information in the data. The original "compact MIDI" format ("S1") for instance can only have the soundbank changed by code. A later version ("S2") adds further information (like soundbank index) for each sequence in a separate table following the offset table.

The in-house format of Nintendo of Japan ("AudioSeq") has this information stored in a separate chunk along with all other offset tables. Unfortunately, the position of this chunk is inconsistent across different games and in some instances (Zelda) it's even compressed and part of a lager chunk of data. This version can have multiple soundbanks attached to a sequence.

Another widely used format is SNG but as far as is can tell this only has support for one soundbank. This is also the format which has no easily identifiable offset table. I have seen some games with a table but I think in most cases it's part of the code and thus mangled with other stuff.

edited 7:23 PM EDT May 4, 2024
by Volkov73 at 2:04 AM EDT on May 5, 2024
Perhaps there's is easier way to achieve this.

Would it be an easier task to do something else within each game to play specific audio tracks? Some games have a sound test menu so that's fine. Others might have a dev option gameshark code which might allow you to play a specific song. That's fine.

But for some games the only thing I can do is go to that area within the game. Sometimes this can generate other sfx from the game.

I have no problem editing the songs as I wish. But now I need to get audio recordings of it.

Any ideas?

edit: I guess one option is making .miniusf files for playback outside of the emulator, but this is a last ditch effort as I want them to play on console, and I also don't know about making usf

edited 4:27 AM EDT May 5, 2024
by WDLmaster at 5:25 AM EDT on May 5, 2024
The only alternative I can think of right now would be setting the instrument count for the SFX soundbank(s) to zero. This effectively "removes" all other sounds from the game. You still need to track down the offset table for SFX. But there are some games which share the same soundbank with SFX and music! In that case you have to edit the offset table by setting the specific instrument pointer to zero.
by Volkov73 at 8:59 AM EDT on May 5, 2024
I understand it's a lot of manual work, don't worry I am all for it.
How would one track down these values to null out?
by WDLmaster at 11:19 AM EDT on May 5, 2024
Depending on the game this can range from easy task to nearly impossible. The best cases are those that use the original standard soundbank format. You could use the gameconfigsound.ini from SubDrag's SoundTool to find the offset table(s). Each table starts with "B1" (0x4231) and is always 8-byte aligned. The next 2 bytes are the number of banks. There's no easy way to tell which bank is which (SFX or music).

Later games use the newer (but far worse!) audio engine that have their offset tables start with the text string "N64 PtrTablesV2" so they're easier to find.

edited 11:25 AM EDT May 5, 2024

Go to Page 0

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=]Link[/url]


HCS Forum Index
Halley's Comet Software
forum source