173210 / valentine-hbl

Half Byte Loader BETA
http://wololo.net/hbl
Other
22 stars 5 forks source link

Picodrive sound #270

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Yet again a "game specific" problem, but this one has been requested by many 
people.

I thought that solving the modules loading issues would solve mp3 playback...it 
worked for Wagic (thanks m0skit0) but not for picodrive.
Let's investigate and fix if we can :)

(mp3/sound works fine for my version of picodrive on CFW, but not in HBL. Will 
update with the actual error message later)

Original issue reported on code.google.com by wagic.the.homebrew@gmail.com on 5 Jul 2010 at 3:06

GoogleCodeExporter commented 8 years ago
This might be complicated. Picodrive is not using the sceUtility* functions, 
but tries to directly load multiple modules from flash:
flash0:/kd/me_for_vsh.prx
flash0:/kd/avcodec.prx
flash0:/kd/audiocodec_260.prx (sceAudiocodec_Driver)
It probably does some low level magic with those files. 

What it does not is loading the sceMp3 library, so the decoding is probably in 
software. Before realizing this I tried to spoof the loading by patching 
sceKernelLoadModule() and sceKernelStartModule() with loading the AVCODEC and 
MP3 utilities when those PRX are requested. But it crashes after starting 
avcodec.prx.

Original comment by jochen.s...@gmail.com on 6 Jul 2010 at 5:07

GoogleCodeExporter commented 8 years ago
After some looking around, my guess is that the code looks something like this:
http://forums.ps2dev.org/viewtopic.php?t=8469

Original comment by jochen.s...@gmail.com on 6 Jul 2010 at 9:14

GoogleCodeExporter commented 8 years ago
Was the latest version of picodrive ever made open source? It would be somewhat 
easy to update the code, I've done it for JGE (with Wagic), I can probably do 
it for picodrive...

Original comment by wagic.the.homebrew@gmail.com on 7 Jul 2010 at 11:16

GoogleCodeExporter commented 8 years ago
All I found was 1.35;s source. It's an older revision but I've attached it. 
Hopefully it helps some.

Original comment by cheeze6...@gmail.com on 7 Jul 2010 at 2:47

Attachments:

GoogleCodeExporter commented 8 years ago
Even if you were able to edit this revision it would be better than having no 
sound. 1.35 wasn't the best out of the revisions. Genesis roms should all play 
good but Sega CD is said to have issues.

Original comment by cheeze6...@gmail.com on 7 Jul 2010 at 2:59

GoogleCodeExporter commented 8 years ago
I have a solution, although I couldn't find a way to accept anything else than 
44kHz. So for picodrive, this means changing the settings a bit, losing a bit 
performance, but oh well, I guess it's alright...

the error was that the sound override needs to align a value to 64 bytes

Original comment by wagic.the.homebrew@gmail.com on 14 Jul 2010 at 12:02

GoogleCodeExporter commented 8 years ago
I've seen your video. Great work man!!!

Original comment by cheeze6...@gmail.com on 14 Jul 2010 at 7:27

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Fixed in r95, please verify

Original comment by wagic.the.homebrew@gmail.com on 18 Jul 2010 at 12:48

GoogleCodeExporter commented 8 years ago
Sound is working great and it's confirmed fixed in r95 I've tested all my roms 
I currently have and the sound works on all of them. 

But like you said lower values don't work but that's not a issue, rather have 
sound then no sound at all.

Original comment by SeanC...@gmail.com on 18 Jul 2010 at 1:40