Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 18:51 24 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PAL/NTSC

     Page 2 of 4    
Author Message
ksdesigns

Senior Member

Joined: 25/06/2011
Location: United States
Posts: 143
Posted: 01:20am 21 Oct 2011
Copy link to clipboard 
Print this post

No i don't think i ever sent him a ntsc one .
i will get a TV out of my garage and fix it .
ken

 
donmck

Guru

Joined: 09/06/2011
Location: Australia
Posts: 1313
Posted: 01:24am 21 Oct 2011
Copy link to clipboard 
Print this post

  ksdesigns said   No i don't think i ever sent him a ntsc one .
i will get a TV out of my garage and fix it .
ken



OH, OK thanks Ken, it may have been PAL he was chasing. Europe, yes. That should have worked.

Cheers Don...
https://www.dontronics.com
 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 01:27am 21 Oct 2011
Copy link to clipboard 
Print this post

if you run into any probs with fixing a crt set let me know i will have an answer to yor problem ...regards sparkey 35 years of fixing crt sets ...///...///
technicians do it with least resistance
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1425
Posted: 01:29am 21 Oct 2011
Copy link to clipboard 
Print this post

If you scope out the signal, look to see if the levels are good. Perhaps my problem is signal levels here.


Not sure how Geoff would implement this. Without knowing much, I thought:

OPTION PAL

OPTION NTSC

Would be a reasonable language approach. Still might be the way to do it if the constants in the firmware are changed to variables. Issuing OPTION PAL/NTSC would reset the video and either leave gunk on the screen, or the firmware would do a clear screen.

Again - it is convenient to say that any feature is easy, until you are the one doing the code.

Assuming that the right constants can be found (or that the signal level isn't an issue) having a language command is great. But even a hex file to load is reasonable.


Micromites and Maximites! - Beginning Maximite
 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 01:31am 21 Oct 2011
Copy link to clipboard 
Print this post

what looks like you have a vertial retrace problem...regards sparkey
technicians do it with least resistance
 
donmck

Guru

Joined: 09/06/2011
Location: Australia
Posts: 1313
Posted: 01:37am 21 Oct 2011
Copy link to clipboard 
Print this post

  CircuitGizmos said  
Would be a reasonable language approach. Still might be the way to do it if the constants in the firmware are changed to variables. Issuing OPTION PAL/NTSC would reset the video and either leave gunk on the screen, or the firmware would do a clear screen.


either way, you would normally only set it once in any program, so it shouldn't matter once it has been set up, I wouldn't think.

Be nice to see this working OK

Cheers Don...
https://www.dontronics.com
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1425
Posted: 01:43am 21 Oct 2011
Copy link to clipboard 
Print this post

Right, but the whole video getup is initialized before any BASIC code is run. It has to be PAL to begin with. Then set to NTSC - and reinitialized.

Just saying that like anything, it will be more firmware effort than you might expect. Or "easier said than done".
Micromites and Maximites! - Beginning Maximite
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 04:54am 21 Oct 2011
Copy link to clipboard 
Print this post

If anyone can come up with the right timing numbers (see the start of Video.c in the source) I would be happy to fold them into the code. Every TV and monitor that I have automatically switches between PAL and NTSC (and I suspect anything in between) so I cannot test NTSC with any confidence.

I believe that the selection of PAL/NTSC should happen at power up depending on a jumper. This is because it would be difficult to correctly type in a command line to switch to NTSC if you could not see the video output in the first place. This would therefore require a jumper of some sort that could be detected at power up, perhaps connecting the VGA/Composite select pin to the video out or something like that.

Geoff
Geoff Graham - http://geoffg.net
 
donmck

Guru

Joined: 09/06/2011
Location: Australia
Posts: 1313
Posted: 06:49am 21 Oct 2011
Copy link to clipboard 
Print this post


Could it be done with commands in an autorun.bas file Geoff?

Cheers Don...

https://www.dontronics.com
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 08:29am 21 Oct 2011
Copy link to clipboard 
Print this post

  donmck said   Could it be done with commands in an autorun.bas file Geoff?

Yes, and that would be the easiest. Something like OPTION NTSC

It is just that good design says that similar options should be in the same place. So, if you use a jumper to select VGA/PAL, you should also use a jumper to select PAL/NTSC. But, I guess that you cannot have everything perfect !!

The big trick is to find the right timing parameters for NTSC.

Geoff
Geoff Graham - http://geoffg.net
 
Keith W.
Senior Member

Joined: 09/10/2011
Location: Australia
Posts: 118
Posted: 12:23pm 21 Oct 2011
Copy link to clipboard 
Print this post

Hi Geoff,

I will have a try at the timing for NTSC.

The major difference is that there are only 525 lines for NTSC vs 625 lines for Pal. On our non interlaced composite display that makes C_LINE_N = 262, (525 / 2). Presently it is 312 for PAL.

The required line time is 63.55 uSec. vs PAL’s 64 uSec. Therefore C_LINE_T should be 5084 for NTSC with an 80 MHz clock, 5120 now for PAL.

Although NTSC has less lines available I think that 18 lines of text should still fit. 262 – 216 still leaves 46 lines for sync and some blank lines although maybe the active area should be shifted down a little, I suspect at present the active area is given equal blanking top and bottom. Usually a picture would start at about line # 23 and with PAL extend to line 260, similar for NTSC; however these figures would normally give us a few lines of over-scan and would not show top and bottom of the display.

C_HSYNC_T is still correct at 374 = 4.675 uSecs., nominally both standards requires 4.7 uSecs.

NTSC’s video signal is a little different than PAL in that black level is a little above blanking but not important here; we only have black and white. There are other small timing differences but I think the figures above are worth trying. Frame rate is a little off, for both PAL and NTSC. Most monitors are very forgiving and will lock on something close. Perhaps someone in the States can try a test version.

Keith W.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 12:31pm 21 Oct 2011
Copy link to clipboard 
Print this post

OK, is there someone in the States who is prepared to test it if I generate a test version? It may take a few tries before we get it right.

Geoff
Geoff Graham - http://geoffg.net
 
aargee
Senior Member

Joined: 21/08/2008
Location: Australia
Posts: 255
Posted: 12:39pm 21 Oct 2011
Copy link to clipboard 
Print this post

Geoff,

I have a monitor here that I can force into NTSC, I'll give the code a run if you put it up.

- Rob.

p.s. Happened to be visiting Perth this week for work. Popped into Altronics for the first time ever - they still don't have any Maximites on the shelf. Back in Queensland now...
Perth is a quite a nice city, loved the free CBD transit system but it looks like the CHOGM chaos is going to be a pain for the locals.
For crying out loud, all I wanted to do was flash this blasted LED.
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1425
Posted: 01:09pm 21 Oct 2011
Copy link to clipboard 
Print this post

  Geoffg said   OK, is there someone in the States who is prepared to test it if I generate a test version? It may take a few tries before we get it right.

Geoff


The time difference and schedules sometimes makes for delays in emails, but I'm the squeakiest wheel about NTSC at the moment, so I'm obligated to test here in the U.S.

If the timing can be adjusted to get the picky little TV pictured above to work, I imagine that it would be spot on.

Edited to add: I don't need to have a HEX file made for testing the parameters. I can generate the HEX. All I would need is the constants from video.c to change. That would test the NTSC timing.

As far as language changes - That can be sent to me as source or hex.

Edited by CircuitGizmos 2011-10-22
Micromites and Maximites! - Beginning Maximite
 
donmck

Guru

Joined: 09/06/2011
Location: Australia
Posts: 1313
Posted: 02:30pm 21 Oct 2011
Copy link to clipboard 
Print this post

  Geoffg said  
  donmck said   Could it be done with commands in an autorun.bas file Geoff?

Yes, and that would be the easiest. Something like OPTION NTSC

It is just that good design says that similar options should be in the same place. So, if you use a jumper to select VGA/PAL, you should also use a jumper to select PAL/NTSC. But, I guess that you cannot have everything perfect !!

The big trick is to find the right timing parameters for NTSC.

Geoff


Geoff, as an alternative, what if you had an additional options file for this (and possible future changes) as to how the system powers up?

Example:

autoset.cfg
OPTION NTSC


Just before the power up routine is about to see if there is an autorun.bas file, it checks for the presence of the config file.

If there is one, it acts upon it and re-enters the power up code at the appropriate point, with the change(s).

When it gets back to the point of checking for the config file again, it doesn't, as it knows it has already done this step.

Then it continues on to check for an autorun.bas file.

This way, system settings, and any basic program you wish to auto run, are very different animals.

It would also need future proofing for your V2.7

Hope this makes sense.

Cheers Don...






https://www.dontronics.com
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1425
Posted: 02:43pm 21 Oct 2011
Copy link to clipboard 
Print this post

Would there be an OPTION PAL too? I would imagine that the boards sold in the US could come with NTSC as default.

The jumper wouldn't select VGA versus PAL, but VGA versus composite (either PAL or NTSC as per the config file.

Edited by CircuitGizmos 2011-10-23
Micromites and Maximites! - Beginning Maximite
 
donmck

Guru

Joined: 09/06/2011
Location: Australia
Posts: 1313
Posted: 02:57pm 21 Oct 2011
Copy link to clipboard 
Print this post

  CircuitGizmos said   Would there be an OPTION PAL too? I would imagine that the boards sold in the US could come with NTSC as default.

The jumper wouldn't select VGA versus PAL, but VGA versus composite (either PAL or NTSC as per the config file.



In reality, I would imagine it would be very awkward to set NTSC for U.S. use.

It means different firmware for country destinations, and I don't see Altronics, or Olimex, or any manufacturer sorting through that mess. I feel it would need a simple fix by the end user, same as you do system settings for time and location on a PC's O/S.

Cheers Don...
https://www.dontronics.com
 
donmck

Guru

Joined: 09/06/2011
Location: Australia
Posts: 1313
Posted: 03:32pm 21 Oct 2011
Copy link to clipboard 
Print this post

Thinking further, the autoset.cfg file could be used to set VGA or Composite Video also, releasing one pin.

And it places all the same eggs in the one basket.

autoset.cfg
OPTION NTSC
OPTION COMPOSITE


Cheers Don...Edited by donmck 2011-10-23
https://www.dontronics.com
 
ksdesigns

Senior Member

Joined: 25/06/2011
Location: United States
Posts: 143
Posted: 05:45pm 21 Oct 2011
Copy link to clipboard 
Print this post

Those are about the same numbers i came up with still does not sync
quick scope capture top trace video out bottom is vsync even tho not used for composite it is still toggled it seems to be glitching

ken


  Keith W. said   Hi Geoff,

I will have a try at the timing for NTSC.

The major difference is that there are only 525 lines for NTSC vs 625 lines for Pal. On our non interlaced composite display that makes C_LINE_N = 262, (525 / 2). Presently it is 312 for PAL.

The required line time is 63.55 uSec. vs PAL’s 64 uSec. Therefore C_LINE_T should be 5084 for NTSC with an 80 MHz clock, 5120 now for PAL.

Although NTSC has less lines available I think that 18 lines of text should still fit. 262 – 216 still leaves 46 lines for sync and some blank lines although maybe the active area should be shifted down a little, I suspect at present the active area is given equal blanking top and bottom. Usually a picture would start at about line # 23 and with PAL extend to line 260, similar for NTSC; however these figures would normally give us a few lines of over-scan and would not show top and bottom of the display.

C_HSYNC_T is still correct at 374 = 4.675 uSecs., nominally both standards requires 4.7 uSecs.

NTSC’s video signal is a little different than PAL in that black level is a little above blanking but not important here; we only have black and white. There are other small timing differences but I think the figures above are worth trying. Frame rate is a little off, for both PAL and NTSC. Most monitors are very forgiving and will lock on something close. Perhaps someone in the States can try a test version.

Keith W.
 
donmck

Guru

Joined: 09/06/2011
Location: Australia
Posts: 1313
Posted: 09:15pm 21 Oct 2011
Copy link to clipboard 
Print this post

  donmck said   Thinking further, the autoset.cfg file could be used to set VGA or Composite Video also, releasing one pin.

And it places all the same eggs in the one basket.

autoset.cfg
OPTION NTSC
OPTION COMPOSITE




I was possibly trying to explain this more in layman's terms so most users could understand where I was heading, but in reality, it is much simpler than the way I tried to explain it. A few hours sleep helps too.

On power up, the system looks for the autoset.cfg file on the SD card.

If it doesn't find it, PAL and VGA are selected as the defaults.

If it does find it, then the new parameters are set. Sort of like BIOS settings on a PC.

And that's that!

Cheers Don...


https://www.dontronics.com
 
     Page 2 of 4    
Print this page
© JAQ Software 2024