Language…
13 users online: Anas, Batata Douce, crocodileman94, DasFueller, eltiolavara9, Foxy_9000_, Hammerer, Isikoro, jump_run_repeat, Mythundare,  Nanako, Necrotext, pzyko103 - Guests: 283 - Bots: 446
Users: 64,795 (2,377 active)
Latest user: mathew

Bowser freezing when flying in and out

I noticed while working on my hack that Bowser is now lagging in the fight. Whenever he goes to fly off screen, comes toward the camera, and returns there is a very noticeable pause during transitions. I tried to expand my rom but that didn't help. I havent done anything to the bowser fight in a while so I have no idea what might have caused this. Does anybody have any suggestions?
Trust the Fungus.
Expansion does nothing as it slows down your game even more doesn't affect the game speed.
The reason why the lag happens is because of something unrelated to the bowser fight: The music. Bowser has got multiple tracks and changes between them between phases.
This isn't a problem on the original SMW but it becomes a different story once the ROM comes in contact with AddmusicK.

The reason for the short freeze is technical: SMW has got all its level songs loaded at time (which includes all of Bowser's battle musics) but AMK only loads a single one. The waiting simply means the game has to load a different song which includes the samples.

The last point is the main reason for the relatively long freeze as all SMW songs shares all the samples. In order to fix that, you simply have to put the following code in level 1C7 to UberASM:
Code
	LDA #$01
	STA $7FB001

Keep in mind that one have to clear out $7FB001 manually. As such, I recommend you to put the following code on gamemode 11:
Code
	LDA #$00
	STA $7FB001

Now, a freeze still happens but it is notably shorter than with the samples.
Im still very new to all this, when I put those in to UBERASM it tells me error: Missing init/main/nmi label. I am not really sure what that means
Trust the Fungus.
Err... Right, I forgot a couple things. What I did was to give you the codes themselves but not how to make them ready for UberASM. That's easy to fix, though.

The first thing is that any UberASM tool main code must contain a label called at least either "init" (which is what you want), "main", "nmi" or, in terms of levels, "load". Another thing I forgot is that any code must end with either an RTS or RTL (for UberASM tool, it's the latter).
Here are the finished codes:
Level code:
Code
init:
	LDA #$01
	STA $7FB001
RTL


Game mode code:
Code
init:
	LDA #$00
	STA $7FB001
RTL

By the way, I realised you should put the game mode code to gamemode 0C, 15 and 18 instead of just 11 else it might glitch the overworld, game over and credits music.
I appreciate the help. I think it kinda worked. Everything assembled alright. Still a noticeable pause but not as bad. I dont suppose you have any other suggestions? Like is there a better tool to use than AddmusicK? I tried the Romi one but it needs me to bring up my computers command prompt but for whatever reason my computer wont let me use it.
Trust the Fungus.
Originally posted by Bensalot
Like is there a better tool to use than AddmusicK?

AMK is the best addmusic you can get which is the reason why romi's addmusic isn't on the tools section anymore. Sure, the freeze to laod a song might be a thing but there are other advantages, from the porting perspective but also from the user perspective (which includes better hardware compatibility and easier insertion of samples).

Even official games weren't that much better with that. IIRC, Super Metroid, for example, has to load the escape music after the boss fight against Mother Brain and there are probably other instances with a freeze outside a loading screen and some hacks of said game also have to work with that limitation.
Fair enough. This will work. Thanks again for the help
Trust the Fungus.