Skip to content

Instantly share code, notes, and snippets.

@bmaupin
Last active June 21, 2020 16:33
Show Gist options
  • Save bmaupin/a00a2dcd9e075999e6a9 to your computer and use it in GitHub Desktop.
Save bmaupin/a00a2dcd9e075999e6a9 to your computer and use it in GitHub Desktop.
Build Reicast emulator on Ubuntu/Debian
# NOTE: These instructions are old and may be out of date. A better alternative to compiling Reicast manually may be to use RetroArch with the Flycast core (https://www.retroarch.com/)
# Install prerequisites
sudo apt-get -y install build-essential libasound2 libasound2-dev libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev mesa-common-dev
# Build Reicast
git clone https://github.com/reicast/reicast-emulator.git
cd reicast-emulator/shell/linux
make
# Run Reicast
mkdir -p ~/.local/share/reicast/data/
cp ../android/assets/buttons.png ~/.local/share/reicast/data/
cp /path/to/bios/dc_boot.bin ~/.local/share/reicast/data/
cp /path/to/bios/dc_flash.bin ~/.local/share/reicast/data/
./reicast.elf
# To open a ROM
./reicast.elf /path/to/rom.cdi
# Key bindings
# Arrow keys: arrow keys
# A: v
# Start: Enter
@maferv
Copy link

maferv commented Aug 7, 2016

Failed to compile on Ubuntu 16.04, I get:

mkdir -p obj-dreamcast-x64-sse4_1/rend/soft/
g++ -I../../core -I../../core/deps -I../../core/khronos -D TARGET_LINUX_x64 -D TARGET_NO_AREC -fsingle-precision-constant -g -O3 -D RELEASE -c -D USES_HOMEDIR -frename-registers -fno-strict-aliasing -ffast-math -ftree-vectorize -fomit-frame-pointer -D SUPPORT_X11 -fopenmp -msse4.1 -fexceptions -fno-rtti -fpermissive -fno-operator-names -D SUPPORT_X11 -D USE_EVDEV -D USE_JOYSTICK -D USE_ALSA -D USE_OSS -DTARGET_SOFTREND ../../core/rend/soft/softrend.cpp -o obj-dreamcast-x64-sse4_1/rend/soft/softrend.build_obj
../../core/rend/soft/softrend.cpp: In member function ‘__m128 softrend::shuffle_pixel(__m128)’:
../../core/rend/soft/softrend.cpp:1167:77: error: invalid cast of an rvalue expression of type ‘__m128i {aka __vector(2) long long int}’ to type ‘__m128& {aka __vector(4) float&}’
return (__m128&)_mm_shuffle_epi8((__m128i&)v, _mm_set_epi8(R(0x80,2,1, 0)));
^
Makefile:317: recipe for target 'obj-dreamcast-x64-sse4_1/rend/soft/softrend.build_obj' failed
make: *** [obj-dreamcast-x64-sse4_1/rend/soft/softrend.build_obj] Error 1

Full output:
http://pastebin.com/8MJ9X6mf

@bmaupin
Copy link
Author

bmaupin commented Oct 12, 2016

I believe that should be fixed:

skmp/reicast-emulator#914

@hackerb9
Copy link

hackerb9 commented Apr 5, 2017

bmaupin is correct. This gist now works fine with Ubuntu 16.04.1.

@usernatilds
Copy link

usernatilds commented Feb 4, 2018

Is good a debian package that install with:
sudo apt-get install reicast

Make this dream possible, i compile reicast in debian, but buttons and joystick not work.

@bmaupin
Copy link
Author

bmaupin commented Aug 30, 2018

@usernatilds I have no affiliation with the Reicast project. It might be best to submit any feature requests here: https://github.com/reicast/reicast-emulator

@stpettersens
Copy link

Thanks for the script - having just build the emulator on Arch from AUR with yay- this is exactly what I was looking for on my Ubuntu-based system. I made some tweaks to get libudev-dev dependency and the repo seems to check out by default on the 'alpha' branch which is missing the necessary sub dir, so i simply checkout the 'master' branch before continuing to make.

https://gist.github.com/stpettersens/a66ba08d9b94a46d9dfb1880d7309dab

@davidrc2009
Copy link

Thanks, some directories appear to have changed names and locations, but still easy to compile

@bmaupin
Copy link
Author

bmaupin commented Jun 21, 2020

@davidrc2009 I haven't used this in years but these days if I wanted to use Reicast in Ubuntu I'd probably just use the precompiled flycast core from RetroArch. Maybe I'll make a note indicating as much.

@davidrc2009
Copy link

@davidrc2009 I haven't used this in years but these days if I wanted to use Reicast in Ubuntu I'd probably just use the precompiled flycast core from RetroArch. Maybe I'll make a note indicating as much.

They are only 2 different lines.

Change
cd reicast-emulator/shell/linux
to
cd reicast-emulator/reicast/linux
and
cp ../android/assets/buttons.png ~/.local/share/reicast/data/
to
cp ../android-studio/reicast/src/main/assets/buttons.png ~/.local/share/reicast/data/

Thanks again,
compiling was the only way for me, because installing reicast via snap didn't work.
Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment