How many times can the NES change scrolling in a frame?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

krzysiobal
Posts: 754
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland

Re: How many times can the NES change scrolling in a frame?

Post by krzysiobal » Sat Apr 11, 2020 4:16 pm

Galaxian
Scanlines: ~40, ~120
To: scroll the enemies and player
Image

Mach Rider
At scanlines: 112, 113, ..., 239
To: curve the track
(also F-1 Race, Formula One Built To Win, and oher front fiew riding games)
Image

3-D Battles of World Runner
At scanlines: 128, 129, 130, ..., 191
To: make walking checkboard pattern
Image

Doki Doki Yuuenchi
To: Achieve enemy waving efect
Image

Pokun
Posts: 1512
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: How many times can the NES change scrolling in a frame?

Post by Pokun » Sun Apr 12, 2020 3:26 am

So "line scroll" in that context means scrolling of one scanline per vsync (which on NES would just be normal vertical scrolling) instead of scrolling a whole character cell. I see, that makes sense. Thanks!

User avatar
olddb
Posts: 117
Joined: Thu Oct 26, 2017 12:29 pm
Contact:

Re: How many times can the NES change scrolling in a frame?

Post by olddb » Sun Apr 12, 2020 8:24 am

Unlike the other examples, the Axelay Demo seems to be scaling each scanline. How is this possible?
Last edited by olddb on Sun Apr 12, 2020 8:28 am, edited 1 time in total.
...

tepples
Posts: 22052
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: How many times can the NES change scrolling in a frame?

Post by tepples » Sun Apr 12, 2020 8:27 am

Provided the CPU time is available, vertical stretching is possible by changing the complete (horizontal and vertical) scroll position during horizontal blanking with the $2006-$2005-$2005-$2006 write sequence.


EDIT: Corrected when the write occurs, namely in horizontal blanking.

turboxray
Posts: 104
Joined: Thu Oct 31, 2019 12:56 am

Re: How many times can the NES change scrolling in a frame?

Post by turboxray » Sun Apr 12, 2020 10:53 am

Pokun wrote:
Sun Apr 12, 2020 3:26 am
So "line scroll" in that context means scrolling of one scanline per vsync (which on NES would just be normal vertical scrolling) instead of scrolling a whole character cell. I see, that makes sense. Thanks!
I don't want to be rude here, but that's actually absurd. That would be very technical behind-the-scenes verbiage of early 8bit computers, and not something a typical gamer would understand. I mean just look at the compound word: line, scroll. Scroll already has the implication that something moves around on the screen. It in no way implies choppiness, nor non-vertical scrolling. So if scroll implies screen, then line implies a very small portion of that scrolling screen.. a line. When emphasizing fine scrolling over choppy scrolling, I've seen... "fine-scrolling".
lidnariq wrote:
Thu Apr 09, 2020 6:40 pm
As near as I can tell, "linescrolling" in this way appears to be a sega-ism, and searching around finds at least a couple instances of people incorrectly believing that certain non-sega platforms are incapable of performing multiple scroll change raster effects across multiple adjacent scanlines.

And your point, that "linescrolling" means a specific thing in one community+context, does not in any way invalidate Koitsu's point (namely that it implies a very different thing in a different, older, but still electronics related community+context)
As kids in the US in the late 80's early 90's, we obviously picked up the term from magazines. But it wasn't a Sega-ism. Yeah is was kinda standout effect in Sega and NEC consoles compared to NES, but arcades had the effect too. I didn't say Koitsu's point is invalid, just his experience anecdotal, and in fact linescroll is not "borderline-postmodernist pedantry". Unless you're so old school that you think something from the 90s is postmodernist. This forum is very NES-centric in it's terminology (Object ram, patterns, etc), even when used for non-Nintendo systems, and seems sensitive terms not popular to this group.

All throughout coding in the early 2000's and up, with consoles and talking on IRC with other devs/hackers/etc tinkering in console coding, the term was understood (these weren't sega-centric channels either). It had a very specific meaning, compared to 'raster effects' which is not only as generic as you can get, but people often use the term mean effects that are not, in fact, raster effects. But I can tell you this, raster effect was not something any people I know in the 90's understood. Maybe that was a European thing. But one could easily education someone on what linescroll meant, by pointing to SF2 floor effect or the water effect in Sonic 1's first stage. No one was outraged and called it "borderline-postmodernist pedantry". It was just a very easily understood vernacular term for a more advanced technical term.

User avatar
rainwarrior
Posts: 7838
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: How many times can the NES change scrolling in a frame?

Post by rainwarrior » Sun Apr 12, 2020 2:24 pm

turboxray wrote:
Sun Apr 12, 2020 10:53 am
I didn't say Koitsu's point is invalid, just his experience anecdotal, and in fact linescroll is not "borderline-postmodernist pedantry". Unless you're so old school that you think something from the 90s is postmodernist.
I think you're taking that a little out of context. Marscaleb was not talking about past experience with the word "linescroll", he was proposing that we need to make up a new term for something we've been able to describe for decades, and that's what Koitsu was responding to:
koitsu wrote:
Mon Apr 08, 2019 5:20 pm
My natural reaction to that kind of "we should invent a new term" response is to tell the person to (expletive deleted).
As for andecdotal experience with these terms... I live in Canada. I first knew the term "raster" in the 80s from Atari ST magazines and demos, though many of those sources came from UK / Europe. I continued to see it in demo contexts through the 90s. Later as I studied computer graphics and began my career in that field, I found "raster" to be a very commonly used term in textbooks and academic writing as well. It's a very standard term with thorough usage in that industry, and still applies to drawing techniques used today. (I think I provided enough background to demonstrate that in my earlier post.)

As for the category of "raster effect" and related terms, that was more concentrated on demoscene stuff. Not normally relevant to current graphics hardware, anyway.

In my earlier post I gave a link to a pouët.net search for "raster" with many pages of results of demoscene stuff that is using that term. Trying variations like "linescroll", "line scroll", "line scroller", etc. I could only find a single prod and I'm not sure it's even the kind of effect we're talking about. This is just a quick half-assed straw poll kinda search, but it seems to confirm my suspicion that "linescroll" as a term never infiltrated the demoscene.

I'm a little surprised by this groundswell of support for "linescroll". I'm not opposed to people using that term, and it seems self explanatory, but I've not actually seen it used for this until now, and that's surprising given your assertion. I think at the very least we hung out on different forums in the 2000s. :P

I don't really care what terms people want to use, but I entered this thread to answer the question "do we have a term for this", because we do have such a term. If we're making an official publication, or something collaborative and didactic (e.g. the Wiki), maybe then worth arguing about which particular term is best, but as long as you're understood, that one works fine.

User avatar
olddb
Posts: 117
Joined: Thu Oct 26, 2017 12:29 pm
Contact:

Re: How many times can the NES change scrolling in a frame?

Post by olddb » Mon Apr 13, 2020 2:48 pm

tepples wrote:
Sun Apr 12, 2020 8:27 am
Provided the CPU time is available, vertical stretching is possible by changing the complete (horizontal and vertical) scroll position during vblank with the $2006-$2005-$2005-$2006 write sequence.
Any links? :wink:
...

User avatar
rainwarrior
Posts: 7838
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: How many times can the NES change scrolling in a frame?

Post by rainwarrior » Mon Apr 13, 2020 3:50 pm

Recca did that, and so did the Axelay demo, but I think both of these have already been linked in this thread already?

User avatar
Memblers
Site Admin
Posts: 3880
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: How many times can the NES change scrolling in a frame?

Post by Memblers » Mon Apr 13, 2020 4:22 pm

olddb wrote:
Mon Apr 13, 2020 2:48 pm
tepples wrote:
Sun Apr 12, 2020 8:27 am
Provided the CPU time is available, vertical stretching is possible by changing the complete (horizontal and vertical) scroll position during vblank with the $2006-$2005-$2005-$2006 write sequence.
Any links? :wink:
To be clear there was was a typo, tepples meant hblank rather than vblank. vblank updates set the scrolling for the next frame, while hblank updates can let you set the scrolling for the next line.

This is where I first saw the effect, and was the code I studied to learn how to do it. The way they did it was kind of weird though (kind of on-par for Codemasters stuff), but I adapted their technique of using two lookup tables (of low and high $2006 addresses), that you index by desired line number you want to render.
https://youtu.be/fha8FEynhfs?t=107
Description on the wiki:
https://wiki.nesdev.com/w/index.php/PPU ... 2FY_scroll
It's tricky to make it work, but it's very satisfying when it does.

User avatar
olddb
Posts: 117
Joined: Thu Oct 26, 2017 12:29 pm
Contact:

Re: How many times can the NES change scrolling in a frame?

Post by olddb » Tue Apr 14, 2020 11:14 pm

Thank you.
...

User avatar
rainwarrior
Posts: 7838
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: How many times can the NES change scrolling in a frame?

Post by rainwarrior » Tue Apr 14, 2020 11:45 pm

Also, you don't even have to do it during hblank (and almost none of the commercial games did), but it helps avoid a visual glitch.

User avatar
aa-dav
Posts: 102
Joined: Tue Apr 14, 2020 9:45 pm
Location: Russia

Re: How many times can the NES change scrolling in a frame?

Post by aa-dav » Wed Apr 15, 2020 12:00 am

olddb wrote:
Sun Apr 12, 2020 8:24 am
Unlike the other examples, the Axelay Demo seems to be scaling each scanline. How is this possible?
Each scanline corresponds to one line of background.
If you change horizontal scrolling register in every scanline you can do some waving effects.
But if you cahnge vertical scrolling register also you can skip some background lines near top of the screen while repeating some others two or more times near bottom of the screen. It looks like shrinking which is progressing line by line to zooming. And that looks like perspective view. Clever trick which reminds perspective-view trick of MODE 13 in SNES which is similar in some way.

User avatar
mikejmoffitt
Posts: 1352
Joined: Sun May 27, 2012 8:43 pm

Re: How many times can the NES change scrolling in a frame?

Post by mikejmoffitt » Sun Jul 19, 2020 1:49 am

Just a fun related novelty: I spent some time fixing a pretty FUBAR-looking arcade game by NMK, called Gunnail. It was worth fixing because that game has gotten ludicrously expensive, and fixing a broken one was my only real path to owning a real board.

Anyway, part of what I had to debug was that the scrolling hardware was defective. The NMK901 background controller is pretty simple, and simply strobes an external latch to get a start address for the nametable. Here, we don't say "scroll RAM", but instead "scroll pointer RAM", where a table is kept in write-only RAM that the discrete scroll hardware reads out. There, the background controller is given an index into the nametable to pull from per-line. This means it's cheap as free to stretch and shrink the background plane vertically, as is popular with SNES HDMA effects. The stupid simplicity of the scroll plane hardware made a nice expansion like "scroll pointer RAM" easily possible in discrete logic.

In contrast, that PCB also contains an NMK901, which is basically the same deal except that it uses 8x8 tiles instead of 16x16 tiles. That chip is not given any scroll latch nor scroll RAM, so its position is fixed for text, and the HUD, etc. All a matter of what support logic they wanted to add outside.

Just a taste of how this stuff can look in the flexible world of arcade hardware.

Post Reply