[Scummvm-git-logs] scummvm master -> 187889cd7960adddcc4b7c7daa07c8b11f234ec3
digitall
dgturner at iee.org
Wed Nov 21 08:54:59 CET 2018
This automated email contains information about 10 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4c6e65e36e 3DS: Disable 'pedantic' and add bzip2 for FreeType2
dffe50c1d8 3DS: Use recent devkitPro build tools
b782705a20 3DS: Clean up entry point
2122c07d5f 3DS: Update header inclusions and forbidden symbols
4d84105237 3DS: Fix deprecated C3D methods
a4f85955fe 3DS: Don't wait after SyncDisplayTransfer
92ab8328b1 3DS: Clear render target on each frame
f615b3392b 3DS: Fix assertion issue in case cursor dimensions are zero
c80bbc4ee5 3DS: Added improved README.md
187889cd79 3DS: Updated README.md
Commit: 4c6e65e36ed1db974202d937145ac1d0ec083460
https://github.com/scummvm/scummvm/commit/4c6e65e36ed1db974202d937145ac1d0ec083460
Author: Nitrus (nitrus015 at yahoo.com)
Date: 2018-11-21T07:54:49Z
Commit Message:
3DS: Disable 'pedantic' and add bzip2 for FreeType2
Changed paths:
configure
diff --git a/configure b/configure
index 1d050f0..5c13971 100755
--- a/configure
+++ b/configure
@@ -2138,7 +2138,7 @@ fi
# However, some platforms use GNU extensions in system header files, so
# for these we must not use -pedantic.
case $_host_os in
-android | androidsdl | gamecube | ps2 | psp | tizen | wii | webos)
+3ds | android | androidsdl | gamecube | ps2 | psp | tizen | wii | webos)
;;
*)
# ICC does not support pedantic, while GCC and clang do.
@@ -5267,6 +5267,7 @@ fi
case $_backend in
3ds)
if test "$_freetype2" = yes -a "$_png" = yes; then
+ append_var LIBS "-lbz2"
append_var LIBS "-lpng"
fi
if test "$_tremor" = yes -o "$_flac" = yes; then
Commit: dffe50c1d8ae7d0254cfc0a5ef695fa4ca2172d3
https://github.com/scummvm/scummvm/commit/dffe50c1d8ae7d0254cfc0a5ef695fa4ca2172d3
Author: Nitrus (nitrus015 at yahoo.com)
Date: 2018-11-21T07:54:49Z
Commit Message:
3DS: Use recent devkitPro build tools
Changed paths:
backends/platform/3ds/3ds.mk
diff --git a/backends/platform/3ds/3ds.mk b/backends/platform/3ds/3ds.mk
index 7ab5899..b896193 100644
--- a/backends/platform/3ds/3ds.mk
+++ b/backends/platform/3ds/3ds.mk
@@ -23,7 +23,7 @@ clean_3ds:
$(RM) $(TARGET).cia
$(TARGET).smdh: $(APP_ICON)
- @bannertool makesmdh -s "$(APP_TITLE)" -l "$(APP_DESCRIPTION)" -p "$(APP_AUTHOR)" -i $(APP_ICON) -o $@
+ @smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
@echo built ... $(notdir $@)
$(TARGET).3dsx: $(EXECUTABLE) $(TARGET).smdh
Commit: b782705a204705aed8af56e5bbf79cde9eb29f51
https://github.com/scummvm/scummvm/commit/b782705a204705aed8af56e5bbf79cde9eb29f51
Author: Nitrus (nitrus015 at yahoo.com)
Date: 2018-11-21T07:54:49Z
Commit Message:
3DS: Clean up entry point
Changed paths:
backends/platform/3ds/main.cpp
diff --git a/backends/platform/3ds/main.cpp b/backends/platform/3ds/main.cpp
index 2098314..dc89faa 100644
--- a/backends/platform/3ds/main.cpp
+++ b/backends/platform/3ds/main.cpp
@@ -38,7 +38,9 @@ int main(int argc, char *argv[]) {
// res = scummvm_main(argc-2, &argv[2]);
// else
// res = scummvm_main(argc, argv);
- scummvm_main(0, nullptr);
+// scummvm_main(0, nullptr);
+
+ int res = scummvm_main(argc, argv);
g_system->destroy();
@@ -50,5 +52,5 @@ int main(int argc, char *argv[]) {
cfguExit();
gfxExit();
- return 0;
+ return res;
}
Commit: 2122c07d5fdddbb1c28dd7dd17fa8c1df1a4c28f
https://github.com/scummvm/scummvm/commit/2122c07d5fdddbb1c28dd7dd17fa8c1df1a4c28f
Author: Nitrus (nitrus015 at yahoo.com)
Date: 2018-11-21T07:54:49Z
Commit Message:
3DS: Update header inclusions and forbidden symbols
Changed paths:
backends/platform/3ds/config.cpp
backends/platform/3ds/options-dialog.cpp
backends/platform/3ds/osystem-events.cpp
backends/platform/3ds/osystem.cpp
backends/platform/3ds/osystem.h
backends/platform/3ds/sprite.cpp
backends/platform/3ds/sprite.h
diff --git a/backends/platform/3ds/config.cpp b/backends/platform/3ds/config.cpp
index bfadc5a..663c6ae 100644
--- a/backends/platform/3ds/config.cpp
+++ b/backends/platform/3ds/config.cpp
@@ -20,11 +20,12 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
#include "config.h"
#include "osystem.h"
#include "options-dialog.h"
#include "common/config-manager.h"
-#include <3ds.h>
namespace _3DS {
diff --git a/backends/platform/3ds/options-dialog.cpp b/backends/platform/3ds/options-dialog.cpp
index 60fe7f8..080ef29 100644
--- a/backends/platform/3ds/options-dialog.cpp
+++ b/backends/platform/3ds/options-dialog.cpp
@@ -20,6 +20,8 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
#include "options-dialog.h"
#include "config.h"
#include "gui/dialog.h"
diff --git a/backends/platform/3ds/osystem-events.cpp b/backends/platform/3ds/osystem-events.cpp
index 064540f..de0f584 100644
--- a/backends/platform/3ds/osystem-events.cpp
+++ b/backends/platform/3ds/osystem-events.cpp
@@ -20,12 +20,14 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+#include "osystem.h"
#include "backends/timer/default/default-timer.h"
#include "engines/engine.h"
#include "gui.h"
#include "options-dialog.h"
#include "config.h"
-#include "osystem.h"
namespace _3DS {
diff --git a/backends/platform/3ds/osystem.cpp b/backends/platform/3ds/osystem.cpp
index e19ff8f..c42e208 100644
--- a/backends/platform/3ds/osystem.cpp
+++ b/backends/platform/3ds/osystem.cpp
@@ -24,6 +24,7 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+#include <3ds.h>
#include "osystem.h"
#include "backends/saves/default/default-saves.h"
diff --git a/backends/platform/3ds/osystem.h b/backends/platform/3ds/osystem.h
index cad46a1..6901295 100644
--- a/backends/platform/3ds/osystem.h
+++ b/backends/platform/3ds/osystem.h
@@ -23,7 +23,8 @@
#ifndef PLATFORM_3DS_H
#define PLATFORM_3DS_H
-#include <citro3d.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
#include "backends/mutex/mutex.h"
#include "backends/base-backend.h"
#include "graphics/palette.h"
diff --git a/backends/platform/3ds/sprite.cpp b/backends/platform/3ds/sprite.cpp
index 842729c..7d86074 100644
--- a/backends/platform/3ds/sprite.cpp
+++ b/backends/platform/3ds/sprite.cpp
@@ -22,7 +22,6 @@
#include "backends/platform/3ds/sprite.h"
#include "common/util.h"
-#include <3ds.h>
static uint nextHigher2(uint v) {
if (v == 0)
diff --git a/backends/platform/3ds/sprite.h b/backends/platform/3ds/sprite.h
index 129c268..35c048c 100644
--- a/backends/platform/3ds/sprite.h
+++ b/backends/platform/3ds/sprite.h
@@ -23,8 +23,11 @@
#ifndef GRAPHICS_SPRITE_3DS_H
#define GRAPHICS_SPRITE_3DS_H
-#include <citro3d.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
#include "graphics/surface.h"
+#include <3ds.h>
+#include <citro3d.h>
#define TEXTURE_TRANSFER_FLAGS \
(GX_TRANSFER_FLIP_VERT(1) | GX_TRANSFER_OUT_TILED(1) | GX_TRANSFER_RAW_COPY(0) | \
Commit: 4d84105237d00adc8ad49248cca729833b0d167a
https://github.com/scummvm/scummvm/commit/4d84105237d00adc8ad49248cca729833b0d167a
Author: Nitrus (nitrus015 at yahoo.com)
Date: 2018-11-21T07:54:49Z
Commit Message:
3DS: Fix deprecated C3D methods
Changed paths:
backends/platform/3ds/osystem-graphics.cpp
backends/platform/3ds/sprite.cpp
diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp
index e791dd4..777272e 100644
--- a/backends/platform/3ds/osystem-graphics.cpp
+++ b/backends/platform/3ds/osystem-graphics.cpp
@@ -45,13 +45,13 @@ void OSystem_3DS::initGraphics() {
// Initialize the render targets
_renderTargetTop =
C3D_RenderTargetCreate(240, 400, GPU_RB_RGBA8, GPU_RB_DEPTH24_STENCIL8);
- C3D_RenderTargetSetClear(_renderTargetTop, C3D_CLEAR_ALL, 0x0000000, 0);
+ C3D_RenderTargetClear(_renderTargetTop, C3D_CLEAR_ALL, 0x0000000, 0);
C3D_RenderTargetSetOutput(_renderTargetTop, GFX_TOP, GFX_LEFT,
DISPLAY_TRANSFER_FLAGS);
_renderTargetBottom =
C3D_RenderTargetCreate(240, 320, GPU_RB_RGBA8, GPU_RB_DEPTH24_STENCIL8);
- C3D_RenderTargetSetClear(_renderTargetBottom, C3D_CLEAR_ALL, 0x00000000, 0);
+ C3D_RenderTargetClear(_renderTargetBottom, C3D_CLEAR_ALL, 0x00000000, 0);
C3D_RenderTargetSetOutput(_renderTargetBottom, GFX_BOTTOM, GFX_LEFT,
DISPLAY_TRANSFER_FLAGS);
@@ -69,12 +69,12 @@ void OSystem_3DS::initGraphics() {
AttrInfo_AddLoader(attrInfo, 0, GPU_FLOAT, 3); // v0=position
AttrInfo_AddLoader(attrInfo, 1, GPU_FLOAT, 2); // v1=texcoord
- Mtx_OrthoTilt(&_projectionTop, 0.0, 400.0, 240.0, 0.0, 0.0, 1.0);
- Mtx_OrthoTilt(&_projectionBottom, 0.0, 320.0, 240.0, 0.0, 0.0, 1.0);
+ Mtx_OrthoTilt(&_projectionTop, 0.0, 400.0, 240.0, 0.0, 0.0, 1.0, true);
+ Mtx_OrthoTilt(&_projectionBottom, 0.0, 320.0, 240.0, 0.0, 0.0, 1.0, true);
C3D_TexEnv *env = C3D_GetTexEnv(0);
- C3D_TexEnvSrc(env, C3D_Both, GPU_TEXTURE0, 0, 0);
- C3D_TexEnvOp(env, C3D_Both, 0, 0, 0);
+ C3D_TexEnvSrc(env, C3D_Both, GPU_TEXTURE0, GPU_PRIMARY_COLOR, GPU_PRIMARY_COLOR);
+ C3D_TexEnvOpRgb(env, GPU_TEVOP_RGB_SRC_COLOR, GPU_TEVOP_RGB_SRC_COLOR, GPU_TEVOP_RGB_SRC_COLOR);
C3D_TexEnvFunc(env, C3D_Both, GPU_REPLACE);
C3D_DepthTest(false, GPU_GEQUAL, GPU_WRITE_ALL);
@@ -387,7 +387,7 @@ void OSystem_3DS::updateFocus() {
_focusScaleY += _focusStepScaleY;
Mtx_Identity(&_focusMatrix);
- Mtx_Translate(&_focusMatrix, -_focusPosX, -_focusPosY, 0);
+ Mtx_Translate(&_focusMatrix, -_focusPosX, -_focusPosY, 0, true);
Mtx_Scale(&_focusMatrix, _focusScaleX, _focusScaleY, 1.f);
}
}
diff --git a/backends/platform/3ds/sprite.cpp b/backends/platform/3ds/sprite.cpp
index 7d86074..ec9e94f 100644
--- a/backends/platform/3ds/sprite.cpp
+++ b/backends/platform/3ds/sprite.cpp
@@ -104,8 +104,8 @@ void Sprite::render() {
if (dirtyPixels) {
dirtyPixels = false;
GSPGPU_FlushDataCache(pixels, w * h * format.bytesPerPixel);
- C3D_SafeDisplayTransfer((u32*)pixels, GX_BUFFER_DIM(w, h), (u32*)texture.data, GX_BUFFER_DIM(w, h), TEXTURE_TRANSFER_FLAGS);
gspWaitForPPF();
+ C3D_SyncDisplayTransfer((u32*)pixels, GX_BUFFER_DIM(w, h), (u32*)texture.data, GX_BUFFER_DIM(w, h), TEXTURE_TRANSFER_FLAGS);
}
C3D_TexBind(0, &texture);
@@ -137,7 +137,7 @@ C3D_Mtx* Sprite::getMatrix() {
dirtyMatrix = false;
Mtx_Identity(&modelview);
Mtx_Scale(&modelview, scaleX, scaleY, 1.f);
- Mtx_Translate(&modelview, posX, posY, 0);
+ Mtx_Translate(&modelview, posX, posY, 0, true);
}
return &modelview;
}
Commit: a4f85955fe748b9e6e33dbb684c8efbc2cf4899b
https://github.com/scummvm/scummvm/commit/a4f85955fe748b9e6e33dbb684c8efbc2cf4899b
Author: Nitrus (nitrus015 at yahoo.com)
Date: 2018-11-21T07:54:49Z
Commit Message:
3DS: Don't wait after SyncDisplayTransfer
Changed paths:
backends/platform/3ds/sprite.cpp
diff --git a/backends/platform/3ds/sprite.cpp b/backends/platform/3ds/sprite.cpp
index ec9e94f..78082f3 100644
--- a/backends/platform/3ds/sprite.cpp
+++ b/backends/platform/3ds/sprite.cpp
@@ -104,8 +104,8 @@ void Sprite::render() {
if (dirtyPixels) {
dirtyPixels = false;
GSPGPU_FlushDataCache(pixels, w * h * format.bytesPerPixel);
- gspWaitForPPF();
C3D_SyncDisplayTransfer((u32*)pixels, GX_BUFFER_DIM(w, h), (u32*)texture.data, GX_BUFFER_DIM(w, h), TEXTURE_TRANSFER_FLAGS);
+// gspWaitForPPF();
}
C3D_TexBind(0, &texture);
Commit: 92ab8328b19a3a75deedc9a088d609dd77b72b97
https://github.com/scummvm/scummvm/commit/92ab8328b19a3a75deedc9a088d609dd77b72b97
Author: Nitrus (nitrus015 at yahoo.com)
Date: 2018-11-21T07:54:49Z
Commit Message:
3DS: Clear render target on each frame
...in order to clear framebuffer artifacts in case the screen is not stretched.
Changed paths:
backends/platform/3ds/osystem-graphics.cpp
diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp
index 777272e..ebc1b8c 100644
--- a/backends/platform/3ds/osystem-graphics.cpp
+++ b/backends/platform/3ds/osystem-graphics.cpp
@@ -273,6 +273,7 @@ void OSystem_3DS::updateScreen() {
C3D_FrameBegin(C3D_FRAME_SYNCDRAW);
// Render top screen
+ C3D_RenderTargetClear(_renderTargetTop, C3D_CLEAR_ALL, 0x00000000, 0);
C3D_FrameDrawOn(_renderTargetTop);
if (config.screen == kScreenTop || config.screen == kScreenBoth) {
C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _projectionLocation, &_projectionTop);
@@ -290,6 +291,7 @@ void OSystem_3DS::updateScreen() {
}
// Render bottom screen
+ C3D_RenderTargetClear(_renderTargetBottom, C3D_CLEAR_ALL, 0x00000000, 0);
C3D_FrameDrawOn(_renderTargetBottom);
if (config.screen == kScreenBottom || config.screen == kScreenBoth) {
C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _projectionLocation, &_projectionBottom);
Commit: f615b3392bf4ffcae33c9d5c18904a867512b2f3
https://github.com/scummvm/scummvm/commit/f615b3392bf4ffcae33c9d5c18904a867512b2f3
Author: Nitrus (nitrus015 at yahoo.com)
Date: 2018-11-21T07:54:49Z
Commit Message:
3DS: Fix assertion issue in case cursor dimensions are zero
Changed paths:
backends/platform/3ds/osystem-graphics.cpp
diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp
index ebc1b8c..15fabc7 100644
--- a/backends/platform/3ds/osystem-graphics.cpp
+++ b/backends/platform/3ds/osystem-graphics.cpp
@@ -479,7 +479,10 @@ void OSystem_3DS::setMouseCursor(const void *buf, uint w, uint h,
_cursorTexture.create(w, h, _pfGameTexture);
}
- _cursor.copyRectToSurface(buf, w, 0, 0, w, h);
+ if ( w != 0 && h != 0 ) {
+ _cursor.copyRectToSurface(buf, w, 0, 0, w, h);
+ }
+
flushCursor();
warpMouse(_cursorX, _cursorY);
Commit: c80bbc4ee515ac0bd193349be5b8754fab300129
https://github.com/scummvm/scummvm/commit/c80bbc4ee515ac0bd193349be5b8754fab300129
Author: Nitrus (nitrus015 at yahoo.com)
Date: 2018-11-21T07:54:49Z
Commit Message:
3DS: Added improved README.md
Changed paths:
A backends/platform/3ds/README.md
R backends/platform/3ds/README
diff --git a/backends/platform/3ds/README b/backends/platform/3ds/README
deleted file mode 100644
index 516e694..0000000
--- a/backends/platform/3ds/README
+++ /dev/null
@@ -1,185 +0,0 @@
-ScummVM 3DS README
-------------------------------------------------------------------------
-
-Table of Contents:
-------------------
-1.0) Installation
- * 1.1 3DSX installation
- * 1.2 CIA installation
-2.0) Controls
- * 2.1 Default key mappings
- * 2.2 Hover mode
- * 2.3 Drag mode
-3.0) Supported Games
-4.0) Compiling
- * 4.1 Prerequisites
- * * 4.1.1 Compiling third-party libraries
- * 4.2 Compiling ScummVM
- * 4.3 Warning for 3DSX build
-
-
-
-1.0) Installation
------------------
-There are two possible formats to be used: 3DSX and CIA (recommended).
-The 3DSX format is exclusively used by the Homebrew Launcher and its derivatives.
-The CIA format can be installed directly to the 3DS home menu and can be launched
-using any CFW (Custom Firmware) of your choice.
-
-Installing the Homebrew Launcher or any CFW is beyond the scope of this README.
-Look elsewhere to see how to install those if you do not already have them set up.
-
-
-1.1) 3DSX installation
-----------------
-The CIA format is recommended for stability and maximum game support. If that is
-not an option, you will need one of a collection of 3DS titles installed on your
-system in order to properly launch ScummVM as a 3DSX. This is because the
-Homebrew Launcher hijacks other processes to run 3DSX homebrew, and ScummVM is a
-particularly large homebrew that can't be launched with the resources provided
-by standard system applications.
-
-You will need one of the following (installed or physically in cart slot):
-
-- Youtube
-- Monster Hunter 4 Ultimate Special Demo
-- Monster Hunter 4 Ultimate
-- Monster Hunter 4G
-- Super Smash Bros. for Nintendo 3DS Demo
-- Super Smash Bros. for Nintendo 3DS Special Demo
-- Super Smash Bros. for Nintendo 3DS
-
-Once you have one of the above, you need to merely extract all ScummVM 3DS files
-to the root of your SD card so that all files reside in the /3ds/scummvm/ directory.
-
-
-1.2) CIA installation
----------------------
-The CIA format requires a DSP binary dump saved on your SD card as /3ds/dspfirm.cdc
-for proper audio support. You can search online to find software to dump this.
-Not having this file will cause many problems with games that need audio, sometimes
-even crashing, so this is NOT considered optional.
-
-Using any CIA installation software (search elsewhere for that), you need to install
-the scummvm.cia file. Then, just like what is done with the 3DSX installation, you
-need to extract all ScummVM 3DS files (scummvm.cia excluded) to the root of your SD
-card so that all files reside in the /3ds/scummvm/ directory.
-
-
-
-2.0) Controls
--------------
-
-2.1) Default key mappings
--------------------------
-The D-Pad and A/B/X/Y buttons have mirrored usage. So they do the same things
-depending on if you're right or left-handed.
-
-| Buttons | Function |
-|------------|--------------------------------|
-| A / D-left | Left-click |
-| X / D-up | Right-click |
-| B / D-down | ESC (skips cutscenes and such) |
-| L | Use virtual keyboard |
-| R | Toggle hover/drag modes |
-| Start | Open game menu |
-| Select | Open 3DS config menu |
-| Circle Pad | Move the cursor |
-
-
-2.2) Hover mode
----------------
-When you use the touchscreen, you are simulating the mere moving of the mouse. You
-can click only with taps, meaning it is impossible to drag stuff or hold down a
-mouse button without using buttons mapped to right/left-click.
-
-
-2.3) Drag mode
---------------
-Every time you touch and release the touchscreen, you are simulating the click and
-release of the mouse buttons. At the moment, this is only a left-click.
-
-
-
-3.0) Supported Games
---------------------
-The full game engine compatibility list can be found here:
-http://scummvm.org/compatibility/
-
-While all the above games should run on the 3DS (report if they do not), there are
-many games which are unplayable due to the lack of CPU speed on the 3DS. So if
-you play any games that run really slow, this is not considered a bug, but rather
-a hardware limitation. Though possible GPU optimizations are always in the works.
-The New 3DS console has much better performance, but there are still many newer and
-high-resolution games that cannot be played. A list of these unplayable games and
-game engines will eventually be listed here.
-
-
-
-4.0) Compiling
---------------
-
-4.1) Prerequisites
-------------------
- - devkitARM (presumably with libctru, picasso and such)
- - citro3d
- - Optional: You should compile third-party libraries for the 3ds (commonly referred
- to as portlibs in the devkitPRO community). Some games requires these to operate
- properly.
-
-
-4.1.1) Compiling third-party libraries
---------------------------------------
-Most libraries used can be compiled with same commands and configuration flags.
-
-It is assumed that you have these environment variables defined:
- - DEVKITPRO Your root devkitPro directory
- - DEVKITARM Your root devkitARM directory (probably same as $DEVKITPRO/devkitARM)
- - CTRULIB Your root libctru directory (probably same as $DEVKITPRO/libctru)
-
-In the source directory of the library:
- - $ export PORTLIBS=$DEVKITPRO/portlibs/armv6k
- - $ export PATH=$DEVKITARM/bin:$PATH
- - $ export PKG_CONFIG_PATH=$PORTLIBS/lib/pkgconfig
- - $ export CFLAGS="-g -march=armv6k -mtune=mpcore -mfloat-abi=hard -O2
- -mword-relocations -ffunction-sections -fdata-sections"
- - $ export CPPFLAGS="-I$PORTLIBS/include -I$CTRULIB/include"
- - $ export LDFLAGS="-L$PORTLIBS/lib"
- - $ mkdir -p $PORTLIBS
- - $ ./configure --prefix=$PORTLIBS --host=arm-none-eabi --disable-shared
- --enable-static
- - $ make
- - $ make install
-
-Useful libraries (and special config flags needed):
- - zlib
- - libpng
- - libjpeg
- - freetype2 --without-bzip2 --without-harfbuzz
- - libmad
- - tremor
- - flac --disable-cpplibs --without-flac
- - faad
-
-
-4.2) Compiling ScummVM
-----------------------
- - $ ./configure --host=3ds
- - $ make
-
-Additionally compile to specific formats to be used on the 3ds:
- - $ make scummvm.3dsx
- - $ make scummvm.cia
-
-
-4.3) Warning for 3DSX build
----------------------------
-The above configuration command will include all game engines by default and will
-likely be too massive to run using the 3DSX format. Until dynamic modules are figured
-out, you should configure engines like this for 3DSX builds:
-
- - $ ./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, it
-won't be playable unless it's a CIA.
diff --git a/backends/platform/3ds/README.md b/backends/platform/3ds/README.md
new file mode 100644
index 0000000..a17fc6a
--- /dev/null
+++ b/backends/platform/3ds/README.md
@@ -0,0 +1,230 @@
+ScummVM 3DS README
+------------------------------------------------------------------------
+
+Table of Contents:
+------------------
+1.0) Installation
+ * 1.1 3DSX installation
+ * 1.2 CIA installation
+ * 1.3 Additional files
+
+2.0) Controls
+ * 2.1 Default key mappings
+ * 2.2 Hover mode
+ * 2.3 Drag mode
+
+3.0) Supported Games
+
+4.0) Compiling
+ * 4.1 Prerequisites
+ * * 4.1.1 Compiling third-party libraries
+ * * 4.1.2 Manually setting up the environment
+ * * 4.1.3 Note on FLAC
+ * 4.2 Compiling ScummVM
+ * 4.3 Warning for build sizes
+
+1.0) Installation
+-----------------
+There are two possible formats to be used: 3DSX and CIA.
+The 3DSX format is considered more ethical because it does not make use of
+invalid title IDs, which get logged. It is also compatible with homebrew loading
+methods that do not involve CFW.
+The 3DSX format is exclusively used by the Homebrew Launcher and its derivatives.
+The CIA format can be installed directly to the 3DS home menu and can be launched
+using any CFW (Custom Firmware) of your choice.
+
+Installing the Homebrew Launcher or any CFW is beyond the scope of this README.
+
+1.1) 3DSX installation
+----------------
+You need to merely extract the ScummVM 3DSX files to your SD card so that all
+files reside in the `/3ds/scummvm/` directory. It can then be launched by Homebrew Launcher
+or a similar implementation.
+
+1.2) CIA installation
+---------------------
+The CIA format requires a DSP binary dump saved on your SD card as `/3ds/dspfirm.cdc`
+for proper audio support. You can search online to find software to dump this.
+Not having this file will cause many problems with games that need audio, sometimes
+even crashing, so this is NOT considered optional.
+
+Using any CIA installation software (search elsewhere for that), you need to install
+the `scummvm.cia` file. Then, just like what is done with the 3DSX installation, you
+need to extract all ScummVM 3DS files (`scummvm.cia` excluded) to the root of your SD
+card so that all files reside in the `/3ds/scummvm/` directory.
+
+1.3) Additional files
+---------------------
+In order to use the Virtual Keyboard, you need to get the:
+`backends/vkeybd/packs/vkeybd_zmall.zip` file from ScummVM's repository, and
+place it on your SD card, in the `/3ds/scummvm/kb` folder.
+
+In case you want a translated GUI, you need to get the:
+`scummvm/gui/themes/translations.dat` file from ScummVM's repository, and place
+it on your SD card, in the `/3ds/scummvm/themes` folder.
+
+2.0) Controls
+-------------
+
+2.1) Default key mappings
+-------------------------
+The D-Pad and A/B/X/Y buttons have mirrored usage. So they do the same things
+depending on if you're right or left-handed.
+
+| Buttons | Function |
+|------------|--------------------------------|
+| A / D-left | Left-click |
+| X / D-up | Right-click |
+| B / D-down | ESC (skips cutscenes and such) |
+| L | Use virtual keyboard |
+| R | Toggle hover/drag modes |
+| Start | Open game menu |
+| Select | Open 3DS config menu |
+| Circle Pad | Move the cursor |
+
+2.2) Hover mode
+---------------
+When you use the touchscreen, you are simulating the mere moving of the mouse. You
+can click only with taps, meaning it is impossible to drag stuff or hold down a
+mouse button without using buttons mapped to right/left-click.
+
+2.3) Drag mode
+--------------
+Every time you touch and release the touchscreen, you are simulating the click and
+release of the mouse buttons. At the moment, this is only a left-click.
+
+3.0) Supported Games
+--------------------
+The full game engine compatibility list can be found here:
+http://scummvm.org/compatibility/
+
+While all the above games should run on the 3DS (report if they do not), there are
+many games which are unplayable due to the lack of CPU speed on the 3DS. So if
+you play any games that run really slow, this is not considered a bug, but rather
+a hardware limitation. Though possible GPU optimizations are always in the works.
+The New 3DS console has much better performance, but there are still many newer and
+high-resolution games that cannot be played. A list of these unplayable games and
+game engines will eventually be listed here.
+
+4.0) Compiling
+--------------
+4.1) Prerequisites
+------------------
+ - Latest version of devkitPro, which comes with devkitARM and `libctru`
+ - `citro3d` thorugh devkitPro's pacman
+ - Optional: You should compile third-party libraries for the 3ds (commonly referred
+ to as portlibs in the devkitPRO community). Some games requires these to operate
+ properly.
+
+
+4.1.1) Compiling third-party libraries
+--------------------------------------
+It is strongly recommended that you use devkitPro's pacman in order to get the most recent
+portlibs for your build.
+
+The following libraries can be downloaded with pacman:
+
+| Library | Package |
+----------------|------------------------
+| zlib | 3ds-zlib |
+| libpng | 3ds-zlib |
+| libjpeg | 3ds-libjpeg-turbo |
+| freetype2 | 3ds-freetype |
+| libmad | 3ds-libmad |
+| libogg | 3ds-libogg |
+| tremor | 3ds-libvorbisidec |
+
+At the moment of writing, `faad` and `flac` are not in the devkitPro 3DS pacman
+repository. They can be compiled by following the instructions in the section below,
+in case they cannot be found through pacman.
+
+The following pacman packages are also recommended:
+ - `3ds-dev`
+ - `devkitpro-pkgbuild-helpers`
+
+Once you have the `devkitpro-pkgbuild-helpers` package, you should be able to find
+the following scripts in your `/opt/devkitpro` folder:
+ - `devkitarm.sh`
+ - `3dsvars.sh`
+
+Execute them one after the other (`devkitarm.sh` should be executed first), in order
+to setup your environment variables for cross-compiling.
+
+After that, you can download the libraries you want to cross compile, run any autoconf
+scripts that they may have, and then they can usually be built with the following steps
+from their source directory:
+```
+ $ mkdir -p $PORTLIBS
+ $ ./configure --prefix=$PORTLIBS --host=arm-none-eabi --disable-shared \
+ --enable-static
+ $ make
+ $ make install
+```
+Most libraries used can be compiled with same commands and configuration flags.
+
+4.1.2) Manually setting up the environment
+------------------------------------------
+In case you don't have the helpers package downloaded, you can use the following to set-up
+your environment variables.
+
+It is assumed that you have these variables already set up. If not, then do so:
+ - DEVKITPRO Your root devkitPro directory
+ - DEVKITARM Your root devkitARM directory (probably same as $DEVKITPRO/devkitARM)
+ - CTRULIB Your root libctru directory (probably same as $DEVKITPRO/libctru)
+
+In the source directory of the library:
+```
+ $ export PORTLIBS=$DEVKITPRO/portlibs/3ds
+ $ export PATH=$DEVKITARM/bin:$PATH
+ $ export PKG_CONFIG_PATH=$PORTLIBS/lib/pkgconfig
+ $ export PKG_CONFIG_LIBDIR=$PORTLIBS/lib/pkgconfig
+ $ export CFLAGS="-g -march=armv6k -mtune=mpcore -mfloat-abi=hard -O2
+ -mword-relocations -ffunction-sections -fdata-sections"
+ $ export CPPFLAGS="-I$PORTLIBS/include -I$CTRULIB/include"
+ $ export LDFLAGS="-L$PORTLIBS/lib"
+ ```
+
+4.1.3) Note on FLAC:
+--------------------
+At the moment of writing, the `libflac` library cannot be compiled for the 3DS out of the box.
+However, the following patch (for the Nintendo Switch) can be adapted and applied to it:
+https://github.com/devkitPro/pacman-packages/tree/master/switch/flac
+
+Afterwards, the library can be built with:
+```
+ $ CFLAGS="${CFLAGS} -D__3DS__ " \
+ ./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
+ --disable-shared --enable-static \
+ --disable-xmms-plugin --disable-cpplibs \
+ --disable-sse --without-ogg
+```
+
+4.2) Compiling ScummVM
+----------------------
+From the root of the scummvm repository:
+```
+ $ ./configure --host=3ds
+ $ make
+```
+Additionally compile to specific formats to be used on the 3DS:
+```
+ $ make scummvm.3dsx
+ $ make scummvm.cia
+```
+Assuming everything was successful, you'll be able to find the binary
+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 run with stability 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.
Commit: 187889cd7960adddcc4b7c7daa07c8b11f234ec3
https://github.com/scummvm/scummvm/commit/187889cd7960adddcc4b7c7daa07c8b11f234ec3
Author: Nitrus (nitrus015 at yahoo.com)
Date: 2018-11-21T07:54:49Z
Commit Message:
3DS: Updated README.md
Changed paths:
backends/platform/3ds/README.md
diff --git a/backends/platform/3ds/README.md b/backends/platform/3ds/README.md
index a17fc6a..a864dee 100644
--- a/backends/platform/3ds/README.md
+++ b/backends/platform/3ds/README.md
@@ -147,8 +147,12 @@ the following scripts in your `/opt/devkitpro` folder:
- `devkitarm.sh`
- `3dsvars.sh`
-Execute them one after the other (`devkitarm.sh` should be executed first), in order
-to setup your environment variables for cross-compiling.
+Run them one after the other with `source` in order to setup your environment variables
+for cross-compiling:
+```
+ $ source /opt/devkitpro/devkitarm.sh
+ $ source /opt/devkitpro/3dsvars.sh
+```
After that, you can download the libraries you want to cross compile, run any autoconf
scripts that they may have, and then they can usually be built with the following steps
@@ -201,6 +205,15 @@ Afterwards, the library can be built with:
4.2) Compiling ScummVM
----------------------
+Do the following in a fresh terminal.
+
+In case you get a "compiler not found" message, add the toolchain's executables to your PATH:
+```$ export PATH=$DEVKITARM/bin:$PATH```
+
+Note: In more recent codebases of ScummVM, you may or may not need to set the following beforehand:
+```$ export PKG_CONFIG_LIBDIR=$PORTLIBS/lib/pkgconfig```
+See above for $PORTLIBS.
+
From the root of the scummvm repository:
```
$ ./configure --host=3ds
@@ -211,6 +224,8 @@ 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.
@@ -220,7 +235,7 @@ 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 run with stability using either the 3DSX or the CIA format.
+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, \
More information about the Scummvm-git-logs
mailing list