Difference between revisions of "Development:Setting up FEX"

From FEX-Emu Wiki
Jump to navigation Jump to search
m (Sonicadvance1 moved page Setting up FEX to Development:Setting up FEX without leaving a redirect)
Line 1: Line 1:
 
== Build dependencies ==
 
== Build dependencies ==
 +
* cmake
 +
* ninja-build
 
* clang
 
* clang
* !!! Insert remaining libraries here !!!
+
* libnuma-dev
 +
* libcap-dev
 +
* libglfw3-dev (For GUI)
 +
* libepoxy-dev (For GUI)
 
* x86_64-linux-gnu-g++ (For building thunks)
 
* x86_64-linux-gnu-g++ (For building thunks)
 
* nasm (only if building tests)
 
* nasm (only if building tests)

Revision as of 04:41, 17 March 2021

Build dependencies

  • cmake
  • ninja-build
  • clang
  • libnuma-dev
  • libcap-dev
  • libglfw3-dev (For GUI)
  • libepoxy-dev (For GUI)
  • x86_64-linux-gnu-g++ (For building thunks)
  • nasm (only if building tests)

Build Configuration

  • Ensure release mode is enabled
  • Enable LTO
  • Disable test building

cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=True -DBUILD_TESTS=False -G Ninja ..

ninja

Installation

sudo ninja install

On AArch64 hosts

You can install a binfmt_misc handler for both 32bit and 64bit x86 execution directly from the environment. If you already have box86's 32bit binfmt_misc handler installed then I don't recommend installing FEX's until it is useful. Make sure to have run install prior to this, otherwise binfmt_misc will install and old handler even if the executable has been updated.

sudo ninja binfmt_misc_32

sudo ninja binfmt_misc_64

Runtime Configuration

FEXConfig is the application to use for runtime configuration setup.

CTRL+SHIFT+O will open default "global" configuration.

CTLR+S saves it.

Things to ensure to set

On AArch64 host, a rootfs path is mandatory, while it is optional on x86-64 host

  • Core: JIT
  • RootFS
  • Silent Logging (Useful to get FEX information spam out of the way)
  • Block Size (500 is a good default. Optimization passes may break things though)
  • Multiblock: enabled (Can cause more stuttering)
  • Emulated CPU Cores: 1 (threading bugs cause issues with more)

RootFS generation

Needs to be migrated

https://github.com/FEX-Emu/FEX/wiki/Creating-x86-64-Linux-RootFS

Installing Thunks

Only if you want

https://github.com/FEX-Emu/FEX/blob/main/ThunkLibs/README.md