Playstation 2 Serial Cable (EE)

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

Moderators: cheriff, Herben

adresd
Posts: 43
Joined: Sat Jan 17, 2004 11:32 am

Playstation 2 Serial Cable (EE)

Post by adresd »

This is a link to mrbrowns excellent document on installing a EE serial cable on your ps2.

http://www.0xd6.org/ps2-ee-sio.html

This allows direct serial communications to/from the EE processor, without the IOP needing to get involved. This obviously can be of great benefit when testing/debugging code that resets or affects the IOP, including USB and SMAP code.

The page contains all needed partlists and instructions.

PS2LIB contains sio routines for reading and writing using this cable.
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

I'm sure I'm not the only one who would be very interested in seeing some responses from people who have successfully (or unsuccessfully) built this cable and what their impressions are of the cable and it's usefulness.

Taking a soldiering iron to your PS2 and voiding what little warrenty you have left is much easier when there are positive testimonials ;)
Shoot Pixels Not People!
Makeshift Development
Guest

Post by Guest »

I have built the EE-sio successfully.

It came in very useful in testing/debugging making PS2LINK compatible with the new SMAP, and in making the SMAP driver compatible with the PS2DRV drivers for dev9.

This was mainly due to being able to output debug easily, and direct from ee, and across IOP resets.
IE at points where the SMAP was not initialised, and without having to have naplink loaded (for USB based debug).

I could certainly see many benefits in moving GDB and other similar tools across to use the SIO, this could remove quite a bit of bottleneck in the TCP stack and using the IOP processor for comms. It would also make it ee-only which would be a good thing in my opinion.

There are of course speed limits (i've only tested up to 115200), but it is stable and works reliably :)

If you are concerned about your warranty, may be worth checking how much is left.. If it is expired then that is not a concern.

If just considering it for debug and not a loader/shell type application, then you can omit the RX point, which is the VIA and the only slightly tricky one, the others are all quite easy and big (relatively).

In the end it all depends if you (individually) will have a use for the sio or not, a lot will not as the other methods will suffice for debug output, but in a few cases it can prove very useful.
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

Problem is when someone would want to use a serialized gdb stub, then we both RX and TX are needed :)
Kung VU
adresd
Posts: 43
Joined: Sat Jan 17, 2004 11:32 am

Post by adresd »

True, maybee i should have clarified..

for debug printf type output, RX isnt needed, for anything involving two way comms then of course it is.

My point really was, that most ppl seem scared by the VIA, but not the others, so they could hook up the others then add the RX when they finally really need that one (or they find someone to do it for them).

For those that arent bothered, installing both is the best option.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

That RX via is scary, but if you have the right tip for your soldering iron (I think I had an 8mm tip) and flux, then you should be able to manage it OK. Just take your time, you have plent of it :P.
AntiPasta
Posts: 10
Joined: Wed Jan 21, 2004 4:11 am
Contact:

Post by AntiPasta »

lo folks. First post on the new board 8)

Can the EE serial cable be used to upload code to the EE? Or is it only of use for debugging?
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Did you read adresd's (Guest above) post? Yes it can, if you solder the RX point.
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

AntiPasta wrote:lo folks. First post on the new board 8)

Can the EE serial cable be used to upload code to the EE? Or is it only of use for debugging?
Aslong as you have something running on EE to take care of it.
Kung VU
AntiPasta
Posts: 10
Joined: Wed Jan 21, 2004 4:11 am
Contact:

.

Post by AntiPasta »

Thanks, however I havent seen any serial cable loaders yet. Guess I'll stick to my network adapter :)
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

Why not dig in and make ps2link sio friendly ? :)
Kung VU
AntiPasta
Posts: 10
Joined: Wed Jan 21, 2004 4:11 am
Contact:

Post by AntiPasta »

heh heh. Better write a Hello World first :p
Herben
Posts: 107
Joined: Sun Jan 25, 2004 10:25 am

Post by Herben »

I've been using a serial cable for a few months now(not using mrbrown's instructions, but same concept) with a small debugger with good results. I don't have any problem soldering to that single via.
Guest

Post by Guest »

I just finished the serial cable last night and it woks great.
For people that don't want to solder to that VIA - there is a little resistor that sits 2mm up and is connected to that same VIA - just solder to the correct end and you're ready to roll.
I have a V9 PS2 and had to find the correct 3.3V - I used the DSM3 install diagram - and again no need to solder to that little resistor there, there is a whole pad that will do the job, including a big capacitor with plenty of surface.
Barbarian
Posts: 28
Joined: Tue Jan 27, 2004 4:31 am

Post by Barbarian »

I didn't realize I didn't log in and was still under Guest. The above post was me.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Have you tested RXD? The RXD via isn't connected to anything else, if you soldered to the resistor connected to a via, that wasn't it...
AntiPasta
Posts: 10
Joined: Wed Jan 21, 2004 4:11 am
Contact:

Post by AntiPasta »

Pardon my ignorance (again), but what is this 'via' that people keep talking about?
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

AntiPasta wrote:Pardon my ignorance (again), but what is this 'via' that people keep talking about?
A via is a small circle with a hole through it, used for connecting one layer of a circuit board to another. It is normally copper, and on the PS2 mainboard it's covered with lacquer (or some kind of coating).

The EE chip's RXD pin is exposed underneath the EE on a single via.
Barbarian
Posts: 28
Joined: Tue Jan 27, 2004 4:31 am

Post by Barbarian »

Mr Brown is correct. I just assumed the RXD is working cause the PS2 bootup printfs showed up, but that just proves the TXD is connected. What's the easiest way to test the RXD?
It seemed like it is connected to the little resistor. I'll try to verify this tonight and clarify the issue.
Master S

Bootloader

Post by Master S »

Any changes there is some kind of boot-loader in the ps2-bios, allowing to upload code to a unmodded PS2 (via the serial-cable ) ?
I doubt it, but it could be nice :)
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Barbarian wrote:Mr Brown is correct. I just assumed the RXD is working cause the PS2 bootup printfs showed up, but that just proves the TXD is connected. What's the easiest way to test the RXD?
It seemed like it is connected to the little resistor. I'll try to verify this tonight and clarify the issue.
http://supa.0xd6.org/ee_rxd_and_txd.jpg

Note that the circled RXD via is not connected to anything else, and that the resistor and via that it's connected to are above the lone RXD via.

There is code in CVS ps2lib that will allow you to input characters from SIO. The easiest way to test is to write a simple loop that reads characters and outputs them back via SIO.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Re: Bootloader

Post by mrbrown »

Master S wrote:Any changes there is some kind of boot-loader in the ps2-bios, allowing to upload code to a unmodded PS2 (via the serial-cable ) ?
I doubt it, but it could be nice :)
No. The consumer units only use the SIO port for outputting status/debug messages. If you turn on a flag, you can hit a bunch of keys in your terminal app to force the EE kernel to break into the DECI2 debugger. That flag isn't turned on on consumer units, and the kernel debugger has no connection to the IOP.
Barbarian
Posts: 28
Joined: Tue Jan 27, 2004 4:31 am

Post by Barbarian »

Note that the circled RXD via is not connected to anything else, and that the resistor and via that it's connected to are above the lone RXD via.

There is code in CVS ps2lib that will allow you to input characters from SIO. The easiest way to test is to write a simple loop that reads characters and outputs them back via SIO.
Hmm, that's funny but on my V9 PS2 I do have a track running diagonally for about 2mm to e very little resistor. My camera sucks otherwise I could try and take a picture.

As for ps2lib, unfortunately I'm still trying to find a method to upload code on the PS2 (unmodified yet, dms3 is way too complicated for me to solder, might have to send it somewhere).
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Barbarian
Posts: 28
Joined: Tue Jan 27, 2004 4:31 am

Post by Barbarian »

mrbrown wrote:Use the exploit?

http://supa.0xd6.org/ps2-independence.html
As I mentioned in the other thread. I have been trying to get my titles.db on the memory card unsuccessfully so far ...
I only have PS2 Linux running on unmodified v9 PS2, which so far has been defeating my attempts to get some homebrew code running.
The ultimate goal is to turn my ps2 into a usable dev kit, so I can prototype some code. The Linux stuff is just way too limiting and reboot time is horrible - I want to be able to move code easily between the real dev kit at work and my homebrew ps2 setup.
Barbarian
Posts: 28
Joined: Tue Jan 27, 2004 4:31 am

Post by Barbarian »

Ok, this is the best picture I can find of the RXD (PS2 v9):

http://www.modchip.com/images/v9_DMS3_3v3.jpg

The little resistor is not visible (just off the bottom of the picture), but if you look right and below of the TXD, you can see the RXD and a little track going down straight to the little resistor.
Now, I didn't physically verify if the connection is functional or not.
I'll get the multimer over the weekend and I'll do some measurements if I can't get some code running before that to verify the RXD is functional.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Barbarian wrote:Ok, this is the best picture I can find of the RXD (PS2 v9):

http://www.modchip.com/images/v9_DMS3_3v3.jpg

The little resistor is not visible (just off the bottom of the picture), but if you look right and below of the TXD, you can see the RXD and a little track going down straight to the little resistor.
Now, I didn't physically verify if the connection is functional or not.
I'll get the multimer over the weekend and I'll do some measurements if I can't get some code running before that to verify the RXD is functional.
Counting the square pads shown vertically in that diagram, we get:
1
2
3

4

Pad #4 is TXD, which you can follow to its via. IMMEDIATELY BELOW the TXD via is the RXD via, it is not to the right, it is directly below (again, seen in that diagram). In my V4, the RXD via is a bit further away (as seen in the image on my site), but it is still much closer to the TXD via, than the resistor/via you are referring to.

Notice that the via I'm referring to is by itself, it is not connected to any resistors or anything else.
Barbarian
Posts: 28
Joined: Tue Jan 27, 2004 4:31 am

Post by Barbarian »

I see, I was thinking of entirely different VIA. Apparently on v4 they are slightly different position that's why I thought it's the VIA diagonally to the TXD.

So, I stand corrected. The RXD VIA is not connected to any resistors and hence must be soldered directly.

Ouch, I have to open the PS2 again :(
nosense

Re: Bootloader

Post by nosense »

mrbrown wrote:
Master S wrote:Any changes there is some kind of boot-loader in the ps2-bios, allowing to upload code to a unmodded PS2 (via the serial-cable ) ?
I doubt it, but it could be nice :)
No. The consumer units only use the SIO port for outputting status/debug messages. If you turn on a flag, you can hit a bunch of keys in your terminal app to force the EE kernel to break into the DECI2 debugger. That flag isn't turned on on consumer units, and the kernel debugger has no connection to the IOP.
A flag? which flag where?
It's not quite true that there's no connection to the IOP, it's just that the IOP side needs to be written....
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

It is not connected as in there are no DECI2 IOP modules in consumer units, so, for startup (before your bootloader of choice takes over) there is no way to break into the kernel debugger, or use it in any useful way. Of course the IOP side would need to be written, but with GDB what would be the point in reversing/implementing all that crud?

The flag, check ps2lib/ee/include/sio.h:

#define SIO_IER 0x1000f120 /* Interrupt Enable Register. */
#define SIO_IER_ELSI 0x04 /* Enable Line Status Interrupt. */

Set that bit in that register and the first RX interrupt (buffer overrun if you send 9 chars) will break into the kernel debugger.
Post Reply