Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:20 02 Nov 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 V6.01.00 betas

     Page 14 of 15    
Author Message
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5405
Posted: 09:59am 01 Oct 2025
Copy link to clipboard 
Print this post



I will replace my MMBasic code with the implemented drivers. More compact, and probably  faster.

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10540
Posted: 10:30am 01 Oct 2025
Copy link to clipboard 
Print this post

V6.01.00b17

PicoMiteV6.01.00b17.zip

New function by popular request

TRIM$(source$ [,mask$] [,where/where$])


This function can remove characters from the beginning or end of a string or both
source$ is the input string
mask$ is a string containing a list of character to be removed. If omitted it defaults to space
where/where$ can be L, R, or B or a string beginning with L, R, or B to specify characters should be removed from the left of the source, the right of the source or both. If omitted defaults to L





  Quote  I will replace my MMBasic code with the implemented drivers. More compact, and probably  faster.

I haven't changed anything it just works for me. My Wii Classic is genuine, my Nunchuck probably not.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5405
Posted: 11:23am 01 Oct 2025
Copy link to clipboard 
Print this post

Peter,

I will re-test. My classic is a clone, my nunchuck is a genuine one (white one). This nunchuck requires a different "decription off" sequence than the black ones, and maybe the clones.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 594
Posted: 11:31am 01 Oct 2025
Copy link to clipboard 
Print this post

Can we have the loaddata / savedata command from cmm2 please?
Plasma
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10540
Posted: 11:15am 03 Oct 2025
Copy link to clipboard 
Print this post

V6.01.00b18


PicoMiteV6.01.00b18.zip


Minor internal changes
DE USB keyboard should now return codes 200-209 for accented keyboard characters with normal input (input$/inkey$)
 
EDNEDN
Senior Member

Joined: 18/02/2023
Location: United States
Posts: 240
Posted: 09:49pm 03 Oct 2025
Copy link to clipboard 
Print this post

In memory.c there is a function defined:


// test the stack for overflow - this is a NULL function in the DOS version
void __not_in_flash_func(TestStackOverflow)(void)
{
   uint32_t y = __get_MSP();

   if (y < HEAPTOP)
       error("Stack overflow, expression too complex at depth %", g_LocalIndex);
}


I've been scratching my head trying to understand this for the last half of an hour.   It looks to me like this won't detect a stack overflow until the stack eats all the way through the entire heap.   Any minor incursion of the stack into the heap will go unnoticed.  

Shouldn't the test be:

   if (y < (HEAPTOP + HEAP_MEMORY_SIZE) )
       error("Stack overflow, expression too complex at depth %", g_LocalIndex);


Also, some of the complexity of the inline assembly code in __get_MSP() could be removed and the code speed up with something like:


// test the stack for overflow - this is a NULL function in the DOS version
void __not_in_flash_func(TestStackOverflow)(void)
{
   uint32_t y = 0;

   if ( (int) &y < (HEAPTOP + HEAP_MEMORY_SIZE) )
       error("Stack overflow, expression too complex at depth %", g_LocalIndex);
}


Footnote added 2025-10-05 00:35 by EDNEDN
One more thought...    Having the program check the stack pointer against the end of the heap doesn't factor in any interrupt usage of the stack that happens outside of the check.    (ie. there is potential interrupt activity winding up the stack while this program logic is executing.)

So what ever interrupt activity the stack is expected to see probably should be addressed by the check.   Perhaps something similar to:


if ( (int) &y < (HEAPTOP + HEAP_MEMORY_SIZE + 0x20) )
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 711
Posted: 07:41am 04 Oct 2025
Copy link to clipboard 
Print this post

  matherp said  V6.01.00b18


PicoMiteV6.01.00b18.zip


Minor internal changes
DE USB keyboard should now return codes 200-209 for accented keyboard characters with normal input (input$/inkey$)


Peter, thank you a lot! This works fantastic!      




For those German people here, you can test it with my testprogram, which includes
Martins custom font:

german_chars_usb.zip

what an awesome update  
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8253
Posted: 07:58am 04 Oct 2025
Copy link to clipboard 
Print this post

Mandarin might have been more of a challenge...  ;)
Mick

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

Joined: 11/12/2012
Location: United Kingdom
Posts: 10540
Posted: 04:28pm 04 Oct 2025
Copy link to clipboard 
Print this post

  Quote  I've been scratching my head trying to understand this for the last half of an hour.   It looks to me like this won't detect a stack overflow until the stack eats all the way through the entire heap.   Any minor incursion of the stack into the heap will go unnoticed.  


MMBasic doesn't use the heap at all and as far as I can tell only USB uses it and that is small (256 bytes?) (ignoring the WebMite). The message is terminal in any case so it is really only there to let the user know what might be causing them an issue
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2959
Posted: 07:35pm 04 Oct 2025
Copy link to clipboard 
Print this post

Hi Peter,

Have issues with GUI TEST LCDPANEL in b18 in that it tries to draw the first circle but fails. Not hanging the PicoMite BUT is hanging the screen (and no subsequent graphics commands work with the screen).

Hardware is official RPi Pico 2 (i.e. RP2350A) and running the standard version (i.e. NOT USB, HDMI, nor VGA).

Using a ST7796S display. Has been ok on previous beta versions that I've tried

Also noticed that with TOUCH (FT6336) configured, and SD card, then 'DRIVE "B:"' gave a 'TOUCH NOT CONFIGURED' message; NOT an issue after I configured Touch, just a bit surprised about seeing that message (it is FYI in case it uncovers other stuff for you).

PicoMite MMBasic RP2350A V6.01.00b18
OPTION SYSTEM SPI GP18,GP19,GP16
OPTION SYSTEM I2C GP10,GP11
OPTION AUTORUN  ON
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 150000
OPTION LCDPANEL ST7796S, LANDSCAPE,GP15,GP14,GP13,GP12,INVERT
OPTION TOUCH FT6336 GP8,GP9,,40
GUI CALIBRATE 1, 9, 305, 10344, -9848
OPTION SDCARD GP22


*********************************** UPDATE ********************************
same setup on one of your 64pin DIL modules and GUI TEST LCDPANEL works ok!


*********************************** UPDATE 2 ********************************
Listing OPTIONS between your DIL module and the official RPi Pico 2, I noticed your module also had OPTION PICO OFF. I added this to the official RPi options (as listed above) and all worked.

Not sure what is happening with PICO OFF, but maybe something that helps you?
Will investigate more......
Edited 2025-10-05 06:05 by WhiteWizzard
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10540
Posted: 04:27pm 08 Oct 2025
Copy link to clipboard 
Print this post

V6.01.00b19


PicoMiteV6.01.00b19.zip


This will be the last beta with functional changes. Assuming all is well the next step is to go to release candidate status and start the work of updating the manual.

This version contains a lot of internal changes and it would be greatly appreciated if you would throw everything at it to test it as thoroughly as possible.

The new functionality mostly revolves around the buffered SSD1963 displays. These now support OPTION LCD320 ON/OFF. This converts the display from 400x240 to 320x240 and centers the image.

In addition if the display is configured using the OPTION LCDPANEL command as ssd1963_5_buff, ssd1963_7_buff, ssd1963_5_16buff, or ssd1963_7_16buff then you can use the new command:
MODE 800/400.
This switches without rebooting between 800x480 and 400x240 modes.

Finally this version supports ON ERROR RESTART which does what it says. Any error in a program will cause the Pico to reset and, of course, if you have OPTION AUTORUN set the program will restart cleanly
Edited 2025-10-09 03:11 by matherp
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1040
Posted: 02:14am 09 Oct 2025
Copy link to clipboard 
Print this post

Hi Peter,
V6.01.00b19 testing.

The code below is OK in 6.00.03 but some issues in B19.
1. LOCAL array%(100%) is not trapped in the main program, just seems to ignore it.
2. When it is correct i.e. DIM used then line
  LongString Print #1, array%()
  causes the error below.


> run
Error: Invalid address - resetting



 On error skip
 Mkdir "/tmp"

 LOCAL array%(100)
 'Dim array%(100)
 LongString Append array%(), "Hello World"
' LongString Print  array%()
 Open ("/tmp") + "/tst_longstring-test_print.txt" For Output As #1
 LongString Print #1, array%()  'causes Error: Invalid address - resetting
'  LongString Print  array%()
 Close #1

 Open ("/tmp") + "/tst_longstring-test_print.txt" For Input As #1
 Dim s$
 Line Input #1, s$
 Print s$
 Print Eof(#1)
 Close #1
Print "DONE"


Edited 2025-10-09 13:42 by disco4now
F4 H7FotSF4xGT
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10540
Posted: 07:01am 09 Oct 2025
Copy link to clipboard 
Print this post

Thanks Gerry, will look at it. Anything else or is that stopping further testing?
UPDATE: not seeing the LONGSTRING PRINT issue (RP2040 normal version). What version are you testing on?
Edited 2025-10-09 17:12 by matherp
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1040
Posted: 07:25am 09 Oct 2025
Copy link to clipboard 
Print this post

option list
PicoMite MMBasic RP2350A V6.01.00b19

Footnote added 2025-10-09 18:40 by disco4now
Yes looks OK on the RP2040. So just the PICO2.
F4 H7FotSF4xGT
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10540
Posted: 08:50am 09 Oct 2025
Copy link to clipboard 
Print this post

Thanks. The lack of error with local was just a silly typo when I introduced the ON ERROR RESTART. The LONGSTRING PRINT bug was introduced between b10 and b11 so that may take a bit of time to track down. Here is an updated RP2350 with the LOCAL bug hopefully fixed

PicoMite.zip
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10540
Posted: 09:08am 09 Oct 2025
Copy link to clipboard 
Print this post

OK found it. Bug introduced when I enabled terminating LONGSTRING PRINT with a ; to suppress crlf. Works with a semi-colon but not without. This version should fix both bugs

PicoMite.zip
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5405
Posted: 10:22am 09 Oct 2025
Copy link to clipboard 
Print this post

@Peter,

b19 tested on 2040 VGA PS2 platform. No issue found. GM test tonight.

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10540
Posted: 10:28am 09 Oct 2025
Copy link to clipboard 
Print this post

V6.00.00b20


PicoMiteV6.01.00b20.zip


Fixes bugs identified by disco4now above

  Quote  b19 tested on 2040 VGA PS2 platform. No issue found.


Thanks
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5405
Posted: 06:28pm 09 Oct 2025
Copy link to clipboard 
Print this post

@Peter,

I have an observation, but I am not sure if you should fix it. Because this has been in MMBasic for so long that many programs would need adaptation when it is changed.

Location       CWDS$          MM.INFO(PATH)
A:/              A:/            A:/
A:/folder      A:/folder      A:/folder/

CWD$ only has a trailing "/" when in root, but not when in a folder. But MM.INFO(PATH) does have the trailing "/" always. Behavior is identical for A and B

I found this when I worked on FROGGER trying to find a location where to put the highscore. But every program that uses disk access could suffer (Game*Mite,   FileManager, many games) if this is changed, although most would use MM.INFO(PATH) to find local storage.

I suggest not to fix it, and keep the anomaly.

Volhout
Edited 2025-10-10 04:37 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5405
Posted: 06:48pm 09 Oct 2025
Copy link to clipboard 
Print this post

@Peter,

b20:
2040 VGA PS2 -> no problems found
2040 Game*Mite -> no problems found
2350 Game*Mite -> no problems found

Looks like a winner.

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