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)
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).
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.
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.
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
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.
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...
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).
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: 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.
Did you try the file swap on a fresh Disassembly and see if it's something you edited? Also, what editor do you use?
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...
Timer_frames is the equivalent of level_frame_counter, and I'm pretty sure height pixels is an SST exclusive to S3K.
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.
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.
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...
Use something along the lines of: Code (ASM): cmpi.w #$2,(Player_option).w; Check if Player is Knuckles 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.
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.
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?
You need to add it to where the game loads the layouts, not where it includes them. Level Layout Load, I think.