Long Filename Browser for ZX-UNO / esxDOS

Field Programmable Gate Array based devices! As exciting as they sound
Post Reply
User avatar
Luzie
Manic Miner
Posts: 910
Joined: Fri May 01, 2020 2:07 pm

Re: New File Browser for ZX-UNO

Post by Luzie »

akeley wrote: Fri May 29, 2020 8:01 pm Also, how do you deal with the old NMI again? I just renamed mine to something like "NMI old" but I see it's possible to re-animate it from within the UI?
Read on about it from here: viewtopic.php?p=37251#p37251
bukem
Drutt
Posts: 5
Joined: Sat May 30, 2020 10:18 am

Re: New File Browser for ZX-UNO

Post by bukem »

Hi, I'm using version 0.7 on ZX Spectrum Next with FlashAIR 64GB SXDC (FAT32) and it looks like browser is corrupting file system. This is the content of TMP folder where browser is dumping memory snapshot:

Image

When I tried to use brwscfg to change the config it corrupted also the bin folder content.
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 »

bukem wrote: Sat May 30, 2020 10:31 am Hi, I'm using version 0.7 on ZX Spectrum Next with FlashAIR 64GB SXDC (FAT32) and it looks like browser is corrupting file system. This is the content of TMP folder where browser is dumping memory snapshot:

Image

When I tried to use brwscfg to change the config it corrupted also the bin folder content.
I'm using the esxdos API functions to write files (/TMP/BROWSE.NMI and /BIN/BROWSE.CFG) to the SD card - so if there is an issue it's likely to be in there. Judging from the filenames and sizes it looks like something has gone horribly wrong when esxdos saved the data to the disk. I don't have a 64gb card or a ZX Spectrum Next to test with. Can you try another SD card - maybe a smaller size?
bukem
Drutt
Posts: 5
Joined: Sat May 30, 2020 10:18 am

Re: New File Browser for ZX-UNO

Post by bukem »

I'll try to find smaller SD card and do some test.
bukem
Drutt
Posts: 5
Joined: Sat May 30, 2020 10:18 am

Re: New File Browser for ZX-UNO

Post by bukem »

OK, I've found the cause :shock: - I had enabled DMA support for esxDOS in config. I've just disabled it and corruption is gone.
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 »

Another casual observation of my trouble with slow browser I just had is the delay only happens if I activate the browser via NMI. If I use .browse the browser comes up immediately with no delay at all. I had before today just used the NMI to activate the browser.
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 »

bukem wrote: Sat May 30, 2020 11:46 am OK, I've found the cause :shock: - I had enabled DMA support for esxDOS in config. I've just disabled it and corruption is gone.
Glad you found the problem!
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 12:22 pm Another casual observation of my trouble with slow browser I just had is the delay only happens if I activate the browser via NMI. If I use .browse the browser comes up immediately with no delay at all. I had before today just used the NMI to activate the browser.
The .dot command doesn't write the file /TMP/BROWSE.NMI as the assumption is that as you've launched it from BASIC, we can just return back to that when you exit. Writing that file is the overhead on some SD cards. I have written another NMI.SYS for slower SD cards which doesn't write that file when you press the NMI button so it will start instantly. As you're not saving memory any more, snapshot saving and POKEs won't work. It will also trash the memory. However, if you just want to use the NMI as a hotkey to launch the browser to autostart your snapshots, tapes and disks it'll do. The user can then choose which NMI.SYS to use.
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 »

bob_fossil wrote: Sat May 30, 2020 12:37 pm
andydansby wrote: Sat May 30, 2020 12:22 pm Another casual observation of my trouble with slow browser I just had is the delay only happens if I activate the browser via NMI. If I use .browse the browser comes up immediately with no delay at all. I had before today just used the NMI to activate the browser.
The .dot command doesn't write the file /TMP/BROWSE.NMI as the assumption is that as you've launched it from BASIC, we can just return back to that when you exit. Writing that file is the overhead on some SD cards. I have written another NMI.SYS for slower SD cards which doesn't write that file when you press the NMI button so it will start instantly. As you're not saving memory any more, snapshot saving and POKEs won't work. It will also trash the memory. However, if you just want to use the NMI as a hotkey to launch the browser to autostart your snapshots, tapes and disks it'll do. The user can then choose which NMI.SYS to use.
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?
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 »

v0.08
  • Added setting 'No NMI write (Slow SD Cards)' to BRWSCFG which disables the saving of RAM when entering the NMI to stop delays on slow SD cards. Be aware that with this option enabled, saving snapshots and POKEs are disabled. It's also highly likely to cause a reset rather than returning you to your previous state if you decide to exit the NMI browser with this setting enabled.
  • Shift + F file information now shows the size of the file in bytes.
  • Shift + E will erase the selected file. Press Shift + Y to confirm.
  • NMI.SYS now creates a /TMP/ folder if not present to stop a reported issue with saving snapshots when the folder isn't there.
  • NMIINIT .dot command now takes an optional filename path parameter to load another NMI.SYS .
Download.
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.
Post Reply