Language…
7 users online: BreadEater, codfish1002, CONLUSH666, h.carrell, LocoFuzzyPants,  NopeContest, Scruffy - Guests: 85 - Bots: 235
Users: 66,534 (2,383 active)
Latest user: amyysucks

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

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