FF6 Hacking
Reverse actors HP MP progression - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html)
+--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html)
+--- Thread: Reverse actors HP MP progression (/thread-2605.html)

Pages: 1 2 3 4 5


RE: Reverse actors HP MP progression - Tenkarider - 06-14-2014

Just to be sure, you(Synchysi) said if you're working with a headered ROM, you'll need to add 0x200 to your result... you mean adding 0x200000, or 0x000200? probably a stupid question... Laugh


RE: Reverse actors HP MP progression - madsiur - 06-14-2014

(06-14-2014, 06:33 PM)Tenkarider Wrote: Just to be sure, you(Synchysi) said if you're working with a headered ROM, you'll need to add 0x200 to your result... you mean adding 0x200000, or 0x000200?

You add 0x000200.


RE: Reverse actors HP MP progression - Tenkarider - 06-14-2014

They also said there's plenty of space on bank C2, but actually checking the disassembly file, according to what i understand about this stuff, i see that the addresses of each C2/ instruction are really near, if not attached... Probably i need of a different point of view... Could you please tell me an example of a C2/ address that leads to 8/10 bytes of empty space? thanks Smile


RE: Reverse actors HP MP progression - madsiur - 06-14-2014

There's some free space starting at C2/6469.


RE: Reverse actors HP MP progression - Tenkarider - 06-14-2014

I heard about 2 possible instructions to change the increase into a decrease:
- C2/6105
- C2/618F

What's the difference between them, especially the difference in what it changes after i change ADC into SBC between both the commands?

Should i change just one of them or what?

PS. i'm almost there... if you answer me quickly, i may even be able to finish the hack!!! Wink (maybe) Laugh


RE: Reverse actors HP MP progression - Synchysi - 06-15-2014

You can ignore my suggestion. GrayShadows was on the mark. C2/6105 is the one you're looking for.

The block I pointed out applies only to bonus HP from espers at level up.

In theory, changing ADC to SBC should simply change the arithmetic from (max HP + HP gain at level) to (max HP - HP gain at level).

Edit: Upon further consideration and without being able to test it myself, you may need to change both of them.


RE: Reverse actors HP MP progression - Tenkarider - 06-15-2014

Do i need to use JSR long(22), instead of JSR addr(20), in order to jump from C0 bank to C2 bank?


RE: Reverse actors HP MP progression - Synchysi - 06-15-2014

It'd be more efficient to use some free space in bank C0.

http://slickproductions.org/docs/FF6/Bank%20C0%20disassembly.txt

A decent-sized block of free space starts at C0/D613.


RE: Reverse actors HP MP progression - Tenkarider - 06-15-2014

I see... anyway i was wondering... is it really better to use JSR instead of JMP? I'm afraid i may mess with stuff if i call a subroutine, i think it's better to simply go to the free space without call any subroutines, if i have to do a simple operation... am i wrong? Huh


RE: Reverse actors HP MP progression - Synchysi - 06-15-2014

JSR and JMP are identical instructions, except JSR allows you to easily return to the point you jumped from (with an RTS instruction). Since you're interrupting an existing routine for a bit of custom code (and not writing a brand new, custom subroutine), you'll definitely want to RTS afterward.

For example, here's a section of the block the Edrin pasted above:

Code:
C0/A286:    8D0342      STA $4203      (save as a multiplier)
C0/A289:    B90816      LDA $1608,Y    (character level)
C0/A28C:    851B        STA $1B        (save it for now)
C0/A28E:    641F        STZ $1F        (zero out upper HP byte)
C0/A290:    AE1642      LDX $4216
C0/A293:    BFA07CED    LDA $ED7CA0,X  (Initial HP)
C0/A297:    851E        STA $1E        (save initial HP)
C0/A299:    A600        LDX $00        (X = #$0000)

Wherever you interrupt this routine, you're going to want to finish executing it after your custom subroutine has run, which is where the RTS instruction would come into play.