Skip to content
Emulations (running on Linux/Unix/Windows/macOS, utilizing SDL2) of some - mainly - 8 bit machines, including the Commodore LCD, Commodore 65, and the MEGA65 as well.
C HTML Makefile Assembly JavaScript Shell Other
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.
.github BUILD: travis+osx+dmg+win+nsi+doc changes Feb 6, 2020
build DEPLOY changes + small C style fix + signal Feb 8, 2020
.gitattributes M65 Enh.-DMA super ugly hack + HW multiplier Feb 6, 2018
.gitignore Windows console again ... Sep 2, 2017
Makefile BUILD: travis+osx+dmg+win+nsi+doc changes Feb 6, 2020 BUILD: travis+osx+dmg+win+nsi+doc changes Feb 6, 2020

X-Emulators ~ "Xemu"

Build Status Gitter Download License: GPL-2.0 Contributors GitHub last commit (branch)

Emulators running on Linux/Unix/Windows/OSX of various (mainly 8 bit) machines, including the Commodore LCD and Commodore 65 (and also some MEGA65) as well.

Written by (C)2016-2020 LGB (Gábor Lénárt) Source repository:

Xemu also contains code wasn't written by me. Please read this page to get to know more, also with my greeings for any kind of help from others:

Xemu is licensed under the terms of GNU/GPL v2, for more information please read file LICENSE. You can find the source on github, see above.

Note: there is nothing too much common in these machines. The only reason that I emulate these within a single project, that I can easily re-use some of the components needed, that's all! Also, the list of emulated machines is simply the preference of myself, what I would like to emulate, nothing special about my selection.

This file is only some place holder :) For some sane documentation, please visit the wiki section of the project, here:

Most quick start (Xemu running in your web browser!)

Just visit this page, and use the "in-browser demonstration" link:

Note: this kind of demonstration is limited (or even broken!), often not in pair with the native client for your OS (a "binary"), which - at the other hand - requires more work: installation, configuration, etc ...

Quick start (using pre-built binaries)

I'm trying to provide some sane ways to install/use Xemu for people don't like to compile from source. Visit this page:

Plese note, that binaries on that site can be OUTDATED. Currently to download ready-to-use Xemu binaries, you may want to go here:


You can find 32 and 64 bit windows based installers for Windows. No need to say, highly experimental (as I am not a windows user at all ...). You can also use the ZIP'ed versions, which are simply the needed exe + dll files, without any installer. Please carefully read the download page, about these, especially about the NSIS-related problem which causes false positive detections as trojan/virus by many antivirus software, unfortunately.

Also, you can find ZIP archives on that page, contains only the executable files and the needed DLL, without any installer.


On Linux, you can try the provided DEB pacakge to install, if you run Ubuntu (may work on other DEB based distriutions as well). There is an RPM package provided too, however that is simply a converted version of the DEB pakcage (with "alien") so it may or may not work for you.

Work in progress to provide other - less distribution dependent - ways to install Xemu on Linux (other than compiling yourself), maybe in the form for flatpak, AppImage or something like that (though I really hate Snappy ...) in the future.


On MacOS, you want to use the MacOS build, of course. Currently there is only a ZIP file, with a binary and a .dylib, they must be in the same directory!

Work in progress to have a DMG material as well.

Quick start (from source)

For more information:

Install software for compilation

Example for Ubuntu Linux

sudo apt update
sudo apt install git build-essential libsdl2-dev libgtk-3-dev libreadline-dev

Example for MacOS

Assuming development Apple development components and homebrew is already installed on your Mac:

brew update
brew install sdl2 wget git

Xemu should build with a simple make but I recommend make ARCH=osx to build!

Raspberry Pi

If you use some Linux distributions (probably Raspbian) on your Raspberry Pi, it should behave more or less the same way as a Linux distribution on your PC, so nothing special here.

However. If you plan to run Xemu without X11, you need a special build of SDL2 must be done by yourself first. This is because, SDL2 provides a way to run SDL applications on Raspberry without X11 ("RPI" architecture), however the standard Raspbian - as far as I know - provides only SDL2 library with X support (though I can be wrong, contant me, if you know more on this topic).

I've - of course - tested this and it worked, however it's hard to provide a binary build this way currently, and needs more "manual work" to compile Xemu, and even SDL2 before.

Bare metal?

I received the idea to be able to run Xemu as a "bare-metal" project on Raspberry Pi for example. "Bare metal" means that it does not run an OS but uses the hardware directly, ie, Xemu needs to be booted instead of an OS. Surely, it's a kind of exciting route for me, but unfortunately I don't have too much time to play with this idea :(

Clone source respository

git clone
cd xemu



Optionally, to create binary DEBian .deb package for Ubuntu/Debian Linux, result will be built in build/bin (which can be installed with dpkg -i, followed by a sudo xemu-download-data which will download the data files as well, you can then execute emulators like xemu-xmega65):

make deb

To compile only (make in the top level directory will compile all of the targets automatically) a given emulator (let's say MEGA65):

cd targets
ls -l
cd mega65
cd ../..

Here, command ls -l is only for get a list of available targets (ie. the emulators included in the Xemu project).

Note: in case of MacOS, you may get tons of warning of invalid options during the compilation. This is harmless, and it's the sign of using CLANG for real with the command name gcc. To avoid them, instead of using plain make, use this: make ARCH=osx.

Run the binary

ls -l build/bin/

to get a list of compiled binaries, like xmega65.native or xc65.native

Run one of them, like (the Commodore LCD emulator in this case):



For building binary (exe) for Windows, you still need a UNIX-like environment (in theory WSL - Windows Subsystem for Linux - should be enough) for the compilation, with cross-compiler and SDL2 MinGW cross platform suite installed.

MSYS2 native build

Note: this is probably the easier method for a Windows user, however this is not the method we use to build official binaries for Windows.

An easy way to build xemu under Windows is to use the MSYS2 package which includes a full MinGW compiler, associated headers, tools , and a nice package management utility for easy installation of required components: Pacman, popular in ArchLinux-based distros.

The following steps are based on a Windows-10 x64 system.

  • Download the executable installer in for x86-64 architecture.
  • Install on the default location.
  • Execute the MSYS2 MinGW 64bit system prompt at installation end, or by looking into your Start Menu.
  • In the command prompt, ensure you have the latest repositories by doing:

pacman -Syu

Restart the prompt if needed, and finish installing remaining packages with:

pacman -Su

Now we can install the GCC compiler and required packages to build xemu with one command call:

pacman -S make mingw-w64-x86_64-toolchain mingw-w64-x86_64-SDL2 

Build the native Windows executables by issuing:

make ARCH=nativewin

You can find the executables, with '.nativewin' extension, in the 'build/bin' directory. Surely, you can (and maybe you want) rename that to have extension '.exe' ...

Alternative method (Cross-compilation)

Note: this is the official method we use to build official binaries for Windows.

For Ubuntu (and probably other DEB based distros, this also includes of course WSL if Ubuntu is used as the guest) you can install mingw by:

apt-get install binutils-mingw-w64-i686 binutils-mingw-w64-x86-64 gcc-mingw-w64-i686 gcc-mingw-w64-x86-64

Then, you need to install mingw-specific SDL2 development suite, download, modify its Makefile probably, install it, create compatibility symlinks for Xemu ... If you trust into the version Xemu uses, probably it's better to do the task with a single command. It needs you to be at the top directory of the downloaded/cloned Xemu repository. You may want to run this as root, or at least you need to have 'sudo' capabilities. The command:

build/ /usr/local/bin

This command will install stuffs in /usr/local/cross-tools (regardless of the parameter!) and create symlinks in /usr/local/bin. If it's not in your PATH by default, you may need to put it, or use different argument than /usr/local/bin.

Then you can say the following for 32 bit or 64 bit build process (in general, 32 bit version should be avoided on any OS - for performance reasons as well):

make ARCH=win32
make ARCH=win64

In build/bin you'll find files like *.win32 and *.win64, they are exe files for real, you can rename and copy them to a Windows box to be able to run them using Windows only (you also need the specific SDL2.dll though - those can be found at the same directory where the given - 32 or 64 bit - sdl2-config script is from the development SDL2 stuff you've installed).

You can’t perform that action at this time.