don't click here

Weird routine in Sonic and Knuckles

Discussion in 'Engineering & Reverse Engineering' started by shobiz, Feb 22, 2008.

Thread Status:
Not open for further replies.
  1. I was going through Stealth's Sonic and Knuckles disassembly today when I noticed a weird routine located at $522 (right after JumpToSegaScreen). It starts off similar to the checksum error routine, but the main body does something completely different, which produces a weird multi-colour flickering effect. (To see the routine in action, enter the PAR code 0004C8:0522 in either S&K or S3K and restart the game)

    Apologies if this is well known, but I searched and couldn't find any reference to it. The routine isn't referenced anywhere by the game code, but judging by its placement it seems to be an alternate checksum error screen. Pretty minor, but kinda cool all the same.
     
  2. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    Yup, weird. I know some games use a flashing screen to show that the checksum is wrong, but not so untimely like that. Maybe it was some quick checksum subroutine that tried to be elegant and failed? Because as far as I know you can hack S&K without fixing the checksum and it'll yet work. I think only Sonic 1 required the checksum to be fixed.
     
  3. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Woah, That is weird. It almost melts your brain to look at that. But your right, that is pretty cool.
     
  4. Yeah, Sonic and Knuckles's checksum routine has the instruction to loop over the entire ROM and the branch to the incorrect checksum routine NOPed out, so the checksum check is effectively useless.
     
  5. Puto

    Puto

    Shin'ichi Kudō, detective. Tech Member
    2,013
    0
    16
    Portugal, Oeiras
    Part of Team Megamix, but haven't done any actual work in ages.
    Interestingly enough, the S2K upmem has a correct checksum-error routine, but it's never called.
     
  6. ICEknight

    ICEknight

    Researcher Researcher
    Heh, looks like some programmer was bored. Nice find.
     
  7. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    Or somebody forgotten to check for VBlank :P
     
Thread Status:
Not open for further replies.