{
  "version": 3,
  "id": "mgba",
  "name": "mGBA",
  "revision": "2026-09-30.4",
  "origin": {
    "kind": "url",
    "url": "https://kouch.dev/emulators/mgba.kod"
  },
  "args": [
    "-f",
    "{rom}"
  ],
  "working_dir": "{emulator_dir}",
  "env": {},
  "window_mode": "fullscreen",
  "quit": {
    "method": "close",
    "force_kill_after_ms": 8000
  },
  "on_disconnect": "hold_neutral",
  "dsu": null,
  "native_gamepads": "disable_in_emulator_config",
  "update_check": true,
  "auto_update": false,
  "systems": [
    {
      "id": "gb",
      "folder": "gb",
      "name": "Game Boy",
      "art": {
        "thumbnails": "Nintendo - Game Boy"
      }
    },
    {
      "id": "gbc",
      "folder": "gbc",
      "name": "Game Boy Color",
      "art": {
        "thumbnails": "Nintendo - Game Boy Color"
      }
    },
    {
      "id": "gba",
      "folder": "gba",
      "name": "Game Boy Advance",
      "art": {
        "thumbnails": "Nintendo - Game Boy Advance"
      }
    }
  ],
  "extensions": [
    "gb",
    "gbc",
    "gba",
    "sgb",
    "cgb",
    "agb"
  ],
  "max_players": 1,
  "players": [
    {
      "dsu": null,
      "vpad": null,
      "motion": false
    }
  ],
  "hotkeys": {
    "pause": {
      "keys": [
        "ctrl",
        "p"
      ]
    },
    "save_state": {
      "keys": [
        "shift",
        "f1"
      ]
    },
    "load_state": {
      "keys": [
        "f1"
      ]
    },
    "reset": {
      "keys": [
        "ctrl",
        "r"
      ]
    },
    "screenshot": {
      "keys": [
        "f12"
      ]
    },
    "quit": null,
    "fullscreen": {
      "keys": [
        "ctrl",
        "f"
      ]
    }
  },
  "pause": {
    "method": "hotkey",
    "chord": {
      "keys": [
        "ctrl",
        "p"
      ]
    }
  },
  "user_data": {
    "folders": {
      "saves": "saves",
      "states": "states",
      "screenshots": "screenshots",
      "config": "config",
      "system": "system"
    },
    "cloud": [
      "saves"
    ],
    "config_edits": [
      {
        "file": "{emulator_dir}/portable.ini",
        "format": "ini",
        "set": {
          "kouch.portable": "1"
        }
      },
      {
        "file": "{emulator_dir}/config.ini",
        "format": "ini",
        "set": {
          "[ports.qt].savegamePath": "{saves}",
          "[ports.qt].savestatePath": "{states}",
          "[ports.qt].screenshotPath": "{screenshots}",
          "[ports.qt].cheatsPath": "{config}/cheats",
          "[ports.qt].patchPath": "{config}/patches",
          "[ports.qt].pauseOnFocusLost": "0",
          "[ports.qt].skipBios": "1",
          "[ports.qt].useBios": "0",
          "[gba.input.SDLB].keyA": 1,
          "[gba.input.SDLB].keyB": 0,
          "[gba.input.SDLB].keyL": 4,
          "[gba.input.SDLB].keyR": 5,
          "[gba.input.SDLB].keySelect": 6,
          "[gba.input.SDLB].keyStart": 7
        }
      }
    ]
  },
  "options": [
    {
      "id": "integer_scaling",
      "label": "Whole-pixel scaling",
      "tab": "graphics",
      "type": "toggle",
      "role": "output_filter",
      "section": "Display",
      "description": "Scales by whole steps, so every pixel is the same size; leaves a border.",
      "default": false,
      "apply": {
        "kind": "config_edit",
        "file": "{emulator_dir}/config.ini",
        "format": "ini",
        "key": "[ports.qt].lockIntegerScaling",
        "on": "1",
        "off": "0"
      }
    },
    {
      "id": "smooth",
      "label": "Smooth the picture",
      "tab": "graphics",
      "type": "toggle",
      "role": "output_filter",
      "section": "Display",
      "default": false,
      "apply": {
        "kind": "config_edit",
        "file": "{emulator_dir}/config.ini",
        "format": "ini",
        "key": "[ports.qt].resampleVideo",
        "on": "1",
        "off": "0"
      }
    },
    {
      "id": "blend",
      "label": "Blend frames",
      "tab": "graphics",
      "type": "toggle",
      "role": "enhancement",
      "section": "Display",
      "description": "Mixes each frame with the one before, as the handheld’s slow screen did; some games’ transparency effects rely on it.",
      "default": false,
      "apply": {
        "kind": "config_edit",
        "file": "{emulator_dir}/config.ini",
        "format": "ini",
        "key": "[ports.qt].interframeBlending",
        "on": "1",
        "off": "0"
      }
    },
    {
      "id": "keep_aspect",
      "label": "Keep the screen’s shape",
      "tab": "graphics",
      "type": "toggle",
      "role": "aspect",
      "section": "Display",
      "default": true,
      "apply": {
        "kind": "config_edit",
        "file": "{emulator_dir}/config.ini",
        "format": "ini",
        "key": "[ports.qt].lockAspectRatio",
        "on": "1",
        "off": "0"
      }
    },
    {
      "id": "vsync",
      "label": "V-Sync",
      "tab": "graphics",
      "type": "toggle",
      "role": "vsync",
      "section": "Display",
      "default": false,
      "apply": {
        "kind": "config_edit",
        "file": "{emulator_dir}/config.ini",
        "format": "ini",
        "key": "[ports.qt].videoSync",
        "on": "1",
        "off": "0"
      }
    },
    {
      "id": "volume",
      "label": "Volume",
      "tab": "audio",
      "type": "choice",
      "default": 256,
      "values": [
        {
          "value": 0,
          "label": "Muted"
        },
        {
          "value": 64,
          "label": "25%"
        },
        {
          "value": 128,
          "label": "50%"
        },
        {
          "value": 192,
          "label": "75%"
        },
        {
          "value": 256,
          "label": "100%"
        }
      ],
      "apply": {
        "kind": "config_edit",
        "file": "{emulator_dir}/config.ini",
        "format": "ini",
        "key": "[ports.qt].volume"
      }
    }
  ],
  "presets": [
    {
      "id": "sharp",
      "label": "Sharp pixels",
      "description": "Every pixel the same size, with a border.",
      "values": {
        "integer_scaling": true,
        "smooth": false,
        "blend": false
      }
    },
    {
      "id": "smooth",
      "label": "Smooth",
      "description": "The picture fills the screen, softened.",
      "values": {
        "integer_scaling": false,
        "smooth": true,
        "blend": false
      }
    },
    {
      "id": "original",
      "label": "Like the handheld",
      "description": "Frames blended as its slow screen did.",
      "values": {
        "integer_scaling": true,
        "smooth": false,
        "blend": true
      }
    }
  ],
  "unsupported": {
    "seat_order": "The emulator takes the first controller Steam lists, whichever seat that is.",
    "motion": "Cartridges with a tilt sensor need a pad whose motion the emulator reads itself; Steam’s virtual pads have none.",
    "netplay": "The emulator has no online play.",
    "mods": "The emulator has no mod folders."
  },
  "platforms": {
    "windows": {
      "launch": {
        "kind": "exe",
        "path": "mGBA.exe"
      },
      "source": {
        "kind": "github_release",
        "repo": "mgba-emu/mgba",
        "asset": "mGBA-*-win64.7z",
        "url": null,
        "sha256": null,
        "install_subdir": null,
        "executable": "mGBA.exe",
        "auto_update": false,
        "feed": null,
        "keep": [
          "config.ini"
        ]
      }
    },
    "linux": {
      "launch": {
        "kind": "exe",
        "path": "mGBA.AppImage"
      },
      "source": {
        "kind": "github_release",
        "repo": "mgba-emu/mgba",
        "asset": "mGBA-*-appimage-x64.appimage",
        "url": null,
        "sha256": null,
        "install_subdir": null,
        "executable": "mGBA.AppImage",
        "auto_update": false,
        "feed": null,
        "keep": [
          "config.ini"
        ]
      },
      "env": {
        "XDG_CONFIG_HOME": "{user_data}/xdg-config",
        "XDG_DATA_HOME": "{user_data}/xdg-data",
        "XDG_CACHE_HOME": "{user_data}/xdg-cache"
      }
    }
  }
}
