Sonic and Sega Retro Message Board: VDP debug shows differently - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 
Page 1 of 1

VDP debug shows differently My view on the Labrynth Zone Crash

#1 User is offline Nostalgia Ninja 

Posted 08 November 2011 - 11:21 PM

  • Night and day become one and two worlds come together.
  • Posts: 15
  • Joined: 23-October 11
  • Gender:Male
  • Location:Everywhere and nowhere
  • Project:Mastering SonED2 With Assembly guides Vol. 1
According to the VDP of the Sonic sprites when the game has crashed, the locator indicates that he is not rolling, but rather crouching still. The sprite indicators still say he's offscreen, but the limiters for the sprite stop him from falling off the stage. That, and also the game would have rather killed Sonic than throwing the ILLEGAL INSTRUCTION exception then.

My guess is that the pallettes collide in Sonic 1's underwater pointers, and therefore tries to pallete switch. and then crashes

#2 User is offline FraGag 

Posted 08 November 2011 - 11:51 PM

  • Posts: 652
  • Joined: 09-January 08
  • Gender:Male
  • Location:Québec, Canada
  • Project:an assembler
  • Wiki edits:6

View PostNostalgia Ninja, on 08 November 2011 - 11:21 PM, said:

According to the VDP of the Sonic sprites when the game has crashed, the locator indicates that he is not rolling, but rather crouching still. The sprite indicators still say he's offscreen, but the limiters for the sprite stop him from falling off the stage. That, and also the game would have rather killed Sonic than throwing the ILLEGAL INSTRUCTION exception then.

My guess is that the pallettes collide in Sonic 1's underwater pointers, and therefore tries to pallete switch. and then crashes

I diagnosed that crash recently while making Sonic 1 Upside Down, because the crash would happen as soon as the signpost art would load unless I'd jump, and I documented the fix on the wiki. The problem is much more subtle than what you're describing: the game is in the middle of decompressing the signpost art when the VBlank interrupt is raised. VBlank tries to resume Nemesis decompression, but the information necessary to do so is inconsistent at that point; the original game indicates that there's a decompression in progress that should be continued in VBlank BEFORE decompressing a part of the art, but some information is only set AFTER decompressing that part. If VBlank occurs DURING the decompression, the game crashes. This situation is easier to trigger when the water surface is higher on the screen, which was the case in my hack because the water was actually at the top rather than at the bottom.

Concerning your observations, Sonic is most likely crouching instead of rolling because he hit the right level boundary (there's a boundary not too far offscreen). However, Sonic isn't falling off; if he was, you'd see the camera move to follow him.

#3 User is offline Nostalgia Ninja 

Posted 09 November 2011 - 03:47 AM

  • Night and day become one and two worlds come together.
  • Posts: 15
  • Joined: 23-October 11
  • Gender:Male
  • Location:Everywhere and nowhere
  • Project:Mastering SonED2 With Assembly guides Vol. 1
Hmm, someone should fix that wiki on the glitches in Sonic 1, They say he appears to be "Falling off." So the theory there is debatable, but this code explains it all. This was a useful find, I see what you mean with the Vblank, but why does the VDP int register as 0C in the VDP status? Normally it would register as 00.

#4 User is offline FraGag 

Posted 09 November 2011 - 08:57 PM

  • Posts: 652
  • Joined: 09-January 08
  • Gender:Male
  • Location:Québec, Canada
  • Project:an assembler
  • Wiki edits:6

View PostNostalgia Ninja, on 09 November 2011 - 03:47 AM, said:

Hmm, someone should fix that wiki on the glitches in Sonic 1, They say he appears to be "Falling off."

I fixed that part. Maybe that thought was inspired by the camera panning down, but that's just because Sonic is looking down/crouching. Sonic's Y position (the word at $FFD00C, if you want to check) doesn't indicate that he's falling.

View PostNostalgia Ninja, on 09 November 2011 - 03:47 AM, said:

why does the VDP int register as 0C in the VDP status? Normally it would register as 00.

Huh? What are you looking at, exactly?

#5 User is offline Nostalgia Ninja 

Posted 10 November 2011 - 11:17 PM

  • Night and day become one and two worlds come together.
  • Posts: 15
  • Joined: 23-October 11
  • Gender:Male
  • Location:Everywhere and nowhere
  • Project:Mastering SonED2 With Assembly guides Vol. 1

View PostNostalgia Ninja, on 09 November 2011 - 03:47 AM, said:

why does the VDP int register as 0C in the VDP status? Normally it would register as 00.

Huh? What are you looking at, exactly?
I am looking at the M68000 Debug in Gens Rerecording. The last line in the VDP status shows something called VDP int. It makes sense now that you mention the last two numbers in the word register, that's what it picks up in the VDP int.

#6 User is offline FraGag 

Posted 11 November 2011 - 12:34 AM

  • Posts: 652
  • Joined: 09-January 08
  • Gender:Male
  • Location:Québec, Canada
  • Project:an assembler
  • Wiki edits:6

View PostNostalgia Ninja, on 10 November 2011 - 11:17 PM, said:

View PostNostalgia Ninja, on 09 November 2011 - 03:47 AM, said:

why does the VDP int register as 0C in the VDP status? Normally it would register as 00.

Huh? What are you looking at, exactly?
I am looking at the M68000 Debug in Gens Rerecording. The last line in the VDP status shows something called VDP int. It makes sense now that you mention the last two numbers in the word register, that's what it picks up in the VDP int.

It's not the same 0C as in $FFD00C. I looked quickly Gens's source code, and all I think it means is that both VBlank and HBlank are waiting to be triggered (4 for HBlank, 8 for VBlank). The value is 04 in other levels, which don't use HBlank, so I guess it makes sense... Anyway, neither interrupt is triggered when the game is showing an error because it disables interrupts just before showing the error. In other words, neither the VBlank nor the HBlank interrupt handler routine run when the game is showing an error.

#7 User is offline Nostalgia Ninja 

Posted 11 November 2011 - 03:40 AM

  • Night and day become one and two worlds come together.
  • Posts: 15
  • Joined: 23-October 11
  • Gender:Male
  • Location:Everywhere and nowhere
  • Project:Mastering SonED2 With Assembly guides Vol. 1
Interesting... No wonder the H and V blanks show as 0 then. This is an interesting find for me, thanks

Page 1 of 1
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users