!to "scroll.prg",cbm ; Basicstart TEDGraph1 = $FF06 ; $FF06: TED Graphic-Register 1 TEDGraph2 = $FF07 ; $FF07: TED Graphic-Register 2 TEDKLatch = $FF08 ; $FF08: TED Keyboard Latch TEDIRQ = $FF09 ; $FF09: TED IRQ Status Register TEDIRQM = $FF0A ; $FF0A: TED IRQ Mask Register TEDIRQR = $FF0B ; $FF0B: TED Raster IRQ Register TEDCUR_H = $FF0C ; $FF0C: TED Cursor H TEDCUR_L = $FF0D ; $FF0D: TED Cursor L TEDSND1 = $FF0E ; $FF0E: TED Sound Voice #1 L TEDSND2 = $FF0F ; $FF0F: TED Sound Voice #2 L TEDSND2H = $FF10 ; $FF10: TED Sound Voice #2 H TEDSND = $FF11 ; $FF11: TED Sound Volume,on/off,Wave,D/A TEDREG = $FF12 ; $FF12: TED Register TEDREGA = $FF13 ; $FF13: TED Register TEDVRAM = $FF14 ; $FF14: TED Video-RAM TEDBACK = $FF15 ; $FF15: Background-Color TEDCOL1 = $FF16 ; $FF16: TED Color 1 TEDCOL2 = $FF17 ; $FF17: TED Color 2 TEDCOL3 = $FF18 ; $FF18: TED Color 3 TEDBORDER = $FF19 ; $FF19: TED BORDER TEDCHARH = $FF1A ; $FF1A: TED Char Position H TEDRASTH = $FF1C ; $FF1C: TED Rasterline H TEDRASTL = $FF1D ; $FF1D: TED Rasterline L TEDRASTC = $FF1E ; $FF1E: TED Rastercolumn TEDRASTV = $FF1F ; $FF1F: TED Raster vertical TEDROM = $FF3E ; $FF3E: TED ROM ON TEDRAM = $FF3F *= $1000 !byte $00,$0c,$10,$0a,$00,$9e,$34,$31,$30,$39,$00,$00,$00 ; main *=$100d ;-------------------------------------------------- ; Commodore 16 Scroll + Color-Washer ;-------------------------------------------------- screen=$0d90 get =$ffe4 colram =$0990 coldstart = $f2a4 ldx #$00 ldy #$00 sei - jsr wait lda luma,x jsr raster sta TEDBORDER and #$%11110001 ora #$01 jsr raster sta TEDBACK inx cpx #$09 bne - lda luma,x jsr raster sta TEDBACK jsr start raster: pha - lda TEDRASTL cmp #$ff bne - pla rts wait: txa pha ldx #$00 -- ldy #$00 - iny bne - inx cpx #$30 bne -- pla tax rts start: sei ldx #$ff txs lda #$93 jsr $ffd2 lda #$ff sta $ff00 sta $ff01 sta $0a sta $0b lda #$00 sta $0c sta TEDBACK sta TEDBORDER sta TEDGraph2 tax lda #%01111111 - sta $0990,x inx cpx #$28 bne - lda #scroller sta $0315 cli jmp* scroller: lda #$7f sta $fd30 sta $ff08 lda $ff08 cmp #$ef ; space to end beq exit - lda TEDRASTL cmp #$00 bne - dec $0a lda $0a and #$07 sta $0a sta $ff07 cmp #$07 bne skip_hardscroll ldx txtpos inc txtpos lda text,x cmp #$00 ; at $00 repeat bne + ldx #00 stx txtpos beq scroller + sta screen+39 scroll: ldx #$00 ; hardscroll -- lda screen+1,x sta screen,x inx cpx #40 bne -- jsr col_washer skip_hardscroll: pla tay pla tax pla rti exit: jmp coldstart col_washer: ldx #$27 - lda colors,x sta colram,x dex bpl - ldy colors+39 ldx #$27 - lda colors-1,X sta colors,X dex bne - sty colors rts txtpos !by $00 text: !scr " a tiny commodore c16 text scroll with green washing in luma stages. if you get" !scr " bored about this text, press space to end ..... this is only a short demonstra" !scr "tion for testing several ted registers. " !by $00 colors: !by $4c,$4c,$4c,$4c,$4c,$4c,$4c,$4c !by $4c,$4c,$4c,$4c,$5c,$5c,$7c,$7c !by $7c,$7c,$7c,$7c,$7c,$7c,$7c,$7c !by $7c,$7c,$5c,$5c,$4c,$4c,$4c,$4c !by $4c,$4c,$4c,$4c,$4c,$4c,$4c,$4c luma: !by $ee,$ee,$de,$ce,$be,$ae,$9e,$8e,$00,$00
Letzte Änderung: 2019-01-03 11:16:54