EMULAB Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

The new forum is online, hope you enjoy it!

Pages: [1]   Go Down

Author Topic: New Scanner (WIP)  (Read 280 times)

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 115
  • Online Online
  • Posts: 3295
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 124.0.0.0 Chrome 124.0.0.0
    • View Profile
New Scanner (WIP)
« on: 02 May 2024, 17:31 »

Well, it was pretty quiet the last weeks...so before you might think that nothing is happening, here is a little peak.
While I was indeed pretty busy with real life I can say that the scanner is still alive, so let's write a bit about it.

As you might know (https://www.emulab.it/forum/index.php?topic=9199.0), the scanner does already a pretty good job in scanning uncompressed and compressed sets, no matter how you organized them (plain, in multiple rompaths, in pattern styled subpaths (e.g. by year/manufacturer/etc) and scanning MAME -listxml output (or anything which followes this format), -listsoftware collections and single MAME hash files. It can do a 'new scan' or a 'scan' where the latter takes scan results information from a previous scan into account (similar to current cmpro).

And now, it also fixes all found problems.

- It is able to auto detect possible missing but fixable files (roms/chds) in your rompaths and in your backup path and everything in one (1) scan and it tries to find a best place for it (as long as you're using one rompath you wouldn't care...but there are people who use pattern-like storage or split chds and roms, etc....)
- It detects wrong names (machines/roms/chds) and fixes them of course
- It detects unneeded files wherever they are and puts them to the backup path before getting rid of them. It does not automatically zip them as cmpro does (see a thread on this forum about it) but takes over the format from the origin and reproduces the rom path structure inside the backup folder. If a file with the same name but different hash already exist there, the scanner will take care of it.


Attached are some screenshots:
- one showing the context menus which you can use to modify the output or copy data to the clipboard
- one showing an example output of scanning a software list collection (no need for multiple profiles or a complex setup...just scan)
- one showing an example output of scanning multiple rompaths and showing complete and partly missing but not fully missing ones...


So..what's missing for a 0.01 version

- doing some more tests with some different scenarios
- a handful of minor nice to haves (still not wanting to add all kind of requests though)
- I'm not yet fully satisfied with writing the scanresults file and fix dat file..it works fine but I think I can speed it up a bit
- need to write a documentation (yikes)


So what's next then after the scanner runs fine?

- most likely people will complain about everything, find bugs and have tons of ideas/requests...so I will look into it
- next major step then would be to combine rebuilder and scanner and have some kind of profiler

« Last Edit: 02 May 2024, 17:33 by Roman »
Logged


ntt3

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 28
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 125.0.0.0 Chrome 125.0.0.0
    • View Profile
Re: New Scanner (WIP)
« Reply #1 on: Yesterday at 21:00 »

Thank you so much Roman!
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 115
  • Online Online
  • Posts: 3295
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 124.0.0.0 Chrome 124.0.0.0
    • View Profile
Re: New Scanner (WIP)
« Reply #2 on: Today at 18:02 »

ok....small wip mainly about filters:

one little thing on my to do list was supporting xpath for filtering, so I've added that and it gives you fantastic possibilities to filter on specific things..
The filter input field (or commandline attribute) is used for this. Currently it supports regular expressions for filtering machines on name only (see rebuilder readme.md). Using xpath filterings gives you more power. To use it, you need to prefix the filterstring with "xp:", otherwise it's the regular expression filter and your xpath expression needs to select software, machine or game elements.

So here we go with some examples:

Filtering a -listsoftwarelist output by only taking the Commodore software lists into account:

xp://softwarelist[contains(@description, 'Commodore')]/software

Filtering a -listxml output by selecting machines which have a baddump disk:

xp://machine[disk[@status='baddump']]

Filtering a -listxml output by selecting machines which have preliminary emulation status and Taito as manufacturer:

xp://machine[driver[@emulation='preliminary'] and manufacturer='Taito']


If you are familar with xpath, you already can imagine what you can do here. If not, learn xpath ;-)


Another thing with filtering is that you most likely want the dependencies included automatically. So you want to filter on a clone machine, but you also need the parent/bios/devices files included.
The filtering does that for you now, so if you filter on pacman, it will also include all the dependencies for you.

Attached are some screenshot parts which show some filtering for the examples above, also one showing the dependencies (including showing empty machines, which you already know as a feature).

On a side note I did some work on speed improvements, solving some thread safety things which should also positively affect the rebuilder core. And I found a way for handling the weird things like the samples of battles and homerun in a full merged environment...if you have no idea what I'm talking about, well, ignore me or check cloneof versus sampleof versus fullmerged).


So....tada...till next time

« Last Edit: Today at 19:19 by Roman »
Logged

ntt3

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 28
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 125.0.0.0 Chrome 125.0.0.0
    • View Profile
Re: New Scanner (WIP)
« Reply #3 on: Today at 18:15 »

Can't wait to try it...  8)
Logged
Pages: [1]   Go Up
 

Page created in 0.14 seconds with 19 queries.

anything