scr_printf & printf, how to debug.

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

Moderators: cheriff, Herben

Post Reply
anhanguera
Posts: 31
Joined: Thu Aug 26, 2004 4:20 pm

scr_printf & printf, how to debug.

Post by anhanguera »

I am very new to ps2 development, and I do need to debug an .irx file. I do not have a prolific cable or smap eth adaptor. I have a klsi eth adaptor, and need to debug it. but I could not manage to print anything.. I cannot manage to use scr_printf inside an irx (iop compiled) .irx file. and printf is useless for anyone that does not have a usbtousb cable I thing.

can anyone give me a clue, how to use printf or scr_printf or something else.

alper.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

You need to add your own custom printf() routine that outputs over the ethernet adapter.

Since the source is there it should be relatively easy to do. Just use UDP broadcast and have netcat or something listening on that port.
"He was warned..."
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Just look at how ps2link does it's tty driver - you could just use that if you're using ps2ip on top of the ksi adapter.
"He was warned..."
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Won't he need full drivers for his usb ethernet adapter ? I guess his next question would be "How do I handle my ksi adapter?"...
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

KSI support is in CVS, in the ps2eth project.

There was a binary release of ps2eth some time ago.
"He was warned..."
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

mrbrown wrote:KSI support is in CVS, in the ps2eth project.

There was a binary release of ps2eth some time ago.
Make that KLSI, which is what he said, and I'm not so sure about that binary release since I can't find it. But it looks like he has no trouble building IRXs anyways.
"He was warned..."
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Ah ? I was convinced there was no support for it. Good thing to know. Since when does that driver exists ? Well, just beeing curious...
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Since ps2eth was first written by Oobles :P.
"He was warned..."
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Now, my (dumb) question is: is this driver and the smap driver (more or less) swappable ? I mean, could ps2link work with it ? Or would it require huge changes in the whole design ?
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

The KLSI driver hasn't been maintained in awhile, but AFAIK if you change ps2link to load the KLSI driver instead, it should just work. The ps2smap driver used the KLSI driver as a model to interact with ps2ip.
"He was warned..."
Oobles
Site Admin
Posts: 347
Joined: Sat Jan 17, 2004 9:49 am
Location: Melbourne, Australia
Contact:

Post by Oobles »

The KSLI driver was the first driver I used to develop ps2ip. After I found an SMAP I dropped it. I don't know the current state of the driver. If it is working, it should be possible to just replace the smap driver in ps2link with it and ps2link will work with it. Intheory you could load both smap and klsi up together and make a ps2 firewall. :)

To answer the original question. The best way to debug the driver is using Naplink and a pl2301 cable or using the Serial IO as provided by mrbrown,etc. I wouldn't bother trying to debug with scr_printf and burning disks, unless you want to spend more dollars on wasted disks than a pl2301 cable or Serial IO installation.

Oobles.
anhanguera
Posts: 31
Joined: Thu Aug 26, 2004 4:20 pm

Post by anhanguera »

Oobles wrote:To answer the original question. The best way to debug the driver is using Naplink and a pl2301 cable or using the Serial IO as provided by mrbrown,etc. I wouldn't bother trying to debug with scr_printf and burning disks, unless you want to spend more dollars on wasted disks than a pl2301 cable or Serial IO installation.
Oobles.
I really know that using naplink is the best solution but believe or not I could not find any usb cable that uses prolific chip here in Turkey/Istanbul. And I am not really able to do such thing like mr.brown s serial io. I do not know how to weld ;)))

anyway, I should look for prolific cable on the internet i think.

alper.
Post Reply