disco_pswitch

by furyfulfawful

Game: SMW

Description:

; Base ASM file - feel free to copy/paste this and use this for your own code.

	LDA $100	; \ only run in gamemode 14
	EOR #$14	; |
	ORA $9D		; | and when the game isn't paused
	BEQ +		; |
	RTL		; |
	+		; /
	
; YOUR CODE HERE
LDX #$0B
loop:
LDA $009E,X
CMP #$3E
BEQ found_switch
pool:
DEX
CPX #$00
BPL loop

	RTL

found_switch:
LDA #$04
STA $009E,X
LDA #$01
STA $187B,X
BRA pool
back to listings