dangiu / PicoMemcard

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

Initial SD card support. #5

Closed darrena092 closed 1 year ago

darrena092 commented 2 years ago

This is very much still a work in progress.

Reading is tested and works fine, syncing not tested yet.

This will probably need to go into a separate branch. I'd like to re-add the ability to read/write via USB and also bank switching, but this is a start for now.

Anyways hope this is somewhat helpful anyways!

Edit: All works the same as before, just throw MEMCARD.MCR on an SD card formatted as FAT32 and connected to SPI0, and it'll serve that up to the PS1.

darrena092 commented 2 years ago

And syncing works too, tested by deleting saves in the bios.

Jumpingmanjim commented 2 years ago

Are the files to make the PCB published anywhere? I can't see them on github.

darrena092 commented 2 years ago

Are the files to make the PCB published anywhere? I can't see them on github.

Not yet, still work in progress for a separate branch that uses SD cards instead of the internal flash.

If you get an SD card breakout board, just connect it up to SPI0 (pictured below) and then follow the memory card wiring guide in the readme. If you want to try it out.

Screenshot_20220613-141153_Google

Edit: Also @dangiu hasn't release his PCB design files yet but you can request one from him following the directions in the readme. I'm not sure if this includes the SD card connections.

Jumpingmanjim commented 2 years ago

I had an idea. Maybe you could use one of these tiny little 0.91 inch oled modules and a pair of buttons to switch between virtual memory cards. Just an idea :)

https://www.aliexpress.com/item/32798439084.html

dangiu commented 2 years ago

@Jumpingmanjim as @darrena092 already said the PCB files are not public yet. I plan to release them in the future. The current PCB version is already provisioned for a future microSD card expansion board. The display is a good idea, but I was thinking to keep the number of additional components at a minimum to keep costs and complexity low. It could also be implemented by flashing the Pico onboard LED based on the image selected and cycling between the different images using the onboard button. The options are endless, will probably end up creating different versions based on the components available.

Helder1981 commented 2 years ago

Are the files to make the PCB published anywhere? I can't see them on github.

Not yet, still work in progress for a separate branch that uses SD cards instead of the internal flash.

If you get an SD card breakout board, just connect it up to SPI0 (pictured below) and then follow the memory card wiring guide in the readme. If you want to try it out.

Screenshot_20220613-141153_Google

Edit: Also @dangiu hasn't release his PCB design files yet but you can request one from him following the directions in the readme. I'm not sure if this includes the SD card connections.

So: GP19 TX would connect to DI (MOSI) on the SD Module? GP18 SCK would connect to SCLK on SD Module GP17 CSn would connect to CS on SD Module GP16 RX would connect to DO (MISO) on SD Module?

The TX and RX are what I am a bit unsure on and having this confirmed I'm sure will help other besides myself.

1 More question: Is the 3.3v line on the PSX memory card actually 3.3v? or is it 3.5v as it is labeled on the PS2 memory card diagrams on the net?

Thanks

dangiu commented 2 years ago

Are the files to make the PCB published anywhere? I can't see them on github.

Not yet, still work in progress for a separate branch that uses SD cards instead of the internal flash. If you get an SD card breakout board, just connect it up to SPI0 (pictured below) and then follow the memory card wiring guide in the readme. If you want to try it out. Screenshot_20220613-141153_Google Edit: Also @dangiu hasn't release his PCB design files yet but you can request one from him following the directions in the readme. I'm not sure if this includes the SD card connections.

So: GP19 TX would connect to DI (MOSI) on the SD Module? GP18 SCK would connect to SCLK on SD Module GP17 CSn would connect to CS on SD Module GP16 RX would connect to DO (MISO) on SD Module?

The TX and RX are what I am a bit unsure on and having this confirmed I'm sure will help other besides myself.

1 More question: Is the 3.3v line on the PSX memory card actually 3.3v? or is it 3.5v as it is labeled on the PS2 memory card diagrams on the net?

Thanks

I can confirm the connection you described are correct. Regarding the voltage I believe it's slightly different depending on the PSX model. @darrena092 measured his PSX to output 3.45V.

Helder1981 commented 1 year ago

I have my memcard Pico pcb built and tested but not sure if the SD reading is implemented in the latest release. Can either of you confirm if it is and how exactly does it work? does the flash have to have no MCR file and only have it on the SD card? or if the SD card is detected it will skip the flash storage? 20220707_134439

20220707_201840

Jumpingmanjim commented 1 year ago

It doesn't look like Darren092's changes got merged in. Maybe you could compile his version and see if it works. That PCB looks awesome by the way.

Helder1981 commented 1 year ago

It doesn't look like Darren092's changes got merged in. Maybe you could compile his version and see if it works. That PCB looks awesome by the way.

I have no idea how to compile the code on my windows 7 machine, I might have to get a linux VM machine or something to compile it. I'd like to get one of these pcbs to @dangiu and @darrena092 if they'd like one to play with.

dangiu commented 1 year ago

Holy smoke! That looks awesome! Using a pre-assmembled PCB with SMD components It's way more compact than anything I could have come up with! The SD support changes didn't get merged yet because they removed the USB functionality (I like to keep both options) me and darren are working on it, shouldn't take too long.

I'd love to get my hands on one! Contact me via email (danielegiuliani0@gmail.com) please!

darrena092 commented 1 year ago

@Helder1981 I'll compile this PR later on today and post a link here to a binary.

Edit: Also, one of these would be awesome as a development platform - thank you for the offer, it'd be much neater than what I currently have set up. You can get me at darrena092@gmail.com

darrena092 commented 1 year ago

For @Helder1981 and anyone else that wants to test this PR, here's the binary: PicoMemcard SD Binary

darrena092 commented 1 year ago

Closing in favour of #10 - since all of these changes are an integral part of that larger piece of work.