Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:28 03 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 Javavis File Manager (FM) for VT100 Console version

     Page 1 of 4    
Author Message
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1520
Posted: 11:54am 14 Mar 2025
Copy link to clipboard 
Print this post

NOTE:
This is a branch of the main File Manager thread.. This isn't about a finished program, but rather about developing a simple file manager that only requires a terminal program (like Teraterm) and a Picomite. Criticism and suggestions are welcome. However, only requests of general relevance can be fulfilled. For example, the display size and the screen saver timeout can easily be adjusted in the source code to suit your needs.

The important thing to remember is the settings in the Terminal program: the screen display must be white on a black background, and the font should be "Terminal."

Have fun!
--------------------------------------------
This is the VT100 console version of Vadim's (Javavi) FM (still beta!). It's functionally equivalent to my last test version for HDMI/VGA. I've optimized the display of selected files for VT100.





fm-vt100-noVGA1-02020.zip

What's missing?
It needs to be cleaned up. There's a lot of junk, and optimizations are possible. The code should run reasonably reliably and stably, as no complaints have been posted so far. I'll probably integrate the disk info module and the calendar into my private version. The ASCII module helped me a lot with conversion and could continue to do so. I've converted the color table to a test page for VT100 color codes. This is useful during development.

- The WDISKSELECT() function should be revised (Requires a Pico with an SD card!).
- There are minor cosmetic or display errors in some places.
- I'd also like to have a way for the file cursor to jump to a specific initial letter.
- There also seems to be a bug in the Deletedir() routine. It works adequately, but not as expected. I'll investigate ...
- We should also look at Vadim's new ideas and adopt them if necessary.

But I'm actually very satisfied.

Regards
Michael

Useful links for escape codes:
wikipedia

teraterm
Edited 2025-03-14 22:25 by twofingers
causality ≠ correlation ≠ coincidence
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4821
Posted: 01:00pm 14 Mar 2025
Copy link to clipboard 
Print this post

Hi Michael,

I like 2020. Will be spending some time on it this weekend. My main feedback atm is that the <alt>F1 (alt and function keys) do not work as expected when running in a Teraterm terminal screen. So you can not change drive.. A key aspect.

How do we align ? If both of us hack at the same code at the same time, it's going to be a mess. I propose that you are the project integrator. And I will deliver clearly marked blocks with changes, so they can be ported into the main code easily.

Agree ?

My first focus would be to make the drive change work again (find either an alternative to <alt>F1, or make <alt>F1 work). This may require some reverse engineering with true serial ports.

EDIT: According to your wiki page, <alt>F1 would be <esc>[11;3~.. let's see...
This also gives me an idea how to improve the screensaver (the "fade(x)").

When done, I plan to remove the audio en picture viewers.

Volhout
Edited 2025-03-14 23:18 by Volhout
PicomiteVGA PETSCII ROBOTS
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1520
Posted: 01:38pm 14 Mar 2025
Copy link to clipboard 
Print this post

  Volhout said  ...I like 2020. Will be spending some time on it this weekend. My main feedback atm is that the <alt>F1 (alt and function keys) do not work as expected when running in a Teraterm terminal screen. So you can not change drive.. A key aspect. ...


Hi Harm,
a temporary solution to the <alt><F1> problem has long been found. The Backspace key (chr$(8)) works for me as a replacement. Please test it yourself.

  Volhout said  ... How do we align ? If both of us hack at the same code at the same time, it's going to be a mess. I propose that you are the project integrator. And I will deliver clearly marked blocks with changes, so they can be ported into the main code easily.

Agree ?


hmm, I was hoping someone else could do it... If necessary, I'd take over for a while.
  Volhout said  ... When done, I plan to remove the audio en picture viewers.

Volhout

IMHO, audio could be retained; there are so many conceivable hardware platforms where it could work. I haven't used audio myself yet. As a replacement for displaying images, I've built in a "nonsense" routine — more for fun.

As test platforms I have normal PicoMites (2040), Pico2 (2350) and Peter's HDMI-Pico2 with SD and two examples of the reference design.

I just discovered that defining the VT100 colors as constants consumes about 5KB of heap memory. This is terrifying.
I've already fixed it.

Regards
Michael
causality ≠ correlation ≠ coincidence
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4821
Posted: 02:40pm 14 Mar 2025
Copy link to clipboard 
Print this post

Hi Michael,

use a short string, doe snot use any heap.
This is what I did in the modbus terminal program.


DIM wh$ length 5 = chr$(27)+"[37m"
DIM bl$ length 5 = Chr$(27)+"[36m"
DIM gr$ length 5 = Chr$(27)+"[32m"
DIM rd$ length 5 = Chr$(27)+"[31m"

print gr$+"Hello World"+wh$


Volhout
Edited 2025-03-15 00:41 by Volhout
PicomiteVGA PETSCII ROBOTS
 
dddns
Senior Member

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

I wish you both happy and nice sucessful coding!
I hope it will find its way into PicoMite beside "list pins"  
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1520
Posted: 03:13pm 14 Mar 2025
Copy link to clipboard 
Print this post

  Volhout said  Hi Michael,

use a short string, doe snot use any heap.
This is what I did in the modbus terminal program.

That's exactly how I did it.
I only posted it so that no one else would have to go to the trouble.
Edited 2025-03-15 01:16 by twofingers
causality ≠ correlation ≠ coincidence
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7471
Posted: 04:04pm 14 Mar 2025
Copy link to clipboard 
Print this post

Put all the colour commands into one string then call them using MID$? It might be a bit slower but the heap usage is known accurately.

At an early stage it might be an idea to consider making it a Library application. Fast access and no SD card needed. It's basically a case of thinking it out, defining an array or so automatically on boot if necessary and keeping to LOCAL and STATIC as much as possible.
Edited 2025-03-15 02:08 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: 1520
Posted: 04:58pm 14 Mar 2025
Copy link to clipboard 
Print this post

Hi Mick,
I also thought about putting all the color codes into a string array. But I don't think that's an improvement because the code would then be harder to read and understand. Also, my motto is: less complexity is better. Also, memory requirements aren't a factor in this application—except in extreme cases. At least not until now. Still, it's great that you're thinking about it!
Regards
Michael
causality ≠ correlation ≠ coincidence
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1520
Posted: 08:55pm 14 Mar 2025
Copy link to clipboard 
Print this post

This is the next improved version of FM V0.2023.
In addition to fixing a few minor bugs, there's a new feature: displaying the total file sizes of the selected files.

fm-vt100-02025.zip

Regards
Michael
Edited 2025-03-15 10:40 by twofingers
causality ≠ correlation ≠ coincidence
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1520
Posted: 01:43pm 16 Mar 2025
Copy link to clipboard 
Print this post

This new version of FM for VT100 includes several visual improvements and standardizations.

fm-vt-02026.zip

Also included are the DiskInfo program for VT100 and the Calendar program for VT100.

The Diskinfo program (di.bas) displays the directory tree of a drive or directory. It can be called from the file manager using F12 and returns control to the FM upon completion (with "flash run 2," provided the FM is in flash slot 2). DI can save the directory tree to the drive for later viewing/analysis with the FM (or "List"). It is also possible to display only the summary.

Both programs (DI & CLDR) should be configured to the existing hardware (SD card or no SD card, RTC or no RTC, etc.) before use. The calendar actually assumes that an RTC is installed; if no RTC is present, the current date (and your own appointments) must be entered manually.

I'm usually assuming a minimal configuration with a bare Pico2 and a terminal program (Teraterm in my case).

Regards
Michael
Edited 2025-03-17 00:37 by twofingers
causality ≠ correlation ≠ coincidence
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4821
Posted: 03:10pm 16 Mar 2025
Copy link to clipboard 
Print this post

Hi Michael,

Here is a new screensaver. It is based on 256 color implementation in the terminal program. Looks a lot closer to the original...
It is tested on Putty.
I will see if TeraTerm works on monday.

'============================
'SCREEN SAVER - Matrix
Sub SSMatrix

Local matr(CHR),clr,x,fade(CHR),e$=chr$(27)+"[38;5;"
dim ink$(7) length 10 =(e$+"16m",e$+"16m",e$+"16m",e$+"22m",e$+"28m",e$+"34m",e$+"40m",e$+"46m")
For x=1 To CHR:matr(x)=CVR*Rnd:fade(x)=int(rnd*15):Next

Do
 For x=1 To CHR
   Print ink$(int(fade(x)/2));
   Print @(x*FW-FW,matr(x)*FH)Chr$(Rnd*223+32);
   If matr(x)>CVR  Then matr(x)=0 Else Inc matr(x)
   inc fade(x),-1:if fade(x)<0 then fade(x)=15
 Next
 Pause 20
Loop While Inkey$=""
Print Nc$;
End Sub


Volhout

P.s. the strings are 9 characters long, so bothe 2040 as well as 2350 could define them as constants…
,
Edited 2025-03-17 01:27 by Volhout
PicomiteVGA PETSCII ROBOTS
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1520
Posted: 03:33pm 16 Mar 2025
Copy link to clipboard 
Print this post

Hi Harm,
why wait until Monday? I think it looks good! (But the screensaver isn't that important to ME.) It's a good exercise!

I was  wondering about whether certain patterns could shine (as black) through. Something like a skull or something similar.



Have you formed an opinion on displaying the file sizes of sorted files? Does it make sense? Is the display optimal?
Regards
Michael

  Volhout said  P.s. the strings are 9 characters long, so bothe 2040 as well as 2350 could define them as constants…

I'm still on 60002b14.
Edited 2025-03-17 01:44 by twofingers
causality ≠ correlation ≠ coincidence
 
dddns
Senior Member

Joined: 20/09/2024
Location: Germany
Posts: 215
Posted: 05:40pm 16 Mar 2025
Copy link to clipboard 
Print this post

The biggest issue for me is, that the display size 40x81 seems to be unchangeble. Because if you run it on a LCD, the display option is set according to the chosen font automatically and cannot be changed.
If the is the same for vga/hdmi, it could not run on those as it is incorrect displayed on the local console.

The second biggest issue for me is that it only displays correct when Putty is used in some compatibility mode. E.g. when I use "MC" in a linux console, it has a frame with ASCII above 127 and is displayed correct as well as over a RS232 terminal session.
If this can't be achieved with FM than I would like it best when ASCII below 128 is used.

Don't get me wrong, it is up to you of cause.

Last thing is that I agree that a screensaver is not important.
Again, don't get me wrong but I think in terms of PicoMite and system near applications, this would be bloating it.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4821
Posted: 05:51pm 16 Mar 2025
Copy link to clipboard 
Print this post

Michael,

2026: Selecting multiple files works nice. Also the display of files and file size is fine. I have not tried yet with very large files, to see if size digits are cut off(*). But showing size is handy, then you know it actually fits (i.e. on the A:/ drive).
The only thing I found remarkable is the color of the popups. "Are you sure" in violent yellow. Can't be missed....

Volhout
(*) up to 9.999 megabyte (7 digits) should be fine.
Edited 2025-03-17 03:52 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4821
Posted: 06:02pm 16 Mar 2025
Copy link to clipboard 
Print this post

  dddns said  The biggest issue for me is, that the display size 40x81 seems to be unchangeble.

Last thing is that I agree that a screensaver is not important.
Again, don't get me wrong but I think in terms of PicoMite and system near applications, this would be bloating it.


1/ With the change in cursor that twofingers made, the size should be set to 40x80. The 81 was just to avoid cursor overlap in the clock. I am not sure if you are suggesting we should format the 2 pane filemanager to work on a 320x240 LCD. That would be unworkable (unreadable).

2/ the screensaver is bloat. agree. It is only some 10 lines of code, and javavi (original author) decided he put it in the filemanager. In his honour I suggest it stays. If you don't want it, change line 20 to "SStimeout=1e20". It will never start.

To be honest, it depends on the serial terminal program if it shows nice. Putty does, TeraTerm does, but MMCC does not (it may not support 256 color mode). There is an alternative method that is also supported by MMCC using <esc>+"[1m" / <esc>+"[0m" / <esc>+"[2m", but that is not as nice on any of the 3 serial terminal emulators. And when WIKI is to be trusted, it is not a common supported feature.

Volhout

P.S. the graphics characters are 128 and above. Do you suggest we change the pane frame into +-| symbols ?
Edited 2025-03-17 04:20 by Volhout
PicomiteVGA PETSCII ROBOTS
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1520
Posted: 06:51pm 16 Mar 2025
Copy link to clipboard 
Print this post

@Harm

Hi,
  Quote   the color of the popups.

This is intentional, because I think a clear warning is needed when many selected files are about to be copied or deleted. However, I'm not entirely satisfied with the VT colors; they could be a bit more subtle. Any suggestions?

@Dietmar
  Twofingers said  This isn't about a finished program, but rather about developing a simple file manager that only requires a terminal program (like Teraterm) and a Picomite.

  Twofingers said  I'm usually assuming a minimal configuration with a bare Pico2 and a terminal program (Teraterm in my case).

My goal with this project is to enable a simple Pico to run with a Teraterm terminal program. Anyone with an incompatible configuration should contribute anything else. However, I'm happy to help, to the best of my ability, to find out where the problem lies. Since everyone has access to the program's source code, I assume that simple changes, such as colors, screen height, screensaver timeout, maximum displayable files, etc., can be made themselves and I welcome it if it's published here.
Kind regards
Michael
causality ≠ correlation ≠ coincidence
 
dddns
Senior Member

Joined: 20/09/2024
Location: Germany
Posts: 215
Posted: 06:51pm 16 Mar 2025
Copy link to clipboard 
Print this post

  Quote  
1/ With the change in cursor that twofingers made, the size should be set to 40x80. The 81 was just to avoid cursor overlap in the clock. I am not sure if you are suggesting we should format the 2 pane filemanager to work on a 320x240 LCD. That would be unworkable (unreadable).

I would like to suggest that it runs under same conditions as the internal editor does.BTW the displays resolution I use is 800x480. that should be enough ;)
It should run in the mode the display variable is set. If it could detect a PicoMite that has no display, it would be up to you to set it.
But is that behavior different in vga/hdmi?? what does the program do if run on a vga/hdmi? Mine crashes because it tries to set display...

Can't really follow your statement regarding the "screensaver"
 
dddns
Senior Member

Joined: 20/09/2024
Location: Germany
Posts: 215
Posted: 06:58pm 16 Mar 2025
Copy link to clipboard 
Print this post

Got it!
For my excuse:

  twofingers said  Criticism and suggestions are welcome.
 
dddns
Senior Member

Joined: 20/09/2024
Location: Germany
Posts: 215
Posted: 07:02pm 16 Mar 2025
Copy link to clipboard 
Print this post

  Volhout said  

P.S. the graphics characters are 128 and above. Do you suggest we change the pane frame into +-| symbols ?

Correct. Try "mc -a"


Perhaps it would be an idea, to compltely leave out the side boarders gives you two characters more. It should be as mimalistic and as powerful as possible :)


And of cause it regards sensible data which gets touched. In the end, it should be 100% bugfree :))
Edited 2025-03-17 05:13 by dddns
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1520
Posted: 07:10pm 16 Mar 2025
Copy link to clipboard 
Print this post

  dddns said  Got it!
For my excuse:

  twofingers said  Criticism and suggestions are welcome.

Hi Dietmar,
That's true, I appreciate criticism and suggestions, but I think you can expect some self-contribution.

  dddns said  Perhaps it would be an idea, to compltely leave out the side boarders gives you two characters more. It should be as mimalistic and as powerful as possible :)

You can adjust the characters in the sub WFrame. If necessary, set everything to chr$(32).
Edited 2025-03-17 05:16 by twofingers
causality ≠ correlation ≠ coincidence
 
     Page 1 of 4    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025