Super Game Boy v. Super Game Boy 2 Framerate

Discussion of development of software for any "obsolete" computer or video game system. See the WSdev wiki and ObscureDev wiki for more information on certain platforms.
Post Reply
Great Hierophant
Posts: 780
Joined: Tue Nov 23, 2004 9:35 pm

Super Game Boy v. Super Game Boy 2 Framerate

Post by Great Hierophant »

As I understand the way the Super Game Boy worked, it relied on a derivative of the SNES's main clock, so it runs at 4.295454 MHz instead of 4.194304 MHz. In other words, compared to a handheld Game Boy, the SGB is overclocked. The number of clock cycles to display the screen does not change, it remains at 70,224. Thus the SGB's refresh rate is 61.167 Hz. Despite the 2.4% clock difference, I have never seen any visual glitching on an SGB that I did not see on a DMG or GBP.

The Super Game Boy 2 has its own clock, a proper 4.194304 MHz. The SGB2's refresh rate should be 59.7275 Hz, but the sketchy sources I have seen suggest it is the SNES's 60.0988 MHz. I guess the theory is that a cartridge can drive the SNES faster than 60.0988 Hz but not slower. You can also mod an SGB with the proper clock crystal to run at the canonical 4.194304 MHz. I would hope it would behave identically in terms of framerate, to the SGB2.

I recall that someone on this board indicated that there may have been some benefit to the SGB's method beside being cheaper to make. If there is a discrepancy between the SGB2's framerate output and the SNES's framerate output, then that would suggest that there must be some frame-skipping going on that would not be present with an unmodded SGB.

Since I now own an SGB and an SGB2, I took video captures of a game scrolling left and right. The SGB's capture was much more jerky than the SGB2's. But this could be a result of my capture card, which can record a maximum of 60.000060 Hz (after separate fields).
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Super Game Boy v. Super Game Boy 2 Framerate

Post by lidnariq »

The SNES has no ability to emit video at any other frequency other than one of the four dividers mentioned here in fullsnes.

If the SGB/2 doesn't generate frames at one of those exact rates, there will necessarily be repeated frames, dropped frames, or tearing.
nitro2k01
Posts: 252
Joined: Sat Aug 28, 2010 9:01 am

Re: Super Game Boy v. Super Game Boy 2 Framerate

Post by nitro2k01 »

In practice, you can never run the GB frame rate in sync with the TV framerate. Even if you match them up, the GB can turn off the display for random amounts of time to get free access to VRAM, which would mess up the sync. So, the SGB has to deal with that regardless. And deal with it, it does. This video shows that the SGB can handle both substantially lower and higher frame rates with relatively little trouble. I don't know if a SGB1 or SGB2 was used in this video though. But I suspect the 2.4% different clock rate in SGB1 was just chosen because it was easy to divide from the SNES system clock.

https://www.youtube.com/watch?v=od6JyCtHTiQ
Great Hierophant
Posts: 780
Joined: Tue Nov 23, 2004 9:35 pm

Re: Super Game Boy v. Super Game Boy 2 Framerate

Post by Great Hierophant »

lidnariq wrote:The SNES has no ability to emit video at any other frequency other than one of the four dividers mentioned here in fullsnes.

If the SGB/2 doesn't generate frames at one of those exact rates, there will necessarily be repeated frames, dropped frames, or tearing.
I think it is beyond dispute that the SGB1/2 do not generate frames at a SNES-framerate. But neither SGB shows tearing. The SGB1 is outputting 1.0772 more frames per second than the SNES, while the SGB2 is outputting .3713 fewer frames per second. If the SNES is locked into the 60.0988 frequency, then it must drop an SGB1 frame (maybe two) and repeat an SGB2 frame every second.
nitro2k01 wrote:In practice, you can never run the GB frame rate in sync with the TV framerate. Even if you match them up, the GB can turn off the display for random amounts of time to get free access to VRAM, which would mess up the sync. So, the SGB has to deal with that regardless. And deal with it, it does. This video shows that the SGB can handle both substantially lower and higher frame rates with relatively little trouble. I don't know if a SGB1 or SGB2 was used in this video though. But I suspect the 2.4% different clock rate in SGB1 was just chosen because it was easy to divide from the SNES system clock.

https://www.youtube.com/watch?v=od6JyCtHTiQ
That video is using an SGB1.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Re: Super Game Boy v. Super Game Boy 2 Framerate

Post by TmEE »

I recall seeing tearing on my SGB1 with stock clock. Later I modified it to use same clock as real GameBoy and I still recall tearing.
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Super Game Boy v. Super Game Boy 2 Framerate

Post by lidnariq »

I feel like we should be able to use a 74'4046 to dynamically generate a CPU clock for the SGB that'll genlock the SGB to the SNES PPU ... if there were only a good place to get a vsync signal from the SNES.
Great Hierophant
Posts: 780
Joined: Tue Nov 23, 2004 9:35 pm

Re: Super Game Boy v. Super Game Boy 2 Framerate

Post by Great Hierophant »

nitro2k01 wrote:Hiero, do you have a GB flashcart?
It's a distinct possibility :

http://nerdlypleasures.blogspot.com/201 ... e-boy.html
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Super Game Boy v. Super Game Boy 2 Framerate

Post by tepples »

lidnariq wrote:if there were only a good place to get a vsync signal from the SNES.
Is there an efficient way to compare address bus A to $00FFEA, the address of the native mode NMI vector? Or a way to detect tile DMA to VRAM, such as rapid toggling of address bus B between $18 and $19?
ccovell
Posts: 1045
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Re: Super Game Boy v. Super Game Boy 2 Framerate

Post by ccovell »

If anybody has a flash cart (or a xx-in-1 multicart) the games Serpent ("Snake War") and Chikyu Kaihougun ZAS both have flickery levels/demos that reveal shearing quite clearly.
Great Hierophant
Posts: 780
Joined: Tue Nov 23, 2004 9:35 pm

Re: Super Game Boy v. Super Game Boy 2 Framerate

Post by Great Hierophant »

ccovell wrote:If anybody has a flash cart (or a xx-in-1 multicart) the games Serpent ("Snake War") and Chikyu Kaihougun ZAS both have flickery levels/demos that reveal shearing quite clearly.
I tried both with my EverDrive and I have to say that the flicker is quite noticeable with the SGB1/2 on Serpent's attract mode screen and levels 1 and 3 of Chikyu Kaihou Gun ZAS. Those levels are almost unplayable, the flicker is so bad that I would have to post an epilepsy warning if I posted video of them. With a DMG or GBP or GBA, the flicker is much, much more difficult to notice and does not affect the gameplay. ZAS is a very decent vertical shooter for the GB. The GBA SP shows off the flicker a little more than its non-backlit predecessors, especially when the backlight is on, but it isn't distracting as it is on the SNES-devices.

One thing I did notice in ZAS is that the flicker would "pulse" and appear solid for an instant at regular intervals. The pulsing was notably faster on the SGB1 than the SGB2. Perhaps this is where the SGB1 is dropping or repeating more frames than the SGB2.

Jeremy Parrish took a 60p capture of Serpent on his SGB2 for his Game Boy World series, so you can see what I'm talking about :

https://www.youtube.com/watch?v=pd55qDPspIM
Post Reply