|
Post by VDC 8x2 on Jun 29, 2014 5:37:34 GMT
could it be that the copy is happening too fast for the eye. there by giving jerkiness?
|
|
|
Post by VDC 8x2 on Jun 29, 2014 5:18:57 GMT
would slowing down the scroll make it less jerky?
edit: I thought of another question: What if you modify the ram refresh reg to min? is it still jerky?
|
|
|
Post by VDC 8x2 on Jun 29, 2014 3:30:49 GMT
version 2.5 loads like a basic program now. VDCADR = $d600 VDCDAT = $D601 TxtPtr = $a9 ClrPtr = $96 smooth = $ab color = $a8
defm poke lda #/2 sta /1 endm
defm WaitVDC bit $d600 bpl *-3 endm
*=$1c01 Byte $11,$1c,$de,$07,$de,$9c,$3a byte $fe,$25,$3a,$9e,$37,$31,$38,$37 bytes $00*3 ;2014 graphicclr:fast:sys7187 in basic Start Poke smooth, $07 poke color, $08 ldx #$18 jsr VdcPeekReg ora #$80 ;set copy bit sta VDCDAT jsr zp0 ;set up pointers
MainLoop lda #$20 ;bit 5 we checking bit vdcadr ;wait for vblank beq *-3
sei ;don't want to be interupted jsr scroll ldx #$19 jsr VDCPEEKREG and #%11110000 ora smooth sta vdcdat ;scroll left cli ;done so release interupts
lda #$20 bit vdcadr bne *-3 ;wait for the start of the frame jmp MAINLOOP scroll lda smooth sec sbc #$01 ;$01 to $07. 7 the fastest bcc MoveText sta smooth rts
MoveText lda #$07 sta smooth ldy #$00 lda (txtptr),y cmp #$ff bne @nopeff jsr zp0 lda (txtptr),y @nopeff cmp #$fe bne @nopefe lda (clrptr),y sta color jsr incclrptr jsr inctxtptr lda (txtptr),y @nopefe jsr inctxtptr pha ldy #$20 ;reg pair lda #$00 ;high byte ldx #$01 ;low byte jsr vdcwordreg ldy #$12 lda #$00 ldx #$00 jsr vdcwordreg ldx #$1e lda #$4f ;copy 79 bytes jsr VdcPokeReg pla ldx #$1f jsr VDCPOKEREG ldy #$20 ;color source lda #$08 ldx #$01 jsr vdcwordreg ldy #$12 ;color destination lda #$08 ldx #$00 jsr vdcwordreg ldx #$1e ;copy 79 bytes lda #$4f jsr vdcpokereg ldx #$1f lda color jsr vdcpokereg rts
zp0 lda #<ScrollText sta TxtPtr lda #>Scrolltext sta TxtPtr+1 lda #<Colordata sta CLRPTR lda #>ColorData sta CLRPTR+1 rts
VdcPokeReg stx vdcadr waitvdc sta vdcdat rts
VdcPeekREG stx vdcadr ;.x reg and value returned in .a waitvdc lda vdcdat rts
VDCWordreg sty vdcadr ;a/x is high/low value y is high byte of reg pair waitvdc sta vdcdat iny sty vdcadr stx vdcdat rts
IncTxtPtr inc TXTPTR bne @end inc TXTPTR+1 @end rts
IncClrPtr inc clrptr bne @end inc clrptr+1 @end rts
ScrollText byte $fe text 'this is a test of ' byte $fe text 'the ' byte $fe text 'scrolling demo... ' byte $fe text 'flash ' byte $fe text 'underline ' byte $fe text 'reverse ' byte $fe text 'charSET ' byte $ff
ColorData byte $0f,$0d,$0c,$1c,$2c,$4a,$86 Attachments:colorscroll.prg (347 B)
|
|
|
Post by VDC 8x2 on Jun 29, 2014 3:28:43 GMT
Version 2.5. Hopefully this will clear up the jerkiness. The program now loads like a normal basic program. VDCADR = $d600 VDCDAT = $D601 TxtPtr = $a9 ClrPtr = $96 smooth = $ab color = $a8
defm poke lda #/2 sta /1 endm
defm WaitVDC bit $d600 bpl *-3 endm
*=$1c01 Byte $11,$1c,$de,$07,$de,$9c,$3a byte $fe,$25,$3a,$9e,$37,$31,$38,$37 bytes $00*3 ;2014 graphicclr:fast:sys7187 in basic Start Poke smooth, $07 poke color, $08 ldx #$18 jsr VdcPeekReg ora #$80 ;set copy bit sta VDCDAT jsr zp0 ;set up pointers
MainLoop lda #$20 ;bit 5 we checking bit vdcadr ;wait for vblank beq *-3
sei ;don't want to be interupted jsr scroll ldx #$19 jsr VDCPEEKREG and #%11110000 ora smooth sta vdcdat ;scroll left cli ;done so release interupts lda #$20
bit vdcadr bne *-3 ;wait for the start of the frame jmp MAINLOOP scroll lda smooth sec sbc #$01 ;$01 to $07. 407 the fastest bcc MoveText sta smooth rts
MoveText lda #$07 sta smooth ldy #$00 lda (txtptr),y cmp #$ff bne @nopeff jsr zp0 lda (txtptr),y @nopeff cmp #$fe bne @nopefe lda (clrptr),y sta color jsr incclrptr jsr inctxtptr lda (txtptr),y @nopefe jsr inctxtptr pha ldy #$20 ;reg pair lda #$00 ;high byte ldx #$01 ;low byte jsr vdcwordreg ldy #$12 lda #$00 ldx #$00 jsr vdcwordreg ldx #$1e lda #$4f ;copy 79 bytes jsr VdcPokeReg pla ldx #$1f jsr VDCPOKEREG ldy #$20 ;color source lda #$08 ldx #$01 jsr vdcwordreg ldy #$12 ;color destination lda #$08 ldx #$00 jsr vdcwordreg ldx #$1e ;copy 79 bytes lda #$4f jsr vdcpokereg ldx #$1f lda color jsr vdcpokereg rts
zp0 lda #<ScrollText sta TxtPtr lda #>Scrolltext sta TxtPtr+1 lda #<Colordata sta CLRPTR lda #>ColorData sta CLRPTR+1 rts
VdcPokeReg stx vdcadr waitvdc sta vdcdat rts
VdcPeekREG stx vdcadr ;.x reg and value returned in .a waitvdc lda vdcdat rts
VDCWordreg sty vdcadr ;a/x is high/low value y is high byte of reg pair waitvdc sta vdcdat iny sty vdcadr stx vdcdat rts
IncTxtPtr inc TXTPTR bne @end inc TXTPTR+1 @end rts
IncClrPtr inc clrptr bne @end inc clrptr+1 @end rts
ScrollText byte $fe text 'this is a test of ' byte $fe text 'the ' byte $fe text 'scrolling demo... ' byte $fe text 'flash ' byte $fe text 'underline ' byte $fe text 'reverse ' byte $fe text 'charSET ' byte $ff
ColorData byte $0f,$0d,$0c,$1c,$2c,$4a,$86 Attachments:colorscroll.prg (347 B)
|
|
|
Post by VDC 8x2 on Jun 28, 2014 21:53:45 GMT
*=$1c01 Byte $11,$1c,$de,$07,$de,$9c,$3a byte $fe,$25,$3a,$9e,$37,$31,$38,$37 bytes $00*3 ;2014 graphicclr:fast:sys7187 in basic
makes sure basic is at 1c00 and puts you into fast mode then sys to the program after the stub.
|
|
|
Post by VDC 8x2 on Jun 28, 2014 20:16:17 GMT
The 2.0 source code for you to check
VDCADR = $D600 VDCDAT = $D601 txtptr = $a9 smooth = $ab color = $a8
defm WaitVDC bit $d600 bpl *-3 endm
defm poke lda #/2 sta /1 endm
*=$1300 start poke smooth , $07 poke color , $0c ldx #$18 jsr vdcpeekreg ora #$80 ;set copy bit sta vdcdat jsr zp0 mainloop lda #$20 ;bit 5 we checking bit vdcadr ;waiting for vblank beq *-3 sei ;don't want to be interupted jsr scroll ldx #$19 jsr VdcPeekReg and #%11110000 ora smooth sta vdcdat ;scroll left cli ;done so release interupts lda #$20 bit vdcadr bne *-3 ;waiting for start of frame jmp mainloop
scroll lda smooth sec sbc #$01 ;$01 to $07 for scroll speed. $07 is the fastest bcc movetext sta smooth rts
movetext lda #$07 sta smooth ldy #$20 ;reg pair lda #$00 ;high byte source ldx #$01 ;low byte source jsr VDCWORDREG ldy #$12 ;reg pair lda #$00 ;high byte target ldx #$00 ;low byte jsr vdcwordreg ldx #$1e lda #$4f ;copy 79 bytes jsr vdcpokereg ldy #$00 ;we can continue with non VDC code. rock on cpu! lol lda (txtptr),y cmp #$ff bne @nopeff jsr zp0 lda (txtptr),y @nopeff cmp #$fe bne @nopefe jsr INCTXTPTR lda (txtptr),y sta color jsr inctxtptr lda (txtptr),y @nopefe jsr IncTxtPtr ldx #$1f jsr vdcpokereg ldy #$20 ;color source lda #$08 ldx #$01 jsr vdcwordreg ldy #$12 ;color destination lda #$08 ldx #$00 jsr vdcwordreg ldx #$1e ;copy 79 bytes lda #$4f jsr vdcpokereg ldx #$1f lda color jsr vdcpokereg rts
zp0 lda #<scrolltxt sta txtptr lda #>scrolltxt sta txtptr+1 rts
VdcPokeReg stx vdcadr waitvdc sta vdcdat rts
VdcPeekREG stx vdcadr ;.x reg and value returned in .a waitvdc lda vdcdat rts
VDCWordreg sty vdcadr ;a/x is high/low value y is high byte of reg pair waitvdc sta vdcdat iny sty vdcadr stx vdcdat rts
IncTxtPtr inc txtptr bne @end inc txtptr+1 @end rts
scrolltxt byte $fe,$0f text 'this is a test of ' byte $fe,$0d text 'the ' byte $fe,$0c text 'scrolling demo.....' byte $fe,$1c text 'flash ' byte $fe,$2c text 'underline' byte $fe,%01001010 text 'reverse' byte $fe,%10000110 text 'charSET ' byte $ff
|
|
|
Post by VDC 8x2 on Jun 28, 2014 17:02:56 GMT
I just checked. It is in demoscene section.
|
|
|
Post by VDC 8x2 on Jun 28, 2014 16:34:51 GMT
I didn't delete the thread. where did it go? hm reposting the attachment. Working on a 2.5 version. I will post that later with prg and source. Attachments:colorscroll.prg (305 B)
|
|
|
Post by VDC 8x2 on Jun 28, 2014 3:37:31 GMT
It sounds like they did it quick and dirty when making dload.
|
|
|
Hello
Jun 26, 2014 2:28:29 GMT
Post by VDC 8x2 on Jun 26, 2014 2:28:29 GMT
Hello and welcome aboard!
|
|