;------------------------------------- ; VSLT INTRO ; Vertical Scroller with Lame Tech ; ; coded in 1999 by TXW ;------------------------------------- ; ; things are as usual: ; ; logofont: $0800 ; logoscreen: $6000 ; music: $1000 ; sprites: $0b00 ; jsr init sei mainloop lda #$10 l1 cmp $d012 bne l1 jsr movsprt lo2 lda $d011 and #$f0 ora #$00 sta $d011 lda $d016 and #$f0 ora #$00 sta $d016 jsr vcopy dec switch bpl l4 jsr sincyc l4 lda #$69 l2 cmp $d012 bne l2 jsr vscrl lda #$ff l3 cmp $d012 bne l3 lda #$10 sta $d016 lda #$13 sta $d018 jsr $1003 ;music cli ;exit, if space jsr $ffe4 ;pressed. cmp #$20 beq exitme sei jmp mainloop exitme brk ;----------SUBROUTINES---- vcopy dec scrloffs ;COPY dec scrloffs bmi vcc rts vcc lda #$07 sta scrloffs ldx #$00 vc1 lda from+1,x ;LO-BYTE sta $06 lda from,x ;HI-BYTE sta $07 lda to+1,x sta $08 lda to,x sta $09 ldy #$0d vc2 lda ($06),y sta ($08),y dey bpl vc2 inx inx cpx #$24 ;o=1c bmi vc1 ldy #$00 lda ($0a),y tay lda charadr,y sta $02 lda charadr+1,y sta $03 ldy chrrow lda ($02),y ldy #$00 tax h1 txa and chrmask,y bne h2 lda #$20 sta ($0c),y iny sta ($0c),y iny cpy #$10 bpl he jmp h1 h2 lda #$00 sta ($0c),y iny sta ($0c),y iny cpy #$10 bpl he jmp h1 he inc chrrow lda chrrow cmp #$08 bne vcx lda #$00 sta chrrow inc $0a bne h4 inc $0b h4 ldy #$00 lda ($0a),y cmp #$ff bne vcx lda #scrtxt sta $0b vcx rts vscrl lda $d011 and #$f0 ora scrloffs sta $d011 lda $d018 and #$f0 adc #$0b sta $d018 ldy #$00 lda $d016 and #$f0 ora offs18,y ldx #$6e vs3 cpx $d012 bne vs3 vs1 ldx $d012 vs0 cpx $d012 beq vs0 sta $d016 iny lda $d016 and #$f0 ora offs18,y cpy #$7d bmi vs1 rts sincyc ldy #$7c ldx offs18,y sin1 lda offs18-1,y sta offs18,y dey bne sin1 stx offs18 lda #$01 sta switch rts ;--------------------------------------- init lda #$00 sta $d020 sta $d021 lda $dc0e ;disable keyscan irq and #$fe sta $dc0e lda $01 and #$fb sta $01 lda #$00 sta $06 sta $08 lda #$d0 sta $07 lda #$30 sta $09 ldy #$00 i1 lda ($06),y sta ($08),y inc $06 inc $08 bne i1 inc $07 inc $09 lda $09 cmp #$32 bne i1 lda $01 ora #$04 sta $01 lda $dc0e ora #$01 sta $dc0e lda #$ff ldy #$00 ldx #$00 i2 sta $3000,x inx cpx #$08 bne i2 lda #scrtxt sta $0b lda #$07 sta $0d lda #$cb sta $0c lda #$00 ldy #$3e i9 sta $0380,y dey bpl i9 lda #$ff ldy #$24 ia sta $039a,y dey bpl ia lda #$0e sta $07f8 sta $07f9 sta $07fa lda #$2c ;init sprites sta $07fb lda #$2d sta $07fc lda #$2e sta $07fd lda #$2f sta $07fe lda #$e5 sta $d007 sta $d009 sta $d00b sta $d00d lda #$88 sta $d006 lda #$a0 sta $d008 lda #$b8 sta $d00a lda #$d0 sta $d00c lda #$78 sta $d01c lda #$00 sta $d025 lda #$06 sta $d026 lda #$7f sta $d015 lda #$00 ;colors sta $d027 sta $d028 sta $d029 lda #$07 ;xpand sta $d01d lda #$70 ;position sta $d000 lda #$5b sta $d001 sta $d003 sta $d005 lda #$a0 sta $d002 lda #$d0 sta $d004 ; copy the logo into screenmem ldy #$00 tya sta $08 lda #$28 sta $0e lda #$60 sta $09 lda #$04 sta $0f cp1 lda ($08),y sta ($0e),y iny cpy #$ef bne cp1 lda #$0e ldy #$00 cp2 sta $d828,y iny cpy #$ef bne cp2 lda #$02 ldy #$00 cp3 sta $d925,y iny bne cp3 lda #$02 cp4 sta $da24,y iny bne cp4 lda #$02 cp5 sta $db23,y iny cpy #$b9 bne cp5 lda #$0e sta $d022 lda #$0b sta $d023 lda #$00 ;init music jsr $1000 rts movsprt inc scount bne mse lda sflag bne ms1 lda #$2c sta $07fb lda #$2d sta $07fc lda #$2e sta $07fd lda #$2f sta $07fe inc $d007 inc $d009 inc $d00b inc $d00d inc sflag jmp mse ms1 lda #$30 sta $07fb lda #$31 sta $07fc lda #$32 sta $07fd lda #$33 sta $07fe dec $d007 dec $d009 dec $d00b dec $d00d dec sflag mse rts ;----------DATA----------- switch .byte $01 scrloffs .byte $08 chrrow .byte $00 xoffs .byte $00 sflag .byte $01 scount .byte $00 from .byte $05,$4d,$05,$75,$05,$9d from2 .byte $05,$c5,$05,$ed,$06,$15 .byte $06,$3d,$06,$65,$06,$8d .byte $06,$b5,$06,$dd,$07,$05 .byte $07,$2d,$07,$55,$07,$7d .byte $07,$a5,$07,$cd to .byte $05,$25,$05,$4d,$05,$75 to2 .byte $05,$9d,$05,$c5,$05,$ed .byte $06,$15,$06,$3d,$06,$65 .byte $06,$8d,$06,$b5,$06,$dd .byte $07,$05,$07,$2d,$07,$55 .byte $07,$7d,$07,$a5 chrmask .byte $80,$80,$40,$40,$20,$20 .byte $10,$10,$08,$08,$04,$04 .byte $02,$02,$01,$01 charadr .byte $00,$30,$08,$30,$10,$30 .byte $18,$30,$20,$30,$28,$30 .byte $30,$30,$38,$30,$40,$30 .byte $48,$30,$50,$30,$58,$30 .byte $60,$30,$68,$30,$70,$30 .byte $78,$30,$80,$30,$88,$30 .byte $90,$30,$98,$30,$a0,$30 .byte $a8,$30,$b0,$30,$b8,$30 .byte $c0,$30,$c8,$30,$d0,$30 .byte $d8,$30,$e0,$30,$e8,$30 .byte $f0,$30,$f8,$30,$00,$31 .byte $08,$31,$10,$31,$18,$31 .byte $20,$31,$28,$31,$30,$31 .byte $38,$31,$40,$31,$48,$31 .byte $50,$31,$58,$31,$60,$31 .byte $68,$31,$70,$31,$78,$31 .byte $80,$31,$88,$31,$90,$31 .byte $98,$31,$a0,$31,$a8,$31 .byte $b0,$31,$b8,$31,$c0,$31 .byte $c8,$31,$d0,$31,$d8,$31 .byte $e0,$31,$e8,$31,$f0,$31 .byte $f8,$31 offs18 .byte $00,$00,$01,$01,$02,$03 .byte $04,$05,$05,$06,$06,$07 .byte $07,$06,$06,$05,$05,$04 .byte $03,$02,$01,$01,$00,$00 .byte $01,$01,$02,$03,$04,$05 .byte $05,$06,$06,$07,$07,$07 .byte $07,$06,$06,$06,$06,$05 .byte $05,$05,$05,$04,$04,$03 .byte $03,$02,$02,$01,$01,$01 .byte $01,$00,$00,$00,$00,$00 .byte $00,$00,$01,$02,$03,$03 .byte $04,$04,$05,$05,$06,$06 .byte $06,$06,$05,$05,$05,$05 .byte $04,$04,$03,$03,$02,$02 .byte $01,$01,$01,$00,$00,$00 .byte $01,$01,$02,$03,$04,$05 .byte $05,$06,$06,$07,$07,$06 .byte $06,$05,$04,$03,$02,$01 .byte $01,$02,$03,$04,$05,$06 .byte $06,$07,$07,$06,$06,$05 .byte $05,$04,$03,$02,$01 scrtxt .byte $40,$40,$40,$40,$40,$40 .byte $28,$30,$2e,$40,$12,$1c .byte $40,$62,$72,$72,$72,$40 .byte $20,$24,$0a,$26,$0a,$1c .byte $28,$26,$40,$02,$40,$2c .byte $26,$18,$28,$40,$12,$1c .byte $28,$24,$1e,$40,$40,$40 .byte $2c,$26,$18,$28,$40,$26 .byte $28,$02,$1c,$08,$26,$40 .byte $0c,$1e,$24,$40,$2c,$0a .byte $24,$28,$12,$06,$02,$18 .byte $40,$26,$06,$24,$1e,$18 .byte $18,$0a,$24,$40,$2e,$12 .byte $28,$10,$40,$18,$02,$1a .byte $0a,$40,$28,$0a,$06,$10 .byte $40,$40,$40,$40,$0e,$24 .byte $0a,$0a,$28,$12,$1c,$0e .byte $26,$40,$0c,$18,$32,$40 .byte $28,$1e,$40,$40,$40,$40 .byte $26,$20,$02,$06,$32,$0e .byte $40,$40,$28,$10,$0a,$40 .byte $0e,$1c,$1e,$1a,$0a,$40 .byte $40,$1a,$02,$08,$40,$40 .byte $2e,$24,$0a,$06,$16,$12 .byte $1c,$0e,$40,$04,$02,$18 .byte $18,$40,$66,$64,$40,$40 .byte $04,$0a,$1c,$14,$02,$1a .byte $12,$1c,$40,$40,$40,$40 .byte $20,$18,$0a,$02 .byte $26,$0a,$40 .byte $24,$0a,$02,$08,$40,$28 .byte $10,$0a,$40,$1c,$1e,$28 .byte $0a,$40,$0c,$1e,$24,$40 .byte $1a,$1e,$24,$0a,$40,$12 .byte $1c,$0c,$1e,$40,$02,$04 .byte $1e,$2a,$28,$40,$28,$1e .byte $30,$12,$06,$40,$2e,$02 .byte $26,$28,$0a,$40,$40,$40 .byte $ff