Pages: 12 »
Posted on 07-31-12, 06:36 pm
Red Paragoomba


Karma: 91
Posts: 2/64
Since: 07-31-12
http://gbatemp.net/topic/324530-mario-kart-zero/
Here you have details, I'm MKDS hacker, we've discovered all the files structure and all are editable now, but I need someone to help me breaking ARM9. Currently I need only to change karts order, can anyone help me?
BTW. Hi there, NSMBHD.
Posted on 07-31-12, 11:36 pm
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 9050
Posts: 2062/4434
Since: 06-08-11
Well, what you need here is ASM hacking.
Hard stuff, man

ARM9.bin is not a file like the others, it contains the game's code (the program).
It's just a big blob of data mixed with code that's copied to RAM when the ROM is loaded, and then it's executed.

Oh, and the overlay files also contain code, the thing you're looking for might be in them too
Finding what you want inside it is not easy, you can use the desmume RAM search (but that works for data that changes) and/or using a debugger, and/or making a RAM dump and disassembling it in a tool like IDA Pro

Dunno, look at the ASM hacking subforum in here, most of the stuff also applies to MKDS and any other game.

Also BTW NSMB Editor can also compile and insert ASM hacks into MKDS so you'll probably want to use it. I used it once to make a "cheat MKDS rom" to troll on multiplayer
I could give you the source code for that, but I don't think it'll help you to find out the kart data
Posted on 08-01-12, 07:10 am
Red Paragoomba


Karma: 91
Posts: 3/64
Since: 07-31-12
So, ASM is basically the same thing as I did years before in XSE editor for Advance Map? Too bad I actually only rewrote the code instead of making new. And the tutorial isn't easy. I'll simply wait for ray to perform anything... And Gericom to write ARM9 support... xD

I saw that SZS editor written by Chadderz does support that kind of code on the right side of Hex. Well, CARC isn't SZS. I think that writing new script isn't hard. INSERTING IT and CONNECTING to certain events is harder. Ray told me he'll be developing "Tricks" for MKDS. But how the f*ck can you connect jump to spin and get boost? It seems weird...
Posted on 08-01-12, 02:43 pm (rev. 1 by  ray on 08-01-12, 02:44 pm)
Roy Koopa


Karma: 3916
Posts: 1873/2722
Since: 06-26-11
You need to find the correct data in RAM. So I can make a if that controls if I am in air. Then it controls if I press "R" in air and if that happens I'll get a boost if "in air = false".
_________________________
See a lots of creative DS Hacking here
If you want to support me, you might check out my Patreon Page : )
Posted on 08-01-12, 04:24 pm
Red Paragoomba


Karma: 91
Posts: 4/64
Since: 07-31-12
The only thing I think about now, is... HOW THE F*CK?!
If Nintendo actually added the line in the code, then the physics of the in-air would change, but the same thing as on land happens, gravity.
Posted on 08-01-12, 04:27 pm
Roy Koopa


Karma: 3916
Posts: 1880/2722
Since: 06-26-11
What? I dont understand you lol. If no boolean for "In air" exists, then I have to do it with asking for collision...
_________________________
See a lots of creative DS Hacking here
If you want to support me, you might check out my Patreon Page : )
Posted on 08-01-12, 04:30 pm
Red Paragoomba


Karma: 91
Posts: 5/64
Since: 07-31-12
I actually meant,
If on land and press R = Theoretically the kart goes into air, but in fact if you place fall under the road and you fall, the game acts the same. There is NO "air" in MKDS. There is in MKWii and MK7. But if you'll do it in MKDS, you're awesome.
But I bet if it will work, tapping R on road will give same results.
Posted on 08-01-12, 04:30 pm
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 9050
Posts: 2068/4434
Since: 06-08-11
Well, I think you're not seeing what ASM hacking is. ASM hacking is about modifying the gsme's program. I recommend you to have basic programming knowledge before starting ASM hacking, preferably C/C++, and then try to learn ASM You'll see things clearer.

arm9.bin contains code, not data so hex editing alone won't help you.
And adding support in tools for "editing arm9" is impossible too.
Posted on 08-01-12, 04:34 pm
Roy Koopa


Karma: 3916
Posts: 1881/2722
Since: 06-26-11
I agree with dirbaio.
And szymmy:
It won't be a huge problem with simple programming. The actualy hard thing is, to find the stuff needed in RAM and make it work in the whole game. And if I fail, there's still a user called  Dirbaio who will help me, I think.
_________________________
See a lots of creative DS Hacking here
If you want to support me, you might check out my Patreon Page : )
Posted on 08-01-12, 04:35 pm
Red Paragoomba


Karma: 91
Posts: 6/64
Since: 07-31-12
Ahhh, I was so afraid of hearing it.

I used to try C++ for a while, but it scared me. xD
Also, I saw the ASM tutorials, and they seem insane and the right part is not similar to any programming language I ever saw.
So, XSE = ASM? By the way, I tried decrypting the ARM9 using NSMBe, but it didn't change anything (or I didn't see it to change). What's the tool you use to change Hex into that C/C++ code?
Posted on 08-01-12, 04:37 pm
Roy Koopa


Karma: 3916
Posts: 1882/2722
Since: 06-26-11
I still dont get what you mean with "HEX into C++ Code"...
And I think XSE is not the same, otherwise you would have known what ASM really is

Posted by szymbar15
I tried decrypting the ARM9 using NSMBe, but it didn't change anything

You mean decompressing?
_________________________
See a lots of creative DS Hacking here
If you want to support me, you might check out my Patreon Page : )
Posted on 08-01-12, 04:41 pm
Red Paragoomba


Karma: 91
Posts: 7/64
Since: 07-31-12
Getting that code:
http://www.coranac.com/tonc/text/asm.htm
from numbers and letters. Everything is made from numbers and letters.
Yes, decompressing.
Posted on 08-01-12, 04:44 pm (rev. 1 by  ray on 08-01-12, 04:44 pm)
Roy Koopa


Karma: 3916
Posts: 1883/2722
Since: 06-26-11
That are ASM instructions Its like any other Programming Language. Only... A bit different And how to put it in C++/C:
You need to define all the needed RAM adresses somewhere (If I understand dirbaios stuff right). Then you can use it with the "Hook" function.

Kill me if I'm wrong  Dirbaio
_________________________
See a lots of creative DS Hacking here
If you want to support me, you might check out my Patreon Page : )
Posted on 08-01-12, 04:45 pm
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 9050
Posts: 2070/4434
Since: 06-08-11
I don't know what XSE is. From googling it it seems it's some kind of a script used in Pokemon games?

In that case, yes and no. ASM is not the same as XSE, but the concept is the same, both are programs you can try to edit.
And no, arm9.bin can't be converted back to C++ code. It can be converted to ASM code. C/C++ can be used to then make your own code and insert it. (Look at the NSMB tile hack for an example). Learn C++ first because many of the concepts in C++ programming can be later applied to ASM. If you try to learn ASM directly you'll go nuts.

NSMBe can decompress arm9.bin, it just makes the file deompressed, it's useful if you want to later edit it to insert an ASM hack or something.

(Yea you're right ray)
Posted on 08-01-12, 04:50 pm (rev. 1 by  szymbar15 on 08-01-12, 04:51 pm)
Red Paragoomba


Karma: 91
Posts: 8/64
Since: 07-31-12
Posted by Dirbaio
I don't know what XSE is. From googling it it seems it's some kind of a script used in Pokemon games?

NOW IT'S JUST A TOOL THAT I USED TO KNOW. (By Gotye) It was used to write scripts and connect it to trainers, also it allowed some heavy stuff like Dive in FRLG, seasons or 649 Pokemon in that games.

Posted by Dirbaio
And no, arm9.bin can't be converted back to C++ code.

In fact, I actually meant
Posted by Dirbaio
It can be converted to ASM code.

and how.
Posted by Dirbaio
If you try to learn ASM directly you'll go nuts.

BP I LEARNED HEX IN FEW HOURS! xD
...I'm retarded, right...?

Posted by Dirbaio
NSMBe can decompress arm9.bin, it just makes the file deompressed, it's useful if you want to later edit it to insert an ASM hack or something.

How can I see the decompressed file in NSMBe later? Nothing happened after I pressed that button. Or... I think...
Posted on 08-01-12, 04:53 pm (rev. 5 by  ray on 08-01-12, 04:55 pm)
Roy Koopa


Karma: 3916
Posts: 1884/2722
Since: 06-26-11
Posted by szymbar15
BP I LEARNED HEX IN FEW HOURS! xD
...I'm retarded, right...?


LOL I learned it in 10 Minutes xD

Posted by szymbar15
How can I see the decompressed file in NSMBe later? Nothing happened after I pressed that button. Or... I think...


Use the HEX Edit button

EDIT: I failed badly when quoting
Posted on 08-01-12, 04:57 pm
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 9050
Posts: 2071/4434
Since: 06-08-11
To see the ASM code you can take arm9.bin and load it in a disassembler. (Or you can take a RAM dump). desmume has a (shitty) disassembler. no$gba debugger also has one. And there's also IDA Pro, that's the best.

All this makes me want to write some tutorials that explain all this... It'll e much easier to answer then questions like this.

And learning Hex is nothing compared to learning ASM
Posted on 08-01-12, 04:59 pm
Red Paragoomba


Karma: 91
Posts: 9/64
Since: 07-31-12
I meant, I discovered the contents as first on MKDS scene of my first hex file (BNBL) in few hours after learning Hex. And again, the HEX edit button doesn't let me see the ASM code.

And learning Hex is nothing compared to learning ASM

...okay...? I simply want to try.
Posted on 08-01-12, 05:00 pm
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 9050
Posts: 2072/4434
Since: 06-08-11
Nope, the hex editor button opens, well, an hex editor
You need a disassembler.
Posted on 08-12-12, 04:40 pm
☭ coffee and cream


Karma: 9951
Posts: 602/2664
Since: 06-26-11
The hex editor would let you view code, but under its binary form, instead of human-readable ASM.

You can usually tell if a block of data is ARM code easily. It has a fairly recognizable pattern: almost every 4th byte in the block is comprised between 0xE0 and 0xEF. I don't know how to recognize THUMB code in a binary blob, though.
_________________________
Kuribo64 - RH-fucking-cafe - Kafuka

zrghij
Pages: 12 »