Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:22 08 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 : PicoMite/PicoMiteVGA V5.07.03 release candidates

     Page 5 of 9    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10055
Posted: 09:00am 06 Jan 2022
Copy link to clipboard 
Print this post

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

V5.07.03RC9
Increased the maximum display width in OPTION DISPLAY to 240 characters
POKE DISPLAY command [,data1] [,data2] .... [,datan]
This command sends commands and associated data to the display controller for a connected display.
This allows the programmer to change parameters of how the display is configured
e.g. POKE DISPLAY &H28 will turn off an SSD1963 display and POKE DISPLAY &H29 will turn it back on again.

It is up to the Basic programmer to read and understand the datasheet for the display in use to make use of the command
Works for all displays except ST7790 and GDEH029A1
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4845
Posted: 09:40am 06 Jan 2022
Copy link to clipboard 
Print this post

REMOVED - wrong thread
Edited 2022-01-06 19:46 by Volhout
PicomiteVGA PETSCII ROBOTS
 
fred777
Regular Member

Joined: 01/07/2021
Location: United Kingdom
Posts: 57
Posted: 01:51pm 06 Jan 2022
Copy link to clipboard 
Print this post

  matherp said  
POKE DISPLAY command [,data1] [,data2] .... [,datan]

The POKE DISPLAY Command is great!
Here its used to setup an SSD1963based VGA Adapter to 640x480@60Hz
OPTION LCDPANEL SSD1963_5A, LANDSCAPE generates a timing that
my vga monitor acceps without complaining and then I run the InitVGA() routine
Now if I only could tell MMBasic that the display is only 640 pixels wide...  


DIM Integer A
DIM Integer B
DIM Integer I
DIM Integer J
DIM Integer K

DIM Integer X
DIM Integer Y
DIM Integer C


CONST Xpixels = 640                                         'max is 864
CONST Ypixels = 480                                         'max is 480
CONST Npixels = Xpixels * Ypixels

CONST Hbackporch = 48
CONST Hfrontporch = 16
CONST Hsyncwidth = 96
CONST Vbackporch = 33
CONST Vfrontporch = 10
CONST Vsyncwidth = 2
CONST Verticallines = Ypixels + Vbackporch + Vfrontporch + Vsyncwidth
SUB InitVGA()
 POKE display &H01  'Software reset
 PAUSE 40

 POKE display &HE2,99,4,&H54  'Configure VCO and PLL

 POKE display &HE0,&H01  'Start PLL
 PAUSE 10
 POKE display &HE0,&H03  'Lock PLL
 POKE display &H01  'software reset

 'Set LCD Mode
 'TFT mode
 'horizontal size=640-1
 'vertical   size=480-1
 i = xPixels-1
 j = yPixels-1
 POKE display &HB0,&H24,&H00,i>>8,i,j>>8,j,&H00

 'Set data bus format - 8bit data bus
 POKE display &HF0,&H00

 'Set pixel clock to 25 MHz LCDC_FPR=  $3FFFF ;  =PLL/4
 POKE display &HE6,&H03,&HFF,&HFF

 'Change RGB to BGR Mode
 POKE display &H36,&B00001000

 'Set horizontal porch timing:  total=760, BackPorch=68, SyncWidth=16
 i = xPixels+hBackPorch+hFrontPorch+hSyncWidth-1  'HT=total h period
 j = hBackPorch+hSyncWidth  'HPS position of active data
 k = hSyncWidth
 POKE display &HB4,i>>8,i,j>>8,j,k,&H00,&H00,&H00

 'Set vertical timing:  VBP=19, Sync=8
 i = yPixels+vBackPorch+vFrontPorch+vSyncWidth-1
 j = vBackPorch+vSyncWidth       'VPS
 k = vSyncWidth
 POKE display &HB6,i>>8,i,j>>8,j,k,&H00,&H00

 'Set column address  0..639
 i = xPixels-1
 POKE display &H2A,&H00,&H00,i>>8,i

 'Set page address   0..479
 i = yPixels-1
 POKE display &H2B,&H00,&H00,i>>8,i

 POKE display &H13  'Enter normal mode
 POKE display &H38  'Exit idle mode
 POKE display &H29  'Set Display ON
END SUB

Edited 2022-01-06 23:52 by fred777
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10055
Posted: 05:37pm 06 Jan 2022
Copy link to clipboard 
Print this post

  Quote  Now if I only could tell MMBasic that the display is only 640 pixels wide...  


That can be in the next release


POKE DISPLAY HRES n
POKE DISPLAY VRES m

Please provide a line to the SSDVGA adapter - sounds interesting
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10055
Posted: 06:04pm 06 Jan 2022
Copy link to clipboard 
Print this post

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

V5.07.03RC10

Automatically resizes compatible terminal programs to match the OPTION DISPLAY parameters
New command LOAD JPG
LOAD JPG fname$ [,xleft%] [,ytop%]
This loads a jpg to the display. Like the CMM2 it does not support progressive jpg. Unlike the CMM2 it doesn't care how big the jpg is and whether it exceeds the screen limits
POKE DISPLAY HRES n
POKE DISPLAY VRES m
Allows you to override the display limits. Like the rest of the POKE DISPLAY commands (and POKE in general) use with care and don't blame me for the consequences

Thanks to Rich Geldreich et al for the jpg decoder
Edited 2022-01-07 04:34 by matherp
 
fred777
Regular Member

Joined: 01/07/2021
Location: United Kingdom
Posts: 57
Posted: 07:48pm 06 Jan 2022
Copy link to clipboard 
Print this post

  matherp said  
Please provide a line to the SSDVGA adapter - sounds interesting


There are a couple of them:
VM8
VMB
Rayslogic DVI
Rayslogic VGA
(last one is the one I'm using)
 
fred777
Regular Member

Joined: 01/07/2021
Location: United Kingdom
Posts: 57
Posted: 08:06pm 06 Jan 2022
Copy link to clipboard 
Print this post

  matherp said  
V5.07.03RC10
POKE DISPLAY HRES n


A litte bug in POKE DISPLAY HRES and VRES
The do set the HRES/VRES limits but also throw a syntax error:


PicoMite MMBasic Version 5.07.03RC10
Copyright 2011-2021 Geoff Graham
Copyright 2016-2021 Peter Mather

> ?mm.hres
800
> poke display hres 640
Error : Syntax
> ?mm.hres
640
>
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10055
Posted: 10:35pm 06 Jan 2022
Copy link to clipboard 
Print this post

  Quote  The do set the HRES/VRES limits but also throw a syntax error:


?




Edited 2022-01-07 08:37 by matherp
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3994
Posted: 10:43pm 06 Jan 2022
Copy link to clipboard 
Print this post

fred777 - CR with LF perhaps

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10055
Posted: 10:45pm 06 Jan 2022
Copy link to clipboard 
Print this post

Try downloading again with clear cache. I did update the download, perhaps you got the earlier version
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2398
Posted: 12:59am 07 Jan 2022
Copy link to clipboard 
Print this post

hi peter,
   have just (for the first time for any micromite) hooked up an SD card to the pico. it is pretty neat   :-)   but i do see how some folks find the continuous resets after each option change to be a bit of a pain.

so a suggestion - i know it is a bit late in the game for this:

if an OPTION statement ends with a semicolon (like a PRINT statement can), then have that option not applied immediately, but instead 'queued up' to be applied at the next restart.

this would then allow someone to construct a short program consisting of:
OPTION something GP1, GP2;
OPTION whatever SD1234, GP7, GP8, GP9, ABC;
OPTION SDCARD GP12


which when run will queue the options, but only reset the micromite once the last OPTION statement (without the semicolon) is reached. it would, of course,  be up to the user to ensure that the various options were all correct and not in conflict.

this would have the added bonus that a single program could contain several sets of (already tested) options that could be selected amongst via user input.

just an idea...


cheers,
rob   :-)


p.s. i'd also love to see FLASH OVER n made available as an alias for FLASH OVERWRITE n. oh, and tab-key filename completion at the command prompt!
Edited 2022-01-07 11:02 by robert.rozee
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6218
Posted: 01:12am 07 Jan 2022
Copy link to clipboard 
Print this post

  robert.rozee said  hi peter,
   have just (for the first time for any micromite) hooked up an SD card to the pico. it is pretty neat   :-)   but i do see how some folks find the continuous resets after each option change to be a bit of a pain.

so a suggestion - i know it is a bit late in the game for this:


When I get around to making the next beta of MMEdit available, you can do it all with one simple script dragged onto the "control centre"
Mine is
'target port\com9:115200 s\command settime
option reset
'reconnect 3
flash erase all
'nap 3
var clear
'echo system cleared

'echo CPU speed changing - com port will reset
OPTION CPUSPEED 250000
'reconnect 5
OPTION SYSTEM SPI 14,15,16
'reconnect 5
OPTION SDCARD 17
'reconnect 5
OPTION LCDPANEL ILI9341,L,10,11,12
'reconnect 5
OPTION TOUCH 19,20
'reconnect 5
GUI CALIBRATE 0, 250, 504, 925, 747
'reconnect 5
'echo All done!

Precede that with drag and drop the UF2 file to do the update and the whole process takes less than 30 seconds.

GFXterm could be adapted to do the same script handling.

Jim
VK7JH
MMedit
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2398
Posted: 01:43am 07 Jan 2022
Copy link to clipboard 
Print this post

  TassyJim said  ...
GFXterm could be adapted to do the same script handling.


GFXterm doesn't run scripts, nor does it make serial connections without user intervention. it is just a VT100 (well, 102) terminal emulator.


cheers,
rob   :-)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10055
Posted: 09:01am 07 Jan 2022
Copy link to clipboard 
Print this post

  Quote  so a suggestion - i know it is a bit late in the game for this:


About 6 hours work for marginal benefit and high probability of f...up so no

  Quote  i'd also love to see FLASH OVER n made available as an alias for FLASH OVERWRITE n


Sorry I didn't realise typing 5 extra characters was so onerous  

  Quote  oh, and tab-key filename completion at the command prompt!


Now you are just being silly
 
fred777
Regular Member

Joined: 01/07/2021
Location: United Kingdom
Posts: 57
Posted: 09:36am 07 Jan 2022
Copy link to clipboard 
Print this post

  matherp said  I did update the download, perhaps you got the earlier version

Right, I really had the earlier RC10 version.
Works nicely now, thanks ever so much!    
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4845
Posted: 09:40am 07 Jan 2022
Copy link to clipboard 
Print this post

@Peter,

The VGApicomite is mentioned as a CMM1 successor (cheaper and available).
Is it possible to bring it closer to the CMM1 in following perspective:

Replace the 7 flash slots with a small files system.

The CMM1 has internal flash available for a A drive. The SD card is the B drive.
So when there is no SD card the system can stand alone work with the A drive.
I know it is not much different from having flash slots, but a small A drive would be more versatile (you can store 10 small files in 50k, but you can't do than in the 500k we have avaiable, since there are only 7 slots).

What I do like about the VGA mite is the standard resolution. That is not important on a CRT, but LCD screens do not like the CMM1 resolution.

The implementation of the 40 pin pico headers on the board is nice. This is 2022, not 2010 where you must implement a Arduino compatible header.

I like about the VGA mite is that video is on the other ARM, and that we still have 4 PIO sequencers left to play with and an interesting amount of GPIO.

Peter, you have proven before to do the impossible (pico make VGA, pico run from flash), the internal filesystem may be the cherry on the cake (and it also frees up one command/function slot...hihi).

Still dedicated to MMBasic,

Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4249
Posted: 10:02am 07 Jan 2022
Copy link to clipboard 
Print this post

  robert.rozee said  have just (for the first time for any micromite) hooked up an SD card to the pico. it is pretty neat   :-)   but i do see how some folks find the continuous resets after each option change to be a bit of a pain.


As a developer, early-adopter and frequent firmware updater I also find this to be a bl**dy nuisance on the PicoMite and to a lesser extent the CMM2. Also as Rob has pointed out before, reconnecting on Linux is non-trivial because the device/file mapping has usually changed when the 'mite comes back up. Rob did you ever resolve this ? Does the output of 'dmesg' provide enough information to identify whether current device B is the same as earlier device A ?

Peter, whilst I have to accept your assertion that the "ship has sailed" for the PicoMite and CMM2 perhaps you could take this issue under consideration for the WhateverComesNextMite ?

I'm not sure if Rob's semi-colon syntax has legs, I'd maybe consider that such options have to be set using a sub-command OPTION SYSTEM foo and it is then understood that that they only come into effect on the next restart.

  robert.rozee said  oh, and tab-key filename completion at the command prompt!


Under consideration for MMB4L but to be honest the MMBasic command-prompt whilst fully implemented isn't really necessary for anything other than debugging as with the PATH correctly set you can run programs directly from the Linux terminal and type 'mmbasic myprogram.bas' instead of 'run "myprogram.bas"' ... and if you add '#!/path/to/mmbasic' to the start of the .bas file and flag it as executable you can just type 'myprogram.bas' to run it.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4845
Posted: 10:21am 07 Jan 2022
Copy link to clipboard 
Print this post

Hi Tom,

This works for me:

udev rules

My picomite always returns as a picomite now under linux, regardless the /dev/tty* designator.

But the disconnect and manual reconnect (restart Putty) remains needed.

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10055
Posted: 10:21am 07 Jan 2022
Copy link to clipboard 
Print this post

  Quote  As a developer, early-adopter and frequent firmware updater I also find this to be a bl**dy nuisance on the PicoMite and to a lesser extent the CMM2.


Nobody does more updates than me in the course of development

Firstly, flashing new firmware does not overwrite the options unless I specifically force it (clear_flash no longer needed) and I haven't done this for some time

If I need to reset options I just type OPTION LIST do the reset and then just copy the listing as the new commands - time lost < 30 seconds. Same for setting up a new Pico: Option list on one, plug in the new one and paste the commands.

I'm sorry if Linux can't cope with simple things like this but I don't accept its limitations should drive my development effort

Check the windows market share 73% of the world won't have an issue (2% use Linux)
Edited 2022-01-07 20:26 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4249
Posted: 10:31am 07 Jan 2022
Copy link to clipboard 
Print this post

  matherp said  Check the windows market share 73% of the world won't have an issue (2% use Linux)


Exactly how many secretaries, admin staff, executives and JavaScript jockeys are you expecting to flash a 'mite ?

EDIT: ... not forgetting all those for whom a computer is merely a web-browser, email client and entry point to social media and streaming services.

"Don't try to frighten us with your sorcerer's ways, Lord Peter. Your sad devotion to that ancient religion (Windows) has not helped you conjure up the stolen data ..."



All fun and games,

Tom
Edited 2022-01-07 20:35 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
     Page 5 of 9    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025