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 4 | |||||
Author | Message | ||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 193 |
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: GermanyPosts: 1234 |
@javavi I think your program is great! Congratulations! In my copy I have Option default integer added.Mode 1 Option F9 "RUN"+Chr$(34)+"B:FM"+Chr$(34)+Chr$(13)+Chr$(10) Const FW=MM.Info(FONTWIDTH): FH=MM.Info(FONTHEIGHT) ... 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: NetherlandsPosts: 4212 |
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: GermanyPosts: 1234 |
Hi Volhout, thanks for the tip, but that was what I meant with the link to the Electricats post: 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 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 KingdomPosts: 6760 |
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: AustraliaPosts: 2129 |
|
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6760 |
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: UkrainePosts: 193 |
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: GermanyPosts: 1234 |
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: UkrainePosts: 193 |
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: GermanyPosts: 1234 |
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: UkrainePosts: 193 |
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: LithuaniaPosts: 161 |
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 StatesPosts: 3150 |
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: LithuaniaPosts: 161 |
|
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4212 |
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 KingdomPosts: 6760 |
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: NetherlandsPosts: 4212 |
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: NetherlandsPosts: 4212 |
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: LithuaniaPosts: 161 |
@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 4 |
Print this page |