Long Filename Browser for ZX-UNO / esxDOS

Field Programmable Gate Array based devices! As exciting as they sound
Post Reply
keithshaw3
Drutt
Posts: 31
Joined: Wed May 20, 2020 4:52 pm

Re: New File Browser for ZX-UNO

Post by keithshaw3 »

Looks cleaner to me and extra chrs is great, will test over the weekend and report any issues

K
akeley
Dynamite Dan
Posts: 1048
Joined: Sat Feb 01, 2020 5:47 pm

Re: New File Browser for ZX-UNO

Post by akeley »

Thank you for including the "file counter" feature. For me this browser is now complete, I can't think of anything else to add - it's quite perfect, functionality-wise. I've just tried this latest version briefly and it seems to be working fine.

Now, I said I can't think of anything else to add, but perhaps I should've prefaced it with "sensible" :) I have this one idea...well; is there any way to pause the "loading" scr$? This is the only irksome thing about insta-loading from DIVs...it seems the scr$ are there, but they only flash briefly for a second or so.
keithshaw3
Drutt
Posts: 31
Joined: Wed May 20, 2020 4:52 pm

Re: New File Browser for ZX-UNO

Post by keithshaw3 »

Great idea, some of those screens are so iconic it would be great to be able to pause/freeze them if possible

K
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 »

XoRRoX wrote: Sat Jun 20, 2020 1:27 pm Wow, looks great overall 8-)

At first glance, I think only the reduced size n looks a bit odd.

I'll try to try it out soon.
Agree about the n. I was just trying out different widths for some characters and it doesn't quite work for that one. I'll put it back to how it was before.
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 »

akeley wrote: Sat Jun 20, 2020 3:02 pm Now, I said I can't think of anything else to add, but perhaps I should've prefaced it with "sensible" :) I have this one idea...well; is there any way to pause the "loading" scr$? This is the only irksome thing about insta-loading from DIVs...it seems the scr$ are there, but they only flash briefly for a second or so.
From BASIC you can enter:

Code: Select all

.tapein -p
You should then get a message back saying 'SCREEN$ pause is now OFF / ON' depending on the toggle status. Is that any better? If so, I may be able to do the same thing as a setting in the browser.
akeley
Dynamite Dan
Posts: 1048
Joined: Sat Feb 01, 2020 5:47 pm

Re: New File Browser for ZX-UNO

Post by akeley »

Interesting option! Does not seem to do anything unfortunately :/ I've tried it both with your browser and old esx NMI.
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 »

akeley wrote: Sat Jun 20, 2020 7:00 pm Interesting option! Does not seem to do anything unfortunately :/ I've tried it both with your browser and old esx NMI.
I've only tried it via SpecEmu and it seems to add a 2 - 3 second pause when loading the screen. I can see the pause when I load in the .tap files I have for games like N.O.M.A.D. and Bruce Lee. I guess it only works when it detects a normal SCREEN$ block (address 16384, length 6912 bytes) in the .tap file.
pjrodriguez
Drutt
Posts: 23
Joined: Tue May 05, 2020 9:38 am

Re: New File Browser for ZX-UNO

Post by pjrodriguez »

Very nice idea the proportional font. I don't mind about the "n" but maybe the "h" is a bit too wide.
A very small issue, when the filename consists of capital letters the file extension appears also in caps even if it's written in lowercase. For example the file "HATE.tap" appears as "HATE.TAP".
And could you add the file size in the bottom bar?
akeley
Dynamite Dan
Posts: 1048
Joined: Sat Feb 01, 2020 5:47 pm

Re: New File Browser for ZX-UNO

Post by akeley »

bob_fossil wrote: Sat Jun 20, 2020 7:17 pm I've only tried it via SpecEmu and it seems to add a 2 - 3 second pause when loading the screen. I can see the pause when I load in the .tap files I have for games like N.O.M.A.D. and Bruce Lee. I guess it only works when it detects a normal SCREEN$ block (address 16384, length 6912 bytes) in the .tap file.
It does work like that on my +2 too, there definitely is a pause, like I mentioned earlier. Yes, perhaps it's more like 2-3 seconds. But I couldn't see any difference after using that .tapein -p command, seems to be still the same length. Maybe it's on by default, and when you set it to OFF there is the scr$ gets ignored.

Anyway, it's too short to enjoy the artwork or take a photo. Do you think it'd be possible to turn it into a pause-with-key-press? I suppose it'd be more on the esxDOS side though...

The other solution, which was my original idea, would be doing it independently from.tap: loading a .scr from SD location, displaying it, waiting for key press, then loading the game itself. I know it's probably a far-out proposition, so I'm just thinking out loud...
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 »

bob_fossil wrote: Sat Jun 20, 2020 6:04 pm From BASIC you can enter:

Code: Select all

.tapein -p
You should then get a message back saying 'SCREEN$ pause is now OFF / ON' depending on the toggle status. Is that any better? If so, I may be able to do the same thing as a setting in the browser.
Or toggle on/off while loading with a hotkey or e.g. enable SCREEN$ pause when loading .TAP with Caps Shift+Enter?
bob_fossil wrote: Sat Jun 20, 2020 7:17 pm I've only tried it via SpecEmu and it seems to add a 2 - 3 second pause when loading the screen. I can see the pause when I load in the .tap files I have for games like N.O.M.A.D. and Bruce Lee. I guess it only works when it detects a normal SCREEN$ block (address 16384, length 6912 bytes) in the .tap file.
We could ask .tapein v0.3 author ub880d ( http://sindik.at/~ub880d/2016/03/3-drob ... a-tapeout/ ) about it and if he can extend delay or "wait for keypress" after loading a SCREEN$
akeley
Dynamite Dan
Posts: 1048
Joined: Sat Feb 01, 2020 5:47 pm

Re: New File Browser for ZX-UNO

Post by akeley »

Luzie wrote: Sun Jun 21, 2020 2:03 pm We could ask .tapein v0.3 author ub880d ( http://sindik.at/~ub880d/2016/03/3-drob ... a-tapeout/ ) about it and if he can extend delay or "wait for keypress" after loading a SCREEN$
That'd be ideal, since it's already built in. I can read a little bit Czech but can't see any links to contact him there though.
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: Sat Jun 20, 2020 8:51 pm Very nice idea the proportional font. I don't mind about the "n" but maybe the "h" is a bit too wide.
A very small issue, when the filename consists of capital letters the file extension appears also in caps even if it's written in lowercase. For example the file "HATE.tap" appears as "HATE.TAP".
And could you add the file size in the bottom bar?
I don't do any uppercase processing on the filenames I get from the disk so what you're seeing is the filename from the FAT entry on the disk.I suspect that 'HATE.tap' is ending up as a standard 8.3 filename 'HATE.TAP' when copied to the FAT disk. I think you only get lower case extensions on FAT when the file has to be stored as a long filename. Does the extension display as lower case if you add spaces or full stops between the characters - e.g. do something to force it into a LFN?

I don't have enough free space on the bottom bar (plus file size is not that important information for me :) ), which is why I put the file size on the Caps Shift + F info display.
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: Sun Jun 21, 2020 2:03 pm We could ask .tapein v0.3 author ub880d ( http://sindik.at/~ub880d/2016/03/3-drob ... a-tapeout/ ) about it and if he can extend delay or "wait for keypress" after loading a SCREEN$
I think it would need a change to the esxdos ROM code. .tapein is just calling an esxdos RST function to toggle the pause.
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 »

Been having a play around and came up with this:

Image

Symbol Shift + F now toggles full screen view. This puts you into a special mode where a preview of the loading screen from a .tap or screen in memory from a snapshot is shown. Loading screens from .tap files are shown if the .tap has a block of 6912 bytes long or a block starting at address 16384. .sna files support previewing for 48 / 128 versions. .z80 files are currently not supported. If the file cannot be previewed, the filename is shown across the bottom of the screen.

To leave full screen view, just press Symbol Shift + F again. Navigation keys work as before. Move to the file or screen you want to load and press ENTER.

Test version can be downloaded here.
keithshaw3
Drutt
Posts: 31
Joined: Wed May 20, 2020 4:52 pm

Re: New File Browser for ZX-UNO

Post by keithshaw3 »

Amazing work :)

Going to try this later.

K
XoRRoX
Manic Miner
Posts: 233
Joined: Wed Jul 11, 2018 6:34 am

Re: New File Browser for ZX-UNO

Post by XoRRoX »

Looks like a really neat feature :)
Thanks for your continued development.
akeley
Dynamite Dan
Posts: 1048
Joined: Sat Feb 01, 2020 5:47 pm

Re: New File Browser for ZX-UNO

Post by akeley »

Holy Wow. The man's gone an' done it. Unbelievable...especially how fast it is!

If there was an award for The Most Accomodating Dev, Ever you 'd have it in a bag [mention]bob_fossil[/mention]. Thank you again!

Probably best if I take a break from this thread, before I start asking for .tzx support or something equally loony ;) Will go and finally enjoy my revitalized DIV, and recommend your browser to all still stuck in the dark ages.
zxassembler
Drutt
Posts: 5
Joined: Thu Jun 25, 2020 8:55 pm

Re: New File Browser for ZX-UNO

Post by zxassembler »

Wow!. Excellent browser with very nice features. It's working really well. Just a little problem (¿?) when I have tried it with all the TAP games in the last available TOSEC. I have made folders for every letter, and inside them some subfolders as necessary to split the games in folders of 250 games max. I am using a 1GB sdcard formatted in FAT16. When I browse inside a particular folder some games appear with its correct long name and others with a short (8+3) name. I don't know why. Are still too many games for each subfolder (250)?. Maybe some incompatible characters in some of the TOSEC games?

Has someone tried this with thousands of games in a lot of subfolders?

Thank you very much in advance. Keep up the good work. This is really a very, very nice browser.
Beaps
Drutt
Posts: 4
Joined: Fri Jun 26, 2020 1:42 am

Re: New File Browser for ZX-UNO

Post by Beaps »

Im a Speecy noob, how do I add kempston support for the menu.

Thanks
B
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 »

zxassembler wrote: Thu Jun 25, 2020 9:07 pm Wow!. Excellent browser with very nice features. It's working really well. Just a little problem (¿?) when I have tried it with all the TAP games in the last available TOSEC. I have made folders for every letter, and inside them some subfolders as necessary to split the games in folders of 250 games max. I am using a 1GB sdcard formatted in FAT16. When I browse inside a particular folder some games appear with its correct long name and others with a short (8+3) name. I don't know why. Are still too many games for each subfolder (250)?. Maybe some incompatible characters in some of the TOSEC games?

Has someone tried this with thousands of games in a lot of subfolders?

Thank you very much in advance. Keep up the good work. This is really a very, very nice browser.
Thanks for the kind words.

The browser has two 8k buffers. The first is used for disk access and storing the 8.3 filename data. The 8.3 filename data is a fixed size so the maximum amount of entries that the 8k buffer can hold is 426. So if you have more than 426 files in a folder, they won't be shown as the buffer will be full up. The second 8k buffer is where the long filenames are stored. These are not fixed size and could be up to 255 characters in length. In a worst case scenario of a folder with 426 files, the average length of the long filename would be roughly 19 characters per filename. Normally this balances out as you get a mixture of short, medium and long filenames which all fit inside the buffer.

From your description, it sounds like you're not hitting the limit of files in the folder but the limit of the buffer for the long filenames. When the long filename buffer is full, the code falls back to using the 8.3 filenames for the remaining files. The choice here was that showing 8.3 filenames would be better than not showing them at all. From memory, the TOSEC naming convention tends to result in verbose filenames which aren't an issue for modern computers which have magnitudes more memory than 8k to store a directory listing in. You could try trimming the filenames down to see if you get more files listed with long filenames.
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 »

Beaps wrote: Fri Jun 26, 2020 1:44 am Im a Speecy noob, how do I add kempston support for the menu.

Thanks
B
As mentioned in the 'Questions' section in the manual, you need to run the .dot command BRWSCFG from the BASIC prompt (e.g. type in .BRWSCFG and hit ENTER) to launch the config editor. Press CURSOR RIGHT to move to the 'Input' category. Then press CURSOR DOWN until the arrow '>' is next to the 'Kempston Joystick' option. Hit ENTER to turn the text from 'Off' to 'On'. Press S to save your new settings and exit back to BASIC. The browser should now recognise your Kempston joystick.
zxassembler
Drutt
Posts: 5
Joined: Thu Jun 25, 2020 8:55 pm

Re: New File Browser for ZX-UNO

Post by zxassembler »

bob_fossil wrote: Fri Jun 26, 2020 9:45 am
zxassembler wrote: Thu Jun 25, 2020 9:07 pm Wow!. Excellent browser with very nice features. It's working really well. Just a little problem (¿?) when I have tried it with all the TAP games in the last available TOSEC. I have made folders for every letter, and inside them some subfolders as necessary to split the games in folders of 250 games max. I am using a 1GB sdcard formatted in FAT16. When I browse inside a particular folder some games appear with its correct long name and others with a short (8+3) name. I don't know why. Are still too many games for each subfolder (250)?. Maybe some incompatible characters in some of the TOSEC games?

Has someone tried this with thousands of games in a lot of subfolders?

Thank you very much in advance. Keep up the good work. This is really a very, very nice browser.
Thanks for the kind words.

The browser has two 8k buffers. The first is used for disk access and storing the 8.3 filename data. The 8.3 filename data is a fixed size so the maximum amount of entries that the 8k buffer can hold is 426. So if you have more than 426 files in a folder, they won't be shown as the buffer will be full up. The second 8k buffer is where the long filenames are stored. These are not fixed size and could be up to 255 characters in length. In a worst case scenario of a folder with 426 files, the average length of the long filename would be roughly 19 characters per filename. Normally this balances out as you get a mixture of short, medium and long filenames which all fit inside the buffer.

From your description, it sounds like you're not hitting the limit of files in the folder but the limit of the buffer for the long filenames. When the long filename buffer is full, the code falls back to using the 8.3 filenames for the remaining files. The choice here was that showing 8.3 filenames would be better than not showing them at all. From memory, the TOSEC naming convention tends to result in verbose filenames which aren't an issue for modern computers which have magnitudes more memory than 8k to store a directory listing in. You could try trimming the filenames down to see if you get more files listed with long filenames.
Thank you for your detailed explanation. Yes, it looks a problem with so many very long names under the same subdirectory. That explains why the [8+3] number of filenames were changing from one subfolder to another. TOSEC names are very complete by default...but also very long! ;-). Thanks again for explaining this perfectly.
Beaps
Drutt
Posts: 4
Joined: Fri Jun 26, 2020 1:42 am

Re: New File Browser for ZX-UNO

Post by Beaps »

Brilliant Bob, works a treat now with the Joystick. What a relief it is to have something like this. AWESOME!!
zxassembler
Drutt
Posts: 5
Joined: Thu Jun 25, 2020 8:55 pm

Re: New File Browser for ZX-UNO

Post by zxassembler »

Instead of shorting the filenames of all the files, I have just tried the other way round...reducing the number of files in each subfolder to 100. And now all is working perfectly. Now the 8K buffer is not oversized and all the names appear correctly.

Thank you very much!
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 »

For the TOSEC set, I initially set them into A, B, C, etc folders, then I ran a script to create a subfolder truncated to the gamename and date of release, then moved the various tap versions into those folders. That helped to reduce the number of files in the folder, but also the folder names are now shorter than the tap filenames were, and it's much easier on the eye trying to find a game. I then split the A folder into A-Am and An-Az to keep the total filenumber below 256. S folder had to be split into 5.

So for instance the path to Amaurote is \Games\TOSEC-v2018-09-13_CM\a\A - Am\Amaurote (1987)
with 11 different releases stored in that folder
Post Reply