z80 clocks
Moderator: BigEvilCorporation
z80 clocks
I'm assuming 59659 z80 clocks per ntsc vbank and 70937 z80 clocks per pal vblank. Does this sound right?
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Re: z80 clocks
Nope. Not sure about PAL off the top of my head, but you used 60Hz for the NTSC frame rate, and that's wrong. The NTSC MD runs at 59.92Hz (off the top of my head - broadcast NTSC is 59.96Hz). You'd best look it up in the docs. In any case, it's NOT 60Hz.sigflup wrote:I'm assuming 59659 z80 clocks per ntsc vbank and 70937 z80 clocks per pal vblank. Does this sound right?
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Z80 has 228 cycles per line (exactly).
There's 313 lines in 50Hz and 262 in 60Hz
71364 cycles for 50Hz for whole frame, 20292 for VBL area in 224 line res.
59736 cycles for 60Hz for whole frame, 8663 for VBL area in 224 line res.
There's 313 lines in 50Hz and 262 in 60Hz
71364 cycles for 50Hz for whole frame, 20292 for VBL area in 224 line res.
59736 cycles for 60Hz for whole frame, 8663 for VBL area in 224 line res.
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
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
But it's NOT 60Hz! It's 53693175/15/262/228 = 59.922743404 Hz. And those are all the values you need to figure out all the NTSC values. For PAL, use 53203424 for the master clock.
EDIT: But it's still 262x228 cycles in NTSC, which is what Tiido gave. So he's right on that, even if you rounds off his vblank rate.
EDIT: But it's still 262x228 cycles in NTSC, which is what Tiido gave. So he's right on that, even if you rounds off his vblank rate.
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Cycles per line is only thing that matters and it is constant regardless of region. For actual time you bring in the master clock values, but actual time does not matter, just cycles per line.
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
Where I can read about whole trace of beam on screen?
I want to have all info about full screen
1) Its full resolution with background borders
2) Draw order of lines
3) VBLANK period lines
4) Placement of MD screen
For both: NTSC/PAL in all modes (320x224, 256x224...)
Or, can you tell it?
Edit:
625 and 525 all lines, and 576 visible lines compared with 480 lines in NTSC.
In wikipedia no info about horizontal resolution, and where is those 480 visible lines
I want to have all info about full screen
1) Its full resolution with background borders
2) Draw order of lines
3) VBLANK period lines
4) Placement of MD screen
For both: NTSC/PAL in all modes (320x224, 256x224...)
Or, can you tell it?
Edit:
English wikipedia says: 312.5 and 262.5.TmEE co.(TM) wrote:There's 313 lines in 50Hz and 262 in 60Hz
625 and 525 all lines, and 576 visible lines compared with 480 lines in NTSC.
In wikipedia no info about horizontal resolution, and where is those 480 visible lines
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Do you telling me that MD connected to TV is showing Progressive image instead of interlaced? I thought that TV is always show in interlaced mode.
And another question, when you connecting witch composite AV cabble, is image same? (in Interlaced/Progressive terms).
I don't want to speak about MD internal image, because there is no such image. There is always one beam on screen calculated from VDP memory (planes, sprites, backdrop...)
I want to understand RAW image output of MD (I want to call it so).
And another question, when you connecting witch composite AV cabble, is image same? (in Interlaced/Progressive terms).
I don't want to speak about MD internal image, because there is no such image. There is always one beam on screen calculated from VDP memory (planes, sprites, backdrop...)
I want to understand RAW image output of MD (I want to call it so).
Speaking from NTSC land here. The half-line causes the TV's raster to "fill in the spaces" between the lines of the first field with those of the second field, generating a 525-line interlaced display. Literally the only difference between 240p and 480i is that half-line. Technically, in 240p, you still have "upper" and "lower" fields, but they're superimposed on top of each other rather than being offset approximately half the thickness of a standard scanline.
This is true regardless of the connection method, whether it be RF' composite, RGB, or a modded system outputting s-video or component. Although it's increasingly common for new sets to lack the capability to handle 240p over component for some reason, although it seems like it'd take more work not to support it than to support it, but I digress as that's not relevant to the actual output of the MD.
This is true regardless of the connection method, whether it be RF' composite, RGB, or a modded system outputting s-video or component. Although it's increasingly common for new sets to lack the capability to handle 240p over component for some reason, although it seems like it'd take more work not to support it than to support it, but I digress as that's not relevant to the actual output of the MD.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Exactly right.LocalH wrote:Speaking from NTSC land here. The half-line causes the TV's raster to "fill in the spaces" between the lines of the first field with those of the second field, generating a 525-line interlaced display. Literally the only difference between 240p and 480i is that half-line. Technically, in 240p, you still have "upper" and "lower" fields, but they're superimposed on top of each other rather than being offset approximately half the thickness of a standard scanline.
Yeah, it's irritating when TVs assume the signal is always 480i. Makes your old consoles look weird. I've kept my old Toshiba TIMM CRT monitor just for that reason... and it works great with those old lightguns, which is another pain associated with new TVs and old consoles.This is true regardless of the connection method, whether it be RF' composite, RGB, or a modded system outputting s-video or component. Although it's increasingly common for new sets to lack the capability to handle 240p over component for some reason, although it seems like it'd take more work not to support it than to support it, but I digress as that's not relevant to the actual output of the MD.
@r57shell - Most MD games are progressive, but there are a few that use interlaced, like two player Sonic games.
As I told, I don't want to speak about "internal" MD screen. I want to know about output signal.Chilly Willy wrote:@r57shell - Most MD games are progressive, but there are a few that use interlaced, like two player Sonic games.
There ARE many games that works on 60 framerate with non-interlaced mode in VDP settings, and EVERY 60 frames are DIFFERENT. And my question is what TV will show. As I think, it will show 480 lines where 240 lines from one frame, and 240 from previous frame (at lower brightness, because of falloff) at top of each other (Interlaced).
And, there still no answers for other questions.
output signal is either interlaced (used in only a very few games) or non-interlaced (most games). The later is not really progressive video signal but rather a slightly desynced interlaced video signal which makes each field appearing on top of each other (instead of being "interlaced")r57shell wrote: As I told, I don't want to speak about "internal" MD screen. I want to know about output signal.
Some stuff to remember to understand how it works:
(1) one interlaced frame (480 lines) is composed of two fields: one is used to display even lines (240 lines) and the other is for odd lines (240 lines)
(2) each field is refreshed every 1/60s (approx.) so a whole frame (480 lines) is refreshed every 1/30s
(3) TV are only driven by the analog signals and they will "jump" to the next line/field depending on the SYNC signal they receive from MD
(1) when MD is configured to output a non-interlaced signal, TV will only show even lines (240 lines) on each field: odd lines are never displayed and will appear as blank lines.And my question is what TV will show. As I think, it will show 480 lines where 240 lines from one frame, and 240 from previous frame (at lower brightness, because of falloff) at top of each other (Interlaced).
(2) when MD is configured to output an interlaced signal, TV will display even lines during 1st field and odd lines during 2nd fields, which make all 480 lines being refreshed.
There is no lower brightness because lines overlaps.
full Horiz. resolution with borders is 283 pixels (13 + 256 + 14) or 347 (13 + 320 + 14), cf. this thread:And, there still no answers for other questions.
viewtopic.php?t=519
full Vert. resolution with borders should be 243 lines in NTSC mode(11+224+8 ) and 294 lines in PAL modes (38+224+32 or 30+240+24), cf. some notes from Charles:
viewtopic.php?t=768&start=4
I got it, so TV is still in interlaced mode but always show only odd (or even) line. Now everything clear for me.Eke wrote:(3) TV are only driven by the analog signals and they will "jump" to the next line/field depending on the SYNC signal they receive from MD
May be it's somehow depends on VDP register corresponding to interlaced mode, that one which always alternating 0/1 in interlaced mode?
Thank you so much.
I'll check links later.