# Sherlock Holmes: The Devil's Daughter 1.0.0
# BID: 2B37ED2A971948F3

DECLARATIONS:
  - 
    type: variable
    name: dr_target1
    value_type: float
    default_value: 38
    evaluate: "1.14 * FRAMETIME_TARGET"
  - 
    type: variable
    name: dr_target2
    value_type: float
    default_value: 22
    evaluate: "0.66 * FRAMETIME_TARGET"
  - 
    type: variable
    name: dr_target3
    value_type: float
    default_value: 43.5
    evaluate: "1.305 * FRAMETIME_TARGET"
  - 
    type: variable
    name: dr_target4
    value_type: float
    default_value: 58
    evaluate: "1.74 * FRAMETIME_TARGET"
  - 
    type: variable
    name: dr_target5
    value_type: float
    default_value: 47
    evaluate: "1.41 * FRAMETIME_TARGET"
  - 
    type: variable
    name: dr_target6
    value_type: float
    default_value: 34
    evaluate: "1.02 * FRAMETIME_TARGET"
MASTER_WRITE:
  # Redirect Dynamic Resolution timings to MAIN + 0x3189F00
  # 38.0
  -
    type: asm_a64
    main_offset: 0xFFEAFC
    instructions: [
      [adrp, x10, $dr_target1],
      [ldr, s1, [x10, $dr_target1]]
    ]
  # 22.0
  -
    type: asm_a64
    main_offset: 0xFFEB0C
    instructions: [
      [ldr, s1, [x10, $dr_target2]]
    ]
  # 43.5 
  -
    type: asm_a64
    main_offset: 0xFFEAD4
    instructions: [
      [adrp, x10, $dr_target3],
      [ldr, s1, [x10, $dr_target3]]
    ]
  # 58.0
  -
    type: asm_a64
    main_offset: 0xFFEAE4
    instructions: [
      [adrp, x10, $dr_target4],
      [ldr, s1, [x10, $dr_target4]]
    ]
  # 47.0 | 34.0
  -
    type: asm_a64
    main_offset: 0xFFEB20
    instructions: [
      [adrp, x11, $dr_target5],
      [ldr, s1, [x11, $dr_target5]],
      [adrp, x11, $dr_target6],
      [fcmp, s0, s1],
      [ldr, s1, [x11, $dr_target6]]
    ]
ALL_FPS:
  # UGameEngine::GetMaxTickRate()
  # Bool Lock FPS
  -
    type: write
    address: [MAIN, 0x30D1B7C]
    value_type: uint8
    value: 0
