Permalink
Browse files

Fixed powerslide demo by reverting sram init change.

  • Loading branch information...
RedGuyyyy committed May 3, 2018
1 parent 4d033bf commit 12a3eadfd2919250647cf170404790f2b703777d
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/memory.c
View
@@ -331,7 +331,8 @@ uint32_t load_rom(uint8_t* filename, uint32_t base_addr, uint8_t flags) {
printf("gsu=%x gsu_sram=%x\n", romprops.has_gsu, romprops.has_gsu_sram);
if(flags & LOADROM_WITH_SRAM) {
if(romprops.ramsize_bytes) {
sram_memset(SRAM_SAVE_ADDR, romprops.ramsize_bytes, 0xFF);
// powerslide relies on the init value to be 00.
sram_memset(SRAM_SAVE_ADDR, romprops.ramsize_bytes, romprops.has_gsu ? 0x00 : 0xFF);
if (!romprops.has_gsu || romprops.has_gsu_sram) migrate_and_load_srm(filename, SRAM_SAVE_ADDR);
/* file not found error is ok (SRM file might not exist yet) */
if(file_res == FR_NO_FILE) file_res = 0;

0 comments on commit 12a3ead

Please sign in to comment.