You are not logged in.

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



#1 2016-11-17 05:31:52

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Cheat engine action replay bug with repeat code type r5575

I ran into glitch with the repeat code type (C0 and DC). the code below is suppose to instantly make the kart big in mario kart ds.  but in desmume it either crashes the game or makes the kart fly up.  this works fine on hardware and flash cards so its some issue with desmume code handler.

It differs with whatever is ending the code which doesn't make any sense to me.  if ended with D0 it crashes.  If ended with D2 it works, but makes the cart fly up. the code are below if you want to try it yourself. this code should only make the kart bigger and the repeat should only effect BC C0 and C4 adresses which is where the size of the cart is stored.


(code BOOBOO2)
press Y or select to make kart big
6217B330 00000000
B217ACF8 00000000
927FFFA8 F7FF0000
C0000000 00000002
000000BC 00004000
DC000000 00000004
D0000000 00000000
94000130 FFFB0000
C0000000 00000002
000000BC 00004000
DC000000 00000004
D2000000 00000000

(code PINKPUFF)
press Y make kart big
6217B330 00000000
B217ACF8 00000000
927FFFA8 F7FF0000
C0000000 00000002
000000BC 00004000
DC000000 00000004
D2000000 00000000


Can this be fixed?

Last edited by fintogive (2016-11-17 05:37:57)

Offline

#2 2016-11-17 13:52:11

AsPoke3172
Member
Registered: 2010-04-21
Posts: 205

Re: Cheat engine action replay bug with repeat code type r5575

Can you try this codes on No$gba emulator to make sure the codes are working or not.

Offline

#3 2016-11-17 23:50:08

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Cheat engine action replay bug with repeat code type r5575

just checked it it works fine on no$gba and ar device.

Offline

#4 2016-11-17 23:57:37

AsPoke3172
Member
Registered: 2010-04-21
Posts: 205

Re: Cheat engine action replay bug with repeat code type r5575

OK! How about testing any previous version of Desmume? 0.9.11 or 0.9.10 or below?

Offline

#5 2016-11-18 03:54:20

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Cheat engine action replay bug with repeat code type r5575

nope they all crash.

Offline

#6 2016-11-18 14:45:46

AsPoke3172
Member
Registered: 2010-04-21
Posts: 205

Re: Cheat engine action replay bug with repeat code type r5575

Hmmm.... maybe your codes was wrong or invalid or something. Plus, some codes was already on USRCHEAT.DAT file.
Anyway, post your codes at GameHacking website and leave it into Demonic722 or Helder or anyone for checking and testing your codes.

Offline

#7 2016-11-19 12:02:48

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Cheat engine action replay bug with repeat code type r5575

I've already verified these codes work as im the creator of these codes.   theres nothing wrong with them.  ive been making codes since 2009 and have made over 500 codes over the years on the ds system.  its defiantly an error in desmumes code.

the codes is suppose to work like this.

6217B330 00000000  (not equal to check sum) code exudes when not equal to 00000000
B217ACF8 00000000 (sets a pointer to write to an address with in this address location)
927FFFA8 F7FF0000  (Equal to 16 bit button activator) code exudes when corresponding button is pressed
C0000000 00000002 (sets to repeat the value of 00004000 2 times)
000000BC 00004000 (32 bit write/freeze to 000000BC address)
DC000000 00000004 (corresponds to repeat code type above to repeat every 4 bytes or repeating the written value of 00004000 from 000000BC to the addresses 000000C0 and 000000C4)
D2000000 00000000 (end full terminator)

this is a simplified version of another code to make it easier to find the bug to fix this problem. the full code is a kart size modifier to grow and shrink the kart in mkds.
(Select and Y) Grow Shrink Kart 3.0
6217B330 00000000
B217ACF8 00000000
927FFFA8 F7FF0000
C0000000 00000002
D9000000 000000BC
D4000000 00000040
D6000000 000000BC
DC000000 00000000
D0000000 00000000
94000130 FFFB0000
C0000000 00000002
D9000000 000000BC
D4000000 FFFFFFC0
D6000000 000000BC
DC000000 00000000
D0000000 00000000
D2000000 00000000

now for some reason this crashes in desmume and with the terminator d2000000 00000000 it seems to write to unwanted addresses. so im not sure if its an issue with the terminators not properly terminating the repeat code type or if the repeat code type is broken.

so if no$gba and flash cards run the code fine im sure its an easy fix.

Zeromus or rogerman i would appreciate if one of you would look in to fixing this issue.
Thank you.

Last edited by fintogive (2016-11-21 02:09:51)

Offline

#8 2016-11-20 04:06:32

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,168

Re: Cheat engine action replay bug with repeat code type r5575

There's a syntax error in your last code (2nd line lacks a 0?)
I can't make any of your codes crash.
Please tell me exactly which code will make a crash.
The kart rising seems very much like the game malfunctioning when a kart reaches an unexpected size. Are you sure it doesn't do that on HW?

Offline

#9 2016-11-20 13:43:35

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Cheat engine action replay bug with repeat code type r5575

use this code and watch the quick video.  I hope this is clear that it works on hardware correctly.

https://www.youtube.com/watch?v=hfOQlNP … e=youtu.be

(code BOOBOO)
6217B330 00000000
B217ACF8 00000000
927FFFA8 F7FF0000    (Y)
C0000000 00000002
000000BC 00004000
DC000000 00000004
D0000000 00000000
94000130 FFFB0000    (select)
C0000000 00000002
000000BC 00005000
DC000000 00000004
D2000000 00000000


and yes that was an syntax error on my previous post.  sorry about that.

Offline

#10 2016-11-20 22:32:28

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,168

Re: Cheat engine action replay bug with repeat code type r5575

OK, this makes it hang on Y. Not crash. Please learn the difference.

Here's what I'm seeing:
the D2 code is run inside an IF block. When it branches back up to line 4, the IF context remains active, blocking out the processing of line 4 and thus keeping the loop from ever progressing.

It may be that the codes are implemented wrong: D2 should be decrementing the loop counter instead of relying on C0 to do it. There's a lot about this code I don't like.  It is also unclear whether D2 should end the IF context. However the only "documentation" I see about this is at http://nintendq.ephpbb.com/t45-action-replay-code-types which is not very exact and is not written to be useful to a programmer.

Is there any other docs you can link me to?

Changing D2 to clear the IF flag fixes the hang but does make the cart rise infinitely. It may be different bugs.

Perhaps it would help if you gave me a 'trace' of how you expect the code to work, including all the loops, and describing why the branches are taken or not taken at each point.

But docs would be better

Offline

#11 2016-11-21 01:39:06

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Cheat engine action replay bug with repeat code type r5575

heres the only doc i know of that explains AR code types. im not sure if this is the information you're looking for.
http://doc.kodewerx.org/hacking_nds.html

all i know is DC000000 00000000 sets the amount of bytes for the repeat code type C0000000 00000000 to write the next location.

so for example:

A code that looks like this.

B217ACF8 00000000
000000BC 00004000   (player)
000000C0 00004000
000000C4 00004000
000000D0 00017000
00000664 00004000  (cpu1)
00000668 00004000
0000066C 00004000
00000678 00017000
00000C0C 00004000 (cpu2)
00000C10 00004000
00000C14 00004000
00000C20 00017000
000011B4 00004000  (cpu3)
000011B8 00004000
000011BC 00004000
000011C8 00017000
D2000000 00000000


can be simplify to look like this.

B217ACF8 00000000
C0000000 00000003 (player and cpu 1 2 and 3)
000000BC 00004000   
000000C0 00004000
000000C4 00004000
000000D0 00017000
DC000000 000005A8
D2000000 00000000

Offline

#12 2016-11-21 04:16:22

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,168

Re: Cheat engine action replay bug with repeat code type r5575

That was more helpful. It does confirm that D2 should end the IF context.
Unfortunately that didn't fix the rising bug.
I need to re-assess and likely re-write all the code to be sensible.  I don't feel like looking at this old code to try and find a tiny bug in it. There are probably other tiny bugs I can fix by just doing it right.
This will take some time.

Offline

#13 2016-11-21 06:25:33

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Cheat engine action replay bug with repeat code type r5575

Ah ok.   Well i wouldn't call this a tiny bug since it kinda breaks the repeat function.   Anyways i hope it works out on your end.

Offline

#14 2016-11-28 01:38:23

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Cheat engine action replay bug with repeat code type r5575

So hows the fix coming along?

Offline

#15 2016-11-29 03:13:49

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,168

Re: Cheat engine action replay bug with repeat code type r5575

You were in time-out for saying how important your bug is, not to mention jumping to an egocentric "interrupts what I'm trying to do" interpretation of tiny instead of an equally plausible "size of error in code" interpretation. That's all very bad manners.

---

So, I started rewriting this stuff.

code BOOBOO contains a bug / is really weird. Luckily, this exhibits some fine not-thoroughly-documented details of how the ARDS works
Im going to comment it better so you can see why.

6217B330 00000000 //if some master condition for detecting game mode
   B217ACF8 00000000 //load offset
   927FFFA8 F7FF0000 //if Y button down
      C0000000 00000002 //setup 3x loop
         000000BC 00004000 //write scale factor
         DC000000 00000004 //add to offset
      //?????
   D0000000 00000000 //end if
   94000130 FFFB0000  //if sel button down
      C0000000 00000002 //setup 3x loop
         000000BC 00005000 //write scale factor
         DC000000 00000004 //add to offset
      D2000000 00000000 //loop up

It's missing a loop up for the Y case.
Let's say Y is being pressed.
When the D2 is processed, the flags (the entire stack!) is restored to the state snapped when the loop began.
Therefore we return to the "write scale factor" line--this is what enables us to set all 3 scale factors (the select button if block is correctly ignored).
That's not documented thoroughly (or at all) on kodewerx, but problemkaputt had it covered.

If select is being pressed, it functions normally--it's a proper loop unto itself entirely.

Your code BOOBOO2 is similarly bugged. Why you would write a code like this is beyond me.

code PINKPUFF doesn't contain a bug.

The levitating bug in prior desmumes was certainly caused by 1 value after the intended end of the loop being written.
Similar loop bounds bugs caused the hangs.
But now I run your bugged codes correctly (and the first two codes in OP)

I'm going to commit my new code. I hope you guys can find a way to get builds since we move to github.

Since I've rewritten all this code, I'm now required to support it without being a bitchy little baby constantly.

I need you guys to throw out whatever you think you knew about desmume AR support, and begin from scratch. Everything should work. If it doesn't, let's find out why and document it or fix it. I'm tired of shrugging and saying "I think the cheats are bugged, dunno why".

Please try codes using all kinds of code types. I'm likely to have created some new bugs. 0x0E and 0x0F in particular are tricky.

There are some new known issues which I've discovered. I'll be handling them in the near future, if appropriate.

1. There are differences between ARDS v1.54 and ARDS pre-v1.54. I don't know what was emulated before. Currently, pre-v1.54 is emulated. I'll be adding a toggle to let you pick which kind of device (unless you guys tell me v1.54 is IRRELEVANT.) All I know is, I still have about a 20% success rate entering codes I find, and I dont know why. I assume it's because whoever posted the cheats are idiots and posted broken cheats or cheats for the wrong version of ARDS or game. But I need you guys to tell me why for real.  Many of the differences introduced in 1.54 are likely rarely-used additional codes which will be annoying to supported.

2. There are hack #0 - hack #4 on the kodewerx site.  Are those hacks actually used? Those hacks work by editing the ARDS hook in memory. That can't possibly work in desmume as intended because we don't use the ARDS firmware which patches memory (I wish we did....)--I will need to handle each of them specially via a hardcoded whitelist--that is, IF you guys tell me they're actually used. We can definitely do it that way, though.

It would be nice if we wrote some test cases to cover some of the more complex logic relating to ~32 nested IFs and badly structured loops. Maybe make a code that changes mario's coin counter depending on a bunch of test BS. I'm making some pretty heavy assumptions in my code now which could be smoked out, but maybe there aren't many codes that are broken (but I suspect it's a bunch)

Offline

#16 2016-11-30 00:46:27

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Cheat engine action replay bug with repeat code type r5575

Why not post the new build to the nightly builds on your website, otherwise i can wait for emucr.com to publish a build to test.

the codes "BOOBOO and BOOBOO2"  are the same code.  i just change the value on 000000BC xxxxxxxx address when select was pressed on "BOOBOO" code so you could see the changes when a different button was pressed on that video i showed you.

D0000000 00000000
Ends the most recent conditional block.

1. ards is up to 1.71   1.54 ards firmware is dated
uk.codejunkies.com/support_downloads/Ar-firmware-1-71.zip

2. i never used them they didnt seem to make a difference for me when i was hacking on the ds.  im sure they help with something but i didn't benefit from them.

ill test everything i can once a build is out to work with.


https://www.dropbox.com/s/g0kor6s7v8n32 … S.chm?dl=0
heres the ards trainer tool kit manual. maybe it will explain code types and the ar codes technical end stuff a bit better since its official.  (check useful information first.) 
and fyi there is an error in the manual in the useful information section at D8?????? XXXXXXXX.  it saids its 32 bit but its actually 8 bit.

Those codes i posted above are simply to help debug the situation with the repeat code type and terminators.  this isnt "my bug" its a bug that effects any code on any game using C0000000 XXXXXXXX repeat code type.

Last edited by fintogive (2016-12-01 03:42:23)

Offline

#17 2016-12-01 04:11:00

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Cheat engine action replay bug with repeat code type r5575

zeromus wrote:

You were in time-out for saying how important your bug is, not to mention jumping to an egocentric "interrupts what I'm trying to do" interpretation of tiny instead of an equally plausible "size of error in code" interpretation. That's all very bad manners.

Ive been thinking about what you said here and honestly i don't know where you got that this is my bug or that you thought i was being egocentric.  like i said before.  These codes i posted are just for debugging the issue in desmume.

Seems like every bug report i post (especially about codes) you nail me for something.  This forum is for posting bug reports right? cause that all im try to do is point out the bugs in desmume.  but when you say i was in "time-out for being egocentric"  that was rather a good sock to the teeth in my opinion.  i simply asked you how things were going and said that the repeat function was broken due to this bug.
I don know if your just pulling my leg or truly mean that but...  Im just trying to help you improve desmume by pointing out the bugs, big or small.

Anyways once all the bugs are ironed out in your new cheat engine code you wont have to deal with me and my code bug reports anymore.

Last edited by fintogive (2016-12-01 04:16:07)

Offline

#18 2016-12-01 05:40:14

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,168

Re: Cheat engine action replay bug with repeat code type r5575

Yeah, you're overthinking it. Programmers just hate to hear someone analyze how big their bugs are, so I became a bitchy little baby. But I need your bug reports to iron out bugs in the new cheat code.

Offline

#19 2016-12-01 06:24:28

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Cheat engine action replay bug with repeat code type r5575

Alright well thats why im here.  So once a build emerges from enucr ill start checking it for you.

Offline

#20 2016-12-01 18:09:06

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,168

Re: Cheat engine action replay bug with repeat code type r5575

rogerman posts new builds on the desmume.org download page

Offline

#21 2016-12-01 22:25:44

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Cheat engine action replay bug with repeat code type r5575

ive checked the latest build there.  its the old build, it hasn't been update yet.

Also now that im thinking of it. can the select buttons default key be switch from Rshift to an apostrophe instead? its a lot easier to use since its next to enter which it the default key for start.

Offline

#22 2016-12-01 23:07:38

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,168

Re: Cheat engine action replay bug with repeat code type r5575

Apostrophe makes more sense (its not good to use modifier keys for buttons) but I dunno, it's been years now with those default keys. Some people will be disappointed shift no longer works.

Offline

#23 2016-12-01 23:14:27

AsPoke3172
Member
Registered: 2010-04-21
Posts: 205

Re: Cheat engine action replay bug with repeat code type r5575

Because Jei and Nichole at EmuCR don't know about Desmume was using GIT (GitHb) instead of SVN (SourceForge).... sad

Desmume GIT website are here!

https://github.com/TASVideos/desmume/

Zeromus, update your Wiki page about How To Build Desmume from GIT version.

Offline

#24 2016-12-03 12:59:35

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Cheat engine action replay bug with repeat code type r5575

ok i just checked out your new build.  everything ive tested so far works except.

F copy code type (does nothing)
E very broken sometimes writes the correct values but writes gibberish at the beginning and at the end  first 8 bits and last 2 bits with a 00000016 set on the end of the patch code)

DB and D8 8 bit load and stored code type  not sure which one might be both  (doesn't work at all.)

D0, D1 and D2 appears to work fine so far. (ill report back if i run in to an issue on these)

is there something specific you want me to test?


and ive been using the Apostrophe with out issues for years so its up to you but in my opinion its more convenient to press 1 key instead of 2 keys.

Offline

#25 2016-12-03 18:44:57

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,168

Re: Cheat engine action replay bug with repeat code type r5575

Why are you pressing two keys to press one button?
Can you please tell me which codes you tested exactly? Remember I can only find 20% of codes that work in the first place (and I dont know why) so I cant be sure that anything I'm testing is actually supposed to work

Offline

Board footer

Powered by FluxBB