Page 1 of 1

scr_printf & printf, how to debug.

Posted: Fri Sep 03, 2004 10:34 pm
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.

Posted: Sat Sep 04, 2004 2:57 am
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.

Posted: Sat Sep 04, 2004 2:58 am
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.

Posted: Sat Sep 04, 2004 5:19 am
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?"...

Posted: Sat Sep 04, 2004 6:04 am
by mrbrown
KSI support is in CVS, in the ps2eth project.

There was a binary release of ps2eth some time ago.

Posted: Sat Sep 04, 2004 6:08 am
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.

Posted: Sat Sep 04, 2004 7:46 am
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...

Posted: Sat Sep 04, 2004 8:45 am
by mrbrown
Since ps2eth was first written by Oobles :P.

Posted: Sat Sep 04, 2004 8:48 am
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 ?

Posted: Sat Sep 04, 2004 11:48 am
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.

Posted: Sun Sep 05, 2004 4:28 pm
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.

Posted: Sun Sep 05, 2004 6:26 pm
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.