Files
microw8/README.md

4.1 KiB

MicroW8

MicroW8 is a WebAssembly based fantasy console inspired by the likes of TIC-80, WASM-4 and PICO-8.

The initial motivation behind MicroW8 was to explore whether there was a way to make WebAssembly viable for size-coding. (Size coding being the art of creating tiny (often <= 256 bytes) graphical effects and games.) The available examples so far are all in this space, however, I very carefully made sure that all design decisions make sense from the point of view of bigger projects as well.

See here for more information and docs.

Specs

  • Screen: 320x240, 256 colors, 60Hz
  • Modules: Up to 256KB (WASM)
  • Memory: 256KB
  • Gamepad input (D-Pad + 4 Buttons)

Downloads

The download includes

  • microw8.html: The web runtime, a small, self-contained html file that can be opened in any modern browser to load and run MicroW8 carts.
  • uw8/uw8.exe: The MicroW8 dev tool, including a native runtime.
  • examples: Example source code in CurlyWas and Wat (WebAssembly text format).
  • carts: The examples compiled to .uw8 carts.

uw8 dev tool

uw8 run [<options>] <file>

Runs <file> which can be a binary WebAssembly module, an `.uw8` cart, a wat (WebAssembly text format) source file or a CurlyWas source file.

Options:

-w, --watch             : Reloads the given file every time it changes on disk.
-p, --pack              : Pack the file into an .uw8 cart before running it and print the resulting size.
-u, --uncompressed      : Use the uncompressed uw8 format for packing.
-l LEVEL, --level LEVEL : Compression level (0-9). Higher compression levels are really slow.
-o FILE, --output FILE  : Write the loaded and optionally packed cart back to disk.


uw8 pack [<options>] <infile> <outfile>

Packs the WebAssembly module or text file, or CurlyWas source file into a .uw8 cart.

Options:

-u, --uncompressed      : Use the uncompressed uw8 format for packing.
-l LEVEL, --level LEVEL : Compression level (0-9). Higher compression levels are really slow.


uw8 filter-exports <infile> <outfile>

Reads a binary WebAssembly module, removes all exports not used by the MicroW8 platform + everything that is unreachable without those exports and writes the resulting module to <outfile>.

Examples