Some Progress

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
ooh... well I'll try to modify it and then I'll tell you the result
Post automatically merged:


I found this config so that the ps3 has audio
can you compile it?
[11:58]



#include "sound.h"

SDL_AudioDeviceID deviceId;

void effect_play(int index) {
char buf[MAX_STRING];
snprintf(buf, MAX_STRING, "%sSOUND%d.WAV", DATA_PATH, index);
dbglogger_printf("PLAYING: %s\n", buf);

// load wav
SDL_AudioSpec wave;
Uint8 wavBuffer;
Uint32 wavLength;

SDL_AudioSpect = SDL_LoadWAV(buf, &wave, &wavBuffer, &wavLength);
// check wave.format becoz PS3 SDL dont report error
if ((t == NULL) || (!wave.format)) {
fprintf(stderr, "Could not open %s: %s\n", buf, SDL_GetError());
return;
}
/debug_audio_spec(&wave);/

// stop previous audio
SDL_ClearQueuedAudio(deviceId);

// play new audio
SDL_QueueAudio(deviceId, wavBuffer, wavLength);
SDL_FreeWAV(wavBuffer);

SDL_PauseAudioDevice(deviceId, 0);
}

void sound_init() {
// sdl
SDL_AudioSpec want, have;
SDL_zero(want);
// avoid PS3's default AUDIO_F32MSB
want.format = AUDIO_S16LSB;
want.freq = 16000;
// mono
want.channels = 1;
deviceId = SDL_OpenAudioDevice(NULL, 0, &want, &have, 0);
if (deviceId == 0) {
dbglogger_printf("Failed to open audio: %s", SDL_GetError());
}

debug_audio_spec(&have);
}

void sound_end() {
if (deviceId)
SDL_CloseAudioDevice(deviceId);
}



[11:59]
changing some things to make it work in sonic mania of course
I just now saw your edit. You want that changed, added, or replaced? Sorry, my computer's fan failed, but I can compile it after it's fixed. The fan is crucial with builds, but I have been keeping my computer cool with a laptop cooler. Anyway, what did you mean about using both mine and the one on github? I'm not sure if my compile will work, since the original doesn't, except with the ps3 emulator. I talked with bucanero about it. He said the something is wrong with some of the later sdk builds. I'm using the latest. Anyway, he said a build working in the emulator but not the system is a common problem, which is why he uses an sdk from two years ago.
 

DropSo

Well-Known Member
Newcomer
Joined
Jan 7, 2023
Messages
82
Trophies
0
Age
21
XP
58
Country
Argentina
that code if it puts in the data before compiling it
Post automatically merged:

One question,
how is it compiled in windows?

how to compile in linux?
I don't know how to do it but I do know that the data can be modified before compiling it
 

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
Windows=msys Linux=Ubuntu 20.04 wsl v.2 seems to be the best version to use imo. You'll need the ps3toolchain and sdk. Prepare to wait. It took my laptop over 3 hours to compile the toolchain and sdk.
 

DropSo

Well-Known Member
Newcomer
Joined
Jan 7, 2023
Messages
82
Trophies
0
Age
21
XP
58
Country
Argentina
Windows=msys Linux=Ubuntu 20.04 wsl v.2 seems to be the best version to use imo. You'll need the ps3toolchain and sdk. Prepare to wait. It took my laptop over 3 hours to compile the toolchain and sdk.
I'm sorry, but could you tell me how you compile it to msys2?
I already have it downloaded, I just don't know how it works
Although it takes a long time I want to try it
 

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
Hmm, looks like it may not work in windows unless you find some equivalents to the Linux install files. I think I used msys for some vita builds, but that's it as far as Playstation. Playstation often requires Linux due to prerequisites. Wsl v2 is for windows btw, but it's Linux or as close as you can get without a virtual drive or something.
 

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
https://github.com/ps3dev/ps3toolchain

My computer is still down, since they sent the wrong fan, and I can't text type very fast. Do that apt-get command, type sudo in front to get root privileges, required for certain things or you'll get access denied. You need ro put that export portion in your bashrc which is in the home directory. Put it at the bottom. These are environmental variables. If it says to create the directory for ps3dev, do sudo mkdir /usr/local/ps3dev (I think that's the location it will install to). If it asks for permissions, do sudo chmod -R 777 /usr/local/ps3dev . That will give full permissions to that location, and every file installed will inherit those permissions. After you do all that, run the toolchain shell script.
Post automatically merged:

Oh, and run sudo apt update before the apt-get command.
 
Last edited by godreborn,

DropSo

Well-Known Member
Newcomer
Joined
Jan 7, 2023
Messages
82
Trophies
0
Age
21
XP
58
Country
Argentina
I already installed all this and now?
https://github.com/ps3dev/ps3toolchain

My computer is still down, since they sent the wrong fan, and I can't text type very fast. Do that apt-get command, type sudo in front to get root privileges, required for certain things or you'll get access denied. You need ro put that export portion in your bashrc which is in the home directory. Put it at the bottom. These are environmental variables. If it says to create the directory for ps3dev, do sudo mkdir /usr/local/ps3dev (I think that's the location it will install to). If it asks for permissions, do sudo chmod -R 777 /usr/local/ps3dev . That will give full permissions to that location, and every file installed will inherit those permissions. After you do all that, run the toolchain shell script.
Post automatically merged:

Oh, and run sudo apt update before the apt-get command.
Screenshot_20230119-205803.png
 

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
Did you git clone the repo? git clone --recursive github url
Post automatically merged:

After that, do cd ps3toolchain . Then ./toolchain.sh . That will run the script. Then you wait however long it takes.
 

DropSo

Well-Known Member
Newcomer
Joined
Jan 7, 2023
Messages
82
Trophies
0
Age
21
XP
58
Country
Argentina
It tells me that the package could not be located.
Did you git clone the repo? git clone --recursive github url
Post automatically merged:

After that, do cd ps3toolchain . Then ./toolchain.sh . That will run the script. Then you wait however long it takes.
 

godreborn

Welcome to the Machine
OP
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
Remove sudo apt install from the git clone line.
Post automatically merged:

Also put a space after clone, so it knows it's not part of the name.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    S @ salazarcosplay: any mushroom trip adventures you can share