Magatama

Magatama is a native port of Shin Megami Tensei: Nocturne for Android and macOS that supports internal resolution up to 8x and widescreen views.

README

Magatama

Magatama is a native port of Shin Megami Tensei: Nocturne (PlayStation 2, USA, SLUS-20911) made by static recompilation. The game's MIPS code is translated ahead of time into C++ on your own computer, from your own disc, and compiled into a normal application for macOS, iPhone and iPad, Android and Linux, with a PS2 hardware layer (the GS from PCSX2) underneath. It is not an emulator and it runs no other game.

Magatama is built on Fukami, the Ridge Racer V port, and shares its runtime.

This repository contains no game code and no game data. You need your own copy of Shin Megami Tensei: Nocturne (USA), dumped from a disc you own. Magatama is not affiliated with, authorised or endorsed by Atlus, Sega or Sony. See LEGAL.md.

Status: work in progress. Much of the game plays, but Magatama is a developer preview and you will find bugs.

Features

  • Native code: the game logic runs as compiled ARM64 or x86-64 code, with no JIT, so it also runs where run-time code generation is forbidden (iOS).
  • Internal resolution up to 8x, FXAA, CAS sharpening, anisotropic filtering.
  • Widescreen: 16:9, 16:10, 21:9 and 32:9 views, with the HUD, menus and text kept at their original proportions.
  • 60 FPS mode (experimental): the camera, characters and demons are interpolated between the game's 30 FPS frames.
  • The game's own sound drivers, run on an IOP core, for music, effects and movie audio.
  • Controllers and keyboard everywhere; an on-screen controller on iPhone, iPad and Android that hides itself while a controller is connected.
  • An in-game settings menu (triggered with Esc or a three-finger tap).
  • Launchers for macOS, iOS and Android that import your disc image (.iso, .chd or .zso) and check it is the right one (SHA-256 of SLUS_209.11) before anything is copied.
  • Right Analog Stick controls the camera, enabled with an R3 click.

Performance & Compatibility

Performance and compatibility has been tested on many pieces of hardware. For iOS, the minimum for sustained 30 FPS is the A15 Bionic. On macOS, the minimum is A18 Pro or M1. Android minimum is Snapdragon 865. Adreno GPU is a requirement. x86-64 Builds have not been made or tested at this time.

Platforms

PlatformStatus
macOS (Apple silicon)Main development platform. Built with scripts/magatama_build.sh; started with the Magatama Launcher app or scripts/magatama_run.sh.
iPhone and iPadUnsigned .ipa / .tipa for sideloading or TrollStore. iOS 16 or later on A12 or newer; a legacy build covers iOS 15 as low as A10.
Androidarm64 APK, Android 9 or later, Vulkan. Tested on Snapdragon (Adreno) handhelds; Mali GPUs are not supported yet. Works on 60 Hz and 120 Hz screens.
Linux (x86-64, ARM64)Native build from a kit (scripts/magatama_build_linux.sh); not tested.
WindowsCurrently not supported; in the works.

Getting started

Nothing Magatama distributes contains game code: the installers translate and compile the game on your own machine, from your own disc image (.iso, .chd or .zso of Shin Megami Tensei: Nocturne, USA).

  • macOS: download Magatama-<version>-macOS-Installer.zip from the releases, open Magatama Installer and drop your disc image on it. It needs Apple's Command Line Tools (it offers to install them) and takes a few minutes; then open Magatama from your Applications folder. The disc, saves, settings and logs are in ~/Library/Application Support/Magatama.
  • Android: install the APK, tap Import Disc, pick your disc image, then Build Game. The first build compiles the game on the device and takes a while (around an hour on a Snapdragon 865; it goes on in the background with a notification); app updates usually only need a short relink. The disc, saves, settings and logs are in Documents/Magatama.
  • iPhone, iPad and Linux: build it yourself (BUILDING.md). On iPhone and iPad the disc, saves, settings and logs are in the app's folder in the Files app.

To build Magatama from source you need your own SLUS_209.11 (the executable in the root of the disc); everything game-derived is generated from it on your computer. See BUILDING.md.

Known Issues & General Notes

  • In rare cases, the interpolation does not properly apply upon startup. Many animations still update at 30 frames per second in this glitched state. Reboot the game to fix.
  • Button prompts are PlayStation only. In the future, Nintendo Switch and Xbox button prompts will be human-drawn and added into the game.
  • On macOS specifically, there is a small chance that the transition to your first battle upon bootup will slightly stutter.
  • In order to comply with copyright law, the launchers build the necessary code before the first runtime. This process can take a long time.
  • While Linux x86-64 and ARM support is baked into the project via Fukami, zero work has been done to make those versions functional by me. Bug reports are welcome, but do not expect support for fixing any issues if you build those versions from source.
  • This project as a whole is still experimental. Expect bugs and crashes. Save frequently when possible.
  • Interpolation is currently limited to 60 FPS. This limit will be rectified in the future.
  • The "Legacy" iOS version is moreso meant for powerful devices on older iOSes, not old processors. The game will boot on A10 Bionic, but performance is unplayably slow.

Contributing

Bug reports and pull requests are welcome; read CONTRIBUTING.md first. Never attach, upload or link game files (disc images, the ELF, extracted assets, the generated code).

For bug reports, please try to include a screenshot or video displaying the problem. Be sure to include your OS and hardware specs as well.

Credits and licence

Magatama is free software under the GNU General Public License v3.0 (LICENSE). It stands on:

Shin Megami Tensei and Nocturne are trademarks of Atlus / Sega; PlayStation is a trademark of Sony Interactive Entertainment. They are used only to say which game this software works with.