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

PSX memcard to Pocketstation hack #2208

Merged
merged 1 commit into from Dec 10, 2017

Conversation

Projects
None yet
4 participants
@RedPanda4552
Contributor

RedPanda4552 commented Dec 8, 2017

Context

PSX titles made to be compatible with the Pocketstation peripheral, namely Final Fantasy VIII, send a different hex to SIO, 0x58, that was previously ignored. As a result, these games could not see PSX cards.

Changes

This hack when enabled makes SIO execute the same payload for 0x58 as for normal PSX calls. A checkbox is added to the main memcards screen to enable/disable. Defaults to enabled.

The effect

The entire system sees PSX cards as Pocketstation devices. Though not "correct", this has no negative consequences, as Pocketstations are supposed to behave as memory cards. Additionally, games that use this Pocketstation value (and do not have other issues elsewhere in SIO) can now read and write the cards. It is confirmed that this works for Final Fantasy VIII (but only if there is not a PS2 card in slot 1, the starvation issue mentioned below) and I suspect this may help others as well, such as Saga Frontier 2, which was reported to completely stop working after the PSX SIO interrupts were introduced.

A warning about memcard safety

In an attempt to also fix an issue where a PS2 card in slot 1 would starve out a PSX card in slot 2, I somehow managed to make it unformat any PS2 cards in the entire memcard directory. I rolled back these changes and have not been able to reproduce the issue, but it feels wrong to not mention it for safety.

@lightningterror

This comment has been minimized.

Show comment
Hide comment
@lightningterror

lightningterror Dec 8, 2017

Member

I suggest to also add a short summary what the PR does in the commit description.

Member

lightningterror commented Dec 8, 2017

I suggest to also add a short summary what the PR does in the commit description.

@ramapcsx2

This comment has been minimized.

Show comment
Hide comment
@ramapcsx2

ramapcsx2 Dec 8, 2017

Member

Oh, that's a good find!
This hack could be avoided if we just correctly replied with "Sorry, I'm just a regular Memory Card". It's probably a packet delivered right in the next reply ;)

Edit: And what do you know: http://saga.wikia.com/wiki/SaGa_Frontier_2_Pocketstation

Member

ramapcsx2 commented Dec 8, 2017

Oh, that's a good find!
This hack could be avoided if we just correctly replied with "Sorry, I'm just a regular Memory Card". It's probably a packet delivered right in the next reply ;)

Edit: And what do you know: http://saga.wikia.com/wiki/SaGa_Frontier_2_Pocketstation

@RedPanda4552

This comment has been minimized.

Show comment
Hide comment
@RedPanda4552

RedPanda4552 Dec 8, 2017

Contributor

Yeah I've realized there has to be some sort of flag or trigger somewhere to tell the game "calm down it's just a memcard" but that's an ongoing effort as i keep tearing apart PCSXR and what PSX docs are available. Hopefully this hack won't be around for too long but in the meantime, it may help.

Contributor

RedPanda4552 commented Dec 8, 2017

Yeah I've realized there has to be some sort of flag or trigger somewhere to tell the game "calm down it's just a memcard" but that's an ongoing effort as i keep tearing apart PCSXR and what PSX docs are available. Hopefully this hack won't be around for too long but in the meantime, it may help.

@MrCK1

This comment has been minimized.

Show comment
Hide comment
@MrCK1

MrCK1 Dec 8, 2017

Member

If you need any more docs, let me know! I can give you the URLs if necessary.

Member

MrCK1 commented Dec 8, 2017

If you need any more docs, let me know! I can give you the URLs if necessary.

@ramapcsx2

This comment has been minimized.

Show comment
Hide comment
@ramapcsx2

ramapcsx2 Dec 8, 2017

Member

Okay, I understand your one step at a time approach.
If I understand this correctly, it will be good enough to just permanently reply to 0x58 for now.
PSX mode is declared as wip and Memory Card support is incomplete anyway.
I don't see any harm in reporting all PSX Memory Cards as Pocketstations for now.

So, how about just using the SIO part of this PR and not doing the GUI change?
That would reduce the impact of this temporary hack and make it easy to clean up, once the proper reply has been found.

Member

ramapcsx2 commented Dec 8, 2017

Okay, I understand your one step at a time approach.
If I understand this correctly, it will be good enough to just permanently reply to 0x58 for now.
PSX mode is declared as wip and Memory Card support is incomplete anyway.
I don't see any harm in reporting all PSX Memory Cards as Pocketstations for now.

So, how about just using the SIO part of this PR and not doing the GUI change?
That would reduce the impact of this temporary hack and make it easy to clean up, once the proper reply has been found.

Make PSX cards appear as Pocketstation devices.
Fixes memcard access in Final Fantasy VIII, and likely in other PSX
games supporting the Pocketstation peripheral.
@ramapcsx2

This comment has been minimized.

Show comment
Hide comment
@ramapcsx2

ramapcsx2 Dec 8, 2017

Member

@gregory38 Is this okay with you?
It is isolated to PSX mode and the PS2 Browser, since the Browser supports PSX peripherals and knows about Pocket Stations.
It's a minor hack and will help remind us to figure out the proper way to handle it.
In the mean time, it allows more progress in some of the nicer PSX titles :)

Member

ramapcsx2 commented Dec 8, 2017

@gregory38 Is this okay with you?
It is isolated to PSX mode and the PS2 Browser, since the Browser supports PSX peripherals and knows about Pocket Stations.
It's a minor hack and will help remind us to figure out the proper way to handle it.
In the mean time, it allows more progress in some of the nicer PSX titles :)

@MrCK1

This comment has been minimized.

Show comment
Hide comment
@MrCK1

MrCK1 Dec 9, 2017

Member

@ramapcsx2 BTW, me and Pandubz changed the original thread that was used for memory card testing into an unofficial compatibility list with our results so far: https://forums.pcsx2.net/Thread-New-feature-Needs-testing-PSX-Mode-Unofficial-Compatibility-List

It's not looking too bad right now ;)

Member

MrCK1 commented Dec 9, 2017

@ramapcsx2 BTW, me and Pandubz changed the original thread that was used for memory card testing into an unofficial compatibility list with our results so far: https://forums.pcsx2.net/Thread-New-feature-Needs-testing-PSX-Mode-Unofficial-Compatibility-List

It's not looking too bad right now ;)

@ramapcsx2

This comment has been minimized.

Show comment
Hide comment
@ramapcsx2

ramapcsx2 Dec 10, 2017

Member

Yep, looking good!
It's fortunate that this particular problem was so simple. :)

Member

ramapcsx2 commented Dec 10, 2017

Yep, looking good!
It's fortunate that this particular problem was so simple. :)

@ramapcsx2 ramapcsx2 merged commit 5fec900 into PCSX2:master Dec 10, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment