JohnEarnest / Mako

A simple virtual game console
Other
568 stars 39 forks source link
emulator-programming fantasy-console forth toolchain virtual-machine

Mako

Mako VM Logo

Mako is a portable stack-based virtual game console. Mako was designed to be simple to port and implement: even including optional features, the reference implementation is only a few pages of Java. All the games and demos written for Mako can now be tried directly in your browser thanks to Mako.JS.

Deep Screenshot

The Mako platform includes a complete development toolchain centered around Maker, a Forth-like systems programming language. Maker comes with an extensive standard library, including such highlights as a modular garbage collector, a cooperative multitasking system, an entity management system, and audio synthesis utilities. Where applicable, libraries have test harnesses based on the Test Anything Protocol.

Forth Warrior Screenshot

Other programming tools targeting the Mako VM include FiveTran, a historically-inspired FORTRAN compiler, and Stroyent, a C-like systems language. Other programming environments run directly on the Mako VM, like MASICA, a TinyBASIC, Loko, a powerful Logo environment, and MakoForth, a proper Forth which powers the game Forth Warrior.

Most work on Mako ceased in 2013, but the repository here is maintained for inspiration and educational purposes.

Using Maker

Mako's toolchain requires Java and Apache Ant. The Maker source files provided in the examples directory can be executed by compiling Maker and then invoking it with a filename and the '--run' flag. Without the flag, Maker will simply print a disassembly of the prepared Mako memory image.

To compile, run ant from the top directory.

To run an example, invoke Maker from the command line:

java -jar dist/Maker.jar /games/Pong/Pong.fs --run

Or use the 'maker' script to save a little typing:

./maker /games/Pong/Pong.fs --run

Hardware Overview