Lotus 1-2-3 R4D Display Driver for DOSEMU

Overview

Lotus 1-2-3 R4D Display Driver for DOSEMU2

This is a WIP display driver for Lotus 1-2-3 R4D to enable support for arbitrary text resolutions in DOSEMU2.

That means you can run 123 in a maximized xterm, and see more columns than you could possibly want!

screenshot

Note: This driver is intended for DOSEMU2 in term mode, i.e. running in a terminal.

I used MSVC 8.00c (still available to MSDN subscribers), I believe it's the last version of MSVC that could target DOS.

In case you're wondering, DJGPP (the GCC port to DOS) can only produce 32-bit DPMI code, but 123 is a true 16-bit real mode application. It might be possible to switch in and out of dpmi mode with a small stub, but 123 uses a lot of memory management tricks and frankly intermixing the two seems really hard. I think it's a better solution to stay in real mode.

This driver basically works, but I haven't fully implemented all the API, so if you do something unusual it might trap. It might take a few more weekends to be totally stable! At the moment, it also has some debugging code that logs all the calls, I'll remove that when it's ready for other people to use.

I highly doubt anybody else will want to use this, but if you are excited to help hacking on this, or writing modern add-ins for 1-2-3, I'd love to hear about it!

Future ideas:

  • A FILE driver that adds native support for XLS, or ODT?
  • libcaca support so that text mode graphs work?
  • More modern @functions?
  • Javascript/Python/lua bindings? (there was an official REXX module in the 90s, so this doesn't seem farfetched!)

I have some development notes available here.

Building

If you just want a binary to try, check out the Releases section.

Note that this code isn't really ready for non-developer use yet, but you're welcome to try it out and tell me about any visual glitches or crashes!

I wrote the code on Linux, and then used dosemu to run the old toolchain.

For example, you can run tasm from a Makefile like dosemu -dumb -E "tasm ..."

The -dumb (i.e. dumb terminal) option makes old DOS tools work like UNIX tools. This requires you have your autoexec.bat setup so that %PATH% works, but is very convenient for development - even exit codes work!

FAQ

Q. Which display driver should I be using for terminal mode?

A. Select the CGA driver during install, then install this driver :-)

Q. If I use the /Worksheet/Status command, 123 does not see all the EMS/XMS memory I have configured in DOSEMU?

A. Try adding SET 123MEMSIZE=134217728 (that's 128M, use an appropriate number for your configuration) to fdppauto.bat.

There is also 123SWAPPATH, 123VIRTSIZE and 123SWAPSIZE if you want to tweak it.

Q. If I try to use 123 in two xterms simultaneously, I get an error like "The stand-alone license is not currently available".

A. Add something like this to your fdppauto.bat

REM CLEAN UP LICENSE FOR 1-2-3
DEL C:\123R4D\LICENSE.000 > NUL
COPY NUL C:\123R4D\LICENSE.000 > NUL

Q. What DOSEMU settings do you use for 123?

A. Here is my dosemurc

Q. How can I send 123 worksheets to someone else?

A. Libreoffice can open and convert WK3 files, if necessary. Most formulas and features will be preserved.

Q. Can I fetch external data into 123, like stock prices with a macro?

A. I use a macro like this to fetch stock prices (simplified):

{SYSTEM "UNIX stocks.sh GOOGL > %TEMP%\STOCKS.TXT"}
{OPEN "C:\TMP\STOCKS.TXT", "r"}
{READLN C1}
{CLOSE}

The UNIX command is a DOSEMU feature, it runs a command on the host. The 123 online help explains how to loop over ranges, etc.

Q. What do I need to know to get started?

A. If you don't have a manual, there's one available online here.

If you've used any spreadsheet before, you should be able to get started quickly. Functions use @ instead of =, but the common functions like @SUM, @AVG, @INDEX, and even @HLOOKUP all work as you would expect.

Key Description
/ Open the 123 menu.
F4 Enter point mode, to select ranges.
Ctrl PgUp/PgDn Move between open tabs/sheets (use /Worksheet/Insert/Sheet to add a tab).
F9 Recalculate, if you press it while entering a formula, the text will be replaced with it's value.
F1 Open online help.

If you want to be able to save your documents to your home directory, you can add something like LREDIR D: \\linux\fs\home\foo\Documents to your fdppauto.bat.

Q. Why does selecting text with the mouse not work?

DOSEMU emulates a mouse (even in terminal mode!) so when you try to select text DOSEMU is reporting mouse events to DOS.

How to stop that happening depends on your terminal.

In XTerm you can Shift-RightClick and disable "Allow Mouse Ops", change the allowMouseOps resource to make it permanent.

In most terminals you can hold down Shift while selecting.

Issues
  • Wraparound behavior on terminals taller than 63 lines

    Wraparound behavior on terminals taller than 63 lines

    Running 1-2-3 release 3.4 with this driver on a terminal with 64 or more lines causes the bottom of the display to mirror the top of the display:

    wraparound

    I’m not sure if this is a driver bug, a fundamental limitation of 1-2-3’s graphics API, or a dosemu2 bug, but it seems worth documenting in any case. (Beyond this issue, the driver seems to work great with release 3.4. Thanks for making it a reality!)

    I’m using dosemu2-2.0pre8-20210718-3057-gd488fe7b9 (revision 6756).

    stty rows $((LINES > 63 ? 63 : LINES)) (or tmux setw force-height 63, if you’re in tmux) is a good workaround.

    opened by bbarenblat 4
  • Using /Tools DOS causes a crash

    Using /Tools DOS causes a crash

    I think the driver doesn't reinitialize properly, if you try to use /Tools DOS, 123 crashes when you exit the DOS shell. This includes if you have any macros that run external commands.

    I think I know the problem, but will need to do some debugging.

    Note to self: I think the driver is Terminated() and then Reinitialized() when you exit DOS, so I'm not cleaning up properly.

    opened by taviso 1
  • POINT mode visual glitches.

    POINT mode visual glitches.

    If you enter POINT mode (F4) and then move around a big sheet with the arrow keys like crazy, there are some visual glitches.

    They seem mostly harmless, but the original driver works so it must be a bug in my code somewhere.

    opened by taviso 0
  • Resizing the terminal window and still displaying the right number of rows / columns

    Resizing the terminal window and still displaying the right number of rows / columns

    This is probably not possible / a silly idea.. but I wonder if it would be possible to support terminal window resizing ?

    I don't know if you could query the terminal size directly, or if you'd have to add something to DOSEMU so it would cooperate, when it received WINCH, putting that data somewhere you could read it ?

    opened by stuaxo 12
Releases(v0.6)
  • v0.6(Apr 1, 2021)

    This release has a first attempt at terminal graph support - very simple graphs work in terminal mode! You can use F10 or /Graph to try it out.

    This release fixes three crashes:

    • If you used a very long multiline formula, trying to edit it with F2 would crash.
    • Opening a worksheet with /File/Retrieve, then using /Tools/DOS (or a macro with {SYSTEM} in it), would make displaying graphs crash.
    • Attributes could get desynchronized during block copies, this didn't crash but could make the colors wrong.

    If there are any crashes or visual glitches - please report them, even a screenshot is useful.

    To install:

    1. Navigate to your ~/.dosemu/drive_c/123R4D directory.
    2. Backup your file L13VCGAF.DLD.
    3. Overwrite it with L13VDEMU.DLD. That's it!
    # backup old driver
    $ cp L13VCGAF.DLD L13VCGAF.BAK
    # install new driver
    $ mv L13VDEMU.DLD L13VCGAF.DLD 
    

    When this is closer to being a final release, I'll make a nice installation package!

    Source code(tar.gz)
    Source code(zip)
    l13vdemu.zip(17.26 KB)
  • v0.3(Mar 3, 2021)

    This is a testing release, it mostly works for me, I'm really using it, but there are some known bugs.

    • I think trying to switch to graphical mode (e.g. pressing F10, or using /Graph) will crash, printing a graph should work though.
    • ~~If you try to use /Tools/DOS, it will crash when you exit. This includes if you use a macro that uses {SYSTEM}~~.

    I know about these bugs, and working on it!

    If there are any other crashes or visual glitches - please report them, even a screenshot is useful.

    To install: backup your file L13VCGAF.DLD, and overwrite it with L13VDEMU.DLD. That's it.

    When this is closer to being a real release, I'll make a nice installation package!

    Source code(tar.gz)
    Source code(zip)
    l13vdemu.zip(10.39 KB)
Owner
Tavis Ormandy
Tavis Ormandy
Loads a signed kernel driver which allows you to map any driver to kernel mode without any traces of the signed / mapped driver.

CosMapper Loads a signed kernel driver (signed with leaked cert) which allows you to map any driver to kernel mode without any traces of the signed /

null 107 Jul 2, 2022
IMG-1-02 Plasma display driver

IMG-1-02 Plasma display driver IMG102_test_image_(mono, 4_colors, 8_colors)_328p Simple programs for show static images on IMG-1-02 plasma display by

null 14 Feb 7, 2022
x64 Windows kernel driver mapper, inject unsigned driver using anycall

anymapper x64 Windows kernel driver mapper, inject unsigned driver using anycall This project is WIP. Todo Fix: Can't make API calls from IAT nor func

Kento Oki 68 Jun 22, 2022
Driver leap - Self-sustainable fork of SteamVR driver for Leap Motion controller with updated vendor libraries

Driver Leap Self-sustainable fork of SteamVR driver for Leap Motion controller with updated vendor libraries Installation (for users) Install Ultralea

null 42 Jun 17, 2022
Hygieia, a vulnerable driver traces scanner written in C++ as an x64 Windows kernel driver.

Hygieia The Greek goddess of health, her name is the source for the word "hygiene". Hygieia is a windows driver that works similarly to how pagewalkr

Deputation 67 Jun 19, 2022
SinMapper - usermode driver mapper that forcefully loads any signed kernel driver

usermode driver mapper that forcefully loads any signed kernel driver (legit cert) with a big enough section (example: .data, .rdata) to map your driver over. the main focus of this project is to prevent modern anti-cheats (BattlEye, EAC) from finding your driver and having the power to hook anything due to being inside of legit memory (signed legit driver).

null 95 Jun 19, 2022
Send messages to a LED Matrix display through Telegram. Inspired by a tweet from Smarter Every Day

Send messages to a LED Matrix display through Telegram. Inspired by a tweet from Smarter Every Day

Brian Lough 22 Jun 13, 2022
Split flap display Arduino library

SplitFlapDisplay Split flap display Arduino library Introduction This is a simple high level library to drive split flap display letters with Arduino.

Stefano Guglielmetti 19 May 31, 2022
Breakout game for Raspberry Pi Pico with Pimoroni Pico Display pack

breakout_rpi_pico Breakout game for Raspberry Pi Pico with Pimoroni Pico Display pack Prebuilt binary (breakout.uf2) is here. To build your own binary

null 18 Jan 17, 2022
Using the LilyGo EPD 4.7" display to show OWM Weather Data

LilyGo-EPD-4-7-OWM-Weather-Display Using the LilyGo EPD 4.7" display to show OWM Weather Data Version 2.72 Improved Icon shapes and positioning Adjust

G6EJD 13 Apr 2, 2021
VGA/TV display on Raspberry Pico

PicoVGA - VGA/TV display on Raspberry Pico

Miroslav Nemecek 80 Jun 23, 2022
A tiny external monitor for PC using STM32 and ST7789. Connects to PC over USB and displays the captured screen on ST7789 (240x240) display.

STM32 Tiny Monitor A super tiny monitor for your PC, suitable for your pet ant. A python script sends the captured screen over USB to the STM32 microc

Avra Mitra 61 Jul 2, 2022
A Flutter Web Plugin to display Text Widget as Html for SEO purpose

SEO Renderer A flutter plugin (under development) to render text widgets as html elements for SEO purpose. Created specifically for issue https://gith

Sahdeep Singh 88 Jun 17, 2022
code for split-flap display

split-flap 3D-files here: https://www.prusaprinters.org/prints/69464-split-flap-display General The display's electronics use one esp01 as the master

David Königsmann 146 Jun 23, 2022
Fully Featured Time Circuits Display from Back to the Future

Time Circuits Display This Time Circuits Display has been meticulously reproduced to be as accurate as possible to the one seen in the Delorean Time M

John 51 Jun 24, 2022
Next gen. of NekoCal: An open-source hackable and programmable e-paper display

NekoInk NekoInk is an open-source, programmable, and versatile E-paper display platform. It offers connectivity options to various type of E-paper scr

Wenting Zhang 39 Jun 25, 2022
A hacky e-ink display for Home Assistant sensors

This is a hacky PlatformIO project in which Home Assistant data is displayed in an e-ink display. Useful Links Display Hardware on Tindie Official Git

null 53 May 29, 2022
PicoQVGA - Minimalistic QVGA Display on Raspberry Pico

Minimalistic QVGA Display on Raspberry Pico with resolution 320x240/8bit, suitable as tutorial to PIO and DMA.

Miroslav Nemecek 10 May 13, 2022
Remote Arduino Uno-based TFT graphical display for VSR Mini Mega Alternator Regulator

VSMMAR_Remote_Display Remote Arduino Uno-based TFT graphical display for VSR Mini Mega Alternator Regulator This project is an optional accessory for

null 1 Nov 6, 2021