Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:17 11 Jul 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 6.00.02 prospectus

     Page 1 of 2    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10232
Posted: 11:27am 15 Jan 2025
Copy link to clipboard 
Print this post

Below is my current thinking for 6.00.02. Please let me know if I've missed any reported bugs in 6.00.01

General comments
The firmware will implement the ability to save the entire variable space to the A: drive or PSRAM (if available) and subsequently restore it.
This is completely transparent to the user although saving to the A: drive does take a second or so and there must be free space of just less than 256KB available.
This allows commands that historically have required access to the complete variable space to be run from within a program (e.g. FILES).
Specifically, this allows the implementation of a CHAIN command
When PSRAM is enabled 2MB of the available PSRAM is reserved for system use. The remaining space(typically 6MB) is available as normal MMBasic variable space
This allows 5 RAM program slots to be created and used both from within a program and at the command line.
Of course RAM program slots will not survive a power cycle but they will survive a system reset and can be loaded from within a flash based program

Bug fixes

Fixes bug in forward references in PIO assembler when the starting line number is > 1
Fixes bug in PRINT @(x,y) when outputting to a computer console
By default disables heartbeat and enables access to all pins on RP2350B
Allows selection of GP19 for PSRAM PIN

New
Supports ; at the end of LONGSTRING PRINT to suppress the CR/LF
I2C(2) OPEN now supports 1000 as a speed
FILE command can now be used in a program
CHAIN fname$,cmdline$ ' Allows the program to run another program with the variable space preserved
EDIT FILE command will now only be memory limited the same as EDIT
SAVE CONTEXT [CLEAR]' saves the variable space and optionally clears it
LOAD CONTEXT ' restores the variable space to the previously saved state
FLASH SAVE [fname$] ' the new optional parameter allows a flash slot to be loaded from disk from within a program or at the command line
RAM command (RP2350 with PSRAM only) functions like the FLASH command with 5 program slots available in PSRAM
SHIFT-F3 to F10 now work for computer console. NB: Shift-F1, F2, F11, and F12 don't appear to send codes so can't work
OPTION HEARTBEAT ENABLE [pin] 'allows the user to select a pin for a heartbeat (Specifically targeted at RP2350B)
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1575
Posted: 11:54am 15 Jan 2025
Copy link to clipboard 
Print this post

  matherp said  Supports ; at the end of LONGSTRING PRINT to suppress the CR/LF

I missed that. Thanks, much appreciated!
  Quote  FILE command can now be used in a program

FILES command can now be used in a program?

It all sounds very valuable to me.

Regards
Michael
causality ≠ correlation ≠ coincidence
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10232
Posted: 12:36pm 15 Jan 2025
Copy link to clipboard 
Print this post

I've also played with this - does it make sense?
Note that BYVAL is effectively a unary operator and must be included in the call and can't be specified in the subroutine itself

 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5056
Posted: 12:36pm 15 Jan 2025
Copy link to clipboard 
Print this post

Since I was not the only one missing the layer L being a normal framebuffer in mode 1, there may be merit in adding this functionality in 6.00.02.

Giving that mode 1 is 1 bpp (black/white) the functionality to use black as transparent color in L would only cost 1 ARM instruction (N logicOR L) when reading the next row of pixels from memory. I understand it would eat much more resources when you would need to color analyze the tiles. That could be difficult real time. But the single OR might fit assuming "black = transparent".

I am not sure we would ever need to have L and F both when they have identical functionality. Then you might remove it.

Volhout
PicomiteVGA PETSCII ROBOTS
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 459
Posted: 12:42pm 15 Jan 2025
Copy link to clipboard 
Print this post

PicoMiteVGA RP2040 V6.00.1
Commands

MODE 1
CLS
LOAD IMAGE file$
LOAD JPG file$

The image is loaded not from the zero position of the screen (by default), but one line below! :(
MODE 1
LOAD PNG "file.png"
Error : Expected a string
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 459
Posted: 12:45pm 15 Jan 2025
Copy link to clipboard 
Print this post

  Volhout said  Since I was not the only one missing the layer L being a normal framebuffer in mode 1
I miss this too...
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 625
Posted: 12:46pm 15 Jan 2025
Copy link to clipboard 
Print this post

Oh bugger, now I'll have to get a Pico that has/allows easy connection of PSRAM, wonder how easy/possible it'll be to unsolder a older Pico for upgrade, not very I suspect. :-(
Think I'll wait untill RP release a new stepping of 2350, which I suspect is on the way, due to the unavalability of raw chips at distributors.
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1575
Posted: 12:52pm 15 Jan 2025
Copy link to clipboard 
Print this post

  matherp said  I've also played with this - does it make sense?
Note that BYVAL is effectively a unary operator ...

Do we need that? Isn’t that identical to
a%=7
Print double((a%))
Print a%
Print double(a%)
Print a%

Function double(i%)
 i%=i%*2
 double=i%
End Function

??
Isn't a note in the manual enough?
causality ≠ correlation ≠ coincidence
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10232
Posted: 01:01pm 15 Jan 2025
Copy link to clipboard 
Print this post

LOAD PNG is not available on the RP2040 - not enough memory

  Quote  
The image is loaded not from the zero position of the screen (by default), but one line below! :(


No it isn't - just tested both
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4301
Posted: 01:07pm 15 Jan 2025
Copy link to clipboard 
Print this post

  matherp said  I've also played with this - does it make sense?
Note that BYVAL is effectively a unary operator and must be included in the call and can't be specified in the subroutine itself


I wouldn't, but <shrugs shoulders>. Is there a particular difficulty in adding adding it to the SUB prototype like VB ... though even then I do wonder whether you should.

I thought you were going to take a break, is it raining ?

Happy New Year,

Tom
Edited 2025-01-15 23:07 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10232
Posted: 01:13pm 15 Jan 2025
Copy link to clipboard 
Print this post

  Quote  Is there a particular difficulty in adding adding it to the SUB prototype like VB


Yes!!!!!!!
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4301
Posted: 01:19pm 15 Jan 2025
Copy link to clipboard 
Print this post

  matherp said  Yes!!!!!!!


It's the level of detail in your reply that I find most helpful . I'll get my coat.
Edited 2025-01-15 23:19 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 459
Posted: 01:35pm 15 Jan 2025
Copy link to clipboard 
Print this post

  matherp said  
  Quote  
The image is loaded not from the zero position of the screen (by default), but one line below! :(

No it isn't - just tested both

MODE 1
TILE Height 12
LOAD IMAGE "file.bmp"

Please check the image loading after the command TILE HEIGHT 12 ?
Edited 2025-01-15 23:58 by javavi
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10232
Posted: 02:26pm 15 Jan 2025
Copy link to clipboard 
Print this post

  Quote  It's the level of detail in your reply that I find most helpful . I'll get my coat.


You must know the code as well as me now. As far as I can see based on a quick look it would be a complex change to definedsubfun
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4301
Posted: 02:50pm 15 Jan 2025
Copy link to clipboard 
Print this post

  matherp said  You must know the code as well as me now.


I doubt that is true, you've been working with the MMBasic code much longer than I have even if I might have been programming in C longer than you.

  matherp said  As far as I can see based on a quick look it would be a complex change to definedsubfun


OK, right, so probably not a fundamental issue, just an issue of time and willingness which I quite understand, I simply don't have the time even if I could generate the will. In addition it's much harder for the PicoMite (c.f. MMB4L) since you aren't able to build MMBasic on the target platform, the build/test cycle is so much longer.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
bfwolf
Regular Member

Joined: 03/01/2025
Location: Germany
Posts: 75
Posted: 04:57pm 15 Jan 2025
Copy link to clipboard 
Print this post

  twofingers said  
  matherp said  I've also played with this - does it make sense?
Note that BYVAL is effectively a unary operator ...

Do we need that? Isn’t that identical to
a%=7
Print double((a%))
Print a%
Print double(a%)
Print a%

Function double(i%)
 i%=i%*2
 double=i%
End Function



Yes! But using an unary operater like "ByVal" would be more expressive!

  matherp said  
  Quote  Is there a particular difficulty in adding adding it to the SUB prototype like VB


Yes!!!!!!!


Maybe you should consider in advance whether using it as a "unary operator" when calling a sub/function could prevent a future use of "ByVal" in a sub/function prototype declaration?

If that were the case, perhaps use a different name for the "unary operator"? E.g. "AsVal"?

bfwolf
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1129
Posted: 06:21pm 15 Jan 2025
Copy link to clipboard 
Print this post

Suppose there were a preprocessor. Then we could
#define ByVal 0+
plus many other silly things.
Visit Vegipete's *Mite Library for cool programs.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4301
Posted: 07:31pm 15 Jan 2025
Copy link to clipboard 
Print this post

  vegipete said  Suppose there were a preprocessor. Then we could
#define ByVal 0+
plus many other silly things.


This works in MMB4L:
MMBasic for Linux x86_64 v0.7-alpha.1
Copyright 2011-2024 Geoff Graham
Copyright 2016-2024 Peter Mather
Copyright 2021-2024 Thomas Hugo Williams

> load "byval.bas"
> list
#define "ByVal", "0+"

a%=7
Print double(ByVal a%)
Print a%
Print double(a%)
Print a%

Function double(i%)
i%=i%*2
double=i%
End Function

> run
14
7
14
14
>


It should also work on the CMM2, MMBasic for Windows, and possibly the PicoMite using the "CMM2 RUN" command.

Best wishes,

Tom
Edited 2025-01-16 05:46 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3284
Posted: 06:26am 16 Jan 2025
Copy link to clipboard 
Print this post

Peter,

BYVAL is a great addition, but it really must be a qualifier in the definition of a SUB (not in its call).  If you like, I can develop the code for it so that it would be a drop in lump of code for 6.00.02.

Geoff
Geoff Graham - http://geoffg.net
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5056
Posted: 07:11am 16 Jan 2025
Copy link to clipboard 
Print this post

Geoff, Peter,

When working on 5.09.00 series, and later 6.00.00 and 6.00.01 many times there where people that where confused, because they used (the official available) 5.08.00 as published on Geoff's site. Sometimes about the firmware, sometimes about the user manual.

While progressing from 6.00.01 official release to 6.00.02 and the further future, would it be an idea to add new features to 6.00.02, but continue to update 6.00.01 with bug fixes (as happened with webmite). I refer to fixes that have no user manual impact, real bug fixes.

Maybe to explain with a practical example:
I am working on a PIO UART (3rd and 4th UART in a pico). The code can not be assembled because a bug in the pio assembler. I would rather publish a solution that works with 6.00.01 code, then a solution that is based on 6.00.02 alpha 1/2/3, where people have to search for the firmware until 6.00.02 is released.
In stead of using 6.00.02 alpha 1/2/3, I rather publish a "work around" solution based on 6.00.01, just to avoid the inevitable "where do I find that firmware ?".


What are your thoughts,

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