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

Proto:Sonic the Hedgehog 3/Data Leftover

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 3.

The ROM contains two kinds of leftovers. Irrelevant to Sonic 3 are various references to source code and assembler linking data for Star Trek: The Next Generation: Echoes From the Past, mainly in the area where the sound driver is located.

Secondly, toward the end of the ROM are two large areas with some leftover stage layouts and palette data from various earlier builds of Sonic 3. This includes the stage layout data for Lava Reef Zone Acts 1 and 2, and the two-player Competition zones in various states of completion. The stage palette table and the data it points to for two earlier builds are both intact. The tables below describe the contents of the leftovers. Wherever a discontinuity occurs, it means that the previous data ended and what follows is an even older leftover dataset, which normally means that its beginning is missing to a certain extent, or it's a new data array in use by the game aligned to a certain region, which in this case it cuts the previous leftover data from the end.

Star Trek Lost Data (0x04CC90-0x04FFFF)

Offset Description
---- Discontinuity ----
0x04CC90 Half pointer, partial old Sonic 3 object pointer list tail with the last 32 objects. The pointers have an offset of +0x7e in comparison to the ones used.
---- Discontinuity ----
0x04CD0E Half pointer, partial older Sonic 3 object pointer list tail with the last 3 objects. The pointers have an offset of +0x88 in comparison to the ones used.
---- Discontinuity ----
0x04CD18 Star Trek Mapping / Other data present in the final at offset 0x0d2138 albeit with different tile indices.
0x04E680 Star Trek Unknown Art at offset 0x0d3436, Not a 1:1 match against the final version.
0x04FAF8 Unknown Data, small pieces from this region appear scattered throughout the Star Trek binary.
---- Discontinuity ----
0x050000 Sonic Main Tileset, in use.

Chunk 1 (0x1AACAE-0x1C7FFF)

Offset Description
---- Discontinuity ----
0x1AACAE Partial kosinski archive for the slot bonus stage tiles, 1536 bytes missing at the beginning, otherwise matching the block at 0x1a9d0e+.
0x1AAE0E Mapping (128x128 for Slots, same as the one used in the prototype).
0x1ADD54 Mapping (16x16 mapping for Lava Reef Zone).
0x1AEF34 Lava Reef Zone's Primary KosM archive header.
0x1AEF36 Lava Reef Zone tiles.
0x1AF846 Lava Reef Zone tiles, platforms.
0x1B0056 Lava Reef Zone tiles, rocks.
0x1B0A86 Lava Reef Zone tiles.
0x1B1446 Lava Reef Zone tiles.
0x1B1E16 Lava Reef Zone tiles.
0x1B27C6 Lava Reef Zone tiles.
0x1B2A86 Blank Lava Reef Zone tiles.
0x1B2AC6 Solid like tiles, glowing rocks.
0x1B2D36 Solid like tiles.
0x1B2ED6 Mapping (128x128 mapping for Lava Reef Zone).
0x1B5DB6 Mapping (16x16 mapping for Azure Lake Zone).
0x1B66D6 KosM archive header.
0x1B66D8 Azure Lake Zone tiles.
0x1B6FE8 Azure Lake Zone tiles.
0x1B7958 Azure Lake Zone tiles.
0x1B82C8 Azure Lake Zone tiles (bg).
0x1B89D8 Azure Lake Zone tiles (bg).
0x1B8EE8 ALZ 128x128 mapping.
0x1B9568 16x16 mapping, BPZ placeholder.
0x1B95D8 KosM archive header, BPZ placeholder tiles.
0x1B95DA Solid like tiles.
0x1B987A Solid like tiles.
0x1B99FA 128x128 mapping, BPZ placeholder.
0x1B9B7A 16x16 mapping, DPZ placeholder.
0x1B9C0A KosM archive header, DPZ placeholder tiles.
0x1B9C0C Solid like tiles.
0x1B9EAC Solid like tiles.
0x1BA05C 128x128 mapping, DPZ placeholder.
0x1BA24C 16x16 mapping, CGZ placeholder.
0x1BA29C KosM archive header, CGZ placeholder tiles.
0x1BA29E Solid like tiles.
0x1BA53E Solid like tiles.
0x1BA6BE 128x128 mapping, CGZ placeholder.
0x1BA82E 16x16 mapping, EMZ placeholder.
0x1BA8DE KosM archive header, EMZ placeholder tiles.
0x1BA8E0 Solid like tiles.
0x1BAB80 Solid like tiles.
0x1BAD00 128x128 mapping, EMZ placeholder.
0x1BAF10 Mapping (16x16 for Gumball bonus stage), same as 0x1a4578.
0x1BB2D0 Gumball's KosM archive header (copy of 0x1a4938, in use by the game).
0x1BB2D2 Gumball tiles.
0x1BB7F2 Gumball tiles.
0x1BBC42 Mapping (128x128 for Gumball bonus stage), same as 0x1a52aa.
---- Discontinuity ----
0x1BBF92 Partial Azure Lake tiles 230 bytes missing at the beginning, otherwise matches block at 0x1b7958+
0x1BC81C Azure Lake Zone bg tiles
0x1BCF2C Azure Lake Zone bg tiles
0x1BD43C ALZ 128x128 mapping, same as 0x1b8ee8
0x1BDABC BPZ 16x16 mapping, (copy of 0x197b30, in use by the game)
0x1BE39C KosM archive header (whole art block is a copy of 0x198400, in use by the game)
0x1BE39E Balloon Park Zone tiles
0x1BEBEE Balloon Park Zone tiles
0x1BF42E Balloon Park Zone tiles (bg)
0x1BFB1E Balloon Park Zone tiles (bg)
0x1C037E BPZ 128x128 mapping (copy of 0x19a3e2, in use by the game)
0x1C0A6E DPZ 16x16 mapping
0x1C142E KosM archive header slightly different than the used ingame copy at 19B4B2, missing 10 tiles at the end resembling a pillar
0x1C1430 Desert Palace Zone tiles
0x1C1D30 Desert Palace Zone tiles
0x1C2640 Desert Palace Zone tiles with numbers
0x1C2D60 Desert Palace Zone placeholder tiles, it's all numbers
0x1C2E20 DPZ 128x128 mapping
0x1C3430 CGZ 16x16 mapping - partial, 754 bytes missing at the end, matching 0x19D5D4
---- Discontinuity ----
0x1C4000 LBZ/HCZ Waterline scroll (this might be in use, after all it chops the previous data chunk where normally it wouldn't)
0x1C5040 Angle Array
0x1C5240 Height maps
0x1C7240 Rotated Height maps (partial)
---- Discontinuity ----
0x1C8000 LBZ/HCZ Waterline scroll, in use

Chunk 2 (0x1EAF4A-0x1F6FFF)

Offset Type Description
---- Discontinuity ----
0x1EAF4A Map Lava Reef Zone act1 (partial), 2324 bytes out of 3624, 1300 bytes missing.
0x1EB85E Map Lava Reef Zone act2, 3184 bytes out of 3184, 0 bytes missing.
0x1EC4CE Map Lava Reef Zone act1, 3624 bytes out of 3624, 0 bytes missing.
0x1ED2F6 Map Lava Reef Zone act1, 3624 bytes out of 3624, 0 bytes missing.
0x1EE11E Map Lava Reef Zone act1, 3624 bytes out of 3624, 0 bytes missing.
0x1EEF46 Map Lava Reef Zone act1, 3624 bytes out of 3624, 0 bytes missing.
0x1EFD6E Map Lava Reef Zone act1, 3624 bytes out of 3624, 0 bytes missing.
0x1F0B96 Map Lava Reef Zone act1, 3624 bytes out of 3624, 0 bytes missing.
0x1F19BE Map Azure Lake
0x1F1B2A Map Balloon Park
0x1F1C04 Map Desert Palace
0x1F1D58 Map Chrome Gadget
0x1F1F9A Map Endless Mine
0x1F20EE Map Gumball Bonus stage
0x1F21CE Pointers Offset addresses of the color palettes (very old)
0x1F25AE Color Palettes Color Palettes (very old)
---- Discontinuity ----
0x1F338E Map Lava Reef act1 rock sprite object locations, matches the copy at 0x1ea410
0x1F4455 Map Azure Lake
0x1F45C2 Map Balloon Park
0x1F46A6 Map Desert Palace
0x1F478E Map Chrome Gadget
0x1F4A56 Map Endless Mine
0x1F4BAA Map Gumball Bonus stage
---- Discontinuity ----
0x1F3EC4 Map Lava Reef Zone act1 (partial) 1426 bytes out of 3624, 2198 bytes missing.
0x1F4C8A Pointers Offset addresses of the color palettes (old)
0x1F4E6A Color Palettes Color Palettes (old)
0x1F5D0A Map Lava Reef act1 rock sprite object locations, matches 0x1f338e and 0x1ea410
---- Discontinuity ----
0x1F5D0A Map Partial Lava Reef act1 rock sprite object locations, 108 / 2870 bytes
---- Discontinuity ----
0x1F5D0A Map Partial Lava Reef act1 rock sprite object locations, 406 / 2870 bytes
0x1F6A4A Padding
---- Discontinuity ----

Chunk 3 (0x1FFBD8-0x1FFFFF)

Offset Description
---- Discontinuity ----
0x1FFBD8 Partial LBZ act2 ring layout, 80 bytes missing from the beginning, the rest matches the in-game block.
0x1FFFC8 Partial auto tunnel data, only the first 56 bytes present, matches the copy used by the game.
---- End of ROM ----

Extracting the archives from these lost regions makes it possible to have a small peek at how stages progressed over time. Generally, the stages layout didn't change significantly: Lava Reef though the visuals are very different from the final rendition on Sonic & Knuckles, its layout is very similar. The competition stages had some slight adjustments, mostly repeating the layout more or less as the game development progressed and finally shifting the layouts down by 256 pixels in some cases to add some ceiling barriers, preventing players from cheating by going over the top. The older layouts, using placeholder tiles and blocks don't specify any background with the exception of Azure Lake, which had its art already by that point. The color palettes are mostly the same in regards of the competition zones with the exception of Balloon Park which changed drastically in color tone, and to a lesser extent, Chrome Gadget having an additional gradient color in the sky.

Stages

Lava Reef Zone

Within the leftover data, 8 copies of Lava Reef Act 1's layout can be found, along with a copy of most of its other relevant data (palette, art, blocks, chunks, palette cycle, animated background routine, small rock locations, etc.). There is also the Act 2 layout further past the location where Act 1 is stored, seemingly used as placeholder data. The only data missing is collision and object/ring data (assuming the latter existed at this point).

Azure Lake

Foreground
Sonic3-1103 leftover ALZ.png
Background
Sonic3-1103 leftover ALZ-BG.png

This old Azure Lake has a different background, one that's more cyan and filled with flowers instead of water, resembling Sonic 2's Emerald Hill. The two lost copies of Azure Lake's data are incomplete but otherwise identical, still differing from the files that ended up in the game.

Balloon Park

Foreground
Sonic3-1103 leftover BPZ.png
Background
Sonic3-1103 leftover BPZ-BG.png
Placeholder art files
Sonic3-1103 leftover BPZ - art placeholder.png

This old Balloon Park used to have different color tones, notably more purples.

Desert Palace

Foreground
Sonic3-1103 leftover DPZ.png
Background
Sonic3-1103 leftover DPZ-BG.png
Placeholder art files
Sonic3-1103 leftover DPZ - placeholder art.png

Old Desert Palace has a slightly different quarter-pipe chunk leading to the lap checkpoint.

Chrome Gadget

Placeholder art files
Sonic3-1103 leftover CGZ - placeholder art - layout 1f478e.png
Placeholder art files
Sonic3-1103 leftover CGZ - placeholder art - layout 1f1d58.png

No art present as it's below the cutoff region at 0x1c7FFF. Only placeholder tiles and generic mappings exist from the older block.

Endless Mine

Placeholder art files
Sonic3-1103 leftover EMZ - placeholder art.png

Like Chrome Gadget, no art is present. Both layouts are identical.

Gumball Bonus Stage

The Gumball stage data present in these lost archives is exactly the same as the version referenced by the game.

Palette Tables

The palette block used in-game is the one on the left.

0x1E96D4 (Used) 0x1F25AE (Very Old) 0x1F4E6A (Old)
Sonic 3 Nov3 Palletes 1E96D4.png Sonic 3 Nov3 Palletes 1F25AE.png Sonic 3 Nov3 Palletes 1F4E6A.png
The prototype main color palette array, a large majority of which are referenced and used. It does not contain the palettes for Mushroom Valley or Lava Reef. The oldest group of unused palettes. Hydrocity's bricks have orange/purple colors, and the outside palette for Ice Cap Act 2 does not exist. The Mushroom Valley and Lava Reef palettes are still present, and of all the Competition Zones, only Azure Lake has an entry, and early boss palettes are present as well. Another group of unused palettes. Mostly similar to the previous one, except Hydrocity now has the final brick brown shades, an early version of Ice Cap Act 2's outdoors palette exists, and more of the Competition Zones have palettes with only Endless Mine still missing.
Hmmm...
To do:
Add the rest of the offsets and images.

Hydrocity Zone Act 1 underwater

Original Alternate
0x1F53AA
Sonic3 Nov3-1993 HCZ1 Unused Palette Underwater screenshot 2.png

Hydrocity Zone Act 1
The bricks in the oldest palette are red in the foreground and lavender in the background. Later palettes changed them to green and purple.

Original Alternate 1 Alternate 2
Sonic3 Nov3-1993 HCZ1 Used Palette.png Sonic3 Nov3-1993 HCZ1 Unused Palette 1.png Sonic3 Nov3-1993 HCZ1 Unused Palette 2.png
Sonic3 Nov3-1993 HCZ1 Unused Palette 1 screenshot 1.png Sonic3 Nov3-1993 HCZ1 Unused Palette 2 screenshot 1.png

Hydrocity Zone 2
Differences suggest that Act 2 had an earlier background palette.

Original Alternate 1 Alternate 2
Sonic3 Nov3-1993 HCZ2 Unused Palette.png Sonic3 Nov3-1993 HCZ2 Unused Palette 1.png 0x1F534A
Sonic3 Nov3-1993 HCZ2 Unused Palette 1 screenshot 1.png Sonic3 Nov3-1993 HCZ2 Unused Palette 2 screenshot 2.png

IceCap Zone Act 1 and 2 "Cavern Area"

Original Alternate 1 Alternate 2
Sonic3 Nov3-1993 ICZ1-2 Used Palette.png Sonic3 Nov3-1993 ICZ1-2 Unused Palette 1.png 0x1F554A
Sonic3 Nov3-1993 ICZ1-2 Unused Palette 2 screenshot 2.png

IceCap Zone Act 2 "Outside" Act 2 does not have a unique palette in the oldest palette table, possibly indicating the level was entirely indoors.

Original Alternate
Sonic3 Nov3-1993 ICZ2 Palette.png 0x1F55AA
Sonic3 Nov3-1993 ICZ2 Unused Palette 2 screenshot 2.png

Mushroom Valley Zone Act 1 and 2

Original Alternate 1
0x1F582A and 0x1F588A
Sonic the Hedgehog 3 (Nov 3

Lava Reef Zone Act 2
Though the colors are arranged differently, the palette is somewhat similar to Lava Reef Act 2.

Original Alternate
0x1F302E and 0x1F594A

Balloon Park
This palette matches the final Competition Mode icon's colors.

Original Alternate
0x1F5B2A
Sonic the Hedgehog 3 (Nov 3, 1993 prototype) BPZ.png

Chrome Gadget
This palette shows an otherwise unseen part of the background, and matches the final icon's colors.

Original Alternate
Sonic the Hedgehog 3 (Nov 3, 1993 prototype) CGZ Pallete 2.png
Sonic the Hedgehog 3 (Nov 3, 1993 prototype) CGZ alt 2.png

Angel Island Zone Act 1 (used in an early cutscene?)

Hmmm...
To do:
Offset for the Very Old version.

An unused AIZ1 color palette appears to be a mix between the beach cutscene and the forest interior, as if the forest background did not exist. This color palette has been removed in the version used by the prototype. It is speculated that this color palette might have been meant for an earlier AIZ background that was featured in a prototype version of Sonic Jam (Game.com)

Alternate 1
0x1F5C4A
Sonic the Hedgehog 3 (Nov 3, 1993 prototype) AIZ 2.png

Unknown Palette #1
An unknown palette near the end of the table, possibly intended for a boss. It has some similarities to Gapsule. No such palette exists in the final game.

Original Alternate
0x1F32CE

Early Carnival Night Zone Act 2 boss
An early palette for Carnival Night Zone Act 2's boss.

Original Alternate
0x1F32EE

Early Launch Base Zone Act 1 boss
An early palette for the Twin Hammer miniboss.

Original Alternate
0x1F330E

Unknown Palette #2
Another unknown palette near the end of the table, possibly intended for a boss. No such palette exists in the final game.

Original Alternate
0x1F332E

Early Launch Base Zone Act 2 boss
An early palette for the Launch Base Act 2 ball shooter boss.

Original Alternate
0x1F334E

Early Mushroom Valley Act 1 boss
An early palette for the Hey Ho miniboss.

Original Alternate
0x1F336E

Source Code

Pieces of the source code for Star Trek: The Next Generation linger at various parts of the ROM. Like other prototypes, this was likely the result of the game being leftover in the memory of the compiler.

At 0xAFF0E:

                          ,WhichMessage
                Bra     @DoneInput

@InComingHail:
                Move.w  #3,WhichMessage
                Bra     @DoneInput

@ImpulseDamaged:
                Move.w  #4,WhichMessage
                Bra     @DoneInput

At 0xBFAB4:

                                                                  the screen.

DMAScrollArrows:
                Subq.w  #1,ArrowDelay                           ; Determine if arrow buffers or blanks should
                Bne.s   @NoTogg                                 ;  be DMA'ed this makes the arrows flash.

                Move.w  #15,ArrowDelay                          ; Reset delay between flashes.
                Eor.w   #1,ArrowToggle                          ; Toggle between blanks and arrows.

@NoTogg:
                Tst.w   ArrowToggle                             ; Branch to relevent bit.
                Beq.s   @ArrowsOff

; ====== Arrows on, DMA the buffers. ======

                Lea     UpArrowBuffer,A0                        ; Source.
                Lea     ScrollBBase+(27*2)+(21*64),A1           ; Destination.
                Move.w  #1,D0                                   ; Number of words.
                Move.l  #VDP_VRAMWrite,D1                       ; Set to write to VRAM.   
                Moveq   #2,D2                                   ; Auto increment.        
                Jsr     PushDMA                                 ; Move characters to VRAM.

                Lea     DownArrowBuffer,A0                      ; Source.
                Lea     ScrollBBase+(27*2)+(26*64),A1           ; Destination.
                Move.w  #1,D0                 

At 0xCF970:

                Lea     ScrollBBase+($b*64)+(27*2),A1
                Jsr     Word_2GVRAM    
                Move.w  #AsciiOffset+CHR_Palette0+CHR_HighPri,D5 ; Color is different if in impulse.

                Bra     @DoneSeperators

@NotImpulse:
                Move.w  #AsciiOffset+CHR_Palette3+CHR_HighPri+'.',D0        ; Place decimal points and '/' seperators.
                Lea     ScrollBBase+($5*64)+(28*2),A1           
                Jsr     Word_2GVRAM     
                Lea     ScrollBBase+($7*64)+(27*2),A1
                Jsr     Word_2GVRAM     
                Lea     ScrollBBase+($d*64)+(28*2),A1
                Jsr     Word_2GVRAM     
                Move.w  #AsciiOffset+CHR_Palette3+CHR_HighPri+'/',D0  
                Lea     ScrollBBase+($9*64)+(27*2),A1
                Jsr     Word_2GVRAM    
                Lea     ScrollBBase+($b*64)+(27*2),A1
                Jsr     Word_2GVRAM    
                Move.w  #AsciiOffset+CHR_Palette3+CHR_HighPri,D5 ; Set up character color.

@DoneSeperators:
                Move.w  CurrentDistance,D7                      ; Get whole part of DISTANCE.
                Moveq   #3,D6                                   ; Three characters.
                Moveq   #'$',D2                                 ; Lead with a spaces.
                Lea     ScrollBBase+($5*64)+(25*2),A1           ; Screen destination.
                Jsr     PrintVal                                ; Print it.
                Move.w  CurrentDistance+2,D7                    ; Get fractional part of DISTANCE.
                Moveq   #2,D6                                   ; Two digits.
                Move.w  

At 0xDFEF3:

                                              _No1,VIEW_NOT_FLIPPED,VIEW_SIZE_6
                Dc.b    VIEW_PLANET10,VIEW_PAL_NoA,VIEW_FLIPPED,VIEW_SIZE_6

                Dc.b    VIEW_PLANET4,VIEW_PAL_NoC,VIEW_FLIPPED,VIEW_SIZE_7
                Dc.b    VIEW_PLANET10,VIEW_PAL_No1,VIEW_NOT_FLIPPED,VIEW_SIZE_7