Skip to content

Latest commit

 

History

History
124 lines (111 loc) · 18.2 KB

README.md

File metadata and controls

124 lines (111 loc) · 18.2 KB

Running LOTUS 123 v4.2 spreadsheet software on the reMarkable tablet, via BOCHS emulator

See it in action on reMarkable 1:
https://www.dropbox.com/s/nvuqo4zncsqhizt/YouCut_20221107_222834913.mp4?dl=0
https://www.dropbox.com/s/dwr0lfvecjm23te/YouCut_20221109_002503546.mp4?dl=0
See it in action on reMarkable 2:
https://www.dropbox.com/s/ywzghewt1q2dfax/YouCut_20221109_005323969.mp4?dl=0

Shortcut for running FreeDOS on reMarkable, with CDROM support already enabled
You can download the pre made zip file of FreeDOS from this repository (It's free open source software). I made it so that it will run without problems on your reMarkable, but you still need an hacked reMarkable with Toltec repository, and install BOCHS via opkg install bochs, upload files with scp on your reMarkable, put them into a folder, and run from this folder bochs -q -unlock -f bochsrc. It has CDROM support already configured, by modifiyng the bochsrc file, you will be able to mount a regular ISO file, and install whatever DOS program you want, skipping part of this guide (DOS skills still required). bochsrc included in zip file is commented to help you mount a cdrom image. If you want to create an app on the oxide launcher, to launch your FreeDOS from reMarkable, skip to the reMarkable section of this guide to understand how. Please note: zip file in this repository does not contain the Lotus software, just an optimized version of FreeDOS!

Disclaimer

Everything is published 'as-is', no responsability taken. Some steps may be different depending on your setup, please consider this as a general, inspiring, not detailed guide. I am not a coder, just an enthusiast linux user with some (few) skills, please understand.

FreeDOS is under the GNU General Public License

Background

As a reMarkable user, I always wanted to get some useful apps to expand my possibilites, a spreadsheet is what I needed more as a teacher. Unfortunately, there's still no native spreadsheet app for reMarkable, except for some linux software like "SC", but didn't want to get crazy porting it on reMarkable. But, what about emulating DOS on reMarkable via BOCHS and getting back to the old good 90's? :)
BOCHS is available on reMarkable thanks to Toltec repositories, Lotus 123 was a powerful piece of software I used back in school, and I still got a license, so why not? :D

Lotus 123 has everything you can expect from a spreadsheet, like formulas and charts, it is useful both for basic and advanced use and it can compete with modern spreadsheet software easily!

Proof of concept, or a real solution?

I understand that for some users it's a proof of concept, or just not appealing. Some will not find useful to have a spreadsheet running this way. For me it has been life changing... A simple scenario: student breaks into my coffee time, test in hand. He complains about his results, and ask me to check points if it's alright. I open my reMarkable, insert test points into my pre-made spreadsheet, show him the right result in real time. No pc, no laptop, just my tablet I use everytime. Coffee is life :)

"Ok, but what about managing your spreadsheet via a tiny keyboard on reMarkable?"
A regular calculator has smaller buttons, but no one complains :) plus, I usually connect via SSH, run Lotus, and set up some pre-made spreadsheet in a more comfortable enviroment. Data input on reMarkable, once my spreadsheet is made, is not hard to manage. reMarkable native UI for regular use can be as tricky as input numbers on the yaft (Yet Another Finger Terminal) keyboard.

"You miss some new formulas modern spreedsheet have" - "Excel is much better, just use your laptop"
Obviously, it can't be a replacement for Excel or modern spreadsheet solutions running on a regular pc/laptop. If you do extensive use of spreadsheets for your job, how can a reMarkable (spreadsheet) can be useful? There are some situations where you just need a help for simple calculation, for me it means: test results, absence count, and other things a teacher may need, that do not require a full Excel installation, complicated formulas or top performances.

"reMarkable is made for paper people, why do you want to run a spreadsheet on it?"
reMarkable changed my life as a teacher. It hosts all my student's books, annotated pdfs of my slides, my mental maps to use in class, class register, my timetable, meeting notes, I write on it everytime and mostly use it as real paper. I just needed a little more spreadsheety tablet, to fill the gap in some situations. Why run a whole operating system on pc, or boot my laptop with its times, when I can automate simple calculations I need on my reMarkable, which is always in my hands?

"How long did you take to get this? Is it worth it?"
Geek/Nerd people would answer yes.. It took one day to get things done, but nevermind, nerd nature is stronger: we can work one day, to get a daily 5 minutes time save the rest of our lives. It's all about being nerd. Are you? :)

Requirements

  • The reMarkable Tablet (1 or 2) and a motivated person, nerd-like guy/girl/* should be fine
  • Basic reMarkable hacking: Toltec repository, oxide laucher, yaft, simple, ssh access to the thing
  • A linux box + Virtualbox and relative tools
  • Lotus123 2.4 disk images and a valid license, if possible ;)
  • The BOCHS emulator (available on Toltec repository)
  • A minimal FreeDOS running copy on BOCHS (reMarkable side)
  • A full FreeDOS running copy on Virtualbox
  • I have no time to get technical enough, so you will also need: Basic linux, DOS, Virtualbox and BOCHS knowledge, or google skills.
  • A decent amount of coffee and time to debug BOCHS laziness in seeing your imgs as drives :O

    Why Virtualbox

    Lotus 123 v.2.4 comes in 9 parts, 5.25-inch disk setup. I first tried to extract images to create a new one to run in bochs, but Lotus is a bit choosy, it will not install this way, and something like a bad error happens. Here's why Virtualbox, it lets you mount floppy images on the fly, BOCHS doesn't (or I don't know how to easily do it in a text enviroment, anyway..).

    First steps

  • Install Virtualbox on your machine (use your favorite package manager), create a DOS machine on Virtualbox and a virtual drive. I suggest not an expandable one, but fixed, because when you will convert your disk into a BOCHS readable img it may be BIG. So, no 1gb expandable drive just to have 200mb of software in it, or you'll get a 1gb image. Choose a small size, you can expand it with bximage later on your reMarkable directly.
  • Mount a FreeDOS 1.3 LiveCD on Virtualbox https://freedos.org/download. Start the machine booting frome livecd, and follow the instructions to install FreeDOS on your virtual drive.
  • Install BOCHS on your reMarkable. You must have toltec repositories (instructions on how to install the repository on your reMarkable at https://toltec-dev.org). Ssh into your reMarkable and type:
    opkg install bochs
    to get it.
  • Download the pre-made FreeDOS image for BOCHS, it works out the box on your reMarkable! (https://sourceforge.net/projects/bochs/files/Disk%20Images/FreeDos/) we will upgrade it later.
  • Scp it to your reMarkable:
    scp fdos-10meg.tar.gz root@your-remarkable-ip:/home/root
  • ssh to your reMarkable and extract your FreeDOS
    tar xfvz fdos-10meg.tar.gz
    files should be extracted into freedos-img folder, get into the folder try if it works:
    bochs -q -unlock -f bochsrc
  • Please note: in bochsrc the option display_library: term is mandatory, or BOCHS won't start!
  • Google for your Lotus123 v2.4 images, extract files on your linux box. Don't violate copyright doing this, make sure you have a license.

    Installing Lotus in Virtualbox machine

    Mount the first Lotus disk on Virtualbox and start your FreeDOS virtual machine, then move to your a: drive and start the installation process a: -enter- install -enter, this way Lotus choosiness goes away, but it will ask you further disks, which you will mount on the fly with Virtualbox until you reach disk9 and complete the installation. Oh good old msdos times...

    Now you have a working FreeDOS machine in Virtualbox, with a Lotus copy installed upon, try if it works locally and stop your virtual machine.

    Converting Virtualbox VDI virtual drive, and why

    Ok, we have choosiness in the installation process by Lotus, but also I failed several times trying to get my Lotus into BOCHS. bximage which creates BOCHS images was not a thing for me, I am too lazy to be able to write into those read only images. Other methods went into failure, I will not get into this, still hurts... So I just converted my Virtualbox VDI disk with all software and system, into an IMG file to be used into BOCHS. Then I updated my FreeDOS installation on BOCHS, also because the full image can't be read by the emulator - almost in my case.

  • Use Virtualbox tools to convert your Virtualbox VDI disk image:
    vboxmanage clonehd --format RAW source.vdi destination.img
    where "source" is the name of your virtual hard drive on Virtualbox.
  • Rename your destination.img, let's assume file.img, and scp it to remarkable:
    scp file.img root@your-remarkable-ip:/home/root
  • On reMarkable, move file.img in your freedos-img folder:
    mv file.img freedos-img
  • Modify yourc bochsrc configuration file to include a new drive:
    ata0-slave: type=disk, path=file.img, type=flat
  • Run BOCHS on reMarkable via ssh and cross your fingers. If you can access your new drive with the DOS command d:, you are almost done, else let me know if you had enough coffee and time to debug the issue :)
  • Copy all the content of disk d: into disk c: and you are done. xcopy is not available on the basic FreeDOS image, so it will be a lot of fun in typing "mkdir" and "copy" until done. This is where basic DOS commands skills are needed. Anyway, on your disk image from Virtualbox you should have xcopy: don't do like me, copy it on c: first ;)
  • Reboot your BOCHS machine and try using Lotus from ssh (suggested: run INSTALL into the Lotus folder, you will have to try different graphic settings for it to work correctly)

    What if BOCHS doesn't eat my image?

    Try another way, hack into BOCHS by mounting on drive a the FreeDOS 1.3 Floppy Edition, in bochsrc set the boot drive with boot: a, reboot from a:, copy the system from a: to c: overwriting the existing FreeDOS system, stop the machine. Get back to bochsrc to modify again the boot order, and boot from c: once done to test it out. You should have a better enviroment now with some drivers, and -fingers crossed- mount via bochsrc your own converted image, and even mount iso images as cdroms (see BOCHS documentation).

    Other method to exchange files
    Put your desired files into a folder, create an ISO image with mkisofs and mount it with BOCHS (FreeDOS must be previously upgraded to get a cdrom driver, or booted via floppy edition).

    Use the shortcut solution
    Download the premade zip file in this repository, it is configured with cdrom support. Please note that Lotus requires the Virtualbox procedure, you won't be able to install Lotus this way, but most software will just work if copied to your c: drive from a mounted ISO image. You always can convert your VDI as described, mount the image on your box, obtain an ISO of your Lotus installation out of it, and use it with BOCHS.

    On reMarkable

  • scp to reMarkable both dos.sh and startdos.sh on /home/root.
  • dos.sh a simple "app" for reMarkable, it uses the "simple" scripting language, if you didn't installed it in your previous geeky journeys, do it with:
    opkg install simple
  • startdos.sh a basic shell script called by dos.sh to run your VM under yaft. I prefer this than a direct command in dos.sh, so that I can launch my VM via ssh with no need to write the whole BOCHS command.
  • Now you must register the new app to be seen by oxide launcer. In your reMarkable type
    rot apps call registerApplication 'QVariantMap:{"name": "FreeDOS", "bin": "/home/root/dos.sh"}'
  • Refresh oxide apps on your reMarkable: you now should see the FreeDOS icon, by tapping it yaft comes up, and the BOCHS emulator starts your FreeDOS machine on the reMarkable.
  • Season it as you like, I made a simple 123.bat file to launch directly Lotus, or you can add a command in your FDAUTO.BAT to autostart it.

    Very, very basic troubleshooting and infos

  • BOCHS with FreeDOS is choosy, due to limitations both of BOCHS and FreeDOS (more on the last), it may be needed to use fdisk into your reMarkable DOS box, to create partitions, than load back the img to Virtualbox to exchange files betweeen you and your newborn reMarkaDOS. Mounting a regular ISO image should also work (See above).
  • FreeDOS in BOCHS doesn't eat disk images always the right way, it has to do with disk geometry, don't try to mount big images, it's DOS..
  • Once you run a full copy of FreeDOS on BOCHS you will be able to mount almost everything, cd images included... since then, you will have to struggle to make BOCHS eat your images :(
  • Lotus startup will be a little bit slow, depending on some BOCHS settins i found (see down). Tap two or three times -enter- and -space- and don't panic, just wait. Once run, I usually leave this in background, so tapping again the FreeDOS icon will bring it back immediatly when needed.
  • If you arrange your startup files in dos (exclude cdrom drive -comment the "call CDROM.BAT" line-, optimize the boot process in general) BOCHS will boot -obviously- faster.
  • Be careful: if you install the WYSIWYG addon during the installation process (like I did) your Lotus won't start on reMarkable. If you did this mistake, delete all the WYSIWYG files in the Lotus folder (i didn't delete the WYSIWYG folder indeed, just the files). This way you will get an error (See files or attached video), just press ESC and work. If you want to bypass the error, delete also the 123.cnf file, and Lotus will start without errors, just a little bit slower.
  • Graphic issues: try to f-ck around with INSTALL.EXE, try different graphic settings and you will be fine!
  • I managed to attach a virtual ethernet in BOCHS, then I tried to configure BOCHS to use reMarkable dhcp server running for usb interfaces, with still no results. It is not so necessary, but it would be fine to dowload dos software directly from your reMarkaDOS with the LINKS browser ;) let me know if you can.
  • Some dos software require a mouse or it will not run. FreeDOS offers "cutemouse" software, but everything I tried resulted only in a mouse recognized by FreeDOS, with no results while running on the reMarkable tablet. So forget this mouse based software, and have fun with the tiny yaft keyboard :(
  • If you set too much memory, cores or ips on your BOCHS machine, Lotus startup will be even slower (!), in my setup 512 megs even prevent BOCHS from booting. I found out that
    megs: 320
    vga: extension=vbe, update_freq=5, realtime=1
    cpu: count=2, ips=25000000
    works just fine for me, and Lotus starts up more quickly!
  • Easter egg: in Lotus 123 the 3 reMarkable buttons work, the middle one brings you to the first cell, the side buttons lets you move left and right through cells and menu. Nice, isn't it?

    How to stop BOCHS once launched?

    Via terminal:

    ssh again to your reMarkable and kill BOCHS, or install tmux to have access a second shell if you run your Lotus via ssh. A simple script to get the PID and kill it right away is included in the repository.

    On reMarkable:

    simply kill your oxide FreeDOS app the regular way (long press on icon and kill button), BOCHS will die too.
    Due to the command line options, BOCHS will ignore .lock files remaining when BOCHS is killed, so it can start again the next time without lock errors.
    Note: you can leave it running, it will not impact on your device performance, plus, once you tap again on the FreeDOS icon the same istance will come back, without running a new one. I usually leave it open once rM starts, and use it throughout the day.

    Just to be clear

    I could simply upload the BOCHS c: drive image of my full system, and let you run it without any fuss on your reMarkable, but... no? I just can't spread copyrighted software. Anyway, you can of course backup the c.img file to restore it in case of an update or else, or just to put it into another rM of your own. To backup your setup, just use scp: scp "root@your-remarkable-ip:/home/root/freedos-img/*" . (don't forget the last dot).

    Other DOS software I managed to run on reMarkable:

  • Wordstar Professional 4:
    https://www.dropbox.com/s/6evvrcgn3e6s5kw/ws1.jpg?dl=0
    https://www.dropbox.com/s/i16kbc7x19qr9gw/ws2.jpg?dl=0
  • DOS Edit and Ospedit (open source version of Edit):
    https://www.dropbox.com/s/0cnm2bjipzaq961/ospedit.jpg?dl=0
  • MS Word 5.0:
    https://www.dropbox.com/s/77ww4c0ndrh4by7/word5.jpg?dl=0
  • CAL2 - Yearly calendar
    https://www.dropbox.com/s/kzk4b04ag6pzkyu/cal2.jpg?dl=0
  • QBASIC
    https://www.dropbox.com/s/fiz52l6jcn7o15r/qbasic.jpg?dl=0
  • Borland 4 pro 4
    https://www.dropbox.com/s/nntw4t5zyfz2f7r/4pro.jpg?dl=0
  • Wordperfect 5.0
    https://www.dropbox.com/s/x6scn0bul4qtr6w/wp5.jpg?dl=0
  • Norton Classic Editor
    https://www.dropbox.com/s/nlxt0xellsltc6h/nce.jpg?dl=0

    More to come...

    Enjoy.
    Gat.