don't click here

Basic Questions & Answers thread

Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.

  1. Fwiss

    Fwiss

    Member
    21
    0
    0
    So should I edit the Sonic 2 source, or the object code, which is where?
     
  2. FraGag

    FraGag

    Tech Member
    This is all in s2.asm, so this is where you need to make your changes. Then run build.bat and test it.
     
  3. Fwiss

    Fwiss

    Member
    21
    0
    0
    Another question, what text editors can find hex offsets like the ones you posted?
     
  4. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,100
    196
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    I suggest using ConTEXT, it was made with 68K asm in mind.
     
  5. FraGag

    FraGag

    Tech Member
    The $7000 is written as is in the disassembly, and I found the $1B20 by opening the art file in SonMapEd and multiplying the number of tiles by $20. $7000 + $1B20 = $8B20. The art_tile value is $8B20 divided by $20, and the other bits are used for flipping or using a different palette line.
     
  6. Fwiss

    Fwiss

    Member
    21
    0
    0
    No idea how to install ConTEXT. Any help with these file types?
     
  7. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,100
    196
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    Quick question, where did you download the program from? If you download the excutable file from the wiki, it takes you through the installation wizard. I got a question regarding Sonic 2. I know that HPZ in bit format is $8, ARZ is $F, and CPZ2 is $D01, but what about the other level values? I can't seem to find them...
     
  8. GT Koopa

    GT Koopa

    Member
    2,021
    18
    18
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    Alright. I have a sprite that I want to load from palette line 2 in the game that is usually from palette line 1.

    The way I thought it worked, SonMapEd's "Render starting with pallete line 2" is a no go. Where in the object's asm would that be or what would I have to insert? Or what do I have to do in SonMapEd again? I thought I got it to work before.
     
  9. SCHG:Nem s2ss

    Which disassembly are you using? If it's the 2005 Sonic 1 one, look for a line inside the object's code like move.w #$780,2(a0). If it's the SVN Sonic 1 one, look for a line like move.w #$780,obGfx(a0). If it's the 2007 or SVN Sonic 2 one, look for a line like move.w #$780,art_tile(a0). Once you've found the line just add $2000 to the $780 or whatever value it is to make the object use the second palette line.
     
  10. GT Koopa

    GT Koopa

    Member
    2,021
    18
    18
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    It worked! Thank you.
     
  11. Fwiss

    Fwiss

    Member
    21
    0
    0
    ACK! I downoaded the Highlighter File instead of ConTEXT itself! The fail is painful!

    ...But I still can't find hex offsets in ConTEXT...
     
  12. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,100
    196
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    To find hex offsets, you'll need a hex editor. Sorry that I didn't really help that much... and to figure out what the offsets specifically do check the SCHG on Sonic 2. ^^
     
  13. Fwiss

    Fwiss

    Member
    21
    0
    0
    You mean a hex editor opening a text file? Oh. I see now. Sorry for those troublingly short and useless posts, I was picturing something entirely different.
     
  14. GT Koopa

    GT Koopa

    Member
    2,021
    18
    18
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    Ok so I have this in the Resize code, so it will run constantly. I want it to run once. The code below in theory should have made itself run only once. Right now it doesn't activate. What went wrong?

    Code (Text):
    1. bcc.s    Rsizerumble; if yes, branch
    2.        
    3.  
    4. locret_6E08:
    5.         rts    
    6.        
    7. Rsizerumble:
    8.         cmpi.b     #$13,($FFFFA59A).w
    9.         bcc.s         Resizerumble2    
    10.         move.b    #$13,($FFFFA59A).w; change level layout
    11.         move.b    #$B7,($FFFFF00A).w; play sound
    12.        
    13.        
    14. Resizerumble2:        
    15.         jmp        locret_6E08
     
  15. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,205
    432
    63
    Japan
    Try that insted =P
     
  16. GT Koopa

    GT Koopa

    Member
    2,021
    18
    18
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    Branch if equal. Gah. I should have done it.

    Thanks, it works.
     
  17. Fwiss

    Fwiss

    Member
    21
    0
    0
    Oh no! My data is not corrupted, but it seems something went wrong. The assembled ROM that I hacked works, but editing its project files in SonED2 doesn't. Whenever I open the .sep files, it crashes. I know the project files are the same as the hacked rom, because I split it with Split.bat. I believe that I have some slow framerate, but altogether no crashes when ran in Gens and Fusion. Any ideas as to the error?

    It says the error is in kosinski.dll
    Something's wrong with that particular act. EDIT: Nope, other levels look corrupted in SonED2, too.
     
  18. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,100
    196
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    First off, which disassembly are you using? If you are using the SVN version, re-downloading the SonED2 project files may fix the problem. If you are using an older version, try splitting the ROM again and see if that works.
     
  19. Fwiss

    Fwiss

    Member
    21
    0
    0
    So the exact data that I hacked is not recoverable? Good thing for backups.
     
  20. Selbi

    Selbi

    The Euphonic Mess Member
    1,497
    48
    28
    Northern Germany
    Sonic ERaZor
    Recently discovered three commands I've never heard about before: smi, sne, pea. Can anyone explain those please?