# Marvel Ultimate Alliance 3: The Black Order 4.0.1
# BID: E853C44FDF18B88F
# Credits to Hazerou for finding offsets for FPS lock and speed

unsafeCheck: true

MASTER_WRITE:
# Redirect reading DR GPU time factor to MAIN + 0x4FC0E00
  -
    type: bytes
    main_offset: 0x470E80
    value_type: uint32
    value: 
      - 0x90025A89
      - 0xBD4E0122
# Default value (= 0.5 / FPS)
  -
    type: bytes
    main_offset: 0x4FC0E00
    value_type: float
    value: 0.0166666666
15FPS:
  # Internal Vsync (default value)
  -
    type: write
    address: [MAIN, 0x45A7410]
    value_type: int32
    value: [2, 2]
  # Game Speed = FPS
  -
    type: write
    address: [MAIN, 0x45A71F0]
    value_type: float
    value: 15
  # DR GPU time factor
  -
    type: write
    address: [MAIN, 0x4FC0E00]
    value_type: float
    value: 0.0333333333
20FPS:
  # Internal Vsync (default value)
  -
    type: write
    address: [MAIN, 0x45A7410]
    value_type: int32
    value: [2, 2]
  # Game Speed
  -
    type: write
    address: [MAIN, 0x45A71F0]
    value_type: float
    value: 20
  # DR GPU time factor
  -
    type: write
    address: [MAIN, 0x4FC0E00]
    value_type: float
    value: 0.025
25FPS:
  # Internal Vsync (default value)
  -
    type: write
    address: [MAIN, 0x45A7410]
    value_type: int32
    value: [2, 2]
  # Game Speed
  -
    type: write
    address: [MAIN, 0x45A71F0]
    value_type: float
    value: 25
  # DR GPU time factor
  -
    type: write
    address: [MAIN, 0x4FC0E00]
    value_type: float
    value: 0.02
30FPS:
  # Internal Vsync (default value)
  -
    type: write
    address: [MAIN, 0x45A7410]
    value_type: int32
    value: [2, 2]
  # Game Speed (default value)
  -
    type: write
    address: [MAIN, 0x45A71F0]
    value_type: float
    value: 30
  # DR GPU time factor (default value)
  -
    type: write
    address: [MAIN, 0x4FC0E00]
    value_type: float
    value: 0.0166666666
35FPS:
  # Internal Vsync
  -
    type: write
    address: [MAIN, 0x45A7410]
    value_type: int32
    value: [1, 1]
  # Game Speed
  -
    type: write
    address: [MAIN, 0x45A71F0]
    value_type: float
    value: 35
  # DR GPU time factor
  -
    type: write
    address: [MAIN, 0x4FC0E00]
    value_type: float
    value: 0.01428
40FPS:
  # Internal Vsync
  -
    type: write
    address: [MAIN, 0x45A7410]
    value_type: int32
    value: [1, 1]
  # Game Speed
  -
    type: write
    address: [MAIN, 0x45A71F0]
    value_type: float
    value: 40
  # DR GPU time factor
  -
    type: write
    address: [MAIN, 0x4FC0E00]
    value_type: float
    value: 0.0125
45FPS:
  # Internal Vsync
  -
    type: write
    address: [MAIN, 0x45A7410]
    value_type: int32
    value: [1, 1]
  # Game Speed
  -
    type: write
    address: [MAIN, 0x45A71F0]
    value_type: float
    value: 45
  # DR GPU time factor
  -
    type: write
    address: [MAIN, 0x4FC0E00]
    value_type: float
    value: 0.0111111111
50FPS:
  # Internal Vsync
  -
    type: write
    address: [MAIN, 0x45A7410]
    value_type: int32
    value: [1, 1]
  # Game Speed
  -
    type: write
    address: [MAIN, 0x45A71F0]
    value_type: float
    value: 50
  # DR GPU time factor
  -
    type: write
    address: [MAIN, 0x4FC0E00]
    value_type: float
    value: 0.01
55FPS:
  # Internal Vsync
  -
    type: write
    address: [MAIN, 0x45A7410]
    value_type: int32
    value: [1, 1]
  # Game Speed
  -
    type: write
    address: [MAIN, 0x45A71F0]
    value_type: float
    value: 55
  # DR GPU time factor
  -
    type: write
    address: [MAIN, 0x4FC0E00]
    value_type: float
    value: 0.009009009
60FPS:
  # Internal Vsync
  -
    type: write
    address: [MAIN, 0x45A7410]
    value_type: int32
    value: [1, 1]
  # Game Speed
  -
    type: write
    address: [MAIN, 0x45A71F0]
    value_type: float
    value: 60
  # DR GPU time factor
  -
    type: write
    address: [MAIN, 0x4FC0E00]
    value_type: float
    value: 0.0083333333