PSPLINK
Not true, make release does not build pcterm or usbhostfs_pc ;) But then again if you could build it to begin with it really isn't hard to build with cygwin. Of course you dont actually need pcterm, you could just use putty to connect to the psp, alternatively put those VC++ skills to work and write a windows based tool to do that same thing ;)
:p
but thanks i'll look into putty :)
but thanks i'll look into putty :)
My PSP games:
Boxy II: http://www.ghoti.nl/boxyii.php
Elementals: http://www.ghoti.nl/Elementals.php
Boxy II: http://www.ghoti.nl/boxyii.php
Elementals: http://www.ghoti.nl/Elementals.php
-
- Posts: 339
- Joined: Thu Sep 29, 2005 4:19 pm
TyRaNiD:
My application runs fine when I load and execute it with psplink, but when I load it from memstick it fails when it is supposed to load streaming media via wlan.
What can be the reason for this? Could it be my app chokes in the many fprintf(stdout, .....) lines which I have there for debugging purposes?
My application runs fine when I load and execute it with psplink, but when I load it from memstick it fails when it is supposed to load streaming media via wlan.
What can be the reason for this? Could it be my app chokes in the many fprintf(stdout, .....) lines which I have there for debugging purposes?
-
- Posts: 339
- Joined: Thu Sep 29, 2005 4:19 pm
Found it, turns out I'm not waiting long enough for the ringbuffer to be filled which then causes an assertion. With psplink the timing is different and the buffer is usually full enough.
Many thanks for your time and magnificent dev tool! I hope some time it'll support kernel app gdb debugging tho.
Many thanks for your time and magnificent dev tool! I hope some time it'll support kernel app gdb debugging tho.
Well what sort of kernel apps are we talking about ? If the whole app needs kernel mode I am not sure ill ever support such a configuration, it would require too many cludges (and gdb is fairly large, with kernel memory fairly limited). However if you only want to debug the hybrid case where you have a kernel module but the main threads run as user mode ones (think an example would be an SDL app) then all I should need to do is ensure the module can be referred which is a fairly simple trick to do as it is only that fact which prevents it being used. A full kernel mode app sitting in user space has the main issue that the addresses in kernel space do not tie in with the addresses as presented in the ELF.
When it comes down to it imo all apps should really now be user mode only with kernel based support prxes if kernel mode is needed (with exports so that the user mode portion can call into it). If you want me to add support for SDL like stuff then I can do so.
When it comes down to it imo all apps should really now be user mode only with kernel based support prxes if kernel mode is needed (with exports so that the user mode portion can call into it). If you want me to add support for SDL like stuff then I can do so.
-
- Posts: 339
- Joined: Thu Sep 29, 2005 4:19 pm
It's a PMP media player where I have integrated a VLC (videolan client) to support streaming media via wifi. Yes, I can finally watch live tv on PSP without the need for additional hw :)TyRaNiD wrote:Well what sort of kernel apps are we talking about ?
The app contains ME code, afaik that's the main reason why it runs in kernel mode. I don't know other reasons why the app must run in kernel mode.
uhm how exactly do i use putty to connect to my psp? i use it through USB not wifi since i have no wifi
(or maybe someone can post the pcterm program :D)
(or maybe someone can post the pcterm program :D)
My PSP games:
Boxy II: http://www.ghoti.nl/boxyii.php
Elementals: http://www.ghoti.nl/Elementals.php
Boxy II: http://www.ghoti.nl/boxyii.php
Elementals: http://www.ghoti.nl/Elementals.php
ip 127.0.0.1 port 10000 select raw and press enter
Last edited by weltall on Fri Jun 09, 2006 2:48 pm, edited 1 time in total.
here is pcterm binary executable for windows just in case
http://www.yousendit.com/transfer.php?a ... A41D9D30D6
http://www.yousendit.com/transfer.php?a ... A41D9D30D6
10011011 00101010 11010111 10001001 10111010
Hi TyRaNiD,
The original usbhostfs_pc has a compatibility issue with some homebrews, such as neogeocd. Some homebrews rely on the failed return code when trying to open a directory as normal file. Example, using sceIoOpen on a directory file will have a negative return code in PSP. However, Linux will return a valid file descriptor and this will crash some of the homebrews. I've made a quick fix in usbhostfs_pc open_file() function as follows. Maybe you'll want to add this or similar handling in usbhostfs_pc. Thanks!
PS: I noticed the lastest version # of PSPLINK is now 0.9g. However, the version that I downloaded 2 weeks ago was 0.9h. Is there something wrong with the version #? Isn't 0.9h newer than 0.9g? I'm just curious.
The original usbhostfs_pc has a compatibility issue with some homebrews, such as neogeocd. Some homebrews rely on the failed return code when trying to open a directory as normal file. Example, using sceIoOpen on a directory file will have a negative return code in PSP. However, Linux will return a valid file descriptor and this will crash some of the homebrews. I've made a quick fix in usbhostfs_pc open_file() function as follows. Maybe you'll want to add this or similar handling in usbhostfs_pc. Thanks!
PS: I noticed the lastest version # of PSPLINK is now 0.9g. However, the version that I downloaded 2 weeks ago was 0.9h. Is there something wrong with the version #? Isn't 0.9h newer than 0.9g? I'm just curious.
Code: Select all
if(mode & PSP_O_EXCL)
{
real_mode |= O_EXCL;
}
// Added return error when trying to open directory as a file
struct stat filestat;
int dir = 0;
if (stat(fullpath, &filestat) == 0) {
if (S_ISDIR(filestat.st_mode))
dir = 1;
}
if (!dir)
fd = open(fullpath, real_mode, mask & ~0111);
else
fd = -1;
if(fd >= 0)
Well there are always going to be incompatibilities between the host driver and the ms driver primarily due to their use of different underlying file systems. Probably it would be better behaviour to not open directories with the file open call, ironically though I found out the other day that calling sceIoDopen on a file on the ms actually works which is something the host driver does not do so that is the same thing in reverse (and never will :P)
Ill fix it when I also fix the return codes, they really should be set to 0x8001XXXX where XXXX is the errno code otherwise it doesn't work correctly in newlib, not that errno is really ever of a concern to most devs.
And I wondered when someone would notice that I screwed up the version number on the latest psplink, haven't been arsed to change it ;)
Ill fix it when I also fix the return codes, they really should be set to 0x8001XXXX where XXXX is the errno code otherwise it doesn't work correctly in newlib, not that errno is really ever of a concern to most devs.
And I wondered when someone would notice that I screwed up the version number on the latest psplink, haven't been arsed to change it ;)
-
- Posts: 339
- Joined: Thu Sep 29, 2005 4:19 pm
dbox2 -> neutrinoTV (VLC) -> PSP
Works great for both live TV and playback of recorded TS files. Actually you can play any format supported by VLC/ffmpeg. Dreambox will work even better for those DVB-S channels broadcasting close to 10mb (dbox2 has this 10mb nic bottleneck).
I'm streaming with 900kbs DIV3 video, 2*64kb mp3 audio and 20fps. For me quality is more than acceptable, I find it very good.
I'll release it soon. Just have to get rid of an annoying ffmpeg bug in the ogg container code.
And if psplink wouldn't exist it would probably never be released :)
Works great for both live TV and playback of recorded TS files. Actually you can play any format supported by VLC/ffmpeg. Dreambox will work even better for those DVB-S channels broadcasting close to 10mb (dbox2 has this 10mb nic bottleneck).
I'm streaming with 900kbs DIV3 video, 2*64kb mp3 audio and 20fps. For me quality is more than acceptable, I find it very good.
I'll release it soon. Just have to get rid of an annoying ffmpeg bug in the ogg container code.
And if psplink wouldn't exist it would probably never be released :)
-
- Posts: 339
- Joined: Thu Sep 29, 2005 4:19 pm
This is my first time using psplink (Only used windows debuggers) and I'm not quite sure how to debug the following...
Code: Select all
host0:/> Exception - FPU Exception (IUZ)
Thread ID - 0x0280E72B
Th Name - user_main
Module ID - 0x039A2D1F
Mod Name - OpenBOR
EPC - 0x0890FAE8
Cause - 0x0000003C
BadVAddr - 0x00000000
Status - 0x60008613
zr:0x00000000 at:0x0008FF00 v0:0x08980000 v1:0x092FBB50
a0:0x00000000 a1:0x08990000 a2:0x00000003 a3:0x08B33C54
t0:0x08F92030 t1:0x00000000 t2:0x09370B90 t3:0x0000000C
t4:0x00000004 t5:0x408B9800 t6:0x00000000 t7:0x00000000
s0:0x08F92030 s1:0x08B30000 s2:0x08B30000 s3:0xFFFFFFFF
s4:0x08990000 s5:0x08990000 s6:0x08B30000 s7:0x08990000
t8:0x00000000 t9:0x01BECAAE k0:0x09FFEF00 k1:0x00000000
gp:0x08993870 sp:0x09FFEB68 fp:0xFFFFFFE0 ra:0x08910024
using psp-addr2line is a quick way:
psp-addr2line --exe=myprogram.elf
(using the elf file you are running on psplink)
Then just enter the memory addresses and it will track down the lines (if you built with debug enabled, -g)
The addresses you want to search are the EPC which should be the line it crashed on, and the RA (return address) which should be the line that called the function that contains the crash.
so in your case:
Hope that helps.
psp-addr2line --exe=myprogram.elf
(using the elf file you are running on psplink)
Then just enter the memory addresses and it will track down the lines (if you built with debug enabled, -g)
The addresses you want to search are the EPC which should be the line it crashed on, and the RA (return address) which should be the line that called the function that contains the crash.
so in your case:
Code: Select all
psp-addr2line --exe=openbor.elf
0x0890FAE8
something.c: someline << output
0x08910024
something.c: someline << output
-
- Posts: 339
- Joined: Thu Sep 29, 2005 4:19 pm
Insight+GDB issues
First of all I want to thank Tyranid for making PSPLink. An awesome tool! Thank you!!
I little info about my setup.. I am using the latest PSPSDK running under Cygwin on a WinXP box.
I have PSPLink working fine using the USB method. I then wanted to try out Insight+GDB, I downloaded the sources and applied the patch.
During compile I get interesting warnings like below:
gcc -c -g -O2 -Wall -Wconversion -I"../.././tcl/win/../generic" -I"../.././tcl
/win" -mnop-fun-dllimport -mwin32 -DHAVE_NO_SEH=1 -DEXCEPTION_DISPOSITION=int
-DBUILD_tcl "../.././tcl/win/../generic/tclPosixStr.c" -o tclPosixStr.o
In file included from ../.././tcl/win/../generic/../win/tclWinPort.h:72,
from ../.././tcl/win/../generic/tclPort.h:22,
from ../.././tcl/win/../generic/tclPosixStr.c:18:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:103:2: w
arning: #warning "fd_set and associated macros have been defined in sys/types.
This may cause runtime problems with W32 sockets"
It's the warning in bold above that concerns me. I get this with several source files but the warning is identical so I have only included one here.
Everything actually compiles and I end up with both a psp-gdb.exe and a psp-insight.exe.
When I run psp-gdb.exe with my ELF file as an argument it starts up just fine.
I then do the "target remote:10001" command and this is what I get:
(gdb) target remote:10001
Remote debugging using :10001
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Malformed response to offset query, timeout
(gdb)
The usbhostfs_pc.exe window shows me:
Accepting gdb connection from 127.0.0.1
I am assuming (I could be wrong) that the reason I am getting the packet errors is due to the compiler warning about the W32 sockets.
Does anybody have any idea of how to fix this?
Any help is greatly appreciated and thanks in advance!
- gr8dane
EDIT:
I solved the problem above. Getting it to compile without the W32 sockets warning was a matter of adding -D__USE_W32_SOCKETS to the tcl and tk makefiles.
As for the packet error... Well, lets just say it was user error :-)
Tyranid you rock! Should we ever meet the drinks will be on me.
I little info about my setup.. I am using the latest PSPSDK running under Cygwin on a WinXP box.
I have PSPLink working fine using the USB method. I then wanted to try out Insight+GDB, I downloaded the sources and applied the patch.
During compile I get interesting warnings like below:
gcc -c -g -O2 -Wall -Wconversion -I"../.././tcl/win/../generic" -I"../.././tcl
/win" -mnop-fun-dllimport -mwin32 -DHAVE_NO_SEH=1 -DEXCEPTION_DISPOSITION=int
-DBUILD_tcl "../.././tcl/win/../generic/tclPosixStr.c" -o tclPosixStr.o
In file included from ../.././tcl/win/../generic/../win/tclWinPort.h:72,
from ../.././tcl/win/../generic/tclPort.h:22,
from ../.././tcl/win/../generic/tclPosixStr.c:18:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:103:2: w
arning: #warning "fd_set and associated macros have been defined in sys/types.
This may cause runtime problems with W32 sockets"
It's the warning in bold above that concerns me. I get this with several source files but the warning is identical so I have only included one here.
Everything actually compiles and I end up with both a psp-gdb.exe and a psp-insight.exe.
When I run psp-gdb.exe with my ELF file as an argument it starts up just fine.
I then do the "target remote:10001" command and this is what I get:
(gdb) target remote:10001
Remote debugging using :10001
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Malformed response to offset query, timeout
(gdb)
The usbhostfs_pc.exe window shows me:
Accepting gdb connection from 127.0.0.1
I am assuming (I could be wrong) that the reason I am getting the packet errors is due to the compiler warning about the W32 sockets.
Does anybody have any idea of how to fix this?
Any help is greatly appreciated and thanks in advance!
- gr8dane
EDIT:
I solved the problem above. Getting it to compile without the W32 sockets warning was a matter of adding -D__USE_W32_SOCKETS to the tcl and tk makefiles.
As for the packet error... Well, lets just say it was user error :-)
Tyranid you rock! Should we ever meet the drinks will be on me.
Just got my 1.5 PSP (Woohooo!), can someone tell me please if there are prebuilt verions of psplink? Specifically the pc side for windows? I can't install cygwin on my box(not enough hd space) so I'd appreciate it if someone had a link.
edit-Ok I tried to install cyngwin and to my surprise it installed in less than ten minutes. And took up little diskspace. (I remember it taking hours??)
but when I ran the pcterm make file, this is all she sung,
Did I download an old/incompatible cygwin? (I couldn't find a download link on the main site. Also searched my cygwin dir but no CC1 to be found.
edit-Ok I tried to install cyngwin and to my surprise it installed in less than ten minutes. And took up little diskspace. (I remember it taking hours??)
but when I ran the pcterm make file, this is all she sung,
Code: Select all
C:\pspdev\psplink_1.0\pc\pcterm>make
gcc -Wall -g -DSERIAL_SUPPORT -c -o pcterm.o pcterm.c
gcc: installation problem, cannot exec 'cc1': No such file or directory
make: *** [pcterm.o] Error 1
Cygwin must not include all the dev stuff... Or... please tell me you are in a cygwin bash shell and not executing that crap from a windows command prompt? ...
Shoot Pixels Not People!
Makeshift Development
Makeshift Development
Command prompt. But the cc1 .exe is nowhere to be found in the cygwin dir so I fail to see how a change of shell will magically make it work :) But I will try, once I work out what a bash shell is.Drakonite wrote:Cygwin must not include all the dev stuff... Or... please tell me you are in a cygwin bash shell and not executing that crap from a windows command prompt? ...
Any idea why the installation isn't installing the C tools?
-
Could someone please e-mail the pc windows tool they've built?
AntonyCoder@btinternet.com I'd really appreciate, I hate having to reboot my psp every time I make a build. Thanks.