This example uses the sameboy library for Game Boy emulation + braille chars on terminal for rendering.
You'll need to compile the sameboy library and change the FFI_LIB
on sameboy_libretro.h
.
PS: Before FFI, an emulator written in PHP was developed https://github.com/gabrielrcouto/php-terminal-gameboy-emulator.