Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:05 02 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 : File Manager for PicoMite

     Page 16 of 17    
Author Message
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1519
Posted: 07:10pm 12 Apr 2025
Copy link to clipboard 
Print this post

@Vadim,
Just to clarify, picomite MMbasic <= 6.0002b11 doesn't support "MM.DISPLAY." I think the FM shouldn't only work for the very latest version either.
Michael
causality ≠ correlation ≠ coincidence
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 436
Posted: 07:43pm 12 Apr 2025
Copy link to clipboard 
Print this post

@twofingers,
Although I like all the innovations in PicoMite, I try to use what will work on earlier versions of firmware.
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1519
Posted: 07:48pm 12 Apr 2025
Copy link to clipboard 
Print this post

@Vadim
I see it exactly the same way!
causality ≠ correlation ≠ coincidence
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1519
Posted: 08:29pm 12 Apr 2025
Copy link to clipboard 
Print this post

Hi Vadim,
This is another test version. What's new:
- The input routine now has a blinking cursor. I'm not sure if that's an improvement, though.
- Pressing a letter moves the file cursor to the corresponding filename. Or, if it's missing, to the next larger one.

I've done some internal structural work.
Unfortunately, our two versions have diverged so much that it's becoming increasingly difficult to reconcile them. But this is only meant to serve as a demo for alternative functions.

FM02037.zip
Regards
Michael
Edited 2025-04-13 06:43 by twofingers
causality ≠ correlation ≠ coincidence
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7464
Posted: 07:23am 13 Apr 2025
Copy link to clipboard 
Print this post

I've no problem with manipulating multiple files or folders in a file manager, in fact that's the sort of stuff that would be ideal.

Tree display could be a different program altogether as it isn't needed for normal file management. You could include the directory management in this program.

Viewing files and hex display can also be farmed out to a file viewer, which could display in ASCII, HEX or both at the same time. Have a look at the old HEX monitor programs for how this can work.

We have been told that there will be no increase in the number of flash slots so my own preference would be to have it built into MMBasic, where it may be able to use internal routines more efficiently. Failing that it could be installed in the Library.

Whether the file manager is stored in MMBasic or in the library it could still use the library by looking for a table of add-on SUBs in there. If any are find they could appear as menu items when the file manager is displayed and called from within it. Consequently there would be no need to install the extras or even a library if the file manager is within MMBasic. This method makes the basic file manager extendable relatively easily.

Could this make all users happy? How long is a piece of string? :)
No, some would want proper graphic characters and/or colour but IMHO neither of those is possible in the basic file manager if you want maximum flexibility. You could write *device specific* extensions that use such things but you are making them inflexible if you do. There will always be some that want more bells and whistles, that's life. :)
Mick

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

Joined: 02/06/2014
Location: Germany
Posts: 1519
Posted: 11:48am 13 Apr 2025
Copy link to clipboard 
Print this post

Thanks, Mick, for the extensive answer.

I think what we have so far isn’t far off from your ideas. We have three different versions:

- Vadim’s rather spartan version, which is constantly being improved..

- A VGA version with extensive features.

- A VT-100 version that meets most of the requirements and runs on a bare Picomite.

I can’t contribute anything regarding compatibility with various LCD displays since I don’t have any. Also, I can say little about using the library because I haven’t used it so far. Fundamentally, using the library contradicts my idea of a simple program that is easy to understand, robust, and easy to install (IMHO).

If individual users find it useful to split the FM and better offload parts, that is easily possible. I demonstrated this and the possibility using the offloading of the DiskInfo module. I think Vadim wouldn't mind if the result was made available for download here. But I doubt whether splitting it up will improve handling.

At this point, I'd like to thank Peter again, who made many things possible with his firmware updates behind the scenes.

Kind regards
Michael
causality ≠ correlation ≠ coincidence
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4815
Posted: 11:50am 13 Apr 2025
Copy link to clipboard 
Print this post

@javavi,

fm147 works fine. I tried 146, and sometimes lost the focus bar. That is fixed in 147.
Tested on v6.00.02RC12 on RP2040 VGA PS2 platform.

Volhout
Edited 2025-04-13 21:56 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7464
Posted: 02:08pm 13 Apr 2025
Copy link to clipboard 
Print this post

The Library is, in fact, really simple. The only weird thing about it is that LIBRARY SAVE should really be called LIBRARY MOVE because it moves the code from program space to the Library then does a NEW, there is no copy of it left in the program area.

Typically you would run something like "fm", which would call "SUB fm" in the Library. I suppose this could be fm "A" or fm "B" to select the initial drive.
The rest of the Library routines are ordinary SUB and FUNCTION routines as you'd expect. The beauty of the Library system is that all the routines stored there can be run from a user program, so an input routine, for example, even though it would be intended for SUB fm could be used anywhere.

I've also run TassyJim's file manager from drive A. That worked out ok. I hate losing another flash slot - I can't see any reason to do so unless it's only during development.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
dddns
Senior Member

Joined: 20/09/2024
Location: Germany
Posts: 215
Posted: 03:14pm 13 Apr 2025
Copy link to clipboard 
Print this post

  twofingers said  @Vadim,
Just to clarify, picomite MMbasic <= 6.0002b11 doesn't support "MM.DISPLAY." I think the FM shouldn't only work for the very latest version either.
Michael

It indicates, if there is a local screen or not, you could ignore that and remove the ifs but you ignore me who wants to help. So I say good bye to you both.. bon chance
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4815
Posted: 04:59pm 13 Apr 2025
Copy link to clipboard 
Print this post

  Mixtel90 said  The Library is, in fact, really simple. The only weird thing about it is that LIBRARY SAVE should really be called LIBRARY MOVE because it moves the code from program space to the Library then does a NEW, there is no copy of it left in the program area.

Typically you would run something like "fm", which would call "SUB fm" in the Library. I suppose this could be fm "A" or fm "B" to select the initial drive.
The rest of the Library routines are ordinary SUB and FUNCTION routines as you'd expect. The beauty of the Library system is that all the routines stored there can be run from a user program, so an input routine, for example, even though it would be intended for SUB fm could be used anywhere.

I've also run TassyJim's file manager from drive A. That worked out ok. I hate losing another flash slot - I can't see any reason to do so unless it's only during development.


Hi Mick,

Including a program into the library, something as large as the filemanager, may not be a good thing. Note that the filemanager then is part of your user program. All the memory it reserves (for all the filenames) become part of your programs heap. And to handle large (SD card) file systems, they reserve quite a lot of heap (59k of 100k on a VGA unit with twofingers KLINGON version of the filemanager).




The result will be that your user program can only be small (cannot use large arrays or lots of strings). Maybe sufficient for your fish tank controller, but that is it. And since it is in the library, that accounts for ALL program you want to run on that pico.

When it is in a flash slot, it is -either-or-. So it is a separate program, and yes, it uses a lot of heap, but when you close the fm, and start your own program all heap is yours.

I think it is wise to keep it in a flash slot.

Volhout
Edited 2025-04-14 03:15 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7464
Posted: 06:00pm 13 Apr 2025
Copy link to clipboard 
Print this post

In that case I'll still present a case for a minimal file manager, but because it would have to load from A: (preferably) or B: each time it is run. I still can't accept the loss of a flash slot. :)
Mick

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

Joined: 31/07/2019
Location: Australia
Posts: 549
Posted: 08:03am 14 Apr 2025
Copy link to clipboard 
Print this post

  Quote   How long is a piece of string? :)


[Spock]  It depends on the warp factor.  
Edited 2025-04-14 18:04 by zeitfest
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 436
Posted: 07:30pm 16 Apr 2025
Copy link to clipboard 
Print this post

FM 1.49
NEW Input Line EDITOR. Thanks @twofingers
CHANGED some file coloring colors @Volhout
You can disable file coloring by explicitly specifying the color of the constant.
DFColor=15 for all white!
In the future I want to make a configurator for color settings and other things in the program itself
FM149.zip
With the terminal properly configured, File Manager works simultaneously on both the local PicoMite VGA/HDMI screen and the PC terminal.

Edited 2025-04-17 05:34 by javavi
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 451
Posted: 09:00pm 16 Apr 2025
Copy link to clipboard 
Print this post

Great!

question: How can I rename a file with "F6 RenMov" without moving it to the other drive? Somehow I can't get it to work and I think I'm missing it.

Matthias
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 451
Posted: 09:12pm 16 Apr 2025
Copy link to clipboard 
Print this post

Two further comments:
1)
From time to time the operation/keyboard input via the console falters. From time to time I see a number in the prompt area "B:/>" (scan code of the key?!). Then I have to press the cursor key again to move the selection bar.
2)
Is it possible to set the selection bar to the directory from which you are coming back and not to the beginning of the directory list? So "B:/test/demo/>" I return from "demo" to "test" and I am then on "test" and not on the ".." at the top of the listing!

Matthias
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 436
Posted: 02:08am 17 Apr 2025
Copy link to clipboard 
Print this post

  homa said  question: How can I rename a file with "F6 RenMov" without moving it to the other drive? Somehow I can't get it to work and I think I'm missing it.

Hallo! Matthias,
To rename a file, you need to select the same directory on both panels and change the file name when moving it using F6.
However, I checked and I couldn't switch the panel to another disk via the console.
It looks like the console doesn't transmit the Alt key code. It looks like the terminal doesn't transmit the Alt key code, but uses it to switch to its menu.
I'll fix this and also see what can be done about other issues.
Thanks for the feedback ;))
Edited 2025-04-17 12:21 by javavi
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4815
Posted: 06:13am 17 Apr 2025
Copy link to clipboard 
Print this post

@javavi,

Twofingers found the same. In the "non-VGA" version of his filemanagers he used the BACKSPACE key to toggle (as ALT does in the VGA version).
Later on he changed the behaviour to use the DELETE key to toggle the active pane between A:/ and B:/
(as there is only A and B, a toggle avoids the use of function keys al together).

You could try his "KLINGON" version (the last version) to see if you like the behaviour before you implement it. But it is only console.

In general: MMBasic has problems to detect function keys in combination with SHIFT/ALT/CONTROL via console.

Volhout
Edited 2025-04-17 16:14 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7464
Posted: 07:35am 17 Apr 2025
Copy link to clipboard 
Print this post

It's not just MMBasic. There are no standard codes for anything using Ctrl or ALT, especially with function keys. In fact, some keyboard drivers allow you to configure most if not all of these to anything you like.

We assume some things like Ctrl-C and Alt-F4 but they are not standard codes, they are non-printing codes for the OS, not a terminal. The latter, in fact, is meaningless outside Windows.

Terminal emulators in particular are extremely fussy about the way in which they use control codes and you have to stick to the rules.
.
Edited 2025-04-17 17:38 by Mixtel90
Mick

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

Joined: 02/06/2014
Location: Germany
Posts: 1519
Posted: 07:21pm 18 Apr 2025
Copy link to clipboard 
Print this post

Hi  Vadim,

Congratulations on your new version. You're making progress!

  Quote  You can disable file coloring by explicitly specifying the color of the constant.
DFColor=15 for all white!

I like the option to turn off the colors (DFColor=15). I'm considering implementing some kind of forced configuration. A nag screen that will be displayed until any configuration has been made.

I've made some changes to the latest demo. These are:
  Quote  - (passive) ScrollBars
- Alt/(BS) F-Keys reenabled
- overLoad ">" indicator, when more than RMax files in file list


FM02046.zip
update ->02046

Because I don't know if you're already familiar with the last INPUT routine, I've uploaded it here again. Three versions: Normal, Blinking, and for VT100.

Inpute.zip

You can now (conditionally) load directories with more than 200 (RMax) files. However, only RMax files can be processed!
I think this could be useful if the number of files in a directory is slightly exceeded. Then some files can be moved to another directory, or renamed, or...
This function is experimental and should be used with caution.

I also included the multi-selection (+,-,#,<) keys in the configuration section because I believe the selected keys work well for my German keyboard, but not for the rest of the world!
Because I don't own any foreign keyboards, I'm interested in feedback on this topic.

I've added the alternate F-keys again because Harm reported that the shift F-keys don't work for him.

The scroll bars are passive, meaning they can't be moved with the mouse. They're meant to indicate the position of the file selection cursor in the file list. For performance reasons, it only moves page by page.

Kind regards and happy Easter!
Michael
Edited 2025-04-20 00:56 by twofingers
causality ≠ correlation ≠ coincidence
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 436
Posted: 05:32pm 19 Apr 2025
Copy link to clipboard 
Print this post

File Manager v1.5
@homa
+ Additional [BS] Key for enabling [Alt]ernative functions via terminal
+ When exiting a folder, return the cursor to the previous directory
@twofingers
+ Copying and moving folders with files
+ Launches when there are a large number of files, but displays only the maximum file list size set.

FM150.zip
Kind regards and happy Easter!  
javavi
Edited 2025-04-20 05:52 by javavi
 
     Page 16 of 17    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025