Printf to UsbHostfs_pc or pcterm with psplink?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
gadget
Posts: 5
Joined: Sat Jul 09, 2005 12:54 pm
Contact:

Printf to UsbHostfs_pc or pcterm with psplink?

Post by gadget »

Is it possible to do a printf to either pcterm or the usbhostfc_pc app using the usb connection for PSPlink? I'm finding lots of good information on sio out throuh the serial post, but nothing that really mentions the usb connection for this behavior.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

If you read the manual of psplink then you will see there is a USB shell available (you enable it on the psp side then connect using pcterm to the localhost), that doesn't just do the shell of course it also does printfs from your app to your pc.
gadget
Posts: 5
Joined: Sat Jul 09, 2005 12:54 pm
Contact:

Post by gadget »

TyRaNiD wrote:If you read the manual of psplink then you will see there is a USB shell available (you enable it on the psp side then connect using pcterm to the localhost), that doesn't just do the shell of course it also does printfs from your app to your pc.
Actually, i've been using the usbShell to load and run code. The pdf file was the first place I went to in search of help. :) I have a printf as one of the first lines in my app, just printf("hello");. Should this appear in the PCTerm window or the usbHostFS? The app itself is running fine on the PSP.

Thanks for your help.
ginka
Posts: 15
Joined: Fri Feb 17, 2006 2:27 am

Post by ginka »

gadget wrote: I have a printf as one of the first lines in my app, just printf("hello");. Should this appear in the PCTerm window or the usbHostFS?
It will appear in the pcterm window. The very first line in main() in most of my apps is a printf(), and they always print out to the pcterm window.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Well if you have the usb shell running then printf is working as the shell itself uses printf to display the text on the screen. A common mistake (and one ill admit to have done :)) is if you have moved across code from an existing app which originally printed to the screen you still have the #define printf pspDebugScreenPrintf at the top, this would mean you are not actually calling the real printf. Check this first.
gadget
Posts: 5
Joined: Sat Jul 09, 2005 12:54 pm
Contact:

Post by gadget »

TyRaNiD wrote:Well if you have the usb shell running then printf is working as the shell itself uses printf to display the text on the screen. A common mistake (and one ill admit to have done :)) is if you have moved across code from an existing app which originally printed to the screen you still have the #define printf pspDebugScreenPrintf at the top, this would mean you are not actually calling the real printf. Check this first.
Thanks, I'll take a look at that. Great tool by the way :)
<!-- Coder grrl. -->
Post Reply