Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 00:34 08 May 2024 Privacy Policy
Jump to

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 2 of 4    
Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 12:17am 08 Mar 2022
Copy link to clipboard 
Print this post

Small (but annoying bug):

> list
MODE 2
Text 0, 0, "TEST", , , , RGB(red), RGB(white)
> run
[2] Text 0, 0, "TEST", , , , RGB(red), RGB(white)
Error : Foreground and Background colours are the same
>

It seems that the TEXT command thinks that it is in monochrome mode!

Geoff
Geoff Graham - http://geoffg.net
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9067
Posted: 12:48am 08 Mar 2022
Copy link to clipboard 
Print this post

I think that is by design, Geoff, as with this new feature, the PM output IS still mono as far as the PIO and 2nd core are concerned.

Peter mentioned in one of his earlier posts, that the colour thing is being done in the driver, and that the 640x480 mode still thinks the screen is monochrome.

That's why that error pops up - to remind you that you are effectively still in monochrome mode.

To change the colour of the text, you first write the text to the screen(after setting the default foreground/background), and then use the TILE command to change the colour of the text/background at any one point on the screen.

When the TILE command co-ordinates are the same as the text you just wrote to the display, then the text colour changes at that point, but not via the TEXT command.

That's how I understand it, anyway.

EDIT - Like this:



Edited 2022-03-08 11:00 by Grogster
Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 12:59am 08 Mar 2022
Copy link to clipboard 
Print this post

Sorry Grogs but no.  The first line of the program is MODE 2 so it should be in full colour mode, not monochrome which is what you are talking about.

Geoff
Geoff Graham - http://geoffg.net
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9067
Posted: 01:03am 08 Mar 2022
Copy link to clipboard 
Print this post

  matherp said  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).

Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 01:14am 08 Mar 2022
Copy link to clipboard 
Print this post

Another bug for Peter.  The PS2 keyboard driver in the PicoMiteVGA seems to loose characters when MMBasic is busy.  

This is best illustrated by this program:

CLS
Do
 If Inkey$ <> "" Then count = count + 1
 Print @(0,0) count
Loop

When this is running you can tap on a PS keyboard key and you can see it counting some characters but not others.  In fact, with rapid tapping most of the characters are lost.  On top of this, it is hard to exit the program with CTRL-C.  You need to keep pressing it many times for it to be recognised.

This is with the default CPU speed of 126MHz.  At 256MHz the keyboard seems to work perfectly, at least I cannot fault it.  It also seems to work perfectly when using your PC's keyboard accessing the USB console.

Geoff
Geoff Graham - http://geoffg.net
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 01:19am 08 Mar 2022
Copy link to clipboard 
Print this post

Grogs, you are talking about monochrome mode.  My test program runs in 320x240 colour mode.  In that mode you are allowed to have non zero foreground & background colours.

Geoff
Geoff Graham - http://geoffg.net
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9067
Posted: 01:20am 08 Mar 2022
Copy link to clipboard 
Print this post

I stand corrected on the above, BTW.

I can re-create Geoff's error.  I was thinking of MODE 1 @ 640x480 and how to do the new colours.  Geoff is quite right, in MODE 2, which is standard colour VGA mode, it throws an error if you try to do as in Geoff's example at the top of this page.

EDIT: Whoops!  Our posts are overlapping!  But quite correct - I had that totally wrong, and there is an issue there.
Edited 2022-03-08 11:22 by Grogster
Smoke makes things work. When the smoke gets out, it stops!
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1805
Posted: 02:39am 08 Mar 2022
Copy link to clipboard 
Print this post

In Mode 2 adding an extra "," stops the error message and the text appears in the correct place, but the colours are ignored instead using the default colours of Mode 1.

text 0,9,"TXT",,,,,rgb(red),rgb(white)

using OPTION DEFAULT MODE 2 and CPU RESTART does help.

The options:
> option list
OPTION KEYBOARD US
OPTION CPUSPEED (KHz) 252000
OPTION COLOUR VGA ON
OPTION DISPLAY 30, 53
OPTION DEFAULT COLOURS WHITE,  MYRTLE
OPTION SDCARD GP15, GP14, GP13, GP12
OPTION DEFAULT FONT 7, 1
> ? mm.ver
5.070407
> text 0,9,"TXT",,,,rgb(red),rgb(white)
now works
Edit
If the default Mode is returned to 1 then the Mode 2 error message returns for TEXT command.
Edited 2022-03-08 13:31 by phil99
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8598
Posted: 07:27am 08 Mar 2022
Copy link to clipboard 
Print this post

  Quote  Small (but annoying bug):

OOps - sorry - testing the option rather than the current mode


PicoMiteVGA.zip


Will look at the keyboard issue later
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8598
Posted: 09:08am 08 Mar 2022
Copy link to clipboard 
Print this post

I think this fixes the keyboard issue. Made more routines memory resident.


PicoMiteVGA.zip
 
Pluto
Guru

Joined: 09/06/2017
Location: Finland
Posts: 330
Posted: 09:12am 08 Mar 2022
Copy link to clipboard 
Print this post

I would like to connect PicoMite to a VGA for testing, but I am not sure about the proper connections. I there a schematic of the connections?
Regards Fred
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8598
Posted: 09:29am 08 Mar 2022
Copy link to clipboard 
Print this post

  Quote  I would like to connect PicoMite to a VGA for testing, but I am not sure about the proper connections. I there a schematic of the connections?

https://geoffg.net/Downloads/picomite/PicoMiteVGA_User_Manual.pdf
 
Pluto
Guru

Joined: 09/06/2017
Location: Finland
Posts: 330
Posted: 09:39am 08 Mar 2022
Copy link to clipboard 
Print this post

THANKS!
Didn't know that a User manual existed for PicoMite VGA!
Now it is time to heat up the soldering iron (and take a break from thinking about our unpredictable neighbour).
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 10:48am 08 Mar 2022
Copy link to clipboard 
Print this post

Thanks Peter.  That fixed both issues.

Geoff
Geoff Graham - http://geoffg.net
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5747
Posted: 01:41pm 08 Mar 2022
Copy link to clipboard 
Print this post

Is this just my setup? If I press F4 to enter Mark mode in the editor the screen becomes unstable, as if there is some oscillation going on. The Mark command works ok and the screen returns to normal after the command has completed. If trying to verify this, please also try a k$=inkey$ do/loop as I had the same thing yesterday, but suspected my usual lousy programming. :)
The only options set are default colour (midgreen foreground) and system SPI.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8598
Posted: 02:33pm 08 Mar 2022
Copy link to clipboard 
Print this post

  Quote  Is this just my setup?

No issues for me
 
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 278
Posted: 02:59pm 08 Mar 2022
Copy link to clipboard 
Print this post

I may have found a error in the manual.

On page7 the 8 colour diagram says VGA BLUE=GP18, but on page10 VGA BLUE=GP19

I think VGA BLUE=GP18 is correct.

Thanks. Dave.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5747
Posted: 03:09pm 08 Mar 2022
Copy link to clipboard 
Print this post

Definite problem at this end.
The latest version of 04b7 (2022-03-08_190751)has some video instability even on the command line on a clean install (check first character or two, top line), only US keyboard set. Much worse when entering the editor. The previous version (2022-03-08_030232) is steady as a rock.

I've only got one PicoMite set up for vga at present so I can't test it on another yet.

EDIT
Even with the previous version this is guaranteed to make a mess of the screen until a key is pressed:

DO
k$ = INKEY$
LOOP UNTIL k$>""

.
Edited 2022-03-09 07:00 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 11:15pm 08 Mar 2022
Copy link to clipboard 
Print this post

  cosmic frog said  I think VGA BLUE=GP18 is correct.


Yes, that is correct.  It will be fixed in the new manual - due when the current beta version becomes final.

Geoff
Geoff Graham - http://geoffg.net
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1805
Posted: 03:59am 09 Mar 2022
Copy link to clipboard 
Print this post

@Mixtel90
Check continuity of the two Sync. lines and the ground, from the Pico pins to the end of the VGA cable. Also check the condition the pins of the VGA plugs, sometimes one will get bent when inserting.
Edited 2022-03-09 14:01 by phil99
 
     Page 2 of 4    
Print this page
© JAQ Software 2024