Question about VGA_Demo
JaanDoh
Posts: 129
in Propeller 1
I've been looking at the VGA_Demo program which can be found in the OBEX
obex.parallax.com/object/645
I'm a little confused because of the following:
Where the confusion comes from is simple...
I see it uses the internal font found in the Propeller 1 Microcontroller.
And each font character is 16px wide by 32px high
In the very top of the source code it says..
I understand that to be 40 columns and 15 rows
And yet in the source itself it defines 32 columns and 16 rows...
So which one is the right one?
Thank You
Jaan
obex.parallax.com/object/645
I'm a little confused because of the following:
''***************************************
''* VGA Terminal 40x15 v1.0 *
''* Author: Chip Gracey *
''* Copyright (c) 2006 Parallax, Inc. *
''* See end of file for terms of use. *
''***************************************
CON
_clkmode = xtal1+pll16x
_clkfreq = 80_000_000
vga_params = 23
cols = 32
rows = 16
screensize = cols * rows
Where the confusion comes from is simple...
I see it uses the internal font found in the Propeller 1 Microcontroller.
And each font character is 16px wide by 32px high
In the very top of the source code it says..
''* VGA Terminal 40x15 v1.0 *
I understand that to be 40 columns and 15 rows
And yet in the source itself it defines 32 columns and 16 rows...
So which one is the right one?
Thank You
Jaan
Comments
Usually, real source trumps comments, which can be out of date...
Thank You for the response,
it's much appreciated.
Although I have not tried the code,
That means the resolution of the screen is 512 x 480?
(based on character size)
Yet further in the code it also says... (Sorry for the spacing - it hasn't retained the spacing as in the code)
Which doesn't match?
If it helps, this is the initialization values that I use in Tachyon. Only the PASM part of the driver is used and stored in upper EEPROM as a "ROM" to load into a cog at runtime on demand. Should be easy enough to follow.
You are both right in what you say.
And together with what Jmg wrote, (importantly - source trumps comments)
Your'e all right.
So in fact the comments are wrong and the code has a slight minor typo.
Well that's cleared up everything nicely.
Moving on in the VGA_Demo code found in the link in my first thread in this post...
In the Public method begin
the first statement is ...
This line passes the pins config to the method called start
and the comments towards the end of the DAT section explain the following...
In the example above there are only 5 bits not 6
and bits 5 to 3 are x01 where x is missing
because %001111 is the same as %01111
so this is pin group 15 to 8
but bits 2 to 0 are 111 so how do I arrive at 8 (for pin 8)?
Thank You for your input and patience.
Jaan
EDIT: That's right, the basepin is offset by +7 which is correct. Forget the Vpins guess.
btw, if you ran this in Tachyon you would be able to interactively play with all these values
That's answered my question.
I gotta get time to try this out now.
Jaan