| View previous topic :: View next topic |
| Author |
Message |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Wed May 31, 2006 10:16 pm Post subject: pspSdkGetK1 "bug" |
|
|
I don't know if it's really a bug or if it's done on purpose, anyways i comment it here.
I can use the pspSdkSetK1 without problems, but with pspSdkGetK1 i always get a undefined reference in the linker.
Looking at the sources of k1set.S, the problem is easy to find:
| Code: |
set noreorder
.set noat
.global pspSdkSetK1
.ent pspSdkSetK1
pspSdkSetK1:
move $v0, $k1
jr $ra
move $k1, $a0
.end pspSdkSetK1
.global pspSdkGetK1
.ent pspSdkGetK1
jr $ra
move $v0, $k1
.end pspSdkGetK1
|
The label "pspSdkGetK1:" is missing.
It should be:
| Code: |
set noreorder
.set noat
.global pspSdkSetK1
.ent pspSdkSetK1
pspSdkSetK1:
move $v0, $k1
jr $ra
move $k1, $a0
.end pspSdkSetK1
.global pspSdkGetK1
.ent pspSdkGetK1
pspSdkGetK1: ### Label missing ###
jr $ra
move $v0, $k1
.end pspSdkGetK1
|
|
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Thu Jun 01, 2006 2:20 am Post subject: |
|
|
| Aye a bug me thinks, I probably threw that into pspsdk and never bothered to actually check it worked cause psplink has its own version. Of course in general it doesn't get used alot and when it does you probably more likely to abitrarily set it to 0 and get the return from SetK1 anyway. Ill fix it ;) |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Thu Jun 01, 2006 6:56 am Post subject: |
|
|
| TyRaNiD wrote: | | Aye a bug me thinks, I probably threw that into pspsdk and never bothered to actually check it worked cause psplink has its own version. Of course in general it doesn't get used alot and when it does you probably more likely to abitrarily set it to 0 and get the return from SetK1 anyway. Ill fix it ;) |
Well, i'm actually doing the contrary, setting the k1 to 1 :D
I know it's something unusual, but it's the only way i've found to use the net functions from a kernel prx.
Anyways, the getK1 is not essential, i just tried to use it for doing some debug and i found that bug. |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Thu Jun 01, 2006 7:37 am Post subject: |
|
|
| Really setting it to 1 makes a difference ? For one thing user threads I think are indicated by 0x10 and as the net libs are direct link and not through syscalls it shouldn't make a difference anyway. Still who knows ;) |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Thu Jun 01, 2006 8:31 am Post subject: |
|
|
Ok i get confused. i am experiencing weirds thing. Some things that didn't work before (crash)are working now.
I think i need some holidays :) |
|
| Back to top |
|
 |
|