	org	$0
	incbin	"Vectorman 2 (U) [!].bin"

	org	$AF74
	jsr	$2A9000

	org	$2A9000

	jsr	$24FAA
	
	move.w	($FFFFC4A0).w,d0
	
	cmpi.w	#$0400,d0
	beq.s	X_button
	cmpi.w	#$0200,d0
	beq.s	Y_button
	cmpi.w	#$0100,d0
	beq.s	Z_button
	cmpi.w	#$0800,d0
	beq.s	M_button

	cmpi.w	#$0401,d0
	beq.s	Xup_button
	cmpi.w	#$0201,d0
	beq.s	Yup_button
	cmpi.w	#$0101,d0
	beq.s	Zup_button
	rts
	


M_button:

	jmp	$42A22


Xup_button
	moveq	#$0,d1
	bra.s	change_form
Yup_button
	moveq	#$B,d1
	bra.s	change_form

Zup_button
	moveq	#$6,d1
	bra.s	change_form

X_button:
	moveq	#$11,d1
	bra.s	change_form
Y_button:
	moveq	#$E,d1
	bra.s	change_form
Z_button:
	moveq	#$D,d1
change_form:
	moveq	#9,d0
	jmp	$5A4CC