Close

ECL-Rogue on the Tridora-CPU: A Porting Adventure

A project log for Tridora-CPU

a homebrew FPGA CPU with a native Pascal compiler and a simple development environment

sledererslederer 05/27/2025 at 21:590 Comments

I have also been working on the software side, fixing bugs in the compiler and assembler that showed up when compiling more complex software.

The latest result is ECL-Rogue: A variant of the well-known game Rogue that was originally written in C on Unix. This version is written in Pascal, and it was written for the Pascal-Compiler on the PDP-10, a 36-Bit word-oriented mainframe computer from the 1970s.

It took many small changes to make it compile with Tridora-Pascal (and FreePascal), and there were also parts written in PDP-10 assembly language (e.g. accessing the score file) and system calls to the TOPS-20 operating system that needed to be rewritten.

Apparently the PDP-10 Pascal compiler was very close to the original Pascal compiler from Niklaus Wirth and his team, and that means: No strings! Just packed array of char, padded with spaces. That required a lot of little changes. I also noticed that Tridora-Pascal is a lot stricter than FreePascal when accessing strings: In FreePascal (and Turbo-Pascal in the good old days), it is not an error to read/write chars beyond the current end of the string. So, more of those little changes.

But in the end, I got it working while keeping the source code mostly the same, and now you can play ECL-Rogue on the Tridora-CPU. You can also compile it with FreePascal.

Link to the source repository of the ported version (see the README there for the original version):

https://gitlab.com/slederer/ecl-rogue-m

Check out this video of me playing:

The Tridora emulator image has also been updated to include ECL-Rogue.

Discussions