Author Topic: Rice Plugin Updates  (Read 26838 times)

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Rice Plugin Updates
« Reply #15 on: February 22, 2012, 07:52:04 PM »
Ok, I have PVRTrace.  Working on installing it to my phone now.  I am a tad cautious about using this, because the documentation mentions that egl.cfg must be reverted back to original settings before rebooting, or the device will be unable to boot.  Hopefully the emulator doesn't crash when I do the trace, or I'll have to reflash my phone :-\

So should I do a trace after starting up Mario 64 and walking to where the texture coordinates are wrong? (closest place is the castle entrance, I think)

--EDIT-- Having a little trouble getting it to go.  Step 3 of the installation instructions ("If ?pvrtrace.cfg? does not exist, generate one by running the application to be traced.") does not generate anything.  I tried creating the file manually, but must have done something wrong, because the trace file never gets generated. (also, it doesn't draw any graphics when its tracing, just a white rectangle at the top of the screen.. but not sure if that is normal since I've never used the program before).  Anyway, I'll play around with this some more tomorrow.

pvrtrace.cfg

egl.cfg
« Last Edit: February 23, 2012, 08:10:19 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 scorpio16v

  • long
  • ***
  • Posts: 203
    • View Profile
Re: Rice Plugin Updates
« Reply #16 on: February 22, 2012, 11:54:05 PM »
I see your description in the shoutbox about hires textures, but I think it confuses a little bit.
First, the folder hires_texture is created in mupen-folder under data/hires_texture. No need to add. In this place, the folder with the game textures must be inserted.

Kris, or you have set the hires option as default. So the app loads the textures automaticaly.
If you don't want to load the texture, you must add an entry in mupen64plus.cfg under [Video-Rice]
Code: [Select]
LoadHiResTextures =False
otherwise , if you hadn't set this option per default, the option to swith hires scan on is.
Code: [Select]
LoadHiResTextures =True
A texture select dialoge would help, if you have more than one texture pack for the same game.

Some glithes are still remain on some games, differs to the hardware, for example background is set in front. Or Missing menue screens.
I'll set up some bug reports on weekend.

Quote
Beautiful screenshot! Would you mind if I add it to the market listing when I post the next update? (probably in a couple days)

Of course, feel free to take it, if you like. Since it is not my artwork, only a screenshot, all my work was to shake my phone to activate the screenshot app.   ;D

The texture pack is called RiSiO's Retro Mario Beta.
You can get it on Emutalk or Emulation64.com
http://www.emutalk.net/threads/30498-RiSiO-s-Retro-Mario-Sixty-Four
http://www.emulation64.com/files/info/978/super-mario-64-retro-by-risio.html/

Another textures related site:

http://textures.emulation64.com/
« Last Edit: February 23, 2012, 11:35:59 AM by scorpio16v »

Offline Kris

  • Developer
  • int
  • *****
  • Posts: 91
    • View Profile
Re: Rice Plugin Updates
« Reply #17 on: February 23, 2012, 09:18:14 AM »
So should I do a trace after starting up Mario 64 and walking to where the texture coordinates are wrong? (closest place is the castle entrance, I think)

Yeah anywhere the bug occurs should be ok. I usually save at the point with the issue and then do a dump so I can compare them.

Hi-res texture loading is enabled by default as scorpio16v mentioned.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Rice Plugin Updates
« Reply #18 on: February 23, 2012, 08:51:34 PM »
I've exhausted about everything I can think of to get PVRTrace to actually save the trace file.  Google isn't helpful (all I can find are suggestions to make sure the app has permission to write to the sdcard, which it does, or to try saving the trace file to /data/data/[packagename], which I've also tried).  I've also made sure the problem wasn't Microsofts screwy way of saving text files (since I don't have my Linux partition back up yet), but no luck.  I'm going to post a question on the forums to see if anyone can help, but in the mean time it doesn't look like I'll be able to get the traces.
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: Rice Plugin Updates
« Reply #19 on: February 24, 2012, 12:44:10 PM »
Has someone experience with texture dumping ?
If I set in mupen64plus.cfg the option

Code: [Select]
DumpTexturesToFiles =1
A folder is set under mupen*/data/texture_dump/name_of_game/*
with a folder of the games's name and some subfolders. But the subfolders are all empty ?
Is this option simply not complete or are some further settings needed ?


Offline Kris

  • Developer
  • int
  • *****
  • Posts: 91
    • View Profile
Re: Rice Plugin Updates
« Reply #20 on: February 24, 2012, 02:39:53 PM »
The setup for pvrtrace seems a bit involved, has it been determined what devices are affected yet? If it happens to every device I would be inclined to think it was a build related issue again.

I didn't look at texture dumping as I think that is better being done with a pc emulator. A quick look lead me to think it should be ok, you may need to use a title which you aren't already using enhanced textures with.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Rice Plugin Updates
« Reply #21 on: February 24, 2012, 03:21:59 PM »
Ok, I got PVRTrace to generate a trace finally.  I can't run the analyzer yet until I get my other hardrives set up, though, so not sure if it has anything useful in it:

Trace File

I know the smearing isn't on every device, I will get a list for you.

--EDIT-- Test results from various devices here.  I'm also going to play around with the config settings to see if there is anything there.
« Last Edit: February 24, 2012, 04:36:05 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 Kris

  • Developer
  • int
  • *****
  • Posts: 91
    • View Profile
Re: Rice Plugin Updates
« Reply #22 on: February 24, 2012, 05:15:50 PM »
I think the device info may end up being more valuable than the trace, it seems to be limited to powervr which I guess is convenient as you can test it yourself.  :D

Are there any error messages printed? If you compile with OPENGL_DEBUG the code should check for errors after most gl calls and they are printed like "OpenGL Error code ... "

The other thing to check is the texture coordinates themselves:
In OGLFragmentShaders.cpp line 85
Replace
Code: [Select]
"#ifdef NEED_TEX0                                  \n"\
"vec4 t0 = texture2D(uTex0,vTexCoord0);                     \n"\
"#endif                                  \n"\
with
Code: [Select]
"#ifdef NEED_TEX0                                  \n"\
"vec4 t0 = vec4(vTexCoord0.xy,0.0,1.0); //texture2D(uTex0,vTexCoord0);                     \n"\
"#endif                                  \n"\

This will draw the texture coordinates as a colour instead of the actual texture, heres an shot with coordinates that are working ok.


Just had an idea and it's worth a shot on lines 42 and 77 try "varying mediump vec2    vTexCoord0;" or highp instead of lowp. Just installed the powervr sdk and will have a look soon at the trace and see if their emulator has the same issue. Thanks for the assistance in tracking this down.

Edit:Opening the trace just gave me an empty window, don't know if the trace is empty or the app is no good.
« Last Edit: February 24, 2012, 05:23:09 PM by Kris »

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Rice Plugin Updates
« Reply #23 on: February 24, 2012, 05:37:17 PM »
Ok, I'll give those a try and see what I get.  As for PVRTrace, I'll be able to more easily figure out if there's something wrong with the installation once I can run the analyzer when my computer is back up (hopefully I get the adapters I ordered soon).
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 Kris

  • Developer
  • int
  • *****
  • Posts: 91
    • View Profile
Re: Rice Plugin Updates
« Reply #24 on: February 27, 2012, 04:58:27 PM »
Just out of curiosity I tried the PowerVR emulator, it didn't have the smearing bug.

Offline scorpio16v

  • long
  • ***
  • Posts: 203
    • View Profile
« Last Edit: March 03, 2012, 11:41:38 PM by scorpio16v »

Offline Kris

  • Developer
  • int
  • *****
  • Posts: 91
    • View Profile
Re: Rice Plugin Updates
« Reply #26 on: March 04, 2012, 12:57:44 AM »
Thanks for the pointer scorpio16v. That code is from a different n64oid that was never completed. I have replied to the post you linked to.

I did have a version running on es 1 early on that I guess would be similar. I ended up porting to es 2 as my menu uses open gl and you need to choose v1 or 2 before you create the context. If I could have, separating the game and menu could have been simpler but the WebOS docs are poor and it might not even be possible. I didn't want multiple separate executables.

Targetting es1 requires a lot less changes and you would avoid some of the bugs earlier versions had. I'd expect the framebuffer issues and flickering in some games to remain unless they were especially targeted. Es 2 does offer more for future enhancements.

Offline Kris

  • Developer
  • int
  • *****
  • Posts: 91
    • View Profile
Re: Rice Plugin Updates
« Reply #27 on: May 27, 2012, 07:35:27 PM »
CatalystG reported that changing to highp coordinates fixed the issue on PowerVR.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Rice Plugin Updates
« Reply #28 on: May 28, 2012, 03:03:36 PM »
Sorry for being ignorant on the terminology, but where would I change in the code for highp coordinates?  Is this the same as the higher precision depth buffer you mentioned for the missing shadows?
« Last Edit: May 28, 2012, 03:06:38 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 Kris

  • Developer
  • int
  • *****
  • Posts: 91
    • View Profile
Re: Rice Plugin Updates
« Reply #29 on: May 28, 2012, 11:06:43 PM »
Sorry for being ignorant on the terminology, but where would I change in the code for highp coordinates?  Is this the same as the higher precision depth buffer you mentioned for the missing shadows?
The fix for powervr was the suggestion at the end of my older message.

In OGLFragmentShaders.cpp
Just had an idea and it's worth a shot on lines 42 and 77 try "varying mediump vec2    vTexCoord0;" or highp instead of lowp.
I don't know if medium works but it was reported high fixed the issue.

This changes the precision of the shader attributes. Other gpus probably just ignore low and always set medium or high. It is unrelated to the depth buffer precision which needs to be set when you first initialize the graphics.