TRSE, or “Turbo Rascal Syntax error, “;” expected but “BEGIN” to his Dad Nicolaas Groeneboom, is a complete development system for writing games for many 8 and 16-bit computers, from the Commodore PET, BBC Micro, Gameboy, right up to IBM PC, Atari ST and Commodore Amiga.
Essentially, it is a FULL IDE, language (based on Pascal), compiler and toolset for developing software, demos and games for pretty much every computer out there. While not every platform is fully fleshed out, it is amazing what you can do even now.
Here’s Nicolaas’ official description:
(Turbo Rascal SE, TRSE) is a complete suite (IDE, compiler, programming language, image sprite level resource editor) intended for developing games/demos for 8 / 16-bit line of computers, with a focus on the MOS 6502, the Motorola 68000, the (GB)Z80 and the X86. TRSE currently supports application development for the C64, C128, VIC-20, PLUS4, NES, Gameboy, PET, ZX Spectrum, TIKI 100, Amstrad CPC 464, Atari 2600, 8086AT, Amiga 500, Atari 800, BBC Micro, Mega65, MSX, Apple II and the Atari ST 520. With the benefits of a modern IDE (error messages, code completion, syntax highlighting etc) and a bunch of fast built-in tools, it has never been easier to program for your favorite obsolete system!
TRSE is developed in C++/QT and will compile and run on Windows, Linux and Mac. As well as the binary releases, you can also keep up with development and run the bleeding edge code by compiling it yourself.
And there has been a LOT of development in the years since 2018 when it started – so much that when I am busy for a weekend I come back and find many, many additions and improvements – Just this weekend Nicolaas added Object Orientation features – surprise!
Installing a TRSE Release Package
First thing you will want to do is head over to the TRSE website and familiarize yourself with what you are getting yourself into.
The showcase is a good place to get inspiration. There you will see demos, games, and even my humble Commodore PET game, PETFrog (the source code of which is included in the TRSE download).
Next you will either need a download or head to the Github repo for the latest source. My recommendation would be to start with a pre-built package initially, but you do you.
Setup instructions for TRSE are here. Essentially if you have the pre-built package you can download, extract, and go.
As TRSE can target a bewildering number of platforms, each one will need an appropriate emulator for your system (the setup page doesn’t even include all the available target machines, the list is so big now!). I suggest you pick your most-wanted to begin with before tackling the language and IDE fully.
Compiling a Development Version
To compile a bleeding edge distribution of TRSE you will need to compile it along with QT6 (the free version is fine).
In QT, select “Release” with build directory set as “TRSE/Release”.
You will also need to set up some symbolic links, here is what I do on my Mac via a shell script.
wget https://github.com/leuat/TRSE/archive/master.zip cd ./release/trse.app mkdir themes cp ~/github/TRSE/Publish/source/themes/* ./themes/ ln -s ~/github/TRSE/publish/tutorials tutorials ln -s ~/github/TRSE/units units ln -s ~/github/TRSE/publish/project_templates project_templates ln -s ~/github/TRSE/resources resources
TRSE will now be compiled up nightly for macos/win/linux with @Colin Pitrat‘s action script!
Turbo Racal IDE Settings
The most important setting is each platform you wish to develop for will need an emulator set up for it:
Introduction to Programming in TRSE
While this is just the overview and I will cover programming with TRSE a lot more in future, it is important that you get a taste of how it works here.
You can start with an empty project or choose a sample tutorial project. A new project will create a folder with a minimal program template, and your main source code will have a .RAS extension.
TRSE will feel weird when you first come across it if you haven’t coded in Pascal before. It is nice and orderly after a little time spent playing around.
For example, unlike C programs, you can’t just declare a variable anywhere:
- program name
- uses (for importing libraries)
- const (constants)
- var (variables)
- begin (where your code starts)
- end. (where the whole program ends, note the final . )
Hello World for C64 in Turbo Rascal
program Example; var b : byte=0; // 0-255 i : integer=0; // 0-65535 p : pointer; // address in memory s : string; // a string array of characters hello_string: cstring = ("HELLO WORLD!"); begin // Blank the screen with spaces ClearScreen(key_space, #screen_char_loc); // Set the entire screen text color to white ClearScreen(white, screen_col_loc); // Move the cursor to 10,10 moveto(10,10, hi(screen_char_loc)); // Print hello world then loop forever printstring(#hello_string,0,12); Loop(); end.
After entering your program you can hit the Run button or Ctrl/CMD-R to compile and run it. You can also build individual files or your whole project by setting your main file in the project settings.
As well as .RAS files you can also build your own Unit libraries, which you give the .TRU file extension.
F1 will bring up the help which contains descriptions and examples for the functions, constants and reserved words you will need to look up.
TRSE Next Steps
Go through the built-in tutorials, plus take a look at the wealth of example code that is in there. You will not just get an idea of how to develop in TRSE but also how much Nicolaas has put into this system. I haven’t even touched on the graphics/map/screen/etc editing tools, compression, and even 3D!
Next up in this series I will explain exactly how that Hello World code works, we will start building some actual programs for different systems, beyond just Hello World!