detecting EDTV mode

Eke
Posts: 64
Joined: Sat Mar 01, 2008 11:01 am

Re: detecting EDTV mode

Post by Eke » Tue May 13, 2008 10:59 pm

It seems that there is new functions in CVS libogc, to read TV mode setting from SYSCONF for example... I imagine this is the best way to detect progressive mode. Also, reg[55] seems to indicate when the component cable is connected or not...

PS: as you seem to be in the middle of a release, please don't forget to fix the bug with EURGB60 and YUV filter (I edited my post above with the modification I made)

Eke
Posts: 64
Joined: Sat Mar 01, 2008 11:01 am

Re: detecting EDTV mode

Post by Eke » Sat May 17, 2008 1:48 pm

COol, it seems to be fixed in CVS, along with a new useful function to get prefered rendering mode by reading SYSCONF;

Though, there is a problem with the following code:
case CONF_VIDEO_PAL:
2328 case CONF_VIDEO_MPAL:
2329 if ( CONF_GetEuRGB60() > 0 ) {
2330 rmode = &TVEurgb60Hz480Int;
2331 } else {
2332 rmode = &TVMpal480IntDf;
2333 }
2334 break;
2335
I'm pretty sure that TVMpal480IntDf does not work properly on PAL machines (I remember some people complaining about an horizontal black bar when we were using this mode in emulators)

I think, a better choice would be:
case CONF_VIDEO_PAL:
if ( CONF_GetEuRGB60() > 0 ) {
rmode = &TVEurgb60Hz480Int;
} else {
rmode = &TVPal528IntDf;
}
break;

case CONF_VIDEO_MPAL:
rmode = &TVMpal480IntDf;
break;
Again, sorry if this is not the right place to submit code patches or if you already figured this out,but I thought it was worth to be mentionned, since I don't know if you are able to test on PAL machines

And thanks for all the work on the newcoming libogc, this is going to be great !

WinterMute
Site Admin
Posts: 1861
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: detecting EDTV mode

Post by WinterMute » Sun May 18, 2008 6:41 am

Eke wrote: I'm pretty sure that TVMpal480IntDf does not work properly on PAL machines (I remember some people complaining about an horizontal black bar when we were using this mode in emulators)
That would tend to indicate a problem with the emulators, the mode works perfectly well on PAL machines, provided you have a display which will cope with 60Hz. Actually, now I write that, I'm not sure if you mean gamecube emulators or emulators running on the Gamecube/Wii. If the latter then note that a 50Hz PAL resolution is higher than a 60Hz NTSC/MPAL one so a 640x480 image won't actually fill the whole screen, that's probably the cause of the "black bar".

I'll be adding a 50Hz preferred mode before final release though, apparently we're not yet at the stage where all TVs are capable of displaying 60Hz. A great shame really since it's a bit on the awkward side to write games which cope with different refresh rates.
And thanks for all the work on the newcoming libogc, this is going to be great !
Isn't it just? I'm majorly happy with how this is coming together :)
Help keep devkitPro toolchains free, Donate today

Personal Blog

Eke
Posts: 64
Joined: Sat Mar 01, 2008 11:01 am

Re: detecting EDTV mode

Post by Eke » Sun May 18, 2008 10:57 am

WinterMute wrote: That would tend to indicate a problem with the emulators, the mode works perfectly well on PAL machines, provided you have a display which will cope with 60Hz. Actually, now I write that, I'm not sure if you mean gamecube emulators or emulators running on the Gamecube/Wii. If the latter then note that a 50Hz PAL resolution is higher than a 60Hz NTSC/MPAL one so a 640x480 image won't actually fill the whole screen, that's probably the cause of the "black bar".
I mean emulators running on gamecube.

Here is the problem I am talking about, this is definitively not a problem with overscan and 50hz resolution, seems rather a video timing problem (note that this happened in menu also):

Image

This was on a PAL Wii running in Gamecube mode though and this happened when we were using MPAL (60hz) mode.

This is also not a problem with TV not supporting 60hz because using NTSC or EURGB60 instead fixed the problem (note that NTSC only work properly in GC mode for PAL wii, in Wii mode, you have the "red filter" issue because the video output only deliver YUV, not RGB, in NTSC mode).

I think this was an earlier misconception when we wanted to set a PAL 60hz mode (480i) , softdev initially used MPAL which should be compatible with NTSC and PAL60 (aka EURGB60) in theory but using EURGB60 in this case is always a better solution

And indeed, I looked into the VI timing tables and noticed that EURGB60 & NTSC use exactly the same timings, whereas MPAL had some variations. That's why I advise to:
1/ use always TVMpal480IntDf if MPAL is detected in SYSCONF
2/ use only TVEurgb60Hz480IntDf or TVPal528IntDf if PAL is detected in SYSCONF.
3/ use TVNtsc480IntDf by default

In GC mode, there is no such problem so using VIDEO_GetCurrentTvMode should be fine:
1/ use TVPal528IntDf when VI_PAL is returned
2/ use TVMpal480IntDf when VI_MPAL is returned
3/ use TVNtsc480IntDf by default (this will work with PAL gamecube in 60hz also)
I'll be adding a 50Hz preferred mode before final release though, apparently we're not yet at the stage where all TVs are capable of displaying 60Hz. A great shame really since it's a bit on the awkward side to write games which cope with different refresh rates.
yes, but using GX vertical scaling is also very easy and does not look so bad
Isn't it just? I'm majorly happy with how this is coming together :)
I'm impressed by the ton of stuff recently added, it seems to have been a fabulous teamwork

WinterMute
Site Admin
Posts: 1861
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: detecting EDTV mode

Post by WinterMute » Mon May 19, 2008 6:27 pm

Eke wrote: Here is the problem I am talking about, this is definitively not a problem with overscan and 50hz resolution, seems rather a video timing problem (note that this happened in menu also):
Aha, no, that's most definitely not a resolution thing. I had exactly that problem with something a few weeks ago and, being honest, I thought I'd messed something up with video interrupt code. Good to know I'm not actually completely mad and it's just an artifact of MPAL timings - we might have to find some Brazilian Wii owners and check what happens for them though.
And indeed, I looked into the VI timing tables and noticed that EURGB60 & NTSC use exactly the same timings, whereas MPAL had some variations. That's why I advise to:
1/ use always TVMpal480IntDf if MPAL is detected in SYSCONF
2/ use only TVEurgb60Hz480IntDf or TVPal528IntDf if PAL is detected in SYSCONF.
3/ use TVNtsc480IntDf by default
Yeah, that's pretty much what we have in the new VIDEO_GetPreferredMode function. I'm wondering if the Wii actually supports MPAL now though, the visual artifact is really quite odd.
I'll be adding a 50Hz preferred mode before final release though, apparently we're not yet at the stage where all TVs are capable of displaying 60Hz. A great shame really since it's a bit on the awkward side to write games which cope with different refresh rates.
yes, but using GX vertical scaling is also very easy and does not look so bad
Sure but most homebrewers use timing based around the frame rate so gameplay ends up rather different with the 50/60Hz thing.
I'm impressed by the ton of stuff recently added, it seems to have been a fabulous teamwork
We're definitely getting there in terms of willing helpers and testers. As always Shagkur is doing a sterling job of getting things in a state where they work.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Eke
Posts: 64
Joined: Sat Mar 01, 2008 11:01 am

Re: detecting EDTV mode

Post by Eke » Tue Aug 12, 2008 8:31 pm

for the record, I found the technical reason why we got red-only image when using NTSC video mode and a PAL RGB cable:

http://members.optushome.com.au/eviltim ... rt.htm#wii

red, green & blue pins output a YUV compatible signals when the Video Encoder is configured to NTSC , when the TV obviously expect a RGB compatible signal

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests