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 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:
‘ 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 )
answer = "Your future is foggy. Buy a flash light"
answer = "Your future is unclear. Visit the eye doctor"
answer = "Your future is clear. Maybe you should buy some sunglasses"
answer = "Your future is cloudy. I hope you have a rain coat"
answer = "I see money. Ok so hand it over, I need it"
answer = "I see a stranger. Are you strange ?"
answer = "I see a warm water. I think you need a shower ?"
answer = "Do you realize you’re talking to a computer ?"
text(240,80,20,"Let the Genie")
text(240,120,20, "Read your future")
text (240,180,10,"Press Return or X key on PSP for a reading")
s = loadimage( "genie.bmp" )
while inkey <> k_esc
if inkey = k_return then
question = rnd(9)