dangiu / PicoMemcard

Emulating PSX Memory Card (or controller) using a Raspberry Pi Pico
GNU General Public License v3.0
528 stars 38 forks source link

PMC+ Doesn't work with image above 10.MCR #40

Closed LobAnovich closed 1 year ago

LobAnovich commented 1 year ago

When trying to create more than 10 memory card images on PicoMemeryCard+ via SPS1(One), memory cards higher than 10.MCR number are not created. In the case of creating an image of a memory card 11.MCR and higher through a PC, when you try to switch further than 10 memory cards, the switch does not occur. The indicator shows that the 10.MCR card is the last one in the list

UPD: Tried after a while. If you keep start + select constantly pressed, then switching between all existing memory cards, even above 10.MCR, occurs normally. When trying to create a new memory card above 11.MCR, a 12.MCR card was created once. Above new maps are not created

dangiu commented 1 year ago

Okk I'll look into it, thanks for the update!

realJoshByrnes commented 1 year ago

Able to reliably reproduce this issue which limits PicoMemCard+ to 10 memory cards.

Memory cards 0.MCR to 9.MCR work fine.

memcard_manager_create(10.MCR) != MM_OK

realJoshByrnes commented 1 year ago

Additionally, once the 10.MCR is created, future attempts to create the 10.MCR fail due to it existing and being invalid.

whitezombie2000 commented 1 year ago

I can confirm the above behavior with a PicoMemoryCard+. I can't create an 11th card with START + SELECT + TRIANGLE. I manually created the 11th card on the PC, then upon reinserting into the PS1, it will load card 0.MCR as it should, 1st switch it will load 1.MCR, on the 2nd switch it will load 10.MCR, on the 3rd switch it will load 11.MCR, on the 4th switch it will load 2.MCR, on the 5th switch it will load 3.MCR, on the 6th switch it will load 4.MCR, on the 7th switch it will load 5.MCR, on the 8th switch it will load 6.MCR, on the 9th switch it will load 7.MCR, on the 10th switch it will load 8.MCR, on the 11th switch it will load 9.MCR.

I repeated this test by putting different saves on all 16 cards to keep track of them. I manually created cards 11,12,13,14, and 15 on the PC. Upon reinserting into the PS1, it will load card 0.MCR as it should, 1st switch it will load 1.MCR, on the 2nd switch it will load 10.MCR, on the 3rd switch it will load 11.MCR, on the 4th switch it will load 12.MCR, on the 5th switch it will load 13.MCR, on the 6th switch it will load 14.MCR, on the 7th switch it will load 15.MCR, on the 8th switch it will load 2.MCR, on the 9th switch it will load 3.MCR, on the 10th switch it will load 4.MCR, on the 11th switch it will load 5.MCR, on the 12th switch it will load 6.MCR, on the 13th switch it will load 7.MCR, on the 14th switch it will load 8.MCR, on the 15th switch it will load 9.MCR.

realJoshByrnes commented 1 year ago

@whitezombie2000 Great feedback, which has identified another bug - https://github.com/dangiu/PicoMemcard/issues/56

I have added firmware which is compatible with PMC+ for Pico/Pico W (not the rp2040-zero) and has the creation fix at https://github.com/realJoshByrnes/PicoMemcard/releases/download/v1.0.22/PicoMemcard.zip if you'd like to try it.

Whilst it should allow you to create more memory cards, it doesn't change the sorting order for cards.

whitezombie2000 commented 1 year ago

Sorry I can't test it because I believe mine is built with the rp2040-zero. I don't know for sure as I bought a pre-built one from China. Package says it's based on the rp2040 chip production so maybe it works.

realJoshByrnes commented 1 year ago

@whitezombie2000 No problems. It's probably worth subscribing to issue #56 also, which is the order bug you've identified.

I've submitted a PR #55 which, if merged, will fix the card creation issue, just waiting on a response from @dangiu

whitezombie2000 commented 1 year ago

I just tried your file, it worked without any issue, so it must be based off of the rp2040. I was able to create 12 memory cards.

LobAnovich commented 1 year ago

Due to the small size and the ability to place the entire project inside the case of the original ps1 memory card, I had no doubts about choosing the rp2040. Both my DIY picomemcard + and the card from China have a problem

LobAnovich commented 1 year ago

I just tried your file, it worked without any issue, so it must be based off of the rp2040. I was able to create 12 memory cards.

Only 12?

whitezombie2000 commented 1 year ago

I just tried your file, it worked without any issue, so it must be based off of the rp2040. I was able to create 12 memory cards.

Only 12?

Capture1

Is 20 enough for you? :) I didn't feel like going to 100.

realJoshByrnes commented 1 year ago

I just tried your file, it worked without any issue, so it must be based off of the rp2040. I was able to create 12 memory cards.

@whitezombie2000 It's based off PicoMemCard+, but I haven't got an rp2040-zero to test. Did the colored LEDs work?

Due to the small size and the ability to place the entire project inside the case of the original ps1 memory card, I had no doubts about choosing the rp2040. Both my DIY picomemcard + and the card from China have a problem

@LobAnovich The rp2040-zero is a nice size. Are you building the image yourself? Feel free to start a new issue and we can see if we can work out what it is @LobAnovich as I have had success with Pico / Pico W / PSXMemCard

Only 12?

I believe @whitezombie2000 meant they could create 12 successfully, where they couldn't previously.

whitezombie2000 commented 1 year ago

I just tried your file, it worked without any issue, so it must be based off of the rp2040. I was able to create 12 memory cards.

@whitezombie2000 It's based off PicoMemCard+, but I haven't got an rp2040-zero to test. Did the colored LEDs work?

Yes I know the China one is based off the PicoMemcard+ but I wasn't sure if they were using a rp2040 or rp2040-zero in their design. Since your file worked it must be using a rp2040 in their design. Yes the LEDs work.

Hmm...after creating 20 cards it's defaulting to card 7.MCR upon the first insertion into the PS1. This must be related to the order issue.

Edit 1: Nevermind it appears to remember the last card loaded after removing it. Was that feature added in your firmware? Before it always defaulted to 0.MCR.

Edit 2: Ok I see now. There is a LastMemcardIndex.dat file there that must remember it. Awesome work! But yeah the order issue still affects that too.

realJoshByrnes commented 1 year ago

@whitezombie2000 Remembering the last card was a precious commit. PR relating to creating new MCs has now been merged (fixed on future builds)