Skip to content

Commit

Permalink
FEATURE: use acme
Browse files Browse the repository at this point in the history
  • Loading branch information
boomlinde committed Feb 9, 2016
1 parent 8e6ada3 commit bf72995
Show file tree
Hide file tree
Showing 23 changed files with 403 additions and 516 deletions.
38 changes: 19 additions & 19 deletions crash.s → crash.a
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
!zone {
lda CRASH
bne nocrash
bne .nocrash
lda CXP0FB
ora CXP1FB
and #$80
beq nocrash
beq .nocrash
lda #8
sta AUDC1
lda #0
Expand All @@ -26,44 +26,44 @@

lda CXP0FB
and #$80
beq nocrashp0
beq .nocrashp0
dec P0LIVES
nowinnerp0:
.nowinnerp0
lda #120
sta Y0_HI
lda P0LIVES
bne nocrashp0
bne .nocrashp0
lda #1
sta RESET
nocrashp0:
.nocrashp0
lda CXP1FB
and #$80
beq nocrashp1
beq .nocrashp1
dec P1LIVES
nowinnerp1:
.nowinnerp1
lda #120
sta Y1_HI
lda P1LIVES
bne nocrashp1
bne .nocrashp1
lda #1
sta RESET
nocrashp1:
.nocrashp1
lda P0LIVES
ora P1LIVES
bne notboth
bne .notboth
lda #$50
sta WINNER_COLOR
jmp nocrash
notboth:
jmp .nocrash
.notboth
lda P0LIVES
bne checknext
bne .checknext
lda #P1COL-10
sta WINNER_COLOR
jmp nocrash
checknext:
jmp .nocrash
.checknext
lda P1LIVES
bne nocrash
bne .nocrash
lda #P0COL-10
sta WINNER_COLOR
nocrash:
.nocrash
}
6 changes: 3 additions & 3 deletions enginesounds.s → enginesounds.a
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
!zone {
tax
and #%11001100
beq noblow
Expand All @@ -12,7 +12,7 @@
lda #2
sta AUDV0
jmp nothrust
noblow:
noblow
txa
and #$11
beq nothrust
Expand All @@ -22,5 +22,5 @@ noblow:
sta AUDF0
lda #4
sta AUDV0
nothrust:
nothrust
}
65 changes: 31 additions & 34 deletions input.s → input.a
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.var LSPEED = 9
.var RSPEED = 0-9
.var VSPEED = 0-20
.var GRAVITY = 10
LSPEED = 9
RSPEED = 0-9
VSPEED = 0-20
GRAVITY = 10

lda CXPPMM
and #$80
Expand All @@ -10,7 +10,7 @@
ldy JUST_COLLIDED
bne input_nocol

// Collision energy transfer
; Collision energy transfer
lda SPEEDX0_LO
ldy SPEEDX1_LO
sta SPEEDX1_LO
Expand All @@ -35,23 +35,23 @@
sta JUST_COLLIDED

jmp input_nocheck
input_nocol:
{ // player 0
input_nocol
!zone { ; player 0
txa
and #$10 // Up button
beq noup
and #$10 ; Up button
beq .noup
clc
lda SPEEDY0_LO
adc #<VSPEED
sta SPEEDY0_LO
lda SPEEDY0_HI
adc #>VSPEED
sta SPEEDY0_HI
noup:
.noup

txa
and #$80 // Right button
beq nor
and #$80 ; Right button
beq .nor
clc
lda SPEEDX0_LO
adc #<RSPEED
Expand All @@ -60,12 +60,12 @@ noup:
sta P0LASTX
adc #>RSPEED
sta SPEEDX0_HI
jmp nohor
jmp .nohor

nor:
.nor
txa
and #$40 // Left button
beq nohor
and #$40 ; Left button
beq .nohor
clc
lda SPEEDX0_LO
adc #<LSPEED
Expand All @@ -74,25 +74,25 @@ nor:
sta P0LASTX
adc #>LSPEED
sta SPEEDX0_HI
nohor:
.nohor
}

{ // player 1
!zone { ; player 1
txa
and #1 // Up button
beq noup
and #1 ; Up button
beq .noup
clc
lda SPEEDY1_LO
adc #<VSPEED
sta SPEEDY1_LO
lda SPEEDY1_HI
adc #>VSPEED
sta SPEEDY1_HI
noup:
.noup

txa
and #8 // Right button
beq nor
and #8 ; Right button
beq .nor
clc
lda SPEEDX1_LO
adc #<RSPEED
Expand All @@ -101,12 +101,12 @@ noup:
sta P1LASTX
adc #>RSPEED
sta SPEEDX1_HI
jmp nohor
jmp .nohor

nor:
.nor
txa
and #4 // Left button
beq nohor
and #4 ; Left button
beq .nohor
clc
lda SPEEDX1_LO
adc #<LSPEED
Expand All @@ -115,29 +115,26 @@ nor:
sta P1LASTX
adc #>LSPEED
sta SPEEDX1_HI
nohor:
.nohor
}

input_nocheck:
input_nocheck
sta CXCLR

{ // Gravity p0
; Gravity p0
clc
lda SPEEDY0_LO
adc #<GRAVITY
sta SPEEDY0_LO
lda SPEEDY0_HI
adc #>GRAVITY
sta SPEEDY0_HI
}

{ // Gravity p1
; Gravity p1
clc
lda SPEEDY1_LO
adc #<GRAVITY
sta SPEEDY1_LO
lda SPEEDY1_HI
adc #>GRAVITY
sta SPEEDY1_HI
}

Loading

0 comments on commit bf72995

Please sign in to comment.