If you are still using the old URL (datacrystal.romhacking.net), please update your bookmarks! The old URL may stop working soon.
The current URL is datacrystal.tcrf.net.
The current URL is datacrystal.tcrf.net.
User talk:Zowayix
Jump to navigation
Jump to search
Re: Stadium critical hit calculation?
I'm still a beginner at N64 MISP, but the formula given at the beginning is 100% correct, even if my comments are lackluster at the moment to say the least. Also please forgive my bad English =P
What happens is:
- Base Speed is loaded to V1
- It adds 76 to it
- It >> 2 to it
- It jumps to 0x35C56C
- It loads Focus Energy in T1
- If Focus Energy is active, value << 2
- If Focus Energy is active, value + 160
- If Focus Energy is not active, value >> 1
- It loads Move ID in A0
- It jumps to 0x35A614
- It checks if the Move is a High Critical Hit Rate move. It compares the Move ID with the array at 0x37570C
- It jumps to 0x35C5A4
- It loads the CH Ratio to V1
- If the move is a High Critical Hit Rate move, << 2 to it
- If the move is not a High Critical Hit Rate move, >> 1 to it
I didn't check what happens just after this. I used access breakpoints and register breakpoints to find the routines that I wanted to explore.
- It jumps to 0x35C5FC
- If the CH Ratio is ≥ 256, it sets the CH Ratio to 255
I didn't check what happens just after this once again.
- It jumps to 0x35C648
- It loads the CH Ratio in V1
- It copies a 1-byte Pseudo-Random Number to T5
- If PRN < CH Ratio, it sets the Critical Hit flag to 1
- It jumps to 0x35A9C0, which is the start of the Damage Calculation
Once again I apologize for the lack of clarity in the disassembly, as I'm copy pasting what I find on the go. I hope I didn't miss a shift operation while writing this! --Mantidactyle (talk) 18:36, 8 January 2015 (EST)