Download and Install

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.

Comments

Download and Install — 39 Comments

  1. 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

  2. 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

  3. 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

  4. 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

    • cheers. I’ve got your other comments and will reply in email – probably easier than here to get you sorted out.

      -Gordon

  5. 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

  6. 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

  7. 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…

  8. This is awesome. Now I can finally print again that lineprinter-pin-up calendar for year 1975. Well, uh, just punched tape reader missing.

  9. 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!

      • Hi Gordon,

        wiringPi was built with no fuss and works well.
        my problem is with RTB…

        Thanks for the response,
        Love your site!!

  10. 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

  11. 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

  12. 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

  13. 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