Long Filename Browser for ZX-UNO / esxDOS

Field Programmable Gate Array based devices! As exciting as they sound
Post Reply
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: Wed Apr 29, 2020 6:24 pm First off, apologies for breaking your SD card.
No problem, I have lots of cards, and it's easy to repair or reformat any broken ones :) This byte mode 256MB card is also FAT16, with a single partition, so perhaps this is the problem. I will try with FAT32 on the same card, and a larger block mode card, to see if the issue goes away.

Here is the castlevania.tap file which blew up, if you want to try it yourself.
Last edited by Seven.FFF on Wed Apr 29, 2020 10:08 pm, edited 1 time in total.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins
lordoftime79
Drutt
Posts: 14
Joined: Mon Apr 13, 2020 3:10 pm

Re: New File Browser for ZX-UNO

Post by lordoftime79 »

It is a 2gb no partitions other than standard.
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: Wed Apr 29, 2020 9:49 pm
No problem, I have lots of cards, and it's easy to repair or reformat any broken ones :) This byte mode 256MB card is also FAT16, with a single partition, so perhaps this is the problem. I will try with FAT32 on the same card, and a larger block mode card, to see if the issue goes away.

Here is the castlevania.tap file which blew up, if you want to try it yourself.
If you were able to navigate the folders on the card okay (e.g. root folder shown, no garbage or corrupted filename entries), then that suggests the FAT reading code was working. Having had another look at the code which autostarts .tap files, I have spotted an issue which I've just fixed in the current development version. I'd found some code online which autostarts .tap files but that code wasn't designed to run from a .dot file - it uses the ix register to pass the filename into esxdos whereas .dot commands use hl. I'm surprised .tap file loading works at all. :)
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.04
  • You can now use cursor left / right to scroll up and down a page of files.
  • You can now use q and a keys to jump to the first and last entries in the list.
  • Fix possible issue using incorrect register when autostarting .tap files.
  • Optimisations to the 42 character print routine.
  • For FAT16 discs, the root cluster contains a set amount of directory entries and the code wasn't taking the size of this area into account when calculating the disk sector offset from the starting cluster of a directory entry. This would manifest itself as showing the root directory but showing garbage or empty lists for the subfolders. Thanks to Spezzi63 for supplying me with a HDF file to debug with.
  • Added .SNA and .Z80 autostart support via the .snapload dot command.
This is software in development so be aware they may be bugs. I haven't encountered any problems with SD card corruption but I've have had one report on a configuration I can't test on outside of emulation. If possible please test on a spare SD card or backup your SD card so you can restore it.
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 »

Seven.FFF wrote: Wed Apr 29, 2020 12:20 pm
bob_fossil wrote: Wed Apr 29, 2020 10:15 am Thanks for the kind words. I wasn't aware of a clash as I don't have a Next. :) At the risk of it ending up being called .browseymcbrowseface, I'm open to new name suggestions.
It shouldn’t be a problem if you want to keep calling it .browse. NextZXOS keeps its dot commands in /dot/, and eaxDOS running on a Next in the other personalities still uses /bin/, so they won’t clash.

It was done that way deliberately, as NextZXOS provides enhanced versions of many of the standard esxDOS commands which wouldn’t work in esxDOS -.ls for example, is 24KB instead of 2KB and has lots of sorting and column choosing options, more like the *nix version.
Dear bob_fossil, I just register here on the forum to say "Thank you" for this nice New File Browser supporting LFN!

btw. I renamed it to B so I can start it faster by just entering a .b :lol:
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: Fri May 01, 2020 11:12 am SD card corruption
To set your mind at rest Bob, I now don't think the card got corrupted. My working theory is that something stomped on divMMC RAM, which stopped any further card operations working till a full power off. There's something wrong with my Cisco +3 replacement power supply which leaves the Spectrum and divMMC partially powered even when I turn it off at the PSU switch. When I powered off at the mains, the card and divMMC were fine again.

Any remaining problems were possibly because it was FAT16. I haven't had time to do wider tests with different cards yet.

Cheers, Robin
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 »

Luzie wrote: Fri May 01, 2020 2:15 pm
Dear bob_fossil, I just register here on the forum to say "Thank you" for this nice New File Browser supporting LFN!

btw. I renamed it to B so I can start it faster by just entering a .b :lol:
Thanks for the kind words.

As for the shorter name, I was holding that 'feature' back until the 1.0 release! :)
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: Fri May 01, 2020 4:12 pm
To set your mind at rest Bob, I now don't think the card got corrupted. My working theory is that something stomped on divMMC RAM, which stopped any further card operations working till a full power off. There's something wrong with my Cisco +3 replacement power supply which leaves the Spectrum and divMMC partially powered even when I turn it off at the PSU switch. When I powered off at the mains, the card and divMMC were fine again.

Any remaining problems were possibly because it was FAT16. I haven't had time to do wider tests with different cards yet.

Cheers, Robin
Thanks for the information - I appreciate people taking time to test this and send feedback. I'll keep the disclaimer for the time being as I'm sure there are some remaining bugs to squash in the FAT and esxdos code.

I've certainly encountered the scenario during development where I've done something stupid inside my code and further attempts to use esxdos generated cryptic error 19 messages or going into the NMI menu caused a reset. Hard resetting SpecEmu or power cycling the ZX-UNO seemed to restore normality.
nihirash
Drutt
Posts: 4
Joined: Sat Apr 25, 2020 1:23 pm

Re: New File Browser for ZX-UNO

Post by nihirash »

ZXUNO, 4Gb Fat16 part.(8 Gb flash) - blank screen.
Spezzi63
Drutt
Posts: 44
Joined: Sat Dec 28, 2019 1:36 pm

Re: New File Browser for ZX-UNO

Post by Spezzi63 »

nihirash wrote: Fri May 01, 2020 8:42 pm ZXUNO, 4Gb Fat16 part.(8 Gb flash) - blank screen.
I would recommend not using a card with multiple partitions for now.
Correct drive information is required for the browser to work.
The author will hardly be able to obtain any knowledge from your description.

Many Greetings,
Günter
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 »

For those who are just getting a blank screen with their FAT16 cards after running the .dot command could you try downloading the following test version from here and see if the root file listing is now shown?

Don't get your hopes up - on the card I tested with (2gb FAT 16), whilst the blank screen was no longer encountered, navigating into the subfolders didn't work or listed corrupted files - but one problem at a time, eh? :)
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 »

Amazing work your doing here [mention]bob_fossil[/mention]. I've been waiting for LFN support for the ZX-Uno to come out and this works really well. Thanks for working on this.
ellvis
Drutt
Posts: 13
Joined: Tue Dec 26, 2017 11:55 am

Re: New File Browser for ZX-UNO

Post by ellvis »

nihirash wrote: Fri May 01, 2020 8:42 pm ZXUNO, 4Gb Fat16 part.(8 Gb flash) - blank screen.
I had the same problem and updating ESXDOS helped (as my ZXUNO came with some ancient version of it), browser now work. Need to test v0.4 now.
nihirash
Drutt
Posts: 4
Joined: Sat Apr 25, 2020 1:23 pm

Re: New File Browser for ZX-UNO

Post by nihirash »

I'm using single part. card and 0.8.7 esxDOS.

I may try reformat it to fat32 and try again
lordoftime79
Drutt
Posts: 14
Joined: Mon Apr 13, 2020 3:10 pm

Re: New File Browser for ZX-UNO

Post by lordoftime79 »

On my Fat16 card its garbled in some directories.
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 02, 2020 1:54 pm Amazing work your doing here @bob_fossil. I've been waiting for LFN support for the ZX-Uno to come out and this works really well. Thanks for working on this.
Thanks for the kind words. Glad you like it!
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 »

lordoftime79 wrote: Sat May 02, 2020 6:31 pm On my Fat16 card its garbled in some directories.
To clarify - you weren't getting any files listed with the previous vesions. Are you now getting some garbled directories with the test version I posted today or with the last release v0.04? The test version fixes a bug where the browser failed to start with a 2GB FAT16 card. There is still another bug I'm currently trying to fix where sub folders are not listing correctly on a 2gb FAT 16 card.
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 »

I've uploaded a new test version here.

On my test 2gb FAT16 card I can now see the root folder and navigate the sub folders correctly.
lordoftime79
Drutt
Posts: 14
Joined: Mon Apr 13, 2020 3:10 pm

Re: New File Browser for ZX-UNO

Post by lordoftime79 »

yes version 3 works on my Fat32 formatted card but I have no luck with Fat16 both the recent version ands the test allow browsing the root but when I go into some folders its garbled!
Spezzi63
Drutt
Posts: 44
Joined: Sat Dec 28, 2019 1:36 pm

Re: New File Browser for ZX-UNO

Post by Spezzi63 »

After my 2GB SD card also had empty content and the file view was destroyed, after saving the content of the SD card,
I reformatted the card (no quick format) and removed all the garbage that was distributed on the card.
A RAR-file from an image of the SD card resulted in 840MB, so approximately 1GB file remnants from Windows times have been present.
ESXDOS backup back on the freshly formatted card, and it works, it works ;)

DivMMC Enjoy / ESXDOS 0.8.5 / Browse v0.05Alpha2
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 »

lordoftime79 wrote: Sun May 03, 2020 3:11 pm yes version 3 works on my Fat32 formatted card but I have no luck with Fat16 both the recent version ands the test allow browsing the root but when I go into some folders its garbled!
I've got a FAT16 2gb SD card and a FAT16 4gb card with a 2gb partition and they both work okay. Initially I had garbled folders with the 4gb/2gb partition card but these started working after the changes in made in the alpha 2 test.

Can you create a .HDF or .IMG file from your SD Card? If you can compress the file (.zip or .rar) and make it available to me via a service like DropBox or Google Drive that lets you share large files, I can download it from there and try and debug the issue.
pjrodriguez
Drutt
Posts: 23
Joined: Tue May 05, 2020 9:38 am

Re: New File Browser for ZX-UNO

Post by pjrodriguez »

First of all, congratulations for your hard work, it's really impressive.
Your .dot file works great on a real Spectrum +3 equipped with a DivMMC Enjoy and a card with a single partition. However, it doesn't work with a card with two partitions, in my case the first one for +3e and the second one for EsxDos.
As a small suggestion, could you tell us where to poke the code to change the colour scheme? In my LCD TV the difference between white and bright white is not big enough.
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 »

pjrodriguez wrote: Tue May 05, 2020 9:51 am As a small suggestion, could you tell us where to poke the code to change the colour scheme? In my LCD TV the difference between white and bright white is not big enough.
Thanks for the kind words and feedback. I am looking at adding a configuration file so you can specify the colours and maybe the device number to read from to get around issues with multiple partitions. As a temporary workaround you could hex edit the BROWSE file to force different colours - which version number are you using?
pjrodriguez
Drutt
Posts: 23
Joined: Tue May 05, 2020 9:38 am

Re: New File Browser for ZX-UNO

Post by pjrodriguez »

bob_fossil wrote: Tue May 05, 2020 10:40 am
pjrodriguez wrote: Tue May 05, 2020 9:51 am As a small suggestion, could you tell us where to poke the code to change the colour scheme? In my LCD TV the difference between white and bright white is not big enough.
Thanks for the kind words and feedback. I am looking at adding a configuration file so you can specify the colours and maybe the device number to read from to get around issues with multiple partitions. As a temporary workaround you could hex edit the BROWSE file to force different colours - which version number are you using?
Thank you for your quick reply, I'm using 0.05 alpha 2.
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 »

Okay, so poking or hex editing the code won't do a lot as it was hard coded to apply a BRIGHT on the existing colour. I've uploaded another test version here.

In the .zip are two additional files - default.cfg and dark_green.cfg. Rename one of these files to BROWSE.CFG and copy it into the BIN folder along with the updated BROWSE file. If you used dark_green.cfg, you should have a black and green colour scheme when you start the browser. To go back to defaults either copy over default.cfg (the factory defaults) to BROWSE.CFG or delete BROWSE.CFG.

I'm working on a program to edit these .cfg files but for now you can change them by hex editing the BROWSE.CFG file. It's currently 8 bytes long and has the following layout:

Code: Select all

Top line colour - INK + (PAPER * 8) - defaults to 48 (INK 0,  PAPER 6)
Bottom line colour - INK + (PAPER * 8) - defaults to 48 (INK 0,  PAPER 6)
Border colour - INK - defaults to 7
File colour - INK + (PAPER * 8) - defaults to 56 (INK 0, PAPER 7)
Directory colour - INK + (PAPER * 8) - defaults to 57 (INK 1 PAPER 7)
Selection colour - INK + (PAPER * 8) or BRIGHT / FLASH on their own to apply that on top of the current file colour - defaults to 64 (BRIGHT)
Device number - device to read from 0 - 7, defaults to 1
Spare Byte - 0
Hope that's clear. :) It should make more sense when you see the file in a hex editor. Or you could wait a bit until I get a nicer .cfg editor written.
Post Reply