mirror of https://github.com/mgba-emu/mgba.git
Merge branch 'master' (early part) into medusa
This commit is contained in:
commit
7ef60af5fa
|
@ -8,6 +8,7 @@ env:
|
|||
- DOCKER_TAG=ubuntu:xenial
|
||||
- DOCKER_TAG=ubuntu:bionic
|
||||
- DOCKER_TAG=ubuntu:cosmic
|
||||
- DOCKER_TAG=ubuntu:disco
|
||||
- DOCKER_TAG=3ds
|
||||
- DOCKER_TAG=wii
|
||||
- DOCKER_TAG=vita
|
||||
|
|
2
CHANGES
2
CHANGES
|
@ -46,6 +46,8 @@ Other fixes:
|
|||
- Qt: Fix saved scale not getting set on resize (fixes mgba.io/i/1074)
|
||||
- CMake: Fix .deb imagemagick dependencies
|
||||
- Qt: Fix crash in sprite viewer magnification (fixes mgba.io/i/1362)
|
||||
- 3DS: Ensure core 2 can be used for threaded renderer (fixes mgba.io/i/1371)
|
||||
- GB Core: Fix toggling WIN and OBJ being swapped
|
||||
Misc:
|
||||
- GBA Savedata: EEPROM performance fixes
|
||||
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
||||
|
|
|
@ -202,8 +202,7 @@ list(APPEND UTIL_SRC ${CMAKE_CURRENT_BINARY_DIR}/version.c)
|
|||
source_group("Generated sources" FILES ${CMAKE_CURRENT_BINARY_DIR}/version.c)
|
||||
|
||||
# Advanced settings
|
||||
if(NOT DEFINED 3DS AND NOT (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_COMPILER_VERSION VERSION_LESS "4.5"))
|
||||
# LTO appears to make 3DS binary slower
|
||||
if(NOT (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_COMPILER_VERSION VERSION_LESS "4.5"))
|
||||
set(DEFAULT_LTO ON)
|
||||
else()
|
||||
set(DEFAULT_LTO OFF)
|
||||
|
|
|
@ -95,6 +95,20 @@ union PSR {
|
|||
#endif
|
||||
};
|
||||
|
||||
struct {
|
||||
#if defined(__BIG_ENDIAN__)
|
||||
uint8_t flags;
|
||||
uint8_t status;
|
||||
uint8_t extension;
|
||||
uint8_t control;
|
||||
#else
|
||||
uint8_t control;
|
||||
uint8_t extension;
|
||||
uint8_t status;
|
||||
uint8_t flags;
|
||||
#endif
|
||||
};
|
||||
|
||||
int32_t packed;
|
||||
};
|
||||
|
||||
|
|
|
@ -186,6 +186,7 @@ static inline void _immediate(struct ARMCore* cpu, uint32_t opcode) {
|
|||
// Beware pre-processor antics
|
||||
|
||||
ATTRIBUTE_NOINLINE static void _additionS(struct ARMCore* cpu, int32_t m, int32_t n, int32_t d) {
|
||||
cpu->cpsr.flags = 0;
|
||||
cpu->cpsr.n = ARM_SIGN(d);
|
||||
cpu->cpsr.z = !d;
|
||||
cpu->cpsr.c = ARM_CARRY_FROM(m, n, d);
|
||||
|
@ -193,6 +194,7 @@ ATTRIBUTE_NOINLINE static void _additionS(struct ARMCore* cpu, int32_t m, int32_
|
|||
}
|
||||
|
||||
ATTRIBUTE_NOINLINE static void _subtractionS(struct ARMCore* cpu, int32_t m, int32_t n, int32_t d) {
|
||||
cpu->cpsr.flags = 0;
|
||||
cpu->cpsr.n = ARM_SIGN(d);
|
||||
cpu->cpsr.z = !d;
|
||||
cpu->cpsr.c = ARM_BORROW_FROM(m, n, d);
|
||||
|
|
|
@ -12,12 +12,14 @@
|
|||
// Beware pre-processor insanity
|
||||
|
||||
#define THUMB_ADDITION_S(M, N, D) \
|
||||
cpu->cpsr.flags = 0; \
|
||||
cpu->cpsr.n = ARM_SIGN(D); \
|
||||
cpu->cpsr.z = !(D); \
|
||||
cpu->cpsr.c = ARM_CARRY_FROM(M, N, D); \
|
||||
cpu->cpsr.v = ARM_V_ADDITION(M, N, D);
|
||||
|
||||
#define THUMB_SUBTRACTION_S(M, N, D) \
|
||||
cpu->cpsr.flags = 0; \
|
||||
cpu->cpsr.n = ARM_SIGN(D); \
|
||||
cpu->cpsr.z = !(D); \
|
||||
cpu->cpsr.c = ARM_BORROW_FROM(M, N, D); \
|
||||
|
|
|
@ -826,10 +826,10 @@ static void _GBCoreEnableVideoLayer(struct mCore* core, size_t id, bool enable)
|
|||
gb->video.renderer->disableBG = !enable;
|
||||
break;
|
||||
case 1:
|
||||
gb->video.renderer->disableOBJ = !enable;
|
||||
gb->video.renderer->disableWIN = !enable;
|
||||
break;
|
||||
case 2:
|
||||
gb->video.renderer->disableWIN = !enable;
|
||||
gb->video.renderer->disableOBJ = !enable;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -104,6 +104,7 @@ static C3D_RenderTarget* upscaleBuffer;
|
|||
static C3D_Tex upscaleBufferTex;
|
||||
|
||||
static aptHookCookie cookie;
|
||||
static bool core2;
|
||||
|
||||
extern bool allocateRomBuffer(void);
|
||||
|
||||
|
@ -258,9 +259,7 @@ static void _resetCamera(struct m3DSImageSource* imageSource) {
|
|||
}
|
||||
|
||||
static void _setup(struct mGUIRunner* runner) {
|
||||
bool n3ds = false;
|
||||
APT_CheckNew3DS(&n3ds);
|
||||
if (n3ds) {
|
||||
if (core2) {
|
||||
mCoreConfigSetDefaultIntValue(&runner->config, "threadedVideo", 1);
|
||||
mCoreLoadForeignConfig(runner->core, &runner->config);
|
||||
}
|
||||
|
@ -752,6 +751,10 @@ static void _postAudioBuffer(struct mAVStream* stream, blip_t* left, blip_t* rig
|
|||
}
|
||||
}
|
||||
|
||||
THREAD_ENTRY _core2Test(void* context) {
|
||||
UNUSED(context);
|
||||
}
|
||||
|
||||
int main() {
|
||||
rotation.d.sample = _sampleRotation;
|
||||
rotation.d.readTiltX = _readTiltX;
|
||||
|
@ -953,6 +956,12 @@ int main() {
|
|||
APT_SetAppCpuTimeLimit(20);
|
||||
runner.autosave.thread = threadCreate(mGUIAutosaveThread, &runner.autosave, 0x4000, 0x1F, 1, true);
|
||||
|
||||
Thread thread2;
|
||||
if (ThreadCreate(&thread2, _core2Test, NULL) == 0) {
|
||||
core2 = true;
|
||||
ThreadJoin(thread2);
|
||||
}
|
||||
|
||||
mGUIInit(&runner, "3ds");
|
||||
|
||||
_map3DSKey(&runner.params.keyMap, KEY_X, GUI_INPUT_CANCEL);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -17,7 +17,7 @@ adddep() {
|
|||
while [ $# -gt 0 ]; do
|
||||
DEB=$1
|
||||
dpkg-deb -R $DEB deb-temp
|
||||
PKG=`head -n1 deb-temp/DEBIAN/control | cut -f2 -d ' '`
|
||||
PKG=`grep Package deb-temp/DEBIAN/control | cut -f2 -d ' '`
|
||||
echo Found package $PKG
|
||||
|
||||
case $PKG in
|
||||
|
@ -30,9 +30,12 @@ while [ $# -gt 0 ]; do
|
|||
PKG=$BINARY-qt
|
||||
rmdep libav
|
||||
rmdep libedit
|
||||
rmdep libelf
|
||||
rmdep libpng
|
||||
rmdep libzip
|
||||
rmdep libmagickwand
|
||||
rmdep libsqlite3
|
||||
rmdep libswresample
|
||||
rmdep libswscale
|
||||
rmdep zlib
|
||||
adddep lib$BINARY
|
||||
|
@ -41,10 +44,13 @@ while [ $# -gt 0 ]; do
|
|||
PKG=$BINARY-sdl
|
||||
rmdep libav
|
||||
rmdep libedit
|
||||
rmdep libelf
|
||||
rmdep libpng
|
||||
rmdep qt
|
||||
rmdep libzip
|
||||
rmdep libmagickwand
|
||||
rmdep libsqlite3
|
||||
rmdep libswresample
|
||||
rmdep libswscale
|
||||
rmdep zlib
|
||||
adddep lib$BINARY
|
||||
|
|
Loading…
Reference in New Issue