A guide to making Labyrinth Zone load correctly in Sonic 2 Nick Arcade

Discussion in 'Discussion and Q&A Archive' started by SuperEgg, Jul 22, 2011.

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

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    As most of you know, I just released my disassembly for Sonic 2 Nick Arcade. Unfortunately, I forgot to fix this easy to fix bug that plagues this game.


    It seems poor old Labyrinth Zone in this game loads a broken Chemical Plant Zone.


    /monthly_07_2011/post-970-1311288644_thumb.png


    This itself is a simple fix, so lets get to it.


    First, open the Sonic 2 NA disassembly. (No brainer)


    Two, go to Subordinate loc_72F4:


    Here you should see



    loc_72F4: ; CODE XREF: MainLevelLoadBlock+58j
    movea.l (a2)+,a0


    cmpi.b #2,($FFFFFE10).w


    beq.s loc_7338


    cmpi.b #3,($FFFFFE10).w


    beq.s loc_7338


    cmpi.b #4,($FFFFFE10).w


    beq.s loc_7338


    cmpi.b #5,($FFFFFE10).w


    beq.s loc_7338



    This line refers to what level the game loads the Chunks, tiles, ect.



    cmpi.b #2,($FFFFFE10).w



    In this case, this line is Marble Zone because it is 2.


    Now If you follow the level order, 3 is SYZ/HPZ, 4 is SLZ/EHZ, and 5 is HTZ/SBZ. So what about GHZ? It has it's own separate subordinate to solve this, but for the sake of talking, it is 0. So where is Labyrinth Zone? Well, it is not listed, but if it were, it would be 1. So we need to fix that.


    First, go to the first line.



    cmpi.b #2,($FFFFFE10).w



    Right above this line, insert this piece of code.



    cmpi.b #1,($FFFFFE10).w
    beq.s loc_7338



    Now, it should look like this.



    movea.l (a2)+,a0
    cmpi.b #1,($FFFFFE10).w


    beq.s loc_7338


    cmpi.b #2,($FFFFFE10).w


    beq.s loc_7338


    cmpi.b #3,($FFFFFE10).w


    beq.s loc_7338


    cmpi.b #4,($FFFFFE10).w


    beq.s loc_7338


    cmpi.b #5,($FFFFFE10).w


    beq.s loc_7338



    Build your rom and go to Labyrinth Zone.


    Now you should see this.


    /monthly_07_2011/post-970-1311289656_thumb.png


    Now, due to this game being a build off of Sonic 1, Labyrinth Zone still has the rippling effect. It is not a glitch, but if you want, you can edit change that. Otherwise noted, it should work perfectly. Now you can change what art loads into levels without it not working. Happy hacking.
     

    Attached Files:

    Last edited by a moderator: Jul 22, 2011
  2. TheJeli

    TheJeli Umm... Member

    Joined:
    Jun 20, 2011
    Messages:
    245
    Location:
    West London
    Thanks alot! I like the rippling effect, I might make use of that...


    Anyway, do you plan on makng any other guides? Just curious.
     
    Last edited by a moderator: Jul 25, 2011
  3. SuperEgg

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    I actually do. If you didn't know, I re-released the S2NA dissasembly with this bug fix already in place.
     
  4. TheJeli

    TheJeli Umm... Member

    Joined:
    Jun 20, 2011
    Messages:
    245
    Location:
    West London
    I know I already downloaded it. I also noticed (it might be me) but I edited the platform art and put one in at the beggining of this level but SonED2 couldn't save it. I am using the most recent version.


    Sorry for going slightly of topic.
     
  5. SuperEgg

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    Did you create a project file for it? If not, then it will not load. You need to actually go into the asm and edit certain files. Fear not my friend, I will release a tutorial about level porting, which should fix your problem.
     
  6. TheJeli

    TheJeli Umm... Member

    Joined:
    Jun 20, 2011
    Messages:
    245
    Location:
    West London
    Thanks! I am not good at ASM at all and wouldn't know where to start.
     
Thread Status:
Not open for further replies.