Sonic the Hedgehog
Sega's 1991 platformer for the Mega Drive and Genesis, the first in the Sonic series.
Facts
- Released
- 1991
- Genre
- Platformer
- Platforms
- Genesis
- Developer
- Sonic Team
- Publisher
- Sega
- Series
- Sonic the Hedgehog
- Code
- Disassembly by Sonic Retro contributors
ROM (USA, Europe) - Reviews
- Computer and Video Games 94 of 100
Mean Machines 92 of 100 - Evidence
- Verified (20)
Code (18)
Magazine (14)
Web (5)
Manual (4)
Interview (2)
Wiki (1) - Sources
- 28
Sonic the Hedgehog is Sega’s platformer for the Mega Drive, sold in North America as the Genesis. Electronic Gaming Monthly’s September 1991 issue says it appeared in stores in early June and reached Europe around the end of June, without naming the country of the June release1. Its North American release day is an open question, set out in the gap below. In Japan it came out on 26 July 19912. Sonic sets out to rescue his friends from Dr. Robotnik3, through six zones of three Acts each, with Robotnik waiting at the end of every third Act4. Beep! MegaDrive described the odd-numbered zones as built for speed and the even ones for exploring and dodging traps5.
The ending credits list the staff by handle under “Sonic Team Staff”6. 1UP’s retrospective names three people as the original Sonic team: character designer Naoto Ohshima, game and level designer Hirokazu Yasuhara, and programmer Yuji Naka, of Sega’s AM8 division, later renamed Sonic Team7. In 1991 the planner, credited as Carol, told Beep! MegaDrive that the work began as a character that could stand up to Mario8. Electronic Gaming Monthly reported an in-house sketch contest at Sega of Japan, in which the moustached man among the four finalists became the villain9. At GDC in 2018 Yasuhara said a hedgehog was picked because it could curl into a ball to attack10. The character designer, credited as BigIsland, said Sonic began as the idea of speed, and the spinning attack came after11.
IGN’s 2014 list of Sonic facts says Sega allowed no credits at the end of the game, and that Yuji Naka put his team’s names there in black text on a black background12. In the code, the names that Sonic Retro’s disassembly calls the hidden Japanese credits are drawn on the SONIC TEAM PRESENTS screen before the title, not at the end13. In MAME they are black on a black backdrop14. On a Japanese console, pressing C six or seven times and then Up, Down, Left, Right on the title screen sets a flag in this release (a later revision’s Japanese code is Up, Down, Down, Down, Left, Right)15,16,17. Holding A, B, C, and Down as SONIC TEAM PRESENTS next comes up then removes that text and turns the backdrop white18,19, and in MAME the names show in black on white20.
Reviews stressed the speed and the graphics. Computer and Video Games scored it 94%21 and called its graphics the best on the Mega Drive, and Mean Machines gave it 92%22, though one of its reviewers found the play frustrating after a while. GamePro called Sonic the fastest creature on two legs the Genesis had seen23. Sega Power called it the best Mega Drive game yet, but granted that it could be argued to be “a bit on the easy side”24. Electronic Gaming Monthly’s editors gave it their Best Game of the Year award for 199125, and the public voted it Overall Game of the Year at the Golden Joystick awards in London26.
By September 1991 Sega called it its best-selling cartridge in the United States27, and Electronic Gaming Monthly reported that it would replace Altered Beast as the game packed in with the Genesis from that month28. Sega ran side-by-side comparisons with “Mario 4” at the CES and around the country29. UPI reported nearly 1 million copies sold over the 1991 Christmas30, and by 1997 Sega Saturn Magazine put the total above 14 million31. Electronic Gaming Monthly’s 2005 list of the most important games says it made the Genesis a star and gave Nintendo its first real competition32. The World Video Game Hall of Fame inducted it in 201633.
#How it plays
Sonic gathers speed slowly from a standstill, and he coasts as slowly back to a stop34. Turning around at top speed, he skids and brakes before he runs the other way, and the turn takes longer running right than running left35,36. On a slope he speeds up running down and slows running up, but he can stand still on one37.
Down at speed curls him into a ball38. On flat ground a roll never speeds up and only friction slows it, so from top speed it lasts about twice as long as a coast39,40,34. Rolling, he picks up more speed downhill than running and loses less uphill37. Sonic 1 has no spin dash: standing still, Sonic can only jump, walk, or curl up41.
Each loop in Green Hill and Star Light is one piece of level in two versions, and a flag on Sonic picks the one he collides with42. The flag flips at the loop’s top, and it is set at the loop’s far edge and cleared at its near one43.
Out of water every jump takes off at the same speed, straight out from the ground under him, so a jump from a ramp goes off at an angle44,45. From a standstill, a jump climbs 100 px held, 39 px tapped46. Letting go slows a fast rise to a set speed, which gravity then wears down47. In the air the d-pad speeds him up either way, twice as fast as on the ground48, and near the top of a jump air drag slows him on every frame49. A jump out of a roll gives up the d-pad until he lands50. Sonic can’t jump once he has run off a ledge, even a frame late51.
Rings are his health. A hit scatters them, and a hit with none kills him52. A shield takes one hit in their place53. A hundred rings earn an extra life, and enough of them at the end of an Act open the way to a Secret Zone, a rotating maze that holds one of six Chaos Emeralds54. A hit also throws him up and back55, and once he lands he blinks for a while and can’t be hurt56.
#Across the series
Sonic the Hedgehog 2 keeps Sonic 1’s take-off speed, release cap, and running speeds57,58,59,44,47,60. It adds the spin dash, a roll charged from a crouch61, where Sonic 1 has none41. In Sonic 1, holding forward pulls a Sonic going faster than his top speed back down to it62; on the ground, Sonic 2 lets him keep the speed63. In Sonic 3 & Knuckles a standing Sonic slides down a steep enough slope64, where in Sonic 1 he stands still37.
Data
Mechanics
| Mechanic | Kind | How |
|---|---|---|
| Variable jump height | Release cap | letting go of the button slows a fast rise to a set speed |
| Jump | One speed | out of water every jump takes off at one speed, straight out from the ground under him |
| Gravity | One gravity | one pull of gravity whether the button is held or not, and a jump's fall isn't capped |
| Air control | Momentum | the d-pad speeds him up either way in the air, twice as fast as on the ground, and near the top of a jump air drag slows him |
| Running | Momentum | speed builds and fades slowly, to a single top speed |
| Hitbox | Points and a box | points that touch the level, and a 16 px wide box that touches enemies |
| Invincibility frames | Frame timer | after a hit he blinks, safe, for a while counted from his landing |
| Knockback | Launch | a hit throws him up and back, under lighter gravity |
| Rolling | Slopes only | Down at speed curls Sonic up; on flat ground a roll never speeds up, only slows |
| Slope physics | Moving only | slopes push a running or rolling Sonic, a rolling one harder downhill and softer uphill, and leave a standing one alone |
| Loop | Chunk swap | each loop's piece of level comes in two versions, and a flag on Sonic, flipped at the loop's top, picks the solid one |
| Rings as health | Drop all | a hit scatters his rings, and a hit with none kills him |
| Extra life | Other condition | 100 rings earn a life |
| Bonus stage | enough rings at an Act's end open a rotating maze with a Chaos Emerald | |
| Shields | One hit | one shield, which takes a hit in place of the rings |
| Coyote time | None | a jump works only while he's on the ground |
| Spin dash | None | no spin dash: standing, he can only jump, walk, or curl up |
Every claim about this game, by concept (107)
References
- ^ abMagazineEGM 26 (1991-09)
How we know
Electronic Gaming Monthly's September 1991 issue says the game reached stores in early June 1991, Europe around the end of June, and Japan in late July.
when Sonic appeared in the stores in early June, Sonic literally flew off the store shelves. … Sonic hit Europe around the end of June and appeared in Japan in late July.
p. 103, "Sonic Goes Public" · archived copy ↗ - ^ManualSonic 1 JP manual · Sega Mega Drive software list
How we know
Sonic the Hedgehog came out on the Mega Drive in Japan on 26 July 1991.
ON SALE 7-26 1991
manual p. 1 (PDF p. 3), contents page · archived copy ↗ 7月26日
table under 1991年, row G-4049 (ソニック・ザ・ヘッジホッグ) · archived copy ↗ Our translation26 July - ^ManualSonic 1 US manual
How we know
In the North American manual's story, Sonic sets out to rescue his friends from Dr. Robotnik, using his Super Sonic Spin Attack.
Your goal is to rescue your friends from the nasty grasp of the demented scientist, Dr. Robotnik! … dash through six hazardous zones using your Super Sonic Spin Attack.
Reach for the Rings! · archived copy ↗ - ^ManualSonic 1 US manual
How we know
The North American manual divides the game into six zones of three Acts each, with a fight against Dr. Robotnik at the end of every third Act.
There are six action-packed zones, each with three exciting Acts. … Dr. Robotnik at the end of every third Act.
p. 8, "Zip Through the Zones!" · archived copy ↗ - ^MagazineBeep! MegaDrive 1991-07
How we know
Beep! MegaDrive's July 1991 feature says zones 1, 3, and 5 are built for running briskly ahead, and zones 2, 4, and 6 are maps for exploring and carefully dodging traps.
スピード感を重視した構成で、ゾーン2、4、6はトラップや仕掛けを慎重にかわして探索するようなマップとなっているからだ。
PDF p. 66, Marble Zone · archived copy ↗ Our translation…a structure that stresses the sense of speed, while zones 2, 4, and 6 are maps where you carefully dodge traps and gimmicks and explore - ^Wikisonicretro/s1disasm · Sega Retro, Sonic 1 creditsCredits.asm 17, 36, 58, 72, 101, 127, 159
How we know
The ending credits, under "Sonic Team Staff", give game plan to Carol Yas, program to Yu 2, character design to BigIsland, design to Jinya and Phenix Rie, sound production to Masato Nakamura, and sound programming to Jimita and Macky.
17.staff: spriteHeader ; SONIC TEAM STAFF_maps/Credits.asm line 17 at 15dfa3a · upstream ↗ 36.gameplan: spriteHeader ; GAME PLAN CAROL YAS_maps/Credits.asm line 36 at 15dfa3a · upstream ↗ 58.program: spriteHeader ; PROGRAM YU 2_maps/Credits.asm line 58 at 15dfa3a · upstream ↗ Carol Yas
credits table · archived copy ↗ - ^Web1UP, Sonic Boom · Game Developer, Sonic origin (2018)
How we know
1UP's retrospective names three people from Sega's AM8 division, later renamed Sonic Team, as the original team; character designer Naoto Ohshima, game and level designer Hirokazu Yasuhara, and programmer Yuji Naka, who it says almost single-handedly programmed the game.
The challenge was answered by Sega's AM8 division (later renamed Sonic Team
on Hayao Nakayama's search for a mascot · archived copy ↗ the perfect amalgamation of talent from three then-unknown game industry superstars -- the original Sonic team, so to speak. … First, there was Naoto Oshima, a character designer … Second was Hirokazu Yasuhara, the original game and level designer … And third was Yuji Naka, a hotshot programmer … who almost single-handedly programmed the game
Swift Success · archived copy ↗ Original game designer Hirokazu Yasuhara … original character designer Naoto Oshima
GDC 2018 talk report · archived copy ↗ - ^InterviewBeep! MegaDrive, Sonic Team interview (1991)
How we know
Carol said in the same interview that the work began as making a character that could stand up to Mario.
もともとはマリオに対 … できるキャラクター作りから始まった仕事
PDF p. 64, Carol · archived copy ↗ Our translationoriginally, against Mario a job that began with making a character that could (stand up to him) - ^MagazineEGM 26 (1991-09)
How we know
Electronic Gaming Monthly's 1991 making-of says Sega of Japan chose the character through an internal sketch contest of over 100 entries, whose four finalists were a bulldog, a wolf, a man with a large moustache, and a porcupine-type animal; the moustached man became the villain, Dr. Ivo Robotnik.
A contest was held, and all the employees of the company were asked to send in a sketch of this new character. … the four finalists included a bulldog, a wolf, a man with a large moustache and a porcupine-type animal. … not as the hero, rather as the evil Doctor Ivo Robotnik!
p. 102, "Sonic the Wolf...???" · archived copy ↗ - ^WebGame Developer, Sonic origin (2018)
How we know
At GDC 2018 Hirokazu Yasuhara said a hedgehog was chosen because it can be imagined attacking by curling into a ball and rolling, and Naoto Ohshima said that when he showed his sketches to passers-by in Central Park, the hedgehog was the most popular, ahead of Eggman and a dog.
It's a character you can imagine dealing damage by curling up like a ball and rolling around. … he sketched them on boards in Central Park and started showing random passersby … The result was, the hedgehog was most popular; people pointed at it and really liked it, … The second was Eggman, and the third was the dog.
GDC 2018 talk report · archived copy ↗ - ^InterviewBeep! MegaDrive, Sonic Team interview (1991)
How we know
The character designer, credited as BigIsland, said in the interview that Sonic began as only the idea of a sense of speed, and that the spinning attack and the pinball-like movement came later; Carol added that being easy for anyone to play mattered most.
感という考えしかなかったんです。そして者えていくうちに回転攻撃という発想ができあがって、今のビンボールのような動きも加わりました。
PDF p. 64, BIGISLAND · archived copy ↗ Our translation(speed) sense was the only idea there was. As (we) thought it through, the idea of a spinning attack took shape, and the present pinball-like movement was added tooしかし、誰でもできる簡単さが最も重要な点なんです。
PDF p. 64, Carol · archived copy ↗ Our translationbut simplicity, so that anyone can play, is the most important point - ^WebIGN, 21 Sonic facts (2014)
How we know
IGN's 2014 list of Sonic facts says Sega allowed no credits at the end of the game, mainly to keep other developers from hiring the staff away, and that Yuji Naka put his team's names at the end in black text on a black background, which no one could read.
Even though SEGA did not allow credits at the end of Sonic The Hedgehog (mainly to prevent poaching by other developers) … Yuji Naka included his team's names in black text on a black background at the end of Sonic The Hedgehog. No one could read the text
11: Hidden credits · archived copy ↗ - ^Codesonicretro/s1disasmsonic.asm 1922–1924, 1930–1940; _Constants.asm 486–488
How we know
The title screen's setup, before SONIC TEAM PRESENTS fades in, decompresses the art s1disasm calls the hidden Japanese credits into VRAM and its 40 by 28 cell map into the foreground plane, so the names are on that screen with or without a cheat. In the original game (s1disasm with its bug fixes off, either revision) the map's tiles use the first palette line; s1disasm's bug-fix build gives them the third, the line the cheat colors.
1922 locVRAM ArtTile_Title_Japanese_Text*tile_size ; set target VRAM location for hidden Japanese credits 1923 lea (Nem_JapNames).l,a0 ; load hidden Japanese credits 1924 bsr.w NemDec ; decompress Nemesis-compressed patterns directly to VRAM
sonic.asm lines 1922–1924 at 15dfa3a · upstream ↗ 1930 lea (v_ram_start).l,a1 ; set start of RAM to be used as decompression buffer 1931 lea (Eni_JapNames).l,a0 ; load mappings for hidden Japanese credits 1932 if FixBugs 1933 move.w #ArtTile_Title_Japanese_Text|Tile_Pal3,d0 ; set art tile for hidden Japanese credits (cyan) 1934 else 1935 ; The hidden Japanese credits cheat in Object 8A sets the text color to cyan on palette line 3, 1936 ; but this part makes the text continue using palette line 1, rendering them black instead. 1937 move.w #ArtTile_Title_Japanese_Text|Tile_Pal1,d0 ; set art tile for hidden Japanese credits (black) 1938 endif 1939 bsr.w EniDec ; decompress Enigma-compressed mappings to RAM buffer 1940 copyTilemap v_ram_start,vram_fg,40,28 ; transfer decompressed patterns from RAM buffer to VRAM
sonic.asm lines 1930–1940 at 15dfa3a · upstream ↗ 486Tile_Pal1: equ 0<<13 487Tile_Pal2: equ 1<<13 488Tile_Pal3: equ 2<<13
_Constants.asm lines 486–488 at 15dfa3a · upstream ↗ - ^Verifiedsonicretro/s1disasmsonic.asm 1917, 1937, 1942–1944; Palette Index.asm 19; +1 files
How we know
Without the cheat, the hidden names are on the SONIC TEAM PRESENTS screen but black on black. In MAME 0.289 from power-on, on its Genesis with a read tap that clears the version register's overseas bit (a Japanese console), the first SONIC TEAM PRESENTS screen had the hidden names in 245 cells of the foreground plane, all in color 1 of the first palette line (line 0), which the VDP's color RAM held as
$000, black, and the backdrop was$000too. Every name pixel outside the SONIC TEAM PRESENTS text was drawn black.1917 move.w #vreg_bgcolor|2<<4|0,(a6) ; set background colour (palette line 2, entry 0)sonic.asm line 1917 at 15dfa3a · upstream ↗ 1937 move.w #ArtTile_Title_Japanese_Text|Tile_Pal1,d0 ; set art tile for hidden Japanese credits (black)sonic.asm line 1937 at 15dfa3a · upstream ↗ 1942 clearRAM v_palette_fading ; set palette fade-in buffer to all-black 1943 moveq #palid_Sonic,d0 ; load Sonic's palette... 1944 bsr.w PalLoad_Fade ; ...into fade-in buffer
sonic.asm lines 1942–1944 at 15dfa3a · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Codesonicretro/s1disasmsonic.asm 2353–2361, 2096–2118, 2142–2158
How we know
The title screen's cheats start with a d-pad code, read from each frame's new presses: Up, Down, Left, Right on every console in REV00 (Sonic The Hedgehog (USA, Europe)) and on non-Japanese consoles in REV01, while a Japanese console in REV01 takes Up, Down, Down, Down, Left, Right. The code is complete on the first frame after its last direction with no new d-pad press, and a wrong direction starts it over; s1disasm's bug-fix build, unlike the original, counts a wrong press that matches the code's first direction as that first press.
2353LevSelCode_J: 2354 if Revision=0 2355 dc.b btnUp,btnDn,btnL,btnR,0,$FF 2356 else 2357 dc.b btnUp,btnDn,btnDn,btnDn,btnL,btnR,0,$FF 2358 endif 2359 even ⋮ 2361LevSelCode_US: dc.b btnUp,btnDn,btnL,btnR,0,$FF
sonic.asm lines 2353–2361 at 15dfa3a · upstream ↗ sonic.asm at 15dfa3a Our readinga Japanese console: the J code (by the comment)2097–2098else: the US code2099–2100Japanese: the J code2103the entry at the count of right presses2106–2107the d-pad bits pressed this frame2108–2109not the entry: reset (not quoted)2110–2111count + 12112not the closing 0: on to the count (not quoted)2113–2114the closing 0: FixBugs build: count ← 02117 then on to the cheat's effect (not quoted)2118no d-pad press: keep the count2143–2144count 9, which can't happen: keep it (by the comment)2145–2146else: count ← 02147FixBugs build: the region's code again2152–2155 the press is its first entry: take it at once2156–2157 - ^Codesonicretro/s1disasmsonic.asm 2064–2065, 2125–2138, 2160–2164; _Variables.asm 459–462
How we know
When the title screen's d-pad code completes on a Japanese console, the cheat it turns on depends on how many times C has been pressed since the title screen began: the count halved, keeping its low two bits, picks level select (0 or 1 presses), slow motion (2 or 3), debug mode (4 or 5), or the hidden-credits flag (6 or 7; the pattern repeats every 8 presses). On any other console 2 to 7 presses (again repeating every 8 presses) turn on slow motion and debug mode instead, and 0 or 1 level select, so the hidden-credits flag can't be set there from the title screen.
sonic.asm at 15dfa3a Our readingD-pad and C counters ← 02064–2065a0 ← the level-select flag, the first cheat2125index ← C count ÷ 2, & 32126–21280: to Tit_PlayRing2129Japanese console: to Tit_PlayRing (by the comment)2130–2131else: index ← 1; the flag at index + 1 ← 12132–2133Tit_PlayRing: the cheat flag at index ← 12135–2136ring sound2137–2138pressed buttons & C2161–2162 none: to Tit_ChkStartOrDemo2163 else: C count + 12164459f_levselcheat: ds.b 1 ; level select cheat flag 460f_slomocheat: ds.b 1 ; slow motion & frame advance cheat flag 461f_debugcheat: ds.b 1 ; debug mode cheat flag 462f_creditscheat: ds.b 1 ; hidden Japanese credits & 9E/9F sound test shortcuts cheat flag
_Variables.asm lines 459–462 at 15dfa3a · upstream ↗ - ^Verifiedsonicretro/s1disasmsonic.asm 2354–2355, 2125–2136, 2160–2164; _Variables.asm 459–462
How we know
In MAME 0.289 from power-on, Sonic The Hedgehog (USA, Europe) on a Japanese console (MAME's Genesis, with a read tap that clears the overseas bit, bit 7, of the version register at
$A10001), with C pressed six times on the title screen and then Up, Down, Left, Right, turned on the hidden-credits flag and no other cheat; on MAME's Genesis (USA), the same input turned on slow motion and debug mode.2354 if Revision=0 2355 dc.b btnUp,btnDn,btnL,btnR,0,$FF
sonic.asm lines 2354–2355 at 15dfa3a · upstream ↗ 2125 lea (f_levselcheat).w,a0 ; get base cheat index 2126 move.w (v_title_ccount).w,d1 ; get number of tiles C was pressed 2127 lsr.w #1,d1 ; half pressed amount 2128 andi.w #3,d1 ; only four cheats are possible 2129 beq.s Tit_PlayRing ; if C was not pressed, only activate level select 2130 tst.b (v_megadrive).w ; check if the machine is US or Japanese 2131 bpl.s Tit_PlayRing ; if Japanese, branch 2132 moveq #1,d1 ; on non-Japanese console, force index to slow motion cheat 2133 move.b d1,1(a0,d1.w) ; enable debug mode first (and slow motion in the next line) ⋮ 2135Tit_PlayRing: 2136 move.b #1,(a0,d1.w) ; activate cheat depending on C-press count
sonic.asm lines 2125–2136 at 15dfa3a · upstream ↗ 459f_levselcheat: ds.b 1 ; level select cheat flag 460f_slomocheat: ds.b 1 ; slow motion & frame advance cheat flag 461f_debugcheat: ds.b 1 ; debug mode cheat flag 462f_creditscheat: ds.b 1 ; hidden Japanese credits & 9E/9F sound test shortcuts cheat flag
_Variables.asm lines 459–462 at 15dfa3a · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Codesonicretro/s1disasm8A Credits and Sonic Team Presents.asm 16–42; sonic.asm 3839–3867, 1945–1948; +1 files
How we know
With the hidden-credits flag set, holding exactly A, B, C, and Down (
$72; any other button added fails) as the screen before the title loads hides its SONIC TEAM PRESENTS text and puts white ($EEE) and cyan ($880) in the first two colors of the third palette line of the palette the screen fades in to. The text is an object that makes this test once, when it first runs, which the title screen's setup does once before the screen fades in; if the test fails, it shows the text. The ending's credits load the same object, which there shows the current credits page and skips the test.16Cred_Main: ; Routine 0 17 addq.b #2,obRoutine(a0) ; advance to Cred_Display ⋮ 22 move.w (v_creditsnum).w,d0 ; load credits page index number (doesn't reset between game mode changes) 23 move.b d0,obFrame(a0) ; display appropriate sprite ⋮ 27 cmpi.b #id_Title,(v_gamemode).w ; is the mode #4 (title screen)? 28 bne.s Cred_Display ; if not, branch 29 move.w #ArtTile_Sonic_Team_Font,obGfx(a0) ; alternate art tile offset for title screen 30 move.b #$A,obFrame(a0) ; display "SONIC TEAM PRESENTS" frame ⋮ 32 tst.b (f_creditscheat).w ; is hidden Japanese credits cheat on? 33 beq.s Cred_Display ; if not, branch 34 cmpi.b #btnABC+btnDn,(v_jpadhold1).w ; is exactly A+B+C+Down being held? ($72) 35 bne.s Cred_Display ; if not, branch ⋮
_incObj/8A Credits and Sonic Team Presents.asm lines 16–42 at 15dfa3a · upstream ↗ 3839GM_Credits: ⋮ 3867 move.b #id_CreditsText,(v_credits).w ; load credits text object
sonic.asm lines 3839–3867 at 15dfa3a · upstream ↗ 1945 move.b #id_CreditsText,(v_sonicteam).w ; load "SONIC TEAM PRESENTS" object 1946 jsr (ExecuteObjects).l ; execute objects to load STP object 1947 jsr (BuildSprites).l ; build sprites for the STP object 1948 bsr.w PaletteFadeIn ; fade-in STP screen
sonic.asm lines 1945–1948 at 15dfa3a · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Codesonicretro/s1disasmsonic.asm 1917, 1942–1944; Palette Index.asm 19; +2 files
How we know
On the SONIC TEAM PRESENTS screen the backdrop is color 0 of the third palette line, and the fade-in buffer is cleared to black before Sonic's palette is loaded into its first line, so without the cheat the backdrop fades in black. The cheat's white goes into that backdrop color, and its cyan into color 1 of the third line. In the original game (bug fixes off) the hidden names are on the first line and don't use that cyan; in s1disasm's bug-fix build they are on the third line, where their color 1 is the cheat's cyan.
1917 move.w #vreg_bgcolor|2<<4|0,(a6) ; set background colour (palette line 2, entry 0)sonic.asm line 1917 at 15dfa3a · upstream ↗ 1942 clearRAM v_palette_fading ; set palette fade-in buffer to all-black 1943 moveq #palid_Sonic,d0 ; load Sonic's palette... 1944 bsr.w PalLoad_Fade ; ...into fade-in buffer
sonic.asm lines 1942–1944 at 15dfa3a · upstream ↗ 19palid_Sonic: makePalEntry Pal_Sonic, v_palette_line_1_inc/Palette Index.asm line 19 at 15dfa3a · upstream ↗ - ^Verifiedsonicretro/s1disasm8A Credits and Sonic Team Presents.asm 32–38; sonic.asm 1917, 1937
How we know
With the cheat, the SONIC TEAM PRESENTS screen shows the hidden names in black on white, without the SONIC TEAM PRESENTS text. In MAME 0.289 on its Genesis with a read tap that clears the version register's overseas bit (a Japanese console), after the cheat input, a demo, and the Sega screen, with A, B, C, and Down held from the Sega screen on, the next SONIC TEAM PRESENTS screen had no SONIC TEAM PRESENTS text, and the third palette line began with
$EEEand$880. The backdrop was white,$EEE, and the names stayed in color 1 of the first line,$000: 2,862 black pixels and every other pixel white.32 tst.b (f_creditscheat).w ; is hidden Japanese credits cheat on? 33 beq.s Cred_Display ; if not, branch 34 cmpi.b #btnABC+btnDn,(v_jpadhold1).w ; is exactly A+B+C+Down being held? ($72) 35 bne.s Cred_Display ; if not, branch 36 move.w #cWhite,(v_palette_fading_line_3).w ; 3rd palette, 1st entry = white 37 move.w #$880,(v_palette_fading_line_3+2).w ; 3rd palette, 2nd entry = cyan 38 jmp (DeleteObject).l ; delete STP object for hidden Japanese credits
_incObj/8A Credits and Sonic Team Presents.asm lines 32–38 at 15dfa3a · upstream ↗ 1917 move.w #vreg_bgcolor|2<<4|0,(a6) ; set background colour (palette line 2, entry 0)sonic.asm line 1917 at 15dfa3a · upstream ↗ 1937 move.w #ArtTile_Title_Japanese_Text|Tile_Pal1,d0 ; set art tile for hidden Japanese credits (black)sonic.asm line 1937 at 15dfa3a · upstream ↗ - Rests on In MAME 0.289 from power-on, Sonic The Hedgehog (USA, Europe) on a Japanese console (MAME's Genesis, with a read tap that clears the overseas bit, bit 7, of the version register at
$A10001), with C pressed six times on the title screen and then Up, Down, Left, Right, turned on the hidden-credits flag and no other cheat; on MAME's Genesis (USA), the same input turned on slow motion and debug mode. (the emulated Japanese console and the cheat input)
Measured by a script. It fails if the result disagrees with the claim.
- Rests on In MAME 0.289 from power-on, Sonic The Hedgehog (USA, Europe) on a Japanese console (MAME's Genesis, with a read tap that clears the overseas bit, bit 7, of the version register at
- ^MagazineCVG 117 (1991-08)
How we know
Computer and Video Games scored it 94% overall in August 1991, calling its graphics the best on the Mega Drive and saying it had thrown down the gauntlet to Mario.
OVERALL 94
pp. 17-19, review score panel · archived copy ↗ The graphics are something very special ■ (he best you n see on the Mega drive. … Sonic has thrown down the gauntlet to Mario In a big way
pp. 17-19 · archived copy ↗ - ^MagazineMean Machines 10 (1991-07)
How we know
Mean Machines scored it 92% in July 1991 and called it the best platform game on the Mega Drive; one reviewer could think of no Mega Drive game with more spectacular graphics and found it fast and smooth, and another found the play frustrating after a while, with a few situations almost impossible.
92% The best platform game on the Megadrive!
pp. 42-44, score panel · archived copy ↗ I can't think of a Megadrive game with more spectacular graphics … everything is just so fast and smooth it's just astonishing!
p. 42, reviewer's comment · archived copy ↗ Playability-wise. Sonic's great, &though I found that the pameplay does get a little frustrating after a while. especially as there's a few almost impossbile situations
p. 43, second reviewer's comment · archived copy ↗ - ^MagazineGamePro 23 (1991-06)
How we know
GamePro's June 1991 review said it could be the greatest Genesis game yet and called Sonic the fastest creature on two legs the Genesis had seen.
latest for the Genesis and it could well be the greatest. … Sonic's the 'fastest creature on two legs that the Genesis has ever seen.
pp. 42-43, "Hedgehog Heaven" · archived copy ↗ - ^MagazineSega Power 22 (1991-09)
How we know
Sega Power's September 1991 verdict called it the best Mega Drive game yet and a ride "set to become a landmark in the history of video games"; its reviewers, who finished it on their second day of play, granted that it could be argued to be "a bit on the easy side" and answered that the challenge goes on after the last level.
Sonic the Hedgehog is the best Mega Drive game yet. … Sonic the Hedgehog puts you in the hot-seat of a roller-coaster ride set to become a landmark in the history of video games.
pp. 9-11, The Verdict · archived copy ↗ On the second day we finished the game for the first time. … it could be argued that Sonfcis a bit on the easy Side. … the challenge doesn’t end once you've merely completed all the levels.
pp. 9-11 · archived copy ↗ - ^MagazineEGM 1992 Buyer's Guide
How we know
Electronic Gaming Monthly's 1992 Buyer's Guide, in its editors' awards for 1991, named it Best Game of the Year, the clear winner over "Mario 4" on the Super NES; a separate Best Game of the Year (Super Nintendo) went to Mario.
AWARDS OF 1991 EGM's Editors hand out their yearly awards for the best and worst of 1991.
contents, p. 60 entry · archived copy ↗ SONIC THE HEDGEHOG The popular comparison may be Mario 4 on the Super NES vs. Sonic the Hedgehog on the Genesis but when it comes right down to it, Sonic is the clear winner. … BEST GAME OF THE YEAR (SUPER NINTENDO)
awards · archived copy ↗ - ^MagazineThe One 44 (1992-05)
How we know
At the Golden Joystick awards, voted by the public and given in London on 7 April 1992, it was Overall Game of the Year.
Overall Game of the Year: Sonic the Hedgehog (Sega) … Golden Joystick awards were doled out one more time On April 7th at the Hyde Park Hotel, London. … voted the best by you - yes, YOU - the gener- al public.
p. 17, news · archived copy ↗ - ^MagazineEGM 26 (1991-09)
How we know
Electronic Gaming Monthly reported in September 1991 that Sega called Sonic its best-selling cartridge in the United States.
Sega states that not only is Sonic their best selling U.S. cartridge ever
p. 103, "Sonic Goes Public" · archived copy ↗ - ^MagazineEGM 26 (1991-09) · EGM 1992 Buyer's Guide
How we know
Electronic Gaming Monthly reported in September 1991 that from that month Sonic would replace Altered Beast as the game packed in with the Genesis, and its 1992 Buyer's Guide says Sega bundled the game with the system and cut its price to $149.
Starting in September, Sonic will replace Altered Beast as the pack-in cart with the Genesis System!
p. 103 · archived copy ↗ Sega, on the other hand, reconfigured their system to include their mega¬ hit Sonic the Hedgehog game and also lowered the price to $149.
Editorial, 1991 · archived copy ↗ - ^MagazineEGM 26 (1991-09) · EGM 1992 Buyer's Guide
How we know
Electronic Gaming Monthly reported that Sega ran a side-by-side comparison of Sonic with "Mario 4" at the CES and similar comparisons nationwide, and that Sega officials said over 90 percent of the players preferred Sonic.
Sega ran a side-by-side compari- son with Mario 4 at the CES! … From similar comparisons held nationwide, Sega officials stat- ed that over 90 percent of the play- ers who participated in the compari- son preferred Sonic to Mario 4.
p. 103 · archived copy ↗ go public with a head-to- head comparison between their Sonic the Hedgehog and Nintendo's Mario 4 game
Editorial, 1991 · archived copy ↗ - ^WebUPI, Sonic 2 sales (1992)
How we know
UPI reported in December 1992 that Sega had sold nearly 1 million copies of the game over the previous Christmas.
Sega scored significantly last Christmas with the original 'Sonic the Hedgehog' for the 16-bit Genesis machine, selling nearly 1 million copies.
wire report, 2 December 1992 · archived copy ↗ - ^MagazineSega Saturn Magazine 21 (1997-07)
How we know
Sega Saturn Magazine wrote in July 1997 that the game had sold over 14 million copies worldwide.
Sonic the Hedgehog, which sold ovei 14 million copies worldwide
p. 36, on Sonic Team · archived copy ↗ - ^MagazineEGM 187 (2005-01) · 1UP, Sonic Boom
How we know
Electronic Gaming Monthly's 2005 list of the ten most important games since 1989 says Sonic the Hedgehog propelled the Genesis and gave Nintendo its first real competition, and 1UP's retrospective says it turned the course of the 16-bit console wars.
we picked 10 games that helped redefine the industry since our premiere issue in 1989. … his game changed the 16-bit landscape, propelled Sega's Genesis into stardom, and established the first real competition Nintendo ever had.
p. 48, "Top 10 Most Important Games" · archived copy ↗ Sonic single handedly turned the course of the 16-bit console wars.
Pressing the Attack · archived copy ↗ - ^WebThe Strong, Sonic Hall of Fame
How we know
The Strong museum's World Video Game Hall of Fame inducted it in 2016, saying its speed and its title character temporarily put Sega ahead of Nintendo in the console wars of the 1990s.
Inducted Year: 2016 … temporarily vaulting Sega ahead of Nintendo in the 1990s console wars.
Hall of Fame entry · archived copy ↗ - ^ abVerifiedsonicretro/s1disasm01 Sonic.asm 5–6
How we know
In the running game, on flat ground, out of water and without speed shoes, Sonic reaches top speed from a standstill in 128 frames, and from top speed he coasts to a stop in 128 frames with the d-pad released (
$600/$C= 128, computed).5son_maxspeed: equ $600 ; Sonic's max speed 6son_acceleration: equ $C ; Sonic's acceleration
_incObj/01 Sonic.asm lines 5–6 at 15dfa3a · upstream ↗ - Rests on In the running game, on flat ground, Sonic's top running speed is
$600(6 px/frame): holding the d-pad his ground speed stops there, and in the air the d-pad caps his X speed there too. - Rests on In the running game, on flat ground, holding the d-pad the way Sonic runs, or from a standstill, adds his acceleration,
$C, to his ground speed each frame, up to the top speed. (the acceleration added each frame) - Rests on In the running game, on flat ground, out of water and without speed shoes, with neither Left nor Right held, Sonic's ground speed loses the acceleration,
$C, each frame toward zero, stopping at exactly 0. Water halves the acceleration and speed shoes double it, and the friction with it. (the friction taken each frame)
Measured by a script. It fails if the result disagrees with the claim.
- Rests on In the running game, on flat ground, Sonic's top running speed is
- ^Verifiedsonicretro/s1disasm01 Sonic.asm 677–694, 748–752
How we know
In the running game, on flat ground, a reversal skids (stopping animation, and facing his motion) when the slowed speed is at least
$400moving right but only$301moving left, because the angle read overwrites the speed's low byte.678 ; d0 should not be used here, as it results in obInertia being 679 ; partially overwritten! This causes Sonic's skidding animation 680 ; to activate at differing speeds when he's moving left or right. ⋮ 684 move.b obAngle(a0),d0 ; get Sonic's current angle (and partially overwrite d0...) ⋮ 689 cmpi.w #$400,d0 ; has Sonic changed direction while being really fast? 690 blt.s .nostopping ; if not, don't play skidding animation/sound 691 move.b #id_Stop,obAnim(a0) ; use "stopping" animation 692 bclr #status_xflip_bit,obStatus(a0) ; clear X-flip flag (Sonic is now facing right)
_incObj/01 Sonic.asm lines 677–694 at 15dfa3a · upstream ↗ 748 cmpi.w #-$400,d0 ; has Sonic changed direction while being really fast? 749 bgt.s .nostopping ; if not, don't play skidding animation/sound ⋮ 752 bset #status_xflip_bit,obStatus(a0) ; set X-flip flag (Sonic is now facing left)
_incObj/01 Sonic.asm lines 748–752 at 15dfa3a · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Verifiedsonicretro/s1disasm01 Sonic.asm 636–672, 706–736
How we know
In the running game, on flat ground, out of water and without speed shoes, turning around from top speed takes 140 frames to reach top speed the other way when Sonic runs right, and 130 when he runs left.
665.changeddirection: 666 sub.w d4,d0 ; apply deceleration to current speed 667 bcc.s .stilldecel ; if still decelerating, branch 668 move.w #-$80,d0 ; set minimum speed on sign change
_incObj/01 Sonic.asm lines 636–672 at 15dfa3a · upstream ↗ 715.alreadyright: 716 add.w d5,d0 ; add acceleration to current ground speed 717 cmp.w d6,d0 ; is new speed above max speed? 718 blt.s .nocap ; if not, branch 719 move.w d6,d0 ; cap Sonic's ground speed ⋮ 729.changedirection: 730 add.w d4,d0 ; apply deceleration to current speed 731 bcc.s .stilldecel ; if still decelerating, branch 732 move.w #$80,d0 ; set minimum speed on sign change
_incObj/01 Sonic.asm lines 706–736 at 15dfa3a · upstream ↗ - Rests on In the running game, on flat ground, Sonic's top running speed is
$600(6 px/frame): holding the d-pad his ground speed stops there, and in the air the d-pad caps his X speed there too. - Rests on In the running game, on flat ground, holding the d-pad the way Sonic runs, or from a standstill, adds his acceleration,
$C, to his ground speed each frame, up to the top speed. - Rests on In the running game, on flat ground, holding the d-pad against Sonic's motion subtracts his deceleration,
$80, a frame, and a step that would cross zero sets the speed to$80the other way: from$40written in by the probe, Left gives −$80, and from −$40, Right gives$80. - Rests on In the running game, on flat ground, reversing from top speed, Sonic running right reaches exactly 0 on the 12th frame and −
$Con the 13th, but running left he jumps from −$80to +$80on the 12th.
Measured by a script. It fails if the result disagrees with the claim.
- Rests on In the running game, on flat ground, Sonic's top running speed is
- ^ abcVerifiedsonicretro/s1disasm01 Sonic.asm 1329–1339, 1369–1376
How we know
In the running game, on a 45° ramp built from Green Hill's
$E0ramp block, every ground frame's ground speed matched the flat-ground rules after a slope term of the sine of his angle times$20while he ran,$50while he rolled downhill and a quarter of that uphill; standing still on the ramp for 60 frames, he didn't move.1330 jsr (CalcSine).l ; get sine and cosine values for angle 1331 muls.w #$20,d0 ; multiply by resist force while walking 1332 asr.l #8,d0 ; shift down a byte ⋮ 1334 tst.w obInertia(a0) ; check Sonic's ground speed 1335 beq.s .return ; if he's standing still, branch
_incObj/01 Sonic.asm lines 1329–1339 at 15dfa3a · upstream ↗ 1369 muls.w #$50,d0 ; multiply by resist force while rolling (2.5x larger than walking) ⋮ 1376 asr.l #2,d0 ; reduce resist force while ascending a slope
_incObj/01 Sonic.asm lines 1369–1376 at 15dfa3a · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Verifiedsonicretro/s1disasm · Sonic Retro, “Sonic Physics Guide: Rolling”01 Sonic.asm 1150–1161, 1176–1187, 320–321
How we know
In the running game, on flat ground, Down without Left or Right curls Sonic into a roll when his ground speed, after this frame's friction, is at least
$80either way: out of water and without speed shoes the friction is$C, so from$8Cwritten in by the probe he rolls, from$8Bhe doesn't.1150 move.w obInertia(a0),d0 ; get Sonic's current ground speed ⋮ 1155 cmpi.w #$80,d0 ; is Sonic moving at $80 speed or faster? 1156 blo.s .noroll ; if not, branch 1157 move.b (v_jpadhold2).w,d0 ; get held buttons 1158 andi.b #btnL+btnR,d0 ; is left/right being held? 1159 bne.s .noroll ; if yes, prevent rolling (some kind of fat-fingering convenience feature?) 1160 btst #bitDn,(v_jpadhold2).w ; is down being held? 1161 bne.s Sonic_ChkRoll ; if yes, branch
_incObj/01 Sonic.asm lines 1150–1161 at 15dfa3a · upstream ↗ 1177 bset #status_rolling_bit,obStatus(a0) ; set rolling flag 1178 move.b #sonic_roll_height,obHeight(a0) ; set Sonic's hitbox height to rolling size ⋮ 1187 addq.w #sonic_height-sonic_roll_height,obY(a0) ; adjust Y-position to align Sonic to the floor
_incObj/01 Sonic.asm lines 1176–1187 at 15dfa3a · upstream ↗ 320 bsr.w Sonic_Move ; handle Sonic's left/right movement 321 bsr.w Sonic_Roll ; check if we need to roll
_incObj/01 Sonic.asm lines 320–321 at 15dfa3a · upstream ↗ In Sonic 1, 2, and 3, the Player can't begin to roll unless absolute Ground Speed is greater than or equal to 0.5 (128 subpixels)
Criteria · archived copy ↗ - Rests on In the running game, on flat ground, out of water and without speed shoes, with neither Left nor Right held, Sonic's ground speed loses the acceleration,
$C, each frame toward zero, stopping at exactly 0. Water halves the acceleration and speed shoes double it, and the friction with it. (the `$C` friction, which runs in the move routine before the roll check)
Measured by a script. It fails if the result disagrees with the claim.
- Rests on In the running game, on flat ground, out of water and without speed shoes, with neither Left nor Right held, Sonic's ground speed loses the acceleration,
- ^Verifiedsonicretro/s1disasm · Sonic Retro, “Sonic Physics Guide: Rolling”01 Sonic.asm 767–773, 791–797, 912–917, 863–873
How we know
In the running game, on flat ground, a roll never speeds up: friction takes
$6a frame whatever is held, holding against the roll takes another$20, and a ground speed past$1000written in by the probe gives an X speed of exactly ±$1000(16 px/frame)._incObj/01 Sonic.asm at 15dfa3a Our readingtop speed × 2768–769acceleration ÷ 2770–771deceleration ÷ 4772–773ground speed 0: done (not quoted)792–793moving left: to .rollingleft (not quoted)794speed − half the acceleration795no borrow, 0 or more: to .stillrollingright (not quoted)796below 0: 0797moving left: to .changedirection (not quoted)913–914else: face right, roll animation, return915–917X speed above $1000: $1000 (not quoted)863–865below −$1000: −$1000 (not quoted)868–870X velocity ← it873roll_friction_speed 0.0234375 (6 subpixels) roll_deceleration_speed 0.125 (32 subpixels)
Constants · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Verifiedsonicretro/s1disasm01 Sonic.asm 767–825
How we know
In the running game, out of water and without speed shoes, a roll started at top speed on flat ground stops on its 255th frame whether forward is held or not, and Sonic stands up on that frame. The starting frame's walking friction leaves
$600−$C=$5F4, which the roll's$6friction takes in 254 more frames (computed).767Sonic_RollSpeed: ⋮ 770 move.w (v_sonspeedacc).w,d5 ; get Sonic's current acceleration... 771 asr.w #1,d5 ; ...halved while rolling ⋮ 795 sub.w d5,d0 ; slightly decrease Sonic's current roll speed ⋮ 818 tst.w obInertia(a0) ; is Sonic standing still? 819 bne.s Sonic_AngledRollSpeed ; if not, branch ⋮ 821 bclr #status_rolling_bit,obStatus(a0) ; clear rolling flag
_incObj/01 Sonic.asm lines 767–825 at 15dfa3a · upstream ↗ - Rests on In the running game, on flat ground, Sonic's top running speed is
$600(6 px/frame): holding the d-pad his ground speed stops there, and in the air the d-pad caps his X speed there too. - Rests on In the running game, on flat ground, out of water and without speed shoes, with neither Left nor Right held, Sonic's ground speed loses the acceleration,
$C, each frame toward zero, stopping at exactly 0. Water halves the acceleration and speed shoes double it, and the friction with it. - Rests on In the running game, on flat ground, Down without Left or Right curls Sonic into a roll when his ground speed, after this frame's friction, is at least
$80either way: out of water and without speed shoes the friction is$C, so from$8Cwritten in by the probe he rolls, from$8Bhe doesn't. (the starting frame's walking friction) - Rests on In the running game, on flat ground, a roll never speeds up: friction takes
$6a frame whatever is held, holding against the roll takes another$20, and a ground speed past$1000written in by the probe gives an X speed of exactly ±$1000(16 px/frame). (forward held adds nothing in a roll)
Measured by a script. It fails if the result disagrees with the claim.
- Rests on In the running game, on flat ground, Sonic's top running speed is
- ^ abCodesonicretro/s1disasm · sonicretro/s2disasm01 Sonic.asm 316–325; s2.asm 36514–36515
How we know
Sonic 1 has no spin dash; standing on the ground, the normal-mode routine checks only for a jump, the slope, the d-pad, and a roll.
318 bsr.w Sonic_Jump ; check if we need to jump 319 bsr.w Sonic_SlopeResistWalk ; handle resistance from running up slopes 320 bsr.w Sonic_Move ; handle Sonic's left/right movement 321 bsr.w Sonic_Roll ; check if we need to roll
_incObj/01 Sonic.asm lines 316–325 at 15dfa3a · upstream ↗ 36515 bsr.w Sonic_CheckSpindash ; check for spindashs2.asm lines 36514–36515 at 4ef457c · upstream ↗ - ^Codesonicretro/s1disasm · Sonic Retro, “Sonic Physics Guide: Solid Terrain”LevelSizeLoad & BgScrollSpeed.asm 224–228; sub FindNearestTile & FindFloor & FindWall.asm 67–74, 24–26, 295–296
How we know
Each loop in Green Hill and Star Light is one 256 × 256 px chunk of level with two versions, and a loop flag on Sonic picks which one is solid under him. The zone's table names the loop chunks, Green Hill's
$B5and Star Light's$AAand$B4, their high bit marking them special in the layout; for a special chunk, with Sonic's loop flag set, the block lookup that the wall and floor searches call reads the chunk after it instead.224LoopChunkNums: ; loop loop tunnel tunnel 225 dc.b $B5, $7F, $1F, $20 ; Green Hill 226 dc.b $7F, $7F, $7F, $7F ; Labyrinth 227 dc.b $7F, $7F, $7F, $7F ; Marble 228 dc.b $AA, $B4, $7F, $7F ; Star Light
_inc/LevelSizeLoad & BgScrollSpeed.asm lines 224–228 at 15dfa3a · upstream ↗ 67.specialtile: 68 andi.w #$7F,d1 69 btst #sprite_looping_bit,obRender(a0) ; is object "behind a loop"? 70 beq.s .treatasnormal ; if not, branch 71 addq.w #1,d1 72 cmpi.w #$29,d1 ; is 256x256 chunk number $28? 73 bne.s .treatasnormal ; if not, branch 74 move.w #$51,d1 ; replace with $51
_incObj/sub FindNearestTile & FindFloor & FindWall.asm lines 67–74 at 15dfa3a · upstream ↗ 24 move.b (a1,d0.w),d1 ; get 256x256 chunk number 25 beq.s .blanktile ; branch if 0 (blank chunk) 26 bmi.s .specialtile ; branch if > $7F
_incObj/sub FindNearestTile & FindFloor & FindWall.asm lines 24–26 at 15dfa3a · upstream ↗ In Sonic 1, loop chunks are simply built different. When the Player enters the loop chunk from the left, only the right side of it is solid. As the Player goes around the loop, the entire chunk will swap for another half way and sets the left side solid instead.
Chunk Swapping · archived copy ↗ - ^Codesonicretro/s1disasm01 Sonic.asm 2058–2062, 2075–2085, 2090–2094, 2099–2135
How we know
Sonic's loop flag switches at the loop's top: on a loop chunk it clears in the chunk's first 44 px and sets from 224 px on; between them, a clear flag sets once his angle is
$01to$80($80upside down), and a set flag clears once his angle passes$80. On Star Light's second loop chunk,$B4, it clears while he is in the air. Off a loop chunk it clears, except on Green Hill's two roll-tunnel chunks, which force a roll and leave it as it is. Only Green Hill and Star Light run the check.2058Sonic_Loops: 2059 cmpi.b #id_SLZ,(v_zone).w ; is level SLZ? 2060 beq.s .levelhasloops ; if yes, check for loop chunks 2061 tst.b (v_zone).w ; is level GHZ? 2062 bne.w .return ; if not, return (level has no loops, so no need to check for them)
_incObj/01 Sonic.asm lines 2058–2062 at 15dfa3a · upstream ↗ 2075 cmp.b (v_256roll1).w,d1 ; is Sonic on a "roll tunnel" tile? (type A, entrance from the left) 2076 beq.w Sonic_ChkRoll ; if yes, force Sonic into a rolling state 2077 cmp.b (v_256roll2).w,d1 ; is Sonic on a "roll tunnel" tile? (type B, exit to the right) 2078 beq.w Sonic_ChkRoll ; if yes, force Sonic into a rolling state ⋮ 2080 cmp.b (v_256loop1).w,d1 ; is Sonic on a loop tile? (type A, entering from/exiting to the left) 2081 beq.s .chkifleft ; if yes, branch 2082 cmp.b (v_256loop2).w,d1 ; is Sonic on a loop tile? (type B, entering from/exiting to the right) 2083 beq.s .chkifinair ; if yes, branch ⋮ 2085 bclr #sprite_looping_bit,obRender(a0) ; clear loop flag (return Sonic to high plane)
_incObj/01 Sonic.asm lines 2075–2085 at 15dfa3a · upstream ↗ 2090.chkifinair: 2091 btst #status_in_air_bit,obStatus(a0) ; is Sonic in the air? 2092 beq.s .chkifleft ; if not, branch ⋮ 2094 bclr #sprite_looping_bit,obRender(a0) ; clear loop flag (return Sonic to high plane)
_incObj/01 Sonic.asm lines 2090–2094 at 15dfa3a · upstream ↗ - ^ abVerifiedsonicretro/s1disasm · Sonic Retro, “Sonic Physics Guide: Jumping”01 Sonic.asm 8, 1218
How we know
In the running game, on flat ground out of water, a jump's press frame sets Sonic's Y speed to −
$680(6.5 px/frame), whether he stands, runs, or rolls.8son_jumpspeed: equ $680 ; Sonic's jump speed_incObj/01 Sonic.asm line 8 at 15dfa3a · upstream ↗ 1218 move.w #son_jumpspeed,d2 ; set initial jump force_incObj/01 Sonic.asm line 1218 at 15dfa3a · upstream ↗ jump_force 6.5 (6 pixels and 128 supbixels)
Constants · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Verifiedsonicretro/s1disasm · Sonic Retro, “Sonic Physics Guide: Jumping”01 Sonic.asm 1224–1233; sub CalcSine.asm 53
How we know
In the running game, a jump pressed on a 45° ramp built from Green Hill's
$E0ramp block adds the jump speed along the ground normal (the sine and cosine of his angle −$40) to both his X and Y speeds, and he doesn't move that frame: standing on the ramp, both went from 0 to −1177; running up it, from 395 and −396 to −782 and −1573.1226 subi.b #$40,d0 ; rotate it perpendicularly for jump trajectory 1227 jsr (CalcSine).l ; find the direction Sonic should jump 1228 muls.w d2,d1 ; apply jump force to the cosine angle 1229 asr.l #8,d1 ; shift it to upper word 1230 add.w d1,obVelX(a0) ; apply to X speed 1231 muls.w d2,d0 ; apply jump force to the sine angle 1232 asr.l #8,d0 ; shift it to upper word 1233 add.w d0,obVelY(a0) ; apply to Y speed
_incObj/01 Sonic.asm lines 1224–1233 at 15dfa3a · upstream ↗ 53 dc.w -$100,-$FF,-$FF,-$FF,-$FE,-$FE,-$FD,-$FC ; =_incObj/sub CalcSine.asm line 53 at 15dfa3a · upstream ↗ both X Speed and Y Speed must have jump_force subtracted from them, using cos() and sin() to get the right values.
Jump Velocity · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Verifiedsonicretro/s1disasm01 Sonic.asm 8, 1273–1288; sub ObjectFall & SpeedToPos.asm 16–20
How we know
In the running game (flat ground, out of water), a standing jump peaks 39 px up tapped (the button held on the press frame only) and 100 px held (not let go before the peak), landing on frames 39 and 62.
8son_jumpspeed: equ $680 ; Sonic's jump speed_incObj/01 Sonic.asm line 8 at 15dfa3a · upstream ↗ 1276 move.w #-$400,d1 ; set max jump height_incObj/01 Sonic.asm lines 1273–1288 at 15dfa3a · upstream ↗ 16 move.w obVelY(a0),d0 ; load vertical speed 17 addi.w #gravity,obVelY(a0) ; increase vertical speed (apply gravity) ⋮ 20 add.l d0,d3 ; add speed to Y-axis position
_incObj/sub ObjectFall & SpeedToPos.asm lines 16–20 at 15dfa3a · upstream ↗ - Rests on In the running game, on flat ground out of water, letting go of the button while a jump still rises faster than 4 px/frame sets Sonic's Y speed to exactly −
$400: the release check runs before the move and gravity, so a release on any of airborne updates 1 to 12 moves him up exactly 4 px that frame and leaves −$3C8after gravity (−$400+$38, computed). - Rests on In the running game, the object fall routine adds a gravity of
$38(0.21875 px/frame²) to Sonic's Y speed on every airborne frame, rising or falling, after a jump or off a ledge, button held or not. - Rests on In the running game, landing on flat ground keeps Sonic's horizontal speed: on the landing frame his ground speed is that frame's X speed, after its air steering, drag, and move, his Y speed is 0, and he stands uncurled.
Measured by a script. It fails if the result disagrees with the claim.
- Rests on In the running game, on flat ground out of water, letting go of the button while a jump still rises faster than 4 px/frame sets Sonic's Y speed to exactly −
- ^ abVerifiedsonicretro/s1disasm · Sonic Retro, “Sonic Physics Guide: Jumping”01 Sonic.asm 1273–1288; sub ObjectFall & SpeedToPos.asm 16–20
How we know
In the running game, on flat ground out of water, letting go of the button while a jump still rises faster than 4 px/frame sets Sonic's Y speed to exactly −
$400: the release check runs before the move and gravity, so a release on any of airborne updates 1 to 12 moves him up exactly 4 px that frame and leaves −$3C8after gravity (−$400+$38, computed).1274 tst.b jumping(a0) ; is Sonic airborne specifically from a jump? ⋮ 1276 move.w #-$400,d1 ; set max jump height ⋮ 1283 cmp.w obVelY(a0),d1 ; get current y speed 1284 ble.s .return ; is Sonic moving up slower than the cap speed? if yes, branch 1285 move.b (v_jpadhold2).w,d0 ; get currently held buttons 1286 andi.b #btnABC,d0 ; is A, B or C still held after jumping? 1287 bne.s .return ; if yes, branch 1288 move.w d1,obVelY(a0) ; otherwise, cap Sonic's maximum jump height
_incObj/01 Sonic.asm lines 1273–1288 at 15dfa3a · upstream ↗ 16 move.w obVelY(a0),d0 ; load vertical speed 17 addi.w #gravity,obVelY(a0) ; increase vertical speed (apply gravity) ⋮ 20 add.l d0,d3 ; add speed to Y-axis position
_incObj/sub ObjectFall & SpeedToPos.asm lines 16–20 at 15dfa3a · upstream ↗ the computer checks to see if Y Speed is less than -4 (e.g. -5 is "less" than -4). If it is, then Y Speed is set to -4.
Variable Jump Height · archived copy ↗ - Rests on In the running game, Sonic's airborne-mode routine runs the release check before the object fall routine moves Sonic and adds gravity, so a release frame moves him by the capped speed, exactly 4 px up, and gravity adds to the cap.
- Rests on In the running game, the object fall routine adds a gravity of
$38(0.21875 px/frame²) to Sonic's Y speed on every airborne frame, rising or falling, after a jump or off a ledge, button held or not.
Measured by a script. It fails if the result disagrees with the claim.
- ^Verifiedsonicretro/s1disasm · Sonic Retro, “Sonic Physics Guide: Air State”01 Sonic.asm 939–970
How we know
In the running game, out of water and without speed shoes, in the air the d-pad adds
$18, twice the ground acceleration$C, to Sonic's X speed each frame either way, with no separate deceleration, up to the top speed; after a jump from a roll it does nothing.939Sonic_JumpDirection: 940 move.w (v_sonspeedmax).w,d6 ; get Sonic's current top speed 941 move.w (v_sonspeedacc).w,d5 ; get Sonic's current acceleration... 942 asl.w #1,d5 ; ...doubled ⋮ 951 sub.w d5,d0 ; increase leftward movement speed ⋮ 963 add.w d5,d0 ; increase rightward movement speed ⋮ 970 move.w d0,obVelX(a0) ; update Sonic's horizontal speed
_incObj/01 Sonic.asm lines 939–970 at 15dfa3a · upstream ↗ there is no distinction for deceleration in the air, either
Air Acceleration · archived copy ↗ - Rests on In the running game, on flat ground, out of water and without speed shoes, with neither Left nor Right held, Sonic's ground speed loses the acceleration,
$C, each frame toward zero, stopping at exactly 0. Water halves the acceleration and speed shoes double it, and the friction with it. (the acceleration is `$C` out of water without shoes) - Rests on In the running game, on flat ground, Sonic's top running speed is
$600(6 px/frame): holding the d-pad his ground speed stops there, and in the air the d-pad caps his X speed there too. - Rests on In the running game, on flat ground, after a jump from a roll the d-pad does nothing in the air, neither steering Sonic nor turning him, and air drag still runs.
Measured by a script. It fails if the result disagrees with the claim.
- Rests on In the running game, on flat ground, out of water and without speed shoes, with neither Left nor Right held, Sonic's ground speed loses the acceleration,
- ^Verifiedsonicretro/s1disasm · Sonic Retro, “Sonic Physics Guide: Air State”01 Sonic.asm 986–1013
How we know
In the running game, while Sonic rises no faster than 4 px/frame (Y speed −
$400to −1 before that frame's gravity), each frame subtracts his X speed shifted right 5 bits, about 1/32: an X speed of$400written in by the probe was dragged at Y speeds −$400and −1, and not at −$401or 0.986Sonic_AirDrag: 987 cmpi.w #-$400,obVelY(a0) ; is Sonic moving faster than -$400 upwards? 988 blo.s .return ; if yes, branch (skip air drag) ⋮ 992 asr.w #5,d1 ; divide that copy by $20 993 beq.s .return ; if result is zero, branch 994 bmi.s .jumpingleftward ; if speed is negative, branch 995 sub.w d1,d0 ; slightly reduce speed (air drag) ⋮ 1007 sub.w d1,d0 ; slightly reduce speed (air drag)
_incObj/01 Sonic.asm lines 986–1013 at 15dfa3a · upstream ↗ Y Speed must be negative and Y Speed must be more than -4
Air Drag · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Verifiedsonicretro/s1disasm · Sonic Retro, “Sonic Physics Guide: Rolling”01 Sonic.asm 1248–1249, 1262–1263, 944–945, 974–986
How we know
In the running game, on flat ground, after a jump from a roll the d-pad does nothing in the air, neither steering Sonic nor turning him, and air drag still runs.
1248 btst #status_rolling_bit,obStatus(a0) ; is Sonic already in a ball state? 1249 bne.s .rolljump ; if so, branch
_incObj/01 Sonic.asm lines 1248–1249 at 15dfa3a · upstream ↗ 1263 bset #status_rolljumping_bit,obStatus(a0) ; set Roll-Jump flag_incObj/01 Sonic.asm lines 1262–1263 at 15dfa3a · upstream ↗ 944 btst #status_rolljumping_bit,obStatus(a0) ; is Roll-Jump flag set? 945 bne.s Sonic_RollJumpLock ; if yes, prevent midair direction change
_incObj/01 Sonic.asm lines 944–945 at 15dfa3a · upstream ↗ In Sonic 1, 2, 3, and Knuckles, you can't control the Player's trajectory through the air with the buttons if you jump while rolling.
Rolling Jump · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Verifiedsonicretro/s1disasm01 Sonic.asm 113–116, 318, 348
How we know
In the running game, on flat ground, when Sonic walks off a ledge a jump press on any of the next 5 frames gives him no upward speed, because only the grounded modes, the normal and rolling mode routines, call the jump routine.
113Sonic_Modes: dc.w Sonic_MdNormal-Sonic_Modes ; 0 - while on the ground and not rolling 114 dc.w Sonic_MdJump-Sonic_Modes ; 2 - while in the air and not rolling
_incObj/01 Sonic.asm lines 113–116 at 15dfa3a · upstream ↗ 318 bsr.w Sonic_Jump ; check if we need to jump_incObj/01 Sonic.asm line 318 at 15dfa3a · upstream ↗ 348 bsr.w Sonic_Jump ; check if we need to jump_incObj/01 Sonic.asm line 348 at 15dfa3a · upstream ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Codesonicretro/s1disasmSonic ReactToItem.asm 376–383, 437–459; 25, 37 Rings.asm 237–241, 298
How we know
Hit without a shield, Sonic drops his rings, at most 32 of them as bouncing rings, and the count goes to 0; if no object slot is free for the bouncing rings, he is knocked back and keeps them all. With no rings he dies, unless the debug cheat is on, when he is knocked back instead.
376 tst.b (v_shield).w ; does Sonic have a shield? ⋮ 378 tst.w (v_rings).w ; does Sonic have any rings? 379 beq.w .hitWithoutRings ; if not, branch to kill Sonic ⋮ 381 jsr (FindFreeObj).l ; find a free object slot 382 bne.s .bounceSonicAway ; if object RAM is full, branch 383 _move.b #id_RingLoss,obID(a1) ; load bouncing multi rings object
_incObj/Sonic ReactToItem.asm lines 376–383 at 15dfa3a · upstream ↗ 437.hitWithoutRings: 438 tst.w (f_debugmode).w ; is debug mode cheat on? 439 bne.w .bounceSonicAway ; if yes, survive dying from no rings ⋮ 454KillSonic: ⋮ 459 move.b #6,obRoutine(a0) ; set Sonic to "Sonic_Death" routine
_incObj/Sonic ReactToItem.asm lines 437–459 at 15dfa3a · upstream ↗ 238 moveq #32,d0 ; spawn at most 32 rings_incObj/25, 37 Rings.asm lines 237–241 at 15dfa3a · upstream ↗ - ^Codesonicretro/s1disasmSonic ReactToItem.asm 376–389
How we know
Sonic 1's shield takes one hit in place of the rings; the hurt routine skips the ring drop, clears the shield, and knocks Sonic back as usual.
376 tst.b (v_shield).w ; does Sonic have a shield? 377 bne.s .bounceSonicAway ; if yes, branch ⋮ 389 move.b #0,(v_shield).w ; remove a potential shield
_incObj/Sonic ReactToItem.asm lines 376–389 at 15dfa3a · upstream ↗ - ^ManualSonic 1 US manual · Mean Machines 10 (1991-07)
How we know
The North American manual says that while Sonic holds any rings, an enemy's attack costs him all of them instead of a life, that 100 rings earn an extra life, and that collecting enough rings lets him warp to a Secret Zone, a rotating maze holding one of six Chaos Emeralds.
As long as you have | Rings, you won't be hurt when you get attacked or touch an enemy. (But you will lose all your Rings.)
Reach for the Rings! · archived copy ↗ Note: Picking up 100 Rings also earns you an extra chance.
power-ups · archived copy ↗ If you collect a certain amount of Rings, you can warp to the Secret Zone where you'll ricochet off multi-colored blocks ina 360° rotating maze! … There are six Secret Zones. In each Zone, your goal is to touch the Chaos Emerald.
Secret Zone · archived copy ↗ If Sonic collects over 50 rings when he hits the end of a level, a massive ring appears.
p. 42, "Special Stage" · archived copy ↗ - ^Codesonicretro/s1disasmSonic ReactToItem.asm 394–405; 01 Sonic.asm 1868–1869
How we know
A hit throws Sonic up at
-$400and away from the object at$200(-$200and$100underwater), and the hurt routine's gravity is$30, 8 less than the usual$38.394 move.w #-$400,obVelY(a0) ; bounce Sonic vertically 395 move.w #-$200,obVelX(a0) ; bounce Sonic horizontally ⋮ 405 neg.w obVelX(a0) ; if Sonic is right of the object, reverse
_incObj/Sonic ReactToItem.asm lines 394–405 at 15dfa3a · upstream ↗ 1869 addi.w #gravity-8,obVelY(a0) ; apply gravity (this is 8 less than the normal gravity of $38)_incObj/01 Sonic.asm lines 1868–1869 at 15dfa3a · upstream ↗ - ^Codesonicretro/s1disasmSonic ReactToItem.asm 410, 356–357; 01 Sonic.asm 1916–1925, 142–147
How we know
A hit sets the flash timer to 120 frames and landing sets it to 120 again; it counts down only in the control routine, so Sonic blinks and can't be hurt for 120 frames after he lands.
410 move.w #2*60,flashtime(a0) ; set temporary invulnerability time to 2 seconds_incObj/Sonic ReactToItem.asm line 410 at 15dfa3a · upstream ↗ 1925 move.w #2*60,flashtime(a0) ; set flash time to 2 seconds of invulnerability frames_incObj/01 Sonic.asm lines 1916–1925 at 15dfa3a · upstream ↗ 145 subq.w #1,flashtime(a0) ; decrease invulnerability frames_incObj/01 Sonic.asm lines 142–147 at 15dfa3a · upstream ↗ - ^Codesonicretro/s2disasm · sonicretro/s1disasms2.asm 37400–37407, 37409–37418; 01 Sonic.asm 8
How we know
Sonic's jump takes off at
$680subpixels per frame (6.5 px/frame),$800as Super Sonic, and$380underwater, the same take-off as Sonic 1.37400 move.w #$680,d2 ⋮ 37403 move.w #$800,d2 ; set higher jump speed if super ⋮ 37407 move.w #$380,d2 ; set lower jump speed if underwater
s2.asm lines 37400–37407 at 4ef457c · upstream ↗ 37411 subi.b #$40,d0 37412 jsr (CalcSine).l ⋮ 37418 add.w d0,y_vel(a0) ; make Sonic jump (in Y)
s2.asm lines 37409–37418 at 4ef457c · upstream ↗ 8son_jumpspeed: equ $680 ; Sonic's jump speed_incObj/01 Sonic.asm line 8 at 15dfa3a · upstream ↗ - ^Codesonicretro/s2disasm · sonicretro/s1disasms2.asm 37465–37475; 01 Sonic.asm 1276–1288
How we know
With no jump button held, the jump-height check cuts a rise faster than 4 px/frame to exactly
-$400(-$200underwater), as in Sonic 1.37465 move.w #-$400,d1 ⋮ 37468 move.w #-$200,d1 ⋮ 37470 cmp.w y_vel(a0),d1 ; is Sonic going up faster than d1? ⋮ 37475 move.w d1,y_vel(a0) ; immediately reduce Sonic's upward speed to d1
s2.asm lines 37465–37475 at 4ef457c · upstream ↗ 1276 move.w #-$400,d1 ; set max jump height ⋮ 1279 move.w #-$200,d1 ; set underwater jump height ⋮ 1288 move.w d1,obVelY(a0) ; otherwise, cap Sonic's maximum jump height
_incObj/01 Sonic.asm lines 1276–1288 at 15dfa3a · upstream ↗ - ^Codesonicretro/s2disasm · sonicretro/s1disasms2.asm 36232–36234, 36364–36366; 01 Sonic.asm 5–7
How we know
Sonic's object setup sets his top speed to
$600, his acceleration to$C, and his deceleration to$80subpixels, Sonic 1's values; speed shoes and Super Sonic swap in others.36232 move.w #$600,(Sonic_top_speed).w ; set Sonic's top speed 36233 move.w #$C,(Sonic_acceleration).w ; set Sonic's acceleration 36234 move.w #$80,(Sonic_deceleration).w ; set Sonic's deceleration
s2.asm lines 36232–36234 at 4ef457c · upstream ↗ 36364 move.w #$A00,(Sonic_top_speed).w ; restore Super Sonic's top speeds2.asm lines 36364–36366 at 4ef457c · upstream ↗ 5son_maxspeed: equ $600 ; Sonic's max speed 6son_acceleration: equ $C ; Sonic's acceleration 7son_deceleration: equ $80 ; Sonic's deceleration
_incObj/01 Sonic.asm lines 5–7 at 15dfa3a · upstream ↗ - ^Verifiedsonicretro/s1disasm · Sonic Retro, “Sonic Physics Guide: Running”01 Sonic.asm 5, 45, 940
How we know
In the running game, on flat ground, Sonic's top running speed is
$600(6 px/frame): holding the d-pad his ground speed stops there, and in the air the d-pad caps his X speed there too.5son_maxspeed: equ $600 ; Sonic's max speed_incObj/01 Sonic.asm line 5 at 15dfa3a · upstream ↗ 45 move.w #son_maxspeed,(v_sonspeedmax).w ; set Sonic's top speed_incObj/01 Sonic.asm line 45 at 15dfa3a · upstream ↗ 940 move.w (v_sonspeedmax).w,d6 ; get Sonic's current top speed_incObj/01 Sonic.asm line 940 at 15dfa3a · upstream ↗ top_speed 6
Constants · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Codesonicretro/s2disasms2.asm 37600–37613
How we know
The spin dash starts when a jump button is pressed while Sonic shows his ducking animation; the spin-dash check runs before the jump check and skips the rest of the frame.
37603 cmpi.b #AniIDSonAni_Duck,anim(a0) ⋮ 37606 andi.b #button_B_mask|button_C_mask|button_A_mask,d0 ⋮ 37611 addq.l #4,sp 37612 move.b #1,spindash_flag(a0) 37613 move.w #0,spindash_counter(a0)
s2.asm lines 37600–37613 at 4ef457c · upstream ↗ - ^Verifiedsonicretro/s1disasm · Sonic Retro, “Sonic Physics Guide: Running”01 Sonic.asm 716–719, 963–966
How we know
In the running game, on flat ground, holding forward above the top speed pulls Sonic's speed down to it in one frame, on the ground and in the air, because the ground move-right routine and the air steering cap after adding without first checking whether he is already faster.
716 add.w d5,d0 ; add acceleration to current ground speed 717 cmp.w d6,d0 ; is new speed above max speed? 718 blt.s .nocap ; if not, branch 719 move.w d6,d0 ; cap Sonic's ground speed
_incObj/01 Sonic.asm lines 716–719 at 15dfa3a · upstream ↗ 963 add.w d5,d0 ; increase rightward movement speed 964 cmp.w d6,d0 ; is new speed exceeding maximum? 965 blt.s Sonic_JumpMove ; if not, branch 966 move.w d6,d0 ; cap rightward X-speed to maximum
_incObj/01 Sonic.asm lines 963–966 at 15dfa3a · upstream ↗ Thus it is possible to curtail your forward momentum by pressing in the very direction of your motion.
Top Speed · archived copy ↗ Measured by a script. It fails if the result disagrees with the claim.
- ^Codesonicretro/s2disasm · sonicretro/s1disasms2.asm 36998–37004; 01 Sonic.asm 716–719
How we know
Holding forward no longer pulls a faster Sonic down to the top speed on the ground; the move-right routine undoes the frame's acceleration and keeps the speed he had.
36998 add.w d5,d0 ; add acceleration to the right ⋮ 37001 sub.w d5,d0 ; remove this frame's acceleration change ⋮ 37003 bge.s + ; if speed was already greater than the maximum, branch 37004 move.w d6,d0 ; limit speed on ground going right
s2.asm lines 36998–37004 at 4ef457c · upstream ↗ 716 add.w d5,d0 ; add acceleration to current ground speed 717 cmp.w d6,d0 ; is new speed above max speed? 718 blt.s .nocap ; if not, branch 719 move.w d6,d0 ; cap Sonic's ground speed
_incObj/01 Sonic.asm lines 716–719 at 15dfa3a · upstream ↗ - ^Codesonicretro/skdisasm · sonicretro/s2disasm · sonicretro/s1disasmsonic3k.asm 23866–23896, 23914; s2.asm 37763–37764; +1 files
How we know
Unlike Sonic 1 and Sonic 2, a standing player slides on a slope whose push, sine ×
$20, is at least$D; the walking and rolling factors are$20and$50.23868 muls.w #$20,d0 23869 asr.l #8,d0 23870 tst.w ground_vel(a0) 23871 beq.s loc_11DDC ⋮ 23875 add.w d0,ground_vel(a0) ⋮ 23882 add.w d0,ground_vel(a0) ⋮ 23888loc_11DDC: 23889 move.w d0,d1 23890 bpl.s loc_11DE2 23891 neg.w d1 ⋮ 23893loc_11DE2: 23894 cmpi.w #$D,d1 ⋮
sonic3k.asm lines 23866–23896 at 73de97c · upstream ↗ 23914 muls.w #$50,d0sonic3k.asm line 23914 at 73de97c · upstream ↗ 37763 tst.w inertia(a0) 37764 beq.s return_1ADCA
s2.asm lines 37763–37764 at 4ef457c · upstream ↗
Sources
Code
- Sonic Retro contributors. 2026. “s1disasm: Sonic the Hedgehog (16-bit) disassembly (sonicretro/s1disasm).” Commit 15dfa3a. sonicretro/s1disasm @ 15dfa3a · licence, all uses
- Sonic Retro contributors. 2026. “s2disasm: Sonic the Hedgehog 2 (16-bit) disassembly (sonicretro/s2disasm).” Commit 4ef457c. sonicretro/s2disasm @ 4ef457c · licence, all uses
- Sonic Retro contributors. 2026. “skdisasm: Sonic 3 & Knuckles disassembly (sonicretro/skdisasm).” Commit 73de97c. sonicretro/skdisasm @ 73de97c · licence, all uses
Primary
- Enterprises, Sega. 1991. “ソニック・ザ・ヘッジホッグ 取扱説明書 (Mega Drive, Japan).” original · archived · licence, all uses
- Corporation, Sega. 2024. “ソフトウェア一覧(セガ発売)| メガドライブ (Sega Hardware Encyclopedia).” original · archived · licence, all uses
- America, Sega of. 1991. “Sonic the Hedgehog instruction manual (Sega Genesis, US).” original · archived · licence, all uses
- SoftBank. 1991. “SONIC制作チーム LONG INTERVIEW.” Beep! MegaDrive, July 1991 issue, "ALL ABOUT ソニック・ザ・ヘッジホッグ". SoftBank. original · archived · licence, all uses
Secondary
- Publications, Sendai. 1991. “Electronic Gaming Monthly, issue 26 (September 1991).” Electronic Gaming Monthly, vol. 4, no. 26. Sendai Publications. original · archived · licence, all uses
- SoftBank. 1991. “Beep! MegaDrive (July 1991).” Beep! MegaDrive, July 1991 issue. SoftBank. original · archived · licence, all uses
- Sega Retro contributors. 2023. “Sonic the Hedgehog (Mega Drive)/Production credits.” original · archived · licence, all uses
- Sam, Kennedy,. 2011. “The Essential 50 Part 28 -- Sonic the Hedgehog (Sonic Boom).” 1UP.com, The Essential 50. 1UP.com (archived). original · archived · licence, all uses
- Alex, Wawro,. 2018. “Sonic the Hedgehog's origin story, according to the devs who made him.” Game Developer (GDC 2018 report). Game Developer. original · archived · licence, all uses
- Samuel, Claiborn,. 2014. “21 Crazy Facts About Sonic and the Console War He Started.” IGN. IGN Entertainment. original · archived · licence, all uses
- Publishing, EMAP. 1991. “Computer & Video Games, issue 117 (August 1991).” Computer & Video Games, issue 117. EMAP Publishing. original · archived · licence, all uses
- Images, EMAP. 1991. “Mean Machines, issue 10 (July 1991).” Mean Machines, issue 10. EMAP Images. original · archived · licence, all uses
- Communications, IDG. 1991. “GamePro, issue 23 (June 1991).” GamePro, issue 23. IDG Communications. original · archived · licence, all uses
- Publishing, Future. 1991. “Sega Power, issue 22 (September 1991).” Sega Power, issue 22. Future Publishing. original · archived · licence, all uses
- Publications, Sendai. 1992. “Electronic Gaming Monthly's 1992 Video Game Buyer's Guide.” Electronic Gaming Monthly's 1992 Video Game Buyer's Guide. Sendai Publications. original · archived · licence, all uses
- EMAP. 1992. “The One, issue 44 (May 1992).” The One, issue 44. EMAP. original · archived · licence, all uses
- International, United Press. 1992. “Sega reports strong 'Sonic 2' sales.” UPI Archives. United Press International. original · archived · licence, all uses
- EMAP. 1997. “Sega Saturn Magazine, issue 21 (July 1997).” Sega Saturn Magazine, issue 21. EMAP. original · archived · licence, all uses
- Media, Ziff Davis. 2005. “Electronic Gaming Monthly, issue 187 (January 2005).” Electronic Gaming Monthly, issue 187. Ziff Davis Media. original · archived · licence, all uses
- Play, The Strong National Museum of. 2016. “Sonic the Hedgehog (World Video Game Hall of Fame).” World Video Game Hall of Fame, The Strong National Museum of Play. The Strong. original · archived · licence, all uses
- Sonic Retro contributors. n.d. “Sonic Physics Guide: Rolling.” Sonic Retro. original · archived · licence, all uses
- Sonic Retro contributors. n.d. “Sonic Physics Guide: Solid Terrain.” Sonic Retro. original · archived · licence, all uses
- Sonic Retro contributors. 2023. “Sonic Physics Guide: Jumping.” Sonic Retro. original · archived · licence, all uses
- Sonic Retro contributors. n.d. “Sonic Physics Guide: Air State.” Sonic Retro. original · archived · licence, all uses
- Sonic Retro contributors. n.d. “Sonic Physics Guide: Running.” Sonic Retro. original · archived · licence, all uses