Analogue Pocket Utils

For the last month, the Analogue Pocket has continued to be an absolute monster. The Sega Genesis is now available. The Nintendo Entertainment System is now available. Sega GameGear is available, too. And there have been many cores of 1980s Arcade games released, too.

It's starting to get unwieldily, so I've created a collection of programs to help me organize and process games so they can be played on the Pocket.

I've been working on this pretty solidly for the past three weeks, and I think it's finally feature finished. The GitHub repository has straight forward information of how each process is set up and what exactly each process does. But, overall…

Pocket Utils is a collection of scripts and programs that do several things, including the following: (1) Process MRA files and Create Arcade Roms, (2) Create Library Images for sorted Games, and (3) Update Platform information for cores.

Process MRA Files

The Multi-Arcade Machine Emulator, or MAME, on computer standardized how to emulate arcade games. When ripping games from their original boards, each component had their own file, and everything was put together in a zip file.

FPGA emulation of arcade games doesn't like this. The chip wants direct read access to the data it wants and unzipping a file in memory is extra useless overhead. Thus, the idea of a MRA file was introduced. A MRA file contains specific instructions on how each piece of the arcade board can be assembled into a single ROM file. This file is not compressed and allow free access to all the data the FPGA wants.

A separate program is required to process these MRA files, though. I use this MRA Tool found in NullObject's GitHub. When an arcade core is released for the Analogue Pocket, it'll come with MRA files to create ROMs from ZIP files of arcade components. You must get the arcade ROM zips, process the MRA file in the program giving it the zip files, and then place the generated ROM into the core's folder on the Analogue Pocket.

There are lots of steps to getting this to work, and many arcade cores released for the Analogue Pocket play multiple games. Some releases come with 10 or more games. In fact, arcade systems like Capcom CPS1 and CPS2 have as many as 300 variants of their games. Doing all of this manually is not feasible.

This program solves this problem.

Put all of your MRA files in the to-be-processed directory. Run the program. It'll attempt to download any and all ZIP files required to make the arcade rom, and store them locally. If the Arcade ROM is successfully generated, it'll copy it to the correct directory on the Pocket, and also copy the MRA file to the Pocket, too.

If it can't find the ZIP files online, you can manually search for them and put them in your local store. If a ROM was already generated, it'll copy over the MRA file anyway. If the MRA file is already there, it'll copy it to a duplicate directory.

With Standard games, everything works really well and there are almost never any problems. Problems usually only come up when trying to generate bootlegs or hacks of roms. Those often require extra steps.

Create Library Images

One of the most appealing features of the Analogue Pocket is the Library feature.

Something I've never liked about using emulators is having to choose the games I want to play from a list. It's so sterile and clinical. The Super Nintendo Mini was so amazing because of its visual presentation. You had a line games presented with their box art. And you could visually choose the game you wanted to play by selecting that box art.

The Library feature of the Analogue Pocket was just that. It gave you a visual list of all your games to select from. Further still, you could organize all of your games in Playlists. This was promised in Analogue's Tweet about Analogue OS.

By default, the Analogue Pocket has an internal list of game data but it doesn't have an images. Early on, you could download an image pack that gave you all the title screens for every game. But I don't want title screens. I want box arts.

It took a little while to figure out, but the Analogue Pocket uses a CRC hash of the file to reference which image is uses in the Library. If you have a correctly sized PNG file, you can run it through DerTolleEmil's Image Converter and it'll give you a BIN file. Put this bin file in the correct folder named with the CRC hash, and it'll use this image in the Library.

So, my program goes a bit further with it.

In each of the folders for Consoles and Handhelds on the Analogue Pocket, I have the ROMs that I like sorted into genre folders. My initial "CreatePocketEntries" program will collect all of these games in my database. "CreateLibraryImages" will look at every game in my database and attempt to download the box art image from LibRetro on Github. With this image, my program will resize it to the correct dimensions for the Pocket, convert the PNG image to BIN, name it correctly, and copy the file to the System folder on the Pocket.

Now, when using the Library, the image matches the box art. :)

Update Platform Information

Another thing that I collect in my database is Core information.

When a user chooses a core from the openFPGA menu on the Pocket, it lists certain information about itself, such as when the console or handheld was original released, who was the manufacture, and also the name and category of the core, too. All core developers are very particular about the accurate representation of the consoles, games, and their code, so this information is usually correct, but sometime it is not to avoid copyright and trademark violations.

In the database, it's easy for me to edit this information and also collect all the information into categories. My program will rewrite all of the information in the Platforms directory with what I have in my database.

Additionally, it'll create Platform Images using agg23's Platform Image Creator. Any new images that I've made and placed in the processing directory will be converted and copied over.

Run the Updater

There is also a simple shell script that runs Matt Pannella's command line program with all of the settings that I like.


I use this stuff pretty often when new cores and new features are released, so there continue to be more updates. When Playlists eventually come to the Pocket, I'll have a new program to make those. I'm also working on another program that will make a list of games I have in my "unsorted" directories for each core.

The Pocket continues to be one of the absolute best gaming devices made, and being able to make all this stuff to organize games has gotten back into programming on the side. It's been pretty great. :)