Giter Site home page Giter Site logo

celeste-arm64's Introduction

Celeste ARM64 Utilities

This repository contains utilities for getting Celeste to work on ARM64 Linux. These utilities were tested on a Nintendo Switch running Ubuntu Bionic 18.04.

Photo of Glyph running on the Nintendo Switch

Installation

Read all of the instructions at least once before starting.

  1. Download Celeste from either itch.io or Epic Games Store. Both Linux and Windows builds will work. The builds on Steam will not work because the Steam version of the game contains DRM.
  2. Extract Celeste.
  3. Download the latest release of Celeste-ARM64 and extract it somewhere other than the Celeste folder.
  4. Run the following commands in the terminal.
cd /path/to/Celeste-ARM64
./patch.sh /path/to/celeste-linux/Celeste.exe
  1. (optional) Install Everest on this copy of Celeste with Olympus. Do this on your computer before copying the game to your Switch since the arm64 build of Olympus is not able to to install Everest.
  2. Copy the Celeste folder to your Switch.
  3. Run the following commands in a terminal on your Switch. You may be required to enter your password. After running this command, the installation will be complete and Celeste will start.
cd /path/to/celeste-linux
./Celeste
  1. You should now be able to launch Olympus and Celeste using the app launcher.

Files

patch.sh

Use this script to make Celeste work on ARM64.

fmod/

Contains instructions on how to get the FMOD library working. The FMOD library is used in Celeste for sound.

otherlibs/

Contains a Makefile for building FNA3D, SDL and fmod_SDL.

celeste-arm64's People

Contributors

pixelomer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

celeste-arm64's Issues

Arch Linux support

The main goal is to get Celeste working on Asahi Linux.

  • All apt-get and apt commands need to have equivalent pacman commands.
  • There should be two separate releases for Ubuntu and Arch Linux since one is not compatible with the other.
  • fmod_preload.so does not work on Arch Linux since there is no _dl_sym. However, the DllMap alternative should work. See #7.
  • Olympus always crashes shortly after launch on Arch Linux, whereas on Ubuntu the crashes are irregular and not as frequent. See #4.

Does not work on newer distros

mono: symbol lookup error: /media/gman/Universal/home/garrett/Applications_x86_64/celeste-arm64/fmod_preload.so: undefined symbol: _dl_sym

when built and tested on jammy. looks like fmod_preload.c needs some work

Crash on boot: System.Exception: FMOD Failed: ERR_HEADER_MISMATCH (Ubuntu PRoot, Termux, Android)

I'm trying to get this running on my phone under Termux in an Ubuntu 23.04 PRoot. The patch is installed, but upon launch, I get:

CELESTE : 1.4.0.0
FNA3D Driver: OpenGL
OpenGL Renderer: llvmpipe (LLVM 15.0.7, 128 bits)
OpenGL Driver: OpenGL ES 3.2 Mesa 23.0.4-0ubuntu1~23.04.1
OpenGL Vendor: Mesa
MojoShader Profile: glsles
BEGIN LOAD
 - GFX LOAD: 4814ms
 - MTN LOAD: 1610ms
FULLSCREEN
GAME DISPLAYED (in 6888ms)
System.Exception: FMOD Failed: ERR_HEADER_MISMATCH
  at Celeste.Audio.CheckFmod (FMOD.RESULT result) [0x00013] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
  at Celeste.Audio.Init () [0x0001a] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
  at Celeste.GameLoader.LoadThread () [0x0000c] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
  at Celeste.RunThread.RunThreadWithLogging (System.Action method) [0x00000] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.ComponentModel.Win32Exception (0x80004005): Access denied
  at System.Diagnostics.Process.StartWithShellExecuteEx (System.Diagnostics.ProcessStartInfo startInfo) [0x00129] in <a85c1a570f9a4f9f9c3d2cfa5504e34f>:0 
  at System.Diagnostics.Process.Start () [0x00038] in <a85c1a570f9a4f9f9c3d2cfa5504e34f>:0 
  at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
  at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x0001e] in <a85c1a570f9a4f9f9c3d2cfa5504e34f>:0 
  at System.Diagnostics.Process.Start (System.String fileName) [0x00006] in <a85c1a570f9a4f9f9c3d2cfa5504e34f>:0 
  at Monocle.ErrorLog.Open () [0x00014] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
  at Celeste.RunThread.RunThreadWithLogging (System.Action method) [0x00018] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
  at Celeste.RunThread+<>c__DisplayClass1_0.<Start>b__0 () [0x00000] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 
  at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 

Missing chatter bits and stack corruptions

Hello,

Found your solution while checking out the status of fmod1.x for aarch64 - this function is wrong and will cause major graphical corruptions, missing sounds and other brokenness - you want to change this to FMOD_Studio_EventInstance_SetParameterByName instead.

I ended up with a solution that is a tiny bit less intrusive and avoids patches:

// TODO:: should probably be taken from fmod.h...
#define FMOD_VERSION 0x00020206
#define DECLSPEC __attribute__ ((visibility("default")))
DECLSPEC int _FMOD_Studio_EventInstance_SetParameterValue(void *system, const char *name, float value)
{
        extern int FMOD_Studio_EventInstance_SetParameterByName(void *, const char *, float, int);
        return FMOD_Studio_EventInstance_SetParameterByName(system, name, value, 0);
}

DECLSPEC int _FMOD_Studio_System_Create(void *studiosystem, unsigned int headerversion)
{
        // Override the FMOD_VERSION header.
        extern int FMOD_Studio_System_Create(void *, int);
        return FMOD_Studio_System_Create(studiosystem, FMOD_VERSION);
}

which can be used with the following config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<dllmap dll="fmod" os="linux" target="libfmod.so.13"/>
	<dllmap dll="fmodstudio" os="linux" target="libfmodstudio.so.13">
		<dllentry dll="fmodstudio_fix.so" name="FMOD_Studio_EventInstance_SetParameterValue" target="_FMOD_Studio_EventInstance_SetParameterValue"/>
		<dllentry dll="fmodstudio_fix.so" name="FMOD_Studio_System_Create" target="_FMOD_Studio_System_Create"/>
		<dllentry dll="fmodstudio.so.13" name="FMOD_Studio_System_GetLowLevelSystem" target="FMOD_Studio_System_GetCoreSystem"/>
		<dllentry dll="fmodstudio.so.13" name="FMOD_Studio_EventInstance_TriggerCue" target="FMOD_Studio_EventInstance_KeyOff"/>
	</dllmap>
</configuration>

Crash on boot for Everest: System.EntryPointNotFoundException: lua_newuserdata (Fedora 39 PRoot, Termux, Android)

Hello, I've been trying to install the Everest mod loader and no matter what version I try, it just won't work. However, stock Celeste works and perform well so its purely an Everest incompatibility with my setup. I've also applied the patch from this pull request Lastly, the liblua path I've symlinked to lib-arm64 is /usr/lib64/liblua-5.4.so. The full system output upon running the command is

CELESTE : 1.4.0.0
(02/06/2024 20:31:27) [Everest] [Info] [core] Booting Everest
(02/06/2024 20:31:27) [Everest] [Info] [core] AppDomain: Celeste.exe+Everest
(02/06/2024 20:31:27) [Everest] [Info] [core] VersionCelesteString: 1.4.0.0-fna [Everest: 4449-azure-ddba3]
(02/06/2024 20:31:27) [Everest] [Info] [core] SystemMemoryMB: 11170.480 MB
(02/06/2024 20:31:27) [Everest] [Warn] [discord-game-sdk] Could not initialize Discord Game SDK!
--------------------------------
System.DllNotFoundException: discord_game_sdk assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Discord.Discord.DiscordCreate(uint,Discord.Discord/FFICreateParams&,intptr&)
  at Discord.Discord..ctor (System.Int64 clientId, System.UInt64 flags) [0x00309] in <9733023d404e48c79552a3c69cf9d84a>:0 
  at Celeste.Mod.Everest+DiscordSDK..ctor (Microsoft.Xna.Framework.Game game) [0x0002d] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
TypeLoadException.TypeName: 
(02/06/2024 20:31:27) [Everest] [Info] [core] Registered code module Celeste.Mod.Core.CoreModule for module Everest 1.4449.0.
(02/06/2024 20:31:27) [Everest] [Info] [discord-game-sdk] Discord Game SDK disposed
(02/06/2024 20:31:27) [Everest] [Info] [core] Non-code module Celeste 1.4.0.0 registered.
(02/06/2024 20:31:27) [Everest] [Info] [core] Non-code module DialogCutscene 1.0.0 registered.
(02/06/2024 20:31:27) [Everest] [Info] [core] Non-code module UpdateChecker 1.0.2 registered.
(02/06/2024 20:31:27) [Everest] [Info] [core] Non-code module InfiniteSaves 1.0.0 registered.
(02/06/2024 20:31:27) [Everest] [Info] [core] Non-code module DebugRebind 1.0.0 registered.
(02/06/2024 20:31:27) [Everest] [Info] [core] Non-code module RebindPeriod 1.0.0 registered.
--------------------------------
Detailed exception log:
--------------------------------
System.EntryPointNotFoundException: lua_newuserdata assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) KeraLua.NativeMethods.lua_newuserdata(intptr,uintptr)
  at KeraLua.Lua.NewUserData (System.Int32 size) [0x0000d] in <204ca39321844d4aa352cdeb30482dc6>:0 
  at NLua.Extensions.LuaExtensions.NewUData (KeraLua.Lua state, System.Int32 val) [0x00010] in <e0da1b86a6474d02885e72e8b1039256>:0 
  at NLua.ObjectTranslator.PushNewObject (KeraLua.Lua luaState, System.Object o, System.Int32 index, System.String metatable) [0x00135] in <e0da1b86a6474d02885e72e8b1039256>:0 
  at NLua.ObjectTranslator.PushObject (KeraLua.Lua luaState, System.Object o, System.String metatable) [0x0007f] in <e0da1b86a6474d02885e72e8b1039256>:0 
  at NLua.ObjectTranslator.Push (KeraLua.Lua luaState, System.Object o) [0x001dc] in <e0da1b86a6474d02885e72e8b1039256>:0 
  at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00049] in <e0da1b86a6474d02885e72e8b1039256>:0 
  at NLua.Lua.CallFunction (System.Object function, System.Object[] args) [0x00000] in <e0da1b86a6474d02885e72e8b1039256>:0 
  at NLua.LuaFunction.Call (System.Object[] args) [0x0000c] in <e0da1b86a6474d02885e72e8b1039256>:0 
  at Celeste.Mod.Everest+LuaLoader.Initialize () [0x00239] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
  at Celeste.Mod.Everest.Boot () [0x004ca] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
  at Celeste.Celeste..ctor () [0x0003e] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
TypeLoadException.TypeName: 
System.EntryPointNotFoundException: lua_newuserdata assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) KeraLua.NativeMethods.lua_newuserdata(intptr,uintptr)
  at KeraLua.Lua.NewUserData (System.Int32 size) [0x0000d] in <204ca39321844d4aa352cdeb30482dc6>:0 
  at NLua.Extensions.LuaExtensions.NewUData (KeraLua.Lua state, System.Int32 val) [0x00010] in <e0da1b86a6474d02885e72e8b1039256>:0 
  at NLua.ObjectTranslator.PushNewObject (KeraLua.Lua luaState, System.Object o, System.Int32 index, System.String metatable) [0x00135] in <e0da1b86a6474d02885e72e8b1039256>:0 
  at NLua.ObjectTranslator.PushObject (KeraLua.Lua luaState, System.Object o, System.String metatable) [0x0007f] in <e0da1b86a6474d02885e72e8b1039256>:0 
  at NLua.ObjectTranslator.Push (KeraLua.Lua luaState, System.Object o) [0x001dc] in <e0da1b86a6474d02885e72e8b1039256>:0 
  at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00049] in <e0da1b86a6474d02885e72e8b1039256>:0 
  at NLua.Lua.CallFunction (System.Object function, System.Object[] args) [0x00000] in <e0da1b86a6474d02885e72e8b1039256>:0 
  at NLua.LuaFunction.Call (System.Object[] args) [0x0000c] in <e0da1b86a6474d02885e72e8b1039256>:0 
  at Celeste.Mod.Everest+LuaLoader.Initialize () [0x00239] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
  at Celeste.Mod.Everest.Boot () [0x004ca] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
  at Celeste.Celeste..ctor () [0x0004b] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
  at Celeste.Celeste.orig_Main (System.String[] args) [0x0012a] in <d7b2abb405ec4c97954549f0a02e4a41>:0 
TypeLoadException.TypeName: 
Failed to open the log!
Unloaded AppDomain Celeste.exe+Everest
Exiting Celeste process```

System.DllNotFoundException: fmodstudio assembly:<unknown assembly> type:<unknown type> member:(null)

hi there,
when opening a patched everest celeste I get the following error:


Detailed exception log:

System.DllNotFoundException: fmodstudio assembly: type: member:(null)
at (wrapper managed-to-native) FMOD.Studio.System.FMOD_Studio_System_Create(intptr&,uint)
at FMOD.Studio.System.create (FMOD.Studio.System& studiosystem) [0x00005] in :0
at Celeste.Audio.orig_Init () [0x00010] in :0
at Celeste.Audio.Init () [0x00026] in :0
at Celeste.GameLoader.LoadThread () [0x00013] in :0
at Celeste.RunThread.RunThreadWithLogging (System.Action method) [0x00000] in :0

vanilla works, its a fresh install of Ubuntu 18.04. I've tried the Celeste Windows-opengl version

on Vanilla I have to disable keyboard inputs of the joycons with
xinput float 11
in order to not have controller and keyboard input passed to the game. after playing I reenable it with
xinput reattach 11 3

is there a better way to do this?

Music/audio glitches

Some music and audio in the game do not behave properly.

  • When leaving a C-side level, the level music never stops.
  • After completing a level, the level completion sound doesn't stop at the right time.
  • Conveyor belt sounds never stop and are stacked.
  • No music is played in cassette rooms.

errors and outdated fmstudio versions

fmodstudio has been updated to 20204 version rather than 20202 which does makes a lot of compatibility issues, but other than that.
I'm getting an error of
"The entry point method could not be loaded due to Could not load file or assembly 'Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553' or one of its dependencies."
I did install everything made sure to copy the fmod libs to the lib64 in the Celeste folder and everything but when I do run ./Celeste I get that error, I did try to run it with mono Celeste.exe as well but I do get the same error, do I need to install anything or have I done something wrong in the installation and or patching process?

Buggy Olympus build

The build of Olympus on this repository is outdated and often crashes shortly after launch. It was put together by moving files around, commenting out Lua code and recompiling native code until it worked natively on arm64 without much testing.

  • Come up with a more standard way to generate arm64 builds from official x86_64 builds, or
  • Recompile Olympus for arm64 with every new release (seems like too much effort for a project that will only be used by 3 other people), or
  • Ditch Olympus entirely and write a Celeste mod for installing mods from within the game (significantly better as a user interface since Olympus was designed as a desktop app which doesn't really work on a Switch). Since Everest can already install mods on its own (for example when installing missing dependencies), it should be doable.

Crash during init, unable to find fmodstudio

Hello,

I followed your guide completely, multiple times, with and without Everest, and always ended up with the following error when running ./Celeste.

`Controller 0: Nintendo Switch Joy-Con (L/R)
CELESTE : 1.4.0.0
FNA3D Driver: OpenGL
OpenGL Renderer: NVIDIA Tegra X1 (nvgpu)/integrated
OpenGL Driver: 4.6.0 NVIDIA 32.3.1
OpenGL Vendor: NVIDIA Corporation
MojoShader Profile: glsl120
BEGIN LOAD

  • GFX LOAD: 2497ms
  • MTN LOAD: 1482ms
    FULLSCREEN
    GAME DISPLAYED (in 4603ms)
    System.DllNotFoundException: fmodstudio assembly: type: member:(null)
    at (wrapper managed-to-native) FMOD.Studio.System.FMOD_Studio_System_Create(intptr&,uint)
    at FMOD.Studio.System.create (FMOD.Studio.System& studiosystem) [0x00005] in :0
    at Celeste.Audio.Init () [0x00010] in :0
    at Celeste.GameLoader.LoadThread () [0x0000c] in :0
    at Celeste.RunThread.RunThreadWithLogging (System.Action method) [0x00000] in :0`

Unable to find anything like it on google or here, I tried multiple things.
I was about to give up, but then I copied and renamed the symlink /lib-arm64/libfmodstudio.so.13 to just fmodstudio, since that seemed to be what it was searching for, and this fixed the error.

Thanks for your work.

mono task launches, music plays, but window doesn't open

Running Fedora Asahi Remix on M1 MacBook Air, I made the following modifications thus far:

  • Applied the open pull request #17
  • adjusted the liblua paths in the Celeste script to usr/lib64/liblua-5.4-so

The game now launches, the mono task takes about 4% of CPU, and the start screen music plays. No window is created however. Without adjusted lua paths, the game doesn't start because of some Wayland error: qt.qpa.wayland: Wayland does not support QWindow::requestActivate().
Sorry if I just missed something obvious!

Check if installed Mono version is up to date

The Celeste script currently only checks for the existence of the mono binary but doesn't check the version. The default repositories generally have very outdated versions of Mono and there has been at least one instance where a user encountered a crash by launching Celeste with an old version of Mono (Debian 4.6.2.7+dfsg-1ubuntu1).

Crash output:

Can't find custom attr constructor image: /home/<user>/Desktop/Celeste/FNA.dll mtoken:0x0a000001 due to Could not load file or assembly or one of its dependencies. assembly:System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:<unknown type> member:<none>
Stacktrace:

  at <unknown> <0xffffffff>
  at SDL2.SDL.SDL_RWFromFile (string,string) <0x00017>
  at SDL2.SDL.SDL_GameControllerAddMappingsFromFile (string) <0x0001f>
...

Unrecognized window depth/stencil format

Tried running Celeste using this project on my Samsung Galaxy Note8 (Ubuntu 18.04) and it keeps crashing with an error log that says "System.NotSupportedException: Unrecognized window depth/stencil format!"

I'm using it through VNC, if that means anything. I patched the game on my Windows (WSL) machine first.

Clarification regarding the supported builds of the game

The README.md file states that itch.io and Epic Games Store builds of the game are supported but Epic Games Store doesn't have a Linux build of Celeste. It should be clarified in the README.md file that both Windows and Linux versions of the game can be used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.