psp开发教程-----第一课 安装开发环境

  Lesson 01  Setting up the Development Environment
第一
  安装 开发环
How to get the tool chain and PSP SDK up and running with CYGWIN on a windows machine. The complete newbie's guide.
如何得到工具
和PSP SDK 包并且在window 境上运行。一个完整的新手手册
This is the first installment in a series of tutorials focussed on getting a novice programmer well
on his way to developing his own home brew applications for the Sony Playstation Portable (PSP).
于那些想要自己 开发 PSP程序的一系列教程的第一
If you are reading this, congratulations, you have hurdled one of the biggest obstacles for a programmer.
如果你正在
读这 篇文章,那 你, 于一个程序 你已 了一个最大的障碍。
Likely the most difficult thing about programming is getting started. Well, by starting to read this tutorial, you are well on your way.
可能写程序的更困
的事情正在 始。好,在 读这 篇教程的 始,你正在走你自己的路。
The first step to creating your own program is getting your environment set up.
建你自己的程序的第一 是安装你的 开发环 境。
This environment is how you will convert the source code you write into a
compiled file formatted for execution on you PSP.
开发环 境是能 将你写的源代 码转 成一个 编译过 的文件供PSP运行。
We will be setting up two important tools on our system.
将在你的系 上安装两个重要的工具。
The first of these tools is called CYGWIN. It is basically a Linux emulator for windows.
第一个工具是‘CYGWIN’。他基本上是一个windows上的linux虚 机。
It will create a simulated Linux environment on your computer so that you can run native Linux applications.
他将在你的 电脑 里建立一个虚 Linux 境,来 你能 运行Linux程序。
This may sound intimidating, but don't worry, it's very simple to use.
听起来很 ,但是没 系,他用起来很容易。
The second thing you'll need is the toolchain. This is the key to programming for the PSP.
第二件事我 需要工具 开发 PSP程序的 关键
It will set up everything you need, from header files, to libraries, to the compiler itself, to the sample programs.
他将安装你需要的所有 西,从 文件,到 文件,到 编译 器,到 简单 的程序。
Once you have this installed, you will be nearly ready to create your first program.
但你安装了
个,你就离准 备创 建第一个程序不 了。
Now for the part we've all been waiting for: the installation.
一部分我 就等着安装了。
The first step is to install CYGWIN. You can download the install file from the CYGWIN website here.
第一 是安装CYGWIN。你可以从CYGWIN网站下在 个安装文件。
After it has finished downloading, open up the executable.
完成下
后,打 行文件。
You will see a splash screen; click next. Now you will be asked what you want to do.
你将会看 一个 出窗口;点下一 在你将会被 询问 “你想做什 ”。
Select the default option of "Install from Internet," and hit the next button.
选择 认选项 “INSTALL FROM INTERNET”,并按“下一 ”按
 
Now you will be prompted where you want to install CYGWIN.
在你将被提示你想在哪安装 件。
Change the install directory to "C:/cygwin" if it is not set as such already (where C: is your local hard drive).
把安装目
"C:/cygwin" ,如果他默 的不是 个目
Leave the other options set to their defaults and hit next.
剩下的 选项 都用它默 置并按Next按
Now you will be asked where you want to save the installation files.
在你将会被 你想把安装文件存在哪。
What you select here doesn't really matter, but I suggest putting them someplacewhere you will be able to find them and delete them after the installation is complete.
选择 都是无所 的。但是我建 你把他 放在你安装后也能很方便找到和 除的地方。
Once you have selected a suitable location, click next.
当你
选择 好合适的地方 ,按next
The next screen will ask about your network settings, if you don't use a proxy (or don't know what a proxy is), just click next on this screen.
下一个界面将会
置网 络设 置,如果你不用代理,只要按next 就行了。
If it doesn't work, go back and try letting it use Internet Explorer's settings.
如果不行,那就返回网
络设 置哪一 ,并 试试 用IE的 置来 置。
Now you should be presented with a list of servers to download the installation files from.
在你将看到一个可以当安装文件的服 器的列表。
Any one of these will do, so select one, and then click on next.
中的任何一个都是可以下的,所以 选择 一个并按next
Now it will download the package list, this could take a few minutes, depending on your connection speed.
在他将会下在 个包裹表, 个需要花 几分 时间 短是要依你的网速定的。
Once it is done, scroll down to "devel" and click on where it says "default" so that it becomes "install."
在他完成后会有一个安装列表,在列表中找到"devel"并点 "default" 单词 使他 成"install"。
Then scroll down to "web," click the "+" next to it, scroll down and set "wget" to "install."
下卷列表找到"web" ,点 "+" ,下卷找到"wget" ,并 "install"。
When you are finished, click next. CYGWIN will now download and install the selected packages.
当我 完成 按next。CYGWIN将下 并安装 选择 的包裹。
This will quite possibly take a while, so go watch a TV show or do some web surfing while you wait.
将会花一段 时间 ,所以去看看 电视 上上网吧。
After the install has finished, you are ready to install the toolchain.
安装完成后,你要准
安装toolchain。
Now, we are going to install the toolchain into our CYGWIN environment.
在我 来安装toolchain到我 的CYGWIN 境。
To set up our environment, we will need to run CYGWIN first.
安装我
境,我 首先需要运行CYGWIN。
So, either from the start menu, or from "C:/cygwin," run a CYGWIN bash shell (cygwin.bat).This will open up a command line.
所以运行CYGWIN程序。
将会打 一个命令行。
Once you see "
yourusername@yourcomputername ~" you may close the window; your environment has successfully set up.
当你看
" yourusername@yourcomputername ~" 你可以 关闭 WINDOWS;你的 境已 安装成功。
To download the latest toolchain, go here.
最后的toolchain,找到他。
It should be at the very bottom of the page.
他很可能在
面的最低下。
At the time of writing, the latest toolchain file is dated 20051202. Download this file.
最后一个toolchain文件是20051202写的,下
载这 个文件。
When it is finished, use Winrar to extract the file contents to "C:/cygwin/home/user," where "user" is your username.
完成
,用winrar去加 压这 个文件内容到"C:/cygwin/home/user,","user" 是你的用 名。
Now it's time to actually install, so open up your CYGWIN bash shell again.
真正 始安装了,所以再次打 CYGWIN程序。
Now it's time to introduce you to the Linux command line.
始介 Linux命令行。
You should see a "$" at the beginning of the line.
应该 在行首看到"$"字符。
This means that you are running the shell in user mode, as opposed to root (or admin) mode.
表示你正在用 模式下运行, 好和root模式相反。
This is of little importance in CYGWIN, but if you ever use an actual Linux command line, this is an important thing to notice.
看起来好像并不是很重要,但是如果你以前用 真正的Linux命令行, 便是一件很 得注意的事了。
We now need to change directories to where we extracted the toolchain.
们现 在需要改 toolchain后的目
Type "ls" in the bash shell; this stands for list.
在命令窗口里
入"ls"; 会列出列表。
It will give us an output of all of the files in our current directory (this is similar to "dir" in a Windows commandline).
他将列出当前目
下的所有文件。 很像在windows窗口下 行"dir"。
Now you should see a folder named "psptoolchain," this is where we want to go.
在我 会看到一个"psptoolchain"文件 就是我 要找的。
So type "cd psptoolchain" and hit enter.
入"cd psptoolchain"并按回
CD stands for change directory, and it will (obviously) switch the current operating directory).
个命令将会 你切 到另外一个指定的目
Now do a quick "ls" again, and you will see the files in this folder.
在再做一次"ls"操作,你会看到 个文件 中的内容。
The one that we want is "toolchain.sh" To execute this file, type "./toolchain.sh" and hit enter.
行"toolchain.sh" 个程序。
In Linux, "." means the current directory, and ".." means the parent directory, so this command means to execute "toolchain.sh" which is in the current directory.
在Linux中"."表示当前文件
,".."表示父目 ,所以 条指令表示 行当前文件 中的"toolchain.sh"
The toolchain.sh script will do the rest, for you. This can take up to several hours, depending on the specifications of your machine.
toolchain.sh脚本的
于你来 是一 休息, 将花 几个小 时间
For a frame of reference, my 3.0GHz Pentium 4 took about three hours to run the entire script, so be patient.
,我的Pentium4 3.0G的 理器花了3个小 ,所以清耐心
Some people have reported it taking over 24 hours, but this is a little overkill.
有些人曾
经说 他花了超 24小 ,但是 是很极端的情况。
Go take a break and come back in a few hours.
休息一下,几小
后再回来。
Or better yet,let it go while you sleep and when you wake up in the morning you should be ready for the next step.
或者
他在你睡 行,当你早上醒来 ,你已 可以做下一 了。
Now for the last step. We have to tell CYGWIN where it can find the PSPSDK (which the toolchain just installed) and the toolchain.
在到最后一 了。我 比告 CYGWIN他可以到哪里PSPSDK和toolchain。
To do this, we need to change "C:/cygwin/cygwin.bat" to include the paths.
要做
件事,我 需要改 "C:/cygwin/cygwin.bat"的包含路径。
So, close CYGWIN, and navigate Explorer to "C:/cygwin" and right click on cygwin.bat.
所以
关闭 CYGWIN,并 入"C:/cygwin"文件 ,在cygwin.bat文件上点
Select "Edit" and a Notepad window should appear with the following:
选择 "Edit", 这时 Notepad 将会 示如下:
@echo off
C:
chdir C:/cygwin/bin
bash --login -i
Change this to:
@echo off
C:
chdir C:/cygwin/bin
set path=%path%;C:/cygwin/usr/local/pspdev/bin
set PSPSDK=C:/cygwin/usr/local/pspdev
bash --login -i
Now you're ready to go! If you have source code that you want to compile, go into that directory with "cd" and type "make" and it should give you an eboot.
在你已 完成了!如果你有想要 编译 的源文件,那 么进 入那个文件 ,并 入"make"他会 你一个eboot。
pbp that you can put on your PSP. If not, check out Lesson 02 to learn howto create your own simple application for the PSP.
pbp是你能
放到psp里的。如果没有,去看看第二 如何建立你的 简单 PSP程序。 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值