SD Data File Best Practices

From Uzebox Wiki
Jump to: navigation, search


This is a simple guideline to keep some standard about how the SD card is utilized for game storage. Use the forum (Thread) to discuss new ideas.

Rom File Names

The standard is an effort to keep loading faster and maximize the number of games and data files than can be put on the card. Long file names takes many entries in the root directory folder of the SD card and are counter productive to everyone. When populating the game list table, ensure you provide a unique game name in DOS 8.3 format (all caps) for the .UZE file. I.e: ALTEREGO.UZE.

Data Files

If you have a SD data file that goes along, name it the same as your game with a .DAT extension. i.e: ALTEREGO.DAT. To simplify things and avoid multiple data files per game, it is greatly encouraged you pack all you data in one big data file. If you can't (i.e: add more levels in the future without recompiling the ROM), then use a .Dnn extension: ALTEREGO.D01, ALTEREGO.D02, etc. This rule also has the effect of easily being able to relate a data file to its game. It is highly encouraged and better for everyone if you design around a single file(that you can always update later) concept. If you have questions or issues with how to make that work, you will find help and ideas on the forums.

Save Files

For games using SD writing via Petit FatFS or others, there is a file(that hopefully becomes standard) called "_HISCORE.DAT". The intent of this file is to be flexible enough for any type of save data such as level editor creations, RPG progress, etc while simultaneously eliminating the need for separate files in all these cases. For games where this would work, which should be any SD game, it would be ideal to follow the suggested standard or document up a new section of the file that does what you need and provides flexibility for others. The current standard suggestion open for discussion is located at SD_Save_Sector_Reservation_List. Hopefully most game should find it easier to save data here than it is to EEPROM, thus leaving more space for non-SD games where smaller EEPROM is the only option.