Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Akaya Akashiya Ayakashi" umd switch #9245

Merged
merged 6 commits into from
Jan 29, 2017
Merged

Conversation

sum2012
Copy link
Collaborator

@sum2012 sum2012 commented Jan 28, 2017

Also,make "switch umd" menu enable faster,
fix #9110
modify log:
https://gist.github.com/sum2012/e9557e6879f43361582e6810d0ba79e7

Also,make "switch umd" menu enable faster,
@sum2012
Copy link
Collaborator Author

sum2012 commented Jan 28, 2017

I forgot said.
Happy new Chinese new year

@hrydgard
Copy link
Owner

Oh yeah. Happy year of the rooster!

@@ -51,6 +55,7 @@ static std::vector<SceUID> umdWaitingThreads;
static std::map<SceUID, u64> umdPausedWaits;

bool UMDReplacePermit = false;
bool UMD_insterted = true;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename UMDInserted , simple spelling mistake :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -495,7 +504,9 @@ void __UmdReplace(std::string filepath) {
}
}
delete currentUMD;

UMD_insterted = false;
sleep_ms(200); // Wait sceUmdCheckMedium call
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, this isn't very nice .. on the other hand, this will probably be pretty reliable as long as __UmdReplace is not called from the emulator thread. I fear though that it may be, on Android? Got to check to be sure though.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better solution may be to schedule an event (you know, RegisterEvent and so on) that will set UMDInserted back after a little bit.

@sum2012
Copy link
Collaborator Author

sum2012 commented Jan 28, 2017

@hrydgard Here is my first time to write a event.
It is a good challenge for me :)

@hrydgard
Copy link
Owner

Nice, looks good! It works, too, right? :)

Now the only thing I'm thinking about is savestate support for this, but it would be kind of silly to create a new savestate right when changing discs?

@hrydgard
Copy link
Owner

Actually we definitely need to save the event number. And that means that yes, you're gonna have to make a little version check in DoState. When loading an old state, you'll probably want to simply not call RestoreRegisterEvent...

@sum2012
Copy link
Collaborator Author

sum2012 commented Jan 28, 2017

Yes,It still work,but it seems UnitTest not to work.
12>Core.lib(sceUmd.obj) : error LNK2019: unresolved external symbol "void __cdecl MainWindow::_ChangeMenu(void)" (?_ChangeMenu@MainWindow@@yaxxz) referenced in function "void __cdecl __UmdDoState(class PointerWrap &)" (?__UmdDoState@@YAXAEAVPointerWrap@@@z)
12>F:\Project\test\107\ppsspp\Windows\x64\Debug\UnitTest.exe : fatal error LNK1120: 1 unresolved externals

@hrydgard
Copy link
Owner

Hm, curious. I'll see if I can find a solution tomorrow.

@sum2012
Copy link
Collaborator Author

sum2012 commented Jan 29, 2017

Please don't make change of MainWindowMenu.cpp on master.
I don't want to rebase,I can remove ChangeMenu function on this pull request first.

@hrydgard
Copy link
Owner

I can fix it up on this branch before merging. Don't worry about it, I'll take it from here, later today :)

@hrydgard hrydgard merged commit 860661d into hrydgard:master Jan 29, 2017
@hrydgard
Copy link
Owner

Merged and committed a fix on top. Don't know why it didn't end up inside the merge but meh, should be fine now :)

@sum2012
Copy link
Collaborator Author

sum2012 commented Jan 29, 2017

Very Thanks.

@sum2012 sum2012 deleted the umd-switch- branch January 29, 2017 11:09
@sum2012
Copy link
Collaborator Author

sum2012 commented Jan 29, 2017

@hrydgard A small note:
Some baidu ppsspp forum of people said that when they update their phone 's firmware from 6.0 to 7.0,their phone is faster in playing in ppsspp.

@hrydgard
Copy link
Owner

hrydgard commented Jan 29, 2017

Probably they got better graphics drivers with the upgrade. Especially on Android, good graphics drivers are very important for PPSSPP's performance.

Could of course also be power management.

@ghost
Copy link

ghost commented Feb 1, 2017

Hi! Sorry, I really don't understand programming. Can you help me? I would like to play Akaaka, but can't switch umd. How can i switch it?

@sum2012
Copy link
Collaborator Author

sum2012 commented Feb 3, 2017

@aranypikkely Download newest version in http://buildbot.orphis.net/ppsspp/

@ghost
Copy link

ghost commented Feb 3, 2017

Hi! Thanks! I downloaded it. So: it seems to switch the umd. But if i load the second umd, than switch the first, it plays just the first umd.

@sum2012
Copy link
Collaborator Author

sum2012 commented Feb 4, 2017

Do you mean that cannot switch again second umd ?

@ghost
Copy link

ghost commented Feb 4, 2017

It went like this: on the end of the 1. umd i saved the game
then on the beginning of the 2. umd i had to load the saved data (you can't avoid it)
then in the menu i choose to begin the game
and the text appeard: switch first umd
i switched
and not the second but the first part began - not a normal way, but with a high speed
(on the top of the emulator you could see: 2. part)

Maybe i made some mistake?

@sum2012
Copy link
Collaborator Author

sum2012 commented Feb 4, 2017

1:put the save https://drive.google.com/file/d/0B3OaSdeV0L8kaWgybDlTWVZiUmc/view?usp=sharing into ppsspp
2:Load disc 2 first,It will tell you load save data. http://i.imgur.com/QnGc02s.jpg
3:Click resume http://i.imgur.com/5ATxJRX.jpg,it would tell you load again save data http://i.imgur.com/IjkiI7M.jpg ,and confirm it http://i.imgur.com/dkTSPrq.jpg
4:It tells you change disc 1 http://i.imgur.com/tDAajPO.jpg
5:Then it tells you change again disc 2 http://i.imgur.com/52w8fLO.jpg
6:It will continue the story http://i.imgur.com/W6nk5cA.jpg

@ghost
Copy link

ghost commented Feb 4, 2017

You guys are amazing! Thank you very much! It works! :) I have one last question. Does this saved data know, what path was choosed during the game?

@sum2012
Copy link
Collaborator Author

sum2012 commented Feb 4, 2017

@aranypikkely The saved data is from #9110 (comment)

@kurasamesusaya Can you share that your save data that what path was choosed during the game?

@sayaaki
Copy link

sayaaki commented Feb 19, 2017

@sum2012 Can you show a more detailed guide? I'm lost between step 4 and 5. Like, I change to disc 1 like at step 4 but the game just start over again and doesn't show any picture like in step 5. And also can you show me how to change umd? The way I did it, I press Esc - switch umd - disc 1 - continue. Is it the right way?

ps: nvm I get it 👍

@sum2012
Copy link
Collaborator Author

sum2012 commented Feb 19, 2017

@sayaaki The way you change umd is right.Maybe you forget save data before end of disc 1.
Anyway,you can try to use my save data https://drive.google.com/file/d/0B3OaSdeV0L8kaWgybDlTWVZiUmc/view?usp=sharing

umd change video:
https://drive.google.com/file/d/0B3OaSdeV0L8kUXRpM195cHFQdHM/view?usp=sharing

@sayaaki
Copy link

sayaaki commented Feb 19, 2017

uhm but if the path I choose was different how can I continue from that path?

@sayaaki
Copy link

sayaaki commented Feb 19, 2017

and why can't I do the same thing with my own save instead of the save shared above?

@sum2012
Copy link
Collaborator Author

sum2012 commented Feb 19, 2017

@sayaaki first, give me your save data to me test.
Of course,need to zip your save data folder first.

@sayaaki
Copy link

sayaaki commented Feb 19, 2017

@sum2012
Copy link
Collaborator Author

sum2012 commented Feb 19, 2017

Maybe you need play again to get new story.
I might be try it when I have time.
I need OT this week ,not much time to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Akaya Akashiya Ayakashi UMD switch not possible
3 participants