• Stars
    star
    147
  • Rank 251,347 (Top 5 %)
  • Language
    C
  • Created over 3 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Lotus 1-2-3 R4D Display Driver for DOSEMU

Lotus 1-2-3 R4D Display Driver for DOSEMU2

This is a work-in-progress 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 need!

screenshot

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

This driver basically works, but I haven't fully implemented all the API, so if you do something unusual it might trap.

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? working on it!
  • More modern @functions?
  • Javascript/Python/lua bindings?

Graphs

I have an incomplete ascii-art graphics implementation. That means drawing simple graphs will work even in a terminal! Don't expect high resolution graphics, but simple line, bar, and even pie charts really do work!

Here is a screenshot of a sine wave line graph, it will improve in future.

sinewave

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!

123 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.

I have an example sheet that demonstrates how to do this available here, you can use it as a template.

It automatically populates a table of stock prices when you press Alt-R. Use Ctrl-PgUp and Ctrl-PgDn to switch sheets and browse around.

You will need a script in your $PATH called stocks.sh like this, and don't forget to add the full path to your $_unix_exec in .dosemurc.

#!/bin/bash

declare api="https://query1.finance.yahoo.com/v7/finance/quote"
declare filter=".quoteResponse.result[].regularMarketPrice"

curl -s "${api}?symbols=${1:-^GSPC}" | jq -r "${filter}" | cat

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.
F1 Open online help.
F2 Edit an existing cell contents, just type to overwrite cell.
F3 Show names, press F3 while editing to see a list of functions or ranges.
F4 Enter point mode - it's like visual mode in Vim - to select ranges.
F5 Goto Address.
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.

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.

Q. How do I undo my last action?

The default keybinding is Alt-F4, but that can be hard to enter on modern systems.

If you can't press Alt-F4 easily, there are two options.

  1. DOSEMU has support for simulating modifier keys, you can type: Ctrl-6 Shift-A F4 Ctrl-6 Shift-A.
  2. That's a lot of keys though, another workaround is to add SCANCODE to your %PATH%, and then bind a macro to something like {SYSTEM "SCANCODE M 2,W 1,0 \"READY\",ALT-F4"}.

You can then bind a macro to Alt-Z by naming a range \z.

More Repositories

1

loadlibrary

Porting Windows Dynamic Link Libraries to Linux
C
4,330
star
2

ctypes.sh

A foreign function interface for bash.
C
2,060
star
3

ctftool

Interactive CTF Exploration Tool
C
1,636
star
4

123elf

A native port of Lotus 1-2-3 to Linux.
C
1,171
star
5

avscript

Avast JavaScript Interactive Shell
C
664
star
6

wpunix

WordPerfect for UNIX Character Terminals
C
615
star
7

rbndr

Simple DNS Rebinding Service
C
613
star
8

hotcorner

Tiny Hot Corners for Windows 10
C
380
star
9

nntpit

minimalist reddit2nntp gateway
C
231
star
10

rarvmtools

Minimal RarVM Toolchain
C
228
star
11

cefdebug

Minimal code to connect to a CEF debugger.
C
193
star
12

kiewtai

A port of Kaitai to the Hiew hex editor
C
144
star
13

sharapi

Simpsons: Hit & Run JavaScript API
JavaScript
112
star
14

swisstable

Access Abseil Swiss Tables from C
C
103
star
15

dbusmap

This is a simple utility for enumerating D-Bus endpoints, an nmap for D-Bus.
C
76
star
16

scanlimits

Tool to examine the behaviour of setuid binaries under constrained limits.
C
62
star
17

katamascii

An ascii-art physics puzzle, roll around your terminal collecting ascii-art objects!
C
43
star
18

timex

A hello world for the timex m851
C
31
star
19

minirun

Run commands with hidden console.
C
30
star
20

iknowthis

iknowthis Linux SystemCall Fuzzer
C
20
star
21

hiewdocs

Documentation and notes on using the Hiew editor.
HTML
17
star
22

mpgravity

MicroPlanet Gravity
C++
14
star
23

nssecurity

Netscape Plugin Security
C
8
star
24

defermap

Add a server mode to X11 clients
C
7
star
25

hiewkey

Keyboard helper for Hiew
C
4
star
26

wpdfilter

Enable Windows to Index WordPerfect UNIX Documents
C++
3
star
27

ncpro

Commandline Interface to NoteCase Pro
Shell
1
star
28

stfjson

Convert Lotus Agenda STF files to JSON
C
1
star