-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Would it be possible to update gcc? #118
Comments
Hi! You might want to try out #110 which contains an update to gcc 10. Would be nice to get some more feedback on how that works out for people. |
@DarkBattle0000 |
Built couple of tiny3d samples, but get a black screen and have to power off the ps3 when trying to load from ps3loadx. |
Built the toolchain on Ubuntu focal and then built a couple of tiny3d samples. Loaded it via ps3loadx. Same like thing like gcc 10.2.0, I just get black screen and have to poweroff the ps3. |
I'm also facing the black screen using c++ with iostream.h and I'm still investigating the reason. docker run -i --rm -v `pwd`:/build -w /build hldtux/ps3dev-sdl2 bash -s <<EOF
echo '#include <SDL.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
SDL_version version;
SDL_VERSION(&version);
printf("SDL version %d.%d.%d\n", version.major, version.minor, version.patch);
// Initialize SDL with video and game controller subsystems
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) != 0) {
printf("SDL initialization failed: %s\n", SDL_GetError());
return 1;
}
SDL_Window * window = SDL_CreateWindow(
"window",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
480,
272,
0
);
if (window == NULL) {
printf("Window creation failed: %s\n", SDL_GetError());
SDL_Quit();
return 1;
}
// SDL_Renderer * renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
SDL_Renderer * renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_SOFTWARE);
if (renderer == NULL) {
printf("Renderer creation failed: %s\n", SDL_GetError());
SDL_DestroyWindow(window);
SDL_Quit();
return 1;
}
SDL_Rect rect = {216, 96, 34, 64};
int running = 1;
SDL_Event event;
while (running) {
if (SDL_PollEvent(&event)) {
switch (event.type) {
case SDL_QUIT:
running = 0;
break;
case SDL_CONTROLLERDEVICEADDED:
SDL_GameControllerOpen(event.cdevice.which);
break;
case SDL_CONTROLLERBUTTONDOWN:
if(event.cbutton.button == SDL_CONTROLLER_BUTTON_START)
running = 0;
break;
}
}
// Clear the screen
SDL_RenderClear(renderer);
// Draw a red square
SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);
SDL_RenderFillRect(renderer, &rect);
// Draw everything on a white background
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
SDL_RenderPresent(renderer);
}
return 0;
}' > main.c
# compile
ppu-gcc main.c -o main \
-mcpu=cell -I/usr/local/ps3dev/ppu/include \
-I/usr/local/ps3dev/portlibs/ppu/include \
-L/usr/local/ps3dev/portlibs/ppu/lib \
-L/usr/local/ps3dev/spu/spu/lib \
-L/usr/local/ps3dev/ppu/powerpc64-ps3-elf/lib \
-I/usr/local/ps3dev/portlibs/ppu/include/SDL2 -I/usr/local/ps3dev/portlibs/ppu/include -L/usr/local/ps3dev/portlibs/ppu/lib -lSDL2_image -lSDL2 -lm -lgcm_sys -lrsx -lsysutil -lrt -llv2 -lio -laudio
# elf
ppu-strip main -o main.elf
sprxlinker main.elf
fself main.elf main.self
make_self main.elf main.self
# pkg
mkdir -p pkg/USRDIR
make_self_npdrm main.elf pkg/USRDIR/EBOOT.BIN UP0000-ABCDEFG_00-0000000000000000
cp /usr/local/ps3dev/bin/sfo.xml .
sed -i "s/01\.00/2.00/g" sfo.xml
sfo.py --title GAME_TITLE --appid GAME_ID -f sfo.xml pkg/PARAM.SFO
pkg.py --contentid UP0000-ABCDEFG_00-0000000000000000 pkg/ main.pkg
EOF |
@humbertodias Blacks screen with pkg also. |
Weird! I have tested successfully it on rpcs3 today. |
@humbertodias Testing on console only. I can try downloading your prebuilt toolchain and try building. What Ubuntu version are you on? I tried running in Focal and I'm getting this error. ./powerpc64-ps3-elf-gcc: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found |
Tested with the prebuilt toolchain. Testing on console only.
|
I found out the problem and fix here humbertodias@bc0c04b |
I'm new to the playstation 3 development scene, I started using the toolset not too long ago. But I noticed some interesting things that got in the way of development for the platform. For some reason I have problems compiling projects with -O2 levels, it compiles more does not run, always returns to xmb (I did Code Review, this ok). In search of an answer the idea came to my mind that the flags that -O2 levels add could be the problem, so I decided to test one by one until I get to the -fcode-hoisting flag, for some reason this flag does not allow me to compile with -O2 levels. Searching around a bit, I found a small update from gcc 7.2.0 to gcc 7.5.0, but it seems to be very unstable. But when compiling my project with this update it worked perfectly. The point here is, Would it be possible to update gcc or fix the problem?
The text was updated successfully, but these errors were encountered: