1. Download the #1 Android News App:   EarlyBird - News for Android
    Dismiss Notice

emulator auto-play help.

Last Updated:

  1. mrast

    mrast Well-Known Member

    Looking for a developer with intimate knowledge of both:
    Android and video game emulator functions to help make stand alone game apps.
    I have been working with another dev trying to make snes roms run natively on Android but neither of us have enough knowledge of how to integrate the snes system into the Android system to get it to work.

    If anyone is interested in helping, contact me at:


  2. giantpune

    giantpune Well-Known Member

    I'm not sure if i completely understand what you are getting at, but it sounds like you are wanting to create a copy of an emulator with 1 game built in and it will only ever play that 1 game.

    If I am right, then there is 1 big issue with the idea. Every game you install will contain another copy of the emulator. You will end up with many copies of the same exact code. And if you ever want to upgrade your emulator, every one of your games must also be updated. You also have to come up with a plan to avoid having to configure your settings and controllers for every copy of the emulator.

    I would suggest a different approach. You can create your program to start an emulator that is already installed, and have it start a specific game. It would be the same as what I am doing in my own project ( Punemu android in the making - YouTube ). All the games here are started with the same emulator, so there is only 1 copy of the code and it can be easily updated. All you have to do different isl not create a gui to select games, but instead you will install different apk and each one will start a specific game.
  3. mrast

    mrast Well-Known Member

    Thanks for the tip, and yes, we have abandoned our original idea as it was making my friend bald from frustration. But one point you made is exactly what we are currently trying to do.... Bundle an emulator and a rom together as a stand alone application that can be intalled like any other .apk, so when selected it can run without any other outside programs. Emulators are small in size so it wont take up too much space when bundled. I know this can be done on windows and linux emulators but i am having trouble wrapping my head around this, both the bundling of the emulator and rom, and converting it to an apk.

    Oh and your project lookd very good, i like the idea and the interface looks nice and smooth
  4. giantpune

    giantpune Well-Known Member

    I guess its a moot point since you have abandoned the idea. But just in case you are still curious, I can give a couple ideas about it.

    The emulator is generally compiled from portable c/c++ code with an arm cross compiler and/or written in asm for arm processor. It is linked into an elf format shared library (GBCoid contains "ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped" ). The resulting library is saved as a .so file. [google 'android JNI' for more info]. An apk file is just a renamed zip file that contains a certain directory structure. When you install an apk, it is basically unzipped and files copied to your phone. The emulator library is one of the files stored in this zip.

    This is where you have a couple different ways to bundle the emulator and the rom. One way would be to include your rom in a char array compiled within your .so library. Since you are always loading that same exact game, you can have it like that and just memcpy() it into place when you need to reset, load, or similar. Another method would be to include your rom in the apk in /assets/my.rom and then hardcode the path in your program so it always loads that file. Then creating different game-emu bundles means you dont need to recompile any c code as it will be exactly the same. You only need to change some strings in the xml files, your icon images, and the rom you include in your apk.

    If I were doing your project, and I wasn't making any specific changes to the emulator for certain games such as custom control layouts, then my decision would be based solely on my laziness. I would start out by using the char array method because it is the easiest. If I was only doing one or two games, then the effort to change that char array doesn't become much. However, if I then decide that I like these things and I want 20 of them all with different roms, then the hassle of editing that char array gets to be a bother. I would say that after about my 3rd or 4th bundle I would probably invest the time to include the rom separately in the apk and load it at runtime.
  5. mrast

    mrast Well-Known Member

    Wow, as much as I truly do appreciate your help... I have absolutely no club what you just said. I just started computer science classes last week so I'm pretty much a kindergartner in regards to android development. Ill Google everything you just said and see if I can understand this. Again I appreciate your input.

Share This Page