First, alter your ~/.profile file.
Look for a line that says:
bootstartingemulator
Replace this with:
mytty=`tty`
if [ "$mytty" == "/dev/tty1" ]; then
bootstartingemulator
fi
If you login via SSH then, it won't attempt to start the emulator.
Now, edit the following three scripts:
- /usr/local/bin/3
- /usr/local/bin/3noconf
- /usr/local/bin/bootstartingemulator
You will see something like this:
# start the selected emulator
runaberrypi3conf
The second line may vary but the first line should be there.
Change this to:
runemulatorconf
And, in 3noconf
, change
# start the selected emulator
runaberrypi3
to:
# start the selected emulator
runemulator
Now, the next thing is a chore.
You have to edit ALL scripts in /usr/local/bin that say runaberryX, runaberryXconf, aberryX, aberryXconf to not change the scripts themselves but set symbolic links. I give aberrypi3
as an example:
The aberrypi3
script:
#!/bin/bash
# Set default to Amiberry SDL1 for Raspberry Pi3 by Dimitris
# Copyright © 2018 Amibian.net
# All rights reserved
# Welcome message
echo -e "\n${bold}This will set default emulator to Amiberry (SDL1) for Raspberry Pi3 by Dimitris"
# Prompt to continue
read -p " Continue? (y/n) " ans
if [[ $ans != "y" ]]; then
echo -e "\nQuitting...\n"
exit
fi
echo
# Change the emulator configurations with symlinks
rm /usr/local/bin/runemulator /usr/local/bin/runemulatorconf
ln -s /usr/local/bin/runaberrypi3 /usr/local/bin/runemulator
ln -s /usr/local/bin/runaberrypi3conf /usr/local/bin/runemulatorconf
# to see what emulator is selected
echo "Selected emulator: amiberry-rpi3-sdl1" >/root/amibian/help_texts/selected_emulator
# confirmation
echo -e "Default emulator is now Amiberry (SDL1) for Raspberry Pi3 by Dimitris.${normal}"
echo -e "Emulator configurations from Chips UAE4ARM do not work with this version.${normal}"
You have to adapt the other configuration-changing scripts accordingly. If you know you only use a special version of the Pi, you can omit some of the scripts you never use anyway.
Then, run aberrypi3
(or the according script you changed for your Pi) and enter "3" and press Enter to verify it is working.
Now, adding more emulators is straightforward.
I used the RetroPie Setup Script at https://github.com/RetroPie/RetroPie-Setup to install additional emulators. Just create a computertype
and runcomputertype
script that symlinks the appropriate emulator executable to /usr/local/bin/runemulator
and /usr/local/bin/runemulatorconf
(for the Non-Amiga emulators both can point to the same location).
Now you need to copy /usr/local/bin/7
to /usr/local/bin/8
(and 9, 10, 11...) and adapt it. The 7
script, for example, contains:
#!/bin/bash
#to show the emulator selection menu
# Copyright © 2018 Amibian.net
# All rights reserved
# clear the screen
clear
# show the emulator selection menu
cat /root/amibian/.menu_files/copyrights_small
cat /root/amibian/.amibian_version
cat /root/amibian/.menu_files/cli2
cat /root/amibian/.menu_files/header
cat /root/amibian/.menu_files/promotion
cat /root/amibian/help_texts/selected_emulator
cat /root/amibian/.menu_files/emulator_menu
The last line is important. Here, you just change the name, like, from emulator_menu
to atari800_emulator_menu
.
You have to create this file (a normal text file) that is just the content of the menu. My atari800_emulator_menu
, for example, contains:
Type a command and hit enter
Commands What they do
-----------------------------------------------------------------------------------------------
atari8bit Changes default emulator to Atari800
runatari8bit Runs Atari800
-----------------------------------------------------------------------------------------------
menu Bring up main menu again
-----------------------------------------------------------------------------------------------
You can continue with a lot more emulators.
Only caveat is that you have to configure the emulators in their own menus, but I am OK with this.