How does the CD player visualizer receive audio input?

Members research, findings and information that can be useful towards the PlayStation 1.
Post Reply
User avatar
Chandy
Interested PSXDEV User
Interested PSXDEV User
Posts: 9
Joined: Apr 24, 2017
I am a: Musician
Motto: Keep it crispy!
PlayStation Model: SCPH-7001

How does the CD player visualizer receive audio input?

Post by Chandy » April 24th, 2017, 7:59 am

Hi all, first time poster here.

I've got an old SCHP-700 PS1 in my garage that I haven't used since 2005. One of the things I remember most fondly about the PS1 as a teen was using it to play CDs and watching the cool audio visualizations in that classic PS1 style.
[youtube]http://www.youtube.com/watch?v=81NMXYzNYgY[/youtube]

I had an idea for a mod that would allow the PS1 to accept audio input from an external source and use that audio signal to generate visualizations within the SoundScope visualizer without having to read audio from a CD. As a musician, I think it would be a really neat gimmick to have my 90s synth accompanied by a 90s audio visualizer for live performances. While I could go with a much more versatile PC software based visualizer like MilkDrop, I don't like bringing laptops to gigs. Turning your old PS1 into a standalone hardware audio visualizer could be a pretty neat hack that several people might be interested in, especially given how cheap the 700/900 model PS1s are these days.

I'd imagine that there is some connection between the disc drive (or the onboard sound card) and the rest of the PS1 where the audio output is transferred to the CPU and then converted into visualizations. This mod could be as easy as mounting some RCA audio jacks on the back panel and soldering the jacks to wherever this disc drive audio out connection interacts with the CPU (probably with some capacitors in the mix to adjust the level, but I don't know). If I knew how the SoundScope visualizer actually worked I could figure out how an analog signal from an external source could be translated into a digital signal that could mimic whatever values the CD drive is sending to the component that handles the visualization.

Obviously this would make the console basically worthless for playing games on account of a lack of audio, but given that I have a PS2 and rarely use the 'ol PS1 for much of anything, I doubt it will be too much lost potential. It's not even a 100 model, so even if I wanted to use it as a CD player it wouldn't be any better than my current sound system.

I will make a project thread for this in the appropriate forum, but before I start organizing that I have a few questions.
  • How does the disc drive/sound card transmit audio from CDs to the component that handles visualization?
  • How can I convert an analog signal from an external source into a signal that can be interpreted by the SoundScope visualizer as if it is receiving data from the optical drive?
  • What capacitors/other audio components will I need to use to ensure that the audio coming from the external source matches the signal strength/level that the disc drive sound card transmits to the component that handles visualization?
  • Can the visualizer be enabled without a disc spinning in the player, or will I still have to insert a CD to start the visualizer using the Select button?
Thanks for any help and answers, I've been looking around this forum and I love what y'all are doing.

User avatar
TriMesh
Verified
PSX Aptitude
PSX Aptitude
Posts: 225
Joined: Dec 20, 2013
PlayStation Model: DTL-H1202
Location: Hong Kong

Post by TriMesh » April 24th, 2017, 12:50 pm

It's going to be a bit more complicated than you are thinking, mostly because the signal path between the CD subsystem and the audio DSP is a digital transport stream and not an analog connection. As a result, you would need to use an ADC with a serial PCM / I2S output and connect that to the audio DSP in place of the signal from the CD drive.

As it happens, your SCPH-700x series console is the last one where it's possible to do this - on the SCPH-750x and later the audio DSP and the CD logic are all integrated into the same chip and hence this transport link is inaccessible.

In most cases, the ADCs are slave transmitter devices, so you would need to leave the BCLK and LRCLK signals connected to the CD circuits to provide the clocks, but lift the DATA line and connect that to the ADC output. This is about the simplest setup you could use for a proof of concept. You will also likely (depending on the ADC chip) need a high-speed clock, which you can probably find on the existing audio DAC.

User avatar
Chandy
Interested PSXDEV User
Interested PSXDEV User
Posts: 9
Joined: Apr 24, 2017
I am a: Musician
Motto: Keep it crispy!
PlayStation Model: SCPH-7001

Post by Chandy » April 24th, 2017, 1:43 pm

Thanks for the quick response! My only experience with console modding has been older stuff like the C64 and the Atari 7800 so this is all quite new to me. What a goof on my part to think it would be an analog signal!
As a result, you would need to use an ADC with a serial PCM / I2S output and connect that to the audio DSP in place of the signal from the CD drive.

In most cases, the ADCs are slave transmitter devices, so you would need to leave the BCLK and LRCLK signals connected to the CD circuits to provide the clocks, but lift the DATA line and connect that to the ADC output. This is about the simplest setup you could use for a proof of concept. You will also likely (depending on the ADC chip) need a high-speed clock, which you can probably find on the existing audio DAC.
Would this ADC meet my needs? Haven't really bought components for a project like this before so I don't know what to look for. Two analog inputs for stereo L/R, outputs in serial 12s format. I assume I could solder RCA jacks to the analog inputs with a preamp/capacitor in between to control the signal level, but then again I could easily be grossly oversimplifying (wouldn't be the first time today).

Where exactly is the DATA output from my ADC supposed to be connected? To which pins on the disc drive would I be connecting the serial outs? Any diagrams/schematics of the disk drive in the SCPH-700x series that could be of help? Thanks again.

User avatar
TriMesh
Verified
PSX Aptitude
PSX Aptitude
Posts: 225
Joined: Dec 20, 2013
PlayStation Model: DTL-H1202
Location: Hong Kong

Post by TriMesh » April 25th, 2017, 3:14 am

OK, I just managed to find a SCPH-7001 (which was lucky, since most of the consoles that end up here are either Japanese or PAL), and checked the signals on the audio DSP.

The good news is that everything you need is on that chip, and it's easy to get at since it's just under the copper foil shield and not the soldered-on one.

The chip you need is IC308, CXD2925Q - Significant pins for this mod are:

91 BCLK
92 LRCLK
93 DATA

All 3 lines are inputs on the DSP and are normally driven from the CD controller IC. They also all have series termination resistors, so you can just lift the resistor and connect some other signal to the pad. That's the good news - the bad news is that the signal format on this link is a little unusual - most notably, LRCLK is 132.3kHz which, since the source is a CD drive with a sampling rate of 44.1kHz suggests that that it's being 3:1 oversampled somewhere in the CD processing chip. BCLK is 8.4672MHz, which looks pretty standard (64 bit cells).

That ADC should be able to handle this, although the cutoff of the internal filters will be way too high (since it will just see that Fs = 132.3kHz and hence the Nyquist frequency should be 66.15kHz despite it really being a 44.1kHz system with a Nyquist frequency of 22.05kHz. For audio applications this would be really bad, but maybe it won't matter for visualization.

With the DAC you're talking about, I would start by connecting it up like this:

S/M tied high for slave mode
BCLK and LRCLK connected to the same signals on the PSX audio DSP
DATA connected to the PSX audio DSP with the existing series termination resistor removed
MCLK wired to BCLK and quad speed mode selected (FS1=Hi, FS0=Lo).
DF pin pulled high (seems to be required in quad speed mode)
OWL0 and OWL1 tied high (force 16 bit mode, since that's what the original chip outputs)
Both FMT pins tied low for left-justified mode

I'm not giving any guarantee this will work, but from a quick look at the datasheet it looks like these are the settings that are closest to what the PSX is expecting.

Note that since you are hijacking the audio path here you can test this quite easily by playing a CD and then putting a signal into the ADC and listening to it on the PSX audio output. If you get complete garbage, then the settings need fixing...

likeabaus
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 133
Joined: Jul 27, 2016

Post by likeabaus » April 25th, 2017, 5:36 am

This is a pretty neat idea! I'll be keeping an eye on this project, maybe dive in myself, although i have a 9001 so i dont know how much help i would be lol

User avatar
Chandy
Interested PSXDEV User
Interested PSXDEV User
Posts: 9
Joined: Apr 24, 2017
I am a: Musician
Motto: Keep it crispy!
PlayStation Model: SCPH-7001

Post by Chandy » April 25th, 2017, 7:46 am

The bad news is that the signal format on this link is a little unusual - most notably, LRCLK is 132.3kHz which, since the source is a CD drive with a sampling rate of 44.1kHz suggests that that it's being 3:1 oversampled somewhere in the CD processing chip. BCLK is 8.4672MHz, which looks pretty standard (64 bit cells).

That ADC should be able to handle this, although the cutoff of the internal filters will be way too high (since it will just see that Fs = 132.3kHz and hence the Nyquist frequency should be 66.15kHz despite it really being a 44.1kHz system with a Nyquist frequency of 22.05kHz. For audio applications this would be really bad, but maybe it won't matter for visualization.
Hmm, that oversampling sure is pesky. Obviously a properly responsive visualizer is all I'm really worried about right now so the RCA outs from the PSX don't really need to be perfect, but I sure would like them to to output a good quality signal. If it's only a matter of getting a different ADC or adding some component to the external circuit that will house the ADC then I would rather err on the side of preserving the PSX's audio quality than not.

Keeping the PSX's audio out would allow me to connect the PSX audio out to my amp/phones (not ideal considering it's not one of the "legendary" audiophile 100x models) or to another audio visualizer (like the one I currently use, the PixelMusic 3000) without having to clutter my set-up or degrade the signal quality with too many splitters. It's not vital to the project and if it can't be accomplished without herculean effort or substantial cost I'll give up on it, but I'd still like to keep the audio outs usable if at all possible.

Luckily my university allows me to get a certain number of free samples from Texas Instruments, so if there are any ADCs out there that would be better suited for this project I'd be happy to try them out.

That said, if you don't really know enough about how the DSP processes that audio to give me a solid answer without further testing of the method you outlined, that's totally fine. You've already been really helpful and I super duper appreciate you getting a 700x model just to help me out.

Maybe some of these resources might help:

Documentation of the SPU and related chips on a 550x model (see pages 12 and 13). Also in Russian, but my Chrome translation seemed to do an alright job of interpreting some of the information.

A similar project done on an Atari Jaguar CD. He uses a more complex monitoring board to host his ADC, is that something we'll need or will it not even help what with the PSX's oversampling processor?

wisi
Curious PSXDEV User
Curious PSXDEV User
Posts: 11
Joined: Jan 27, 2016

Post by wisi » April 25th, 2017, 11:02 pm

AFAIK, all PS1 and PS2 models' chips support feeding digital audio in some way. I believe this feature is a left-over from when a CD/DVD emulator would have been connected through the Expansion PIO (on on the PS2 the Expansion Bay) port. On the PS2 I am sure that digital audio can be fed through the Expansion Bay on the SCPH-30000 series (this is done through disabling the CDVD DSP and enabling the Dev9C buffer to output to the digital input of the SPU). On the PS1, I believe the EXTBCK, EXTRLCK, EXTDATA lines preset at the PIO port were used for. They connect to LRCO, BCKO, DTIB of the SPU ( http://wiki.psxdev.ru/index.php/SPU ). The LRCO, BCKO(clock outputs), DTIB( data input) see to be present on all SPU chips all the way to the SCPH-100! :D
The bad news is that in order for the SPU to receive input from these lines, some bit in some register would have to be enabled. This would either has to be done by loading some software to patch the player, or using some sort of mod-chip to patch the write to this (unknown to me) register on initialization.
This is as far as my knowledge of the subject goes though. :(

User avatar
TriMesh
Verified
PSX Aptitude
PSX Aptitude
Posts: 225
Joined: Dec 20, 2013
PlayStation Model: DTL-H1202
Location: Hong Kong

Post by TriMesh » April 26th, 2017, 12:16 am

OK, they are all 3:1 oversampled, even going back to the original SCPH-1000. I suspect this was done because the XA audio on the CD is uncompressed in the CD interface chip, and running the transport link @132.3kHz allows you to support both the 44.1kHz CD audio and the 18.9kHz XA audio with integer upsampling ratios. The other XA rate (37.8kHz) requires 3.5 upsampling, but this is likely done by alternating between 3 and 4 output samples per XA sample.

The data that appears in the buffer at the start of the SPU RAM has already been downsampled to 44.1kHz before it's stored. It's possible that just feeding in 44.1kHz data directly into the SPU CD input would work, but I haven't attempted that.

Looking at that evaluation board, the extra parts appear to be a preamp (on the left side of the board) and a format converter and buffering for SPDIF and TOSLINK output on the right. Since the PSX takes the same sort of I2S/PCM audio stream that the ADC outputs directly, that additional logic shouldn't be needed.

Although this is a guess, I also suspect that the audio stream in the Jag CD is not likely to be oversampled - it's using a Phillips chipset, and they were always much less into oversampling than Sony were.

@wisi

Yeah, there is an external input on the expansion port, but I don't think it's going to be useful here, since it lacks the dedicated input buffer RAM that the CD input has, and that seems to be where the CD visualizer reads the CD data from. From my quick tests, the contents of that buffer memory seem to be the output of the decimation filter, but before any other processing.

User avatar
Chandy
Interested PSXDEV User
Interested PSXDEV User
Posts: 9
Joined: Apr 24, 2017
I am a: Musician
Motto: Keep it crispy!
PlayStation Model: SCPH-7001

Post by Chandy » April 26th, 2017, 8:10 am

The data that appears in the buffer at the start of the SPU RAM has already been downsampled to 44.1kHz before it's stored. It's possible that just feeding in 44.1kHz data directly into the SPU CD input would work, but I haven't attempted that.

Looking at that evaluation board, the extra parts appear to be a preamp (on the left side of the board) and a format converter and buffering for SPDIF and TOSLINK output on the right. Since the PSX takes the same sort of I2S/PCM audio stream that the ADC outputs directly, that additional logic shouldn't be needed.
Alright, I have ordered that ADC from Texas Instruments. I will report back when I have received it and modeled the circuit.

If you find out anything in the meantime, please let me know! Thanks again for all of your help.

User avatar
Chandy
Interested PSXDEV User
Interested PSXDEV User
Posts: 9
Joined: Apr 24, 2017
I am a: Musician
Motto: Keep it crispy!
PlayStation Model: SCPH-7001

Post by Chandy » May 14th, 2017, 7:44 pm

Alright, so I've received the ADC chip finally. It's very small (see attachment). I think I'll need a custom PCB if I actually want to solder anything to it with the tools I have. I guess my next step will be designing that PCB. I have pored through the data sheet of the ADC and wanted to confirm a few things before I design and order the PCB. I've never designed a PCB before, so bear with me if any of this is really dumb, obvious stuff. My friend is an electrical engineering student and he offered to help me with the actual build so rest assured that he'll smack the soldering iron out of my hand if I try to do anything stupid.

-I will use two 1/4" inch stereo jacks as L/R analog inputs, which will connect to pins VINL- and VINL+ (left) and VINR- and VINR+ (right).
-I need to supply the chip with +4.0V analog power (nominal) at pin 4 (VCC1) and +3.3V digital power (nominal) at pin 31 (VDD). However, although the data sheet says it only needs the aforementioned two power sources, there is an extra analog power input listed at pin 9 (VCC2). Is that something I will need to account for and/or worry about with my two analog inputs?
-On page 16 of the datasheet in the analog inputs section, it notes that you may want to consider adding input clamping or limiting to the analog input circuitry before the ADC chip in order to avoid damaging the chip if the signal is too strong. If I'm planning on driving the visualizer from the line level output of a mixer, is this a feature I would feasibly need to make use of? What would I need to add to my PCB to accomplish this?

I also had some questions about some other comments you made, TriMesh:
The data that appears in the buffer at the start of the SPU RAM has already been downsampled to 44.1kHz before it's stored. It's possible that just feeding in 44.1kHz data directly into the SPU CD input would work, but I haven't attempted that.
Have you tested this yet? Where exactly is this SPU CD input? Is it on the same IC308 chip? Does it also have a series termination resistor that I can lift to access the pad underneath? Would I still be wiring the LRCK (pin 33) and BCK (pin 34) on the ADC to the pins 91 and 92 on the PS1 DSP, but the data line (pin 32) would go to this SPU CD input? If I went to straight to the SPU CD input instead of messing with the oversampled DSP lines, would I still use this set-up on the chip that you mentioned earlier:
S/M tied high for slave mode
BCLK and LRCLK connected to the same signals on the PSX audio DSP
DATA connected to the PSX audio DSP with the existing series termination resistor removed
MCLK wired to BCLK and quad speed mode selected (FS1=Hi, FS0=Lo).
DF pin pulled high (seems to be required in quad speed mode)
OWL0 and OWL1 tied high (force 16 bit mode, since that's what the original chip outputs)
Both FMT pins tied low for left-justified mode
or would I need to change something now that I won't be dealing with oversampling?
You will also likely (depending on the ADC chip) need a high-speed clock, which you can probably find on the existing audio DAC.
Where am I finding this high speed clock? Is it on the ADC chip or in the PS1 audio circuitry?

Once again, sorry if this is really basic, but I'm pretty new to this. Thanks again for all your help.
You do not have the required permissions to view the files attached to this post.

User avatar
Chandy
Interested PSXDEV User
Interested PSXDEV User
Posts: 9
Joined: Apr 24, 2017
I am a: Musician
Motto: Keep it crispy!
PlayStation Model: SCPH-7001

Post by Chandy » May 20th, 2017, 2:29 pm

OK SO

My electrical engineering friend suggested another, much simpler method of accomplishing the analog to digital conversion. I already own and perform with a mixer that supports USB audio out for use in home recording. It has several analog inputs and multiple ways to control the input volume, so I won't have to worry about adding a bunch of features to a custom PCB or soldering to that tiny chip. Seems a bit wasteful, but hey, that's what free samples are for. Anyone want it? It's all yours if you pay shipping.

So now the name of the game will be finding a way to convert the USB audio out from my mixer into the I2S serial output the PS1 is expecting. For reference, my mixer is the Behringer Xenyx 1202USB The mixer's USB 2.0 audio outputs at a 48 khz sample rate, I assume that will have to be converted to the 44.1 the PS1's SPU is expecting at some point in the process.

Any suggestions for how to proceed? It's possible I could use one of my spare Raspberry Pi 3's for this. It's got USB 2.0 in and supports I2S out, but I don't know how it handles sample rates and stuff like that. Also TriMesh, if you're still around (I don't blame you for noping out of here, you've basically been holding my hand through the entire process), I'm still curious about this:
The data that appears in the buffer at the start of the SPU RAM has already been downsampled to 44.1kHz before it's stored. It's possible that just feeding in 44.1kHz data directly into the SPU CD input would work, but I haven't attempted that.
Have you tested this yet/are you willing to test this? Thanks again for your help.

User avatar
TriMesh
Verified
PSX Aptitude
PSX Aptitude
Posts: 225
Joined: Dec 20, 2013
PlayStation Model: DTL-H1202
Location: Hong Kong

Post by TriMesh » May 23rd, 2017, 2:37 am

No, I'm afraid I haven't got around to testing that yet - just been kind of busy, I will see if I can do it some time this week.

The simplest check would probably be to just directly wire the data stream from the CD DSP to the SPU, entirely bypassing the interface chip. Obviously this is something you can only do on a PU-18 or earlier, since the CD-DSP to CD-Interface transport link is hidden on the later chipsets.

The raspberry pi should be able to do it, although converting precisely between two relatively close sample rates like that tends to be fairly calculation intensive.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests