;---------------------------------------
;
; Two subroutines:
;
; * InitJoypads - inits the joypads and the extra port
;
; * ReadJoypads - reads both joypads
;   After executing it, you will have:
;
;   $FFFFF0 - Current pressed state of joypad 1
;   $FFFFF1 - Current holded state of joypad 1
;   $FFFFF2 - Current pressed state of joypad 2
;   $FFFFF3 - Current holded state of joypad 2
;
; by drx [www.hacking-cult.org]
;        [www.bluehedgehog.org]
;        [www.shadowsoft-games.com]
;
;---------------------------------------

InitJoypads:

		move.w	#$100,($A11100).l	;halt the z80

wait_for_z80: