Level Select Selection Issue

Discussion in 'Discussion and Q&A Archive' started by theocas, May 4, 2010.

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

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    I have re-arranged my Level Select so all zones are now on the left. The selection for that works. Here's a picture:


    [​IMG]


    I wanted to add an entry for HPZ, and I did so in PlaneEd. Selection was broken, so I went to make a copy of EHZ's level select highlight array, and modified it to the HPZ values. Now, HPZ Act 1 selects sound test, and does what sound test does. Act 2 is not selectable at all! I know there must be some offset table telling the game where to find what zone, but my bigger problem is the highlight. I looked through all of the Level Select code for some kind of maximum selection value, but changing the values that look like they could be this value simply breaks the level select completely. Can anyone point out to me where this index would be, like in what method or what it's ASM command is. Thanks so much, since I really want this fixed.
     
    Last edited by a moderator: May 4, 2010
  2. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    The reason why it's not as simple as you want it, is because it's been written in an optmized way, in order to save not only space, but also time, enabling the processor to perform these operations, the quickest way possible, so I'm pretty sure that the Sonic 2 level select menu is very hard coded in that respect, and you'd need to know a fair bit about the VDP to get it the way you want. Unfortunately, that requires you to learn how to operate the VDP and manipulate it's mapping plane spaces.


    Until then, 'fraid I can't help you.
     
  3. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    Would it be easier just to add some kind of second Level Select, or go to HPZ when holding A and selecting EHZ? Just an idea.
     
  4. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    It would be easier of course, but it would also be pretty dumb
     
  5. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    If you know the values, or have altered values and the selection has changed to say, from EHZ to sountest, then your proberly on the right track just edit them until its positioned right. Also I think you have to change how many entries there are, like say it was 13, then change it to 14 if you want to add another ect. The one that esrail done for sonic 1 which is a replicar of the sonic 2 levelselect for sonic 1 is a bit easie to understand but again its for sonic 1. I wish I could go on ssrg at home, and check my s2 disam but I'm afraid my laptop thinks website is down lol, so thats all I have for my knowledge plus I'm currently at work.
     
  6. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    I did get the positioning and stuff right, it is just the amount of values. It's just a matter of finding that value. I've looked at that code for at least an hour and tried changing almost everything, but no luck.
     
  7. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    I am pretty sure there is a table that needs to be expanded as I have done this before and didnt seem to have any problems... the thing to remeber is if you add something to a table you must expand the table to allow the new entry if you get what I mean?


    edit: Have a look at this label in the S2 asm file.... Misc_9454:
     
    Last edited by a moderator: May 6, 2010
  8. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    I have added an item for HPZ there ($800 and $801) and added a selection index thing there also. Now the selection table looks like this:




    byte_96EE:


    ; First Column


    dc.b 3, 6, 3, $24, 3, 6, 4, $24 ; EHZ 1+2


    dc.b 5, 6, 5, $24, 5, 6, 6, $24 ; CPZ 1+2


    dc.b 7, 6, 7, $24, 7, 6, 8, $24 ; ARZ 1+2


    dc.b 9, 6, 9, $24, 9, 6, $A, $24 ; CNZ 1+2


    dc.b $B, 6, $B, $24, $B, 6, $C, $24 ; HTZ 1+2


    dc.b $D, 6, $D, $24, $D, 6, $E, $24 ; MCZ 1+2


    dc.b $F, 6, $F, $24, $F, 6, $10, $24 ; OOZ 1+2


    ; Second Column


    dc.b $11, 6, $11, $24, $11, 6, $12, $24 ; MTZ 1 + 2


    dc.b $11, 6, $13, $24 ; MTZ 3


    dc.b $14, 6, $14, $24 ; SCZ


    dc.b $15, 6, $15, $24 ; WFZ


    dc.b $16, 6, $16, $24 ; DEZ


    dc.b $17, 6, $17, $24 ; Special Stage


    dc.b 3, $2C, 3, $48, 3, $2C, 4, $48 ; HPZ 1+2


    dc.b $12, $2C, $12, $48 ; Sound Test



    Doing this still doesn't let me select HPZ correctly.


    Lips2k8: There must be some other value somewhere, since expanding the table didn't help. If it helps if I upload my complete level select code, tell me and I'll do so.
     
    Last edited by a moderator: May 7, 2010
Thread Status:
Not open for further replies.