Skip to content

Commit

Permalink
FFMQ: Reset protection (ArchipelagoMW#2727)
Browse files Browse the repository at this point in the history
Bizhawk's "hard reset" option fills RAM with 0x55s. This causes game completion to be erroneously flagged, and likely many erroneous location checks with it. This fix checks for 0x55 and will not proceed to process anything if present.
  • Loading branch information
Alchav authored and Jouramie committed Feb 28, 2024
1 parent 2d589f7 commit 63749e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worlds/ffmq/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async def game_watcher(self, ctx):
received = await snes_read(ctx, RECEIVED_DATA[0], RECEIVED_DATA[1])
data = await snes_read(ctx, READ_DATA_START, READ_DATA_END - READ_DATA_START)
check_2 = await snes_read(ctx, 0xF53749, 1)
if check_1 == b'\x00' or check_2 == b'\x00':
if check_1 in (b'\x00', b'\x55') or check_2 in (b'\x00', b'\x55'):
return

def get_range(data_range):
Expand Down

0 comments on commit 63749e4

Please sign in to comment.