Games compilation howto on the Pinebook-pro (Manjaro Linux and Debian native)
Anyone had success trying OpenDiablo2?

I get a SIGSEGV error when trying to launch the game:

Code:
main.go:26: OpenDiablo2 - Open source Diablo 2 engine
d2config.go:42: loading configuration file from /home/nightranger/.config/OpenDiablo2/config.json...
level_types_loader.go:63: Loaded 36 LevelType records
level_presets_loader.go:47: Loaded 1090 level presets
level_warp_loader.go:35: Loaded 83 level warps
object_types_loader.go:32: Loaded 573 object types
object_details_loader.go:230: Loaded 573 objects
item_weapons_loader.go:18: Loaded 306 weapons
item_armor_loader.go:21: Loaded 202 armors
item_misc_loader.go:18: Loaded 139 misc items
books_loader.go:33: Loaded 3 book items
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xaaaac6c2b540]

goroutine 1 [running, locked to thread]:
github.com/OpenDiablo2/OpenDiablo2/d2core/d2records.updateEquivalencies(0x4000b0d350, 0x4000b13b30, 0x400020ad80, 0x0, 0x0, 0x0, 0x0)
        github.com/OpenDiablo2/OpenDiablo2/d2core/d2records/item_types_loader.go:130 +0x20
github.com/OpenDiablo2/OpenDiablo2/d2core/d2records.LoadItemEquivalencies(0x4000b0cff0, 0x4000b0d350, 0x4000a57c25)
        github.com/OpenDiablo2/OpenDiablo2/d2core/d2records/item_types_loader.go:116 +0x33c
github.com/OpenDiablo2/OpenDiablo2/d2core/d2records.itemTypesLoader(0x40000a0380, 0x40002f65c0, 0xaaaac6e96b13, 0x20)
        github.com/OpenDiablo2/OpenDiablo2/d2core/d2records/item_types_loader.go:71 +0xfb8
github.com/OpenDiablo2/OpenDiablo2/d2core/d2records.(*RecordManager).Load(0x40000a0380, 0xaaaac6e96b13, 0x20, 0x40002f65c0, 0x0, 0x0)
        github.com/OpenDiablo2/OpenDiablo2/d2core/d2records/record_manager.go:247 +0xac
github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset.(*AssetManager).LoadRecords(0x40000b42a0, 0xaaaac6e96b13, 0x20, 0x0, 0x0)
        github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset/asset_manager.go:385 +0x64
github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset.(*AssetManager).initDataDictionaries(0x40000b42a0, 0x0, 0x0)
        github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset/asset_manager.go:141 +0x88
github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset.(*AssetManager).init(0x40000b42a0, 0x40000a0000, 0xaaaac73ef140)
        github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset/asset_manager.go:59 +0x54
github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset.NewAssetManager(0x400025fb90, 0x0, 0x0, 0xaaaac6a0a6ac)
        github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset/d2asset.go:22 +0x254
main.main()
        github.com/OpenDiablo2/OpenDiablo2/main.go:38 +0xf8

Any help appreciated.
  Reply
(10-04-2020, 03:00 AM)rustynkoal Wrote: I'm starting to look for ways to run the game Braid, by Jonathan Blow, on a PBP. However this game "comes with a 32-bit binary only" (https://www.gog.com/game/braid), and running such binaries on an aarch64 machine doesn't seem easy (see for instance https://unix.stackexchange.com/questions/557730).

Does anyone have any idea ?

Its always good to check on the current index of open source clones of popular games @ https://osgameclones.com/
(Again its not 100% up2date and there are some projects that are not indexed and are open source )

If sources are available there is a good chance the code will compile on the aarch64 (PBP) and run.
Sometimes the code needs small adjustments and is fairly easy to patch .. but sometimes it is hard and a lot of effort needs to be done to port
it to a new arch(aarch64)

As for Braid - it looks there are no sources available (I did search a little but could not find any reference) so it will be only possible to play this game
via some x86/Android emulator on the PBP I guess.  (Please correct me if Im wrong)
  Reply
(10-06-2020, 06:48 AM)astr0baby Wrote:
(10-04-2020, 03:00 AM)rustynkoal Wrote: I'm starting to look for ways to run the game Braid, by Jonathan Blow, on a PBP. However this game "comes with a 32-bit binary only" (https://www.gog.com/game/braid), and running such binaries on an aarch64 machine doesn't seem easy (see for instance https://unix.stackexchange.com/questions/557730).

Does anyone have any idea ?

Its always good to check on the current index of open source clones of popular games @ https://osgameclones.com/
(Again its not 100% up2date and there are some projects that are not indexed and are open source )

If sources are available there is a good chance the code will compile on the aarch64 (PBP) and run.
Sometimes the code needs small adjustments and is fairly easy to patch .. but sometimes it is hard and a lot of effort needs to be done to port
it to a new arch(aarch64)

As for Braid - it looks there are no sources available (I did search a little but could not find any reference) so it will be only possible to play this game
via some x86/Android emulator on the PBP I guess.  (Please correct me if Im wrong)

Braid is an XNA game right ?
So maybe it can work with the FNA implementation on aarch64 : https://magazine.odroid.com/article/play...-platform/
  Reply
I'm happy to report that x86 Linux Torchlight 2 works on 32-bit Debian with box86. It's possible that you can do it in a chroot or a Docker container, but I haven't tested that yet
  Reply
(10-12-2020, 03:54 AM)brzegorz Wrote: I'm happy to report that x86 Linux Torchlight 2 works on 32-bit Debian with box86. It's possible that you can do it in a chroot or a Docker container, but I haven't tested that yet

Hey if you make this work on docker, it'd be cool if you share a tutorial in here Big Grin
I'm eager to test box86 but I'm on manjaro and box86 seems to be already a bit complex to build on its own + I've never touched Docker in my life yet...
  Reply
(05-07-2020, 01:00 PM)Nappael, Wrote: However, in my experience, this fails when compiling on the PBP with a number of sound_player errors. To fix this, the best way I have found is to follow the Linux compilation instructions while using an x86_64 machine, and then to copy the build/sound directory and transfer it over  into the build directory on the PBP.
According to the sm64pc_instructions, the arm assembler doesn't understand # comments, so for the sound/sequences/00_sound_player.s file we have to replace all occurrences of # with //.

Quote:The one I have is the sm64pc-sdl.7z archive, with md5sum f47a09dc59120d4f422cdabecf2be494. It shouldn't come with any precompiled binaries. I've seen some archives online which do
On my PinePhone, I have tested the last update from sm64-port, I confirm that work fine.
  Reply
(10-12-2020, 11:43 AM)Idaho Wrote:
(10-12-2020, 03:54 AM)brzegorz Wrote: I'm happy to report that x86 Linux Torchlight 2 works on 32-bit Debian with box86. It's possible that you can do it in a chroot or a Docker container, but I haven't tested that yet

Hey if you make this work on docker, it'd be cool if you share a tutorial in here Big Grin
I'm eager to test box86 but I'm on manjaro and box86 seems to be already a bit complex to build on its own + I've never touched Docker in my life yet...
A small update - I haven't done much, but several attempts at making it work with Docker failed.
If anyone wishes to work further, I recommend the chroot approach - I saw a report on Reddit of somebody making it work.
  Reply
https://magazine.odroid.com/article/play...-platform/
Sounds promising for the PBP as well.
  Reply
I've attempted to run box86 on Debian chroot, both sid and bullseye. I've been able to run explorer/winecfg, but no success with Torchlight II that runs on native Debian.

At this point, I give up - one day when the ecosystem matures I'll switch to Debian on PBP and probably tinker with box86 again, but trying to do it through Docker/chroot is way much more hassle than simply running a Debian on SD card: ).

(10-12-2020, 11:43 AM)Idaho Wrote:
(10-12-2020, 03:54 AM)brzegorz Wrote: I'm happy to report that x86 Linux Torchlight 2 works on 32-bit Debian with box86. It's possible that you can do it in a chroot or a Docker container, but I haven't tested that yet

Hey if you make this work on docker, it'd be cool if you share a tutorial in here Big Grin
I'm eager to test box86 but I'm on manjaro and box86 seems to be already a bit complex to build on its own + I've never touched Docker in my life yet...

Not a tutorial per se, but better than nothing:

1. Make a SD card with Debian through https://github.com/daniel-thompson/pineb...-installer. Contrary to the README, it works on Manjaro. You want armhf debian with bullseye release. Buster has old graphics driver.
2. Put the SD card into PBP and reboot to boot into Debian.
TIP: For steps 2&3 you can use attached script*
2. Install  i386:wine and prequisites for box86
3. Compile box86
4. To run something through wine&box86, type "box86 wine EXECUTABLE" in the console. Examples:
- box86 wine winecfg
- box86 wine explorer
5. To run Torchlight II, run "box86 path_to_x86_executable". It's not start.sh, it's the one located in /game subfolder.

*
Code:
#!/bin/bash

dpkg --add-architecture i386
apt-get update
apt-get -y upgrade
apt-get -y dist-upgrade
apt install -y git cmake g++ python3 gnupg wget libstb0:i386 \
    libavcodec58:i386 libavutil56:i386 libsdl2-2.0-0:i386 libxxf86vm1 \
    libfaudio0:i386 libxcb-randr0 libwine libgl1 mesa-utils \
    libxinerama1 libxrandr2 libxcomposite1 libxi6 libxfixes3 libxcursor1

##### Get wine
wget -nc https://dl.winehq.org/wine-builds/winehq.key
apt-key add winehq.key
echo "deb https://dl.winehq.org/wine-builds/debian/ bullseye main" >> /etc/apt/sources.list.d/wine.list
apt update
apt install -y --install-recommends winehq-stable:i386 wine-stable:i386 \
    wine-stable-i386:i386

##### Get box86
git clone https://github.com/ptitSeb/box86
cd box86
mkdir build && cd build
cmake .. -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo && \
    make -j4 install
export PAN_MESA_DEBUG=gl3
  Reply
(11-03-2020, 09:54 AM)brzegorz Wrote: I've attempted to run box86 on Debian chroot, both sid and bullseye. I've been able to run explorer/winecfg, but no success with Torchlight II that runs on native Debian.

At this point, I give up - one day when the ecosystem matures I'll switch to Debian on PBP and probably tinker with box86 again, but trying to do it through Docker/chroot is way much more hassle than simply running a Debian on SD card: ).

(10-12-2020, 11:43 AM)Idaho Wrote:
(10-12-2020, 03:54 AM)brzegorz Wrote: I'm happy to report that x86 Linux Torchlight 2 works on 32-bit Debian with box86. It's possible that you can do it in a chroot or a Docker container, but I haven't tested that yet

Hey if you make this work on docker, it'd be cool if you share a tutorial in here Big Grin
I'm eager to test box86 but I'm on manjaro and box86 seems to be already a bit complex to build on its own + I've never touched Docker in my life yet...

Not a tutorial per se, but better than nothing:

1. Make a SD card with Debian through https://github.com/daniel-thompson/pineb...-installer. Contrary to the README, it works on Manjaro. You want armhf debian with bullseye release. Buster has old graphics driver.
2. Put the SD card into PBP and reboot to boot into Debian.
TIP: For steps 2&3 you can use attached script*
2. Install  i386:wine and prequisites for box86
3. Compile box86
4. To run something through wine&box86, type "box86 wine EXECUTABLE" in the console. Examples:
- box86 wine winecfg
- box86 wine explorer
5. To run Torchlight II, run "box86 path_to_x86_executable". It's not start.sh, it's the one located in /game subfolder.

*
Code:
#!/bin/bash

dpkg --add-architecture i386
apt-get update
apt-get -y upgrade
apt-get -y dist-upgrade
apt install -y git cmake g++ python3 gnupg wget libstb0:i386 \
    libavcodec58:i386 libavutil56:i386 libsdl2-2.0-0:i386 libxxf86vm1 \
    libfaudio0:i386 libxcb-randr0 libwine libgl1 mesa-utils \
    libxinerama1 libxrandr2 libxcomposite1 libxi6 libxfixes3 libxcursor1

##### Get wine
wget -nc https://dl.winehq.org/wine-builds/winehq.key
apt-key add winehq.key
echo "deb https://dl.winehq.org/wine-builds/debian/ bullseye main" >> /etc/apt/sources.list.d/wine.list
apt update
apt install -y --install-recommends winehq-stable:i386 wine-stable:i386 \
    wine-stable-i386:i386

##### Get box86
git clone https://github.com/ptitSeb/box86
cd box86
mkdir build && cd build
cmake .. -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo && \
    make -j4 install
export PAN_MESA_DEBUG=gl3
Nice script you got there, I tried running its commands on Docker but I'm a noob, wget doesn't seem to work also libfaudio0:i386 is nowhere to be found in the repos, does it require special repos? If anyone with better knowledge could help around I think we could wrap up a nice whole new layer of app compatiblity for the pinebook pro...
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Testing Some More Games on the Pinebook Pro! ImmyChan 5 3,634 09-24-2024, 01:43 AM
Last Post: pigkang
  Converting the Pinebook Pro into a CrowView Note like device 8jef 0 238 08-18-2024, 05:42 PM
Last Post: 8jef
  Pinebook Pro Initial Impressions kunger 443 660,154 04-16-2024, 07:29 PM
Last Post: KC9UDX
  looking to buy one pinebook pro (mainland China) duanduan 3 3,024 03-21-2024, 07:44 PM
Last Post: wangyukunshan
  Cellular module for Pinebook Pro Lotech 1 915 03-05-2024, 05:40 AM
Last Post: KC9UDX
  Screen on pinebook stays black but can ssh into machine tuxxpine 0 656 02-23-2024, 04:22 PM
Last Post: tuxxpine
  Sale my ANSI PineBook Pro cuthbertdavies 0 642 02-14-2024, 09:12 PM
Last Post: cuthbertdavies
  Compiling with -j6 on the Pinebook Pro (Overheat) KC9UDX 0 569 02-14-2024, 09:01 AM
Last Post: KC9UDX
  Manjaro versions bad and good gilwood 0 640 02-12-2024, 05:03 PM
Last Post: gilwood
  Pinebook Pro in EU for Sale - €90 jan_vdk 2 1,282 02-07-2024, 02:12 AM
Last Post: 23Ro

Forum Jump:


Users browsing this thread: 2 Guest(s)