Need Help for Making This Code Shorter

Started by Crapulecorp, August 22, 2011, 08:57:34 PM

Previous topic - Next topic

Crapulecorp

Hi everyone i'm trying to make a short codes for NBA 2K11 [SB5P54] :

[spoiler]Max Stats My Player Mode [Crapulecorp]
0256FE8A 0000EC63
02544EC0 0000FFFF
02544EC2 0000FFFF
02544EC4 0000FFFF
02544EC6 0000FFFF
02544EC8 0000FFFF
02544ECA 0000FFFF
02544ECC 0000FFFF
02544ECE 0000FFFF
00544ED0 000000FF
02544ED1 0000FFFF
02544ED2 0000FFFF
02544ED3 0000FFFF
02544ED5 0000FFFF
02544ED7 0000FFFF
02544ED9 0000FFFF
00544EDA 000000FF
00544EDB 000000FF
00544EDC 000000FF
00544EDD 000000FF
02544EDE 0000FFFF
00544EE0 000000FF
02544EE1 0000FFFF
02544EE3 0000FFFF[/spoiler]

I have many writes to consecutive bytes. So i will shorten this with an 06 String Write.  http://www.geckocodes.org/index.php?arsenal=1#06

I made this code but just some are working :

[spoiler]Max Stats My Player Mode [Crapulecorp]
0256FE8A 0000EC63
06544EC0 00000018
0000FFFF 0000FFFF
0000FFFF 0000FFFF
0000FFFF 0000FFFF
0000FFFF 0000FFFF
06544ED0 00000007
000000FF 0000FFFF
0000FFFF 0000FFFF
06544ED5 00000006
0000FFFF 0000FFFF
0000FFFF 00000000
06544EDA 00000007
000000FF 000000FF
000000FF 000000FF
0000FFFF 00000000
00544EE0 000000FF
06544EE1 00000004
0000FFFF 0000FFFF[/spoiler]

If anybody can tell me what i am doing wrong. Thx in advance  :) :) :)

Deathwolf

0256FE88 0000EC63
06544EC0 00000030
FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF
FFFFFFFF FFFFFFFF
lolz

Crapulecorp

Thanks a lot Deathwolf it works like a charm.

So i had just to do a single code in this case, and just enter the FFF value and not the 0000FFFF.

I was very far to find this. Again thanks a lot Deathwolf  :) :) :)

Deathwolf

#3
Yup no problem. Glad to hear it works  :)

Just to let you know how it works:
80544EC0 is your "hook address"

You  used 02 codetype (16 bit) to fill out. 16 bit + 16 bit = 32 bit.

02544EC0 0000FFFF
02544EC2 0000FFFF

Could be:
              C0C1C2C3
04544EC0 FFFFFFFF

and 06 would be:
06544EC0 00000004  # 04 means, how many bytes. (we have 4 FF values, one byte is XX [FF] )
FFFFFFFF 00000000
lolz

dcx2

#4
Since they're all the same value (0xFFFF) you can use a RAM fill.

0256FE88 0000EC63
02544EC0 0017FFFF

http://www.geckocodes.org/index.php?arsenal=1#02

Y = 17 -> write this 0x17 extra times (for 0x18 total)

Since this is 16-bit half-words, we need 0x18.  If you use 00 RAM fill instead,

0256FE88 0000EC63
00544EC0 002F00FF

This will write 0x30 (0x2F + 1) consecutive bytes with 0xFF.

Bully@Wiiplaza

#5
if you only want to write one same value, you could try ASM (BP read).
It´s 3 lines for all stats with same value.
Just saying. Since some people aren´t aware of that possibilty.
My Wii hacking site...
http://bullywiihacks.com/

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

~Bully