PSP Apps with sdlBasic

sdlBasic is a multi-platform interpreter for BASIC, using the SDL libraries. sdlBasic will run on Windows, Linux (and Raspberry Pi) and on the Sony PlayStation Portable (PSP).

sdlBasic_IDE

sdlBasic has a development environment that can be used to build and test your applications in Windows or Linux. Also for Windows and Linux the application can be compiled as a native executable.

To run on the PSP you will need to have your unit ‘moded’ to run homebrew software. There are lots of good references on how to do this. Once you’ve ‘moded’ your PSP you will need to download the PSP version of sdlBasic.

The nice thing about sdlBasic is that you can do all your testing on your PC in Windows then once things are working you can move them to the PC.

Some things to keep in mind:

  • PSP apps will run slower. This is especially important when you are doing a lot of bitmaps.
  • PSP buttons are supported, but your app will need to allow consider PC keys
  • Not all features are support in all operating systems:
    • joystick support isn’t working on Linux
    • Socket support doesn’t seem supported on the PSP

There are lot of fun programs the kids can create. Below is a simple “Read your future” program:

genie


‘ Guess your future

‘ Some colours
red = rgb(255,0,0)
green = rgb(0,255,0)
blue = rgb(0,0,255)
gray = rgb(128,128,128)
yellow = rgb(255,255,0)
white = rgb(255,255,255)
black = rgb(0,0,0)

setDisplay( 480, 272, 16, 1 )
‘—————————–
Dim answer[]
answer[1] = "Your future is foggy. Buy a flash light"
answer[2] = "Your future is unclear. Visit the eye doctor"
answer[3] = "Your future is clear. Maybe you should buy some sunglasses"
answer[4] = "Your future is cloudy. I hope you have a rain coat"
answer[5] = "I see money. Ok so hand it over, I need it"
answer[6] = "I see a stranger. Are you strange ?"
answer[7] = "I see a warm water. I think you need a shower ?"
answer[8] = "Do you realize you’re talking to a computer ?"

ink(red)

text(240,80,20,"Let the Genie")
text(240,120,20, "Read your future")

ink(white)
text (240,180,10,"Press Return or X key on PSP for a reading")

s = loadimage( "genie.bmp" )
pasteicon(0,0,s)

ink(gray)
while inkey <> k_esc
if inkey = k_return then
ink(black)
bar(0,220,480,272)
question = rnd(9)
ink(yellow)
Text(5, 230,15,answer

)
end if
wend

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s