ASM Abkürzungen / ASM Abbreviations

Started by sniper82, January 25, 2012, 10:26:41 AM

Previous topic - Next topic

sniper82

hi leute
gibt es irgendwo eine liste mit den abkürzungen für asm?
Li = ?
STW= ?
habe zwar eine abkürzungen in einem post gefunden, aber da gibt es ja noch mehr, wie ich gesehen habe.
würde mich freuen, wenn jemand einen link hat, oder sich einer die mühe machen könnte eine zu schreiben danke.
------------------------------------------------------------------------------------------------------------
hi people
is there somewhere a list with the abbreviations for asm?
Li =?
STW =?
Although an abbreviation in a post I found, but there's still more, as I've seen.
I would be delighted if someone has a link, or to make an effortless one could write to thank you.
Translation by Goggle. I unfortunately only speak German

Stop ACTA and Sopa
http://wiird.l0nk.org/forum/index.php/topic,9178.0.html

goemon_guy

You're asking what some of the ASM instructions mean? Out of their abbreviated forms?

Li = load immediate
Stw = store word (or half-word, or byte, depending on the last character)

http://class.ee.iastate.edu/cpre211/labs/quickrefPPC.html

That link has alot of the non-abbreviated names, among other things to do with ASM.
-Currently hacking the following game(s):
...
Request a code via PM, if you wish.

megazig

google 6xx_pem.pdf or 7xx_um.pdf
6xx is easier to read overall, but 7xx is the chip that the wii has
don't cheap out and get a quick ref. the full docs are where it's at

sniper82

danke für die schnelle und kompetente hilfe.
ps. danke an alle hier die ihr großes und fundiertes wissen mit uns teilen. ;D
----------------------------------------------------------------------
thanks for the quick and competent help.
ps. thanks to everyone here who know their great sound and share it with us. ;D
Translation by Goggle. I unfortunately only speak German

Stop ACTA and Sopa
http://wiird.l0nk.org/forum/index.php/topic,9178.0.html

dcx2

It also helps to know some terminology.

An immediate is a value embedded into the instruction itself.  It does not come from a register.  Compare:

add r3, r4, r5 # adds r4 to r5 and stores the result in r3
addi r3, r4, 5 # adds the immediate 5 to r4 and stores the result in r3

A word is a 32-bit value (in general, a word is the width of a processor's registers; for the PPC, this is 32 bits).  So:

stw r3, 0(r4) # stores 32-bits from r3 to the address [r4 + 0]

A half-word is a 16-bit value.

sth r3, 0(r4) # stores 16-bits from r3 to [r4+0]

sniper82

#5
hi
also gesucht wird nach einem sternen code wie bei mario.
--------------------------------------------------------
hi
code is so sought after stars like Mario.

81175134: code address

Disassemble:80040628:  901F01E8   stw   r0,488(r31)

[spoiler]  CR:48200484  XER:20000000  CTR:80150EB0 DSIS:02400000
DAR:81175134 SRR0:80040628 SRR1:0000B032   LR:800404F0
 r0:0000016A   r1:802CE338   r2:802C3C40   r3:0000016B
 r4:0000016B   r5:00000000   r6:00000000   r7:00000030
 r8:00000002   r9:00000040  r10:00000022  r11:802CE328
r12:80150EB0  r13:802C2100  r14:00000000  r15:00000000
r16:00000000  r17:00000000  r18:00000000  r19:00000000
r20:00000000  r21:00000000  r22:00000000  r23:00000000
r24:00000000  r25:00000000  r26:93574D20  r27:91C42880
r28:00000000  r29:91C42DA0  r30:8020636C  r31:81174F4C

 f0:FFC00000   f1:59800004   f2:B9400000   f3:B7800000
 f4:C281FFFE   f5:42480000   f6:00000000   f7:3F800000
 f8:59800004   f9:3FAEEDCB  f10:BB394FFE  f11:39D1B717
f12:C22BDC0A  f13:00000000  f14:00000000  f15:00000000
f16:00000000  f17:00000000  f18:00000000  f19:00000000
f20:00000000  f21:00000000  f22:00000000  f23:00000000
f24:00000000  f25:00000000  f26:00000000  f27:00000000
f28:00000000  f29:00000000  f30:3E425D8D  f31:3E425D8D[/spoiler]


[spoiler]
80040600:  C00284B0   lfs      f0,-31568(r2)
80040604:  C8210080   lfd      f1,128(r1)
80040608:  EC211028   fsubs      f1,f1,f2
8004060C:  EC000072   fmuls      f0,f0,f1
80040610:  FC00001E   fctiwz   f0,f0
80040614:  D8010088   stfd      f0,136(r1)
80040618:  8001008C   lwz      r0,140(r1)
8004061C:  901F01E8   stw      r0,488(r31)
80040620:  807F01E8   lwz      r3,488(r31)
80040624:  3403FFFF   subic.   r0,r3,1
80040628:  901F01E8   stw      r0,488(r31)
8004062C:  41810078   bgt-      0x800406a4
80040630:  38000000   li     r0,0
80040634:  901F01E8   stw     r0,488(r31)
80040638:  387F0108   addi     r3,r31,264
8004063C:  4BFCC741   bl     0x8000cd7c
80040640:  801F0200   lwz     r0,512(r31)
80040644:  3C608020   lis     r3,-32736
80040648:  3863636C   addi     r3,r3,25452
8004064C:  54000776   rlwinm   r0,r0,0,29,27
80040650:  5400066E   rlwinm   r0,r0,0,25,23
80040654:  901F0200   stw     r0,512(r31)
80040658:  80030414   lwz     r0,1044(r3)
8004065C:  2C000002   cmpwi   r0,2
80040660:  40820020   bne-   0x80040680
80040664:  4800D591   bl   0x8004dbf4
80040668:  4800D5C5   bl   0x8004dc2c
8004066C:  2C030000   cmpwi   r3,0
80040670:  41810018   bgt-   0x80040688
80040674:  C0228478   lfs   f1,-31624(r2)
80040678:  4BFFE1D9   bl   0x8003e850
8004067C:  4800000C   b   0x80040688
80040680:  C0228478   lfs   f1,-31624(r2)
80040684:  4BFFE1CD   bl   0x8003e850
80040688:  881F0212   lbz   r0,530(r31)
8004068C:  28000002   cmplwi   r0,2
80040690:  41820014   beq-   0x800406a4
80040694:  807F01BC   lwz   r3,444(r31)
80040698:  38A00000   li   r5,0
8004069C:  809F01A8   lwz   r4,424(r31)
800406A0:  4BFCF149   bl   0x8000f7e8
800406A4:  809F0200   lwz   r4,512(r31)
800406A8:  54800673   rlwinm.   r0,r4,0,25,25
800406AC:  41820058   beq-   0x80040704
800406B0:  807F01EC   lwz   r3,492(r31)
800406B4:  3403FFFF   subic.   r0,r3,1
800406B8:  901F01EC   stw   r0,492(r31)
800406BC:  41810048   bgt-   0x80040704
800406C0:  801F01E8   lwz   r0,488(r31)
800406C4:  548306B0   rlwinm   r3,r4,0,26,24
800406C8:  546304E2   rlwinm   r3,r3,0,19,17
800406CC:  38800000   li   r4,0
800406D0:  2C000000   cmpwi   r0,0
800406D4:  909F01EC   stw   r4,492(r31)
800406D8:  907F0200   stw   r3,512(r31)
800406DC:  4181000C   bgt-   0x800406e8
800406E0:  5460066E   rlwinm   r0,r3,0,25,23
800406E4:  901F0200   stw   r0,512(r31)
800406E8:  7FE3FB78   mr   r3,r31
800406EC:  38800000   li   r4,0[/spoiler]

1 woher weiß ich das das die richtige adresse ist?
2 wie müste ich den code schreiben so vieleicht?

1 how I know this is the right address?
2 as I write the code Müster maybe so?

Li      r0,16b(r3)
stw   r0,488(r31)
nop

Translation by Goggle. I unfortunately only speak German

Stop ACTA and Sopa
http://wiird.l0nk.org/forum/index.php/topic,9178.0.html

Bully@Wiiplaza

#6
80040624:  3403FFFF   subic.   r0,r3,1 # li r0, 9999

Infinite Starpower
04040624 3800270F
My Wii hacking site...
http://bullywiihacks.com/

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

~Bully

sniper82

hi
nein es geht nicht um sternteile, sondern um einen unbesiegbar stern,sorry das ich mich falsch ausgedrückt habe
-------------------------------------------------------------------------------------------------------------
hi
no it's not about star-parts, but an invincible star, sorry that I have expressed myself wrong
Translation by Goggle. I unfortunately only speak German

Stop ACTA and Sopa
http://wiird.l0nk.org/forum/index.php/topic,9178.0.html

Bully@Wiiplaza

Quote from: sniper82 on January 25, 2012, 07:18:04 PM
hi
nein es geht nicht um sternteile, sondern um einen unbesiegbar stern,sorry das ich mich falsch ausgedrückt habe
-------------------------------------------------------------------------------------------------------------
hi
no it's not about star-parts, but an invincible star, sorry that I have expressed myself wrong
der code sollte trotzdem gehen :P

the code may work anyways :P
My Wii hacking site...
http://bullywiihacks.com/

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

~Bully

sniper82

nein der code geht leider nicht. das spiel startet nicht mal mit den code.
aber wie kommst du eigentlich auf diese adresse?
-------------------------------------------------
no, the code does not exist. The game does not start even with the code.
But how do you actually address this?
Translation by Goggle. I unfortunately only speak German

Stop ACTA and Sopa
http://wiird.l0nk.org/forum/index.php/topic,9178.0.html

WiiOs-Ozelot

#10
bei stw r0,488(r31) brauchst du nur mit li ersetzen.
Also  li r0, 100

80040624 ist dann die Adresse die du nimmst weil da stw ist.

04040624 38000064

Da wo der Breakpoint anhält, den Instruction nimmst du.

Ich wusste auch immer nicht was ich da schreiben soll aber Bully@Wiiplaza hat das bei uns im Forum verständlich erklärt und seitdem kann ich ASM Codes ^^ Also wenn man das verstanden hat, flutscht das nur noch.





Also

du siehst im Breakpoint am ANFANG das.

80040628:  901F01E8   stw r0,488(r31)

so, die Adresse 80040628 benutzt du um dein neuen ASM an dieser stelle zu schreiben wo stw steht. Wenn du als beispiel ein stern bekommst, geht die CPU an diesen Punkt und führt dein ASM Code aus wo normalerweise stw stand aber li r0, 100 steht und dann ausgeführt wird. Die CPU liest den neuen Instruction und führt es dann aus und gibt dir 100 sterne oder leben oder sonstwas.

Die Value 901F01E8 musst du nicht soooo drauf achten. ist nur eine Hexadezimale darstellung von stw r0,488(r31)


Der grund wieso ASM nicht sofort funktionieren liegt daran, das der neue ASM Code quasi erst dann aktiv wird, wenn die CPU an dieser stelle erst geht. Solange an der stelle nicht vom CPU gelesen wird, passiert in der zeit auch nichts.

Beispiel, ein ASM Moon Jump würde erst gehen, wenn man springen tut. Springt man nicht im Spiel, bleibt der ASM quasi unberührt.
Wichtig ist aber auch der zeitpunkt vom Breakpoint. Wenn du im Lade Bildschirm Breakst, und dein Instruction reinschreiben tust, KANN es passieren das dieser Instruction im Spiel nicht mehr benötigt wird und somit bleibt der ASM Code unberührt. Denn wie gesagt, der ASM kann nur logischerweise an den Zeitpunkt aktiviert werden wenn zu diesen zeitpunkt auch vom CPU zugegriffen wird.

Demnächst werde ich ein Basic Guide veröffentlichen in Zusammenarbeit mit Bully das verständlich und in Deutsch erklärt wird wie man einfache ASM Codes erstellt weil -zur Hölle- kaum Deutsche Beschreibungen gibt das hier mal verständlich und auf Deutsch erklärt wird wie man das macht. Die Leute hier sind mir eh komisch da hier eigentlich viele Deutsche gibt könnten die mal Deutsche Unterforen eröffnen. Das hatte ich damals hier vorgeschlagen aber hier sind nur sture Köpfe und ignoranten.
I'm make Gamecube Codes with SD Media Launcher and Gamecube Console (Not Wii) ^^

sniper82

hi
also so weit habe ich das verstanden was du mir sagen wolltest.
das mit den tut finde ich ne gute sache habe sowas auch in der art für anfänger gemacht zumindest das was ich bisher weis und gelernt habe, ist zwar nicht perfeckt, aber für die ersten schritte geeignet.
http://wiird.l0nk.org/forum/index.php/topic,9187.0.html
beim asm war es bisher er zufall wen ein code doch mal richtig funktioniert hat.
zum thema deutsch, ja da haste recht, aber wehre halt besser wenn man es auf deutsch und englisch posted, so mache ich es dan hat jeder was von. den es giebt hier wirklich fiele die deutsch reden da lohnt es sich.
danke für die erklärung.  :D
------------------------------------------------------------------------
hi
So as far as I've understood what you wanted to tell me.
does so with that I find ne good thing I never done well in the art for beginners, at least from what I've learned-looking and is not perfeckt, but suitable for the first steps.
http://wiird.l0nk.org/forum/index.php/topic,9187.0.html
asm when it had been he who has one random code works but sometimes true.
subject to German, so there're right, but just defend better if you do it in German and English posted, so I dan what any of it. the fall, there are really the German talk because it's worth it.
Thanks for the explanation. :D
Translation by Goggle. I unfortunately only speak German

Stop ACTA and Sopa
http://wiird.l0nk.org/forum/index.php/topic,9178.0.html

Stuff

Quote from: megazig on January 25, 2012, 12:26:33 PM
google 6xx_pem.pdf or 7xx_um.pdf
6xx is easier to read overall, but 7xx is the chip that the wii has
don't cheap out and get a quick ref. the full docs are where it's at
I guess I could use a 500 page read or two. >.>

Well I probably could. I've been using these, though:
http://www.pds.twi.tudelft.nl/vakken/in101/labcourse/instruction-set/
http://wiird.l0nk.org/forum/index.php/topic,8768.0.html

I learned a nice amount during that thread's life. But you guys talk about stuff that you can't just pickup from a quick ref. I guess I'll do some reading during my free time. It's a lot more than the PRG ;_;
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm

Deathwolf

#13
Schreibbefehle :

li = 8/16 bit = wie 00/02 codetype
lis = 16 bit = wie 02 codetype
lis and ori = 32 bit = wie 04 codetype

Speicher-Ladebefehle:

stb = speichert 8 bit value
sth = speichert 16 bit value
stw = speichert 32 bit value

lbz = ladet 8 bit value
lhz = ladet 16 bit value
lwz = ladet 21 bit value

Ein Beispiel wie man mit diesn Befehlen schon einen einfachen ASM code machen kann:
Wir nehmen an du möchtest z.B. unendlich leben haben. Deine Leben Adresse lautet 806E83C4.
Nun machst du einen Rechtsklick auf diese Adresse, klickst auf Breakpoint, stellst WRITE ein, klickst auf SET BREAKPOINT und verlierst noch ein leben bis das spiel freezt.

So nun erscheinen viele Adressen etc. Wir nehmen an dass das hier erscheint:

  CR:88000088  XER:00000000  CTR:807A9AFC DSIS:00000000
DAR:00000000 SRR0:805858D0 SRR1:0000B032   LR:805858C0
  r0:00000004   r1:80398FF8   r2:8038EFA0   r3:81123604
  r4:000000FF   r5:808B0000   r6:809C3844   r7:81123B98
  r8:811206C4   r9:8111F694  r10:00000018  r11:80399018
r12:807A9AFC  r13:8038CC00  r14:00000000  r15:00000000
r16:00000000  r17:00000000  r18:00000000  r19:00000000
r20:00000000  r21:802A4080  r22:00000000  r23:00000000
r24:00000001  r25:809C3614  r26:0000021C  r27:81123604
r28:00000000  r29:80890000  r30:00000000  r31:806E83C4

  f0:43110000   f1:00000000   f2:BD11A74D   f3:40400000
  f4:3FFFFA8F   f5:4686C5F7   f6:468892D3   f7:C55D57A1
  f8:C566446D   f9:4689B06D  f10:BE207C1F  f11:B05F8DC3
f12:40400000  f13:00000000  f14:00000000  f15:00000000
f16:00000000  f17:00000000  f18:00000000  f19:00000000
f20:00000000  f21:00000000  f22:00000000  f23:00000000
f24:00000000  f25:00000000  f26:00000000  f27:00000000
f28:00000000  f29:00000000  f30:00000000  f31:BD21E55A

80040628:  901F0000   stw r0, 0 (r31)         # Die erste Adresse ist immer unsere Hauptadresse!
8004062C:  41810078   bgt-      0x800406a4
80040630:  38000000   li     r0,0
80040634:  901F01E8   stw     r0,488(r31)
80040638:  387F0108   addi     r3,r31,264
8004063C:  4BFCC741   bl     0x8000cd7c
80040640:  801F0200   lwz     r0,512(r31)
80040644:  3C608020   lis     r3,-32736

Wenn wir uns einmal die Adresse genauer angucken:
stw r0, 0 (r31) = r0 hat unsere lebens Value. r0:00000004 
                          (r31) ist unsere Adresse die im RAM die lebens Value hat. r31:806E83C4

Der Befehl macht jetzt folgendes: Speichere die Value von r0 in r31.

Nun wie können wir unsere eigene Value schreiben? Wie gesagt, es gibt ja Schreibbefehle die wir nutzen können.
Da wir einen stw befehl haben (32 bit), müssen wir zum schreiben der value ebenfalls einen 32 bit Schreibbefehl verwenden.

lis r0,0x0000     # schreibe zu r0 : 0000XXXX
ori r0,r0,0x0063 # schreibe zu r0 : 000000064
stw r0, 0 (r31)   # speichere die r0 value in r31 ( unsere lebens Adrsse)

Wenn wir unseren code mit dem "ASM helper tool" conventieren, dann kommt diese code raus:

C2040628 00000002
3C000000 60000063
901F0000 00000000

Einfach einmal den code aktivieren, ein leben verlieren und sehen was passiert^^ Das praktische daran ist, das man dafür nie mehr pointers nutzen muss.

Write Instructions:

li = 8/16 bit = like 00/02 codetype
lis = 16 bit = like 02 codetype
lis and ori = 32 bit = like 04 codetype

Store/Load instructions:

stb = store 8 bit value
sth = store 16 bit value
stw = store 32 bit value

lbz = load 8 bit value
lhz = load 16 bit value
lwz = load 21 bit value
lolz

sniper82

hi leute
erstmal danke für die seiten und für die bomben erklärung.
bisher habe ich es auch so gemacht blos das meine codes so aufgebaut waren

lis rx,x
stw rx,x (rx)
nop

die codes laufen auch, aber schätze mal die andere art ist besser.
werde es morgen gleich mal bei kerby ausprobieren.

ps. die game config datei für kerby bringt das spiel zum absturz auch wenn kein code an ist.
bei kerby stürzt es immer dann ab wenn der lebens balken von der story verändert wird,
da widersprechen sich dann woll die angaben, da das spiel den lebens wert aus einer anderen adresse versucht zu schreiben,
kann man das proplem nicht mit einen on/off code lösen?
------------------------------------------------------------------------
hi people
thank you for the first part of the bomb and explanation.
so far I've only done so well that my codes were designed

lis rx, x
stw rx, x (rx)
nop

The codes run well, I guess, but other times the art is better.
'll try it tomorrow at the same time Kerby.

ps. the game config file for Kerby brings the game to crash even if no code is on.
at Kerby then it keeps crashing when the beam is changed by the life story,
since then wanted to contradict the disclosures, because the game tries to write the life value from another address,
you can not solve the proplem with an on / off code?
Translation by Goggle. I unfortunately only speak German

Stop ACTA and Sopa
http://wiird.l0nk.org/forum/index.php/topic,9178.0.html