• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[ASM & Hex✓] What does it mean to compile/decompile. & how to use XSE

  • 853
    Posts
    4
    Years
    • Seen Nov 9, 2023
    When I say this I mainly mean for asm and scripting in general.

    I understand that from the perspective of scripting and asm, to compile essentially means to put your changes into the game.
    After looking at how the code changes, I understood that this meant to take it from its respective "language" and convert it into hex.

    Then I watched a video that mentioned learning new scripts by decompiling existing ones, so that's taking existing bytes and reverting it to xse script language so its readable.

    My question is, are the compilers and de-compilers used by asm and xse different?

    They both convert to hex, but the initial languages are different right, so wouldn't it cause issue if I tried to decompile something that was compiled from a different source?

    Finally is xse only for event scripts? as someone mentioned to me, something like trying to read battle scripts with xse would just return nonsense.
     
    Last edited:
    @Meister_anon~Master_o f_None

    Take a glimpse at this: https://en.wikipedia.org/wiki/Compiler.

    In case of XSE this means that XSE compiles scripting commands (the programming language in this case) to hex code (the lower level language). When decompiling this goes the other way around, from hex code to XSE scripting commands. You understood that correctly;)

    My question is, are the compilers and de-compilers used by asm and xse different?

    Yes, they are different.

    They both convert to hex, but the initial languages are different right, so wouldn't it cause issue if I tried to decompile something that was compiled from a different source?

    If you're trying to decompile an ASM routine in XSE it won't lead to a result you will be able to read. It will lead to a blank offset or some gibberish.

    Finally is xse only for event scripts? as someone mentioned to me, something like trying to read battle scripts with xse would just return nonsense.

    Yes, XSE is generally used for event and map/level scripts in the overworld. Battle scripts opened in XSE will indeed return nonsense.
     
    If you're trying to decompile an ASM routine in XSE it won't lead to a result you will be able to read. It will lead to a blank offset or some gibberish.

    Yes that has been my experience, so if xse is indeed for ony event scripts, then I guess people work with battle scripts and all the other types,
    via just asm and disassembly only then.

    Thanks for confirming.
     
    Back
    Top