Running VirtualT on Linux

Latest news (29-Dec-09)

I forgot to include the source code package, which includes the ROMs that you'll need to run this. Here it is, in two different archive formats (take your pick!):
Code patched for Linux:
-rw-r--r-- 1 lex lex 1303850 2009-12-29 22:06 virtualt_1.3_new.tar.gz
-rw-r--r-- 1 lex lex 1383696 2009-12-29 22:06 virtualt_1.3_new.zip

Original (unpatched) code:
-rw-r--r-- 1 lex lex 1300288 2009-12-29 22:06 virtualt_1.3_orig.tar.gz
-rw-r--r-- 1 lex lex 1379364 2009-12-29 22:06 virtualt_1.3_orig.zip

MD5SUMS for the above files:

3847caa1d14110f758db6647a000200e  virtualt_1.3_new.tar.gz
e05a47649058ae2597d1998ae7e07284  virtualt_1.3_new.zip
5f4ce32869594d2c26bb44e28f8d457b  virtualt_1.3_orig.tar.gz
d022f95882f7ed63c1ac1f0ad07e8c93  virtualt_1.3_orig.zip

VirtualT Introduction

'Virtual T' is a Tandy 100/102 emulator. I think it does the Model 200 too.

Virtual T Homepage

All files here have had MD5SUM checks. You may wish to download the MD5SUMS file to check file integrity.

Today I attempted to compile the 'Virtual T' Tandy 102 emulator on my Linux box (Ubuntu 8.10 / Intrepid Ibex). I'd compiled it before and I figured that it would be relatively easy - not so! It's tricky, but not impossible.

If you just want the binaries, here they are - otherwise, here's a lot of blurb about the patching that I did.

Since I know practically nothing about C++ programming, I looked everything up on Google.

What you'll need: fltk-1.1.7-source.tar.gz, from fltk.org and virtualt-src-v1.3.zip, from sourceforge.net/projects/virtualt

The source code doesn't create its own dir, so I did a 'mkdir virtualt_1.3' and unpacked the code into it.

In the Projects/Tandy102/ dir (all of my stuff is in the 'Projects' subdirectory), I made a new dir: 'fltk_local', into which I unpacked the FLTK source (fltk-1.1.7/)

I followed the instructions in the VirtualT 'build.html' document, which is in the virtualt_1.3/doc/ dir. That requires a './configure ; make' for FLTK. You need to cd into the jpeg, png and zlib subdirs and do 'make'.

The next step: export FLTKDIR=$PWD and then cd out of the FLTK dir and go to the virtualt_1.3 dir. It should then be a matter of doing a 'make', but the compile fails for many reasons.

Problem #1: all of the text files are DOS-formatted.

Solution #1: install package 'tofrodos', cd to the virtualt_1.3 src dir and do

find . -type f -exec dos2unix {} ';'
Problem #2: various .cpp files use headers that work fine on Windows, but don't on Linux or UNIX.

Solution #2: patch the files in 'src' with these patches (patches these files: assemble.cpp, remote.cpp, socket.cpp, fileprint.cpp, hostprint.cpp, vt_client_main.cpp)

Instead of downloading them, you can browse them separately:

virtualt.patch.1
virtualt.patch.2
virtualt.patch.3
virtualt.patch.4
virtualt.patch.5
virtualt.patch.6

cd virtualt_1.3
for a in virtualt.patch.?; do
patch -p1 < ${a}
done
Important: these patches might not apply, depending on whether you are using the same source code, though I've tested them and they worked fine on my system (that advice probably doesn't help much if you're having problems).

Next, cd .. and type 'make' and hope for the best. There will be a lot of warnings (boy, that gcc sure is fussy!).

Good luck! If all goes well, you'll be greeted by a screen that looks a bit like this: Virtual T emulator screen, showing the menu

Virtual T emulator screen, in BASIC

Ubuntu desktop with Virtual T running

Troubleshooting

If you see 'FLTKDIR environment variable must be set first!' then make sure that you have done 'export FLTKDIR=$PWD' where the current dir is the top of the FLTK source tree ('fltk-1.1.7'). Sorry if this is rather simplistic but I make this sort of mistake all the time!

If you get '/usr/bin/ld: cannot find -lfltk_jpeg' or similar, check that you went into the jpeg, png and zlib subdirs of the FLTK source and did 'make'.

If a blank screen appears - with optional warning pop-up - you may need the ROMs. These are in the source code archive (see above).