2-cell vertical scrolling + horizontal scrolling

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

Moderators: BigEvilCorporation, Mask of Destiny

Eke
Very interested
Posts: 859
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

2-cell vertical scrolling + horizontal scrolling

Post by Eke » Sat May 15, 2010 11:19 pm

These 2 games, Kawasaki Super Bike Challenge & F1 from Domark both use the same engine which makes use of the 2-cell vertical scrolling VDP feature (each 16-pixels column can have a specific vscroll offset from VSRAM).

They also use horizontal scrolling which make the left-most column sometime only partially displayed and I have always wondered how the VDP would apply vertical scroll values in that case (since there are more visible columns that usual)

Now, if you let the demo mode run in any emulators, you can see that the left-most column is glitched when the screen scroll horizontally. This does not happen on real hardware as shown on these videos:

http://www.youtube.com/watch?v=5odFf_lx ... re=related
http://www.youtube.com/watch?v=Dm5iWm5Z ... re=related

Interestingly, if you disable vertical scrolling for the left-most column when it is partially displayed, then the display is fine in emulators (what they indeed do usually is to apply VSRAM first entry to the partially shown column and the next one).

You could think it's just another dumb VDP limitation and an easy fix for emulators but here comes the tricky thing: another game, Gynoug, also uses 2-cell vertical scrolling (in the first level, when the screen begins shaking and rocks falling) BUT this time, if vertical scrolling is disabled for the left-most column when it is partially displayed, it will be glitchy.

The only difference I could think about is that the two first games are running in 32-cell mode while Gynoug uses 40-cell mode. VSRAM seems to have room for 40 words (2planes x 20 columns) so maybe there is a trick which makes the left-most partial column uses one of the unused VSRAM entry in 32-cell (16-columns) but loop back to first entry in 40-cell mode ?

HardWareMan
Very interested
Posts: 732
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Sun May 16, 2010 9:44 am

And what about "Contra Hard Corps", wich used 2-cell vertical scrolling to?

Eke
Very interested
Posts: 859
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Sun May 16, 2010 10:04 am

I didn't noticed this one, is it used in a particular level ?

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

Re: 2-cell vertical scrolling + horizontal scrolling

Post by Charles MacDonald » Mon May 17, 2010 1:36 am

Eke wrote:These 2 games, Kawasaki Super Bike Challenge & F1 from Domark both use the same engine which makes use of the 2-cell vertical scrolling VDP feature (each 16-pixels column can have a specific vscroll offset from VSRAM).
Just curious, are you testing this with Genesis Plus? I did a lot of research to make sure the leftmost column scrolled like it does on the real hardware for 40 cell mode. But now that I think about it, I may have not tested 32-cell mode and assumed the same rules apply...

I think you have found another interesting VDP quirk. :D

TascoDLX
Very interested
Posts: 256
Joined: Tue Feb 06, 2007 8:18 pm

Re: 2-cell vertical scrolling + horizontal scrolling

Post by TascoDLX » Mon May 17, 2010 7:02 am

Charles MacDonald wrote:Just curious, are you testing this with Genesis Plus? I did a lot of research to make sure the leftmost column scrolled like it does on the real hardware for 40 cell mode. But now that I think about it, I may have not tested 32-cell mode and assumed the same rules apply...
I checked. Genesis Plus works fine for Kawasaki (32-cell) but not for Gynoug (40-cell) -- partial column on the left is wrong.

Just so it's clear, Kawasaki (and presumably F1) renders one or two cell-wide columns of patterns with some vertical offset, likely based on the current scroll values (i.e., it's altering the pattern not the scroll values). I haven't seen the code yet, but it's clearly compensating for a predictable bug.

Eke, I like your theory about the unused VSRAM entries in 32-cell mode. It might be worth checking out.

Eke
Very interested
Posts: 859
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Mon May 17, 2010 8:29 am

Just curious, are you testing this with Genesis Plus? I did a lot of research to make sure the leftmost column scrolled like it does on the real hardware for 40 cell mode. But now that I think about it, I may have not tested 32-cell mode and assumed the same rules apply...
I checked. Genesis Plus works fine for Kawasaki (32-cell) but not for Gynoug (40-cell) -- partial column on the left is wrong.
Yes, I'm testing on Genesis Plus. In fact, in your original code (1.2a), you initially disabled left-most column vertical scrolling (I mean, only when the horizontal scroll value makes it partially visible on the left side).

I changed that in my port because I once noticed Gynoug was wrong this way (btw, I think I remember you left some notes in render.c indicating there was some stuff to fix about that) but then later I noticed about these two other games that would require partial left-most column to be locked.

notaz
Very interested
Posts: 192
Joined: Mon Feb 04, 2008 11:58 pm
Location: Lithuania

Post by notaz » Mon May 17, 2010 1:39 pm

Eke wrote:
HardWareMan wrote:And what about "Contra Hard Corps", wich used 2-cell vertical scrolling to?
I didn't noticed this one, is it used in a particular level ?
First level, when that big one-eyed robot appears.

some more that I remember:
- Lava Reef boss in Sonic & Knuckles,
- The flying battleship in Gunstar Heroes
- Andy asteroids in Earthworm Jim

most of them don't do hscroll at the same time though.

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

Post by Shiru » Mon May 17, 2010 2:14 pm

If I recall correctly, horizontal scroll + column scroll was used in Vectorman (train in sky) and Batman and Robin (some tonnel).

GManiac
Very interested
Posts: 92
Joined: Thu Jan 29, 2009 2:05 am
Location: Russia

Post by GManiac » Mon May 17, 2010 2:48 pm

You may also look at logo screen of Jungle Book and to effect of using "Black Box" in Shining in the Darkness.

Huge
Very interested
Posts: 197
Joined: Sat Dec 13, 2008 11:50 pm

Post by Huge » Mon May 17, 2010 5:17 pm

Watching these games in action makes me feel really, really sad for Virtua Racing.

Chilly Willy
Very interested
Posts: 2845
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Mon May 17, 2010 5:22 pm

Why? Specifically coded effects for small on-the-rail sections of a game do not equal generic true 3D polygons. :lol:

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

Post by Shiru » Mon May 17, 2010 5:29 pm

Funny thing about these two games is that I've had both Kawasaki and V.R. on the real console back then, but I've played Kawasaki a lot, and V.R. only turned on few times.

Well, it is easy to see that SVP increases number of polygons considerably in the game, V.R. is much more detailed, however for some reason I can't say it is playable, at least it isn't addicting for me.

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

Post by sheath » Mon May 17, 2010 7:17 pm

Have we confirmed that there are no polygons in these games? With the way the stands and buildings look as you pass them I couldn't figure they were not polygonal. I kept expecting to see some sort of bitmap/2D telltale and never did.

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

Post by Stef » Mon May 17, 2010 9:09 pm

sheath wrote:Have we confirmed that there are no polygons in these games? With the way the stands and buildings look as you pass them I couldn't figure they were not polygonal. I kept expecting to see some sort of bitmap/2D telltale and never did.
Of course it's polygon rendering, i had a quick look on disassembled code and we can easily find sort of fast polygon fill methods. But that doesn't mean the game is real 3D. As you can notice the world is never rotated (V cell scroll is used to simulate it) or anything like that, we only have basic translation which simplifly *a lot* the transformation calculation.
Anyway the fast polygon drawing stuff is already quite amazing imo !
Last edited by Stef on Tue May 18, 2010 7:48 am, edited 1 time in total.

Chilly Willy
Very interested
Posts: 2845
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Mon May 17, 2010 9:44 pm

Okay, those last two posts were confusing... let's be straight on what you're referring to. We know VR is "real" 3D polygons. Were you guys referring to something else in the last couple posts?

EDIT: Okay, I played Kawasaki and I see what you're talking about - they do a very good job of sticking a few polygons on top of a "standard" 2D racer program. It really enhances the look of the game. :D

Now as to how fun it is compared to VR, can't say. I'd have to play it a while, but I'm a huge VR fan, so it would have to be REALLY fantastic to beat VR with me. :lol:

Post Reply