Jun 6, 2013 at 8:10 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4485
I'm trying to change the escape menu function so that it only executes if a certain flag is unset but I guess it keeps ending up in infinite loops whenever I press the escape key.

Code:
CPU Disasm
Address   Hex dump          Command                                  Comments
0040DD70   $ /E9 5BCE0100   JMP 0042ABD0
0040DD75     |90            NOP
0040DD76     |90            NOP
0040DD77     |90            NOP
0040DD78     |90            NOP
0040DD79     |90            NOP
0040DD7A     |90            NOP
0040DD7B     |90            NOP
0040DD7C     |90            NOP
0040DD7D     |90            NOP
0040DD7E     |90            NOP
0040DD7F     |90            NOP
0040DD80     |90            NOP
0040DD81     |90            NOP
0040DD82     |90            NOP
0040DD83     |90            NOP
0040DD84     |90            NOP
0040DD85     |90            NOP
0040DD86     |90            NOP
0040DD87     |90            NOP
0040DD88     |90            NOP
0040DD89     |90            NOP
0040DD8A     |90            NOP

CPU Disasm
Address   Hex dump          Command                                  Comments
0042ABD0  /$ \68 B80B0000   PUSH 0BB8                                ; /Arg1 = 0BB8
0042ABD5  |.  E8 563DFEFF   CALL 0040E930                            ; \Amamichi2.0040E930
0042ABDA  |.  83C4 04       ADD ESP,4
0042ABDD  |.  83F8 01       CMP EAX,1
0042ABE0  |.  0F84 DD000000 JE 0042ACC3
0042ABE6  |.  55            PUSH EBP
0042ABE7  |.  8BEC          MOV EBP,ESP
0042ABE9  |.  83EC 10       SUB ESP,10
0042ABEC  |.  C745 F0 00000 MOV DWORD PTR SS:[LOCAL.4],0
0042ABF3  |.  C745 F4 80000 MOV DWORD PTR SS:[LOCAL.3],80
0042ABFA  |.  C745 F8 D0000 MOV DWORD PTR SS:[LOCAL.2],0D0
0042AC01  |.  C745 FC 90000 MOV DWORD PTR SS:[LOCAL.1],90
0042AC08  |>  B8 01000000   /MOV EAX,1
0042AC0D  |.  85C0          |TEST EAX,EAX
0042AC0F  |.  0F84 AE000000 |JE 0042ACC3
0042AC15  |.  E8 3C450000   |CALL 0042F156
0042AC1A  |.  8B0D 14E24900 |MOV ECX,DWORD PTR DS:[49E214]
0042AC20  |.  81E1 00800000 |AND ECX,00008000
0042AC26  |.  74 11         |JE SHORT 0042AC39
0042AC28  |.  C705 14E24900 |MOV DWORD PTR DS:[49E214],0
0042AC32  |.  33C0          |XOR EAX,EAX
0042AC34  |.  E9 8C000000   |JMP 0042ACC5
0042AC39  |>  8B15 14E24900 |MOV EDX,DWORD PTR DS:[49E214]
0042AC3F  |.  81E2 00040000 |AND EDX,00000400
0042AC45  |.  74 11         |JE SHORT 0042AC58
0042AC47  |.  C705 14E24900 |MOV DWORD PTR DS:[49E214],0
0042AC51  |.  B8 01000000   |MOV EAX,1
0042AC56  |.  EB 6D         |JMP SHORT 0042ACC5
0042AC58  |>  A1 14E24900   |MOV EAX,DWORD PTR DS:[49E214]
0042AC5D  |.  25 00080000   |AND EAX,00000800
0042AC62  |.  74 11         |JE SHORT 0042AC75
0042AC64  |.  C705 14E24900 |MOV DWORD PTR DS:[49E214],0
0042AC6E  |.  B8 02000000   |MOV EAX,2
0042AC73  |.  EB 50         |JMP SHORT 0042ACC5
0042AC75  |>  6A 00         |PUSH 0
0042AC77  |.  68 2CF94800   |PUSH OFFSET 0048F92C
0042AC7C  |.  E8 D5EBFFFF   |CALL 00429856
0042AC81  |.  83C4 08       |ADD ESP,8
0042AC84  |.  6A 1A         |PUSH 1A
0042AC86  |.  8D4D F0       |LEA ECX,[EBP-10]
0042AC89  |.  51            |PUSH ECX
0042AC8A  |.  6A 70         |PUSH 70
0042AC8C  |.  6A 38         |PUSH 38
0042AC8E  |.  68 2CF94800   |PUSH OFFSET 0048F92C
0042AC93  |.  E8 9EE5FFFF   |CALL 00429236
0042AC98  |.  83C4 14       |ADD ESP,14
0042AC9B  |.  E8 46450000   |CALL 0042F1E6
0042ACA0  |.  8B55 08       |MOV EDX,DWORD PTR SS:[EBP+8]
0042ACA3  |.  52            |PUSH EDX                                ; /Arg1
0042ACA4  |.  E8 0DD5FFFF   |CALL 004281B6                           ; \Amamichi2.004281B6
0042ACA9  |.  83C4 04       |ADD ESP,4
0042ACAC  |.  85C0          |TEST EAX,EAX
0042ACAE  |.^ 75 0E         |JNE SHORT 0042ACBE
0042ACB0  |.  C705 14E24900 |MOV DWORD PTR DS:[49E214],0
0042ACBA  |.  33C0          |XOR EAX,EAX
0042ACBC  |.  EB 07         |JMP SHORT 0042ACC5
0042ACBE  |>^ E9 45FFFFFF   \JMP 0042AC08
0042ACC3  |>  33C0          XOR EAX,EAX
0042ACC5  |>  8BE5          MOV ESP,EBP
0042ACC7  |.  5D            POP EBP
0042ACC8  \.  C3            RETN
That's my code so far. The first part is where the original function starts. The second part is a more or less binary pasted version of the original function plus the flag check directly before it.
 
Jun 6, 2013 at 8:14 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
> MOV EAX, 1
> TEST EAX, EAX
> JE

what the heck is that supposed to be
 
Jun 6, 2013 at 8:26 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4485
No idea. That's how it was before.

Oh uh in retrospect I guess it might be kinda a little important that

0042ABE6 |. 55 PUSH EBP
0042ABE7 |. 8BEC MOV EBP,ESP
0042ABE9 |. 83EC 10 SUB ESP,10

goes before the flag check maybe.
 
Jun 6, 2013 at 9:03 PM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Nov 14, 2012
Location:
Posts: 167
I am on ollydbug and I can't find the title screen codes! How do I find them?
 
Jun 7, 2013 at 2:40 AM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Jan 2, 2013
Location: Wright and Co. Law Offices
Posts: 179
Age: 122
diph.php

So... about that thread... the expression shown on the thread doesn't match what is seen on my screen!
Help me, I'm going to explode in curiosity
 
Jun 7, 2013 at 6:33 AM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Nov 14, 2012
Location:
Posts: 167
ChimeApple said:
diph.php

So... about that thread... the expression shown on the thread doesn't match what is seen on my screen!
Help me, I'm going to explode in curiosity
I know.. Is only SOMEONE could help me...
 
Jun 7, 2013 at 9:06 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 30
@Doors: The game changes its "state" when you press the Esc key. You're going to need to figure out how to change it back to normal, or else it will just keep running the ESC menu code every frame. All skipping over the esc function does here is makes it not draw itself and basically skips the key input, locking you in an infinite loop.
 
Jun 7, 2013 at 12:23 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4485
Ew. That sucks. I guess I'll take another look later.
 
Jun 10, 2013 at 1:38 AM
Senior Member
"Master using it, and you can have this!"
Join Date: Apr 15, 2012
Location: Tralfamadore
Posts: 74
Age: 26
I have been trying to learn assembly for quite a while using this:
http://www.cavestory.org/forums/threads/2305/
But I am not doing to well; I don't find that it makes an awful lot of sense for me.

I am pretty knowledgeable on the subject of programming, having got an A in my AP Computer Science class last year thus, I am able to understand this kind of thing.
Is there any better way that I can learn it?

I have been trying to learn assembly for quite a while using this:
http://www.cavestory.org/forums/threads/2305/
But I am not doing to well; I don't find that it makes an awful lot of sense for me.

I am pretty knowledgeable on the subject of programming, having got an A in my AP Computer Science class last year thus, I am able to understand this kind of thing.
Is there any better way that I can learn it?
 
Jun 10, 2013 at 3:22 AM
Based Member
"Life begins and ends with Nu."
Join Date: Dec 31, 2011
Location: United States
Posts: 2245
Age: 25
I can't really refer you to something easier to understand, because Carrotlord's tutorial is the most user-friendly these assembly hacking tutorials are going to get. If you can't understand Carrotlord's tutorial, then you almost definitely won't be able to understand any other tutorial on these forums. So the best thing to do is try to find a method of studying the tutorial you linked to.

Try reading up to the Polar Life Capsule example. Just read every section in the tutorial leading up to that point, even if you're understanding little to nothing. Just do it, even if you're zoned out, half of your mind is day-dreaming and you're just mindlessly narrating the words of the tutorial to your mind without understanding it, just read up to the end of the Polar Life Capsule example. Then leave all this assembly for a while. When you decide to come back, start back at the beginning of the tutorial, and see if things are easier to understand. If things are still unclear, repeat this process until it is easy to understand.
 
Jun 10, 2013 at 4:00 AM
Senior Member
"Master using it, and you can have this!"
Join Date: Apr 15, 2012
Location: Tralfamadore
Posts: 74
Age: 26
HaydenStudios said:
I can't really refer you to something easier to understand, because Carrotlord's tutorial is the most user-friendly these assembly hacking tutorials are going to get. If you can't understand Carrotlord's tutorial, then you almost definitely won't be able to understand any other tutorial on these forums. So the best thing to do is try to find a method of studying the tutorial you linked to.

User-friendly and myself do not necessarily mix well. For example it might be better to lead me towards something that explains how some horrible monstrosity of complex code works-- or better yet a chart of how every thing works.

I'd be getting a higher grade in math if they didn't try teaching in a way that the other students would understand. And, on an unrelated note, it would be even higher if I did my work on time.
 
Jun 10, 2013 at 4:09 AM
Based Member
"Life begins and ends with Nu."
Join Date: Dec 31, 2011
Location: United States
Posts: 2245
Age: 25
You're a complicated person, Nemesis.

If that is the case, then see if this or this help. Or better yet, just go to this thread, and look at the threads under the heading of "Assembly Hacking Threads", and see if any of those do anything for you.

If this doesn't help, then I don't know what to tell you.
 
Jun 10, 2013 at 4:24 AM
Senior Member
"Master using it, and you can have this!"
Join Date: Apr 15, 2012
Location: Tralfamadore
Posts: 74
Age: 26
Thanks a lot, I'll try them out.
Also, I noticed that you called me a person so, I thought that I might mention that I only qualify for this in some countries.
 
Jun 10, 2013 at 11:49 AM
The Eternal Darkness
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Feb 12, 2012
Location: The Enemy of the Truth
Posts: 314
Age: 107
I'm going to try and ask this question to the best of my ability, and it's probably still not going to make a lot of sense, but I have to ask anyway.

...

Is there a way to have two different characters use the Curly AI (that follows the main character) without needing to resort to ASM hacking, like having two separate spritesets for them or something like that?
 
Jun 10, 2013 at 12:09 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
Shane said:
I'm going to try and ask this question to the best of my ability, and it's probably still not going to make a lot of sense, but I have to ask anyway.

...

Is there a way to have two different characters use the Curly AI (that follows the main character) without needing to resort to ASM hacking, like having two separate spritesets for them or something like that?
You could use different spritesheets on different maps and such, but you couldn't have two different ones on the map that way.
 
Jun 12, 2013 at 6:34 PM
Senior Member
"Master using it, and you can have this!"
Join Date: May 24, 2013
Location: anywhere near video games
Posts: 75
Age: 21
Bombchu Link said:
Is there a profile.dat hacking guide on this forum?

I've looked everywhere. . .
I don't really think so, so just ask your question here.
 
Jun 12, 2013 at 8:20 PM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1638
Age: 25
ok then. . .

How do I edit a profile.dat to:

Add weapons?

Set flags?

Set map number?

Find the x/Y location?
 
Top