llvm-mos / llvm-mos-sdk

SDK for developing with the llvm-mos compiler
https://www.llvm-mos.org
Other
266 stars 53 forks source link

NES: UNROM-512, GTROM self-flashing support #200

Open asiekierka opened 11 months ago

asiekierka commented 11 months ago

Both cartridge boards can feature an SST39SF040 flash chip for storing the game's data, which allows the game to reflash parts of itself - for instance, using some unused bank area for save data storage.

See this for UNROM-512 docs, and this for a GTROM addendum.

asiekierka commented 11 months ago

Due to the peculiarities of self-flashing, code that performs flash operations must live in WRAM.

There's two approaches here: