Basic Questions and Answers Thread

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

  1. FireRat

    FireRat Do Not Interact With This User, Anywhere!!! Exiled

    Joined:
    Oct 31, 2009
    Messages:
    535
    Hmm, I have no tested the code, because I think I have no permission to use it, but, if we can know MJ, how you know to create a window? In all this time, I never saw a guide or some small data that explains how to do it!! you read some Sega Genesis documentation or something? if yes, where I can found it, if we can know?
     
    Last edited by a moderator: Jan 30, 2011
  2. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    I think its just asm code converted to hex, so people wont modify it (not that its a problem for people who are good at binary code)
     
  3. FireRat

    FireRat Do Not Interact With This User, Anywhere!!! Exiled

    Joined:
    Oct 31, 2009
    Messages:
    535
    I agree with you, hanoch.


    Anyway, MJ, how you learned it?


    EDIT: The code is very easy to disassemblie, but I don't use it
     
    Last edited by a moderator: Jan 30, 2011
  4. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    How can I reproduce the "walk-push" glitch? (not sure it has a name, it's when Sonic should be walking but is pushing instead)


    I'm trying to fix it, and I think I find how to get rid of it, but I could be missing something since I'm don't know for sure how to make it happen.


    - I know rolling toward a wall then walking back makes it happen easily, that one is fixed for sure.


    - It happens when pushing an object and the object falls. That's done (or at least I found a workaround that seems to be working).


    - There's also one when Sonic is pushing while on a vertically moving platform, and the platform move so he can walk on the ground, that one is fixed as well.


    But there's at the very least one more while jumping toward a wall and walking back, but that one is difficult to perform so I could be trying the wrong way. I think I fixed it, but it's very difficult to check, so if someone knows exactly how to reproduce this one, it would help a lot.


    Is there any other? (in s1)
     
    Last edited by a moderator: Feb 3, 2011
  5. wonderfulwardy

    wonderfulwardy Active Member Exiled

    Joined:
    Nov 22, 2010
    Messages:
    37
    Location:
    Billericay, Essex, UK
    Due to Markey mentioning using this thread for simple questions, I'm now writing in this topic.


    Is it possible to have Sonic 1 Style sprites and also be able to turn into Super Sonic without glitches occouring?


    I understand that Sonic 2 style Sonic and Super Sonic from that same game use more sprites then Sonic style 1.


    I don't know what is better to use out of Sonic 1 style or Sonic 2.


    I asked Psy to revert back to Sonic 1 due to his Sonic 2 and super Sonic walking weird on slopes due to too many frames.


    Now I have Sonic 1 style but seems Super Sonic is so fucked up and Psy is having problems sorting out the code / frames etc.


    My question is, is it possible to have Super Sonic with normal Sonic 1 sprites?


    What do you suggest I really go with?


    Should I just go with a Sonic 3 style? Would that work with S1 Engine well?


    I'm so confused.
     
  6. GalliumGrant

    GalliumGrant Void. Member

    Joined:
    May 11, 2010
    Messages:
    384
    I've got a question. I want to change the programming of the vertical spring to the style of Knuckles Chaotix.


    There is a code with Sonic's animation:



    Code:
    move.b	#$10,$1C(a1)   &#59; use "bouncing" animation

    What code file does the "$10" and the "$1C" come from?


    I think "$10" is the equivalent of Sonic's "SonAni_Spring" code in the "_anim" folder, as it is $10 on the list...
     
  7. amphobius

    amphobius spreader of the pink text Member

    Joined:
    Feb 24, 2008
    Messages:
    970
    Location:
    United Kingdom
    You've hit it right on the head; that's the number you need to change.
     
  8. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    You can use sonic 1 styled sonic. To keep it simple, you will have to create these sprites, take the sonic 1 sprites of the bottom(legs etc), and replce the sonic 1 head and top with supersonic head etc. I explained it a bif iffy, so if anyone wants to elaborate on what I mean. (If of course you know what I mean lol)
     
  9. rika_chou

    rika_chou Adopt Member

    Joined:
    Aug 11, 2007
    Messages:
    689
    Sonic 1 uses a different style, so you would have to draw the additional Super Sonic art in S1 style for it to look right.
     
  10. wonderfulwardy

    wonderfulwardy Active Member Exiled

    Joined:
    Nov 22, 2010
    Messages:
    37
    Location:
    Billericay, Essex, UK
    As anyone ever done this before? Now that I think about it, I haven't seen any hack containing Super Sonic from Sonic 2, or something simular to your hack Rika Chou (Sonic 2: Advanced Edit) that uses any form of Sonic 3 Style character art in a Sonic 1 rom.


    If someone wants to make me a full spritesheet in this regard, I'd be willing to pay for the privilage.
     
  11. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    Assembly Motorola 68000 instructions.


    address registers (or better yet aN registers as it's quicker to write) are the ID's you see from a0 to a7, you can use to make accessing locations/addresses easier and optimal. Let me give a simple example of it's use.


    ($FFFFF600) is the ram space for the game mode, a very simple understanding and worth for beginners to know, if you move 00 to it:



    move.b #$00,($FFFFF600).w



    It will set the game mode to the "Sega Screen", if you move 04 to it:



    move.b #$04,($FFFFF600).w



    It will set the game mode to the "Title Screen", etc.


    An address register can be used in a similar way too, for example:



    move.l #$FFFFF600,a0
    move.b #$00,(a0)



    The first line sets a0 to FFFFF600 (the game mode address), the second line moves 00 to a0, BUT the a0 is in brackets (a0), meaning that it won't move 00 to a0, but it'll move it to the address/location that's stored in a0, FFFFF600 is in a0, so 00 gets moved to FFFFF600, it's the same as "move.b #$00,($FFFFF600).w" more or less.


    However having the ram address in an address register allows you to do "other" things, for example, let's say I wanted to clear the ram space from FFFF8000 to FFFF800F all in a row, the normal way would be to:



    moveq #$00,d0
    move.l d0,($FFFF8000).w


    move.l d0,($FFFF8004).w


    move.l d0,($FFFF8008).w


    move.l d0,($FFFF800C).w



    However it would be better to use an address register like this:



    moveq #$00,d0
    lea ($FFFF8000).w,a0


    move.l d0,(a0)+


    move.l d0,(a0)+


    move.l d0,(a0)+


    move.l d0,(a0)+



    ...As it assembles as smaller code and is quicker for the processor to process (I used lea insted of move in that one because it's quicker =P). The +'s you see increase the address in a0 by the size that was moved to it, long-words were moved to the address register which is 4 bytes, so after the first one is done, a0 (FFFF8000 + 4 = FFFF8004), after the second one, (FFFF8004 + 4 = FFFF8008), etc, all done inside a0.


    That $1C there is an "index", for example, if a0 had the address FFFF8000 loaded into it, then:



    move.b #$10,$1C(a0)



    ...would move 10 to FFFF801C, this is FFFF8000 (inside a0) + 1C (index).


    In Sonic 1 and 2 specifically, and in that routine you've shown, a0 contains the ram address of the object that's being loaded, for example Sonic's Ram (FFFFD000 for Sonic 1, FFFFB000 for Sonic 2), that would move 10 to FFFFD01C (for Sonic 1 and FFFFB01C for Sonic 2).


    The 1Cth byte of the object ram is the animation ID to use.

    That's correct! That's the way the engine works for that game =)
     
  12. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    Code:
    As anyone ever done this before? Now that I think about it, I haven't seen any hack containing Super Sonic from Sonic 2, or something simular to your hack Rika Chou (Sonic 2: Advanced Edit) that uses any form of Sonic 3 Style character art in a Sonic 1 rom.
    
    
    
    If someone wants to make me a full spritesheet in this regard, I'd be willing to pay for the privilage.

    There are quite a few S1 hacks with super sonic using s1 art, I added a couple of extra sprite frames for this in Redemption and I am pretty sure megamix uses a mix of S1 and S2 beta sprites - also there are some russian Sonic 1 hacks that use S3 sprites that was created using a hacking tool I think.
     
  13. FireRat

    FireRat Do Not Interact With This User, Anywhere!!! Exiled

    Joined:
    Oct 31, 2009
    Messages:
    535
    New question: Why when I try to use the title card, but not in $FFFFD080, the title card don't go away?


    I looked the code, but I can view it fine...
     
  14. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    415
    Title cards are controlled in a specific way. If you look through their code, you won't find any addq.b #2,$24(a0) instruction, that switches to the next routine.


    When the title card is being displayed, Nemesis compressed art for a level is being loaded. Obviously, title card mustn't go away until all the art is loaded. A routine of level initalization code controls that, Level_TtlCard. It's actually a loop, something like Level_MainLoop, waiting until art is loaded and title card is appeared.



    Level_TtlCard:
    move.b #$C,($FFFFF62A).w ; => "loc_E72"


    bsr.w DelayProgram


    jsr ObjectsLoad


    jsr BuildSprites


    bsr.w RunPLC_RAM


    move.w ($FFFFD108).w,d0 ; get "ACT X" X-pos (slot $D100, byte 8)


    cmp.w ($FFFFD130).w,d0 ; compare to "ACT X" target pos (slot $D100, byte $30)


    bne.s Level_TtlCard ; if "ACT X" hasn't reached it's target position, branch


    tst.l ($FFFFF680).w ; are there any items in the pattern load cue?


    bne.s Level_TtlCard ; if yes, branch


    jsr Hud_Base


    jsr LoadSnowTiles



    As you can see here, the code expects title card to be in its slot, $FFFFD080. Otherwise, the code won't work correctly.


    When the game quits this loop, it loads objects, pallets and level blocks, and only after that it lets title card go away:



    Level_DelayLoop:
    move.b #8,($FFFFF62A).w


    bsr.w DelayProgram


    dbf d1,Level_DelayLoop


    move.w #$202F,($FFFFF626).w


    bsr.w Pal_FadeTo2


    tst.w ($FFFFFFF0).w


    bmi.s Level_ClrCardArt


    addq.b #2,($FFFFD0A4).w ; switch routine to "Obj34_Wait" in object "Zone Name"


    addq.b #4,($FFFFD0E4).w ; switch routine to "Obj34_Wait" in object "ZONE"


    addq.b #4,($FFFFD124).w ; switch routine to "Obj34_Wait" in object "ActX"


    addq.b #4,($FFFFD164).w ; switch routine to "Obj34_Wait" in object "Oval"


    bra.s Level_StartGame
     
  15. FireRat

    FireRat Do Not Interact With This User, Anywhere!!! Exiled

    Joined:
    Oct 31, 2009
    Messages:
    535
    nice explanation, vladik, but I need to run the title card after X-position $9F0 in GHZ...
     
  16. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    415
    Do you mean you want to show title card when Camera reaches $9F0 on X-axis?


    Hm, why don't you use old slot? I don't think it's occupated. =P



    move.b #$34,($FFFFD080).w ; create Obj34 in slot $D080



    And to make card go away, use code from Level_TtlCard. The best place for this code is Resize_GHZ. Let's imagine you want to do it in GHZ1, then you can have something like this



    Resize_GHZ1:
    moveq #0,d0


    move.b ($FFFFF742).w,d0


    move.w Resize_GHZ1_Index(pc,d0.w),d0


    jmp Resize_GHZ1_Index(pc,d0.w)


    Resize_GHZ1_Index:


    dc.w GHZ1_ShowTtlCard-Resize_GHZ1_Index


    dc.w GHZ1_Routine2-Resize_GHZ1_Index


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


    GHZ1_ShowTtlCard:


    cmpi.w #$9F0,($FFFFF700).w ; is camera X-pos more or equals to $9F0?


    bcs @Return ; if not, branch


    ; Wait for title card to appear


    move.b #$34,($FFFFD080).w ; load ttl cards


    move.w ($FFFFD108).w,d0 ; get "ACT X" X-pos (slot $D100, byte 8)


    cmp.w ($FFFFD130).w,d0 ; compare to "ACT X" target pos (slot $D100, byte $30)


    bne.s @Return ; if "ACT X" hasn't reached it's target position, branch


    ; Make title card disappear


    addq.b #2,($FFFFD0A4).w ; switch routine to "Obj34_Wait" in object "Zone Name"


    addq.b #4,($FFFFD0E4).w ; switch routine to "Obj34_Wait" in object "ZONE"


    addq.b #4,($FFFFD124).w ; switch routine to "Obj34_Wait" in object "ActX"


    addq.b #4,($FFFFD164).w ; switch routine to "Obj34_Wait" in object "Oval"


    addq.b #2,($FFFFF742).w ; switch to next routine in Resize_GHZ


    @Return rts


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


    GHZ1_Routine2: rts
     
  17. EMK-20218

    EMK-20218 The Fuss Maker Exiled

    Joined:
    Aug 8, 2008
    Messages:
    1,067
    Location:
    Jardim Capelinha, São Paulo
    Just go to Obj34_ConData:. This is where you can configure the title card positions and wich piece of text or graphical stuff will be load with themselves. If you also want to move the oval vertically and horizontally, you just need to just check out this section.
     
  18. FireRat

    FireRat Do Not Interact With This User, Anywhere!!! Exiled

    Joined:
    Oct 31, 2009
    Messages:
    535
    Thanks vladik, It worked perfectly ^^
     
  19. HiddenPalace

    HiddenPalace Active Member Member

    Joined:
    Feb 9, 2010
    Messages:
    33
    I am having problems with my new level. I checked all the things needed to load the level and everything is ok but it still will not go past the title card.


    I don't know what else to do.


    Can someone help?
     
  20. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    First of all, is it an additional level in the level list or is it replacing an older level?