mirror of
https://github.com/GearsProgress/Poke_Transporter_GB.git
synced 2026-08-28 03:35:43 -05:00
Fix hardware-only bug
We need to erase the sector before copying the data. I also fixed an endianness problem in initialize_memory_locations(). This one was not caused by me.
This commit is contained in:
@@ -143,6 +143,8 @@ void Gen3CartridgeSaveReader::flush()
|
||||
}
|
||||
|
||||
update_memory_buffer_checksum(sector_buffer_, (sector_start_ == HALL_OF_FAME));
|
||||
// Real flash requires erase before rewriting bytes that may need 0->1 transitions.
|
||||
erase_sector(sector_start_);
|
||||
copy_ram_to_save(sector_buffer_, sector_start_, SECTOR_SIZE);
|
||||
dirty_ = false;
|
||||
}
|
||||
Reference in New Issue
Block a user