Re: [colorforth] Seeing the Vesa mode on start-up/changeing same.
- Subject: Re: [colorforth] Seeing the Vesa mode on start-up/changeing same.
- From: "Ray St. Marie" <ray.stmarie@xxxxxxxxx>
- Date: Mon, 14 Jul 2008 03:05:02 -0600
The text that was part of this post has been corrected.
the link http://colorforthray.info/rapter.html now contains the corrected text.
I hope you enjoy :)
Ray
On Sun, Jul 13, 2008 at 8:23 PM, Ray St. Marie <ray.stmarie@xxxxxxxxx> wrote:
> Hi all :-)
>
> The deed is done, Please see http://colorforthray.info/rapter.html.
>
> There is an odd spacing between the pix because I saved them
> incorrectly. I have to go pick up my wife from work now and don't have
> time to fix, It shall be done.
>
> Enjoy
>
> Ray :- )
>
>
> On Sun, Jul 13, 2008 at 7:21 PM, Ray St. Marie <ray.stmarie@xxxxxxxxx> wrote:
>> oops!
>>
>> I alluded to the fact that ChuckBot and the rapter move on the screen
>> below. that's accomplished by adding 2 more variables and entering
>> them into the word like this :
>>
>> xr 0 yr 24 ( these are the raptors 'mover' variables )
>>
>> : ln3 3 xr @ 235 + yr @ 180 + 30 60 2 7 silver lines ;
>>
>> Now the original x of 235 and y of 180 are offset by the xr 0 and yr
>> 24 variables. Using those variables in all of your lines of an object
>> makes the old X and Y into offsets from xr/yr.
>> You can draw your entire object and then you can add these variables
>> later. Be sure not to go off of the left or bottom of the screen as
>> you will crash. Right wraps from the left. If you've wrapped a few
>> times, you can go left and re-wrap from the right.
>>
>> A bit of a smarter program that changes the background so that you
>> have a new one everytime you leave the screen to the left should, you
>> make the object wrap right very quickly so that it can't be seen,
>> change the background, and then rap from the left.
>>
>> Circles, see Howerd's cfdos4 . better triangles, I'm looking into
>> graphics engines that run native.
>>
>> Ray outie :)
>>
>> On Sun, Jul 13, 2008 at 7:04 PM, Ray St. Marie <ray.stmarie@xxxxxxxxx> wrote:
>>> Nick said to Ray
>>>
>>>> Nick here: Thanks, but sorry, I'm still not able to
>>>> focus on details of VESA cheatcodes. However, they
>>>> ought to be backward compatible, so 117 & 118 ought
>>>> still to be the codes for 1024x768 resolution.
>>>
>>> Yes I believe you are correct, sir. The difference between 117 and 118
>>> is number of colors, 64k for the former and 16k for the latter. Like
>>> that matters to a 16 color system. :-)
>>> But It would matter to someone that was Using the system to draw to
>>> the screen in as fine of a detail they could muster.
>>>
>>> I also noticed that the 123 ati setting is not on the list that I
>>> included. Hmmm. I know i've seen a more complete list somewhere.
>>>
>>> As to drawing to the screen:
>>>
>>> LINE Horizontal
>>>
>>> Line wants you to set 'at' first and then put an offset from x ( this
>>> is where the line will start ) and a length. This would draw a line:
>>>
>>> : myline 300 400 at 20 ( pixels left of x ) 50 ( pixels long ) line ;
>>>
>>> Negating the x-offset ( 20 in this case ) does as you would hope,
>>> moves the line right offset of x were as positive it starts left
>>> offset of x.
>>>
>>> A generic line word might look like
>>>
>>> : line. at line ;
>>>
>>>
>>> where you would feed it on the stack the offset length X and Y in that order.
>>>
>>> : line. color at line ;
>>> If you would rather call the color in the word then you would stack
>>> those above but you
>>> would also add the color hex setting first. Otherwise call the color
>>> sometime before calling the line.
>>>
>>> If you want to display one pixel on the screen of course you could
>>> give line a 1 pixel length, but I suggest...
>>>
>>> BOX
>>>
>>> Box is similar to line but it takes a bottom-right rather than offset/length.
>>>
>>> : mybox 300 400 at 20 50 box ;
>>>
>>> I suggest box because you could show a 4 pixel "pixel" which is much
>>> easier to see on the screen like
>>>
>>> : 4pixel 300 400 over over at 1 dup u+ u+ box ;
>>>
>>> A generic box word would look like...
>>>
>>> : box. over over at u+ u+ box ;
>>>
>>> where you would stack like x's+ y's+ x y
>>> Again the word color could go at the begining of the word and you
>>> could do like we described for line.
>>>
>>> LINE verticle
>>>
>>> Adding a for/next loop for vertical lines where the for count has to
>>> increment AT's Y variable, and length now becomes the width looks like
>>> ...
>>>
>>> : myvert 300 400 50 for over over i + at 0 2 line ;
>>>
>>> makes a line 50 pixels long starting at 300 400 and is not offset from
>>> x and it 2 pixels wide.
>>>
>>> A generic verticle line looks like
>>>
>>> : vert. for over over i + at line next ;
>>> you may or may not want to drop your x and y at the end as they are
>>> still on the stack
>>>
>>> ...where you would stack offset-x width x y length.
>>> Now you can draw nearly anything rectangular shape
>>>
>>>
>>>
>>> What about triangular. That's a bit tougher. but not to to bad.
>>>
>>> My block that contains the new line definition starts with these variables:
>>>
>>> ln 8 x 0 y 383 ht 5 wt1024 os 0 ef 0
>>> ln is the line number, more about that here shortly
>>> x - we know
>>> y - we know
>>> ht - yup height
>>> wt- width
>>> os- offset from x
>>> ef - for want of a better word -- effect.
>>>
>>> Createing these variables makes it easy to debug lines, as I will show shortly
>>>
>>> Now I can create a generic word that will draw any kind of line and
>>> including some but not all. filled triangles, An 'unfilled' triangle
>>> would have to have a slightly smaller similar triangle the background
>>> color inside the original triangle to make the line width. They would
>>> not have transparent centers.
>>>
>>> my word looks like:
>>>
>>> : lines ef ! os ! wt ! ht ! y ! x ! ln ! ( drops to next word just
>>> for convenience)
>>> : 1lins x @ y @ ht @ for over over i + at ( and again )
>>> : 2lins 0 os @ i * + wt @ ef @ i * + line next ;
>>>
>>>
>>> To call the lines word you would create a word like :
>>>
>>> : ln3 3 235 180 30 60 2 7 silver lines ;
>>> ln x y ht wt os ef
>>> ... draws the entire canapy of the airplane mentioned in the next
>>> paragraph. Follow the list of variables in order above and you see
>>> what each number does. What's new here is os and ef. in 2lins. 2lins
>>> portion of the word starts with a zero for the plus that follows as an
>>> accumulator for the os @ i * . os @ i * if not zero will turn on that
>>> half section of 2lins and it will provide the offset from x we've been
>>> talking about. the i makes offset-x i pixels more with each loop.
>>> Smallish values for os are recommened. also, be aware that if you are
>>> matching this line with some other line you have drawn, you may have
>>> to set AT's X over in the case offset-x is great. The second half of
>>> the word extends the width of the line with each loop.
>>> You can also use negative values for os and ef.
>>>
>>> I created a drawing of ChuckBot and the beginings of a plane
>>> much like the raptor in profile using only this word lines. It
>>> includes lines that are the landing area where ChuckBot gets out of
>>> the plane, two lines to split the screen into quadrants, a different
>>> color then the backgound in the lower right quadrant and a display of
>>> two of the lines debbuging information in that quadrant. To make the
>>> lines debugging information work I created another word called vars...
>>>
>>> : e@. emit @ . ;
>>>
>>> : vars ( x y color ) color over over at ln 12 e@. x 21 e@. y 11 e@.
>>> 30 + at ht 20 e@. wt 15 e@. os @ . ef @ . ;
>>>
>>>
>>> e@. handles the labels of each of the variabls that I have labeled
>>> with a letter representing the variable.
>>>
>>> vars takes a x y and a color and as long as you put all 4 behind any
>>> line it will display that lines information on the screen where you
>>> say and in the color you say.
>>>
>>>
>>> See it at http://colorforthRay.info/rapter.html
>>>
>>>
>>>
>>>> Mark
>>>> Slicker's website lists a CF01 with VESA query
>>>> facility, but I do not have privilege access to this -
>>>> so I'll try to do it myself with help of VESA
>>>> documentation and your website.
>>>>
>>>> But slow as I am, CF does what I want sooner or later.
>>>> I am not held up by monitor because I have ripped the
>>>> new source blocks out of the Windows CF (about 130
>>>> blocks) and can add the ones I need to Josh's CF05 -
>>>> once I've managed to understand them.
>>>
>>> Yes! 'slow as I am' as well. hehe.
>>> You don't have to save this e-mail for the info above, I will put it
>>> up at the link I provided above right after sending this missle.
>>>
>>>
>>>> Caritas,
>>>>
>>>> Nick
>>>>
>>>> ****************************
>>>>
>>>> A better world is not only possible but on the way. On
>>>> a quiet day you can hear her breathing. - Arundhati
>>>> Roy
>>>>
>>> Great quote that one!
>>>
>>> A person that quotes a person accurately is worth both.
>>> Ray
>>>
>>> --
>>> Raymond St. Marie ii,
>>> public E-mail Ray.stmarie@xxxxxxxxx
>>> a quickstart guide http://colorforthray.info
>>> THE Community Blog http://colorForth.net
>>> THE community wiki http://ForthWorks.com/c4th
>>>
>>
>>
>>
>> --
>> Raymond St. Marie ii,
>> public E-mail Ray.stmarie@xxxxxxxxx
>> a quickstart guide http://colorforthray.info
>> THE Community Blog http://colorForth.net
>> THE community wiki http://ForthWorks.com/c4th
>>
>
>
>
> --
> Raymond St. Marie ii,
> public E-mail Ray.stmarie@xxxxxxxxx
> a quickstart guide http://colorforthray.info
> THE Community Blog http://colorForth.net
> THE community wiki http://ForthWorks.com/c4th
>
--
Raymond St. Marie ii,
public E-mail Ray.stmarie@xxxxxxxxx
a quickstart guide http://colorforthray.info
THE Community Blog http://colorForth.net
THE community wiki http://ForthWorks.com/c4th
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com