home .. forth .. colorforth mail list archive ..

Re: [colorforth] Setting a pixel on the screen


On Tue, May 20, 2008 at 4:41 PM, Jason Kemp <jason.kemp@xxxxxxxxxxxxxxxx> wrote:
> Good evening all,
>
> I have been attempting to set a pixel on the screen to white.  Please show
> me what I am doing wrong:
>
> : ohno show black screen ffff 400 400 1024 * + 2* 1e80000 + ! keyboard ;
>
> Only the ffff and the 1e80000 are in hex.  The screen is 1024x768, 16-bit,
> VESA 117h.
>
> Thanks,
> Jason
>

Hi Jason,

Have you considered setting the color to white? I suppose that is what
you are doing with all what you have there but...

I use the included BOX or LINE for such things.
For instantce:

pixlin blue 350 350 at 0 1 line 350 351 at 0 1 line ;
pixbox white 400 400 at 402 402 box ;
ok show blank pixlin pixbox keyboard ;

( current block number ) load ok

should see two white pix on the screen.

To use box : set AT at the position and then feed box the lower right
corner of the box boundry.

To use line : set AT at the position and then feed line the "how many
pixels left of x ( an offset left of x ) and the length of the line.

Charles Childers of Retroforth fame, and the gracious host of
colorforthray.info is in the throws of developing a community site for
colorforth that will make it easier for me and whom ever, to share the
actual block code with the world.

When he's finished, I'll share my paper on using colorforth-IBL (
Icons boxes and lines ) , in other words the included graphics set.
I've drawn a few interesting things just by combining line with
for/next loops to make all sorts of shapes shy of curves.

Chuckbot is done entirely with icons and boxes.

As to making curves, well circles really, I'll disect Howerd Oakfords
work in cfdos# where # is 1 thru 4.


Of course this doesn't address what you really want to do, which is to
edit the framebuffer directly. I can not see a reason why you can't.
Also, being able to edit a graphics card directly ( which I believe
Chuck is doing to display his tre-D images of his chips) would be cool
also. The hints as to how to do this is in the kernel section at the
labels marked for LINE and BOX. Icons uses box to do everything.

The PNG appy does do like you have done above:

1024 * + 2* 1e80000 +
 IS the definition of AT. So you are not very far off.

Are you sure your colors are right. I was thinking that white was
ffffff but if you are using a system that doesn't included the 5:6:5
routine then white is ffff. You might try to make the pixel big first,
as I have done above so as to locate it on the screen. I had a real
hard time finding one pixel even on my 36" diag monitor. ( well it's
only 800x600 rendering 1024x768 ( doesn't work for the native, in that
case I have to use my 19in and I hot swap them often, but I can force
it down in windows with out lossage) )

At this point i'm thinking your code should have worked.

:-) your mail-age may vary.

Ray, half asleep and outie

-- 
Raymond St. Marie ii,
colorforthray.info

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com