WiiRd forum

Wii & Gamecube Hacking => Wii Game hacking help => Topic started by: denden51 on December 18, 2009, 11:42:38 AM

Title: How do you....
Post by: denden51 on December 18, 2009, 11:42:38 AM
create a inf ammo code?

and how would you structure the code itself?

i have tried to make inf ammo but i feel as if i am not doing it right.

if someone could confirm how to make it, then that could be great
Title: Re: How do you....
Post by: codhacker on December 18, 2009, 11:54:56 AM
find the value for the ammo in mem viewer, write a breakpoint, then nop the sub address.

PS: this is nacho  ;D
Title: Re: How do you....
Post by: Maniac on December 18, 2009, 04:16:25 PM
Or nop the store...
Title: Re: How do you....
Post by: denden51 on December 19, 2009, 12:20:27 PM
Quote from: Maniac on December 18, 2009, 04:16:25 PM
Or nop the store...

right thanks, but i am still learning things like "nop" and strucuting breakpoints, so a simpler description would be nice.  And apparently online codes are frown apon here, but what about if it was a code that takes you offline agen?
Title: Re: How do you....
Post by: codhacker on December 19, 2009, 01:35:22 PM
Quote from: denden51 on December 19, 2009, 12:20:27 PM

right thanks, but i am still learning things like "nop" and strucuting breakpoints, so a simpler description would be nice.  And apparently online codes are frown apon here, but what about if it was a code that takes you offline agen?
if you use online codes offline it will freeze your wii, im guessing the same from offline to online.

All you do is go to the disassembler after you breakpoint, then search for the "Sub" its close to where the breakpoint is set, so just nop that and you'll have infi ammo.
Title: Re: How do you....
Post by: denden51 on December 19, 2009, 06:24:09 PM
Quote from: codhacker on December 19, 2009, 01:35:22 PM
Quote from: denden51 on December 19, 2009, 12:20:27 PM

right thanks, but i am still learning things like "nop" and strucuting breakpoints, so a simpler description would be nice.  And apparently online codes are frown apon here, but what about if it was a code that takes you offline agen?
if you use online codes offline it will freeze your wii, im guessing the same from offline to online.

All you do is go to the disassembler after you breakpoint, then search for the "Sub" its close to where the breakpoint is set, so just nop that and you'll have infi ammo.
ok thanks but could u give a basic understanding on things such as breakpoinnt and r0(what ever thta is)
Title: Re: How do you....
Post by: wiiztec on December 19, 2009, 10:27:19 PM
r0 is a register the registers are used to store temporary values that ASM instructions write and read from the RAM

Breakpoints will freeze the game and show you the registers and assembly instructions that are present the instant before a RAM address you specify gets read, written to, or excuted in the case of an excute breakpoint the RAM address that you choose for the breakpoint should be an ASM instruction

Theirs a checkbox labeled exact match & if that's not on the breakpoint may freeze the game when adjacent addresses are read, written to, or excuted
Title: Re: How do you....
Post by: codhacker on December 22, 2009, 11:56:29 AM
Quote from: denden51 on December 19, 2009, 06:24:09 PM

ok thanks but could u give a basic understanding on things such as breakpoinnt and r0(what ever thta is)
you dont need to know registers for infi ammo, just change the WHOLE instruction to nop, and it will stop you from losing ammo (makes losing ammo 'no operation' aka nop)
Title: Re: How do you....
Post by: wiiztec on December 22, 2009, 02:09:31 PM
Sometimes just nopping it will prevent you from getting the ammo in the first place it happened for my infinite ammo code for bully so to fix it I instead inserted a instruction to refill the ammo to max before the weapon is fired
Title: Re: How do you....
Post by: Hitman12 on January 10, 2010, 12:11:29 AM
i am having trouble even finding the ammo value.  Its 32 bit right?  Do i search for the ammo of one gun at a time?  Do I add grenades and other stuff when searching for it?  Thanks.
Title: Re: How do you....
Post by: xcoopa on February 03, 2010, 02:22:26 PM
 i found grenades in 8bit and amo in 16bit
Title: Re: How do you....
Post by: GMO on February 03, 2010, 04:33:07 PM
It depends on the ammo structure, simply NOP'ing it wont get the effect like stated before.

80A4DAA8 Current Ammo Address
Set Breakpoint (Write)
800A8C20:  90030020   stw   r0,32(r3)
800A8C24:  38210010   addi   r1,r1,16
800A8C28:  4E800020   blr  
800A8C2C:  9421FFE0   stwu   r1,-32(r1)
800A8C30:  7C0802A6   mflr   r0
800A8C34:  3CA08000   lis   r5,-32768
800A8C38:  2C040000   cmpwi   r4,0
800A8C3C:  90010024   stw   r0,36(r1)
800A8C40:  3805FFFF   subi   r0,r5,1
800A8C44:  93E1001C   stw   r31,28(r1)
800A8C48:  7C9F2378   mr   r31,r4
800A8C4C:  93C10018   stw   r30,24(r1)
800A8C50:  7C7E1B78   mr   r30,r3
800A8C54:  9001000C   stw   r0,12(r1)
800A8C58:  80630020   lwz   r3,32(r3)
800A8C5C:  4081001C   ble-   0x800a8c78

800A8C20 60000000 nop

Ammo Doesn't Decrease
040A8C20 60000000

Just doing the nop operation will get your effect, the ammo will not decrease BUT it will not also increase.  What if the game loads a stage and starts your ammo at zero then loads up the click when play starts? Your SOL! Infinite Ammo would look like

C20A8C20 00000002
3C000098 6000967F <- Ammo is set to 9999999; LOL
90030020 00000000

This was just an example I took from a Pokemon Money code. it uses the same concept
http://wiird.l0nk.org/forum/index.php/topic,3641.msg35517.html#msg35517

All games with ammo are different though

Most AMMO codes are 8 to 16Bit, but the majority are 8Bit simply because they deal with clips and reloading.

For example lets say a game has two ammo address when you do a search.
Lets say you have a gun with 250 Bullets being max so your search is FA with is 8bit
250/250 meaning there is a current and max ammo
for example sake you screen says

80432101 FA
80432103 FA

shoot a couple bullets and lets say you have 241 bullets, do a search for F1
80432101 F1 <- Only this address changed
80432103 FA

80432101 is the address for current ammo; your code would be
00432101 000000FA Unlimited Ammo