Some Machine Gun Data

Jul 24, 2010 at 1:18 AM
Been here way too long...
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Mar 20, 2010
Location:
Posts: 252
Just some stuff that I found because I left the IRC just long enough to do something actually productive. I know I've not commented much, but it's intended to be able to to used by anyone with ollydbg and (very) little assembly knowledge*.

*It helps to know that the values are in hexadecimal.

Code:
00405322   C785 7CFFFFFF 00>MOV DWORD PTR SS:[EBP-84],1000           ; Speed of lvl. 1 Machine gun shot
0040532C   EB 16            JMP SHORT Doukutsu.00405344
0040532E   C785 7CFFFFFF 00>MOV DWORD PTR SS:[EBP-84],1000           ; Speed of lvl. 2 Machine gun shot
00405338   EB 0A            JMP SHORT Doukutsu.00405344
0040533A   C785 7CFFFFFF 00>MOV DWORD PTR SS:[EBP-84],1000           ; Speed of lvl. 3 Machine gun shot
00405344   8B4D 08          MOV ECX,DWORD PTR SS:[EBP+8]
00405347   C741 28 01000000 MOV DWORD PTR DS:[ECX+28],1
0040534E   8B55 08          MOV EDX,DWORD PTR SS:[EBP+8]
00405351   0FB642 38        MOVZX EAX,BYTE PTR DS:[EDX+38]
00405355   8985 30FFFFFF    MOV DWORD PTR SS:[EBP-D0],EAX
0040535B   83BD 30FFFFFF 03 CMP DWORD PTR SS:[EBP-D0],3
00405362   0F87 A7000000    JA Doukutsu.0040540F
00405368   8B8D 30FFFFFF    MOV ECX,DWORD PTR SS:[EBP-D0]
0040536E   FF248D 83554000  JMP DWORD PTR DS:[ECX*4+405583]
00405375   8B95 7CFFFFFF    MOV EDX,DWORD PTR SS:[EBP-84]
0040537B   F7DA             NEG EDX
0040537D   8B45 08          MOV EAX,DWORD PTR SS:[EBP+8]
00405380   8950 18          MOV DWORD PTR DS:[EAX+18],EDX
00405383   68 AA000000      PUSH 0AA                                 ; Min. Y velocity when fired left
00405388   68 56FFFFFF      PUSH -0AA                                ; Max. Y velocity when fired left
0040538D   E8 BE9F0000      CALL Doukutsu.0040F350
00405392   83C4 08          ADD ESP,8
00405395   8B4D 08          MOV ECX,DWORD PTR SS:[EBP+8]
00405398   8941 1C          MOV DWORD PTR DS:[ECX+1C],EAX
0040539B   EB 72            JMP SHORT Doukutsu.0040540F
0040539D   8B95 7CFFFFFF    MOV EDX,DWORD PTR SS:[EBP-84]
004053A3   F7DA             NEG EDX
004053A5   8B45 08          MOV EAX,DWORD PTR SS:[EBP+8]
004053A8   8950 1C          MOV DWORD PTR DS:[EAX+1C],EDX
004053AB   68 AA000000      PUSH 0AA                                 ; Min. X velocity when fired up
004053B0   68 56FFFFFF      PUSH -0AA                                ; Max. X velocity when fired up
004053B5   E8 969F0000      CALL Doukutsu.0040F350
004053BA   83C4 08          ADD ESP,8
004053BD   8B4D 08          MOV ECX,DWORD PTR SS:[EBP+8]
004053C0   8941 18          MOV DWORD PTR DS:[ECX+18],EAX
004053C3   EB 4A            JMP SHORT Doukutsu.0040540F
004053C5   8B55 08          MOV EDX,DWORD PTR SS:[EBP+8]
004053C8   8B85 7CFFFFFF    MOV EAX,DWORD PTR SS:[EBP-84]
004053CE   8942 18          MOV DWORD PTR DS:[EDX+18],EAX
004053D1   68 AA000000      PUSH 0AA                                 ; Max. Y velocity when fired right
004053D6   68 56FFFFFF      PUSH -0AA                                ; Min. Y velocity when fired right
004053DB   E8 709F0000      CALL Doukutsu.0040F350
004053E0   83C4 08          ADD ESP,8
004053E3   8B4D 08          MOV ECX,DWORD PTR SS:[EBP+8]
004053E6   8941 1C          MOV DWORD PTR DS:[ECX+1C],EAX
004053E9   EB 24            JMP SHORT Doukutsu.0040540F
004053EB   8B55 08          MOV EDX,DWORD PTR SS:[EBP+8]
004053EE   8B85 7CFFFFFF    MOV EAX,DWORD PTR SS:[EBP-84]
004053F4   8942 1C          MOV DWORD PTR DS:[EDX+1C],EAX
004053F7   68 AA000000      PUSH 0AA                                 ; Max. X velocity when fired down
004053FC   68 56FFFFFF      PUSH -0AA                                ; Min. X velocity when fired down
00405401   E8 4A9F0000      CALL Doukutsu.0040F350
00405406   83C4 08          ADD ESP,8
 
Jul 24, 2010 at 1:22 AM
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
If anyone's interested at 41E457 is CMP ECX, 6
The 6 is how many frames must elapse before the gun will fire again.

At 41E761 is CMP [4A5554], 1
This is how many frames must elapse before one unit of Ammo is replenished (With TurboCharger)

At 41E780 is CMP [4A5554], 4
This is how many frames must elapse before one unit of Ammo is replenished without the turbocharger.
 
Jul 24, 2010 at 1:24 AM
Been here way too long...
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Mar 20, 2010
Location:
Posts: 252
Noxid said:
If anyone's interested at 45E457 is CMP ECX, 6
The 6 is how many frames must elapse before the gun will fire again.

Are you sure that you have the right address?
 
Jul 24, 2010 at 1:25 AM
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
Nine million percent sure.

Such a value indicates there was an error in calculation somewhere along the line.
 
Jul 24, 2010 at 1:50 AM
Been here way too long...
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Mar 20, 2010
Location:
Posts: 252
Ah, I found the one in the bubbler gun code, it's at 41F2DA. It's CMP EDX, 7.
 
Jul 24, 2010 at 2:03 AM
Pirate Member
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Dec 26, 2007
Location: Lithuania
Posts: 1947
And with the firerate editable, you can easily make a saber!
 
Top