The emulator allows the project to be run on a host/working machine.
The left and right mouse button can be used to click (push a button) or toggle an input pin.
To build the emulator project include all the same files as in the main project, plus the emu.cpp
file (don't include any other rpihal source file to the build, nor link to the rpihal), and define RPIHAL_EMU on
compiler level (not anyehere in source nor header files).
To create a new emu project in Visual Studio use the New > Project From Existing Code... funtion and create an empty console application. Then add all the needed source files described above and add the include directories.
See the rpihal-system-test for reference.
PGE hase some dependencies.
To build the emulator the following packages need to be installed, so that the required headers are available.
sudo apt-get install libx11-dev libmesa-dev libpng-devThe emulator uses the OneLoneCoder Pixel Game Engine for the graphics.