Categories
Uncategorized

Week 5

This week was spent completing the main foundation of the project by matching entries, and starting work on the website. I’ve also implemented a logging system for when DATs are uploaded and matched, and set up a test instance for my code.

Matching Entries

When we upload a DAT from, let’s say, our CLI scanner utility, we calculate checksums of the files in the specified folders. But how do we know what games those checksums correspond to? The directory names could be gibberish, and unless a developer manually adds metadata to every single fileset, there’s no way of knowing which game the fileset corresponds to by parsing the DAT alone. So after we parse, we have to match the entries to a specific game.

Matching entries involves identifying which game a fileset is for, by a method similar to what ScummVM itself uses. ScummVM stores the checksums of a couple files from the game, and then uses this to identify what game files a directory contains. In the same fashion, if we happen to find a detection entry where all detection files are found in the new entry, a match is made. After matching, we must merge the filesets, so we can actually use the files in the new fileset.

Log your changes!

This part is pretty simple – know when the database is changed. Whenever we write to the database (i.e when we upload or match entries), we want to make sure that we have a ledger to keep track of our actions.

I added a logging table to the schema and store in it some useful info, like a timestamp, what kind of action was done, who did it, what changed etc. This will show up on the website we’ll be talking about in just a bit.

The Website

One of the biggest parts of the project is having a website that developers can visit and use as a dashboard of sorts to manage the stuff in the database.

Detection entries page. It doesn’t look like much, but it does work!

This week I implemented two webpages – one to display info about the detection entries, and one to show you the logs. Obviously showing the several thousand games on the same page is a bad idea, so I also implemented pagination to show a more manageable 25 entries per page.

I also spent a little bit of time setting up an apache2 vhost so me and my mentor could test the code on the same environment.

That’s all for now, hope you check in next week for more progress!

Thanks for reading!

Leave a Reply

Your email address will not be published. Required fields are marked *