Long Filename Browser for ZX-UNO / esxDOS

Field Programmable Gate Array based devices! As exciting as they sound
pjrodriguez
Drutt
Posts: 23
Joined: Tue May 05, 2020 9:38 am

Re: New File Browser for ZX-UNO

Post by pjrodriguez »

Before trying to send a card image I wanted to tell you that maybe I didn't use the right words to describe my issue. As you can see in the attached screenshot taken from Gparted my 8 Gb card has a first extended partition with 1 Gb of unallocated space needed to be used by the +3e and after a partition for ESXDOS. I have tried different sizes and filesystems, in the screenshot you can see a 2 Gb fat16 partition but the same happens with a fat32 partition using the 6,21 Gb of available space. I'm using ESXDOS 0.8.7.

Image
User avatar
bob_fossil
Manic Miner
Posts: 654
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

Another test version can be found here. I've fixed a couple more issues in the FAT handling code that I found today.
pjrodriguez
Drutt
Posts: 23
Joined: Tue May 05, 2020 9:38 am

Re: New File Browser for ZX-UNO

Post by pjrodriguez »

Great job, your new alpha is working as a charm with my two-partitions card!
If you want to keep improving your code I can tell you that everything works with a 6,21 gb fat32 partition. However, when I first tried your new alpha on a 2 gb fat partition I got a correct directory display on the root of the card but garbage on subdirectories.
Also the sorting algorithm has some flaws, see attached screenshot, but that's a minor issue.
Congratulations again.
Image
User avatar
bob_fossil
Manic Miner
Posts: 654
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

pjrodriguez wrote: Thu May 07, 2020 9:22 am Great job, your new alpha is working as a charm with my two-partitions card!
If you want to keep improving your code I can tell you that everything works with a 6,21 gb fat32 partition. However, when I first tried your new alpha on a 2 gb fat partition I got a correct directory display on the root of the card but garbage on subdirectories.
Also the sorting algorithm has some flaws, see attached screenshot, but that's a minor issue.
Congratulations again.
Image
Cheers - we're getting there with the FAT code. :) For the 2gb partition, was it FAT16/32? How was the disk laid out ? Another Gparted screen grab might help.

The sorting code is sorting on the short 8.3 filename, not the LFN. I guess the order of short filenames, HARBIN~1, HARBIN~2, ... HARBIN~6 is not quite the same as their long filename equivalents. I could make the sort use the LFNs but it will make the sort more complicated and slower.
pjrodriguez
Drutt
Posts: 23
Joined: Tue May 05, 2020 9:38 am

Re: New File Browser for ZX-UNO

Post by pjrodriguez »

The 2gb partition was fat16, it's the layout of my previous Gparted screenshot.
Don't worry about the sorting code, it seems that it fails only in some rare occassions.
User avatar
Luzie
Manic Miner
Posts: 906
Joined: Fri May 01, 2020 2:07 pm

Re: New File Browser for ZX-UNO

Post by Luzie »

bob_fossil wrote: Thu May 07, 2020 10:20 am The sorting code is sorting on the short 8.3 filename, not the LFN. I guess the order of short filenames, HARBIN~1, HARBIN~2, ... HARBIN~6 is not quite the same as their long filename equivalents. I could make the sort use the LFNs but it will make the sort more complicated and slower.
Thinking over this: Maybe you could add displaying the 8.3 filename of the file/dir the cursor currently stands on?

And for the sorting order (as long as free memory lasts ;) )...: Standard sort/display could be the (fast) sort of 8.3 filenames.
And optional (via keypress) a sort on LFN (as this is slower).

Talking about keypresses: Could you please think over adding a simple Help screen (e.g. called via pressing of key H) into your file-browser like existing help-screen in "Dr Slumps NMI Handler"
User avatar
bob_fossil
Manic Miner
Posts: 654
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

0.05
  • Fixed situation on FAT16 disks where the program fails to start and show the root folder contents.
  • Added settings file - BIN/browse.cfg. Colour settings and the esxdos disk device are now taken from this file rather than using hard coded values. Use the included BRWSCFG .dot command to adjust the browser's settings.
  • Large directory names weren't being truncated correctly.
  • Added .pzx support. Requires a ZX-UNO with .pzx support and the .loadpzx command in BIN (with thanks to the ghost of Daley Thompson's Supertest 128 :) ).
  • Added setting to display additional <DIR> text for directory entries.
  • FAT32 code now handles 32 bit clusters correctly.
Image

For the configuration program. Use cursor up and down to move the '>' to the setting you wish to change. Press ENTER to select. This will either toggle the setting (if it is on/off) or FLASH the setting, letting you know you can modify the value.

You can then use cursor up and down to move the value up or down. For colour settings, cursor up and down changes the PAPER value, cursor left and right changes the INK value and pressing B toggles BRIGHT.

Once you're happy, press ENTER to confirm the new value - the setting will stop FLASHing and you can move the '>' again.

Once you're done, press S to save your new settings or X to leave without saving. If you mess your settings file up with odd colours, delete BIN/browse.cfg and the browser will return to factory defaults.
User avatar
Luzie
Manic Miner
Posts: 906
Joined: Fri May 01, 2020 2:07 pm

Re: New File Browser for ZX-UNO

Post by Luzie »

bob_fossil wrote: Fri May 08, 2020 12:02 pm 0.05
Hi,

tested 0.05 (latest). I have directories with a dot in 8.3 name e.g.: _v006.091
browse 0.05 shows: v006091
and when I change into this directory
the top row shows no directory name

Image
Image
pjrodriguez
Drutt
Posts: 23
Joined: Tue May 05, 2020 9:38 am

Re: New File Browser for ZX-UNO

Post by pjrodriguez »

Everything working fine for me. Congratulations again!
User avatar
bob_fossil
Manic Miner
Posts: 654
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

For any brave souls, there's a test v0.06 available here.

The big difference here is initial support for an NMI version of the browser. You can still launch it with the .dot command but it should now work when you press F5 on your ZX-UNO (or SpecEmu :) ) or the NMI button on your actual esxdos supporting hardware.

To install the NMI version, rename NMI.SYS in your SYS folder to NMI.BAK - so you can easily restore the original NMI handler later on if need be - and then copy the browse NMI.SYS into the SYS folder. The NMI version of browse needs a /TMP folder on the disk - this should be there already if you've used the default NMI handler before.

The NMI version doesn't load .pzx files (you can still do this with the .dot command version) or let you save snapshots. It should autostart .tap, .trd, .sna, .z80 and .bas files.

Usual warnings apply - more so with the NMI version as if it crashes or does something silly it tends to take esxdos down with it - requiring a hard reset or power cycle to restore normality.

Keen eyed viewers will note that the .dot and .sys files are now just stubs which load in the new BROWSE.BIN file. I was running out of space in the ,dot command RAM bank so I've moved the code into normal RAM to give me more room (32768 onwards).
User avatar
Cgonzalez
Drutt
Posts: 40
Joined: Thu Mar 15, 2018 10:03 pm
Location: Santiago, Chile

Re: New File Browser for ZX-UNO

Post by Cgonzalez »

Wow! This is Perfect! I was waiting a long time for this, Thank You!

A little suggestion, I've an omni 128, also a lot of rubber keys 48's, can u please add an option to change the cursors keys to be used without caps (ex. 5,6,7,8 keys) as this machines doesn't have a specifics keys for cursor control.

The nmi version is working sweet on my omni with esxdos 0.85, I just need to create the temp folder (by installing regular version) to make it work.
Image

Regards
User avatar
bob_fossil
Manic Miner
Posts: 654
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

Cgonzalez wrote: Wed May 13, 2020 2:50 am Wow! This is Perfect! I was waiting a long time for this, Thank You!

A little suggestion, I've an omni 128, also a lot of rubber keys 48's, can u please add an option to change the cursors keys to be used without caps (ex. 5,6,7,8 keys) as this machines doesn't have a specifics keys for cursor control.
Thanks for the kind words and feedback! I was thinking of letting the left, right, up, down and select be redefined or mapped to a joystick in the configuration editor so you could just use the browse from a joystick. The already existing special keys like first / last entry (e.g. Q & A) would need to be SHIFTed to distinguish them - this would also still let you use BREAK to exit and cursors to navigate.
pjrodriguez
Drutt
Posts: 23
Joined: Tue May 05, 2020 9:38 am

Re: New File Browser for ZX-UNO

Post by pjrodriguez »

Your new version works fine in my system, both the dot command and the nmi version.
However, if you are planning to take the nmi path in my opinion that would be a lot of work because the nmi version would be only usable if it had all the features present in the official esxdos nmi handler or even better Dr. Slump's custom nmi handler. That means at least saving snapshots, deleting and renaming files and so on. Of course it would be lovely if you could provide a complete nmi handler but I don't know if it's worth it.
Anyway in its present state the dot command is a pleasure to use and has changed the way I use my real Spectrum +3. Great work!
Last edited by pjrodriguez on Wed May 13, 2020 4:39 pm, edited 1 time in total.
User avatar
Seven.FFF
Manic Miner
Posts: 735
Joined: Sat Nov 25, 2017 10:50 pm
Location: USA

Re: New File Browser for ZX-UNO

Post by Seven.FFF »

bob_fossil wrote: Tue May 12, 2020 10:01 pm Keen eyed viewers will note that the .dot and .sys files are now just stubs which load in the new BROWSE.BIN file. I was running out of space in the ,dot command RAM bank so I've moved the code into normal RAM to give me more room (32768 onwards).
Does this cause problems if you launch the NMI window and then dismiss it again without launching a file - does BASIC get stomped on?

On the Uno and Next you can use other (non-128K) RAM banks paged in instead of the 5/2/n, but you don't have that on a standard Spectrum. Some divIDE/divMMCs also have up to 128K of separate RAM which can be swapped in at $2000, but you can't rely on all of them having that. I'm genuinely interested in how you're designing this, none of it is a criticism :)
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins
User avatar
bob_fossil
Manic Miner
Posts: 654
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

pjrodriguez wrote: Wed May 13, 2020 3:11 pm Your new version works fine in my system, both the dot command and the nmi version.
However, if you are planning to take the nmi path in my opinion that would be a lot of work because the nmi version would be only usable if it had all the features present in the official esxdos nmi handler or even better Dr. Slump's custom nmi handler. That means at least saving snapshots, deleting and renaming files and so on. Of course it would be lovely if you could provide a complete nmi handler but I don't know if it's worth it.
Anyway in its present state the dot command is a pleasure to use and has changed the way I use my real Spectrum +3. Great work!
I take your points about the NMI version. Someone asked about it a while back and it wasn't as hard to implement as I thought it would be. It's not a replacement for the default or Dr Slump's custom NMI but it's good enough for me as I tend to do any file management on my PC - to allow for long file names.

Thanks again for the kind words. It's very humbling for a project I started as I kind of what-if prototype. :)
User avatar
bob_fossil
Manic Miner
Posts: 654
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

Seven.FFF wrote: Wed May 13, 2020 4:18 pm Does this cause problems if you launch the NMI window and then dismiss it again without launching a file - does BASIC get stomped on?

On the Uno and Next you can use other (non-128K) RAM banks paged in instead of the 5/2/n, but you don't have that on a standard Spectrum. Some divIDE/divMMCs also have up to 128K of separate RAM which can be swapped in at $2000, but you can't rely on all of them having that. I'm genuinely interested in how you're designing this, none of it is a criticism :)
When you enter the NMI, the first thing I do from inside the esxdos RAM page is save out the 48k to a file in the tmp folder - the default NMI only saves the .scr to a file, which it reloads when it quits to restore the screen. When you quit it without doing anything, I restore the RAM from the file which puts the memory back to how it was before the browser ran and esxdos does the rest.

It's probably more of an issue with the .dot command. This assumes 32768 and onwards is available which is usually true as if you're using .dot commands as you're in the BASIC. If you've got a sufficiently large BASIC program or code loaded in this will get overwritten by the browser and the buffers it uses for the file entries and long filenames.
User avatar
Luzie
Manic Miner
Posts: 906
Joined: Fri May 01, 2020 2:07 pm

Re: New File Browser for ZX-UNO

Post by Luzie »

bob_fossil wrote: Wed May 13, 2020 5:26 pm
pjrodriguez wrote: Wed May 13, 2020 3:11 pm Your new version works fine in my system, both the dot command and the nmi version.
However, if you are planning to take the nmi path in my opinion that would be a lot of work because the nmi version would be only usable if it had all the features present in the official esxdos nmi handler or even better Dr. Slump's custom nmi handler. That means at least saving snapshots, deleting and renaming files and so on. Of course it would be lovely if you could provide a complete nmi handler but I don't know if it's worth it.
Anyway in its present state the dot command is a pleasure to use and has changed the way I use my real Spectrum +3. Great work!
I take your points about the NMI version. Someone asked about it a while back and it wasn't as hard to implement as I thought it would be. It's not a replacement for the default or Dr Slump's custom NMI but it's good enough for me as I tend to do any file management on my PC - to allow for long file names.

Thanks again for the kind words. It's very humbling for a project I started as I kind of what-if prototype. :)
Maybe a way to think over is: Add loading of "New File Browser for ZX-UNO" via hotkey in Dr. Slump's custom nmi handler ( http://board.esxdos.org/viewtopic.php?pid=292#p292 ). Like Dr. Slump added loading the original "old" NMI with hotkey "J":

Image
User avatar
bob_fossil
Manic Miner
Posts: 654
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

Luzie wrote: Wed May 13, 2020 6:06 pm Maybe a way to think over is: Add loading of "New File Browser for ZX-UNO" via hotkey in Dr. Slump's custom nmi handler ( http://board.esxdos.org/viewtopic.php?pid=292#p292 ). Like Dr. Slump added loading the original "old" NMI with hotkey "J":

Image
I did originally have some code in the NMI which tried to load in the default NMI (renamed to NMI.ORG) if you had shift pressed down when you entered the NMI but it was buggy. This also had the side effect of locking you back into the old NMI menu until you hard reset - which then reloads the newer NMI.SYS.
User avatar
bob_fossil
Manic Miner
Posts: 654
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

Another test version available here.

You can now enable Kempston joystick support in the BRWSCFG config editor. You can also set your own key controls for up, down, left, right and select. This means you now have to press Caps Shift to access the other existing keys, like Q, A, P, X (Break and Delete keys are pre-shifted).

Shift + N exits and restarts the NMI with the file at SYS/NMI.ORG - so you can now switch back to the default NMI or another custom handler (just rename it to NMI.ORG). To get back to the browse NMI without having to power cycle or hard reset, run the included .dot command NMIINIT.
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: New File Browser for ZX-UNO

Post by RMartins »

Cgonzalez wrote: Wed May 13, 2020 2:50 am Wow! This is Perfect! I was waiting a long time for this, Thank You!

A little suggestion, I've an omni 128, also a lot of rubber keys 48's, can u please add an option to change the cursors keys to be used without caps (ex. 5,6,7,8 keys) as this machines doesn't have a specifics keys for cursor control.

The nmi version is working sweet on my omni with esxdos 0.85, I just need to create the temp folder (by installing regular version) to make it work.
Image

Regards
Nice LCD, exactly the right width for a speccy!
Can I ask where you got that ?
User avatar
Cgonzalez
Drutt
Posts: 40
Joined: Thu Mar 15, 2018 10:03 pm
Location: Santiago, Chile

Re: New File Browser for ZX-UNO

Post by Cgonzalez »

RMartins wrote: Thu May 14, 2020 10:22 pm
Cgonzalez wrote: Wed May 13, 2020 2:50 am Wow! This is Perfect! I was waiting a long time for this, Thank You!

A little suggestion, I've an omni 128, also a lot of rubber keys 48's, can u please add an option to change the cursors keys to be used without caps (ex. 5,6,7,8 keys) as this machines doesn't have a specifics keys for cursor control.

The nmi version is working sweet on my omni with esxdos 0.85, I just need to create the temp folder (by installing regular version) to make it work.
Image

Regards
Nice LCD, exactly the right width for a speccy!
Can I ask where you got that ?
https://retroradionics.co.uk/

Omni HQ Laptop
pjrodriguez
Drutt
Posts: 23
Joined: Tue May 05, 2020 9:38 am

Re: New File Browser for ZX-UNO

Post by pjrodriguez »

Everything fine with the new versión.
User avatar
Luzie
Manic Miner
Posts: 906
Joined: Fri May 01, 2020 2:07 pm

Re: New File Browser for ZX-UNO

Post by Luzie »

bob_fossil wrote: Tue May 12, 2020 10:01 pm For any brave souls, there's a test v0.06 available here.

The big difference here is initial support for an NMI version of the browser. You can still launch it with the .dot command but it should now work when you press F5 on your ZX-UNO (or SpecEmu :) ) or the NMI button on your actual esxdos supporting hardware.
Your NMI.SYS seem to rely on Start-Path /sys/nmi.sys
Could you please do a version which can be started from this Path: /sys/nmi/old086.sys or /sys/nmi/old085.sys
So I can try to use Dr. Slumps NMI navigator as default NMI-browser. And when in Dr. Slumps can call your New File Browser by pressing Hotkey J
Thanks in advance!
User avatar
bob_fossil
Manic Miner
Posts: 654
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

Luzie wrote: Fri May 15, 2020 7:17 pm Your NMI.SYS seem to rely on Start-Path /sys/nmi.sys
Could you please do a version which can be started from this Path: /sys/nmi/old086.sys or /sys/nmi/old085.sys
So I can try to use Dr. Slumps NMI navigator as default NMI-browser. And when in Dr. Slumps can call your New File Browser by pressing Hotkey J
Thanks in advance!
I'm not sure I understand what you want me to do? My NMI.SYS only references the following files:

Code: Select all

/bin/browse.bin	- the actual browser code to run, whether started from .dot or NMI
/tmp/browse.nmi	- temporary file to hold the RAM contents while in NMI
/sys/nmi.org	- browser path to 'default' SYS file to start when Shift + N is pressed (e.g. the original esxdos NMI.SYS)
There is no reference to /SYS/NMI.SYS in my NMI.SYS. You should be able to put it in those other folders (which I assume are the paths used by Dr Slump's NMI.SYS to restart to the default NMI) with it renamed to the old???.sys filename.
User avatar
Luzie
Manic Miner
Posts: 906
Joined: Fri May 01, 2020 2:07 pm

Re: New File Browser for ZX-UNO

Post by Luzie »

bob_fossil wrote: Fri May 15, 2020 9:51 pm I'm not sure I understand what you want me to do? My NMI.SYS only references the following files:

Code: Select all

/bin/browse.bin	- the actual browser code to run, whether started from .dot or NMI
/tmp/browse.nmi	- temporary file to hold the RAM contents while in NMI
/sys/nmi.org	- browser path to 'default' SYS file to start when Shift + N is pressed (e.g. the original esxdos NMI.SYS)
There is no reference to /SYS/NMI.SYS in my NMI.SYS. You should be able to put it in those other folders (which I assume are the paths used by Dr Slump's NMI.SYS to restart to the default NMI) with it renamed to the old???.sys filename.
Thanks to your help I found my error:
I was on wrong esxDOS-Version in my files on PC and in esxDOS 0.8.6 instead of 0.8.7:
I need to copy your /sys/nmi.sys to /sys/nmi/old087.sys
This works perfect for me on my first short tests.

SOLVED - See below (following two posts)
SOLVED: But this I not really understand:
bob_fossil wrote: Fri May 15, 2020 9:51 pm

Code: Select all

/sys/nmi.org	- browser path to 'default' SYS file to start when Shift + N is pressed (e.g. the original esxdos NMI.SYS)
Shouldn´t this read:
/sys/nmi.sys
SOLVED: and: I never read about a file /sys/nmi.org. And never heard about Shift + N on esxDOS. At which point can this be used?

Again: Thank you very much to get this going as I wanted it.

btw.: Before fixing my error esxDOS 0.8.7 with "Dr. Slumps Navigator "just shortly shows this while pressing Hotkey J in Dr. Slumps:
Image
Last edited by Luzie on Sat May 16, 2020 9:16 am, edited 5 times in total.
Post Reply