If a 7th special stage is added to Sonic 1, why may it seem impossible to play?

Discussion in 'Discussion and Q&A Archive' started by Professor Neo, Mar 23, 2010.

Thread Status:
Not open for further replies.
  1. Professor Neo

    Professor Neo Well-Known Member Member

    Joined:
    Nov 16, 2008
    Messages:
    103
    Location:
    United States
    Before anyone replies, I admit that I indeed receive help in adding a 7th special stage to Sonic 1 and contributed little or nothing to it.


    The 7th stage is nearly impossible to play without Debug mode due to the fact that:


    Sonic starts in the glitched area outside the stage area


    [​IMG]


    The bumper behavior is strange that it bumps Sonic in one fixed direction; in some cases, forcing him outside the stage area, which is an awkward result


    [​IMG]


    [​IMG]


    Thumbs up to Quickman and Cinossu, I read that post on Retro and went with whatever was planned--Cinossu decided to use the 7th emerald in place of the 1-UP block because it didn't require a lot of coding and it was a removable item other than an emerald or a ring. However, is there a way to make the object use a different palette line so that it won't ruin palettes of other objects? I redited the 1-UP's art to make the 7th Chaos emerald--Like Cinossu did. The 1-UP palette falls on the first line. How can I change that? (Because I may edit part of a different line light blue to allow it to use light blue shading)


    [​IMG]


    Post I referred to:


    http://forums.sonicretro.org/index.php?sho...l=special+stage
     
  2. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    Firstly, you seem very intent on thanking the people who helped you, I hope I haven't scared you into it, I was just mearly trying to make you understand the respectful side of help, sorry if I came accross as patronizing, didn't mean to.


    As for the palette issue, in the mappngs you'll notice the mapping code looks something like this:



    dc.b $??,$??,$??,$??,$??
    dc.b $??,$??,$??,$??,$??


    dc.b $??,$??,$??,$??,$??


    dc.b $??,$??,$??,$??,$??


    dc.b $??,$??,$??,$??,$??



    might be a bit different and the ??'s are the Hex values (Obviously I don't know what your values are so..), but anyway, the middle value:



    vv
    dc.b $??,$??,$??,$??,$??



    Add 20 to it, it'll use the next palette line. (It's really dependant on the bits, but that might take a while to explain)


    Anywho, congratulations on getting your 7th stage up and running.
     
  3. Professor Neo

    Professor Neo Well-Known Member Member

    Joined:
    Nov 16, 2008
    Messages:
    103
    Location:
    United States
    I know that part now, but I can't seem to find the mappings for the 1-UP block. If I can find that, I can carry on from there. Is it obvious that the mappings for the special stage 1-UP blocks are part of Object 09 or 10? --Because they use Sonic's palette (Line 1)
     
  4. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    That's.... actually a good question, I can only asume that it's using the mappings to another block, however routine "SS_Ani1Up:":


    from:



    move.b #5,2(a0)



    to:



    move.b #$25,2(a0)



    might wirk out nicely..


    EDIT: that code $02(a-), I'm asuming is the VRam location read/pointer, you'll have to check it out to see if it actually works.
     
    Last edited by a moderator: Mar 23, 2010
  5. Professor Neo

    Professor Neo Well-Known Member Member

    Joined:
    Nov 16, 2008
    Messages:
    103
    Location:
    United States
    Nothing happened, but should I create a set of mappings for the 1-up block like the other ones?--There are mappings for the other blocks.
     
  6. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    Hey just try, you never know it might work :) .
     
  7. c1owd

    c1owd Previously 'CarrascoZX0' Member

    Joined:
    Dec 13, 2008
    Messages:
    364
    For fixing Sonic's start location in a special stage. Just go to you misc folder and edit sloc_ss.bin (start locations_special stage)
     
  8. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    That wont work for the 7th special stage as the file only has start positions for the original 6 - you will need to add one more entry and make sure the game knows to read it.
     
  9. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    In "sloc_ss.bin" using a hexadecimal edit, simply insert an extra 4 bytes on the end of the file, so 00 00 00 00, the first two bytes (Word) is the X position, and the second two bytes (word) is the Y position.


    As for making sure the game knows to read it.



    lsl.w #2,d0
    lea SS_StartLoc(pc,d0.w),a1



    No worries, it's already setup for you, special stage number is in d0


    It gets shifted left by 2 bits, (this multiplies it by 4) then is added to the location of SS_StartLoc and sent to the a1 register. In our case the special stage number is 07 (Which will be 06 in d0 as 00 is the first Special stage), so..


    06 in bits: 0000 0110


    shift left by 2: 0001 1000


    0001 1000 in hex: 18


    goto the 18th byte in the SS_StartLoc: "wow it starts reading at our new X and Y 4 bytes =P"


    In other words, you don't need to touch a thing with the engine, it's done for you, just add an extra 4 bytes for X and Y location in that file.
     
  10. c1owd

    c1owd Previously 'CarrascoZX0' Member

    Joined:
    Dec 13, 2008
    Messages:
    364
    Oh crap my bad, I forgot this was a 7th special stage. ^^'
     
  11. EMK-20218

    EMK-20218 The Fuss Maker Exiled

    Joined:
    Aug 8, 2008
    Messages:
    1,067
    Location:
    Jardim Capelinha, São Paulo
    He can simply check if is the number 7 in the Special Stage (or emeralds that Sonic have) value. If yes, load the 7th stage location file.


    Edited according the start location of your Special Stage, of course.
     
    Last edited by a moderator: Mar 25, 2010
  12. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    How the hell could you mix me up with Cinossu? o.o
     
  13. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    Well you learn something new everyday... sometimes I overthink things :)
     
  14. Professor Neo

    Professor Neo Well-Known Member Member

    Joined:
    Nov 16, 2008
    Messages:
    103
    Location:
    United States
    I added in the bytes, but I got this:


    Include ASM Combiner written by Hivebrain


    There were 0 errors.


    SNASM68K, version 2.1D, Dec 06 1995, 11:55:16, DOS4G PRO


    © 1993-95 Cross Products Ltd. All Rights Reserved


    movea.l SS_LayoutIndex(pc,d0.w),a1


    s1comb.asm(40620) : Error 03010 : Cannot fit value -130 (0xffffff7e) into signed


    byte


    1 error encountered processing file 's1comb.asm'


    37361 source statements in 47943 lines processed in 0.1 seconds


    Lightning's ROM Padder


    Reported Size: 0 Reported Checksum: 0


    Size applied: 7F Checksum Applied: 0


    Press any key to continue . . .
     
    Last edited by a moderator: Mar 25, 2010
  15. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    well for starters - convert the Dissasembely to ASM68K... from my own personal experence it is much better... as for the actual problem am not sure.
     
  16. Professor Neo

    Professor Neo Well-Known Member Member

    Joined:
    Nov 16, 2008
    Messages:
    103
    Location:
    United States
    Problem solved!


    7th stage works now--Sonic starts in proper location AND the bumpers work correctly. I just realized that I missed one of the cmpi.'s. Forgot to change it into 7--that line affected everything. To everyone who posted here, thanks for your help.
     
    Last edited by a moderator: Mar 26, 2010
Thread Status:
Not open for further replies.