I need some serious geek help. I’m working on a little Xbox 360 transplant project and have to do some hex editing. I got some instructions from Xbox-Scene, but they are about as clear as mud to me, especially since I don’t understand hex values.
Here is the part of the instructions I don’t understand:
Find the two ports that your SATA chipset uses for data communication (see the MTKediting thread ( [COLOR=#000000]http://forums.xbox-scene.com/index.php?showtopic=514126[/COLOR] ) for more detailed info on how to do this), basically, you need to run ‘msinfo32’, then go to storage/scsi or storage/ide, depending on your SATA chipset and then look for the two adress lines that have a difference of 7 between them.
For example:
I/O-port 0x0000EFE0-0x0000EFE7
I/O-port 0x0000EFAC-0x0000EFAF
I/O-port 0x0000EFA0-0x0000EFA7
I/O-port 0x0000EFA8-0x0000EFAB
I/O-port 0x0000EF90-0x0000EF9F
I/O-port 0x0000E800-0x0000E8FF
In this example the two port numbers you are looking for (with difference of 7) are 0xEFE0 and 0xEFA0.
Here’s my list of ports:
I/O Port 0x0000DCA0-0x0000DCAF
I/O Port 0x0000DCB0-0x0000DCBF
I/O Port 0x0000DCC0-0x0000DCCF
I/O Port 0x0000DCD0-0x0000DCDF
I/O Port 0x0000DCE0-0x0000DCFF
I/O Port 0x0000DD00-0x0000DDFF
Can anyone tell me which two port numbers have a “difference of 7” in my list?
Talisker is correct, you can verify this just using the scientific mode of the windows calculator. The last digit of each value on the left is “0”, the last digit on each value on the right is an ‘F’. An ‘F’ = 15. The lowest differences for your IO ports are 15, some are higher.
docvego’s post already says this in so many words but if you’re curious, hex is just a way of counting in a different base, 16 in this case.
Normally we count in base 10 so we have 10 different symbols, 0-9 and we count from 0-9 adding a new place to the left as needed as the numbers wrap around past 9. Hex is the same thing except you count from 0 to 15 in each individual space and since we only have numeral symbols for 0-9 defined, in hex we use letters to represent values of 10,11,12,13,14 and 15 (A, B, C, D, E and F). The biggie base for computers is of course binary, base 2, where you only have 0 and 1 to count with.
Having said that even my programmer brain is hardwired for base 10 and beyond doing simple conversions of 8-bit color component values I generally just convert to decimal, do math and convert back if manually dealing with hex value. Base 2 math I can do more effectively in my head but the process looks more like logic tables than your usual arithmetic, which is exactly the point of it.
For getting it done intuitively and quickly in your head, I find it useful to break hex values into twos (or sometimes fours), since 0-255 is easy to work with, (2^8 being a familiar number and such). Makes the math go a lot quicker in your head. It’s what people usually do when dealing with logic circuits or computers running on assembly as well, because it becomes easier to break down into binary group by group. Or you could just convert, I guess, but sometimes that’s a hassle.
Oh, I agree about 0-255 which is why I mentioned that with 8-bit color components I’ll just do things in my head. In any case 99.9999% of the time I’m dealing with hex I’m sitting at the computer with an IDE open so I just use the computer to convert and/or calculate for me by tossing together a one-liner C program ala: