Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:16 24 Nov 2024 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 1 of 6    
Author Message
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 203
Posted: 04:47pm 23 Sep 2024
Copy link to clipboard 
Print this post

I propose here for discussion the topic of creating a File Manager program for PicoMite.

I would like such a File Manager to be built into the system and called by a command or a functional button, to work both in the terminal and on displays in different resolutions.
I think that such a software shell would be useful in the development and use of PicoMite.



As an example, I give here my attempt to create such a program for PicoMiteVGA (MODE 1), it is not quite finished, but you can already use it.

FM - File Manager.zip

Best regards, javavi.
Edited 2024-09-24 02:50 by javavi
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1236
Posted: 05:10pm 23 Sep 2024
Copy link to clipboard 
Print this post

@javavi
I think your program is great! Congratulations!
In my copy I have
Option default integer
Mode 1
Option F9 "RUN"+Chr$(34)+"B:FM"+Chr$(34)+Chr$(13)+Chr$(10)

Const FW=MM.Info(FONTWIDTH): FH=MM.Info(FONTHEIGHT)
...
added.
Similar to this:
https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=17173&LastEntry=Y#227156#227154

Kind regards
Michael

PS: In your program you are probably not using this
On ERROR ignore

quite correctly. Maybe you mean
On ERROR skip
??
causality ≠ correlation ≠ coincidence
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4222
Posted: 06:33am 24 Sep 2024
Copy link to clipboard 
Print this post

Hi twofingers,

When you do following:

LOAD "FM.bas"
FLASH SAVE 2
OPTION F5 "flash run 2"+chr$(13)


Or -in your case- define F9, you have the file manager always available.

Javavi: very good file manager. The only thing I am missing is (as you mentioned) a way to start the editor, and a way to RUN a program.
If you could add these features, I personally would be very gratefull.

Volhout
Edited 2024-09-24 16:36 by Volhout
PicomiteVGA PETSCII ROBOTS
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1236
Posted: 07:20am 24 Sep 2024
Copy link to clipboard 
Print this post

Hi Volhout,

thanks for the tip, but that was what I meant with the link to the Electricats post:
  Quote  Similar to this:
https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=17173&LastEntry=Y#227156#227154

  Electricat said  ... I saved small navigator to ->> FLASH 1 slot, then added ->> OPTION F5 FLASH RUN 1  

Now, anytime I want run load program for run/editing I press F5, browse for file I need run/edit >> select&run
After Ctrl+C it can be edited, only changes must be saved using SAVE "****.bas" (F2 will not save)

Unfortunately the link (Copy link to clipboard) doesn't point to the individual post and I haven't checked it.

I don't like the solution with the flash because it costs a slot that is permanently occupied. But to each his own. b

  Quote  ... and a way to RUN a program.

It works for me (I replaced "Edit" with "Run" @Ln: 355). I think that project is very promising. I'm very excited for the next versions.

Best regards
Michael
causality ≠ correlation ≠ coincidence
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6772
Posted: 08:25am 24 Sep 2024
Copy link to clipboard 
Print this post

Could a way be found to run this from the Library? It might save a flash slot.
Mick

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

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 08:38am 24 Sep 2024
Copy link to clipboard 
Print this post

  p108 said  The library is stored in program memory Flash Slot 3 which will then not be
available for saving a program (slots 1 to 2 will still be available).
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6772
Posted: 09:05am 24 Sep 2024
Copy link to clipboard 
Print this post

Yes? You aren't going to save to that slot are you? Isn't it just a case of running the file manager from there - after loading it into the library (flash slot 3) using LIBRARY SAVE, that is? Unless the file manager writes to the memory that it's running from, of course. I've not checked.
Mick

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

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 203
Posted: 04:03pm 24 Sep 2024
Copy link to clipboard 
Print this post

  Volhout said  
Javavi: very good file manager. The only thing I am missing is (as you mentioned) a way to start the editor, and a way to RUN a program.
If you could add these features, I personally would be very gratefull.


Hi Volhout,
Your request is easy to fulfill.
Now File Manager launches execution of a file with the .bas extension by pressing the Enter key.
In the same way, actions on different files can be organized by file extension.
FM_v11.zip

Also, thank you all for your feedback!
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1236
Posted: 04:41pm 24 Sep 2024
Copy link to clipboard 
Print this post

Thank you! Much appreciated!
I foun a typo @LN:447
Local ineger x,l=Len(MM.ErrMsg$)

Regards
causality ≠ correlation ≠ coincidence
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 203
Posted: 05:03pm 24 Sep 2024
Copy link to clipboard 
Print this post

  twofingers said   I foun a typo @LN:447

Thank you very much!
Apparently I haven't caught any errors for a long time. :)
If you want, you can modify the code and post it here.
FM_12.zip
Best regards, javavi
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1236
Posted: 05:28pm 24 Sep 2024
Copy link to clipboard 
Print this post

  javavi said  ...
Apparently I haven't caught any errors for a long time. :)

This could mean that you are a very good programmer. This shows your good programming style or ...

... that you have disabled all error detection by using "On ERROR ignore" instead of "On ERROR skip".
Edited 2024-09-25 03:31 by twofingers
causality ≠ correlation ≠ coincidence
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 203
Posted: 05:49pm 24 Sep 2024
Copy link to clipboard 
Print this post

  twofingers said  
This could mean that you are a very good programmer. This shows your good programming style or ...
... that you have disabled all error detection by using "On ERROR ignore" instead of "On ERROR skip".

I'm not much of a programmer - I'm a self-taught amateur.
I tried to figure out these constructions by trial and error, and somehow applied them... it was a long time ago, I've forgotten now. :)
 
electricat

Senior Member

Joined: 30/11/2020
Location: Lithuania
Posts: 161
Posted: 07:16pm 24 Sep 2024
Copy link to clipboard 
Print this post

There is one quite unpleasant moment I noticed.
I am still on 5.08 ver

Program loaded using command RUN $fname and later edited and saved using F1, will display msg "Saved nnn Kb" but in fact it will not be saved.

I must use SAVE "" to save for really.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 09:31pm 24 Sep 2024
Copy link to clipboard 
Print this post

  electricat said  I must use SAVE "" to save for really.


F1 and F2 save to flash the edits you have made to your program--as you found, you must uses SAVE "fn.bas" to save the file to either an SD card or to the tiny file system in flash.

F1 and F2 assure that if you power cycle the picomite, your program will be available to RUN or EDIT or LIST with any changes you have made.

It is confusing until you understand where your changes are being saved.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
electricat

Senior Member

Joined: 30/11/2020
Location: Lithuania
Posts: 161
Posted: 03:08am 25 Sep 2024
Copy link to clipboard 
Print this post

 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4222
Posted: 07:48am 25 Sep 2024
Copy link to clipboard 
Print this post

Hi javavi,

I made minor changes.
- fix the RUN command when file names are shorter than 4 characters
- change the tile height back to 12 (some programs change the tile height) so the focus bar is correct height again.

When you flash save the file manager, there is one advantage: it is stored "tokenized" in flash slot. This means it will start much faster (instantly) than when loaded from file system (i.e. B:/fm/fm.bas).

Regards,

Volhout
fm12_bf.zip
Edited 2024-09-25 17:49 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6772
Posted: 08:00am 25 Sep 2024
Copy link to clipboard 
Print this post

Could it be called if it was stored in the library (flash slot 3)? You can have other stuff in there so it might save a flash slot. The whole program may have to be a SUB (with local variables?).

Alternatively, running it from A: would be faster than running it from B:.
Edited 2024-09-25 18:03 by Mixtel90
Mick

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

Joined: 05/03/2018
Location: Netherlands
Posts: 4222
Posted: 08:13am 25 Sep 2024
Copy link to clipboard 
Print this post

Javavi,

There is one thing that you could improve. Currently copying of a file works from A:/ to B:/ and reverse.
But you cannot copy a file that is inside a folder (i.e. B:/test/test.bas to A:/)
There is a red popup "file not found".
Somthing with the path name is not right.

Volhout
Edited 2024-09-25 18:14 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4222
Posted: 08:17am 25 Sep 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  Could it be called if it was stored in the library (flash slot 3)? You can have other stuff in there so it might save a flash slot. The whole program may have to be a SUB (with local variables?).

Alternatively, running it from A: would be faster than running it from B:.


Library is not usefull. Then all file manager subs and code becomes part of your main program. And how do you envision running the file manager. You will run your program in memory also. Remember library is simply a part of your main program.

Volhout
PicomiteVGA PETSCII ROBOTS
 
electricat

Senior Member

Joined: 30/11/2020
Location: Lithuania
Posts: 161
Posted: 08:26am 25 Sep 2024
Copy link to clipboard 
Print this post

@Volhout,

I am still on 5.08 firmware (completely lost track on latest stable enough firmware and changes) so I downgraded JAVAVI FM with your latest modifications te be compatible with 5.08

fm12_bf-pm5.08.zip
Edited 2024-09-25 18:28 by electricat
 
     Page 1 of 6    
Print this page
© JAQ Software 2024