Author Topic: 3.0 Alpha Testing  (Read 295493 times)

Offline retroben

  • float
  • ****
  • Posts: 432
    • View Profile
Re: 3.0 Alpha Testing
« Reply #15 on: December 07, 2014, 09:04:04 AM »
Why am I the only one without any crashing in that scenario?
All of my files are in the .z64 file extension and the cover art is downloaded.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3.0 Alpha Testing
« Reply #16 on: December 07, 2014, 09:04:46 AM »
This is the current logic for dealing with a rom that's not in the list:
https://github.com/mupen64plus-ae/mupen64plus-ae/blob/4f373fa529fdf4f9538010c585bbf05d9b8ba423/src/paulscode/android/mupen64plusae/PlayMenuActivity.java#L131

This looks to fallback to looking up by CRC.  https://github.com/mupen64plus-ae/mupen64plus-ae/blob/4f373fa529fdf4f9538010c585bbf05d9b8ba423/src/paulscode/android/mupen64plusae/PlayMenuActivity.java#L136

So in the case of the particularly formatted ROMs, does the CRC also get loaded wrong?  I'll have to investigate this more closely I guess to understand the problem better.

--EDIT-- Also, it correctly loads the cover art for the two ROMs in question, so at some point the logic does recognize it.
« Last Edit: December 07, 2014, 09:06:57 AM 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 retroben

  • float
  • ****
  • Posts: 432
    • View Profile
Re: 3.0 Alpha Testing
« Reply #17 on: December 07, 2014, 09:10:06 AM »
Just found that a romhack with capatilized "Z64" on the extension fails to open when touched.
Not sure if the romhack is the issue or if it is the file format casing.

Edit:It must be a CRC issue because none of my romhacks open their settings. :(
Has anyone tried renaming a game that opens,to a higher case Z64,V64,or N64 respectively on the extension?
How about if yours are already like that,try changing them to lower case extensions.
« Last Edit: December 07, 2014, 09:15:25 AM by retroben »

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3.0 Alpha Testing
« Reply #18 on: December 07, 2014, 09:12:19 AM »
That leads me to believe that somewhere in the logic, a string compare is being done against the extension (versus determining the format based on the header data).  I'll see if changing the extension of my problem ROMs has any affect (I'm pretty sure the .n64 extension is wrong -- changed it way back when the app was in its infancy and I had to hard-code the filename)
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 retroben

  • float
  • ****
  • Posts: 432
    • View Profile
Re: 3.0 Alpha Testing
« Reply #19 on: December 07, 2014, 09:16:53 AM »
The accepted formats are n64,v64,and the most widely used z64 format.
I edited my previous post.

Edit:If it matters,the other versions load all my romhacks just fine because it must be ignoring their improper CRCs
Edit2:...and/or MD5 as well probably.

It is a bad method for romhack enthusiasts like myself.
« Last Edit: December 07, 2014, 09:25:16 AM by retroben »

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: 3.0 Alpha Testing
« Reply #20 on: December 07, 2014, 09:18:52 AM »
Logcats?

As I pointed to in the code, here's what currently happens
 - Tries to lookup by MD5
 - If it fails, it looks up by CRC, which can produce 0, 1, or many matches
 - If it finds many matches, it just selects the first (in the future will popup to give user choice)
 - If it finds no matches, it parses the filename to guess goodname and art path
    - that's why unknown roms can still show cover art; the rom filename alone contains enough information
    - if this last fallback is used, the gallery displays the filename (with extension) rather than the true "good name"
    - i.e. you can tell by inspection in the gallery activity which roms are unknown to the core
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3.0 Alpha Testing
« Reply #21 on: December 07, 2014, 09:22:53 AM »
Thanks, confirmed that extension has nothing to do with the logic (just to put that to rest).  Changed the filename to all possible extensions, and also changed some of the working ones.  Working ones still worked, and the other two still don't open.  All three formats are supported, so it is not related to one of the three formats not being supported either.

So I understand the logic path there.. CRC can produce many matches to MD5.  But it is CRC that should be unique to the game, correct? (for things like cheats, etc).  Guess I'm still lacking the last piece of the puzzle -- what specifically in the process causes it to not open anything when you press the game (is it assuming I must have a specific MD5 match?)
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 littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: 3.0 Alpha Testing
« Reply #22 on: December 07, 2014, 09:25:05 AM »
Look At The Logcats!  I put stuff in there for a reason.  We could have avoided this long-winded discussion
Code: [Select]
12-07 10:23:56.949: E/GalleryActivity(23882): No ROM detail available
« Last Edit: December 07, 2014, 09:32:50 AM by littleguy »
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3.0 Alpha Testing
« Reply #23 on: December 07, 2014, 09:27:50 AM »
Sorry, I am just trying to understand the process.  A logcat message like that makes assumptions that I understand why no ROM data available prevents the menu from opening.  I'll just look at the code, no need to continue the conversation (this is mainly due to my being out of the loop for several months.. I'm sure this is old news for you and xperia)
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 littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: 3.0 Alpha Testing
« Reply #24 on: December 07, 2014, 09:33:00 AM »
The master dictionary used by the core is mupen64plus.ini.  MD5 is guaranteed to be unique to a ROM, so it is used as the unique identifying key.  Multiple entries in the dictionary can have the same CRC (just look at the entries for some popular roms).  I.e. different quality rips of the same game.  When the app loads, it loads the game data into a java dictionary object, keyed by md5.  It also constructs a second dictionary, keyed by CRC.  The second dictionary's elements are themselves lists (i.e. one crc keys to a list of candidate roms).  Then RomDetail.java uses those dictionaries when the GalleryActivity queries them.

There's only one place where the file extension matters, and that's before the gallery is refreshed.  It uses a non-case-sensitive filter to locate potential roms on the user's disk.  After that it uses only the RomDetail and RomHeader class to get all rom meta-info.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline retroben

  • float
  • ****
  • Posts: 432
    • View Profile
Re: 3.0 Alpha Testing
« Reply #25 on: December 07, 2014, 09:36:59 AM »
For problem games and romhacks to load,it needs to be forced to unknown and the filename instead of completely refusing to load them at all.

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: 3.0 Alpha Testing
« Reply #26 on: December 07, 2014, 09:38:41 AM »
I found the problem.  It's a refactoring bug.  I'll push a fix soon.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3.0 Alpha Testing
« Reply #27 on: December 07, 2014, 09:39:20 AM »
When the app loads, it loads the game data into a java dictionary object, keyed by md5.  It also constructs a second dictionary, keyed by CRC.  The second dictionary's elements are themselves lists (i.e. one crc keys to a list of candidate roms).  Then RomDetail.java uses those dictionaries when the GalleryActivity queries them.

Ok, so if I understand this correctly, in the case where a game does not load, then the second dictionary found no matches by CRC?
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 Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3.0 Alpha Testing
« Reply #28 on: December 07, 2014, 09:45:48 AM »
I found the problem.  It's a refactoring bug.  I'll push a fix soon.

Oh, cool..  I was all geared up to argue when you answered "yes" to my previous question.  Feeling ornery today  ;D
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 Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3.0 Alpha Testing
« Reply #29 on: December 07, 2014, 10:03:55 AM »
For problem games and romhacks to load,it needs to be forced to unknown and the filename instead of completely refusing to load them at all.

In the case where MD5 and CRC were not recognized, I would agree with that.  In the case where there are multiple MD5s for the CRC, I would default to the "refMD5" (I think that is unique, but will have to analyze the ini data to verify) and then we give them a menu for changing it if they like.  I'll take this on, unless someone else already has started on something similar.
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