Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Raspberry Pi / Players for Raspberry Pi4 64 and for Orange Pi 5 Plus

Author
Message
JDforce
19
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 19th Jan 2024 01:13
I compiled these and thought that someone can find them useful.
The Editor itself wont run on bookworm 64 bits, but with this player and a working bytecode, I managed to run my games fine in Bullseye64 and Bookworm64.
Probably will need to run some dependency, but it is easy to see the error message in terminal and install the dependency.
GPIO works as a charm.
I don' t have a Pi 5 yet, but I guess it will work there as well.

Also here is am posting a player for the OrangePi 5 plus using the Ubuntu with rockchip drivers build.
On the Orange Pi, since all operating systems I found are 64 bits, the AppGameKit editor won't run but the games play perfectly.
I found the Orange Pi work impressively fast, and it has zillions of memory and storage. It lacks WiFi but I used a USB dongle and no problem.
GPIO also work perfectly, but beware that the GPIO pin numbers are quite a bit different.

I attached an image here of the pinout for the Orange Pi 5 plus. We have to use the numbering in the GPIO column.
This list can be generated just for reference in the Raspberry Pi or the Orange Pi by installing the WiringPi library and running



In my case I built (Orange Pi) WiringPi from source, but AppGameKit does not use WiringPi, which is a good thing.

Let's go to Mars

Attachments

Login to view attachments
Yeshu777
4
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cymru
Posted: 19th Jan 2024 17:21
Brilliant!
Yeshu777
4
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cymru
Posted: 19th Jan 2024 23:22
With regards to the wiringPi, what install process did you use?

A project of mine uses the WiringSerial so be great to get this installed.

Thanks!
JDforce
19
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 20th Jan 2024 01:18 Edited at: 20th Jan 2024 01:20
Yeshu, as a follow up...

AGK does not need WiringPi.

If you need to configure the serial pins in the gpio connector (or spi, I2c) am sure there are other ways, alternatives to WiringPi, which is kind of a wrapper to system calls.

The procedure below for installing worked for me in bullseye 32 or 64, and on the OrangePi 5 Plus with Ubuntu 22.04 64 bits.

I could not make it work with BookWorm32 nor 64 yet. It builds but does not run correctly, since it can not detect the board type.
Just for sports will try to dig into the source code, maybe I can find something and make it work. Probably the routine that detects the board needs some hacking.

sudo apt-get install git-core
git clone https://github.com/WiringPi/WiringPi.git
cd WiringPi
./build

(after build, test with this)
cd ~
gpio -v

(reply should be like this)
gpio version: 2.70
Copyright (c) 2012-2018 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.


To see the gpio map and pin state:
gpio readall
Let's go to Mars
JDforce
19
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 20th Jan 2024 19:10 Edited at: 20th Jan 2024 19:20
Hey Yeshu, I found the trouble with WiringPi on Bookworm 32 and 64.
What happens is that the file /proc/cpuinfo in Bookworm is lacking a line that defines "hardware". I found this comparing the same file from a Bullseye install.
My solution is a lazy one, basically am tricking Wiring Pi into reading the bullseye cpuinfo file.
I only tested gpio digital outputs but it is highly likely all other functions will work. Maybe you can test with serial ( I2c or SPI if possible) and report back here.

Here is the procedure:

- Clone WiringPi git as in the previous post.
- Get a copy of bullseye /proc/cpuinfo file, or copy the attached file. It is the same file for Bullseye 32 and 64. Put the file in the pi wherever you feel convenient. I placed it on my home folder.
- make a folder to put the file in a "standard" location, and copy the file there, like so:

sudo mkdir /usr/share/legacywiringpi
sudo cp ~/cpuinfo /usr/share/legacywiringpi/cpuinfo
sudo chmod 444 /usr/share/legacywiringpi/cpuinfo


- Using your preferred editor, open the files "WiringPi/build" and "WiringPi/WiringPi/wiringPi.c" from the cloned repository.
- In both files change any reference to "/proc/cpuinfo" to "/usr/share/legacywiringpi/cpuinfo". On both files there are file open references and echo messages using that string.
- Save both files.
- now you can navigate to your cloned repository folder in a terminal and
./build
It should now be working and installed.
Enter gpio readall and you should see the gpio table.
You can /build clean and /build uninstall to start over if you need to edit the code.

IMPORTANT: This solution is specific for compiling WiringPi on a Raspberry Pi 4.
Let's go to Mars

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-05-02 10:39:07
Your offset time is: 2024-05-02 10:39:07