Views: 23,105,706 |
Home
| Forums
| Uploader
| Wiki
| Object databases
| IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search |
12-06-24 08:38 PM |
Guest: |
0 users reading How to edit sound effect tables and other stuff | 1 bot |
Main - General SM64DS hacking - How to edit sound effect tables and other stuff | Hide post layouts | New reply |
skawo |
| ||
Normal user Level: 32 Posts: 20/216 EXP: 200499 Next: 5943 Since: 01-04-14 Last post: 2706 days ago Last view: 1395 days ago |
So, semi-music documentation here.
1. We have 3 bytes editable in the editor. Byte 1, byte 2 and byte 3 (which we know is the SSEQ ID, where eg. 10 (Decimal ID 16) = NCS_BGM_MINIVOCAL) These values are loaded into the ARM9 memory at 0x02143C1C (US ROM v1) if you need to find some specific configuration or something. 2. Byte 1 is multiplied by 4, then 4 is added to it, and that is added to 11A4. Out comes the address in info.bin, which is in the SDAT. Look there, you get a reversed address (i.e if "441A" is there, the address is "0x1A44") of the SWAR entries table, also in info.bin So, the SWAR entries table consists of values like this: 0a is the beginning of a new entry table. Seems like this can be 0d and others too, not sure what this does. Next line we have...also not sure. "02 04" That's most likely the SSAR IDs or something, but honestly, no clue. Next line, however is the SWAR ID (where, eg. 31 (So decimal ID 50) = CS_WAVE_BGM_RESIDENT). Then, it repeats. To have music playing in a level, you need to make Byte 1 point to a table in the info.bin which contains ALL of the "dependencies" a particular music piece has. For instance, for the Peach's Castle (NCS_BGM_SHIRO), that would be NCS_WAVE_BGM_SHIRO and NCS_WAVE_BGM_RESIDENT (You can find this out with VGMTrans or something). If both of those are not in the SWAR table pointed at by Byte 1, you get silence. And indeed, if we look at the SWAR table in the info.bin (Byte 1 = 3, 3*4+4=16, info.bin at 11B4 has "6c 13", so the SWAR table is at 0x136c), it contains (as the two first entries, no less), well, this:
And, indeed, this same table also loads in sound effects. So there. So, you can have it load whatever you want. It seems to be really, really picky when it comes to Sound effects, though, so be careful there. Perhaps SFX also depends on... 3. Byte 2 is the SBNK ID. This allows further control of SFX, but no idea exactly how. Yay. |
Gota7 |
| ||
Paragoomba Star Wolf Level: 18 Posts: 24/66 EXP: 28362 Next: 1535 Since: 04-09-17 From: Same as above. ^ Last post: 2255 days ago Last view: 1501 days ago |
Btw, the decimal ID for BGM_Resident is 49, not 50.
Join the SM64DS Hacking Discord: https://discord.gg/PhpA9Wt |
Main - General SM64DS hacking - How to edit sound effect tables and other stuff | Hide post layouts | New reply |
Page rendered in 0.018 seconds. (2048KB of memory used) MySQL - queries: 28, rows: 198/198, time: 0.009 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |