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

other saves extensions #90

Closed
wants to merge 0 commits into from
Closed

other saves extensions #90

wants to merge 0 commits into from

Conversation

Suprapote
Copy link
Contributor

I made these changes to make more easier to move the savefiles between OSs

}
break;

default:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your change completely breaks existing .sav save files. I cannot accept this change in current state. Code path in default does essentially nothing because it is triggered on "none" save type only.

Please change the code to treat existing .sav files with priority. If no .sav file was found then try checking if .sra, .eep, or .fla save file exist. If that also fails then create a new save file with .sav extension.

I will add that your code has many copy-pasted segments that can be generalized. Try to optimize this.

Copy link
Owner

@Polprzewodnikowy Polprzewodnikowy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please implement changes stated in code review

@Suprapote
Copy link
Contributor Author

Suprapote commented Jan 29, 2024

is there any function that can help me or you got a tip of how to make the save check?

@networkfusion
Copy link
Collaborator

networkfusion commented Jan 29, 2024

IMHO, what "should" happen, is that the save types and required conversions are added as documentation as stated in #76

But, It would be nice to convert the "initial" load from the SD card file. It is more than likely that in most cases, (if coming from an ED64) the file just needs to be renamed (e.g. fla to sav) and it would be handled. If not, it is probably byte swapped.

@Polprzewodnikowy
Copy link
Owner

Did any of the ED64 menus (official or not) operate with byte swapped save files? I'm not sure if it's even necessary to do any conversion other than file extension change. Save files are just flat binaries, this menu assumes everything is saved as big endian files - native to the N64.

@Polprzewodnikowy
Copy link
Owner

is there any function that can help me or you got a tip of how to make the save check?

Look at this function: https://github.com/Polprzewodnikowy/N64FlashcartMenu/blob/main/src/utils/fs.c#L23-L30

@networkfusion
Copy link
Collaborator

Did any of the ED64 menus (official or not) operate with byte swapped save files? I'm not sure if it's even necessary to do any conversion other than file extension change. Save files are just flat binaries, this menu assumes everything is saved as big endian files - native to the N64.

I am quite sure they are not byte swapped for the ED64, and are handled the same as this "menu", especially given people come from certain emulators and expect them to work OTB and dont.

Here is a number of save files that have been "proved working" on the ED64: https://krikzz.com/forum/index.php?topic=1093.0

@TharathielCB
Copy link

Changing the extension to .sav worked for ed64p (altra) and everdrive x7

@networkfusion
Copy link
Collaborator

networkfusion commented Feb 2, 2024

This should go some way towards what is wanted... main...networkfusion:N64FlashcartMenu:improve-savetype-alt

@Suprapote Suprapote closed this Feb 3, 2024
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