We use the 6102 boot code by default, but this can be changed (for
example, if flashing to a cartridge with a different CIC).
As with the microcode, the path cannot be easily passed to the
linker script and so the hard-coded name should not be specific to
particular boot code.
Environment variable N64_ROOT optionally sets the root directory of
the N64 toolchain.
To enable this to work with the linker script, the microcode object
files are now copied to the build directory before linking (since
there is no easy way to pass the path to the script dynamically).
An added benefit to this approach is that different microcode can
now be used easily if desired.
With the implementation of save file deletion, I refactored
savefileNew() to re-use the common save file deletion code.
However, savefileDeleteGame() has the side effect of writing
the save back to SRAM. Since the rest of savefileNew() does
not write to SRAM, this means that on first boot it was
possible to get a partially-written save file if the game
was powered off before the first real save (some options had
zero/null values).
To fix this, I created a helper function to update a save file
in memory without writing it back to SRAM. This has the added
benefit of not unnecessarily re-ordering the slots in savefileNew().
I chose not to add a savefileSave() to the end of savefileNew()
since it is called from savefileLoad(), and saving while loading
doesn't seem intuitive. I also don't think it's a good idea to save
in the middle of initialization, in case a user is able to cut
power at the (im)perfect time. The operation should be atomic.
I move contributing.md to the documentation folder.
I moved setup.sh to the tools folder.
I renamed contributing.md from all caps to lowercase to match other files.
I moved docker setup to it's own file.
I moved some instructions to the add_vpk_here.md file.