What are the 68K/Z80 clock spes for NTSC v PAL machines?
Moderator: BigEvilCorporation
What are the 68K/Z80 clock spes for NTSC v PAL machines?
I'm looking into an issue where I've setup the emulated IO system VMOD and MODE into I'm running a PAL rom:
PSG/YM2612 music tempo and frequency is playing at the correct speed, but YM2612 DAC sample playback is pitched down. The DAC is being driven by the Z80 which for my current PAL implementation is running about 16% slower (as it the 68K) than NTSC.
Do PAL machines have slower running Z80's than NTSC machines or should the clock speed be the same speed for both?
cheers
Steve.
PSG/YM2612 music tempo and frequency is playing at the correct speed, but YM2612 DAC sample playback is pitched down. The DAC is being driven by the Z80 which for my current PAL implementation is running about 16% slower (as it the 68K) than NTSC.
Do PAL machines have slower running Z80's than NTSC machines or should the clock speed be the same speed for both?
cheers
Steve.
Last edited by sbroumley on Fri Apr 03, 2009 8:16 pm, edited 1 time in total.
-
- Very interested
- Posts: 374
- Joined: Mon Jun 11, 2007 3:09 am
- Location: Azeitão, PT
Okay I think I might know what my issue is then. I'm not taking into account that PAL has more scan lines than NTSC.
My current emulation main loop grabs a DAC sample once per NTSC scan line (224 active, 38 vblank = 262). I assume my main loop will need updating to take into account the extra PAL scan lines then DAC pitch should be correct. Is that what other people are doing for PAL emulation?
thanks for your help,
Steve
My current emulation main loop grabs a DAC sample once per NTSC scan line (224 active, 38 vblank = 262). I assume my main loop will need updating to take into account the extra PAL scan lines then DAC pitch should be correct. Is that what other people are doing for PAL emulation?
thanks for your help,
Steve
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Exact PAL master clock is 53203424Hz, I have forgotten NTSC one, its only slightly higher... all stuff is divided from the master clock
...and checking if something is written to DAC reg of YM2612 on a scanline is lousy... my MD music system will have terrible PCM if things work like that...
...and checking if something is written to DAC reg of YM2612 on a scanline is lousy... my MD music system will have terrible PCM if things work like that...
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Ok - I think I'm going crazy. Extra lines or no extra lines 50hz is 50hz. So if a game ROM is for both NTSC and PAL, sample play back for PAL will be lower pitched unless the z80 code compensates for it.
I might be missing reporting my genesis emulator is in PAL mode correctly (what does the z80 read for this?).
The related systems I've implemented so far are the VMOD/MODE settings in the IO system and bit 0 of reading the VDP control port.
Are there any other systems that need to report the system is a PAL system?
cheers,
Steve.
I might be missing reporting my genesis emulator is in PAL mode correctly (what does the z80 read for this?).
The related systems I've implemented so far are the VMOD/MODE settings in the IO system and bit 0 of reading the VDP control port.
Are there any other systems that need to report the system is a PAL system?
cheers,
Steve.
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
the PCM pitch should not change at all (well, only minimally, 0.1KHz perhaps)... but only if you swap out master clock... if you just change 50/60Hz setting then nothing but Vint ant line count changes, and a bit in the ID reg and VDP status port... and fast VDP data transfer period... in 50Hz you have ~50% more fast DMA time.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Nope - because the framerate has nothing to do with how fast the Z80 whacks out samples. Give it the proper number of scanlines (313 for PAL) and it'll all be fine, the difference ends up being minimal.sbroumley wrote:Ok - I think I'm going crazy. Extra lines or no extra lines 50hz is 50hz. So if a game ROM is for both NTSC and PAL, sample play back for PAL will be lower pitched unless the z80 code compensates for it.
If it helps to think of it this way - z80 putting out one sample per scanline would get:
NTSC: 262 scanlines * 60 fps = 15720 per sec
PAL: 313 scanlines * 50 fps = 15650 per sec.