If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!
This article has a talk page!

Proto:Sonic the Hedgehog 2 (Genesis)/Nick Arcade Prototype

From The Cutting Room Floor
Jump to navigation Jump to search
This page contains changes which are not marked for translation.
Other languages:
English • ‎polski • ‎русский

This is a sub-page of Proto:Sonic the Hedgehog 2 (Genesis).

Hmmm...
To do:
  • There's a lot of leftovers left to cover: level maps, a few things from here, and Sonic 1 leftovers (latter should just be a list as there's a lot of them). Start here due to editing the Sonic 1 game during development.

Hiddenpalace.org logo.png  This prototype is documented on Hidden Palace.

Download.png Download Sonic the Hedgehog 2 (Nick Arcade Prototype)
File: Sonic The Hedgehog 2 (Nick Arcade Prototype).bin (1 MB) (info)


Sonic2nickarcadetitle.PNG

The Nick Arcade prototype of Sonic the Hedgehog 2 is a very early build with many visible remnants from Sonic 1, such as level names and music. It is very incomplete, with missing enemies and levels plus graphical glitches everywhere. However, the basic layouts for a few levels have been completed, and Tails has been implemented.

The prototype was dumped by drx and released to the public on November 7, 2006. The rom itself was built sometime in late May, based on development documents released by Tom Payne. It was given its name due to its similarity to a version of Sonic 2 that was showcased on the last four episodes (81-84) of the game show Nick Arcade, as this build appears to be very close to (if not exactly the same as) the build used on the show; two of the episodes can be seen here and here, and all four can be viewed on Paramount+ in the United States.

As an additional note, this is the only known Genesis cartridge to use a holographic label. According to a tweet from ex-Sega of America staffer Al Nilsen, the idea was scrapped as it would make production costs for the cartridge itself very high.

Sub-Pages

Zone Differences

HPZiconS2.png
Zones
Hidden Palace, Emerald Hill...Green Hill?!

Leftover Content

Sonic2SonicIdle1.png
Leftovers
Oh boy, there's a lot here.
Blank.png
Symbol Tables
How big are they?!

General Differences

An example of how screwy two-player mode is.
  • At this point in development, Tails is quasi-independent: Player 2 is able to control Tails, except he will also follow Sonic. Further, Tails cannot complete a level on his own, since the game only loads the signpost when Sonic approaches it. If Tails gets hurt, he can lose rings for Sonic. The AI is also much simpler: Tails copies Sonic's moves and makes no attempt to keep up with him.
  • 2-Player mode is even less complete, due to all sorts of odd glitches and not being enabled for every Zone.
  • Invincibility doesn't show the star effect, though the music is still played. The music and invulnerability last until the end of the Act.
  • There is a mechanic where Sonic rebounds off walls if he runs into them at high speeds, using sprites that became unused by the Simon Wai prototype. The sprite of him getting up would later be polished and reused for when Sonic leaves his "lying on ground" idle animation.
I get knocked down, but I get up again...
  • The spin dash is a work-in-progress, as Sonic and Tails can only charge it once. Further, the sound for when Sonic spins in Sonic 1 is heard as there is not yet a specific sound effect for the spin dash.
  • The spike damage behavior works the same way it does in Sonic 1.
  • The ground speed cap from Sonic 1 is still present.
  • The explosion sprites are the ones in Sonic 1.
  • Debug mode follows the logic of Sonic 1.
    • Sonic's speed and velocity don't reset when exiting debug.
    • When Sonic is hit without rings, he'll only be knocked back; The only way for him to lose a life is by drowning/falling into a bottomless pit.
      • Sonic cannot enter debug while he is being knocked back.
    • Sonic cannot enter debug when he is in his death animation.
    • Entering and exiting debug while submerged will not reset Sonic's underwater timer.
    • Sonic retains his land speed if entering debug from water, and exiting to land.
    • If Sonic has passed a signpost, entering and exiting debug will not allow the player to regain the ability to control him.
    • Spawned monitors can only be broken once per life/Act.
  • Locking on this prototype with Sonic & Knuckles will unlock the full Blue Sphere game.
  • The timer resets to 9:00 before hitting 9:59, allowing the player to test stages for extended periods.
  • If Sonic and Tails are both hit at the same time while carrying at least one ring, an overabundance of rings will pop out regardless of how many they actually possess.
  • The screen doesn't scroll up or down when you look up or down for a certain period of time.
  • The down-pointing spring has some weird behavior that appears to have been disabled starting with the September 14th build: If Sonic hits such a spring and uses his death sprite for it, he will roll into a ball once he reaches the ground, and can shoot far from a quarter-pipe, stick to flat ground surfaces, and even clip below the floor into his death.
Elementary, my dear Cactus.
This needs some investigation.
Discuss ideas and findings on the talk page.

Title Screen

The title screen is different, with a particularly well-known design: not only does it appear in the Simon Wai build, it also appears in the final game's instruction manual, as well as the Master System and Game Gear versions. The version seen in the manual is the same as the second picture above.

Nick Arcade to August 21, 1992 September 14, 1992 to Beta 4 Beta 5 onward
Get out of my way, Tails! Now with options! In case we weren't clear enough, there is now a badge next to the item you are selecting.
Hmmm...
To do:
Word this better.

The title screen uses the background for Emerald Hill Zone instead of the custom background used in Beta 5 onward. The background seems to use a slightly different palette than what's used in the actual level. (Notice the clouds and water, which are slightly darker than in the actual level.) It's possible that the palette used here is an earlier version of the palette.

Title Screen Level
S2 NickArcade TitleBG.png S2 NickArcade LevelBG.png

Cheat Codes

  • Level Select - Up, Down, Down, Down, Down, Up, A + Start.
  • 2-Player Mode - On the Level Select, press B + Start on any level.
  • Debug Mode - C, C, Up, Down, Down, Down, Down, Up, A + Start. Debug can also be enabled with Pro Action Replay code FFFFFA:0001. As with Sonic 1, C merely needs to be pressed twice before the final input of Up.
  • Debug Mode and Level Select - Up, Down, Down, Down, Down, Up, UDLR, Up, Down, Down, Down, Down, C, C, Up, A + Start. "UDLR" simply means to press any direction on the D-Pad to reset the cheat detection code. Unlike the final, where both Debug Mode and All Emeralds can be enabled by playing 19921124126 on the Level Select screen, the last Up of the Level Select code cannot "overlap" with the first Up of the Debug Mode code.

Attract Mode

The game cycles through four demos: Chemical Plant, Emerald Hill (2P), Hidden Palace, and Hill Top. This would be the last time that new demos were recorded for the game before the final build; all other prototypes use the inputs from this build.

Demo 1 Demo 2
Demo 3 Demo 4

Changed Graphics

Sonic & Tails

Sonic 1 Nick Arcade/Simon Wai August 21 onward
Sonic2SonicIdle1.png Sonic2SonicIdleEarly.png Sonic2SonicIdleFinal.png

Sonic's sprite in the Nick Arcade and Simon Wai builds is much closer to his design in Sonic 1. His idle frame is identical except for shorter shoes and an added shine on the side of his head. The August 21 build changes the shape of Sonic's eyes and adds some shading to the top of the eye.

Nick Arcade/Simon Wai August 21 onward
Sonic2SonicEyesClosedEarly.png Sonic2SonicEyesClosedFinal.png

Sonic's blinking frame in the earlier prototypes is a bit strange. It looks less like his eyes are closed and more like his pupils are all all the way at the bottom of his eyes. The final game thankfully adds flesh-colored eyelids to the sprite.

Nick Arcade/Simon Wai August 21 onward
Sonic2SonicLookUpEarly.png Sonic2SonicCrouchEarly.png Sonic2SonicLookUpFinal.png Sonic2SonicCrouchFinal.png

Sonic's eye design wasn't updated in all frames: In his looking up and crouching down animations, they just added shading to the top of the eye without actually changing its shape.

Nick Arcade/Simon Wai August 21 onward
Sonic2SonicWalkEarly.gif Sonic2SonicWalkFinal.gif

Sonic's walking animation has 12 frames of animation in earlier versions compared to the 8 frames seen in the final sprite. The minimum animation speed is also double what it is in the final game, and shows much more of the American "mohawk" design.

Nick Arcade/Simon Wai August 21 onward
Sonic2SonicRunEarly.gif Sonic2SonicRunFinal.gif

One of the easiest to see changes: In the Nick Arcade and Simon Wai builds, when Sonic runs, his shoes and legs go into a cartoony blur. This was toned back in the final version to as it was in Sonic 1, just affecting his sneakers. Oddly, these early sprites were used in a teaser for Sonic 4 - Episode I. This kind of sprite was later reused in Sonic Mania whenever he or Knuckles are going full speed.

Nick Arcade/Simon Wai August 21 onward
Sonic2SonicSkiddingEarly.gif Sonic2SonicSkiddingFinal.gif

Sonic's skidding animation is very different here. It starts out with a new, unique beginning before reusing a few frames from Sonic 1, then turns around and starts pushing in the other direction. The final two frames will loop until Sonic either stops completely or does a different action. The beginning of the animation was later reused in Sonic Mania.

Sonic 1 Nick Arcade/Simon Wai August 21 onward
Sonic2SonicPush1.gif Sonic2SonicPushEarly.gif Sonic2SonicPushFinal.gif

In the original game, Sonic's body moves but his hands didn't. In the early prototypes, his hands move but his body stays level. The final sprite splits the difference and moves the body and hands in different frames. Oddly, there is orange coloring on his shoes, because the sprites were based off of Sonic 1's sprites plus a minor coloring oversight. This orange shade would be the darkest shade of red if given the first game's main palette.

Sonic 1 Nick Arcade/Simon Wai August 21 onward
Sonic2SonicBalance1.gif Sonic2SonicBalanceEarly.gif Sonic2SonicBalanceFinal.gif

The balancing animation is just a faster version of the Sonic 1 animation with added head shine and an orange mouth, due to sprites being based off of Sonic 1's sprites plus, just like the pushing animation, an oversight in the sprite's coloring. The final game adds four new balancing animations based on how far Sonic is from the edge and whether or not he's facing the edge.

Nick Arcade/Simon Wai August 21 onward
Sonic2TailsSpinEarly.gif Sonic2TailsSpinFinal.gif

The only difference in Tails' graphics is an added shine to his spinning sprite.

Badniks

Nick Arcade/Simon Wai August 21st onward
What you looking at? Staring into your soul...

Buzzer's sprite was touched up a bit between the Simon Wai and August 21st builds: Its head was redesigned to be less ant-like, more detail was added to the abdomen, and the jets were straightened out.

Nick Arcade to August 21st September 14th Prototype CENSOR onward
Sonic2CrawlEarly.gif
Sonic2CrawlPreBeta.gif
Sonic2CrawlFinal.gif

Crawl's early sprite (0xA9580 in the ROM) is very different from its final design, lacking any kind of walking animation and only able to put its shield up in one direction.

Other Sprites

Nick Arcade CENSOR onward
Isn't Tails adorable? Now with 200% less symmetry!

All three signposts were originally symmetrical. Only Robotnik's remained that way.

Nick Arcade Simon Wai onward
Sonic2BreakableBlockN.PNG Sonic2BreakableBlockW.png

At 0xA3C16 is a sprite of what looks like the breakable blocks from Sonic 1. It's so generic that it could have been for any stage, but it's most similar to the Hill Top bricks. These were unused from Sonic 1.

Nick Arcade Simon Wai onward
Sonic2FireballNick.png Sonic2FireballFinal.png

At 0xA4368 is a graphic for a fireball. The Hill Top boss in the final game can shoot out fireballs, but those fireballs grow and shrink in size and have three frames of animation. The older sprite would probably be animated like the fireballs in Sonic 1's Marble Zone: Sonic2NickFireball.gif

(Source: Sonic Retro, TCRF original research)

Unused Graphics

Sonic

Graphic Frame ID Description
Sonic2proto LookingAtYou.png Sonic2TurnAnim.gif 0A-0B Unused sprites of Sonic turning. The developers might have intended to have Sonic turn when changing direction instead of instantly facing the other way, or possibly a winning pose similar to Sonic's goal sign in this build.
Sonic2SonicRunFaster.gif 40-43
4C-4F
58-5B
64-67
Sprites for Sonic moving even faster than normal.
Sonic2SonicRunFastest.gif 44-47
50-53
5C-5F
68-6B
More sprites for Sonic presumably hitting max speed. Look at him just sticking his head out there. Tails does have a full-speed animation, though the only change is his two tails using only two sprites.
Sonic2Beta SonicPull.gif
7B-7D An unused animation of Sonic pulling, or possibly carrying, something. Puzzle elements involving pulling or carrying things may have been planned for.
Sonic2SonicBalanceAlt.gif
8B-8C An unused animation of Sonic balancing on a ledge. This was probably meant to be used when the player was just a few pixels from falling. It looks similar to the on-the-edge balancing animation seen in Sonic the Hedgehog 3.
Sonic2BetaUnusedRotatedRun.png
While Sonic's 45° run sprites don't have his spikes changing, tiles do exist for it in the ROM. This is not applied to any sprite.

Other

Graphic Offset Compression Description
Sonic2pre hpzbg.png
0x27098 None A background element depicting a cavern obscured by stalagmites (and stalactites), not a weird purple blob. Used in an early version of the Hidden Palace background seen in a mockup screenshot, but not in any real (known) prototype. Source code labels refer to it as efect08bcg, suggesting this was an animated tile at some point, as well as suggesting there was more in a previous build.
Sonic2NickChemAnim.gif Sonic2NickChemBelt.gif 0x27798 None Animated tiles that aren't loaded in any zone, but seem to match the Chemical Plant level palette pretty well. Source code leftover from an earlier build of Sonic 2 suggests that these were meant to be loaded in VRAM in Chemical Plant Act 3 for the boss. The Chemical Plant boss was referred to as "vacume" in the leftover source code and was removed for some reason, with all its unique code being deleted from this build.
Sonic2NickPropeller.gif Sonic2NickLiquid.gif 0x27DD8 None More animated tiles using the Chemical Plant palette. There aren't any foreground tile-based propellers or water in the final game.
Sonic2BurningCinders.gif
0xA44A0 Nemesis What looks like a burning piece of something or other. Early concept art shows a Buzzer-like Bee enemy that could destroy bridges by burning them with fireballs - this could be a remnant of that idea.
Sonic2HTZGate.png
0xA4BCE Nemesis This is the Hill Top one-way gate. It's identical to the one in the final game, it just hasn't been coded yet.
S2-HPZ Unused platform.png
0xA5826 Nemesis Graphics for a Hidden Palace object, possibly a floating platform. It's not clear how they would be assembled. A similar object is seen in the 2013 rerelease as an aquatic platform. Source code labels refer to the graphic as cork08cg.
Sonic2EarlySmoke.gif
0xA59C0 Nemesis A dissipating cloud. Source code labels refer to the graphic as kemuri0dcg, suggesting it's for Chemical Plant Zone.
Sonic2GraySwitch.png
0xA5D9E Nemesis The standard Sonic 2 switch has already been drawn and digitized by this point, it just hasn't been coded yet.
Sonic2BouncingBall.gif
0xA8CA0 Nemesis A spinning metal ball. This was seen in some early concept art - it would act as an obstacle by continuously bouncing around the floor in a high arc. Interestingly code is implemented for this object in the Alpha build. It would bounce in a random direction harming the player if touched, it would change its direction after touching a wall. This can be found in the 2013 rerelease via Debug Mode, though it uses a different palette and explodes once floating above the player's head.
Sonic2BubblerMother.gif Sonic2BubblerMotherProj.gif 0xA8F36 Nemesis An unfinished badnik named Bubbler's Mother. It would fly around the stage dropping particles on the floor that would turn into Bubblers. These also appear in the 2013 version via Debug Mode. In the August 21st build, code exists for Bubbler's Mother, which flies horizontally dropping sparkles that spawn object $55. According to concept art it was intended for "Chemical Factory Zone", which eventually became Chemical Plant Zone.
Sonic2Bubbler.gif
0xA9162 Nemesis The Bubbler dropped by Bubbler's Mother. It would stick to the floor for a bit before exploding into three bubbles. In the August 21st build, unfinished code exists for Bubbler, which is meant to occupy $55. According to concept art it was intended for "Chemical Factory Zone", which eventually became Chemical Plant Zone.
Sonic2CrawlEarlyDebris.png
0xA9580 Nemesis In Crawl's sprites is what appears to be rocks or clumps of sand. Crawl was originally intended to pop out of the ground with the sand/rocks appearing under it. The idea was likely scrapped after Crawl was repurposed for Casino Night Zone. Interestingly the sprite is used in the August 21st build if Crawl's art is restored. The sand/rocks was also seen in the design sketch for Crawl.
Used Intended
Sonic2BBatPalette1.png Sonic2BBatPalette0.png

The BBat badnik uses palette 01, but it looks a bit odd. If it's set to use palette 00 (Sonic and Tails' palette), the ear and flame colors look a lot better. This wasn't fixed in any build of the game before its art and coding were removed from the ROM entirely.

(Source: Sonic Retro, Yawackhary, TCRF original research)

Unused Objects

Object ID Graphic Name Description
4A Sonic2Octus.pngSonic2NAOctusFloating.gifSonic2NAOctusFiring.png Oct (Octus) This badnik appears in Oil Ocean Zone in the final game, though its behavior is slightly different here:
  • In this and the Simon Wai build, it lifts 32 pixels off the ground, fires a single shot at Sonic, then quickly flies to the left or right until it despawns.
  • In all other versions, it will not fly away after firing the bullet, but simply land on the ground and repeat the process.
4D Sonic2StegoWalk.gif Sonic2StegoRun.gif Stego (Stegway) A triceratops-type badnik that appeared in a mockup screenshot of Hidden Palace Zone. It slowly moves back and forth, and when Sonic approaches it, it activates its thrusters and charges at Sonic like the snail badnik. It is placeable in Hidden Palace through Debug Mode, but its graphics are garbled without using PAR code 01C1D8:0007.
4E
Sonic2Gator.gif
Gator A crocodile-type badnik, first seen in a mockup screenshot for Sand Shower Zone, though it's unclear whether this enemy was intended to appear there. It slowly moves back and forth, opening its jaws if it's facing Sonic and is within 64 pixels of him. It is placeable with debug in Hidden Palace Zone, but its graphics are garbled without using a PAR code.
50, 51 Sonic2Aquis.pngSonic2AquisAltBody.gif Seahorse (Aquis)
Hmmm...
To do:
Get footage of their behaviors.
The seahorse badnik from Oil Ocean Zone has two distinct variants, neither of which match how it behaves in the final game.

Object 50 (Seahorse):

  • Moves in a simple path, left to right and back again. The movement range is 16×(lower four bytes of subtype) pixels wide.
  • After 256×(upper four bytes of subtype) frames worth of time has passed, "shooting mode" is toggled. If Sonic approaches the badnik when it's in shooting mode and Sonic is in line of sight, it will fire a single shot, then jump down to Y coordinate 0398. This value seems to be hardcoded.
  • If its initial Y coordinate is greater than 0398, it will slowly move up to 0398. Then, when it fires a shot, it will quickly descend back to its initial Y coordinate.
  • If the upper four bytes of the subtype are 00, the timer is set to FFFF, effectively preventing it from shooting.
  • Note the word "toggled". It's possible for the badnik to go out of shooting mode if enough time has passed.

Object 51 (Skyhorse):

  • Moves like the first Aquis in a set path, but will also track Sonic's Y position up to its original spawn height.
  • A timer counts down for every frame Sonic is in this badnik's line of sight. This is initially set at 180 frames. Once the timer reaches zero, it fires a single shot at Sonic. There's an additional 36 frame delay before the shot timer starts again.
  • Unlike the final game, there's no limit to the amount of bullets this enemy can fire.
  • An alternate body graphic uses a rocket instead of a fin. The graphics for this body were removed from its tileset starting in the August 21 prototype, though the mappings would not be updated until the September 14 prototype.
Skyhorse Seahorse (Aquis)
52 Sonic2NickBFish.gif Sonic2NickBFishJump.gif Billfish A piranha-type badnik. It will move 32×(lower four bytes of subtype) pixels to the right before leaping, then jump in a high arc. Exactly how it works depends on its initial and current Y positions:
  • If its initial Y position is less than or equal to 0380 (like Aquis, this seems to be hardcoded), it will jump up, then continue falling until it reaches Y coordinate 0380. It will then make jumps from that Y position until it despawns.
  • If its initial Y position is greater than 0380, it will animate more slowly and jump up in a lower arc than usual. Once it reaches its initial Y coordinate, it jumps again.

It is placeable with debug in Hidden Palace Zone, but its graphics are garbled without using a PAR code.

79 Sonic2LamppostEarly.png Sonic2 NickArcade lamppost.gif Save (Lamppost) This is the Sonic 1 lamppost with a very different design than the one seen in the final version of Sonic 2. It is placeable with Debug Mode in Emerald Hill Zone and Hill Top Zone. They appear in Green Hill Zone, but the graphics are garbled.

Unused Subtypes

Object ID Graphic Name Description
Monitors
00
Sonic2MonitorStatic.gif
Static monitor Does nothing when broken. In the final game (where it's also unused), this damages the player.
03
Sonic2MonitorEggman.png
Eggman monitor Also does nothing in the proto and damages the player in the final, but this one is used in the final's 2-Player mode.
08
Sonic2MonitorQuestion.png
Mystery monitor Does nothing when broken...in this build. In the Simon Wai prototype, it activates Super Sonic's palette, with the rest of the attributes later being activated in the August 21st and Pre-Beta prototypes, before being replaced with the Teleport monitor in later builds.
09
Sonic2MonitorSpring.png
Spring monitor Only present in this prototype and the Simon Wai build, but it does nothing when broken. Two guesses on how this would have worked:
  • Like the Pogo Spring monitor in the much later Sonic the Hedgehog Triple Trouble, where it places Sonic/Tails on a pogo spring that bounces up and down until they take damage.
  • Boosted the player's jump height. This would help explain Super Sonic's powers: He's invincible (matching the powerup from the Invincibility monitor) and has increased speed (like the Speed Shoes monitor), but there's no monitor equivalent to his increased jump height.
Others
N/A N/A Chemical Plant Zone Platforms The code in this version seems to be reused from object 52 in Sonic 1, which was used for the moving blocks in Marble, Labyrinth, and Scrap Brain Zones. Subtypes 02-03 (Marble Zone block that moves right when stepped on, then drops when it hits a solid tile), 04-07 (hidden block in Labyrinth Zone Act 1 activated by switch that leads to the quicker route), and 09-0A (sliding platforms in Scrap Brain Zone) are all unused in this build.
00 Boss Chemical Plant Zone boss. The code was completely removed and the pointers to it are set to 0. Leftover symbol data call the subobjects "bossvac" and "vacumeguy". Its graphics do remain in the ROM, alongside leftover entries for loading them. However, the code was rediscovered in the August prototype, and can be ported over to the Nick Arcade prototype. With just some small object ID and pointer fixes and restoration of those graphics load entries, it'll work just about right out of the box, as shown in the above video.

The behavior is different to the final, generally having slower movement.

Code Oddities

  • Somehow, a compression from Kid Chameleon made it into the code, and is even used for Green Hill's chunks!
    • The way the game decides the above is strange: When loading a level, the game checks if the Zone ID is specifically 02, 03, 04, or 05, and if not, it uses the Kid Chameleon decompression. Since Labyrinth Zone (ID 01) uses Chemical Plant's data, this does not match up, resulting in loading improper chunks.
  • The routine to load animated stage tiles lists stages past all the way up to $0F, even though there are only $06 stages (including Sonic 1's ending); this seems the suggest the developers were already shifting the stage IDs around, which is further supported by the fact that Hidden Palace is listed as $08, which is its slot from the Simon Wai build onwards.

Object List/Source Code

A humongous object list can be found inside the ROM, along with some raw source code.

	addsym
	nolist
	include	"equ.lib"
	include	"macro.lib"
	list

	xref	colichgpat
	xref	ringpat,itempat,butapat,kanipat,hachipat,togepat
	xref	fishpat,fish2pat,mogurapat,shimapat2,jyamapat
	xref	musipat,sjumppat,kamerepat,arumapat,kagebpat,ballpat
	xref	firepat,fblockpat,signalpat,bobinpat,yoganpat,yogan2pat
	xref	usapat,yadopat,boxpat,bryukapat,daipat,break2pat,yogancpat
	xref	batpat,z5daipat,dai2pat,switch2pat,z4daipat
	xref	elevpat,pedalpat,steppat,funpat,sisoopat,hassyapat
	xref	brobopat,unipat,yaripat,udaipat,dai3pat,kazaripat,kassyapat
	xref	awapat,mizupat,boupat,benpat,fetamapat,mawarupat,hagurumapat
	xref	patapat,yukafpat,nokopat,dai4pat,doorpat,yukaepat,fire6pat
	xref	elepat,yukaipat,scolipat,imopat,savepat,bigringpat,btenpat
	xref	actionsub,actwkchk,frameout,playpat,dualmodesub
	xref	flicpat,usagipat,pengpat,azarpat,fbutapat,niwapat,risupat

	xref	kaitenpat,prodaipat,buranko0dpat
	xref	frntlitpat,gempat,wfallpat,pltfrmpat
	xref	takipat,banepat,dai00pat

	xref	redzpat,bfishpat,seahorsepat,horsepat
	xref	stegopat,wasppat,gatorpat,bbatpat,octpat,wfish2pat,snailpat

	xdef	edit

;------------------------------------------------------------------------------
edit:
	moveq	#0,d0
	move.b	editmode,d0
	move.w	edit_move_tbl(pc,d0.w),d1
	jmp	edit_move_tbl(pc,d1.w)
edit_move_tbl:
	dc.w	editinit-edit_move_tbl
	dc.w	editmove-edit_move_tbl
editinit:
	addq.b	#word,editmode
	move.w	scralim_up,editstack
	move.w	scralim_n_down,editstack2
	move.w	#$0000,scralim_up
	move.w	#$0720,scralim_n_down
	andi.w	#$07ff,playerwk+yposi
	andi.w	#$07ff,scra_v_posit
	andi.w	#$03ff,scrb_v_posit
	move.b	#0,patno(a0)
	move.b	#0,mstno(a0)
	cmpi.b	#spgamemd,gmmode
	bne.b	.jump0
*	move.b	#7-1,stageno
*	move.w	#$000,rotspd
*	move.w	#$000,rotdir
	moveq	#7-1,d0
	bra.b	.jump1
.jump0:
	moveq	#0,d0
	move.b	stageno,d0
.jump1:
	lea	edittbl,a2
	add.w	d0,d0
	adda.w	(a2,d0.w),a2
	move.w	(a2)+,d6
	cmp.b	editno,d6
	bhi.b	.jump
	move.b	#0,editno
.jump:
	bsr.w	editpatchg
	move.b	#12,edittimer
	move.b	#1,edittimer+1
editmove:
	moveq	#7-1,d0
	cmpi.b	#spgamemd,gmmode
	beq.b	.jump
	moveq	#0,d0
	move.b	stageno,d0
.jump:
	lea	edittbl,a2
	add.w	d0,d0
	adda.w	(a2,d0.w),a2
	move.w	(a2)+,d6
	bsr.w	editwalk
*	bsr.w	dirsprset
	jmp	actionsub
editwalk:
	moveq	#0,d4
	move.w	#1,d1
	move.b	swdata1+1,d4
	andi.w	#$0f,d4
	bne.b	.jump0
	move.b	swdata1,d0
	andi.w	#$0f,d0
	bne.b	.jump
	move.b	#12,edittimer
	move.b	#$0f,edittimer+1
	bra.w	.lend
.jump:
	subq.b	#1,edittimer
	bne.b	.jump1
	move.b	#1,edittimer
	addq.b	#1,edittimer+1
*	cmpi.b	#255,edittimer+1
	bne.b	.jump0
	move.b	#255,edittimer+1
.jump0:
	move.b	swdata1,d4
.jump1:
	moveq	#0,d1
	move.b	edittimer+1,d1
	addq.w	#1,d1
	swap	d1
	asr.l	#4,d1
	move.l	yposi(a0),d2
	move.l	xposi(a0),d3
	btst.l	#0,d4			*swdata+0
	beq.b	.jump2
	sub.l	d1,d2			*yposi
	bcc.b	.jump2
	moveq	#0,d2
.jump2:
	btst.l	#1,d4			*swdata+0
	beq.b	.jump3
	add.l	d1,d2			*yposi
	cmpi.l	#$7ff0000,d2
	bcs.b	.jump3
	move.l	#$7ff0000,d2
.jump3:
	btst.l	#2,d4			*swdata+0
	beq.b	.jump4
	sub.l	d1,d3			*xposi
	bcc.b	.jump4
	moveq	#0,d3
.jump4:
	btst.l	#3,d4			*swdata+0
	beq.b	.jump5
	add.l	d1,d3			*xposi
.jump5:
	move.l	d2,yposi(a0)
	move.l	d3,xposi(a0)
.lend:
	btst.b	#6,swdata1+0
	beq.b	.jump7
	btst.b	#5,swdata1+1		* c button check
	beq.b	.jump77
	subq.b	#1,editno
	bcc.b	.jump6
	add.b	d6,editno
	bra.b	.jump6
.jump77:
	btst.b	#6,swdata1+1
	beq.b	.jump7
	addq.b	#1,editno
	cmp.b	editno,d6
	bhi.b	.jump6
	move.b	#0,editno
.jump6:
	bra.w	editpatchg
.jump7:
	btst.b	#5,swdata1+1		* c button check
	beq.b	.jump8
	jsr	actwkchk
	bne.b	.worknai		;z=0:ok	z=1:no
	move.w	xposi(a0),xposi(a1)
	move.w	yposi(a0),yposi(a1)
	move.b	patbase(a0),actno(a1)
	move.b	actflg(a0),actflg(a1)
	move.b	actflg(a0),cddat(a1)
	andi.b	#$7f,cddat(a1)
	moveq	#0,d0
	move.b	editno,d0
	lsl.w	#3,d0
	move.b	4(a2,d0.w),userflag(a1)
	rts
.worknai:
.jump8:
	btst.b	#4,swdata1+1		* b button check
	beq.b	.jump9
	moveq	#0,d0
	move.w	d0,editmode
	move.l	#playpat,playerwk+patbase
	move.w	#$0780,playerwk+sproffset
	tst.w	dualmode		; dual mode check
	beq.b	.end
	move.w	#$0780/2,playerwk+sproffset
.end:
	move.b	d0,playerwk+mstno
	move.w	d0,xposi+2(a0)
	move.w	d0,yposi+2(a0)
	move.w	editstack,scralim_up
	move.w	editstack2,scralim_n_down
	cmpi.b	#spgamemd,gmmode
	bne.b	.jump9
*	clr.w	rotdir
*	move.w	#$040,rotspd
*	move.l	#playpat,playerwk+patbase
*	move.w	#$0780,playerwk+sproffset
	move.b	#02,playerwk+mstno
	bset.b	#cd_ball,playerwk+cddat
	bset.b	#cd_jump,playerwk+cddat
.jump9:
	rts
editpatchg:
	moveq	#0,d0
	move.b	editno,d0
	lsl.w	#3,d0
	move.l	0(a2,d0.w),patbase(a0)
	move.w	6(a2,d0.w),sproffset(a0)
	move.b	5(a2,d0.w),patno(a0)
*	move.b	4(a2,d0.w),userflag(a0)
	bsr.w	dualmodesub
	rts

dcblw	macro	\1,\2,\3,\4,\5
	dc.l	(\1)*$1000000+(\2)
	dc.w	(\4)+(\5)*$100
	dc.w	(\3)
	endm

edittbl:
	dc.w	edit1tbl-edittbl
	dc.w	edit2tbl-edittbl
	dc.w	edit3tbl-edittbl
	dc.w	edit4tbl-edittbl
	dc.w	edit5tbl-edittbl
	dc.w	edit6tbl-edittbl
	dc.w	edit7tbl-edittbl
edit1tbl:
	dc.w	14
	dcblw	ring_act,ringpat,$26bc,0,$00		;1:
	dcblw	item_act,itempat,$0680,0,$00		;2:
	dcblw	kani_act,kanipat,$0400,0,$00		;3:
	dcblw	hachi_act,hachipat,$0444,0,$00		;4:
	dcblw	fish_act,fishpat,$0470,0,$00		;5:
	dcblw	toge_act,togepat,$04a0,0,$00		;6:
	dcblw	shima_act,shimapat2,$4000,0,$00		;7:
	dcblw	jyama_act,jyamapat,$66c0,0,$00		;8:
	dcblw	musi_act,musipat,$04e0,0,$00		;9:
	dcblw	sjump_act,sjumppat,$04a8,0,$00		;10:
	dcblw	kamere_act,kamerepat,$249b,0,$00	;11:
	dcblw	kageb_act,kagebpat,$434c,0,$00		;12:
	dcblw	save_act,savepat,$26bc,0,$01		;13:
	dcblw	colichg_act,colichgpat,$26bc,0,$00	;14:

edit2tbl:
edit3tbl:
;zone0d
	dc.w	07
	dcblw	ring_act,ringpat,$26bc,0,$00		;01:
	dcblw	item_act,itempat,$0680,0,$00		;02:
	dcblw	sjump_act,sjumppat,$04a8,0,$00		;03:
	dcblw	colichg_act,colichgpat,$07bc,0,$00	;04:
	dcblw	kaiten_act,kaitenpat,$e000,0,$00	;05:
	dcblw	prodai_act,prodaipat,$e418,0,$00	;06:
	dcblw	buranko_act,buranko0dpat,$2418,0,$08	;07:

edit4tbl:
;zone00
	dc.w	18
	dcblw	ring_act,ringpat,$26bc,0,$00		;1:
	dcblw	item_act,itempat,$0680,0,$00		;2:
	dcblw	save_act,savepat,$047c,0,$01		;3:

	dcblw	colichg_act,colichgpat,$26bc,0,$00	;6:
	dcblw	taki_act,takipat,$23ae,0,$00		;7:
	dcblw	taki_act,takipat,$23ae,3,$02		;7:
	dcblw	shima_act,dai00pat,$4000,0,$01		;8:
	dcblw	shima_act,dai00pat,$4000,1,$0a		;8:
	dcblw	toge_act,togepat,$2434,0,$00		;10:
	dcblw	sisoo_act,sisoopat,$03ce,0,$00		;9:

	dcblw	sjump_act,banepat,$045c,0,$80		;3: banev
	dcblw	sjump_act,banepat,$0470,3,$90		;3: baneh
	dcblw	sjump_act,banepat,$045c,6,$a0		;3: banevr
	dcblw	sjump_act,banepat,$043c,7,$30		;3: bane45
	dcblw	sjump_act,banepat,$043c,10,$40		;3: bane45r

	dcblw	wasp_act,wasppat,$03e6,0,$00		;25   ""    ""
	dcblw	snail_act,snailpat,$0402,0,$00		;25   ""    ""
	dcblw	wfish2_act,wfish2pat,$041c,0,$00	;21   ""    ""



	dcblw	redz_act,redzpat,$0500,0,$00		;20: will change
	dcblw	bfish_act,bfishpat,$2530,0,$00		;21   ""    ""
	dcblw	seahorse_act,horsepat,$2570,0,$00	;22   ""    ""
	dcblw	skyhorse_act,horsepat,$2570,0,$00	;23   ""    ""
	dcblw	stego_act,stegopat,$23c4,0,$00		;24   ""    ""
	dcblw	wasp_act,wasppat,$032c,0,$00		;25   ""    ""
	dcblw	gator_act,gatorpat,$2300,0,$00		;26   ""    ""
	dcblw	bbat_act,bbatpat,$2350,0,$00		;27   ""    ""
	dcblw	oct_act,octpat,$238a,0,$00		;28   ""    ""

edit5tbl:
edit6tbl:
edit7tbl:
;zone08
	dc.w	15
	dcblw	ring_act,ringpat,$26bc,0,$00		;1:
	dcblw	item_act,itempat,$0680,0,$00		;2:

	dcblw	bgspr_act,frntlitpat,$e485,3,$21	;3:
	dcblw	wfall_act,wfallpat,$e415,4,$04		;4:
	dcblw	break_act,pltfrmpat,$4475,0,$00		;5:
	dcblw	colichg_act,colichgpat,$26bc,0,$00	;6:

	dcblw	redz_act,redzpat,$0500,0,$00		;20: will change
	dcblw	bfish_act,bfishpat,$2530,0,$00		;21   ""    ""
	dcblw	seahorse_act,horsepat,$2570,0,$00	;22   ""    ""
	dcblw	skyhorse_act,horsepat,$2570,0,$00	;23   ""    ""
	dcblw	stego_act,stegopat,$23c4,0,$00		;24   ""    ""
	dcblw	wasp_act,wasppat,$032c,0,$00		;25   ""    ""
	dcblw	gator_act,gatorpat,$2300,0,$00		;26   ""    ""
	dcblw	bbat_act,bbatpat,$2350,0,$00		;27   ""    ""
	dcblw	oct_act,octpat,$238a,0,$00		;28   ""    ""

;------------------------------------------------------------------------------
	align
;------------------------------------------------------------------------------
	end


edit2tbl:
	dc.w	25
	dcblw	ring_act,ringpat,$26bc,0,$00		;1:
	dcblw	item_act,itempat,$0680,0,$00		;2:
	dcblw	sjump_act,sjumppat,$0523,0,$00		;3:
	dcblw	fish2_act,fish2pat,$2486,0,$08		;4:
	dcblw	mogura_act,mogurapat,$84a6,2,$00	;5:
	dcblw	yari_act,yaripat,$03cc,0,$00		;6:
	dcblw	yari_act,yaripat,$03cc,3,$02		;7:
	dcblw	box_act,boxpat,$43de,0,$00		;8:
	dcblw	switch2_act,switch2pat,$0513,0,$00	;9:
	dcblw	toge_act,togepat,$051b,0,$00		;10:
	dcblw	dai_act,udaipat,$43bc,0,$04		;11:
	dcblw	dai3_act,dai3pat,$43e6,0,$01		;12:
	dcblw	dai3_act,dai3pat,$43e6,1,$13		;13:
	dcblw	dai3_act,dai3pat,$43e6,0,$05		;14:
	dcblw	kazari_act,kazaripat,$443e,0,$00	;15:
	dcblw	dai3_act,dai3pat,$43e6,2,$27		;16:
	dcblw	dai3_act,dai3pat,$43e6,3,$30		;17:
	dcblw	kassya_act,kassyapat,$03f6,0,$7f	;18:
	dcblw	uni_act,unipat,$0467,0,$00		;19:
	dcblw	awa_act,awapat,$8348,19,$84		;20:
	dcblw	mizu_act,mizupat,$c259,2,$02		;21:
	dcblw	mizu_act,mizupat,$c259,9,$09		;22:
	dcblw	bou_act,boupat,$43de,0,$00		;23:
	dcblw	ben_act,benpat,$4328,0,$02		;24:
	dcblw	save_act,savepat,$26bc,0,$01		;25:

*	dcblw	dai4_act,dai4pat,$41f0,4,$80		;25:
edit3tbl:
	dc.w	18
	dcblw	ring_act,ringpat,$26bc,0,$00		;1:
	dcblw	item_act,itempat,$0680,0,$00		;2:
	dcblw	hachi_act,hachipat,$0444,0,$00		;3:
	dcblw	toge_act,togepat,$051b,0,$00		;4:
	dcblw	sjump_act,sjumppat,$0523,0,$00		;5:
	dcblw	mfire_act,firepat,$0345,0,$00		;6:
	dcblw	fblock_act,fblockpat,$4000,0,$00	;7:
	dcblw	myogan_act,yoganpat,$63a8,0,$00		;8:
	dcblw	yogan2_act,yogan2pat,$63a8,0,$00	;9:
	dcblw	box_act,boxpat,$42b8,0,$00		;10:
	dcblw	yado_act,yadopat,$247b,0,$00		;11:
	dcblw	bryuka_act,bryukapat,$42b8,0,$00	;12:
	dcblw	dai_act,daipat,$02b8,0,$00		;13:
	dcblw	break2_act,break2pat,$62b8,0,$00	;14:
	dcblw	yoganc_act,yogancpat,$8680,0,$00	;15:
	dcblw	bat_act,batpat,$04b8,0,$00		;16:
	dcblw	imo_act,imopat,$24ff,0,$00		;17:
	dcblw	save_act,savepat,$26bc,0,$01		;18:
edit4tbl:
	dc.w	15
	dcblw	ring_act,ringpat,$26bc,0,$00		;1:
	dcblw	item_act,itempat,$0680,0,$00		;2:
	dcblw	elev_act,elevpat,$4000,0,$00		;3:
	dcblw	break2_act,break2pat,$44e0,2,$00	;4:
	dcblw	shima_act,z4daipat,$4000,0,$00		;5:
	dcblw	pedal_act,pedalpat,$4000,0,$00		;6:
	dcblw	step_act,steppat,$4000,0,$00		;7:
	dcblw	fun_act,funpat,$43a0,0,$00		;8:
	dcblw	sisoo_act,sisoopat,$0374,0,$00		;9:
	dcblw	sjump_act,sjumppat,$0523,0,$00		;10:
	dcblw	mfire_act,firepat,$0480,0,$00		;11:
	dcblw	bgspr_act,hassyapat,$44d8,0,$00		;12:
	dcblw	brobo_act,brobopat,$0400,0,$00		;13:
	dcblw	uni_act,unipat,$2429,0,$00		;14:
	dcblw	save_act,savepat,$26bc,0,$01		;15:
edit5tbl:
	dc.w	15
	dcblw	ring_act,ringpat,$26bc,0,$00		;1:
	dcblw	item_act,itempat,$0680,0,$00		;2:
	dcblw	toge_act,togepat,$051b,0,$00		;3:
	dcblw	sjump_act,sjumppat,$0523,0,$00		;4:
	dcblw	aruma_act,arumapat,$04b8,0,$00		;5:
	dcblw	signal_act,signalpat,$0000,0,$00	;6:
	dcblw	bobin_act,bobinpat,$0380,0,$00		;7:
	dcblw	kani_act,kanipat,$0400,0,$00		;8:
	dcblw	hachi_act,hachipat,$0444,0,$00		;9:
	dcblw	yado_act,yadopat,$247b,0,$00		;10:
	dcblw	shima_act,z5daipat,$4000,0,$00		;11:
	dcblw	dai2_act,dai2pat,$4000,0,$00		;12:
	dcblw	switch2_act,switch2pat,$0513,0,$00	;13:
	dcblw	imo_act,imopat,$24ff,0,$00		;14:
	dcblw	save_act,savepat,$26bc,0,$01		;15:
edit6tbl:
	dc.w	29
	dcblw	ring_act,ringpat,$26bc,0,$00		;1:
	dcblw	item_act,itempat,$0680,0,$00		;2:
	dcblw	brobo_act,brobopat,$0400,0,$00		;3:
	dcblw	uni_act,unipat,$0429,0,$00		;4:
	dcblw	imo_act,imopat,$22b0,0,$00		;5:
	dcblw	buranko_act,fetamapat,$4391,2,$07	;6:
	dcblw	haguruma_act,hagurumapat,$c344,00,$e0	;7:
	dcblw	dai_act,daipat,$22c0,2,$28		;8:
	dcblw	switch2_act,switch2pat,$0513,0,$00	;9:
	dcblw	pata_act,patapat,$4492,0,$03		;10:
	dcblw	pata_act,yukafpat,$04df,0,$83		;11:
	dcblw	noko_act,nokopat,$43b5,0,$02		;12:
	dcblw	break2_act,break2pat,$43f5,0,$00	;13:
	dcblw	dai_act,daipat,$4460,3,$39		;14:
	dcblw	dai4_act,dai4pat,$22c0,0,$00		;15:
	dcblw	door_act,doorpat,$42e8,0,$00		;16:
	dcblw	dai4_act,dai4pat,$22c0,1,$13		;17:
	dcblw	noko_act,nokopat,$43b5,0,$01		;18:
	dcblw	dai4_act,dai4pat,$22c0,1,$24		;19:
	dcblw	noko_act,nokopat,$43b5,2,$04		;20:
	dcblw	dai4_act,dai4pat,$22c0,1,$34		;21:
	dcblw	yukae_act,yukaepat,$44c3,0,$00		;22:
	dcblw	fire6_act,fire6pat,$83d9,0,$64		;23:
	dcblw	fire6_act,fire6pat,$83d9,11,$64		;24:
	dcblw	ele_act,elepat,$047e,0,$04		;25:
	dcblw	yukai_act,yukaipat,$42f0,0,$00		;26:
	dcblw	scoli_act,scolipat,$8680,0,$11		;27:
	dcblw	buta_act,butapat,$2302,0,$04		;28:
	dcblw	save_act,savepat,$26bc,0,$01		;29:

*	dcblw	ring_act,playpat,$0780,50,$00		;28:
*	dcblw	usa_act,usapat,$0448,0,$00		;5:
*	dcblw	mawaru_act,mawarupat,$4348,16,$00	;7:

edit7tbl:
	dc.w	02	*13
	dcblw	ring_act,ringpat,$26bc,0,$00		;1:
	dcblw	ring_act,ringpat,$26bc,8,$00		;2:
*	dcblw	bobin_act,bobinpat,$0380,0,$00		;2:
*	dcblw	usagi_act,flicpat,$05a0,0,$0a		;3
*	dcblw	usagi_act,flicpat,$05a0,0,$0b		;4
*	dcblw	usagi_act,flicpat,$05a0,0,$0c		;5
*	dcblw	usagi_act,usagipat,$0553,0,$0d		;6
*	dcblw	usagi_act,usagipat,$0553,0,$0e		;7
*	dcblw	usagi_act,pengpat,$0573,0,$0f		;8
*	dcblw	usagi_act,pengpat,$0573,0,$10		;9
*	dcblw	usagi_act,azarpat,$0585,0,$11		;10
*	dcblw	usagi_act,fbutapat,$0593,0,$12		;11
*	dcblw	usagi_act,niwapat,$0565,0,$13		;12
*	dcblw	usagi_act,risupat,$05b3,0,$14		;13

Something interesting to notice is this group of code:

	dcblw	redz_act,redzpat,$0500,0,$00		;20: will change
	dcblw	bfish_act,bfishpat,$2530,0,$00		;21   ""    ""
	dcblw	seahorse_act,horsepat,$2570,0,$00	;22   ""    ""
	dcblw	skyhorse_act,horsepat,$2570,0,$00	;23   ""    ""
	dcblw	stego_act,stegopat,$23c4,0,$00		;24   ""    ""
	dcblw	wasp_act,wasppat,$032c,0,$00		;25   ""    ""
	dcblw	gator_act,gatorpat,$2300,0,$00		;26   ""    ""
	dcblw	bbat_act,bbatpat,$2350,0,$00		;27   ""    ""
	dcblw	oct_act,octpat,$238a,0,$00		;28   ""    ""

These lines of code are in the block that makes up Hidden Palace Zone's debug list from an earlier build. The content in the list appears to be identical to the actual compiled version in the ROM; however, it does give us information on the objects in the Zone that may have been previously unknown:

  • Redz is the red T-rex badnik that appears in Hidden Palace.
  • Bfish is the jumping fish badnik that was unused by the Simon Wai prototype.
  • Seahorse is Aquis, the seahorse badnik that was in the final game in Oil Ocean Zone.
  • Skyhorse is most likely the second Aquis object in Hidden Palace's debug list (the version that shoots a harmless projectile).
  • Stego is the triceratops badnik that was unused by the Simon Wai prototype.
  • Wasp is Buzzer, the bee badnik that's in Emerald Hill Zone in all known versions of Sonic 2. In this prototype, it also has a home in Hidden Palace's debug list.
  • Gator is the alligator/crocodile badnik that is unused by the Simon Wai prototype.
  • Bbat is the dive-bombing bat that appears in Hidden Palace Zone.
  • Oct is Octus, the octopus badnik that was in the final game in Oil Ocean Zone.

These same lines are duplicated in the debug list for Emerald Hill, but unused because the game is told that Emerald Hill's debug list will have 18 entries, and the Hidden Palace enemies are all after entry number 18.

This chunk of uncompiled code also indicates that the Zone order present in this build was going to be changed even at this early stage. Emerald Hill's debug list is labeled as Zone 00, which is Green Hill in this build but Emerald Hill in later builds. Similarly, Hidden Palace is labeled as Zone 08, which is where it resides in later builds and the final.

The second set of editXtbl labels seems to correspond with the debug lists of Sonic 1, but doesn't exactly match any extant build. Notably, the edit2tbl and edit6tbl lists have entries prefixed by asterisks, which don't seem to appear in the final game. The asterisked entries in edit7tbl exist in Sonic 1 REV00 only.

Misc. Leftovers/Earlier Versions of Objects

Hmmm...
To do:
Get some more objects documented here, if there are any.

Inside the ROM, mixed in with the symbol tables and debug mode source code is what appears to be leftover RAM contents from the assembler that includes additional symbols, and also assembled code. What should be noted is that the data is from a previous build (CES) , and some objects do indeed have different code.

Emerald Hill Zone Boss

Differences include different positioning, a lack of hitbox for the drill, and a weird bobbing movement for the ship's body. The wheels also do not detect floor collision until they fall off the body.

"Overdump" Data Leftovers

The Nick Arcade build contains leftover data from ToeJam & Earl starting at 0xE1670 until the end of the ROM, however this "overdump" contains no differences from final. Additional information on overdump content can be found here.