Skip to content

Commit

Permalink
update timings for atmel
Browse files Browse the repository at this point in the history
  • Loading branch information
alyosha-tas committed Oct 17, 2024
1 parent 9acf1d9 commit 36838c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Binary file modified Assets/dll/GBAHawk.dll
Binary file not shown.
7 changes: 4 additions & 3 deletions libHawk/GBAHawk/Mappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 36838c6

Please sign in to comment.