Untitled adventure game, Milestone 1: Scrolling and tools.

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.

Moderator: Moderators

User avatar
bleubleu
Posts: 108
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by bleubleu »

tokumaru wrote:
bleubleu wrote:With the MMC3 at my disposal, I wouldn't think twice about using IRQs to mask the top and bottom 8 scanlines by disabling background rendering and using blank patterns for sprites, or vice versa.

EDIT: Just wanted to make it clear hat I'm not trying to be a dick or anything, I'm just pointing out that hiding stuff in the overscan unfortunately doesn't work as consistently/reliably (or at all, in PAL) as we'd like. You're doing something really cool, keep it up.
Yeah, I might blank the bottom scanline with IRQ for extra safety, that's very easy to do, i actually had it working at some point. Top rows were problematic iirc, or is that the other way around? One of them I can simply disable rendering, but the other needs a palette swap I think (a la Jurassic park). I cant remember exactly.

No offense taken! Haha.

Btw, I'm not saying what im doing is novel or original at all! While it is easy to conceptualize, the implementation is far from trivial and I do consider it a "feature" of my engine at this point.

-Mat
Last edited by bleubleu on Thu Aug 30, 2018 7:34 am, edited 1 time in total.
User avatar
dougeff
Posts: 3079
Joined: Fri May 08, 2015 7:17 pm

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by dougeff »

You can't do a palette swap at the top of the screen. Changing palettes requires turning rendering off, and you will get corruption of sprites.

Changing the palette near the bottom of the screen can work if there aren't any sprites below the change point.

You could point the top of the screen to an unused portion of the nametable, and have it all black, and then change the X and Y scroll at the 8th scanline, timed with an IRQ.

But, that's a lot of effort.

You might as well use 4 screen, if glitches must be eliminated.


Also, does MMC3 scanline counter work if rendering is disabled? Like for the top 8 scanlines? I thought it didn't.

Edit, the Konami VRC mapper IRQ uses CPU cycles to count, you could use that to time turning rendering on at scanline 8, and off at 231.
nesdoug.com -- blog/tutorial on programming for the NES
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by lidnariq »

dougeff wrote:Also, does MMC3 scanline counter work if rendering is disabled? Like for the top 8 scanlines? I thought it didn't.
You're right, it doesn't.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by thefox »

tokumaru wrote:Also, PAL TVs will always show all 240 scanlines, or so I've been told.
Yes, it's definitely true, and there's a very simple reason for it: NTSC systems have 480 interlaced lines in the active area => 240 progressive lines, whereas PAL systems have 576 interlaced lines => 288 progressive lines. So assuming that the 240 non-black lines output by NES are centered on those 288 lines in the active area, there's a headroom of 24 lines at the top and the bottom of the picture. It'd be very rare to find a TV that has so much overscan.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by rainwarrior »

thefox wrote:So assuming that the 240 non-black lines output by NES are centered on those 288 lines in the active area, there's a headroom of 24 lines at the top and the bottom of the picture.
Is it actually centred? I was under the impression that there was a bit more space on the bottom, but maybe I had just seen a poorly calibrated TV.

Also, I forgot to say to OP: this is cool. Looking forward to seeing more of your game.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by thefox »

rainwarrior wrote:
thefox wrote:So assuming that the 240 non-black lines output by NES are centered on those 288 lines in the active area, there's a headroom of 24 lines at the top and the bottom of the picture.
Is it actually centred? I was under the impression that there was a bit more space on the bottom, but maybe I had just seen a poorly calibrated TV.
I'm not sure. But even if it's not, it's definitely not so much off-center (from what I've seen) that overscan would become an issue.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
Sumez
Posts: 919
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by Sumez »

Yeah, I'm not sure it's ever absolutely centered, but it's definitely "centered enough" that you always have very visible, thick black borders on both the top of the bottom of the screen, whenever you're playing any 50hz console on a PAL compatible TV/monitor.

Even modern consoles like PS1 and PS2 do nothing to accomodate for it, aside from a few games just offering an alternative 60hz mode (which is the best way out anyway)
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by tepples »

A 16:9 PAL TV in "zoom" mode will display about .93*.75*288 = 200 lines. So if a game follows Nintendo's safe area guidelines for NTSC (224x192 title safe), everything important should remain visible in zoom on PAL, and the TV will cut off artifacts.
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by rainwarrior »

I was just curious if it was actually off-centre. It wasn't really a comment about overscan.

(Looking at some videos of people playing PAL NES with a camera pointed at the TV, it does look slightly above centre to me, but maybe not quite as significant as my memory/impression had been.)
Last edited by rainwarrior on Thu Aug 30, 2018 11:10 am, edited 1 time in total.
User avatar
Sumez
Posts: 919
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by Sumez »

I tried to answer that. So I'll keep it more simple: As far as I can tell it looks centered.
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by rainwarrior »

Sumez wrote:I tried to answer that. So I'll keep it more simple: As far as I can tell it looks centered.
Yeah, between you and thefox I assumed it has to be "mostly" centred at least. I had seen one a while ago that looked off-centre to me, and I don't run into PAL NES and TVs very often, so ever since I'd had the idea that it was a bit more off centre than it seems to be normally, now that I'm looking at footage I can find.

I suppose knowing the actual scanline the picture starts on would be a nice addition to the wiki's knowledge, but at the same time it's not very critical information and I don't have the hardware to measure anyway.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by lidnariq »

The oscilloscope pictures that HardWareMan posted are good enough, at least for the UM6538 he had. Vsync is rows 0-2, upper blanking is rows 3-42, picture is rows 43-281, lower blanking is rows 282-311.

http://martin.hinner.info/vga/pal.html says that vertical timing is supposed to be: Vsync:0-2; upper blanking: 3-22; picture: 23-309; lower blanking: 310-312 ... so I guess pedantically the 6538's picture is 5-ish scanlines too high? (20 scanlines padding on top, 28 scanlines padding on bottom)

Don't know if 2C07 timing is exactly the same, but we do know they share the same 252x239 pixel picture.

(In contrast, 2C02 timing is Vsync:0-2 ; upper blanking: 3-16 ; picture: 17-259 ; lower blanking: 260-262. This is almost exactly compliant with NTSC, but provides 3 too many scanlines of upper blanking, so I guess it's pedantically 1.5 scanlines too low)
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by tokumaru »

bleubleu wrote:Yeah, I might blank the bottom scanline with IRQ for extra safety, that's very easy to do, i actually had it working at some point. Top rows were problematic iirc, or is that the other way around? One of them I can simply disable rendering, but the other needs a palette swap I think (a la Jurassic park). I cant remember exactly.
The IRQ counter won't work with rendering disabled, which is why I mentioned disabling only one layer (either sprites or background - as long as one of them is enabled, the PPU will function normally, and so should the scanline counter), and bankswitching blank patterns for the other. IIRC, Jurassic Park uses black (not blank - it has black in every palette!) patterns for both layers. Palette swaps mid-screen are notoriously hard to pull off on the NES, very few games did it.
cppchriscpp
Posts: 102
Joined: Fri Dec 27, 2013 4:28 pm

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by cppchriscpp »

Dang, this looks really cool!

I'm really liking the growth of tools for retro dev lately. (Even if those are just internal for now/indefinitely) Bit of competition for my thing, but I welcome it :)

Looking forward to seeing where you go with this!
User avatar
GradualGames
Posts: 1106
Joined: Sun Nov 09, 2008 9:18 pm
Location: Pennsylvania, USA
Contact:

Re: Untitled adventure game, Milestone 1: Scrolling and tool

Post by GradualGames »

This looks incredible. Definitely looks like it could replace nesmaker. Are you going to be selling it or is it free/open source?

Also, how do you make your guy go behind walls? I was impressed by that because I never could figure out a good way to do that on my own adventure game (The Legends of Owlia), so I just made it impossible. In Crystalis, they had to severely compromise the palette and have more than one shared color so that you could go behind a house using the background color as green but still have black outlines etc. It was kinda ugly.

My guess is maybe you have a character that always moves on an 8x8 grid and you can just cut him off? I cut off sprites for text boxes by nudging them a max of 4 pixels and then cutting them off at the sprite grid boundary, but never found a nice way to do the same just going behind walls etc.

Very cool stuff.
Post Reply