Core into APK?

Is it possible to compile a Core into a standalone APK?

Sorry if I’m asking something really stupid - but I’m new to the whole “Android emulation” thing.

I ask, because I couldn’t find a decent Odyssey2 emulator (The only one available VPacAPP, is very slow and crashes a lot on my Android mini-pc), but I could find this core for RetroArch:

https://github.com/libretro/libretro-o2em

I managed to compile it (I have the Android NDK installed), but all it creates is a bunch of “libretro.so” - so now I’m lost :frowning:

I’m asking about a standalone APK, because I’m making my own front-end for emulators (already have it working for SNES/NES/GBA/Mega Drive and Atari…), and would love to include an Odyssey2 emulator in the mix (as it was my first video-game ever!)

Any help appreciated, thanks!

Cores are just that… cores. They are useless without a frontend Why not grab the latest nightly at buildbot.libretro.com, go into core manager and download the core you want

Because Retroarch is way too slow in general for my Android device. Also, I couldn’t get the latest build to run. I’m stuck at a “press OK/Accept” screen after loading a core/content - and nothing I do work.

Plus, I just need an Odyssey2 emulator…

With the current one you only download the cores you want. You just need to set a gamepad overlay to press A to accept

I think the build from 18-01-2015 is broken - I downloaded the one from 13-01-2015 and I got to the odyssey boot. But couldn’t start (or even exit) the emulator.

I just tried the current nightly with the dosbox core and it works perfect so no idea of your issue

Something seems seriously broken. I installed the fmsx core and the o2em core.

Started O2Em… locked at the “Select game” screen. (Yes, I pointed RetroArch to the BIOS). Then, I uninstalled O2Em core, selected fMSX core, selected a MSX game, started RetroArch… and still locked up at the select game screen from O2Em!

I’ve managed to run the O2EM core - with the build from 2015-01-17.

Only one problem though: It doesn’t seem to respond to any movement or button press on a real (Xbox360) joystick. And to start the game, I need a virtual keyboard on screen (since it doesn’t respond to a real keyboard either… and Odyssey2 Games starts by pressing a number from 0 to 9 to select difficult level).

Bottom line: I can see the games running (and they are running fine - just sound that is not that great), but I can’t play any of them :frowning:

I now managed to run O2Em, with Google Play Store APK. If I just connect the xbox360 controller (no keyboard or mouse, otherwise it won’t work), the system finds it and if I keep a keyboard overlay on screen, I can use a mouse to tap the “1” button to start a game, then use the D-PAD to move around and button B to shoot.

But, I still have two thigs that I need:

  1. Some way to start the game with the joystick. Can I map any button to simulate “1” or “0” or “2” being pressed?

  2. Some way to quit the emulator with the joystick. I tried setting on retroarch.cfg input_exit_emulator_btn = 110 input_enable_hotkey_btn = 1

    But that didn’t have any effect. I even tried other values for exit_emulator - but nothing works :frowning:

1 No I don’t think you can map joypad buttons to keyboard 2 It works, at least in windows, hotkey is a modifier, so actions of hotkeys (exit, menu, load, save) only happen when HOTKEY is pressed

I actually recompiled O2EM core, altering joystick_data from joystick_data[2][5] to joystick_data[2][12], set:

joystick_data[1][10]= input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L2);

And mapped L2 to BUTTON_MODE on the RetroArch interface. Added this on update_input():

	if (joystick_data[0][10]) 
	{
		key_done = 1;
		close_audio();
		close_voice();
		close_display();
		
	}

And now, when I press the big (X) button on my 360 controller, I can quit O2EM!

Just need to know now what to alter in the O2EM Core so if I press a key (Select, Start, X,Y, whatever) if will be the same as pressing “0”, “1” or “2” in the emulated O2EM…

Now I’m having the strangest problems of all.

I can run the O2EM build I’ve made fine from Retroarch. I can play it as many times as I want, without any issues.

I can also start the emulator, from the terminal with the following command line: (with root / “su”) am start -e ROM “<rom>” -e LIBRETRO /data/user/0/com.retroarch/cores/ODYSSEY.so -n com.retroarch/.browser.retroactivity.RetroActivityFuture -e CONFIGGILE /data/user/0/com.retroarch/ODYSSEY.cfg

This works most of the time - but sometimes, it won’t respond to the joystick.

Now the worst of all: from within my emulator, 99% of the time it locks up showing only “loading <rom_name>”. But every once in a while, it loads one game. This is the code I’m using to launch all emulators, not only RetroArch/O2EM, and that it is working fine for everything else:

String[] str ={"su","-c",cmd};
Process p = Runtime.getRuntime().exec(str);
    p.waitFor();

And “cmd” is the exact same command I typed in the terminal. Most of the time, it locks in the “loading” screen, doesn’t even show the “Select Screen” from Odyssey. Once in a while it shows, and when it shows, only once in a while I can play it.

I’m completely stumped by what is going on with this. Can someone help me out? Please? Pretty Please??

I just made it. Had to actually create an intent and start a new activity, instead of starting a new process. Then, it worked.

Glad you got it figured out. Sorry I/we couldn’t be more helpful.