New File Browser for ZX-UNO

Show us what you're working on, (preferably with screenshots).
Post Reply
pjrodriguez
Berk
Posts: 18
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
0 x

User avatar
bob_fossil
Manic Miner
Posts: 231
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.
1 x

pjrodriguez
Berk
Posts: 18
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
0 x

User avatar
bob_fossil
Manic Miner
Posts: 231
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.
0 x

pjrodriguez
Berk
Posts: 18
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.
0 x

User avatar
Luzie
Berk
Posts: 36
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"
0 x

User avatar
bob_fossil
Manic Miner
Posts: 231
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.
1 x

User avatar
Luzie
Berk
Posts: 36
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
0 x

pjrodriguez
Berk
Posts: 18
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!
0 x

User avatar
bob_fossil
Manic Miner
Posts: 231
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).
1 x

Post Reply