Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : PicoMite VGA - Colour in 640x480
Page 1 of 4 | |||||
Author | Message | ||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8579 |
PicoMiteVGA.zip This test version implements some basic colour handling in the "mono" 640x480 mode (previously green on black). Please excuse the poor picture. As in the 320x240 mode it uses 4 I/O lines to drive the display + the HSYNC and VSYNC lines and these are not available for any other use. This version will clear the flash and all options so backup anything important. The VGA screen is split up into 40x30 tiles each 16x16 pixels. Each tile can have a different foreground and background colour assigned to it out of the 16 available. Use: OPTION DEFAULT COLOURS foreground [,background] to set the display. Valid colours are white, yellow, lilac, brown, fuchsia, rust, magenta, red, cyan, green, cerulean, midgreen, cobalt, myrtle, blue and black. If background is omitted it defaults to black e.g. as is set in the picture OPTION DEFAULT COLOURS WHITE,BLUE There is a new command TILE that can be used to set the foreground and background color of each 16x16 area TILE x, y [,foreground] [,background] [,no_tiles_wide] [,no_tiles_high] When used any data in the area defined by the tile will immediately change colour. See the red changes in the copyright text. It is important to realise that the changes are happening in the driver. Writing to the display is still inherently "mono" i.e. the foreground colour can only be 0 or not-zero and the background not-zero or 0 Note how using the TEXT command with non-zero colours for both foreground and background will give an error as the text would be invisible. I've made this an error for text to highlight that the display is still "mono". Using border and fill colours for any of the other drawing commands won't error but non zero colours will all be the same (as defined in the tiles on which the drawing element is written). The basic reason for this change was to allow the user to select colours for the mono display rather than having to use green on black. The tiles structure was a "nice-to-have" that may allow you to use colour in your programs in the full VGA mode. In addition it means that the link on the PCB to select between mono and colour becomes redundant - just leave it on colour. The only downside is locking up the three extra I/O ports but if the 320x240 mode was ever to be used these must be connected to the display so are of limited use. Edited 2022-03-06 04:26 by matherp |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5726 |
mmmm... I like this. :) With a user font to make 16x16 character cells with simple graphics it could be very useful. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 3527 |
With the 16x16 font you would be "back to the 80's". Now a direct port of "Attack of the PETSKY robots" is piece of cake.... hihi... Edited 2022-03-06 08:19 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5726 |
We could have a really good version of Rogue. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
Works well, much better than green on black. Small bug. When you up arrow at the command prompt to edit a previous command the cursor erases the last character even though it is still in the keyboard buffer. Then, when you backspace, the text shifts left and erases the last character of the previous command. Geoff Geoff Graham - http://geoffg.net |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 1781 |
Attempted to replicate above issue, but it seems ok on mine. Tried keyboard direct to the Pico and via Tera Term. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8579 |
Geoff I can't replicate either. Can you give an exact sequence that causes the problem. One possibility is a non-printing character somehow getting into the buffer. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
I was using TeraTerm to access the console, sorry I should have been much more specific. I will investigate further and report back. BTW it would be really nice to switch between mono and colour mode within a program. Geoff Geoff Graham - http://geoffg.net |
||||
al18 Senior Member Joined: 06/07/2019 Location: United StatesPosts: 175 |
Could the tile command be switched to 8 x 8 pixels, to match the font size? |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8579 |
No: too much memory |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8579 |
Want, want, want ... PicoMiteVGA.zip The option is saved if at the command line but not in a program in which case it will revert after a reset/power cycle or after the command is re-issued. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
Oh, excellent. Thanks. Geoff Geoff Graham - http://geoffg.net |
||||
KD5ZXG Regular Member Joined: 21/01/2022 Location: United StatesPosts: 53 |
Blinking 8 colour? |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5726 |
You'd have to do your own blinking on certain colours in your proram. Say the top 8. Edited 2022-03-07 08:02 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8579 |
V5.07.04b7 PicoMiteVGA.zip This version tries to finalise the changes made in this thread which will become a permanent part of the PicoMiteVGA This version will clear the flash and all options so backup anything important. OPTION COLOUR VGA ON/OFF is removed Use OPTION DEFAULT MODE 1 to boot in 640x480 mode Use OPTION DEFAULT MODE 2 to boot in 320x240 mode This option is permanently stored To switch modes in a program use the new MODE command MODE 1 sets to 640x480 MODE 2 sets to 320x240 As before Use: OPTION DEFAULT COLOURS foreground [,background] to set the display colours. This is a permanent option and applies to both modes. Valid colours are white, yellow, lilac, brown, fuchsia, rust, magenta, red, cyan, green, cerulean, midgreen, cobalt, myrtle, blue and black. If background is omitted it defaults to black There is a new command TILE that can be used to set the foreground and background color of each 16x16 area in mode 1 (640x480) TILE x, y [,foregroundcolour] [,backgroundcolour] [,no_tiles_wide] [,no_tiles_high] This command is ignored in mode 2 The other changes in this beta are to properly set the options for the keyboard after an OPTION RESET and to improve performance of blit in both modes Font 3 is changed to Arial BOLD 16x16. This is designed to match the tile structure in mode 1 so letters can be individually coloured. Edited 2022-03-08 03:15 by matherp |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5726 |
Oh, brilliant! :) Would it work, adding a user font with 16x16 graphic characters in the higher numbers? Similar to fonts 1 & 4, but not necessarily the same characters as these would be to fit the square format of the cell. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8579 |
Yes of course look at http://www.rinkydinkelectronics.com/r_fonts.php various_symbols as a useful example. Program to convert is in Geoff's Micromite download |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5726 |
Thanks. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
cosmic frog Senior Member Joined: 09/02/2012 Location: United KingdomPosts: 278 |
Thanks Peter, this is great! Dave. |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9061 |
Fan-diddly-tastic, Peter! I especially like the change to font-3, to allow for nice lining up of the text and the 16x16 tile arrangement, as before, there was overlap. That can be catered for with appropriate text layout, but this means you don't need to think about that anymore. Will load up a Pico module with this and try it out later. Smoke makes things work. When the smoke gets out, it stops! |
||||
Page 1 of 4 |
Print this page |