Basic Questions and Answers Thread

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

  1. Natsumi

    Natsumi Markey's Member

    Joined:
    Oct 7, 2011
    Messages:
    470
    Location:
    Otter's lap
    Can you learn to understand how code works a bit before doing random shit and running here asking for help because it doesnt work (clearly because it was put together by someone with no skill using random guesses)?
     
    Xeal and Ozaleto like this.
  2. Painto

    Painto Kreator and m0derator for the SSQ project Member

    Joined:
    Mar 24, 2014
    Messages:
    311
    Location:
    Poland
    On a side note, the code is pretty unuseful, as it will remove the emeralds even if you didn't collected one before dying (unless if that's what you want, then nevermind this post).
     
  3. ZiroGX2

    ZiroGX2 Working on first sonic 1 hack Member

    Joined:
    Aug 1, 2016
    Messages:
    48
    Location:
    What are you a cop
    The whole point of the code was to keep it from doing that. Because it does that how can I stop it. (Sorry I am terrible at asm but I am trying to learn)
     
  4. Xeal

    Xeal The Blue Baron Discord Admin

    Joined:
    Mar 10, 2016
    Messages:
    117
    Location:
    Some RAM address
    And now I repeat myself for the umpteenth time, but I think I'll need to put a bit more emphasis into it this time....

    LEARN THE BASICS OF 68K ASSEMBLY BEFORE JUMPING INTO COMPLEX SHIT.
     
    Painto likes this.
  5. ZiroGX2

    ZiroGX2 Working on first sonic 1 hack Member

    Joined:
    Aug 1, 2016
    Messages:
    48
    Location:
    What are you a cop
    I am trying to learn. The only was for me to learn is to know what my mistakes are so I can prevent myself from doing them in the future. As googleing "that shit" could not help me and MJs guide could not help with the issue I was having.
     
    Last edited: Oct 13, 2016
    Ashuro likes this.
  6. Xeal

    Xeal The Blue Baron Discord Admin

    Joined:
    Mar 10, 2016
    Messages:
    117
    Location:
    Some RAM address
    ....
    bullshit.
    Markey's guide is MORE than clear on how each 68k instruction works, and there are numerous 68k instruction manuals online. If somehow those are of no help to you then I don't even know why you bother to try.
     
  7. FireRat

    FireRat "The grand imitator..." Member

    Joined:
    Feb 25, 2016
    Messages:
    116
    My two cents here, one thing is the instruction set, another is the logic of the sequence behind those commands.
     
    Natsumi and ZiroGX2 like this.
  8. Pacguy

    Pacguy Not as active as I used to be... Member

    Joined:
    Jul 5, 2014
    Messages:
    907
    Location:
    SOMEWHERE!!! OVER THE RAINBOW!!!
    Once you know the instruction set, following the logic isn't hard at all, as long as you know what data is being thrown about. I can follow along with code just fine until I run into an unnamed variable or instructions I'm unfamiliar with. Getting to know the code isn't hard either, I learned basically everything I know from examining commented disassembly code and code from copy/paste guides. If I'd bothered to research early on and stumbled across MJs' guide, I'd pretty much know everything I've learned from that. If MJs guide is too hard to follow, then we won't be able to teach much more then that, as it's about as n00b friendly and clear as is possible with this subject.
     
  9. MarkeyJester

    MarkeyJester It takes only one mistake. Member

    Joined:
    Jun 27, 2009
    Messages:
    2,511
    Location:
    Miss Fox's heart~
    Calm down.

    My tutorial only currently teaches most of the instructions, it is of course, incomplete...

    I recieve many emails about the site, many of them being "thank you's", some of them being the odd correction here and there, but another more common mention, is the fact that the site doesn't mention HOW you use the instructions together to achieve a task, nor does it teach how to opperate and work with prebuilt software/premade engines.

    You guys are still looking at this from a perspective of an experienced programmer. 68k or not, it's still programming, people PAY to learn this stuff, people GET PAID to teach and do this stuff. Programming (be it an orthogonal instruction set or not) is a serious profession, you have to be mathematically minded in many cases. It's only natural that some people just, won't, get it... No matter how simple the goal in question is.

    Coming into the thread just to call out bullshit, isn't going to help, if you truely believe this person cannot be helped, then the best thing you can do, is ignore the post. By confronting it, you're giving me the impression that you're not trying to help him, but rather, put him down, belittle him, patronise him, all for the sake of gaining popular attention and a good response, and simply shrouding it in words to make it "look" constructive, whether that's your intention or not, that's the image that's being detected.

    Take it easy...
     
  10. ZiroGX2

    ZiroGX2 Working on first sonic 1 hack Member

    Joined:
    Aug 1, 2016
    Messages:
    48
    Location:
    What are you a cop
    By the way your guide did help with alot of things. Some things probably didn't click yet. I first tried assembly because I did some c# before and it was fun. I just could not figure out the problem I was having probably just because of how I read things.:)


    I fixed it thanks to FireRat and MarkeyJester.

    Firerat and Markeyjester helped me realize that how I was thinking about how to solve the situation would not help me so I changed the Logic so It is structured in a was that the 68k would be able to handle the way I wanted It to.
     
    Last edited: Oct 13, 2016
    Ashuro likes this.
  11. Kaz

    Kaz Well-Known Member Member

    Joined:
    Nov 2, 2013
    Messages:
    66
    [​IMG]

    This is more of a logical naming question... As I am tidying up to the latest disassembly instead of Hivebrain's old one, I have a question about mappings.

    So as I understand it, the first digit after fr_Walk represents the current position, while the second digit represents the frame count.

    Is this correct? Looks like it.
     
  12. Novedicus

    Novedicus Oh Member

    Joined:
    Aug 26, 2013
    Messages:
    627
    The first digit represents the set of walking sprites. Set 1 uses the 0 degree angled sprites, while set 2 uses the 45 degree angled sprites, and so on. The second digit represents the frame ID in a set of walking sprites.
     
  13. Kaz

    Kaz Well-Known Member Member

    Joined:
    Nov 2, 2013
    Messages:
    66
    So pretty much what I was saying, except that I confused the word 'angle' for 'position'.
     
  14. Natsumi

    Natsumi Markey's Member

    Joined:
    Oct 7, 2011
    Messages:
    470
    Location:
    Otter's lap
    If you know a little bit about C#, you could actually just make pseudo-code in form of a higher level language, such as;

    Code:
    if(level_cleared){
      last_number_of_emeralds = number_of_emeralds;
    }
    ...
    if (sonic_just_died){
      number_of_emeralds = last_number_of_emeralds;
    }
    ...
    if(monitor_is_destroyed){
      if(monitor_type = monitor_1up){
        number_of_emeralds += 1;
      }
    }
    Then, you can use your very own brains to think how this would work in 68000, and then find the relevant piece of code, and see how you can change these codes to reflect the intended result (aka the pseudocode above). If you are quite familiar with higher level language, you can use tutorials, guides and the disassembly as a guideline for translating code from this language. It will not be optimal way to do it, but it should help you understand the logic of assembly languages and help you in realizing what to actually do. The logic afterall is not much different, but they way you write one vs the other is.

    And a good way to realize where you've gone wrong by accident, is to try to describe your error to someone (imaginary or otherwise), try to look at all the code and maybe tell them your theory of what is wrong, and sometimes you end up realizing a fact you overlooked, and end up solving the issue before you go on the forums asking for help. In fact just lately I fixed many issues with just this method, and it certainly makes you feel smart for doing so =P
     
    FireRat, ZiroGX2 and Xeal like this.
  15. Kaz

    Kaz Well-Known Member Member

    Joined:
    Nov 2, 2013
    Messages:
    66
    [solved]
     
    Last edited: Nov 27, 2016
  16. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    679
    First off, it's most likely possible to simply port the mappings from the Wai proto directly, using the disassembly of it and something like MappingsConverter (or SonMapEd if you must).
    Secondly, if you want to import sprites from an image, try SpritePlotter.NET (available in SonLVL's updater) or the original SpritePlotter.
     
  17. Kaz

    Kaz Well-Known Member Member

    Joined:
    Nov 2, 2013
    Messages:
    66
    [solved]
     
    Last edited: Nov 27, 2016
  18. ProjectFM

    ProjectFM Jack of all trades; master in training Member

    Joined:
    Oct 4, 2014
    Messages:
    566
    Location:
    Portland, Maine
    Use a mappings converter instead. MainMemory's MappingsConverter works pretty well.
     
  19. Kaz

    Kaz Well-Known Member Member

    Joined:
    Nov 2, 2013
    Messages:
    66
    [solved]
     
    Last edited: Nov 27, 2016
  20. Baraksha

    Baraksha Well-Known Member Member

    Joined:
    Dec 23, 2015
    Messages:
    98
    so, I wanted to port over 2 sounds from sonic 3 to sonic 1, the 1UP and Stage Clear. I used SMPSConv to convert the smps files from sonic 3 to work with sonic 1 and it worked for the 1UP perfectly, but the act cleared theme sounds like it uses just one inturment while the rest sounds like static. I looked at the conversion log and I noticed it says "0×00 insturments" that seems unusual for me, but I never really worked with this before so I may be wrong. So, any help?