Language…
8 users online: 7 up, frz, Golden Yoshi,  idol, Israelcv12cv, Lane, Manofer,  Shoujo - Guests: 199 - Bots: 123
Users: 70,829 (2,356 active)
Latest user: Hackmantheorigi

How to: Block that changes music (based on hex value)




So I want to create a block that when hit from the bottom, it changes the current song to something else (using hex values). I barely know anything about true ASM coding, so can anyone help me with this?

LINKS -> YouTube - Discord - Twitter - BlueSky

This should do the trick:

Code
db $42
JMP MarioBelow : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return
JMP Return : JMP Return ; : JMP Return

MarioBelow:
	LDA #$07 ; whatever song number you want
	STA $1DFB
Return:
	RTL


Not sure if AddmusicK does anything special to music loading (it's been a while), so depending on the song some additional work may be needed. It's worth a try though.


 



Thanks. I'll test out that code once I get on my PC.

[EDIT]

It worked. Now I can use it in my easter egg room of unused music for my romhack.

LINKS -> YouTube - Discord - Twitter - BlueSky