MP3's in Cave Story

Jan 26, 2010 at 3:46 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 32
Pronouns: he/him
I've investigated further, and it's divided into 100 sections (1 for each org melodic instrument) of 256 bytes each.
 
Jan 26, 2010 at 5:26 PM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
wedge of cheese said:
I've investigated further, and it's divided into 100 sections (1 for each org melodic instrument) of 256 bytes each.

Which means...?
 
Jan 26, 2010 at 6:55 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
I'm guessing it means the game is only set up to reach each wav as 256 bytes long, and works kinda like SHR [wav #], 16 to find the data. Or would that be SHL? Either way, it means it would require modification of the game engine to read different lenght WAVs, and if you're going to take it that far and find where the WAV is accessed, why not go the whole 9 yards and just make it run MP3 data. You said you could possibly "Stick in" ORGveiw, so couldn't you do something similar with a thing that plays MP3 files?
 
Jan 26, 2010 at 7:53 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 32
Pronouns: he/him
What Noxid said. You're limited to 256 samples per instrument (for melodic instruments).

To confirm this, I even wrote a program that used the wave100 resource extracted using resource hacker in conjunction with an org file to create a wave file of the org, and it sounded exactly like it does in orgmaker (except without panning and drums, so I just used an org that had no panning or drums).

I would imagine that it would be possible to hack in a larger wave100 using resource hacker, and then do an assembly hack so that each instrument has a much longer sample (i.e. 65536 instead of 256). Assuming Cave Story's audio sampling rate is 44100 Hz (which is pretty standard), that would allow you about a 1.5 second sample for each instrument. By having an org with 8 notes on 8 different instruments, you could have an audio clip about 12 seconds long. You could increase that by <CMUing to a different org with different instruments after a <WAI0600 (about 12 seconds). The problem with this is that game time (which TSC is based on) and real time (which the audio is based on) don't always line up. In theory, there are 50 game frames per second, but if there is any lag whatsoever, then game time and real time go out of sync.

I will continue to investigate this.
 
Jan 27, 2010 at 4:51 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
I just remembered, all the drums are stored as .pxt and can be found with the SeaTone, so they probably aren't editable at all. At least, not in the way you want.
 
Jan 27, 2010 at 8:42 PM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Hmmm...
Well.
There is always to option of splicing in an MP3 decoder and adding a second set of music commands (<MP3, <MPS ...?) to play MP3 tracks. :rolleyes:
 
Jun 8, 2010 at 8:17 AM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Sorry for the bump, but you have to read the first post. :D
 
Jun 8, 2010 at 8:26 AM
Assistance
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: May 7, 2009
Location:
Posts: 547
I seriously fucking love you Noxid.
 
Jun 8, 2010 at 8:29 AM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Ralren said:
I seriously fucking love you Noxid.

Three cheers for Noxid? </random>

Either way, yes.

This is what insanity can get you, kids. ^_^
 
Jun 8, 2010 at 8:49 AM
Assistance
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: May 7, 2009
Location:
Posts: 547
DragonBoots said:
Three cheers for Noxid? </random>

Either way, yes.

This is what insanity can get you, kids. ^_^

Wait, what do you mean by
1.) Apply the assembly binaries (assembly.txt) first?

I didn't really know what that meant, due to my shitty understandings, but I was soo stoked right now that I just hit RunMe.bat. After doing so, I put in a org with a v2 drum, but the song is just silent. : <
 
Jun 8, 2010 at 2:26 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
Ralren said:
Wait, what do you mean by
1.) Apply the assembly binaries (assembly.txt) first?

I didn't really know what that meant, due to my shitty understandings, but I was soo stoked right now that I just hit RunMe.bat. After doing so, I put in a org with a v2 drum, but the song is just silent. : <

Yeah. What you need to do is get OllyDbg or a hex editor and binary paste the binary in the text document at the addresses listed. Once that's done, make sure the WAV resources are added properly with resource maker (If they have the wrong names it wont' work btw) and you *should* be good to go.

Oh, but do make a backup first :]

Idunno if he mentions this in a .txt somewhere but basically what this thing allows is:
1) use of OrgMakerV2 Custom Drums OR whatever WAV sample you may so choose to replace them with
2) The full contingent of Eight (8) drum tracks
3) Cats

Also I can be excessively lazy so there's an 18% chance the binary in that txt may be incomplete. If somebody says they applied them properly and it still doesn't work then I'll double check it :/

Also could a mod change the title of the thread to "Cave Story WAV Drum Hack" or some such?
 
Jun 8, 2010 at 7:46 PM
Assistance
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: May 7, 2009
Location:
Posts: 547
Noxid said:
Yeah. What you need to do is get OllyDbg or a hex editor and binary paste the binary in the text document at the addresses listed. Once that's done, make sure the WAV resources are added properly with resource maker (If they have the wrong names it wont' work btw) and you *should* be good to go.

Oh, but do make a backup first :]

Idunno if he mentions this in a .txt somewhere but basically what this thing allows is:
1) use of OrgMakerV2 Custom Drums OR whatever WAV sample you may so choose to replace them with
2) The full contingent of Eight (8) drum tracks
3) Cats

Also I can be excessively lazy so there's an 18% chance the binary in that txt may be incomplete. If somebody says they applied them properly and it still doesn't work then I'll double check it :/

Also could a mod change the title of the thread to "Cave Story WAV Drum Hack" or some such?

Hm, how do you put the .wav's in resource hacker? There's only one. '~'
 
Jun 8, 2010 at 8:12 PM
In front of a computer
"Man, if only I had an apple..."
Join Date: Mar 1, 2008
Location: Grasstown
Posts: 1435
Noxid said:
Yeah. What you need to do is get OllyDbg or a hex editor and binary paste the binary in the text document at the addresses listed. Once that's done, make sure the WAV resources are added properly with resource maker (If they have the wrong names it wont' work btw) and you *should* be good to go.
Um. Why would you do such a thing? Write a script to do it for them!

Noxid said:
Also I can be excessively lazy so there's an 18% chance the binary in that txt may be incomplete. If somebody says they applied them properly and it still doesn't work then I'll double check it :/
There is no binary in that .txt file, only hex.

Moreover, there is literally nothing anywhere to explain how to "apply" those changes. Are they simply inserts? If they are inserts, then the order matters; were they designed to be inserted in the order listed, or in descending order of the insert location? Or are they replacements? If so, how much do you replace? What's the offset of the end of the range that you're replacing?

If they are replacements and you expect users to count bytes so that the number of bytes replaced equals the number of bytes of the replacement, that's not very useful.

And why make them have a hex editor when you could automate the entire process in just a few lines of code, thus eliminating the errors that will inevitably occur doing it manually?

P.S.: DragonBoots, please do not break causality with your edits, okay?
 
Jun 8, 2010 at 9:19 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
You seriously overanalyze this stuff bro. I guess it is hex but I called them binaries because in OllyDbg the button you press is BINARY PASTE and BINARY COPY to get and use them.

@Ralren: You have to select "Add resource" with Resource Hacker and follow the steps and such. I've not actually done this myself yet but DB seems to be able to make it work and anyway his whatchamacallit adds the resources by itself anyway doesn't it?

Okay Ima break it down step by step:

1) open the text document. This is usually achieved by the double-click but there are other methods.
2) You will notice a line or two of "=" characters at the very top. Please do not be alarmed as this is for decorative purposes only.
3) The next line will have the numbers "427040". If you are using OllyDbg as your instrument of choice then this is the address you must go to using the "ctrl-g" thing. If you are using a hex editor then you may have to subtract "400000" to find the right one! This is critical.
4) Past the address you will see many hex numbers. Place the cursor before before the first number of the first hex pair (in this case, 55) and *click* and drag the mouse down until you have highlighted the last number of the last hex pair (here 90). With the selection still highlighted, right click with the mouse and select "Copy" or with the keyboard press "ctrl-c". Be careful not to press "c" before "ctrl" or it will not work!

--- From here the instructions apply specifically to OllyDbg as I have no experience with these procedures in Hex editors. Oh well. ---
5) Go back to Olly, which should be at the proper address, "427040". With the mouse, left click the command at "427040" and hold the left mouse button in while dragging the mouse downwards to highlight a selection. You must highlight a large selection to be sure that all the code gets applied - in this case it will be the entire function. If you are not sure you have enough then keep going. If you then thing you might have enough keep going further. A bit more. Okay, stop now, that should be fine.
6) With the selection highlighted, release the left mouse button. Now, put the mouse cursor anywhere within the gray "highlighted" area and click the right mouse button; a menu will pop up. Move the mouse over the item labelled "Binary" and a second menu will pop up. From this second menu, select "Binary Paste". A portion of the selection should turn red to indicate that changes have been made.
7) Now that this selection has been changed, return to the text document and, repeating steps 3-6 as necessary, continue until all the changes have been made.
8) Once all the changes have been made, we must commit the changes or all this work will have been for naught. In OllyDbg, right-click anywhere on the code to summon the menu. Select the option "Copy to executable..." and then from the next set of options select "All modifications". When the popup dialogue box appears, select the "Copy All" option. Once it has finished, there will be another popup window with what appears to be code in it. When you try to close it with the "X" in the top-right, you will be prompted to save. Save it under a new name, and once that is complete you have finished!

Wow you are right this is an extremely difficult and arduous process involving eight (8!) steps, some of which must be repeated multiple times. Clearly I am asking too much the onus should be on me to learn a programming language well enough to write the code required to make hex edits to cave story automajically.

EDIT: I think I scrood up the thing this line here

Code:
41b440
68 90 37 49 00 8D 55 E4 52 E8 E2 5B 06 00 83 C4 0C 85 C0 75 06 C6 45 F7 01 EB 19 6A 06 68 98 37
49 00 8D 45 E4 50 E8 C5 5B 06 00 83 C4 0C 90 90 C6 45 F7 02 0F BE 4D F7 85 C9 75 07 33 C0 E9 11
05 00 00 6A 6C 8B 55 FC 52 8D 85 70 FF FF FF 50
should be 41bb40 not 41b440 as there are two 41b440 and this should not be. The first of the two is the one that probably needs to be changed
 
Jun 8, 2010 at 10:07 PM
Assistance
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: May 7, 2009
Location:
Posts: 547
Noxid said:
You seriously overanalyze this stuff bro. I guess it is hex but I called them binaries because in OllyDbg the button you press is BINARY PASTE and BINARY COPY to get and use them.

@Ralren: You have to select "Add resource" with Resource Hacker and follow the steps and such. I've not actually done this myself yet but DB seems to be able to make it work and anyway his whatchamacallit adds the resources by itself anyway doesn't it?

Okay Ima break it down step by step:

1) open the text document. This is usually achieved by the double-click but there are other methods.
2) You will notice a line or two of "=" characters at the very top. Please do not be alarmed as this is for decorative purposes only.
3) The next line will have the numbers "427040". If you are using OllyDbg as your instrument of choice then this is the address you must go to using the "ctrl-g" thing. If you are using a hex editor then you may have to subtract "400000" to find the right one! This is critical.
4) Past the address you will see many hex numbers. Place the cursor before before the first number of the first hex pair (in this case, 55) and *click* and drag the mouse down until you have highlighted the last number of the last hex pair (here 90). With the selection still highlighted, right click with the mouse and select "Copy" or with the keyboard press "ctrl-c". Be careful not to press "c" before "ctrl" or it will not work!

--- From here the instructions apply specifically to OllyDbg as I have no experience with these procedures in Hex editors. Oh well. ---
5) Go back to Olly, which should be at the proper address, "427040". With the mouse, left click the command at "427040" and hold the left mouse button in while dragging the mouse downwards to highlight a selection. You must highlight a large selection to be sure that all the code gets applied - in this case it will be the entire function. If you are not sure you have enough then keep going. If you then thing you might have enough keep going further. A bit more. Okay, stop now, that should be fine.
6) With the selection highlighted, release the left mouse button. Now, put the mouse cursor anywhere within the gray "highlighted" area and click the right mouse button; a menu will pop up. Move the mouse over the item labelled "Binary" and a second menu will pop up. From this second menu, select "Binary Paste". A portion of the selection should turn red to indicate that changes have been made.
7) Now that this selection has been changed, return to the text document and, repeating steps 3-6 as necessary, continue until all the changes have been made.
8) Once all the changes have been made, we must commit the changes or all this work will have been for naught. In OllyDbg, right-click anywhere on the code to summon the menu. Select the option "Copy to executable..." and then from the next set of options select "All modifications". When the popup dialogue box appears, select the "Copy All" option. Once it has finished, there will be another popup window with what appears to be code in it. When you try to close it with the "X" in the top-right, you will be prompted to save. Save it under a new name, and once that is complete you have finished!

Wow you are right this is an extremely difficult and arduous process involving eight (8!) steps, some of which must be repeated multiple times. Clearly I am asking too much the onus should be on me to learn a programming language well enough to write the code required to make hex edits to cave story automajically.

EDIT: I think I scrood up the thing this line here

Code:
41b440
68 90 37 49 00 8D 55 E4 52 E8 E2 5B 06 00 83 C4 0C 85 C0 75 06 C6 45 F7 01 EB 19 6A 06 68 98 37
49 00 8D 45 E4 50 E8 C5 5B 06 00 83 C4 0C 90 90 C6 45 F7 02 0F BE 4D F7 85 C9 75 07 33 C0 E9 11
05 00 00 6A 6C 8B 55 FC 52 8D 85 70 FF FF FF 50
should be 41bb40 not 41b440 as there are two 41b440 and this should not be. The first of the two is the one that probably needs to be changed

Alright, first off I want to say thank you for the tutorial, it means alot.
However, for some reason, the game won't start up, well it does, but when it plays music the game crashes. So I'll tell you what I did, in images:

diph.php
 
Jun 8, 2010 at 10:31 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
Step #4 is where you deviated and that's probably where it didnt' work. I'm going to try and test it on my own mod so I'll see if it actually works.

EDIT: Okay. I was write about the thing above and also I forgot another edit. Here's all it should need to work now.

Code:
=========================================================================

427040
55 8B EC 83 EC 18 56 8B 45 08 8B 48 68 C1 E1 04 89 4D E8 83 C1 10 89 4D F0 C7 45 EC 00 00 00 00
C7 45 F4 10 00 00 00 8B 45 08 83 78 4C 01 75 1F 8B 45 08 83 78 68 01 7E 16 83 6D E8 20 81 45 EC
80 00 00 00 83 6D F0 20 81 45 F4 80 00 00 00 8B 45 08 83 78 74 00 0F 85 BE 00 00 00 8B 4D 08 83
79 4C 00 74 09 8B 55 08 83 7A 4C 01 75 7C 68 FF 00 00 00 6A 00 E8 96 82 FE FF 83 C4 08 88 45 FF
8A 45 FF 50 E8 F7 E7 FF FF 83 C4 04 8B F0 68 FF 05 00 00 68 00 02 00 00 E8 73 82 FE FF 83 C4 08
0F AF C6 99 81 E2 FF 01 00 00 03 C2 C1 F8 09 8B 4D 08 89 41 10 8A 55 FF 52 E8 B2 E7 FF FF 83 C4
04 8B F0 68 FF 05 00 00 68 00 02 00 00 E8 3E 82 FE FF 83 C4 08 0F AF C6 99 81 E2 FF 01 00 00 03
C2 C1 F8 09 8B 4D 08 89 41 14 6A 04 6A 00 E8 1D 82 FE FF 83 C4 08 8B 55 08 89 42 68 6A 03 6A 00
E8 0B 82 FE FF 83 C4 08 8B 4D 08 89 41 64 8B 55 08 C7 42 74 01 00 00 00 EB 52 8B 45 08 8B 40 10
6B C0 14 99 B9 15 00 00 00 F7 F9 8B 55 08 89 42 10 8B 45 08 8B 40 14 6B C0 14 99 B9 15 00 00 00
F7 F9 8B 55 08 89 42 14 8B 45 08 8B 48 08 8B 55 08 03 4A 10 8B 45 08 89 48 08 8B 4D 08 8B 51 0C
8B 45 08 03 50 14 8B 4D 08 89 51 0C 8B 55 08 8B 42 64 83 C0 01 8B 4D 08 89 41 64 8B 55 08 83 7A
64 04 7E 19 8B 45 08 C7 40 64 00 00 00 00 8B 4D 08 8B 51 68 83 C2 01 8B 45 08 89 50 68 8B 4D 08
83 79 68 07 7E 08 8B 55 08 C6 02 00 EB 28 BA 00 00 00 00 C1 E2 04 8D 44 2A E8 8B 4D 08 83 C1 54
8B 10 89 11 8B 50 04 89 51 04 8B 50 08 89 51 08 8B 40 0C 89 41 0C 5E 8B E5 5D C3 CC CC CC CC CC
0F B6 4C 10 12 89 4D F8 8B 95 68 FF FF FF 83 EA 08 52 8B 45 F8 C1 E0 03 05 08 B9 48 00 50 E8 FD
8F FF FF 83 C4 08 C3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90

48b900
42 41 53 53 30 31 00 00 42 41 53 53 30 31 00 00 42 41 53 53 30 32 00 00 53 4E 41 52 45 30 31 00
53 4E 41 52 45 30 32 00 54 4F 4D 30 31 00 00 00 48 49 43 4C 4F 53 45 00 48 49 4F 50 45 4E 00 00
43 52 41 53 48 00 00 00 50 45 52 30 31 00 00 00 50 45 52 30 32 00 00 00 42 41 53 53 30 33 00 00
54 4F 4D 30 32 00 00 00 42 41 53 53 30 34 00 00 42 41 53 53 30 35 00 00 53 4E 41 52 45 30 33 00
53 4E 41 52 45 30 34 00 48 49 43 4C 4F 53 32 00 48 49 4F 50 45 4E 32 00 48 49 43 4C 4F 53 33 00
48 49 4F 50 45 4E 33 00 43 52 41 53 48 30 32 00 52 45 56 53 59 4D 00 00 52 49 44 45 30 31 00 00
54 4F 4D 30 33 00 00 00 54 4F 4D 30 34 00 00 00 4F 52 43 44 52 4D 00 00 42 45 4C 4C 00 00 00 00
43 41 54 00 00 00 00 00 57 41 56 45 00


420240
55 8B EC 83 EC 2C 83 3D E8 57 4A 00 00 75 0A B8 01 00 00 00 E9 30 01 00 00 68 A0 C7 48 00 8B 45
08 50 6A 00 FF 15 B4 C0 48 00 89 45 D8 83 7D D8 00 75 07 33 C0 E9 0F 01 00 00 8B 4D D8 51 6A 00
FF 15 B8 C0 48 00 50 FF 15 BC C0 48 00 89 45 F4 6A 14 6A 00 8D 55 E0 52 E8 93 0A 06 00 83 C4 0C
C7 45 E0 14 00 00 00 C7 45 E4 E2 80 00 00 8B 45 F4 8B 48 36 89 4D E8 8B 55 F4 83 C2 14 89 55 F0
6A 00 8B 45 0C 8D 0C 85 90 56 4A 00 51 8D 55 E0 52 A1 E8 57 4A 00 8B 08 8B 15 E8 57 4A 00 52 FF
51 0C 85 C0 74 07 33 C0 E9 9C 00 00 00 6A 00 8D 45 FC 50 8D 4D D4 51 8D 55 DC 52 8D 45 F8 50 8B
4D F4 8B 51 36 52 6A 00 8B 45 0C 8B 0C 85 90 56 4A 00 8B 55 0C 8B 04 95 90 56 4A 00 8B 09 50 FF
51 2C 8B 55 DC 52 8B 45 F4 83 C0 3A 50 8B 4D F8 51 E8 8A 10 06 00 83 C4 0C 83 7D FC 00 74 1B 8B
55 FC 52 8B 45 DC 8B 4D F4 8D 54 01 3A 52 8B 45 D4 50 E8 69 10 06 00 83 C4 0C 8B 4D FC 51 8B 55
D4 52 8B 45 DC 50 8B 4D F8 51 8B 55 0C 8B 04 95 90 56 4A 00 8B 4D 0C 8B 14 8D 90 56 4A 00 8B 00
52 FF 50 4C B8 01 00 00 00 8B E5 5D C3

41b510
55 8B EC 51 83 3D E8 57 4A 00 00 75 05 E9 D1 00 00 00 0F BE 45 10 83 3C 85 90 56 4A 00 00 0F 84
BF 00 00 00 8B 4D 0C 89 4D FC 83 7D FC 00 74 0B 83 7D FC 01 74 41 E9 A8 00 00 00 0F BE 55 10 8B
04 95 90 56 4A 00 0F BE 4D 10 8B 14 8D 90 56 4A 00 8B 00 52 FF 50 48 6A 00 0F BE 4D 10 8B 14 8D
90 56 4A 00 0F BE 45 10 8B 0C 85 90 56 4A 00 8B 12 51 FF 52 34 EB 6C 0F BE 45 10 8B 0C 85 90 56
4A 00 0F BE 55 10 8B 04 95 90 56 4A 00 8B 09 50 FF 51 48 6A 00 0F BE 55 10 8B 04 95 90 56 4A 00
0F BE 4D 10 8B 14 8D 90 56 4A 00 8B 00 52 FF 50 34 8A 4D 10 51 8A 55 08 52 E8 72 FE FF FF 83 C4
08 6A 00 6A 00 6A 00 0F BE 45 10 8B 0C 85 90 56 4A 00 0F BE 55 10 8B 04 95 90 56 4A 00 8B 09 50
FF 51 30 8B E5 5D C3


41bb40
68 90 37 49 00 8D 55 E4 52 E8 E2 5B 06 00 83 C4 0C 85 C0 75 06 C6 45 F7 01 EB 19 6A 06 68 98 37
49 00 8D 45 E4 50 E8 C5 5B 06 00 83 C4 0C 90 90 C6 45 F7 02 0F BE 4D F7 85 C9 75 07 33 C0 E9 11
05 00 00 6A 6C 8B 55 FC 52 8D 85 70 FF FF FF 50


41b4d0
55 8B EC 83 3D E8 57 4A 00 00 75 02 EB 27 8B 45 08 8D 0C C5 08 F8 FF FF 51 0F BE 55 0C 8B 04 95
90 56 4A 00 0F BE 4D 0C 8B 14 8D 90 56 4A 00 8B 00 52 FF 50 3C 5D C3


41b440
55 8B EC 83 3D E8 57 4A 00 00 75 02 EB 2A 0F B6 45 08 69 C0 20 03 00 00 83 C0 64 50 0F BE 4D 0C
8B 14 8D 90 56 4A 00 0F BE 45 0C 8B 0C 85 90 56 4A 00 8B 12 51 FF 52 44 5D C3


41b480
55 8B EC 83 3D E8 57 4A 00 00 75 02 EB 32 0F B6 45 08 0F BF 0C 45 64 37 49 00 81 E9 00 01 00 00
6B C9 0A 51 0F BE 55 0C 8B 04 95 90 56 4A 00 0F BE 4D 0C 8B 14 8D 90 56 4A 00 8B 00 52 FF 50 40
5D C3

41C051
8B 8D 68 FF FF FF 83 C1 01 89 8D 68 FF FF FF 83 BD 68 FF FF FF 10 7D 19 8B 95 68 FF FF FF 6B D2
0C 8B 85 64 FF FF FF E8 A3 B1 00 00 90 90 90 EB CF

Double Edit: Okay now I see that the HiClose sound is wrong, this WAV here should sound right, just replace it with ResHack like anything else.
http://www.mediafire.com/?q0tq2q544fe
 
Jun 9, 2010 at 6:56 AM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Noxid said:
Step #4 is where you deviated and that's probably where it didnt' work. I'm going to try and test it on my own mod so I'll see if it actually works.

EDIT: Okay. I was write about the thing above and also I forgot another edit. Here's all it should need to work now.

Code:
=========================================================================

427040
55 8B EC 83 EC 18 56 8B 45 08 8B 48 68 C1 E1 04 89 4D E8 83 C1 10 89 4D F0 C7 45 EC 00 00 00 00
C7 45 F4 10 00 00 00 8B 45 08 83 78 4C 01 75 1F 8B 45 08 83 78 68 01 7E 16 83 6D E8 20 81 45 EC
80 00 00 00 83 6D F0 20 81 45 F4 80 00 00 00 8B 45 08 83 78 74 00 0F 85 BE 00 00 00 8B 4D 08 83
79 4C 00 74 09 8B 55 08 83 7A 4C 01 75 7C 68 FF 00 00 00 6A 00 E8 96 82 FE FF 83 C4 08 88 45 FF
8A 45 FF 50 E8 F7 E7 FF FF 83 C4 04 8B F0 68 FF 05 00 00 68 00 02 00 00 E8 73 82 FE FF 83 C4 08
0F AF C6 99 81 E2 FF 01 00 00 03 C2 C1 F8 09 8B 4D 08 89 41 10 8A 55 FF 52 E8 B2 E7 FF FF 83 C4
04 8B F0 68 FF 05 00 00 68 00 02 00 00 E8 3E 82 FE FF 83 C4 08 0F AF C6 99 81 E2 FF 01 00 00 03
C2 C1 F8 09 8B 4D 08 89 41 14 6A 04 6A 00 E8 1D 82 FE FF 83 C4 08 8B 55 08 89 42 68 6A 03 6A 00
E8 0B 82 FE FF 83 C4 08 8B 4D 08 89 41 64 8B 55 08 C7 42 74 01 00 00 00 EB 52 8B 45 08 8B 40 10
6B C0 14 99 B9 15 00 00 00 F7 F9 8B 55 08 89 42 10 8B 45 08 8B 40 14 6B C0 14 99 B9 15 00 00 00
F7 F9 8B 55 08 89 42 14 8B 45 08 8B 48 08 8B 55 08 03 4A 10 8B 45 08 89 48 08 8B 4D 08 8B 51 0C
8B 45 08 03 50 14 8B 4D 08 89 51 0C 8B 55 08 8B 42 64 83 C0 01 8B 4D 08 89 41 64 8B 55 08 83 7A
64 04 7E 19 8B 45 08 C7 40 64 00 00 00 00 8B 4D 08 8B 51 68 83 C2 01 8B 45 08 89 50 68 8B 4D 08
83 79 68 07 7E 08 8B 55 08 C6 02 00 EB 28 BA 00 00 00 00 C1 E2 04 8D 44 2A E8 8B 4D 08 83 C1 54
8B 10 89 11 8B 50 04 89 51 04 8B 50 08 89 51 08 8B 40 0C 89 41 0C 5E 8B E5 5D C3 CC CC CC CC CC
0F B6 4C 10 12 89 4D F8 8B 95 68 FF FF FF 83 EA 08 52 8B 45 F8 C1 E0 03 05 08 B9 48 00 50 E8 FD
8F FF FF 83 C4 08 C3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90

48b900
42 41 53 53 30 31 00 00 42 41 53 53 30 31 00 00 42 41 53 53 30 32 00 00 53 4E 41 52 45 30 31 00
53 4E 41 52 45 30 32 00 54 4F 4D 30 31 00 00 00 48 49 43 4C 4F 53 45 00 48 49 4F 50 45 4E 00 00
43 52 41 53 48 00 00 00 50 45 52 30 31 00 00 00 50 45 52 30 32 00 00 00 42 41 53 53 30 33 00 00
54 4F 4D 30 32 00 00 00 42 41 53 53 30 34 00 00 42 41 53 53 30 35 00 00 53 4E 41 52 45 30 33 00
53 4E 41 52 45 30 34 00 48 49 43 4C 4F 53 32 00 48 49 4F 50 45 4E 32 00 48 49 43 4C 4F 53 33 00
48 49 4F 50 45 4E 33 00 43 52 41 53 48 30 32 00 52 45 56 53 59 4D 00 00 52 49 44 45 30 31 00 00
54 4F 4D 30 33 00 00 00 54 4F 4D 30 34 00 00 00 4F 52 43 44 52 4D 00 00 42 45 4C 4C 00 00 00 00
43 41 54 00 00 00 00 00 57 41 56 45 00


420240
55 8B EC 83 EC 2C 83 3D E8 57 4A 00 00 75 0A B8 01 00 00 00 E9 30 01 00 00 68 A0 C7 48 00 8B 45
08 50 6A 00 FF 15 B4 C0 48 00 89 45 D8 83 7D D8 00 75 07 33 C0 E9 0F 01 00 00 8B 4D D8 51 6A 00
FF 15 B8 C0 48 00 50 FF 15 BC C0 48 00 89 45 F4 6A 14 6A 00 8D 55 E0 52 E8 93 0A 06 00 83 C4 0C
C7 45 E0 14 00 00 00 C7 45 E4 E2 80 00 00 8B 45 F4 8B 48 36 89 4D E8 8B 55 F4 83 C2 14 89 55 F0
6A 00 8B 45 0C 8D 0C 85 90 56 4A 00 51 8D 55 E0 52 A1 E8 57 4A 00 8B 08 8B 15 E8 57 4A 00 52 FF
51 0C 85 C0 74 07 33 C0 E9 9C 00 00 00 6A 00 8D 45 FC 50 8D 4D D4 51 8D 55 DC 52 8D 45 F8 50 8B
4D F4 8B 51 36 52 6A 00 8B 45 0C 8B 0C 85 90 56 4A 00 8B 55 0C 8B 04 95 90 56 4A 00 8B 09 50 FF
51 2C 8B 55 DC 52 8B 45 F4 83 C0 3A 50 8B 4D F8 51 E8 8A 10 06 00 83 C4 0C 83 7D FC 00 74 1B 8B
55 FC 52 8B 45 DC 8B 4D F4 8D 54 01 3A 52 8B 45 D4 50 E8 69 10 06 00 83 C4 0C 8B 4D FC 51 8B 55
D4 52 8B 45 DC 50 8B 4D F8 51 8B 55 0C 8B 04 95 90 56 4A 00 8B 4D 0C 8B 14 8D 90 56 4A 00 8B 00
52 FF 50 4C B8 01 00 00 00 8B E5 5D C3

41b510
55 8B EC 51 83 3D E8 57 4A 00 00 75 05 E9 D1 00 00 00 0F BE 45 10 83 3C 85 90 56 4A 00 00 0F 84
BF 00 00 00 8B 4D 0C 89 4D FC 83 7D FC 00 74 0B 83 7D FC 01 74 41 E9 A8 00 00 00 0F BE 55 10 8B
04 95 90 56 4A 00 0F BE 4D 10 8B 14 8D 90 56 4A 00 8B 00 52 FF 50 48 6A 00 0F BE 4D 10 8B 14 8D
90 56 4A 00 0F BE 45 10 8B 0C 85 90 56 4A 00 8B 12 51 FF 52 34 EB 6C 0F BE 45 10 8B 0C 85 90 56
4A 00 0F BE 55 10 8B 04 95 90 56 4A 00 8B 09 50 FF 51 48 6A 00 0F BE 55 10 8B 04 95 90 56 4A 00
0F BE 4D 10 8B 14 8D 90 56 4A 00 8B 00 52 FF 50 34 8A 4D 10 51 8A 55 08 52 E8 72 FE FF FF 83 C4
08 6A 00 6A 00 6A 00 0F BE 45 10 8B 0C 85 90 56 4A 00 0F BE 55 10 8B 04 95 90 56 4A 00 8B 09 50
FF 51 30 8B E5 5D C3


41bb40
68 90 37 49 00 8D 55 E4 52 E8 E2 5B 06 00 83 C4 0C 85 C0 75 06 C6 45 F7 01 EB 19 6A 06 68 98 37
49 00 8D 45 E4 50 E8 C5 5B 06 00 83 C4 0C 90 90 C6 45 F7 02 0F BE 4D F7 85 C9 75 07 33 C0 E9 11
05 00 00 6A 6C 8B 55 FC 52 8D 85 70 FF FF FF 50


41b4d0
55 8B EC 83 3D E8 57 4A 00 00 75 02 EB 27 8B 45 08 8D 0C C5 08 F8 FF FF 51 0F BE 55 0C 8B 04 95
90 56 4A 00 0F BE 4D 0C 8B 14 8D 90 56 4A 00 8B 00 52 FF 50 3C 5D C3


41b440
55 8B EC 83 3D E8 57 4A 00 00 75 02 EB 2A 0F B6 45 08 69 C0 20 03 00 00 83 C0 64 50 0F BE 4D 0C
8B 14 8D 90 56 4A 00 0F BE 45 0C 8B 0C 85 90 56 4A 00 8B 12 51 FF 52 44 5D C3


41b480
55 8B EC 83 3D E8 57 4A 00 00 75 02 EB 32 0F B6 45 08 0F BF 0C 45 64 37 49 00 81 E9 00 01 00 00
6B C9 0A 51 0F BE 55 0C 8B 04 95 90 56 4A 00 0F BE 4D 0C 8B 14 8D 90 56 4A 00 8B 00 52 FF 50 40
5D C3

41C051
8B 8D 68 FF FF FF 83 C1 01 89 8D 68 FF FF FF 83 BD 68 FF FF FF 10 7D 19 8B 95 68 FF FF FF 6B D2
0C 8B 85 64 FF FF FF E8 A3 B1 00 00 90 90 90 EB CF

Double Edit: Okay now I see that the HiClose sound is wrong, this WAV here should sound right, just replace it with ResHack like anything else.
http://www.mediafire.com/?q0tq2q544fe

In response to this I'm updating the Manual Version.
Also, I've decided to take ResHacker out.
You'll have to find your own copy, I 'spose.

I wonder where you could find that, hmmm?
 
Jun 14, 2010 at 1:50 PM
In front of a computer
"Man, if only I had an apple..."
Join Date: Mar 1, 2008
Location: Grasstown
Posts: 1435
Noxid said:
6) With the selection highlighted, release the left mouse button. Now, put the mouse cursor anywhere within the gray "highlighted" area and click the right mouse button; a menu will pop up. Move the mouse over the item labelled "Binary" and a second menu will pop up. From this second menu, select "Binary Paste". A portion of the selection should turn red to indicate that changes have been made.
Okay, it sounds like OllyDbg's "Binary Paste" function overwrites only as much of the selection as is needed to paste in the new code. I'm pretty sure this is not typical behaviour in hex editors, so you should probably add the ending offset to your text file for those who decide not to use OllyDbg.

...why do you have to subtract 400000 or whatever to use the instructions in a hex editor?
 
Jun 14, 2010 at 6:55 PM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
Pronouns: he/him
Celtic Minstrel said:
Okay, it sounds like OllyDbg's "Binary Paste" function overwrites only as much of the selection as is needed to paste in the new code. I'm pretty sure this is not typical behaviour in hex editors, so you should probably add the ending offset to your text file for those who decide not to use OllyDbg.

...why do you have to subtract 400000 or whatever to use the instructions in a hex editor?

Yes, the binary paste part is true. But don't you have a hex-editor that can paste a string of hex codes at a certain offset? (overwriting the relevant data from that point onwards, no need for an ending offset)

Anyway, it's essentially recommended to download OllyDbg, since it's not very hard to highlight a gray area of addresses and paste everything in.

And the 400000 part is just how OllyDbg (and other disassemblers?) format their addressing.

Address 40ABCD in OllyDbg = Offset ABCD in a hex editor.
 
Jun 21, 2010 at 2:47 PM
In front of a computer
"Man, if only I had an apple..."
Join Date: Mar 1, 2008
Location: Grasstown
Posts: 1435
I'm pretty sure Paste in my hex editor performs an insert, not a replace, as it should (unless something is selected, of course, in which case it replaces the selection, again as it should). That's how Paste works in every other program; why should it be different for hex editors?
 
Back
Top