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 support for EverDrive-64 #4

Open
Polprzewodnikowy opened this issue Feb 22, 2023 · 11 comments
Open

Add support for EverDrive-64 #4

Polprzewodnikowy opened this issue Feb 22, 2023 · 11 comments
Labels
help wanted Extra attention is needed
Milestone

Comments

@Polprzewodnikowy
Copy link
Owner

Polprzewodnikowy commented Feb 22, 2023

Direct reads from SD card to SDRAM is still unimplemented for everdrives in libdragon: DragonMinded/libdragon#345.

@Polprzewodnikowy Polprzewodnikowy added help wanted Extra attention is needed roadblock labels Feb 22, 2023
@Polprzewodnikowy Polprzewodnikowy changed the title Add support for EverDrive-64 X7 Add support for EverDrive-64 Feb 22, 2023
@riggles1
Copy link

As far as the old chinese clones go, is there a possibility of those getting supported? They're floating around everywhere at this point as people get them, then stop using them as they upgrade to something better.

With open source flashcarts being a thing it would be nice if new software for already existing clones can give them some better use.

Been recently returning to my old clone that was laying around after learning about alternative menues, to document the issues that affect altra64
https://github.com/ariahiro64/altra64/issues

As far as capabilities go, you have perfect compatibility with functional saving if you use two firmware SD cards, as the original clone firmware handles flashram saving but not alt/altra64. (except for Animal Crossing and Stadium 2 which are lost causes on older flashcarts anyway).

So the potential is there.

Polprzewodnikowy pushed a commit that referenced this issue Jul 2, 2023
* build against libdragon unstable

* remove libPng

* Fix build warnings

* Add remote deploy

* Switch to ubuntu latest image

* Improve readme
@Polprzewodnikowy
Copy link
Owner Author

Yes, i think it is possible to support ED64 clones as libdragon already incorporates libcart which claims to support these carts. SD card access shouldn't be a problem but one big issue before adding support for anything other than SC64 is figuring out how other flashcarts actually load data. Sadly there's little to none documentation of many registers used by ED64. There's altra64 code but as you already mentioned it has issues with some of the ROMs.

To summarize, ED64 support depends only on figuring out how to load data into the flashcart and correctly set specific registers. Anything other than that is generic to all flashcarts and should be already supported.

@riggles1
Copy link

riggles1 commented Jul 16, 2023

Ah that makes sense, I'd suspect the big hurdle with that then would be flashram games as only ED64 clone firmware knows how to grab that save type. As far as loading the games everything console compatible loads and plays with altra64, given that the file+path character length isn't too long.

Would be neat to see some support at least I suspect a lot of these are basically dead weighs in people's collections. Appreciate the reply! Will be testing.

@networkfusion
Copy link
Collaborator

networkfusion commented Jul 19, 2023

I have done some work towards this here: https://github.com/networkfusion/N64FlashcartMenu/tree/ed64-vseries . I am unsure of others progress in the area, but IMHO it should enable a Proof of concept.

And... definitely needs a more experienced C developer to improve the implementation!

@networkfusion networkfusion mentioned this issue Jul 19, 2023
9 tasks
@networkfusion
Copy link
Collaborator

I have now added a draft PR. If further help is needed with the implementation, please let me know.

@SlaughterRidge
Copy link

SlaughterRidge commented Dec 20, 2023

I can confirm that PR44 does at the very least run roms on the EverDrive 2.0. I tested roms that require the expansion pack and ones that do not require it.

EDIT: to add to this, saving does not appear to work, at least for the games I tested. The EverDrive 2.0/2.5 requires using the reset button to write save files to the SD.

@networkfusion
Copy link
Collaborator

EDIT: to add to this, saving does not appear to work, at least for the games I tested. The EverDrive 2.0/2.5 requires using the reset button to write save files to the SD.

Are you suggesting that the last played game is saving, but only when you have pressed reset? or it is still not working regardless of when you press reset?

@SlaughterRidge
Copy link

Sorry, to clarify, the EverDrive 2.0 and 2.5 require the user to press the reset button after the game itself saves. This is a requirement when using the official OS.

Using this build, the save files get create when launching the ROM (I can see them in the /saves directory) but pressing the reset button doesn't appear to write the save to the file. Upon re-launching the game, the save file isn't present within the game itself - in my case, I was using the Ocarina of Time as a test.

@networkfusion
Copy link
Collaborator

Thanks for the clarification. The PR does take into account the need to save on reset. But, was only tested on an ED64-P and also there has been a few upstream changes that could have broken it (since I merged). Rather than anymore noise on this issue, it would be better to note comments against the PR, and if you are able, help to get it to a state where it is able to be merged, it would be welcome.

@networkfusion
Copy link
Collaborator

Ocarina of Time

Also, since ROM's use multiple save types, it is possible that other ROM's are able to save correctly. Please test and show results for others that use EEP4K, EEP16K, SRAM , FRAM.

@networkfusion
Copy link
Collaborator

networkfusion commented May 21, 2024

Adding notes:

Everdrive flashcart versions are quite convoluted.

ED64 Vseries 1-2
& ED64 Pseries (clones are the similar, but have different file path/names)
ED64 Vseries 2.5
ED64 Vseries 3 (USB+RTC)
ED64 Xseries 5
ED64 Xseries 7 (USB+RTC)

For carts that support USB, the implementation is solely based in software (i.e. relies on it's usage being implemented within any ROM that uses it), which differs from other more feature complete flashcarts.

Libdragon detects the bootloader using devwizard64's libcart library, it mainly works by detecting the bootloader version.

Certain fixes rely on the CPLD/FPGA being injected with updated firmware from the menu (filesystem) after boot.

The V3 can also handle all features and fixes specific to the X7 when loaded with the firmware from menu version 3.06 (very helpful for USB).

The N64FlashcartMenu currently differentiate carts by manufacurer, and potentially assumes model.

First step is to properly differentiate the model and set the required flashcart features.
Being able to inject the required firmware from OS3.06 for the V3 is very advantagous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants