It is currently Wed Oct 18, 2017 6:19 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: NTSC/PAL PPU
PostPosted: Sat Oct 08, 2005 2:51 pm 
Offline

Joined: Thu Sep 15, 2005 9:23 am
Posts: 1194
Location: Behind you with a knife!
What PPU rendering differences are there between the PAL and NTSC 2C02? I ask this because Brad Taylor's NTSC 2C02 Technical Reference doesn't mention PAL.

I am aware of the following;

1. Different VBlank Time
2. 106/113 CC per Scanline
3. 3/3.2 Pixels rendered
4. 232/240 Scanlines

Anything else?

_________________
http://www.jamesturner.de/


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 08, 2005 3:40 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
Only differences between NTSC and PAL systems that I'm aware of are:

1) 70 scanlines of VBlank instead of 20 (making 312 scanlines in a frame instead of 262)

2) The pre-render scanline is ALWAYS 341 ppu cycles on PAL instead of alternating between 341 and 340 like it does on NTSC

3) 3.2 CPU cycles to every 1 PPU cycle on PAL... instead of 3 CPU cycles to 1 PPU cycle like on NTSC (this effectively makes a scanline 106.5625 CPU cycles long instead of 113.6666667)

4) PAL CPU clock rate is 1.65 MHz (1652097.902 I believe)... slightly slower than NTSC's 1.79 MHz. This lowers the pitch of sound played on PAL systems.

5) Adjusted DMC frequency lookup table to adjust for the pitch difference.

6) The top and bottom 8 scanlines on PAL displays aren't clipped like they usually are on NTSC displays (all 240 rendered scanlines are visible)

7) ~50.0 FPS on PAL instead of ~60.1 FPS like on NTSC


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 08, 2005 3:47 pm 
Offline

Joined: Thu Sep 15, 2005 9:23 am
Posts: 1194
Location: Behind you with a knife!
Disch wrote:
3) 3.2 CPU cycles to every 1 PPU cycle on PAL... instead of 3 CPU cycles to 1 PPU cycle like on NTSC (this effectively makes a scanline 106.5625 CPU cycles long instead of 113.6666667)


lol. I think you mean 1 CPU cycle for every 3.2 PPU cycle on PAL.

_________________
http://www.jamesturner.de/


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 08, 2005 4:15 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
gah... yeah I always do that.

CPU cycles are 3.2 times as long... not the other way around.

Gah!!!

But yeah you know what I mean ;D


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 08, 2005 4:50 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
2 things:
1. The PAL PPU is not an RP2C02(G) - it is an RP2C07(G?).

2. The PAL CPU clock rate is not 1652097.902Hz, but 1662607Hz.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 09, 2005 2:06 am 
Offline

Joined: Thu Sep 15, 2005 9:23 am
Posts: 1194
Location: Behind you with a knife!
Thanks, it's just that I heard it is better to include PAL support as you write your PPU code not include it after.

Since PAL renders 3.2 pixels, do you render an extra pixel every 5 CPU cc's?

_________________
http://www.jamesturner.de/


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 13, 2005 1:21 am 
On PAL NES system, total scanline is 312 lines, but VBlank time is still 20 lines, because VBlank start at 291 line(0-241 are display lines).


Top
  
 
 Post subject:
PostPosted: Thu Oct 13, 2005 11:49 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
tpu wrote:
On PAL NES system, total scanline is 312 lines, but VBlank time is still 20 lines, because VBlank start at 291 line(0-241 are display lines).


Sorry, but you're absolutely wrong. The PAL PPU generates NMI at line 241 just as the NTSC PPU does, so there are exactly 70 scanlines worth of VBLANK.

How do I know this? I've examined tests (performed by kevtris) done on an actual PAL PPU which clearly show NMI staying low for a duration of 70 scanlines.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 14, 2005 7:29 am 
I have a PAL rom that run fine on a real PAL nes. But on emulator, it run the same only if I start VBLANK at lines 291. I'll make a test rom recently.


Top
  
 
 Post subject: about pal
PostPosted: Sat Nov 05, 2005 7:20 pm 
Offline

Joined: Sat Nov 05, 2005 6:38 pm
Posts: 9
Location: china
I have made a test on my NES(nes on chip).
My TV system is PAL-D. My NES have a 26.601712 MHz clock input.
This is the result:

1: ppu cycles per frame: 106392 (341*312)
2: ppu cycles per line: 341
3: lines per frame: 312
4: VBlank lines: 20


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 05, 2005 7:35 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
NMI driven PAL games which use CPU-cycle counting IRQ timers (such as Mr. Gimmick) will not work properly if there's only 20 scanlines between NMI and rendering -- you need the full 70.

Other PAL games which don't rely on sprite-0 hit or IRQ counters ... using nothing but cycle-timed code (PAL version of Balloon fight, for example) will not scroll properly unless there's 70 scanlines between NMI and the start of the frame.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 05, 2005 8:49 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
You just said you were using an NES-on-a-chip. It would appear to be very likely that it is NOT a perfect copy, as a real NES PAL PPU (RP2C07) provides a full 70 scanlines between NMI/VBLANK and the beginning of the next frame.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 05, 2005 9:58 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
As far as I'm concerned, only tests performed on genuine Nintendo hardware are relevant. Tests on clones are as useful as tests on emulators, that is, for showing any inaccuracies as compared to the real thing.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 06, 2005 7:39 pm 
Offline

Joined: Sat Nov 05, 2005 6:38 pm
Posts: 9
Location: china
I can't get a real PAL mode NES now. But I think NES-on-a-chip have the better compatibility than real PAL NES. Almost all NTSC mode games can run on it with a little slowly.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 06, 2005 8:05 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
tpu wrote:
But I think NES-on-a-chip have the better compatibility than real PAL NES.


By definition, nothing can have more compatibility than a real PAL NES.

For the record, when kevtris tested a genuine PAL PPU (RP2C07-0) in his 3-in-1 tester (which manually clocked the PPU and examined its external data/address bus and read/write and NMI lines), I got the following results:

1: ppu cycles per frame: 531960 / 5 == 106392
2: ppu cycles per line: 1705 / 5 == 341
3: lines per frame: 106392 / 341 == 312
4: VBlank cycles: 119350 / 5 == 23870 --> 23870 / 341 == 70 lines

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 7 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