# Divinity Original Sin 2 1.0.10
# BID: 4979B200D53BB282
# Game is using double buffer, nvnWindowBuilderSetTextures has hardcoded values.
# So it's not possible to get stable FPS lock between 30 and 60.

unsafeCheck: true

MASTER_WRITE:
  # Change location of GPU frametime double divider to MAIN+0x32C6D00
  -
    type: bytes
    main_offset: 0x921768
    value_type: uint32
    value: 
      - 0xB0014D28
      - 0xFD468101
  # Default value
  -
    type: bytes
    main_offset: 0x32C6D00
    value_type: double
    value: 1000000
15FPS:
  # GPU Frametime divider = (30/FPS) * 1000000
  -
    type: write
    address: [MAIN, 0x32C6D00]
    value_type: double
    value: 2000000
20FPS:
  # GPU Frametime divider
  -
    type: write
    address: [MAIN, 0x32C6D00]
    value_type: double
    value: 1500000
25FPS:
  # GPU Frametime divider
  -
    type: write
    address: [MAIN, 0x32C6D00]
    value_type: double
    value: 1200000
30FPS:
  # GPU Frametime divider (default value)
  -
    type: write
    address: [MAIN, 0x32C6D00]
    value_type: double
    value: 1000000
35FPS:
  # GPU Frametime divider
  -
    type: write
    address: [MAIN, 0x32C6D00]
    value_type: double
    value: 857142
40FPS:
  # GPU Frametime divider
  -
    type: write
    address: [MAIN, 0x32C6D00]
    value_type: double
    value: 750000
45FPS:
  # GPU Frametime divider
  -
    type: write
    address: [MAIN, 0x32C6D00]
    value_type: double
    value: 666666
50FPS:
  # GPU Frametime divider
  -
    type: write
    address: [MAIN, 0x32C6D00]
    value_type: double
    value: 600000
55FPS:
  # GPU Frametime divider
  -
    type: write
    address: [MAIN, 0x32C6D00]
    value_type: double
    value: 545454
60FPS:
  # GPU Frametime divider
  -
    type: write
    address: [MAIN, 0x32C6D00]
    value_type: double
    value: 500000