Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:08 10 Jan 2026 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 V6.02.00 release candidates - Structured types

     Page 2 of 6    
Author Message
bfwolf
Senior Member

Joined: 03/01/2025
Location: Germany
Posts: 131
Posted: 06:03pm 05 Jan 2026
Copy link to clipboard 
Print this post

This isn't meant to be an argument or pleed for integrating SQLite into MMBasic — I already mentioned that in my previous post — but the Pico(2) would have enough performance, and with external PSRAM, enough RAM to run SQLite on its own (as a single application running e.g. as a networked server). And with an SD-card there would even be enough permanent storage.

If I think back a "few years back": in the mid-90s, we ran Linux or Windows 3.1 on a 486DX2-66 (single-core!) with 8MB of RAM,    and possibly even Win95 with 16MB.
I suspect a Pico2 with 150MHz per core would deliver the same processing power.

And years before that, Unix was run with less powerful CPUs and less RAM.

Anyone who's interested should try the following (I recently found it while searching for interesting projects on Google):

https://github.com/lurk101/pshell
"A tiny shell for Pico and Pico2, with file system, Vi and C compiler"

The C-compiler (running on the Pico!) is an optimizing compiler and can run C-programs directly as a "script", but it can also generate executable binaries that are then run from the shell. LittleFS is also included.

I've tried it out: A few minor bugs, but "generally very promising"..

Have fun!
Edited 2026-01-06 04:05 by bfwolf
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5602
Posted: 06:28pm 05 Jan 2026
Copy link to clipboard 
Print this post

@Peter,

Tested RP2040 VGA with 60200rc0.
- Kong crashes (still have to find out why, maybe a reserved keyword)
- Frequency Counter 2 won't count. This code was written in the beginning of PIO CONFIGURE, maybe something in this format has changed. When I used PIO INIT MACHINE it works fine. I will try to find out what parameter has changed in PIO CONFIGURE since the introduction. So this is basically solved.

Not bad. Tested some 20 programs. Only thing not tested is WII controllers on games.

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10838
Posted: 06:33pm 05 Jan 2026
Copy link to clipboard 
Print this post

Post the frequency counter code, both versions and I'll have a look
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5602
Posted: 08:44pm 05 Jan 2026
Copy link to clipboard 
Print this post

Solved,

It was caused by line wrap.
Now PIO CONFIGURE also works.

Volhout
PicomiteVGA PETSCII ROBOTS
 
damos
Regular Member

Joined: 15/04/2016
Location: Australia
Posts: 81
Posted: 11:45pm 05 Jan 2026
Copy link to clipboard 
Print this post

The problem is that any decent sized project involves processing of data. For small projects that just control a bit of hardware it is completely unnecessary, but when the problem gets harder, there is always a data processing component.

My last project was a telescope tracker and I had databases of constellations, NGC objects, visible stars etc. I was forced to use separate files and parse those into arrays. To search for objects I needed to match a value from one array and get its index then used the matching values from the other arrays. The struct features improves this massively as I can have it all in one neat array. Without JSON serializers and deserializers, I still need to parse the files and read them into an array of structs. With a deserializer that becomes 1 line of code and a fair amount of what you want a database for is available.

The database allows me to have much larger datasets and only read into memory what I need. I could run a query that returns all the NGC objects is a segment of the sky. It allows me to query across multiple columns and sort the results. This is a huge leap forward. SQLite is quite small and while it should not be built into the interpreter, having it as an add-on is really worthwhile. A typical database may only be a few hundred kb, but it means that only a few kb of RAM is required to solve the problem.

For my next project I was going to use MAUI but will consider a Pico. Picos are great because they boot almost instantly and support touch screens and the UI implementations are much easier. You can also get really professional UIs by designing the components using professional tools and using bitmaps for everything. This project really needs a database because there is so much data to manage.

The project is a DCC model railway controller where I want to program in timetables and have it automate them. I need to document every section of track, calculate distances and times, know the train configurations and locations of sensors so it can work out where all the trains are. It needs to be able to determine the speeds for each train given the section of track and other trains around it. It also needs to automate operation of level crossings etc. I don't want to hard-code anything, which means the data needs to be configured somewhere and the data read by the program.
Edited 2026-01-06 09:47 by damos
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4191
Posted: 11:54pm 05 Jan 2026
Copy link to clipboard 
Print this post

The SQLite3 I found is over 600KB, which in the context of a Pico I struggle to describe as "quite small".

John
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3546
Posted: 12:57am 06 Jan 2026
Copy link to clipboard 
Print this post

  damos said  For my next project I was going to use MAUI but will consider a Pico.


How much space is available for a csub on the RP2350? How about tinydb, said to be 25-35KB installed: https://tinydb.readthedocs.io/

1800 lines of code (with about 40% documentation).

Would need to have your favorite AI rewrite it from python to C.

But ... maybe the source code isn't available or isn't open source. Then have your favorite AI write C code to the API spec. That would be a worthy exercise.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10838
Posted: 08:22am 06 Jan 2026
Copy link to clipboard 
Print this post

V6.02.00 functionality is closed. I'm just waiting a few days for any further issues to be raised and then it will be ready for release. Geoff has already updated the manual ready so we are ready to go.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5602
Posted: 08:31am 06 Jan 2026
Copy link to clipboard 
Print this post

@Peter,

Imaged a Game*Mite with 6.02.00rc0 successfully. Tonight will do some more testing.
Currently at work.

This is the shortest design cycle ever for PicoMite. 6.01.00 before Christmas, 6.02.00 at January 12 ?

Volhout
Edited 2026-01-06 18:32 by Volhout
PicomiteVGA PETSCII ROBOTS
 
karlelch

Guru

Joined: 30/10/2014
Location: Germany
Posts: 310
Posted: 08:36am 06 Jan 2026
Copy link to clipboard 
Print this post

@Peter

the robot and sensor code I am currently working on (and which heavily relies on TYPES) is running smoothly with the release candidat. Thanks!

Best
Thomas
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8430
Posted: 09:39am 06 Jan 2026
Copy link to clipboard 
Print this post

@damos
I'm (stubbornly 'cos I'm like that) sticking with my "no SQL" stance. I don't think it's feasible on the Pico as you haven't got any user RAM at runtime other than what's available in the variables area and that's limited. The entire database has to be on either A: (for speed) or B: (for size). Consequently the most efficient way to access it is to use a "world" random access file on a SD card and several index files on A:. You could interface this system to structs, probably, using routines. You can read and update the index files very fast, rewriting the records of "world" to its SD card as and when necessary.
Mick

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

Joined: 03/01/2025
Location: Germany
Posts: 131
Posted: 10:33am 06 Jan 2026
Copy link to clipboard 
Print this post

  Mixtel90 said  @damos
I'm (stubbornly 'cos I'm like that) sticking with my "no SQL" stance. I don't think it's feasible on the Pico as you haven't got any user RAM at runtime other than what's available in the variables area and that's limited. The entire database has to be on either A: (for speed) or B: (for size). Consequently the most efficient way to access it is to use a "world" random access file on a SD card and several index files on A:. You could interface this system to structs, probably, using routines. You can read and update the index files very fast, rewriting the records of "world" to its SD card as and when necessary.


I completely agree!

The new features introduced by Structs now allow you to program small databases directly in BASIC. Peter has also added some great Struct commands and functions for this purpose (Find, Sort, etc.). So, if you don't absolutely insist on using SQL, this works just fine.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2917
Posted: 10:58am 06 Jan 2026
Copy link to clipboard 
Print this post

OPTION LCDPANEL VIRTUAL_C,GP16,GP18 on RP2040 issue continues on RC0, see other thread.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10838
Posted: 03:49pm 06 Jan 2026
Copy link to clipboard 
Print this post

V6.02.00RC1


PicoMiteV6.02.00RC1.zip

Fixes issue with virtual drivers
Edited 2026-01-07 02:45 by matherp
 
bfwolf
Senior Member

Joined: 03/01/2025
Location: Germany
Posts: 131
Posted: 03:57pm 06 Jan 2026
Copy link to clipboard 
Print this post

  phil99 said  OPTION LCDPANEL VIRTUAL_C,GP16,GP18 on RP2040 issue continues on RC0, see other thread.


What are you trying to achieve by adding 'GP16,GP18' to 'VIRTUAL_C'?

The manual only mentions 'OPTION LCDPANEL VIRTUAL_C'.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5602
Posted: 06:36pm 06 Jan 2026
Copy link to clipboard 
Print this post

@Peter,

The Game*Mite game Lazercycle does not cooperate well with 6.02.00rc0.

RUN
[1127] Dim CTRLS_TO_POLL$(Max(1, num_poll% - 1))
Error : Unexpected text: )


When I hard code the DIM it works, but not with the size variable in it.

RUN
[128] Call driver$, ctrl.OPEN
Error : Unknown user subroutine


Maybe variable the ctrl.OPEN is seen as a structure member. Unless I am mistaken, it is not caused by "driver$" since that method is used in Petscii as well, but Petscii runs fine, also on Game*Mite.

Tom used xxx.yyy format a lot for all kind of things in this game.
It will be huge task to convert. So I did not dig deeper into it.
I may have to revert to 6.01.00 for Game*Mite, -or- re-write the game.
During Christmas holidays, I proved everything works on Game*Mite with 6.01.00.

I checked both 2040 and 2350 on Game*Mite, and they show the same problem.

Regards,

P.S. I would attach the ZIPped game, but I assume you do not have a Game*Mite. So it is not use, since there is no keyboard abstraction, it needs buttons attached to the right pins.

Volhout
Edited 2026-01-07 04:48 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10838
Posted: 07:02pm 06 Jan 2026
Copy link to clipboard 
Print this post

I've got a mock up game*mite so please post the game. Should be an easy fix.
Note the structure code has been extensively tested with variable names and function names with dots in them - that isn't an issue.
UPDATE
I've fixed the DIM bug
This works fine so I need the full program. It definitely works on 6.01.00?
Dim integer test.OPEN=75
Dim s$="fred"
Call s$,test.OPEN
Sub fred x%
Print x%
End Sub

Edited 2026-01-07 05:46 by matherp
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2917
Posted: 07:47pm 06 Jan 2026
Copy link to clipboard 
Print this post

  bfwolf said  What are you trying to achieve by adding 'GP16,GP18' to 'VIRTUAL_C'?
The firmware was adding those pins, not me.

Footnote added 2026-01-07 06:17 by phil99
Thanks Peter.
VIRTUAL_C tested on RC1, all ok.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10838
Posted: 07:48pm 06 Jan 2026
Copy link to clipboard 
Print this post

  Quote  The firmware was adding those pins, not me

Just a typo in option list. Fixed in RC1 above
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5602
Posted: 07:48pm 06 Jan 2026
Copy link to clipboard 
Print this post

Hi Peter,

Here you are, direct copy from the GM distro.

lazer-cycle.zip

Volhout
PicomiteVGA PETSCII ROBOTS
 
     Page 2 of 6    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026