Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnearnest/mako
A simple virtual game console
https://github.com/johnearnest/mako
emulator-programming fantasy-console forth toolchain virtual-machine
Last synced: 21 days ago
JSON representation
A simple virtual game console
- Host: GitHub
- URL: https://github.com/johnearnest/mako
- Owner: JohnEarnest
- License: other
- Created: 2011-06-05T02:45:23.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2020-12-29T21:48:51.000Z (almost 4 years ago)
- Last Synced: 2024-07-30T18:25:08.124Z (5 months ago)
- Topics: emulator-programming, fantasy-console, forth, toolchain, virtual-machine
- Language: Forth
- Homepage:
- Size: 2.07 MB
- Stars: 564
- Watchers: 34
- Forks: 38
- Open Issues: 2
-
Metadata Files:
- Readme: Readme.txt
- License: LICENSE.txt
Awesome Lists containing this project
README
Mako is a simple stack-based virtual game console, designed to be as simple as possible to implement. Maker is a compiler for a Forth-like language that targets the Mako VM.
Mako has two stacks- a parameter stack and a return stack. Most MakoVM instructions manipulate the top elements of the parameter stack. Instructions are normally a single word (signed 32-bit integer), but some (like JUMP and CALL) are followed by a second word which provides an argument. The Mako memory layout is controlled by a number of memory-mapped registers starting in the lowest address- 0. In addition to the program counter and stack pointers, Mako has registers which control a pixel-scrollable 31x41 grid of 8x8 background tiles, a set of 256 variable-size sprites, a random number generator, optional character I/O facilities for debugging and an 8-bit audio output port. Some implementations additionally provide simple support for filesystem I/O.
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