analog to digital on the PS2

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
offonoffoffonoff
Posts: 16
Joined: Sat Jun 10, 2006 5:48 am

analog to digital on the PS2

Post by offonoffoffonoff »

I've been dreaming of an A/D for the ps2, so that programs could take advantage of real time waveforms (oscilloscopes, samplers, dsp, whatever). I thought I'd throw the idea out and see what others know before i dream to much in the vacuum of my head.

I'm worried about baud rates if the only access ports are serial. a 22kHz audio waveform needs a sample rate of atleast 44khz and to send this serailly (with a start and stop bit, although i think the controller port is synchronous and doesnt need those), that is, all 10 bits, would need a baud of 440kHz, bare minimum. it would be nice to beable to go even faster than that, for oscilloscope applications or dsp. it would also be nice to still have space for a hard drive, cause data would pile up pretty fast.

are the hard drives fast enough for real time buffered audio storage?

well, i'm sure someone else has done some work on this subject. So, whats the word?

-010 010
| open source is the future |
| creativity will eclipse ego |
| but we knew this already |
User avatar
jbit
Site Admin
Posts: 293
Joined: Sat May 28, 2005 3:11 am
Location: København, Danmark
Contact:

Post by jbit »

You might be interested to know that there's almost definatly digital audio input on the dev9 bus (the thing the network adapter plugs into).
This will probably be capable of 48khz/16bit stereo input using normal i²s or something similar. This will probably just dump the output into a circular buffer on one of the SPU2 cores or something.
(The PS1 had this functionality, so we should be able to look at some old PS1 code)
I havn't confirmed this yet, but since I have recently acquired a logic analyzer I might look into this _AFTER_ the compo. :)

Buuuttt... why not just use a USB audio capture device? ps2sdk has it's very own working usbd now.
gorim
Posts: 18
Joined: Wed Sep 21, 2005 1:47 pm

Post by gorim »

Actually, I am pretty sure the dev9 bus doesn't have digital audio on it since it seems to be very much a type of PCMCIA or PCI variant bus with extra power for HDD.

However, the network adaptor that has a modem on it should be able to be configured for A/D. I have a data sheet on the chip someplace...

Oh, I'm baaaaaaaaack!
offonoffoffonoff
Posts: 16
Joined: Sat Jun 10, 2006 5:48 am

Post by offonoffoffonoff »

yea, I looked up the baud rate for usb on the internet (having no idea what it was) and must have looked up an extreemly erroneous source, and i thought it wouldn't have the band width to do it. of course, it does, even when you realize that the baud rate i suggested would be only for 8 bit audio and 16 is more desireable.

I didn't think it would be hard to just build a little A/D thing (you need what, an a/d, a parallel to asynchronous transmit thingy [i've seen 'em], and maybe a microcontroller to take care of the timing) the hardest part would be etching a board and finding a safe place for it. But a usb audio capture sounds lovely.

I don't think however that the modem serial port will work, unless they've built a hell of fast modem i dont know about. for 16 bit audio you'd need a baud of like 1M or something (the roughest estimate you even seen).

now for video (lets say a hd video recorder) you'd need a sample rate of 2 x 15k ntsc line scan rate x 2000 pixles per line = about 60 Mhz. and thats just for monochrome. I would need to do some research about color. This, clearly, would be harder.

more research
| open source is the future |
| creativity will eclipse ego |
| but we knew this already |
User avatar
jbit
Site Admin
Posts: 293
Joined: Sat May 28, 2005 3:11 am
Location: København, Danmark
Contact:

Post by jbit »

gorim wrote:Actually, I am pretty sure the dev9 bus doesn't have digital audio on it since it seems to be very much a type of PCMCIA or PCI variant bus with extra power for HDD.
We'll see...... I see dev9 more as a mix of the PS1 PIO port an PCMCIA. Welcome back by the way. :)
now for video
The eyetoy camera streams video pretty well (although not the highest quality in the world) over USB, and serveral USB TV tuners work fine too. The only other choice you have is FireWire which has been removed on the later ps2s.
USB is faster than anything you'll get using the Pad/memory card sockets, and faster than any other SIO ports laying around the system, and most modern micro controllers have USB on them these days anyway.
Firewire is of course, king of busses, it's 400mbit/sec (though I doubt you'll ever see that kinda speed using the IOP), and pretty much designed for video streaming, but doesn't exist on modern PS2s, so may not be what you're looking for.
Post Reply