diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 20449b10be8..875603e01b3 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -764,11 +764,11 @@ jobs:
             artifact: 'hellfire-nightly-vita.vpk'
           - name: diablo-vita
             cmakeargs: '-DNONET=ON -D USE_PATCH=ON'
-            artifact: 'diablo-nightly-vita.vpk'
+            artifact: 'diablo-nightly-vitap.vpk'
           - name: hellfire-vita
             cmakeargs: '-DNONET=ON -D USE_PATCH=ON -DHELLFIRE=ON'
-            artifact: 'hellfire-nightly-vita.vpk'
-    runs-on: ubuntu-22.04
+            artifact: 'hellfire-nightly-vitap.vpk'
+    runs-on: ubuntu-latest
     container: vitasdk/vitasdk:latest
     steps:
     - name: Checkout
@@ -792,7 +792,182 @@ jobs:
       uses: actions/upload-artifact@v4
       with:
         name: ${{ matrix.artifact }}
-        path: ./build/devilutionx.vpk
+        path: build/devilutionx.vpk
+
+  # n3ds-builds
+  build_n3ds:
+    needs: build_check
+    if: ${{ needs.build_check.outputs.should_run != 'false' }}
+    name: Nightly-Nintendo 3DS
+    strategy:
+      fail-fast: false
+      matrix:
+        #name: [diablo, hellfire]
+        include:
+          - name: diablo
+            cmakeargs: '-DNONET=ON'
+            artifact: 'diablo-nightly-3ds.3dsx'
+            cia: 'diablo-nightly-3ds.cia'
+          - name: hellfire
+            cmakeargs: '-DNONET=ON -DHELLFIRE=ON'
+            artifact: 'hellfire-nightly-3ds.3dsx'
+            cia: 'hellfire-nightly-3ds.cia'
+          - name: diablo-3ds
+            cmakeargs: '-DNONET=ON -D USE_PATCH=ON'
+            artifact: 'diablo-nightly-3dsp.3dsx'
+            cia: 'diablo-nightly-3dsp.cia'
+          - name: hellfire-3ds
+            cmakeargs: '-DNONET=ON -D USE_PATCH=ON -DHELLFIRE=ON'
+            artifact: 'hellfire-nightly-3dsp.3dsx'
+            cia: 'hellfire-nightly-3dsp.cia'
+    runs-on: ubuntu-latest
+    container: devkitpro/devkitarm:latest
+
+    steps:
+    - name: Checkout
+      uses: actions/checkout@v4
+      with:
+        fetch-depth: 0
+
+    - name: Install dependencies
+      run: |
+        apt-get update && \
+        apt-get install -y --no-install-recommends --no-install-suggests \
+          ffmpeg \
+          gettext
+
+    - name: Get external dependencies
+      run: |
+        wget https://github.com/diasurgical/bannertool/releases/download/1.2.0/bannertool.zip
+        unzip -j "bannertool.zip" "linux-x86_64/bannertool" -d "/opt/devkitpro/tools/bin"
+        wget https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v0.18/makerom-v0.18-ubuntu_x86_64.zip
+        unzip "makerom-v0.18-ubuntu_x86_64.zip" "makerom" -d "/opt/devkitpro/tools/bin"
+        chmod a+x /opt/devkitpro/tools/bin/makerom
+
+    - name: Configure CMake
+      run: |
+        cmake -S. -Bbuild -GNinja \
+          -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.cmakeargs }} -DNINTENDO_3DS=ON \
+          -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/3DS.cmake
+
+    - name: Build DevilutionX
+      run: cmake --build build -j$(nproc)
+
+    - name: Upload
+      uses: actions/upload-artifact@v4
+      with:
+        name: ${{ matrix.artifact }}
+        path: build/devilutionx.3dsx
+
+    - name: Upload
+      uses: actions/upload-artifact@v4
+      with:
+        name: ${{ matrix.cia }}
+        path: build/devilutionx.cia
+
+  # switch-builds
+  build_switch:
+    needs: build_check
+    if: ${{ needs.build_check.outputs.should_run != 'false' }}
+    name: Nightly-Nintendo Switch
+    strategy:
+      fail-fast: false
+      matrix:
+        #name: [diablo, hellfire]
+        include:
+          - name: diablo
+            cmakeargs: '-DNONET=ON'
+            artifact: 'diablo-nightly-switch.nro'
+          - name: hellfire
+            cmakeargs: '-DNONET=ON -DHELLFIRE=ON'
+            artifact: 'hellfire-nightly-switch.nro'
+          - name: diablo-switch
+            cmakeargs: '-DNONET=ON -D USE_PATCH=ON'
+            artifact: 'diablo-nightly-switchp.nro'
+          - name: hellfire-switch
+            cmakeargs: '-DNONET=ON -D USE_PATCH=ON -DHELLFIRE=ON'
+            artifact: 'hellfire-nightly-switchp.nro'
+    runs-on: ubuntu-latest
+    container: devkitpro/devkita64:latest
+    steps:
+    - name: Checkout
+      uses: actions/checkout@v4
+      with:
+        fetch-depth: 0
+
+    #  - name: Create Build Environment
+    #    run: brew bundle install
+    - name: Install dependencies
+      shell: bash
+      run: |
+        apt-get update && \
+        apt-get install -y --no-install-recommends --no-install-suggests \
+          gettext
+
+    - name: Configure CMake
+      run: |
+        cmake -S . -B build \
+          -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.cmakeargs }} \
+          -D CMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake
+
+    - name: Build DevilutionX
+      run: cmake --build build -j$(nproc)
+
+    - name: Upload Package
+      uses: actions/upload-artifact@v4
+      with:
+        name: ${{ matrix.artifact }}
+        path: ./build/devilutionx.nro
+
+  # amiga-builds
+  build_amiga:
+    needs: build_check
+    if: ${{ needs.build_check.outputs.should_run != 'false' }}
+    name: Nightly-Amiga M68K
+    strategy:
+      fail-fast: false
+      matrix:
+        #name: [diablo, hellfire]
+        include:
+          - name: diablo
+            cmakeargs: '-DNONET=ON'
+            artifact: 'diablo-nightly-amiga'
+          - name: hellfire
+            cmakeargs: '-DNONET=ON -DHELLFIRE=ON'
+            artifact: 'hellfire-nightly-amiga'
+          - name: diablo-amiga
+            cmakeargs: '-DNONET=ON -D USE_PATCH=ON'
+            artifact: 'diablo-nightly-amigap'
+          - name: hellfire-amiga
+            cmakeargs: '-DNONET=ON -D USE_PATCH=ON -DHELLFIRE=ON'
+            artifact: 'hellfire-nightly-amigap'
+    runs-on: ubuntu-latest
+    container: amigadev/crosstools:m68k-amigaos-gcc10
+    steps:
+    - name: Checkout
+      uses: actions/checkout@v4
+      with:
+        fetch-depth: 0
+
+    - name: Run prep.sh script
+      run: Packaging/amiga/prep.sh
+
+    - name: Configure CMake
+      run: |
+        cmake -S. -Bbuild -GNinja \
+          -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.cmakeargs }} \
+          -DM68K_COMMON="-s -ffast-math -O3" \
+          -DM68K_CPU=68040 \
+          -DM68K_FPU=hard
+
+    - name: Build DevilutionX
+      run: cmake --build build
+
+    - name: Upload Package
+      uses: actions/upload-artifact@v4
+      with:
+        name: ${{ matrix.artifact }}
+        path: ./build/devilutionx
 
   # Releases
   release:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 08f94c02aa9..33d9c6fdd5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -688,15 +688,15 @@ if(USE_PATCH AND NOT ANDROID)
 
   if(NINTENDO_SWITCH)
     list(APPEND devil_patcher_SRCS
-      Source/platform/switch/docking.cpp
-      Source/platform/switch/romfs.cpp)
+      tools/patcher/platform/switch/docking.cpp
+      tools/patcher/platform/switch/romfs.cpp)
   endif()
 
   if(NINTENDO_3DS)
     list(APPEND devil_patcher_SRCS
-      Source/platform/ctr/system.cpp
-      Source/platform/ctr/display.cpp
-      Source/platform/ctr/messagebox.cpp)
+      tools/patcher/platform/ctr/system.cpp
+      tools/patcher/platform/ctr/display.cpp
+      tools/patcher/platform/ctr/messagebox.cpp)
   endif()
 
   set(PATCHER_SOURCES ${devil_patcher_SRCS})
@@ -1023,6 +1023,9 @@ if(NINTENDO_3DS)
   #target_include_directories(${BIN_TARGET} PRIVATE ${TREMOR_INCLUDE_DIRS})
   #target_link_libraries(${BIN_TARGET} PRIVATE 3ds::ogg 3ds::mikmod 3ds::mad 3ds::freetype 3ds::bzip2 3ds::png)
   target_link_libraries(${BIN_TARGET} PRIVATE 3ds::citro3d 3ds::ctrulib)
+  if(DEVIL_PATCHER)
+    target_link_libraries(${DEVIL_PATCHER} PRIVATE 3ds::citro3d 3ds::ctrulib)
+  endif()
 endif()
 
 if(GPERF)
diff --git a/Packaging/amiga/prep.sh b/Packaging/amiga/prep.sh
index 50b1c7a010b..548c2e75cce 100755
--- a/Packaging/amiga/prep.sh
+++ b/Packaging/amiga/prep.sh
@@ -1,78 +1,32 @@
-#!/usr/bin/env bash
-
-# exit when any command fails
-set -euo pipefail
-
-#set compiler params
-export TARGET='m68k-amigaos'
-export SYSROOT=/opt/$TARGET
-export M68K_CPU=68040
-export M68K_FPU=hard
-export M68K_CPU_FPU="-m${M68K_CPU} -m${M68K_FPU}-float"
-export M68K_COMMON="-s -ffast-math -fomit-frame-pointer"
-export M68K_CFLAGS="${M68K_CPU_FPU} ${M68K_COMMON}"
-export M68K_CXXFLAGS="${M68K_CPU_FPU} ${M68K_COMMON}"
-
-PARALLELISM="$(getconf _NPROCESSORS_ONLN)"
-
-declare -ra CMAKE_FLAGS=(
-  -DM68K_CPU="$M68K_CPU"
-  -DM68K_FPU="$M68K_FPU"
-  -DM68K_COMMON="$M68K_COMMON"
-  -DBUILD_SHARED_LIBS=OFF
-  -DCMAKE_BUILD_TYPE=Release
-  -DCMAKE_INSTALL_PREFIX="${SYSROOT}/usr"
-)
-
-mkdir -p deps
-mkdir -p ${SYSROOT}/usr/lib
-mkdir -p ${SYSROOT}/usr/include
-cd deps
-
-# ZLIB
-wget https://www.zlib.net/zlib-1.2.11.tar.gz -O zlib-1.2.11.tar.gz
-tar -xvf zlib-1.2.11.tar.gz
-mkdir -p zlib-1.2.11/build
-cd zlib-1.2.11
-cmake -S. -Bbuild "${CMAKE_FLAGS[@]}" -O3 -fno-exceptions -w -noixemul -DBIG_ENDIAN -DAMIGA -fpermissive -std=c++14"
-cmake --build build -j"$PARALLELISM" --config Release --target install
-cd ..
-
-# SDL1.2
-wget https://github.com/AmigaPorts/libSDL12/archive/master.tar.gz -O SDL-1.2.tar.gz
-tar -xvf SDL-1.2.tar.gz
-cd libSDL12-master
-make PREFX=${SYSROOT} PREF=${SYSROOT} -j"$PARALLELISM"
-mkdir -p ${SYSROOT}/usr/lib
-mkdir -p ${SYSROOT}/usr/include
-cp -fvr libSDL.a ${SYSROOT}/usr/lib/
-cp -fvr include/* ${SYSROOT}/usr/include/
-cd ..
-
-# SDL_mixer
-#wget https://github.com/SDL-mirror/SDL_mixer/archive/SDL-1.2.tar.gz -O SDL_mixer-SDL-1.2.tar.gz
-#tar -xvf SDL_mixer-SDL-1.2.tar.gz
-#cd SDL_mixer-SDL-1.2
-#./autogen.sh
-#SDL_LIBS='-lSDL -ldebug' SDL_CFLAGS="-I${SYSROOT}/usr/include/SDL -noixemul" CFLAGS="${M68K_CFLAGS}" CXXFLAGS="${M68K_CXXFLAGS}" ./configure --disable-sdltest --disable-shared --enable-static --host=${TARGET} --prefix="${SYSROOT}/usr"
-#make -j$(getconf _NPROCESSORS_ONLN)
-#make install
-#cd ..
-
-# FreeType
-#wget https://download.savannah.gnu.org/releases/freetype/freetype-2.10.1.tar.gz -O freetype-2.10.1.tar.gz
-#tar -xvf freetype-2.10.1.tar.gz
-#mkdir -p freetype-2.10.1/build
-#cd freetype-2.10.1
-#cmake -S. -Bbuild -DUNIX=1 -DM68K_CPU="$M68K_CPU" -DM68K_FPU="$M68K_FPU" -DM68K_COMMON="${M68K_COMMON}"
-#cmake --build build -j"$PARALLELISM" --config Release --target install
-#cd ..
-
-# SDL_ttf
-#wget https://github.com/SDL-mirror/SDL_ttf/archive/SDL-1.2.tar.gz -O SDL_ttf-SDL-1.2.tar.gz
-#tar -xvf SDL_ttf-SDL-1.2.tar.gz
-#cd SDL_ttf-SDL-1.2
-#./autogen.sh
-#LDFLAGS="-L${SYSROOT}/usr/lib" SDL_LIBS='-lSDL -ldebug' SDL_CFLAGS="-L${SYSROOT}/usr/lib -I${SYSROOT}/usr/include/SDL -noixemul"  CFLAGS="${M68K_CFLAGS}" CXXFLAGS="${M68K_CXXFLAGS}" FT2_CFLAGS="-L${SYSROOT}/usr/lib -I${SYSROOT}/usr/include/freetype2" FT2_LIBS="-lfreetype -lzlib" ./configure --disable-shared --enable-static --host=${TARGET} --prefix=${SYSROOT}/usr
-#make -j$(getconf _NPROCESSORS_ONLN)
-#make install
+#!/usr/bin/env bash
+
+# exit when any command fails
+set -euo pipefail
+
+#set compiler params
+export TARGET='m68k-amigaos'
+export SYSROOT=/opt/$TARGET
+export M68K_CPU=68040
+export M68K_FPU=hard
+export M68K_CPU_FPU="-m${M68K_CPU} -m${M68K_FPU}-float"
+export M68K_COMMON="-s -ffast-math -fomit-frame-pointer"
+export M68K_CFLAGS="${M68K_CPU_FPU} ${M68K_COMMON}"
+export M68K_CXXFLAGS="${M68K_CPU_FPU} ${M68K_COMMON}"
+
+PARALLELISM="$(getconf _NPROCESSORS_ONLN)"
+
+mkdir -p deps
+mkdir -p ${SYSROOT}/usr/lib
+mkdir -p ${SYSROOT}/usr/include
+cd deps
+
+# SDL1.2
+wget https://github.com/AmigaPorts/libSDL12/archive/master.tar.gz -O SDL-1.2.tar.gz
+tar -xvf SDL-1.2.tar.gz
+cd libSDL12-master
+make PREFX=${SYSROOT} PREF=${SYSROOT} -j"$PARALLELISM"
+mkdir -p ${SYSROOT}/usr/lib
+mkdir -p ${SYSROOT}/usr/include
+cp -fvr libSDL.a ${SYSROOT}/usr/lib/
+cp -fvr include/* ${SYSROOT}/usr/include/
+cd ..
diff --git a/Source/mpqapi.cpp b/Source/mpqapi.cpp
index f4b8c758258..796eb37b2de 100644
--- a/Source/mpqapi.cpp
+++ b/Source/mpqapi.cpp
@@ -579,7 +579,7 @@ static bool mpqapi_write_file_contents(const char* pszName, const BYTE* pbData,
 		goto on_error;
 #else
 	// Ensure we do not seekp beyond EOF by filling the missing space.
-	std::streampos stream_end;
+	long stream_end;
 	if (!cur_archive.stream.seekp(0, SEEK_END) || !cur_archive.stream.tellp(&stream_end))
 		goto on_error;
 	std::size_t curSize = stream_end - cur_archive.stream_begin;
diff --git a/Source/platform/ctr/asio/net/if.c b/Source/platform/ctr/asio/net/if.c
index 910cb557701..4e72fa6e42f 100644
--- a/Source/platform/ctr/asio/net/if.c
+++ b/Source/platform/ctr/asio/net/if.c
@@ -1,3 +1,4 @@
+#ifdef TCPIP
 #include <stddef.h>
 #include <errno.h>
 #include <net/if.h>
@@ -20,3 +21,4 @@ struct if_nameindex *if_nameindex()
 void if_freenameindex(struct if_nameindex *__ptr)
 {
 }
+#endif
\ No newline at end of file
diff --git a/Source/platform/ctr/asio/sys/socket.c b/Source/platform/ctr/asio/sys/socket.c
index 30710ec6646..c1dfaa492ef 100644
--- a/Source/platform/ctr/asio/sys/socket.c
+++ b/Source/platform/ctr/asio/sys/socket.c
@@ -1,3 +1,4 @@
+#ifdef TCPIP
 #include <sys/socket.h>
 #include <sys/types.h>
 #include <sys/uio.h>
@@ -106,3 +107,4 @@ int socketpair(int domain, int type, int protocol, int socket_vector[2])
 {
 	return ENOTSUP;
 }
+#endif
\ No newline at end of file
diff --git a/Source/platform/ctr/asio/sys/uio.c b/Source/platform/ctr/asio/sys/uio.c
index 4d6b74a1728..352b862928f 100644
--- a/Source/platform/ctr/asio/sys/uio.c
+++ b/Source/platform/ctr/asio/sys/uio.c
@@ -1,3 +1,4 @@
+#ifdef TCPIP
 #include <sys/uio.h>
 #include <sys/types.h>
 #include <errno.h>
@@ -11,3 +12,4 @@ ssize_t writev(int __fd, const struct iovec *__iovec, int __count)
 {
 	return ENOTSUP;
 }
+#endif
\ No newline at end of file
diff --git a/Source/platform/ctr/keyboard.cpp b/Source/platform/ctr/keyboard.cpp
index 4b56b18df49..b41aab96ef4 100644
--- a/Source/platform/ctr/keyboard.cpp
+++ b/Source/platform/ctr/keyboard.cpp
@@ -1,7 +1,8 @@
+#include "platform/ctr/keyboard.h"
+
 #include <cstdlib>
 #include <cstring>
-
-#include "platform/ctr/keyboard.h"
+#include <3ds.h>
 
 constexpr size_t MAX_TEXT_LENGTH = 255;
 
@@ -13,7 +14,7 @@ struct vkbdEvent {
 };
 
 static vkbdEvent events[16];
-static int eventCount = 0;
+static unsigned eventCount = 0;
 
 void ctr_vkbdInput(const char *hintText, const char *inText, char *outText, int maxLength)
 {
@@ -30,7 +31,7 @@ void ctr_vkbdInput(const char *hintText, const char *inText, char *outText, int
 
 void ctr_vkbdFlush()
 {
-	for (int i = 0; i < eventCount; i++) {
+	for (unsigned i = 0; i < eventCount; i++) {
 		vkbdEvent &event = events[i];
 		SwkbdState swkbd;
 
diff --git a/Source/platform/ctr/keyboard.h b/Source/platform/ctr/keyboard.h
index 1fde63234a7..81fbe56dfa7 100644
--- a/Source/platform/ctr/keyboard.h
+++ b/Source/platform/ctr/keyboard.h
@@ -1,6 +1,4 @@
 #pragma once
 
-#include <3ds.h>
-
 void ctr_vkbdInput(const char *title, const char *inText, char *outText, int maxLength);
 void ctr_vkbdFlush();
diff --git a/Source/platform/ctr/messagebox.cpp b/Source/platform/ctr/messagebox.cpp
index cee9d1b2e05..bfca1bd5620 100644
--- a/Source/platform/ctr/messagebox.cpp
+++ b/Source/platform/ctr/messagebox.cpp
@@ -1,6 +1,7 @@
 #include <3ds.h>
 #include <SDL.h>
 #include "utils/sdl2_to_1_2_backports.h"
+#include "utils/log.h"
 
 int SDL_ShowSimpleMessageBox(Uint32 flags,
     const char *title,
@@ -13,7 +14,7 @@ int SDL_ShowSimpleMessageBox(Uint32 flags,
 	bool init = !gspHasGpuRight();
 
 	char text[1024];
-	snprintf(text, sizeof(text), "%s\n\n%s", title, message)
+	snprintf(text, sizeof(text), "%s\n\n%s", title, message);
 
 	if (init)
 		gfxInitDefault();
diff --git a/Source/platform/ctr/random.cpp b/Source/platform/ctr/random.cpp
index c18b4944114..aa566ee4be2 100644
--- a/Source/platform/ctr/random.cpp
+++ b/Source/platform/ctr/random.cpp
@@ -1,3 +1,5 @@
+#include "random.hpp"
+#ifndef NONET
 #include <sys/types.h>
 #include <sodium.h>
 #include <3ds.h>
@@ -46,3 +48,8 @@ void randombytes_ctrrandom_init()
 {
 	randombytes_set_implementation(&randombytes_ctrrandom_implementation);
 }
+#else
+void randombytes_ctrrandom_init()
+{
+}
+#endif // !NONET
\ No newline at end of file
diff --git a/Source/platform/ctr/sockets.cpp b/Source/platform/ctr/sockets.cpp
index a3157540344..bc4909fc453 100644
--- a/Source/platform/ctr/sockets.cpp
+++ b/Source/platform/ctr/sockets.cpp
@@ -1,5 +1,9 @@
+#include "sockets.hpp"
+#ifndef NONET
 #include <malloc.h>
+#include <cstdlib>
 #include <3ds.h>
+#include "utils/log.h"
 
 constexpr auto SOC_ALIGN = 0x1000;
 constexpr auto SOC_BUFFERSIZE = 0x100000;
@@ -59,4 +63,11 @@ void n3ds_socInit()
 		atexit([]() { n3ds_socExit(); });
 	initialized = true;
 }
-
+#else
+void n3ds_socExit()
+{
+}
+void n3ds_socInit()
+{
+}
+#endif // !NONET
\ No newline at end of file
diff --git a/Source/platform/ctr/system.cpp b/Source/platform/ctr/system.cpp
index 815acb36e63..15ca6d97c39 100644
--- a/Source/platform/ctr/system.cpp
+++ b/Source/platform/ctr/system.cpp
@@ -1,7 +1,7 @@
 #include <3ds.h>
 #include <cstdlib>
 #include <cstdio>
-#include "platform/ctr/cfgu_service.hpp
+#include "platform/ctr/cfgu_service.hpp"
 #include "platform/ctr/random.hpp"
 #include "platform/ctr/sockets.hpp"
 #include "platform/ctr/system.h"
@@ -78,7 +78,7 @@ bool ctr_is_n3ds()
 
 bool ctr_should_disable_backlight()
 {
-	n3ds::CFGUService cfguService;
+	dvl::n3ds::CFGUService cfguService;
 	if (!cfguService.IsInitialized())
 		return false;
 
diff --git a/Source/platform/switch/asio/net/if.c b/Source/platform/switch/asio/net/if.c
index 910cb557701..4e72fa6e42f 100644
--- a/Source/platform/switch/asio/net/if.c
+++ b/Source/platform/switch/asio/net/if.c
@@ -1,3 +1,4 @@
+#ifdef TCPIP
 #include <stddef.h>
 #include <errno.h>
 #include <net/if.h>
@@ -20,3 +21,4 @@ struct if_nameindex *if_nameindex()
 void if_freenameindex(struct if_nameindex *__ptr)
 {
 }
+#endif
\ No newline at end of file
diff --git a/Source/platform/switch/asio/pause.c b/Source/platform/switch/asio/pause.c
index 2911968375a..d663ee7c09c 100644
--- a/Source/platform/switch/asio/pause.c
+++ b/Source/platform/switch/asio/pause.c
@@ -1,7 +1,9 @@
+#ifdef TCPIP
 #include <errno.h>
 
 int pause(void)
 {
 	errno = ENOSYS;
 	return -1;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/Source/platform/switch/asio/sys/signal.c b/Source/platform/switch/asio/sys/signal.c
index 4b9c394d48d..b5c3c99a7b0 100644
--- a/Source/platform/switch/asio/sys/signal.c
+++ b/Source/platform/switch/asio/sys/signal.c
@@ -1,3 +1,4 @@
+#ifdef TCPIP
 #include <sys/signal.h>
 #include <errno.h>
 
@@ -5,3 +6,4 @@ int pthread_sigmask(int, const sigset_t *, sigset_t *)
 {
 	return ENOTSUP;
 }
+#endif
\ No newline at end of file
diff --git a/Source/platform/switch/docking.cpp b/Source/platform/switch/docking.cpp
index d70639c0cfb..ec70f41d613 100644
--- a/Source/platform/switch/docking.cpp
+++ b/Source/platform/switch/docking.cpp
@@ -3,6 +3,8 @@
 #include <switch.h>
 #include <SDL.h>
 
+#include "utils/display.h"
+
 DEVILUTION_BEGIN_NAMESPACE
 
 static int currently_docked = -1; // keep track of docked or handheld mode
diff --git a/Source/platform/switch/docking.h b/Source/platform/switch/docking.h
index 67348111ef1..235071f44e8 100644
--- a/Source/platform/switch/docking.h
+++ b/Source/platform/switch/docking.h
@@ -1,5 +1,7 @@
 #pragma once
 
+#include "../defs.h"
+
 DEVILUTION_BEGIN_NAMESPACE
 
 void HandleDocking();
diff --git a/Source/platform/switch/network.cpp b/Source/platform/switch/network.cpp
index 4526f1a619b..195d5797bc4 100644
--- a/Source/platform/switch/network.cpp
+++ b/Source/platform/switch/network.cpp
@@ -1,3 +1,6 @@
+#include "platform/switch/network.h"
+
+#ifndef NONET
 #include <cstdlib>
 #include <unistd.h>
 #include <switch.h>
@@ -21,3 +24,11 @@ void switch_disable_network()
 		close(nxlink_sock);
 	socketExit();
 }
+#else
+void switch_enable_network()
+{
+}
+void switch_disable_network()
+{
+}
+#endif
\ No newline at end of file
diff --git a/Source/platform/switch/random.cpp b/Source/platform/switch/random.cpp
index 6c16d228cd8..651f788eec6 100644
--- a/Source/platform/switch/random.cpp
+++ b/Source/platform/switch/random.cpp
@@ -1,3 +1,6 @@
+#include "random.hpp"
+
+#ifndef NONET
 #include <sys/types.h>
 #include <sodium.h>
 
@@ -52,3 +55,8 @@ void randombytes_switchrandom_init()
 	randombytes_set_implementation(&randombytes_switchrandom_implementation);
 	atexit(csrngExit);
 }
+#else
+void randombytes_switchrandom_init()
+{
+}
+#endif // !NONET
\ No newline at end of file
diff --git a/Source/storm/storm.cpp b/Source/storm/storm.cpp
index 8b042a003be..b8d25391711 100644
--- a/Source/storm/storm.cpp
+++ b/Source/storm/storm.cpp
@@ -88,9 +88,12 @@ HANDLE SFileOpenFile(const char* filename)
 
 void SStrCopy(char* dest, const char* src, int max_length)
 {
+#ifndef __AMIGA__
 	if (memccpy(dest, src, '\0', max_length) == NULL)
 		dest[max_length - 1] = '\0';
-	//strncpy(dest, src, max_length);
+#else
+	strncpy(dest, src, max_length);
+#endif
 }
 
 void SFileEnableDirectAccess(bool enable)
diff --git a/Source/storm/storm_net.cpp b/Source/storm/storm_net.cpp
index dbc0e586901..57f29bd93e0 100644
--- a/Source/storm/storm_net.cpp
+++ b/Source/storm/storm_net.cpp
@@ -34,15 +34,12 @@ void SNetUnregisterEventHandler(int evtype)
 bool SNetCreateGame(unsigned port, const char* pszGamePassword, _uigamedata* gameData, char (&errorText)[256])
 {
 	bool result;
-
 	// assert(gameData != NULL && pszGamePassword != NULL);
 	dvlnet_inst->make_default_gamename(gpszGameName);
 	SStrCopy(gpszGamePassword, pszGamePassword, sizeof(gpszGamePassword));
 	result = dvlnet_inst->setup_game(gameData, gpszGameName, port, pszGamePassword, errorText);
 #ifdef ZEROTIER
-	if (port == 0)
-		SStrCopy(gpszGameName, gpszGameName, sizeof(gpszGameName));
-	else
+	if (port != 0)
 #endif
 		snprintf(gpszGameName, sizeof(gpszGameName), "%s:%d", gpszGameName, port);
 	return result;
@@ -50,13 +47,13 @@ bool SNetCreateGame(unsigned port, const char* pszGamePassword, _uigamedata* gam
 
 bool SNetJoinGame(const char* pszGameName, unsigned port, const char* pszGamePassword, char (&errorText)[256])
 {
+	const char* format = "%s:%d";
 	// assert(pszGameName != NULL && pszGamePassword != NULL);
 #ifdef ZEROTIER
 	if (port == 0)
-		SStrCopy(gpszGameName, gpszGameName, sizeof(gpszGameName));
-	else
+		format = "%s";
 #endif
-		snprintf(gpszGameName, sizeof(gpszGameName), "%s:%d", pszGameName, port);
+	snprintf(gpszGameName, sizeof(gpszGameName), format, pszGameName, port);
 	SStrCopy(gpszGamePassword, pszGamePassword, sizeof(gpszGamePassword));
 	return dvlnet_inst->setup_game(NULL, pszGameName, port, pszGamePassword, errorText);
 }
diff --git a/Source/town.cpp b/Source/town.cpp
index 6d23d5f85fc..f6436c1c574 100644
--- a/Source/town.cpp
+++ b/Source/town.cpp
@@ -67,7 +67,7 @@ static void LoadTown()
 	uint32_t* pBuf = (uint32_t*)LoadFileInMem(TOWN_PREDUN);
 	int* dp = &dPiece[0][0];
 	uint32_t* pTmp = pBuf;
-	for (x = 0; x < MAXDUNX * MAXDUNY; x++, dp++, pTmp++)
+	for (int x = 0; x < MAXDUNX * MAXDUNY; x++, dp++, pTmp++)
 		*dp = SwapLE32(*pTmp);
 
 	mem_free_dbg(pBuf);
diff --git a/structs.h b/structs.h
index e078f5c79f2..f03ef5285b8 100644
--- a/structs.h
+++ b/structs.h
@@ -3,11 +3,16 @@
  *
  * Various global structures.
  */
+#ifndef _STRUCTS_H
+#define _STRUCTS_H
 
 DEVILUTION_BEGIN_NAMESPACE
 
-#ifndef _STRUCTS_H
-#define _STRUCTS_H
+#ifndef __AMIGA__
+#define static_warning(x, msg) static_assert(x, msg)
+#else
+#define static_warning(x, msg)
+#endif
 
 #if INT_MAX == INT32_MAX && INTPTR_MAX == INT32_MAX
 #define X86_32bit_COMP
@@ -136,7 +141,7 @@ typedef struct UniqItemData {
 } UniqItemData;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(UniqItemData) & (sizeof(UniqItemData) - 1)) == 64, "Align UniqItemData to power of 2 for better performance.");
+static_warning((sizeof(UniqItemData) & (sizeof(UniqItemData) - 1)) == 64, "Align UniqItemData to power of 2 for better performance.");
 #endif
 
 typedef struct ItemFileData {
@@ -148,7 +153,7 @@ typedef struct ItemFileData {
 } ItemFileData;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(ItemFileData) & (sizeof(ItemFileData) - 1)) == 0, "Align ItemFileData to power of 2 for better performance.");
+static_warning((sizeof(ItemFileData) & (sizeof(ItemFileData) - 1)) == 0, "Align ItemFileData to power of 2 for better performance.");
 #endif
 
 typedef struct ItemData {
@@ -178,7 +183,7 @@ typedef struct ItemData {
 } ItemData;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(ItemData) & (sizeof(ItemData) - 1)) == 0, "Align ItemData to power of 2 for better performance.");
+static_warning((sizeof(ItemData) & (sizeof(ItemData) - 1)) == 0, "Align ItemData to power of 2 for better performance.");
 #endif
 
 typedef struct ItemStruct {
@@ -266,7 +271,7 @@ typedef struct ItemStruct {
 } ItemStruct;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(ItemStruct) & (sizeof(ItemStruct) - 1)) == 0, "Align ItemStruct closer to power of 2 for better performance.");
+static_warning((sizeof(ItemStruct) & (sizeof(ItemStruct) - 1)) == 0, "Align ItemStruct closer to power of 2 for better performance.");
 #endif
 
 //////////////////////////////////////////////////
@@ -279,7 +284,7 @@ typedef struct PlrAnimType {
 } PlrAnimType;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(PlrAnimType) & (sizeof(PlrAnimType) - 1)) == 0, "Align PlrAnimType closer to power of 2 for better performance.");
+static_warning((sizeof(PlrAnimType) & (sizeof(PlrAnimType) - 1)) == 0, "Align PlrAnimType closer to power of 2 for better performance.");
 #endif
 
 typedef struct PlrAnimStruct {
@@ -288,9 +293,9 @@ typedef struct PlrAnimStruct {
 	int paAnimWidth;
 } PlrAnimStruct;
 #ifdef X86_32bit_COMP
-static_assert((sizeof(PlrAnimStruct) & (sizeof(PlrAnimStruct) - 1)) == 32, "Align PlrAnimStruct closer to power of 2 for better performance.");
+static_warning((sizeof(PlrAnimStruct) & (sizeof(PlrAnimStruct) - 1)) == 32, "Align PlrAnimStruct closer to power of 2 for better performance.");
 #elif defined(X86_64bit_COMP)
-static_assert((sizeof(PlrAnimStruct) & (sizeof(PlrAnimStruct) - 1)) == 64, "Align PlrAnimStruct closer to power of 2 for better performance.");
+static_warning((sizeof(PlrAnimStruct) & (sizeof(PlrAnimStruct) - 1)) == 64, "Align PlrAnimStruct closer to power of 2 for better performance.");
 #endif
 
 typedef struct PlayerStruct {
@@ -445,7 +450,7 @@ typedef struct PlayerStruct {
 } PlayerStruct;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(PlayerStruct) & (sizeof(PlayerStruct) - 1)) == 0, "Align PlayerStruct closer to power of 2 for better performance.");
+static_warning((sizeof(PlayerStruct) & (sizeof(PlayerStruct) - 1)) == 0, "Align PlayerStruct closer to power of 2 for better performance.");
 #endif
 
 //////////////////////////////////////////////////
@@ -479,7 +484,7 @@ typedef struct MissileData {
 } MissileData;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(MissileData) & (sizeof(MissileData) - 1)) == 0, "Align MissileData to power of 2 for better performance.");
+static_warning((sizeof(MissileData) & (sizeof(MissileData) - 1)) == 0, "Align MissileData to power of 2 for better performance.");
 #endif
 
 typedef struct MisFileData {
@@ -494,7 +499,7 @@ typedef struct MisFileData {
 	ALIGNMENT(2, 14)
 } MisFileData;
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(MisFileData) & (sizeof(MisFileData) - 1)) == 0, "Align MisFileData to power of 2 for better performance.");
+static_warning((sizeof(MisFileData) & (sizeof(MisFileData) - 1)) == 0, "Align MisFileData to power of 2 for better performance.");
 #endif
 
 typedef struct MissileStruct {
@@ -547,9 +552,9 @@ typedef struct MissileStruct {
 } MissileStruct;
 
 #ifdef X86_32bit_COMP
-static_assert((sizeof(MissileStruct) & (sizeof(MissileStruct) - 1)) == 128, "Align MissileStruct closer to power of 2 for better performance.");
+static_warning((sizeof(MissileStruct) & (sizeof(MissileStruct) - 1)) == 128, "Align MissileStruct closer to power of 2 for better performance.");
 #elif defined(X86_64bit_COMP)
-static_assert((sizeof(MissileStruct) & (sizeof(MissileStruct) - 1)) == 0, "Align MissileStruct closer to power of 2 for better performance.");
+static_warning((sizeof(MissileStruct) & (sizeof(MissileStruct) - 1)) == 0, "Align MissileStruct closer to power of 2 for better performance.");
 #endif
 
 //////////////////////////////////////////////////
@@ -588,9 +593,9 @@ typedef struct MonAnimStruct {
 	int maFrameLen;
 } MonAnimStruct;
 #ifdef X86_32bit_COMP
-static_assert((sizeof(MonAnimStruct) & (sizeof(MonAnimStruct) - 1)) == 32, "Align MonAnimStruct closer to power of 2 for better performance.");
+static_warning((sizeof(MonAnimStruct) & (sizeof(MonAnimStruct) - 1)) == 32, "Align MonAnimStruct closer to power of 2 for better performance.");
 #elif defined(X86_64bit_COMP)
-static_assert((sizeof(MonAnimStruct) & (sizeof(MonAnimStruct) - 1)) == 64, "Align MonAnimStruct closer to power of 2 for better performance.");
+static_warning((sizeof(MonAnimStruct) & (sizeof(MonAnimStruct) - 1)) == 64, "Align MonAnimStruct closer to power of 2 for better performance.");
 #endif
 
 typedef struct MonsterAI {
@@ -626,7 +631,7 @@ typedef struct MonsterData {
 	ALIGNMENT(5, 2)
 } MonsterData;
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(MonsterData) & (sizeof(MonsterData) - 1)) == 0, "Align MonsterData to power of 2 for better performance.");
+static_warning((sizeof(MonsterData) & (sizeof(MonsterData) - 1)) == 0, "Align MonsterData to power of 2 for better performance.");
 #endif
 
 typedef struct MonFileData {
@@ -641,9 +646,9 @@ typedef struct MonFileData {
 	BYTE moAFNum2;
 } MonFileData;
 #ifdef X86_32bit_COMP
-static_assert((sizeof(MonFileData) & (sizeof(MonFileData) - 1)) == 0, "Align MonFileData to power of 2 for better performance.");
+static_warning((sizeof(MonFileData) & (sizeof(MonFileData) - 1)) == 0, "Align MonFileData to power of 2 for better performance.");
 #elif defined(X86_64bit_COMP)
-static_assert((sizeof(MonFileData) & (sizeof(MonFileData) - 1)) == 64, "Align MonFileData to power of 2 for better performance.");
+static_warning((sizeof(MonFileData) & (sizeof(MonFileData) - 1)) == 64, "Align MonFileData to power of 2 for better performance.");
 #endif
 #pragma pack(push, 1)
 typedef struct MapMonData {
@@ -679,9 +684,9 @@ typedef struct MapMonData {
 	ALIGNMENT(24, 17);
 } MapMonData;
 #ifdef X86_32bit_COMP
-static_assert((sizeof(MapMonData) & (sizeof(MapMonData) - 1)) == 0, "Align MapMonData closer to power of 2 for better performance.");
+static_warning((sizeof(MapMonData) & (sizeof(MapMonData) - 1)) == 0, "Align MapMonData closer to power of 2 for better performance.");
 #elif defined(X86_64bit_COMP)
-static_assert((sizeof(MapMonData) & (sizeof(MapMonData) - 1)) == 512, "Align MapMonData closer to power of 2 for better performance.");
+static_warning((sizeof(MapMonData) & (sizeof(MapMonData) - 1)) == 512, "Align MapMonData closer to power of 2 for better performance.");
 #endif
 #pragma pack(pop)
 typedef struct MonsterStruct {
@@ -763,7 +768,7 @@ typedef struct MonsterStruct {
 } MonsterStruct;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(MonsterStruct) & (sizeof(MonsterStruct) - 1)) == 0, "Align MonsterStruct to power of 2 for better performance.");
+static_warning((sizeof(MonsterStruct) & (sizeof(MonsterStruct) - 1)) == 0, "Align MonsterStruct to power of 2 for better performance.");
 #endif
 
 typedef struct MonEnemyStruct {
@@ -798,7 +803,7 @@ typedef struct UniqMonData {
 } UniqMonData;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(UniqMonData) & (sizeof(UniqMonData) - 1)) == 0, "Align UniqMonData to power of 2 for better performance.");
+static_warning((sizeof(UniqMonData) & (sizeof(UniqMonData) - 1)) == 0, "Align UniqMonData to power of 2 for better performance.");
 #endif
 
 //////////////////////////////////////////////////
@@ -833,7 +838,7 @@ typedef struct ObjectData {
 } ObjectData;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(ObjectData) & (sizeof(ObjectData) - 1)) == 0, "Align ObjectData closer to power of 2 for better performance.");
+static_warning((sizeof(ObjectData) & (sizeof(ObjectData) - 1)) == 0, "Align ObjectData closer to power of 2 for better performance.");
 #endif
 
 typedef struct ObjFileData {
@@ -850,7 +855,7 @@ typedef struct ObjFileData {
 } ObjFileData;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(ObjFileData) & (sizeof(ObjFileData) - 1)) == 0, "Align ObjFileData closer to power of 2 for better performance.");
+static_warning((sizeof(ObjFileData) & (sizeof(ObjFileData) - 1)) == 0, "Align ObjFileData closer to power of 2 for better performance.");
 #endif
 
 typedef struct ObjectStruct {
@@ -892,7 +897,7 @@ typedef struct ObjectStruct {
 } ObjectStruct;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(ObjectStruct) & (sizeof(ObjectStruct) - 1)) == 0, "Align ObjectStruct to power of 2 for better performance.");
+static_warning((sizeof(ObjectStruct) & (sizeof(ObjectStruct) - 1)) == 0, "Align ObjectStruct to power of 2 for better performance.");
 #endif
 
 //////////////////////////////////////////////////
@@ -907,7 +912,7 @@ typedef struct PortalStruct {
 } PortalStruct;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(PortalStruct) & (sizeof(PortalStruct) - 1)) == 0, "Align PortalStruct closer to power of 2 for better performance.");
+static_warning((sizeof(PortalStruct) & (sizeof(PortalStruct) - 1)) == 0, "Align PortalStruct closer to power of 2 for better performance.");
 #endif
 
 //////////////////////////////////////////////////
@@ -962,6 +967,9 @@ typedef struct LE_UINT32 {
 	void operator=(unsigned val) {
 		_value = SwapLE32(val);
 	};
+	void operator=(unsigned long val) {
+		_value = SwapLE32(val);
+	};
 #if INT_MAX != INT32_MAX
 	void operator=(uint32_t val) {
 		_value = SwapLE32(val);
@@ -988,6 +996,9 @@ typedef struct LE_INT32 {
 	void operator=(int val) {
 		_value = SwapLE32(val);
 	};
+	void operator=(long val) {
+		_value = SwapLE32(val);
+	};
 #if INT_MAX != INT32_MAX
 	void operator=(int32_t val) {
 		_value = SwapLE32(val);
@@ -2112,9 +2123,9 @@ typedef struct LevelData {
 } LevelData;
 
 #ifdef X86_32bit_COMP
-static_assert((sizeof(LevelData) & (sizeof(LevelData) - 1)) == 0, "Align LevelData to power of 2 for better performance.");
+static_warning((sizeof(LevelData) & (sizeof(LevelData) - 1)) == 0, "Align LevelData to power of 2 for better performance.");
 #elif defined(X86_64bit_COMP)
-static_assert((sizeof(LevelData) & (sizeof(LevelData) - 1)) == 64, "Align LevelData to power of 2 for better performance.");
+static_warning((sizeof(LevelData) & (sizeof(LevelData) - 1)) == 64, "Align LevelData to power of 2 for better performance.");
 #endif
 
 typedef struct WarpStruct {
@@ -2149,7 +2160,7 @@ typedef struct QuestStruct {
 } QuestStruct;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(QuestStruct) & (sizeof(QuestStruct) - 1)) == 0, "Align QuestStruct to power of 2 for better performance.");
+static_warning((sizeof(QuestStruct) & (sizeof(QuestStruct) - 1)) == 0, "Align QuestStruct to power of 2 for better performance.");
 #endif
 
 typedef struct QuestData {
@@ -2204,7 +2215,7 @@ typedef struct SpellData {
 	ALIGNMENT64(6)
 } SpellData;
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(SpellData) & (sizeof(SpellData) - 1)) == 0, "Align SpellData to power of 2 for better performance.");
+static_warning((sizeof(SpellData) & (sizeof(SpellData) - 1)) == 0, "Align SpellData to power of 2 for better performance.");
 #endif
 
 //////////////////////////////////////////////////
@@ -2321,7 +2332,7 @@ typedef struct ThemeStruct {
 } ThemeStruct;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(ThemeStruct) & (sizeof(ThemeStruct) - 1)) == 0, "Align ThemeStruct to power of 2 for better performance.");
+static_warning((sizeof(ThemeStruct) & (sizeof(ThemeStruct) - 1)) == 0, "Align ThemeStruct to power of 2 for better performance.");
 #endif
 
 //////////////////////////////////////////////////
@@ -2355,7 +2366,7 @@ typedef struct LightListStruct {
 } LightListStruct;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(LightListStruct) & (sizeof(LightListStruct) - 1)) == 0, "Align LightListStruct closer to power of 2 for better performance.");
+static_warning((sizeof(LightListStruct) & (sizeof(LightListStruct) - 1)) == 0, "Align LightListStruct closer to power of 2 for better performance.");
 #endif
 
 //////////////////////////////////////////////////
@@ -2486,7 +2497,7 @@ typedef struct PATHNODE {
 } PATHNODE;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(PATHNODE) & (sizeof(PATHNODE) - 1)) == 0, "Align PATHNODE closer to power of 2 for better performance.");
+static_warning((sizeof(PATHNODE) & (sizeof(PATHNODE) - 1)) == 0, "Align PATHNODE closer to power of 2 for better performance.");
 #endif
 
 //////////////////////////////////////////////////
@@ -2576,7 +2587,7 @@ typedef struct STextStruct {
 } STextStruct;
 
 #if defined(X86_32bit_COMP) || defined(X86_64bit_COMP)
-static_assert((sizeof(STextStruct) & (sizeof(STextStruct) - 1)) == 0, "Align STextStruct closer to power of 2 for better performance.");
+static_warning((sizeof(STextStruct) & (sizeof(STextStruct) - 1)) == 0, "Align STextStruct closer to power of 2 for better performance.");
 #endif
 
 //////////////////////////////////////////////////
diff --git a/tools/patcher/DiabloUI/diabloui.cpp b/tools/patcher/DiabloUI/diabloui.cpp
index febce856ba2..493058508a5 100644
--- a/tools/patcher/DiabloUI/diabloui.cpp
+++ b/tools/patcher/DiabloUI/diabloui.cpp
@@ -462,11 +462,13 @@ void UiRenderAndPoll()
 #if HAS_GAMECTRL || HAS_JOYSTICK || HAS_KBCTRL || HAS_DPAD
 	HandleMenuMove();
 #endif
+#if FULL_UI
 #ifdef __3DS__
 	// Keyboard blocks until input is finished
 	// so defer until after render and fade-in
 	ctr_vkbdFlush();
 #endif
+#endif // FULL_UI
 }
 
 static void Render(const UiText* uiArtText)
diff --git a/tools/patcher/mpqapi.cpp b/tools/patcher/mpqapi.cpp
index f4b8c758258..796eb37b2de 100644
--- a/tools/patcher/mpqapi.cpp
+++ b/tools/patcher/mpqapi.cpp
@@ -579,7 +579,7 @@ static bool mpqapi_write_file_contents(const char* pszName, const BYTE* pbData,
 		goto on_error;
 #else
 	// Ensure we do not seekp beyond EOF by filling the missing space.
-	std::streampos stream_end;
+	long stream_end;
 	if (!cur_archive.stream.seekp(0, SEEK_END) || !cur_archive.stream.tellp(&stream_end))
 		goto on_error;
 	std::size_t curSize = stream_end - cur_archive.stream_begin;
diff --git a/tools/patcher/platform/ctr/keyboard.cpp b/tools/patcher/platform/ctr/keyboard.cpp
index 4b56b18df49..96882947c6d 100644
--- a/tools/patcher/platform/ctr/keyboard.cpp
+++ b/tools/patcher/platform/ctr/keyboard.cpp
@@ -13,7 +13,7 @@ struct vkbdEvent {
 };
 
 static vkbdEvent events[16];
-static int eventCount = 0;
+static unsigned eventCount = 0;
 
 void ctr_vkbdInput(const char *hintText, const char *inText, char *outText, int maxLength)
 {
@@ -30,7 +30,7 @@ void ctr_vkbdInput(const char *hintText, const char *inText, char *outText, int
 
 void ctr_vkbdFlush()
 {
-	for (int i = 0; i < eventCount; i++) {
+	for (unsigned i = 0; i < eventCount; i++) {
 		vkbdEvent &event = events[i];
 		SwkbdState swkbd;
 
diff --git a/tools/patcher/platform/ctr/messagebox.cpp b/tools/patcher/platform/ctr/messagebox.cpp
index cee9d1b2e05..bfca1bd5620 100644
--- a/tools/patcher/platform/ctr/messagebox.cpp
+++ b/tools/patcher/platform/ctr/messagebox.cpp
@@ -1,6 +1,7 @@
 #include <3ds.h>
 #include <SDL.h>
 #include "utils/sdl2_to_1_2_backports.h"
+#include "utils/log.h"
 
 int SDL_ShowSimpleMessageBox(Uint32 flags,
     const char *title,
@@ -13,7 +14,7 @@ int SDL_ShowSimpleMessageBox(Uint32 flags,
 	bool init = !gspHasGpuRight();
 
 	char text[1024];
-	snprintf(text, sizeof(text), "%s\n\n%s", title, message)
+	snprintf(text, sizeof(text), "%s\n\n%s", title, message);
 
 	if (init)
 		gfxInitDefault();
diff --git a/tools/patcher/platform/ctr/system.cpp b/tools/patcher/platform/ctr/system.cpp
index 8ed89cb85f4..876a8199e92 100644
--- a/tools/patcher/platform/ctr/system.cpp
+++ b/tools/patcher/platform/ctr/system.cpp
@@ -1,7 +1,7 @@
 #include <3ds.h>
 #include <cstdlib>
 #include <cstdio>
-#include "platform/ctr/cfgu_service.hpp
+#include "platform/ctr/cfgu_service.hpp"
 #include "platform/ctr/system.h"
 
 bool shouldDisableBacklight;
@@ -76,7 +76,7 @@ bool ctr_is_n3ds()
 
 bool ctr_should_disable_backlight()
 {
-	n3ds::CFGUService cfguService;
+	dvl::n3ds::CFGUService cfguService;
 	if (!cfguService.IsInitialized())
 		return false;
 
@@ -109,8 +109,8 @@ void ctr_sys_init()
 	acInit();
 	atexit([]() { acExit(); });
 
-	n3ds_socInit();
-	atexit([]() { n3ds_socExit(); });
+	// n3ds_socInit();
+	// atexit([]() { n3ds_socExit(); });
 
 	// randombytes_ctrrandom_init();
 	atexit([]() {
diff --git a/tools/patcher/platform/switch/docking.cpp b/tools/patcher/platform/switch/docking.cpp
index d70639c0cfb..ec70f41d613 100644
--- a/tools/patcher/platform/switch/docking.cpp
+++ b/tools/patcher/platform/switch/docking.cpp
@@ -3,6 +3,8 @@
 #include <switch.h>
 #include <SDL.h>
 
+#include "utils/display.h"
+
 DEVILUTION_BEGIN_NAMESPACE
 
 static int currently_docked = -1; // keep track of docked or handheld mode
diff --git a/tools/patcher/platform/switch/docking.h b/tools/patcher/platform/switch/docking.h
index 67348111ef1..235071f44e8 100644
--- a/tools/patcher/platform/switch/docking.h
+++ b/tools/patcher/platform/switch/docking.h
@@ -1,5 +1,7 @@
 #pragma once
 
+#include "../defs.h"
+
 DEVILUTION_BEGIN_NAMESPACE
 
 void HandleDocking();
diff --git a/tools/patcher/storm/storm.cpp b/tools/patcher/storm/storm.cpp
index 17722b6b048..051fa25902a 100644
--- a/tools/patcher/storm/storm.cpp
+++ b/tools/patcher/storm/storm.cpp
@@ -83,9 +83,12 @@ HANDLE SFileOpenFile(const char* filename)
 
 void SStrCopy(char* dest, const char* src, int max_length)
 {
+#ifndef __AMIGA__
 	if (memccpy(dest, src, '\0', max_length) == NULL)
 		dest[max_length - 1] = '\0';
-	//strncpy(dest, src, max_length);
+#else
+	strncpy(dest, src, max_length);
+#endif
 }
 
 void SFileEnableDirectAccess(bool enable)