-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Your Name
committed
Jan 5, 2024
1 parent
cfc7529
commit f0934f6
Showing
7 changed files
with
89 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Stub Libraries | ||
> 推荐阅读 | ||
> | ||
> `uofw` Github wiki https://github.com/uofw/uofw/wiki | ||
> | ||
> PSP Modules, Exports, Imports and Patches https://uofw.github.io/upspd/docs/ | ||
当我们之前链接第三方库时,都是直接与是真正包含代码的库链接。 | ||
|
||
现在我们希望在程序运行时动态地载入其他模块,依然可以使用静态链接,不过链接的是只包含函数接口和其空实现的存根库(`stub library`)。通过PSPSDK提供给我们的加载模块的函数,我们可以实现模块运行时的加载。 | ||
|
||
> Use other modules in your own module Dynamically. | ||
## PSPSDK的库从哪里来? | ||
|
||
事实上,我们目前为止链接的所有PSPSDK中内置库都是`Stub Libraries`。 | ||
|
||
历史上,人们设法从索尼提供的官方固件升级包中提取出许多系统级`prx`模块,接着进行如下操作: | ||
|
||
1. 从这些模块提取得到导出表(`Export Table`),了解其中包含的符号和位置,并利用他们生成存根库。 | ||
> ## 导出表(Export Table) | ||
> `prx`文件的导出表可以类比Windows PE文件(如DLL文件)中的导出表。 | ||
> | ||
>导出表包含了一个模块显式向其他模块公开供其使用的符号列表。 | ||
> | ||
>导出表的关键组成部分包括: | ||
> | ||
>+ 导出的符号: 可以被其他模块访问和使用的函数、变量或资源的名称和地址。 | ||
> | ||
>+ 序数号码(`NID`): 为每个导出的符号分配一个序数号码。序数号码提供了另一种引用导出符号的方式,特别是当名称没有被公开时。 | ||
> | ||
>+ 地址或指针: 指示模块内导出函数或数据的位置的指针或地址。 | ||
得到了存根库后,我们理论上已经可以借此调用其中的函数了,但导出的函数若不知其含义,显然无从使用;且导出的函数名均以`sceMgr_driver_949CAC22`这样`库名+NID`的形式命名,不利于开发使用。 | ||
|
||
2. 对这些模块进行逆向工程,得到其机器语言实现,通过对汇编代码的研究理解其使用方法,以此整理出描述函数接口的头文件并修正导出的函数名。 | ||
|
||
通过这种方法,得到包含头文件和存根库的整个PSPSDK开发环境。 | ||
|
||
目前PSPSDK中有一些库的头文件中函数名仍带有奇怪的字符串,这实际上就是直接从导出表中得到的函数的`NID`,由于彼时尚不理解其具体实现,没有办法为其取名。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 进行网络请求 | ||
|
||
## PSP如何连接网络 | ||
### PSP支持的`Wi-Fi`协议 | ||
802.11b | ||
### 在应用中连接网络 | ||
弹出弹窗,选择并连接 | ||
|
||
## 唤起网络连接弹窗 Network Dialog in PSPSDK | ||
|
||
## `socket&http lib` in PSPSDK | ||
|
||
## `curl` as PSPDEV package (enable https?) |