It is currently Tue Dec 11, 2018 3:56 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Thu Aug 30, 2018 6:32 am 
Offline
User avatar

Joined: Thu Mar 31, 2016 11:15 am
Posts: 439
The best way to solve attribute glitches is to use 4 screen nametables :P

Shoutouts to my boy GTROM.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 6:45 am 
Offline

Joined: Wed Apr 04, 2018 7:29 pm
Posts: 38
Location: Montreal, Canada
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.

Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 6:53 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2348
Location: DIGDUG
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


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 10:03 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7807
Location: Seattle
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.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 10:27 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3141
Location: Tampere, Finland
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


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 10:41 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7007
Location: Canada
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.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 10:46 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3141
Location: Tampere, Finland
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


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 10:54 am 
Offline
User avatar

Joined: Thu Sep 15, 2016 6:29 am
Posts: 823
Location: Denmark (PAL)
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)


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 11:00 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20852
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 11:04 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7007
Location: Canada
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.

Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 11:09 am 
Offline
User avatar

Joined: Thu Sep 15, 2016 6:29 am
Posts: 823
Location: Denmark (PAL)
I tried to answer that. So I'll keep it more simple: As far as I can tell it looks centered.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 11:27 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7007
Location: Canada
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.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 11:34 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7807
Location: Seattle
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)


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 8:05 pm 
Online
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11011
Location: Rio de Janeiro - Brazil
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.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 8:16 pm 
Offline

Joined: Fri Dec 27, 2013 4:28 pm
Posts: 80
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group