Skip to content

Merge to upstream ffc062c (Ship 9.0.0-9.0.5)#1

Open
Dire-Tomatoes wants to merge 227 commits intoHarbourMasters:mainfrom
Dire-Tomatoes:main
Open

Merge to upstream ffc062c (Ship 9.0.0-9.0.5)#1
Dire-Tomatoes wants to merge 227 commits intoHarbourMasters:mainfrom
Dire-Tomatoes:main

Conversation

@Dire-Tomatoes
Copy link

Switch is my preferred way to play SoH, so I wanted to try to help bring it back up to date. For now, I tried only to bring it to the 9.0.0 release which requires LUS ffc062c.

These are the pulled changes from upstream to get to that point with two commits on top.
One to merge and keep the switch support
And one to fix things that broke

I made a build and did some light testing. https://github.com/Dire-Tomatoes/Shipwright-Switch-9.0.0/releases/tag/9.0.0
Shipwright PR to follow after this LUS is updated and available for it.

I am a developer, but I do not usually work with C++. I used AI for explaining existing code to me, as well as polishing and reviewing what I wrote. With that said, I welcome all feedback including if this is even the way to begin contributing :)

Thanks for SoH and all the other great work

briaguya0 and others added 30 commits April 29, 2024 22:20
* ci: use restore-keys to handle ccache better

* use different cache for mac vs ios
* does this work?

* try sccache

* try some other things

* try the symlink

* worth a shot

* dir name

* more windows speedup

* maybe this?

* a

* see if that speeds windows up

* this might break things but it's worth a shot

* a

* this'll probably just break
…pported (Kenix3#529)

* Added a validation to detect if non-uniform thread group sizes are supported

* Fixed tidy

* Fixed on read_framebuffer_to_cpu too

* Added validation on mac
* spdlog from package managers

* move deps to files

* missed a spot

* need to checkout first for this to work

* there too

* hmm...

* explicitly include

* we really were relying on that huh?

* why can't it figure out what std min is?

* windows..........................

* none of this makes sense

* windows headers are terrible

* why would windows do that?

* don't use the windows max macro

* try putting it with the other ones

* clang format

* add a fetch content

* include fetchcontent at the top of the deps files

* bump ios spdlog version
* initial attempt

* forgot to add linux to the deps

* little more cleanup

* cleanup

* remove imgui

* include dirs

* windows

* metal stuff

* metal

* windows

* try just moving this for now

* makeavailable is working now
* fetchcontent stormlib

* cleanup

* absorb zapdutils

* cleanup

* clang format

* having this seems reasonable
* Create lus_gbi and build gfx_pc with it

* MM builds and runs

* All opcodes changed to use constexpr

* Fix signed compare

* Add names to opcodes for the debugger

* cleanup DL factory

* Cleanup warnings

* changes for s2dex

* oops forgot some opcodes

* re add gbi.h to the DL factory

* re add gbi.h to the VTX factory

* Format
* Splitted opcodes into f3dex and f3dex2

* Fixed tidy

* Fixed ucode_attr_handlers for f3d

* Added f3dHandlers and fixed headers

* Removed duplicated gbi commands

* Removed wrong cases on switch

* Fixed wrong type on G_SETGEOMETRYMODE

* Fixed mtx_push
* builds but doesn't work

* ResourceManager now exposes thread_pool's priority

* Using priority_t type in ResourceManager.cpp

* Removes kitchen sink change

* clean up

* remove reference to extern dir

---------

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Rebased towards latest main

* Fixed tidy

* Implemented rumble on multiple controllers

(cherry picked from commit 6064d7b)

* Implemented first version of osContGetStatus

* Fixed dumb mistake

(cherry picked from commit ee95529)

* Added channel copy on osMotorInit

* Implemented eeprom support and fixed rumble

* Fixed tidy on rcp.h

* Fixed tidy on gu.h

* Implemented eeprom support and fixed rumble

(cherry picked from commit 0c3e1ac)

* Fixed libultraship include

* Moved os.h header to libultra

* Fixed includes on os.h

* Removed LUS::Controller changes

* Removed whitespace

* Removed added newline

* Renamed to Ship::Context

* Removed WiiU Defines

* Fixed osAiSetNextBuffer definitions

* Fixed linking issues
coco875 and others added 29 commits March 13, 2025 21:24
* basic support of png

* progress on png

* get it halfly work

* switch to stbi and get it work

* rename around

* fix format

* finish rename

* remove include of png.h

* Update PngFactory.cpp

* move initData logic in ResourceLoader

* remove image part

* Update ResourceLoader.cpp
* Implemented shader load and prism

* Bump prism

* Moved shaders to prism

* Fixed some compilation issues

* Fixed windows compilation errors

* Fully ported directx to prism

* Ported metal shader to prism

* Bump prism and fixed metal

* Removed log on metal

* Bump prism and fixed some compilation errors

* Fixed tidy

* Fixed tidy again

* Bump prism

* Bump to fix linux

* Bump prism

* Fixed missing semantics on texClamp

* Bump prism to add include support

* Bump prism to fix missing include

* Fixed tidy
* fix shader factory

* Update ShaderFactory.cpp

* Update gfx_pc.cpp

* fix typo

* fix typo
This fixes a crash on MacOS, where SDL sometimes outputs 0Hz for secondary displays on startup.
* Implemented osSetTime to fix osGetTime not using boot time

* Fixed tidy
…enix3#830)

* fixed compilation errors for linux with static_pointer_cast

* aded #include <memory> for better formatting

* clang format
* Update RCP and RSP

* Format
* Support for 6 channels.

* Add option to configure Surround 5.1 audio.

* Clean up.

* Force 6 channels for now.

* Support stereo and surround.

* Apply comments.

* Fix SDLAudioPlayer.

* Apply clang format.

* Fix SDLAudioPlayer.

* adapt var name

* Apply suggestions from code review

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Fix correct name of var.

* Fix format.

* Prefix enum.

---------

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Added gSPSegmentInterp

* Formatting

* Format again
* Update gfx_dxgi.cpp

* Update gfx_dxgi.cpp

* Update gfx_dxgi.h

* Update gfx_dxgi.cpp

* Update gfx_dxgi.cpp

* Update gfx_dxgi.cpp

* Update gfx_dxgi.cpp

* Update gfx_dxgi.h

* tidy

* reposition

* minor focus inconsistency

* some fixes

---------

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
* apply patch with reset

* same for stormlib

* fix

* patch via cmake script

* restore comments & cleanup
* Texture Scrolling Interpolation

* Use floats for texture scrolling for increased precision

* Formatting
* Implementation of the macOS fullscreen fixes

* Comments and small updates to fullscreen fix

Fixes the issue where windowed fullscreen cursor hiding didn't work as it should according to the presence of the imGUI menubar.
We still need a specific fix in each game to disable changing fullscreen mode while in fullscreen, but this can be removed when SDL3 gets implemented in the future.

Also renamed some macOS specific functions and variables to make sure it is clear that they are macOS only.

* Fixed an oversight from a previous version

* tidy-format, yada yada yada...

* Feel free to shoot me. I'm a professional.

* Trying to appease one of tidy-formats complaints
* Update O2rArchive.cpp

* Update O2rArchive.h

* Update O2rArchive.cpp

* Update OtrArchive.h

* Update OtrArchive.cpp

* Update ArchiveManager.cpp

* Update ArchiveManager.h

* Update ArchiveManager.cpp

* Update ArchiveManager.h

* Update Archive.h

* Update ArchiveManager.cpp

* Update ArchiveManager.h
…enix3#843)

* Update Fast3dWindow.cpp

* Update Fast3dWindow.h

* Update Window.cpp

* Update Window.h

* Update Gui.h

* Update Gui.h

* Update Fast3dWindow.cpp

* Update Gui.cpp

* remove copypasta

* Update Fast3dWindow.cpp

* Update Window.cpp

---------

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Simplify mac fullscreening to just native fullscreen

---

Co-authored-by: Lars-Christian Selland <larsy1995@gmail.com>

* improve fullscreening experience

* adjust comment

---------

Co-authored-by: Lars-Christian Selland <larsy1995@gmail.com>
* fix tidy-result-publish workflow failing

apparently the API path changed

* Missed one

* those changed too
Co-authored-by: lightmanLP <liteman1000@gmail.com>
Merge 225 upstream commits. Major changes absorbed:
- FetchContent migration (extern/ eliminated, deps fetched via CMake)
- ImGui upgraded to v1.91.6-docking (patched at FetchContent time)
- nlohmann-json moved to FetchContent
- Resource system: OtrArchive/O2rArchive split, ResourceLoader refactor
- Controller: GetConnectedSDLGamepadsForPort refactor
- Window: SaveWindowToConfig replaces SupportsWindowedFullscreen

Conflict resolutions (Switch support preserved):
- Context.cpp: kept Switch init and OTR error handling
- gfx_sdl2.cpp: kept glad loader, display size, GL 2.1 context, Switch::Exit
- gfx_opengl.cpp: expanded glewInit skip to include Switch
- ResourceManager.cpp: kept Switch threadCount=1 limit
- Gui.cpp: kept Switch overclock, viewport disable, virtual keyboard
- src/CMakeLists.txt: added NintendoSwitch to StormLib/Threads conditions
- Window.cpp: took upstream SaveWindowToConfig (old func moved to Fast3dWindow)
- RumbleMappingFactory.cpp: accepted upstream refactor (old API removed)

Deleted files (upstream removed, Switch changes dropped):
- extern/CMakeLists.txt, extern/ImGui/*, SDLMapping.cpp
FetchContent migration:
- Create cmake/dependencies/switch.cmake (ImGui SDL2/glad/EGL linking,
  tinyxml2 and spdlog FetchContent overrides, StormLib POSIX fix)
- Add NintendoSwitch include in root CMakeLists.txt
- Add glad/EGL linking and devkitPro include dirs in src/CMakeLists.txt

ImGui compatibility:
- IMGUI_IMPL_OPENGL_LOADER_CUSTOM + force-include glad/glad.h
  (skip dlopen/dlsym loader, provide GL declarations via glad)
- IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS (stub fork/execvp/waitpid)
- Fix include paths: <ImGui/imgui.h> → <imgui.h> for FetchContent

Build fixes:
- types.h: Use int64_t/uint64_t for s64/u64 on Switch to match libnx
  (aarch64 unsigned long int vs unsigned long long int are distinct types)
- SwitchImpl.cpp: SetAudioBackend → SetCurrentAudioBackend
- spdlog: _POSIX_C_SOURCE=200809L + SPDLOG_PREVENT_CHILD_FD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.