-
Notifications
You must be signed in to change notification settings - Fork 1
Adding a New Save File Type
Save files represent a fixed size data buffer that can be used to save game data. An example is N64 EEPROM which is built into cartridges.
In CMake the save file type is passed into the platform specific implementation of create_game via the SAVE_FILE_TYPE parameter. Each platform dependent implementation should handle this parameter in its own way (or ignore it the platform does not support this type of save data)
In order to add support for a new save file type in the desktop build, the following steps should be taken:
- Add a new enumerated type to
fw64SaveFile::SaveFileTypeindesktop/save_file.h - Add an entry to
fw64SaveFile::getFileSize()insave_file.cpp - Add an entry to
getSaveFileType()indesktop_main.cpp
If new save types beyond the basic EEPROM ones are added they will need to be added to the if statement in framework64.modernsdk.cmake and the rom header string updated accordingly.
For N64 the following values are accepted and written into the ROM header so that the everdrive can emulate the storage:
N64_EEPROM_4KN64_EEPROM_16K