aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/3ds/3ds.mk6
-rw-r--r--backends/platform/3ds/README.md17
-rw-r--r--backends/platform/3ds/main.cpp11
3 files changed, 13 insertions, 21 deletions
diff --git a/backends/platform/3ds/3ds.mk b/backends/platform/3ds/3ds.mk
index 136e9844d9..0954737834 100644
--- a/backends/platform/3ds/3ds.mk
+++ b/backends/platform/3ds/3ds.mk
@@ -28,7 +28,7 @@ clean_3ds:
$(RM) -rf romfs
$(RM) -rf dist_3ds
-romfs: $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(DIST_FILES_NETWORKING) $(DIST_FILES_VKEYBD) $(DIST_3DS_EXTRA_FILES)
+romfs: $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(DIST_FILES_NETWORKING) $(DIST_FILES_VKEYBD) $(DIST_3DS_EXTRA_FILES) $(PLUGINS)
@rm -rf romfs
@mkdir -p romfs
@cp $(DIST_FILES_THEMES) romfs/
@@ -44,6 +44,10 @@ endif
ifdef DIST_3DS_EXTRA_FILES
@cp -a $(DIST_3DS_EXTRA_FILES) romfs/
endif
+ifeq ($(DYNAMIC_MODULES),1)
+ @mkdir -p romfs/plugins
+ @for i in $(PLUGINS); do $(STRIP) --strip-debug $$i -o romfs/plugins/`basename $$i`; done
+endif
$(TARGET).smdh: $(APP_ICON)
@smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
diff --git a/backends/platform/3ds/README.md b/backends/platform/3ds/README.md
index c56669952f..fb30b9fde3 100644
--- a/backends/platform/3ds/README.md
+++ b/backends/platform/3ds/README.md
@@ -20,7 +20,6 @@ Table of Contents:
* * [4.1.1 Compiling third-party libraries](#411-compiling-third-party-libraries)
* * [4.1.2 Manually setting up the environment](#412-manually-setting-up-the-environment)
* [4.2 Compiling ScummVM](#42-compiling-scummvm)
- * [4.3 Warning for build sizes](#43-warning-for-build-sizes)
1.0) Installation
-----------------
@@ -222,7 +221,7 @@ The name of the file must be `cacert.pem`.
From the root of the scummvm repository:
```
- $ ./configure --host=3ds
+ $ ./configure --host=3ds --enable-plugins --default-dynamic
$ make
```
Additionally compile to specific formats to be used on the 3DS:
@@ -230,7 +229,6 @@ Additionally compile to specific formats to be used on the 3DS:
$ make scummvm.3dsx
$ make scummvm.cia
```
-**_Read the warning about build sizes below._**
Assuming everything was successful, you'll be able to find the binary
files in the root of your scummvm folder.
@@ -238,14 +236,5 @@ files in the root of your scummvm folder.
Note: for the CIA format, you will need the 'makerom' and 'bannertool' tools which are
not supplied with devkitPro.
-4.3) Warning for build sizes
----------------------------
-The above configuration command will include all game engines by default and will
-likely be too massive to be stable using either the 3DSX or the CIA format.
-Until dynamic modules are figured out, you should configure engines like this:
-```
- $ ./configure --host=3ds --disable-all-engines --enable-engine=scumm-7-8,myst,riven, \
- sword1,sword2,sword25,sci,lure,sky,agi,agos
-```
-Choose whatever engines you want, but if the ELF's .text section exceeds ~10MB-12MB,
-you may experience crashes in memory-intensive games such as COMI, Broken Sword and Discworld 2.
+Note: using dynamic plugins as suggested is required when building with most or all of the
+game engines enabled in order to keep the memory usage low and avoid stability issues.
diff --git a/backends/platform/3ds/main.cpp b/backends/platform/3ds/main.cpp
index 18df14b93d..6e33253c08 100644
--- a/backends/platform/3ds/main.cpp
+++ b/backends/platform/3ds/main.cpp
@@ -21,6 +21,8 @@
*/
#include "osystem.h"
+#include "backends/plugins/3ds/3ds-provider.h"
+
#include <3ds.h>
#include <malloc.h>
@@ -41,12 +43,9 @@ int main(int argc, char *argv[]) {
g_system = new _3DS::OSystem_3DS();
assert(g_system);
- // Invoke the actual ScummVM main entry point
-// if (argc > 2)
-// res = scummvm_main(argc-2, &argv[2]);
-// else
-// res = scummvm_main(argc, argv);
-// scummvm_main(0, nullptr);
+#ifdef DYNAMIC_MODULES
+ PluginManager::instance().addPluginProvider(new CTRPluginProvider());
+#endif
int res = scummvm_main(argc, argv);