PS3 Need PS3 Homebrew Development Help

create961

Forum Noob
Hi all,

I tried to setup a dev environment to create simple homebrew using PSL1GHT for PS3 but failed. What I did was:

1. Try and find some docker images first, found some, but they were really old, I tried to run https://hub.docker.com/r/hldtux/ps3dev which was one of the more recent ones, but had issues. It could not build the PSL1GHT camera example (only one I tried) - https://github.com/ps3dev/PSL1GHT/tree/master/samples/input/camera because the makefile of that is expecting $(PSL1GHT)/host/ppu.mk but that did not exist in the docker image.

2. I tried to do it all myself by creating my own docker image using the repos, so I did:

FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PS3DEV=/usr/local/ps3dev
ENV PSL1GHT=$PS3DEV/PSL1GHT/build
ENV PATH=$PS3DEV/bin:$PS3DEV/ppu/bin:$PS3DEV/spu/bin:$PATH
RUN apt-get update && apt-get install -y \
autoconf automake bison flex gcc libelf-dev make \
texinfo libncurses5-dev patch python-is-python3 subversion wget zlib1g-dev \
libtool libtool-bin python-dev-is-python3 python3-setuptools bzip2 libgmp3-dev pkg-config g++ libssl-dev clang \
git \
&& rm -rf /var/lib/apt/lists/*
# Build ps3toolchain
RUN git clone https://github.com/ps3dev/ps3toolchain.git && cd ps3toolchain && ./toolchain.sh
And that built the toolchain, after a very long time & PC heating up, then I tried to follow the PSL1GHT instructions:

cd /path/to/psl1ght.git/
export PSL1GHT=/path/to/psl1ght.git/build
make install-ctrl
make
make install
But they did not work, don't recall exact error, but I think it was due to not finding the correct things.

Then I realised that the ps3toolchain already includes PSL1GHT, so I tried the camera example again, and it failed again, because there is no ppu.mk to be found anywhere, I searched the whole file system.

Then, I saw that bucanero has a compressed built version of the toolkit already on his github, although 5 years old from 2020, I downloaded it, and extracted it, looked inside and did not see that ppu.mk file needed by the camera example.

What am I doing wrong?
 
Hi!
From my experience, you just need to build the SDK following the steps in https://github.com/ps3dev/ps3toolchain (I used Ubuntu 24, you may find some packages that are missing when building the SDK that are not stated in the repo. Install those and keep re-running the script until it finishes).

Then just log out and log in again (or restart, whichever you prefer) in order to load the exported paths from your login script and the SDK should be set up and working.

Now, regarding the examples, some of the examples are super old and were written for older versions of the SDK and they may not compile. The camera example could be such a case. I'd recommend downloading some other homebrew to try and build it and see if your SDK is working properly.
Not to toot my own horn, but you can clone the https://github.com/blckbearx/SMW-PS3 repo and build it (there are instructions in the readme). I know for a fact it compiles fine under the latest SDK so you can use it as a test.

Edit: Just to clarify, I'm not building a docker image, I'm just building and installing the SDK under a new user dedicated solely for PS3 development.
 
@blckbear many thanks for your response.

I did build it myself using the dockerfile I put above, and it did build OK, but I could not compile the PSLIGHT examples, as it was missing files. Maybe you are right and they are very out of date, which makes me think, this is a FOSS project, only one of its kind, it has a special folder for its examples and they don't build? Why did nobody fix this. I did not even see anything in the open issues mentioning this.

Ill try again later with just the toolchain & your repo. Maybe I can build a basic example from looking at your code.

Thanks again.

@blkbear so I started fresh, using WSL on Windows, installed Ubuntu, then fetched and unpacked the binary release from https://github.com/bucanero/ps3toolchain into the correct place.

Then I cloned your repo, and did a make pkg on it:

myuser:/mnt/c/dev/ps3dev/SMW-PS3$ make pkg
/bin/sh: 1: xmlstarlet: not found
/bin/sh: 1: xmlstarlet: not found
FileIO.cpp
FileList.cpp
HashTable.cpp
MapList.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/MapList.cpp: In member function 'void MapList::ReadFilters()':
/mnt/c/dev/ps3dev/SMW-PS3/source/MapList.cpp:623:9: warning: variable 'iVersion' set but not used [-Wunused-but-set-variable]
short iVersion[4] = {0, 0, 0, 0};
^~~~~~~~
TilesetManager.cpp
ai.cpp
dirlist.cpp
eyecandy.cpp
gamemodes.cpp
gfx.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/gfx.cpp: In function 'bool gfx_loadpalette()':
/mnt/c/dev/ps3dev/SMW-PS3/source/gfx.cpp:150:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (SDL_MUSTLOCK(palette))
^~
/mnt/c/dev/ps3dev/SMW-PS3/source/gfx.cpp:153:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
SDL_FreeSurface(palette);
^~~~~~~~~~~~~~~
global.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
{15, 13, 12, 14, 21, 22, 20, 23} } } };
^
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp: In function 'void LoadCurrentMapBackground()':
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:1517:6: warning: '%s' directive writing up to 127 bytes into a region of size 106 [-Wformat-overflow=]
void LoadCurrentMapBackground()
^~~~~~~~~~~~~~~~~~~~~~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:1520:16: note: 'sprintf' output between 23 and 150 bytes into a destination of size 128
sprintf(filename, "gfx/packs/backgrounds/%s", g_map.szBackgroundFile);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
input.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/input.cpp: In member function 'void CPlayerInput::Update(SDL_Event, short int)':
/mnt/c/dev/ps3dev/SMW-PS3/source/input.cpp:115:23: warning: variable 'iPlayerID' set but not used [-Wunused-but-set-variable]
short iPlayerID = iPlayer;
^~~~~~~~~
linfunc.cpp
main.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/main.cpp: In function 'void RunGame()':
/mnt/c/dev/ps3dev/SMW-PS3/source/main.cpp:1736:6: warning: ': X' directive writing 3 bytes into a region of size between 0 and 126 [-Wformat-overflow=]
void RunGame()
^~~~~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/main.cpp:3355:15: note: 'sprintf' output between 6 and 132 bytes into a destination of size 128
sprintf(szMode, "%s %s: X", game_values.gamemode->GetModeName(), game_values.gamemode->GetGoalName());
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/main.cpp:1736:6: warning: ': ' directive writing 2 bytes into a region of size between 0 and 126 [-Wformat-overflow=]
void RunGame()
^~~~~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/main.cpp:1736:6: note: directive argument in the range [0, 32767]
/mnt/c/dev/ps3dev/SMW-PS3/source/main.cpp:3357:15: note: 'sprintf' output between 6 and 136 bytes into a destination of size 128
sprintf(szMode, "%s %s: %d", game_values.gamemode->GetModeName(), game_values.gamemode->GetGoalName(), game_values.gamemode->goal);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
map.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/map.cpp: In member function 'SDL_Surface* CMap::createThumbnailSurface(bool)':
/mnt/c/dev/ps3dev/SMW-PS3/source/map.cpp:2136:15: warning: '%s' directive writing up to 127 bytes into a region of size 98 [-Wformat-overflow=]
SDL_Surface * CMap::createThumbnailSurface(bool fUseClassicPack)
^~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/map.cpp:2145:10: note: 'sprintf' output between 31 and 158 bytes into a destination of size 128
sprintf(szBackgroundFile, "gfx/packs/Classic/backgrounds/%s", g_map.szBackgroundFile);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/map.cpp:2136:15: warning: '%s' directive writing up to 127 bytes into a region of size 106 [-Wformat-overflow=]
SDL_Surface * CMap::createThumbnailSurface(bool fUseClassicPack)
^~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/map.cpp:2154:10: note: 'sprintf' output between 23 and 150 bytes into a destination of size 128
sprintf(szBackgroundFile, "gfx/packs/backgrounds/%s", g_map.szBackgroundFile);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
menu.cpp
modeoptionsmenu.cpp
movingplatform.cpp
object.cpp
objectgame.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/objectgame.cpp: In member function 'virtual bool MO_CollectionCard::collide(CPlayer*)':
/mnt/c/dev/ps3dev/SMW-PS3/source/objectgame.cpp:6505:20: warning: operation on '((MO_CollectionCard*)this)->MO_CollectionCard::<anonymous>.IO_MovingObject::animationOffsetY' may be undefined [-Wsequence-point]
animationOffsetY = animationOffsetY = (value + 1) << 5;
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/objectgame.cpp: In member function 'virtual bool CO_ThrowBox::collide(CPlayer*)':
/mnt/c/dev/ps3dev/SMW-PS3/source/objectgame.cpp:9039:9: warning: variable 'flipx' set but not used [-Wunused-but-set-variable]
short flipx = 0;
^~~~~
objecthazard.cpp
path.cpp
player.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/player.cpp: In function 'short int PlayerKilledPlayer(CPlayer*, CPlayer*, short int, killstyle, bool, bool)':
/mnt/c/dev/ps3dev/SMW-PS3/source/player.cpp:2645:7: warning: variable 'fSoundPlayed' set but not used [-Wunused-but-set-variable]
bool fSoundPlayed = false;
^~~~~~~~~~~~
ps3port.cpp
savepng.cpp
sfx.cpp
splash.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/splash.cpp: In function 'bool LoadAndSplashScreen()':
/mnt/c/dev/ps3dev/SMW-PS3/source/splash.cpp:536:29: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
if(padinfo.status)
~~~~~~~~~~~~~~~~^
uicontrol.cpp
uicustomcontrol.cpp
uimenu.cpp
world.cpp
SFont.c
linking ... SMW-PS3.elf
CEX self ... SMW-PS3.self
make_self: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
make[1]: *** [/usr/local/ps3dev/ppu_rules:58: /mnt/c/dev/ps3dev/SMW-PS3/SMW-PS3.self] Error 127
make: *** [Makefile:111: build] Error 2

A lot of warnings, and failed in the end with "make_self: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory"

Any ideas?
 
Last edited by a moderator:
@blckbear many thanks for your response.

I did build it myself using the dockerfile I put above, and it did build OK, but I could not compile the PSLIGHT examples, as it was missing files. Maybe you are right and they are very out of date, which makes me think, this is a FOSS project, only one of its kind, it has a special folder for its examples and they don't build? Why did nobody fix this. I did not even see anything in the open issues mentioning this.

Ill try again later with just the toolchain & your repo. Maybe I can build a basic example from looking at your code.

Thanks again.

@blkbear so I started fresh, using WSL on Windows, installed Ubuntu, then fetched and unpacked the binary release from https://github.com/bucanero/ps3toolchain into the correct place.

Then I cloned your repo, and did a make pkg on it:

myuser:/mnt/c/dev/ps3dev/SMW-PS3$ make pkg
/bin/sh: 1: xmlstarlet: not found
/bin/sh: 1: xmlstarlet: not found
FileIO.cpp
FileList.cpp
HashTable.cpp
MapList.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/MapList.cpp: In member function 'void MapList::ReadFilters()':
/mnt/c/dev/ps3dev/SMW-PS3/source/MapList.cpp:623:9: warning: variable 'iVersion' set but not used [-Wunused-but-set-variable]
short iVersion[4] = {0, 0, 0, 0};
^~~~~~~~
TilesetManager.cpp
ai.cpp
dirlist.cpp
eyecandy.cpp
gamemodes.cpp
gfx.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/gfx.cpp: In function 'bool gfx_loadpalette()':
/mnt/c/dev/ps3dev/SMW-PS3/source/gfx.cpp:150:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (SDL_MUSTLOCK(palette))
^~
/mnt/c/dev/ps3dev/SMW-PS3/source/gfx.cpp:153:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
SDL_FreeSurface(palette);
^~~~~~~~~~~~~~~
global.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
{15, 13, 12, 14, 21, 22, 20, 23} } } };
^
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:131:52: warning: overflow in implicit constant conversion [-Woverflow]
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp: In function 'void LoadCurrentMapBackground()':
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:1517:6: warning: '%s' directive writing up to 127 bytes into a region of size 106 [-Wformat-overflow=]
void LoadCurrentMapBackground()
^~~~~~~~~~~~~~~~~~~~~~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/global.cpp:1520:16: note: 'sprintf' output between 23 and 150 bytes into a destination of size 128
sprintf(filename, "gfx/packs/backgrounds/%s", g_map.szBackgroundFile);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
input.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/input.cpp: In member function 'void CPlayerInput::Update(SDL_Event, short int)':
/mnt/c/dev/ps3dev/SMW-PS3/source/input.cpp:115:23: warning: variable 'iPlayerID' set but not used [-Wunused-but-set-variable]
short iPlayerID = iPlayer;
^~~~~~~~~
linfunc.cpp
main.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/main.cpp: In function 'void RunGame()':
/mnt/c/dev/ps3dev/SMW-PS3/source/main.cpp:1736:6: warning: ': X' directive writing 3 bytes into a region of size between 0 and 126 [-Wformat-overflow=]
void RunGame()
^~~~~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/main.cpp:3355:15: note: 'sprintf' output between 6 and 132 bytes into a destination of size 128
sprintf(szMode, "%s %s: X", game_values.gamemode->GetModeName(), game_values.gamemode->GetGoalName());
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/main.cpp:1736:6: warning: ': ' directive writing 2 bytes into a region of size between 0 and 126 [-Wformat-overflow=]
void RunGame()
^~~~~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/main.cpp:1736:6: note: directive argument in the range [0, 32767]
/mnt/c/dev/ps3dev/SMW-PS3/source/main.cpp:3357:15: note: 'sprintf' output between 6 and 136 bytes into a destination of size 128
sprintf(szMode, "%s %s: %d", game_values.gamemode->GetModeName(), game_values.gamemode->GetGoalName(), game_values.gamemode->goal);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
map.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/map.cpp: In member function 'SDL_Surface* CMap::createThumbnailSurface(bool)':
/mnt/c/dev/ps3dev/SMW-PS3/source/map.cpp:2136:15: warning: '%s' directive writing up to 127 bytes into a region of size 98 [-Wformat-overflow=]
SDL_Surface * CMap::createThumbnailSurface(bool fUseClassicPack)
^~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/map.cpp:2145:10: note: 'sprintf' output between 31 and 158 bytes into a destination of size 128
sprintf(szBackgroundFile, "gfx/packs/Classic/backgrounds/%s", g_map.szBackgroundFile);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/map.cpp:2136:15: warning: '%s' directive writing up to 127 bytes into a region of size 106 [-Wformat-overflow=]
SDL_Surface * CMap::createThumbnailSurface(bool fUseClassicPack)
^~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/map.cpp:2154:10: note: 'sprintf' output between 23 and 150 bytes into a destination of size 128
sprintf(szBackgroundFile, "gfx/packs/backgrounds/%s", g_map.szBackgroundFile);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
menu.cpp
modeoptionsmenu.cpp
movingplatform.cpp
object.cpp
objectgame.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/objectgame.cpp: In member function 'virtual bool MO_CollectionCard::collide(CPlayer*)':
/mnt/c/dev/ps3dev/SMW-PS3/source/objectgame.cpp:6505:20: warning: operation on '((MO_CollectionCard*)this)->MO_CollectionCard::<anonymous>.IO_MovingObject::animationOffsetY' may be undefined [-Wsequence-point]
animationOffsetY = animationOffsetY = (value + 1) << 5;
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/c/dev/ps3dev/SMW-PS3/source/objectgame.cpp: In member function 'virtual bool CO_ThrowBox::collide(CPlayer*)':
/mnt/c/dev/ps3dev/SMW-PS3/source/objectgame.cpp:9039:9: warning: variable 'flipx' set but not used [-Wunused-but-set-variable]
short flipx = 0;
^~~~~
objecthazard.cpp
path.cpp
player.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/player.cpp: In function 'short int PlayerKilledPlayer(CPlayer*, CPlayer*, short int, killstyle, bool, bool)':
/mnt/c/dev/ps3dev/SMW-PS3/source/player.cpp:2645:7: warning: variable 'fSoundPlayed' set but not used [-Wunused-but-set-variable]
bool fSoundPlayed = false;
^~~~~~~~~~~~
ps3port.cpp
savepng.cpp
sfx.cpp
splash.cpp
/mnt/c/dev/ps3dev/SMW-PS3/source/splash.cpp: In function 'bool LoadAndSplashScreen()':
/mnt/c/dev/ps3dev/SMW-PS3/source/splash.cpp:536:29: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
if(padinfo.status)
~~~~~~~~~~~~~~~~^
uicontrol.cpp
uicustomcontrol.cpp
uimenu.cpp
world.cpp
SFont.c
linking ... SMW-PS3.elf
CEX self ... SMW-PS3.self
make_self: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
make[1]: *** [/usr/local/ps3dev/ppu_rules:58: /mnt/c/dev/ps3dev/SMW-PS3/SMW-PS3.self] Error 127
make: *** [Makefile:111: build] Error 2

A lot of warnings, and failed in the end with "make_self: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory"

Any ideas?
The code compiled fine, those warnings are normal, the error came when signing the executable. It appears that you are missing some shared libraries in your Ubuntu install. According to some Google results, installing libssl-dev (sudo apt install libssl-dev) should install those libraries and it should be able to sign the executable.
 
Thanks, I thought it would be related to ps3dev and not the system itself. I had to do:

Now its gotten further, but I get stuck on:

segments enumerated
built crypt data
file built
self written in memory
make: Warning: File '/mnt/c/dev/ps3dev/SMW-PS3/SMW-PS3.self' has modification time 0.094 s in the future
building pkg ... SMW-PS3.pkg
/usr/bin/env: 'python2.7': No such file or directory
make: *** [/usr/local/ps3dev/ppu_rules:66: /mnt/c/dev/ps3dev/SMW-PS3/SMW-PS3.pkg] Error 127
I did google this time and tried various things such as :

sudo apt install python-is-python3
sudo apt install python-dev-is-python3
sudo apt-get install python2
sudo apt install python3-setuptool​

But no success. I am using Ubuntu 22.04

I did take a look at your code, and to me at least, it looks way too complex. The main.cpp alone has over 4000 lines. If you could let me know where I can find a barebones example, all I want for now is:
  1. Game loop
  2. Exit to XMB code
  3. Draw background color
Bare minimal code, with the correct includes. Then I can build from that.
 
Last edited by a moderator:
Thanks, I thought it would be related to ps3dev and not the system itself. I had to do:

Now its gotten further, but I get stuck on:

segments enumerated
built crypt data
file built
self written in memory
make: Warning: File '/mnt/c/dev/ps3dev/SMW-PS3/SMW-PS3.self' has modification time 0.094 s in the future
building pkg ... SMW-PS3.pkg
/usr/bin/env: 'python2.7': No such file or directory
make: *** [/usr/local/ps3dev/ppu_rules:66: /mnt/c/dev/ps3dev/SMW-PS3/SMW-PS3.pkg] Error 127
I did google this time and tried various things such as :

sudo apt install python-is-python3
sudo apt install python-dev-is-python3
sudo apt-get install python2
sudo apt install python3-setuptool​

But no success. I am using Ubuntu 22.04
That's weird, I'm using Ubuntu 24 and I had to install python-is-python3 and it worked.

And yes, the code I suggested was just for testing your SDK and making sure it worked fine. As a code example, I'm afraid I don't really know any "simple" apps, I was thinking about PS3 GamePad Test, but the source code is lost. I can't think of another simpler example.

Anyway, your SDK setup seems to be having issues with python which is weird, I would focus on that, but I don't know how to help as I am using a different version of Ubuntu on a real machine, WSL installations may come with less packages and such.

Edit: I would suggest you remove all the python packages that were installed (python, python2, python-dev, python-is-python3, python-dev-is-python3, python3-setuptools) and do as suggested on the ps3toolchain repo for modern versions on Debian based diestros and just install python-is-python3, python-dev-is-python3 and python3-setuptools. Then re-run the toolchain building script, I suspect that because those packages were not installed when you were building, it may have failed somewhere.

If you want you can try the 5 year old docker image that's available on the web, it works fine, I've used it before and it works. As far as I'm aware there were no significant changes to the SDK since then to render that docker image obsolete, but I can be wrong on that.
 
Last edited:
@blckbear I tried:

docker pull ps3dev/ps3dev:submodules​

and that works, and builds your repo OK! I am just a beginner, so now just looking for some simple samples to build. I could copy your makefile and dirs, but most of what is there is not clear to me. I would like to understand what I am doing.

1. Minimal code for game loop, with minimal deps
2. Clear screen with a color
3. Minimal makefile to build .self

In any case, thanks for your help!
 
@blckbear I tried:

docker pull ps3dev/ps3dev:submodules​

and that works, and builds your repo OK! I am just a beginner, so now just looking for some simple samples to build. I could copy your makefile and dirs, but most of what is there is not clear to me. I would like to understand what I am doing.

1. Minimal code for game loop, with minimal deps
2. Clear screen with a color
3. Minimal makefile to build .self

In any case, thanks for your help!
Awesome!

Now, for code examples, you can find a game called Barulandia which is kinda simple compared to other projects (AFAIK it's a painting game).

But other than that, I can't recall any other projects with minimal code.

Hope this helps!
 
@blckbear_ There are two versions of that, SDL 2 and SDL 1.2, both did not build out of the box unfortunately. With errors such as:

root@ae0e17b1c3ba:/home/BARULANDIA.PS3# make
savepng.cpp
In file included from /home/BARULANDIA.PS3/include/savepng.h:1:0,
from /home/BARULANDIA.PS3/source/savepng.cpp:7:
/home/BARULANDIA.PS3/include/barulandia.h:33:10: fatal error: dbglogger.h: No such file or directory
#include <dbglogger.h>
^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [/usr/local/ps3dev/base_rules:64: savepng.o] Error 1
make: *** [Makefile:114: build] Error 2
Then I tried apollo save manager, which also did not build:

root@ae0e17b1c3ba:/home/apollo-ps3# make
spu_soundmodule.bin
haiku.s3m
footer_ico_triangle.png
buk_scr.png
jar_opt_hover.png
cheat.png
jar_db.png
cat_db.png
logo.png
footer_ico_cross.png
tag_zip.png
header_dot.png
jar_db_hover.png
jar_about.png
cat_cheats.png
jar_opt.png
logo_text.png
cat_opt.png
column_6.png
tag_transfer.png
column_1.png
tag_warning.png
tag_psp.png
edit_shadow.png
mark_arrow.png
jar_about_hover.png
tag_ps1.png
opt_off.png
header_line.png
circle_error_light.png
jar_hdd_hover.png
cat_usb.png
mark_line.png
tag_pce.png
cat_about.png
jar_trophy.png
cat_empty.png
scroll_bg.png
circle_loading_bg.png
jar_bup_hover.png
scroll_lock.png
jar_trophy_hover.png
circle_loading_seek.png
jar_hdd.png
tag_lock.png
cat_hdd.png
tag_ps2.png
tag_net.png
jar_bup.png
cat_bup.png
footer_ico_square.png
cat_warning.png
column_7.png
tag_vmc.png
column_2.png
tag_psv.png
footer_ico_circle.png
column_3.png
tag_apply.png
jar_usb_hover.png
cat_sav.png
mark_line_nowork.png
column_4.png
opt_on.png
jar_usb.png
help.png
circle_error_dark.png
tag_own.png
column_5.png
tag_ps3.png
bgimg.jpg
leon_luna.jpg
settings.c
/home/apollo-ps3/source/settings.c:4:10: fatal error: soundlib/audioplayer.h: No such file or directory
#include <soundlib/audioplayer.h>
^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [/usr/local/ps3dev/base_rules:69: settings.o] Error 1
make: *** [Makefile:136: obj] Error 2
Looking at the issues, I found that a similar issue was fixed, but it seems it wasn't (https://github.com/bucanero/apollo-ps3/commit/9d1348486351ed37aec9dbb5711378b91acfc6f2).

Then after a long time searching for examples, I found something promising: https://github.com/lostjared/ps3demos These actually build (have to do a make clean first) and they seem relatively minimal, I am currently trying to get the random pixels one more trimmed down and cleaner, but I broke it somehow, it builds fine, but does not display the random pixels like the original one did (my version):

#include <SDL/SDL.h>
#include <cstdlib>
#include <iostream>
#include <io/pad.h>
#include <sysutil/sysutil.h>
#include <sysutil/msg.h>
#include "console.hpp"

constexpr int screenWidth = 1280;
constexpr int screenHeight = 720;

void drawRandomPixels(SDL_Surface* surface) {
if(SDL_MUSTLOCK(surface)) SDL_LockSurface(surface);
auto* pixels = static_cast<Uint8*>(surface->pixels);
for(int y = 0; y < surface->h; ++y) {
for(int x = 0; x < surface->w; ++x) {
auto* pixel = reinterpret_cast<Uint32*>(pixels + y * surface->pitch + x * 4);
*pixel = SDL_MapRGB(surface->format, rand() % 256, rand() % 256, rand() % 256);
}
}
if(SDL_MUSTLOCK(surface)) SDL_UnlockSurface(surface);
}

int main() {
if(SDL_Init(SDL_INIT_EVERYTHING) < 0) {
std::cerr << SDL_GetError() << '\n';
return 1;
}
ioPadInit(7);
SDL_Color fontColor{255, 0, 0};
auto* screen = SDL_SetVideoMode(screenWidth, screenHeight, 32,
SDL_SWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN);
if(!screen) {
std::cerr << SDL_GetError() << '\n';
return 1;
}
init_console(screen, "/dev_hdd0/game/RND00TEST/font.ttf", &fontColor);
std::cout << "Hello World with the Console. Press START to scroll. Press X to quit.\n";
bool isRunning = true;
padInfo padInfo;
padData padData;
while(isRunning) {
SDL_FillRect(screen, 0, 0); // Clear screen to black
drawRandomPixels(screen); // Draw random pixel data
draw_console(); // Draw console overlay
SDL_Flip(screen); // Present to screen
ioPadGetInfo(&padInfo);
for(int i = 0; i < MAX_PADS; ++i) {
if(padInfo.status) {
ioPadGetData(i, &padData);
if(padData.BTN_START)
std::cout << "Hello World\n";
if(padData.BTN_CROSS)
isRunning = false;
}
}
}
SDL_Quit();
return 0;
}

Will continue to try and figure out what is going on here.
 
Back
Top