Sign in to follow this  
Followers 0

Tips and Tricks Hacking/Modding

37 posts in this topic

Posted

I'm unsure on where to put this topic since there is no 'general hacking' section on the forums. Admins/Mods, please feel free to move this topic if you think this topic is in the wrong place. Thank you :) .

Have you got a neat trick that you incidently found or a tip that you would like to share? If you have, you can post it here, I'll start: -

--------------------------------------------------------------------------------------------------------------------------------------------

Make the most of the space: -

When you see the original levels of most Sonic games, there is a lot of unused space. You can fill this space with either the main level route, a secret/bonus area or a secondary route.

ehz24bx7.th.png

Or, like I have done here in my hack, extend the level route without increasing the level's boundries to give the impression that the level is longer than it actually is.

0

Share this post


Link to post
Share on other sites

Posted

When editing levels, try not to add more rings than there currently is. Adding more rings will extend the data of the ROM and it will overright certain parts.

Use the amount of rings there already is.

0

Share this post


Link to post
Share on other sites

Posted

Here's a handy hint.

MAKE BACKUPS!

The worst thing that could possibly happen is that you've been hacking away and done lots of work, only to screw it up, or have your hard drive crash. The best thing to do is to make regular backups and keep them in a safe place.

Oh, and this topic seems rather useful, so I'm pinning it.

Topic pinned.

0

Share this post


Link to post
Share on other sites

Posted

Make the most of the space: -

When you see the original levels of most Sonic games, there is a lot of unused space. You can fill this space with either the main level route, a secret/bonus area or a secondary route.

Not always true. Sometimes when you make a level that twists and turns so much, it gets boring and un-pleasant to play, so sometimes its better to have a level that is more straight-forward, at least for the first few zones.

0

Share this post


Link to post
Share on other sites

Posted

Another important tip. When posting information about your hack on this forum (and others), give as much information as you can. And ALWAYS listen and take on-board what other people say about your hack.

Remember: You want your hack to be enjoyable for everyone, not just for yourself.

As for ShadowFire's back-up tip, try backing up everytime before editing.

0

Share this post


Link to post
Share on other sites

Posted

This is probably something that has gotten me in trouble a lot when it comes to HEX but I can safetly say this for ASM too.

QUADRUPLE CHECK YOUR WORK!

Nothing hurts more than messed up coding, whether you typed 02 instead of 42 or typed $FFFE instead of $FFFFE. You must check and check and check!

0

Share this post


Link to post
Share on other sites

Posted

When editing levels, try not to add more rings than there currently is. Adding more rings will extend the data of the ROM and it will overright certain parts.

Use the amount of rings there already is.

So, how did megamix do it then?

0

Share this post


Link to post
Share on other sites

Posted

So, how did megamix do it then?

Sonic 1 uses a different system, where the rings are actually part of the object data of a zone. Sonic 2 onwards used a different system for rings, and due the the limited amount of RAM space available for it, it spills into the camera values (iirc) which is what causes the dodgy camera wrap and the distorted level layouts.

0

Share this post


Link to post
Share on other sites

Posted

Ah, I see. Thanks for explaining that Stephen.

0

Share this post


Link to post
Share on other sites

Posted

Sonic 1 uses a different system, where the rings are actually part of the object data of a zone. Sonic 2 onwards used a different system for rings, and due the the limited amount of RAM space available for it, it spills into the camera values (iirc) which is what causes the dodgy camera wrap and the distorted level layouts.

Correct me if I'm wrong, but isn't it possible in Sonic 2 to use actual ring objects (object #25) instead of the regular ring formations to get around this problem?

0

Share this post


Link to post
Share on other sites

Posted

Correct me if I'm wrong, but isn't it possible in Sonic 2 to use actual ring objects (object #25) instead of the regular ring formations to get around this problem?

If you change the object into it, yes. If you add an object as #25, no idea.

0

Share this post


Link to post
Share on other sites

Posted

To my knowledge, the ring objects don't count toward the "perfect" ring collection total available in Sonic 2; hence you can use them without overloading the RAM. I don't see any reason then that adding a ring object would cause any serious problems (maybe sprite overloads?).

0

Share this post


Link to post
Share on other sites

Posted

To my knowledge, the ring objects don't count toward the "perfect" ring collection total available in Sonic 2; hence you can use them without overloading the RAM. I don't see any reason then that adding a ring object would cause any serious problems (maybe sprite overloads?).

I suppose if you add too many, there's a chance of overflowing the SST, since I think that only has space for $70 objects, but since sprite loading is camera based, that shouldn't really be a problem.

0

Share this post


Link to post
Share on other sites

Posted

To my knowledge, the ring objects don't count toward the "perfect" ring collection total available in Sonic 2...

I believe you're right there. I think there's and offset for every level which says how many rings for perfect. EHZ is 255 (I think) so if you put more rings in EHZ, and get 255 or more, you'd get a perfect score.

0

Share this post


Link to post
Share on other sites

Posted

I believe you're right there. I think there's and offset for every level which says how many rings for perfect. EHZ is 255 (I think) so if you put more rings in EHZ, and get 255 or more, you'd get a perfect score.

The counter is located at $FF40, but what I really don't understand is that the counter is word-sized, so if you look at it from that perspective, having more than 255 rings in a level shouldn't be a problem (in fact, any amount of rings under 65536 would fit in the counter). I think Stephen's explanation is the actual reason for not being able to have over 255 rings in a level, not the perfect ring counter limitation.

0

Share this post


Link to post
Share on other sites

Posted

To my knowledge, the ring objects don't count toward the "perfect" ring collection total available in Sonic 2; hence you can use them without overloading the RAM. I don't see any reason then that adding a ring object would cause any serious problems (maybe sprite overloads?).

I suppose if you add too many, there's a chance of overflowing the SST, since I think that only has space for $70 objects, but since sprite loading is camera based, that shouldn't really be a problem.

Yeah, what I meant was along the lines of just having so many objects to deal with at a time that it slowed the game down significantly, like when you lose your rings in 2-P mode. Still, it's not really big issue assuming normal level design.

But it really shouldn't make any other difference as you can place as many rings as you want in debug mode without the game crashing.

0

Share this post


Link to post
Share on other sites

Posted

Ring objects can be used in zones, but as has already been said, they will not add to your Perfect count. Not many people tend to go for a perfect ring count though, so I suppose it doesn't really matter either way. I double checked, and the ring layout data does spill into the camera data when too many rings are added. As a result, when the level layout is loaded, the tiles are loaded in completely the wrong place and the background is placed out of position.

The SST can contain $7F objects at any given time (according to the S2 disassembly). Objects are only in SST when they are on the screen or within a certain distance from being on the screen. This means you'd need $7F objects on screen at a given time. If this value was exceeded (in theory), the data would spill over into the primary collision data for the zone. I said "in theory" though, because I don't think the game could load that many objects onscreen in one go without it grinding to a complete halt and crashing anyway. Feel free to try though.

0

Share this post


Link to post
Share on other sites

Posted

The SST can contain $7F objects at any given time (according to the S2 disassembly). Objects are only in SST when they are on the screen or within a certain distance from being on the screen. This means you'd need $7F objects on screen at a given time. If this value was exceeded (in theory), the data would spill over into the primary collision data for the zone. I said "in theory" though, because I don't think the game could load that many objects onscreen in one go without it grinding to a complete halt and crashing anyway. Feel free to try though.

While I do think $7F objects is too many for the Genesis to handle at the same time, most calls to loc_17FDA (allocObject in Aurochs' disassembly, or the Sonic 2 equivalent of SingleObjLoad) are followed by a bne to some label. This may be me completely misunderstanding the code, but wouldn't the bne only activate on the condition that SingleObjLoad wasn't able to find a free slot in the SST? In that case, weren't the programmers planning for this case?

0

Share this post


Link to post
Share on other sites

Posted

If both players lost rings in 2-P mode, its absence could really have complicated matters, but I think even then that only comes out to about 50 items on screen, not even half the limit.

0

Share this post


Link to post
Share on other sites

Posted

If both players lost rings in 2-P mode, its absence could really have complicated matters, but I think even then that only comes out to about 50 items on screen, not even half the limit.

Well I haven't studied the ring loss code in detail, but I know characters can only spawn a maximum of 50 rings at a time. If both characters took a hit with 50+ rings, that would create 100 rings. Each ring, being an object, would result in $64 objects, leaving a maximum of $1B objects possible to be displayed (27 objects). Taking into account the HUD, any possible monitors and badniks on screen, and stuff like that, it MAY be possible to reach $7F, but I still think it's unlikely. If anyone wants to tast the overflow, just drop 127 rings in debug on screen. If after 127 rings it won't drop any more, then you know it's capped. Remove the cap, try again and test the results. If it all fucks up, you know why they put the cap there.

0

Share this post


Link to post
Share on other sites

Posted

They put the cap there to stop the overflow, like stephen pointed out. You can think of it as wearing a cap will keep the hair down. Taking it odff will result in a bloody mess. That's why I used to wear a cap =P

0

Share this post


Link to post
Share on other sites

Posted

Here a few other tips from me: -

--------------------------------------------------------------------------------------

When you do your palletes, always use the original shading to get the best results. To help you do that, think of a theme and stick to it, especially when you are doing zone palletes. Think which colours work best together and don't make the colours too strong. Pick and mix good matching colours and tweak them a bit until you get them just right.

0

Share this post


Link to post
Share on other sites

Posted

A tip to the topic itself: Maybe you should add something like "Small Questions" (Basic Question and Answer Thread on SR) and "Small Tutorial's. It might be useful and nobody needs to open a new Topic in this Forum or Tutorials.

0

Share this post


Link to post
Share on other sites

Posted

You can think of it as wearing a cap will keep the hair down. Taking it off will result in a bloody mess.

I don't know what sort of caps you've been wearing :wacko:

0

Share this post


Link to post
Share on other sites

Posted

You can think of it as wearing a cap will keep the hair down. Taking it off will result in a bloody mess.

I don't know what sort of caps you've been wearing :D

I do, exactly the same thing happens with my hair (though since I hardly ever wear a cap it's always a mess :wacko:)

0

Share this post


Link to post
Share on other sites
This topic is now closed to further replies.
Sign in to follow this  
Followers 0