Page 1 of 2

PSX serial

Posted: December 31st, 2013, 7:16 pm
by AmiDog
Sorry for starting yet another thread related to PSX serial communication. However, I've been reading threads here, spent time googling, and I'm still somewhat confused. Have I gotten the following correct:

1. The PSX serial (link) port uses 3.3v TTL logic.
2. A lot of the popular Arduino boards has 3.3v TTL logic serial ports.
3. An of-the-shelf Arduino USB -> 3.3v serial cable could be used if I replace the connector with one from a link cable.

(I.e. a cable like the one here with 3.3v TTL levels should work. Or a bare pcb with 3.3v for that matter.)

Seems too easy. What have I missed?

Re: PSX serial

Posted: December 31st, 2013, 7:21 pm
by AmiDog
Cables with 3.3v TTL are available at ebay as well...

Re: PSX serial

Posted: December 31st, 2013, 9:05 pm
by Shendo
AmiDog wrote: Seems too easy. What have I missed?
Nothing. It is that easy.

At first I was using Arduino but then i got CH340 module from ebay.

Re: PSX serial

Posted: December 31st, 2013, 10:22 pm
by jman
As a matter of fact I need to do prepare myself this cable too.
I'll recap a bit what is needed, please correct and improve where needed, thanks!

Hardware:
- USB to RS232 CH340 converter with cable pins: http://www.ebay.it/itm/Replace-PL2303-U ... 4172b9fc2e
- PS serial link cable: http://www.ebay.com/itm/Sony-Playstatio ... 1070215197
- soldering tool and steady hand :-)

Connection
Three wires only
TX -> TX
RX -> RX
GND -> GND

software
PSXSERIAL 1.2

In my application
Include <libsio.h> and invoke AddSIO() to have echoing back of printf()
viewtopic.php?f=62&t=349#p2705

The final result should be this

EDIT: Would a PL2303 do the job?

Re: PSX serial

Posted: January 2nd, 2014, 6:41 am
by AmiDog
Shendo wrote:
AmiDog wrote: Seems too easy. What have I missed?
Nothing. It is that easy.

At first I was using Arduino but then i got CH340 module from ebay.
But does the CH340 use 3.3v TTL or 5v TTL? Most people selling these devices doesn't specify it clearly, atleast not clearly enough for me to understand, which is one of the reason I'm still not entirely sure which device to get since it has to be a 3.3v TTL version...

Re: PSX serial

Posted: January 2nd, 2014, 7:52 am
by jman
AmiDog wrote:But does the CH340 use 3.3v TTL or 5v TTL? Most people selling these devices doesn't specify it clearly, atleast not clearly enough for me to understand, which is one of the reason I'm still not entirely sure which device to get since it has to be a 3.3v TTL version...
If you look at the eBay link I posted, there's a photo of the back side of the converter and there's two power lines; one for 3.3V and one for 5V. I assume you can feed either voltage.

Re: PSX serial

Posted: January 2nd, 2014, 5:43 pm
by Shendo
@AmiDog: Yes. Newer adapters have a jumper to select the voltage.
I have an older one (only 5V) and I placed a resistor on each line. Works fine already for a couple of months.

@jman: PL2303 seems to be using RS-232 logic so you need max232 chips to make it work.
Rest of your post looks OK to me.

Re: PSX serial

Posted: January 2nd, 2014, 8:18 pm
by AmiDog
jman wrote:
AmiDog wrote:But does the CH340 use 3.3v TTL or 5v TTL? Most people selling these devices doesn't specify it clearly, atleast not clearly enough for me to understand, which is one of the reason I'm still not entirely sure which device to get since it has to be a 3.3v TTL version...
I you look at the eBay link I posted, there's a photo of the back side of the converter and there's two power lines; one for 3.3V and one for 5V. I assume you can feed either voltage.
That's output voltage, isn't it? The device is powered through USB and doesn't need any external power source, right? Still, if the TTL levels (i.e. the RX/TX levels) are 5v ones, you risk frying your PS1, they should be 3.3v. And there's no information about TTL levels for the CH340 in the ebay auction, thus I have to assume they are 5v (to be safe), and go looking for something else...

If you have a look at the ebay auction I linked above, you can see that it clearly states "TTL levels is 3.3V", thus that cable should be safe, assuming the auction description is accurate...

Re: PSX serial

Posted: January 2nd, 2014, 8:32 pm
by AmiDog
For example this adaptor has a jumper to switch between 3.3v and 5v I/O voltage, which I assume is the TTL voltage levels. As you can see, there are a gazillion different adapters out there, and I'm still struggling to understand which to get. I.e. one which does indeed use 3.3v TTL levels, and which does give best possible performance and stability with the PS1...

Re: PSX serial

Posted: January 3rd, 2014, 2:47 am
by Type 79

Re: PSX serial

Posted: January 5th, 2014, 5:18 am
by AmiDog
So the CH340 does indeed require a voltage level converter and thus isn't a good option. I ended up ordering this. It has 3.3v TTL written all over the place, and I like that the circuit board isn't exposed.

Now for the million dollar question. Should I connect TX-TX and RX-RX, or TX-RX and RX-TX. That is, are these adapters wired as null modems from the factory, or do I need to perform the swapping myself?

Also, should I connect all five wires, or is there an advantage to only connect three (i.e. RX, TX and ground)?

Re: PSX serial

Posted: January 5th, 2014, 7:40 am
by jman
@AmiDog: interesting find. If I undertand correctly that cable replace the need to get also one of those boards mentioned before.
Concerning the cabling, being that device an FTDI these instructions apply:
viewtopic.php?f=60&t=378&p=2712#p2712
If you know how to wire it, the FTDI only requires TX, RX and GND. Nothing else. TX goes to TX, and RX goes to RX respectively (because in my case the FTDI inverts the transmit lines).

Re: PSX serial

Posted: January 5th, 2014, 8:10 am
by Shendo
Yes as Jman said connect it in a null modem fashion. If you get it wrong don't worry, you won't fry anything.
Use Psy-Q sample from "serial/SIO/TUTO1" to do the echo test.

The reason we are using CH340 is because it simulates proper handshaking for the PC side.
You won't be able to connect all the lines as PS1 handshaking logic is inverted (except for PSone).
Yo will probably need to connect those extra CTS and RTS lines together and it should work the same.

Re: PSX serial

Posted: January 9th, 2014, 4:08 am
by Type 79
I made another serialcable, this time with fake Nokia CA-42 usb-to-serial cable form ebay. It has 3.3V TTL, so no need for level converter. Pcb has plastic cover, looks nice.
I used connector in middle, so I can use it with another 3.3V devices also.
Some weirdnes with drivers, on Win8.1 64bit I had to use driver version 3.2.0.0, couldn't get it to work with newer 3.4.xx version.
That CA-42 is based on Profilic PL-2303 -chip (or some similar fake).
Image

Re: PSX serial

Posted: January 9th, 2014, 5:38 am
by jman
@Type79: Nice! You have quite a lot of PS link cable for experiments :-)

By the way, I hope the adapter I've bought will work with my current dev setup: XP virtualized in VirtualBox onto a hosting Ubuntu Linux distro. I must send the builds from the virtual machine to an external Playstation.

Re: PSX serial

Posted: January 9th, 2014, 12:50 pm
by Shendo
@Type79: World you be interested in beta testing PS1CardLink with your cables?
If yes I can PM you necessary software. Thanks.

@jman: It should work without a problem. You can use either PSXSERIAL or original 16 bit upload app.
Also, protocol is publicly known so if there are any linux programmers willing to port it I can provide necessary info.

Re: PSX serial

Posted: January 10th, 2014, 11:23 am
by mrhaboobi
Ok so im going to ask some stupid questions which i hope to get some good answers ;)

1. Currently have Yaroze Cable ( the proper one ) connected to modded psx and via serial to usb cable connected to my PC. This appears to work, i can get a connection via sicons to my PSX. Great.

What i want to do

1. Use a PSOne ( as the bigger unit is a pain AND i have an LCD monitor for the PSONE ).
2. Add a USB port to my PSone ( ideally Mini USB )
3. Use USB port on PC
4 still use sicons and standard yaroze tools and debugging. ( cos i dont know any better ).

To do this i have watched the following topic

http://psx0.wordpress.com/2013/01/22/ps ... nk-serial/

One of the key points being that DTR and DSR pins are in use, aswell as the rest so that handshaking occurs.

Im confused as to while in these more simple cables that these pins are not used?

So please explain for me, and also i assume that using siocons i get feedback on my PC when using the debugger, what debugging etc is used for psyq? Ive yet to see someone explain how the environments should be set so that you can debug you code? have i missed a post?

Thanks

Re: PSX serial

Posted: January 12th, 2014, 8:57 am
by Shendo
We are using only transmit and receive lines because it's easy to do (no inverting),
adapters are cheap and software (PSXSERIAL) is written to only require those lines.

Plus with PSXSERIAL you can upload EXEs up to 1.8 MB opposed to 512 KB with siocons.

Tutorial you linked should work fine with siocons. I believe cable that AmiDog got should work fine also.

Re: PSX serial

Posted: January 13th, 2014, 6:18 am
by mrhaboobi
Shendo wrote:We are using only transmit and receive lines because it's easy to do (no inverting),
adapters are cheap and software (PSXSERIAL) is written to only require those lines.

Plus with PSXSERIAL you can upload EXEs up to 1.8 MB opposed to 512 KB with siocons.

Tutorial you linked should work fine with siocons. I believe cable that AmiDog got should work fine also.
So using PSXSerial and a simple cable, how are you doing debugging? what tools are you using

Re: PSX serial

Posted: January 13th, 2014, 11:21 am
by Shendo
No advanced debugging, printfs only. Software can be found here.