diff --git a/Assets/dll/GBAHawk.dll b/Assets/dll/GBAHawk.dll index 43020bc..631eac4 100644 Binary files a/Assets/dll/GBAHawk.dll and b/Assets/dll/GBAHawk.dll differ diff --git a/libHawk/GBAHawk/Mappers.h b/libHawk/GBAHawk/Mappers.h index 2ae6fcc..571efe1 100644 --- a/libHawk/GBAHawk/Mappers.h +++ b/libHawk/GBAHawk/Mappers.h @@ -3661,11 +3661,12 @@ namespace GBAHawk // this is important to ex Sonic Advance if (Next_Ready_Cycle != 0xFFFFFFFFFFFFFFFF) { - // according to data sheet, upper bit returns 0 when an operation is in progress + // according to data sheet, upper bit returns complement of last written byte when an operation is in progress // and the 6th bit alternates - // this is important to ex Sonic Advance ret_value &= 0x7F; + ret_value |= ((~Write_Value) & 0x80); + ret_value &= 0xBF; if (Force_Bit_6) @@ -3712,7 +3713,7 @@ namespace GBAHawk if (Write_Count == 128) { - Next_Ready_Cycle = Core_Cycle_Count[0] + 40000 + (uint64_t)Flash_Sector_Erase_Offset; + Next_Ready_Cycle = Core_Cycle_Count[0] + 30000 + (uint64_t)Flash_Sector_Erase_Offset; Chip_Mode = 0; }