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 4 of 4 | |||||
Author | Message | ||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 193 |
Forgive me if I don't answer for a long time, here in Ukraine we have a real War going on, with daily missiles, drones and other nasty things. Hi mclout999, Unfortunately, I don’t have any other hardware except for the Murmulator with VGA on which I could check this, apparently I need to check the EXECUTE command. Hi Volhout, Yes, probably we need to somehow make a terminal version of the manager, it's a pity that there is no pseudo-graphics. Thank you for your useful advice, I am very grateful, I will fix this in the next release. PS:I still need to figure out how to exit the INPUT input procedure using the ESCape button. Edited 2024-11-14 04:46 by javavi |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4212 |
Hi javavi, This may be usefull. You make your own INPUT statement in a function. This input statement returns an empty string when ESC is pressed. It returns the typed command when it detects you press carriage return (chr$(13)) 'example for function to input keypresses Do Print "type command "; b$=input_esc$() If b$<>"" Then Print "execute ";b$ Else Print "exit " End If Loop Until Instr(b$,"quit") End Function input_esc$() Local a$ Do Do a$=Inkey$ Loop Until a$<>"" If a$=Chr$(27) Then a$="":Exit Do Print a$; input_esc$=input_esc$+a$ Loop Until a$=Chr$(13) End Function You may also want to use Kevin's tip about using TEXT in stead of PRINT in the matrix screensaver 'SCREEN SAVER - Matrix Sub SSMatrix Local matr(CHR),fade(CHR),clr,x For x=1 To CHR:matr(x)=CVR*Rnd:fade(x)=&hF*Rnd:Next Do For x=1 To CHR clr=&h1000*(fade(x)-&hF) And &hFF00 Colour clr Text x*FW-FW,matr(x)*FH,Chr$(Rnd*223+32) 'Print @(x*FW-FW,matr(x)*FH)Chr$(Rnd*223+32); If matr(x)>CVR Then matr(x)=0 Else Inc matr(x) If fade(x)=&hF0 Then fade(x)=0 Else Inc fade(x) Next Pause 50 'Pause 10 Loop While Inkey$="" Colour c(15) End Sub Edited 2024-11-14 18:14 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6757 |
We hear about the war, Javavi. I can't possibly imagine what you are all going through, I have no experience of it. :( My thoughts are with you and your country. Not my language (and I hope the forum software doesn't scramble it), but "Сподіваюся на мир, незалежність та процвітання України". Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1234 |
I updated a 10 year old function. Maybe useful for javavis file manager? https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=17433 Regards Michael causality ≠ correlation ≠ coincidence |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4212 |
Javavi, Minor update to previous function. Now you can also backspace to correct errors. 'example for function to input keypresses Do Print "type command "; b$=input_esc$() If b$<>"" Then Print "execute ";b$ Else Print "exit " End If Loop Until Instr(b$,"quit") End Function input_esc$() Local a$ Do Do a$=Inkey$ Loop While a$="" If a$=Chr$(27) Then a$="":Exit Do If a$=Chr$(8) Then Print a$;" ";a$; input_esc$=Left$(input_esc$,Len(input_esc$)-1) Else Print a$; input_esc$=input_esc$+a$ End If Loop Until a$=Chr$(13) End Function Edited 2024-11-16 00:31 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 193 |
Glory to Heroes! Thank you very much Mixtel90 and everyone for your support. |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 193 |
Hi Volhout, I slightly reworked the File Manager code using your string input function, and slightly corrected errors in various places. Thank you all for your advice and attention. Now I need to test it. FM111.zip I have PicoMiteVGA 6.00.00RC12 There is some strange glitch, when viewing images or opening text files for editing, the top two lines are not visible. Is there such a glitch on the newer version RC15? |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 193 |
FM v1.12 PicoMiteVGA 6.00.00RC12 FM_v112.zip In addition to the [ESC] and [BS] keys, when editing the input field in forms, I added the [DEL] key, which completely erases the input field. Try, check, test and write your comments here. |
||||
homa Guru Joined: 05/11/2021 Location: GermanyPosts: 348 |
FM v1.12 - test @: PicoMiteHDMI MMBasic USB RP2350A Edition V6.00.00RC15 1) >RUN, F9, LIST COMMANDS, ... 1-2 seconds later: PICO2 RESET 2) Above the function key bar, behind the input prompt, the keys pressed only appear as “code” ... c=99, l=108, s=115, ... shouldn't the input appear here? 3) >RUN, F9, ESC ... ESC ends the software, I would have expected the F9 menu function to end here! 4) Input on a selected file, mp3 starts playback, jpg nothing happens? I would have expected the image to be displayed here. @javavi: Otherwise a very successful file manager! Good luck with the finishing touches! Matthias |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 193 |
Hi Matthias, Unfortunately, I only have Pico2 itself to test the PicoMite 6.00.00RС15 versions. 1) Yes, I checked, there is such a bug! If you run the command EXECUTE "list commands" which stops for scrolling, the system goes to reboot. 2) I haven't reached the input line yet, the problem may be that same command EXECUTE. 3) Everything is fine here, treat this list of commands as the same list of files, to exit press ENTER at the top when exiting the directory. (by the way, this list can be supplemented with frequently used * programs) 4) I didn't know that PicoMite can load JPG files! This part of FM can be improved by adding launching of all types of files. Thank you for your attention, we will improve it! |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4212 |
Hi javavi, You may want to add the play of WAV files. All pico's support playing WAV files. Volhout PicomiteVGA PETSCII ROBOTS |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 851 |
But will this also run on the CMM2? |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6757 |
Unlikely. Try it. :) Javavi can't sort that out, I don't think. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4212 |
It will require changes for CMM2 - Port all Tiles related commands - Force the CMM2 in 640x480 (default is 800x600). - Check if all formatting of A:/ and B:/ is the same in CMM2 - Some media related (picture/sound) commands are different in CMM2. Volhout Edited 2024-11-18 21:51 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Page 4 of 4 |
Print this page |