Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 21, 2010 16:35:52 GMT -5
Here's a code I made to make Majora's Mask much harder (for MM(U)): 81115970 081D 81115972 0000 81115974 2400 81740000 58A0 81740002 0002 81740004 0005 81740006 2880 81740008 0005 8174000A 2842 8174000C 01E5 8174000E C021 81740010 A498 81740012 0036 81740014 0804 81740016 565E 81740018 2400
Basically it makes Link take four times as much damage and recovery hearts only have half of their effect (haven't tested potions/fairies).
.org 0x80115970 j 0x80740000 ;anyone know if this area of RAM is always unused? nop .org 0x80740000 blezl a1, store ;if amount to add to health is negative sll a1, a1, 0x0002 ;*4 (<<2) srl a1, a1, 0x0001 ;else /2 (>>1) store: addu t8, t7, a1 ;calculate new health sh t8, 0x0036(a0) ;store health j 0x80115978 nop
|
|
|
Post by Jason777 on Sept 21, 2010 16:56:45 GMT -5
Nicccee O.O ASM looks hard...
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 24, 2010 15:47:06 GMT -5
It's not that hard, a good understanding of programming is useful though (which I don't really have). Have you tried programming before? If you have, what language have you used? Assembly code is a low level programming language, it takes longer to write and it's harder to spot errors but it can run faster than a high level language because you don't end up with unnecessary lines of code. I don't have mips-gcc set up and I don't program in C anyway so I haven't written any C hacks. I might look into that in the future though.
If you want me to I can give a tutorial on how I made this particular hack, it's not as complicated as it looks.
|
|
|
Post by linktank11 on Sept 24, 2010 21:59:40 GMT -5
hey can you make a tutorial?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 25, 2010 11:17:11 GMT -5
Ok, here's what you need: Nemu64 Renegade (or an assembler) First, start Nemu64 and load the MM (U) ROM. Start playing and go to Termina Field (or anywhere with enemies) and then pause the game using Nemu64's pause button. Now go to Plugins > Debugger: Memory. Type 801EF6A4 as the address as this is where Link's health is stored. Now set a write breakpoint at this address (right click). Now resume gameplay and get hurt by an enemy. This will make the game stop because it is writing to the address you set a breakpoint at. You should see this: You can hover over the lines of code with the mouse to see the values of each register. The command we're interested in for this hack is the one above the red line: 80115970 addu t8, t7, a1 This means: t8 = t7 + a1 or Link's new health = Link's old health + amount to add The value beside it is the address this piece of code is located at. This is the best place to jump out of the routine for this situation so that we can add our own code in. You can now start writing the assembly code for this (everything after a ; in a line is a comment): .org 0x80115970 ;this is where to start the code you're inserting j 0x80740000 ;jump to an unused location in RAM nop ;the command here is always executed before the jump is taken, just tell it to do nothing .org 0x80740000 ;start writing the rest of the code at this address Now we need to write the code for what we want to do. First, check if the amount that's being added to Link's health is positive or negative. This value is stored in register a1. This is the line of code we need: blezl a1, store ;branch on less than or equal to zero likely. If a1 <= 0 then it will execute the next line of code and then jump to the offset or label you give it, in this case, store. After this line we need the line to be executed if a1 <= 0. For this hack I used: sll a1, a1, 0x0002 ;left logical bit shift, a1 = a1 shifted left by 0x0002 bits. This gives the same result as multiplying by four. Now we need to write the code to be executed if a1 was greater than zero. srl a1, a1, 0x0001 ;right logical bit shift. a1 is shifted right by 0x0001 bits, has the same effect as dividing by two. Now we can write the rest of the code: store: ;this is the label store, where we jumped to if a1 was positive. addu t8, t7, a1 ;calculating Link's new health sh t8, 0x0036(a0) ;store halfword (two bytes) from t8 at memory offset a0 + 0x0036 j 0x80115978 ;jump back to original routine nop ;nothing needs to be executed here So here's what you should have now: .org 0x80115970 j 0x80740000 nop .org 0x80740000 blezl a1, store sll a1, a1, 0x0002 srl a1, a1, 0x0001 store: addu t8, t7, a1 sh t8, 0x0036(a0) j 0x80115978 nop Now in Renegade go to ASM > Assemble Codes and paste this in the box on the left. Now go to Cheating > Attach to emulator... and choose Nemu64 (8MB). Now tick the box that says Write to Emulator and press Assemble. The gameshark code will be shown on the right and will also be written to Nemu64's memory. Now if you go back to the game the code should have taken effect. This isn't the best tutorial because it's difficult to explain something like this.
|
|
|
Post by Jason777 on Sept 25, 2010 13:23:16 GMT -5
thanks a bunch deathbasket!! ^^ oh and i suggest u look at these programs as it leads me to believe that u don't need the GCC toolchain targetting MIPS and that u can just use some of these: www.zophar.net/utilities/n64dev.html
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 25, 2010 17:09:36 GMT -5
Those programs look pretty good (some of them I know already) but I don't program in BASIC either so I don't think that would be very useful for me. I'll stick with the way I do it at the moment because it works, even if some of the things I do are a bit crude (overwriting bits in code.zasm that I don't think are used so I can get my code to run in-game).
|
|
|
Post by alphaheiti on Sept 30, 2010 0:22:19 GMT -5
|
|
|
Post by linktank11 on Nov 9, 2010 18:39:32 GMT -5
Hey DeathBasket do you have a Download link for The assembler renegade?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 9, 2010 19:22:28 GMT -5
|
|
|
Post by linktank11 on Nov 26, 2010 0:50:16 GMT -5
Code: .org 0x80115970 ;this is where to start the code you're inserting j 0x80740000 ;jump to an unused location in RAM nop ;the command here is always executed before the jump is taken, just tell it to do nothing .org 0x80740000 ;start writing the rest of the code at this address
im having a problem with this where did you find this? and for the others blow this one i don't know where to start.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 27, 2010 9:35:57 GMT -5
I wrote that code. If you don't understand what assembly code is or how to use it you're best off just using the gameshark code I posted until you know what you're doing. Read this page: doc.kodewerx.org/hacking_n64.html#hack_asm
|
|
dogboi67
Full Member
[H:0][Mo0:0]
Posts: 92
|
Post by dogboi67 on Nov 28, 2010 5:33:52 GMT -5
you should program im trying to know how you assembly or whatever you told me the master sword in young links hand
|
|
|
Post by Jason777 on Mar 29, 2011 22:47:05 GMT -5
Sorry for posting in an old thread but I believe it's for a good reason. You should stickie this thread because it's one of the only ASM tutorials out there made specifically for an N64 Zelda.
|
|
|
Post by Dead on Mar 30, 2011 21:24:47 GMT -5
agreed! IvanX, Deathbasket, Anyone! Sticky it!
|
|