don't click here

Editing Sprites with Flex 2

Discussion in 'Engineering & Reverse Engineering' started by CupcakeLove67, Mar 21, 2025.

Tags:
  1. CupcakeLove67

    CupcakeLove67

    More known as PeanutNoceda Member
    [THIS IS A REPOST FROM THE SSRG TUTORIAL]

    IMPORTANT, THIS GUIDE MAYBE HAS SOME GRAMATICAL ERRORS, IF YOU FIND ONE, PLEASE, LET ME KNOW TO FIX IT


    So, I decided to do a new guide, this time about Flex 2, if you dont want to use SonMapED.
    So, first of all, what is Flex 2?
    Flex 2 is a is a multi-purpose art and mapping editor for the Sega Megadrive made by snkenjoi.
    The original Flex was a web app, which gave it several limitations. A full rewrite for desktop opens up the ability to use real project files, as well as various other improvements.
    Key improvements;
    • project files
    • sexy flexible UI layout
    • custom mapping formats
    • undo / redo
    • ability to draw directly on sprites
    • multiple heuristics for spritesheet importing
    • full access to dplc/mapping data

    So, time to go to action!
    To load any art, you need to select the art file that you want to load
    [​IMG]
    Uncompressed for the art presented in artunc.
    Nemesis for the art presented in Artnem.
    For this guide, we are going to use the Uncompressed Art file.
    Now, to load the art...
    [​IMG]
    the Offset, is for the main art file (Your disasm/Artunc/Sonic.bin)
    Mappings are to load the maps of the object. (Your disasm/_Maps/ Sonic.asm)
    DPLCs... well, if you want to load stuff like Sonic. (Your disasm/_Maps/Sonic - Dynamic Gfx Script.asm)
    And pallete, for the colors. (Your disasm/Palette/Sonic.bin)
    and then, click on "Load".
    [​IMG] If you did it right, this should be the result.
    Oops, forgot to mention, if you edit with another game, that part that says "Sonic 1", change it into the game that you will edit.
    Now, time to go with the sauce!
    Time to edit!
    Press M In your keyboard to load this edit menu
    [​IMG] But if you want to add a new ones... then...
    [​IMG]
    Export image is to export the image and convert the sprite into an image file.
    export spritesheet is to export ALL the sprites.
    Import image is to import an image as an sprite. (I dont recommend to use it if you want to add a new one)
    Import sprite is to add a new sprite.
    As an extras, to delete sprites press D + S.
    Not important, but i want to mention it.
    And now, how you can save it?
    go to File and then click on save
    [​IMG]
    And thats all, I hope that this helped you~!
    Credits:
    Guide creator: PeanutNoceda (Also known as CupcakeLove67)
    Flex 2: snkenjoi.
     
    Last edited: Mar 21, 2025
  2. DaBigJ

    DaBigJ

    The Bubsy fan of all time Member
    54
    18
    8
    How do I edit hud and title screen sprites with Flex 2?
     
  3. CupcakeLove67

    CupcakeLove67

    More known as PeanutNoceda Member
    Change the art file to uncompressed to Nemesis, and then in the offset load the hud art, its located in "Your disasm name/Artnem/HUD.bin or HUD.nem"
    and for mappings go to _Maps and search HUD.
    If your HUD Uses yellow of sonic (only sonic 1) palette, load the Sonic palette in the part of palette/sonic.bin
    But if your HUD its like the sonic 2 one, then select a palette of a level.
    Theres NO DLPC For it.
    the result should be something like this:

    upload_2025-3-21_16-59-57.png
     
  4. DaBigJ

    DaBigJ

    The Bubsy fan of all time Member
    54
    18
    8
    Wait, this means I can use this with HiveBrain art files? I wish I knew this before using SonMapEd. Thanks!
     
  5. DaBigJ

    DaBigJ

    The Bubsy fan of all time Member
    54
    18
    8
    Sorry for the double post @CupcakeLove67 I'm having issues with Sonic's mappings for Sonic 1 (2005 HiveBrain) as I keep getting this error. Screenshot (202).png
    I can't find any DPLCs either, am I doing something wrong? I even tried reverting the files.
     
  6. CupcakeLove67

    CupcakeLove67

    More known as PeanutNoceda Member
    [Doesnt help, please ignore]
    Oh?
    If you use hivebrain the DPLCs are located in _inc if I remember right.
    I dont really know, Im not an Hivebrain 2005 user.
     
    Last edited: Mar 22, 2025
  7. Kilo

    Kilo

    The Scatterbrained Hacker Tech Member
    1,363
    1,299
    93
    Canada
    Sonic 1 Source Code Recration
    It tells you exactly what the error is, Map_Sonic isn't defined in in the mapping file, it's external in the main asm. It used to be fine in earlier versions and just assumed the base address is 0 if it's not defined, but got broken seemingly unintentionally about 2 updates ago I think, I reported it to snkenjoi, so hopefully it should be fixed in the next update. But to fix it temporarily just place "Map_Sonic:", or whatever label it's giving errors about at the start of the mapping file. Just be sure to immediately save after it loads so Flex 2 can overwrite it with it's own labels so you don't get a multiply define error the next time you build the ROM.
     
    • Like Like x 1
    • Useful Useful x 1
    • List
  8. DaBigJ

    DaBigJ

    The Bubsy fan of all time Member
    54
    18
    8
    I appreciate the help, though I seem to also just be having issues with the asm files for HiveBrain 2005 with Flex 2. Had similar issues with the lamppost and the hud I had just edited yesterday.

    Edit: Ended up downgrading my Flex 2 version and it works now, thankfully
     
    Last edited: Mar 23, 2025