I tend to use a lot of retro software, partly because I’m a big nerd but also because I just prefer to work in a terminal. There were a ton of major commercial software products for MS-DOS that were highly polished, and can still be used effectively in an xterm today.
I do like using Lotus 1-2-3, I even have a boxed copy of the last DOS version released, version 4!
The truth is I’m cheating, it does work, but it only supports a few standard text mode resolutions. If your terminal is not exactly 80 columns wide, it just makes a big ugly mess on your screen.
There’s a workaround, just type stty cols 80
, and it will be confined to a portion of your terminal, looking a bit sad. There is no way to display more columns, and maximizing your terminal will do nothing.
Research
I wondered if other people still uses 123, and if they had found a solution. I enjoy using it, but being limited to such a small work area is a real nuisance.
I spent an hour reading vintage computing forums and old USENET posts.
Unfortunately, the answer is that nobody has a solution to my resolution problem, but I did find something interesting…
Endeavor
I found this old manual for a 1993 PC Workstation called the Epson Endeavor, which claimed to be distributed with a utilities disk that enabled a 100×31 text mode in 1-2-3.
How could such a thing be possible?
I was able to find the drivers on an old ftp site. Sadly they didn’t work, presumably they needed a real Cirrus Logic VGA card, but the fact that these drivers exist at all made me curious. It seems plausible that 123 can internally generate an arbitrary sized canvas, and it simply asks the display driver what resolution it wants?
I know that dosemu can simulate arbitrary text mode resolutions, and some DOS software is able to use it. Is it possible that I could write a dosemu display driver, and 123 would just work in a fullscreen xterm?
Reverse Engineering
The display driver API is unfortunately quite complicated, I think it might take a while to figure out with just a disassembler and a debugger. Further complicating matters, 123 uses a technique called overlays (like software bank switching) which confuses the debugger I’m using as it loses breakpoints whenever a overlay switch occurs!
I figured that Lotus must have sent Cirrus Logic some documentation to write the driver, perhaps that still exists somewhere and would save me some time.
I spent some time looking, but came up empty.
I learned a lot about the Lotus add-in ecosystem, and how they worked. I figured I would download all the drivers and add-ins I could find, I’ll start reversing the simplest one, and move on until I know enough to write my own.
If you want to read about what commercial addins were available, this article is a fun read.
Archives
Believe it or not, the old Lotus ftp site is still online. I mirrored everything they had to my workstation and sifted through it.
Then I got a lucky break…
History
Lotus 1-2-3 was ported to a bunch of systems, including OpenVMS, Xenix, and even System/390. In 1991, Lotus released a version for SunOS4 on SPARC.
A few years later, a Lotus engineer uploaded a patch for a file management bug in the XALERT component that affected the 1.2 update. Luckily, they forgot to remove the STABS data, leaving incredibly rich debugging data.
typedef short int lmbcs_type;
typedef short int platform;
typedef short int memory_type;
struct envblk_ { /* size 68 id 9 */
short int envsize; /*