Skip to content
/ qemu Public
forked from qemu/qemu

QEMU Linux user mode for the R5900 Emotion Engine in the PlayStation 2.

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
GPL-2.0
COPYING
LGPL-2.1
COPYING.LIB
Notifications You must be signed in to change notification settings

frno7/qemu

This branch is 84 commits ahead of, 43762 commits behind qemu/qemu:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5f48e76 · Dec 29, 2024
Mar 17, 2020
Mar 28, 2020
Apr 6, 2020
Feb 7, 2020
Aug 24, 2020
Sep 9, 2020
Mar 16, 2020
Oct 26, 2017
Sep 3, 2020
Sep 9, 2020
Mar 11, 2020
Mar 19, 2020
Jan 29, 2020
Sep 3, 2020
Oct 2, 2018
Apr 6, 2020
Apr 7, 2020
Sep 9, 2020
Mar 19, 2020
Sep 15, 2020
Sep 10, 2020
Feb 7, 2020
Oct 16, 2017
Sep 3, 2020
Dec 12, 2020
Sep 9, 2020
Mar 25, 2020
Sep 9, 2020
Aug 25, 2020
Sep 9, 2020
Mar 17, 2020
Nov 21, 2019
Mar 21, 2020
Apr 2, 2020
Sep 3, 2020
Apr 7, 2020
Apr 2, 2020
Jan 7, 2020
Sep 9, 2020
Apr 14, 2020
Sep 3, 2020
Apr 21, 2020
Apr 13, 2020
Mar 6, 2020
Mar 6, 2020
Dec 12, 2020
Apr 12, 2020
Sep 9, 2020
Sep 3, 2020
Feb 25, 2020
Mar 25, 2020
Sep 3, 2020
Dec 18, 2019
Oct 8, 2015
Jun 12, 2019
Sep 7, 2012
Jun 7, 2017
Mar 6, 2020
Jan 21, 2020
Mar 17, 2020
Mar 17, 2020
Feb 2, 2020
Mar 5, 2018
Mar 17, 2020
Jun 3, 2019
Feb 7, 2020
Feb 4, 2020
Apr 6, 2020
Sep 5, 2019
Oct 12, 2008
Jan 30, 2019
Nov 21, 2017
Dec 17, 2019
Nov 11, 2019
Apr 14, 2020
Apr 14, 2020
Mar 12, 2020
Mar 20, 2020
Dec 12, 2020
Sep 5, 2019
Sep 15, 2020
Mar 19, 2020
Aug 16, 2019
Aug 24, 2020
Mar 6, 2020
Apr 7, 2020
Mar 11, 2020
Oct 31, 2019
Apr 15, 2020
Oct 28, 2019
Mar 16, 2020
Mar 20, 2020
Oct 28, 2019
Feb 20, 2020
Oct 28, 2019
Apr 13, 2020
Apr 7, 2020
Mar 12, 2019
Mar 12, 2020
Mar 12, 2020
Jun 12, 2019
Mar 8, 2019
Apr 7, 2020
Apr 7, 2020
Aug 27, 2020
Sep 3, 2019
Jun 12, 2019
Feb 4, 2016
Dec 17, 2019
Dec 17, 2019
Sep 3, 2020
Dec 17, 2019
Jun 12, 2019
Feb 20, 2020
Apr 7, 2020
Oct 28, 2019
Jan 30, 2020
Jun 12, 2019
Sep 3, 2020
May 20, 2018
Jul 12, 2016
Apr 14, 2020
Mar 27, 2019
Mar 6, 2020
Mar 9, 2020
May 9, 2017
Mar 6, 2020
Sep 13, 2016
Jun 12, 2019
Mar 9, 2020
Mar 11, 2019
Oct 19, 2018
Oct 28, 2019
Nov 21, 2017

QEMU for the R5900 Emotion Engine in the PlayStation 2

This QEMU branch implements o32 and n32 Linux ABI user mode for the Sony/Toshiba R5900 Emotion Engine MIPS III main processor of the PlayStation 2.

An important use-case is to compile and test R5900 programs via QEMU user mode emulation on modern hardware. Compilation is, in general, impractical directly on PlayStation 2 hardware since its total amount of memory is limited to 32 MiB, whereas modern software may require 500 MiB or even more to compile. QEMU user mode also simplifies R5900 compilation because a cross-compiler is unnecessary.

Building

The QEMU build targets mipsel-linux-user and mipsn32el-linux-user support the R5900 o32 and n32 ABIs, respectively.

Limitations

At the moment, only the 32-bit and 64-bit MIPS psABIs are implemented, in addition to the R5900 specific three-operand MULT and MULTU instructions that GCC is known to generate for the R5900 target.

The R5900 specific set of 93 128-bit multimedia instructions is not yet supported by QEMU (see #4). Likewise, QEMU user mode does not emulate any PlayStation 2 specific devices.

R5900 QEMU system mode is not yet implemented (see #6).

Dependencies when compiling R5900 programs

GCC 9.1 or later is recommended. Older GCC versions can be used if commit d728eb9085d8 (MIPS: Default to --with-llsc for the R5900 Linux target as well) is applied.

Glibc 2.29 or later is recommended. Additional patches are required to support the n32 ABI. Older Glibc versions can be used if commit 8e3c00db16fc (MIPS: Use `.set mips2' to emulate LL/SC for the R5900 too) is applied.

GAS 2.32 or later is optional. It has the -mfix-r5900 option to compile generic MIPS II and MIPS III code with the appropriate workaround for the R5900 short-loop hardware bug.

R5900 Linux kernel

See the PlayStation 2 Linux kernel.

R5900 Linux distributions

A modern Gentoo Linux can be compiled for the R5900 and the PlayStation 2. The Gentoo sys-devel/crossdev package page and the cross build environment guide explain the details involving configuring for example a Gentoo profile and a corresponding overlay. Once those simple steps have been taken the command # crossdev -s4 -t mipsr5900el-unknown-linux-gnu can be used to obtain an R5900 cross toolchain as well as the basis of an R5900 Gentoo root filesystem in /usr/mipsr5900el-unknown-linux-gnu. As the guide explains, the R5900 base system can be built from scratch using the command # mipsr5900el-unknown-linux-gnu-emerge -uva --keep-going @system. The root filesystem can then be used with R5900 QEMU user mode emulation for further compilations and testing, or directly in Linux on PlayStation 2 hardware.

General README

Read the general README for further information on QEMU.

About

QEMU Linux user mode for the R5900 Emotion Engine in the PlayStation 2.

Topics

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
GPL-2.0
COPYING
LGPL-2.1
COPYING.LIB

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 91.4%
  • Python 3.1%
  • C++ 2.0%
  • Shell 1.8%
  • Assembly 0.5%
  • Haxe 0.4%
  • Other 0.8%