Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : PicoMite V6.01.00 betas

   Page 14 of 14    
Posted: 09:59am
01 Oct 2025
Copy link to clipboard
Volhout
Guru



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

Volhout
 
Posted: 10:30am
01 Oct 2025
Copy link to clipboard
matherp
Guru

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.
 
Posted: 11:23am
01 Oct 2025
Copy link to clipboard
Volhout
Guru

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
 
Posted: 11:31am
01 Oct 2025
Copy link to clipboard
Plasmamac
Guru


Can we have the loaddata / savedata command from cmm2 please?
 
Posted: 11:15am
03 Oct 2025
Copy link to clipboard
matherp
Guru

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$)
 
Posted: 09:49pm
03 Oct 2025
Copy link to clipboard
EDNEDN
Senior Member

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) )
 
Posted: 07:41am
04 Oct 2025
Copy link to clipboard
Amnesie
Guru

  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  
 
Posted: 07:58am
04 Oct 2025
Copy link to clipboard
Mixtel90
Guru


Mandarin might have been more of a challenge...  ;)
 
Posted: 04:28pm
04 Oct 2025
Copy link to clipboard
matherp
Guru

  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
 
Posted: 07:35pm
04 Oct 2025
Copy link to clipboard
WhiteWizzard
Guru

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
 
   Page 14 of 14    


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025