Sonic 1 - No-Brainer - How to make title card art editable in SonMapEd

Discussion in 'Tutorials Archive' started by DarkLeach, Feb 1, 2012.

Thread Status:
Not open for further replies.
  1. DarkLeach

    DarkLeach Well-Known Member Member

    Joined:
    Jul 3, 2011
    Messages:
    193
    Location:
    In the middle of desert heat
    It's DarkLeach7 with another tutorial! This time all by me! :) Now if you have reason to subject that I stole this from anything (Which I didn't), you can leave comments below and request for Admin Removal, (I checked twice, there isn't a tutorial on this, but if there is for some reason please notify me)


    Anyway this IS really easy to do.


    Let's say you wanted to edit the tile-Graphics from the title cards but find it near impossible to do because the Title Cards have no Mappings! There's an easy way to fix this.


    First go to "Map_obj34"


    You'll should see this:



    Code:
    
    ; ===========================================================================
    
    ; ---------------------------------------------------------------------------
    
    ; Sprite mappings - zone title cards
    
    ; ---------------------------------------------------------------------------
    
    Map_obj34: dc.w byte_C9FE-Map_obj34
    
      dc.w byte_CA2C-Map_obj34
    
      dc.w byte_CA5A-Map_obj34
    
      dc.w byte_CA7A-Map_obj34
    
      dc.w byte_CAA8-Map_obj34
    
      dc.w byte_CADC-Map_obj34
    
      dc.w byte_CB10-Map_obj34
    
      dc.w byte_CB26-Map_obj34
    
      dc.w byte_CB31-Map_obj34
    
      dc.w byte_CB3C-Map_obj34
    
      dc.w byte_CB47-Map_obj34
    
      dc.w byte_CB8A-Map_obj34
    
    byte_C9FE: dc.b 9	; GREEN HILL
    
      dc.b $F8, 5, 0, $18, $B4
    
      dc.b $F8, 5, 0, $3A, $C4
    
      dc.b $F8, 5, 0, $10, $D4
    
      dc.b $F8, 5, 0, $10, $E4
    
      dc.b $F8, 5, 0, $2E, $F4
    
      dc.b $F8, 5, 0, $1C, $14
    
      dc.b $F8, 1, 0, $20, $24
    
      dc.b $F8, 5, 0, $26, $2C
    
      dc.b $F8, 5, 0, $26, $3C
    
    byte_CA2C: dc.b 9   ; LABYRINTH
    
      dc.b $F8, 5, 0, $26, $BC
    
      dc.b $F8, 5, 0, 0, $CC
    
      dc.b $F8, 5, 0, 4, $DC
    
      dc.b $F8, 5, 0, $4A, $EC
    
      dc.b $F8, 5, 0, $3A, $FC
    
      dc.b $F8, 1, 0, $20, $C
    
      dc.b $F8, 5, 0, $2E, $14
    
      dc.b $F8, 5, 0, $42, $24
    
      dc.b $F8, 5, 0, $1C, $34
    
    byte_CA5A: dc.b 6   ; MARBLE
    
      dc.b $F8, 5, 0, $2A, $CF
    
      dc.b $F8, 5, 0, 0, $E0
    
      dc.b $F8, 5, 0, $3A, $F0
    
      dc.b $F8, 5, 0, 4, 0
    
      dc.b $F8, 5, 0, $26, $10
    
      dc.b $F8, 5, 0, $10, $20
    
      dc.b 0
    
    byte_CA7A: dc.b 9   ; STAR LIGHT
    
      dc.b $F8, 5, 0, $3E, $B4
    
      dc.b $F8, 5, 0, $42, $C4
    
      dc.b $F8, 5, 0, 0, $D4
    
      dc.b $F8, 5, 0, $3A, $E4
    
      dc.b $F8, 5, 0, $26, 4
    
      dc.b $F8, 1, 0, $20, $14
    
      dc.b $F8, 5, 0, $18, $1C
    
      dc.b $F8, 5, 0, $1C, $2C
    
      dc.b $F8, 5, 0, $42, $3C
    
    byte_CAA8: dc.b $A   ; SPRING YARD
    
      dc.b $F8, 5, 0, $3E, $AC
    
      dc.b $F8, 5, 0, $36, $BC
    
      dc.b $F8, 5, 0, $3A, $CC
    
      dc.b $F8, 1, 0, $20, $DC
    
      dc.b $F8, 5, 0, $2E, $E4
    
      dc.b $F8, 5, 0, $18, $F4
    
      dc.b $F8, 5, 0, $4A, $14
    
      dc.b $F8, 5, 0, 0, $24
    
      dc.b $F8, 5, 0, $3A, $34
    
      dc.b $F8, 5, 0, $C, $44
    
      dc.b 0
    
    byte_CADC: dc.b $A   ; SCRAP BRAIN
    
      dc.b $F8, 5, 0, $3E, $AC
    
      dc.b $F8, 5, 0, 8, $BC
    
      dc.b $F8, 5, 0, $3A, $CC
    
      dc.b $F8, 5, 0, 0, $DC
    
      dc.b $F8, 5, 0, $36, $EC
    
      dc.b $F8, 5, 0, 4, $C
    
      dc.b $F8, 5, 0, $3A, $1C
    
      dc.b $F8, 5, 0, 0, $2C
    
      dc.b $F8, 1, 0, $20, $3C
    
      dc.b $F8, 5, 0, $2E, $44
    
      dc.b 0
    
    byte_CB10: dc.b 4   ; ZONE
    
      dc.b $F8, 5, 0, $4E, $E0
    
      dc.b $F8, 5, 0, $32, $F0
    
      dc.b $F8, 5, 0, $2E, 0
    
      dc.b $F8, 5, 0, $10, $10
    
      dc.b 0
    
    byte_CB26: dc.b 2   ; ACT 1
    
      dc.b 4, $C, 0, $53, $EC
    
      dc.b $F4, 2, 0, $57, $C
    
    byte_CB31: dc.b 2   ; ACT 2
    
      dc.b 4, $C, 0, $53, $EC
    
      dc.b $F4, 6, 0, $5A, 8
    
    byte_CB3C: dc.b 2   ; ACT 3
    
      dc.b 4, $C, 0, $53, $EC
    
      dc.b $F4, 6, 0, $60, 8
    
    byte_CB47: dc.b $D   ; Oval
    
      dc.b $E4, $C, 0, $70, $F4
    
      dc.b $E4, 2, 0, $74, $14
    
      dc.b $EC, 4, 0, $77, $EC
    
      dc.b $F4, 5, 0, $79, $E4
    
      dc.b $14, $C, $18, $70, $EC
    
      dc.b 4, 2, $18, $74, $E4
    
      dc.b $C, 4, $18, $77, 4
    
      dc.b $FC, 5, $18, $79, $C
    
      dc.b $EC, 8, 0, $7D, $FC
    
      dc.b $F4, $C, 0, $7C, $F4
    
      dc.b $FC, 8, 0, $7C, $F4
    
      dc.b 4, $C, 0, $7C, $EC
    
      dc.b $C, 8, 0, $7C, $EC
    
      dc.b 0
    
    byte_CB8A: dc.b 5   ; FINAL
    
      dc.b $F8, 5, 0, $14, $DC
    
      dc.b $F8, 1, 0, $20, $EC
    
      dc.b $F8, 5, 0, $2E, $F4
    
      dc.b $F8, 5, 0, 0, 4
    
      dc.b $F8, 5, 0, $26, $14
    
      even
    
    


    Apparently the Mappings are in the actual assembly file (Why? I have no clue)! But you don't want that do you? If you do then this tutorial is not for you. Anyway the next thing you do is open your text editor of choice (Mine's Notepad ++) and create a new file. Cut this from "Map_obj34" :



    Code:
    
    dc.w byte_C9FE-Map_obj34
    
      dc.w byte_CA2C-Map_obj34
    
      dc.w byte_CA5A-Map_obj34
    
      dc.w byte_CA7A-Map_obj34
    
      dc.w byte_CAA8-Map_obj34
    
      dc.w byte_CADC-Map_obj34
    
      dc.w byte_CB10-Map_obj34
    
      dc.w byte_CB26-Map_obj34
    
      dc.w byte_CB31-Map_obj34
    
      dc.w byte_CB3C-Map_obj34
    
      dc.w byte_CB47-Map_obj34
    
      dc.w byte_CB8A-Map_obj34
    
    byte_C9FE: dc.b 9	; GREEN HILL
    
      dc.b $F8, 5, 0, $18, $B4
    
      dc.b $F8, 5, 0, $3A, $C4
    
      dc.b $F8, 5, 0, $10, $D4
    
      dc.b $F8, 5, 0, $10, $E4
    
      dc.b $F8, 5, 0, $2E, $F4
    
      dc.b $F8, 5, 0, $1C, $14
    
      dc.b $F8, 1, 0, $20, $24
    
      dc.b $F8, 5, 0, $26, $2C
    
      dc.b $F8, 5, 0, $26, $3C
    
    byte_CA2C: dc.b 9   ; LABYRINTH
    
      dc.b $F8, 5, 0, $26, $BC
    
      dc.b $F8, 5, 0, 0, $CC
    
      dc.b $F8, 5, 0, 4, $DC
    
      dc.b $F8, 5, 0, $4A, $EC
    
      dc.b $F8, 5, 0, $3A, $FC
    
      dc.b $F8, 1, 0, $20, $C
    
      dc.b $F8, 5, 0, $2E, $14
    
      dc.b $F8, 5, 0, $42, $24
    
      dc.b $F8, 5, 0, $1C, $34
    
    byte_CA5A: dc.b 6   ; MARBLE
    
      dc.b $F8, 5, 0, $2A, $CF
    
      dc.b $F8, 5, 0, 0, $E0
    
      dc.b $F8, 5, 0, $3A, $F0
    
      dc.b $F8, 5, 0, 4, 0
    
      dc.b $F8, 5, 0, $26, $10
    
      dc.b $F8, 5, 0, $10, $20
    
      dc.b 0
    
    byte_CA7A: dc.b 9   ; STAR LIGHT
    
      dc.b $F8, 5, 0, $3E, $B4
    
      dc.b $F8, 5, 0, $42, $C4
    
      dc.b $F8, 5, 0, 0, $D4
    
      dc.b $F8, 5, 0, $3A, $E4
    
      dc.b $F8, 5, 0, $26, 4
    
      dc.b $F8, 1, 0, $20, $14
    
      dc.b $F8, 5, 0, $18, $1C
    
      dc.b $F8, 5, 0, $1C, $2C
    
      dc.b $F8, 5, 0, $42, $3C
    
    byte_CAA8: dc.b $A   ; SPRING YARD
    
      dc.b $F8, 5, 0, $3E, $AC
    
      dc.b $F8, 5, 0, $36, $BC
    
      dc.b $F8, 5, 0, $3A, $CC
    
      dc.b $F8, 1, 0, $20, $DC
    
      dc.b $F8, 5, 0, $2E, $E4
    
      dc.b $F8, 5, 0, $18, $F4
    
      dc.b $F8, 5, 0, $4A, $14
    
      dc.b $F8, 5, 0, 0, $24
    
      dc.b $F8, 5, 0, $3A, $34
    
      dc.b $F8, 5, 0, $C, $44
    
      dc.b 0
    
    byte_CADC: dc.b $A   ; SCRAP BRAIN
    
      dc.b $F8, 5, 0, $3E, $AC
    
      dc.b $F8, 5, 0, 8, $BC
    
      dc.b $F8, 5, 0, $3A, $CC
    
      dc.b $F8, 5, 0, 0, $DC
    
      dc.b $F8, 5, 0, $36, $EC
    
      dc.b $F8, 5, 0, 4, $C
    
      dc.b $F8, 5, 0, $3A, $1C
    
      dc.b $F8, 5, 0, 0, $2C
    
      dc.b $F8, 1, 0, $20, $3C
    
      dc.b $F8, 5, 0, $2E, $44
    
      dc.b 0
    
    byte_CB10: dc.b 4   ; ZONE
    
      dc.b $F8, 5, 0, $4E, $E0
    
      dc.b $F8, 5, 0, $32, $F0
    
      dc.b $F8, 5, 0, $2E, 0
    
      dc.b $F8, 5, 0, $10, $10
    
      dc.b 0
    
    byte_CB26: dc.b 2   ; ACT 1
    
      dc.b 4, $C, 0, $53, $EC
    
      dc.b $F4, 2, 0, $57, $C
    
    byte_CB31: dc.b 2   ; ACT 2
    
      dc.b 4, $C, 0, $53, $EC
    
      dc.b $F4, 6, 0, $5A, 8
    
    byte_CB3C: dc.b 2   ; ACT 3
    
      dc.b 4, $C, 0, $53, $EC
    
      dc.b $F4, 6, 0, $60, 8
    
    byte_CB47: dc.b $D   ; Oval
    
      dc.b $E4, $C, 0, $70, $F4
    
      dc.b $E4, 2, 0, $74, $14
    
      dc.b $EC, 4, 0, $77, $EC
    
      dc.b $F4, 5, 0, $79, $E4
    
      dc.b $14, $C, $18, $70, $EC
    
      dc.b 4, 2, $18, $74, $E4
    
      dc.b $C, 4, $18, $77, 4
    
      dc.b $FC, 5, $18, $79, $C
    
      dc.b $EC, 8, 0, $7D, $FC
    
      dc.b $F4, $C, 0, $7C, $F4
    
      dc.b $FC, 8, 0, $7C, $F4
    
      dc.b 4, $C, 0, $7C, $EC
    
      dc.b $C, 8, 0, $7C, $EC
    
      dc.b 0
    
    byte_CB8A: dc.b 5   ; FINAL
    
      dc.b $F8, 5, 0, $14, $DC
    
      dc.b $F8, 1, 0, $20, $EC
    
      dc.b $F8, 5, 0, $2E, $F4
    
      dc.b $F8, 5, 0, 0, 4
    
      dc.b $F8, 5, 0, $26, $14
    
      even
    
    



    and paste the code you Cut from sonic1.asm (Should be the contents of "Map_obj34") in the new text document you created, and once you have it setup to your liking (I.e. comments on the top telling exactly what it does) save it into the "_maps" folder as "obj34.asm" (You can name it whatever you what but for this tutorials purpose it will be "obj34.asm")



    Now obviously this won't build anymore because we cut out some code and put it somewhere else. Here's what you put in place of all the mappings you cut out.



    Code:
    
    include "_mapsobj34.asm"
    
    
    So now you should have this:



    Code:
    
    Map_obj34:
    
      include "_mapsobj34.asm"
    
    
    Save and build and the game will run fine. Now open SonMapEd and load all the things you need. When you open the mappings file for the title cards (remember this should be named "obj34.asm" and in the "_maps" folder) SonMapEd should load them up.


    Screen for proof that this works:


    /monthly_02_2012/post-1593-0-53337900-1328059490_thumb.png


    You can edit the Title Card art as you please now. You can also do this with "obj3A" and "obj7E" but I'm not showing those because I'd be showing the exact same thing. Anyway with this done, a lot of code space has been freed up and some "Out of Range" Errors can be prevented, or stopped altogether. And if your using Selbi's "Sonic 1 - Text Code Generator" Apply the mappings you get from there to the "obj34.asm" we created instead. Also if your using Selbi's tutorial for Dynamic Title Cards you can apply it to the "obj34.asm" instead of the "sonic1.asm" file thus preventing the waste valuable code space. It should work but I haven't tried it or used that tutorial yet, but I'm going to use it sooner or later.


    Thanks for reading and hoped this help make your hacking experience a little easier. :)


    Tutorial "Sonic 1 - No-Brainer - How to make title card art editable in SonMapEd" Version 1.0 by DarkLeach7


    If you find any errors or have any compliments or concerns please comment below. ;)


    ~DarkLeach7 Out!

    [/CODE]
     

    Attached Files:

    Last edited by a moderator: Feb 1, 2012
  2. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    This could be somewhat helpful, but I think that Selbi's Text Editor is a better alternative.


    Also unless you put the Include at the end it wont save any space I think.
     
    Last edited by a moderator: Feb 1, 2012
  3. DeoxysKyogre

    DeoxysKyogre No idea what to put here .-. Member

    Joined:
    Jan 31, 2009
    Messages:
    298
    Sure, but this is very useful in case someone edits the letters' size or mappings. If not, Sonic Text Code Generator is definitely the best way to edit the title cards.


    Nice tutorial here anyways, DarkLeach7
     
  4. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    That said then yes it is very helpful.
     
    Last edited by a moderator: Feb 1, 2012
Thread Status:
Not open for further replies.