WiiRd forum

Wii & Gamecube Hacking => Wii Game hacking help => Topic started by: Black_Wolf on October 11, 2008, 01:09:24 AM

Title: Wii big-endian/little-endian
Post by: Black_Wolf on October 11, 2008, 01:09:24 AM
Sorry bout this, turns out memory viewing in wii is backwards to how I learnt it, making it a lot easier, no real need for a guide! Thanks to spunit262 for the heads up, sorry for the trouble!

Link edit: The discussion made sense, I locked but not delete.. maybe it's interesting for one or the other!
Title: Re: -HACKING GUIDE- The memory view...how to read and understand it!
Post by: spunit262 on October 11, 2008, 01:43:11 AM
The Wii is big endian not little endian .
Title: Re: -HACKING GUIDE- The memory view...how to read and understand it!
Post by: Black_Wolf on October 11, 2008, 01:52:15 AM
oops I meant to put that, for some reason I wrote little lol, its still all described as big endian.
Title: Re: -HACKING GUIDE- The memory view...how to read and understand it!
Post by: spunit262 on October 11, 2008, 01:56:21 AM
No, you described little endian.
little endian is LSB (least significant byte) first.
Big endian is MSB (most significant byte) first.
Title: Re: -HACKING GUIDE- The memory view...how to read and understand it!
Post by: Black_Wolf on October 11, 2008, 03:14:22 AM
so are you saying that the wii is actually written in full 1:1 bytes. As in the offset from the base address, corresponds directly.

Is it like

0x805567C8 8c 74 56 ac

is

0x805567C8 0x8c7456ac


OR is it like how I described in the guide, being

0x805567C8 0xac56748c


I don't have a gecko but i assumed it would be structured the same way as other consoles which use the the first byte as the last one in the memory viewer. cs.usmass.edu says this

"Big Endian" means that the high-order byte of the number is stored in memory at the lowest address, and the low-order byte at the highest address. (The big end comes first.) Our LongInt, would then be stored as:

    Base Address+0   Byte3
    Base Address+1   Byte2
    Base Address+2   Byte1
    Base Address+3   Byte0


Thats what I was describing wasn't it?
Title: Re: Mod remove this please!
Post by: Black_Wolf on October 11, 2008, 03:36:31 AM
lol watched the guide, turns out that it is 1:1 you're completely right. No real need for a guide, its pretty self explanitory lol
Title: Re: Mod remove this please!
Post by: Link on October 11, 2008, 08:48:20 AM
I won't delete it might be an interesting problem to other ones coming from PC hacking.. I lock however.. Wii is big-endian:

so: if you see 12 34 56 78 in memory the 32 bit value is 12345678, unlike PCs where it would be 78563412.
Popular little-endian systems for example are DS (ARM9), GBA (ARM7) (note: ARM systems may be big- or little-endian just DS and GBA are little) or typical Intel or AMD based PCs (both 32 bit x86 and 64 bit - both are little endian). All current-gen consoles are big-endian.. for the last gen.. as far as I know Xbox and Dreamcast were little the rest was big-endian. Xbox 360, PS3 and Wii are all big-endian.