Hacking Investigating a potential bug with gamesd.skprx

tiduscrying

that butt...
OP
Member
Joined
Jun 12, 2012
Messages
509
Trophies
1
Location
HELL
Website
tiduscrying.wordpress.com
XP
2,491
Country
United States
Hi everyone!

I just successfully made myself 5 SD2Vita adapters (borked one by not properly soldering and not using flux) and went through the usual install process. Everything is working decently (I almost lost some save data due to my own negligence, but that's neither here nor there), but I have noticed some odd behavior while using my adapter and have since posted a thread on /r/vitahacks seeing if anyone else had the same or similar issues. From that thread, I have found out some interesting information about the SD2Vita adapters and more specifically the gamesd.skprx plugin itself.

To summarize the thread on /r/vitahacks, my vita has been acting a bit weird. On occasion, my vita will randomly spring to life out of suspend mode. It doesn't unlock itself, but the LEDs blink (I have a Vita 1000), the screen comes on and then sits there for a couple seconds before abruptly going back into suspend mode. This will happen repeatedly throughout the day and as another user commented, can drain the battery pretty quickly. I also ran into the classic "not being able to save" issue that people reported with older versions of Henkaku where after the system is in sleep/suspend mode for awhile with a game running, getting back into the game causes save issues (I was playing Dungeon Travelers 2 and I could technically save, there were no error codes, but whenever I went back to save again the slots were all empty; upon restarting the game, my save data was there, but it was old data from an earlier session). I originally thought that the weird behavior was due to another plugin, Shellbat, which displays the battery percentage in the status bar. It made a little sense to me since it maybe had to check the status of the system and was therefore waking it up unintentionally. However, I have since deemed that shellbat is not the culprit and that it is likely the gamesd.skprx plugin causing my issues due to some other user accounts from the thread.

One user in particular summed up what they think is happening in a pretty elegant way:
It's SD2Vita. No doubt in my mind. There have been threads like this before, and mine does that too. It's the only plugin I use.

If I had to guess, the system has to reinitialize the card every now and then to keep track of it. The reason I make that guess is the old savedata issue everyone used to have when keeping their systems suspended; meaning the system fucks up somehow if it "loses track" of the memory card. I'd think it's the gamecard slot reminding the vita "HEY I'M STILL HERE FAM".

This is just a guess, but it makes sense to me.

Now that brings me to the reason of this thread in particular. I am trying to hunt down the actual source for the gamesd.skprx since it is very apparent that multiple versions are floating around the net (some with support for mounting the Vita memory card as uma0, some without, and some with other functions) so I can submit a bug report, but I can't seem to find much on github or with basic google-fu. I found the first board revision and a version of the plugin by xyzz on github, but I am not sure if this is the plugin everyone is using or not. I don't know which plugin @Modsiah has been using for their tutorials, nor do I know which plugin is being used in the multiple "easyinstallers" such as SwitchSD2Vita and gamesd.skprx installer (which I personally used). If there are differences in each variation of the plugin, perhaps they could be what is causing the wakeup issue? Or maybe it is an issue with all versions of the plugin? I am not sure...

That being said though, I would also like to make a feature request/recommendation to wherever the original plugin is as well. I personally am not ditching all of my cart based games altogether, so I think it would be neat if the plugin could be toggled each time on boot by holding a button (furthermore, each "mode" of the plugin could be toggled by a different button press, such as holding X to unmount it completely or holding O to mount it to uma0). It would also be cool if there was a homebrew to move contents from ux0 to uma0 similar to how there is a homebrew to move contents from ux0 to ur0. Of course, this is just me thinking out loud. The main goal here is to try to see if anyone here has been experiencing the same wakeup issue and to see if we can try to get a bug report submitted and get the issue resolved!
 
  • Like
Reactions: cvskid

Tony_93

Well-Known Member
Member
Joined
Jun 13, 2015
Messages
2,457
Trophies
1
Location
California
XP
2,436
Country
United States
I also ran into the classic "not being able to save" issue that people reported with older versions of Henkaku where after the system is in sleep/suspend mode for awhile with a game running, getting back into the game causes save issues (I was playing Dungeon Travelers 2 and I could technically save, there were no error codes, but whenever I went back to save again the slots were all empty; upon restarting the game, my save data was there, but it was old data from an earlier session).

This is definitely not related to SD2Vita, it happened to me twice this month using an official memory card while playing a dumped version of Attack on Titan.

It pissed me off because I lost like 8 hours of progress in one of those 2 ocasions (game uses autosave but there was never an error message or anything "while it autosaved"), but before closing the game to launch anotherone I would always make a manual save and found out the bug had been happening for 2 whole days...

So now I make sure to close any games before putting the system to sleep... Even legit oned lol

--------------------- MERGED ---------------------------

I also ran into the classic "not being able to save" issue that people reported with older versions of Henkaku where after the system is in sleep/suspend mode for awhile with a game running, getting back into the game causes save issues (I was playing Dungeon Travelers 2 and I could technically save, there were no error codes, but whenever I went back to save again the slots were all empty; upon restarting the game, my save data was there, but it was old data from an earlier session).

This is definitely not related to SD2Vita, it happened to me twice this month using an official memory card while playing a dumped version of Attack on Titan.

It pissed me off because I lost like 8 hours of progress in one of those 2 ocasions (game uses autosave but there was never an error message or anything while it autosaved), but before closing the game I would always make a manual save and found out the bug had been happening for the whole day....

So now I make sure to close any games before putting the system to sleep... Even legit games lol
 

tiduscrying

that butt...
OP
Member
Joined
Jun 12, 2012
Messages
509
Trophies
1
Location
HELL
Website
tiduscrying.wordpress.com
XP
2,491
Country
United States
This is definitely not related to SD2Vita, it happened to me twice this month using an official memory card while playing a dumped version of Attack on Titan.

It pissed me off because I lost like 8 hours of progress in one of those 2 ocasions (game uses autosave but there was never an error message or anything "while it autosaved"), but before closing the game to launch anotherone I would always make a manual save and found out the bug had been happening for 2 whole days...

So now I make sure to close any games before putting the system to sleep... Even legit oned lol

--------------------- MERGED ---------------------------



This is definitely not related to SD2Vita, it happened to me twice this month using an official memory card while playing a dumped version of Attack on Titan.

It pissed me off because I lost like 8 hours of progress in one of those 2 ocasions (game uses autosave but there was never an error message or anything while it autosaved), but before closing the game I would always make a manual save and found out the bug had been happening for the whole day....

So now I make sure to close any games before putting the system to sleep... Even legit games lol
That is very interesting. Has it only been happening ever since Enso was released? Or did it happen before then too? Was it in a MaiDump game or a Vitamin game?
 

Tony_93

Well-Known Member
Member
Joined
Jun 13, 2015
Messages
2,457
Trophies
1
Location
California
XP
2,436
Country
United States
That is very interesting. Has it only been happening ever since Enso was released? Or did it happen before then too? Was it in a MaiDump game or a Vitamin game?

It was a vitamin game, I think it was dumped using 1.0 or 1.1 since it was dumped shortly after the first official vitamin release.

I just checked my PSN profile and I got the last trophy for the game on July 26th, Enso was not released yet (that was the day the second save bug happen).

I never had the save issue before, but then again, that is the only game I have played from beginning to end using a dump.

I have installed others vpk out of curiosity but haven't played them longer than 15 - 30 mins each.
 

tiduscrying

that butt...
OP
Member
Joined
Jun 12, 2012
Messages
509
Trophies
1
Location
HELL
Website
tiduscrying.wordpress.com
XP
2,491
Country
United States
It was a vitamin game, I think it was dumped using 1.0 or 1.1 since it was dumped shortly after the first official vitamin release.

I just checked my PSN profile and I got the last trophy for the game on July 26th, Enso was not released yet (that was the day the second save bug happen).

I never had the save issue before, but then again, that is the only game I have played from beginning to end using a dump.

I have installed others vpk out of curiosity but haven't played them longer than 15 - 30 mins each.
Hmm. The game I was playing was dumped by Vitamin 2.0 I believe, so maybe it is an issue with some Vitamin dumps and not Enso then. Have you ever attempted the save data fix that was useful for some users back in the day (taken from here)?
- Delete everything inside "ux0:user/00/savedata_backup"
- Replace "ux0:user/00/savedata_backup/list.dat" by a folder with the same name
 

Dark Ronin

Well-Known Member
Member
Joined
Oct 5, 2015
Messages
334
Trophies
0
XP
1,212
Country
Russia
Hey. Any dumped game behave like that. Suspend your vita for the couple of hours and kiss goodbye your unsaved progress. It's henkaku-related issue from the very begining, and I recall some efforts from Yifanlu to overcome this bug. Back that days it happens even if you suspend vita in livearea with no game launched - it just would throw you an error upon opening one after you wake console up, so you gotta reboot.
So no worries. Just live with it.
 

tiduscrying

that butt...
OP
Member
Joined
Jun 12, 2012
Messages
509
Trophies
1
Location
HELL
Website
tiduscrying.wordpress.com
XP
2,491
Country
United States
Alright, so I posted an issue to xyzz's github page for the plugin/driver since that seems to be the only source for it. It seems that a temporary fix is to enable airplane mode. Here is why, according to xyzz themself:
I think what happens is that vita wakes up sometimes to check PSN updates, etc (with the screen turned off.)

However, due to my hook executed in resume which pokes gamecard slot to ensure it's mounted, the whole system wakes up. It probably could be fixed by reversing how the system mounts normal game card on wakeup. I don't have time to do that anytime soon, sadly.
 

tiduscrying

that butt...
OP
Member
Joined
Jun 12, 2012
Messages
509
Trophies
1
Location
HELL
Website
tiduscrying.wordpress.com
XP
2,491
Country
United States
Hmm. Xyzz just said this about the bug:
I see, that's unfortunate. You can test the theory however by disabling suspend_callback. If it does not work, then I'm not sure what could cause that. If it does work, that's great, microsd won't be mounted after wakeup so a different way to activate it would be needed (right now it simulates removal and reinsertion of game card).

That's something I don't quite know how to do. The driver is coded in C, and I don't know much coding at all, let alone C. If anyone else with the know how would like to take a look, here is the bug report and here is the source for the driver. Until someone or xyzz has the time to possibly fix it, it looks like something we might have to deal with for now.
 

Zukov

Dinosaur
Member
Joined
Oct 2, 2016
Messages
324
Trophies
0
Age
38
XP
908
Country
Chile
Hey. Any dumped game behave like that. Suspend your vita for the couple of hours and kiss goodbye your unsaved progress. It's henkaku-related issue from the very begining, and I recall some efforts from Yifanlu to overcome this bug. Back that days it happens even if you suspend vita in livearea with no game launched - it just would throw you an error upon opening one after you wake console up, so you gotta reboot.
So no worries. Just live with it.
Yifan Lu told us that this is not a Henkaku related bug, so please do not lie.
It was tested and hacked/fixed a year ago with the method quoted by Tiduscrying
 
Last edited by Zukov,

Tony_93

Well-Known Member
Member
Joined
Jun 13, 2015
Messages
2,457
Trophies
1
Location
California
XP
2,436
Country
United States
Yifan Lu told us that this is not a Henkaku related bug, so please do not lie.
It was tested and hacked/fixed a year ago with the method quoted by Tiduscrying

So do you have an explanation on what exactly causes the bug? And if it has been fixedover a year ago, why does it still happen to some users ocassionally? You seem quick to point fingers at people and call them liers so we should expect you to provide answers....
 
Last edited by Tony_93,

riddle43

Well-Known Member
Member
Joined
Nov 21, 2008
Messages
381
Trophies
1
Age
46
Location
Mich USA
XP
438
Country
United States
The bug is caused by a combo of dumps and plug ins (the cheat one is a big trouble maker). I have been running most hacks since they started and this issue only started when the dumps started to come out and got worse with the cheat plug in, but just dont leave your system on stand by for longer then a half an hour to avoid this mostly also clean up your plug ins if your not using them : { )
 

Sofes

Well-Known Member
Newcomer
Joined
Jul 18, 2016
Messages
50
Trophies
0
Age
42
XP
278
Country
India
Hmm. The game I was playing was dumped by Vitamin 2.0 I believe, so maybe it is an issue with some Vitamin dumps and not Enso then. Have you ever attempted the save data fix that was useful for some users back in the day (taken from here)?
- Delete everything inside "ux0:user/00/savedata_backup"
- Replace "ux0:user/00/savedata_backup/list.dat" by a folder with the same name

I have the same issue too, and no, the delete and replace savedata method doesn't work.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Arne214 @ Arne214: ah ok