Basic Questions and Answers Thread

Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.

  1. Goonie

    Goonie Active Member Member

    Joined:
    Jun 14, 2010
    Messages:
    47
    Location:
    Australia
    Is there a way to change the amount of times it takes to hit a badniks before it dies??


    As for dr eggman?


    If so can someone point me in the right asm direction?


    1 more question, the sega logo at the start..is the color for that a pallet? or art?
     
    Last edited by a moderator: Jul 6, 2010
  2. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    Yes, but that'll require a bit of assembly knowledge, to sum it up, you need a counter of some sort, but you'll need to create the method yourself as one does not already exist.

    When I searched "hits" in the source, I found this:



    move.b #8,$21(a0) ; set number of hits to 8



    You might wanna consider searching for key words in the source yourself before asking =P

    That's why this thread exists, ask a general question, and if we know the answer, we'll provide it =)

    It's very complicated to explain as I don't understand what you mean, the SEGA logo is art that uses colours from a palette.
     
  3. Goonie

    Goonie Active Member Member

    Joined:
    Jun 14, 2010
    Messages:
    47
    Location:
    Australia
    I edited sega logo files in pallet and manged to edit everything bar the sega logo or white background. is it called something else???


    & Thanks for the above answers :)
     
  4. Alex

    Alex Active Member Member

    Joined:
    Jan 6, 2008
    Messages:
    28
    I've successfully added a "Pseudo Peel-Out", I wouldn't call it a peel out just yet because I've yet to add the correct art; it's effectively a Spindash clone without the charging. (But you all knew that)


    I'm looking to add the delay that prevents you from launching until you've reached the "peel out" animation itself. I'm guessing I need to run a test that checks what Sonic's current frame is; then tell the game that you can't release until it's reached a minimum frame? (The 1st frame of the peel out animation)


    I couldn't think of any objects that tests an objects frame, but I did search through the .asm file; to no avail.


    Any help would be greatly appreciated, and credit will be given.


    I'm using the Disassembly created by Hivebrain that was bundled with MarkeyJester's Sonic 1 Two-Eight project.
     
  5. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    cmp.b #$??,$1A(a?)


    ?? = the frame ID of your peelout


    a? = the address register in which sonic's ram location is in


    or you could simply do:


    cmp.b #$??,($FFFFD01A).w


    compare the ID with that location, and beq/bne depending on what the situation of your routines are like, I'm assuming you know what I'm talking about judging by the nicely presented and mature post you've produced above =)
     
  6. Alex

    Alex Active Member Member

    Joined:
    Jan 6, 2008
    Messages:
    28
    Thanks alot MerkeyJester, after reading your post it didn't take me long to make the appropriate changes; the delay is now in place. I understand questions like this can seem trivial, so I'm grateful for the positive way in which you responded. :)


    Side note: I love what you've done with Project Sonic 1 Two-Eight. I know I can't fully appreciate what you had to do in order to make it run 128x128 chunks along with the path swapping system, (because of my inexperience with ASM) but seeing it functioning inspired me to give ASM another try. So thanks for the help, and thanks for releasing this epic hack.
     
  7. Goonie

    Goonie Active Member Member

    Joined:
    Jun 14, 2010
    Messages:
    47
    Location:
    Australia
    Sonic2 question: Can anyone tell where sonic's obj01 code starts and ends..


    is it from ; Object 01 - Sonic


    ; ----------------------------------------------------------------------------


    ; Sprite_19F50: Object_Sonic:


    Obj01: to Obj01_Respawning?
     
    Last edited by a moderator: Jul 8, 2010
  8. shobiz

    shobiz Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    198
    Location:
    Karachi, Pakistan
    Yup, that's right.
     
  9. Goonie

    Goonie Active Member Member

    Joined:
    Jun 14, 2010
    Messages:
    47
    Location:
    Australia
    Thanks mate :D
     
  10. Goonie

    Goonie Active Member Member

    Joined:
    Jun 14, 2010
    Messages:
    47
    Location:
    Australia
    Hey all what i have done here is a copy the knuckles object from s2&k into s2 and changed obj01 to 0bj4C and this is what im getting, i must be doing okay as there is not so many errors as i got before.. i know the codes writtern abit different to the s2, but stuff like resumemusic?? would "AnglePos" etc be something to do with sonic3 giving me errors there?


    assembling s2.asm


    PASS 1


    s2.macrosetup.asm(201)


    s2.sounddriver.asm(2807)


    > > >s2.asm(88187): error: jump distance too big


    > > > bsr.w ResumeMusic


    > > >s2.asm(88214): error: jump distance too big


    > > > bsr.w ResumeMusic


    > > >s2.asm(88234): error: jump distance too big


    > > > bsr.w ResumeMusic


    > > >s2.asm(88256): error: jump distance too big


    > > > bsr.w AnglePos


    > > >s2.asm(88381): error: jump distance too big


    > > > bsr.w CheckLeftCeilingDist


    > > >s2.asm(88390): error: jump distance too big


    > > > bsr.w CheckRightCeilingDist


    > > >s2.asm(88926): error: jump distance too big


    > > > bsr.w AnglePos


    > > >s2.asm(89157): error: jump distance too big


    > > > bsr.w CalcRoomInFront ;


    Also known as Sonic_WalkSpee


    d in Sonic 1


    > > >s2.asm(89645): error: jump distance too big


    > > > bsr.w CalcRoomOverHead


    > > >s2.asm(89873): error: jump distance too big


    > > > bsr.w AnglePos


    > > >s2.asm(89954): error: jump distance too big


    > > > bsr.w AnglePos


    > > >s2.asm(90143): error: jump distance too big


    > > > bsr.w CheckLeftWallDist


    > > >s2.asm(90151): error: jump distance too big


    > > > bsr.w CheckRightWallDist


    > > >s2.asm(90172): error: jump distance too big


    > > > bsr.w CheckLeftWallDist


    > > >s2.asm(90180): error: jump distance too big


    > > > bsr.w CheckCeilingDist


    > > >s2.asm(90196): error: jump distance too big


    > > > bsr.w CheckRightWallDist


    > > >s2.asm(90223): error: jump distance too big


    > > > bsr.w CheckLeftWallDist


    > > >s2.asm(90231): error: jump distance too big


    > > > bsr.w CheckRightWallDist


    > > >s2.asm(90239): error: jump distance too big


    > > > bsr.w CheckCeilingDist


    > > >s2.asm(90250): error: jump distance too big


    > > > bsr.w CheckRightWallDist


    > > >s2.asm(90258): error: jump distance too big


    > > > bsr.w CheckCeilingDist


    > > >s2.asm(90308): error: jump distance too big


    > > > bsr.w CheckLeftWallDist


    > > >s2.asm(90315): error: jump distance too big


    > > > bsr.w CheckRightWallDist


    > > >s2.asm(90372): error: jump distance too big


    > > > bsr.w CheckLeftWallDist


    > > >s2.asm(90382): error: jump distance too big


    > > > bsr.w CheckCeilingDist


    > > >s2.asm(90411): error: jump distance too big


    > > > bsr.w CheckLeftWallDist


    > > >s2.asm(90418): error: jump distance too big


    > > > bsr.w CheckRightWallDist


    > > >s2.asm(90425): error: jump distance too big


    > > > bsr.w CheckCeilingDist


    > > >s2.asm(90450): error: jump distance too big


    > > > bsr.w CheckRightWallDist


    > > >s2.asm(90460): error: jump distance too big


    > > > bsr.w CheckCeilingDist


    > > >s2.asm(90585): error: jump distance too big


    > > > blt.w JmpTo_KillCharacter


    > > >s2.asm(90603): error: symbol double defined


    > > > JMPTO_KILLCHARACTER


    > > > JmpTo_KillCharacter:


    ; ...


    > > >s2.asm(90633): error: jump distance too big


    > > > bsr.w CheckGameOver


    > > >s2.asm(90645): error: symbol double defined


    > > > CHECKGAMEOVER


    > > > CheckGameOver:


    ; ...


    s2.asm(90758)


    0.80 seconds assembly time


    93766 lines source file


    118331 lines incl. macro expansions


    1 pass


    34 errors


    0 warnings


    ****************************************


    Just to add with the object index i have added the object...... and on the emerald hill zone loading screen it will stop there, i thought i had it lol.
     
    Last edited by a moderator: Jul 10, 2010
  11. MrSpade

    MrSpade It's meant to be Mr_Spad3 but y'know... Member

    Joined:
    Dec 5, 2009
    Messages:
    172
    Location:
    The UK
    Where it says "bsr.w", replace the "W" with a "L", because a "Longword" can do those jumps between the code.


    (I think I'm correct here, but i'm not entirely sure because I haven't hacked for so long. :D )
     
  12. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    This question has been asked on many occasions, so here's what I want you to do, in the Discussion & Q&A subforum area, scroll to the bottom, you'll find something like this:


    [​IMG]


    Put in some key words (in this case, "Build Fail") and click Search, some results will show:


    [​IMG]


    And BAM! Your answer awaits you. Really, you should use it more often, it's very helpful in situations like this and may save you a lot of time having to write up a post =)


    Now the problem with your errors here, is the branch/jump distances are too far appart, take that first one for example:

    In s2.asm, on line 88187, there is bsr.w ResumeMusic.


    bsr.w change to jsr.


    The idea here is that the jmp instruction can branch much further (well anywhere really), so no limit means no errors.
     
    Last edited by a moderator: Jul 10, 2010
  13. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    bra.w changes to jmp, bsr.w changes to jsr.
     
  14. Goonie

    Goonie Active Member Member

    Joined:
    Jun 14, 2010
    Messages:
    47
    Location:
    Australia
    Thanks fellas you guys are legends!
     
  15. Spanner

    Spanner The Tool Member

    Joined:
    Aug 9, 2007
    Messages:
    2,570
    By the way, the code straight from S2K will not work properly. First of all, replace Knuckles' DPLC code with a copy of Sonic's. You can also copy his TouchResponse code too and give Knux his own stuff.
     
  16. Goonie

    Goonie Active Member Member

    Joined:
    Jun 14, 2010
    Messages:
    47
    Location:
    Australia
    Cheers for the tip mate, going to start fresh soon :D
     
  17. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada


    Uhh no? Knuckles' TouchResponce is completely different than sonic's. You know, with gliding and all? =P
     
  18. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    415
    Basically, the main function of this routine is to decide what to do when character hits something depending on his state. It generally checks rolling and invincibility flags. This routine has no matter whether object is gliding, climbing or performing other special actions, only object's possibility to destroy (or not to destroy =P ) badniks/monitors makes sense here. I guess when Knuckles is gliding, the game just sets rolling flag (or something like this).


    Considering that, I see no reason for Knuckles' touch response code to be different form Sonic's. Most likely, Sonic and Knux use the same touch response routine =P
     
  19. Spanner

    Spanner The Tool Member

    Joined:
    Aug 9, 2007
    Messages:
    2,570
    I meant Knuckles' code. Sorry for the confusion.
     
  20. Goonie

    Goonie Active Member Member

    Joined:
    Jun 14, 2010
    Messages:
    47
    Location:
    Australia
    Im glad i didnt start knuckles lastnight lol, i had a go with sonics object.


    Okay..Hidden Palace, is that something i can unlock in s2? beta? maybe best to get from s3k? it would be complete not half done?
     
    Last edited by a moderator: Jul 12, 2010