Users browsing this thread: 1 Guest(s)
Edit Chainsaw codes

#1
Posts: 145
Threads: 47
Thanks Received: 0
Thanks Given: 0
Joined: Jan 2020
Reputation: 0
Status
None
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
  Find
Quote  

#2
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
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
  Find
Quote  

#3
Posts: 208
Threads: 3
Thanks Received: 0
Thanks Given: 8
Joined: May 2013
Reputation: 0
Status
None
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



  Find
Quote  
[-] The following 1 user says Thank You to Warrax for this post:
  • madsiur (02-28-2020)

#4
Posts: 145
Threads: 47
Thanks Received: 0
Thanks Given: 0
Joined: Jan 2020
Reputation: 0
Status
None
(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"?
  Find
Quote  

#5
Posts: 281
Threads: 18
Thanks Received: 12
Thanks Given: 8
Joined: Mar 2014
Reputation: 8
Status
None
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.
  Find
Quote  
[-] The following 1 user says Thank You to seibaby for this post:
  • SSJ Rick (04-17-2020)

#6
Posts: 145
Threads: 47
Thanks Received: 0
Thanks Given: 0
Joined: Jan 2020
Reputation: 0
Status
None
(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.
  Find
Quote  

#7
Posts: 2,768
Threads: 88
Thanks Received: 24
Thanks Given: 87
Joined: Jun 2009
Reputation: 25
Status
None
(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
Quote  

#8
Posts: 208
Threads: 3
Thanks Received: 0
Thanks Given: 8
Joined: May 2013
Reputation: 0
Status
None
(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.



  Find
Quote  

#9
Posts: 145
Threads: 47
Thanks Received: 0
Thanks Given: 0
Joined: Jan 2020
Reputation: 0
Status
None
(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?
  Find
Quote  

#10
Posts: 208
Threads: 3
Thanks Received: 0
Thanks Given: 8
Joined: May 2013
Reputation: 0
Status
None
(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



  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite