Sonic and Sega Retro Message Board: Basic Questions & Answers thread - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

Basic Questions & Answers thread NEWBIES: Start here!

#16 User is offline Jayextee 

Posted 05 June 2008 - 02:31 PM

  • Comic Mischief
  • Posts: 3052
  • Joined: 22-October 07
  • Gender:Male
  • Location:Kathmandu, Nepal
  • Project:Who knows? Toss a coin, will ya?
  • Wiki edits:27
This page has the disassemblies: Some have s1comb.asm, and others don't need it. Check which you have.

#17 User is offline Dr. Kylstein 

Posted 05 June 2008 - 06:50 PM

  • Posts: 84
  • Joined: 05-June 08
  • Gender:Not Telling
I am trying to port something from S&K to S2, but I can't find any information on the following memory locations in S&K: FE05, F73E. Also, there are some object flags/counters unique to S3/S&K that I need, and I am wondering how to deal with them. I technically only need two (not necessarily adjacent) bytes somewhere in memory for these, since they should only affect one object. I don't have a good understanding of where everything is in memory for S2, so if somebody could point out some free space, it will be useful for other features as well.

#18 User is offline shobiz 

Posted 06 June 2008 - 12:14 AM

  • Posts: 863
  • Joined: 27-March 05
  • Gender:Male
  • Location:Karachi, Pakistan
  • Wiki edits:4,411
FE05 is the second byte of the level frames timer, it's the same thing as FE05 in Sonic 2. F73E is the Tails carrying Sonic flag when he's flying. F73F, for that matter, is the picking up Sonic counter - unless this is 0, Tails won't be able to pick up Sonic. As for free memory space in Sonic 2, FEB0-FEBF is completely unused, which means you've got 16 bytes of contiguous free space.

If by object flags/counters you mean object status variables, you can get all the info on that at SCHG:Sonic 3 & Knuckles#Object_Status_Table_Format. If you compare that with SCHG:Sonic 2/RAM Editing#Object_Status_Table_Format, it's pretty easy to see which Sonic 3k OST offsets correspond to which Sonic 2 ones.

#19 User is offline Dr. Kylstein 

Posted 06 June 2008 - 12:16 PM

  • Posts: 84
  • Joined: 05-June 08
  • Gender:Not Telling
Thanks, shobiz. I do mean object status variables, but I have already converted all the ones I can. The two I am asking about have no Sonic 2 equivalent. I was hoping for general advice on how to deal with them. I will probably just substitute one of those free bytes you mentioned, for now, since only one object should ever need them.

You can probably guess what I'm doing from those memory locations. It seems to be a fairly common hack.

#20 User is offline Chrome 

  Posted 06 June 2008 - 01:39 PM

  • Matty
  • Posts: 6
  • Joined: 06-June 08
  • Gender:Male
  • Location:England
  • Project:Learning how to hack.
Okay, as I mentioned in my introductory post, I am intrigued by the concept of hacking. Problem is, I don't know where to start. The paticular game I would like to begin hacking is Sonic the Hedgehog 2. If anybody could share a little bit of advice with me, I thank you greatly. Bear in mind, I'm looking to change pallettes, level layouts, graphics and so on. I'm going to focus on adding new features when I have a little more experience as a hacker. Thank you for listening.

#21 User is offline nineko 

Posted 06 June 2008 - 01:57 PM

  • I am the Holy Cat
  • Posts: 5294
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
To change layouts and palettes in Sonic 2, if you want to keep it easy and simple, you only need SonED1. It can directly edit Sonic 2 ROMs without any other hacking knowlegde (except that the levels are made by tiles, I guess).
Though, this will make it harder (but not impossible) for you to switch to a split disassembly later in case you decide to try something more.
If you want to aim high, get a split disassembly and edit the individual files with more advanced tools like SonED2 and SonMapEd.
This post has been edited by nineko: 06 June 2008 - 01:57 PM

#22 User is offline Chrome 

Posted 06 June 2008 - 02:00 PM

  • Matty
  • Posts: 6
  • Joined: 06-June 08
  • Gender:Male
  • Location:England
  • Project:Learning how to hack.
Thank you kindly, Nineko.

#23 User is offline Hivebrain 

Posted 06 June 2008 - 02:35 PM

  • Posts: 2374
  • Joined: 15-January 03
  • Gender:Male
  • Location:53.4N, 1.5W
  • Project:HivePal 2.0
  • Wiki edits:6,176
Editing a split disassembly is considerably easier and simpler than editing a ROM. Most modern hacking tools are designed to work with split files. The only vaguely tricky part is setting up SonED2 project files, but this doesn't require any specialist knowledge.

#24 User is offline Dr. Kylstein 

  Posted 06 June 2008 - 04:10 PM

  • Posts: 84
  • Joined: 05-June 08
  • Gender:Not Telling
I have a few errors like these:

s2.asm(36042): error: range overflow
   tst.b   (Interim_flying_frames_left).w
s2.asm(36042): error: addressing mode not allowed here
   tst.b   (Interim_flying_frames_left).w
s2.asm(36045): error: range overflow
   subq.b  #1,(Interim_flying_frames_left).w
s2.asm(36045): error: addressing mode not allowed here
   subq.b  #1,(Interim_flying_frames_left).w


I defined that constant as:
Interim_flying_frames_left =	ramaddr( $FFFFEB3 )


My only guess is that these commands, as the error suggests, do not support absolute addresses, but addq.b with a similar constant I defined does not raise an error.

#25 User is offline FraGag 

Posted 06 June 2008 - 04:17 PM

  • Posts: 652
  • Joined: 09-January 08
  • Gender:Male
  • Location:Qu├ębec, Canada
  • Project:an assembler
  • Wiki edits:6

View PostDr. Kylstien, on Jun 6 2008, 05:10 PM, said:

I have a few errors like these:

s2.asm(36042): error: range overflow
   tst.b   (Interim_flying_frames_left).w
s2.asm(36042): error: addressing mode not allowed here
   tst.b   (Interim_flying_frames_left).w
s2.asm(36045): error: range overflow
   subq.b  #1,(Interim_flying_frames_left).w
s2.asm(36045): error: addressing mode not allowed here
   subq.b  #1,(Interim_flying_frames_left).w


I defined that constant as:
Interim_flying_frames_left =	ramaddr( $FFFFEB3 )


My only guess is that these commands, as the error suggests, do not support absolute addresses, but addq.b with a similar constant I defined does not raise an error.

There's an F missing in your RAM address: it should be $FFFFFEB3. The error comes from the fact that the ($xxxxxxxx).w construct only works when xxxxxxxx is greater than or equal to $FFFF8000, because if this number is written as a negative number (-$8000), it can be stored in a word. When the processor will try to read from this address, it will first sign extend it, so the original address will be retrived. On the Genesis, the higher byte of an address is unused and ignored, so $FFFF8000 is equivalent to $FF8000.
This post has been edited by FraGag: 06 June 2008 - 04:18 PM

#26 User is offline Dr. Kylstein 

Posted 06 June 2008 - 04:29 PM

  • Posts: 84
  • Joined: 05-June 08
  • Gender:Not Telling
Wow, that's a thorough explanation, FraGag. I had suspected a typo, but I couldn't spot it among all those F's. :lol: Thanks.

#27 User is offline shobiz 

Posted 07 June 2008 - 12:37 AM

  • Posts: 863
  • Joined: 27-March 05
  • Gender:Male
  • Location:Karachi, Pakistan
  • Wiki edits:4,411
Might be a bit too late for this now but (judging from Knux's S2K sprite), the Sonic 2 equivalent of Sonic 3k's byte $25 of the OST is $1F, and the Sonic 2 equivalent of Sonic 3k's byte $2F of the OST is $21.

#28 User is offline Dr. Kylstein 

Posted 08 June 2008 - 01:06 PM

  • Posts: 84
  • Joined: 05-June 08
  • Gender:Not Telling

View Postshobiz, on Jun 7 2008, 01:37 AM, said:

Might be a bit too late for this now but (judging from Knux's S2K sprite), the Sonic 2 equivalent of Sonic 3k's byte $25 of the OST is $1F, and the Sonic 2 equivalent of Sonic 3k's byte $2F of the OST is $21.


Those do appear to be unused by Sonic & Tails in the original game. I considered using $21 for that very purpose earlier. I already had flight working (with some fixable bugs) with the unused RAM locations, but I have just changed back to OST with these offsets, since they free that RAM up again and could be useful for other S3&K double-jump abilities. Thanks.

#29 User is offline JoseTB 

Posted 08 June 2008 - 05:46 PM

  • Posts: 623
  • Joined: 01-June 04
  • Location:Spain
  • Wiki edits:4

View PostDr. Kylstien, on Jun 8 2008, 08:06 PM, said:

View Postshobiz, on Jun 7 2008, 01:37 AM, said:

Might be a bit too late for this now but (judging from Knux's S2K sprite), the Sonic 2 equivalent of Sonic 3k's byte $25 of the OST is $1F, and the Sonic 2 equivalent of Sonic 3k's byte $2F of the OST is $21.


Those do appear to be unused by Sonic & Tails in the original game. I considered using $21 for that very purpose earlier.


IIRC they are - you should be able to use anything that is free, it's just that S2K used those addresses.

#30 User is offline SMTP 

Posted 08 June 2008 - 07:12 PM

  • Posts: 2144
  • Joined: 27-April 04
  • Gender:Male
  • Location:Ohio
  • Wiki edits:59
Wait... OST? do we not call it SST anymore..?

  • 349 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last ►
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users