Page 1 of 1

DFS Explorer

Posted: Mon Feb 04, 2019 8:33 pm
by pau1ie
Shawty has developed a DFS Image filer in javascript. I thought it might be useful on bbcmicro.co.uk, so hacked it around a little and uploaded it. At present the way to use it is to open the game details page for a game you are interested in, then edit the URL to change game.php to explore.php, e.g. Planet Nubium.

If you have any thoughts let me know, otherwise I will add in a link to the details page so it can be accessed with a click.

Re: DFS Explorer

Posted: Mon Feb 04, 2019 8:52 pm
by BigEd
That looks very handy!

Re: DFS Explorer

Posted: Fri Feb 08, 2019 9:26 pm
by pau1ie
OK, I have added a button to the game details page to invoke DFS explorer. I think it works.

Re: DFS Explorer

Posted: Fri Feb 08, 2019 9:32 pm
by flaxcottage
That looks to be very handy. =D> =D>

Re: DFS Explorer

Posted: Fri Feb 08, 2019 10:57 pm
by lurkio
pau1ie wrote:
Fri Feb 08, 2019 9:26 pm
OK, I have added a button to the game details page to invoke DFS explorer. I think it works.
Can we have the Play button first -- at the top of the column of buttons?

:?:

Re: DFS Explorer

Posted: Sat Feb 09, 2019 1:48 am
by Arcadian
Thanks Pau1ie and Shawty, this is really neat!

Chet, agree it would be nice to have the Play and then Download buttons appear first before Explore...

Re: DFS Explorer

Posted: Sat Feb 09, 2019 9:47 pm
by pau1ie
I agree that order would be more logical. Done.

Re: DFS Explorer

Posted: Sat Aug 31, 2019 10:08 pm
by pau1ie
I have updated this because it struck me that it would be nice to be able to see the code inline. The code looks at the file and formats it as a Basic program (Thanks sweh), text, assembly and hex dump. It displays the version that looks most likely correct. I'm quite pleased with it. Let me know if I could improve anything, particularly the disassembler, which I expect still contains bugs.

I had also considered incorporating Shawtys image filer to display images, but can't think of a way to detect whether a file is likely to be a screen image.

Re: DFS Explorer

Posted: Sun Sep 01, 2019 12:57 pm
by tricky
Possibly load address is &3000 or &5800 and plus length equals &8000 but I don't know how you detect the actual mode or guess the palette!
You could display all 2,4 and 8 colour versions with the default palette.

Re: DFS Explorer

Posted: Sun Sep 01, 2019 3:28 pm
by billcarr2005
pau1ie wrote:
Sat Aug 31, 2019 10:08 pm
I have updated this because it struck me that it would be nice to be able to see the code inline.
Fantastic addition! =D>

Re: DFS Explorer

Posted: Sun Sep 01, 2019 5:53 pm
by leenew
I don't really know why I like this feature 🤔.... but I do 😀

Lee

Re: DFS Explorer

Posted: Tue Sep 03, 2019 8:01 am
by Rfairman
I cannot see the DFS Explorer button when I look at a games details page
regards
Richard

Re: DFS Explorer

Posted: Tue Sep 03, 2019 9:05 am
by leenew
Can you see 4 big blue buttons:

PLAY
DOWNLOAD
EXPLORE DISC
BACK TO LIST

It is the EXPLORE DISC button...

Re: DFS Explorer

Posted: Thu Sep 05, 2019 10:09 pm
by pau1ie
tricky wrote:
Sun Sep 01, 2019 12:57 pm
Possibly load address is &3000 or &5800 and plus length equals &8000 but I don't know how you detect the actual mode or guess the palette!
You could display all 2,4 and 8 colour versions with the default palette.
This is actually a good idea, so I have done it. Some of the screens are not that long, so I have taken anything which the load address is in that range. I quite like Planet Nubium for example. It isn't perfect though, so detects some things that obviously aren't screens, but then you can always click on the other buttons. If anyone has better ideas let me know!

Re: DFS Explorer

Posted: Fri Sep 06, 2019 7:11 am
by tricky
They will probably be a multiple of 8 times something between 24 and 32 (192, 200...256) And horizontally probably a multiple of 256, 320, 512 or 640.

Re: DFS Explorer

Posted: Tue Sep 10, 2019 9:59 pm
by pau1ie
I'm not sure what you mean. I assume They is the start and length. It needs to be divisible by 8, as a character is 8x1,2 or 4 bytes, so I expect that is what the 8 is. But I don't understand what the 24-32 is. Or indeed the 256,320,512 or 640.

Looking at Planet Nubium, the files that I detect as screens dumps that aren't start at &7000 and the lengths are:
  • &1000 - 4096
  • &0400 - 1024
  • &0340 - 832
  • &003F - 63
It strikes me the bottom one doesn't divide by 8. I have added in a rule (Only on my desktop, I haven't released it yet) that if it doesn't divide by 8 it isn't a screen and that has sorted out a few false positives.

Re: DFS Explorer

Posted: Tue Sep 10, 2019 10:36 pm
by tricky
I was saying that they are likely to be between 24 and 32 rows, so they should be a multiple of 24*8 or 25*8 .. 32*8, that is, a multiple of 192, 200..256 high and common widths will be 320 bytes wide for mode 4, 5 or 6 and 640 wide for modes 0,1,2 or 3; sometimes games use a narrower screen to save memory and run faster which would be 256 or 512 bytes.

Code: Select all

IMG = false
If size > 10240 then rem mode 0, 1 or 2
  If 0 = size mod 512 then
    Rows = size / 512
    If 24 <= rows and rows <= 32 then img = true
  If 0 = size mod 640 then
    Rows = size / 640
    If 24 <= rows and rows <= 32 then img = true
else rem mode 4 or 5
  If 0 = size mod 256 then
    Rows = size / 256
    If 24 <= rows and rows <= 32 then img = true
  If 0 = size mod 320 then
    Rows = size / 320
    If 24 <= rows and rows <= 32 then img = true
Please excuse the Dody pseudo code.

Re: DFS Explorer

Posted: Wed Sep 11, 2019 7:27 pm
by pau1ie
Ah, yes that makes sense.

I don't like that though because I like the fact that a lot of sprite sheets are discovered if you don't limit it to a screen. For example in Sprint 1, file CARS is displayed, and you can see all the cars. Same for FONT. Neither of these are are a whole number of lines. Likewise for Planed Nubium, SCREEN* finish at the end of a line, but TILES doesn't. I think I will stick with the divides by 8 test which gets rid of some obviously not screens, but not all. I don't think it will ever be perfect.

Thanks for your help though, the load address thing really helped!

Re: DFS Explorer

Posted: Wed Sep 11, 2019 9:52 pm
by tricky
Good point, I hadn't thought about other graphics data - even that which I produced :oops: