Users browsing this thread: 3 Guest(s)
Reverse actors HP MP progression

#31
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
Ok, i tried to run the hacked game... before the load game screen runs, the game goes wild Surprised Laugh

Check what i edited, and laugh if i wrote the codes too much wrong Laugh :
(since it's headered, the offsets are 000200 higher than normal)

0000A48C 22 13 D8 00 (JSR long to 0000D813);
PS. I use JSR long to not leave one empty byte that i don't know how to fill...

0000D813 85 1B (STA $1B (save it for now))
A9 27 (LDA #$27 (#$270F being Hex for 9999))
85 1F (STA $1F)
6B (RTL (long))


00026305 E5 FC (SBC $FC ; subtract HP 'gain' at level)
C9 00 00 (CMP #$0000)
B0 03 (BCS $630F ; branch if more than 0)
A9 00 00 (LDA #$0000 ; otherwise, set new HP to 0)


00026322 E5 FE (SBC $FE ; subtract MP 'gain' at level)
C9 00 00 (CMP #$0000)
B0 03 (BCS $632C ; branch if more than 0)
A9 00 00 (LDA #$0000 ; otherwise, set new MP to 0)

Could you find the error, please? (i think it's almost done)


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#32
Posts: 290
Threads: 3
Thanks Received: 40
Thanks Given: 1
Joined: Apr 2012
Reputation: 9
Status
None
Use NOP to fill unused bytes.

There are a few things you can do different in the interest of efficiency. For instance, instead of jumping from C2/A28C, you can try this:

Code:
C2/A28E

LDA #$27
JSR $D613

C2/D613

STA $1F
LDX $4216      ; The instruction we replaced with the JSR above.
RTS

Anyway, it's hard to say what the problem is off-hand, but I don't think anything you changed there should affect the game's boot sequence.

I don't have time to test it right now, but I will if I can find time later.


GET A SILK BAG FROM THE GRAVEYARD DUCK TO LIVE LONGER.

Brave New World
  Find
Quote  

#33
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
Wait a moment, i only jump from C0/.... to C0/...., i never wrote a code that jumps from C2/.... , maybe you wrote C2 for error? Surprised

I'm going to try to see if your code may change something...

To be precise... Final Fantasy III title appears on the screen, then it shows the stormy sky background that scrolls down for 2 times; then, when the game should play the beginning story, or display the three save slots for load the game, it shows glitchy graphics for a while and then the screen stays black Sad

PS. Since my code isn't so long, i'll count on your test Wink


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#34
Posts: 290
Threads: 3
Thanks Received: 40
Thanks Given: 1
Joined: Apr 2012
Reputation: 9
Status
None
Oh, right, sorry. Those should be for C0, not C2. Most assembly hackers tend to do most of our work in bank C2, so typing that just becomes a habit. Sweat

Anyway, I tested it and there was no game crash, so I'm thinking that there's something else you changed in your ROM that's causing that problem.


GET A SILK BAG FROM THE GRAVEYARD DUCK TO LIVE LONGER.

Brave New World
  Find
Quote  

#35
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
So you said you used exactly all my codes for the test?(without your optimizations?) I used the compare function of HxD to compare my hacked game to one unchanged version, then i copy-pasted in the last post all the edits i've done to the hacked version... Surprised

Have you also set all characters start HP to 15, using ff3usme, as suggested from Edrin?

Could it be possible that, if you don't do it, then the game will crash???


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#36
Posts: 290
Threads: 3
Thanks Received: 40
Thanks Given: 1
Joined: Apr 2012
Reputation: 9
Status
None
I actually used my optimization, but there's no reason yours wouldn't work as it's basically the same thing. I also didn't change anyone's HP, but again, none of that code gets executed as the game is loading so it shouldn't be crashing just due to those changes.

If there's nothing else you changed, the last thing I can think of is to make sure you're working with a headered ROM. I'll see if I can poke at it a bit more once I get home.


GET A SILK BAG FROM THE GRAVEYARD DUCK TO LIVE LONGER.

Brave New World
  Find
Quote  

#37
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
I'm 100% sure it's an headered rom...

I tried your edits, anyway... nothing changed Sad

But i restricted the area of the possible matter... if i use my jump, then the game crushes, otherwise it will go without much problems...

PS. It doesn't count at all what's inside the jump destination, it crushes even if there's only the RTS Sad

I tried many type of jump commands, or different empty space... nothing.
The problem should always the same stated before, but i cannot figure out what is it ;[

In the case, could you link me a download to your correctly edited rom? In that way i could compare it with my rom and tell you what was wrong Tongue


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#38
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
Did you jump to a +#$200 location? cause even if the raw address changes for the headered rom, the actual address, as far as the game is concerned, stays exactly the same. For example:

if your raw address on a headered ROM is 0000D813, then your emulation address is C0/0D613, therefore your jump should be 22 13 D6 C0 (JSR long to C0/D613). Your JSLs always use C0,C1,C2, etc... The emulation address never changes whether you are headered or not, only the RAW address for where you are actually working. It can be a little confusing.
  Find
Quote  
[-] The following 1 user says Thank You to B-Run for this post:
  • Tenkarider (06-16-2014)

#39
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
Man, IT WORKED!!!!!!!!! SurprisedSurprisedSurprisedSurprisedSurprised

May god bless you Edrin LaughLaughLaughLaughLaugh

That saved me a ton of time(i wasted an entire day in searching the error...)

The game goes well, the party starts at 9999 HP and the level up decrease hp and mp Smile

There are left few points still to solve:

- Start with 999 mp(solved by myself);

- HP overflow: if i don't set them exactly at 9999, when they level up they are still at 9999 HP(if i set their start HP to 15 it shouldn't be a problem), but the real matter is that if someone starts with a level higher than 1, then each level after level 1 increase hp/mp instead of decreasing them, probably because they don't level up(they simply start at an higher level than 1). i think the HP overflow check doesn't work, cause we swapped it with an underflow check(branch if HP > 10, else...). I wonder what if i equip a 50% hp boost... maybe 14999 HP? Laugh
So i need to cap hp max to 9999 and find the way to apply the decrease even for levels gained outside the battle(joining to the party);
PS. In battle they cap at 9999, but they still break the limit, since Terra is again at 9999 after 1-2 levels;

- HP underflow? i changed: branch if HP > 10 into HP > 0, and the else handler instead to set HP to 10, it sets them at 0... the game doesn't like it Laugh so it sets HP to 9999... any solution? Sad


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#40
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
PS. there's still to solve the last 2 points, despite my previous post's first statement.
that was simply the n.1 problem to solve...

Still no solutions? Sad


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  



Forum Jump:

Users browsing this thread: 3 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite