This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
P1Up: lda GAMEPORT1 | |
and #1 | |
bne P1Dn | |
jsr Player1Up | |
P1Dn: lda GAMEPORT1 | |
and #2 | |
bne P2Up | |
jsr Player1Down |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//=========================================== | |
WaitForFireButton: | |
// | |
// Input: None | |
// Modifies: A | |
//=========================================== | |
!: lda GAMEPORT1 | |
and GAMEPORT2 | |
and #$10 | |
bne !- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//=========================================== | |
Player1Up: | |
// | |
// Input: None | |
// Modifies: A,X,Y | |
//=========================================== | |
ldx P1Y | |
ldy #P1X | |
jsr RacketOff | |
ldx P1Y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//=========================================== | |
InitGraphics: | |
// | |
// Input: none | |
// Modifies: A,X,Y | |
//=========================================== | |
jsr CLS | |
lda #1 // White Text | |
jsr SetColor | |
lda #0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Lookup table to screen locations for fast calculations | |
ScreenLo: | |
.for (var i=SCREEN;i<SCREEN+1000;i+=40) { | |
.byte <i | |
} | |
ScreenHi: | |
.for (var i=SCREEN;i<SCREEN+1000;i+=40) { | |
.byte >i | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//=========================================== | |
InitSound: | |
// | |
// Input: None | |
// Modifies: A | |
//=========================================== | |
// Voice 1 - High pitch for ball bounce off the wall | |
lda #$00 | |
sta $d400 | |
lda #$30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sound1On: pha | |
lda #%00010001 // Sawtooth, gate open | |
sta $d404 // Voice 1 | |
lda #Sound1Duration | |
sta Sound1Counter | |
pla | |
rts | |
Sound1Off: pha | |
lda #%00010000 // Sawtooth, gate close |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//=========================================== | |
CheckSound: | |
// | |
// Input: None | |
// Modifies: A | |
//=========================================== | |
// Check sound 1 | |
lda Sound1Counter | |
beq s2 | |
dec Sound1Counter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hardware locations | |
.label SCREEN = $0400 // Start of Default Screen | |
.label COLOR = $D800 // Color Memory Location | |
.label RASTER = $D012 // VIC Raster counter | |
// CIA addresses | |
.label GAMEPORT1 = $dc01 | |
.label GAMEPORT2 = $dc00 | |
// Custom constants |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FrameCount: .byte 0 | |
BallX: .byte 20 | |
SpeedX: .byte 0 | |
BallY: .byte 12 | |
SpeedY: .byte 0 | |
Background: .byte 117 | |
P1Y: .byte 0 | |
P2Y: .byte 0 | |
P1Score: .byte 0 |
OlderNewer