Sorry if this is too n00b but...
Can somebody give me a better explanation on the "Hacking a Routine" tutorial at SMwiki?
Can somebody give me a better explanation on the "Hacking a Routine" tutorial at SMwiki?
BRA Check Check: LDA $0DBF CLC ADC #$01 STA $0DBF LDA $0DBF CMP #10 BCS Press RTS Press: LDA #$0D STA $71 LDA $16 CMP #$01 BEQ Teleport LDA $16 CMP #$02 BEQ Teleport LDA $16 CMP #$04 BEQ Teleport LDA $16 CMP #$08 BEQ Teleport LDA $16 CMP #$40 BEQ Teleport LDA $16 CMP #$80 BEQ Teleport LDA $18 CMP #$10 BEQ Teleport LDA $18 CMP #$20 BEQ Teleport LDA $18 CMP #$40 BEQ Teleport LDA $18 CMP #$80 BEQ Teleport BRA Press Teleport: LDA #$08 STA $71 RTS
LDA $DBF CMP #$7F BEQ Warp RTS Warp: LDA #$05 STA $71 RTS

LDA $0DDA ;\Load current level song CMP #$05 ;Compare it to Boss music BNE ChangeMusic ;If not equal, then branch RTL ;/If equal, then end ChangeMusic: LDA #$05 ;\Load value for boss music STA $0DDA ;Store it in current level music RTL ;/Then end