Language…
8 users online: autisticsceptile1993, CrazyPencilDawg, Dan2point5, DanMario24YT, Gamet2004, iamtheratio, Scags, TheOrangeToad - Guests: 264 - Bots: 319
Users: 64,795 (2,378 active)
Latest user: mathew

Old Music Port Crashing Music Chip

I am trying to use this old port from 2007 in my hack: https://bin.smwcentral.net/u/41614/Pokemon%2BRBY%2B-%2BBattle%2BAgainst%2BChampion%2BGary.zip

However, I am running into some trouble with the song. When using a custom song for the P-Switch, the music chip from the snes crashes when the p-switch music ends.

The P-Switch music I am using is the song called "Toad's House" from the SMAS music pack available here: https://www.smwcentral.net/?p=section&a=details&id=18816

The "Toad's House" song doesn't use custom samples.

The music chip doesn't crash with any other level songs when using a p-switch with the custom P-Switch song. It only crashes with this old port.

Using the vanilla P-Switch music from smw doesn't crash the music chip. It is only when using the old port and the custom p-switch music that the chip crashes.

AddmusicK also doesn't give me any errors when inserting the song.

Here is a clip showcasing the music chip crashing:
https://www.youtube.com/watch?v=9my4ADHdKdQ

Any help would be appreciated. :)
Disable the echo i.e. remove lines 40 and 41 in the Toad House music. The echo is one of the most common reasons to crash the music engine and while AMK usually fixes most issues (by checking how much space the music engine takes), it still has got that limitation within global songs.
Originally posted by MarioFanGamer
Disable the echo i.e. remove lines 40 and 41 in the Toad House music. The echo is one of the most common reasons to crash the music engine and while AMK usually fixes most issues (by checking how much space the music engine takes), it still has got that limitation within global songs.

Hello! Thank you for your response. I tested with the echo off in toad's house song and the music chip didn't crash. So the issue definitely is with echo.

Because I didn't want to change how the p-switch music sounded, I did some experiments. I found that adding the echo values from toad's house song to the old port, and then adding a command to disable echo (to not have the song sound different) also solved the issue! Here is what I added to the old port in the text file:
Code
$ef $1f $4f $4f
$f1 $02 $32 $01
$F0

With this, I can have the p-switch music with echo and the old port in my hack. I'm pretty happy with that. :)

Note: What is weird is that the music chip would not crash when using Toad's House with echo enabled with level songs with much bigger insert size. It only crashed with this particular one... Maybe it has to do with the fact that the old port had no echo values defined, and the global p-switch song had echo?