Categories
Uncategorized

Week 3

My expectations for the week

Week 3 of the GSoC summer has rolled around! This week was spent writing the CLI tool for developers to create their own DATs from game files on their computer, and dumping detection entries from ScummVM, also into DATs.

Part 1: Creating the CLI

The CLI needs to do a couple things – taking in the directory path that contains game files, scanning it for files in the root folder, calculating the checksums for these files, and finally combining them all in the right format so it can be parsed by the parser we wrote previously.

Most of the difficulty of this part came from trying to keep the script free from external dependencies, while also keeping it from getting too bloated. Long python scripts can be a real eyesore ?. But after dropping in some list comprehensions and iterators to substitute my rudimentary implementation, I got the code looking pretty decent I think.

Part 2: ScummVM detection entries

If you’re not aware, ScummVM detection entries are multiple file-checksum pairs that can be used to identify which variant of game you are running. Every variant has some files specific to it, and the detection entries contain these files. This lets ScummVM run the game correctly.

Each engine has it’s own detection entries, and our goal is to extract these entries and format them in the same way we did our with the data in the CLI application for our parser, and write them into DAT files. This functionality will be accessed with a command (--dump-all-detection-entries) while running ScummVM from the command line.

Almost all engines in ScummVM, bar three of them (SCUMM, Sky, Glk), use AdvancedDetector for identifying the right game variant. We need to declare a virtual method to the MetaEngineDetection class, which all other detection classes inherit from, that we can define in the various detector classes.

While I haven’t implemented the dumping on the special engines yet, for engines that use AdvancedDetector, I had overridden the virtual method that I declared in the MetaEngineDetection class, and returned the protected _gameDescriptors variable.

This function is then called for every engine and the data is formatted, and dumped into DAT files, that will be run through our parser and inserted into the DB. Quite the pipeline!

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 *