Infinite Mimiga Mask

Jan 6, 2015 at 6:01 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
yeah, that's right
 
Jan 7, 2015 at 4:16 AM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Jan 21, 2007
Location:
Posts: 1111
Code:
[NPC111]
Address   Hex dump          Command                                  Comments
0043D003  |> \8B0D 50E64900 MOV ECX,DWORD PTR DS:[49E650]
0043D009  |.  83E1 40       AND ECX,00000040
0043D00C  |.  74 1E         JE SHORT 0043D02C
0043D00E  |.  8B55 08       MOV EDX,DWORD PTR SS:[EBP+8]             !
0043D011  |.  8B42 58       MOV EAX,DWORD PTR DS:[EDX+58]            !
0043D014  |.  83C0 20       ADD EAX,20
Code:
[NPC112]
Address   Hex dump          Command                                  Comments
0043D291  |> \8B15 50E64900 MOV EDX,DWORD PTR DS:[49E650]
0043D297  |.  83E2 40       AND EDX,00000040
0043D29A  |.  74 1E         JE SHORT 0043D2BA
0043D29C  |.  8B45 08       MOV EAX,DWORD PTR SS:[EBP+8]             !
0043D29F  |.  8B48 58       MOV ECX,DWORD PTR DS:[EAX+58]            !
0043D2A2  |.  83C1 20       ADD ECX,20
Code:
[NPC150]
Address   Hex dump          Command                                  Comments
00445D57  |> \8B0D 50E64900 MOV ECX,DWORD PTR DS:[49E650]
00445D5D  |.  83E1 40       AND ECX,00000040
00445D60  |.  74 1E         JE SHORT 00445D80
00445D62  |.  8B55 08       MOV EDX,DWORD PTR SS:[EBP+8]             !
00445D65  |.  8B42 58       MOV EAX,DWORD PTR DS:[EDX+58]            !
00445D68  |.  83C0 20       ADD EAX,20
Not sure how to proceed. Marked 'problem' lines with exclamations. The One the OP fixes is:

Code:
Address   Hex dump          Command                                  Comments
004154B8  |.  A1 50E64900   MOV EAX,DWORD PTR DS:[49E650]
004154BD  |.  83E0 40       AND EAX,00000040
004154C0  |.  74 12         JE SHORT 004154D4
004154C2  |.  8B4D F4       MOV ECX,DWORD PTR SS:[EBP-0C]            ?????
004154C5  |.  83C1 20       ADD ECX,20
Which has only one MOV line. So I suck at machine code, and assume the same changes won't work, but one change should fix all three NPCs (and any other ones there may be).

For reference, the OP changes the previous codebox into:
Code:
Address   Hex dump          Command                                  Comments
004154B8  |.  A1 84E14900   MOV EAX,DWORD PTR DS:[49E184]
004154BD  |.  C1E0 05       SHL EAX,5
004154C0  |.  0145 F4       ADD DWORD PTR SS:[EBP-0C],EAX
004154C3  |.  0145 FC       ADD DWORD PTR SS:[EBP-4],EAX
004154C6  \.  EB 0C         JMP SHORT 004154D4


EDIT:

Alright, I got it working. I don't know HOW, but...

Code:
[NPC111, and NPC150]
CPU Disasm
Address   Hex dump          Command                                  Comments
0043D003  |> \8B0D 84E14900 MOV ECX,DWORD PTR DS:[49E184]            ! Changed to the IMM flags.
0043D009  |.  C1E1 05       SHL ECX,5                                ! Bit shifted by 5.
0043D00C      90            NOP                                      ! Jump removed.
0043D00D      90            NOP
0043D00E      8B55 08       MOV EDX,DWORD PTR SS:[EBP+8]
0043D011      8B42 58       MOV EAX,DWORD PTR DS:[EDX+58]
0043D014      01C8          ADD EAX,ECX                              ! Adds the bit-shifted IMM 
0043D016      90            NOP                                      ! flags instead of 0x20 (32)
0043D017      8B55 08       MOV EDX,DWORD PTR SS:[EBP+8]             ! ECX changed to EDX, so ECX
0043D01A      8942 58       MOV DWORD PTR DS:[EDX+58],EAX            ! could retain the IMM flags.
0043D01D      8B55 08       MOV EDX,DWORD PTR SS:[EBP+8]
0043D020      8B42 60       MOV EAX,DWORD PTR DS:[EDX+60]
0043D023      01C8          ADD EAX,ECX                              ! Adds the bit-shifted IMM 
0043D025  |.  90            NOP                                      ! flags instead of 0x20 (32)
Code:
[NPC112]
CPU Disasm
Address   Hex dump          Command                                  Comments
0043D291     \8B15 84E14900 MOV EDX,DWORD PTR DS:[49E184]
0043D297      C1E2 05       SHL EDX,5
0043D29A      90            NOP
0043D29B      90            NOP
0043D29C      8B45 08       MOV EAX,DWORD PTR SS:[EBP+8]
0043D29F      8B48 58       MOV ECX,DWORD PTR DS:[EAX+58]
0043D2A2      01D1          ADD ECX,EDX
0043D2A4      90            NOP
0043D2A5      8B45 08       MOV EAX,DWORD PTR SS:[EBP+8]
0043D2A8      8948 58       MOV DWORD PTR DS:[EAX+58],ECX
0043D2AB      8B45 08       MOV EAX,DWORD PTR SS:[EBP+8]
0043D2AE      8B48 60       MOV ECX,DWORD PTR DS:[EAX+60]
0043D2B1      01D1          ADD ECX,EDX
0043D2B3      90            NOP
Let me know if my fluke broke anything important.
 
Feb 11, 2015 at 4:28 AM
Best Cow
"Life begins and ends with Nu."
Join Date: Jun 27, 2013
Location:
Posts: 2653
Age: 27
Code:
[NPC111]
Address   Hex dump          Command                                  Comments
0043D003  |> \8B0D 50E64900 MOV ECX,DWORD PTR DS:[49E650]
0043D009  |.  83E1 40       AND ECX,00000040
0043D00C  |.  74 1E         JE SHORT 0043D02C
0043D00E  |.  8B55 08       MOV EDX,DWORD PTR SS:[EBP+8]             !
0043D011  |.  8B42 58       MOV EAX,DWORD PTR DS:[EDX+58]            !
0043D014  |.  83C0 20       ADD EAX,20
Code:
[NPC112]
Address   Hex dump          Command                                  Comments
0043D291  |> \8B15 50E64900 MOV EDX,DWORD PTR DS:[49E650]
0043D297  |.  83E2 40       AND EDX,00000040
0043D29A  |.  74 1E         JE SHORT 0043D2BA
0043D29C  |.  8B45 08       MOV EAX,DWORD PTR SS:[EBP+8]             !
0043D29F  |.  8B48 58       MOV ECX,DWORD PTR DS:[EAX+58]            !
0043D2A2  |.  83C1 20       ADD ECX,20
Code:
[NPC150]
Address   Hex dump          Command                                  Comments
00445D57  |> \8B0D 50E64900 MOV ECX,DWORD PTR DS:[49E650]
00445D5D  |.  83E1 40       AND ECX,00000040
00445D60  |.  74 1E         JE SHORT 00445D80
00445D62  |.  8B55 08       MOV EDX,DWORD PTR SS:[EBP+8]             !
00445D65  |.  8B42 58       MOV EAX,DWORD PTR DS:[EDX+58]            !
00445D68  |.  83C0 20       ADD EAX,20
Not sure how to proceed. Marked 'problem' lines with exclamations. The One the OP fixes is:

Code:
Address   Hex dump          Command                                  Comments
004154B8  |.  A1 50E64900   MOV EAX,DWORD PTR DS:[49E650]
004154BD  |.  83E0 40       AND EAX,00000040
004154C0  |.  74 12         JE SHORT 004154D4
004154C2  |.  8B4D F4       MOV ECX,DWORD PTR SS:[EBP-0C]            ?????
004154C5  |.  83C1 20       ADD ECX,20
Which has only one MOV line. So I suck at machine code, and assume the same changes won't work, but one change should fix all three NPCs (and any other ones there may be).

For reference, the OP changes the previous codebox into:
Code:
Address   Hex dump          Command                                  Comments
004154B8  |.  A1 84E14900   MOV EAX,DWORD PTR DS:[49E184]
004154BD  |.  C1E0 05       SHL EAX,5
004154C0  |.  0145 F4       ADD DWORD PTR SS:[EBP-0C],EAX
004154C3  |.  0145 FC       ADD DWORD PTR SS:[EBP-4],EAX
004154C6  \.  EB 0C         JMP SHORT 004154D4


EDIT:

Alright, I got it working. I don't know HOW, but...

Code:
[NPC111, and NPC150]
CPU Disasm
Address   Hex dump          Command                                  Comments
0043D003  |> \8B0D 84E14900 MOV ECX,DWORD PTR DS:[49E184]            ! Changed to the IMM flags.
0043D009  |.  C1E1 05       SHL ECX,5                                ! Bit shifted by 5.
0043D00C      90            NOP                                      ! Jump removed.
0043D00D      90            NOP
0043D00E      8B55 08       MOV EDX,DWORD PTR SS:[EBP+8]
0043D011      8B42 58       MOV EAX,DWORD PTR DS:[EDX+58]
0043D014      01C8          ADD EAX,ECX                              ! Adds the bit-shifted IMM 
0043D016      90            NOP                                      ! flags instead of 0x20 (32)
0043D017      8B55 08       MOV EDX,DWORD PTR SS:[EBP+8]             ! ECX changed to EDX, so ECX
0043D01A      8942 58       MOV DWORD PTR DS:[EDX+58],EAX            ! could retain the IMM flags.
0043D01D      8B55 08       MOV EDX,DWORD PTR SS:[EBP+8]
0043D020      8B42 60       MOV EAX,DWORD PTR DS:[EDX+60]
0043D023      01C8          ADD EAX,ECX                              ! Adds the bit-shifted IMM 
0043D025  |.  90            NOP                                      ! flags instead of 0x20 (32)
Code:
[NPC112]
CPU Disasm
Address   Hex dump          Command                                  Comments
0043D291     \8B15 84E14900 MOV EDX,DWORD PTR DS:[49E184]
0043D297      C1E2 05       SHL EDX,5
0043D29A      90            NOP
0043D29B      90            NOP
0043D29C      8B45 08       MOV EAX,DWORD PTR SS:[EBP+8]
0043D29F      8B48 58       MOV ECX,DWORD PTR DS:[EAX+58]
0043D2A2      01D1          ADD ECX,EDX
0043D2A4      90            NOP
0043D2A5      8B45 08       MOV EAX,DWORD PTR SS:[EBP+8]
0043D2A8      8948 58       MOV DWORD PTR DS:[EAX+58],ECX
0043D2AB      8B45 08       MOV EAX,DWORD PTR SS:[EBP+8]
0043D2AE      8B48 60       MOV ECX,DWORD PTR DS:[EAX+60]
0043D2B1      01D1          ADD ECX,EDX
0043D2B3      90            NOP
Let me know if my fluke broke anything important.
So I applied this to my mod that uses the <MIM command and it seems to work very well. The only problem I'm having with it is when the player goes into a room and before the player gets off the teleporter, it doesn't show any sprite from MyChar when the teleport fade-in effect happens.
 
Feb 11, 2015 at 4:21 PM
beep boop
Bobomb says: "I need a hug!"
Join Date: Aug 16, 2014
Location: no
Posts: 844
Age: 21
Is there any way to make a dokutsu assembler version of this?
 
Feb 11, 2015 at 4:35 PM
hi hi
"What're YOU lookin' at?"
Join Date: Oct 17, 2011
Location: probably somewhere else
Posts: 1073
Age: 25
Feb 11, 2015 at 4:59 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
Feb 11, 2015 at 5: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
on the contrary, the more hacks people write the more features the editor will have
I'll be putting these together with the next update of BL
 
Feb 11, 2015 at 5:40 PM
beep boop
Bobomb says: "I need a hug!"
Join Date: Aug 16, 2014
Location: no
Posts: 844
Age: 21
This is going to be great! This means that I can make clothes, add extra animations using the command, and even add armor or something.
 
Feb 11, 2015 at 5:43 PM
Best Cow
"Life begins and ends with Nu."
Join Date: Jun 27, 2013
Location:
Posts: 2653
Age: 27
Bionicobot said:
This is going to be great! This means that I can make clothes, add extra animations using the command, and even add armor or something.
Well, you need Zarrot's patch for NPC111, NPC112, and NPC150 for the extra animations part.
 
Feb 11, 2015 at 6:07 PM
hi hi
"What're YOU lookin' at?"
Join Date: Oct 17, 2011
Location: probably somewhere else
Posts: 1073
Age: 25
I only made the BL version of the original hack, from the OP.
The patch is easy to make, though.
E: Not that I'm going to make it, anyway.
 
Feb 11, 2015 at 6:26 PM
beep boop
Bobomb says: "I need a hug!"
Join Date: Aug 16, 2014
Location: no
Posts: 844
Age: 21
Oh... I thought it included the patch...
 
Feb 11, 2015 at 6:28 PM
hi hi
"What're YOU lookin' at?"
Join Date: Oct 17, 2011
Location: probably somewhere else
Posts: 1073
Age: 25
It never did.
 
Mar 8, 2015 at 10:51 PM
Best Cow
"Life begins and ends with Nu."
Join Date: Jun 27, 2013
Location:
Posts: 2653
Age: 27
Mar 8, 2015 at 10:52 PM
beep boop
Bobomb says: "I need a hug!"
Join Date: Aug 16, 2014
Location: no
Posts: 844
Age: 21
I put in that fix, put I didn't know that there where three. I'll fix it now.
 
Top