Skip to content

report warning if same condition exists with both delta and non-delta#527

Open
Jamiras wants to merge 2 commits into
RetroAchievements:developfrom
Jamiras:feature/validate_same_cond_across_frames
Open

report warning if same condition exists with both delta and non-delta#527
Jamiras wants to merge 2 commits into
RetroAchievements:developfrom
Jamiras:feature/validate_same_cond_across_frames

Conversation

@Jamiras

@Jamiras Jamiras commented Jul 13, 2026

Copy link
Copy Markdown
Member

Generates a warning if the user has:

   Mem   8-bit 0x1234 = 5
   Delta 8-bit 0x1234 = 5

The user most likely meant to make the second condition Delta 0x1234 != 5 or Delta 0x1234 = 4

@Jamiras Jamiras added this to the 12.4 milestone Jul 13, 2026
@redwizard42

Copy link
Copy Markdown
Contributor

Probably reasonable warning, but sometimes I do want to make sure it's been a specific value for at least two frames. But more usually I just need it to b stable for two frames and do delta = mem.

Any plays to allow us to see all warnings (or does that exist)?

@Jamiras

Jamiras commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

I have no plans to show all errors. Multiple errors could be the result of the same bad code. #475 modified the logic to bubble up the most severe error.

Additionally, there are different tiers of errors. Parse errors happen first (multiple measured, modifying operators on conditional lines, using trigger in leaderboard values). Then the logic validation happens. And finally, the note validation logic happens.

I do have plans to allow a user to suppress a warning (assuming the potential error was intentional - like using a 16-bit read to check two neighboring 8-bit values and getting a note size warning), but the naive implementation of that would be to just hide the warning without generating the next warning.

Is there a particular case you have in mind?

@redwizard42

redwizard42 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

I only I know I've done this at least once and have a small fear that it'd hide a more relevant earning.

It's probably such a niche case though. Mostly just thinking aloud about a possible pitfall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants