Menu
JAQForum Ver 26.09

Forum Index : Microcontroller and PC projects : PicoMite V7.00.00b8 and release candidates

   Page 12 of 13    
Posted: 09:41am
14 Nov 2026
Copy link to clipboard
terekgabor
Senior Member

Hello Peter!

What is the reason of this behavior?:
PRINT “a”,”aa” will output a aa
PRINT “aa”,”aa” will output aa  aa
PRINT ”aaa”,”aa” will output aaa aa, etc

If there is odd number of character in the first string comma will produce one character space between strings. If there is even number of character comma will produce two spaces (this is a TAB (set 2 in OPTION TAB).
Second string isn’t matter can be any string.

Question is the odd cases why only just one space instead of tab?

Webmite version of RC8, Picocalc.

G@bor
Edited 2026-11-14 19:42 by terekgabor
 
Posted: 10:12am
14 Nov 2026
Copy link to clipboard
Mixtel90
Guru


Comma moves the cursor to the next tab position, measured from the first column on the screen it has nothing to do with the number of spaces.

  Quote  TAB(number) Outputs spaces until the column indicated by 'number' has been reached on the console output.




TAB(2)
PRINT "a","b"
a b 'because the cursor moves to column 2 ("a" is in column 0 and "b" is in column 2)

PRINT "aa","b"
aa b 'the space is in the TAB position so "b" appears in column 3

Small numbers of TAB positions are pointless really. It's not meant for that.

OPTION TAB works differently. It has nothing to do with the commas in the printout.
  Quote  OPTION TAB 2 | 3 | 4 | 8 ✓ Set the spacing for the tab key. Default is 2.

It's for data entry, not printout.

.
Edited 2026-11-14 20:15 by Mixtel90
 
Posted: 10:28am
14 Nov 2026
Copy link to clipboard
terekgabor
Senior Member

This is clear now!

Thank you!
 
Posted: 10:31am
14 Nov 2026
Copy link to clipboard
Bleep
Guru


Hi Peter,
Just had a chance to test RC9
I am now getting a different error but am unsure what it is complaining about.
It appears to be the subscripts being used in variable fire2? I can't see anything wrong, and it works as a pure MMBasic program. It was failing on the original program I attached above, so I attempted to make changes to cure it, but it still fails with my latest incarnation, also attached.

Any advice appreciated.
Regards Kevin.

flamedemo.zip

python mmb2csub.py ../examples/flamedemo.bas animate -O2
C:\Users\Kevin\pico\mmb2csub\mmb2csub\examples\flamedemo_animate.c: In function 'f_animate':
C:\Users\Kevin\pico\mmb2csub\mmb2csub\examples\flamedemo_animate.c:42:50: error: subscripted value is neither array nor pointer nor vector
  42 |             if (((__gp___s0_fire2[(int)((*p_yi))][(int)(v_x)]) == (v_fr))) {
     |                                                  ^
C:\Users\Kevin\pico\mmb2csub\mmb2csub\examples\flamedemo_animate.c:46:48: error: subscripted value is neither array nor pointer nor vector
  46 |                 __gp___s0_fire2[(int)((*p_yi))][(int)(v_x)] = v_fr;
     |                                                ^
Traceback (most recent call last):
 File "C:\Users\Kevin\pico\mmb2csub\mmb2csub\user-tools\armcfgen.py", line 312, in <module>
   main()
   ~~~~^^
 File "C:\Users\Kevin\pico\mmb2csub\mmb2csub\user-tools\armcfgen.py", line 273, in main
   objs = [compile_c(s, args.include, args.opt, args.cpu) for s in objs]
           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\Kevin\pico\mmb2csub\mmb2csub\user-tools\armcfgen.py", line 221, in compile_c
   subprocess.run([GCC, *CPUS[cpu], "-O" + opt, *inc, "-o", obj, src], check=True)
   ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Program Files\Python313\Lib\subprocess.py", line 579, in run
   raise CalledProcessError(retcode, process.args,
                            output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['arm-none-eabi-gcc', '-c', '-mcpu=cortex-m0plus', '-mthumb', '-ffreestanding', '-fno-exceptions', '-fpie', '-mpic-data-is-text-relative', '-msingle-pic-base', '-ffunction-sections', '-fdata-sections', '-fno-jump-tables', '-O2', '-I', 'C:\\Users\\Kevin\\pico\\mmb2csub\\mmb2csub', '-I', 'C:\\Users\\Kevin\\pico\\mmb2csub\\mmb2csub\\user-tools', '-o', 'C:\\Users\\Kevin\\AppData\\Local\\Temp\\tmpekddl9jx.o', 'C:\\Users\\Kevin\\pico\\mmb2csub\\mmb2csub\\examples\\flamedemo_animate.c']' returned non-zero exit status 1.

error: the CSUB did not compile. 'undefined reference to mm_xxx' means that MMBasic feature has no CSUB runtime yet;
'undefined reference to __aeabi_xxx' means an arithmetic helper is missing from mmcsub.h. Either way the tool is telling you the
truth - do not work around it.

Edited 2026-11-14 20:45 by Bleep
 
Posted: 11:27am
14 Nov 2026
Copy link to clipboard
matherp
Guru

Thanks Kevin, two bugs in mmb2csub, both fixed . A STATIC array with two or more dimensions was given the wrong pointer type in the C. Worse, Static Integer fire2(160,20) was declared without its bounds in the BASIC wrapper the tool writes, so once it compiled the CSUB would have written past a single number. Your animate now converts. The fix is all in mmb2csub.py, so replacing that one file in your RC9 tools is enough, or take the new zip. mmb2csub also now refuses any routine with a line its translator can't handle, instead of quietly leaving the line out of the CSUB.
 
Posted: 12:00pm
14 Nov 2026
Copy link to clipboard
toml_12953
Guru

  Mixtel90 said  Comma moves the cursor to the next tab position, measured from the first column on the screen it has nothing to do with the number of spaces.

OPTION TAB works differently. It has nothing to do with the commas in the printout.
  Quote  OPTION TAB 2 | 3 | 4 | 8 ✓ Set the spacing for the tab key. Default is 2.

It's for data entry, not printout.

.


OPTION TAB sets the tab positions for the comma in a PRINT statement as well as the TAB key. I wish they were independent but they're not.

PRINT "a","b" will print differently depending on OPTION TAB.
I've modified my own copy of MMBasic to use OPTION TAB 10 (for PicoCalc) and 18 (for Pico Computer 3) as well as the standard TAB positions.
 
Posted: 12:32pm
14 Nov 2026
Copy link to clipboard
mozzie
Guru

G'day Peter,
It looks like there may still be a gremlin in the USB system, although this may be an edge-use case.

With a Combo Keyboard / Mouse on USB port 1 (USB 1/2), Generic Gamepad on USB port 2 (USB 3) and a CDC device on USB port 3 (USB 5) the PC3 will freeze the USB hub after a random interval, the PC3 is still running and will work from the console.

This seems to be random but is also sensitive to mouse usage, fast movement of the mouse is far more likely to cause the fault. It is possible that having the Keyboard / Mouse in port 4 makes it more prevalent but hard to confirm.

At times the USB stops working with no obvious signs and at others the HUB and port indicators turn off as well, only a reset / power cycle brings it back.

Voltage at the ports is 4.98V and no problems with the current setup have been noticed before, although this is with the new USB gamepad now supported.

> option list
PicoMitePC3 MMBasic USB RP2350B Edition V7.00.00RC9
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION SYSTEM I2C GP20,GP21
OPTION FLASH SIZE 16777216
OPTION COLOURCODE ON
OPTION MOUSE SENSITIVITY     1.0000
OPTION KEYBOARD US
OPTION PICO OFF
OPTION RESOLUTION 1024x600 @ 252000KHz
OPTION DISPLAY 50, 128
OPTION HDMI PINS  1, 3, 5, 7
OPTION RADIO BLUETOOTH
OPTION GUI CONTROLS 128
OPTION SDCARD GP33, GP30, GP31, GP28
OPTION AUDIO BLUETOOTH 30
OPTION RTC AUTO ENABLE
OPTION COUNT GP34,GP35,GP36,GP37
OPTION PLATFORM PICO COMPUTER 3
OPTION PSRAM PIN GP47
>


Also seeing this:
���w���/��cD�1B�� (or similar) when I power up the PC3 in TeraTerm, is this expected?
RC9 was re-loaded after flash-nuke with no change.
The Flash_Nuke_Universal also does not wipe the "A" drive.

I will re-load rc8 and see if that is different.

Regards, Lyle.

UPDATE: the CDC device is not necessary to cause the problem, the Keyboard / Mouse and Gamepad are enough, the CDC device causes it to happen earlier.
On a couple of resets, just typing a couple of keys on the keyboard will either lockup or go into auto repeat by itself.
Edited 2026-11-14 23:01 by mozzie
 
Posted: 01:42pm
14 Nov 2026
Copy link to clipboard
Bleep
Guru


Hi Peter,
Yes that's working great now thanks :-)
The rest of this post was removed, because I found out in the the docs that a Static is effectively declared as a global in the main body of the code, when it is compiled, so will have no effect on speed.
Regards Kevin.
Edited 2026-11-15 03:58 by Bleep
 
Posted: 02:19pm
16 Nov 2026
Copy link to clipboard
Bleep
Guru


Hi Peter,
Nice website :-) very impressive CV.

A Request, is it possible to add the Olimex option reset RP2350PC to the standard HDMIUSB build? because it seems a waste to have the baggage of the WiFi & Bluetooth, in the PC3 build when the Olimex doesn't have them I think the standard HDMIUSB build includes everything necessary.
I realise I might have to type this blind on a USB keyboard.
Regards Kevin.
Edited 2026-11-17 00:21 by Bleep
 
Posted: 07:24pm
16 Nov 2026
Copy link to clipboard
Pluto
Guru

Houston, I have a problem...
PAUSE does not like to wait
OPTION LIST
WebMite MMBasic RP2040 Edition V7.00.00RC8
OPTION AUTORUN  ON
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 200000
OPTION WIFI **********, ***********, PICOE6616408432
>
PAUSE 60*60*1000
Error : Number too large
> PAUSE (60*60*1000)
Error : Number too large
> ?60*60*1000
3600000
>

User manual says:
The maximum delay is 2147483647 ms (about 24 days).


Fred
 
Posted: 08:16pm
16 Nov 2026
Copy link to clipboard
terekgabor
Senior Member

Peter!

I started to think about a solution, but I don’t know it is possible to solve.
This is a new option for ON ERROR SKIP nn, or IGNORE when the error occured it is ignored or skipped nn steps, but when it is occuring a sub is calling.
Something like this:

ON ERROR IGNORE, subname
ON ERROR SKIP nn, subname.

Is this something can solve?

G@bor
 
Posted: 09:26pm
16 Nov 2026
Copy link to clipboard
Mixtel90
Guru


The ideal is to test for valid values *before* you enter routines that might throw an error. ON ERROR SKIP is pretty nasty IMHO and hides more than you want to see. ON ERROR IGNORE simply shouldn't exist as it's too dangerous and can damage data.
 
Posted: 10:40pm
16 Nov 2026
Copy link to clipboard
matherp
Guru

There is a bug in pause not running beyond about 32 minutes. Been there since the start of the Picomite - fixed ready for the next release.

I abhor ON ERROR and definitely won't be adding to it
 
Posted: 06:13am
17 Nov 2026
Copy link to clipboard
terekgabor
Senior Member

Okay! This is not my favourite also.  
 
Posted: 08:52am
17 Nov 2026
Copy link to clipboard
matherp
Guru

I'm in the process of putting together the V7.00.00 final release. If you are aware of any open bugs speak now or forever.....
 
Posted: 10:24am
17 Nov 2026
Copy link to clipboard
Volhout
Guru


Hi Peter,

I could not find it in the user manual, but is there a way to determine the start address of framebuffers (they may vary in size and start address when changing modes).
Something line MM.INFO(framebuffer address N) -or- F -or- L.

In line with mm.info(flash address 1) and mm.info(modbuff address).

Thank you

Volhout
 
Posted: 11:24am
17 Nov 2026
Copy link to clipboard
matherp
Guru

MM.INFO(WRITEBUFF)
Returns the address in memory of the current buffer used for drawing
commands.
 
Posted: 11:37am
17 Nov 2026
Copy link to clipboard
Volhout
Guru


Thanks
 
Posted: 12:07pm
17 Nov 2026
Copy link to clipboard
Volhout
Guru


@Peter,

I try to copy part of the screen memory to a flash slot, and after that read it back to screen. On VGA.

I know about BLIT MEMORY to get packed data from flash to screen, but not the other way around. Hence I tried memory copy.


> list
'test for blit to and from flash

MODE 2
'flsh=MM.Info(modbuff address)
flsh=MM.Info(flash address 1)
scrn=MM.Info(writebuff)
sze=320*120\2 'half screen at 4bpp

CLS
Box 10,10,30,30
Pause 1000

Memory copy scrn,flsh,sze
CLS
Pause 1000

Print "hello"

Pause 1000

Timer =0
Memory copy flsh,scrn,sze
Print Timer

End
>


When I use flash slot I end up with 50% white screen
When I try modbuff I end up with 25% white screen and 25% color stripes.

Looks like this is not the way to do it.

Volhout
P.S. in essence I would like to play small images fast from flash, as an animation.
Edited 2026-11-17 22:10 by Volhout
 
Posted: 12:17pm
17 Nov 2026
Copy link to clipboard
matherp
Guru

You can't write to flash memory as though it is ordinary memory. It has to be erased and programmed using specific routines FLASH DISK LOAD, FLASH LOAD IMAGE. Then if you want to memory copy from flash to a framebuffer the data in flash needs to be in the same format as the graphics mode - for mode 2 this is packed rgb121 nibbles
 
   Page 12 of 13    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026