Make card harmless when plugged in ps2 mode into ps1 - #103
Merged
bbsan2k merged 3 commits intoSep 7, 2026
Merged
Conversation
Collaborator
|
This is also a good fix. The only problem I see: Also: Please retarget to develop, since main is only intended for releases. |
Author
|
Right. I've updated the logic to properly respond to 0x11, and tested with FMCB 1.966 image: it works |
Collaborator
|
Thank you 😊 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A single sd2psXtd card can easily hold both the PS1 and PS2 saves of an avid player. Therefore one could be tempted to use the same card on their PS1 and PS2 consoles. But currently there is a risk: if the card is set to PS2 mode for use on a PS2, and then later plugged into a PS1 (or worse, PS1 multitap) while still in PS2 mode, it can damage the console or the multitap.
That is because a PS2 memory card has to act push-pull to keep up with PS2 clock. Meanwhile on a PS1 the controller and the memory card share the same bus. As long as both memory card and controller act open drain, everything is fine. But if the memory card starts pushing high, then each time the controller pulls low there is a short. And that happens constantly in response to the console constantly polling the controller.
This PR attempts to mitigate this risk by initializing the involved pins as open drain or Hi-Z, and switching them to push-pull only when the host has been confirmed to be a PS2. This is asserted by watching for the 0x11 subcommand, which should be first subcommand a PS2 emits towards a newly inserted memory card, whereas a PS1 should theoretically never emit that byte as a memory card subcommand. I have tested this on my own PS2 and SuperStation One (I do not own a genuine PS1) and can confirm the PS2 is properly and exclusively detected.
With that, players won't have to worry anymore about which state they left the card in the last time they played. If they forgot it's in PS2 mode and insert it into a PS1 / PS1 multitap, it should be fine.
It's not foolproof, though. At least two edge cases where the pins can still be driven high under a PS1:
Therefore I haven't completely removed the warnings in the README and GUI, but I made them less alarming.
I'm looking forward for your feedbacks