Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:31 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 : Another file manager for the picos

     Page 2 of 2    
Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6096
Posted: 05:22am 05 Oct 2024
Copy link to clipboard 
Print this post

The file manager/explorer now has E or F4 to open the selected BAS file in the editor.
F1 or F2 in the editor returns you to FE where <enter> will run the modified file.

We seem to have lost the colour text in mode 1 on the wide screens.
My preferred settings are mode 3 and font 7.

FEpico.zip

Jim
VK7JH
MMedit   MMBasic Help
 
electricat

Senior Member

Joined: 30/11/2020
Location: Lithuania
Posts: 161
Posted: 06:22am 05 Oct 2024
Copy link to clipboard 
Print this post

@John,

Much more code lines with INKEY$
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3800
Posted: 06:35am 05 Oct 2024
Copy link to clipboard 
Print this post

  electricat said  @John,

Much more code lines with INKEY$

Quite possibly, but may well not be wise to screw up the existing meaning of INPUT.

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9105
Posted: 07:01am 05 Oct 2024
Copy link to clipboard 
Print this post

  Quote  We seem to have lost the colour text in mode 1 on the wide screens.


Jim: Is that a bug report or something at your end?
Mode 1 in wide screen (and 1024) sets the tileheight to 24. If you are using a different sized text you need to reset the tile height (TILE HEIGHT command)
Edited 2024-10-05 17:03 by matherp
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6096
Posted: 07:10am 05 Oct 2024
Copy link to clipboard 
Print this post

  matherp said  
  Quote  We seem to have lost the colour text in mode 1 on the wide screens.


Jim: Is that a bug report or something at your end?
Mode 1 in wide screen (and 1024) sets the tileheight to 24. If you are using a different sized text you need to reset the tile height (TILE HEIGHT command)


Not a bug report as such, I just needed to ask you if something had changed for font 1 matching the tiles.

Thanks for the info, I will fix at my end.

Jim
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6096
Posted: 07:24am 05 Oct 2024
Copy link to clipboard 
Print this post

OK
back to mode 1, font 1 and colour

FEpico.zip

mode 3 is better if you are trying to view images.

Jim
VK7JH
MMedit   MMBasic Help
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6778
Posted: 05:35pm 05 Oct 2024
Copy link to clipboard 
Print this post

Just a suggestion Jim?
Could the info box be banished by moving the cursor off the current file or by using Esc?

Also, probably nothing to be done about it, but attempting to play mp3 files brings up an error. Wav files play ok. This is in Mode 1 / 640x480.
Mick

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

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6096
Posted: 08:06pm 05 Oct 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  Just a suggestion Jim?
Could the info box be banished by moving the cursor off the current file or by using Esc?

Yes, I did intended to go back to that one.

  Quote  
Also, probably nothing to be done about it, but attempting to play mp3 files brings up an error. Wav files play ok. This is in Mode 1 / 640x480.

I haven't tried to test all of the audio types - lack of any audio on my very basic pico is the main reason. They all worked when originally used on a CMM2.

Likewise, not all of the image types are supported. I left the code in just in case Peter surprises us (again).

Jim
VK7JH
MMedit   MMBasic Help
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 12:01am 06 Oct 2024
Copy link to clipboard 
Print this post

  electricat said  Peter,

While working on File manager and making improvements there and there  I wanted make elegant way escape after INPUT, val$ has started and waits for user input.

But what if user decides do not continue with INPUT or started INPUT dialog accidentally and wants escape?

Elegant and usual way for user I would see by pressing ESC key.

So if INPUT command would return and rise ERROR instantly after ESC key was pressed we could catch it and decide how to continue program.

I see this as elegant enough way leave INPUT (not by entering multiple values until finished for example)


This routine written some time ago might be a starting point.
See this routine for Line Input routine
Latest F4 Latest H7
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6096
Posted: 02:27am 06 Oct 2024
Copy link to clipboard 
Print this post

FEpico.zip

escape now clears the file info box

mp3 info now works.

I think play mp3 requires a VS1053 in use. Using the PWM audio results in an error
[381] Play MP3 f$, playEnded
Error : Not enough Heap memory


Jim
VK7JH
MMedit   MMBasic Help
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6778
Posted: 07:45am 06 Oct 2024
Copy link to clipboard 
Print this post

F9 now starts FE from the command line on my system. :)

I know this system can play mp3s 'cos I've done it (PWM audio & Pico 2). I didn't have a program and a load of variables in though, which may have something to do with it. I don't think the problem is with FE itself. I've not looked. Have you set up a framebuffer somewhere?
Mick

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

Joined: 11/12/2012
Location: United Kingdom
Posts: 9105
Posted: 08:15am 06 Oct 2024
Copy link to clipboard 
Print this post

Playing a MP3 via PWM uses a 146K of memory which leaves just 34K on the HDMI and VGA versions. If the running program is using more than 34K then the PLAY MP3 command will fail - simples
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 206
Posted: 08:45am 06 Oct 2024
Copy link to clipboard 
Print this post

  matherp said  Playing a MP3 via PWM uses a 146K of memory which leaves just 34K on the HDMI and VGA versions. If the running program is using more than 34K then the PLAY MP3 command will fail - simples

Is it possible to create a small player program that would accept a parameter string as input? This program could be called from the main program using the RUN command with a parameter string (for example, a file name) which would free up RAM. And this player, having played the composition, could in turn call the RUN main program?
Edited 2024-10-06 18:50 by javavi
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6096
Posted: 09:00am 06 Oct 2024
Copy link to clipboard 
Print this post

MMBasic v 6       Disk used      0.8 MB with      1.8 MB free

Program:
 28K (15%) Program (1342 lines)
152K (85%) Free

Saved Variables:
 16K (100%) Free

RAM:
 75K (33%) 47 Variables
  0K ( 0%) General
153K (67%) Free
PicoMiteHDMI MMBasic Version 6.00.00RC5
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD US
OPTION CPUSPEED (KHz) 372000
OPTION DISPLAY 60, 160
OPTION RESOLUTION 1280x720
OPTION AUDIO GP26,GP27', ON PWM CHANNEL 5
OPTION DEFAULT FONT 3, 1

Press escape to continue...

Too close for comfort when trying to play mp3s directly.

Yes, I could shell out to a short player but not sure if it is trying to do too much.
I will think about it.

Jim
VK7JH
MMedit   MMBasic Help
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6778
Posted: 09:08am 06 Oct 2024
Copy link to clipboard 
Print this post

Maybe...
RUN "mp3player","filename.mp3"
should do that.
Complete it with RUN the file manager. I assume you'll end up on the same drive as the mp3 file unless you make it a full filespec.
You retrieve the argument using MM.CMDLINE$


I'd better finish the Delta design - that has a VS1053. :)  Maybe in the next couple of days.

.
Edited 2024-10-06 19:10 by Mixtel90
Mick

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

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 206
Posted: 09:54am 06 Oct 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  Maybe...
RUN "mp3player","filename.mp3"
should do that.

Thanks Mick,
Yes, this method works, although it does introduce a little delay for program overloading.
Added to my FM player of mp3 files for Pico2 (RP2350)
jFM_v160.zip
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 05:07pm 06 Oct 2024
Copy link to clipboard 
Print this post

Hi Jim,
Were you aware of this
  Quote  Adds support for bit 2 in the flag parameter for the SORT command when sorting strings. By default, empty string sorts first (normal sort) and last (reverse sort).
Setting bit 2 in the flag field reverses this: empty string sort last (normal sort) and first (reverse sort).

Which means you don't now need to do the string swapping you were doing.

 Sort fList$(),,4
 For z = 0 To mf-1
'   fList$(z)= fList$(z+maxFiles+1-mf)
   fCol(z) = dispCol(fList$(z))
 Next z
'  For z = mf To maxFiles
'    fList$(z)= ""
'  Next z
 refreshDisplay
End Sub

Thanks for all of your hard work on this file manager, do you anticipate implementing a move file function, currently I believe I have to first do a copy, then kill the original file?
Regards, Kevin.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4222
Posted: 05:34pm 06 Oct 2024
Copy link to clipboard 
Print this post

Javavi, Jim,

Is this thread now confusing 2 filemanagers ? Or is it me that is confused.

Volhout
PicomiteVGA PETSCII ROBOTS
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6096
Posted: 08:08pm 06 Oct 2024
Copy link to clipboard 
Print this post

  Bleep said  Hi Jim,
Were you aware of this


As mentioned in the first post of this thread, I wrote the file manager 4 years ago for the CMM2 and was interested in how well it ported. There are a lot of changes that could be made due to advances in the firmware but that defeats the purpose of the experiment.

  Volhout said  Javavi, Jim,

Is this thread now confusing 2 filemanagers ? Or is it me that is confused.

Volhout


Not just you. It is traditional for threads to go off track...

Jim
VK7JH
MMedit   MMBasic Help
 
     Page 2 of 2    
Print this page


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

© JAQ Software 2024