![]() |
Forum Index : Microcontroller and PC projects : PicoMite V6.01.00 betas
![]() ![]() |
|||||
Author | Message | ||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5306 |
![]() 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 KingdomPosts: 10453 |
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 ![]() 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: NetherlandsPosts: 5306 |
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: GermanyPosts: 593 |
Can we have the loaddata / savedata command from cmm2 please? Plasma |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10453 |
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 StatesPosts: 174 |
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: GermanyPosts: 703 |
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 KingdomPosts: 8156 |
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 KingdomPosts: 10453 |
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 KingdomPosts: 2956 |
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 |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |