Cleanups for Creativision.

This commit is contained in:
Christian Groessler
2017-02-01 19:46:04 +01:00
parent 0b2a699b46
commit a08f905224
22 changed files with 291 additions and 314 deletions

View File

@@ -1,6 +1,6 @@
;*
;* Creativision Joystick Function
;*
;*
;* unsigned char __fastcall__ joystate(unsigned char joy);
;*
;* JOY_1 -> Return Left Joystick direction
@@ -12,47 +12,47 @@
.export _joystate
.include "creativision.inc"
_joystate:
cmp #1 ; Left Direction
bne l1
lda $11
beq l5
and #$f
and #$0F
lsr a
tax
inx
txa
rts
l1: cmp #2 ; Right Direction
bne l2
lda $13
beq l5
and #$f
and #$0F
lsr a
tax
inx
txa
rts
l2: cmp #3 ; Left Buttons
bne l3
lda $16
beq l5
and #$f
and #$0F
rts
l3: cmp #4
bne l4
lda $17
beq l5
and #$f
and #$0F
rts
l4: lda #0
l5: rts