swordfish90 / libretrodroid Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
I tested some games that need to use zapper mode. I turned on fceumm_zapper_mode-touchscreen, fceumm_show_crosshair-enabled and set the controller to Zapper mode. I saw that the cursor moved with the finger on the screen, but the click did not work.
This issue seems to be relatively new with these new alpha commits. I'll do some testing, but I want to make an official report first.
Hey!
Looks like these OnResume and OnPause events are never being called when I am debugging. I saw that yes, the lifecycle observer is added, but never called.
I made sure this wasn't a lifecycle issue by making sure that, yes, the lifecycle observer for the RetroView and RenderLifecycle are registered, and I was able to catch OnResumes on my main activity just fine.
The result is that the input variable in libretrodroid.cpp is never assigned and input doesn't work.
This could possibly be an issue of a more recent lifecycle version. Perhaps we need to forward lifecycle events to the GLRetroView?
when i use libpcsx_rearmed_libretro_android with arm64-v8a has crash.
there is the log.
2021-03-25 18:53:36.582 24363-24363/? I/Libretro Core: Memcard 2: disabled
2021-03-25 18:53:36.582 24363-24363/? I/Libretro Core: Starting PCSX-ReARMed
2021-03-25 18:53:36.582 24363-24363/? I/Libretro Core: Running PCSX Version 1.9 (Aug 21 2020).
2021-03-25 18:53:36.582 24363-24363/? I/Libretro Core: mapping main RAM failed
2021-03-25 18:53:36.582 24363-24363/? I/Libretro Core: PSX emulator couldn't be initialized.
2021-03-25 18:53:36.582 24363-24363/? I/Libretro Core: PCSX init failed.
https://pastebin.com/mFq3PwLX
ndk-stack ^
Also, it didn't throw a java exception, it just segfaulted, so that try-catch doesn't work either :(
FAILURE: Build failed with an exception.
C:\Users\user111\Desktop\LibretroDroid-master\libretrodroid\src\main\cpp\CMakeLists.txt : C/C++ debug|armeabi-v7a : CMake Error at C:\Users\user111\Desktop\LibretroDroid-master\libretrodroid\src\main\cpp\CMakeLists.txt:10 (add_subdirectory):
The source directory
C:/Users/user111/Desktop/LibretroDroid-master/libretrodroid/src/main/cpp/oboe
does not contain a CMakeLists.txt file.
Hey again! Long time no see. No big deal, but when reviving my project Ludere, I noticed that upgrading
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0'
to
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0'
broke input for GLRetroView. I assume this has something to do with lifecycle.addObserver().
Just wanted to let you know, as it was a HUGE headache for me haha! Hope you're doing well.
I use Android studio to compile, but I always report errors. Do you have specific compilation instructions?
The default snes9x core suffers from stuttering audio on my phone (fairphone2) to the point where it is more comfortable to play games without sound.
libretro does offer a couple of alternative snes9x cores:
The snes9x2002 core in particular may yield better results on low performance devices (better in terms of playability, not in terms of emulation accuracy).
RetroPie offers multiple snes9x cores in order to accommodate low spec machines such as the Pi Zero.
It would be nice if Lemuroid did this, too.
Just a humble request. I am very impressed with the quality of Lemuroid overall. Cheers :)
Upon connecting Bluetooth earphones while the game is open, the AudioTrack crashes and fails to restart automatically:
2020-10-18 16:09:18.035 22078-22100/com.draco.libretrowrapper.megaman3 D/AudioStreamLegacy: onAudioDeviceUpdate() devId 3 => 2456
2020-10-18 16:09:18.035 22078-22100/com.draco.libretrowrapper.megaman3 D/AudioStreamLegacy: onAudioDeviceUpdate() request DISCONNECT in data callback due to device change
2020-10-18 16:09:18.046 22078-22215/com.draco.libretrowrapper.megaman3 D/AudioStreamLegacy: checkForDisconnectRequest() mRequestDisconnect acknowledged
2020-10-18 16:09:18.046 22078-22215/com.draco.libretrowrapper.megaman3 W/AudioStreamLegacy: processCallbackCommon() data, stream disconnected
2020-10-18 16:09:18.046 22078-22215/com.draco.libretrowrapper.megaman3 E/AudioTrack: processAudioBuffer(2445): EVENT_MORE_DATA requested 3496 bytes but callback returned -1 bytes
2020-10-18 16:09:18.049 22078-22268/com.draco.libretrowrapper.megaman3 D/AAudio: AAudioStream_requestStop(s#1) called
2020-10-18 16:09:18.049 22078-22268/com.draco.libretrowrapper.megaman3 E/AAudioStream: setState(1) tried to set to 9 but already DISCONNECTED
2020-10-18 16:09:18.049 22078-22268/com.draco.libretrowrapper.megaman3 D/AudioTrack: ClientUid 10453 AudioTrack::stop
2020-10-18 16:09:18.049 22078-22268/com.draco.libretrowrapper.megaman3 D/AudioTrack: stop(2445): called with 410774 frames delivered
2020-10-18 16:09:18.049 22078-22268/com.draco.libretrowrapper.megaman3 D/AAudio: AAudioStream_close(s#1) called ---------------
2020-10-18 16:09:18.052 22078-22268/com.draco.libretrowrapper.megaman3 D/AudioTrack: ClientUid 10453 AudioTrack::stop
2020-10-18 16:09:18.065 22078-22268/com.draco.libretrowrapper.megaman3 D/AAudio: AAudioStream_close(s#1) returned 0 ---------
Perhaps we need to handle an AudioTrack disconnect event by creating a new one on-the-fly? Let me know your thoughts on this, seems like it shouldn't be too difficult to fix.
Does this library will add netplay function so can play with my firend?
I'm testing Super Mario Bros. 4 on the mGBA core, and upon saving at the first mini-boss, there is no save file in my filesDir
. I also tried explicitly passing filesDir.absolutePath
for both the save path and system path in GLRetroView
but neither worked.
Any ideas? Here's my initialization of GLRetroView: https://github.com/tytydraco/LibretroWrapper/blob/main/app/src/main/java/com/draco/libretrowrapper/GameActivity.kt#L81
Hi,
i just load up the project in Android Studio.
Make sure to change the hardcoded paths to existing ones in SampleActivity..
When
retroView = GLRetroView(this, "mgba_libretro_android.so", pathtogame, "", "", LibretroDroid.SHADER_LCD)
gets called tho, the above error gets thrown.
Does happen with any other core too.
It happens on:
void LibretroDroid::Core::open(const std::string& soCorePath) {
libHandle = dlopen(soCorePath.c_str(), RTLD_LOCAL);
To get the detailed (in headline) error log i logged dlerror() like
void LibretroDroid::Core::open(const std::string& soCorePath) {
libHandle = dlopen(soCorePath.c_str(), RTLD_LOCAL);
if (!libHandle) {
LOGE("Cannot dlopen library, closing");
LOGE("%s",dlerror());
Any idea? :)
This is an exciting feature😄😄
This is very weird but it's been happening for quite some time. I'm not entirely sure it's an issue with LibretroDroid but I would like to see if you have the same issue.
https://photos.app.goo.gl/1hGLzPDNwysmZQF4A
Notice that on rotate, it works fine, but on rotate back to portrait, it loses sync. I tested this w/o saving states, same issue.
Does this happen to you (without configChanges="orientation|screenSize")? If not, I'll close this.
I'm trying to save my game state in my savedInstanceState Bundle upon configuration change to prevent game restarts. However, upon unserializing the state, I get a libc crash:
A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x40 in tid 3552 (per.advancewars), pid 3552 (per.advancewars)
It's due to the RetroView not existing for long enough. My workaround is to surround the unserializeState in a Thread that loops until it successfully restores the state, or a try count is reached. An isReady handler or just a isReady variable would be great.
Hey, I don't know if it's even possible but would it be possible to reduce the min-api to 19 so I can use LRD on 4.4 kit kat? I recently migrated all my apps to use 19 as the min api (where applicable) except for Ludere ;D
Hi,
just like the default ppsspp and flycast. Once threaded rendering gets into play the games are running too fast.
Heres something like audiosync needed too
Some cores, like the new dos box pure need to support that callback which is set by the environment call I mentioned in the headline.
Is it planned to support that one?
Hi again :)
I'm getting a libc crash when the activity recreates itself. Here's the exact error:
A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7150600470 in tid 22163 (er.residentevil), pid 22163 (er.residentevil)
Using the debugger I ruled out when this happens:
I tried this with the other PSX core, mednafen or something. That one fails to even load the game.
I suspect this could be a core issue because I have no such issue when using mgba, nestopia, snes9x, or desmume. I noticed that in Lemuroid you avoid this issue by simply overriding the config changes on rotate, but I'd like to solve it without that method.
Let me know if you think this is an issue with my implementation, your implementation, or the libretro core implementation.
I managed to capture a tombstone of the seg fault:
This is more of a question than a bug. Is the GLRetroView dependent on the view it was added to, or can I remove the view from it's parent and add it to another view? I am trying to make the GLRetroView persist in an MVVM ViewModel.
I saw your commit earlier about adding internal error handling to the libretro cores, and one of them was the GLES failure. I got this exception on an Android Fire TV stick:
abort_message: assertion "terminating with uncaught exception of type std::runtime_error: Cannot create gl program"
Is it possible that this exception is unhandled, or is this on my end?
Would you consider adding Duckstation core?
I've replicated this using the Sample Activity found within your project. Loading either of the PSX cores (even with a valid rom) causes this error:
A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 20817 (GLThread 33542), pid 20778 (.android.gl2jni)
You can try to replicate the error and see if it is just my device, since my device also has the weird skipping issue (present in the Sample Activity as well when configChanges are removed).
I tested this exact core in RetroArch and it works fine.
Hi,
flycast (dreamcast emu) works, but is too fast and doesnt have sound (sounds is probably due to its too fast, since no sound is also when fast forwarding in retroarch)
Tested with latest libretrodroid and latest flycast from:
http://buildbot.libretro.com/nightly/android/latest/arm64-v8a/
Audio is broken in fast forward if threaded rendering in the core is enabled, that's a core thingy tho. Works with it beeing disabled tho.
So the only issue left is the its beeing to fast I guess
I'm running Pokemon Diamond on the Desmume core, and I can't for the life of me get the touchscreen to work. I've checked everything: Make sure there are not views blocking the frame, try switching orientations, try different cores, try hiding the gamepad entirely, etc. It just doesn't register. Is there something special I need to pipe touch inputs to the GLRetroView? Or is there any special layout changes I need to make?
It's possible it works fine but my implementation is broken. Please let me know, I'm loving your work so far <3
It would be cool to see a way to import LibretroDroid like RadialGamePad, with a simple implementation 'com.github.swordfish90:libretrodroid:0.4.1'
. I tried this on my own project, but it seems to fail to find GLRetroView.
Edit: Nevermind, already implemented
Calling getVariables() on a GLRetroView can cause a crash on release versions due to proguard stripping the class away. The issue is not present on debug builds.
https://del.dog/lirfatoora.txt
In my limited experience with proguard, I think we need to add proguard rules to keep the class available.
Hi,
PPSSPP shows an black screen only. It does put out sound tho, tested with latest libretrodroid and latest ppsspp from
http://buildbot.libretro.com/nightly/android/latest/arm64-v8a/
(without the ppsspp files added)
The SampleApp is terrible in its current state with paths hard-coded from my device. We should rewrite it downloading cores directly from BuildBot and exposing a file picker for games. Bonus points for integrating RadialGamePad.
i want modify some code on FBNeo, but is does't support multiplayer input. .
i need some help .
Hi,
any cores (currently developing my own) where hw_render_callback->depth is false, the resulting texture done by framebufferrenderer.cpp is just black, game works tho sound is working etc. The framebuffer is valid and blitting it to the mainbuffer shows its correcty, so its probably related to the depth value.
(Same also happens to the Duckstation core, that one also needs retro_hw_context_type::RETRO_HW_CONTEXT_OPENGLES_VERSION tho)
I know that DOSBOX_PURE is the core of the test, however I think this bug still needs to be reported.
val data = GLRetroViewData(this).apply {
coreFilePath = "libdosbox_pure_libretro_android.so"
gameFilePath = "${filesDir}/example.dosz"
gameFileBytes = null
systemDirectory = filesDir.absolutePath
savesDirectory = filesDir.absolutePath
/* For example, the Variable I set will not take effect */
variables = arrayOf(Variable("dosbox_pure_cpu_type", "386"))
saveRAMState = null
shader = LibretroDroid.SHADER_DEFAULT
rumbleEventsEnabled = true
preferLowLatencyAudio = true
}
retroView = GLRetroView(this, data)
Hi,
i got flycast (dreamcast emu) from http://buildbot.libretro.com/nightly/android/latest/arm64-v8a/
bu it's not work .
com.android.gl2jni E/Libretro Core: libretro/libretro.cpp:1714 E[RENDERER]: Get Vulkan HW interface failed
hello , i download ppsspp_libretro_android.so from buildbot, and it's does't work on libretrodroid . I want to know why! Would you please tell me.
My FPS only syncs when the GLRetroView is first created and when I rotate to the horizontal orientation. When rotating to the portrait orientation, the FPSsync does not reinitialize.
On start / on landscape rotation I get this log: Starting game with fps 60.000000 on a screen with refresh rate 90.000000. Using vsync: 0
It is ABSENT on rotating to portrait, breaking my renderer until I rotate to landscape again.
I suspect this issue is mainly due to the high audio latency when using Bluetooth headphones. If the latency gets too high, the audio cuts completely and the app crashes. I was able to replicate this issue in Lemuroid as well.
Let me know if you need any testing done. I realize this may be the fault of oboe, so feel free to close this issue if it's out of our control 👍
I installed latest Lemuroid 1.14.3
from Google Play on my Xiaomi MiTV P1 32" device running Android TV 9.
I tested GB, GC, GBA, NES, SNES and MEGADRIVE games, and everything works nicely except for GB, GBC and GBA games.
When starting any GB/GBC/GBA game, Lemuroid simply goes back to the game selection screen without any messages.
Using logcat
, I managed to trace the problem to a shader linking error when starting GB/GBC/GBA games:
11-20 13:32:10.221 10083 10117 I libretrodroid: Audio initialization has been called with input sample rate 32619
11-20 13:32:10.230 10083 10117 I libretrodroid: Using low latency stream: 0
11-20 13:32:10.230 10083 10117 I libretrodroid: Average audio latency set to: 66.970825 ms
11-20 13:32:10.239 10083 10117 I libretrodroid: GL Version = OpenGL ES 2.0 MI30-03.00.010.02.14.ONETAG.07.0906.1.audio.vbi-6-g5983e067
11-20 13:32:10.239 10083 10117 I libretrodroid: GL Vendor = ARM
11-20 13:32:10.239 10083 10117 I libretrodroid: GL Renderer = Mali-470 MP
11-20 13:32:10.239 10083 10117 I libretrodroid: GL Extensions = GL_EXT_debug_marker GL_OES_texture_npot GL_OES_vertex_array_object GL_OES_compressed_ETC1_RGB8_texture GL_EXT_compressed_ETC1_RGB8_sub_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_OES_vertex_half_float GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_rgb8_rgba8 GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_ARM_mali_program_binary GL_EXT_shader_texture_lod GL_EXT_robustness GL_OES_depth_texture_cube_map GL_KHR_debug GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_OES_mapbuffer GL_KHR_no_error
11-20 13:32:10.239 10083 10117 I libretrodroid: Initializing graphics
11-20 13:32:10.269 10083 10117 E libretrodroid: Could not link program:
11-20 13:32:10.269 10083 10117 E libretrodroid: L0010 Uniform 'textureSize' differ on precision
11-20 13:32:10.269 10083 10117 E libretrodroid:
11-20 13:32:10.269 10083 10117 E libretrodroid: Could not create gl program.
I further discovered that this error only happens with the LCD
and SHARP
shaders, and actually the emulated system does not matter. It happens by default with GB/GBC/GBA and not with NES/SNES/MEGADRIVE because the LCD
shader is selected when using the default Auto
filter for these systems in Lemuroid. If I force LCD
or SHARP
shaders in Lemuroid, then any system gives the same linking error and does not start. Likewise, if I force a working shader, e.g. Smooth
, then GB/GBC/GBA games do work as expected.
Note: I use Lemuroid on a Samsung Galaxy A70 and an NVIDIA Shield PRO 2019, where this problem has never happened. Therefore, this is likely a GLSL quirk in the Mali-470 MP GPU used by the Xiaomi Mi TV P1 32".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.