Author Topic: DeSmuME to Android  (Read 41539 times)

Offline Vincentmrl

  • Cyan Team
  • long
  • *
  • Posts: 121
    • View Profile
Re: DeSmuME to Android
« Reply #15 on: April 21, 2012, 05:58:55 PM »
i agree to porting desmume to android, this way desmume's team would see that desmume can run fine on powerpc things, on my G5 Imac it's just graphical bug rape, also rhythm paradise would be nice to emulate (or natively run both ds's processors assigned to the single processor)
Device: Lg Optimus One
CPU: 600 Mhz ARMv6 (Overclocked to 748Mhz ondemand governor)
GPU: Qualcomm Adreno 200
RAM: 512 MB
Resolution: 320 x 480
Rom: Unofficial Cyanogenmod 9

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3471
  • Developer
    • View Profile
    • PaulsCode.Com
Re: DeSmuME to Android
« Reply #16 on: April 21, 2012, 08:18:27 PM »
Just to give everyone an idea where I'm at on this.  There's a small chance I may pick this project up in the next month or so, depending on a couple of things.

1) I have reached a bit of a road block on porting Yabause, where the ARM dynarec crashes the app when it is enabled (I haven't given up.. I still have one more thing I'm going to try, and then I'll try and see if Ari64 is up to the challenge of helping me debug it if that doesn't work).  Note that I won't be dropping Yabause AE entirely (I still want to port the renderer to GLES regardless which should improve speed quite a bit), but without the dynarec working the emulator probably won't ever reach full speed for most games, so it will become a bit lower priority at that point.

2) I'm actively working to get the source for nulldce.  It doesn't look very likely that I'll be able to get it, but if I do this would take priority over porting desmume.

So in other words, if I can't get the dynarec to work in Yabause AE, and Ari64 decides not to help, and if I can't get the source for nulldce, then I will take on porting desmume as my priority-2 side project (after Mupen64Plus AE of course).
« Last Edit: April 21, 2012, 08:28:24 PM by Paul »
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Vincentmrl

  • Cyan Team
  • long
  • *
  • Posts: 121
    • View Profile
Re: DeSmuME to Android
« Reply #17 on: April 24, 2012, 03:20:42 PM »
Just to give everyone an idea where I'm at on this.  There's a small chance I may pick this project up in the next month or so, depending on a couple of things.

1) I have reached a bit of a road block on porting Yabause, where the ARM dynarec crashes the app when it is enabled (I haven't given up.. I still have one more thing I'm going to try, and then I'll try and see if Ari64 is up to the challenge of helping me debug it if that doesn't work).  Note that I won't be dropping Yabause AE entirely (I still want to port the renderer to GLES regardless which should improve speed quite a bit), but without the dynarec working the emulator probably won't ever reach full speed for most games, so it will become a bit lower priority at that point.

2) I'm actively working to get the source for nulldce.  It doesn't look very likely that I'll be able to get it, but if I do this would take priority over porting desmume.

So in other words, if I can't get the dynarec to work in Yabause AE, and Ari64 decides not to help, and if I can't get the source for nulldce, then I will take on porting desmume as my priority-2 side project (after Mupen64Plus AE of course).

YAY FOR DESMUME!

Anyway you need just the source of nulldc or a special source? Nulldc is discontinued so there's the source ( http://code.google.com/p/nulldc/ ) i hope it's the one you're searching :D
Device: Lg Optimus One
CPU: 600 Mhz ARMv6 (Overclocked to 748Mhz ondemand governor)
GPU: Qualcomm Adreno 200
RAM: 512 MB
Resolution: 320 x 480
Rom: Unofficial Cyanogenmod 9

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3471
  • Developer
    • View Profile
    • PaulsCode.Com
Re: DeSmuME to Android
« Reply #18 on: April 24, 2012, 03:40:48 PM »
Nah, this one (no source posted to it yet, though):

http://code.google.com/p/nulldce/
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline kkaalldd

  • bit
  • Posts: 3
    • View Profile
Re: DeSmuME to Android
« Reply #19 on: May 11, 2012, 04:29:34 PM »
Does this help

newbielink:http://code.google.com/p/desmumewii/ [nonactive]

And

newbielink:http://devkitpro.org/ [nonactive] 
« Last Edit: May 11, 2012, 04:36:33 PM by kkaalldd »

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3471
  • Developer
    • View Profile
    • PaulsCode.Com
Re: DeSmuME to Android
« Reply #20 on: May 11, 2012, 06:12:58 PM »
Useful to someone else, probably, but not me.  Problem is the Wii's CPU is PPC, not ARM.  Both are in the RISC family, but since I don't know any assembly, I am unable to port PPC to ARM.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline jumpertwo

  • bit
  • Posts: 8
    • View Profile
Re: DeSmuME to Android
« Reply #21 on: May 12, 2012, 09:57:43 AM »
i already posted source for ARM, even an optimized version for ARMv7 CPUs with Thumb-2 and VFP3D16 (like Qualcomm Scorpion core) and i think that just using this version will result in a good speed up,even without wrapping the OpenGL render
Device: Xperia sk17i
CPU: Qualcomm 1 GHz Scorpion (Snapdragon)
GPU: Adreno 205
RAM: 512 MB
Screen res: 480 ? 320
ROM: stock android 2.3.3 rooted

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3471
  • Developer
    • View Profile
    • PaulsCode.Com
Re: DeSmuME to Android
« Reply #22 on: May 12, 2012, 11:04:06 AM »
Right, I was just pointing out that the one kkaalld linked to wasn't helpful.  Porting DeSmuME to Android is certainly possible.  Anyway, I doubt I'll have time to work on this for a while, since I'm getting out of the AF a lot sooner than expected and need to focus more on getting a couple commercial apps published (since open-source emulators are prone to being taken down, so I can't rely on them as a financial fall-back in case I have trouble finding a job)
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline karmaGfa

  • bit
  • Posts: 1
    • View Profile
Re: DeSmuME to Android
« Reply #23 on: May 17, 2012, 02:22:42 AM »
I know Android, OpenGL ES, Java, C/C++, ARM assembly, and I love to play with the code of emulators (10 years ago, I developed newbielink:http://gfa.emu-france.com/ [nonactive]).

I might give this port a try. However, I am new on Desmume and its codebase, so it might take a while before I have something running.

Offline koded101

  • bit
  • Posts: 2
    • View Profile
Re: DeSmuME to Android
« Reply #24 on: June 25, 2012, 10:23:35 AM »
Hi all - First of all thanks to Paul for his tremendous effort on the N64 for Android front! It's awesome!  :) My regular search for a DS emulator on Android led me here. The conversation here actually inspired me to try and port desmume to Android.

I've just graduated as an Electronic Engineer a few weeks ago. Since then, as I have been free, I have been playing around with desmume's source code and have managed to hack a port of it to android. I basically compiled the command line SDL port for Linux and made it work on windows (I took the easy route and set up a windows dev environment). After this I simply relied on the official SDL port for Android and got the emulator to work on my Galaxy Note phone.

Of course I stripped out control, sound and hoards of other 'bells and whistles'  from the latest desmume source. So I basically have a 'bare-bones' setup to enable me to start getting things to run faster. I was only able to manage this much due to my c++ and Java knowledge as part of my degree so I am definitely not a veteran. I am obviously now at a fork - dynarec or gles port?

As you can see I am quite new to this and am relying solely on my problem solving skills to tackle things logically. I was wondering if there was anyone serious enough willing to form a team of sorts?

Here is a quick video of what I have got:

newbielink:http://www.youtube.com/watch?v=ndjq-0dN424&feature=youtu.be [nonactive]

At the moment it's really 'bodged' in that the name of the rom and path to it are hardcoded as I wanted to see something up and running on my phone asap! Out of the emulators that have been available for Android I have found nds4droid to be the better one, regardless no source is available hence I am starting from scratch. Now that I have my environment setup and some working source I can have a bit more fun.  ;D

Offline xperia64

  • Developer
  • double
  • *****
  • Posts: 591
    • View Profile
    • My Apps
Re: DeSmuME to Android
« Reply #25 on: June 25, 2012, 04:27:29 PM »
Would it be possible to port the 0.9.6 core as well? i've encountered some issues with 0.9.7 and 0.9.8 with a certain game that works on 0.9.6 (once you get 0.9.8 working at a decent speed of course)

Offline jumpertwo

  • bit
  • Posts: 8
    • View Profile
Re: DeSmuME to Android
« Reply #26 on: June 30, 2012, 06:49:24 AM »
good work koded101! not bad speed at all! if i had to choose,maybe gles port is not the best plan to go..i tested the emulator,even on pc gl render is slower than the software render (even with a strong gpu you cannot reach more than 10 fps) but i don't know if situation changed with the last version..i don't think so,but i'm happy to be proved wrong.
i have a question about the source used for the port..did you use the optimized version for ARMv7 CPUs (with Thumb-2 and VFP3D16) of Ubuntu DeSmuMe that i posted? as far as i understand,that version could engage the needed floating point calculus of the emulator (i heard DeSmuMe use a lot of floating point power) better that the other,as it's optimized for our VFP.last question..are you gonna try the dynarec port? anyway very good work so far!
Device: Xperia sk17i
CPU: Qualcomm 1 GHz Scorpion (Snapdragon)
GPU: Adreno 205
RAM: 512 MB
Screen res: 480 ? 320
ROM: stock android 2.3.3 rooted

Offline koded101

  • bit
  • Posts: 2
    • View Profile
Re: DeSmuME to Android
« Reply #27 on: June 30, 2012, 09:38:20 AM »
xperia64: Well if this works I don't see why we couldn't do the same for the older revision. By the way, which games were you talking about?

jumpertwo: Thanks! I used the source for the windows build. I couldn't find the ARM optimised source or any detailed information on it. If you have more to add on this please let me know.

As for the gles port I was thinking that any burden we can take off the cpu and distribute to other dedicated hardware would be helpful speedwise. Having said that the port is proving long-winded as desmume seems to be using some  fixed function pipeline stuff which seems to be deprecated in gles2.0. Perhaps I should try and move to gles1.1. At the moment I am analysing the GPU and how is handles things. Have you made any discoveries in this area you could share?

As for CPU we need and ARM-ARM dynarec. The only existence of something like this I have found is in Exophase and Zodttd's  gpSP2x which is a GBA emulator, so somewhat relevant. I doubt I could successfully modify let alone write a dynarec. Use of Ari64's dynarec as a base could be considered maybe(?). Anyhow I am no expert so expert comments would be much appreciated!  :)

Offline xperia64

  • Developer
  • double
  • *****
  • Posts: 591
    • View Profile
    • My Apps
Re: DeSmuME to Android
« Reply #28 on: June 30, 2012, 03:22:06 PM »
The main game that wont load in the latest version of desmume is warioware diy. (Yes i managed to patch it so that it works). The non-patched version wont boot in anything while the patched one boots in desmume <= 0.9.6
Edit: it also appears spirit tracks wont load in 0.9.7+
« Last Edit: July 27, 2012, 12:47:28 PM by xperia64 »

Offline jumpertwo

  • bit
  • Posts: 8
    • View Profile
Re: DeSmuME to Android
« Reply #29 on: July 01, 2012, 11:00:50 AM »
https://launchpad.net/ubuntu/+source/desmume/0.9.7-2/+build/2961342 [nofollow]
this version is for armhf (hard float processor).i think this means that it's optimized for processors that can take advantage of VPF,NEON and Thumb-2 technology that not every arm architecture have,but that all new smartphones (from 2011) got .i don't know if this is true,i tried to do a research and i only got this document about http://wiki.debian.org/ArmHardFloatPort#Minimum_CPU_.26_FPU [nofollow] maybe we can try and see if this gives you more speed.about the dynarec..that kind of work is out of my league,at least i could help testing (lol) anyway you're doing great so far!
Device: Xperia sk17i
CPU: Qualcomm 1 GHz Scorpion (Snapdragon)
GPU: Adreno 205
RAM: 512 MB
Screen res: 480 ? 320
ROM: stock android 2.3.3 rooted