Jump to content

  •  

Photo

Tips and Tricks Hacking/Modding


  • This topic is locked This topic is locked
36 replies to this topic

#1 insulfrog

insulfrog

    1 Chaos Emerald

  • Member
  • 40 posts
  • Gender:Male
  • Location:Boston, Lincolnshire, England

Posted 12 August 2007 - 08:51 AM

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.

Posted Image

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

#2 redhotsonic

redhotsonic

    Also known as RHS

  • Pro User
  • 1918 posts
  • Gender:Male
  • Location:United Kingdom

Posted 27 August 2007 - 06:41 PM

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

#3 Shadow Fire

Shadow Fire

    The Chosen One

  • Administrator
  • 276 posts
  • Gender:Male
  • Location:Space.
  • Interests:Stuff. =P

Posted 28 August 2007 - 04:31 AM

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

#4 JcFerggy

JcFerggy

    A_A

  • Member
  • 43 posts
  • Gender:Male
  • Location:New Glasgow, Nova Scotia, Canada
  • Interests:Spriting.

Posted 28 August 2007 - 05:08 AM

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

#5 redhotsonic

redhotsonic

    Also known as RHS

  • Pro User
  • 1918 posts
  • Gender:Male
  • Location:United Kingdom

Posted 28 August 2007 - 12:42 PM

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

#6 Sephiroth

Sephiroth

    WHY SO CURIOUS?!?

  • Pro User
  • 505 posts
  • Gender:Male
  • Location:Qatar, M.E.
  • Interests:Nothing much really.

Posted 28 August 2007 - 05:28 PM

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

#7 Chaos Hedgie

Chaos Hedgie

    Still totally not a rape face

  • Member
  • 137 posts
  • Gender:Male
  • Location:Georgia, USA

Posted 28 August 2007 - 05:46 PM

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

#8 StephenUK

StephenUK

    Liquor in the front, poker in the rear

  • Administrator
  • 477 posts
  • Gender:Male
  • Location:Manchester, UK

Posted 28 August 2007 - 06:12 PM

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

#9 Chaos Hedgie

Chaos Hedgie

    Still totally not a rape face

  • Member
  • 137 posts
  • Gender:Male
  • Location:Georgia, USA

Posted 28 August 2007 - 09:09 PM

Ah, I see. Thanks for explaining that Stephen.
  • 0

#10 shobiz

shobiz

    3 Chaos Emeralds

  • Member
  • 193 posts
  • Gender:Male
  • Location:Karachi, Pakistan
  • Interests:Reading, programming, mathematics, physics, chemistry, football, tennis

Posted 29 August 2007 - 10:52 AM

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

#11 redhotsonic

redhotsonic

    Also known as RHS

  • Pro User
  • 1918 posts
  • Gender:Male
  • Location:United Kingdom

Posted 29 August 2007 - 11:11 AM

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

#12 muteKi

muteKi

    LOLCRAB

  • Member
  • 48 posts

Posted 30 August 2007 - 01:17 PM

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

#13 shobiz

shobiz

    3 Chaos Emeralds

  • Member
  • 193 posts
  • Gender:Male
  • Location:Karachi, Pakistan
  • Interests:Reading, programming, mathematics, physics, chemistry, football, tennis

Posted 30 August 2007 - 02:31 PM

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

#14 redhotsonic

redhotsonic

    Also known as RHS

  • Pro User
  • 1918 posts
  • Gender:Male
  • Location:United Kingdom

Posted 30 August 2007 - 03:11 PM

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

#15 shobiz

shobiz

    3 Chaos Emeralds

  • Member
  • 193 posts
  • Gender:Male
  • Location:Karachi, Pakistan
  • Interests:Reading, programming, mathematics, physics, chemistry, football, tennis

Posted 30 August 2007 - 03:58 PM

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

#16 muteKi

muteKi

    LOLCRAB

  • Member
  • 48 posts

Posted 03 September 2007 - 07:37 PM

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

#17 StephenUK

StephenUK

    Liquor in the front, poker in the rear

  • Administrator
  • 477 posts
  • Gender:Male
  • Location:Manchester, UK

Posted 09 September 2007 - 11:32 AM

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

#18 shobiz

shobiz

    3 Chaos Emeralds

  • Member
  • 193 posts
  • Gender:Male
  • Location:Karachi, Pakistan
  • Interests:Reading, programming, mathematics, physics, chemistry, football, tennis

Posted 09 September 2007 - 11:59 AM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users