News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Editing Mutant League Football player attributes?  (Read 2101 times)

dar7

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Editing Mutant League Football player attributes?
« Reply #20 on: January 26, 2018, 11:17:44 pm »
Hmmm, that is good to know. I guess the part I'm struggling with is seeing where the attributes get saved to in the RAM? or whatever.

I see that the game takes all 6 attributes 1 by 1 and puts them in registers but I can't see where they go. I was hoping I could punch in an address in the RAM or whatever and see those attributes loaded in there.

EDIT: Okay, I can see that the QB's speed, range, and accuracy are loaded into FFFFF566-FFFFF568. I cannot see where a RB or DB's attributes are loaded though. When I set the breakpoint for those 2 positions, I just can't follow where the attributes go. I'm probably over looking something simple.

Thank you for your help with all of this by the way!
« Last Edit: January 27, 2018, 09:58:13 am by dar7 »

Tony H

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • The Code Hut
Re: Editing Mutant League Football player attributes?
« Reply #21 on: January 27, 2018, 08:38:42 pm »
Can you post the assembly that you're having trouble with?
The Code Hut: http://codehut.gshi.org/

Game Genie codes and ROM hacking guides

dar7

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Editing Mutant League Football player attributes?
« Reply #22 on: January 28, 2018, 10:17:43 pm »
Here's an example.

If you play as the Galaxy Aces vs. the Sixty Whiners (the default teams), then punt so you are on defense. Then call the play Goaline -> Blud Man. The defensive back all the way to left is named LePuke (the skeleton lined up all the way to the left of the play).

LePuke's name & attributes start at 0000C5EA. I can see where his speed (0E) gets saved in RAM(?) at address FFFFFB66. The game then saves the 2 unknown attributes I am studying at FFFFFB71 (0A) and FFFFFB72 (0F).

I set a read break for FFFFFB72 (the attribute value is 0F). The game breaks pretty much every iteration through the play as it reads and uses this attribute.

But I can't tell what it's using it for? I see the value loaded into a register and then I have trouble following it. Any ideas?

Tony H

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • The Code Hut
Re: Editing Mutant League Football player attributes?
« Reply #23 on: January 29, 2018, 10:33:12 pm »
This is the wrong RAM address being used, and the wrong value, but doesn't really matter.  All we need is the correct routine (which we have below). EDIT: As you know, this routine is used a million times, and I didn't have time to get the correct one with your RAM address).

The game is moving the value of your RAM address (FFFB72) to register D4. It's doing some math to D4 and then D4 is being used in a Decrement and Branch instruction (0C:CA46  51 CC  DBFa).  What this does is it subtracts one from D4 every time it comes back around.  So D4 (the number from your unknown attribute) is determining how many times this Decrement and Branch instruction is being used.  Every time it goes to this instruction, it will branch to 0C:C9F0 until the value in D4 reaches zero, then it will continue on to the next instruction which is 0C:CA4A.  This is a Multiple Move instruction and then an RTS (Return from Subroutine).

One of the things it's doing while D4 is working it's way to zero is Moving A2 to A7 and then subtracting 4 bytes from A7 and Moving A2 to A7 again (MOVE.l  A2,-(A7)).  This is where you might want to investigate.  Find out what's in A2. EDIT: Remember not to use the addresses or values for A2 and A7 in the asm below, because they're probably not the correct ones. 

Anyways, like I said before, it's going to take LOTS of time to figure this out (more time than I'm willing to invest).  I hope that what little info I provided will help.


0C:C9E0  18 29  MOVE.b  $006E(A1),D4             A0=000C1550 A1=FFFFF584 A2=FFFFF584 A3=FFFFFB04 A4=FFFFF504 A5=000C1550 A6=00FF14B4 A7=00FF13EC D0=0000003C D1=FFFF0000 D2=00000000 D3=0000003C D4=00000000 D5=00000000 D6=00000000 D7=00000000 xnZvc
0C:C9E4  4A 44  TST.W   D4                       A0=000C1550 A1=FFFFF584 A2=FFFFF584 A3=FFFFFB04 A4=FFFFF504 A5=000C1550 A6=00FF14B4 A7=00FF13EC D0=0000003C D1=FFFF0000 D2=00000000 D3=0000003C D4=00000004 D5=00000000 D6=00000000 D7=00000000 xnzvc
0C:C9E6  6A 02  BPL     #$02 [0C:C9EA]           A0=000C1550 A1=FFFFF584 A2=FFFFF584 A3=FFFFFB04 A4=FFFFF504 A5=000C1550 A6=00FF14B4 A7=00FF13EC D0=0000003C D1=FFFF0000 D2=00000000 D3=0000003C D4=00000004 D5=00000000 D6=00000000 D7=00000000 xnzvc
0C:C9EA  E2 44  ASR.W   #1,D4                    A0=000C1550 A1=FFFFF584 A2=FFFFF584 A3=FFFFFB04 A4=FFFFF504 A5=000C1550 A6=00FF14B4 A7=00FF13EC D0=0000003C D1=FFFF0000 D2=00000000 D3=0000003C D4=00000004 D5=00000000 D6=00000000 D7=00000000 xnzvc
0C:C9EC  52 44  ADDQ.W  #1,D4                    A0=000C1550 A1=FFFFF584 A2=FFFFF584 A3=FFFFFB04 A4=FFFFF504 A5=000C1550 A6=00FF14B4 A7=00FF13EC D0=0000003C D1=FFFF0000 D2=00000000 D3=0000003C D4=00000002 D5=00000000 D6=00000000 D7=00000000 xnzvc
0C:C9EE  60 56  BRA     #$56 [0C:CA46]           A0=000C1550 A1=FFFFF584 A2=FFFFF584 A3=FFFFFB04 A4=FFFFF504 A5=000C1550 A6=00FF14B4 A7=00FF13EC D0=0000003C D1=FFFF0000 D2=00000000 D3=0000003C D4=00000003 D5=00000000 D6=00000000 D7=00000000 xnzvc
0C:CA46  51 CC  DBFa    D4,#$FFA8 [0C:C9F0]      A0=000C1550 A1=FFFFF584 A2=FFFFF584 A3=FFFFFB04 A4=FFFFF504 A5=000C1550 A6=00FF14B4 A7=00FF13EC D0=0000003C D1=FFFF0000 D2=00000000 D3=0000003C D4=00000003 D5=00000000 D6=00000000 D7=00000000 xnzvc
0C:C9F0  2F 0A  MOVE.l  A2,-(A7)                 A0=000C1550 A1=FFFFF584 A2=FFFFF584 A3=FFFFFB04 A4=FFFFF504 A5=000C1550 A6=00FF14B4 A7=00FF13EC D0=0000003C D1=FFFF0000 D2=00000000 D3=0000003C D4=00000002 D5=00000000 D6=00000000 D7=00000000 xnzvc
0C:C9F2  2F 0A  MOVE.l  A2,-(A7)                 A0=000C1550 A1=FFFFF584 A2=FFFFF584 A3=FFFFFB04 A4=FFFFF504 A5=000C1550 A6=00FF14B4 A7=00FF13E8 D0=0000003C D1=FFFF0000 D2=00000000 D3=0000003C D4=00000002 D5=00000000 D6=00000000 D7=00000000 xNzvc
0C:C9F4  4E BA  JSR     $F1D2(PC)

0C:CA4A  4C DF  MOVEM.L (A7)+,{a7-d0}[0c 38]     A0=FFFFFB04 A1=FFFFFB04 A2=FFFFF584 A3=FFFFFB04 A4=FFFFF504 A5=000C1550 A6=00FF14B4 A7=00FF13EC D0=000001E0 D1=FFFF0041 D2=0000003C D3=00000170 D4=0000FFFF D5=00000000 D6=00000000 D7=00000000 xnzvc
0C:CA4E  4E 75  RTS

January 30, 2018, 08:47:21 am - (Auto Merged - Double Posts are not allowed before 7 days.)
EDIT: Remember that A7 is used as the stack, so also investigate that Multiple Move at 0C:CA4A.

EDIT2: Also check out that JSR at 0C:C9F4.
« Last Edit: January 30, 2018, 09:27:16 am by Tony H »
The Code Hut: http://codehut.gshi.org/

Game Genie codes and ROM hacking guides

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6480
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Editing Mutant League Football player attributes?
« Reply #24 on: January 30, 2018, 06:23:55 pm »
Instructions using -(A7) are basically the 68000 equivalent to PUSH on other CPUs, and (A7)+ is basically PULL (aka POP). That is, to save or retrieve data from a temporary memory space where you don't really care about it to move it to permanent storage. (but, aside from some tricky instructions to directly access the memory, can only PULL them in the order PUSHED)
MOVEM is just simply a batch version that does that operation with all registers specified in the command. So it may not be that useful. Especially when it specifies the whole register range.
Quote
Sir Howard Stringer, chief executive of Sony, on Christmas sales of the PS3:
"It's a little fortuitous that the Wii is running out of hardware."

Tony H

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • The Code Hut
Re: Editing Mutant League Football player attributes?
« Reply #25 on: January 30, 2018, 09:25:22 pm »
KingMike, in a MOVEM instruction, what is the purpose of the numbers in the square brackets?  In the example above... [0c 38]
The Code Hut: http://codehut.gshi.org/

Game Genie codes and ROM hacking guides

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6480
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Editing Mutant League Football player attributes?
« Reply #26 on: January 31, 2018, 03:21:53 pm »
I'm not sure of the significance of the bracket data.
My first guess would be something of the binary representation of the instruction, but I don't think I have my 68000 reference book around (which went into detail the binary correlation between instructions and their opcodes) to look it up.
Quote
Sir Howard Stringer, chief executive of Sony, on Christmas sales of the PS3:
"It's a little fortuitous that the Wii is running out of hardware."

dar7

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Editing Mutant League Football player attributes?
« Reply #27 on: January 31, 2018, 08:42:04 pm »
Wow thank you for all the explanations of this stuff. I've been playing around with it but don't have anything new to add at the moment. Just wanted to thank everyone.

The way that unknown variable counts down makes me wonder if it's counting down how long the defender will cover the receiver for before losing him. One thing about Mutant League is that the longer a play goes, the more open the receivers get. Just thinking out loud.

Tony H

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • The Code Hut
Re: Editing Mutant League Football player attributes?
« Reply #28 on: February 02, 2018, 09:35:33 pm »
Made some Game Genie codes since I was already playing around with it.  Plus, that was the only way I could win. lol.

Mutant League Football


ABMA-4A4N
Can not be tackled.  As long as you get the ball, you can easily run for a touchdown without ever getting tackled.  Also applies to your opponent, so you will need to turn the code off when the other team has the ball.


FA4T-2A3C +
DALA-4A2W
Can run out of bounds on the sidelines and easily run all the way for a touchdown (Right side only).  Many of the defensive players will not follow you out of bounds.


BJ5T-2A4R
Can run over land mines without blowing up and fumbling the ball.


FA4A-2A9L
Can run over open areas on the field without being sucked out.
The Code Hut: http://codehut.gshi.org/

Game Genie codes and ROM hacking guides