Jump to content
Sid1968

Installation Guide: How to run the TI-99/4A MAME Version on a Raspberry Pi 4

Recommended Posts

Posted (edited)

Hi Guys,
I would like to use your help to create at this place a guide to get the TI-99/4A version of MAME up and running on a Raspberry Pi 4.

My ideal would be an autoboot start screen in which you have one of the following options:

1.) Extendend Basic (both the cartridge as well as 32KB RAM and a save diskette should be available)

 

2.) RXB (the cartridge as well as 32KB RAM and a save diskette should be available)

3.) fbForth (the cartridge as well as 32KB RAM and a save diskette should be available)

4.) p-code (both the cartridge and 32KB RAM and a save diskette should be available)

5.) Start a cartridge (A selection screen should appear here, with which you can select a cartridge from the "cartridges" folder.)



I myself have no idea how to get such a start screen under Linux nor how the 5 start scripts should look like. I need your help.

 

 

But at first i describe how to bring mame to Raspbian Buster on a Raspberry Pi4:

---------------------------------------------------------------------------------------

 

I) First download the version "Raspbian Buster with desktop and recommended software" here: https://www.raspberrypi.org/downloads/raspbian/

 

Then write the image on a SD card, put the SD card in the Raspberry Pi 4 and start up. The computer boots up in the Linux desktop. Here open a shell and enter the following commands (at your own risk):

 

          sudo apt update && sudo apt upgrade -y && sudo apt full-upgrade -y && sudo apt autoremove && sudo apt autoclean

 

          sudo apt install libsdl2-ttf-2.0-0
          sudo apt install libqt5widgets5

 

          Firmwareupdate with: sudo rpi-update (NEVER TURN RASPBERRY PI OFF WHILE UPDATING FIRMWARE!)

          Bootloaderupdate with: sudo rpi-eeprom-update -a

 

          Do the configurations with: sudo raspi-config

          Activate Booting to cli

          Activate ssh for using putty which you get here: https://www.chiark.greenend.org.uk/~sgtatham/putty/

 

        For access via ftp to the Raspberry Pi install a ftp-server: sudo apt install vsftpd

 

        Now the ftp-server needs to be configured:

        This opens the configfile with nano-editor: sudo nano /etc/vsftpd.conf

 

        This must be set:

        anonymous_enable=NO
        local_enable=YES
        write_enable=YES

    

        This must be added:

        download_enable=YES

 

        After that save the config file with STRG+O and leave the editor with STRG+X

 

        Then give your Raspberry Pi a: sudo reboot

 

II) Mame Installation

 

The latest MAME version is now downloaded here: https://ftp.whtech.com/emulators/MAME/ti99/raspbian/


Unzip the zip file and copy the tar file created in this way with an FTP program to the folder "/home/pi /mame", which you have to create manually beforehand.

On the Raspberry Pi you will find yourself in the folder "/home/pi" after booting up. Enter the following commands here:

          cd mame

          tar xfv mame0218b_ti99_raspbian32bit.tar
          (The tar file can have a different name depending on the version)

          ./mameprep


That would install MAME. Do you have an idea how to proceed now, so that the goal described above can be achieved?

 

 

Cheers

Sid

 

 

P.S: NATURALLY THE MENU CAN ALSO BE EXTENDED TO YOUR WISHES, e.g. WITH ADDITIONAL PROGRAMMING LANGUAGES.

This could get the programmers AND gamer heaven.

Edited by Sid1968
  • Thanks 1

Share this post


Link to post
Share on other sites

I suppose you think of a screen with some starter icons, i.e. "Extended Basic". The mameprep script creates shell scripts that start MAME with specific configurations. You only need to put desktop icons on the screen.

 

On Raspbian you typically have LXDE as the desktop manager. Maybe have a look at some resources on the web concerning "create desktop shortcuts".

 

I don't have much experience in that, otherwise I'd directly tell you. I'm using a different desktop manager (KDE Plasma).

Share this post


Link to post
Share on other sites
Posted (edited)

I boot into cli... there is no desktop anymore after the first reboot. This should be scripts that can be startet on a linux-startup screen. For me this is the cleanest way, because the user wont see anything of a Linuxdesktop, he only sees TI-99 stuff. So PLEASE lets talk about that way. Do you know how the startscripts must look like? (Remember this is Raspbian Buster Linux)

Edited by Sid1968

Share this post


Link to post
Share on other sites

If someone is going to create the scripts, etc., add the Geneve with a script of this type of configuration:

 

mame64 geneve -peb:slot4 memex -peb:slot5 tirs232 -peb:slot8 hfdc -peb:slot8:hfdc:h1 generic -peb:slot8:hfdc:h2 generic -peb:slot8:hfdc:h3 generic -peb:slot8:hfdc:f3 525dd -peb:slot8:hfdc:f4 525dd -hard1 Bootdisk1.HD -hard2 Bootdis1.HD -hard3 Bootdisk3.HD -flop1 DSDD1.dsk -flop2 DSDD2.hfe -flop3 DSDD3.dsk -flop4 DSDD4.dsk 
 

  • Like 1

Share this post


Link to post
Share on other sites

I just ordered my own Raspi4; the one I had was just borrowed from work. I'll probably be able to give more information in some days.

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

Good news dude.

 

In addition to my installation guide:

 

          Install the Midnightcommander: sudo apt install mc

 

          Create the folder BIOS in the root directory and copy the TI-Biosfiles there,

          that can be downloaded here: https://ftp.whtech.com/System ROMs/MAME/

 

Edited by Sid1968

Share this post


Link to post
Share on other sites
Posted (edited)
3 hours ago, Sid1968 said:

Install the Midnightcommander: sudo apt install mc

That old legacy clone from DOS times? :P

 

Linux users are known to make extensive use of the command shell, but ironically I'm gratefully doing those jobs on the graphical desktop. Of course, everyone shall use what suits best. Maybe I left DOS/Windows too early to learn about the pros of Norton Commander.

Edited by mizapf
  • Like 1

Share this post


Link to post
Share on other sites

Can the TI-99/4A MAME version work on a Pi 3B+?

Don't own a Pi 4, but i may have to consider one now.

Share this post


Link to post
Share on other sites
3 hours ago, jrhodes said:

Can the TI-99/4A MAME version work on a Pi 3B+?

Don't own a Pi 4, but i may have to consider one now.

work? sure..  work at full speed?  no

 

 

Share this post


Link to post
Share on other sites
Posted (edited)
10 hours ago, mizapf said:

That old legacy clone from DOS times? :P

 

Linux users are known to make extensive use of the command shell, but ironically I'm gratefully doing those jobs on the graphical desktop. Of course, everyone shall use what suits best. Maybe I left DOS/Windows too early to learn about the pros of Norton Commander.

Since i was always used to work in Linux on the command line interface (cli) the midnightcommander (sudo mc) is a tool i dont want to miss anymore. It allows to copy, move or delete files and folders, so that i dont have to type in the whole bunch. ;-)

 

PS.: With what keycombination can i left the mame emulator?

Edited by Sid1968

Share this post


Link to post
Share on other sites
Posted (edited)

I tried to start mame on cli:

 

   cd mame

   ./mame ti99_4

 

 

It results in the message:

 

    OpenGL not supported on this driver: Could not initialize EGL

    video_init: initialization failed!

 

After that i changed the boot option with "sudo raspi-config" to boot with autologin to the Desktop.

 

There i could start the script "ti99" in the folder "/home/pi/mame" by doubleclick.

After the emulator started, "ESC" didnt worked to exit it, but ALT+F4 did the job.

 

In our project we dont want to load the complete linux desktop to start the emulator by clicking here or there or .....

The target is to boot directly into a Bootscreen from where the different TI-99/4A configurationscripts can be started.

It should be a clean thing.

 

But at this time i have no idea what we have to load before we are able to start the emulator without errors from cli. Any ideas?

 

Cheers

Sid

Edited by Sid1968

Share this post


Link to post
Share on other sites

Yes, ESC won't directly work, because you first have to switch to partial mode by pressing ScrlLock (or that key that was mapped to the function in its place). This is inevitable because emulations like the Geneve (or SGCPU, once I'll have adapted its keyboard emulation) need all the keys of the keyboard, so none of them can get a special function (apart from ScrlLock, which is actually lost for the Geneve in that respect).

 

This is one notable difference to the Arcade emulations in MAME where you just don't need the whole keyboard but only a few, and so you don't need a full keyboard mode.

 

OpenGL will not work in the framebuffer but only on the graphical desktop. There are some possible options; run MAME with "-verbose" and watch for "Available videodrivers" and "Renderdrivers".

 

By the way, launching the desktop and some application like MAME may be automated as well, so there is no need for clicking.

Share this post


Link to post
Share on other sites
Posted (edited)

I guess as soon as you have your Raspberry Pi 4, you will present something that we can talk about. I am veeery exited. But maybe our other Forummates have ideas, too... so dont be shy.🙂

Edited by Sid1968

Share this post


Link to post
Share on other sites
1 hour ago, Sid1968 said:

I guess as soon as you have your Raspberry Pi 4, you will present something that we can talk about.

You forgot a small detail:

"as soon as you have your Raspberry Pi 4 and you found some time to play a bit with it between your times of preparing commented offline lecture slides, doing live exercises, and finishing evaluating theses". Corona time turned out not to be exactly leisure time for us, from the moment that the university decided to run the semester online.

 

I'll let you know.

Share this post


Link to post
Share on other sites

And here it is, looking nice in its futuristic case, doesn't it? The flat cable connects to a camera module.

bild1.jpg

  • Like 3

Share this post


Link to post
Share on other sites
Posted (edited)

I overclock my Raspberry Pi 4.

 

The Standardvalues for the Raspberry Pi 4 are:

arm_freq=1500
gpu_freq=600


Therefore, I bought this 5V / 3.4 A power supply in advance, which does an excellent job for me:

https://eckstein-shop.de/Raspberry-Pi-4-Ladeadapter-Netzteil-5V-34A-17W-mit-USB-Typ-C-auf-USB-20-Ladekabel-1m


I had problems with the original power supply.

I also bought a case with the "Ice Tower" Cooler here. This Cooler performed very well in tests.

https://www.amazon.de/gp/product/B07ZDN6LSR/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1


The fan can be operated, by changing the connection of the cable on the Raspberry Pi 4, in high-speed or low-speed mode. If it runs, like me, in low-speed mode, it is practically inaudible. I am very happy with it.

 

To overclock the Raspberry Pi 4 the file config.txt in the folder "boot" must be edited:

 

          sudo nano /boot/config.txt

 

          or you put the SD-Card in your PC-Cartreader and edit the file there.

 

 

I changed this settings:

 

-------------------------------------------------------------------------------

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=1
gpu_mem=256


[all]
dtoverlay=vc4-fkms-v3d
#overscan_scale=1
start_x=1

 

over_voltage=4

arm_freq=2000
gpu_freq=700

-------------------------------------------------------------------------------


My Raspberry Pi 4 runs stable with this overclocking, so I am very satisfied with the overclock result.

 

Please keep in mind that overclocking your Raspberry Pi 4 will very likely void your warranty and you do so at your own risk.

 

Cheers

Sid

Edited by Sid1968

Share this post


Link to post
Share on other sites
Posted (edited)

I did some research on framebuffer support in MAME. The result is that the "directfb" was supported 10 years ago (~ MAME/MESS 0.136, i.e. 84 releases) when SDL1.x was in use. Since the introduction of SDL2, the framebuffer support was dropped. It is mainly an issue of SDL2, less of MAME, as I heard.

 

Two replies that I got from the mailing list:

Quote

My understanding is that SDL2 still has DirectFB support but nobody's maintaining it and it may not even compile at this point.

MAME itself is planned to require Vulkan (MoltenVK on the Mac) once the right people get around to it, so I don't think it's worthwhile to chase raw framebuffer support at this point.

 

 

Quote

Around 2007 I completely rewrote the directfb SDL driver. Just checked the source, this is what I did. DirectFB is dead. Abandoned. Github not updated in the last 7 years. directfb.org hijacked. You may try it. But you will be on your own. If at all, the SDL mailing list may be helpful.

 

Edited by mizapf

Share this post


Link to post
Share on other sites

No support for framebuffer output. When you use a Raspberry to run MAME, you need a graphic environment like LXDE.

Share this post


Link to post
Share on other sites
Posted (edited)

As you can read in my post #12 in this thread, Mame runs under the Raspbian Buster Linux desktop.

For this reason, I don't see any problems at the moment.

 

Or did you want to show the reasons why Mame does not run under the CLI?

Edited by Sid1968

Share this post


Link to post
Share on other sites

Well, you asked for running MAME without the graphical desktop, or did I misunderstand you?

On 4/24/2020 at 10:35 AM, Sid1968 said:

In our project we dont want to load the complete linux desktop to start the emulator by clicking here or there or .....

The target is to boot directly into a Bootscreen from where the different TI-99/4A configurationscripts can be started.

It should be a clean thing.

 

Share this post


Link to post
Share on other sites
Posted (edited)

Yes that's true, but that solution must be rejected as we know now. Insofar as you said that we can also boot directly to a selection screen under the Linux Desktop, this solution is probably preferable.

Edited by Sid1968

Share this post


Link to post
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.

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