Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Bar on the Left Side of the Screen

Reply to topic
Author Message
  • Joined: 11 Sep 2006
  • Posts: 94
  • Location: Denver, CO
Reply with quote
Bar on the Left Side of the Screen
Post Posted: Sat Oct 14, 2006 12:01 am
When I play Sega Master System games on my Sega Master System or Genesis, I always notice that games tend to blank a large-sized portion of the left side of the screen. Sometimes this portion will be colored the same as another part of the active screen. Most games blank this out, but some games like Space Harrier do not. Why? What's going on?

I've also noticed that when Genesis games get in trouble (ie: too much going on graphically) this same portion screws up and shows glitches, and is sometimes blanked out by the software like in Gunstar Heroes.

So I guess the overall question would be: Why do Sega systems have issues with this side of the screen, and why don't Space Harrier and a few other games have a problem?
  View user's profile Send private message
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Post Posted: Sat Oct 14, 2006 12:59 am
I can't say much about the Genesis, but for the Sega Master System, it is normal for games that do horizontal scrolling to blank out the leftmost 8 pixels by displaying them as the same color as the background.

The reason for this is that the width of the 'virtual' screen in the SMS is the same as the actual visible screen, 256 pixels. As you scroll to the right, the pixels scrolling out the left edge of the screen appear on the right, and vice versa when scrolling to the left. Unless you just want to have an endlessly repeating single screen scrolling (as is the case with Teddy Boy), you need to draw new pixels on one side of the screen to replace the ones that are being scrolled out.

This would not be a problem if you could arbitrarily draw in a new column of pixels whenever you scrolled the screen - you could just replace the old, scrolled out pixels with new screen data in the vertical blank period (the short interval while the television beam is not drawing to the screen). However, like most 8 and 16 bit consoles, the screen is made up of 'tiles' or 8x8 building blocks of pixels arranged in a gridlike pattern. You would have to draw an eight column wide block of pixels of new screen data at a time. That would mean you'd see the new column of pixels on appearing on the left screen before scrolling in on the right, assuming you're scrolling right to left.

So, the solution is to set a flag in the SMS's Video Display Processor (VDP) to hide the leftmost 8 pixels of the screen so that it can be an 'offscreen' area that old columns of tiles can be scrolled out of and new columns of tiles can be scrolled in from. Everytime you scroll past the 8 pixel border, the old column is replaced with the new.

This situation does not occur with vertical scrolling, as there is a larger offscreen area so it is not necessary to blank a row of pixels, nor is it an issue with the Game Gear (when playing Game Gear games) because the Game Gear visible screen is 160 pixels wide, but the virtual screen is 256 pixels wide, so there is plenty of offscreen area to draw in.


Space Harrier does not use horizontal scrolling, therefore, there is no need for it to blank that first column of pixels. Alex Kid in Miracle World will either blank or unblack the first column depending on whether the current level scrolls horizontally. Note that when you get to the bottom of the first level, the column is blanked when you go into the water.

Note that some games that do not scroll horizontally may blank the area anyway because there is a similar situation with sprites. Sprites, which are also 8 pixels wide, also can be positioned at any one of the 256 pixels that make up the width of the SMS screen. The X position specifies where the leftmost pixel of the sprite is drawn from, so if a sprite is positioned with an X coordinate 248 or higher, the pixels that won't fit on the screen are simply not drawn. Therefore, you can smoothly move a sprite off of the right side of the screen. However, once you set the sprite X location back to 0, the sprite abruptly reappears on the left. Again, blanking the first 8 pixel of the screen gives an offscreen area so that a sprite can appear to be partially off the left side of the screen.

I don't know how this varies on the NES. I seem to recall seeing some glitches on some horizontally scrolling NES games, including SMB3, that would have a similar cause, though others did not seem affected. On SMB3, I had noticed that new blocks appearing on the right side of the screen often had the wrong colors until the entire tiles had scrolled out from the right into the main screen.

My guess is that the Genesis games that have a problem with this are trying to do too much with the horizontal blank. The horizontal blank is a brief period that occurs after one row of pixels is drawn by your TV's scanning beam. It's much shorter than the vertical blank, but it's enough time for the CPU to change a few of the screen settings. By redefining the display settings midway down the screen, you can use it to get more colors, scroll layers, and sprites on the screen then are normally possible on the genesis. Similar tricks are used across nearly all consoles prior to the modern 3d consoles - however, attempting to do too much in this limited window can result in display glitches.
  View user's profile Send private message Visit poster's website
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Sat Oct 14, 2006 2:18 am
Yeah, what happens with SMB3 on the NES is the same situation, however the reason for the wrong colours is that the background on the NES has a precision of 8x8 for the tile graphics (same as the SMS), but only 16x16 for tile colours. So often an NES game will have some tiles appear with wrong colours as the graphics scroll.

SMB3 needn't be like this, as it has enough screen RAM to do this BG updating off-screen (the NES has enough VRAM for 2 BGs (512x240 or 256x480)). The programmers were just lazy, or something like that.
  View user's profile Send private message Visit poster's website
  • Joined: 11 Sep 2006
  • Posts: 94
  • Location: Denver, CO
Reply with quote
Post Posted: Sun Oct 15, 2006 2:49 am
What about these games?

Thunder Blade - Bar on left side despite there being no horizontal scrolling of any form anywhere in the game. Granted, the game is a graphical powerhouse to which not even the likes of God can not compare.

Miracle Warriors - Bar on the left despite there being basically no scrolling at all anywhere.

Golden Axe - No bar at all despite having lots of horizontal scrolling. Granted the game runs at about 2 frames per minute.
  View user's profile Send private message
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Sun Oct 15, 2006 5:10 am
Quote
I've also noticed that when Genesis games get in trouble (ie: too much going on graphically) this same portion screws up and shows glitches, and is sometimes blanked out by the software like in Gunstar Heroes.


The Genesis can divide the screen into columns and scroll each one vertically. When scrolling horizontally as well, the leftmost column will have an incorrect vertical scroll applied to it and it will look out of place.

Most games hide this area using sprites (such as Gunstar Heroes or Contra Hard Corps) but some don't. If they don't, it looks like the background is distorted compared to the rest of the screen. This is really noticable in some games like Steel Empire and Rocket Knight Adventures.

EDIT:

Some SMS games turn on the left column blanking even if it doesn't seem to be used all the time. This is because toggling it on and off can be distracting - see Zillion for an example. Golden Axe Warrior needs it turned on when scrolling horizontally into a new screen, but otherwise it's unecessary.

I think for the other games you mentioned, they use it for the sprite masking that Heliophone described. And some games just have it turned on for no reason, maybe because most other games do too. ;)
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14757
  • Location: London
Reply with quote
Post Posted: Sun Oct 15, 2006 12:42 pm
Last edited by Maxim on Sun Oct 15, 2006 9:11 pm; edited 1 time in total
Charles MacDonald wrote
And some games just have it turned on for no reason, maybe because most other games do too. ;)

Prince of Persia, for example, for no good reason masks off the leftmost 8 pixels and scrolls the whole screen left right by 4 pixels. Maybe they did this because generally that 8 pixel column is masked by the TV border anyway; aiming to centre the screen on the rightmost 248 pixels seems to be the "correct" thing to do.
  View user's profile Send private message Visit poster's website
  • Joined: 11 Sep 2006
  • Posts: 94
  • Location: Denver, CO
Reply with quote
Post Posted: Sun Oct 15, 2006 6:43 pm
The image is a bit to the right whenever the leftmost 8 pixels are blanked on an NTSC system, making everything look just a touch off-center (centre?),


Also I assume this has been covered before, but even here in the USA where we use space-age technology like NTSC the SMS image is letterboxed. No games have ever been full screen to my knowledge. Is this by design?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14757
  • Location: London
Reply with quote
Post Posted: Sun Oct 15, 2006 9:15 pm
Yes - the SMS screen is 192 pixels high, it's using progressive video (hence scanlines appear) with 1 SMS line per video line. The interlaced NTSC TV screen is 484 visible out of 525 lines, so in progressive mode that's 242 visible lines for the screen; the SMS uses the middle(ish) 192 of those.

To scale the video nicely to fullscreen would be (almost) beyond 1980s technology.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Post Posted: Mon Oct 16, 2006 5:43 pm
Golden Axe scrolls the screen in 8 pixel increments (in fact, it does everything in 8 pixel increments) so there's no problem with the lack of an offscreen area - when it's time to scroll the screen, the scroll register is offset by 8 and a new column of tiles is drawn over the old before the TV starts drawing that frame.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!