diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-04-29 11:23:35 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-04-29 11:23:35 +0200 |
| commit | f256c48505690dfa39405156f626ca8762d8f1d5 (patch) | |
| tree | 54446bbea1144aa8520b15df63a2ccffd706bfa9 | |
| parent | 71c5447b8ad534f2507c0405a348d902e9374517 (diff) | |
| download | box64-f256c48505690dfa39405156f626ca8762d8f1d5.tar.gz box64-f256c48505690dfa39405156f626ca8762d8f1d5.zip | |
Fixed non-dynarec build by introducing BOX64_JVM to replace BOX64_DYNAREC_JVM
| -rw-r--r-- | docs/USAGE.md | 9 | ||||
| -rw-r--r-- | src/core.c | 15 | ||||
| -rw-r--r-- | src/include/debug.h | 2 | ||||
| -rw-r--r-- | src/librarian/library.c | 2 | ||||
| -rw-r--r-- | src/tools/rcfile.c | 4 | ||||
| -rw-r--r-- | system/box64.box64rc | 2 |
6 files changed, 26 insertions, 8 deletions
diff --git a/docs/USAGE.md b/docs/USAGE.md index de8cc427..47282644 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -207,9 +207,9 @@ Detect MonoBleedingEdge and apply conservative settings * 1 : Detect MonoBleedingEdge, and apply BIGBLOCK=0 STRONGMEM=1 if detected (Default) #### BOX64_DYNAREC_JVM * -Detect libjvm and apply conservative settings +Detect libjvm and apply conservative settings. Obsolete, use BOX64_JVM instead. * 0 : Don't detect libjvm -* 1 : Detect libjvm, and apply BIGBLOCK=0 STRONGMEM=1 if detected (Default) +* 1 : Detect libjvm, and apply BIGBLOCK=0 STRONGMEM=1 SSE42=0 if detected (Default) #### BOX64_DYNAREC_WAIT * Behavior with FillBlock is not availble (FillBlock build Dynarec blocks and is not multithreaded) @@ -246,6 +246,11 @@ Detect libcef and apply malloc_hack settings * 0 : Don't detect libcef * 1 : Detect libcef, and apply MALLOC_HACK=2 if detected (Default) +#### BOX64_JVM * +Detect libjvm and apply conservative settings +* 0 : Don't detect libjvm +* 1 : Detect libjvm, and apply BIGBLOCK=0 STRONGMEM=1 SSE42=0 if detected (Default) + #### BOX64_SDL2_JGUID * Need a workaround for SDL_GetJoystickGUIDInfo function for wrapped SDL2 * 0 : Don't use any workaround diff --git a/src/core.c b/src/core.c index 6b96d37d..9e61cb49 100644 --- a/src/core.c +++ b/src/core.c @@ -79,7 +79,6 @@ int box64_dynarec_fastround = 1; int box64_dynarec_safeflags = 1; int box64_dynarec_callret = 0; int box64_dynarec_bleeding_edge = 1; -int box64_dynarec_jvm = 1; int box64_dynarec_tbb = 1; int box64_dynarec_wait = 1; int box64_dynarec_missing = 0; @@ -123,6 +122,7 @@ int la64_scq = 0; int box64_dynarec = 0; #endif int box64_libcef = 1; +int box64_jvm = 1; int box64_sdl2_jguid = 0; int dlsym_error = 0; int cycle_log = 0; @@ -727,9 +727,9 @@ void LoadLogEnv() if(p) { if(strlen(p)==1) { if(p[0]>='0' && p[0]<='1') - box64_dynarec_jvm = p[0]-'0'; + box64_jvm = p[0]-'0'; } - if(!box64_dynarec_jvm) + if(!box64_jvm) printf_log(LOG_INFO, "Dynarec will not detect libjvm\n"); } p = getenv("BOX64_DYNAREC_TBB"); @@ -845,6 +845,15 @@ void LoadLogEnv() if(!box64_libcef) printf_log(LOG_INFO, "BOX64 will not detect libcef\n"); } + p = getenv("BOX64_JVM"); + if(p) { + if(strlen(p)==1) { + if(p[0]>='0' && p[0]<='1') + box64_jvm = p[0]-'0'; + } + if(!box64_jvm) + printf_log(LOG_INFO, "BOX64 will not detect libjvm\n"); + } p = getenv("BOX64_SDL2_JGUID"); if(p) { if(strlen(p)==1) { diff --git a/src/include/debug.h b/src/include/debug.h index 8d75a5c5..c4ea7ab1 100644 --- a/src/include/debug.h +++ b/src/include/debug.h @@ -30,7 +30,6 @@ extern int box64_dynarec_div0; extern int box64_dynarec_safeflags; extern int box64_dynarec_callret; extern int box64_dynarec_bleeding_edge; -extern int box64_dynarec_jvm; extern int box64_dynarec_tbb; extern int box64_dynarec_wait; extern int box64_dynarec_missing; @@ -69,6 +68,7 @@ extern int la64_scq; #endif #endif extern int box64_libcef; +extern int box64_jvm; extern int box64_sdl2_jguid; extern int dlsym_error; // log dlsym error extern int cycle_log; // if using rolling logs diff --git a/src/librarian/library.c b/src/librarian/library.c index 3466e017..127339af 100644 --- a/src/librarian/library.c +++ b/src/librarian/library.c @@ -339,7 +339,7 @@ static int loadEmulatedLib(const char* libname, library_t *lib, box64context_t* box64_dynarec_strongmem = 3; } #endif - if(libname && box64_dynarec_jvm && strstr(libname, "libjvm.so")) { + if(libname && box64_jvm && strstr(libname, "libjvm.so")) { #ifdef DYNAREC printf_dump(LOG_INFO, "libjvm detected, disable Dynarec BigBlock and enable Dynarec StrongMem, hide SSE 4.2\n"); box64_dynarec_bigblock = 0; diff --git a/src/tools/rcfile.c b/src/tools/rcfile.c index 9098f9dc..191badad 100644 --- a/src/tools/rcfile.c +++ b/src/tools/rcfile.c @@ -106,6 +106,7 @@ ENTRYBOOL(BOX64_CEFDISABLEGPU, box64_cefdisablegpu) \ ENTRYBOOL(BOX64_CEFDISABLEGPUCOMPOSITOR, box64_cefdisablegpucompositor)\ ENTRYBOOL(BOX64_EXIT, want_exit) \ ENTRYBOOL(BOX64_LIBCEF, box64_libcef) \ +ENTRYBOOL(BOX64_JVM, box64_jvm) \ ENTRYBOOL(BOX64_SDL2_JGUID, box64_sdl2_jguid) \ ENTRYINT(BOX64_MALLOC_HACK, box64_malloc_hack, 0, 2, 2) \ ENTRYINTPOS(BOX64_MAXCPU, new_maxcpu) \ @@ -500,6 +501,7 @@ void ApplyParams(const char* name) return; int new_cycle_log = cycle_log; int new_maxcpu = box64_maxcpu; + int box64_dynarec_jvm = box64_jvm; if(!strcmp(name, old_name)) { return; } @@ -547,6 +549,8 @@ void ApplyParams(const char* name) cycle_log = new_cycle_log; initCycleLog(my_context); } + if(param->is_box64_dynarec_jvm_present && !param->is_box64_jvm_present) + box64_jvm = box64_dynarec_jvm; if(!box64_maxcpu_immutable) { if(new_maxcpu!=box64_maxcpu && box64_maxcpu && box64_maxcpu<new_maxcpu) { printf_log(LOG_INFO, "Not applying BOX64_MAXCPU=%d because a lesser value is already active: %d\n", new_maxcpu, box64_maxcpu); diff --git a/system/box64.box64rc b/system/box64.box64rc index 411fff74..7c7aeb8c 100644 --- a/system/box64.box64rc +++ b/system/box64.box64rc @@ -133,8 +133,8 @@ BOX64_NOGTK=1 # This one is still a bit unstable. This might help, but will also slowdown emulation BOX64_DYNAREC_STRONGMEM=3 BOX64_DYNAREC_SAFEFLAGS=2 -BOX64_DYNAREC_JVM=0 BOX64_DYNAREC_ALIGNED_ATOMICS=1 +BOX64_JVM=0 BOX64_SSE42=0 BOX64_MAXCPU=4 |