News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: (PSX) Possible to extract startup audio (boot and disc load)?  (Read 6870 times)

Arktik

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
(PSX) Possible to extract startup audio (boot and disc load)?
« on: September 10, 2015, 04:17:25 am »
You all know the 2 audio samples that play when you turn on the PSX. The initial boot sound (orange Sony logo, white background), and then the one that plays when the disc loads (color PS logo, black background.) Yes, I realize there are many videos and files of it on YouTube and elsewhere, but I'm wondering if it's possible to extract the SOURCE audio files samples instead of recording it?

The reason I ask is because the sounds seem to overlap depending on how fast the disc is read/loaded. Every video/file I've found are the two combined. I want them separate.

Thank you all for the help!
« Last Edit: September 12, 2015, 11:21:09 am by Arktik »

PhOeNiX

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #1 on: September 10, 2015, 05:06:13 am »
Just run your PSX BIOS without inserting the disk. Once the first boot audio finishes, insert your disk without turning off your PSX and wait for the black logo to show up.

Arktik

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #2 on: September 10, 2015, 05:56:34 am »
I don't really see how that allows me to extract the files...

I should have mentioned two things:

1. I'm using ePSXe
2. I've used the option "File > Run BIOS", but it get's cutoff by this

Again, I'm trying to extract the files. Upon doing some research, it appears that the boot audio resides in the BIOS, and the second that follows resides on the disc/ROM.

Bregalad

  • Hero Member
  • *****
  • Posts: 2651
    • View Profile
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #3 on: September 11, 2015, 10:11:34 am »
"The files" that you mention don't exist, so no it's not possible to extract them.

Gemini

  • Hero Member
  • *****
  • Posts: 2017
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #4 on: September 11, 2015, 10:52:17 am »
The BIOS contains 3 VAG samples for the boot "music". It's pretty much a simple tracker with those samples playing at different pitch and ADSR. Wanna record the full thing? Use pSX. VAG rippers such as PSound will entirely mess up the loop points; for extraction I'd suggest you locate the samples and use one of the official tools to properly convert to wave.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

Arktik

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #5 on: September 11, 2015, 08:36:26 pm »
Wanna record the full thing? Use pSX... for extraction I'd suggest you locate the samples and use one of the official tools to properly convert to wave.

Can you explain this part a little more? I have the "PSOne Hack Tools" programs if it helps. PSound does indeed show 3 "files" (sorry, Bregalad) but, like you said, it's all messed up. You can tell it's the sounds used, though.
« Last Edit: September 11, 2015, 08:44:32 pm by Arktik »

Gemini

  • Hero Member
  • *****
  • Posts: 2017
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #6 on: September 12, 2015, 03:17:10 am »
Forget whatever hack tools, extract the samples manually. Usually VAG data starts with 16 0x00 bytes and ends with a bunch of values similar to 0x77 (unless it's a looping VAG, which doesn't have that part), with the data inbetween following a repeating 16 byte pattern really easy to identify. On SCPH1001 they start at 0x512E0, 0x55680, and 0x57320; data ends at 0x5CA40.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

Bregalad

  • Hero Member
  • *****
  • Posts: 2651
    • View Profile
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #7 on: September 12, 2015, 04:16:54 am »
Can you explain this part a little more? I have the "PSOne Hack Tools" programs if it helps. PSound does indeed show 3 "files" (sorry, Bregalad) but, like you said, it's all messed up. You can tell it's the sounds used, though.
I guess that's a terminology problem. For me "files" are files on a PSX disc, they do not exist in the BIOS which is just a large bunk of ROM without a file system. The 3 things you found are VAG samples, not "files". By the way, I couldn't get them by scanning with PSound, how did you get that working ? I'd really like to see as well.

Arktik

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #8 on: September 12, 2015, 11:19:23 am »
On SCPH1001 they start at 0x512E0, 0x55680, and 0x57320; data ends at 0x5CA40.

HEX! Now we're getting somewhere. I've got SCPH1001.bin opened in Hex Workshop. Oddly enough, the addresses given do not appear to be correct. Perhaps I'm not using the official SCPH1001 (MD5: 924E392ED05558FFDB115408C263DCCF). That doesn't make sense, though, because ePSXe wouldn't function otherwise (at least I'm assuming.)

I guess that's a terminology problem. For me "files" are files on a PSX disc, they do not exist in the BIOS which is just a large bunk of ROM without a file system. The 3 things you found are VAG samples, not "files".

I guess technically they're not "files" in the traditional sense, so I agree with you there.

By the way, I couldn't get them by scanning with PSound, how did you get that working ? I'd really like to see as well.

All I did was go to "File > Scan file > SCPH1001.bin" and wait about 5 seconds. Another window should pop up which let's you click "Start" to scan the selected file. My only gripes about it are 1.) Not being able to export the raw VAG "files" instead of saving/converting it as WAV and 2.) It completely screws up the samples (as noted by Gemini.)
« Last Edit: September 12, 2015, 11:24:52 am by Arktik »

Gemini

  • Hero Member
  • *****
  • Posts: 2017
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #9 on: September 12, 2015, 01:05:13 pm »
HEX! Now we're getting somewhere. I've got SCPH1001.bin opened in Hex Workshop. Oddly enough, the addresses given do not appear to be correct. Perhaps I'm not using the official SCPH1001 (MD5: 924E392ED05558FFDB115408C263DCCF). That doesn't make sense, though, because ePSXe wouldn't function otherwise (at least I'm assuming.)
Whoopsie, got the first one mixed up. It's 0x521E0. Also, your MD5 matches with mine.

I guess that's a terminology problem. For me "files" are files on a PSX disc, they do not exist in the BIOS which is just a large bunk of ROM without a file system. The 3 things you found are VAG samples, not "files".[/url]
You can technically consider them files, which use a weak virtual file system. A whole deal of the BIOS is treated like that.

Quote
By the way, I couldn't get them by scanning with PSound, how did you get that working ? I'd really like to see as well.
I guess PSound might have issues with some samples. Sometimes it just fails for no obvious reason whatsoever, it even happened with a few of my samples.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

Arktik

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #10 on: September 12, 2015, 10:59:54 pm »
Alright, Gemini. I'm still hacking away at this. I've (kinda) succeeded in extracting those addresses and have some playable samples. A few things I've noticed, though:

1. The VAG samples appear to have some heavy pitch-shifting going on, as well as some processing from the SPU
2. In order to get playable samples in MFAudio, the format should be changed from "Uncompressed PCM @ 48000Hz/Stereo" to "Compressed ADPCM @ 22050Hz/Mono" (odd, because I could have sworn the audio was stereo when played via console/emulator. Must be the SPU again, ¯\_(ツ)_/¯......)
3. The extracted VAG samples (0x521E0 to 0x55670, 0x55680 to 0x57310, and 0x57320 to 0x5CA40) are unrecognized by PSound unless "scanned" (perhaps due to the lack of version headers)

Here's what I've got so far:

Code: [Select]
Tools/items needed:

1. SCPH1001.bin
2. Hex Workshop or any hex editor (the following steps pertain to Hex Workshop, so adapt accordingly)
3. MFAudio

VAG addresses:

#1 - 000521E0 --> 00055670
#2 - 00055680 --> 00057310
#3 - 00057320 --> 0005CA40

1. Acquire SPCH1001.bin
2. Open in a hex editor of your choice (again, these steps pertain to Hex Workshop)
3. Adjust the address pane on the left to a width of 4 bytes (01234567)
4. Adjust the hex data pane in the middle to a width of 8 bytes (0123456789ABCDEF)
5. For VAG #1, navigate to address 000521E0
6. Copy *FROM* 000521E0 address *TO* 00055670
7. Create new file
8. Paste and save as xyz.vag
9. Repeat steps 5-8 for VAG #2 and #3
10. Open your VAG samples in MFAudio
11. Click the dropdown menu and change from "RAW - Raw Sound Data - Uncompressed PCM" to "RAW - Raw Sound Data - Compressed ADPCM"
12. Change "Frequency" from 48000 to 22050
13. Change "Channels" from 2 to 1
14. Play audio
15. SUCCESS! (sort of)
16. Dunno where to go from here

This is as far as I've gotten. I still need to figure out a few things:

1. How the SPU is processing the samples (reverb, delay, pitch-shifting, time-stretching, etc.)
2. Why MFAudio finds it necessary to loop the ending bits of the file making a never-ending, ungodly buzzing sound (probably has something to do with point #4 below)
3. How to get these files in their original, high(ish) quality, stereo format
4. LOOP POINTS! (holy jeebus)

I most certainly do not mind working without the SPU-processed audio.
« Last Edit: September 13, 2015, 03:37:11 am by Arktik »

Gemini

  • Hero Member
  • *****
  • Posts: 2017
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #11 on: September 13, 2015, 04:12:47 am »
You're skipping the loop point of those VAGs, that's why they mess up. Also, if you extract from 0x50FC0 to 0x5CA3F you can dump a perfectly working VAB file. You can open that up in Awave Studio and play those samples.

As for the actual tracker part, I have no idea where it's located. It's definitively not using something quite like SEQ, probably a simplified way to play and loop dynamically.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

Arktik

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #12 on: September 13, 2015, 04:15:23 am »
Wow, that's pretty neat. Got it loaded up in Awave Studio, which gives me much more info than PSound. 4 "Programs", each with 2 "Layers". Loop points not implemented though (as far as I can tell.)

If I may ask, where did you find these hex locations? Was this from your own experimentation? Or is this documented somewhere?
« Last Edit: September 13, 2015, 04:22:13 am by Arktik »

Gemini

  • Hero Member
  • *****
  • Posts: 2017
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #13 on: September 13, 2015, 04:19:40 am »
I did a manual check. VAB is a standard PSX format.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

Arktik

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #14 on: September 13, 2015, 04:35:07 am »
Manual? Ah, do you have a dev kit?

I was reading through Nocash technical specs here, but didn't see anything under the SPU section about VAG/VABs...

Regarding "loop points", Nocash mentions that the SPU is capable of "repeats" as well, but I'm sure you already knew that. Take the initial boot "sample" (the big synth in the beginning.) The SPU shifts it down an octave (chimes come in over top at this point,) then "repeats" (LOOP POINT?) the sound, shifted even further, then holds, at which point the last sample (brandish, or something) comes in. PSound/Awave loads the sample(s) at their normal pitch/timing.

When you mention "tracker", am I correct in thinking of tracker music?

Sorry if I sound like I'm going off the deep end here... It's just really frustrating that something so simple is actually not simple at all.

SunGodPortal

  • Hero Member
  • *****
  • Posts: 2921
  • 2 + 2 = 5
    • View Profile
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #15 on: September 13, 2015, 04:50:17 am »
Quote
Sorry if I sound like I'm going off the deep end here... It's just really frustrating that something so simple is actually not simple at all.

Welcome to hacking, my friend. :)
War is Peace. Freedom is Slavery. Ignorance is Strength.

Gemini

  • Hero Member
  • *****
  • Posts: 2017
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #16 on: September 13, 2015, 07:36:46 am »
Manual? Ah, do you have a dev kit?
Nope, but I know how the SDK formats work. Most of them are documented in format overviews, official ones.

Quote
I was reading through Nocash technical specs here, but didn't see anything under the SPU section about VAG/VABs...
I don't remember how VAGs are called under no$psx's docs, but VAB shouldn't be covered as it's a software implementation, not a hardware feature.

Quote
Regarding "loop points", Nocash mentions that the SPU is capable of "repeats" as well, but I'm sure you already knew that. Take the initial boot "sample" (the big synth in the beginning.) The SPU shifts it down an octave (chimes come in over top at this point,) then "repeats" (LOOP POINT?) the sound, shifted even further, then holds, at which point the last sample (brandish, or something) comes in. PSound/Awave loads the sample(s) at their normal pitch/timing.
AFAIK, loop point is where the VAG jumps back for repeating, while the repeat point is just the signal that tells "go back". Pitch isn't really to be considered, the SPU can manipulate that no matter what the source sample.

Quote
When you mention "tracker", am I correct in thinking of tracker music?
Yup.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

Arktik

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #17 on: September 13, 2015, 02:10:42 pm »
Just curious, but would no$psx debugger help me in any way with this? It seems to be much, much more capable than ePSXe or any other PSX emulator I've tried.

Gemini

  • Hero Member
  • *****
  • Posts: 2017
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: (PSX) Possible to extract startup audio (boot and disc load)?
« Reply #18 on: September 13, 2015, 03:12:57 pm »
I'm not sure to be honest. It could work if it can break on SPU hardware register, which you can use to identify which code is doing what.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.