Sonic and Sega Retro Message Board: Sonic 3 Hacking - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 3 Pages +
  • 1
  • 2
  • 3
    Locked
    Locked Forum

Sonic 3 Hacking Because Non-Tech Members CAN'T avoid this game forever.

#16 User is offline MainMemory 

Posted 02 May 2013 - 10:33 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 4194
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339

View PostTimpZ, on 02 May 2013 - 10:15 PM, said:

The assembly works fine before replacing the files. Here's a link to the folder which is just a fresh download with the ASM files replaced.

If you look before it spams all those errors, you see the REAL problem:
> > >sonic3k.asm(22395): error: symbol undefined
> > > id_SonicBalance
> > >           move.b  #id_SonicBalance,anim(a0)

It's trying to use labels that don't exist.
In the root folder I noticed two Anim files. I moved them to the folder they should be in in a normal disassembly, General/Sprites/Sonic, and it built just fine.
This post has been edited by MainMemory: 02 May 2013 - 10:35 PM

#17 User is offline KingofHarts 

Posted 02 May 2013 - 11:53 PM

  • Posts: 1610
  • Joined: 07-August 10
  • Gender:Male
  • Project:Project Sonic 8x16
  • Wiki edits:1

View PostTiddles, on 02 May 2013 - 08:22 AM, said:

I was looking for that AIZ "bug" video the other day actually! Thanks for finding it again. I'm pretty sure what happens there requires hacking, or intervention from GG or PAR codes.


You guys have been pointing that out... and lemme tell you. You all have no idea how many hours I spent like a dumbass trying to get that "bug" to work... But yea, I had to take a minute to find it again.

View PostTiddles, on 02 May 2013 - 08:22 AM, said:

and on tutorialising anything I already have that falls into a bugfix category - there are just never enough hours in the day.


I can take care of that part. Matter of fact, I've started work on establishing an offline form of the SCHG for you all, for the benefit of those who cannot access the internet, or if... God forbid, Retro is down... I like to practice writing in my document before placing my wiki changes onto the actual website... I still have a ways to go, but it would contain the SCHG information for each of the 3 MD games, as well as an addendum for the How-To Guide. As I'm going through, I'm combing through for errors and the like... Each game is separated into its own document as well, so it is not too cluttered. I don't have any kind of immediate time frame for finishing this, though I may release an early version with the initial SCHG itself as soon as I can.

#18 User is offline KingofHarts 

Posted 09 May 2013 - 03:17 AM

  • Posts: 1610
  • Joined: 07-August 10
  • Gender:Male
  • Project:Project Sonic 8x16
  • Wiki edits:1
An update. I isolated the monitor code, and... seeing as how there is code for the object in Sonic's 1 and 2 to copy off of, this was fairly easy. So here you go, just copy the code in this asm, and paste it into yours. I've tested, and it builds and runs fine. Lemme know of any mistakes and the like.

It's not FULLY complete, but its labeled and all... so messing with Sonic 3's monitor code should be a little bit easier now.

#19 User is offline Tiddles 

Posted 09 May 2013 - 07:09 AM

  • Diamond Dust
  • Posts: 471
  • Joined: 25-December 09
  • Gender:Male
  • Location:Leicester, England
  • Project:Get in an accident and wake up in 1973
  • Wiki edits:31
TimpZ: sorry, somehow I missed your post about the slope glitch in the page change! I'm at work at the moment, but I've had a quick scan over the AIZ rocks and the ICZ blocks and the breaking code is quite different. I'll try to have a look in the near future to see if I can find an easy fix for the ICZ floating madness based on comparing them, or just looking at where the logic is falling over for the ICZ objects.

EDIT: Yeah, I think I see how to fix this. Will try tonight and let you know.
This post has been edited by Tiddles: 09 May 2013 - 07:42 AM

#20 User is offline Tiddles 

Posted 09 May 2013 - 02:10 PM

  • Diamond Dust
  • Posts: 471
  • Joined: 25-December 09
  • Gender:Male
  • Location:Leicester, England
  • Project:Get in an accident and wake up in 1973
  • Wiki edits:31
OK, this will fix it for the ICZ ice blocks.

Look for:

loc_8B3D2:
		bset	#2,$2A(a1)
		move.b	#$E,$1E(a1)
		move.b	#7,$1F(a1)
		move.b	#2,$20(a1)
		move.w	#-$300,$1A(a1)
		bset	#1,$2A(a1)
		bclr	#3,$2A(a1)
		move.b	#2,5(a1)
		btst	#4,$2A(a0)
		beq.s	loc_8B41A
		lea	(Player_2).w,a1
		bset	#1,$2A(a1)
		bclr	#3,$2A(a1)


Now add some stuff in the middle so it looks like this:

loc_8B3D2:
		bset	#2,$2A(a1)
		move.b	#$E,$1E(a1)
		move.b	#7,$1F(a1)
		move.b	#2,$20(a1)
		move.w	#-$300,$1A(a1)
		bset	#1,$2A(a1)
		bclr	#3,$2A(a1)
		move.b	#2,5(a1)

		btst	#3,$2A(a0)				; 
		beq.s	+					;
		lea	(Player_1).w,a1				;
		bset	#1,$2A(a1)				;
		bclr	#3,$2A(a1)				;
+								;

		btst	#4,$2A(a0)
		beq.s	loc_8B41A
		lea	(Player_2).w,a1
		bset	#1,$2A(a1)
		bclr	#3,$2A(a1)


I.e. add the section with the semicolon comment markers on the right. Adding comments is left as an exercise for the reader. (Because I'm lazy.)

But in essence: this whole section is run when the ice block is destroyed, and a1 will have been loaded by the previous section with a pointer to the object RAM of the player who destroyed it. It clears any status of that player standing on an object and bounces them up a bit, amongst other things. Then the bit at the bottom, under where I added the fix, goes "Hey, by the way, was player 2 also standing on this object? Let's drop him off it if so." But it never makes any explicit check for whether player 1 is standing on the object, and as such it never drops him if player 2 broke the block.

I suck at explaining this stuff, and that's one of many reasons you don't see any guides by me! But I hope that makes some sense and someone can translate it into something meaningful. If anyone wants to suggest some more objects where similar stuff occurs I can look into those too, but as ever, I make no promises as to when that may be.

You will probably also have to look a few lines up and change a beq.s locret_8B430 to a beq.w. Such is life.

#21 User is offline KingofHarts 

Posted 09 May 2013 - 10:05 PM

  • Posts: 1610
  • Joined: 07-August 10
  • Gender:Male
  • Project:Project Sonic 8x16
  • Wiki edits:1
I won't have much time over the next couple of days, but I will get to work on a page for this fix... I'll hold off on posting on the wiki until we can get all of the related fixes together though... Unfortunately you must be a Wiki Sysop to move pages stuff around on the wiki so if I slap something up prematurely and something else is brought up, I can't move the page... alas...

#22 User is offline KingofHarts 

Posted 11 June 2015 - 08:38 PM

  • Posts: 1610
  • Joined: 07-August 10
  • Gender:Male
  • Project:Project Sonic 8x16
  • Wiki edits:1
Been two years since I've last posted in this thread... WOW. I can't believe that. Anyway got something here. Another graphical oddity that I stumbled upon completely by accident... to the best of my knowledge, this bug's never been seen or reported before. Go to the first section of vines in AIZ 1... just before that is the Rhinobot, two sets of spikes and a ledge. Now, playing as Tails, go to this area and get hit by the spikes closest to the swinging vine. Then quickly get on the vine before Tails stops flickering.

My point to this post is that if you get hurt with Tails and grab onto an object while he is flickering, his Tails will completely disappear until you let go of said object. I don't know if this happens in Sonic 2 but it's worth looking into. I'll do so myself as well when I can get around to it.
This post has been edited by KingofHarts: 11 June 2015 - 08:39 PM

#23 User is offline Clownacy 

Posted 21 August 2015 - 07:21 AM

  • Posts: 718
  • Joined: 06-July 13
  • Gender:Not Telling
So, it seems Monitor_Give_SuperSonic is bugged: When Knuckles uses the monitor, he goes Super, but doesn't have the Super stars, and instead uses the Hyper after-image. Note that Sonic goes straight up Hyper instead of Super, so it's likely that it was intended for Knuckles to go Hyper upon using the S monitor.

The fix is simple: under loc_1DB02, set Super_Sonic_Knux_flag to '-1'. I've pushed a commit to the Git disassembly detailing this and its fix.

Edit, some ending-related code also suffers from this. The fix would go under loc_86524. Who knows, maybe Hyper (or Super) Knuckles was a last-minute addition.
This post has been edited by Clownacy: 17 November 2015 - 03:44 PM

#24 User is offline Clownacy 

Posted 16 November 2015 - 07:22 PM

  • Posts: 718
  • Joined: 06-July 13
  • Gender:Not Telling
S3K has that neat feature where the debug mode HUD is only active when you're in debug placement mode, though it does have a slight flaw: when returning to normal, the HUD reverts to normal, too, but the timer resets to 0:00 until the next second passes. Oddly enough, S3K added the ability for the timer to be drawn at its actual value mid-second, but doesn't use it here. Fixing this is as simple as inserting 'move.b #$80,(Update_HUD_timer).w' in between the other Update_HUD writes in loc_92C0C.

#25 User is offline KingofHarts 

Posted 17 November 2015 - 12:49 AM

  • Posts: 1610
  • Joined: 07-August 10
  • Gender:Male
  • Project:Project Sonic 8x16
  • Wiki edits:1
I'm glad you pointed this out, as I was looking to import the Sonic 3 HUD code to my hack... as well, implementing centiseconds. This would certainly help, I think.

#26 User is offline theyogwog 

Posted 23 January 2016 - 12:26 PM

  • Posts: 31
  • Joined: 17-November 12
  • Gender:Male
  • Project:S3K Analysis
Hey Sonic 3 hackers, I have a question about this game's level design, hoping maybe someone here could help. I'm wondering, on average how much would you say the shape of terrain has to do with unseen technical details compared to more obvious factors? How is the general layout of the foreground influenced by the constraints of the Genesis hardware and how does that affect other aspects of level design?

For example, the start of AIZ1: before the first Monkey Dude there's a small hill that slopes down into a curve; but why the hill? Of course it is an outdoor environment so it's naturally going to be rugged and maybe it has other purposes, too. But beyond that, isn't the main concern setting up for the rest of the pieces used to assemble the landscape, so that everything in the area can fit together properly?

I only ask because I'm just interested in getting to understand S3's level design better, figured you guys would know as much about it as anyone.

#27 User is offline Neo 

Posted 23 January 2016 - 01:33 PM

  • Clackerjack
  • Posts: 1366
  • Joined: 10-December 04
  • Gender:Male
  • Location:Portugal
  • Project:Sonic 3 Unlocked
  • Wiki edits:1
AIZ1 is a very meticulously-crafted stage when it comes to camera work. Right at the start, the bottom edge of the screen is locked up a little high, to frame in the Tornado, Super Sonic and the scrolling horizon line all on the screen without having them overlap one another. After that, the bottom boundary needs to be moved down a bit in order to frame in the tree with the first Monkey Dude, to avoid players getting hit by a coconut falling from the skies. Thus, the layout introduces a slope that forces Sonic up towards the center of the screen, so the camera doesn't awkwardly fall down a bit when the screen changes size.

Then there's some steps to raise Sonic up again, before lowering the camera for the swinging vine area and framing in the second Monkey Dude tree, and then a second set of steps before the loop to lower the frame all the way down to the lake. Then it sends you up to raise the camera higher for the hollow tree sequence, and finishes the sequence by locking the camera vertically, with a few downward steps to frame in Sonic a little lower than the horizon line where all the Fire Breath minibosses will fly by.

It doesn't stop there. After the miniboss encounter the starpost is up on a ledge to force Sonic up again, so the camera can drop down to reveal the rest of the stage unnoticed. Then, right before the actual miniboss fight, as either character, the layout forces you to jump up somewhere high to lock the camera vertically again, before having you descend into the boss area, via ledge drop as Knuckles or a slope as Sonic and Tails.

I could go on all day, but I need to go back to fixing bugs in S3C. :) Suffice to say, most other levels didn't get nearly as much attention save for the boss areas, but MHZ in general is also pretty sharp. Must have to do with being the first stage in each game and the need to give off a good first impression.
This post has been edited by Neo: 23 January 2016 - 01:36 PM

#28 User is offline Natsumi 

Posted 21 April 2016 - 06:01 PM

  • Miss Fox
  • Posts: 168
  • Joined: 08-February 12
  • Gender:Female
  • Location:Otter's lap
  • Project:Being with my boyfriend
I don't see any topic like this made before. Its time we have one, eh?!

So, I've come accross this bug, which exists in both Sonic 3 and Sonic & Knuckles. This happens when you carry Super/Hyper Sonic, and drop him on a solid object with horizontal speed. There is glitchyness without super/hyper and with dropping him on ground too, but the effects of solid object are more noticeable:
Posted Image


Well, turns out, herpdiderp, they forgot to clear Sonic's animation. This code which we will add goes to $14466 in Sonic & Knuckles ROM (according to my disassembly anyway). This is loc_14466 in S3K Hayate and latest version of S3K Git as of this post. The code we will add is as follows:
GIT:	
		sf	anim(a1)      	; clear animation number (set to 0)
Older:
		sf	$20(a1)		; clear animation number (set to 0)


All this will do, is clear the animation number, so the next frame Sonic's last animation will be invalidated and he will begin walking or running

#29 User is offline Clownacy 

Posted 21 April 2016 - 06:57 PM

  • Posts: 718
  • Joined: 06-July 13
  • Gender:Not Telling
https://forums.sonic...showtopic=30778

#30 User is offline Clownacy 

Posted 05 June 2017 - 07:14 PM

  • Posts: 718
  • Joined: 06-July 13
  • Gender:Not Telling
And here I thought S2 was the only one to carelessly use an uninitialised register.

I was testing Sonic 3 Complete with a build of Genesis Plus GX with the error printing enabled, and noticed a warning appear at the start of HCZ when playing as Knuckles. Apparently, something was writing to an abnormal address, $2A7500. I switched to a vanilla S3K ROM, and confirmed that it happened there, too.

Luckily, the debug print gave me a PC address, so finding the cause was easy:

loc_6834:
		cmpi.w	#$100,(Current_zone_and_act).w
		bne.s	loc_6886
		move.b	#$1B,$20(a1)
		cmpi.w	#3,(Player_mode).w
		bne.s	loc_685C
		move.w	#$2121,$20(a1)
		move.b	#1,$23(a1)
		move.b	#0,$24(a0)

loc_685C:


Note that last instruction: it uses a0 instead of a1. Surprise, a0 is never initialised, hence why it writes to such a strange address.

  • 3 Pages +
  • 1
  • 2
  • 3
    Locked
    Locked Forum

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