I've just discovered an interesting project, and I also want to try porting it over. It's very easy, so let's see how we can play the dino game on this project.
In this Arduino project, an interpreter that was new to me was used. Hopefully, there will be opportunities to use it to implement some fun ideas in the future.
A fast WebAssembly interpreter and the most universal WASM runtime.
The source code only needs the following modifications.

#include <Arduino_GFX_Library.h>
#define GFX_BL 37 // default backlight pin, you may replace DF_GFX_BL to actual backlight pin
/* More data bus class: https://github.com/moononournation/Arduino_GFX/wiki/Data-Bus-Class */
Arduino_DataBus *bus = new Arduino_ESP32SPI(38 /* DC */, 9 /* CS */, 5 /* SCK */, 4 /* MOSI */, GFX_NOT_DEFINED /* MISO */ );
/* More display class: https://github.com/moononournation/Arduino_GFX/wiki/Display-Class */
// for HardWare v2.3
Arduino_GFX *gfx = new Arduino_NV3023(
bus, 10 /* RST */, 0 /* rotation */, false /* IPS */,
128 /* width */, 128 /* height */
);
// for HardWare v2.0
// Arduino_GFX *gfx = new Arduino_GC9107(
// bus, 10 /* RST */, 0 /* rotation */, true /* IPS */,
// 128 /* width */, 128 /* height */
// );
#include <wasm3.h>
#define NATIVE_STACK_SIZE (32*1024)
#define BUTTON_UP 11
#define BUTTON_DOWN 0
#define BUTTON_ROTATION 39
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.