Right now, April/May 2014, RTB is only available for the Rasperry Pi running Raspbian. Older versions are still available for other platforms, but the Pi version is the only current one.
cd /tmp wget http://unicorn.drogon.net/rtb-2.20-1.deb sudo dpkg -i rtb-2.20-1.deb
That ought to install it, however it may throw up a dependency (most likely libsdl-sound), so to resolve this, then in the usual Debian manner:
sudo apt-get -f install
will complete the installation.
Finally get the demo programs:
cd mkdir -p rtb cd rtb wget -O- http://project-downloads.drogon.net/rtb/demos.tgz | tar xfBz - cd demos ls
That will fetch the demo programs, and unpack them into a directory called demos, then change into that directory and display them for you. (this will eventually form part of the package, but for now, it’s a bit long-winded – sorry)
At this point you should be able to start RTB by typing:
rtb
RTB should work both in X Windows and in the console, but certain things like keyboard mappings may be different when run directly on the console.
RTB has a built-in DIR and LOAD command, so you can load up the demos and run them – e.g.
dir load spiral run
And off you go.
If you have used ssh to login to your Raspberry Pi from another Linux PC, then you can use the ssh -X command and RTB will run on the Pi and display locally, however it will be very slow as the SDL libraries do not lend themselves to speed when used like this.
Hi Gordon
Should the line “sudo chmod +x /usr/local/bin/rtb” for the Raspberry Pi install be
sudo chmod +x /usr/local/bin/rtb-rpi
and the same again for lines
sudo chown root.root /usr/local/bin/rtb
chmod 4755 /usr/local/bin/rtb
both change to
sudo chown root.root /usr/local/bin/rtb-rpi
chmod 4755 /usr/local/bin/rtb-rpi
Hope all’s well with you and Rachel
Paul
Sorry one more little thing, It errors when I try to start rtb-rpi. I’m in the demo directory:-
root@raspberrypi:/home/demos# rtb-rpi
rtb-rpi: error while loading shared libraries: libwiringPi.so.1: cannot open shared object file: No such file or directory
Paul
Need to install wiringPi:
https://projects.drogon.net/raspberry-pi/wiringpi/download-and-install/
That should fix it!
-Gordon
Well spotted.
It’s the mv command that’s wrong – I’ve corrected it in the page now. It should be:
sudo mv rtb-rpi /usr/local/bin/rtb
then the rest works.
And we’re fine, thanks!
-Gordon
Thanks Gordon it all works now.
I ssh to my Pi and when I run rub it launches it on the HDMI screen but I then can’t do anything with it. The ssh has no effect, but also the main USB keyboard can’t control it either so the only way I can stop it is to reboot. Is that normal?
I must say when it runs from the terminal (not ssh) it runs well and your examples are great, some of them very mesmerising – I could gaze at them for ages.
Well done.
Paul
Er… Running it from an ssh login on a local HDMI monitor is not a scenario I anticipated… It should display on the screen, but I’ve no idea what happens to keyboard input…
You should be able to run it from a local usb keyboard though – use the Escape key to stop a program and EXIT to exit the interpreter.
If you ssh -X into the Pi, then it should display in a window on the Linux PC you ssh from. (slowly)
To exit without rebooting if you ssh in, try typing Control-\ in the ssh terminal.
-Gordon
Hi Gordon
What I ment to say was running ssh on a Mac launched rtb on the Pi but was on the main monitor (on my Pi it’s HDMI).
But all sorted now with the ssh -X – but as you said a bit slow on the “X11” screen that the Mac runs it in….. but it works
Thanks
Paul
i cant seem to get this to work. i get an error installing libsdll and the chmod code. i have raspbian loaded on my pi right now. trying to learn but not very good
To install SDL, it should be a matter of typing:
sudo apt-get install libsdl1.2debian
It may already be installed though.
the chmod – that’s not code, but a command you type – if you follow the commands on the download page, then it really should work. Do take care if typing them in though – the difference between the digit 1 and the letter l. Maybe I should write a little install script for it though..
-Gordon
by the way thank you
cheers. I’ve got your other comments and will reply in email – probably easier than here to get you sorted out.
-Gordon
Hello, I’m interested in trying RTB on qemu emulating RPi running raspbian. This should be doable, right?
However, RTB requires wiringPi, which gives a mmap failed error on setup. It seems a bit premature to make RTB require wiringPi – what if you don’t want to use GPIO at all and just try a game or two?
Any chance of removing the dependency and having RTB only shouting if a the GPIO is actually neeeded?
What platform are you running qemu on? If Linux (x86) then you can grab the x86 binaries and run directly on your PC… Or you can fetch the source and build it on your qemu setup (that’s what I did originally).
git clone git://git.drogon.net/rtb
cd rtb/src
cmake -G “Unix Makefiles”
make
./rtb
that’ll compile it for a generic linux host without the raspberry Pi specifics. (It takes about 100 seconds to compile on a real Pi, hopefully your qemu is a little faster)
-Gordon
Thanks Gordon, that was enough info to get it working.
I’m running qemu on Vista, here’s what I did to get it working:-
1) Made some changes to the directories named in the Makefile to reflect where the rtb files were for me.
2) sudo apt-get install libsdl1.2-dev to get over an SDL lib error.
Glad it’s going now – now fetch teh cesil interpreter and program up a fancy xmas tree 🙂
git clone git://git.drogon.net/cesil
-Gordon
Updated the install procedure for Raspberry Pi’s. One simple install script now.
-Gordon
Is it possible to talk to the GPIO i.e., control a LCD ?
Yes. See: https://projects.drogon.net/raspberry-pi/wiringpi/lcd-library/
There are also some “smart” LCDs such as the ones from 4D Systems – e.g. https://projects.drogon.net/4d-systems-intelligent-displays-and-the-raspberry-pi/
-Gordon
Just a note to say I am a total novice to programming the Pi and am just dipping my toe in as it were. However, back in the dim and distant I dabbled a bit with basic on a ZX81 (1981!) and subsequently Spectrum 32/64. Reading your description of the modes for programming and the necessity of saving your work as you go I was reminded of one occasion when I had spent what seemed like hours on typing in a programme for the ‘Speccy’ only for my wife to unplug the extension lead to the shed so she could hoover. Should have saved my work every now and then!!! As I get braver with my Pi, I shall endeavour to do some ‘basic’ programming for old times sake. Thank you so much for making this possible…
Keep saving every now and then 😉
-Gordon
This is awesome. Now I can finally print again that lineprinter-pin-up calendar for year 1975. Well, uh, just punched tape reader missing.
Hi,
I was trying to copile this on archlinux and endend up getting this:
/usr/bin/ld: CMakeFiles/rtb.dir/numFns.c.o: undefined reference to symbol ‘acos@@GLIBC_2.4’
/usr/bin/ld: note: ‘acos@@GLIBC_2.4’ is defined in DSO /usr/lib/libm.so.6 so try adding it to the linker command line
/usr/lib/libm.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [rtb] Error 1
make[1]: *** [CMakeFiles/rtb.dir/all] Error 2
make: *** [all] Error 2
i tried to use LDFLAGS=”$LDFLAGS -ldl”, but it made no difference…
any idea on how to make this work?
Thanks!
There is no CMakefile in wiringPi – someone else must have added it in from the sources you obtained.
Get wiringPi from: https://git.drogon.net/wiringPi
e.g.
cd
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build
-Gordon
Hi Gordon,
wiringPi was built with no fuss and works well.
my problem is with RTB…
Thanks for the response,
Love your site!!
Hi Gordon
Having lots of fun and reliving old memories – thanks to you 🙂
Is there a way to increase the font size ? I looked through the manual but couldn’t find a reference to what the RTB command line parameters do.
Thanks !
if you start rtb with the -l flag:
rtb -l
then you get large (double size) font. Right now there’s no way to change it in a program though.
Good point about lack of documentation on the command-line options though – I’ll update the page!
-Gordon
Thanks, that’ll do. I’ve forgotten how bad the original fonts were 🙂
BTW the clock program seems to be using “next” as a variable, which is of course a reserved word. Changing every instance to “n” did the trick.
Cheers !
Ah. Bone of contention the ‘next’ thing. Originally the for loop worked (and still does) using the common cycle…repeat mechanism, but after some whingers from boring old risc os people who complained it never had the traditional ‘next’ statement in it, I changed it – looks like the clock program was a casualty. It’s subsequently turned out that they never even bothered to download and test it after I spent an afternoon making the changes, so I’m going to revert back to my way of doing it.
-Gordon
Hahaha yip, and so it goes 🙂
Thanks a mill !
Hi Gordon,
I installed RTB on my Pi like the directions said.
All I get when I run rtb and type dir is ‘matched 0 files’ and I can’t load anything. The rtb directory is in my home folder.
What did I do wrong???
Thanks for your help.
There is a demos directory as part of RTB – if you cd into that first, then you’ll see all the files with the dir command.
(actually if you know the path, you can cd from rtb – probably: cd /home/pi/rtb/demos )
-Gordon
Thanks. I was only in the rtb folder, not the demo folder.
This thing is great. something i will play with for a while.
Thanks again.
Dan
Hope you have fun with it! As a bonus, I don’t think it’s in the demos directory, but:
cd ~/rtb/demos
wget http://unicorn.drogon.net/snake.rtb
and run that 🙂
-Gordon
Thanks for your help, Gordon. However, my post seems vanished? Have you ever thought about a forum for RTB? On forum.retrogamecoding.org we have boards for various (retro) dialects: EGSL, NaaLaa and BrowserBasic. Just drop me a line if you want to.
Best wishes,
Markus
Yes – I’m planning some forums over on the http://wiringpi.com/ site – just need a few hours spare to set it up!
-Gordon
Hi Gordon,
I was able to get RTB working on Android Linux. Here is a thread I have going on the All Basic developer’s forum.
http://www.allbasic.info/forum/index.php?topic=223.0
I’ll post a link to the rtb.apk once I resolve the last of the unicode / SDL issues.
John
Will have a look soon – think I emailled you recently though! Cheers
-Gordon
Hello Gordon.
I am finding rtb excellent, but I wondered if you could point me in a direction for loading a sprite. The error “No such file or directory”. Looked at your example and tried saving sprite in different folders etc but still no go. What am I doing wrong?
Neil.
The RTB sprite handling is a little crude, (the FUZE version is better, but it’ll take time to back-port to RTB). But do make sure the sprite is in the same directory you start from. It’s a .BMP file.
-Gordon