You are not logged in.

Read the FAQ and Knowledge Base before posting.
We won't make a 3DS/2DS emulator.

#1 2009-12-25 13:46:15

Registered: 2009-12-22
Posts: 179

verification of internal cheats

(kinda scared of posting in this forum, since i'm not sure if i'm considered developer by your standard)

i reported a bug about verification not working well when adding or editing internal cheats. then I looked at the code and realized that the problem is different than what I thought.

here's the outline of it:
the add/edit cheat dialog has 3 input fields that need verification. address, value, and size.
the address needs to be between 000000 and 400000, the value need to be legal and match the size.

method of verification is, to check when there's input to one of the fields, if value is legal enable the add/update(ok) button, and if it's illegal, disable the (ok) button.

what happens is this:
when typing in the address field, only the address field is checked for validity.
when typing in the value field, all aspects are checked.
when clicking radio buttons to change sizes, no verification happens.

if the address field is invalid, the (ok) buttons will always stay disabled. that's okay.
if the value is invalid, or is bigger than size, the (ok) will be disabled when you type value, but re-enabled if you edit the address field, even though the value is still invalid.
if the value is valid and matches size, then you change the size to smaller, check does not happen, even if value is too big now, the (ok) is still enabled.

what should happen:
all checks should be preformed when any of these fields change. so either:
1. do all verification whenever the dialog gets input (kinda overboard, i think)
2. add the checks where they're missing (fast but messy, probably the reason things look the way they are)
3. write a single verification function and add it where needed.

So, that's that, it needs fixing, and if none of you care, I might try to do that later (and probably fail anyway).
also, sorry for the length, has to do with my lack of communication skill.


#2 2009-12-25 16:32:05

Radical Ninja
Registered: 2009-01-05
Posts: 6,133

Re: verification of internal cheats

I suspect that stuff hasn't been done properly because it is somewhat harder than it appears or than it ought to be. Make sure youre looking at the latest svn since I think that code may have been changed since 0.9.5 and throw us a patch if you want us to look at it.


#3 2009-12-26 23:39:29

Registered: 2009-12-22
Posts: 179

Re: verification of internal cheats

here's my first try (patch file)

probably looks like a mess, but works, as far as I can test.

waiting for review and corrections, thanks.

or you can throw me out, if i'm just too bad at this..


Board footer

Powered by FluxBB