BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup

Join the forum, it's quick and easy

BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup
BullyWiiHacks
Would you like to react to this message? Create an account in a few clicks or log in to continue.
BullyWiiHacks

Gaming, Modding & Programming

Important reminders:

- Click *HERE* for advanced forum search or check out the text field below on the front page for Google before posting
- NO support via private message (use the forum)
- Write meaningful topic titles
Site Translation
Latest topics
» Dropped Out of College to Pursue Web Dev and Life Pursuits in General
Bits, Bytes, Halfwords, and Words Empty4/7/2024, 2:34 pm by SnB@BWH

» Bully Made It Into a BIG Video 400K Views
Bits, Bytes, Halfwords, and Words Empty4/7/2024, 6:58 am by Bully@WiiPlaza

» Wii Play Tanks
Bits, Bytes, Halfwords, and Words Empty3/24/2024, 2:46 pm by helpmeout

» [Bypass Paywalls] (Global) @magnolia1234 - GitLab
Bits, Bytes, Halfwords, and Words Empty3/18/2024, 3:55 am by Seth@WiiPlaza

» [Download] Mary Shelley's Frankenhole
Bits, Bytes, Halfwords, and Words Empty3/16/2024, 8:29 am by Seth@WiiPlaza

» Completely Custom Modded Controllers (Undetectable)
Bits, Bytes, Halfwords, and Words Empty3/5/2024, 1:55 pm by Shadow@BWH

» (Zombies) Drink perks code?
Bits, Bytes, Halfwords, and Words Empty3/5/2024, 1:24 pm by Shadow@BWH

» Die Rückkehr zu STEAM und WARFACE
Bits, Bytes, Halfwords, and Words Empty3/2/2024, 3:54 am by Seth@WiiPlaza

» First person hand model change?
Bits, Bytes, Halfwords, and Words Empty2/28/2024, 4:53 am by Ad3lamac611

» {RELEASE} Field Raider Firefox v1.72 by Seth@WiiPlaza
Bits, Bytes, Halfwords, and Words Empty2/21/2024, 8:52 am by naxil

Search
 
 

Display results as :
 


Rechercher Advanced Search

May 2024
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  

Calendar Calendar

Country Statistics
Free counters!

You are not connected. Please login or register

Bits, Bytes, Halfwords, and Words

3 posters

Go down  Message [Page 1 of 1]

Welohabi

Welohabi
Moderator & Coder
Moderator & Coder

An Introduction to Bits, Bytes, Halfwords, and Words for Wii coding
by Welohabi

Understanding these basics are important to understanding the codes themselves. I have left out some details due to them not being important to Wii coding.

Let's start with some definitions first.

  • bit    -    A single binary digit, that can only have a value of 0 or 1.
  • nybble  -   4 bits
  • byte    -   8 bits
  • halfword  - 16 bits
  • word   -    32 bits


When dealing with Wii codes you are normally reading them in hexadecimal form.

For example:
Binary Decimal Hexadecimal
000000
000111
001022
001133
010044
010155
011066
011177
100088
100199
101010A
101111B
110012C
110113D
111014E
111115F
Notice that {A,B,C,D,E,F} are not letters, they are numbers! Hexadecimal "C" means decimal "12" just like binary "1100". Computers are designed to use hexadecimal because binary-hexadecimal handling is far more efficient than binary-decimal.

The hexadecimal number 1 is made up of 4-bits (0001) also known as 1 nybble.
The hexadecimal number 11 is made up of 8-bits (00010001) also known as 1 byte.
The hexadecimal number 1111 is made up of 16-bits (0001000100010001) also known as a halfword.
The hexadecimal number 11111111 is made up of 32-bits (00010001000100010001000100010001) also known as a word.

I'm sure you can see why it is easier to read the numbers in hexadecimal form versus reading them in binary. This should also help you to understand basic codetypes a little better.

Example 8-bit Code [Welohabi]
0012346B 00000011

Example 16-bit Code [Welohabi]
0212346A 00001111

Example 32-bit Code [Welohabi]
04123468 11111111


_________________
Please help me earn some extra Dropbox & MediaFire space. https://db.tt/2H7prurb2d www.mediafire.com/?renl53g

The energy you give, you shall receive.

Xylon

Xylon
Code Creator

Theres also Dword and Qword^^
What about the 06, 08, 12 and so on? Simply +8 bits? So 06 = 40 bits, and so on? I think it goes to 80, right?

Sincerely

Welohabi

Welohabi
Moderator & Coder
Moderator & Coder

Dword 64-bit and Qword 128-bit are not used in Wii coding really so they are not needed in this simple tutorial. Also "word" meanings can change depending on what you are applying them to but bit,nybble,and byte are universal. I have found some places that refer to a word as only 16-bit and a Dword as 32-bit.

06 08 12? <- I don't know what you mean or at least I don't understand what you are asking. If you are referring to codetypes then NO, A 32-bit direct write is the largest as far as I know. That is if you don't count the 06 codetype which allows you to write to as many bytes as you want starting with a specific address. After you write more than 4 bytes you are not writing to the same address anymore though.
Bits, Bytes, Halfwords, and Words Dl0Ok

The 00,02,04 codetypes I used as examples are simple 8-bit,16-bit, and 32-bit writes.
Bits, Bytes, Halfwords, and Words FgdnN
Bits, Bytes, Halfwords, and Words PVME7
Bits, Bytes, Halfwords, and Words Mswar


_________________
Please help me earn some extra Dropbox & MediaFire space. https://db.tt/2H7prurb2d www.mediafire.com/?renl53g

The energy you give, you shall receive.

Xylon

Xylon
Code Creator

Yes...This I also know, but what about the codetypes with the beginning like 12, 80 or what so ever:
Infinite Ammo [Skiller]
* 4A000000 90000000
* 1214AE22 00000063
* 120E06D2 00000063
* 1214AE26 00000063
* 120E06D6 00000063
* 1214AE2A 00000063
* 120E06DA 00000063
* 1214AE2E 00000063
* 120E06DE 00000063
* 1214AE32 00000063
* 120E06E2 00000063
* 1214AE36 00000063
* 120E06E6 00000063
* 1214AE3A 00000063
* 120E06EA 00000063
* 1214AE3E 00000063
* 120E06EE 00000063
* E0000000 80008000
There also codes with 80 or 81, this are the adresses, arent they? Like in this code:

Teleporter -PAL- [Bully@Wiiplaza]
C23BAB14 0000000B
3D408065 614AB89A
A14A0000 3D608170
2C0A100C 4082001C
81990000 918B1500
81990004 918B1504
81990008 918B1508
2C0A200C 4082001C
818B1500 91990000
818B1504 91990004
818B1508 91990008
EC4007F2 00000000
*Press C+Z+D-PAD_DOWN to save position*
*Press C+Z+D-PAD_UP to teleport*
Or may I have meesed up something...

Sincerely

Welohabi

Welohabi
Moderator & Coder
Moderator & Coder

Ok... Let's start with the first code.

4A codetype is setting the pointer address to 90000000.

12 codetype is just a 02 codetype that is using the pointer address instead of the base address.
Bits, Bytes, Halfwords, and Words FZL5g

For example, the 1214AE22 00000063 line is writing a 16-bit value the address 9014AE22. (I could be wrong on the exact address because I'm not that good with pointers)

The second code is a C2 codetype.
Bits, Bytes, Halfwords, and Words RyImV
C23BAB14 0000000B
This entire code is replacing the original ASM instruction at address 803BAB14 with the next 11 lines in the code which are all ASM instructions. B = 11

You can use PyiiASMH to see these ASM instructions which are:
lis r10,-32667
ori r10,r10,47258

lhz r10,0(r10)
lis r11,-32400
cmpwi r10,4108
bne- 0x001C
lwz r12,0(r25)
stw r12,5376(r11)
lwz r12,4(r25)
stw r12,5380(r11)
lwz r12,8(r25)
stw r12,5384(r11)
cmpwi r10,8204
bne- 0x001C
lwz r12,5376(r11)
stw r12,0(r25)
lwz r12,5380(r11)
stw r12,4(r25)
lwz r12,5384(r11)
stw r12,8(r25)
fmuls f2,f0,f31

Each instruction represents 8 digits of the code.
For example, these two instruction are the 16 digits on the second line of the code.
lis r10,-32667 = 3D408065
ori r10,r10,47258 =614AB89A


The 81 "codetypes" you are seeing are the lwz instructions.






This code also gave me a question of my own. I am curious to which part of the ASM are making the button activators work. I'm guessing it has something to do with the cmpwi instructions. Maybe Bully will let me know.


_________________
Please help me earn some extra Dropbox & MediaFire space. https://db.tt/2H7prurb2d www.mediafire.com/?renl53g

The energy you give, you shall receive.

Xylon

Xylon
Code Creator

This is very much an information...I need a German Tutorial Very Happy

Sincerely

Welohabi

Welohabi
Moderator & Coder
Moderator & Coder

The only German coder I know is Bully, you might be better off learning English. Unless he decides to make a shit ton of tutorials.


_________________
Please help me earn some extra Dropbox & MediaFire space. https://db.tt/2H7prurb2d www.mediafire.com/?renl53g

The energy you give, you shall receive.

Bully@WiiPlaza

Bully@WiiPlaza
 
 

Wiiplaza.tk has German tutorials. They may be old but who cares. I´ve written most of them. Wink


_________________
Bits, Bytes, Halfwords, and Words YBjg74I

Xylon

Xylon
Code Creator

Yay Very Happy I hope it will help. I really would like to be as good as the others Smile

Sincerely

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum