PDA

View Full Version : Taking Suggestions for new graphics driver.



Kye
03-15-2009, 04:03 AM
Hey guys, I've been working on an update to my last·VGA graphics driver.
(You can find it here, http://forums.parallax.com/showthread.php?p=780597)

So far I re-wrote the whole engine and all the code. The new driver is a·BEAST compared to the other one. I'll already gotten it to work on every other monitor I've tried so far and it allows for alot more features than my last one. The driver is a tile driver also.

So, in the public interface I have:

Scrolling Portions of the screen up - as in you can select any rectangular (or square) portion of the screen and scroll its contents up any number of lines with any background color to be scrolled in.

Scrolling Portions of the screen·down - as in you can select any rectangular (or square) portion of the screen and scroll its contents·down any number of lines with any background color to be scrolled in.

Displaying 2D boxes of any color of your choice (64 different choices).

Displaying 3D boxes (the beveled ones)·of any color of your choice (7 different choices).

Displaying 4D boxes (the beveled and ticker-taped ones)·of any color of your choice (7 different choices).

Displaying strings that will wrap arround the screen. (Propeller font)

Displaying characters on screen. (Propeller font).

Displaying custom 16x16 tiles using any 4 byte color you want (This allows for·ANY custom·image or whatever to be displayed!).

Selecting forground and background colors for any tile·using a F-RGB B-RGB selection.

---------------------------------------------------------------------------------------------------------------------------------------------

Now, the·driver supports 4 colors per tile (all tiles are built·out of a·16 longs). It pretty much pushes the propeller chip to its max using·ONE Processor. The display area is 512x480·pixles or 32x30 tiles.·I wasn't trying to build a multi-processor driver here so the display area is capped to what just one processor was able to do.

Anyway,·the driver will also support a mouse cusor overlay using a seperate display buffer, the second display·buffer will allow sprites to be drawn on the screen. However, due to the lack of memory I plan to only expand the buffers size to·fit a small mouse cusor.

So, what else should I add to the public interface? I'm not sure what other useful features would be needed for a tile driver.

I've made one odd feature already called marque which scrolls characters from right to left across the screen. It allows an arbitary number of strings to be scrolled across the screen at the same time seamlessy.

That said, are there any other cool features that would be usefull for a tile driver that come to mind?

Thanks,



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

Post Edited (Kye) : 3/15/2009 9:02:29 PM GMT

Tubular
03-15-2009, 10:30 AM
Kye,

I haven't had a chance to run your driver yet. I look forward to trying it soon. You mention different choices for button styles etc and it would be great to see some photos of the various options.

One question I have about graphics bitmaps - can they be scrolled? If so which directions, and is it reasonably quick? (ie just updating the starting address offset, not actually rotating memory obviously) ?

Thanks for your efforts on all these drivers.

regards
tubular

Kye
03-15-2009, 12:26 PM
Okay, here's the pre-cusor version. I havent included the code to run the mouse as I have not yet written it.

You will need all three files.



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

Kye
03-15-2009, 12:29 PM
Nice right?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

Sapieha
03-15-2009, 11:35 PM
Hi Kye.

First VGA driver that runs on my monitor with

_clkmode = xtal1 + pll8x
_xinfreq = 14_318_180 ' 5_000_000

And no modifications to timings
44.7KHz / 86Hz

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


Sapieha

Cluso99
03-16-2009, 02:42 AM
Another excellent job in the making http://forums.parallax.com/images/smilies/smile.gif I am only just about to play with VGA so cannot offer any suggestions.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Home of the MultiBladeProps: TriBladeProp (http://forums.parallax.com/showthread.php?p=786418), SixBladeProp (http://forums.parallax.com/showthread.php?p=780033), website (Multiple propeller pcbs) (http://bluemagic.biz/cluso.htm)
· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators (Micros eg Altair, and Terminals eg VT100) - index (http://forums.parallax.com/showthread.php?p=778427)
· Search the Propeller forums (via Google) (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)

My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)·· MultiBladeProp is: www.bluemagic.biz/cluso.htm (http://www.bluemagic.biz/cluso.htm)

Kye
03-16-2009, 04:56 AM
Wow, 86HZ, that's fast.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

Kye
03-17-2009, 06:32 AM
Mmm, no takers?

Well, I guess then that I'll leave it at that.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

dMajo
06-09-2009, 02:25 AM
How is going here?

Have you done the mouse-cursor release ?

Microcontrolled
06-09-2009, 04:40 AM
This might be good for vidio games if you include a function that can scroll a fairly large tile screen.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontroled.

Kye
06-09-2009, 09:43 AM
Oh, yes I finished this driver a while back...

Unfortunately, I won't be releasing it to the public since my partner for the project I am working on has insisted that I do not do so.

However, don't worry, the driver is built for a commercial educational platform for students and hobbyist designed on the propeller chip. That will be released in the future, but not right now. All features of the driver will be aviable to use in a different format...

Anyway, thanks for asking about this project and·I'll be posting more details about what the platform is·I'm taking about in the near future. For now, if you want to mess with the current driver go right on ahead.

... And Just for teasers because I can't resist.... http://forums.parallax.com/images/smilies/wink.gif·... Here's the API

The driver runs at (640·x 480) now and has a print cusor (like in·a shell interface or like in·dos) and a mouse cusor.

I am really happy with how this code turned out because I was able to get everything I wanted working (used every register in the processor and almost every clock cycle.) If you check arround in the forums you'll find some posts about my first version of this driver and how I was working on it. I really need to say thank you also to Chip for all the help he provided - I wouldn't have managed to get everything working without his aid (his code was really useful).


┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ──────────────────────────┐
│ Video Engine │
│ │
│ Author: Kwabena W. Agyeman │
│ Updated: 5/28/2009 │
│ Designed For: P8X32A │
│ │
│ Copyright (c) 2009 Kwabena W. Agyeman │
│ See end of file for terms of use. │
│ │
│ Driver Info: │
│ │
│ The video engine runs a VGA driver in the next free cog on the propeller chip when called. │
│ │
│ The driver, is only guaranteed and tested to work at an 80Mhz system clock or higher. The driver is designed for the P8X32A │
│ so port B will not be operational. │
│ │
│ Nyamekye, │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ──────────────────────────┘

Object "videoEngine" Interface:
PUB displayColors(foregroundRed, foregroundGreen, foregroundBlue, backgroundRed, backgroundGreen, backgroundBlue)
PUB displayBoxColors(state, red, green, blue)
PUB displayBlink(rate)
PUB printCharacters(characters, colors)
PUB printCharacter(character, colors)
PUB printSettings(color, startRow, startColumn, endRow, endColumn)
PUB scrollCharacters(characters, character, colors, row, startColumn, endColumn)
PUB scrollUp(lines, color, startRow, startColumn, endRow, endColumn)
PUB scrollDown(lines, color, startRow, startColumn, endRow, endColumn)
PUB display3DBox(colors, startRow, startColumn, endRow, endColumn)
PUB display3DFrame(colors, startRow, startColumn, endRow, endColumn)
PUB display2DBox(color, startRow, startColumn, endRow, endColumn)
PUB display2DFrame(color, startRow, startColumn, endRow, endColumn)
PUB displayCharacters(characters, colors, row, column)
PUB displayCharacter(character, colors, row, column)
PUB displayTile(address, colors, row, column)
PUB getMouseCursorRow
PUB getMouseCursorColumn
PUB getMouseCursorPointer
PUB getLumaBufferAddress(row, column)
PUB getChromaBufferColors(row, column)
PUB changePrintCursorSettings(rate, color)
PUB changeMouseCursorSettings(address, color)
PUB changeDisplaySettings(state)
PUB returnChromaBufferAddress
PUB returnLumaBufferAddress
PUB videoEngine(mouseXPositionAddress, mouseYPositionAddress)

Program: 760 Longs
Variable: 1,870 Longs

0 1 2 3 Pin Group

240
Pin 0, 8, 16, 24 ──── Vertical Sync

240
Pin 1, 9, 17, 25 ──── Horizontal Sync

470
Pin 2, 10, 18, 26 ──┳─ Blue Video
240│
Pin 3, 11, 19, 27 ──┘

470
Pin 4, 12, 20, 28 ──┳─ Green Video
240│
Pin 5, 13, 21, 29 ──┘

470
Pin 6, 14, 22, 30 ──┳─ Red Video
240│
Pin 7, 15, 23, 31 ──┘

5V

└─ 5V

┌─ Vertical Sync Ground


┌─ Hoirzontal Sync Ground


┌─ Blue Return


┌─ Green Return


┌─ Red Return

__________________________________________________ __________________________________________________ ______________
PUB displayColors(foregroundRed, foregroundGreen, foregroundBlue, backgroundRed, backgroundGreen, backgroundBlue)

14 Stack Longs

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Returns the properly formated non box color word using the selected values. │
│ │
│ Non box colors should be in the format of: │
│ │
│ %RR_GG_BB_xx_RR_GG_BB_xx Where R is red, G is green, and B is blue. x is ignored. A single word can hold a color. │
│ │
│ The upper RGB color is the foreground color. The lower RGB color is the background color. │
│ │
│ ForegroundRed - Brightness of foreground red .. (0 - 3). │
│ ForegroundGreen - Brightness of foreground green .. (0 - 3). │
│ ForegroundBlue - Brightness of foreground blue .. (0 - 3). │
│ BackgroundRed - Brightness of background red .. (0 - 3). │
│ BackgroundGreen - Brightness of background green .. (0 - 3). │
│ BackgroundBlue - Brightness of background blue .. (0 - 3). │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
______________________________________________
PUB displayBoxColors(state, red, green, blue)

7 Stack Longs

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Returns the properly formated box color long using the selected values. │
│ │
│ Box colors should be in the format of: │
│ │
│ $TL_BR_S_C │
│ │
│ Where TL is %RR_GG_BB_xx color byte for the top and left box sides. │
│ │
│ Where BR is %RR_GG_BB_xx color byte for the bottom and right box sides. │
│ │
│ Where S is %RR_GG_BB_xx color byte for the special box parts. │
│ │
│ Where C is %RR_GG_BB_xx color byte for the center of the box. │
│ │
│ %RR_GG_BB_xx Where R is red, G is green, and B is blue. x is ignored. │
│ │
│ State - Bevel the box up if state and down if not state. │
│ Red - Input red into box colors, yes or no. │
│ Green - Input green into box colors, yes or no. │
│ Blue - Input blue into box colors, yes or no. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
_______________________
PUB displayBlink(rate)

4 Stack Longs

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Switches the return value back and forth between true and false depending on the elasped time. │
│ │
│ Returns true or false depending on the time elasped. │
│ │
│ Rate - 3 for fast blink rate .. 2 for medium blink rate .. 1 for slow blink rate .. 0 for off (returns false always). │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
________________________________________
PUB printCharacters(characters, colors)

28 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Prints characters to the screen inside of the print box defined by print settings. │
│ │
│ Characters - A pointer to a string of characters to be printed. │
│ Colors - Foreground and background colors to use. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
______________________________________
PUB printCharacter(character, colors)

23 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Prints a character to the screen inside of the print box defined by print settings. │
│ │
│ 0 - Move the cursor left. │
│ 1 - Move the cursor right. │
│ 8 - Backspace - move the cursor back one space and delete the character underneath it. │
│ 9 - Tab - move the cursor right a number of spaces. │
│ 10 - Linefeed - move the cursor down. │
│ 11 - Vertical Tab - move the cursor up. │
│ 12 - Formfeed - move the cursor back to the origin defined in print settings and clear the screen. │
│ 13 - Carriage Return - move the cursor back to the start of the line. │
│ Other - Print the character on screen and move the cursor to the right one space. │
│ │
│ Character - Character to be printed. │
│ Colors - Foreground and background colors to use. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
__________________________________________________ _________________
PUB printSettings(color, startRow, startColumn, endRow, endColumn)

31 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Changes the print box size and position. The box hieght will be forced to be even. │
│ │
│ Color - Color to clear the slected area with. │
│ StartRow - Row to start the print box at. │
│ StartColumn - Column to start the print box at. │
│ EndRow - Row to end at - must be under startRow. │
│ EndColumn - Column to end at. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
__________________________________________________ _______________________________
PUB scrollCharacters(characters, character, colors, row, startColumn, endColumn)

26 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Scrolls the characters from right to left across the specified area. Scrolls in blank space when out of characters. │
│ │
│ Characters - A pointer to the string of characters to be displayed. │
│ Character - The index of the character to be displayed in the characters string when called. │
│ Colors - Foreground and background colors to use. │
│ Row - Row to scroll characters on, row 29 is not a valid row. │
│ StartColumn - Column to scroll characters to. │
│ EndColumn - Column to scroll characters from. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
__________________________________________________ ___________________
PUB scrollUp(lines, color, startRow, startColumn, endRow, endColumn)

13 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Scrolls the contents of whatever is in the specified area up and scrolls in blank space of the selected color. │
│ │
│ Lines - Number of rows to scroll up. │
│ Color - Background color to scroll in. │
│ StartRow - Row to scroll to. │
│ StartColumn - Column to start scrolling at. │
│ EndRow - Row to scroll from - must be under startRow. │
│ EndColumn - Column to end scrolling at. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
__________________________________________________ _____________________
PUB scrollDown(lines, color, startRow, startColumn, endRow, endColumn)

13 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Scrolls the contents of whatever is in the specified area down and scrolls in blank space of the selected color. │
│ │
│ Lines - Number of rows to scroll down. │
│ Color - Background color to scroll in. │
│ StartRow - Row to scroll from. │
│ StartColumn - Column to start scrolling at. │
│ EndRow - Row to scroll to - must be under startRow. │
│ EndColumn - Column to end scrolling at. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
__________________________________________________ _________________
PUB display3DBox(colors, startRow, startColumn, endRow, endColumn)

27 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Displays a 3D box starting at the specified row on the specified column with specified width and height. │
│ │
│ Colors - Box colors to use. │
│ StartRow - Row to start drawing at. │
│ StartColumn - Column to start at. │
│ EndRow - Row to end at - must be under startRow. │
│ EndColumn - Column to end at - must be to the right of startColumn. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
__________________________________________________ ___________________
PUB display3DFrame(colors, startRow, startColumn, endRow, endColumn)

19 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Displays a 3D frame starting at the specified row on the specified column with specified width and height. │
│ │
│ Colors - Box colors to use. │
│ StartRow - Row to start drawing at. │
│ StartColumn - Column to start at. │
│ EndRow - Row to end at - must be under startRow. │
│ EndColumn - Column to end at - must be to the right of startColumn. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
__________________________________________________ ________________
PUB display2DBox(color, startRow, startColumn, endRow, endColumn)

12 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Displays a 2D box starting at the specified row on the specified column with specified width and hieght. │
│ │
│ Color - Box color to use. │
│ StartRow - Row to start drawing at. │
│ StartColumn - Column to start at. │
│ EndRow - Row to end at. │
│ EndColumn - Column to end at. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
__________________________________________________ __________________
PUB display2DFrame(color, startRow, startColumn, endRow, endColumn)

12 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Displays a 2D frame starting at the specified row on the specified column with specified width and height. │
│ │
│ Color - Box color to use. │
│ StartRow - Row to start drawing at. │
│ StartColumn - Column to start at. │
│ EndRow - Row to end at. │
│ EndColumn - Column to end at. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
__________________________________________________ _____
PUB displayCharacters(characters, colors, row, column)

25 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Displays a string of characters starting at the specified column on the specified row. The displayed string of │
│ characters ends when it goes off screen. Will not display box characters. Characters require a tile below them. │
│ │
│ Characters - A pointer to the string of characters to be displayed. │
│ Colors - Foreground and background colors to use. │
│ Row - Row to start displaying characters on, row 29 is not a valid row. │
│ Column - Column to start displaying characters on. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
__________________________________________________ ___
PUB displayCharacter(character, colors, row, column)

18 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Displays a character at the specified column on the specified row. Will not display box characters. Characters require a │
│ tile below them. │
│ │
│ Character - Character to display. │
│ Colors - Foreground and background colors to use. │
│ Row - Row to display the character on, row 29 is not a valid row. │
│ Column - Column to display the character on. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
______________________________________________
PUB displayTile(address, colors, row, column)

11 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Displays a four colored tile at the specified column on the specified row. │
│ │
│ A tile should be formated in this way: │
│ │
│ address long %%0123012301230123 │
│ long %%0123012301230123 │
│ long %%0123012301230123 │
│ long %%0123012301230123 │
│ long %%0123012301230123 │
│ long %%0123012301230123 │
│ long %%0123012301230123 │
│ long %%0123012301230123 │
│ long %%0123012301230123 │
│ long %%0123012301230123 │
│ long %%0123012301230123 │
│ long %%0123012301230123 │
│ long %%0123012301230123 │
│ long %%0123012301230123 │
│ long %%0123012301230123 │
│ long %%0123012301230123 │
│ │
│ The tile image should be reversed to display properly. │
│ │
│ The address of the first long is the address of the tile. │
│ │
│ Each tile has has 16 longs and each long has 16 pixels. Each pixel should have a value of 0 - 3. │
│ │
│ Each pixel maps to one of the four color bytes (%RR_GG_BB_xx) in a color long │
│ (%RR_GG_BB_xx_RR_GG_BB_xx_RR_GG_BB_xx_RR_GG_BB_xx) . 0 maps to the lowest byte... 3 maps to the highest byte... etc. │
│ │
│ Address - A pointer to a tile. │
│ Colors - A color long describing that tile. │
│ Row - Row to display the on. │
│ Column - Column to display the on. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
______________________
PUB getMouseCursorRow

3 Stack Longs

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Returns the current mouse cursor row. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
_________________________
PUB getMouseCursorColumn

3 Stack Longs

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Returns the current mouse cursor column. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
__________________________
PUB getMouseCursorPointer

3 Stack Longs

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Returns the address of the standard mouse cursor tile. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
______________________________________
PUB getLumaBufferAddress(row, column)

9 Stack longs

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Returns the address in the luma buffer at the selected location. │
│ │
│ Row - Row in buffer. │
│ Column - Column in buffer. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
_______________________________________
PUB getChromaBufferColors(row, column)

9 Stack longs

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Returns the colors in the chroma buffer at the selected location. │
│ │
│ Row - Row in buffer. │
│ Column - Column in buffer. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
___________________________________________
PUB changePrintCursorSettings(rate, color)

9 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Changes the print cursor blink rate and color. │
│ │
│ Rate - 3 for fast blink rate .. 2 for medium blink rate .. 1 for slow blink rate .. 0 for off. │
│ Color - A color byte (%RR_GG_BB_xx) describing the print cusor. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
______________________________________________
PUB changeMouseCursorSettings(address, color)

5 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Changes the mouse tile and color. │
│ │
│ A mouse cusor tile should be formated in this way: │
│ │
│ address long %%0000000000000003 │
│ long %%0000000000000033 │
│ long %%0000000000000333 │
│ long %%0000000000003333 │
│ long %%0000000000033333 │
│ long %%0000000000333333 │
│ long %%0000000003333333 │
│ long %%0000000033333333 │
│ long %%0000000333333333 │
│ long %%0000003333333333 │
│ long %%0000033333333333 │
│ long %%0000333333333333 │
│ long %%0000000000003333 │
│ long %%0000000000000333 │
│ long %%0000000000000033 │
│ long %%0000000000000003 │
│ │
│ The tile image should be reversed to display properly. │
│ │
│ The address of the first long is the address of the mouse tile. │
│ │
│ The mouse tile has has 16 longs and each long has 16 pixels. Each pixel should have a value of 0 or 3, not 1 or 2. │
│ │
│ A pixel of 0 maps to nothing and a pixel of 3 maps to the color byte (%RR_GG_BB_xx) │
│ │
│ Address - A pointer to a mouse cusor tile. Zero (null) to disable cursor. │
│ Color - A color byte describing that mouse cusor tile. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
_________________________________
PUB changeDisplaySettings(state)

4 Stack Longs - Ignore Return Value

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Enables or disables the video driver's video output - turning the monitor off or putting it into standby mode. │
│ │
│ State - True for active and false for inactive. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
______________________________
PUB returnChromaBufferAddress

3 Stack longs

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Returns the address of the chroma buffer. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
____________________________
PUB returnLumaBufferAddress

3 Stack longs
┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Returns the address of the luma buffer. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘
__________________________________________________ ____________
PUB videoEngine(mouseXPositionAddress, mouseYPositionAddress)

9 Stack Longs

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┐
│ Initializes the video driver to run on a new cog. │
│ │
│ Returns the new cog's ID on sucess or -1 on failure. │
│ │
│ mouseXPositionAddress - Address of counter variable for mouse X axis. │
│ mouseYPositionAddress - Address of counter variable for mouse Y axis. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────┘

┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ──────────────────────────┐
│ TERMS OF USE: MIT License │
├───────────────────────────────────────────────── ────────────────────────────────────────────────── ──────────────────────────┤
│Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation │
│files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, │
│modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the │
│Software is furnished to do so, subject to the following conditions: │
│ │
│The above copyright notice and this permission notice shall be included in all copies or substantial portions of the │
│Software. │
│ │
│THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE │
│WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR │
│COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │
│ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ──────────────────────────┘

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

Post Edited (Kye) : 6/9/2009 1:54:44 AM GMT