Edit Chainsaw codes
#1
I'd no idea on how to edit Chainsaw codes that will 100% used instant death kill "only" on enemy that are vulnerable to it, and 100% regular damage if enemy are immune to 
instant death. I do not like when Edgar's Chainsaw use the 25% instant kill effect on boss that are not vulnerable to it. It just a waste of turn.  


C2/2B30: 20 5A 4B     JSR $4B5A      (random #: 0 to 255)
C2/2B33: 29 03        AND #$03
C2/2B35: D0 16        BNE $2B4D      (75% chance branch)
C2/2B37: A9 08        LDA #$08
C2/2B39: 85 B6        STA $B6        (Animation)
C2/2B3B: 9C A6 11     STZ $11A6      (Battle power)
C2/2B3E: A9 80        LDA #$80
C2/2B40: 0C AA 11     TSB $11AA      (Set death/wound status in attack data)
C2/2B43: A9 10        LDA #$10    
C2/2B45: 8D A4 11     STA $11A4      (Set stamina can block)
C2/2B48: A9 02        LDA #$02
C2/2B4A: 0C A2 11     TSB $11A2      (Set miss if instant death protected)
C2/2B4D: A9 20        LDA #$20
C2/2B4F: 0C A2 11     TSB $11A2      (Set ignore defense)
C2/2B52: 60           RTS
Reply
#2
I'd say figure out which bit in the monster corresponds to protection from instant death. Then, check that bit with a BEQ, skipping the entire section of code you posted here if that flag is set. You'll need to relocate this portion of code in its entirety to a new part of C2, and reference it with a JSL.
Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
Reply
#3
Look for Painful Chainsaw by Michael Springer (T.Geiger).

Source: http://geigercount.net/crypt

However, don't use the patch from that site as it causes a bug with Drill, use this bug fixed code instead:

Code:
C2/2B24:    35 2B       (New Drill pointer)

C2/2B30:    A99E        LDA #$9E
C2/2B32:    8DA911      STA $11A9 (Use effect 4F)
C2/2B35:    A920        LDA #$20
C2/2B37:    0CA211      TSB $11A2 (Set ignore defense)
C2/2B3A:    60          RTS
C2/2B3B:    208D38      JSR $388D (Use “Slice” subroutine)
C2/2B3E:    A5B5        LDA $B5
C2/2B40:    C902        CMP #$02
C2/2B42:    D005        BNE $2B49 (Check for command == “Magic”)
C2/2B44:    A908        LDA #$08
C2/2B46:    8D742D      STA $2D74 (Set animation to “kill mode”)
C2/2B49:    60          RTS

C2/2B4A:    EAEAEA
C2/2B4D:    EAEAEA
C2/2B50:    EAEAEA

C2/3E6B:    3B2B

Reply
#4
(02-27-2020, 03:38 PM)Warrax Wrote: Look for Painful Chainsaw by Michael Springer (T.Geiger).

Source: http://geigercount.net/crypt

However, don't use the patch from that site as it causes a bug with Drill, use this bug fixed code instead:

Code:
C2/2B24:    35 2B       (New Drill pointer, this line must be changed)

C2/2B30:    A99E        LDA #$9E
C2/2B32:    8DA911      STA $11A9 (Use effect 4F)
C2/2B35:    A920        LDA #$20
C2/2B37:    0CA211      TSB $11A2 (Set ignore defense)
C2/2B3A:    60          RTS
C2/2B3B:    208D38      JSR $388D (Use “Slice” subroutine)
C2/2B3E:    A5B5        LDA $B5
C2/2B40:    C902        CMP #$02
C2/2B42:    D005        BNE $2B49 (Check for command == “Magic”)
C2/2B44:    A908        LDA #$08
C2/2B46:    8D742D      STA $2D74 (Set animation to “kill mode”)
C2/2B49:    60          RTS

C2/2B4A:    EAEAEA
C2/2B4D:    EAEAEA
C2/2B50:    EAEAEA
Didn't see this until today. I must had done something wrong with asm. I know the bottom starting 2B4A used the original chainsaw code, but what do you mean "This line must changed"?
Reply
#5
Chainsaw and Drill share code, specifically the code that sets Ignore Defense. The patch changes the Chainsaw code, but forgets to edit the Drill pointer to point to the correct offset in the edited code. That's what needs to be changed.
Reply
#6
(04-16-2020, 01:33 PM)seibaby Wrote: Chainsaw and Drill share code, specifically the code that sets Ignore Defense. The patch changes the Chainsaw code, but forgets to edit the Drill pointer to point to the correct offset in the edited code. That's what needs to be changed.
I think I done right, but game still crash. I change the 2 code for Drill, and then the rest of the Chainsaw ended with EAEAEA.
Reply
#7
(04-16-2020, 01:33 PM)seibaby Wrote: Chainsaw and Drill share code, specifically the code that sets Ignore Defense. The patch changes the Chainsaw code, but forgets to edit the Drill pointer to point to the correct offset in the edited code. That's what needs to be changed.

oh wow, I knew the original patch had issues, but I didn't know that drill and chainsaw shared their code, that's pretty interesting
"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC
Reply
#8
(04-16-2020, 09:40 PM)doofenH Wrote: I think I done right, but game still crash. I change the 2 code for Drill, and then the rest of the Chainsaw ended with EAEAEA.

I used that code for a while so it should work. Does your rom has a header? If that's the case the code is 200 bytes later with headered roms.

If you used the previous patch already, make sure all data is reverted or at least the data at C2/3E6B since that part is not modified anymore.

Reply
#9
(04-17-2020, 11:05 PM)Warrax Wrote:
(04-16-2020, 09:40 PM)doofenH Wrote: I think I done right, but game still crash. I change the 2 code for Drill, and then the rest of the Chainsaw ended with EAEAEA.

I used that code for a while so it should work. Does your rom has a header? If that's the case the code is 200 bytes later with headered roms.

If you used the previous patch already, make sure all data is reverted or at least the data at C2/3E6B since that part is not modified anymore.

Yes it does had header, however what do you mean 200 bytes with using HxD?
Reply
#10
(04-16-2020, 09:40 PM)doofenH Wrote: Yes it does had header, however what do you mean 200 bytes with using HxD?

It mean that for example the line at C2/2B24 will be at C2/2D24 on a headered rom.
C2/2B24 will show as 00022B24 in HxD (and that data will be at 00022D24 on a headered rom).

Code:
Code for headered ROM only:

C2/2D24:    35 2B       (New Drill pointer)

C2/2D30:    A99E        LDA #$9E
C2/2D32:    8DA911      STA $11A9 (Use effect 4F)
C2/2D35:    A920        LDA #$20
C2/2D37:    0CA211      TSB $11A2 (Set ignore defense)
C2/2D3A:    60          RTS
C2/2D3B:    208D38      JSR $388D (Use “Slice” subroutine)
C2/2D3E:    A5B5        LDA $B5
C2/2D40:    C902        CMP #$02
C2/2D42:    D005        BNE $2B49 (Check for command == “Magic”)
C2/2D44:    A908        LDA #$08
C2/2D46:    8D742D      STA $2D74 (Set animation to “kill mode”)
C2/2D49:    60          RTS

C2/2D4A:    EAEAEA
C2/2D4D:    EAEAEA
C2/2D50:    EAEAEA

C2/406B:    3B2B

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to find the instrument codes ShinMrKarate 1 2,886 12-06-2014, 06:27 AM
Last Post: madsiur
  Chainsaw Effect Cyprus 2 3,452 08-22-2014, 12:04 AM
Last Post: Cyprus
  editing tools (chainsaw, drill, flash, ...) luxador 10 14,257 06-05-2013, 02:19 PM
Last Post: madsiur
  Hex Codes NeoBahamut 5 5,639 10-25-2010, 08:32 PM
Last Post: SSJ Rick

Forum Jump:


Users browsing this thread: 1 Guest(s)