ASM ON/OFF Switch

Started by sniper82, February 18, 2012, 02:04:19 AM

Previous topic - Next topic

sniper82

pyiiasmh
hi leute habe ein problem mit diesem code
er soll mit drücken des buttons b, an und wider aus gehen, aber es ist ein asm code.
habe es mit der anleitung von Bully@Wiiplaza versucht, klapt aber leider nicht, brauche ich dazu dieses programm pyiiasmh wen ja? wie bekomme es nicht zum laufen habe win 7 mit welchen programm muss ich das öffnen?
-----------------------------------------------------------------
hi people have a problem with this code
He should press the buttons with b, to go out and resist, but it is an asm code.
I tried the instructions from Bully@Wiiplaza klapt but unfortunately I need for this program pyiiasmh Who will you? I do not get it to run on windows 7 with what program should I open it?

Game SUKP01 - Kirby's Adventure

weapons code

Adresse: 804D4634

lis r12,0x8167
ori r12,r12,0x3AFC
lhz r12,0(12)
andi. r12,r12,0x0400
beq- THE_END
li r12,0x01 # 1= small sword
stw r30,24(r29)

THE_END:

stw r30,24(r29)
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

Download    python-2.6.5  for pyiiasmh
I'm make Gamecube Codes with SD Media Launcher and Gamecube Console (Not Wii) ^^

Deathwolf

Der ganze code kommt mir ziemlich komisch vor!? Was soll der code genau machen?
Ich sehe Folgenes:

lis r12,0x8167                        # das sollte deine Button Adresse sein? In range 81?
ori r12,r12,0x3AFC
lhz r12,0(12)
andi. r12,r12,0x0400              # Der B button
beq- THE_END
li r12,0x01 # 1= small sword    # Überschreibe den B button mit dem Wert 01?
stw r30,24(r29)                    # Wenn B gedrückt ist, schreibe den originalen Wert von r30 in r29?

THE_END:

stw r30,24(r29)                     # Wenn B nicht gedrückt ist, schreibe den originalen Wert von r30 trotzdem in r29?


lolz

sniper82

#3
habe mich an dieses tut gehalten so gut wie es ging. das tut ist von dir Deathwolf
http://hyperspeed.1talk.net/t1220-tut-button-activator-into-asm-c2-code#19873

was der code machen soll ist einfach. er soll den wert 1 aktevieren und wider ausschalten so das man auch andere waffen bekommen kann als nur das kleine schwert = wert 1

dachte mir das so
xxxxx schreibe in die ersten 16 bit register r30,0x0000
xxxxx schreibe in den zweiten teil des registers den wert 0001(kleines schwert wird eingeschaltet)
xxxxx bei drücken der b taste addiere zu r30,0x0001 1 dazu (nun soll der wert 0002 betragen)
xxxxx vergleiche den wert aus r30 beträgt er 0023 dann springe zu wert 0025
xxxxx vergleiche den wert aus r30 beträgt er 0029 dann springe zurück zur 1 anweisung

0024 ist der kleine drache der muss übersprungen werden

waffen liste + adresse + orginal asm anweisung
http://wiird.l0nk.org/forum/index.php/topic,9245.0.html
---------------------------------------------------------------------
I'm doing this to hold as much as I could. of you is doing the Deathwolf
http://hyperspeed.1talk.net/t1220-tut-button-activator-into-asm-c2-code # 19873

what to make of the code is simple. He is the one worth four acts and against off so that you can get other weapons than just the small sword worth 1 =

I thought the so-
xxxxx write in the first 16-bit register r30, 0x0000
xxxxx write in the second part of the registers to the value 0001 (small sword is turned on)
xxxxx at press the b button add up to r30, 0x0001 1 thereto (the amount is now worth 0002)
xxxxx compare the value of r30 is it worth 0025 to 0023 then jump
xxxxx compare the value of r30 is it then jump back to a 0029 statement

0024 is the little dragon to be the skipped

weapons list + address + original asm instruction
http://wiird.l0nk.org/forum/index.php/topic, 9245.0.html


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

#4
nein, das geht nicht.
Man muss in den RAM schreiben und dann die Value wieder auslesen.
Register werden immer entleert. Du hast noch viel zu lernen...
Benutz lieber den CC Wechsel, für den Anfang... ::)

---

No, that doesn´t work like this.
You have to write to the RAM and then, read that value to decide what to execute in your code.
Registers are always clearled on each execution. You still have a lot to learn.
Just use the CC switch for now. ::)
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 ja ich weis muss noch ne menge lernen,
deswegen stelle ich ja auch so fiele fragen.
aber zu dem was du geschrieben hast bully,
gut zu wissen das heist ich muss nach dem ich die erste zeile vertig habe,
den befehl geben den ram wider auszulesen, und erst dan soll er zu dem wert aus dem
ram 1 dazu rechnen. so weit richtig?

ps wen ich meinen asm code habe wo muss ich dann was einsetzen den bei einem normalen
code habe ich ja nur eine adresse + wert
beim asm sind es aber drei adressen und drei wert zeilen kannst du mir das erklären?

danke im vorraus
-------------------------------
hi yes I still need to have lots of learning-oriented,
why yes, I have also fell ask Sun
But to what you wrote bully,
good to know that I need to heist the first line I have Pop groups,
give the command to read the ram resist, and he is dan only to the value of the
ram expect one to do so. so far right?

ps who I've used my asm code where do I have what the normal case of a
I have only one code address + value
asm when there are but three addresses and three lines worth can you explain that?

thanks in advance
Translation by Goggle. I unfortunately only speak German

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

sniper82

so noch mal,

_Gleichende:      # (3) mach hier weiter
lis r30,0x0000      # lese die ersten 16 bit des registers 30 und überschreibe die zweiten
ori r30,r30,0x0001   # überschreibt die zweiten 16 bits des registers 30 und lässt die ersten unberührt
stw r30,24(r29)      # Schreibe 32bit Wert von Register 30 nach Register 29 mit Offset 24 in den RAM
lwz r30,24(r29)      # Lade 32bit Wert von Register 29 mit Offset 24 in Register 30
cmpwi r30,0x23      # Vergleiche ob register 30 den wert 23 hat
beq- _GLeich      # (1) wenn das so ist
blt- _Kleiner      # (4) wenn kleiner 23
_Kleiner:              # (4) mach hier weiter

lwz r30,24(r29)      # Lade 32bit Wert von Register 29 mit Offset 24 in Register 30
addi r30,r30,1      # Addiert den Wert 1 zu r30 und schreibt das Ergebnis in r30
_Gleich:              # (1) mache hier weiter
lis r30,0x0000      # lese die ersten 16 bit des registers 30 und überschreibe die zweiten
ori r30,r30,0x0025   # überschreibt die zweiten 16 bits des registers 30 und lässt die ersten unberührt
stw r30,24(r29)      # Schreibe 32bit Wert von Register 30 nach Register 29 mit Offset 24 in den RAM
lwz r30,24(r29)      # Lade 32bit Wert von Register 29 mit Offset 24 in Register 30
addi r30,r30,1      # Addiert den Wert 1 zu r30 und schreibt das Ergebnis in r30
cmpwi r30,0x23      # Vergleiche ob register 30 den wert 29 hat
beq- _GLeichende     # (3) wenn das so ist


Translation by Goggle. I unfortunately only speak German

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

dcx2

You don't need PyiiASMH unless you're trying to compile non-C2 codes (or multiple C2 codes in one pass).  ASMWiiRD will work for all single C2 codes.  Just make sure you resize the window so that the text doesn't wrap from one line to the next.

I don't think you're looking for on/off switch.  It sounds to me like you want an action to happen once each time a button is pressed.

This part is probably wrong.

lis r12,0x8167
ori r12,r12,0x3AFC
lhz r12,0(12)

For one thing, that seems VERY high up in memory, too high to be a button activator.  Also, usually the buttons are the last half of a 32-bit word (lhz = Load Half-word and Zero).  So instead of 81673AFC you would want 81673AFE.

For the "correct" button activator, there is usually a word immediately after it in memory.  This word will be set for the frame that a button is pressed or released.  It does not show up on searches because you would have to search the very same instant you pressed the button.  But if you go into Memory Viewer and press "pause", then hold the B button down, and then hit Next Frame once or twice while still holding B, you will see it.  Hit Next Frame again and it goes back to 0, while the original button activator still says B is being pressed.

sniper82

hi danke für den tip mit dem button aktivator.
ja du hast recht habe mich falsch ausgedrückt der code soll bewirken das bei kirby die waffen auswahl immer einen valure hoch
geht und dan wider zum code anfang springt.

habe es entlich geschaft ein deutsches asm buch zu hollen, hoffe es hielft mir das hier alles besser zu verstehen.

---------------------------------------------------------------------------------------------------------------
hi thanks for the tip with the activator button.
yes you did me wrong in terms of the legal code will cause the weapon selection in the kirby always a high valure
and dan is contrary to the code beginning jumps.

did it via public geschaft hollen asm to a German book, hope hielft me here to understand everything better.
Translation by Goggle. I unfortunately only speak German

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