Understanding the VDP's scrolling capabilities.

For anything related to VDP (plane, color, sprite, tiles)

Moderators: BigEvilCorporation, Mask of Destiny

Gigasoft
Very interested
Posts: 88
Joined: Fri Jan 01, 2010 2:24 am

Post by Gigasoft » Tue Apr 06, 2010 7:45 pm

According to the document at SnesWiki, Mode 2 has a separate scrolling offset for each tile, so it's not quite the same.

However, if you just want to do 8 line horizontal scrolls, HDMA is much easier to use and much faster than mode 2, since each scrolling value only has to be written once instead of for the entire row.

In mode 0, each tile can use 3 colors out of a total of 24 (as there are 8 subpalettes for each plane). Together, all the planes can use 96 colors.

Final Fantasy VI's map screen has the sky in mode 2 I think (haven't verified this) and the rest of the screen in mode 7. Sprites cover up the horizon to make the transition smooth.

HDMA is seldom, if at all, used to update VRAM since it only transfers at most 4 bytes on each line per channel. Games would use normal DMA in an IRQ to update VRAM, OAM or the palette in the middle of a frame.

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Post by tomaitheous » Wed Apr 07, 2010 4:25 am

sheath wrote:Anomie's Register Doc Version WIP (reg.txt) implies that Mode 2 is virtually identical to the way the Genesis VDP handles backgrounds. I am sure there are differences, but capability wise I cannot see why this mode couldn't be just as capable of 8 line scrolls as the VDP is.

Tile offset mode? I wouldn't use it for scrolling 8 line scrolls. That's a waste. Plus, HDMA is muuuch easier/better method. That mode does allow for column scrolling in 8 pixel wide increments though, like Genesis 16 wide pixel column scrolling. IIRC, Aladdin on the SNES does this. The snake boss.

Tom, by all accounts Mode 0 limits each of the four layers to 4-colors each. So the maximum limit on screen, if each layer used totally different palettes, would be 16 colors total for backgrounds. Are you saying that they could only pull from a single 24 color palette?


Each layer is corresponds to 2bit tiles. 2bits holds a value from 0 to 3. That's a total of 4 colors. But remember, color 0 is see through - so only the last "plane" can use that for a "common" color - as long as sprites don't appear behind it. That's common with all game systems like this.

But you forget, there are 8 subpalettes. 3 colors * 8 sub palettes = 24 colors. The 2bit tile can only access the first four colors of the subpalette, out of the 16 colors. I'm not aware of a register that tells the 2bit layers to access an offset into each subpalette by multiple of 4, giving the 96 colors Gigasoft stated. But it could be hardcoded. BG0 uses 0-3, BG1 uses 4-7, BG2 used 8-11, BG3 uses 12-15. Of course, colors 4,8, and 12 would be see through, regardless of the color placed there (just like any other system). So at the minimum up to 24 colors, max if the above is true - then 96 colors.

It is also interesting that the SNES can switch between modes between frames. I'm not sure how this looks in games, it would seem that it couldn't occur during scenes with noticeable scroll layers. I know that Contra IV has to do it in the first level for the bomber to scale in Mode 7, if I recall the scene with the bomber is immediately preceded by "load" where the player has to stop and be told to move forward.
You wouldn't do it mid scanline, but per scanline. So any 1 scanline of 223/239 of the display can be set to any mode. You could have a section of the screen doing some crazy multilayer effects in mode 0, then switch at some point into higher bit tile modes (like between mode 0 and mode 1). And I think I mentioned Mario kart. The top of the "player" screen, the horizon, is mode 0 - along with the stats. For two players, you have mode 0 and mode 7 twice on a single frame.

http://www.fabricoffolly.co.uk/images/g ... iokart.gif <- hope that's viewable (just a random pic I found to show what I mean).


On the subject of DMA and HDMA, both Anomie's document and a document called "Hardware.txt" say that they can be used, if timed correctly (isn't that a big if?), in tandem. What neither document says is what the upper limit is for how much data can be transferred between frames.

For DMA, 223 line screen, something like 6300bytes can be updated per vblank. You should look for the official SNES SFX docs. It explains a few things easier. Anomie's docs were to test unknown situations of the PPU at that time (emulation was full of hacks and what not). BSNES is built with totally accuracy in mind. Maybe you should contact byuu or join his forum. He's knows probably more that anybody about timing and capabilities (well, there are a few other members that know the SNES in and out more than most people. Blargg I believe is one of them and I've seen _mic posting some stuff lately).
I'm also having trouble verifying how much VRAM the SNES actually has. Some sources say 64KB and some say 16KB (including Nintendo). In the case of the 16KB of VRAM being correct, the SNES's DMA/HDMA channels become *necessity* to treat the 128KB MAIN RAM as "unified" memory. In the case of 64KB VRAM, the DMA/HDMA channels become pure programming gravy.
Full 64k. IMO, should have been 128k (especially for mode 7). But it's divided into banks and sections. Tiles and sprites exist in different areas. Where as on the PCE and Genesis, they can exist anywhere. But the SNES makes up for it in other ways.

/opinion

My personal feeling is that mode 7 is gimmicky. A few games put it to good use, but ask yourself - would that game be just as good without it? 99% of the time, it's yes for me. I dunno. Maybe it's just me. It always seemed like an after thought when used. What I do like is stuff like what Compile did. Constantly changing the transforms, scale and rotation factors every scanline to get weird warpy effects (that one boss when you kill it). That was cool. Otherwise, I wasn't really impressed. Nor was I impressed when the Genesis games tried to do it in software, to "compete" I guess. Square and some other companies used it for overworld stuff, and that was nice too, but again really not essential (IMO). Mode 7 rates up there with the over use of "echo" on the SNES - yuck!

/opinion off

mic_
Very interested
Posts: 265
Joined: Tue Aug 12, 2008 12:26 pm
Location: Sweden
Contact:

Post by mic_ » Wed Apr 07, 2010 5:39 am

<semi-offtopic>
Heh, I actually like the DSP echo function. Imagine something like the Secret of Mana opening theme without the echo.. It just wouldn't sound as good (I actually tried it by modifying the .spc). And if you've got an audio image that sounds a bit too flat there's nothing like throwing a little echo at it :T

I'd agree that mode 7 was pretty gimmicky in many cases though. But hey, the DS has hardware-accelerated toon shading - so that's Nintendo for you. They make some damn good games though.
</semi-offtopic>
Last edited by mic_ on Thu Apr 08, 2010 7:14 am, edited 1 time in total.

Charles MacDonald
Very interested
Posts: 282
Joined: Sat Apr 21, 2007 1:14 am

Post by Charles MacDonald » Wed Apr 07, 2010 5:39 am

When it comes to scrolling abilities I feel the two systems are equally matched if you consider raster interrupts to be a suitable equivalent to HDMA.

The only major differences are that the SNES has for scrolling are:
- Offset per tile mode (seldom used)
- Can scroll 1-tile wide columns (MD does 2-tile wide columns)
- The extra 2bpp layer in Mode 1
- Mode 0 (very seldom used)
- Mode 7 (our favorite!)

I don't believe there is anything else related to scrolling the SNES can do that the MD cannot. And if you don't mind a lot of overhead any effect can be implemented on the MD with software methods. :)

It would seem that any difference between the use, effectiveness, and presentation of scrolling techniques in MD and SNES games is really a matter of design for the programmers and artists.

As developers become more familiar with the systems they work on, they exploit the feature set better. A game like Batman & Robin on the MD shows that many effective scrolling techniques can be done with little overhead. But not many MD games look as good as that game does, and most of the first generation games had very little parallax. There is no technical reason the same game couldn't be made on the SNES with identical effects (maybe even improved effects) but nobody did it.

I think it's the same story with games like Rocket Knight Adventures, Ranger-X, Thunderforce IV, etc. which have many layers of parallax. None of them use features that are exclusive to the Genesis. In fact the techniques are probably common to many consoles, computer systems, and arcade platforms.

Also notice that developers who made games for both systems used scrolling effectively, such as Konami and Capcom. IMO that's why games like Contra and Castlevania look just as good on either console.

User avatar
sheath
Very interested
Posts: 141
Joined: Wed Aug 15, 2007 1:44 pm
Location: Texas
Contact:

Post by sheath » Thu Apr 08, 2010 4:08 pm

Thank you Mr. MacDonald. It took me twice as long to skim through SNES documentation as it did Genesis or TG16 docs because there is over twice as many documents, and because they are far more technical in nature.

Overall, I haven't found any technical reason why the SNES library doesn't exemplify background scrolls like Genesis software does. So, my original premise is wrong. What we are left with is either A) SNES developers were focused on higher color images within the prescribed background modes, B) Genesis developers were "overcompensating" for the lack of colors available, C) Sega and Nintendo execs mutually emphasized these things when working with developers, or D) a combination of the above, or totally arbitrary choices on behalf of all SNES developers. E) Wild card hidden by poorly documented system or resource limits (SNES sprites per scanline limit for example).

MottZilla
Interested
Posts: 40
Joined: Mon Feb 08, 2010 9:54 pm

Post by MottZilla » Thu Apr 08, 2010 11:00 pm

Of your possible reasons, it may be that many of those are true but different ones for different games/developers. We'll never know exactly why unless you catch someone on the development team of an old game that actually remembers things that went on about 2 decades ago.

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Post by tomaitheous » Fri Apr 09, 2010 5:37 am

sheath wrote:Thank you Mr. MacDonald. It took me twice as long to skim through SNES documentation as it did Genesis or TG16 docs because there is over twice as many documents, and because they are far more technical in nature.

Overall, I haven't found any technical reason why the SNES library doesn't exemplify background scrolls like Genesis software does. So, my original premise is wrong. What we are left with is either A) SNES developers were focused on higher color images within the prescribed background modes, B) Genesis developers were "overcompensating" for the lack of colors available, C) Sega and Nintendo execs mutually emphasized these things when working with developers, or D) a combination of the above, or totally arbitrary choices on behalf of all SNES developers. E) Wild card hidden by poorly documented system or resource limits
There were examples of Genesis games that went beyond what arcade games were doing, in the scrolling department as well. Arcade systems that were much more capable than the SNES or Genesis and were even out before these systems. Just figured I throw that in there (there was a post on another forum from a gamer that thought the Neo Geo couldn't handle what the Genesis could do (scrolling) because he didn't see any examples on the Neo Geo hardware).
(SNES sprites per scanline limit for example).
Scanline limit? It has the highest of the three systems. 32 sprites or 34 8x8 cells (which ever is met first) per active scanline.

User avatar
sheath
Very interested
Posts: 141
Joined: Wed Aug 15, 2007 1:44 pm
Location: Texas
Contact:

Post by sheath » Wed Apr 14, 2010 4:12 pm

Thanks Tom, your input has always been extremely helpful. I couldn't find any documents that contained the sprite pixel limitation, so I was forced to use the SNES wikibook, but your input backing it up made that an easier decision.

If anybody is interested, I have updated all of the spec sheets on my site up to the Super Nintendo, and used footnotes to the documents that reflect the information. Please don't read the history section just yet. When it is finished I will update the post date and move it to the top of the blog queue. As always, the spec sheets are intended to correct popular misconceptions while remaining as simple as possible. If something is missing, it's because I did not find documentation for it, or I didn't find it within the documentation due to obscure terminology.

Documentation that has a real human as the author, or even a handle that I can verify as part of the community, takes priority over forum posts and wikis (which can be edited without my knowledge). But I have aimed to include as much technical info as is documented that directly relates to production level games. Any and all corrections (with citations please) and comments on how to increase the clarity of the sheets without dumbing them down is very welcome.

User avatar
sheath
Very interested
Posts: 141
Joined: Wed Aug 15, 2007 1:44 pm
Location: Texas
Contact:

Post by sheath » Wed May 05, 2010 5:28 am

I decided to use this thread to catalog games that use more than five scrolls in games. Over the next few days I will be adding the catalog of games I have already tested to the original post.

Bimini Run - eight line scrolls to the horizon
Waves animate to appear like scaling
Only one layer represents the waves
The waves change palettes to indicate water depth near islands
Animated sprite transitions are as smooth as they come

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Post by tomaitheous » Sun May 09, 2010 5:29 am

sheath wrote:I decided to use this thread to catalog games that use more than five scrolls in games. Over the next few days I will be adding the catalog of games I have already tested to the original post.

Bimini Run - eight line scrolls to the horizon
Waves animate to appear like scaling
Only one layer represents the waves
The waves change palettes to indicate water depth near islands
Animated sprite transitions are as smooth as they come
I never played Bimini Run before (remember ads for it though). Nice game engine for BITD :)

User avatar
sheath
Very interested
Posts: 141
Joined: Wed Aug 15, 2007 1:44 pm
Location: Texas
Contact:

Post by sheath » Mon May 10, 2010 11:51 am

It was the ads in my 1991 magazines that reminded me of it. For some reason I blew it off back in the day, but the reviews were even positive. After a quick play in Fusion I snagged it at the local swap shop for $4 in box. I also got Hyperzone and Hole in One Golf for SNES for the same reasons. Magazines aren't the place for technical discussion, but they sure do advertise games effectively. ;)

User avatar
sheath
Very interested
Posts: 141
Joined: Wed Aug 15, 2007 1:44 pm
Location: Texas
Contact:

Post by sheath » Sat May 22, 2010 7:13 pm

Rings of Power: 9 cloud layers forced scrolled, 1 far forest, play ground
No testing on A/B layers yet.

User avatar
Huge
Very interested
Posts: 171
Joined: Sat Dec 13, 2008 11:50 pm

Post by Huge » Sun May 23, 2010 12:45 pm

Ranger X has heavy parallax scrolling, extremely smooth 3d tube-like effects, dynamic palette loading to darken/brighten the screen depending on where you are, and the last level had fancy background warping as I recall.

Probably the most graphically impressive game on the Megadrive.

User avatar
Stef
Very interested
Posts: 2630
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sun May 23, 2010 5:29 pm

Huge wrote:Ranger X has heavy parallax scrolling, extremely smooth 3d tube-like effects, dynamic palette loading to darken/brighten the screen depending on where you are, and the last level had fancy background warping as I recall.

Probably the most graphically impressive game on the Megadrive.
Nothing can beat Toy Story :p
Every single level of that game is technically very impressive (complexe parallax, very large and smooth sprites, impressive Doom like 3D engine, very nice Street Racer like race engine...). It even does implement a real 3 channels 16 Khz MOD player just for the intro music.

But i do admit Ranger X is one of the most impressive game though ;)

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Sun May 23, 2010 5:37 pm

Let's finish the list of (technically) the most impressive games on SMD:

Batman and Robin
Contra Hard Corps
Mickey Mania
Ranger X
Red Zone
Rocket Knight Adventures
Toy Story

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests