# Super Kirby Clash 1.0.1
# BID: DCDFA5A4AD9A175D
# Thanks to Kirby567Fan for finding offset of interval

unsafeCheck: true

MASTER_WRITE:
  # Block game from updating interval
  -
    type: asm_a64
    main_offset: 0x7264
    instructions: [
      [nop]
    ]
  -
    type: asm_a64
    main_offset: 0x721C
    instructions: [
      [nop]
    ]
  # Remove double buffer
  -
    type: asm_a64
    main_offset: 0xC5B08
    instructions: [
      [mov, w8, 3]
    ]
  -
    type: asm_a64
    main_offset: 0xC5BB0
    instructions: [
      [mov, w2, 3]
    ]
  -
    type: asm_a64
    main_offset: 0xC5720
    instructions: [
      [sub, sp, sp, 0x50],
      [stp, x22, x21, [sp, 0x20]],
      [stp, x20, x19, [sp, 0x30]],
      [stp, x29, x30, [sp, 0x40]],
      [add, x29, sp, 0x40]
    ]
  -
    type: asm_a64
    main_offset: 0xC5744
    instructions: [
      [stp, xzr, xzr, [sp, 0x10]]
    ]
  -
    type: asm_a64
    main_offset: 0xC5758
    instructions: [
      [mov, w2, 3]
    ]
  -
    type: asm_a64
    main_offset: 0xC5780
    instructions: [
      [ldp, x29, x30, [sp, 0x40]],
      [ldp, x20, x19, [sp, 0x30]],
      [ldp, x22, x21, [sp, 0x20]],
      [add, sp, sp, 0x50]
    ]
  -
    type: asm_a64
    main_offset: 0xC57A0
    instructions: [
      [sub, sp, sp, 0x50],
      [stp, xzr, x21, [sp, 0x18]],
      [stp, x20, x19, [sp, 0x30]],
      [stp, x29, x30, [sp, 0x40]],
      [add, x29, sp, 0x40]
    ]
  -
    type: asm_a64
    main_offset: 0xC57CC
    instructions: [
      [mov, w2, 3]
    ]
  -
    type: asm_a64
    main_offset: 0xC57E4
    instructions: [
      [str, x8, [sp]]
    ]
  -
    type: asm_a64
    main_offset: 0xC580C
    instructions: [
      [ldp, x29, x30, [sp, 0x40]],
      [ldr, x21, [sp, 0x20]],
      [ldp, x20, x19, [sp, 0x30]],
      [add, sp, sp, 0x50]
    ]
ALL_FPS:
  # Interval
  -
    type: evaluate_write
    address: [MAIN, 0x99CB08, 0]
    value_type: int32
    value: VSYNC_TARGET
