ASM Helper tool

Started by Link, August 17, 2008, 09:00:01 AM

Previous topic - Next topic

Link

Well, I decided to write a little helper tool for people who like doing Assembler related codes. As many of you know the WiiRd code system allows you to write assembler code you can add into your game in real-time (C2/D2 codes - or in the code type document: CT6 --> CST1 ).

And well, it was kinda hard to do these kinda codes in my eyes.. writing assembly code.. save as text file.. runnning commands like (turns in.txt in out.bin):

powerpc-gekko-as.exe -mregnames -o source.o in.txt
powerpc-gekko-ld.exe -Ttext 0x80000000 -o source2.o source.o
powerpc-gekko-objcopy.exe -O binary source2.o out.bin

And then.. copy the contents of out.bin from a hex editor in a code, then count the lines, set the address and maybe it works.

So I decided to work on that..

http://wiird.l0nk.org/asmwiird.zip (253 KB)...

There is no readme.. this post will be the readme:

when you open the application it will first recognize that it can't find the assemblers/disassemblers and it will ask you for your WiiRd foldere as the assemblers/disassemblers can normally be found there:





if you have the Windows version of DevkitPro or DevkitPPC, you can also select the bin folder of it.. otherwise selecting the WiiRd folder should also do fine if you didn't trim it down! If the folder does not contain the required files, you'll be warned again however, the application will start. You can still change your work directory using the Settings menu. The work directory will be stored in a simple INI file!

You'll be greated by a very simple interface:



On the left side you can add your own PPC assembly code.. in the address box you enter the address where to link in the code. Then you click on "Tools" - "ASM -> WiiRd" or the arrow to the right and your code will be converted if it is valid, otherwise you'll see assembler issues:

Proper code:
http://wiird.l0nk.org/doc/asm4.png

Invalid code:
http://wiird.l0nk.org/doc/asm5.png

You can also disassemble code.. simply add a code (the last found C2/C3 gets auto-detected) and click the arrow to the left or select "Tools" - "WiiRd -> ASM" and your code will be disassembled:

http://wiird.l0nk.org/doc/asm6.png

I hope this app is of some use for people here!

Bug reports welcome, feature requests only to a certain extent!

Link

Lunar


Cross1955

Awesome! this is cool tool.
When the ASM code is made, I'm helped by this tool.

James0x57

OMG, DO WANT!

Thank you man! :D Very nice ^_^
...if only you had this out a week ago. *points at TP v2 USA master code*
lol


Nuke

great stuff Link, will add this to the site today, once I have sorted out the forum.
0xFFFFFFuuuuuuu

Black_Wolf

umm just a little question, what would be the appropriete way to find the address you want the asm to hook into? does it matter, like will it create a hook at that address, or do you need to locate your own through a breakpoint or reference etc?

brkirch

It is a great tool for ASM codes, thanks for making it!  :love
I was about to suggest that something needs to be added to make calculating branch instructions offsets easier, but then noticed that labels are supported. :)

Quote from: Black_Wolf;6389umm just a little question, what would be the appropriete way to find the address you want the asm to hook into? does it matter, like will it create a hook at that address, or do you need to locate your own through a breakpoint or reference etc?

You will need to locate the address to use yourself (usually using read and/or write breakpoints) and also you will have to figure out yourself what registers are safe to use.  The important thing that the insert ASM codetype does for you is memory management; the memory location for the ASM is determined by the cheat engine as are the branch instructions to and from the inserted ASM.  The only problem with this is that you have to use the CTR register if you want to branch to any game code, because you won't be able to use a relative offset for a branch instruction.

Black_Wolf

ah, so its probably easier to just use the code types, and if that not possible, to use the asm injection?

Power Marshall

Awesome, now I can get help with this tool!
God bless you, Link! ;)
-Power Marshall

IMMA FIRIN' MAH LAZER!!!

Wanna level up my BrawlCard?
Click here!

Info:
Brawl FC: 4940-5114-6951 (pm me if you add me! :D)
Wii #:
YouTube- youtube.com/pow

REDSOXROX

Thank you Link!
Although I still don't fully uderstand ASM codes:(
Red Sox vs. Yankees 4/4/2k10 Season Opener
Red Sox: 9 Yankees: 7 Final!

Power Marshall

Me either! :lol:
But I'll learn... :)
-Power Marshall

IMMA FIRIN' MAH LAZER!!!

Wanna level up my BrawlCard?
Click here!

Info:
Brawl FC: 4940-5114-6951 (pm me if you add me! :D)
Wii #:
YouTube- youtube.com/pow

REDSOXROX

Quote from: Power Marshall;9050Me either! :lol:
But I'll learn... :)

Looks like a good place to learn
Red Sox vs. Yankees 4/4/2k10 Season Opener
Red Sox: 9 Yankees: 7 Final!

Power Marshall

-Power Marshall

IMMA FIRIN' MAH LAZER!!!

Wanna level up my BrawlCard?
Click here!

Info:
Brawl FC: 4940-5114-6951 (pm me if you add me! :D)
Wii #:
YouTube- youtube.com/pow

quadra