There have been some recent posts about emulating different TI (or other) calculators on the Raspberry Pi (raspi). I want to collect the information that we have into a single thread, including best practices for bringing some of these old projects into this decade.

Here are the emulators that are known work locally on the Raspi (at least in some capacity), and I go into the build process for these in this thread:
TilEm http://lpg.ticalc.org/prj_tilem/
CEmu https://github.com/CE-Programming/CEmu
firebird https://github.com/nspire-emus/firebird
TiEmu http://lpg.ticalc.org/prj_tiemu/

Interestingly, firebird is on openSUSE's build service, and there is a Raspberry Pi build option, worth giving a try.
https://build.opensuse.org/package/show/home:Vogtinator:firebird-emu/firebird-emu

Here are some simulators/emulators that run in a web browser, and do not require and internet connection. They run on the Raspi, but performance is not perfect.
NumWorks https://www.numworks.com/simulator/
emu68k https://tiplanet.org/pad_ti68k_emu/ https://tiplanet.org/emu68k_fork/

Over the next few posts, I will attempt to install/build these emulators on my Raspberry Pi 4B, documenting my struggles and breakthroughs.

Can jusTIfied run in an offline mode? Like, just from html/js?

If anyone knows of any other emulators that have Linux source available to build, please recommend them!



Loading the Numworks simulator in the browser is pretty straightforward, though every keypress results in a 1-2 second wait before anything happens on screen.



I have tried the NumWorks simulator in Midori, Chromium, and Luakit. Chromium performed the worst, Luakit the best.

I could not get jsTIfied to display anything after the initial flash of gray after loading a ROM, neither on Chromium nor on Midori. Perhaps I am just not waiting long enough?



Kerm, you mentioned having loaded jsTIfied on a Raspi before, what browser were you using, and what was the performance like?

Firebird Emu installed just fine from the openSUSE apt repo. I don't have a CX or CX CAS (though I do have a CX II CAS), so I *achem* acquired the needed Boot1 and Flash files (though I don't think they are complete and working properly). It begins emulation, states it's running at around 30% speed. I will need to rip my own ROM to test thoroughly, anyone have a CX or CX CAS they'd sell me?



Building the SDL version of CEmu was a sinch when following the steps that TheLastMillennial laid out in their recent forum thread: https://www.cemetech.net/forum/viewtopic.php?p=296905



Performance, again, is not too hot hovering around 8.4% emulation speed. I will try the Qt version of CEmu next.

So far, there have not been any good performers. I think this has to do with the very low CPU utilization going on with my Pi (you can see in the top-right corner of most screenshots). I may need to look into a hardware issue with my Pi setup, perhaps it is not receiving enough power...



Building Qt CEmu for the Rapsi was only marginally more involved than the SDL version.

To install the Qt5 SDK needed:

Code:
sudo apt-get install qtbase5-dev qtchooser
sudo apt-get install qt5-qmake qtbase5-dev-tools

Then some needed dev libraries:

Code:
sudo apt install libarchive-dev libsdl2-dev

And finally, cd'ing into the cloned git repo, "CEmu/gui/qt/": (This takes a while!)

Code:
qmake -r CEmu.pro && make
sudo make install


Now CEmu shows up in the Education section of the Applications menu!



And performance is looking good! The added functionality of the Qt version of CEmu is really a must-have!



Going into fullscreen mode does not work completely, it just renders the screen on top of everything else in the top-left corner. But other than that, this is full CEmu working on the Raspberry Pi!
Quote:
Can jusTIfied run in an offline mode? Like, just from html/js?

Yes, it can, and I've run it on a Raspberry Pi before.
CEmu's Linux builds are also on OBS: https://software.opensuse.org/download.html?project=home%3Aadriweb%3ACEmu&package=cemu
Oh, I did not know that, let's give it a try.

Running the commands for Raspian 11 from OBS results in the latest CEmu 1.3 being installed:

Code:
echo 'deb http://download.opensuse.org/repositories/home:/adriweb:/CEmu/Raspbian_11/ /' | sudo tee /etc/apt/sources.list.d/home:adriweb:CEmu.list
curl -fsSL https://download.opensuse.org/repositories/home:adriweb:CEmu/Raspbian_11/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_adriweb_CEmu.gpg > /dev/null
sudo apt update
sudo apt install cemu


Running "cemu" in the terminal launches CEmu v1.3! This is definitely the fasted way to get CEmu on your Raspberry Pi!

If you want the latest features from the non-yet-released CEmu development, then building from a Git clone is the only way.





Building and installing TilEm from source is not too difficult. Download the TilEm sources, and run these commands on the Pi:

Code:
tar xfvj tilem-2.0.tar.bz2
cd tilem-2.0/
./configure

From there, the configure script will tell you what packages need to be installed for a correct build.
In my case, I was missing gtk+-2.0, glib-2.0, and gthread-2.0. So, let's try installing libgtk2.0-dev:

Code:
sudo apt-get install libgtk2.0-dev


Running ./configure again, and now it says that ticalcs2, ticables2, tifiles2, and ticonv are not found. (At least we know the gtk-2.0 dependencies are met!)
These libti* packages are/were all part of TiLP. Let's see if we can get some of them installed:

Code:
sudo apt-get install libticalcs-dev libticables-dev libtifiles-dev libticonv-dev


Running ./configure again... and... success! No complaints from the configure script. The last line reads "creating config.h". Perfect.
Now, on to building TilEm: (This takes a while!)

Code:
make


This returns with an Error 2 code: '[...]/libm.so.6: error adding symbols: DSO missing from command line'. Looks like the linker is not finding all the right symbols in the right places. 'make clean' deletes the previous 'make' output. Now let's try something that lends to a more permissive view of the available symbols:

Code:
make clean
make LDFLAGS="-Wl,--copy-dt-needed-entries"


Nice! Now we get an output in the console of all the .o files generated. Last commands:

Code:
sudo make install
tilem2


And now TilEm pops up, prompting us to select a ROM image. Once you load a ROM, don't forget to load a skin.
Right-click on the screen, select Preferences. In the pop-up window, check 'Use skin', and select your skin file. TilEm comes with default skins in 'tilem-2.0/data/skins'





With TilEm, CEmu, and firebird-emu running natively, and NumWorks in the browser, there are already a lot of calculator emulation options for the Raspberry Pi.

I will try to get TiEmu working sometime soon. It should be possible, since TiEmu and TilEm are pretty similar (like how CEmu and firebird are similar).




TiEmu is not going as smooth.


Code:
tar xfvz tiemu.tar.gz
cd tiemu-3.03/
./configure


No package 'libglade-2.0' found


Code:
sudo apt-get install libglade2-dev
./configure


SDL version 1.2.0 not found


Code:
sudo apt install libsdl1.2-dev
./configure


WARNING libjpeg not found


Code:
sudo apt install libjpeg-dev
./configure


Qt (>= Qt 3.0.2) (headers and libraries) not found

This is where I am stuck.
Qt5 is installed, but the ./configure script was written before Qt5 existed.
I don't think that the latest Debian that Raspberry Pi OS Bullseye is based on supports even Qt4.8, let alone 3.0.2.
That's what you get for trying to build 13 year old software for an architecture that didn't exist until 2 years after it was written.

If anyone has any better ideas about getting TiEmu running on modern OS's, please chime in!

Lionel in IRC wrote:
You should probably run autoreconf -ivf before launching configure, too.
It's a good idea to collect these pieces of information Smile
Several improvement suggestions:

* do not rely on the Debian packages for libti*: build them from https://github.com/debrouxl/tilibs instead. The standard upstream build script is maintained inside the TILP repo, shortlinked as https://ti-pla.net/tilpinst .

* TilEm 2.0 is ancient by now, it's certainly best to try building the SVN version, where the -lm error you noticed is probably gone: https://svn.code.sf.net/p/tilem/code . ISTR about an issue with the latest revision, but some older ones - probably newer than the one I'm using, even - do work, at least on x86_64 computers.

* likewise for TIEmu, it's definitely best to build the version from https://github.com/debrouxl/tiemu Smile . I did it this week on a Debian sid amd64 install I had never built TIEmu on previously, for testing the set of key bindings modified (and fixed) by Zeroko. The arm64 build should be going smoothly, as Debian packages TIEmu.
Be sure to use `./configure --disable-gdb`, as the GDB-enabled version is a mess (technically embedded forks of severely outdated versions of multiple other programs and libraries, stiched together by a fragile build system and a weird mix of event loops). Romain was entirely right about insisting that the GDB version be optional, at the cost of some complexity: the result is that ~15 years later, there remains a usable version of TIEmu Smile

* https://tiplanet.org/pad_ti68k_emu/ is an online + offline emulator created by Patrick Davidson and improved by myself; https://tiplanet.org/emu68k_fork/ has improved UI.
Hey Lionel! Thank you for this information, I was not aware of the updated code for these projects.

Let's go through the process of building the latest libti* packages, TiLP, TilEm, and TiEmu, specifically on a Raspberry Pi running Raspberry Pi OS (Bullseye).

Start simple, apt update and upgrade

Code:
sudo apt update
sudo apt upgrade


According to TiLP install script https://ti-pla.net/tilpinst, we need to grab necessary Debian packages for the build.

Code:
sudo apt-get install build-essential git autoconf automake autopoint libtool libtool-bin libglib2.0-dev zlib1g-dev libusb-1.0-0-dev libgtk2.0-dev libglade2-dev gettext bison flex groff texinfo xdg-utils libarchive-dev intltool


Now cd into the directory that contains the tilp install script, then run the script.

Code:
sudo chmod +x install_tilp.sh
sudo ./install_tilp.sh


Let's check that TiLP is installed and working. Plug a calculator into your Pi and run:

Code:
sudo tilp




'File'->'Change Device' if it doesn't automatically connect to your calculator.

Now libti* packages are installed, so let's get on to building updated TilEm and TiEmu.
Let's start with TilEm, it should be easier than TiEmu.

We need to install subversion to clone the SVN repo for the latest TilEm version from https://svn.code.sf.net/p/tilem/code.

Code:
sudo apt install subversion


We need a few more dependencies:

Code:
sudo apt install libreadline-dev libgtk-3-dev


Let's make a new directory to hold the TilEm source code, clone the SVN repo, then prepare to make.
I am going using revision 809, just change the @809 to your desired revision, or omit it for the latest (809 at the time of writing).

Code:
mkdir tilem_svn
cd tilem_svn/
svn checkout http://svn.code.sf.net/p/tilem/code/@809
cd code/trunk
autoreconf -ivf
./configure


If ./configure spits out any errors, fix them. Then run:

Code:
make
sudo make install


This will take some time. When this is finished, you should be able to run:

Code:
tilem2


Interestingly, the default skin for a TI-84+ SE is broken in this version, so let's change that.
Right-click on the window and select Preferences (also interestingly, the Preferences text is invisible...), then select the other TI-84+ skin.



It is possible that older revisions (other than 809) do not have the issue of rendering skins. The build process should be the same for older revisions, just change the @809 to something else.

Nice! Now we can now emulate the Z80 series calculators on our Raspberry Pi!



Now, let's try to build a new version of TiEmu. The latest source is available on GitHub https://github.com/debrouxl/tiemu. Go to ~, clone the repo, and cd into the trunk directory.
We also need to install the SDL (>=1.2) dependency.

Code:
cd ~
sudo apt install libsdl1.2-dev
git clone https://github.com/debrouxl/tiemu
cd tiemu/tiemu/trunk


Now, it is time to build. Be sure to configure with the --disable-gdb tag, since the gdb implementation of TiEmu was (15+ years ago) strung together with floss and propped up on toothpicks.

Code:
autoreconf -ivf
./configure --disable-gdb
make
sudo make install


Some skins need to be renamed, adding 'ti' before the model number. These skins are usually installed in /usr/local/share/tiemu/skins/

Code:
sudo cp /usr/local/share/tiemu/skins/ipaq_89.skn /usr/local/share/tiemu/skins/ipaq_ti89.skn
sudo cp /usr/local/share/tiemu/skins/ipaq_92.skn /usr/local/share/tiemu/skins/ipaq_ti92.skn


Again, this will take a while. Once that is installed, you can run TiEmu with:

Code:
tiemu





Nice! Now we can emulate the 68k series calculators on our Raspberry Pi.

As a note, there are some issues with skins for both TilEm and TiEmu. Building TilEm from the old 2.0 tarball (in my previous post in this thread) resulted in skins that work fine. I cannot build from the old TiEmu source, due to really outdated dependencies. I could not get any of the included skins for TiEmu to show up correctly, or even at all. The only noticeable change between loading different skins in the color of the rendered screen. This is likely due to a lot of the supporting files like images and man pages not being installed correctly. A further dive into the TiEmu source is required to assess a solution. There are also some errors in the console about ticables, so it's not all completely working. Again, more investigation is needed to resolve these issues.

If you need to run a 68k calc emulator on a Raspi with a working skin, then the online emulators that Lionel linked in the previous post do work in the Midori browser. The Javascript emulator runs at about the half-speed of TiEmu.

Looks alright, except for the fact of running TILP as root Smile
Installing the udev rules as described in the CONFIG file, pointed by install_tilp.sh when it finishes executing, is the way to go.
Ah, will do. I'll get the udev rules implemented and update the above post accordingly.

Any tips on getting the skins to load correctly? None of the skin graphics are loading for TiEmu, and TilEm has weird scaling/placement issues depending on window size.
I don't know what's going on with the TIEmu skins on your side. When I built it several days ago, the 89T skin loaded as it should. I / we will have to investigate Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement