Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : File Manager for PicoMite

   Page 9 of 17    
Posted: 07:54am
25 Jan 2025
Copy link to clipboard
javavi
Guru


  Amnesie said  Hello,
quick question: Is there a mouse support (ps2/usb) for the file manager yet? I think this would be an improvement if not already built in   Drag 'n Drop from one DIR to another or copy etc...

I thought about it, I plan to make multi-selection and mouse control...
But for now I need to work on normal USB keyboard support.
 
Posted: 08:04am
25 Jan 2025
Copy link to clipboard
javavi
Guru


The increased length of these HDMI lines should not worsen the situation in any way, but will make it possible to place a comb of pins on them for connecting a VGA video interface or a LCD screen module on the second floor.
This will make it possible to make the board universal - PicoMite HDMI\VGA\LCD
 
Posted: 09:58am
25 Jan 2025
Copy link to clipboard
Mixtel90
Guru


You have to make the sockets on modules that contain all the necessary interface resistors as the values are totally different. You may also need some sort of connector to the module from a LCD display. Also, all the HSTX pins have to be reserved, even if they are not used as you can't run them anywhere else on the board. So yes, it's probably possible, but the board will need a bit of careful design and you will obviously have to make whichever display module(s) you will want.

The thing is, is it worth it? As new boards are produced they have new facilities too, not just a different display. I've now done boards with PWM (different filters) SPI DAC and VS1053 audio and am now working on one with I2S. Simply being able to select a different display on one board may not be the ideal approach. I have considered a modular system, where the display, audio and interfaces are swappable, but it gets clumsy (and may not work with HDMI anyway). I gave up on that idea.

Still, I'll think about it when the HDMI breakout boards from Adafruit become available in the UK again as I think that format might be the best approach. I don't want to do it any other way as I'd like to have the HDMI socket pre-soldered.
 
Posted: 11:59pm
25 Jan 2025
Copy link to clipboard
Amnesie
Guru

Hi,
I used the file manager today the first time and was away for some time, coming back to see some cool matrix-style screensaver! Woah!

Incredible work with all those built-in features.

Greetings
Daniel
 
Posted: 05:41pm
26 Jan 2025
Copy link to clipboard
twofingers
Guru

@Vadim:
This "unofficial" trial version uses sorted file lists.
Sort for name, date and size. Use at your own risk.
It needs surly more testing. Pls report errors.

fm117.zip

It works very well for me. Maybe you like some of it and want to incorporate it into your official version. All just a suggestion. The different sorting options help my tired eyes.

  javavi said  
  Amnesie said  Hello,
quick question: Is there a mouse support ...

I thought about it, I plan to make multi-selection ...


"multi-selection" would be great!

Kind regards
Michael
 
Posted: 09:32pm
26 Jan 2025
Copy link to clipboard
javavi
Guru


@Michael
It's really cool to work with this file sorting, I'll take a look at how you do it and transfer it to my code :))
I'm thinking of assigning some one key that will switch the sorting for the currently selected panel.
What key should I assign for this?
 
Posted: 08:08am
27 Jan 2025
Copy link to clipboard
Volhout
Guru

javavi,

Just read todays thread on file compare.
That may be something to look at. As simple binary file compare, and in pane view of the 2 binaries.
But this is not so simple. Especially finding the common code back after the first difference. Just to highlight the next difference.

Volhout
 
Posted: 11:22am
27 Jan 2025
Copy link to clipboard
twofingers
Guru

Hi Vadim,
I'm glad you like the improvement as much as I do. Unfortunately I had to make a few small changes. I had also thought about finding better keys for sorting. In my opinion there is nothing wrong with using normal letter keys (n, d, s) - temporarily. As long as they are not used for other things. I installed it once, a little awkwardly, as a test. I like it that way. How do you like it?

fm1172.zip

Best regards
Michael
 
Posted: 07:15pm
27 Jan 2025
Copy link to clipboard
homa
Guru


@javavi, @developers,

I really like the Norton Commander style file manager! Especially the fact that you can now play mp3 files, although you can move through the file structure. This doesn't work at command level yet. A 'files' command stops playback.
But I miss some really basic features. If I select a directory and then run the copy command, I still get an error message, even in the current version. But that's the whole point of a file manager, isn't it?
I hope improvements are planned.
Also, is there a way to stop playing an MP3 once it has started? And also a status indicator that a music file is playing, e.g. at the top right next to the clock?
As I said, great project!

Matthias
 
Posted: 11:22pm
27 Jan 2025
Copy link to clipboard
javavi
Guru


Updated FM a little to version 1.21
+ Alt works from USB keyboard
+ Stop playing track with SPACE
+ Working on F9 Menu
FM121.zip
 
Posted: 02:37pm
31 Jan 2025
Copy link to clipboard
twofingers
Guru

  homa said  ... But I miss some really basic features. If I select a directory and then run the copy command, I still get an error message, even in the current version. But that's the whole point of a file manager, isn't it?

Hi Matthias,
do you mean something like this?
Sub CopyDir(src$, dest$)
Local file$, subdir$, dcount, i
Local string sdirs$(200) length 64
 Mkdir dest$
 file$ = Dir$(src$ + "/*", FILE)
 Do While file$ <> ""
   Print " copy file: ";dest$ + "/" + file$
   Copy src$ + "/" + file$ To dest$ + "/" + file$
   file$ = Dir$()
 Loop
 dcount = 0
 subdir$ = Dir$(src$ + "/*", DIR)
 Do While subdir$ <> ""
   If subdir$ <> "." And subdir$ <> ".." Then
     Inc dcount
     sdirs$(dcount) = subdir$
     subdir$ = Dir$()
   EndIf
 Loop
 For i = 1 To dcount
    Print " copy dir: ";src$ + "/" + sdirs$(i)
    CopyDir(src$ + "/" + sdirs$(i), dest$ + "/" + sdirs$(i))
 Next i
End Sub


or this:
'Drive "a:"
Chdir "\"
Print "You are hier: ";Cwd$
Input "Directory to delete: ",Path$
If Path$="" Then End
If MM.Info(exists dir path$) Then
 Print " Ready to erase directory: "Chr$(34);path$;Chr$(34);
 Input "now? (y/n/q(uiet))",yn$
 If yn$="y" Then DeleteDir(Path$,0)
 If yn$="q" Then DeleteDir(Path$,1)
Else
 Print "Directory: "Chr$(34);path$;Chr$(34);" not found."
EndIf

End '***************************

Sub DeleteDir(path$, quiet)
Local string file$, subdir$, yn$

If MM.Info(exists dir path$) Then
   file$ = Dir$(path$ + "/*", FILE)
   Do While file$ <> ""
       Print " deleting file: ";path$ + "/" + file$
       Kill path$ + "/" + file$
       file$ = Dir$()
   Loop
L1:
    subdir$ = Dir$(path$ + "/*", DIR)
    If subdir$ = "" Then
       GoTo Lend
    EndIf
    If subdir$ <> "." And subdir$ <> ".." Then
       DeleteDir(path$ + "/" + subdir$,quiet)  ' rekursiv
    EndIf
   GoTo l1'replacement for do/loop
Lend:
   Print " Remove the directory: ";MM.Info(drive);"/"; path$;
   If Not quiet Then
     Input " now? (y/n/x)",yn$
   Else
     Print
     yn$="y"
   EndIf
   If LCase$(yn$) = "y" Then Rmdir path$
   If LCase$(yn$) = "x" Then End
Else
   Print "Directory: "Chr$(34);path$;Chr$(34);" not found."
EndIf
End Sub

But it still needs to be tested thoroughly. And some safety features need to be installed. Use at your own risk!
By the way, the last code snipet is an example of useful "GOTO" .
Kind regards
Michael
 
Posted: 07:02pm
31 Jan 2025
Copy link to clipboard
JohnS
Guru

  twofingers said  By the way, the last code snipet is an example of useful "GOTO" .
Kind regards
Michael

Or get rid of both labels & GOTOs just use something like

Do
   subdir$ = Dir$(path$ + "/*", DIR)
   If subdir$ = "" Then
      Exit Loop
   EndIf
   ...
LOOP

(I hope I got the syntax right)

John
 
Posted: 07:15pm
31 Jan 2025
Copy link to clipboard
twofingers
Guru

Hi John,
that was the original plan. Unfortunately do/loop doesn't like recursion.
Kind  regards
Michael
 
Posted: 07:24pm
31 Jan 2025
Copy link to clipboard
JohnS
Guru

  twofingers said  Hi John,
that was the original plan. Unfortunately do/loop doesn't like recursion.
Kind  regards
Michael

That sounds odd!!

Is that true?  Sounds unlikely.

John
 
Posted: 07:37pm
31 Jan 2025
Copy link to clipboard
twofingers
Guru

  JohnS said  ... Sounds unlikely. ...

No, if you think about it, it's actually very plausible. But I don't think I've had a project in the last ten years where that was a problem.
I would also be interested in an alternative solution. The code for playing with it is available.

Michael
 
Posted: 12:48pm
01 Feb 2025
Copy link to clipboard
JohnS
Guru

I hope Geoff, Peter and/or Tom will chime in!

John
 
Posted: 01:10pm
01 Feb 2025
Copy link to clipboard
matherp
Guru

From the manual
  Quote  Any FOR…NEXT loops and DO…LOOPs will be corrupted if the subroutine or function is recursively
called from within these loops.
 
Posted: 01:41pm
01 Feb 2025
Copy link to clipboard
JohnS
Guru

Wow, sorry, I don't recall that part of the manual.

It's the only BASIC I've met where that is the case :(

John
 
Posted: 12:07am
02 Feb 2025
Copy link to clipboard
javavi
Guru


Updated FM to version 1.23
FM123.zip
+ works from USB keyboard
+ Sort Order - [BackSpace] switch key (???)
+ and other code optimizations
Perhaps someone can suggest a more convenient button for switching the sorting order?

Thanks to @twofingers for the method of sorting files, I honestly spied on you
Although this sorting noticeably slowed down the update of the disk panel with a large number of files.

Other tips for improving the program interface are also accepted.
 
Posted: 01:48am
02 Feb 2025
Copy link to clipboard
disco4now
Guru


  javavi said  Perhaps someone can suggest a more convenient button for switching the sorting order?

Have you considered using CTRL+[A-Z]. I think these plus a few other combinations produce the lower ascii codes 0-31. Just don't use CTRL+C. Maybe CTRL+S(ort). Should also work from VT100 terminal.
 
   Page 9 of 17    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025