Jump to content

  •  

Photo

Fixing the top-right corner reloading glitch in S1


  • This topic is locked This topic is locked
6 replies to this topic

#1 SpirituInsanum

SpirituInsanum

    6 Chaos Emeralds

  • Pro User
  • 613 posts
  • Gender:Male

Posted 03 September 2012 - 01:13 PM

You may have noticed this minor glitch in Sonic 1:

Posted Image


It can happen anywhere, but most of the time when going right and up or down, and it will get worse if you remove the speed cap.

To summarize MarkeyJester's explanation on the matter, the 68k is too slow to transfer all the blocks soon enough if that transfer happens too long after the v-blank interruption.

Among the possible fixes proposed, rewriting the routine to make the block/tiles loading faster or making the transfer happen sooner seemed too technical and long for me. So rather than doing that, I decided to give the map plane redrawing some advance, one column should be enough after all.

This fix is far from being complicated: we have 5 lines to change.

Go in Draw_FG and Draw_BG1, and find this:

move.w #$140,d5

You'll find it twice in Draw_FG and twice in Draw_BG1. Replace those lines with:

move.w #$150,d5


If you do only this, there will be holes in the planes when going up or down, one block per line.

In order to fix this, we have to load one more block per line.

Go in DrawTiles_LR (this routine is used to redraw a line of blocks) and replace

moveq #$15,d6

with

moveq #$16,d6


That's it, the problem should be gone.

Thanks to Vladikcomper for his commented version of the redrawing routine which helped me a lot.
  • 4

#2 redhotsonic

redhotsonic

    Also known as RHS

  • Staff
  • 1590 posts
  • Gender:Male
  • Location:United Kingdom

Posted 03 September 2012 - 03:19 PM

I will look into fixing this for my Sonic 2 hack, but isn't this due to the camera manager? I believe it's practically the same in Sonic 1 and 2, but in S3K, it had a new manager, fixing this problem.



Either way, nice fix. This was something that always bugged me in Sonic 2.



EDIT: Tried this for my Sonic 2 hack. Tried reproducing the bug in my Great Gate Zone and in Gem Runway Zone (my fastest level) and even with water, can't reproduce the glitch. I'm glad you shared this with us.

Edited by redhotsonic, 03 September 2012 - 03:41 PM.

  • 0

#3 SpirituInsanum

SpirituInsanum

    6 Chaos Emeralds

  • Pro User
  • 613 posts
  • Gender:Male

Posted 03 September 2012 - 03:51 PM

It doesn't happen in S2, I don't really know why, but maybe the blocks are redrawn earlier as Markey suggested, since the routine itself is essentially the same.
  • 0

#4 redhotsonic

redhotsonic

    Also known as RHS

  • Staff
  • 1590 posts
  • Gender:Male
  • Location:United Kingdom

Posted 03 September 2012 - 04:19 PM

It doesn't happen in S2, I don't really know why, but maybe the blocks are redrawn earlier as Markey suggested, since the routine itself is essentially the same.


Eh? Yes it does. Try CPZ, it's there all the time =P
  • 0

#5 SpirituInsanum

SpirituInsanum

    6 Chaos Emeralds

  • Pro User
  • 613 posts
  • Gender:Male

Posted 03 September 2012 - 05:26 PM

Eh? Yes it does. Try CPZ, it's there all the time =P

Really? I never managed to see it there xD

Well, this could/should fix it in s2 as well then, thanks for the info.
  • 0

#6 redhotsonic

redhotsonic

    Also known as RHS

  • Staff
  • 1590 posts
  • Gender:Male
  • Location:United Kingdom

Posted 03 September 2012 - 08:17 PM

Yeah, it's quite common in CPZ. To be honest, I've never noticed this bug in Sonic 1 =P


But your fix here works for both Sonic 1 and 2.
  • 0

#7 Psycho RFG

Psycho RFG

    3 Chaos Emeralds

  • Member
  • 183 posts
  • Gender:Male

Posted 05 September 2012 - 01:46 PM

Well done! It's good to see another bug finally fixed. Thanks for this guide.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users