# Kingdom Come: Deliverance - Royal Edition 1.9.6H
# BID: 7A450848CFDEC18E
# Some prerendered cutscenes are still pushed at 30 FPS

unsafeCheck: true

MASTER_WRITE:
  # Block updating DR timings, REF: 00 01 27 1E 48 40 A8 52
  -
    type: bytes
    main_offset: 0x1CA806C
    value_type: uint32
    value: 0xD503201F
  -
    type: bytes
    main_offset: 0x1CA8074
    value_type: uint32
    value: 0xD503201F
  -
    type: bytes
    main_offset: 0x1CA8094
    value_type: uint32
    value: 
      - 0xD503201F
      - 0xD503201F
  # Write default DR timings
  -
    type: bytes
    main_offset: 0x56FF9C8
    value_type: float
    value: [32.5, 30.5, 31.5, 28.5, 33.5]
ALL_FPS:
  # sys_MaxFPS
  -
    type: evaluate_write
    address: [MAIN, 0x56FD1C8]
    value_type: int32
    value: FPS_LOCK_TARGET
  # Renderer thread delay
  -
    type: write
    address: [MAIN, 0x5704028]
    value_type: float
    value: 0.01
  # DR timings
  -
    type: evaluate_write
    address: [MAIN, 0x56FF9C8]
    value_type: float
    value: ["FRAMETIME_TARGET * 0.975", "FRAMETIME_TARGET * 0.915", "FRAMETIME_TARGET * 0.945", "FRAMETIME_TARGET * 0.855", "FRAMETIME_TARGET * 1.005"]
  -
    type: block
    what: timing
