Monitors?

Discussion in 'Discussion and Q&A Archive' started by Sephiroth, Sep 7, 2007.

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

    Sephiroth WHY SO CURIOUS?!? Member

    Joined:
    Aug 11, 2007
    Messages:
    507
    Location:
    Qatar, M.E.
    I want to edit the coding for a monitor in Sonic 2 (replace one that I probably will not use) but I don't know the locations of the monitors in the ASM file. Like how in the Special Ring Object (RHS's guide) it is at loc_1429C and some extra coding at loc_1428C (I think). Does anyone know where there is a list or know some of the locations of one or two (prefferably the Eggman one?) Thank you so much for the help in advance! Will credit those who help!
     
  2. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Search for SprPoint: in the ASM file 'til you come to a list. It looks like this:



    Code:
    ; ---------------------------------------------------------------------------
    
    ; Sprite Programming Pointers
    
    ;
    
    ; This array contains the pointers to all the level sprites used in the game.
    
    ; ---------------------------------------------------------------------------
    
    SprPoint: dc.l Sprite_19F50&#59; 0&#59; DATA XREF: sub_15FCC+8t
    
    dc.l Sprite_1B8A4&#59; 1
    
    dc.l Sprite_1FCDC&#59; 2
    
    dc.l Sprite_208DC&#59; 3
    
    dc.l Sprite_1D200&#59; 4
    
    dc.l Sprite_214C4&#59; 5
    
    dc.l Sprite_24020&#59; 6
    
    dc.l Sprite_1DD20&#59; 7
    
    dc.l Sprite_338EC&#59; 8
    
    dc.l Sprite_1D320&#59; 9
    
    dc.l Sprite_2009C&#59; 10
    
    dc.l Sprite_20210&#59; 11
    
    dc.l Sprite_191B8&#59; 12
    
    dc.l Sprite_12E18&#59; 13
    
    dc.l Sprite_13600&#59; 14
    
    dc.l Sprite_347EC&#59; 15
    etc, etc.


    The object number goes as so


    01


    02


    03


    04


    05


    06


    07


    08


    09


    0A


    0B


    etc, etc.


    So, object 26 (monitors) is


    dc.l Sprite_12670 ; 37
     
    Last edited by a moderator: Sep 8, 2007
  3. Sephiroth

    Sephiroth WHY SO CURIOUS?!? Member

    Joined:
    Aug 11, 2007
    Messages:
    507
    Location:
    Qatar, M.E.
    Thanks. Will credit where used.


    Quick Edit: Does anyone know which loc_xxxxx under the Sprite Monitor section is the Eggman monitor?
     
    Last edited by a moderator: Sep 8, 2007
  4. Armada

    Armada DID SOMEONE SAY WEEABOO? Member

    Joined:
    Aug 17, 2007
    Messages:
    98
    Match the byte to the loction.
     
  5. shobiz

    shobiz Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    198
    Location:
    Karachi, Pakistan
    For future reference, http://info.sonicretro.org/SCHG:Sonic_2/Ob...diting/Pointers contains the addresses for all objects. Note that object $26 (the monitor) just contains the code for displaying the monitor and breaking it, and that the power-ups themselves (and the image of the monitor floating up in the air) are handled by object $2E. The code for the robotnik power-up is located at loc_12938 in Nemesis' disassembly, or badnik_monitor in Aurochs' disassembly (which I highly recommend). Note that this code is shared with the static monitor, so it might be better if instead of changing this subroutine directly, you changed the entry for the robotnik monitor in off_12924 (it's the 4th entry) to point to your new subroutine.
     
  6. Sephiroth

    Sephiroth WHY SO CURIOUS?!? Member

    Joined:
    Aug 11, 2007
    Messages:
    507
    Location:
    Qatar, M.E.
    Thanks a lot! Out of curiosity, where could one get the Auroch's disassembly? It sounds so much easier to work with. The Project Files would mess with my head for a bit, but that is a five minute job.
     
  7. shobiz

    shobiz Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    198
    Location:
    Karachi, Pakistan
    http://info.sonicretro.org/Disassemblies. SMTP was nice enough to fix the three small "bugs" in the disassembly, so you'll only have to make your own project files.


    The S2Beta topic is http://www.s2beta.com/forums/index.php?showtopic=7909. It contains some useful information, but ignore the bugfixes in the topic, since SMTP fixed them in the download link given above.
     
    Last edited by a moderator: Sep 8, 2007
Thread Status:
Not open for further replies.