Skip to content
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

Add memory card support for Dreamcast #736

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

breademan
Copy link
Contributor

This adds memory card support for the Dreamcast, mostly by using the existing framework for N64 memory cards. It switches which memory card file is loaded depending on what system is set in wired_adapter.system_id.

Since an entire 128KB memory card is loaded into RAM, it currently only supports one memory card.

It also saves ~1KB of IRAM by using a loop instead of several hundred NOPs. Timing should be within a few clock cycles of the older function per 100ns delay.

@darthcloud
Copy link
Owner

Thanks for contributing this! I'm hopeful to look at it sometime in august.

@Hattmeiny

This comment was marked as outdated.

@jandal55

This comment was marked as outdated.

@darthcloud
Copy link
Owner

darthcloud commented Aug 19, 2023

I finally had the time to look a it and test it!

It work really well and the code is very high quality :)

I did remove the changes made to the memory card module.
I want this code to stay system agnostic and to use a single file for memory card needs.
It's makes things a lot easier to maintain.

As expected the DC BIOS will prompt user to format the emulated VMU itself.

Other than that I only made minor cleanup in the maple module.

I wrote a web interface to allow downloading/uploading VMU binary (compatible with Flycast files, likely other emu aswell)
See beta web config:
https://darthcloud.github.io/BlueRetroWebCfg_Beta/

I also wrote docs (still only in the beta wiki):
Some rational behind the memory card module design:
https://github.com/darthcloud/BlueRetroWiki/blob/master/BlueRetro-BLE-Web-Config-User-Manual.md#7---memory-card-manager-pages

And for the DC VMU manager:
https://github.com/darthcloud/BlueRetroWiki/blob/master/BlueRetro-BLE-Web-Config-User-Manual.md#72---dc-vmu-manager-page

Thanks again, this is a really great contribution!!

@darthcloud
Copy link
Owner

It will merge next week after some more beta testing. Will be in v1.9

@Hattmeiny
Copy link

Hattmeiny commented Aug 20, 2023 via email

Fixed maple_tx size wraparound bug
Implemented several commands for the maple memory card function
Saved about 1K of IRAM by decreasing the size of wait_100ns()
@darthcloud darthcloud merged commit 74b98ba into darthcloud:master Aug 22, 2023
2 checks passed
@breademan
Copy link
Contributor Author

Thanks for reviewing this and getting the web interface working, too! I'm glad I was able to help folks get VMUs working.

@darthcloud
Copy link
Owner

@breademan thanks for doing the hard work 🙂

Let me know if you are still working on your idea of multi player VMU.

@Hattmeiny
Copy link

To confirm, is this available to be used now on 1.8.4 or to be released later on the 1.9? Thanks!!

@darthcloud
Copy link
Owner

its not, it will be available when i make the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants