Java: Mac One Click

Is an ongoing project of mine. It started 4 days ago 🙂 [1. October 2015].

[Updated January 2016]

What is it?

It is a (java based) tool to create application bundles for MaxOS X of old games. Old games – as in games that are run by emulation software.

Why?

Because I don’t like frontends, I don’t like having to look for the right config everytime I startup a game. I don’t want to run in compatibilty issues later and not knowing why because befor it worked allright etc.

What it does

It bundles a rom or otherwise “old” game with the emulator tightly together and builds an “app” of them that can be started by just a double click.
Each bundle is in itself sufficient, there is no need for any other software to be installed.

The configuration work only needs to be done once and can later be forgotten since it stays with exactly that game in that package.

What it can NOW

As of now I added support for 4 emulators (emulators – not systems!)

Vice
DosBox
UAE-FS
Stella

I don’t know what copyright law says, but I bundled the current versions of them WITH MacOneClick, I hope the authors don’t mind. If you do, give me a hint and I will withdraw them.
I bundled them with my program because that way I know for certain which version I have access to and which comand line parameters work to what end (authors might deny it, but something allways changes and breaks things).

What it looks like

It is not pretty 🙂 – but it works.

Example: Vice

A few words what you see:

  • Bundle name: The name of the App that will be generated
  • Game Source: a disk image or T64 or whatever
    (contents will be listed to the right, double click if the program is not the first on the list)
  • Image Source: an image that will be the icon of the app (will be converted to 128×128 ICNS via Mac comand line tools) (the image can also be pasted from system clipboard – google is your friend)
  • Various settings for Vice, that will be “translated” to comand line parameters
  • Target path: Where the resulting app will be copied to
  • (Try only builds the app in a tmp dir, great to “try” settings, try also starts the generated app – hence TRY)
  • Joytick settings are tricky – I only have a competition pro, these are the default settings I provided, here other users must experiment – feedback welcome

The other emulators look more or less the same, different parameter sets result in different layouts.

DosBox let me grow some gray hair, here you can give directories, disk images, floppy images, hdd images, iso images. Some figuring was in order to build the correct parameters correctly (although, UAE was not much better)

Basicly

The minimal input is a source of a game, than press try – and see if it works – it just might straight out of the box!

 MacOneClick.dmg

Source code is in the structure of the app. Java is neccessary to start – but every Mac-user should have Java installed anyway.

 

Update December 30. 2015,

see: Mac One Click continued…

 

Update January 2016

Since I can’t allways do a blog when I just change a few bits – I’ll just update this page.

Having been able to dump a whole lot of old games with my new KryoFlex device – I did much Amiga-emulation the last days. There were many configurations to be done, and constant changes, to get the games and application running as I would like them. I used MacOneClick heavily as a frontend, since by now it has all major settings I need, can copy all emulation files when needed – or use a  “base” directory (see last update).

Mac One Click does sort of work as my frontend of choice now, because I know by heart what and how I can do with it, its flexible as hell (since if it doesn’t support what I need – I just enhance it).

Anyway – the “core” new element I did the last two days (for FS-UAE and DOSBOX) is save all settings! Doesn’t sound like much – but this is in the core the enabler to use the tool as a frontend.

It was quite quickly done using a derby database. For each emulator I created a table and read and write all data via SQL, elegant, quick, easy and understandable. And – since some time ago I did a database tool, I can even “debug” or change the DB from within (or from outside) since a derby DB is easily accessable.

The only point remaining is, that there are so FEW emulators out there (MAC) that can be configured from command line or via a configurable properties file. Otherwise I would have added tons of other emulators by now.

 

Some Features, that are noteworthy (not useful mind you) :-):

  • DOSBox:
    From the frontend, you can chose what file to start from your setup.
    This made it necessary to implement the conversion from long files names to 8.3 file names in correct manner, which isn’t as trivial as it sounds, since e.g. you have to respect ALL filenames in the directory the file is in, in order to get the numbering right.
    If interested look at:
    String makeDosFilename(String path);
    in the file:
      de.malban.moc.disbox.DosBoxPanel.java
  • Vice:
    You can load directories from different binary C64 files. Supported formats are D64, C64, PRG and T64.
    The routines necessary were implemented by myself after the first set of routines I copied from another java source were giving incorrect results. If interested you can find these routines in the package:
      de.malban.moc.vice.DosBoxPanel.c64list
  • Vice:
    You can view BASIC programs using MacOneClick. Big and small Petscii letters are supported (switch with the “a<>A” button). I thought it was a nifty idea (though I’m not the first…). I reused a free font I found in the far reaches of the internet, PetMe from KreativeKorp. Since the font places the signs in user space of UNICODE table, I used a custom “translation” table to convert the texts from Petscii to display.
    Beforehand the BASIC must be detokenized. I reused some code found on sourceforge: CommodoreEditor
    The files are in the same package as above.
  • Remembering Configs:
    For DOSBox and FS-UAE there are quite many configuration items. In the lates version these can be stored in a derby database. The database is created on the fly and is filled by the user. Noteworthy are the menu-entries under File->Extra.
    These are: DB Settings, and DB Browser.
    With the DB-Browser (if you have the correct classes in your classpath) a wide range of databases can be accessed (Oracle, MySQL, MSSQL, Informax, Postgre). The “browser” is not very sophisticated, but it allows you to easily store and access your statements, you can also use variables and use the output of one statement as the input to another (even across databases).
  • Images:
    It is allways nice and shiny to include images :-)!
    But imagine you would really use MacOneClick to build Apps of 100 C64 games. To search for the images alone would drive me crazy. There are two nice features implemented to help you.
    1) You can access google search directly from the program (the first 20 search results). And use an image thus got on a simple click. Even one click less – let the program chose a random picture.
    (Search uses as default parameters: Computer + Bundlename)
    2) Use the Clipboard. Just copy the picture you want to use to your Clipboard and press the paste button – done!All images are converted via MAC comand line tools to icons (sips and tiff2icns).

Leave a Reply

Your email address will not be published.