home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1993 July
/
64er_Magazin_93-07_1993_Markt__Technik_de_Side_A.d64
/
dyspscroll.ascii
< prev
next >
Wrap
Text File
|
2022-10-26
|
9KB
|
354 lines
;---------------------------------------
; ...sideborder dysp scroll...
; ------------------------
; by tilman linden
;(w) 1993 for 64'er
;---------------------------------------
;*sprite charset at $2000
; ysinus at $35d0,256 values $33-$6e
; scrolltext at $36d0,codes $00-$3f
;---------------------------------------
.setpc $3030
+tabd015 =$3300
+ysin =$35d0
+edelay =$32b0
+tabd011 =$3260
+xcount =$325f
+ycount =$325e
+scountlo =$325d
+scounthi =$325c
+mem =2
+text =$36d0
;---------------------------------------
ldx #0
+loop txa
and #7
clc
adc #$1e
ora #$18 ;erstellen
and #$1f ;der tabelle
sta tabd011,x ;fuer $d011
lda #$d8 ;verzoegerung
sta edelay,x ;vorbereiten
inx
cpx #80
bne loop
ldx #0
txa
sta tabd015,x
inx
bne *-4
lda #01
sta tabd015+128,x
inx
cpx #21
bne *-6
lda #255
sta $d01c
sta $d015
ldx #7
lda #15
sta $d027,x ;farben setzen
lda #160
sta $07f8,x
dex
bpl *-11
lda #10
sta $d025
lda #2
sta $d026
lda #<text
sta scountlo
lda #>text
sta scounthi
sei ;interrupt...
lda #<irq
sta $0314
lda #>irq
sta $0315
lda #127
sta $dc0d
lda #1
sta $d01a
lda #$2d ;...ab raster-
sta $d012 ;zeile $2d
lda #$1b ;starten
sta $d011
ldx #0
stx $d020
stx $d021
stx $3fff
cli
rts
;---------------------------------------
+irq lsr $fff0
nop
nop
nop
nop
nop
nop
nop
lda $d012 ;rasterflimmern
cmp #$2d
beq *+2
ldx #10
dex
bne *-1
bit 0 ;verhindern
lda $d012
cmp #$2e
beq *+2
ldx #10
dex
bne *-1
and 0,x
lda $d012
cmp #$2f
beq *+2
ldx #10
dex
bne *-1
bit 0
lda $d012
cmp #$30
beq *+2
asl $fff0 ;genaue...
ldx #12
dex
bne *-1
ldx #7
ldx #7 ;startposition
dex
bne *-1
asl $fff0 ;timen
;---------------------------------------
ldy #0
lda #$1d
sta $d011
bit $eaea
bit $eaea
bit $eaea
bit $2424
+ger nop ;verzoegerung
nop ;gerade
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
lda edelay,y ;verzoegerung
sta timing+1 ;durch sprites
lda tabd011,y ;ausgleichen,
dec $d016 ;rahmen aus,
sta $d011 ;keine 8.rz
lda #$c8
sta $d016
bit 0
+end iny
cpy #$50 ;80 zeilen
+timing bne *
jmp move
;---------------------------------------
+unger nop ;verzoegerung
nop ;ungerade
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
lda edelay,y
sta timing+1,x ;=> 1 tz mehr
lda tabd011,y
dec $d016 ;rahmen aus
sta $d011
lda #$c8
sta $d016
jmp end ;naechste rz
;---------------------------------------
+move inc xcount ;sinuszaehler
inc ycount ;veraendern
lda xcount
cmp #13 ;neues zeichen?
bne sprites
lda #0 ;ja,dann xcount
sta xcount ;auf 0,
lda ycount ;ycount neu ...
clc
adc #248
sta ycount ;setzen
ldx #0
lda $07f9,x
sta $07f8,x
inx
cpx #7
bne *-9
+newchar ldy scountlo ;naechstes ...
lda #0
sta mem
lda scounthi ;zeichen des...
sta mem+1
lda (mem),y ;scrolltextes.
cmp #255 ;textende?
bne nextchar
lda #<text ;ja, dann neu-
sta scountlo ;start des
lda #>text ;textes
sta scounthi
jmp newchar
+nextchar clc
adc #128
sta $07ff
inc scountlo
bne *+5
inc scounthi
+sprites lda xcount ;sinuszaehler
sta mem
lda ycount ;sichern
sta mem+1
ldy #14
+nextspr ldx mem+1 ;y-positionen
lda ysin,x
sta $d001,y
ldx mem ;x-positionen
lda xtab,x
sta $d000,y
lda $d010 ;msb der ...
asl
ora msbtab,x ;x-positionen
sta $d010
lda mem
clc
adc #13
sta mem ;x-abstand=13
lda mem+1
clc
adc #8
sta mem+1 ;y-abstand=8
dey
dey
bpl nextspr
;---------------------------------------
;>hier beginnt die routine zum ermitteln
; der verzoegerungen durch die sprites
;---------------------------------------
lda #<tabd015+$61
sta mem
lda #>tabd015
sta mem+1
ldx #0
+nextrl ldy $d00f
lda (mem),y
asl ;berechnet
ldy $d00d
ora (mem),y ;die anzahl
asl
ldy $d00b ;der einge-
ora (mem),y
asl ;schalteten
ldy $d009
ora (mem),y ;sprites fuer
asl
ldy $d007 ;jede einzelne
ora (mem),y
asl ;rasterzeile
ldy $d005
ora (mem),y ;und ...
asl
ldy $d003
ora (mem),y
asl
ldy $d001
ora (mem),y
tay ;...speichert
lda delay,y ;die enstspr.
sta edelay,x ;verzoegerung
dec mem ;naechste rz
inx
cpx #$50
bne nextrl
;---------------------------------------
inc $d019
jmp $ea31
;---------------------------------------
.setpc $3400
;-----------------------------
;-tabelle fuer verzoegerungen-
;-----------------------------
+delay
.byte ($d8,$da,$db,$db,$db,$dc,$dc,$dc)
.byte ($db,$07,$dd,$dd,$dc,$dd,$dd,$dd)
.byte ($db,$dc,$08,$08,$dd,$de,$de,$de)
.byte ($dc,$08,$de,$de,$dd,$de,$de,$de)
.byte ($db,$07,$dd,$dd,$dd,$09,$09,$09)
.byte ($dd,$09,$df,$df,$de,$df,$df,$df)
.byte ($dc,$dd,$09,$09,$de,$df,$df,$df)
.byte ($dd,$09,$df,$df,$de,$df,$df,$df)
.byte ($db,$07,$08,$08,$08,$de,$de,$de)
.byte ($08,$df,$0a,$0a,$de,$0a,$0a,$0a)
.byte ($dd,$de,$0a,$0a,$df,$e0,$e0,$e0)
.byte ($de,$0a,$e0,$e0,$df,$e0,$e0,$e0)
.byte ($dc,$08,$de,$de,$de,$0a,$0a,$0a)
.byte ($de,$0a,$e0,$e0,$df,$e0,$e0,$e0)
.byte ($dd,$de,$0a,$0a,$df,$e0,$e0,$e0)
.byte ($de,$0a,$e0,$e0,$df,$e0,$e0,$e0)
.byte ($db,$dc,$08,$08,$08,$09,$09,$09)
.byte ($08,$df,$df,$df,$09,$df,$df,$df)
.byte ($08,$09,$e0,$e0,$df,$0b,$0b,$0b)
.byte ($09,$e0,$0b,$0b,$df,$0b,$0b,$0b)
.byte ($dd,$09,$df,$df,$df,$0b,$0b,$0b)
.byte ($df,$0b,$e1,$e1,$e0,$e1,$e1,$e1)
.byte ($de,$df,$0b,$0b,$e0,$e1,$e1,$e1)
.byte ($df,$0b,$e1,$e1,$e0,$e1,$e1,$e1)
.byte ($dc,$08,$09,$09,$09,$df,$df,$df)
.byte ($09,$e0,$0b,$0b,$df,$0b,$0b,$0b)
.byte ($de,$df,$0b,$0b,$e0,$e1,$e1,$e1)
.byte ($df,$0b,$e1,$e1,$e0,$e1,$e1,$e1)
.byte ($dd,$09,$df,$df,$df,$0b,$0b,$0b)
.byte ($df,$0b,$e1,$e1,$e0,$e1,$e1,$e1)
.byte ($de,$df,$0b,$0b,$e0,$e1,$e1,$e1)
.byte ($df,$0b,$e1,$e1,$e0,$e1,$e1,$e1)
;----------------------------
;-tabelle fuer x-koordinaten-
;----------------------------
+xtab
.byte ($7b,$77,$73,$6f,$6b,$67,$63,$5f)
.byte ($5b,$57,$53,$4f,$4b,$47,$43,$3f)
.byte ($3b,$37,$33,$2f,$2b,$27,$23,$1f)
.byte ($1b,$17,$13,$0f,$0b,$07,$03,$ff)
.byte ($fb,$f7,$f3,$ef,$eb,$e7,$e3,$df)
.byte ($db,$d7,$d3,$cf,$cb,$c7,$c3,$bf)
.byte ($bb,$b7,$b3,$af,$ab,$a7,$a3,$9f)
.byte ($9b,$97,$93,$8f,$8b,$87,$83,$7f)
.byte ($7b,$77,$73,$6f,$6b,$67,$63,$5f)
.byte ($5b,$57,$53,$4f,$4b,$47,$43,$3f)
.byte ($3b,$37,$33,$2f,$2b,$27,$23,$1f)
.byte ($1b,$17,$13,$0f,$0b,$07,$03,$f7)
.byte ($f3,$ef,$eb,$e7,$e3,$df,$d7,$d7)
+msbtab
.byte ($01,$01,$01,$01,$01,$01,$01,$01)
.byte ($01,$01,$01,$01,$01,$01,$01,$01)
.byte ($01,$01,$01,$01,$01,$01,$01,$01)
.byte ($01,$01,$01,$01,$01,$01,$01,$00)
.byte ($00,$00,$00,$00,$00,$00,$00,$00)
.byte ($00,$00,$00,$00,$00,$00,$00,$00)
.byte ($00,$00,$00,$00,$00,$00,$00,$00)
.byte ($00,$00,$00,$00,$00,$00,$00,$00)
.byte ($00,$00,$00,$00,$00,$00,$00,$00)
.byte ($00,$00,$00,$00,$00,$00,$00,$00)
.byte ($00,$00,$00,$00,$00,$00,$00,$00)
.byte ($00,$00,$00,$00,$00,$00,$00,$01)
.byte ($01,$01,$01,$01,$01,$01,$01,$01)