How to make an increase/decrease ASM code?

Started by Bully@Wiiplaza, September 28, 2010, 12:08:15 PM

Previous topic - Next topic

dcx2

Yes, YYYY = the button combination you want to activate your code.

Very important: this is like 28______ 0000YYYY if code.

You must use andi./beq- if you want 28______ MMMMYYYY if code.

PyiiASMH should work.  I don't think ASMWiiRD does branch labels.  So you have to manually calculate each branch distance.  If you add any instructions between the branch and the destination, you must recalculate that branch.  This is quite tedious and error prone...you would be better off making PyiiASMH work.

Deathwolf

lis r12,0x8075
ori r12,r12,0x6102
lhz   r12,0(r12)
andi. r12,r12,0x0200
beq- THE_END
li r12,0x777
stw r12,48(r31)

THE_END:

lwz   r3,48(r31)

wanna claculate it? lol  :p
it's very hard without pyiiASMH
lolz

dcx2

That's an easy one.

branch distance = (number of instructions to skip + 1) * 4

In that example, we want to skip 2 instructions.  (2 + 1) * 4 = 12 = 0x0C.

Try calculating these branch distances...

http://wiird.l0nk.org/forum/index.php/topic,6517.msg55339.html#msg55339

Bully@Wiiplaza

#18
I try to get it working now, if it´s that good :P

PyiiASMH.py is a text data and not the program self... that´s why it´s not working, there is nowhere an exe data to launch it!
I installed Phyton.
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

dcx2

Make sure you install Python 2.6.5 and PyQt4 for Python 2.6.  Use these links.

http://wiird.l0nk.org/forum/index.php/topic,4845.msg55412.html#msg55412

You are correct, .py files are text data.  Python is an interpreted language, which means that you're given the source code and the program is "compiled" on the fly.  Once you have Python installed properly, double-clicking on a py file should automatically launch the app.

Bully@Wiiplaza

yes it works!
lol... I have never delt with such a crazy program, so I didn´t know how it works, time for some ASM codes with branches :)

xD
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

matt123337

Quote from: Deathwolf on September 28, 2010, 09:03:45 PM
lis r12,0x8075
ori r12,r12,0x6102
lhz   r12,0(r12)
andi. r12,r12,0x0200
beq- THE_END
li r12,0x777
stw r12,48(r31)

THE_END:

lwz   r3,48(r31)

wanna claculate it? lol  :p
it's very hard without pyiiASMH
Buddy:

lfs f29, 132(r7)    # water offset
  lfs f27, 40(r7)     # Link's Y
  lis r9, 0xC000      # conditinal value
  lis r12, 0x8000     # Base address
  stw r9, 0x98(r12)   # stores conditinal to memory
  lfs f17, 0x98(r12)  # loads conditinal as a float
  mcrf cr4,cr0        # saves cr0 to cr4
  fcmpo cr0, f29, f17 # checks if in water or not
  ble END             # if we arn't, goto end
    lis r9, 0x40F0      # 7.5 in float
    stw r9, 0x98(r12)   # stores 7.5 in float to memory
    lfs f17, 0x98(r12)  # loads the 7.5 as float
    fadd f27, f27, f17  # adds 7.5 to links Y pos
    fadd f27, f27, f29  # adds water offset
    stfs f27, 0x98(r12) # stores final float to mem
    lwz r5 ,0x98(r12)   # loads final float into register 5
END:
mcrf cr0,cr4        # restores cr0 from cr4
stw r5, 128(r7)     # writes to ground Y

Will be made fine in Wiird (not the python one), just maximize the window :P

BTW this in my OOT walk on water code.

Bully@Wiiplaza

wtf, is this a jesus mode code O.o
oh yeah, walk on water, but I will NEVER ask for a TuT, too hard for now at least xD
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

matt123337

lol I was following parasite's notes on his original n64 code XD, it's not that hard of a code (for OOT at least)...

dcx2

I could never make ASMWiiRD accept branch labels or line comments.  :confused:  Was I using the wrong version or something?

matt123337

#25
idk. want me to zip mine with the file needed?

EDIT:http://www.mediafire.com/?19iz5r7daqdprmr

Bully@Wiiplaza

but everybody already has this files, if he is running gecko dotnet or wiiRd... :P
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

matt123337

I know, just for some reason mine supports labels & comments, and his doesn't :|

Bully@Wiiplaza

hmm how would you do this with masked button activators?

lis r12,-32736
ori r12,r12,3904
lhz r12,0(r12)
cmpwi r12, ZZZZ
bne- _END

thx for replys!
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

trackme

lis r12,-32736
ori r12,r12,3904
lhz r12,0(r12)
andi. r12, r12, ZZZZ
beq- _END

xD :D