Giter Site home page Giter Site logo

libretrodroid's People

Contributors

hsoftxl avatar swordfish90 avatar tytydraco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libretrodroid's Issues

Fcemu don't support zapper mode on touchscreen.

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.

Loading game via bytes (not path) broken; segfaults

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.

Reproduce

  1. Instead of specifying a game path, specify a game as bytes
  2. Launch the build and observe the crash

GLRetroView RenderLifecycleObserver not being called

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.

private inner class RenderLifecycleObserver : LifecycleObserver {

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?

PSX carsh on arm64-v8a

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.

does not contain a CMakeLists.txt file.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':libretrodroid:generateJsonModelDebug'.

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.

GLRetroView addObserver doesn't work in androidx.lifecycle 2.3.0

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.

Compile and consult

I use Android studio to compile, but I always report errors. Do you have specific compilation instructions?

add additional snes9x cores?

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:

  • snes9x2002
  • snes9x2005
  • snes9x2005_plus
  • snes9x2010

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 :)

AudioTrack crashes on earphones connect

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.

dlopen failed: library "mgba_libretro_android.so" not found

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? :)

Emulator doubles it's speed on GLRetroView recreation

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.

[Request] A GLRetroView isReady() call, or an onReady() handler

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.

Request: Reduce min-api to 19

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

Libc crash on PCSX core

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:

  1. Activity starts
  2. Rotate the device (causing a configuration change, restarting the app. No big deal, this is intentional)
  3. onSaveInstanceState is called
  4. onStop and onDestroy are NOT called
  5. Error appears and app crashes

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:

tombstone_09.txt

Crash on re-adding view to another parent

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.

GLES failure try catch?

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?

PSX games crash (Beetle HW and PCSX ReARMed)

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.

Flycast works, but is too fast

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

Having some trouble with touchscreen

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

Import LibretroDroid via Gradle

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

Improve SampleApp

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.

GL Cores that not using "depth" are resulting in an black texture

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)

DOSBOX_PURE setting variables does not take effect

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)

ppsspp_libretro_android.so

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.

LibretroDroid not calling FPSsync appropriately

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.

Audio cuts in and out when Bluetooth headphones are connected

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 👍

`LCD` and `SHARP` shaders not linking on Mali-470 MP

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".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.