Fix for BRSTM with Fewer Audio Tracks [stebler] - Printable Version +- Mario Kart Wii Gecko Codes, Cheats, & Hacks (https://mariokartwii.com) +-- Forum: Cheat Codes (https://mariokartwii.com/forumdisplay.php?fid=51) +--- Forum: Visual & Sound Effects (https://mariokartwii.com/forumdisplay.php?fid=56) +--- Thread: Fix for BRSTM with Fewer Audio Tracks [stebler] (/showthread.php?tid=2071) |
Fix for BRSTM with Fewer Audio Tracks [stebler] - Kazuki - 09-08-2023 Fix for BRSTM with Fewer Audio Tracks [stebler] This code prevents the bgm from stopping due to the low number of tracks in BRSTM. Original code was written by stebler as a part of mkw-sp. I ported it to gecko code. It is recommended to use with this code. NTSC-K is not tested. (NTSC-U) c20a4f10 0000001e 7cac2b78 558c463e 718c0080 2c0c0080 40820014 3d807fff 618cffff 7ca56038 480000c4 9421ff80 7c0802a6 90010084 bc610008 48000021 9061fffc b8610008 80010084 7c0803a6 38210080 8061ff7c 4e800020 3d608000 9421ff80 7c0802a6 90010084 bc610008 7ca55b78 3d80800a 618c4f10 7d8803a6 4e800021 9061fffc b8610008 80010084 7c0803a6 38210080 8181ff7c 2c0c0000 4182000c 38600001 4e800020 3ca08000 9421ff80 7c0802a6 90010084 bc610008 3d80800a 618c4f10 7d8803a6 4e800021 9061fffc b8610008 80010084 7c0803a6 38210080 8061ff7c 4e800020 9421ffe0 60000000 00000000 0409ebd0 38000000 (PAL) c20a4fb0 0000001e 7cac2b78 558c463e 718c0080 2c0c0080 40820014 3d807fff 618cffff 7ca56038 480000c4 9421ff80 7c0802a6 90010084 bc610008 48000021 9061fffc b8610008 80010084 7c0803a6 38210080 8061ff7c 4e800020 3d608000 9421ff80 7c0802a6 90010084 bc610008 7ca55b78 3d80800a 618c4fb0 7d8803a6 4e800021 9061fffc b8610008 80010084 7c0803a6 38210080 8181ff7c 2c0c0000 4182000c 38600001 4e800020 3ca08000 9421ff80 7c0802a6 90010084 bc610008 3d80800a 618c4fb0 7d8803a6 4e800021 9061fffc b8610008 80010084 7c0803a6 38210080 8061ff7c 4e800020 9421ffe0 60000000 00000000 0409ec70 38000000 (NTSC-J) c20a4ed0 0000001e 7cac2b78 558c463e 718c0080 2c0c0080 40820014 3d807fff 618cffff 7ca56038 480000c4 9421ff80 7c0802a6 90010084 bc610008 48000021 9061fffc b8610008 80010084 7c0803a6 38210080 8061ff7c 4e800020 3d608000 9421ff80 7c0802a6 90010084 bc610008 7ca55b78 3d80800a 618c4ed0 7d8803a6 4e800021 9061fffc b8610008 80010084 7c0803a6 38210080 8181ff7c 2c0c0000 4182000c 38600001 4e800020 3ca08000 9421ff80 7c0802a6 90010084 bc610008 3d80800a 618c4ed0 7d8803a6 4e800021 9061fffc b8610008 80010084 7c0803a6 38210080 8061ff7c 4e800020 9421ffe0 60000000 00000000 0409EB90 38000000 (NTSC-K) c20a5010 0000001e 7cac2b78 558c463e 718c0080 2c0c0080 40820014 3d807fff 618cffff 7ca56038 480000c4 9421ff80 7c0802a6 90010084 bc610008 48000021 9061fffc b8610008 80010084 7c0803a6 38210080 8061ff7c 4e800020 3d608000 9421ff80 7c0802a6 90010084 bc610008 7ca55b78 3d80800a 618c5010 7d8803a6 4e800021 9061fffc b8610008 80010084 7c0803a6 38210080 8181ff7c 2c0c0000 4182000c 38600001 4e800020 3ca08000 9421ff80 7c0802a6 90010084 bc610008 3d80800a 618c5010 7d8803a6 4e800021 9061fffc b8610008 80010084 7c0803a6 38210080 8061ff7c 4e800020 9421ffe0 60000000 00000000 0409ecd0 38000000 Code: #Source Code: #Source RE: Fix for BRSTM with Fewer Audio Tracks [stebler] - lschlick - 04-08-2024 Edit: Whoops I commented on the wrong thread. Not sure how to delete a comment. Edit: Actually I did comment on the right thread, sorry about that confusion. This code has a bug. In Koopa Cape, when a brstm is provided that has fewer than 4 stereo tracks, the music volume is doubled. Meanwhile a brstm that has exactly 4 stereo tracks has normal volume. I suspect that this is because in vanilla MKW, in Koopa Cape, the 1st and 4th stereo tracks to play on top of each other at the same time. In order to avoid having double volume when designing a multi track brstm for Koopa Cape, you must leave the 4th track silent. I suspect what this code does is that when a brstm is found to have fewer than 4 stereo tracks on Koopa Cape, it copies the stereo tracks into any missing channels. This works for Toad's Factory, Wario's Gold Mine, Dry Dry Ruins, Moonview Highway, and Bowser's Castle. But it doesn't work for Koopa Cape. Because the 4th stereo track plays at the same time as the 1st, resulting in double volume when those tracks are playing. The fix for the developer would be to make a special case for Koopa Cape, which creates a 4th stereo track for the brstm, but fills it with silence instead of a duplicate of the 1st stereo track. A temporary fix for users is that you can make any single-channel brstms that you intend to use on the KC slot half volume. However, this is not ideal if you have lots of brstms for a custom track distribution and you may end up changing the slot that a brstm plays on. If you decide to switch a brstm to another slot, then you will have to make its volume normal. Another side effect is that the brstm volume will be half when you collide with sound triggers that normally switch to the 2nd or 3rd stereo tracks. Another fix is to edit the brsar and cut the volume of the KC slot in half. Now any brstms you place on the KC slot will automatically have their volume un-doubled without you needing to edit each and every one of them. However, this still isn't ideal because now any multi-channel brstms that you want on the KC slot will be at half volume. You can either make your multi channel brstms for KC twice as loud when you are making them in Audacity (which isn't ideal, there will be sound clipping, even if you use the Limiter instead of regular amplify) or you can use the "Music Volume can be set via BRSTM" code that is used in CTGP to double the volume without sound clipping. However, that code isn't public, so good luck getting ahold of it. |