Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 19:14 16 Jul 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 : File Manager for PicoMite

     Page 18 of 19    
Author Message
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5068
Posted: 09:05am 11 Jul 2025
Copy link to clipboard 
Print this post

Hi javavi,

I think now you have 2 string arrays that hold the file names.
My idea is that you include the file size as "text" into the string, aligned to the right.

example "filename.ext       12340"

Then you do not have to reserve extra memory.

Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4306
Posted: 10:36am 11 Jul 2025
Copy link to clipboard 
Print this post

  javavi said   That's why I'm asking for help in making a procedure for searching for a file by template starting from the current folder including all nested ones?


Perhaps file.find() in https://github.com/thwill1000/mmbasic-sptools/blob/master/src/splib/file.inc but that does mean grokking my idiosyncratic BASIC code.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1577
Posted: 09:06pm 11 Jul 2025
Copy link to clipboard 
Print this post

  javavi said  ... a procedure for searching for a file by template starting from the current folder including all nested ones?

Hi Vadim,
nice to hear from you again. I'm glad you're keeping up!
Do you mean something like this:

findfile.zip

The disadvantage is the large memory requirement if you don't limit the maximum number of finds. Perhaps you could also output the data page by page, then the screen would be the memory, so to speak.

Regards
Michael
causality ≠ correlation ≠ coincidence
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 481
Posted: 04:22am 12 Jul 2025
Copy link to clipboard 
Print this post

Hi Volhout,
  Volhout said  I think now you have 2 string arrays that hold the file names.
My idea is that you include the file size as "text" into the string, aligned to the right.
example "filename.ext       12340"
Then you do not have to reserve extra memory.

And this is an interesting idea!
At first I thought that it is not suitable, since the lines from the file list array are needed not only for display on panels, but also as data in operations.
But then I realized that you can patch the lines with binary data from the end without breaking their string content!
And so, to a 63-character line I can add a 32-bit File Size WORD at the end, plus one more byte of File Attribute, and my File Name field will be reduced from 63 to 58 characters, which I think is not critical!
But all this information can be stored in one File List array.
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 515
Posted: 10:21am 12 Jul 2025
Copy link to clipboard 
Print this post

  javavi said  File Manager v1.6 VGA/HDMI
Screen resolution adaptive interface FM
(Works on various screen resolutions MODE 1)
640x480  720x400  800x600  848x480


I tested it on a 2350B with and without PSRAM and it works good for me in these resolutions!

I tested 1280 and 1024 as well and I don't understand, why the colours are not  correctly displayed. If I edit a file with your FM, it will be displayed in coloured code and font 1. But when it returns it will fall back to font 3. I wonder, if the default font could be set other than font 3?

The serial console is enabled and I guess it's with intend. For me, it is good usable
and maybe you still want to improve it. Anyway, if I use the serial console keyboard and navigate with the cursor it comes to hangs. It happens with the "down" cursor key.
Then in the command line it looks like "B:/>B" and the FM hangs until I press ESC.
I think some character is interpreted as a control code. After pressing ESC the screen gets refreshed and it's fine again..

The picture viewer function is nicely useful, as well mp3. When opening a .bmp/.jpg it would be much nicer if the cursor position would be the same as it was in the filelist when the picture is closed. Now it is positioned at the top and I have to find the place again.

All the best!
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 481
Posted: 10:47am 12 Jul 2025
Copy link to clipboard 
Print this post

Hi dddns,
  dddns said  I tested it on a 2350B with and without PSRAM and it works good for me in these resolutions!
I tested 1280 and 1024 as well and I don't understand, why the colours are not  correctly displayed. If I edit a file with your FM, it will be displayed in coloured code and font 1. But when it returns it will fall back to font 3. I wonder, if the default font could be set other than font 3?

I don’t understand this myself, I need to ask @matherp about this!

  dddns said  The serial console is enabled and I guess it's with intend. For me, it is good usable and maybe you still want to improve it. Anyway, if I use the serial console keyboard and navigate with the cursor it comes to hangs. It happens with the "down" cursor key.
Then in the command line it looks like "B:/>B" and the FM hangs until I press ESC.
I think some character is interpreted as a control code. After pressing ESC the screen gets refreshed and it's fine again..

It's something with your VT-100 terminal!
It works for me on TeraTerm 5, moreover, I configured it for DOS encoding and it correctly displays graphics just like on the monitor.

  dddns said  The picture viewer function is nicely useful, as well mp3. When opening a .bmp/.jpg it would be much nicer if the cursor position would be the same as it was in the filelist when the picture is closed. Now it is positioned at the top and I have to find the place again.

OK! TO DO :))
All the best!
Edited 2025-07-12 20:50 by javavi
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 515
Posted: 10:55am 12 Jul 2025
Copy link to clipboard 
Print this post

I tried it with putty and the linux console.
It is only the keyboard input which causes this. The slower I hit cursor down, the more likely it is that it happens. Then I press ESC and FM responds again but it can reoccur again and again..
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 481
Posted: 04:01pm 12 Jul 2025
Copy link to clipboard 
Print this post

@dddns & @all,
FM v1.63
FM163.zip
- added work in resolution 1024x768 and 1280x720
- when viewing a picture, returns the position to the file
- minor cosmetic improvements
Edited 2025-07-13 02:01 by javavi
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 515
Posted: 04:51pm 12 Jul 2025
Copy link to clipboard 
Print this post

I tested RESOLUTION 1280 and set OPTION LCDPANEL CONSOLE 1.
Editor itself works fine with FONT 1 and when closed and returning to FM FONT 1 is correctly set. That works for me now.

But viewing a bmp or jpg and returning to FM will cause, that FONT 3 and/or MODE 3 is set..not sure if both or just font.
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 481
Posted: 05:20pm 12 Jul 2025
Copy link to clipboard 
Print this post

  dddns said  But viewing a bmp or jpg and returning to FM will cause, that FONT 3 and/or MODE 3 is set..not sure if both or just font.

FM164.zip
It seems that at high resolutions FONT 3 16x16 is used by default and when changing the mode it is set automatically...

You have evaluated the player's work in playlist mode, you need to select several files and start listening to one? All selected files will be played in a loop.
Edited 2025-07-13 03:23 by javavi
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 515
Posted: 06:08pm 12 Jul 2025
Copy link to clipboard 
Print this post

Same conditions as above, viewing pictures and returning to FM works now for me.

I tested playlist function for .mp3 and it works. I can skip to the next song by pressing pause but how can I stop playing at all as it loops from the last track to the first. Is there a key? I can stop it by selecting a non playable file..

It would be very nice, if the playlist function would work for pictures in a diashow as well..

I have attached an USB keyboard and HDMI Monitor and use simultaneously the serial console and its keyboard. USB keyboard works fine, serial not in FM. But if I choose a file and edit it with F4, within the editor there are no errors at all. I haven't seen this behavior before..don't know
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 515
Posted: 06:39pm 12 Jul 2025
Copy link to clipboard 
Print this post

The screensaver sets in very early (<1min) for me.
Anyway letting it run for about 7min crashes my 2350 constantly.
It might be my PGA2350 but it could also be a memory problem caused by the screensaver code or an issue with this PicoMite version. Does yours run with RESOLUTION 1280?
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 481
Posted: 07:08pm 12 Jul 2025
Copy link to clipboard 
Print this post

  dddns said  The screensaver sets in very early (<1min) for me.
Anyway letting it run for about 7min crashes my 2350 constantly.
It might be my PGA2350 but it could also be a memory problem caused by the screensaver code or an issue with this PicoMite version. Does yours run with RESOLUTION 1280?

At the beginning of the FM program there is a constant CCtimeout=60000 (1 minute) time before the screensaver starts.

On my Murmulator 2 with a Chinese clone Pico 2 RP2350A it works fine 1280x720 together with the terminal 160x60 via USB.
Firmware PicoMiteHDMI MMBasic RP2350A Edition V6.00.02

Uninterrupted operation may depend on the specific Pico instance, as well as the PicoMite firmware version and version.

P.S. And after a while the program crashed in the command line, this was not observed before at lower resolutions, perhaps because of the connection with the terminal... I need to try to run it without a serial terminal.
Edited 2025-07-13 05:31 by javavi
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 515
Posted: 07:30pm 12 Jul 2025
Copy link to clipboard 
Print this post

Would you update the firmware to make it comparable?
I'm using the very latest update.
The keyboard behavior might have changed due to USB input issues reported.
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 481
Posted: 07:45pm 12 Jul 2025
Copy link to clipboard 
Print this post

  dddns said  Would you update the firmware to make it comparable?
I'm using the very latest update.
The keyboard behavior might have changed due to USB input issues reported.

I stay on an earlier firmware because I try to make FM work on an earlier version of PicoMite 6.00.1, so I don't use new commands for FM.
I don't use firmware with USB because my board doesn't have a hardware serial bridge and it's harder to configure such firmware for my hardware (initial settings need to be entered blindly from a connected keyboard)

Without a terminal connected via USB, the FM screensaver has been working at 1280x720 resolution for 16 minutes without crashing.

P.S. Almost 30 minutes have passed, the screensaver is flying normally
Edited 2025-07-13 05:59 by javavi
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 515
Posted: 08:14pm 12 Jul 2025
Copy link to clipboard 
Print this post

Ok..understand.
That is a difference and I'll try a non USB version tomorrow and might downgrade to 6.00.02 to see if it makes a difference to the keyboard behavior.

Mine runs now with open serial terminal for 25min. But I only run it and didn't touch a key afterwards.



Lol..after posting this it crashed 1 min later.
Edited 2025-07-13 06:17 by dddns
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 515
Posted: 07:55am 13 Jul 2025
Copy link to clipboard 
Print this post

Good morning,

took some hours this morning to investigate:

HDMI and USB act different handling the serial console keyboard.
The keyboard buffer in non USB seems to be larger and more keystrokes are queued and
the scrolling in your FM looks more smooth somehow but:
non USB 6.00.02 and 6.00.03 completely freeze, when I extensively use only up/down cursor keys. Once it's frozen USB won't respond any more and if playing mp3 it stops.
Found no other way..only a reset helps then.

With 6.00.02HDMIUSB my pico runs now for over an hour in screensaver and did not crash once. The problem with the keyboard is the same than with 6.00.03

The "pause" does not work for me with no version of your FM when pressed on the serial keyboard. With an attached USB keyboard it works.


I think this is no overclocking issue, it happens as well with OPTION RESOLUTION 640x480 @ 252000KHz
Edited 2025-07-13 18:02 by dddns
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 515
Posted: 02:29pm 14 Jul 2025
Copy link to clipboard 
Print this post

quick&dirty just commented out and defined colours by hand real quick, it runs on a RP2040 and a 7inch LCD ..very nice!




This is FONT 4 and works well, same with FONT 1
Edited 2025-07-15 00:31 by dddns
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 481
Posted: 07:52pm 14 Jul 2025
Copy link to clipboard 
Print this post

FM v.1.69 For testing!
+ A bunch of minor edits
+ Added display of file sizes on panels

Now we need to figure out how to switch the view of panels?


FM169.zip
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1577
Posted: 10:33am 15 Jul 2025
Copy link to clipboard 
Print this post

Hi Vadim,
the "File Find" function has proven to be a useful idea.
As I already wrote, I've dispensed with storing the results in an array and instead just output the results to the screen. This allows me to output a seemingly unlimited number of results. I'm still considering a solution to display or execute results directly in the panel, e.g., by entering the number or by copying a screen page of 36 files into an array and then selecting them with the cursor. In any case, it's progress!



Regards
Michael
causality ≠ correlation ≠ coincidence
 
     Page 18 of 19    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025