Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:17 03 May 2025 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 : PicoMiteVGA V5.07.07b19 - Major enhancement - 640x480  edit in colour

     Page 3 of 5    
Author Message
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3989
Posted: 11:34am 20 Feb 2023
Copy link to clipboard 
Print this post

  matherp said  This is correct.
To get colour you need to use the TILE command. CLS is the equivalent of BOX 0,0,mm.hres,mm.vres,0,0,rgb(red)  and any colour in mono mode is white. They both use the DRAWRECTANGLE primitive. I played with interpreting the coordinates in DRAWRECTANGLE to see if the matched tile boundaries and then setting the tile colours accordingly but it has far too many unforeseen consequences that would completely bemuse the user to be a realistic option

Oh - I relied on your post saying "the default tile size will be 8x12 to match the default font 1".

Added TILE SMALL

and still doesn't work.

? mm.hres, mm.vres
640 480

Look to be OK multiples of the tile size.

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10008
Posted: 11:39am 20 Feb 2023
Copy link to clipboard 
Print this post

Only text does the automatic colour map for the reasons I stated
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2397
Posted: 11:52am 20 Feb 2023
Copy link to clipboard 
Print this post

  matherp said  Only text does the automatic colour map for the reasons I stated


i think peter is saying that tiled colours are only respected when using the PRINT command, and then only when the characters printed sit aligned on tile of the same size as the character.

john: what happens if you print 40 lines of 80 space characters, using your preferred background colour? does this give you the same effect as CLS n? and if you then place the cursor at the top left of your screen, does the background and foreground colour correctly follow any further text typed at the command prompt? including scrolling at the bottom of the screen?

please bear in mind, i don't have a colour picomite set up here to test this for myself.


cheers,
rob   :-)
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3989
Posted: 12:31pm 20 Feb 2023
Copy link to clipboard 
Print this post

  robert.rozee said  
  matherp said  Only text does the automatic colour map for the reasons I stated


i think peter is saying that tiled colours are only respected when using the PRINT command, and then only when the characters printed sit aligned on tile of the same size as the character.

OK, I kinda expected CLS would work, though!
(BTW, TEXT works, too.)

  robert.rozee said  john: what happens if you print 40 lines of 80 space characters, using your preferred background colour?

Yep! Good idea!

Works (on a trivial test).  Kinda slow.  The manual will need some tweaks LOL

I didn't have a PicoMiteVGA either till I fought "modern" solder etc (gave up, dug out the dregs of leaded stuff I still had from 25+ years ago).

Thankfully Peter did a GREAT job of things like the Gerbers & BOM (so even I could get the right parts from JLCPCB & Farnell).

John
Edited 2023-02-20 22:33 by JohnS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7471
Posted: 01:11pm 20 Feb 2023
Copy link to clipboard 
Print this post

Try clearing the Mode 1 small tile screen with
TILE 1,1,foreground,background,80,40

"Modern" solder has no place here. I have a huge bobbin of the proper leaded stuff that I've been using for about forty years. :)
Edited 2023-02-20 23:14 by Mixtel90
Mick

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

Joined: 18/11/2011
Location: United Kingdom
Posts: 3989
Posted: 02:28pm 20 Feb 2023
Copy link to clipboard 
Print this post

  Mixtel90 said  Try clearing the Mode 1 small tile screen with
TILE 1,1,foreground,background,80,40

I expect/expected x,y to count from 0 (don't know yet).

With the 80 I get:
Error : 80 is invalid (valid is 1 to 40)

and with the 40 I get:
Error : 80 is invalid (valid is 1 to 30)

I think those two are bugs :(

Using the allowed 40,30 it just does a block at the top left and leaves the rest of the screen unchanged.

hmm, interesting... after trying this, using EDIT I no longer get syntax colouring (or whatever it's called), just monocolour (white letters on black).

  Mixtel90 said  "Modern" solder has no place here. I have a huge bobbin of the proper leaded stuff that I've been using for about forty years. :)

I'll look to see if it can still be bought (but not a huge bobbin, it would be far too much for me LOL).

What ratio of lead/(er, copper?) do I look for please?

John
Edited 2023-02-21 00:33 by JohnS
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3989
Posted: 02:36pm 20 Feb 2023
Copy link to clipboard 
Print this post

How odd!

With
TILE 1,1,RGB(blue),RGB(blue),40,30
I get:
Error : 40 is invalid (valid is 1 to 39)

But
TILE 0,0,RGB(blue),RGB(blue),40,30
is allowed (though not the whole screen).

Another bug?

John
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7471
Posted: 02:49pm 20 Feb 2023
Copy link to clipboard 
Print this post

Ah...
This is ok.
TILE 0,0,RGB(blue),RGB(white),39,29
It looks like it hasn't been updated to cope with the bigger screen because 79,39 is'n supported.
Mick

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

Joined: 05/03/2018
Location: Netherlands
Posts: 4822
Posted: 02:53pm 20 Feb 2023
Copy link to clipboard 
Print this post

Hi John,

It is as with arrays, the starting tile is 0,0

If you have large (16x16) tiles, there are 40 horizontally and 30 vertically.

so


tile 0,0,rgb(red),rgb(blue),40,30


will fill the whole screen with background blue, forground red

But

tile 1,1,rgb(red),rgb(blue),40,30


will start at tile 1,1 (so 1 down from the top, 1 right from the left edge) and try to paint 40x30. And that does not fit. from that position (1,1) you can only paint 39 to the right, and 29 down.

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3989
Posted: 03:02pm 20 Feb 2023
Copy link to clipboard 
Print this post

Thanks, that's what I originally thought but then I hit the bugs.

John
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2397
Posted: 03:09pm 20 Feb 2023
Copy link to clipboard 
Print this post

from the VGA manual, 5.07.04, pg 84:
  Quote  
TILE x, y [,foreground]
[,background] [,nbr_tiles_wide]
[,nbr_tiles_high]

... 'x' and 'y' are the coordinates of the block in pixels ...


is the manual in error? it would make more sense for x and y to be tile coordinates.

a brief perusal of the manual also fails to reveal if 0,0 (for anything) is at top-left of screen, or bottom-left. traditionally - from ye olde days of BASIC - graphics had the origin at bottom left, while character positions have the origin at top left (and 1,1 as the origin). geoff: a diagram clarifying this is perhaps worth adding to the manual.


cheers,
rob   :-)

addendum: ",foreground" should probably not be in square brackets, or does TILE x, y  do something useful with no colours specified?
Edited 2023-02-21 01:14 by robert.rozee
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10008
Posted: 03:30pm 20 Feb 2023
Copy link to clipboard 
Print this post

  Quote  It looks like it hasn't been updated to cope with the bigger screen because 79,39 is'n supported.


Correct - will fix
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10008
Posted: 05:17pm 20 Feb 2023
Copy link to clipboard 
Print this post

PicoMiteVGA V5.07.07b22

PicoMiteVGAV5.07.07b22.zip

I've managed to restore the workable memory to 100Kb and have solved the interaction between audio and the display

Also fixed the error in the TILE command

Volhout: please confirm this solves your issues

Usual warning on flash files/options

Edited 2023-02-21 03:39 by matherp
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 451
Posted: 05:43pm 20 Feb 2023
Copy link to clipboard 
Print this post

Hello Peter,

is there a possibility to set an OPTION in which when EDIT is automatically always opened in Mode 1. Even if I landed in mode 2 on the console by Ctrl+C?
Otherwise I always enter mode 1 first, edit ...
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3989
Posted: 05:44pm 20 Feb 2023
Copy link to clipboard 
Print this post

  matherp said  PicoMiteVGA V5.07.07b22

PicoMiteVGAV5.07.07b22.zip

Thanks - works OK.

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10008
Posted: 05:58pm 20 Feb 2023
Copy link to clipboard 
Print this post

  Quote  is there a possibility to set an OPTION in which when EDIT is automatically always opened in Mode 1.

Just type "EDIT 1"
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 451
Posted: 06:00pm 20 Feb 2023
Copy link to clipboard 
Print this post

  matherp said  
  Quote  is there a possibility to set an OPTION in which when EDIT is automatically always opened in Mode 1.

Just type "EDIT 1"

thx
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 451
Posted: 06:12pm 20 Feb 2023
Copy link to clipboard 
Print this post

  JohnS said  
  matherp said  PicoMiteVGA V5.07.07b22

PicoMiteVGAV5.07.07b22.zip

Thanks - works OK.

John



Not for me!

> option list
PicoMiteVGA MMBasic version 5.07.07b22
OPTION SYSTEM I2C GP14,GP15
OPTION COLORCODE ON
OPTION KEYBOARD GR
OPTION SDCARD GP13, GP10, GP11, GP12
OPTION RTC AUTO ENABLE

When I use EDIT via TeraTerm now, the screen on the PicoMiteVGA goes blank briefly with each cursor movement.

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10008
Posted: 06:38pm 20 Feb 2023
Copy link to clipboard 
Print this post

  Quote  When I use EDIT via TeraTerm now, the screen on the PicoMiteVGA goes blank briefly with each cursor movement.


On b22?

Try OPTION CPUSPEED 252000
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3989
Posted: 07:40pm 20 Feb 2023
Copy link to clipboard 
Print this post

  matherp said  
  Quote  When I use EDIT via TeraTerm now, the screen on the PicoMiteVGA goes blank briefly with each cursor movement.


On b22?

Try OPTION CPUSPEED 252000

b22's fine for me at the default speed, though as yet I only have short bits of test code. I'm not seeing any blanking in edit.

I tried screen and putty. (Haven't used TeraTerm.)

John
 
     Page 3 of 5    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025