Basic Questions and Answers Thread

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

  1. DeltaWooloo

    DeltaWooloo The noob next door Member

    Joined:
    Aug 7, 2019
    Messages:
    373
    A user in this forum (whom I'll not say for certain reasons) has attempted to make a Mega Play disassembly. Perhaps you can take a look and see how to bring the leaderboard system over to Sonic 1.
     
  2. Speems

    Speems Well-Known Member Member

    Joined:
    Mar 14, 2017
    Messages:
    83
    Location:
    Rochester Hills, MI
    Only issue is that the only IDA version I was able to find is somewhat outdated (6.8) and I'm really not a fan of spending a thousand bucks for one tool I probably wouldn't use too much. Plus the freeware version can't do anything since it doesn't have the 68000 plugin and I assume it is impossible to look up how to put it in the freeware variant.
     
  3. Giovanni

    Giovanni It's Joe-vanni, not Geo-vanni. Member

    Joined:
    Apr 16, 2015
    Messages:
    311
    Location:
    Italy
    How is this array structured?
     
  4. Spicy Bread SSR

    Spicy Bread SSR You can call me Mal if you like Member

    Joined:
    Feb 27, 2021
    Messages:
    25
    Location:
    yes
    Hi, it's been awhile, hasn't it? Anyway, I was using the LZ Ripple guide from SCHG, but two lines are causing errors for the same issue: short addressing

    > > >s2.asm(15801): error: short addressing not allowed
    > > > tst.b (Current_act).w ; is this act 1?
    > > >s2.asm(15801): error: addressing mode not allowed here
    > > > tst.b (Current_act).w ; is this act 1?
    > > >s2.asm(15971): error: short addressing not allowed
    > > > add.w (Camera_Bg_Y_pos).w,d2
    > > >s2.asm(15971): error: addressing mode not allowed here
    > > > add.w (Camera_Bg_Y_pos).w,d2​

    I currently don't understand these type of things. It is an old guide, though it might be my fault, given the other things that are broken in the hack I tried to insert this into
    For completionist sake, here's the link to the old guide
     
  5. Giovanni

    Giovanni It's Joe-vanni, not Geo-vanni. Member

    Joined:
    Apr 16, 2015
    Messages:
    311
    Location:
    Italy
    There's a chance you did not include those labels in your disassembly. The GitHub disassemblies often make use of labels, which are usually stored in their own file.

    If you are using a GitHub disassembly, this issue should not occur, as these labels reference already existing variables in Sonic 2. If you are using a Hivebrain disassembly, or any disassembly that does not have its own list of variables (which I can assume is the case), you may want to take the "variables.asm" (or whatever the variables file is called in the Sonic 2 GitHub disassembly) and include it in your disassembly. If you are unsure of how to include it, check out the main .asm file of the Sonic 2 GitHub disassembly. You will notice that at the very top or at the very bottom of the file, you will see at the line that tells the compiler to include the variables file. Add that line to the disassembly's main .asm file, and add the variables file to the disassembly's folder.

    Depending on which compiler you use, it may be case sensitive, so make sure to check that the variables are capitalized just like they are in the variables file (from experience, I know this happens when AS is used)
     
  6. Spicy Bread SSR

    Spicy Bread SSR You can call me Mal if you like Member

    Joined:
    Feb 27, 2021
    Messages:
    25
    Location:
    yes
    I took your advice on cap sensitivity. It works now, thanks
     
  7. Giovanni

    Giovanni It's Joe-vanni, not Geo-vanni. Member

    Joined:
    Apr 16, 2015
    Messages:
    311
    Location:
    Italy
    I have figured out my own issue myself, and have come to a disappointing conclusion:

    The second loop in the loop array is coded to always send you back to the high plane as soon as you are in midair. This is most likely meant for that one quarterloop you can see at the beginning of Star Light 2, among other instances of said loop.

    I assume that if I wanted the loop to behave as I intend it to, I'd have to change the code in Sonic_Loops to reflect that change, but I could more easily fix this by slightly redesigning the level. It would save me two extra chunks, which I could use to add in an actual quarterloop in Green Hill.

    The original text is kept here, and is as follows:

    -------------------------------------------------------------------------------------------------------------------------------

    I've added a new loop to Green Hill Zone.
    Its collision is a replica of the preexisting one, but whenever Sonic is in midair, he is immediately sent back to the high plane, unlike with every other loop in the game.
    Every other aspect of this loop works fine. Does anybody have any idea where I could've possibly made a mistake?

    Here's a demonstration of the issue:


     
    Last edited: Aug 13, 2021
    TheIvanCut likes this.
  8. TheIvanCut

    TheIvanCut Newcomer Trialist

    Joined:
    Mar 28, 2021
    Messages:
    7
    Hello everyone, today I just made a character that I think about every day but I just did it as a sonic style ... and I wanted to know what you think of my creation for my future hack?
    and I promise to improve it...
     

    Attached Files:

  9. Giovanni

    Giovanni It's Joe-vanni, not Geo-vanni. Member

    Joined:
    Apr 16, 2015
    Messages:
    311
    Location:
    Italy
    To be completely frank, it looks basic. I see what you're trying to achieve here, but the shading is insufficient, and the sprite itself looks a bit on the small side.
    I'm not a pixel art extraordinaire myself, but I'd suggest using Sonic's sprites as reference material (for size and shading) and to establish a palette (if you are planning to put this in the game, you should be wary of what colours you choose to change and how many colours you use, as they can affect anything present in the game). Moreover, I'd recommend posting future pixel art in the Art & Music subforum. You can find it in the Lounge, and I'd recommend finding it there, as this post will inevitably get submerged by the sea of new posts that is to come. Maybe even create your own dedicated thread for pixel art, if you feel that would be better for you (as long as it's in the Art & Music subforum).
     
  10. TheIvanCut

    TheIvanCut Newcomer Trialist

    Joined:
    Mar 28, 2021
    Messages:
    7
    ignore the above I was wrong I just wanted to say: thanks for your opinion it served me a lot !!! XD
     
  11. Deactivated Account

    Deactivated Account Well-Known Member Exiled

    Joined:
    Aug 26, 2016
    Messages:
    244
    Sorry, you dubbed that post into Spanish language, stick to speak English, there are rules friend.
     
  12. TheInvisibleSun

    TheInvisibleSun Visible Member

    Joined:
    Jul 2, 2013
    Messages:
    424
    Location:
    Western New York, USA
    He already acknowledged his mistake in the post right after that one...
     
  13. Deactivated Account

    Deactivated Account Well-Known Member Exiled

    Joined:
    Aug 26, 2016
    Messages:
    244
    Oh you're right, my apologies, I realized now.
     
    TheIvanCut likes this.
  14. Angel X

    Angel X Well-Known Member Member

    Joined:
    Sep 15, 2017
    Messages:
    291
    Location:
    Italy
    Mr. Joker 27 Music prod,I think you would be perfect to be an administrator.
    I do not say it to make fun of you,I mean it seriously!
     
  15. Deactivated Account

    Deactivated Account Well-Known Member Exiled

    Joined:
    Aug 26, 2016
    Messages:
    244
    That is the Staff decision, I only want to help to other than, they stay aware about his posts. That role for me I think I'm not ready to go there, still I do mistakes also, closing this comment, we must follow ahead to help the others.
     
    Last edited: Aug 19, 2021
    TheIvanCut likes this.
  16. SuperSayian Zrise

    SuperSayian Zrise Well-Known Member Exiled

    Joined:
    May 10, 2021
    Messages:
    78
    I have a problem.
    SONIC1.ASM(6960) : Error : Illegal value (136)
    Its a error that has to do with this:
    Code:
    move.l    LoopTileNums(pc,d0.w),($FFFFF7AC).w
    Yet I don't know what's wrong. I did what the guide said to place it underneath LevSz_Unk and that didn't work.
    And even tried changing the address in RAM and I still get this error.
    (Its in loc_60F8)
    Plus no matter where I move it the problem moves along with it.
    (I'm using a guide that lets you add zones to sonic 1)
    Edit: I changed move.l to a jmp and removed the junk in the back. no build errors. but now I get this in game error: ILLEGAL INSTRUCTION$00006224
    Edit2: I got it working. but I have another question. is it okay if I remove the: (pc,d0.w) from LoopTileNums? because I did that to get it to work.
     
    Last edited: Aug 25, 2021
  17. Stdh

    Stdh Active Member Member

    Joined:
    Jan 11, 2021
    Messages:
    30
    Location:
    the netherlands
    so im trying to port the cpz booster too sonic 1 using the simon wai code, but the problem is that the code does not seem to work
    here is the code:

    Code:
    Obj19:                    ; XREF: Obj_Index
            moveq    #0,d0
            move.b  $24(a0), d0
            move.w  loc_16476(pc,d0),d1
            jmp     loc_16476(PC,d1)
    loc_16476:
            dc.w    loc_1647E-loc_16476
            dc.w    loc_164B4-loc_16476         
    loc_1647A:
            dc.w    $1000, $A00
    loc_1647E:
            addq.b  #$2, $24(a0)
            move.l  #Speed_Booster_Mappings, $4(a0) ; loc_1658A
            move.w  #$E39C, $2(a0)
            ori.b   #$4, $1(a0)
            move.b  #$20, $19(a0)
            move.b  #$1, $18(a0)
            move.b  $28(a0), d0
            andi.w  #$2,d0
            move.w  loc_1647A(pc,d0), $30(a0)
    loc_164B4:
            move.b  ($FFFFFE05).w,d0
            andi.b  #$2,d0
            move.b  d0, $1A(a0)
            move.w  $8(a0), d0
            move.w  d0,d1
            subi.w  #$10,d0
            addi.w  #$10,d1
            move.w  $C(a0),d2
            move.w  d2,d3
            subi.w  #$10,d2
            addi.w  #$10,d3
            lea     ($FFFFB000).w,a1
            btst    #$1, $22(a1)
            bne.s   loc_16510
            move.w  $8(a1),d4
            cmp.w   d0,d4
            bcs     loc_16510
            cmp.w   d1,d4
            bcc     loc_16510
            move.w  $C(a1),d4
            cmp.w   d2,d4
            bcs     loc_16510
            cmp.w   d3,d4
            bcc     loc_16510
            move.w  d0, -(a7)
            bsr     loc_16544
            move.w  (a7)+, d0
    loc_16510:
            lea     ($FFFFB040).w,a1
            btst    #$1, $22(a1)
            bne.s   loc_16540
            move.w  $8(a1),d4
            cmp.w   d0,d4
            bcs     loc_16540
            cmp.w   d1,d4
            bcc     loc_16540
            move.w  $C(a1),d4
            cmp.w   d2,d4
            bcs     loc_16540
            cmp.w   d3,d4
            bcc     loc_16540
            bsr     loc_16544
    loc_16540:
            jmp    MarkObjGone     ; loc_165A4
    loc_16544:
            move.w  $30(a0), $10(a1)
            bclr    #$00, $22(a1)
            btst    #$00, $22(a0)
            beq.s   loc_16562
            bset    #$00, $22(a1)
            neg.w   $10(a1)
    loc_16562:
            move.w  #$F, $2E(a1)
            move.w  $10(a1), $14(a1)
            bclr    #$5, $22(a0)
            bclr    #$6, $22(a0)
            bclr    #$5, $22(a1)
            move.w  #$CC,d0
            jmp     (PlaySound)              ; loc_14C6
    Speed_Booster_Mappings:       
                           INCBIN "_maps/obj1B.bin"
    ;===============================================================================
    ; Object 0x1B - Chemical Plant - Speed Booster
    ; [ End ]                 
    ;===============================================================================  
    and also i dont know where the art pointer is, anyone wanna help with this?
     
  18. Inferno

    Inferno Rom Hacker Member

    Joined:
    Oct 27, 2015
    Messages:
    132
    Location:
    Sky Base Zone, South Island
    Sonic isn't in $FFFFB000 in Sonic 1, he's in $FFFFD000.
     
    Stdh likes this.
  19. Spicy Bread SSR

    Spicy Bread SSR You can call me Mal if you like Member

    Joined:
    Feb 27, 2021
    Messages:
    25
    Location:
    yes
    So, I'm removing some unused objects in Sonic 2, and when I removed obj1A, the jmpto's for obj1F seem to have been misaligned

    Code:
    > > >s2.asm(21155): warning: address is not properly aligned
    > > >     jmp    (SlopedPlatform).l
    > > >s2.asm(21157): warning: address is not properly aligned
    > > >     jmp    (PlatformObject).l
    > > >s2.asm(21155): warning: address is not properly aligned
    > > >     jmp    (SlopedPlatform).l
    > > >s2.asm(21157): warning: address is not properly aligned
    > > >     jmp    (PlatformObject).l
    I've never had this issue before, so I don't know how to properly deal with it
    EDIT: I realised that the sloped platform was for OBJ1A, removing that makes the ROM work, however, OBJ1F crashes the stages it's in due to being misaligned. I tried making it a bra.w instead, which caused even more issues. I then made the thing using the thing branch to the platform code. Still caused issues. It's annoying not knowing the answers for such a simple issue in the grand scheme of things
     
    Last edited: Sep 18, 2021
  20. SuperSayian Zrise

    SuperSayian Zrise Well-Known Member Exiled

    Joined:
    May 10, 2021
    Messages:
    78
    I have a problem. When playing one of my hacks when sonic gets hit, he drops one ring and no rings are scattered. So I can simply recollect one ring. Example: I drop one ring and still have one ring then I collect it. I get two rings.
    Is there anyway to reset it back to normal? Because, I don't know what causes it. (I also added super sonic to the hack.)
    Because, I'm getting ready to close release.
    EDIT: changed it to this: jsr (CalcSine).l and it works. :)
     
    Last edited: Sep 19, 2021