| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
sid timing ntsc/pal
hi c64 experts, i am wondering how to play a tune on ntsc AND PAL machines with the same speed, using the rasterinterrupt leads to different timing on ntsc, i heard about a timer interrupt in c64 is this one suitable for using in a playing routine =?! |
|
... 3 posts hidden. Click here to view all posts.... |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Hehe, you can never acheive that using timers, since the timers ALSO are based on the core clock. You simply have to detect if the machine is PAL clocked or NTSC clocked, then also detect if the tune is a PAL tune or an NTSC tune. Based on that you adjust your timer. |
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
For a PAL tune simply set timers to 19656 clock cycles, for a NTSC tune use 17095 cycles. There is a small difference in clock speed, but since all SID logic is also based on it, it's best to ignore it and keep RELATIVE speed 100% as it is supposed to be. Otherwise some ADSR and other effects might sound different. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
@graham: good point! |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Hmm, to me, the same replay speed always was more important than some minutely adjusted adsr/filter outcome. But that's a matter of taste i guess. :)
And raster interrupts are no big problem if you have some "error margin" before your raster irq handlers, i.e., let them be triggered a couple of lines before actually doing anything, then wait for your line in a busy loop, then do whatever; plus make sure your timer nmi handlers re-enable irqs as soon as possible. |
| |
Raf
Registered: Nov 2003 Posts: 343 |
Graham is right , additionally the sound pitch will change approx 0.5hz (if I computed it properly).
www.vulture.c64.org |
| |
Laxity
Registered: Aug 2005 Posts: 459 |
depends on the note you're talking about... :) |
| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
hi, thx for the informations, i see the timing is a real problem, how many ntsc computers are sold then ? ;)
it is a bit disappointing, because i just have all my animations ready to work under ntsc and pal, but now is the sound issue, you with perfect ears, would you recognize a 0.5Hz speed adjustment in a song ? that is usually played with 50Hz i think yes ... ;( |
| |
enthusi
Registered: May 2004 Posts: 677 |
0.5 Hz?
Ignore it :) No two SIDs sound the same anyway.
If you want accuracy dont use SID.
Sorry to say that.
loving it all,
enthusi |
| |
Raf
Registered: Nov 2003 Posts: 343 |
woah ;p you sarcastic bastards ;-)
SID's freq changes with driving clock;s freq. there is approx 40KHz diff so it's about 4% on the SID too (actually depending on note playing as LAxity said).
once I heard there is minor difference but I never tried to actually check it (honestly I raher don't care about NTSC living in PAL zone ;- ). you may try to use sidplay2/w and select "adjust to" in SID type config to have approximation of what would you get .
www.vulture.c64.org |
| |
cadaver
Registered: Feb 2002 Posts: 1160 |
IMO pitch/tempo change is bearable, ADSR bugs and note trigger failures are worse. Liked Graham's suggestion to keep amount of clock cycles same, since that's what SID cares about internally. |
Previous - 1 | 2 - Next |