It is currently Tue Oct 17, 2017 11:57 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun Oct 25, 2015 7:35 am 
Offline
User avatar

Joined: Sat Apr 18, 2009 4:36 am
Posts: 257
Location: Russia
Hi, nesdev. I want to add Hybrid(Dendy) mode into VirtuaNES 0.97 for personal desire.

nes.cpp (original v0.97):
Code:
NESCONFIG NESCONFIG_NTSC = {
   21477270.0f,   // Base clock
   1789772.5f,      // Cpu clock

   262,         // Total scanlines

   1364,         // Scanline total cycles (15.75KHz)

   1024,         // H-Draw cycles
   340,         // H-Blank cycles
   4,         // End cycles

   1364*262,      // Frame cycles
   29830,      // FrameIRQ cycles

   60,         // Frame rate (Be originally 59.94Hz)
   1000.0f/60.0f   // Frame period (ms)
};

NESCONFIG NESCONFIG_PAL = {
   26601714.0f,      // Base clock
   1662607.125f,      // Cpu clock

   312,         // Total scanlines

   1278,         // Scanline total cycles (15.625KHz)

   960,         // H-Draw cycles
   318,         // H-Blank cycles
   2,         // End cycles

   1278*312,      // Frame cycles
   33252,      // FrameIRQ cycles

   50,         // Frame rate (Hz)
   1000.0f/50.0f   // Frame period (ms)
};



But i doubt about constants.
How was calculated FrameIRQ cycles, scanline total cycles, H-Draw, H-Blank and End cycles?

P.S. I've already able to slowdown NTSC-mode to 50FPS, so it looks like Dendy. But i want to do it "right" way.


Top
 Profile  
 
PostPosted: Sun Oct 25, 2015 2:26 pm 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6274
Location: Seattle
Without knowing how these numbers are used elsewhere, it's hard to say, but a naïve interpretation (based on the NTSC numbers here) implies the PAL numbers are all weird.
I'm really confused by that 1278. The number "ought" to be 1705. ((5 chroma phases per pixel)×(341 pixels) on each scanline).
Similarly, all the subsequent numbers are weird too: 960 "should" be 1280 (5×256), 318 "should" be 425 (5×85), "end cycles" "should" be 0 (there's no prerender missing pixel on the 2C07).

The Frame IRQ timing was measured manually on the NTSC NES. I don't know that anyone's ever sat down and measured that timing on a PAL NES or Dendy.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: MS-DOS and 9 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