Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:26 21 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 4 of 4    
Author Message
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 193
Posted: 06:02pm 13 Nov 2024
Copy link to clipboard 
Print this post

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: Netherlands
Posts: 4212
Posted: 08:11am 14 Nov 2024
Copy link to clipboard 
Print this post

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$()
 Print
 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 Kingdom
Posts: 6757
Posted: 08:26am 14 Nov 2024
Copy link to clipboard 
Print this post

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: Germany
Posts: 1234
Posted: 08:53am 14 Nov 2024
Copy link to clipboard 
Print this post

  Volhout said  Hi javavi,

This may be usefull. You make your own INPUT statement in a function.
...

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: Netherlands
Posts: 4212
Posted: 02:29pm 15 Nov 2024
Copy link to clipboard 
Print this post

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$()
 Print
 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: Ukraine
Posts: 193
Posted: 01:07am 17 Nov 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  "Сподіваюся на мир, незалежність та процвітання України".

Glory to Heroes!
Thank you very much Mixtel90 and everyone for your support.
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 193
Posted: 01:23am 17 Nov 2024
Copy link to clipboard 
Print this post

  Volhout said  This may be usefull. You make your own INPUT statement in a function.

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: Ukraine
Posts: 193
Posted: 10:34am 17 Nov 2024
Copy link to clipboard 
Print this post

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: Germany
Posts: 348
Posted: 02:04pm 17 Nov 2024
Copy link to clipboard 
Print this post

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: Ukraine
Posts: 193
Posted: 06:06pm 17 Nov 2024
Copy link to clipboard 
Print this post

  homa said  FM v1.12 - test @: PicoMiteHDMI MMBasic USB RP2350A Edition V6.00.00RC15
@javavi: Otherwise a very successful file manager! Good luck with the finishing touches!

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: Netherlands
Posts: 4212
Posted: 09:15am 18 Nov 2024
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 851
Posted: 10:04am 18 Nov 2024
Copy link to clipboard 
Print this post

  Quote  File manager for PicoMite


But will this also run on the CMM2?
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6757
Posted: 10:58am 18 Nov 2024
Copy link to clipboard 
Print this post

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: Netherlands
Posts: 4212
Posted: 11:11am 18 Nov 2024
Copy link to clipboard 
Print this post

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


To reply to this topic, you need to log in.

© JAQ Software 2024