Author Topic: Is it possible to port future OpenGL pluging from FPSe ?  (Read 12447 times)

Offline scorpio16v

  • long
  • ***
  • Posts: 203
    • View Profile
Is it possible to port future OpenGL pluging from FPSe ?
« on: January 08, 2012, 10:02:23 AM »
As I read through the internet because the graphic problems with mali400, I read a post from schtruck, one of the FPSE authors, that he ported an OpenGl driver th Android and he' wants to release the source, if it's ready.
Can it be ported to mupen64plus ?
Quote
Somes good news,

While waiting for LDchen's work delivery which will make compatibility growing up another time, i was working on OpenGL plugin.

My work has well progressed, and actually i can say that it run very well. Enoughtly fast and if not the automatic frameskipping does its job. Graphically, even on my Asus Transformer (10") it's very impressive. Actually Tegra2 gives the best result in term of speed and in 1280x720 (incredible) , but Adreno 205 run very well too (most of all games are full speed without frameskipping) . On Mali400 there is actually a problem i have to fix. I haven't tried on SGX540, but i think speed will be between Tegra2 and Adreno 205.

It stay now to implement onscreen button and all will be OK.

FPse support by default Software plugin as currently, and support the load of external OpenGL plugin . OpenGL plugin will be provided freely on http://www.fpsece.net and source will be downloadable because we aren't authors but just porters and optimizers ....

http://fpsece.net/forum2/viewtopic.php?f=38&t=2034&p=24625&hilit=mali400&sid=3793cfd11ee1bef6ed25b7b54436a5be#p24625

He has even problems with mali400.  :(


Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Is it possible to port future OpenGL pluging from FPSe ?
« Reply #1 on: January 08, 2012, 10:44:35 AM »
To be honest, I have no idea if an FPSe video plug-in can be ported to Mupen64Plus or not.  I've never actually looked at the source code for one.

I'm not having much luck finding any source to look at to see how close they are.  When I click on "Quick Download, Get latest version of FPSe to start to play with emulator.", it takes me to a page titled "There is also a supporter-version", and when I scroll down to Android, it just says "Need go to Market place to become supporter and request latest version."  It looks to me like this is a purely commercial product at the moment (at least as far as Android is concerned), and it it is closed-source.   Since he said he is going to release the source code, I assume he just hasn't finished the plug-in yet.  I'll check back there periodically (let me know if you are aware of the code being posted somewhere now that I may have just missed).
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 scorpio16v

  • long
  • ***
  • Posts: 203
    • View Profile
Re: Is it possible to port future OpenGL pluging from FPSe ?
« Reply #2 on: January 08, 2012, 10:55:33 AM »
No, the plugin isn't ready at this time.
Sorry, if my thoughts sounds stupid most times.  :D But I see the things from the inexperienced user side, not as a developer.

My thoughts came up, as I read that Ari's dynarec is used on psx emulator and mupen64plus.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Is it possible to port future OpenGL pluging from FPSe ?
« Reply #3 on: January 08, 2012, 11:33:51 AM »
Both the N64 and PlayStation had MIPS CPUs (although the N64 CPU was a more advance model).  Based on what I've read on the technical specifications, though, the systems had very different hardware (memory, graphics, etc), so my initial thought is that the plug-ins for their respective emulators will also be very different.  That being said, I wouldn't have thought Ari64's dynarec could be ported to from an N64 emulator to a PlayStation emulator, because it looks like the instruction sets for the CPUs are different as well - the N64 used the MIPS III instruction set, and PlayStation used MIPS I.  Just shows how little I know about emulating a CPU (maybe MIPS III was backwards compatible with MIPS I which made porting the dynarec possible?)  So I could be wrong about the video plug-in as well (I'll have to look at the code and do some comparisons to see).
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 Epic_bubble

  • long
  • ***
  • Posts: 235
    • View Profile
Re: Is it possible to port future OpenGL pluging from FPSe ?
« Reply #4 on: January 08, 2012, 11:34:35 AM »
I cant wait until shtruck releases the openGL plugin, atm ps1 games on android are limited the the PS1's screen res which makes them look really pixelated. I wish sony would use opengl for their PS1 emulator on the PS3, PS1 games actually look worse on the PS3 than they did on the PS1 somehow.
Device: Xperia play
CPU: Qualcomm 1 GHz Scorpion (Snapdragon)
GPU: Adreno 205
RAM: 512 MB
Screen res: 854 ? 480
ROM: stock android 2.3.4 rooted

Offline scorpio16v

  • long
  • ***
  • Posts: 203
    • View Profile
Re: Is it possible to port future OpenGL pluging from FPSe ?
« Reply #5 on: January 08, 2012, 12:13:09 PM »
About Ari's dynarec. Do you use v 20110615 or a newer/older one ?
I ask, because this version has several bugfixes and performance optimizations.

I'm sure, you've said it before in one of the old threads. But since you've updated the boardsoftware...
(can't compare the source myself, because my android tablet can't open your 7z packed source)

Quote
Changes since 20110128:

- Expand cache size for MIPS code (performance)

- Avoid unnecessary saving/restoring of registers (performance)

- Fix some inefficiencies in the liveness analysis (performance)

- Fix problem with 64-bit registers in delay slots (bug)

- Fix problem with hoisting loads out of loops where the loop immediately follows a call/return (bug)

- Fix incorrect clearing of dirty flag when reallocating registers (bug)

- Fix stack alignment on x86 (bug)

- Make compilation of OpenGL parts (on-screen display) optional

http://www.gp32x.com/board/index.php?/topic/49358-mupen64plus/page__st__690__p__938040&#entry938040

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Is it possible to port future OpenGL pluging from FPSe ?
« Reply #6 on: January 08, 2012, 12:28:02 PM »
Yes, I am using the 15 June 2011 version.  I have been checking back on the GP32X forum periodically in case he posts another update, but I haven't seen one newer than that.
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 scorpio16v

  • long
  • ***
  • Posts: 203
    • View Profile
Re: Is it possible to port future OpenGL pluging from FPSe ?
« Reply #7 on: January 08, 2012, 12:41:51 PM »
yes, I'm currently reading the thread on emutalk.

Found an old hint from Ari about games like Majora,s Mask
Quote
A few of the larger games (and Majora's Mask in particular) use a lot of memory and some parts will be recompiled frequently if you use a 16M cache. For these games it can be advantageous to increase the dynarec cache size, even if it puts you slightly beyond the 32M branch limit. You can experiment with that after you get audio and video working.

Sorry for spaming old quotes. Just for the case you forgot it.  ;)

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Is it possible to port future OpenGL pluging from FPSe ?
« Reply #8 on: January 08, 2012, 01:05:20 PM »
I currently have it at 32 MB:

linkage_arm.S:
Code: [Select]
.bss
.align 12
.type extra_memory, %object
.size extra_memory, 33554432
extra_memory:
.space 33554432+64+16+16+8+8+8+8+256+8+8+128+128+128+16+8+132+4+256+512+4194304
dynarec_local = extra_memory + 33554432

..... etc
assem_arm.h:
Code: [Select]
extern char extra_memory[33554432];

//#define BASE_ADDR 0x6000000 // Code generator target address
#define BASE_ADDR ((int)(&extra_memory))
//#define TARGET_SIZE_2 24 // 2^24 = 16 megabytes
#define TARGET_SIZE_2 25 // 2^25 = 32 megabytes

I'm not sure if that %1 performance improvement Ari64 mentioned would be worth doing a separate core build with only 16MB, for games that don't need as much memory (I may do one at some point for folks to try).  It seems like a very negligible improvement and probably unnoticeable, so I think using 32MB is probably the smartest choice (this is what Ari64, Yongzh, and Kris are using in their ports as well).
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 Epic_bubble

  • long
  • ***
  • Posts: 235
    • View Profile
Re: Is it possible to port future OpenGL pluging from FPSe ?
« Reply #9 on: January 08, 2012, 01:09:49 PM »
Maybe way down the line when there are hardly any other optimisation to be done it could be worth it but for now I would say dont bother. It seems like too much effort for such a little gain.
Device: Xperia play
CPU: Qualcomm 1 GHz Scorpion (Snapdragon)
GPU: Adreno 205
RAM: 512 MB
Screen res: 854 ? 480
ROM: stock android 2.3.4 rooted

Offline Epic_bubble

  • long
  • ***
  • Posts: 235
    • View Profile
Re: Is it possible to port future OpenGL pluging from FPSe ?
« Reply #10 on: January 09, 2012, 10:25:51 AM »
Heres the source code for the openGL plugin: http://perso.numericable.fr/schtruck/peopsgpuopenglforfpsesrc.zip
Device: Xperia play
CPU: Qualcomm 1 GHz Scorpion (Snapdragon)
GPU: Adreno 205
RAM: 512 MB
Screen res: 854 ? 480
ROM: stock android 2.3.4 rooted

Offline scorpio16v

  • long
  • ***
  • Posts: 203
    • View Profile
Re: Is it possible to port future OpenGL pluging from FPSe ?
« Reply #11 on: January 09, 2012, 10:58:50 AM »
Another thought from schtruck is about the color mode, we talked about some time before.
Quote
Another paramterer but on ANdroid side is the Color depth of the rendering buffer, i use RGB565 but many chipset will work far better in RGBA8888.. i could add this option too.

He talked about this setting as an option. Is it possible to give it a try for mupen64plus ? (if it's not to many work )

Some other opinions about color formats on Android

http://stackoverflow.com/questions/5666287/is-it-possible-to-render-in-rgb888-with-opengl


« Last Edit: January 09, 2012, 11:51:30 AM by scorpio16v »

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Is it possible to port future OpenGL pluging from FPSe ?
« Reply #12 on: January 09, 2012, 02:43:07 PM »
It should be easy to add an option, if I can figure out how to get it into RGBA8888 mode in the first place.  This test just defaults back to RGB565 on my Droid X (but maybe an RGBA8888 with depth 16 mode isn't available, I haven't checked).  Could you try it out on one of the devices you know supports RGBA8888 and provide the logcat?

RGBA8888 Test

If that doesn't work, the next step will be to print out the specs of all the available modes and figure out why it isn't being picked (possibly the depth size will need to be changed to 8 or 32 or something to find it).
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 scorpio16v

  • long
  • ***
  • Posts: 203
    • View Profile
Re: Is it possible to port future OpenGL pluging from FPSe ?
« Reply #13 on: January 09, 2012, 03:00:09 PM »
yes, you fixed the color banding problem on sgs 2. it looks much better.

http://db.tt/cJSL7koD

If you need further testing, CU tomorrow.  :)

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Is it possible to port future OpenGL pluging from FPSe ?
« Reply #14 on: January 09, 2012, 03:17:15 PM »
Cool.  The SDLSurface code reported RGB565 in the logcat, so I guess that is separate from the selected GL profile.. I'm not sure.  I haven't tinkered with this code much since September when I was trying to track down the Adreno bug.  I'll have to play around some more to figure out what's going on exactly.  Glad to hear I can fix that banding problem fairly easily though!
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