Giter VIP home page Giter VIP logo

abandon's Introduction

"Abandonware" Game Launcher

Overview

This is a little Python 3 app to launch "abandonware" easily from my console. It looks like this:

Main App

I am well aware that "abandonware" is not a real thing, and that even if it were, it'd be increasingly less common thanks to the fine work of places like GOG. Regardless, I've got a bunch of old games which are used via Dosbox, Z-machine interpreters like Frotz, or (less commonly) console emulators. I wanted to have them all via a nice easily-traversed TUI menu system, and hence this silly little app was born.

This was developed on Linux. It could possibly be useful to someone on MacOS/OSX. It could maybe run in Cygwin on Windows, but good luck on that front.

I'd be a bit surprised if anyone but me finds this useful, but figured I'd put it out there just in case.

Installation

This is a Python script which requires at least Python 3.7, and uses urwid for the TUI stuff. It could be pretty easily adapted to run on lower versions of Python, but I'm using some arguments to subprocess.run() which were introduced in 3.7, and I don't care enough to support lower versions.

There's no setup.py or anything like that; just slap it in your ~/bin dir, or symlink it there, or just run it from the git checkout.

Configuration

The app uses files named abandon.info on your filesystem to know what to display on the menu. It's hardcoded to start in /usr/local/games/abandon, so you'll have to change that by hand down at the bottom of the script. If anyone else ever actually uses this, feel free to bug me and I'll optionize that or something.

From that root dir, each dir you want to include should have one of those abandon.info files. The simplest is a category file, which just creates a folder/category:

cat: Other
sort: ZZZ

sort is optional but can be used to sort entries by something other than their category/name.

For games themselves, here's my Zork III abandon.info:

name: Zork III: The Dungeon Master (1982)
sort: zork 03
type: zmachine
rom: Zork 3 R17-840727.z3

name is what's shown in the menu, of course. sort is still optional, and will override name when sorting the list. type can currently be one of:

  • dosbox
  • dos (launches dosbox)
  • fceux
  • nes (launches fceux)
  • snes9x-gtk
  • snes (launches snes9x-gtk)
  • dolphin
  • gameboy (launches dolphin)
  • visualboyadvance-m
  • gb (launches visualboyadvance-m)
  • gba (launches visualboyadvance-m)
  • ps2 (launches pcsx2)
  • pcsx2
  • frotz
  • grotz
  • zmachine (launches frotz)
  • scummvm

The idea behind having a "generic" name is that some games may end up working better with some emulators/interpreters/environments over others. For instance, I prefer using frotz for most of my z-machine games, but some of them require the fancier stuff that grotz provides. But rather than hardcode frotz for all the others, I can specify just zmachine and change the "default" later, should I decide I'd rather run all of them in grotz. (Or even some other z-machine interpreter altogether.)

All types except for DOS/Dosbox require a rom parameter in the abandon.info file. DOS/Dosbox can specify the rom parameter to auto-launch an EXE/COM/BAT file, but will otherwise just map the C: drive and leave it there:

Dosbox

By default, dosbox games will use ~/.dosbox/dosbox.conf for the configuration. If the file abandon.conf exists in the game's dir, though, it will use that instead.

scummvm titles require an additional line inside abandon.info, namely scummvm_options. This will provide extra ScummVM arguments for the game in question, and should notably include the GAME parameter that ScummVM expects. For example:

name: The Secret of Monkey Island
sort: secret of monkey island 1
type: scummvm
scummvm_options: --scale-factor=4 scumm:monkey

That's about it! The directory you're "in" while running the app is scanned for abandon.info files each time you enter or leave, so if you make changes to the files, or add/delete directories with abandon.py still running, those changes will be refreshed by going out and back in to the dir in question.

Usage

This is quite straightforward, of course. Arrow keys and enter will be your primary input methods, though thanks to using urwid for the TUI stuff, you should be able to click with your mouse too, should you want to do that.

You can also hit b to go back to the previous dir, and q to quit the app. o can be used to open up an xterm inside the currently-selected menu item.

Categories show up in yellow, launchable games show up in green. If there are any errors in an abandon.info file, there'll be a red entry in the list.

Extending

I thought about being clever with what emulators/interpreters/etc were supported, but since I'm likely to be the only user this thing ever has, in the end I didn't care. The supported type parameters are specified in a couple of vars at the top of the InfoFile class, and then their commandlines are constructed inside that class's activate function. It'd be quite trivial to add new ones.

License

This is licensed under the 3-clause BSD license. See COPYING.txt.

abandon's People

Contributors

apocalyptech avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.