> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/pret/pokeemerald/llms.txt
> Use this file to discover all available pages before exploring further.

# pokeemerald

> A complete decompilation of Pokémon Emerald for the Game Boy Advance — study, modify, and build upon the original game's source code.

pokeemerald is the pret team's complete decompilation of Pokémon Emerald for the Game Boy Advance. Every line of C and ARM assembly has been reverse-engineered from the original ROM. The project builds a byte-for-byte identical copy of the game, giving ROM hackers and researchers a fully readable, modifiable codebase.

<CardGroup cols={2}>
  <Card title="Installation" icon="wrench" href="/installation">
    Set up your build environment on Windows, macOS, or Linux and clone the repository.
  </Card>

  <Card title="Building" icon="hammer" href="/building">
    Compile pokeemerald.gba and verify it matches the original ROM checksum.
  </Card>

  <Card title="Project Structure" icon="folder-tree" href="/overview/project-structure">
    Navigate the source tree — src/, asm/, data/, include/, and the build toolchain.
  </Card>

  <Card title="Battle System" icon="shield-halved" href="/overview/battle-system">
    Explore the battle engine, AI, animations, and the Battle Frontier subsystem.
  </Card>

  <Card title="Scripting Guide" icon="scroll" href="/guides/scripting">
    Write and modify event scripts, specials, and map scripts using the script engine.
  </Card>

  <Card title="Contributing" icon="code-pull-request" href="/contributing/guidelines">
    Learn the decompilation standards and how to submit clean, matching contributions.
  </Card>
</CardGroup>

## Get up and running

<Steps>
  <Step title="Install dependencies">
    Install `build-essential`, `binutils-arm-none-eabi`, `git`, and `libpng-dev` for your platform. See [Installation](/installation) for platform-specific instructions covering Windows (WSL1/msys2/Cygwin), macOS, and Linux.
  </Step>

  <Step title="Clone and install agbcc">
    ```bash theme={null}
    git clone https://github.com/pret/pokeemerald
    git clone https://github.com/pret/agbcc
    cd agbcc && ./build.sh && ./install.sh ../pokeemerald
    ```
  </Step>

  <Step title="Build the ROM">
    ```bash theme={null}
    cd pokeemerald
    make
    ```

    You will get `pokeemerald.gba` in the project root.
  </Step>

  <Step title="Verify the ROM">
    ```bash theme={null}
    make compare
    ```

    A passing result confirms your build is byte-for-byte identical to the original game: `pokeemerald.gba: OK`
  </Step>
</Steps>

## What's inside

<CardGroup cols={2}>
  <Card title="Pokémon data" icon="database" href="/overview/pokemon-data">
    Base stats, moves, abilities, experience tables, and the GetMonData/SetMonData API.
  </Card>

  <Card title="World and maps" icon="map" href="/overview/world-and-maps">
    Map layouts, metatile behaviors, field effects, events, and the overworld engine.
  </Card>

  <Card title="Graphics and audio" icon="music" href="/guides/graphics-and-audio">
    GBA graphics pipeline, sprite/tileset rules, and the M4A audio engine.
  </Card>

  <Card title="Save system" icon="floppy-disk" href="/guides/save-system">
    Flash sector layout, SaveBlock structures, and save/load mechanics.
  </Card>
</CardGroup>

<Note>
  pokeemerald is a **decompilation** project — it is not affiliated with Nintendo or Game Freak. You need a legal copy of the original Pokémon Emerald ROM to verify your build. Distributing the compiled ROM is not permitted.
</Note>
