From d11b46576a7ecd13e109c578f8d6db157e6b98eb Mon Sep 17 00:00:00 2001 From: Dennis Ranke Date: Mon, 28 Feb 2022 23:19:58 +0100 Subject: [PATCH] prepare for 0.1.2 release --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 7 +++-- examples/wat/microw8-api.wat | 52 +++++++++++++++++++++++++++++++++++ site/content/_index.md | 24 ++++++++++++---- site/content/docs.md | 3 +- site/static/v0.1.2/index.html | 1 + src/run-web.html | 2 +- web/src/index.html | 2 +- 9 files changed, 82 insertions(+), 13 deletions(-) create mode 100644 examples/wat/microw8-api.wat create mode 100644 site/static/v0.1.2/index.html diff --git a/Cargo.lock b/Cargo.lock index 76ef783..4fa92ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2312,7 +2312,7 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "uw8" -version = "0.1.1" +version = "0.1.2" dependencies = [ "anyhow", "curlywas", diff --git a/Cargo.toml b/Cargo.toml index 3d5d44e..b855a89 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "uw8" -version = "0.1.1" +version = "0.1.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.md b/README.md index 47f8415..0989a30 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ See [here](https://exoticorn.github.io/microw8/) for more information and docs. ## Downloads -* [Linux](https://github.com/exoticorn/microw8/releases/download/v0.1.0/microw8-0.1.0-linux.tgz) -* [MacOS](https://github.com/exoticorn/microw8/releases/download/v0.1.0/microw8-0.1.0-macos.tgz) -* [Windows](https://github.com/exoticorn/microw8/releases/download/v0.1.0/microw8-0.1.0-windows.zip) +* [Linux](https://github.com/exoticorn/microw8/releases/download/v0.1.2/microw8-0.1.2-linux.tgz) +* [MacOS](https://github.com/exoticorn/microw8/releases/download/v0.1.2/microw8-0.1.2-macos.tgz) +* [Windows](https://github.com/exoticorn/microw8/releases/download/v0.1.2/microw8-0.1.2-windows.zip) The download includes @@ -35,6 +35,7 @@ Runs which can be a binary WebAssembly module, an `.uw8` cart, a wat (Web Options: +-b, --browser : Run in browser instead of using native runtime -t, --timeout FRAMES : Sets the timeout in frames (1/60s) -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. diff --git a/examples/wat/microw8-api.wat b/examples/wat/microw8-api.wat new file mode 100644 index 0000000..7024a2d --- /dev/null +++ b/examples/wat/microw8-api.wat @@ -0,0 +1,52 @@ +;; MicroW8 APIs, in WAT (Wasm Text) format +(import "env" "memory" (memory 4)) + +(import "env" "sin" (func $sin (param f32) (result f32))) +(import "env" "cos" (func $cos (param f32) (result f32))) +(import "env" "tan" (func $tan (param f32) (result f32))) +(import "env" "asin" (func $asin (param f32) (result f32))) +(import "env" "acos" (func $acos (param f32) (result f32))) +(import "env" "atan" (func $atan (param f32) (result f32))) +(import "env" "atan2" (func $atan2 (param f32) (param f32) (result f32))) +(import "env" "pow" (func $pow (param f32) (param f32) (result f32))) +(import "env" "log" (func $log (param f32) (result f32))) +(import "env" "fmod" (func $fmod (param f32) (param f32) (result f32))) +(import "env" "random" (func $random (result i32))) +(import "env" "randomf" (func $randomf (result f32))) +(import "env" "randomSeed" (func $randomSeed (param i32))) +(import "env" "cls" (func $cls (param i32))) +(import "env" "setPixel" (func $setPixel (param i32) (param i32) (param i32))) +(import "env" "getPixel" (func $getPixel (param i32) (param i32) (result i32))) +(import "env" "hline" (func $hline (param i32) (param i32) (param i32) (param i32))) +(import "env" "rectangle" (func $rectangle (param f32) (param f32) (param f32) (param f32) (param i32))) +(import "env" "circle" (func $circle (param f32) (param f32) (param f32) (param i32))) +(import "env" "line" (func $line (param f32) (param f32) (param f32) (param f32) (param i32))) +(import "env" "time" (func $time (result f32))) +(import "env" "isButtonPressed" (func $isButtonPressed (param i32) (result i32))) +(import "env" "isButtonTriggered" (func $isButtonTriggered (param i32) (result i32))) +(import "env" "printChar" (func $printChar (param i32))) +(import "env" "printString" (func $printString (param i32))) +(import "env" "printInt" (func $printInt (param i32))) +(import "env" "setTextColor" (func $setTextColor (param i32))) +(import "env" "setBackgroundColor" (func $setBackgroundColor (param i32))) +(import "env" "setCursorPosition" (func $setCursorPosition (param i32) (param i32))) +(import "env" "rectangle_outline" (func $rectangle_outline (param f32) (param f32) (param f32) (param f32) (param i32))) +(import "env" "circle_outline" (func $circle_outline (param f32) (param f32) (param f32) (param i32))) +(import "env" "exp" (func $exp (param f32) (result f32))) + +;; to use defines, include this file with a preprocessor +;; like gpp (https://logological.org/gpp). +#define TIME_MS 0x40; +#define GAMEPAD 0x44; +#define FRAMEBUFFER 0x78; +#define PALETTE 0x13000; +#define FONT 0x13400; +#define USER_MEM 0x14000; +#define BUTTON_UP 0x0; +#define BUTTON_DOWN 0x1; +#define BUTTON_LEFT 0x2; +#define BUTTON_RIGHT 0x3; +#define BUTTON_A 0x4; +#define BUTTON_B 0x5; +#define BUTTON_X 0x6; +#define BUTTON_Y 0x7; diff --git a/site/content/_index.md b/site/content/_index.md index 732f72d..98fab4e 100644 --- a/site/content/_index.md +++ b/site/content/_index.md @@ -15,11 +15,11 @@ The initial motivation behind MicroW8 was to explore whether there was a way to * Gamepad input (D-Pad + 4 Buttons) ## Examples -* [Fireworks](v0.1.1#AgwvgP+M59snqjl4CMKw5sqm1Zw9yJCbSviMjeLUdHus2a3yl/a99+uiBeqZgP/2jqSjrLjRk73COMM6OSLpsxK8ugT1kuk/q4hQUqqPpGozHoa0laulzGGcahzdfdJsYaK1sIdeIYS9M5PnJx/Wk9H+PvWEPy2Zvv7I6IW7Fg==) (127 bytes): Some fireworks to welcome 2022. -* [Skip Ahead](v0.1.1#AgyfpZ80wkW28kiUZ9VIK4v+RPnVxqjK1dz2BcDoNyQPsS2g4OgEzkTe6jyoAfFOmqKrS8SM2aRljBal9mjNn8i4fP9eBK+RehQKxxGtJa9FqftvqEnh3ez1YaYxqj7jgTdzJ/WAYVmKMovBT1myrX3FamqKSOgMsNedLhVTLAhQup3sNcYEjGNo8b0HZ5+AgMgCwYRGCe//XQOMAaAAzqDILgmpEZ/43RKHcQpHEQwbURfNQJpadJe2sz3q5FlQnTGXQ9oSMokidhlC+aR/IpNHieuBGLhFZ2GfnwVQ0geBbQpTPA==) (229 bytes): A port of my [TIC-80 256byte game](http://tic80.com/play?cart=1735) from LoveByte'21 -* [OhNoAnotherTunnel](v0.1.1#AgPP1oEFvPzY/rBZwTumtYn37zeMFgpir1Bkn91jsNcp26VzoUpkAOOJTtnzVBfW+/dGnnIdbq/irBUJztY5wuua80DORTYZndgdwZHcSk15ajc4nyO0g1A6kGWyW56oZk0iPYJA9WtUmoj0Plvy1CGwIZrMe57X7QZcdqc3u6zjTA41Tpiqi9vnO3xbhi8o594Vx0XPXwVzpYq1ZCTYenfAGaXKkDmAFJqiVIsiCg==) (175 bytes): A port of my [entry](http://tic80.com/play?cart=1871) in the Outline'21 bytebattle final -* [Technotunnel](v0.1.1#AhPXpq894LaUhp5+HQf39f39/Jc8g5zUrBSc0uyKh36ivskczhY84h55zL8gWpkdvKuRQI+KIt80isKzh8jkM8nILcx0RUvyk8yjE8TgNsgkcORVI0RY5k3qE4ySjaycxa2DVZH61UWZuLsCouuwT7I80TbmmetQSbMywJ/avrrCZIAH0UzQfvOiCJNG48NI0FFY1vjB7a7dcp8Uqg==) (157 bytes): A port of my [entry](https://tic80.com/play?cart=1873) in the Outline'21 bytebattle quater final -* [Font & Palette](v0.1.1#At/p39+IBnj6ry1TRe7jzVy2A4tXgBvmoW2itzoyF2aM28pGy5QDiKxqrk8l9sbWZLtnAb+jgOfU+9QhpuyCAkhN6gPOU481IUL/df96vNe3h288Dqwhd3sfFpothIVFsMwRK72kW2hiR7zWsaXyy5pNmjR6BJk4piWx9ApT1ZwoUajhk6/zij6itq/FD1U3jj/J3MOwqZ2ef8Bv6ZPQlJIYVf62icGa69wS6SI1qBpIFiF14F8PcztRVbKIxLpT4ArCS6nz6FPnyUkqATGSBNPJ): Just a simple viewer for the default font and palette. +* [Fireworks](v0.1.2#AgwvgP+M59snqjl4CMKw5sqm1Zw9yJCbSviMjeLUdHus2a3yl/a99+uiBeqZgP/2jqSjrLjRk73COMM6OSLpsxK8ugT1kuk/q4hQUqqPpGozHoa0laulzGGcahzdfdJsYaK1sIdeIYS9M5PnJx/Wk9H+PvWEPy2Zvv7I6IW7Fg==) (127 bytes): Some fireworks to welcome 2022. +* [Skip Ahead](v0.1.2#AgyfpZ80wkW28kiUZ9VIK4v+RPnVxqjK1dz2BcDoNyQPsS2g4OgEzkTe6jyoAfFOmqKrS8SM2aRljBal9mjNn8i4fP9eBK+RehQKxxGtJa9FqftvqEnh3ez1YaYxqj7jgTdzJ/WAYVmKMovBT1myrX3FamqKSOgMsNedLhVTLAhQup3sNcYEjGNo8b0HZ5+AgMgCwYRGCe//XQOMAaAAzqDILgmpEZ/43RKHcQpHEQwbURfNQJpadJe2sz3q5FlQnTGXQ9oSMokidhlC+aR/IpNHieuBGLhFZ2GfnwVQ0geBbQpTPA==) (229 bytes): A port of my [TIC-80 256byte game](http://tic80.com/play?cart=1735) from LoveByte'21 +* [OhNoAnotherTunnel](v0.1.2#AgPP1oEFvPzY/rBZwTumtYn37zeMFgpir1Bkn91jsNcp26VzoUpkAOOJTtnzVBfW+/dGnnIdbq/irBUJztY5wuua80DORTYZndgdwZHcSk15ajc4nyO0g1A6kGWyW56oZk0iPYJA9WtUmoj0Plvy1CGwIZrMe57X7QZcdqc3u6zjTA41Tpiqi9vnO3xbhi8o594Vx0XPXwVzpYq1ZCTYenfAGaXKkDmAFJqiVIsiCg==) (175 bytes): A port of my [entry](http://tic80.com/play?cart=1871) in the Outline'21 bytebattle final +* [Technotunnel](v0.1.2#AhPXpq894LaUhp5+HQf39f39/Jc8g5zUrBSc0uyKh36ivskczhY84h55zL8gWpkdvKuRQI+KIt80isKzh8jkM8nILcx0RUvyk8yjE8TgNsgkcORVI0RY5k3qE4ySjaycxa2DVZH61UWZuLsCouuwT7I80TbmmetQSbMywJ/avrrCZIAH0UzQfvOiCJNG48NI0FFY1vjB7a7dcp8Uqg==) (157 bytes): A port of my [entry](https://tic80.com/play?cart=1873) in the Outline'21 bytebattle quater final +* [Font & Palette](v0.1.2#At/p39+IBnj6ry1TRe7jzVy2A4tXgBvmoW2itzoyF2aM28pGy5QDiKxqrk8l9sbWZLtnAb+jgOfU+9QhpuyCAkhN6gPOU481IUL/df96vNe3h288Dqwhd3sfFpothIVFsMwRK72kW2hiR7zWsaXyy5pNmjR6BJk4piWx9ApT1ZwoUajhk6/zij6itq/FD1U3jj/J3MOwqZ2ef8Bv6ZPQlJIYVf62icGa69wS6SI1qBpIFiF14F8PcztRVbKIxLpT4ArCS6nz6FPnyUkqATGSBNPJ): Just a simple viewer for the default font and palette. Examplers for older versions: @@ -29,6 +29,20 @@ Examplers for older versions: ## Versions +### v0.1.2 + +* [Web runtime](v0.1.2) +* [Linux](https://github.com/exoticorn/microw8/releases/download/v0.1.2/microw8-0.1.2-linux.tgz) +* [MacOS](https://github.com/exoticorn/microw8/releases/download/v0.1.2/microw8-0.1.2-macos.tgz) +* [Windows](https://github.com/exoticorn/microw8/releases/download/v0.1.2/microw8-0.1.2-windows.zip) + +Changes: + +* add option to `uw8 run` to run the cart in the browser using the web runtime +* CurlyWas: implement `include` support +* CurlyWas: implement support for constants +* fix crash when trying to draw zero sized line + ### v0.1.1 * [Web runtime](v0.1.1) diff --git a/site/content/docs.md b/site/content/docs.md index 399a44f..012e6ae 100644 --- a/site/content/docs.md +++ b/site/content/docs.md @@ -284,7 +284,8 @@ Runs `` which can be a binary WebAssembly module, an `.uw8` cart, a wat (W Options: -* `-t FRAMES`, `--timeout FRAMES` : Sets the timeout in frames (1/60s). If the start or update function runs longer than this it is forcibly interupted +* `-b`, `--browser`: Run in browser instead of using native runtime +* `-t FRAMES`, `--timeout FRAMES`: Sets the timeout in frames (1/60s). If the start or update function runs longer than this it is forcibly interupted and execution of the cart is stopped. Defaults to 30 (0.5s) * `-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. diff --git a/site/static/v0.1.2/index.html b/site/static/v0.1.2/index.html new file mode 100644 index 0000000..56877b9 --- /dev/null +++ b/site/static/v0.1.2/index.html @@ -0,0 +1 @@ +MicroW8
MicroW8 0.1.2
\ No newline at end of file diff --git a/src/run-web.html b/src/run-web.html index 7d86e72..66c256d 100644 --- a/src/run-web.html +++ b/src/run-web.html @@ -1 +1 @@ -uw8-run
\ No newline at end of file +uw8-run
\ No newline at end of file diff --git a/web/src/index.html b/web/src/index.html index f6407ec..58d3eed 100644 --- a/web/src/index.html +++ b/web/src/index.html @@ -10,7 +10,7 @@
- MicroW8 0.1.1 + MicroW8 0.1.2