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
10 REM ===== FALL DEMO ===== | |
20 VPOKE 1,$F9C3,%10111111: REM WAVEFORM=SAW | |
30 VPOKE 1,$F9C2,%11111111: REM LEFT AND RIGHT CHANNEL ON AT MAX VOLUME | |
40 FOR N=2000 TO 500 STEP -10 | |
50 VPOKE 1,$F9C1,INT(N/256): REM SET HIGH BYTE OF FREQUENCY | |
60 VPOKE 1,$F9C0,N AND 255: REM SET LOW BYTE OF FREQUENCY | |
70 FOR I=1 TO 100:NEXT I: REM DELAY | |
80 NEXT N | |
90 VPOKE 1,$F9C2,0: REM VOLUME TO 0, TURN IT OFF |
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
10 REM ===== BEEP DEMO ===== | |
20 VPOKE 1,$F9C3,%00111111: REM WAVEFORM=PULSE WIDTH=MAXIMUM | |
30 VPOKE 1,$F9C2,%11111111: REM LEFT AND RIGHT CHANNEL ON AT MAX VOLUME | |
50 VPOKE 1,$F9C1,2: REM SET HIGH BYTE OF FREQUENCY | |
60 VPOKE 1,$F9C0,200: REM SET LOW BYTE OF FREQUENCY | |
70 FOR I=1 TO 1000:NEXT I: REM DELAY | |
80 VPOKE 1,$F9C2,0: REM VOLUME TO 0, TURN IT OFF |
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
10 OPEN 1,8,2:CLOSE 1 | |
20 DRIVE=ST | |
40 DIM HN$(10),HS(10) | |
50 GOSUB 4000 | |
60 CLS | |
70 PRINT "MENU":PRINT | |
80 PRINT "1. PRINT HIGH SCORES" | |
90 PRINT "2. LOAD HIGH SCORES" | |
100 PRINT "3. SAVE HIGH SCORES" | |
110 PRINT "4. ADD SCORE" |
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
;************************************************************************* | |
; VSYNC Handler - Game tick, process padles and move ball | |
;************************************************************************* | |
VSYNCHandler: | |
jsr updatePaddles | |
lda DirectionX | |
bmi goingLeft |
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
RCollision: | |
lda #$D0 ; Put ball out of collision | |
sta BallX | |
lda #$12 | |
sta BallX+1 | |
isRMoving: | |
lda RMoving | |
bne RPMov |
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
;****************************************************************************** | |
; NEW GAME LOOP | |
;****************************************************************************** | |
NewGame: | |
lda #<BALLX ; Reset Ball position | |
sta BallX | |
lda #>BALLX | |
sta BallX+1 | |
lda #<BALLY | |
sta BallY |
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
irq_exit: | |
pla | |
sta $9F25 ; Restore VERA registers | |
pla | |
sta $9F22 | |
pla | |
sta $9F21 | |
pla | |
sta $9F20 |
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
IRQHandler: | |
pha ; Save CPU Regsiters | |
phx | |
phy | |
lda $9F20 ; Save VERA registers | |
pha | |
lda $9F21 | |
pha | |
lda $9F22 |
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
;****************************************************************************** | |
; Configure Sprites 1:Ball, 2:Left Paddle, 3:Right Paddle | |
; Inputs: none | |
;****************************************************************************** | |
ConfigureSprites: | |
VERA_SET_ADDR $1FC08, 1 ; SPRITE 1 - Ball | |
lda #$00 | |
sta VERA_DATA0 ; Address 12:5 | |
lda #$88 | |
sta VERA_DATA0 ; Mode + Address 16:13 |
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
; Assembly Demo of Sprite Setup | |
; System: Commander X16 | |
; Version: Emulator R38 - R43 | |
; Author: Dusan Strakl | |
; Date: December 2020 | |
; Compiler: CC65 | |
; Build using: cl65 -t cx16 Sprite1.asm -o SPRITE1.PRG | |
.org $080D |