ext_274611 ([identity profile] ravenworks.livejournal.com) wrote in [personal profile] davidn 2011-08-28 04:13 pm (UTC)

Well, panning register just about says it! The trouble is, the NES's tilemap is only exactly twice the size of the screen - and that's literally twice, not "twice in both dimensions i.e. four times". The developer can configure the 'two screens' to be laid out horizontally or vertically, which means that if you want to scroll in BOTH directions, one axis doesn't have any spare space to switch tiles where no-one's looking. (i.e., the tile that's leaving on the left is the same tile you're seeing wrap around on the right, so one of them has to be wrong.) And, if you're wondering why a mostly horizontal game didn't choose to have the vertical scrolling be the one that suffers, it's because the NES only has one tilemap layer, so the only way to have a status bar at the bottom is to put it on the same map as the level, and just change the panning registers to jump to a position that'll show it when the screen gets to that scanline.

Actually, interestingly enough (if your interest in the subject will permit me a tangent to share some trivia) scanline interrupts weren't actually built into the NES the way they were for virtually all later hardware... so, due to the relatively slow clock speed of the processor, you could never quite nail the start of a scanline precisely; and furthermore, due to the fact that the cycle length doesn't divide evenly into the drawing speed of the screen, you can't even nail it consistently in the same wrong place... watch the little white line at the top of the status bar (http://www.youtube.com/watch?v=TdI6wM4cnNc#t=4m25s). (The fact that glitches like these don't appear in some emulators is actually driving some people to write bottom-up cycle-perfect emulators, rather than the top-down sort that reproduce the designers' intentions... even if it means that it would take a 3 GHz machine to accurately recreate a Super Nintendo (http://arstechnica.com/gaming/news/2011/08/accuracy-takes-power-one-mans-3ghz-quest-to-build-a-perfect-snes-emulator.ars).)

Oh, and if you're curious why the color always seems to be wonkier than the actual tiles when dealing with a can't-hide-the-scrolling situation, it's because (oddly enough) you can actually only define the palette for every four (2x2) actual tiles. It's kind of strange that they'd make an assumption that forces gameplay to revolve around logical pieces of a certain size, but allow you to define graphical information SMALLER than that size... I guess the idea is to be able to put bevels on corners and such?

Anyway, part of me wanted to say "why did they bother having two whole maps but only in one axis, instead of having one spare column and one spare row which is all you'd need for clean scrolling", but the fact is, the edges of these images couldn't even be seen on cathode ray TV sets; on my friend's TV, I could see some of UndoDog, but I was taking the existence of that arrow to his right on faith (http://www.youtube.com/watch?v=ki15GoFn0Io&feature=related#t=3m03s)... so, for hardware like the NES that was really counting on the glass working that way, a filter like this (http://www.youtube.com/watch?v=09jU1roDz9Y&hd=1&t=7s) might be ideal! (Although it makes me wonder why they didn't just make the deadzone on either side of the image bigger if they weren't expecting it to be seen anyway...) I guess the two-screen system was meant for Zelda-style scrolling, with the assumption that developers would want to pre-load the entire new screen rather than doing it column by column?

Anyway, I've now spent like three hours getting distracted doing research and watching youtube videos, so I think that's all I have to say on the subject for now ;) Although, the process of it has given me some interesting ideas, and I always relish the chance to get out some of the information I compulsively stuff my head with, so thank you ;)

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting