Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 18:23 10 May 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.00.02 release candidates - all versions

     Page 39 of 44    
Author Message
JanVolk
Senior Member

Joined: 28/01/2023
Location: Netherlands
Posts: 220
Posted: 07:45pm 05 May 2025
Copy link to clipboard 
Print this post

Peter,

Now that the bugs are hopefully less common, we can possibly look at some smaller issues?
Could you adjust the code of list pins a bit so that the list is displayed in the same format on a terminal and an HDMI screen as in the code below?
The spaces or tabs are possibly passed differently and with Str$((n),2) and Str$((p),2) it is correct.
Thanks.

> list
Sub FreePins
Local n,gp$,p,pu$
For n=0 To 29
gp$="GP"+Str$((n),2)
p=MM.Info(pinno gp$)
pu$=MM.Info(pin p)
Print gp$,Str$((p),2),pu$
Next
End Sub

Greetings,

Jan.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4854
Posted: 07:55pm 05 May 2025
Copy link to clipboard 
Print this post

@Peter,

RC22 on genuine RP2040 VGA design 2 with WII Classic connected to GP14/GP15.



Just opening the WII classic, and then printing 1 dot on the screen every 100ms.
In this picture the pico is dead and needs power cycling to revive.

It is not fixed. Sorry.

Volhout
Edited 2025-05-06 05:57 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 09:28pm 05 May 2025
Copy link to clipboard 
Print this post

  Quote  It is not fixed. Sorry.


I've just run for 3 hours without issue so I'm happy it is now OK and then anything else is probably electrical. I don't intend to look at if further.
Edited 2025-05-06 07:31 by matherp
 
dddns
Senior Member

Joined: 20/09/2024
Location: Germany
Posts: 259
Posted: 11:19pm 05 May 2025
Copy link to clipboard 
Print this post

> option list
PicoMiteVGA MMBasic RP2350B Edition V6.00.02RC21
OPTION FLASH SIZE 16777216
OPTION COLOURCODE ON
OPTION KEYBOARD US
OPTION PICO OFF
OPTION RESOLUTION 800x600 @ 360000KHz
OPTION DISPLAY 50, 100
OPTION SDCARD GP41, GP40, GP39, GP42
OPTION PSRAM PIN GP47
>


I'm not complaining, just reporting: it happened the day before and today with this RC21 and with RC20, that I finished editing and left with F2. Then an error appeared saying "not enough memory" and came back with console. But during this process all of the program code from the point I left the editor gone lost like 20k and 5 hours work again :) Yesterday I swore to to always save first, today I forgot..so my fault

I think the cursor position was again at the very last column when I hit F2
Edited 2025-05-06 09:25 by dddns
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2417
Posted: 01:08am 06 May 2025
Copy link to clipboard 
Print this post

Also had that. RC21, Trying out Line Continuation in a string.
Press F2 then "not enough memory" and the rest of the program after the " _" vanished.

After checking the string length (254 characters) the complete line was too long.

OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 200000
OPTION DISPLAY 55, 155
OPTION LCDPANEL ILI9488, RLANDSCAPE,GP15,GP14,GP13,GP7,INVERT
OPTION TOUCH GP12,GP11
GUI CALIBRATE 0, 161, 145, 1265, 854
OPTION SDCARD GP17
OPTION RTC AUTO ENABLE

Wot dun it.
txt$ = "    Appendix B - I2C Communications. There are two I2C channels. They can operate in master or slave mode.  _
I/O Pins, Before the I2C interface can be used the I/O pins must be defined using the following command For the first _
channel (referred as I2C):   "
Print :Print " text to write in the middle of the EEPROM"

Edited 2025-05-06 11:36 by phil99
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 390
Posted: 03:45am 06 May 2025
Copy link to clipboard 
Print this post

  matherp said  V6.00.02RC22 is available on

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

Fixes a bug in scrolling in the editor when loading a file which creates continuation lines.
Adds a check in the editor which won't let you save and exit if continuation characters create a line longer than 255 characters.
Makes changes to handling Wii Classic and Wii Nunchuck to try and circumvent what appears to be an sdk issue where I2C commands return before completing.

Github updated


This has a problem with my I2C keyboard. At boot, it says

I2C keyboard not found OPTION KEYBOARD disabled

but that could be because of the difference in the PicoCalc keyboard.

I changed the I2C timeout from 2 to 250 in mmc_stm32.c and the keyboard works again. I could probably go lower but since 250 seems to work, I'll leave it for now.
Edited 2025-05-06 14:33 by toml_12953
 
adcockm
Newbie

Joined: 03/05/2025
Location: United States
Posts: 1
Posted: 05:09am 06 May 2025
Copy link to clipboard 
Print this post

  toml_12953 said  
I changed the I2C timeout from 2 to 250 in mmc_stm32.c and the keyboard works again. I could probably go lower but since 250 seems to work, I'll leave it for now.


Thanks, I had already reverted it back to the original 500 value in the PicoCalc fork (#ifdef'd, of course, so it cleanly compares with the upstream repo). Good to know it works with smaller values, if not as small as 2.

Also, hello all! I've been silently lurking as a non-member of this forum, and trying to keep the PicoCalc repo fork up to date with the changes here, though I think I'll be slowing that down a bit because the RCs have been appearing rather quickly here, and it's frankly hard to keep up.  

And Peter, thanks for all the work you do! In particular, the display changes you made in RC19 not only provided a performance boost on the PicoCalc, but also allowed me to clean up the PicoCalc fork significantly. (The original, official version from Clockwork was a bit of a mess, and a large number of PicoCalc specific changes were done because of the display, and are no longer needed thanks to your work in RC19.) Speaking of which, I'm just an enthusiast and owner of a PicoCalc -- I have no affiliation with Clockwork. They don't tend to develop software for their devices, and have historically relied on community members to port software to their device, or keep it up to date, etc. It's a strange business model, but they make cool hardware and I guess there are enough suckers like me who come along and want to be able to use it, so something ends up happening.  

My goal for the fork has been to keep PicoCalc things blocked out with #ifdefs, and ensure it has minimal changes compared to your main PicoMite sources. The only exception is the CMakeLists.txt file, which might be able to be improved, but I'm not very familiar with the details of cmake, so I separated things out as best I could there. Since the PicoCalc has 3 potential Pico target buids (Webmite for Pico2W, PicoMite for Pico2, and PicoMite for Pico), it added some complexity to the makefile. The only new functionality for PicoCalc, beyond the specific hardware support, is something I added in the fork's RC21, as described here. Those two MM.INFO and one OPTION command are tied to specific PicoCalc hardware, and were popular features that were requested (and were already available in some other software running on the device, like MicroPython), so I figured they'd be useful to add. I wasn't sure if I added them in the proper place and the proper way, but hopefully I wasn't too far off base with that stuff.

In any case, thanks for all you do!

Michael
 
electricat

Senior Member

Joined: 30/11/2020
Location: Lithuania
Posts: 295
Posted: 05:17am 06 May 2025
Copy link to clipboard 
Print this post

USB/HDMI/2350 RC22

I INTENTIONALLY entered some ONE simple line in EDITOR something like
a=1: if a=1 then print "fffffsdsad" : print "sfdfgs" _


RUN result was as expected:
fffffsdsad
sfdfgs

Entered EDITOR. Underscore was not there. This is according explanations.

Then
>SAVE "test.bas"
>NEW
>LOAD "test.bas"
>EDIT

First line looked like commented line with some new additives

'#!A:\test.bas a=1: if a=1 then print "fffffsdsad" : print "sfdfgs"


It RUN`s, however, like it would be normal program line.

Sorry it was yesterday, I was exhausted, just flashed back to RC18 with deleting everything

Another thing.
After RC22 flash, I loaded options from RC18 save. Failed badly. It`s not the first time it fails with other RC`s. I already do not tray to use this in most cases. Just am entering OPTIONS manually.


I use underscores as much as spaces. While continuinity seems interesting, I am scarry to think how many different new bugs it will rise.
Why not use \r\n then ?
Did not tested, how file using continuinity option with underscores, will look like in notepad++ ?

And how about MMB4W then?
My MMBasic 'sand box'
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 05:58am 06 May 2025
Copy link to clipboard 
Print this post

  Quote  I use underscores as much as spaces. While continuinity seems interesting, I am scarry to think how many different new bugs it will rise.

You CAN break it but only with effort:
'
'silly attempt to break it
OPTION EXPLICIT
DIM INTEGER test_ ,x
DIM test2_
' the underscore on the end of above line will vanish
test_ = 2
test2_ = 4
PRINT test_,test2_,"*"
x = test_
PRINT x,"*"

Having a trailing underscore in a variable name is the only way I can think of and that is easily prevented with a comment

Notepad++ doesn't care about any underscores and pasting into TeraTerm with autosave works with or without any trailing underscores used to break up lines.

NOT a problem.

Jim
VK7JH
MMedit
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 459
Posted: 06:29am 06 May 2025
Copy link to clipboard 
Print this post

I really appreciate the new line break feature, although it's clear that there are some challenges.
I would set the condition to " _" (space + underscore) for the last character in a line to be wrapped. This avoids any confusion with underscores in variables.

Thanks to Peter for creating this possibility. I can remember quite different statements. :-)

Matthias

P.S. Even if I embarrass myself, my question about the framebuffer text has still not been answered.
 
dddns
Senior Member

Joined: 20/09/2024
Location: Germany
Posts: 259
Posted: 06:51am 06 May 2025
Copy link to clipboard 
Print this post

  phil99 said  
After checking the string length (254 characters) the complete line was too long.


I think you got the criteria when it happens. I have very long lines as I'm using quite long variable names. I just looked, it happened at a line with 248 characters.

It was late but IIRC I added a value to that line and might have got about 6 characters more so it might be a one byte to much problem, never the less the editor didn't complain.
I was editing quite at the beginning and couldn't see the end

Just checked, the line was whether 254 or 255

I took the broken code added some lines and went back to the line and added even more charaters. Editor does not complain and pico crashes and cuts lines I added
Edited 2025-05-06 17:18 by dddns
 
electricat

Senior Member

Joined: 30/11/2020
Location: Lithuania
Posts: 295
Posted: 07:28am 06 May 2025
Copy link to clipboard 
Print this post

  TassyJim said  
You CAN break it but only with effort
........
NOT a problem.


My MMBasic 'sand box'
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 07:39am 06 May 2025
Copy link to clipboard 
Print this post

'#!A:\test.bas

This is a bug I need to fix. Let me explain. When you load a file from disk the load program prepends the file with a comment line starting '#
This allows the system to know the origin of the file so the MM.INFO(PATH) function can be used to create source relative filenames for resources needed (e.g. music files)
  Quote  Returns the path of the current program or NONE if called after a NEW or
EDIT Command.

This should be stripped out when editing and not shown when listing but I seem to have broken something in this functionality when working on paging with line breaks. I'll try and get this sorted in the next release.


  Quote  I took the broken code added some lines and went back to the line and added even more charaters. Editor does not complain and pico crashes and cuts lines I added

Did you update to RC22? This was an issue in the first version of the continuation code but was supposed to be fixed in RC22.
See image of the editor when I press F1 or F2

Note though, without continuation lines it is perfectly possible to break the editor by using the manual trick for creating long lines to make on > 255 characters and in this case the extra length is picked up by the code that saves the file to flash and truncates the save at that point losing data - this has always been the case.

What is the consensus on having a mandatory space before the continuation character?


Edited 2025-05-06 18:12 by matherp
 
bfwolf
Regular Member

Joined: 03/01/2025
Location: Germany
Posts: 72
Posted: 07:55am 06 May 2025
Copy link to clipboard 
Print this post

  homa said  I really appreciate the new line break feature, although it's clear that there are some challenges.
I would set the condition to " _" (space + underscore) for the last character in a line to be wrapped. This avoids any confusion with underscores in variables.

Thanks to Peter for creating this possibility. I can remember quite different statements. :-)

Matthias


In VB there's the rule "Line continuation character '_' must be preceded by at least one white space and must be the last character on the line".
I think, they had good reasons for this rule, to circumvent conflicts..

https://learn.microsoft.com/en-us/dotnet/visual-basic/misc/bc30999

I also thought about this before:
https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=17905#238427

  cosmic frog said  
Or what about just - OPTION CONTINUATION LINES ON [,n]
Thanks.
Dave.


Perhaps this also could be simplified as:
OPTION CONTINUATION LINES <n>
where <n> (ASCII code of break char) could be given instead of 'ON' and implicits 'ON' ? The default, when 'ON' specified of course should be '_' !

I also really appreciate the new line break feature !

Regards, bfwolf
 
dddns
Senior Member

Joined: 20/09/2024
Location: Germany
Posts: 259
Posted: 08:01am 06 May 2025
Copy link to clipboard 
Print this post

I updated to RC22. If the line is longer than 255 by extending the line while end is > hres , editor does not complain and it happens as before
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 08:10am 06 May 2025
Copy link to clipboard 
Print this post

  Quote  Perhaps this also could be simplified as:
OPTION CONTINUATION LINES <n>
where <n> (ASCII code of break char) could be given instead of 'ON' and implicits 'ON' ?

Allowing individual line continuation characters would be a pain when sharing code.

Jim
VK7JH
MMedit
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 08:14am 06 May 2025
Copy link to clipboard 
Print this post

  Quote  I updated to RC22. If the line is longer than 255 by extending the line while end is > hres , editor does not complain and it happens as before

without continuation lines it is perfectly possible to break the editor by using the manual trick for creating long lines to make one > 255 characters and in this case the extra length is picked up by the code that saves the file to flash and truncates the save at that point losing data - this has always been the case.
I can probably use the new continuation line code to check this now.
Edited 2025-05-06 18:18 by matherp
 
dddns
Senior Member

Joined: 20/09/2024
Location: Germany
Posts: 259
Posted: 08:21am 06 May 2025
Copy link to clipboard 
Print this post

ok..I accept that! It happens for the first time that I use such long lines so I didn't realize up to now. And I'm not talking about the trick to edit long lines but if you take an existing one not knowing how long it is cause editor does not show, you run into that problem. Isn't there a solution to detect this?
 
bfwolf
Regular Member

Joined: 03/01/2025
Location: Germany
Posts: 72
Posted: 08:26am 06 May 2025
Copy link to clipboard 
Print this post

  TassyJim said  
  Quote  Perhaps this also could be simplified as:
OPTION CONTINUATION LINES <n>
where <n> (ASCII code of break char) could be given instead of 'ON' and implicits 'ON' ?

Allowing individual line continuation characters would be a pain when sharing code.

Jim


Yes, that's true! Because of this fact it should be used only rarely and exceptionally, when really necessary because of conflicts using '_' (in existing software?) !!!
Using '_' as 'line break char" should be "highly recommended standard" !

@Peter: Sorry, you wrote just when I was writing and were faster..
I understand your last post, as if you are now convinced of the "'_' must be preceded by at least one white space" rule, too?

bfwolf
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 08:44am 06 May 2025
Copy link to clipboard 
Print this post

  Quote  What is the consensus on having a mandatory space before the continuation character?

I like having a space before the "_".

The next question is, will MMBasic add the space every time (and remove it afterwards), even if there is a space character present already.
That would make reversing the line continuation easier.

But then what happens to the space which is added when manually using line continuation?
The user would have to be sure that loosing the space does not cause grief.

Jim
VK7JH
MMedit
 
     Page 39 of 44    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025