don't click here

Basic Questions & Answers thread

Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.

  1. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    I dunno. It loads through some lea code. (Thought that meant load effective address) Could be that I'm just stupid.

    Giving up on S1 now, but thanks for your helps. :D
     
  2. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    Yes. You are right... the art is loaded to VRAM through those instructions. First, you'll see a macro called locVRAM followed by a hex address, as you pointed out. Then you'll see lea (load effective address). That loads the art... the effective address being the start of the art in the ROM. Afterwards it is decompressed and voila. There it is in VRAM for either sprite use or tilemaps... or whatever.

    Don't give up on hacking dude... it just takes practice. This is an easy thing.
     
  3. rata

    rata

    Member
    690
    73
    28
    Argentina
    Trying to be useful somehow.
    Don't give in, man. Nobody started hacking right after learning what d0 is. You just have to get the dedication to learn it, the will for producing stuff, patience to fix them when they break and some imagination. All the help you need, you got it here, and this is one of the most important things I think.
    Little advice: when you want to try adding some code, always make a map of what you want to do and different ways to do it, and only then figure out how to do it with the reosources that ASM have. Otherwise you may just get errors everywhere in every line you write, as I used to get (not anymore since I don't even touch ASM for serious months, is not that I've learn something:p). You may know this if you already did something related to programming, but in case you don't, there you go. This may save you from some nerves and 'im done with this' situations.
     
  4. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    Head of nail has been hit... ^
     
  5. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    I know, I was getting a little frustrated from not even being able to modify a single thing in S1. Strangely enough I find hacking S3K a lot easier, while most people claim that S1 is the easiest to hack and S3K the most difficult. Lol. And I said I was giving up on S1, not on ASM. ;)/>/>

    But I usually get around this kind of frustration by leaving it alone for a couple days. Also, I think I understand KingOfHearts' explanation 2 posts back, so I'm gonna give it another whirl after all.

    So I moved back to finetuning my S2 hack, which IS going fine. Noticed some problems when porting Knuckles as described in the guide on this site. The simplest to fix (already on it) is the fact that you still get the Sonic + Tails continue screen. The second one shouldn't be too hard to fix either, but does make weird shit happen. If you enter a special stage, you will immediatly notice 2 strange things: You are Tails only, while the CPU thinks your Sonic AND Tails. This makes it very difficult to complete the stage (I failed even though I didn't get hurt a single time). Also, the ring counter acts weird(after some time it starts using 3 digits, also the count is incorrect). Also, in Chemical Plant Zone Act 2 you will be able to climb through the blocks leading you out of the water from below, and if you're lucky even glitch your way directly to Eggman. Don't know if it fucks up Sonic's gameplay if you fix that one, so I'm gonna leave it alone, but look at these screens:

    [​IMG]
    In the "real" KiS2 this is only possible if you fly through the block from the side of were there before the block was, but in regular S2, Knuckles can climb through the block from below

    [​IMG]
    About 5 seconds after something like this (but under water) I was facing Eggman. Haven't been able to reproduce this bug in either S2 or KiS2, so can't tell you if it is also possible in KiS2, but in S2 it did happen to me once.

    Not complaining or whining about the tutorial or anything, just noticing. Like most programmers, if I hack/edit/create something/write a tutorial I usually like my shit to work, and would want to know shit like this. Assuming the people here are like that too. If I manage to fix this I'll add a part 2 for that tutorial if you'd like.
     
  6. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    It appears that Flamewing fixed the issue in my hack by simply moving the line "sub.w d3,y_pos(a1)" under loc_19B06 to directly under the loc_19B1C label.
     
  7. flamewing

    flamewing

    Emerald Hunter Tech Member
    1,161
    65
    28
    France
    Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
    Climbing through blocks like happens happens to any hack that adds climbing abilities to S1 or S2; S3&K and KiS2 fixed that one (albeit in a buggy way), so you can't climb inside blocks from below. However, if you climb the wall and stay on it at the same level as the block, it will go through you and you can climb along with it. At least in the case of those blocks: under normal circumstances, you would be pushed inside the wall by the moving block and the climb code would detect that and detach Knuckles from the wall; however, in this case there are invisible solid blocks inside that wall that push you right back out so that the check to detach from the wall fails.

    Anyway: here is ow to fix that issue with Knuckles.

    Edit: "Ninja'd" by MainMemory because I went out to lunch before replying.
     
  8. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    Allright, thanks again, fixing it as we speak.

    Now back unto that sprite loading, I now understand that you should put the art in VRAM and load that. Can someone give me a (simple) example of that? The sprite doesn't need to be animated (though it'd be nice).
     
  9. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    Well, for starters... animated sprites can be done one of two ways... either loading all the tiles into VRAM at once (which is typically done with PLCs, found in _inc/Pattern Load Cues.asm) OR is done dynamically... which can be seen in the subroutine Sonic_LoadGfx:. This subroutine can be applied to other objects as well.

    Take a look at those two to get an idea of it. If you need any details in-depth on using either... well, you know where to ask! :)
     
  10. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    Okay, but now I still don't know how to put a sprite in VRAM and make it load (at the position I want it to), which is about the only thing I still don't have a clue on... :rolleyes:
     
  11. PKstarship

    PKstarship

    Super-Sonic Racer
    This is my final trial post on Sonic Retro, so I wanted to ask, how do you up Sonic's normal speed in Sonic 1? I like the first Sonic game but always felt he was too slow in it...
     
  12. Billy

    Billy

    RIP Oderus Urungus Member
    2,119
    179
    43
    Colorado, USA
    Indie games
  13. rata

    rata

    Member
    690
    73
    28
    Argentina
    Trying to be useful somehow.
    I hope he can make it otherwise this will be useless, but in case you don't want to remove speed cap and just increase Sonic's speed, you can always look for Sonic's code (Object 01) and change his speed in Sonic Main subroutine. Also you may want to do the same within chkshoes subourtine (inside Sonic Display.asm if you're using GitHub disassembly).
    Of course that you can do this AND remove the speed cap, which would result in insane speed. Be aware though, because too much speed may not give enough time to load tiles and show erratic chunks (avobe $1000, so nothing to really worry about).
     
  14. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    I have succesfully ported the S2 level select to S1. Works like a charm, only the icons for the levels still reflect those of S2. So I went into SonMapEd and loaded up LevelIco.nem as Nemesis art and Menu.pal as the palette. No real problems there. The palette isn't right for all the icons, but I'll figure that one out later, must be that some zones' icons uses another palette, should be easy to fix. Now it's time to load up the mappings and DLPC's for easy editing, and the troubles begin. There is a file called IconsMap.eni present, I presume this one contains the mappings for the icons, but it doesn't load up in SonMapEd (highlighting unload doesn't give me an option to unload mappings, after all), and I don't even know where to begin looking for the DLPC files to make SonMapEd load those chunks for easy editing as you would when you edit Sonic's sprites, so I can edit every level's sprite in a normal way.

    Anyone here knows what I should do? I think the .eni extensions refer to Enigma, but I thought that was just a compression format for graphics. Can it contain what I need? A little help would be really, really, really appreciated!
     
  15. PordyPates

    PordyPates

    Member
    21
    0
    1
    So I've decided to try and learn how to produce a hack and I'm in the process of getting to grips with importing art. I made a quick piece of level art using Emerald Hill's colours just as a test. The chunk is 128x128 (which I believe is correct?).

    [​IMG]

    However, when I try to import the file into SonEd2 the chunk looks like this:

    [​IMG]

    I'm completely aware I've missed some very important steps. Am I being too ambitious? Are there certain things I should be doing first as a beginner? My knowledge of hacking is extremely limited so please bear with me. I'm pretty lost and need some guidance please. :v:/>
     
  16. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    Did you read SonED2's manual on art importing? Otherwise, SonLVL has more advanced art importing capabilities, such as support for PNG, BMP and GIF images; support for any color depth (16 or 256 color is recommended however, the color mapping is not perfect with true color images); and the ability to define collision and priority via additional images.

    The level select icons are plane mappings, not sprite mappings. Use PlaneEd or SoniPlane to edit them.
     
  17. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    I don't really need to edit the mappings, I just want to load the mappings, so I can edit the art more easily. Also, I can't get SoniPlane to load, and I wouldn't even know where to begin editing art via command line, with PlaneEd being command-line and all. I'll just give up on the S2 level select in S1, then.

    New question: I want to add ANY kind of options menu to S1. I already gave up on anything else concerning that game except adding new characters. Asking how to display a sprite will always be ignored over here, took me a while to understand, but I get it now. But you gotta start learning somewhere, right? I am making progress with a lot of other things, but I really need somebody to explain to me how to make a title menu. If the <img> tag in HTML was classified top secret, there would be a lot less webdesigners too, don't you think? As every other thing I tried failed, I decided to just use plain text to achieve my character selection, but even using that way I have no idea where to start. Can somebody PLEASE help me with this? I find it weird that I can easily add 4 characters to S3K, but can't even make a simple title menu in S1.
     
  18. Clownacy

    Clownacy

    Tech Member
    1,061
    607
    93
    Stop giving up on everything just because you hit one obstacle. Do some background reading, especially on the plane editing, since you're sure-as-hell not the first one to experience problems with plane map editors.

    We don't need to hear your lecture on people not helping. You know, there are resources all over the place: you have example code in the form of documented disassemblies of whatever Sonic title, old posts that would have made it obvious there's a difference between sprite maps and plane maps, old guides on stuff that's actually beginner-friendly. The fact that you're so dependant on this thread is worrying.

    Of course copying and pasting player code is easier than making your own menu. You're shooting too high. You want a plain text menu? Hope you're familiar with the VDP (or, failing that, the engine's object system), controller input handling and RAM management. There is no basic answer that can explain all that on a level you'd clearly be comfortable with, if your previous posts are anything to go by.
     
  19. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    You say I should stop giving up so fast, but your not answering my question either. I'm not asking for some code I can just copy and paste(wouldn't that be convenient), and I wasn't lecturing either. I'm asking for a turorial or something that covers basic things like this. I understand that most of you are much more experienced and can sometimes get annoyed by simple questions like this, but you seem to forget that you were also like this once and had to start somewhere. The "find out yourself" attitude doesn't help when you're actually trying to learn, but nobody is willing to share his knowledge, even if it is something horrendously easy. I'm kinda cocky myself on programming/designing forums on other hobby's that I am adept at, but I do always point the occasional newbie in the right direction, albeit in a "read this page" kind of way. I never dissalow someone knowledge.

    That being said, I wasn't trying to whine or start a fight. I was practicly begging someone to step over the usual "etiquette" here in order to get me further. I now see that's not gonna happen and have decided that these forums are just not for me. On the bright side this means that I do have to figure it all out myself, and I probably eventually will, but I don't think there will be any need to renew my trial membership. Please don't think I'm angry or anything, because I'm not. I just expected more of this place. Maybe too much. That being said, let us say goodbye in a peacefull way. Sorry if I were stupid, and I didn't mean to irritate or annoy anyone.

    Peace be upon thee. :P
     
  20. Clownacy

    Clownacy

    Tech Member
    1,061
    607
    93
    Really? 'You'd have better luck finding past answers instead of trying to make new ones. Those at least exist.' is 'Do it yourself.' now? You say you don't want code, but when I give you instructions on where and how to find a whole spectrum of answers, code or not, you say I didn't answer your question? Your way of solving problems, and your habit of running away from problems, makes for a really bad combination. You're relying on people who may not answer depending on the person or question. Telling me I didn't answer your question won't change everyone else's mind and make them open up, and frankly it won't change mine, either.

    'Give a man a fish/teach a man to fish' is something that's brought up here a lot. I was like you once? Yeah, but I caught on early, and now I can pull off what you want to and more. How? I at least understood why some of my questions went unanswered, instead of drawing some condescending parallel. I'm giving you the answer I think you need, working from experience, even if it's not necessarily the one you want. You can't squeeze blood out of a rock, and sometimes you can barely get an answer out of this lot. I can't answer all your questions, and I know, by directly answering your question, I'd be encouraging something that just can't be sustained. As I've said to people before, I've seen the well go dry for many people, even before I became involved with the group. I'm suggesting something that will hopefully make things easier for you, namely by cutting the 'asking' bit out. You up and leaving because of this only proves my point. The way you're going, and the way we're going, things won't work.

    There's a rather infamous case of someone asking, many, many questions, and seemingly not learning a single thing, even asking repeats of earlier questions. That Knuckles in Sonic 2 guide was in part a result of it. Some members who helped that someone were harassed by him, and things just got worse from there. You might not be that bad, but I don't think many here are willing to risk it anymore.