How to fix Common Area Overlaps

Revision as of 01:21, 13 July 2026 by Deeshura (talk | contribs) (fixed link to hexed.it)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

When making use of ASM patches that rely on ExtraSpace that aren’t bundled with Skytemple, there is a reasonable chance you will encounter an “overlap” where multiple patches take up the same part of the common area, causing unexpected behavior and game crashes. Thankfully, it is easy to edit your ASM patches to write to a different part of the common area to avoid these overlaps.

Please note that this tutorial is primarily for those who are not using C-of-Time with their project, and this approach may cause issues if you add more C-of-Time based edits to your rom after patching.

Prerequisites

Before starting this tutorial, you will need:

  • A hex editor.
    • HxD is a robust and commonly recommended choice.
    • hexed.it is a hex editor that runs in your browser.
  • A text editor.
    • If you are on Windows, Notepad++ is a solid choice.
  • Everything else you need for manual patching, including;
    • A DS Rom Unpacker (DSLazy, for example)
    • Armips

Note that this is not a tutorial on manual patching in general. Please consult tutorials on manual patching elsewhere if you need to know how to do this, such as the SkySongBuilder Tutorial.

Instructions

Prep Work

  1. Unpack your DS Rom using DSLazy.
  2. Open HxD or your hex editor of choice. Navigate to where you unpacked your ROM file. In your hex editor, open the “overlay” folder, and then open overlay_0036.bin.
  3. Navigate to your downloaded .asm patch and open it using your text editor.
  4. Scroll through the contents of your patch until you find where it patches to overlay_0036.bin. This generally is indicated using .open "overlay_0036.bin", followed by an address for the start of the array.
  5. Look at the below line. If it begins with .orga followed by an address, navigate to If your Patch uses .orga. If it instead begins with .org followed by an address plus another address, navigate to If your Patch uses .org.

If your Patch uses .orga

  1. In your hex editor, scroll down until the address in the leftmost column matches the indicated address next to .orga in your ASM patch. See if there is data already written to that space or not.
  2. If that space is taken up, scroll down further through the common area until it returns to being entirely 00 addresses. Note down the address in the leftmost column.
    • Be aware that some patches may, rarely, deliberately leave trailing 00 addresses for functionality reasons. If you run into technical issues, you should consider leaving more space after the end of the previous patching area, or alternatively, consulting the patch author of other patches you may be using to see if you can find a safe starting address.
    • Also note that you will run into problems if you do not have enough patching space for your ASM patch below your starting address! If you think there is a risk of overwriting existing space below your starting address, consider scrolling further down to find a larger section of free ExtraSpace.
  3. Change the address next to .orga to the new starting address that you found.
  4. Patch your ASM patch as you otherwise would.
  5. Re-pack your ROM and test to see if your patch is working.

If your Patch uses .org

  1. In your hex editor, scroll down until the address in the leftmost column matches the address following the plus sign next to .org in your ASM patch. See if there is data already written to that space or not.
  2. If that space is taken up, scroll down further through the common area until it returns to being entirely 00 addresses. Note down the address in the leftmost column.
    • Be aware that some patches may, rarely, deliberately leave trailing 00 addresses for functionality reasons. If you run into technical issues, you should consider leaving more space after the end of the previous patching area, or alternatively, consulting the patch author of other patches you may be using to see if you can find a safe starting address.
    • Also note that you will run into problems if you do not have enough patching space for your ASM patch below your starting address! If you think there is a risk of overwriting existing space below your starting address, consider scrolling further down to find a larger section of free ExtraSpace.
  3. Change the address next to the plus sign .org to the new starting address that you found.
  4. Patch your ASM patch as you otherwise would.
  5. Re-pack your ROM and test to see if your patch is working.