-
-
Notifications
You must be signed in to change notification settings - Fork 55
How to run emulator mode
- Emulator core
- Preparing environment for Linux
- Preparing environment for Windows
- Compiling example and running emulation in Linux
- Compiling example and running emulation in Windows
- How to run lode runner demo on PC
The library supports OLED/LCD emulation mode, so you can check your code prior to running it on real hardware. At present only Linux OS and MinGW32 are supported, but you're welcome to add true Windows OS support. Please remember: since emulation runs on HOST OS, the code will be compiled with host gcc/g++ compiler.
There is a library located at lcdgfx/tools/sdl_core
, which implements OLED display emulation. The library code is easy, and you can add support you need directly to this library.
Emulator needs SDL2 library installed:
sudo apt-get install libsdl2-dev
There is helper script in lcdgfx/tools
directory: ./build_and_run.sh
The following command will run example:
cd lcdgfx/tools
./build_and_run.sh -p linux -e -f demos/ssd1306_demo
./build_and_run.sh -p linux -e -f games/arkanoid
If you use old shell, then the script may not work correctly (due to the issue with parsing arguments), then you can compile and run using make command options:
cd lcdgfx/examples
make -f Makefile.linux SDL_EMULATION=y PROJECT=ssd1306_demo flash
flash target for Linux platform makes system to run compiled binary.
Currently only MINGW32 is supported.
- First, Install MinGW32 (https://sourceforge.net/projects/mingw/files/Installer/). Next, emulator needs SDL2 library installed
- install SDL2 for MinGW32 per Instructions. Remember, you need to install SDL2!
For MinGW32 use the script below:
cd lcdgfx\tools
build_and_run.bat "demos/ssd1306_demo"
build_and_run.bat "games/arkanoid"
Linux:
cd lcdgfx\tools
./build_and_run.sh -p linux -e -f games/lode_runner
Windows:
cd lcdgfx\tools
build_and_run.bat "games/lode_runner"