元旦准备买NDS,顺带关注了下PSP,其实是想,或许买PSP也不错~
PSP很像一个平台,提供了很多东西,譬如官方的PS模拟器~在上面编程也是个不错的想法。
国外的一个网站提供了很多信息,PS2Dev Network (http://www.ps2dev.org),有教程http://ps2dev.org/psp/Tutorials,现在由于不久前的地震,基本无法登陆那个网站。更多的信息在http://wiki.ps2dev.org/。
要想进行PSP编程,需要学习C或C++。在windows下,需要安装Cygwin http://www.cygwin.com/, 这其实是个模拟linux的环境。在Mac OS X或Linux下需要编译PSPSDK和PSP 工具。这些东西都可以在http://ps2dev.org/psp/Projects找到。
--
starting positions
for
the character
x
=
200
y
=
100
--
A nice color
color
=
Color.new(
128
,
255
, 0)
--
this flag tells whether the program needs to draw
draw_character
=
true
--
loop forever
while
true do
if
draw_character then
--
a rogue at the x
/
y coordinates
screen:
(x, y,
"
@
"
, color)
screen.flip()
end
--
check whether the user pressed the pad,
and
move accordingly
pad
=
Controls.read()
draw_character
=
true
if
pad:left() then