|
Post by VDC 8x2 on Jun 25, 2014 18:00:00 GMT
What is version 1 doing? skipping and jerkiness?
have you tested version 2.0?
|
|
|
Post by VDC 8x2 on Jun 24, 2014 20:39:40 GMT
Anyone remember what trickery you had to do to get 8x1 color mode on the vdc?
|
|
|
Post by VDC 8x2 on Jun 24, 2014 1:54:49 GMT
The source code of version 2.0:
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 24, 2014 1:44:04 GMT
Thanks for the testing. I would like to hear how it runs on the real hardware.
|
|
|
Post by VDC 8x2 on Jun 23, 2014 19:46:52 GMT
Version 2.0 of the scrolling demo. I have tested it on my version of vice with version 2 of vdc. Changes in version 2.0: color and support for attributes underline, blink, reverse and charset bits. The format for the new part is byte $fe, then a byte with the attribute/color info. byte $fe,$2e text 'underline color light grey'
Please test the smooth scroll to see if it is working on your version. The start address is at $1300. Attachments:scroll2.prg (311 B)
|
|
|
Post by VDC 8x2 on Jun 23, 2014 14:58:05 GMT
If geos has a device driver made for it, It should work
|
|
|
Post by VDC 8x2 on Jun 23, 2014 5:27:05 GMT
What version of vice you running?
my vice setting says version 2 of the vdc
|
|
|
Post by VDC 8x2 on Jun 22, 2014 16:13:58 GMT
|
|
|
Post by VDC 8x2 on Jun 21, 2014 18:23:06 GMT
A scrolling text Demo I whipped up.
VDCADR = $D600 VDCDAT = $D601 txtptr = $a9 smooth = $ab
defm WaitVDC bit $d600 bpl *-3 endm
*=$1300 start lda #$07 sta smooth lda #$18 sta vdcadr lda vdcdat 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 lda #$19 sta vdcadr lda vdcdat 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 ldx #$20 stx vdcadr lda #$00 ;high byte source sta vdcdat inx stx vdcadr lda #$01 ;low byte source sta vdcdat ldx #$12 stx vdcadr WaitVDC ;wait for ready bit lda #$00 ;high byte destination sta vdcdat inx stx vdcadr lda #$00 ;low byte destination sta vdcdat ;target adress lda #$1e sta vdcadr lda #$4f ;copy 79 bytes sta vdcdat ldy #$00 ;we can continue with non VDC code. rock on cpu! lol lda (txtptr),y cmp #$ff beq zp0 inc txtptr bne @skip inc txtptr+1 @skip ldx #$1f stx vdcadr WaitVDC ;wait for vdc to be ready sta vdcdat ;put in next letter rts
zp0 lda #<scrolltxt sta txtptr lda #>scrolltxt sta txtptr+1 WaitVDC rts scrolltxt text 'this is a test of the scrolling demo.....' byte $ff
The text is moved via the VDC copy command. A nice side effect is when the copy is done, the vdc address regs are right were we need them. so just put in our next letter.
The code polls the vblank bit to make sure the scroll only happens during a vblank.
Any ideas or suguestions?
|
|
|
Post by VDC 8x2 on Jun 21, 2014 17:53:33 GMT
The V commands are a good idea!
It would make it so much easier to work with the vdc from basic.
|
|