Framebuffer to be dropped

8 views
Skip to first unread message

Charles Childers

unread,
Jun 28, 2009, 9:51:35 PM6/28/09
to RETRO 10
I'm going to be dropping the current framebuffer implementation. I've recently done some work with canvas (html/javascript) that has proven promising (see http://retroforth.org/canvas) and would prefer to follow this line instead of the current raw framebuffer approach. This will necessitate some (minor) changes to the I/O ports:

1) Port 5 (Capabilities)
Sending -2 changes from returning the framebuffer address to a flag indicating the availability of a canvas
Sending -6 will return a flag indicating the presence of a mouse device

2) Port 6 (canvas drawing): new.
Send: 1 - Set the color for output
Send: 2 - Set a pixel. Takes x, y from the stack
Send: 3 - Draw a hollow rectangle Takes x, y, height, width from the stack
Send: 4 - Draw a solid rectangle. Takes x, y, height, width from the stack
Send: 5 - Draw a vertical line. Takes x, y, and height from the stack 
Send: 6 - Draw a horizontal line. Takes x, y, and width from the stack
Send: 7 - Draw a hollow circle. Takes x, y, and radius from the stack
Send: 8 - Draw a solid circle. Takes x, y, and radius from the stack
3) Port 7 (mouse): new
Send: 1 - Returns the mouse x, y coordinates on the stack
Send: 2 - Returns a flag indicating mouse up (0) or down (-1) state

-- crc

crc

unread,
Jul 1, 2009, 4:17:17 PM7/1/09
to RETRO 10
Canvas support is now in place. See the demos (still raw, and not
pretty) at http://retroforth.org/canvas

The canvas-based vm is in the repo and development snapshots.

-- crc

On Jun 28, 9:51 pm, Charles Childers <charles.child...@gmail.com>
wrote:
> I'm going to be dropping the current framebuffer implementation. I've
> recently done some work with canvas (html/javascript) that has proven
> promising (seehttp://retroforth.org/canvas) and would prefer to follow this
> line instead of the current raw framebuffer approach. This will necessitate
> some (minor) changes to the I/O ports:
>
> 1) Port 5 (Capabilities)
> Sending -2 changes from returning the framebuffer address to a flag
> indicating the availability of a canvas
> Sending -6 will return a flag indicating the presence of a mouse device
>
> 2) Port 6 (canvas drawing): new.
> Send: 1 - Set the color for output
> Send: 2 - Set a pixel. Takes x, y from the stack
> Send: 3 - Draw a hollow rectangle Takes x, y, height, width from the stack
> Send: 4 - Draw a solid rectangle. Takes x, y, height, width from the stack
> Send: 5 - Draw a vertical line. Takes x, y, and height from the stack Send:
> 6 - Draw a horizontal line. Takes x, y, and width from the stack
> Send: 7 - Draw a hollow circle. Takes x, y, and radius from the stackSend: 8
Reply all
Reply to author
Forward
0 new messages