Shop OBEX P1 Docs P2 Docs Learn Events
P2 VGA Text driver — Parallax Forums

P2 VGA Text driver

ozpropdevozpropdev Posts: 2,791
edited 2014-03-24 04:34 in Propeller 2
Hi All
Here's a VGA text driver that I have been playing with.
Its VGA 800x600 with a 16x32 font (50x18 characters in 16 colors) :)

Cheers
Brian
1024 x 613 - 126K

Comments

  • cgraceycgracey Posts: 14,133
    edited 2014-02-15 04:35
    Neat! It looks like you've got the CLU_xxxx modes working.
  • ozpropdevozpropdev Posts: 2,791
    edited 2014-02-15 04:53
    cgracey wrote: »
    Neat! It looks like you've got the CLU_xxxx modes working.

    I ended up doing a bit of dynamic shuffling of color data in aux to get the result I wanted.
    When we have 200MHz, there should be enough cycles to use CLU4_RGB24 or even CLU8_RGB24 mode. :)
    Cheers
    Brian
  • ozpropdevozpropdev Posts: 2,791
    edited 2014-02-15 17:53
    Hi All

    I forgot to mention that the driver can easily support 50x37 characters as well.
    To achieve the 16x16 font I "cheated" and use every second font line of the 16x32 font.
    I doesn't look too bad. :)

    If anyone has time to create a 16x16 font this could be enhanced.
    This would also reduce the size of the font table from 16K to 8K!

    Cheers
    Brian
  • ozpropdevozpropdev Posts: 2,791
    edited 2014-02-15 19:10
    For DE0-Nano users with current FPGA code.

    Because the current Nano update does not support MUL32,GETMULL the following code changes are required.

    Comment out the MUL32 and GETMULL lines.
    Add two longs named m1,m2 and insert the code below.
    		'	mul32	text_row,#50 * 2	'*100 (2 bytes per character)
    
    			mov	m1,text_row		' x 100
    			shl	m1,#6
    			mov	m2,text_row
    			shl	m2,#5
    			add	m1,m2
    			mov	m2,text_row
    			shl	m2,#2
    			add	m1,m2
    			mov	text_row,m1
    
    

    Brian :)
  • SapiehaSapieha Posts: 2,964
    edited 2014-03-24 03:18
    Hi Brian.

    It is possible You made comments in this block.
    That show what character every block represents.

    I will made me different chars both in X and Y coordinates
    ' Char x1
            word    $FFFF,$FFFF,$FFFF,$FFFF,$000F,$000F,$000F,$000F
            word    $000F,$000F,$000F,$000F,$000F,$000F,$000F,$000F
            word    $000F,$000F,$000F,$000F,$000F,$000F,$000F,$000F
            word    $000F,$000F,$000F,$000F,$FFFF,$FFFF,$FFFF,$FFFF
    ' Char x2
            word    $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
            word    $0000,$0000,$0040,$0060,$0070,$0078,$7FFC,$7FFE
            word    $7FFE,$7FFC,$0078,$0070,$0060,$0040,$0000,$0000
            word    $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
    ' Char x3
    
    and so on
    



    ozpropdev wrote: »
    Hi All

    I forgot to mention that the driver can easily support 50x37 characters as well.
    To achieve the 16x16 font I "cheated" and use every second font line of the 16x32 font.
    I doesn't look too bad. :)

    If anyone has time to create a 16x16 font this could be enhanced.
    This would also reduce the size of the font table from 16K to 8K!

    Cheers
    Brian
  • ozpropdevozpropdev Posts: 2,791
    edited 2014-03-24 04:17
    Sapieha
    The attached file might help.
    Cheers
    Brian
  • SapiehaSapieha Posts: 2,964
    edited 2014-03-24 04:34
    Hi Brian.

    That was all I need

    Thanks.

    ozpropdev wrote: »
    Sapieha
    The attached file might help.
    Cheers
    Brian
Sign In or Register to comment.