Long Filename Browser for ZX-UNO / esxDOS

Field Programmable Gate Array based devices! As exciting as they sound
Post Reply
User avatar
bob_fossil
Manic Miner
Posts: 659
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

andydansby wrote: Sat May 30, 2020 2:27 pm Nice. I had not even really thought about the overhead of some SD cards as it wasn't even on my radar. The next time before I buy my next one, I'm going to try to make sure it's a faster SD card. I had always thought PNY was a decent SD card, but now I'm going to have to stick with Sandisk.
Any recommended cards other than Sandisk?
It's not company policy to give out endorsements. :) I have a 1 gig Micro SD card from Samsung inside an SD card adaptor and that exhibits the same slowness problems as a no name 4 gig Micro SD card.

I've no idea why it takes ~17 seconds to write 49152 bytes to a file - especially when I can copy a larger file onto the same Samsung card on my PC instantaneously. My Plus D disk drive I had many moons ago managed to write an entire 48K RAM snapshot in about 3 seconds to a 3.5" floppy disk. :)
andydansby
Microbot
Posts: 147
Joined: Fri Nov 24, 2017 5:09 pm
Location: Syracuse, NY, USA
Contact:

Re: New File Browser for ZX-UNO

Post by andydansby »

Wow, that’s was amazing fast. I’m going to give it a go later on.
akeley
Dynamite Dan
Posts: 1048
Joined: Sat Feb 01, 2020 5:47 pm

Re: New File Browser for ZX-UNO

Post by akeley »

It's got to be about these write speeds Seven.FFF was talking about earlier. It's similar in the SSD market, and it is how the other brands can stay in the game and offer cheaper alternatives. It's because we mostly read data, not write it. Fast write speeds only matter in specific situations, such as video/photo recording, or indeed using a homebrew browser to load ancient games...as you do :)

I just installed this browser on another card (*GB Platinet) I had been using before for esx 0.8.6, and it's also slow, about 5-7 seconds to evoke NMI menu. It was fine with esx though, so these cards are still pretty decent - do their jobs - but now that we have a cutting edge browser, we need similar cards too :) I've moved my ZX library to a spare Sandisk Ultra and it's near-instant.

[mention]bob_fossil[/mention] any chance for SCR support?
keithshaw3
Drutt
Posts: 31
Joined: Wed May 20, 2020 4:52 pm

Re: New File Browser for ZX-UNO

Post by keithshaw3 »

Another quality of life improvement if possible, can we have a sort option for directories, alphabetical or last added?

K
User avatar
Seven.FFF
Manic Miner
Posts: 744
Joined: Sat Nov 25, 2017 10:50 pm
Location: USA

Re: New File Browser for ZX-UNO

Post by Seven.FFF »

bob_fossil wrote: Sun May 31, 2020 6:38 pm I've no idea why it takes ~17 seconds to write 49152 bytes to a file - especially when I can copy a larger file onto the same Samsung card on my PC instantaneously. My Plus D disk drive I had many moons ago managed to write an entire 48K RAM snapshot in about 3 seconds to a 3.5" floppy disk. :)
Could it be related to the F_OPEN mode? Is it faster on the second usage if you open with esx_mode_open_creat instead of esx_mode_creat_trunc?
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins
User avatar
bob_fossil
Manic Miner
Posts: 659
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

Seven.FFF wrote: Mon Jun 01, 2020 8:13 pm Could it be related to the F_OPEN mode? Is it faster on the second usage if you open with esx_mode_open_creat instead of esx_mode_creat_trunc?
My NMI code is using ESXDOS_MODE_WRITE|ESXDOS_MODE_OPEN_CREATE . I'm not using ESXDOS_MODE_CREAT_TRUNC at all.
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 »

Bob

Your browser is nearly perfect, just one suggestion, can it remember last selected file. For example if I select a game, load it, then press nmi again it loses the current selection and select the start of the current directory.

Also if I try to delete the Windows auto created folder "System Volume Information" I got an Error 016.

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

Re: New File Browser for ZX-UNO

Post by bob_fossil »

Cgonzalez wrote: Mon Jun 01, 2020 10:47 pm Bob

Your browser is nearly perfect, just one suggestion, can it remember last selected file. For example if I select a game, load it, then press nmi again it loses the current selection and select the start of the current directory.

Also if I try to delete the Windows auto created folder "System Volume Information" I got an Error 016.

Regards
There is a bug where you can't delete directories - ESXDOS error code 16 is 'Is a DIRECTORY'. I've fixed this in the next version.
User avatar
Pobulous
Dynamite Dan
Posts: 1365
Joined: Wed Nov 15, 2017 12:51 pm

Re: New File Browser for ZX-UNO

Post by Pobulous »

I have tap files in folders of the same name, so that I can have multiple versions of the game without having too many files.
One problem is that the folders don't seem to be sorted properly - it looks like they file browser isn't sorting the directory names, or not doing it properly.
User avatar
bob_fossil
Manic Miner
Posts: 659
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

Pobulous wrote: Sat Jun 06, 2020 8:55 pm I have tap files in folders of the same name, so that I can have multiple versions of the game without having too many files.
One problem is that the folders don't seem to be sorted properly - it looks like they file browser isn't sorting the directory names, or not doing it properly.
Can you give an actual example of the folder layout and contents as it's not particularly clear from your description? Also be aware that folders and files are sorted by the 8.3 filename not the long filename. So if you had 'Jet Set Willy 2.tap' which was stored as JETSET~1.TAP and 'Jet Set Willy.tap' which was stored as JETSET~2.TAP, 'Jet Set Willy 2.tap' would be listed first.
User avatar
Pobulous
Dynamite Dan
Posts: 1365
Joined: Wed Nov 15, 2017 12:51 pm

Re: New File Browser for ZX-UNO

Post by Pobulous »

Ah, sorting on the 8.3 filenames looks to be the issue, when combined with some odd 8.3 names that have been created.

For some reason, some daft shortnames have been created by Windows, eg for a bunch of directories starting with "Star"
Some of them are startr~1, startr~2 etc, others are st9662~1 so those ones are appearing much further up the folder list than would be expected.

It would be useful to find a way to bulk rename the 8.3 folders to be first 8 valid characters, with the number in dot 3 part
On a side note I also discovered another odd behaviour in Windows 10 sorting - it sorts names starting with numbers in numerical order -
So 20 Tons is listed before 180 in Windows
Apparently it's been doing that since Windows XP and I can't believe I only just noticed!
User avatar
Pobulous
Dynamite Dan
Posts: 1365
Joined: Wed Nov 15, 2017 12:51 pm

Re: New File Browser for ZX-UNO

Post by Pobulous »

It looks like Windows gives up on useful 8.3 names after startr~4, as it also happens with folders beginning with street after street~4 they become the same format of stnnnn~1 :roll:
User avatar
bob_fossil
Manic Miner
Posts: 659
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

Pobulous wrote: Sun Jun 07, 2020 2:13 pm Ah, sorting on the 8.3 filenames looks to be the issue, when combined with some odd 8.3 names that have been created.

For some reason, some daft shortnames have been created by Windows, eg for a bunch of directories starting with "Star"
Some of them are startr~1, startr~2 etc, others are st9662~1 so those ones are appearing much further up the folder list than would be expected.

It would be useful to find a way to bulk rename the 8.3 folders to be first 8 valid characters, with the number in dot 3 part
On a side note I also discovered another odd behaviour in Windows 10 sorting - it sorts names starting with numbers in numerical order -
So 20 Tons is listed before 180 in Windows
Apparently it's been doing that since Windows XP and I can't believe I only just noticed!
This isn't the first time this has cropped up. I sorted on the 8.3 filename as it's less work and I thought the 8.3 filename might bare some resemblance to the long filename. I've built an updated BROWSE.BIN file which you can get from here. This should sort using the long filename. I've given it a quick spin here and it doesn't seem noticeably slower. Would appreciate feedback from people. If there's no issues, I'll make the new sort the default for version 0.09.
User avatar
Pobulous
Dynamite Dan
Posts: 1365
Joined: Wed Nov 15, 2017 12:51 pm

Re: New File Browser for ZX-UNO

Post by Pobulous »

Thanks for the test build.
It certainly fixes the sorting order and it didn't feel any slower to me.

One small issue did crop up - after a while it won't display the current folder contents after pressing the NMI button until I push a cursor key.
This happens after a few times of pressing NMI, loading a program, pressing NMI, loading a different program, pressing NMI, etc.
Eventually it will stop displaying the folder contents after pressing the NMI button, and won't start again until the reset button is pressed.
It displays Working for a while, then that changes to the folder path as expected, but it doesn't display the folder contents.
It's possible that this issue also exists in the older builds and I didn't do enough testing in one sitting to trigger it.

It's slightly odd that a reset fixes it, as that doesn't reset the DivMMC, and the current folder on the SD card is preserved.
User avatar
bob_fossil
Manic Miner
Posts: 659
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

Pobulous wrote: Mon Jun 08, 2020 9:03 am Thanks for the test build.
It certainly fixes the sorting order and it didn't feel any slower to me.

One small issue did crop up - after a while it won't display the current folder contents after pressing the NMI button until I push a cursor key.
This happens after a few times of pressing NMI, loading a program, pressing NMI, loading a different program, pressing NMI, etc.
Eventually it will stop displaying the folder contents after pressing the NMI button, and won't start again until the reset button is pressed.
It displays Working for a while, then that changes to the folder path as expected, but it doesn't display the folder contents.
It's possible that this issue also exists in the older builds and I didn't do enough testing in one sitting to trigger it.

It's slightly odd that a reset fixes it, as that doesn't reset the DivMMC, and the current folder on the SD card is preserved.
It would be helpful to know if this is a regression from 0.08 or whether it has always been an issue as the current version has some changes to the code that displays the files.
User avatar
Pobulous
Dynamite Dan
Posts: 1365
Joined: Wed Nov 15, 2017 12:51 pm

Re: New File Browser for ZX-UNO

Post by Pobulous »

I just tried with .08 and I couldn't get it to happen, so it does look like something introduced in the new version.
User avatar
Pobulous
Dynamite Dan
Posts: 1365
Joined: Wed Nov 15, 2017 12:51 pm

Re: New File Browser for ZX-UNO

Post by Pobulous »

Sorry I just realised that I was testing with version .06 not .08. I will try again with .08
User avatar
Pobulous
Dynamite Dan
Posts: 1365
Joined: Wed Nov 15, 2017 12:51 pm

Re: New File Browser for ZX-UNO

Post by Pobulous »

OK, confirmed that .08 doesn't have the issue either.
User avatar
bob_fossil
Manic Miner
Posts: 659
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

Updated test version here.

This also fixes a bug I noticed with the new long filename sorting method. Files starting with lower case characters were being sorted at the end. The old 8.3 filenames were ALL CAPS so the sort didn't need to be case insensitive.
User avatar
Pobulous
Dynamite Dan
Posts: 1365
Joined: Wed Nov 15, 2017 12:51 pm

Re: New File Browser for ZX-UNO

Post by Pobulous »

There's a new issue with that beta - Shift X and Break do not restore the memory properly - the screen stays with the directory listing on it and the running program will crash. If no program is loaded it does the same.

I even managed to load a program, from a crashed state, and ended up with a new program running with the File Browser listing still on the screen! :lol:

Went back to the previous .09 just to confirm it wasn't a sudden hardware issue and that problem doesn't occur.
Spezzi63
Drutt
Posts: 44
Joined: Sat Dec 28, 2019 1:36 pm

Re: New File Browser for ZX-UNO

Post by Spezzi63 »

shift+x works here, but the help page (shift+H) with 009-a1 and 009-a2 does not.
I have not checked the sequence of the file names!
User avatar
Pobulous
Dynamite Dan
Posts: 1365
Joined: Wed Nov 15, 2017 12:51 pm

Re: New File Browser for ZX-UNO

Post by Pobulous »

Spezzi63 wrote: Mon Jun 08, 2020 2:44 pm shift+x works here, but the help page (shift+H) with 009-a1 and 009-a2 does not.
I have not checked the sequence of the file names!
Perhaps it's machine dependent - I have a +2a (actually running a +2e ROM, but that shouldn't matter), what model do you have?

On mine it seems to behave like it's in read-only mode (ie not saving/restoring the pre NMI memory state).
User avatar
bob_fossil
Manic Miner
Posts: 659
Joined: Mon Nov 13, 2017 6:09 pm

Re: New File Browser for ZX-UNO

Post by bob_fossil »

Pobulous wrote: Mon Jun 08, 2020 3:20 pm
Spezzi63 wrote: Mon Jun 08, 2020 2:44 pm shift+x works here, but the help page (shift+H) with 009-a1 and 009-a2 does not.
I have not checked the sequence of the file names!
Perhaps it's machine dependent - I have a +2a (actually running a +2e ROM, but that shouldn't matter), what model do you have?

On mine it seems to behave like it's in read-only mode (ie not saving/restoring the pre NMI memory state).
You haven't got the 'No NMI Write (Slow SD Cards)' option enabled in BRWSCFG? Shift +X from the NMI is working for me here.
User avatar
Pobulous
Dynamite Dan
Posts: 1365
Joined: Wed Nov 15, 2017 12:51 pm

Re: New File Browser for ZX-UNO

Post by Pobulous »

Nope, I haven't modified the brwscfg settings at all.

OK, it seems like I can't recreate the issue I was having. It's possible that the card was playing up and removing and reinserting to swap the files around has fixed it :?

I do have a Z80 file that when loaded still has the list of files from the browser on the screen - so something is odd there. It's a snapshot I created in Inkspector 2 of a TZX file, saved from an emulated +2a

Shift-H also displays a blank screen
Spezzi63
Drutt
Posts: 44
Joined: Sat Dec 28, 2019 1:36 pm

Re: New File Browser for ZX-UNO

Post by Spezzi63 »

Pobulous wrote: Mon Jun 08, 2020 4:08 pm Shift-H also displays a blank screen
Here also a +2A (+3e-Roms 1.43), DivIDE, 1 GB Transcend, 0.8.8 ESXDOS
Post Reply