Hi Tboy,
A thousand thanks for this. I can confirm that this version of your PiPlayer does work with the GPIO in both directions, In/Out.
Am doing some apps that interact with hardware, so this is vital for my project to work.
If you need advise on hardware, that is my area. Will be glad to help if sometime you need advise.
For the player compilation, I confess I tried without success, thank goodness you could do it.
And here is the procedure I followed, maybe you find something out of place, and probably there are some tricks I haven't found.
Procedure:
I followed again your original post with the procedure to clone the repo compile the player and attempted to build it.
This is on a raspberry pi 4 with Bullseye 64.
My problem so far has been that it compiles but the player shows some strange errors, like "surface not found", "object not found", "Physics world not found" and so on.
On the cloned repo I noted that the routines for accessing gpio are in the functions OpenToWrite and related, are found on these files:
AGKTier2/platform/pi/Source/piCore.cpp
but not on
AGKTier2/platform/linux/Source/linuxCore.cpp.
Since your procedure builds the linux player (not the pi player), I copied the source blocks on the functions (AGK::cFile:
penToRead, AGK::cFile:
penToWrite, AGK::cFile::Close, cFile::WriteByte, cFile::ReadByte) from piCore.cpp and edited linuxCore.cpp to include the functionality inside those functions.
I tried with make with and without the -B parameter to force rebuild all targets:
cd ~/AGKTier2
make (or make -B)
cd interpreter_linux
make (or make -B)
The result is the same as before. The player itself opens with it's standard AppGameKit logo, device ip and ipv6, and UNCONNECTED label. But when running Tier1 scripts from the geany AppGameKit ide (execute on terminal) it shows on the terminal innumerable errors related to sprite not found, file not found, physics world not found, sprite xxx does not exist, Falied to create sprite ID already exists, Etc. Etc.
On another attempt. I renamed PiMakefile to Makefile (and Makefile to LinuxMakefile), and repeat the make -B but this time compilation fails, (from make errors, I corrected some g++-4.8 and gcc4.8 declarations that seemed to be not in pair with my installed packages) but I just stopped trying. Maybe I have to create an SD card with Buster32 instead of Bullseye64 just for creating the player.
In the meantime, your solution is ideal. Thanks!
Let's go to Mars