Beginners Tutorials For newbs in distress.
#17
Posted 12 September 2004 - 11:03 PM

8-Bit Dragon, on Sep 12 2004, 07:40 PM, said:
No I meant turd. Like I said, I'm kinda messed up today so just pick out the parts that might work. I should be better tomorrow.
#18
Posted 13 September 2004 - 02:14 PM

Anyhow, on topic por favor.
Quote

Aah, satisfying thank you's.
What should I move onto next? Pallet hacking is one of the most basic things people do, yet they choose not to learn further and do it in hex. Maybe I could do Music hacking. What do you guys think?
The reason I ask is because I'm learning too. I wouldn't actualy know myself what offsets are in Sonic's pallet, the main pallet colours, etc, if it weren't for reaserch. And ESE.
#19
Posted 13 September 2004 - 04:25 PM

I wanna be able to mod it like I can (could) in Sonic 1.. if that's possible (I'm pretty sure it is.)
#20
Posted 13 September 2004 - 04:33 PM

8-Bit Dragon, on Sep 12 2004, 07:06 PM, said:
When I was trying to correct a palette for a sprite sheet, I originaly made the sheet using Gens' colors, but later I use Megasis to get cirtain sprites I couldn't in Gens and they were darker.
Okay, so maybe Gens' engine reads colors differently than Megasis, so I use SonED to sample colors... o_O Different again! Okay, lets try ESEII, OMFG!!! The same color on all 4 was a different shade/hue/brightness ><
So then, to get a genuine palette, I began using the values in the rom, thank god they show a pattern! Now, I began constucting a palette in PSP using the values as values for html colors. For example, I would turn 0E44 into #4040E0 in html values. This is the way Megasis does it, but another program wrote these same values as #4444EE *head explodes*. WHICH IS THE RIGHT WAY TO CONVERT!?
That's no dumb question but a good one.
First, let's look at the format of a Mega Drive color value:
Hexadecimal: $0BGR
Binary (16 bits): %0000bbb0ggg0rrr0
There are 3 bits per RGB component, meaning that each component can have 8 values: 0..7.
But PCs normally use 8 bits per component (values 0..255).
So, in order to convert an MD color to a PC color, you have to scale each component from 3 to 8 bits, and that can be done in several ways.
1) The accurate mathematical conversion which uses the full target range is "PCValue := MDValue * 255 / 7", with MDValue being a number from 0 to 7. To avoid having to do that calculation every time, you could also initialise a small lookup table with the converted values, rounded to the nearest integer.
MDValue --> PCValue 0 --> 0 1 --> 36 2 --> 73 3 --> 109 4 --> 146 5 --> 182 6 --> 219 7 --> 255
2) Separate the three components into individual bytes and shift each byte 4 bits to the left. That way, $0EEE would become $E0E0E0. This method is very fast because you only need bit shifts, no multiplications or divisions. But it has the disadvantage that the full dynamic range isn't used. $E0E0E0 is no perfect white, $FFFFFF would be it. This list shows the results of the conversion:
MDValue --> PCValue 0 --> 0 1 --> 32 2 --> 64 3 --> 96 4 --> 128 5 --> 160 6 --> 192 7 --> 224
3) There is a method that combines the benefits of the first (full range) and second (only bit operations required, no other arithmetics) ways. It works in all situations where you have to expand a certain number of bits.
The formula for our case here is "PCValue := (MDValue shl 5) or (MDValue shl 2) or (MDValue shr 1)", with "shl" being binary left shift, "shr" binary right shift and "or" binary OR. MDValue is a number from 0 to 7 again.
I'll try to illustrate what this does:
MDValue = %xyz (three bits) %xyz00000 (MDValue shifted 5 to the left) %000xyz00 (MDValue shifted 2 to the left) %000000xy (MDValue shifted 1 to the right) ---------- combine with OR %xyzxyzxy (resulting PCValue, using the full range of 8 bits)
The results of this function are the same as those of method 1. Neat, eh?
Finally, to convert an 8 bit PC component back into a 3 bit MD component, you just shift it 5 to the right (that is, you take the 3 most significant bits of the PC component and discard the rest).
#21
Posted 13 September 2004 - 04:38 PM

Drakmyth, on Sep 12 2004, 11:03 PM, said:
8-Bit Dragon, on Sep 12 2004, 07:40 PM, said:
No I meant turd. Like I said, I'm kinda messed up today so just pick out the parts that might work. I should be better tomorrow.
Actually, there is a difference between a turd and a newb. <_< But I am nether, I don't talk like a turd "I m4de aN c0ol h4cK!!!111" and I am not newb (new) to Sonic games/hacking. I merely have a few unresolved issues with image editing.
#22
Posted 13 September 2004 - 04:49 PM

Kles, on Sep 13 2004, 04:25 PM, said:
I wanna be able to mod it like I can (could) in Sonic 1.. if that's possible (I'm pretty sure it is.)
I advise you to read the Sonic QX manual, it's not that hard to understand, the program gets is easier to understand, and you can produce some severely kick ass sounds with it (like .hack//zero's CNZ music).
Thanks for the suggestion though, I had a feeling I might be doing that next.
Any more suggestions are welcomed with open arms.
Note to self: Read what you type in future.
#23
Posted 13 September 2004 - 07:26 PM

8-Bit Dragon, on Sep 13 2004, 04:38 PM, said:
Yeah, I know the difference and I'm feeling much more myself today. But it seems the problems here have been solved so I'll turn my attention elsewhere.
#24
Posted 14 September 2004 - 11:41 AM

#25
Posted 15 September 2004 - 12:35 PM

Note: :D YEY ARCHIVE MATERIAL FROM MOI :D
#26
Posted 19 September 2004 - 02:26 PM

It has really helped me out! When I first opened up Hex Workshop, and the Sonic 2 ROM, I was like :shocked: I almost cried myself to sleep it has that hard to understand. Now that I've read your tutorial, I have grasped a firm understanding of the basics!
Thanks!!

#27
Posted 19 September 2004 - 02:44 PM

#28
Posted 28 October 2004 - 07:44 AM

Begginers guide to Hex - What does it do, anyway?
Some people could say that hex is just numbers and letters. It is. But it also represents the binary code and the ASM code.
Binary code is basically 1's and 0's. The reason why nobody uses binary code in hacking is because it is so inconvenient to work with. The binary counting system works like this:
HEX --- BINARY
01 -----0001
02 -----0010
03 -----0011
04 -----0100
05 -----0101
06 -----0110
07 -----0111
08 -----1000
09 -----1001
0A -----1010
As you can already see, it's very tedious to work out what something like 4E75 would be in binary.
So what can one do with hex? Simple. Lots.
Since hex is basically a representation of binary (and stuff in ASM), and you can change what it represents, you can almost change anything. There are limitations though.
For example, in the pallet hacking tutorial (see page one, post one in this topic), you change the numbers and letters in hex so that the hex code changes what it represents. Pallets are only the start. With hex, you can change music, level layouts, pallets, and how things act. Of course, without a guide of some sort, it would be very frustrating to work out what piece of hex in the entire ROM does what. But I'll save that tutorial for a rainy day.
I hope this clears some things up for some people. And please, I'm still new to this, so if there are any mistakes tell me immediately.
EDIT: If anyone wants to red further on the hex system, there is a topic that has links to stuff about hex and 68kASM (which I won't go into.)
The topic with links. (Linky)