Ready Sonic help?

Discussion in 'Discussion and Q&A Archive' started by Dark Lips, Aug 8, 2011.

Thread Status:
Not open for further replies.
  1. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    Hi there, I was experimenting with Ready Sonic dissasembely earlier only to be stumped when trying to add new objects... the reason being I have never seen an object index like this. I can only assume it is based on those new fangled dissasembelys that i absolutely hate as they seem to overcomplicate everything!!! Can anybody explain to me how it works and how I would go about adding new objects to the object index?


    just incase you dont know what I am on about here is the offending file....


    [​IMG]
     Object Pointers.zip   2.78K
      3

    Object Pointers.zip
     

    Attached Files:

  2. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    I don't like them much either, but they aren't that complicated.


    When you see:





    ptr_SonicPlayer: dc.l SonicPlayer ; $01


    ptr_Obj02: dc.l ObjectFall


    ptr_Obj03: dc.l ObjectFall


    ptr_Obj04: dc.l ObjectFall



    the equivalent in the 2005 disassembly is




    dc.l Obj01, ObjectFall, ObjectFall, ObjectFall



    Each pointer (those ptr things) is an address of the rom, and each id is equivalent to the number of the object, so when you read:



    id_Obj06: equ ((ptr_SonicPlayer-Obj_Index)/4)+1



    it's really an equation: the ID of the object can now be called "id_Obj06", and its value equals the address of the pointer minus the address of the beginning of the object pointer list, divided by 4 (because it's a long), plus 1 because there's no object 0 (when the engine finds a 0 at the object's address, it skips it).


    With that method, rather than using the "number" of the object, you can use its id, which is supposedly easier to remember, or at least easier to find in the list. It also makes it easier to reorganize the list if necessary, although for this to work properly you'd need to use those IDs everywhere in the disassembly and in the object layout files.


    So to add more objects, add more entries to those lists using the same format.
     
    Last edited by a moderator: Aug 8, 2011
  3. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    Thank you, that worked a treat - my next problem apearas that even though i have a firesheild it dosnt display. More research required me thinks !!!
     
  4. Spanner

    Spanner The Tool Member

    Joined:
    Aug 9, 2007
    Messages:
    2,570
    ReadySonic is based on the Sonic 1 SVN disassembly. Sorry to disappoint anyone.
     
  5. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    Does anybody know if the guy that made this would be willing to do a version based on the 2005 dissasembely? I think it would be most usefull.
     
  6. rika_chou

    rika_chou Adopt Member

    Joined:
    Aug 11, 2007
    Messages:
    689
    I think you should just get used to using the newer SVN dissasembely, rather than ask someone else to do a lot of work on something outdated.


    OR just use the old dissasembely that you're used too. The bugs fixed in Ready Sonic aren't too noticeable anyway.
     
  7. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    I know, I am just being lazy !!! I should really - maybe its time to get cracking on my sonic 2 hack instead.
     
Thread Status:
Not open for further replies.