Basic Questions and Answers Thread

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

  1. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    When porting Sonic 3K's BubbleShield_Bounce code to Sonic 1, Sonic's Y-velocity only increases when bouncing on an object. I assume that something is being done in Sonic_Floor that makes this happen. Does anyone know the fix for this?

    Edit: Nevermind. The solution was to change where in the code the branches to Sonic_ResetOnFloor were to match where Sonic 3K places them.
     
    Last edited: Jul 25, 2016
  2. jubbalub

    jubbalub Mania fanboy Member

    Joined:
    Dec 25, 2014
    Messages:
    286
    How do I make the game check if only the B button is pressed?
     
  3. Painto

    Painto Arthurus Paintus Erinaceus Member

    Joined:
    Mar 24, 2014
    Messages:
    321
    Location:
    Lublin, Poland
    You can check it using btst, for example
    Code:
        <some code here>
        btst #4,($FFFFF603).w ; is B button pressed?
        bne.s SomeLabel ; if yes, branch
        <some other code>
    SomeLabel:
        <code done if it's pressed>
    Full bitfield is:
    Start - 7
    A - 6
    C - 5
    B - 4
    Right - 3
    Left - 2
    Down - 1
    Up - 0

    You can also use "and"
    Code:
        <some code here>
        move.b ($FFFFF603).w,d0
        and.b #$10,d0 ; is B button pressed?
        bne.s SomeLabel ; if yes, branch
        <some other code>
    SomeLabel:
        <code done if it's pressed>
    But IIRC is better to use that when you need to check for more than 1 button.
    Table for it is:
    Start - $80
    A - $40
    C - $20
    B - $10
    Right - $8
    Left - $4
    Down - $2
    Up - $1
    You can add these up to, as mentioned, check for multiple button, for example $70 if you want to check for ABC buttons.
     
  4. ArcaniaCQ

    ArcaniaCQ Well-Known Member Member

    Joined:
    Jul 18, 2015
    Messages:
    789
    Location:
    Sweden
    How do I change the GHZ boss from using a ball to using a different obj?
     
  5. Painto

    Painto Arthurus Paintus Erinaceus Member

    Joined:
    Mar 24, 2014
    Messages:
    321
    Location:
    Lublin, Poland
    You mean using different thing in place of wrecking ball and stuff, or keep it but change the ball to something else?
    In first case, find Obj3D_MakeBall:/BGHZ_MakeBall: and change the $48/id_BossBall to something else.
    In second case, go to Obj48_MakeBall:/GBall_MakeBall: and change it to your needs.
     
  6. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Hi!
    How can i load chunks from rom in SonLVL?

    I have doing this guide: http://info.sonicretro.org/SCHG_How-to:Load_chunks_from_ROM_in_Sonic_1
    Because i want to load 100 chunks instead of 54.

    All is ok, but in SonLVL, my new chunksnot showing ingame, and the chunks's block modifications don't work.. nothing is changed ingame.
    What is the problem?

    (sorry for bad english).
     
  7. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    There is something you should take a big hard look at. "Using the uncompressed chunk mappings". This part instructs you to change references to map256 to map256_u. You need to do the same in SonLVL.ini. And add near the top of the file this line: "chunkcmp=Uncompressed". That should be it.
     
  8. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Ok, i have doing this and i got this:

    Sans titre.png
     
  9. NiphFM

    NiphFM Host of the Mega Drive Music Contest Member

    Joined:
    Jun 5, 2015
    Messages:
    430
    Location:
    Music Plant Zone
    In extension to Cavey's question, how can I have a wrecking ball AND a swinging platform going the opposite way to the ball?
     
  10. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,016
    SonLVL has an error-logging system, you know. We'd have a much better idea of what's going on if you posted that. IIRC, it's under View/Show Log or something similar.
     
  11. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Operating system: Microsoft Windows NT 6.2.9200.0
    Opening INI file "C:\Users\Ashuro\Desktop\STH2016\Sonic 1 2005 INIs\SonLVL.ini"...
    Game type is S1.
    Loading Green Hill Zone Act 1...
    Loading 8x8 tiles from file "../artnem/8x8ghz1.bin", using compression Nemesis...
    Loading 8x8 tiles from file "../artnem/8x8ghz2.bin", using compression Nemesis...
    Loading 16x16 blocks from file "../map16/GHZ.bin", using compression Enigma...
    Loading 256x256 chunks from file "../map256/GHZ.bin", using compression Uncompressed...
    Loading FG layout from file "../levels/ghz1.bin", using compression Uncompressed...
    Loading BG layout from file "../levels/ghzbg.bin", using compression Uncompressed...
    Loading palette file "../pallet/sonic.bin"...
    Source: 0 Destination: 0 Length: 16
    Loading palette file "../pallet/ghz.bin"...
    Source: 0 Destination: 16 Length: 48
    Loading object definition file "obj.ini".
    Loading object definition file "objGHZ.ini".
    Loading ObjectDefinition type S12005ObjectDefinitions.Common.Ring from "Common\Ring.cs"...
    Loading type from cached assembly "dllcache\S12005ObjectDefinitions.Common.Ring.dll"...
    Loading ObjectDefinition type S12005ObjectDefinitions.Common.InvisibleBlock from "Common\InvisibleBlock.cs"...
    Loading type from cached assembly "dllcache\S12005ObjectDefinitions.Common.InvisibleBlock.dll"...
    Loading ObjectDefinition type S12005ObjectDefinitions.GHZ.Bridge from "GHZ\Bridge.cs"...
    Loading type from cached assembly "dllcache\S12005ObjectDefinitions.GHZ.Bridge.dll"...
    Loading ObjectDefinition type S12005ObjectDefinitions.GHZ.SwingingPlatform from "GHZ\SwingingPlatform.cs"...
    Loading type from cached assembly "dllcache\S12005ObjectDefinitions.GHZ.SwingingPlatform.dll"...
    Loading objects from file "../objpos/ghz1.bin", using compression Uncompressed...
    Loading start position "Level Start" from file "../misc/sloc_lev.bin"...
    Loading start position "Credits Demo 1" from file "../misc/sloc_end.bin"...
    Loading start position "Credits Demo 2" from file "../misc/sloc_end.bin"...
    Drawing block bitmaps...
    Drawing chunk bitmaps...
    Load completed.
     
  12. Painto

    Painto Arthurus Paintus Erinaceus Member

    Joined:
    Mar 24, 2014
    Messages:
    321
    Location:
    Lublin, Poland
    Here is your problem. You didn't changed it to map256_u.
     
  13. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Omg. Thanks!

    Let's go to WORK!
     
  14. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    Are you for real? Did you not read my post?
    I just told you to do exactly that. Why is it so hard to follow a multistep instruction completely?
     
  15. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    I have read your post, but in the tutorial, this is mentioned "chunk256cmp=Uncompressed" instead of "chunkcmp=Uncompressed".

    So when i've put the "map256_u", i get an error.
     
  16. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I've fixed the tutorial just now. The SonLVL instructions were written a long time ago, and I've since realized that including the size of the chunks in the property name is stupid.
     
  17. jubbalub

    jubbalub Mania fanboy Member

    Joined:
    Dec 25, 2014
    Messages:
    286
    How can I make Sonic use an animation after completing an act, and by extension, not require Sonic to be off the screen to show the score tally?
     
  18. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    You want a code?
    No.
    If you using Hivebrain 2005 disassembly:
    You have to make a subroutine under "Obj0D_SonicRun". Look at the part at this code:

    move.b #1,($FFFFF7CC).w ; lock controls
    move.w #$800,($FFFFF602).w ; make Sonic run to the right


    This is what you have to look, this code makes sonic run to the right at the end of the act.Maybe you have to comment the "make sonic run to the right", make sonic go in the middle of the screen and put your animation.
    Maybe that can help you.
     
    Clownacy likes this.
  19. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France

    Attached Files:

  20. Baraksha

    Baraksha Well-Known Member Member

    Joined:
    Dec 23, 2015
    Messages:
    99
    I am currently trying to work on a hack and I want to try and make one of those usual hidden secrets in sonic games, the ones that hidden inside walls. kind of like the special stages rings in sonic 3. you know what I mean. basically , I have no idea how to do that, and I couldn't find a guide anywhere or in this forum. (maybe I just suck at looking stuff up) . I am kind of new to sonic level design hacking, i'm currently trying to use SonED2 and learn a but more about it, but is there a way to put a wall on a uper layer above sonic so sonic can go under it? I hope this is not a basic thing that I shouldn't be asking . but help would be appreciated