tonyhax icon indicating copy to clipboard operation
tonyhax copied to clipboard

*Feature Request* enchanced MemCardPro support

Open t9999clint opened this issue 3 years ago • 15 comments

The XStation ODE has the ability to send a command to the MemCardPro to switch virtual memory card slots. If TonyHax could add this feature too it'd be super cool. Also it'd allow for seamless integration with the FreePSXboot hack cause you can get it to switch off from the FreePSXboot card automatically, preventing the system from locking up on boot.

TBH if this feature was added, the combo of TonyHax + FreePSXBoot + MemCardPro is something I'd use for every PSX game I play even for retail games just because it'd automatically set the virtual memcard for me.

In terms how how this would be done, that I don't know. I'm still trying to find any documentation on what memorycard signals need to be sent to the card to get it to switch and how to send it the game ID so it can manage the filenames automatically. I'll post back when I find more info. If I can't find anything I can also get the contact information of the MemCardPro guys for you if you want me to. In theory it should be a simple thing to add.

Thanks for taking the time to read this request.

t9999clint avatar Apr 28 '21 20:04 t9999clint

https://gitlab.com/chriz2600/ps1-game-id-transmission Here's some info on the code needed for memcardpro support

t9999clint avatar Apr 29 '21 01:04 t9999clint

There's also this in particular: https://github.com/x-station/memcardprodemo

Goldanas avatar Jan 06 '22 03:01 Goldanas

+1

thamulot avatar Mar 10 '23 13:03 thamulot

I was playing around with some code that involved reading memory cards from within the Tonyhax International loader at one point, it's not hard to implement it (just call the Bios functions explicitly like other functions). The issue I think is that neither me or socram8888 actually have a memcardpro.

alex-free avatar Mar 10 '23 18:03 alex-free

Well, if the development is relatively low risk and trivial, you could create a pull request and people like t9999clint or others could test it.

thamulot avatar Mar 10 '23 18:03 thamulot

As @alex-free correctly pointed I don't have one. I'm not really interested in spending my time implementing and debugging a feature I'll never use.

This is an open source project on the other hand, so if anyone that owns one wants this feature, feel free to implement it (or pay someone to do it) and make a PR.

socram8888 avatar Mar 10 '23 20:03 socram8888

As @alex-free correctly pointed I don't have one. I'm not really interested in spending my time implementing and debugging a feature I'll never use.

This is an open source project on the other hand, so if anyone that owns one wants this feature, feel free to implement it (or pay someone to do it) and make a PR.

Ditto. I have a few PS2 consoles, a 32GB flash drive that’s PS2 compatible, and 5 PSX memory cards… I really don’t need to buy a memcardpro (but maybe if money wasn’t so tight I would to try this).

alex-free avatar Mar 12 '23 08:03 alex-free

The point is understandable. I dropped an email at 8bitmods to see if they are interested in sponsoring the effort.

thamulot avatar Mar 12 '23 13:03 thamulot

I took a few minutes last week to see if I could setup a dev environment so I could build Tonyhax locally first but without success. My CPU doesn't have what it takes to virtualize Ubuntu on Windows. I'm afraid I'll need to go the virtual box way since I cannot use docker as well.

If anybody has some sort of recommendations or tips I would take them.

Other than that, I think I know where in the code it would be appropriate to add the Memcard pro support. Somewhere just after the disc loading, once you get the ID that you must pass as-is to Memcard pro after verifying the slot.

Anyway, it seems very doable to me, from my external perspective so far.

thamulot avatar Mar 15 '23 21:03 thamulot

If you're running a modern Win 10 installation, you should be able to use the Windows Subsystem for Linux (WSL) as I do

socram8888 avatar Mar 15 '23 22:03 socram8888

Could also use a Debian or Ubuntu Live CD/Live USB.

alex-free avatar Mar 16 '23 04:03 alex-free

Ive added support for MCPro/SD2PSX, using the library from Cybdyn (https://github.com/Cybdyn-Systems/MemCardPro-ASM)

https://github.com/danhans42/tonyhax_mcp

Tested only using an SD2PSX (I dont own a MCPro). Also so far, havent tried booting from the SD2PSX so it needs further testing.

Works with a device in slot 1. Doesnt communicate with slot 2

danhans42 avatar Jun 15 '24 09:06 danhans42

Ive added support for MCPro/SD2PSX, using the library from Cybdyn (https://github.com/Cybdyn-Systems/MemCardPro-ASM)

https://github.com/danhans42/tonyhax_mcp

Tested only using an SD2PSX (I dont own a MCPro). Also so far, havent tried booting from the SD2PSX so it needs further testing.

Works with a device in slot 1. Doesnt communicate with slot 2

I implemented your code into an experimental build of Tonyhax international. I have someone willing to test it out since I have neither a memcardpro or a sd2psx. If you could test it out as well that would be amazing. https://github.com/alex-free/tonyhax/issues/64#issuecomment-2303546454

alex-free avatar Aug 22 '24 17:08 alex-free

I just tested it out like you asked.

In summary,

  • I have a memcardpro v1 (not v2) and the "Load last card when MemCard Boots" option DISABLED (so it always boots the first memory card)
  • I took the freepsxboot tonyhax_scph-9001_slot1.mcr file version from the special build version 1.5.3 (BETA)
  • I had to rename the extension to .mcd for Memcardpro to recognize it
  • I put it on my memcardpro through FTP as the first memory card in slot 1
  • I booted my PS1 with the CD cover opened, I put a copied CD-rom game in and with my memcardpro in slot 1
  • I entered the PS1 memory card manager to trigger the jailbreak
  • tonyhax loaded successfully, then the copied CD-rom game and then I could see the memcardpro loaded the proper savegame on the tiny screen
  • I tried with 2 different games (a legit CD-rom and a copy) and both worked

In other words, it seems to work wonder. Great job 🎉

thamulot avatar Aug 23 '24 21:08 thamulot

My PSX is dead at the moment so I haven't been able to test it, but I did ask around a few places to see if anyone else was willing to check it out. Glad to see that the feature seems to be working now, thanks for all your hard work.

t9999clint avatar Aug 23 '24 21:08 t9999clint