Cannot run UniPCEmu on LOS 13.0

Issue #3 resolved
Макс Волошин created an issue

Hello, I downloaded UniPCEmu APK from your site. But when I try to launch it, application immediately crashes. What I am doing wrong? Did I forget to do something? I have MT6580 device on LineageOS 13.0.

Comments (21)

  1. superfury repo owner

    The recent builds are built with the Android Studio compiler, with the NDK manually downgraded to r12b(due to inline function issues linking). One downside to the SDK is that compiling for 'all' platforms (APP_ABI = all) only seems to compile for x86 and only one ARM architecture(others are deprecated and unable to compile for those using ths=e NDK(even rewriting the config file in the NDK).

    Furthermore, have you checked required permissions? It requires net permissions to run(and (optionally) recording for sound blaster)).

  2. Макс Волошин reporter

    MT6580 is armv7, isn't it? I have enabled all the permissions available for this app in the settings (microphone and memory). I think other needed permissions should be enabled by default.

  3. Макс Волошин reporter

    I have only settings.ini in application folder. Is it enough to get UniPCEmu running? P.S. LineageOS 13.0 is based on Android 6.0. Was UniPCEmu tested on this Android version?

  4. superfury repo owner

    Just read it. Can't see anything other than initializing SDL(2(_net))?

    The APK is built for x86 and armeabi-v7a. It uses SDL2 and SDL2_net(when available, official build are build with both). Failing SDL2_net initialization just continues with disabled internet connection(and unable to connect to anything and be connected to).

    Is there anything logged within the logs subfolder? Any known errors are logged that way.

    Have you permitted disk access rights(Android usually calls it being able to use the SD-card)?

    Most software-catchable errors are caught and logged to said folder, if possible.

    Have you checked and verified the data in the settings file? Any incorrect settings? Tried deleting settings.ini and restarting the app?

    I usually test on Samsung Galaxy S7(Android 7.0) with both permissions enabled. I'll check with those blocked...

  5. superfury repo owner

    I've just tested the two rights settings it has on Android:

    • Disabling recording rights simply disables the recording, but will make it continue to work.
    • Disabling storage rights makes it unable to create/log/read/write ANYTHING on the storage medium(including settings, ROMs, disk images, logs etc.).

    In both cases, no crash is observed(although unusable without storage rights, as nothing can be configured, no ROMs(causing it to do nothing, as there's nothing loaded to run), nothing can be logged etc.).

    Are you at least giving the app storage rights? Do you see the yellow settings menu option text when (re-)starting the app(close it if it's opened already)? Did you try deleting the settings file?

    Current testbuild: https://drive.google.com/file/d/1AsGQP9xwPAtcoIAX_1ciBuUatlaM5nmE/view?usp=sharing

  6. Макс Волошин reporter

    Now I can run it, but cannot go past black screen. I tried putting different XT, PS/2, etc. BIOSes in roms subdirectory, renaming them to biosrom.u*, but result is always the same: cannot load u27 bios!

  7. superfury repo owner

    The filenames are case-sensitive and all-caps(except on Windows). Rename to ROM/BIOSROM.U27/U47

  8. Макс Волошин reporter

    OK, thank you. How can I get maximum emulated CPU speed on Android? P.S. Will you upload an updated build on itch.io?

  9. Макс Волошин reporter

    Speed is horribly low, I waited ~5 minutes before CP-M 86 1.1 booted. Then I cannot use 286/386 (1% speed) and blank screen forever. Which BIOSes I need to use with AT or Deskpro 386?

  10. superfury repo owner

    The speed 'issue' is mainly due to the cycle-accurate emulation. You can try to speed it up by putting it in IPS mode(Dosbox instruction-level cycle mode essentially). But that's mainly faster, because it's running instruction stages in blocks instead of cycle-level(less accurate). The AT BIOS might not like it(it requires cycle-accuracy after all). Generic Super PC/Turbo XT BIOS and Compaq Deskpro 386 handle IPS mode fine. Although the Compaq can't boot floppies yet(incorrect DMA setup when reading floppies).

    The BIOSes I use are: XT: Generic Super PC/Turbo XT BIOS(Latest). Original XT BIOS currently crashes afaik. AT: AT 06/10/85 type 2 6MHz BIOS from Minuszerodegrees(Type 1 might work too). Works 100% on the debug apk version. Compaq Deskpro 386: Compaq Deskpro 386 BIOS reversed from PCjs ROM disassembly post(Google it).

  11. Макс Волошин reporter

    Dropbox links on vcfed died, I didn't find any other posts. CPU speed on 386 is still "0%".

  12. superfury repo owner

    Huh? What are you looking for on vcfed? The ROMs can be found at http://www.phatcode.net/projects.php?id=281 (XT), http://minuszerodegrees.net/bios/bios.htm (AT), https://www.pcjs.org/devices/pcx86/rom/compaq/deskpro386/ (Compaq Deskpro 386, needs manual/programatic conversion to bin files). I'm using the J.4 ROM files converted to .bin files from the .hex files. Then mounted as BIOSROM.U13/U15 accordingly.

    UniPCemu can be found at https://superfury.itch.io/unipcemu

    Of course, check the UniPCemu logs and settings. And of course a video ROM (for EGA+).

  13. superfury repo owner

    Have you managed to get it running now? Future builds will have a bit more support on more processors other than armv7a and x86(due to manual reconfiguration of the makefiles for Android Studio, manually adding the remaining platforms supported by the current android studio(replacing the old 'all' platform which doesn't compile for all platforms on the current Android Studio; with downgraded NDK-r12b due to inline linking issues with newer compilers(clang issue)).

  14. superfury repo owner

    I've looked through the log file you've given earlier, and found a little backtrace of an error loading one of the CMOS from the settings file?

    02-03 06:06:20.190 F/DEBUG ( 367): 02-03 06:06:20.190 F/DEBUG ( 367): LineageOS Version: '13.0-20171207-UNOFFICIAL-P350' 02-03 06:06:20.190 F/DEBUG ( 367): Build fingerprint: 'Ixion/lineage_P350/P350:6.0.1/MOI10E/2b19fc5afb:userdebug/test-keys' 02-03 06:06:20.190 F/DEBUG ( 367): Revision: '0' 02-03 06:06:20.190 F/DEBUG ( 367): ABI: 'arm' 02-03 06:06:20.190 F/DEBUG ( 367): pid: 25188, tid: 25206, name: SDLThread >>> com.unipcemu.app <<< 02-03 06:06:20.190 F/DEBUG ( 367): signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xa32daa9f 02-03 06:06:20.201 D/AudioALSACaptureDataProviderNormal( 369): readThread, latency_in_us,0.000111,0.037519,0.002253 02-03 06:06:20.203 D/AudioALSACaptureDataProviderNormal( 369): readThread, latency_in_us,0.000096,0.000086,0.002219 02-03 06:06:20.210 F/DEBUG ( 367): r0 00000000 r1 00000000 r2 00000000 r3 00000000 02-03 06:06:20.210 F/DEBUG ( 367): r4 a32daa1f r5 a277e5fc r6 b6d43ec0 r7 a2769056 02-03 06:06:20.210 F/DEBUG ( 367): r8 00000000 r9 a16ea234 sl a2767949 fp a16ea374 02-03 06:06:20.210 F/DEBUG ( 367): ip 00000004 sp a16ea228 lr a27486ab pc a2703630 cpsr 600d0030 02-03 06:06:20.215 F/DEBUG ( 367): 02-03 06:06:20.215 F/DEBUG ( 367): backtrace: 02-03 06:06:20.216 F/DEBUG ( 367): #00 pc 00054630 /data/app/com.unipcemu.app-1/lib/arm/libmain.so (loadBIOSCMOS+59) 02-03 06:06:20.216 F/DEBUG ( 367): #01 pc 000562ed /data/app/com.unipcemu.app-1/lib/arm/libmain.so (BIOS_LoadData+1640) 02-03 06:06:20.216 F/DEBUG ( 367): #02 pc 0005677d /data/app/com.unipcemu.app-1/lib/arm/libmain.so (BIOS_LoadIO+16) 02-03 06:06:20.216 F/DEBUG ( 367): #03 pc 000ab5bf /data/app/com.unipcemu.app-1/lib/arm/libmain.so (initEMU+158) 02-03 06:06:20.216 F/DEBUG ( 367): #04 pc 000abb2d /data/app/com.unipcemu.app-1/lib/arm/libmain.so (initEMUreset+76) 02-03 06:06:20.216 F/DEBUG ( 367): #05 pc 000af013 /data/app/com.unipcemu.app-1/lib/arm/libmain.so (SDL_main+538) 02-03 06:06:20.216 F/DEBUG ( 367): #06 pc 0001fb25 /data/app/com.unipcemu.app-1/lib/arm/libSDL2.so (Java_org_libsdl_app_SDLActivity_nativeRunMain+284) 02-03 06:06:20.216 F/DEBUG ( 367): #07 pc 00010b2d

    So it's a problem within the loadBIOSCMOS(+59?) within bios.c?

  15. superfury repo owner

    Does it work correctly with current builds? Lots of bugfixes have been made since then(as well as improvements and optimizations).

  16. superfury repo owner

    Since I'm not receiving any reactions anymore, I'll put this issue on hold, unless I hear about it again.

  17. superfury repo owner

    Since I'm not receiving any more, I'm changing it to resolved. Feel free to reopen if it's still not working.

    Also, if it's displaying a green-bordered 0%, it means that the emulation is running, but very slow, between 0 and 1%. If it's an orange 0%, it means that the main thread is somehow hanging on something and not processing anything at all.

  18. Log in to comment