don't click here

Unused objects in Sonic 3k

Discussion in 'Engineering & Reverse Engineering' started by shobiz, May 18, 2008.

Thread Status:
Not open for further replies.
  1. (The first part of this post is a copypasta from my earlier post in The Supreme Topic of 'Other' Knowledge, that can be deleted if needed)

    Anyone have any idea what this is supposed to be?

    [​IMG]
    [​IMG]

    It's object ID $12 in the first object pointer list in Sonic 3k. It's not placed in any level, but the graphics fit perfectly in both acts of LBZ. All it does is moves down to a target position (or up, depending on a flag) when it senses a flag has been set, and then moves up to its original position (or down, depending on the same flag) when it senses the flag has been cleared. The use of the flag leads me to think this was supposed to be triggered by a button or some other external event.

    If anyone wants to play around with it, use the PAR code 1EFC52:1200, which replaces the first monitor in LBZ with this. To make it move down, use the (Kega specific) PAR code FFF7E0:00FF, and once it's moved fully down use the (again Kega specific) PAR code FFF7E0:0000 to make it move up again. While moving down, it'll get overlapped by level tiles, so I recommend also using 025B00:C3C3 to give the object high priority and make it visible over the level tiles. Alternatively, if you want one which starts off downwards and moves up, along with the first PAR code use 1EFC50:25F0. This is the exact opposite - it starts off down and moves up when the flag is set. The code for this is at $25AF6, it's marked as Obj_12_1 in Stealth's disasm.

    Another unused sprite, at object id $1A:

    [​IMG]

    Unfortunately the graphics for this one don't seem to be present in any level, so it's hard to tell what it's supposed to be. You can control it using controller 2 - pressing A rotates it anti-clockwise, C rotates it clockwise and B resets it to horizontal. Normally, without any modifications, when you reach the centre you get sorta stuck there, just gaining speed until you jump off. However, in what I believe to be a coding error, the code for this object contains these two lines:
    Code (ASM):
    1. lea     (Vectors+$30).w,a2
    and
    Code (ASM):
    1. lea     (Vectors+$34).w,a2
    Loading part of the vector table is strange in itself, but later on an attempt is made to write to these addresses, which makes no sense at all and should apparently cause real hardware to crash. If you replace these two lines with
    Code (ASM):
    1. lea     $30(a0),a2
    and
    Code (ASM):
    1. lea     $34(a0),a2
    the cool running effect disappears and Sonic can just slide down these without hinderance, so I have no idea whether the effect was intended or just a coding error.

    Although the graphics appear garbled, the code for this exists in the middle of other LBZ objects, so I think it's safe to assume it was intended for LBZ. If anyone wants to play around with these, you can use the PAR codes 094EA6:0002 and 094EA8:7106 to replace all in-level monitors with this object. Additionally, if you want to fix what I believe to be a coding error, also use the PAR codes 027270:45E8 and 027284:45E8. Anyone have more info about this?
     
  2. Dan Lioneye

    Dan Lioneye

    Member
    311
    1
    0
    UK
    Why is it that object's graphics are different for different levels/different parts of a level (for example when you encounter robotnik, some items' graphics change)?
     
  3. SGR

    SGR

    Give me the gams. Member
    They're called Pattern Load Cues. All of the graphics for every single object can't be stored in VRAM so some need to be written over for a certain event. (Most notably bosses.)
     
  4. Tweaker

    Tweaker

    Banned
    12,387
    2
    0
    To elaborate on that, each object is set to read graphics data from a hardcoded tile offset in VRAM. It will always read from this location, and assume that the PLCs will place the relevant graphics there. In certain levels where the relevant graphics aren't stored at this tile offset, it'll display whatever's there. Since the sprite mappings are not made to accommodate the incorrect tiles in whatever graphics that are there, it displays what appears to be unintelligible garbage.

    Of course, it's still valid graphics data—it's just being displayed in a nonsensical fashion. :)
     
  5. Uberham

    Uberham

    King Of Oblivion Member
    Long and short, Any shit that's not being used to display the boss scene is overwitten by the shit needed to display the boss scene, as anything outside that will not be used until the boss is defeated and off screen, so shit like Item Boxes and Enemies are cancelled, and their space is used to generate the boss.

    In the case of S3/S3K the stuff is put back after the boss is defeated/the act is over, as demonstrated in the tasvideos.org run of S3K (mushroom hill act 1 & 2)
     
  6. [​IMG]

    Object $1D, a platform which you can hang on to at the bottom. Neat idea, I wonder why they scrapped it.
     
  7. ICEknight

    ICEknight

    Researcher Researcher
    Hmm, this is some interesting stuff.
     
  8. Indeed it is. Though I'm betting they scrapped it cuse they thought the object slowed down gameplay too much or something, or simply their final revision had no place for it.
     
  9. GeneHF

    GeneHF

    SEGA-ier than you'll potentially ever be. Site Staff
    8,429
    59
    28
    Scenic Studiopolis
    Complete Global Conquest
    The idea makes me think of those hang lifts in Death Egg Zone. Perhaps a similar idea was thought for Launch Base?
     
  10. MathUser

    MathUser

    3rd top wiki contributor Researcher
    2,151
    8
    18
    The arros on the first platfrom makes me think that it was movable via controller, but instead it moves up and down like those round tubes on that carnival level.
     
  11. Well, I finished going through the entire first object pointer list, the results can be seen at SCHG:Sonic 3 & Knuckles#Object_Pointer_List. Unfortunately there are only two other unused objects, $23 and $27, and they aren't particularly interesting. Slot $1C, which is empty, is in the middle of a lot of other LBZ objects, so it's likely it also contained some LBZ object which was scrapped during development and actually deleted.

    I'll be going through the second object pointer list later on, though I don't know if that'll have any unused objects.
     
  12. SGR

    SGR

    Give me the gams. Member
    Could you at least describe them? I think it might be interesting to hear at least a tidbit or two about them.
     
  13. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,239
    972
    93
    Long-term happiness
    Is 0x23 used at the start of HZ and MGZ?
     
  14. redhotsonic

    redhotsonic

    Also known as RHS Tech Member
    1,587
    10
    18
    United Kingdom
    YouTuber
    Pretty interesting stuff. These objects couldn't be left objects from the old sonic games like Sonic 2 (just a suggestion)?
     
  15. MK

    MK

    Hacker Oldbie
    310
    0
    0
    New England, USA
    Secret :o o:
    That sounds correct.

    The other, no idea, sounds like a debugging tool.
     
  16. SGR

    SGR

    Give me the gams. Member
  17. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    According to SonED, there is no object there. But maybe I'm doing it wrong.
     
  18. MK

    MK

    Hacker Oldbie
    310
    0
    0
    New England, USA
    Secret :o o:
    Oh, I was refering to a different location. Specifically, the area in Hydrocity after you get shot out of the water, when the water level changes, and Sonic's sprite changes to falling. Someone check if it's there :o
     
  19. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    No, no objects there.

    Give up dude, if shobiz says they are unused, it means that they really are unused. He knows what he is talking about.
     
Thread Status:
Not open for further replies.