don't click here

Basic Questions & Answers thread

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

  1. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    On the MC68000, adding a register to itself is faster than left-shifting by 1, since the shift function can only shift by 1 position at a time.

    This changed on later CPUs, which added a barrel shifter. Barrel shifters can shift by any number of bits in a single cycle. The downside is it requires more transistors, which wasn't possible at the time of the 68000 due to cost and the manufacturing process, but was implemented on later processors after it became feasible.

    Some CPUs that have barrel shifters:
    • Motorola 68020/30/40/60
    • Intel 80386 and later (but NOT Pentium 4)
    • ARM (in the instruction pipeline, which allows for a "free" shift on pretty much every instruction)
     
  2. Pacca

    Pacca

    ASM amateur Member
    42
    16
    8
    Labyrinth Zone
    Sonic 2 CD Remix
    This is a bit of an embarrassing hacking question to ask, but here goes...
    How do you edit object sprites in Sonic 1? I've been able to edit level art through Sonlvl, but beyond that, I'm still using old art which really doesn't fit in (especially those blocks in MZ and LZ that are used as a part of the layouts).
     
  3. Jimmy Hedgehog

    Jimmy Hedgehog

    Member
    1,728
    8
    18
    England - Slough
    Getting the motivation to continue old projects
    I personally always used SonMapEd. Load the art file, load the mappings file (might have to go in Sonic1.asm to find out which object refers to what) and you can replace art using external pictures, as long as the image is no bigger than the mappings for that frame. Of course you're still limited by your pallete so be careful what colours you use. Though if I remember right, KingofHarts is whipping up a tool that can also deal with that as well as other things, which will be worth a look once it's out there.
     
  4. Caverns 4

    Caverns 4

    Member
    346
    0
    16
    Sonic: Retold
    Look into SonMaped. Currently, that's probably your most reliable, user-friendly option. It has a bit of a learning curve, but there are tutorials.

    You're right, and once he has gotten that a bit farther a long, I'm going to probably reccomened that to others instead. For now, SonMapEd is your best bet though.
     
  5. Jimmy Hedgehog

    Jimmy Hedgehog

    Member
    1,728
    8
    18
    England - Slough
    Getting the motivation to continue old projects
    Knew I forgot to mention something. Here's the link to the first part:
    http://info.sonicretro.org/SCHG_How-to:Use_SonMapEd/Part_1
     
  6. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    I am indeed, though at the current moment, Importing images is one of the few things I havent quite figured out how to do on the sprite editing front... I can't promise it will be in this first build but I'm trying to figure it out as we speak.
     
  7. Pacca

    Pacca

    ASM amateur Member
    42
    16
    8
    Labyrinth Zone
    Sonic 2 CD Remix
    Um... Here's another embarrassing question...

    How do you add a new hack to the list of hacks in Sonic Retro's wiki, and what guidelines should be followed to ensure it stays there? Strangely, I can't find a help topic on this...
     
  8. FraGag

    FraGag

    Tech Member
    First, there's a hack policy, which is linked to from the upload page. Once it's uploaded, you just have to create a page and categorize it appropriately (you can click Edit on existing pages to see how it's done).
     
  9. AkumaYin

    AkumaYin

    Member
    286
    6
    18
    Here's a question: so I copied Labyrinth's palette and pasted it as the underwater palette. I then made edits to it, and when I built, this happened:

    [​IMG]

    I then reset the palette, the 8x8 tiles, the 16x16 mappings, the 256x256 mappings, and uninstalled the rev01 background effects, and nothing works. Help would certainly be appreciated on this one.
     
  10. TheInvisibleSun

    TheInvisibleSun

    OVER THE TOP TECHNO-BLAST Member
    1,626
    193
    43
    Buffalo, NY, USA
    The Water
    Did you try the file swap on a fresh Disassembly and see if it's something you edited? Also, what editor do you use?
     
  11. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    What would be the S2 equivalents of these S3K constants:
    Level_frame_counter
    and
    height_pixels

    I don't think that if I use 6 and $FFFFFE04 it would work fine, seeing as how 6 is used for mappings in some cases in S2, and I'm not certain if Timer_frames is the S2 equivalent of Level_frame_counter...
     
  12. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    Timer_frames is the equivalent of level_frame_counter, and I'm pretty sure height pixels is an SST exclusive to S3K.
     
  13. 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)
    The closest you have to height_pixels is y_radius (or mainspr_height for multi-sprites) — but it requires setting a flag in render_flags (bit 4) or it will be ignored by BuildSprites, which will assume the sprite to be 32 pixels of half-height. And KingofHarts is correct about Timer_frames.
     
  14. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    Enter my question. I know what x_radius and y_radius is for... WHY width_pixels??? OR height_pixels? What do these do? In Sonic 1, the former is named act_width... which doesn't help my understanding either.
     
  15. Pacca

    Pacca

    ASM amateur Member
    42
    16
    8
    Labyrinth Zone
    Sonic 2 CD Remix
    How would I get a level to load different object layouts in Sonic 1 depending on how a value is set? I'm adding a new character to my hack, and I want to make the object layouts differ so that the game is playable with the new character, like S3K did with Knuckles.

    Edit: My attempts usually make the level load no objects at all...
     
  16. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Use something along the lines of:
    Code (ASM):
    1.         cmpi.w    #$2,(Player_option).w; Check if Player is Knuckles
    2.         bne.s    +                     ; if not, branch
    Add that to where the game loads object layouts, and the line that loads the correct layout for Knuckles underneath. Then have the branch lead to the object layout for Sonic or any other character. That should work.
     
  17. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    I'd use a cmpi.b, though. Why wasting a word, unless he plans to add more than 256 characters in his hack? Plus, with cmpi.b he can put the character flag in any RAM address instead of being forced to use an even one.
     
  18. Pacca

    Pacca

    ASM amateur Member
    42
    16
    8
    Labyrinth Zone
    Sonic 2 CD Remix
    I've tried doing that, by putting a branch system right where the incbins are, but it makes it load nothing. Where should I put it?
     
  19. TheInvisibleSun

    TheInvisibleSun

    OVER THE TOP TECHNO-BLAST Member
    1,626
    193
    43
    Buffalo, NY, USA
    The Water
    You need to add it to where the game loads the layouts, not where it includes them. Level Layout Load, I think.
     
  20. Pacca

    Pacca

    ASM amateur Member
    42
    16
    8
    Labyrinth Zone
    Sonic 2 CD Remix
    I need this for objects. I don't really care about the level layouts themselves.