Fix missing erase_sector() call to fix stalls on save for CART link data writing

+ fix broken toggle in debug menu
This commit is contained in:
Philippe Symons
2026-06-05 01:32:03 +02:00
parent a88b316721
commit 6a3eba2c42
2 changed files with 2 additions and 1 deletions

View File

@@ -209,6 +209,7 @@ void LinkConnection::writeData()
// If the buffer is full or we reached nextSubState == END, we save the buffer to the cartridge save
if (link_cable_array_index >= 0x1000 || nextSubState == END)
{
erase_sector(0x1000 * link_cable_memory_section_index);
copy_ram_to_save(&global_memory_buffer[0], 0x1000 * link_cable_memory_section_index, 0x1000);
++link_cable_memory_section_index;
link_cable_array_index = 0;