Jump to content
IGNORED

raspberry pi and emulation


Shift838

Recommended Posts

Hi Chris,

 

this is difficult to answer. First, as I said in some occasions, the Raspberry Pi and other "small" devices are no target platforms for MAME/MESS. This essentially means that no efforts are spent to make it run smoothly on those platforms. As MAME and MESS are intended to achieve an emulation level close to the hardware, we grab any bit of performance that we can get. The only consideration is that it should run well enough on current, common PCs or laptops. (Well, there are other games for the PC that won't run smoothly on highest detail level on any platform you can get at this time running, so it's not that bad.)

 

Second, I'm not sure whether the required libraries (like for SDL2) are available on the Raspi. I already asked on the MESS forum whether someone tried to build it for Raspi, and the answers are similar: you won't like it. However, it's not a proof that it won't work. Only that people believe I won't like it.

 

There are versions around that are said to run on the Raspi or also on tablets. These are no official releases and are possibly far behind the current release level. This means that possibly none of the bugfixes of the last years are included, and the usage experience may be much different.

 

If you get it going on Raspi, I'd be strongly interested in your experiences.

Link to comment
Share on other sites

If you're only interested in getting a TI emulated on the Raspberry Pi and MESS turns out to be too heavy, I can recommend ti99sim. It's not nearly as faithful an emulation as MESS is, but for most everyday scenarios (running games, etc...) it should be good enough. It was semi-recently updated with explicit Rpi support: http://www.mrousseau.org/programs/ti99sim/

  • Like 2
Link to comment
Share on other sites

I just downloaded the sources for AdvanceMESS from SourceForge. The sources are from 2005. That is, literally nothing of my works since 2007 is included, including the fixed for the broken floppy system (as it was from the version 0.97 to 0.114). Not recommended for use, I'd say.

Link to comment
Share on other sites

If you're only interested in getting a TI emulated on the Raspberry Pi and MESS turns out to be too heavy, I can recommend ti99sim. It's not nearly as faithful an emulation as MESS is, but for most everyday scenarios (running games, etc...) it should be good enough. It was semi-recently updated with explicit Rpi support: http://www.mrousseau.org/programs/ti99sim/

Some of us are linux newbies. Any chance of walking us through how to install and use TI99sim? It looks interesting, but I don't understand the process for installation.

Link to comment
Share on other sites

Some of us are linux newbies. Any chance of walking us through how to install and use TI99sim? It looks interesting, but I don't understand the process for installation.

 

Sure. Can you tell me which Linux distribution you're using?

 

I'll take the assumption that you're using a debian-based distro (like Ubuntu), since that's what I know best, but most of this stuff will be generic enough to work in other environments as well. Only when you need to install dependencies you might need to do something specific for your distro.

 

The good thing about ti99sim is that binaries for Linux are provided, so all you need to do is make sure you have the right dependencies installed (more on that later). So in most circumstances it's simply a matter of downloading one of these packages:

http://www.mrousseau.org/programs/ti99sim/archives/ti99sim-0.0.12.i386.tar.gz

http://www.mrousseau.org/programs/ti99sim/archives/ti99sim-0.0.12.amd64.tar.gz

http://www.mrousseau.org/programs/ti99sim/archives/ti99sim-0.0.12.armhf.tar.gz

 

Which one to choose depends on your machine. The first one will work on almost any PC-class device, the second one only on 64bit machines with a 64bit OS installed. The last one is specifically for ARM devices such as the Raspberry Pi.

 

Once downloaded, all you need to do is unpack the archive and check your dependencies. Unpacking is easy enough as most Linux distro's come with a nice UI program for that (just double click the archive), but you can also do it in a terminal. The benefit of the terminal is that it works exactly the same in every distro, while the UI program can differ ("Linux" is not a single OS, just the kernel. The different distro's ship with different user-space programs to round out the full OS functionality).

 

So in a terminal, go to the directory where you've downloaded the tarball and unpack it:

# cd ~/Downloads/
# tar -xvzf ti99sim-0.0.12.i386.tar.gz
# cd ti99sim-0.0.12

At this point, you need to prepare the roms for the emulator (like MESS, ti99sim doesn't have a license from TI to redistribute the roms, so you have to do this manually). Unfortunately, I remember this process being quite convoluted and I don't have a Linux PC at hand to do this step by step, so I might be making some mistakes here...

 

Anyway, the author of ti99sim suggests taking the 994a.bin file from a working v9t9 install, but you can just as well take the ti99_4a.zip file from a MESS install, unzip it and convert them to ti99sim format using the supplied convert-ctg program. I haven't tried this, but I believe this should do the trick (assuming the ti99_4a.zip file is in the ti99sim folder):

# unzip ti99_4a.zip
# ./convert-ctg 994a.bin
# mkdir -p ~/.ti99sim/roms
# mv 994a.ctg ~/.ti99sim/roms/TI-994A.ctg
This should get you a base system up and running, with 32k, but without disk or speech support (those need separate roms). By the way, you'll notice that I'm using 994a.bin in the command there. This is because of the way the convert-ctg program works: if you have a set of roms that exists of multiple components (in this case, a ROM and a GROM set), you only supply the part of the file name (plus the extension) that is the same across the different files in the set. convert-ctg will then find the right files to create the .ctg file.

 

So let's see if we're missing dependencies. The simplest way to do this, is to just try to run the damn thing:

# ./ti99sim-sdl

If this runs, your system has all the required libraries installed, if you get an error along the following lines:

./ti99sim-sdl: error while loading shared libraries: libsdl-1.2.so: cannot open shared object file: No such file or directory

that means that you don't have SDL installed (SDL is like DirectX on windows, an input+graphics library for games and other multi media programs). This is where the install procedure of your specific distro comes into play. On a debian-based distro, you would then simply issue the following command:

# sudo apt-get install libsdl-1.2 libcrypto

It'll ask you for your password and will install the two packages listed (libsdl-1.2 and libcrypto), which next to the basic stuff that every distro has by default should be all that is needed. While normally those should be enough, it might throw more errors in case there are more dependencies. Then, you just need to go over each missing library it reports and install them using the same mechanism one-by-one. Usually the name of the package (in the "apt-get install" line) is the reported missing filename up to the .so part. So, for libsdl-1.2.so this becomes libsdl-1.2. There might be small deviations on this, in which case you will need to search your package manager for the right package by hand, or do a Google search.

 

Now try running it again (./ti99sim-sdl) If this works, and you want disk support, do the exact same thing as with the console roms: locate the zip file with the rom in your MESS install, unzip it and run disk.bin through the convert-ctg program, taking note to add the -cru=1100 flag to the command line (this is needed for DSR's). Then copy to the ~/.ti99sim/roms directory and rename it ti-disk.ctg. like so:

# unzip ti99_fdc.zip
# ./convert-ctg -cru=1100 disk.bin
# mv disk.ctg ~/.ti99sim/roms/ti-disk.ctg

The emulator also does not support rpk's like MESS or js99er, so you will need to convert these manually as well. The process is much the same, and it uses the same convert-ctg program. The biggest difference is that cartridge files need to go into the ~/.ti99sim/cartridges directory instead of roms. Other than that the process is the same as for the roms we did (without the -cru flag, obviously).

 

ti99sim will report which roms it has found on start-up and if there are any problems with them, so if anything fails that's the first thing to investigate.

 

I know it's very convoluted, but it is all due to the fact that we need to create the roms. Unfortunately I don't have my Linux box set up, otherwise I could've simply attached the roms to this post and told you where to copy them. I would recommend that the first person who goes through this process does just that :).

Edited by TheMole
  • Like 1
Link to comment
Share on other sites

  • 5 weeks later...
  • 1 month later...

Somehow, I can't imagine it'd be quick enough for the emulation to work at full speed under wine.

 

Could the code (for ti-99sim) be recompiled to make more efficient use of the new ARM CPU on the Raspberry Pi 2? I notice there are Make files present. It would be nice to have the extra grunt of the Pi-2 behind this.

 

I've just unpacked ti99sim-0.0.12.armhf.tar.gz on my RPi2 and the console version runs without reporting missing dependencies but complains about missing ROMs.

Edited by UKRetrogamer
Link to comment
Share on other sites

I am running V9T9 V6.0 under dosbox on a Pi 2. It seems to run fine with only the occasional keyboard lag-can't type too fast. I had a lot of trouble with ti99sim. The convert-cfg would't convert the roms. I had to download version 0.0.11 in ubuntu and run the convert then copy the roms over. I still couldn't find cartridge files that would convert and work so I gave up.

Link to comment
Share on other sites

I've just unpacked ti99sim-0.0.12.armhf.tar.gz on my RPi2 and the console version runs without reporting missing dependencies but complains about missing ROMs.

 

It doesn't come with its own set of ROMs like Classic99 does. Did you try the procedure I outlined in my (way too long) post above, with the MESS ROM package?

Link to comment
Share on other sites

There is a version of MESS for the CoCo computer that runs on the RPi. Apparently it was a customized version. If they could do it for the CoCo, why can't we have it for the TI :?

 

 

I am running V9T9 V6.0 under dosbox on a Pi 2. It seems to run fine with only the occasional keyboard lag-can't type too fast.

 

That's probably the best option available at the moment, although far from optimal given that one needs to modify the cfg file every time a new disk is needed etc...

Link to comment
Share on other sites

There is a version of MESS for the CoCo computer that runs on the RPi. Apparently it was a customized version. If they could do it for the CoCo, why can't we have it for the TI :?

 

I'm currently trying to get a MESS working on a Raspi; I still have to find out why the audio system triggers a segfault.

 

I don't have a good overview about the CoCo emulation depth, but I suppose there is a significant difference:

 

 

michael@capella:~/mess> ./mess64 coco -nothrottle
Average speed: 4743.83% (270 seconds)

michael@capella:~/mess> ./mess64 ti99_4a -nothrottle
Average speed: 574.10% (49 seconds)

 

which means that the CoCo emulation takes much less CPU power.

 

This should be due to the fact that I emulated the TI system much closer to the signal level; in particular, the TMS CPU emulation is based on a microcode interpreter with detailed wait state and signal line operation.

  • Like 1
Link to comment
Share on other sites

 

I'm currently trying to get a MESS working on a Raspi; I still have to find out why the audio system triggers a segfault.

 

I don't have a good overview about the CoCo emulation depth, but I suppose there is a significant difference:

michael@capella:~/mess> ./mess64 coco -nothrottle
Average speed: 4743.83% (270 seconds)

michael@capella:~/mess> ./mess64 ti99_4a -nothrottle
Average speed: 574.10% (49 seconds)

which means that the CoCo emulation takes much less CPU power.

 

This should be due to the fact that I emulated the TI system much closer to the signal level; in particular, the TMS CPU emulation is based on a microcode interpreter with detailed wait state and signal line operation.

 

Thank you for your efforts on this! It will be quite the achievement to run it on the RPi for sure...

Link to comment
Share on other sites

  • 2 weeks later...

And now the bad news. Although runnable, MESS is unusable on the Raspberry Pi. See the two screenshots below.

 

On the first ("1") you see that after terminating MESS, the average speed is calculated and shown. You see that the Raspi is lightyears (maybe even parsecs :) ) away from a usable performance; 2% is even slower than I expected. Simply said, it must be at least 50 (!) times faster.

 

A lot of performance is lost by the screen and audio updates. The screen is redrawn every 60th of a second, which means we need a high 2D performance; 3D performance does not count.

 

I found some recommendations concerning the SDL library. One way to speed up things is to build SDL without X support, thus forcing it to work with the framebuffer device.

 

In order to avoid video and audio slowdown I started MESS with the arguments "-video none -audio none". Hence, the MAME core skips all video and audio processing. The result can be seen in the second screenshot ("2").

 

You see that although we have no video and audio output, the performance is calculated as 20.71%. This means that the emulation itself requires the Raspi to run at least five times faster than it does now. Probably this can be achieved with the Raspberry Pi 2, but still we have the heavy performance impact by video and audio.

 

On the bottomline, sorry. No way.

post-35000-0-36670300-1426098856_thumb.png

post-35000-0-92070100-1426098861_thumb.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...