Author Topic: hi res texture folder keeps getting deleted  (Read 4519 times)

Offline beansta

  • byte
  • *
  • Posts: 29
    • View Profile
hi res texture folder keeps getting deleted
« on: December 04, 2013, 09:31:24 AM »
Like to say great work on the emulator. Only 1 thing that gets a little taxing. Everytime i update my hi res texture folder keeps getting wiped. Might not sound like much but when its nearly 1gb of data (banjo kazooie takes 517 mb by itself) it becomes a bit of an issue.
Devices:
Samsung Galaxy S3 LTE international
rXtreme v14.1 ROM and Perceus v36.2 kernel
1.7ghz Quadcore CPU and 533mhz GPU
1.77 GB useable RAM

Samsung Galaxy Tab 2 10.1 Wifi
Zap Blaster v2.2 ROM and Next v1.41 kernel
1.35ghz Dualcore CPU and 384mhz GPU
1006MB useable RAM


Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: hi res texture folder keeps getting deleted
« Reply #1 on: December 04, 2013, 09:41:13 AM »
Understandably annoying.  If you have the disk space, a short term solution would be to copy the data to another location on your card.  Then after any update that reloads the assets (splash screen shows unpacking) you could just copy the files back to <card>/Android/data/paulscode..../  As long as you maintain the right directory structure and names, I believe that will avoid the hassle of waiting for mupen to unpack the textures.

@paul As a long term solution, perhaps we should be unpacking the textures to a different location.  Either
 - the cache directory via the Android API (files inaccessible to user, always deleted on uninstall)
 - the <card>/mupen64plus/ directory (files completely accessible, not deleted on uninstall)

Deleting the files on uninstall has pros and cons.  I'd lean towards the second location.

BTW - the files aren't always reloaded after every update.  Some updates don't touch the files.
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: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: hi res texture folder keeps getting deleted
« Reply #2 on: December 04, 2013, 10:05:26 AM »
I'm for moving it to the mupen64plus/ directory as well (so multiple builds can share the texture packs, for example).  It would probably just require modifying the paths in that file you worked on recently for the Rice broken texture packs bug (as long as the hard-coded path isn't shared by anything else in the core -- sounds like not, since the only thing that broke was the texture packs when it was originally changed to match upstream).
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: hi res texture folder keeps getting deleted
« Reply #3 on: December 04, 2013, 10:57:10 AM »
Excellent point about sharing between builds.

Requires a different solution though between the master and 2.4-bugfixes branch.

On master, a few lines of code
 - add another string parameter to NativeExports.java method emuStart(.)
 - update the method in ae_exports.cpp to use the new path, line 162

On 2.4-bugfixes, many lines of code
 - create a new jni method in ae_imports.cpp and CoreInterfaceNative.java to obtain this new directory
 - call the method from jni/front-end/src/main.c, line 659.

If it's not urgent, I suggest we only implement this on master.
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: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: hi res texture folder keeps getting deleted
« Reply #4 on: December 04, 2013, 11:02:31 AM »
Agreed, since there are not likely to be any more updates that change the resources until 3.0.0 (any other 2.4.x releases would likely only be urgent bugfixes)
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 beansta

  • byte
  • *
  • Posts: 29
    • View Profile
Re: hi res texture folder keeps getting deleted
« Reply #5 on: December 04, 2013, 11:24:19 AM »
I have the spare disk space so Ill do what was mentioned for now. Keep up the good work.
Devices:
Samsung Galaxy S3 LTE international
rXtreme v14.1 ROM and Perceus v36.2 kernel
1.7ghz Quadcore CPU and 533mhz GPU
1.77 GB useable RAM

Samsung Galaxy Tab 2 10.1 Wifi
Zap Blaster v2.2 ROM and Next v1.41 kernel
1.35ghz Dualcore CPU and 384mhz GPU
1006MB useable RAM


Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: hi res texture folder keeps getting deleted
« Reply #6 on: December 04, 2013, 09:42:43 PM »
Just implemented the change on the master branch.  Will be in the next major release.
https://github.com/paulscode/mupen64plus-ae/commit/37e32b21c2c12e13345e1f16e412c17a72f66cd6
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: hi res texture folder keeps getting deleted
« Reply #7 on: December 04, 2013, 09:53:47 PM »
@Paul Got me thinking.  What do you think about moving the mupen64plus.cfg file to the user-controlled directory as well?  That way any superusers who make manual changes to the config file won't lose them.  If someone ever borks the file, they can just delete it and the superuser settings will just revert back to the defaults.
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: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: hi res texture folder keeps getting deleted
« Reply #8 on: December 05, 2013, 06:07:54 AM »
That's actually a good idea too.
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: hi res texture folder keeps getting deleted
« Reply #9 on: December 05, 2013, 06:23:18 AM »
Ok, I pushed that too.  I reorganized the assets folder a bit to better mirror the data structure on the upstream platforms.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version