240p on HDMI

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

msamiullah
Atariator
Atariator
Posts: 22
Joined: Thu Oct 11, 2018 10:58 pm

240p on HDMI

Postby msamiullah » Sat Oct 13, 2018 1:02 am

Hi All,

Is there a way to get 240p signal through HDMI ? Currently I dnt have the IO board so was wondering if I can get it through HDMI. My CRT projector has HDMI card and I can get 240p on OSSC through HDMI. Is it possible here ? If yes what setting do I need to use ?

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2895
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: 240p on HDMI

Postby Sorgelig » Sat Oct 13, 2018 2:45 pm

You need to find HDMI parameters for 240p and use it in custom HDMI resolution in MiSTer.ini.

msamiullah
Atariator
Atariator
Posts: 22
Joined: Thu Oct 11, 2018 10:58 pm

Re: 240p on HDMI

Postby msamiullah » Sat Oct 13, 2018 5:42 pm

Sorgelig wrote:You need to find HDMI parameters for 240p and use it in custom HDMI resolution in MiSTer.ini.


Do you know what are those ?

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2895
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: 240p on HDMI

Postby Sorgelig » Sat Oct 13, 2018 11:57 pm

I don't know. 240p should based on NTSC SDTV (480i) resolution if i remember correct.

msamiullah
Atariator
Atariator
Posts: 22
Joined: Thu Oct 11, 2018 10:58 pm

Re: 240p on HDMI

Postby msamiullah » Mon Oct 15, 2018 12:58 am

Sorgelig wrote:I don't know. 240p should based on NTSC SDTV (480i) resolution if i remember correct.


so do you mean putting "NTSC SDTV" as video mode ?

hyperterminal
Atari maniac
Atari maniac
Posts: 81
Joined: Sun Jul 09, 2017 1:43 pm

Re: 240p on HDMI

Postby hyperterminal » Mon Oct 15, 2018 3:10 am

msamiullah wrote:so do you mean putting "NTSC SDTV" as video mode ?

No. You need to edit mister.ini and enter the correct parameters (unknown to me) for 240p.

Look at the example in the mister.ini for 720p: video_mode=1280,110,40,220,720,5,5,20,74250

msamiullah
Atariator
Atariator
Posts: 22
Joined: Thu Oct 11, 2018 10:58 pm

Re: 240p on HDMI

Postby msamiullah » Wed Oct 17, 2018 4:50 am

hyperterminal wrote:
msamiullah wrote:so do you mean putting "NTSC SDTV" as video mode ?

No. You need to edit mister.ini and enter the correct parameters (unknown to me) for 240p.

Look at the example in the mister.ini for 720p: video_mode=1280,110,40,220,720,5,5,20,74250


I see in the file they have provided the syntax for custom video mode.

Does any one the full appreivations for these:
; custom mode: hact,hfp,hs,hbp,vact,vfp,vs,vbp,Fpix_in_KHz

User avatar
DrOG
Captain Atari
Captain Atari
Posts: 435
Joined: Sun Jul 31, 2016 8:23 pm
Location: Gyula, Hungary

Re: 240p on HDMI

Postby DrOG » Wed Oct 17, 2018 5:49 am

Look at the example in the mister.ini for 720p: video_mode=1280,110,40,220,720,5,5,20,74250

Try the following parameters for 240p (if you have FullHD screen and wants 4:3 AR), perhaps it will work, perhaps not:
video_mode=1440, 124, 38, 114, 240, 3, 4, 15, 27027

GreyRogue
Atari maniac
Atari maniac
Posts: 82
Joined: Thu Mar 22, 2018 3:50 am

Re: 240p on HDMI

Postby GreyRogue » Wed Oct 17, 2018 5:51 am

msamiullah wrote:
hyperterminal wrote:
msamiullah wrote:so do you mean putting "NTSC SDTV" as video mode ?

No. You need to edit mister.ini and enter the correct parameters (unknown to me) for 240p.

Look at the example in the mister.ini for 720p: video_mode=1280,110,40,220,720,5,5,20,74250


I see in the file they have provided the syntax for custom video mode.

Does any one the full appreivations for these:
; custom mode: hact,hfp,hs,hbp,vact,vfp,vs,vbp,Fpix_in_KHz

Horizontal and Vertical active, front porch, synch, and back porch.

msamiullah
Atariator
Atariator
Posts: 22
Joined: Thu Oct 11, 2018 10:58 pm

Re: 240p on HDMI

Postby msamiullah » Wed Oct 17, 2018 3:53 pm

GreyRogue wrote:
msamiullah wrote:
hyperterminal wrote:No. You need to edit mister.ini and enter the correct parameters (unknown to me) for 240p.

Look at the example in the mister.ini for 720p: video_mode=1280,110,40,220,720,5,5,20,74250


I see in the file they have provided the syntax for custom video mode.

Does any one the full appreivations for these:
; custom mode: hact,hfp,hs,hbp,vact,vfp,vs,vbp,Fpix_in_KHz

Horizontal and Vertical active, front porch, synch, and back porch.


thanks you know what is Fpix_in_KHz ?

msamiullah
Atariator
Atariator
Posts: 22
Joined: Thu Oct 11, 2018 10:58 pm

Re: 240p on HDMI

Postby msamiullah » Wed Oct 17, 2018 3:57 pm

DrOG wrote:
Look at the example in the mister.ini for 720p: video_mode=1280,110,40,220,720,5,5,20,74250

Try the following parameters for 240p (if you have FullHD screen and wants 4:3 AR), perhaps it will work, perhaps not:
video_mode=1440, 124, 38, 114, 240, 3, 4, 15, 27027


thanks my CRT projector natively supports 240p. Do you know these parameters for native 240 displays ? I used the settings but the image is stressed vertically (very skinny). I think my display would need native 240p parameters or in other words for 320x240p ?

THaase
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 101
Joined: Mon Oct 16, 2017 8:39 am
Location: Germany

Re: 240p on HDMI

Postby THaase » Wed Oct 17, 2018 6:47 pm

Sounds for me like a problem back in the good old times (~1996) doing modeline calculations for Linux.
Maybe this is a good starting point ....

Check for "Linux Modeline Calculator" ....

User avatar
DrOG
Captain Atari
Captain Atari
Posts: 435
Joined: Sun Jul 31, 2016 8:23 pm
Location: Gyula, Hungary

Re: 240p on HDMI

Postby DrOG » Wed Oct 17, 2018 6:59 pm

msamiullah wrote:
DrOG wrote:
Look at the example in the mister.ini for 720p: video_mode=1280,110,40,220,720,5,5,20,74250

Try the following parameters for 240p (if you have FullHD screen and wants 4:3 AR), perhaps it will work, perhaps not:
video_mode=1440, 124, 38, 114, 240, 3, 4, 15, 27027


thanks my CRT projector natively supports 240p. Do you know these parameters for native 240 displays ? I used the settings but the image is stressed vertically (very skinny). I think my display would need native 240p parameters or in other words for 320x240p ?

Try to set the Aspect Ratio on the projector to 4:3...

GreyRogue
Atari maniac
Atari maniac
Posts: 82
Joined: Thu Mar 22, 2018 3:50 am

Re: 240p on HDMI

Postby GreyRogue » Wed Oct 17, 2018 11:09 pm

msamiullah wrote:
GreyRogue wrote:
msamiullah wrote:
I see in the file they have provided the syntax for custom video mode.

Does any one the full appreivations for these:
; custom mode: hact,hfp,hs,hbp,vact,vfp,vs,vbp,Fpix_in_KHz

Horizontal and Vertical active, front porch, synch, and back porch.


thanks you know what is Fpix_in_KHz ?

Pixel clock frequency in KHz. For the horizontal, it specifies how long each section lasts (e.g. 1440/(27027*10e3)=53.28us). Vertical values are in units of lines (total of the h values/FPix).

msamiullah
Atariator
Atariator
Posts: 22
Joined: Thu Oct 11, 2018 10:58 pm

Re: 240p on HDMI

Postby msamiullah » Thu Oct 18, 2018 12:06 am

DrOG wrote:
msamiullah wrote:
DrOG wrote:Try the following parameters for 240p (if you have FullHD screen and wants 4:3 AR), perhaps it will work, perhaps not:
video_mode=1440, 124, 38, 114, 240, 3, 4, 15, 27027


thanks my CRT projector natively supports 240p. Do you know these parameters for native 240 displays ? I used the settings but the image is stressed vertically (very skinny). I think my display would need native 240p parameters or in other words for 320x240p ?

Try to set the Aspect Ratio on the projector to 4:3...


did that no luck, thing is menu looks ok but when I load a rom (Genesis or PC Engin) the image is very skinny.

SuperScope6
Atarian
Atarian
Posts: 2
Joined: Fri Oct 19, 2018 2:45 pm

Re: 240p on HDMI

Postby SuperScope6 » Fri Oct 19, 2018 5:00 pm

Maybe the timings here will help?

http://retrorgb.com/rpi240p.html

GreyRogue
Atari maniac
Atari maniac
Posts: 82
Joined: Thu Mar 22, 2018 3:50 am

Re: 240p on HDMI

Postby GreyRogue » Fri Oct 19, 2018 8:21 pm

SuperScope6 wrote:Maybe the timings here will help?

http://retrorgb.com/rpi240p.html

This looks like the definition for the numbers:
https://www.raspberrypi.org/documentati ... t/video.md
hdmi_timings=<h_active_pixels> <h_sync_polarity> <h_front_porch> <h_sync_pulse> <h_back_porch> <v_active_lines> <v_sync_polarity> <v_front_porch> <v_sync_pulse> <v_back_porch> <v_sync_offset_a> <v_sync_offset_b> <pixel_rep> <frame_rate> <interlaced> <pixel_freq> <aspect_ratio>

<h_active_pixels> = horizontal pixels (width)
<h_sync_polarity> = invert hsync polarity
<h_front_porch> = horizontal forward padding from DE acitve edge
<h_sync_pulse> = hsync pulse width in pixel clocks
<h_back_porch> = vertical back padding from DE active edge
<v_active_lines> = vertical pixels height (lines)
<v_sync_polarity> = invert vsync polarity
<v_front_porch> = vertical forward padding from DE active edge
<v_sync_pulse> = vsync pulse width in pixel clocks
<v_back_porch> = vertical back padding from DE active edge
<v_sync_offset_a> = leave at zero
<v_sync_offset_b> = leave at zero
<pixel_rep> = leave at zero
<frame_rate> = screen refresh rate in Hz
<interlaced> = leave at zero
<pixel_freq> = clock frequency (width*height*framerate)
<aspect_ratio> = *

hyperterminal
Atari maniac
Atari maniac
Posts: 81
Joined: Sun Jul 09, 2017 1:43 pm

Re: 240p on HDMI

Postby hyperterminal » Sat Oct 20, 2018 4:58 am

Thank you GreyRogue. Now I was able to translate the values from RetroRGB to MiSTer Syntax:

Code: Select all

; 240p
video_mode=320,16,30,34,240,2,3,22,6400

; 240p alternate
video_mode=320,10,20,54,240,6,8,10,6400

; 336:252 6.4MHz progressive
video_mode=336,10,30,34,252,15,3,42,6400

; 480i
video_mode=640,16,88,64,240,6,5,13,12700

; 256:192 Sega Master System (NTSC)
video_mode=256,6,17,18,192,26,22,29,4800

; 256:224 NES, SNES (NTSC)
video_mode=256,8,17,21,224,7,10,24,4800

; 320:224 Sega Genesis (NTSC)
video_mode=320,20,29,35,224,10,14,16,6400

; 320:256 Amiga (PAL)
video_mode=320,14,46,28,256,17,32,9,6400

msamiullah
Atariator
Atariator
Posts: 22
Joined: Thu Oct 11, 2018 10:58 pm

Re: 240p on HDMI

Postby msamiullah » Sun Oct 21, 2018 6:37 pm

hyperterminal wrote:Thank you GreyRogue. Now I was able to translate the values from RetroRGB to MiSTer Syntax:

Code: Select all

; 240p
video_mode=320,16,30,34,240,2,3,22,6400

; 240p alternate
video_mode=320,10,20,54,240,6,8,10,6400

; 336:252 6.4MHz progressive
video_mode=336,10,30,34,252,15,3,42,6400

; 480i
video_mode=640,16,88,64,240,6,5,13,12700

; 256:192 Sega Master System (NTSC)
video_mode=256,6,17,18,192,26,22,29,4800

; 256:224 NES, SNES (NTSC)
video_mode=256,8,17,21,224,7,10,24,4800

; 320:224 Sega Genesis (NTSC)
video_mode=320,20,29,35,224,10,14,16,6400

; 320:256 Amiga (PAL)
video_mode=320,14,46,28,256,17,32,9,6400


thanks for doing that but it doesnt work I think Fpix_in_Khz number is the issue, may its different that rpi one. Not sure though

SuperScope6
Atarian
Atarian
Posts: 2
Joined: Fri Oct 19, 2018 2:45 pm

Re: 240p on HDMI

Postby SuperScope6 » Tue Oct 23, 2018 7:09 pm

A couple more ideas. Try this:

Code: Select all

; 240p
video_mode=320,16,30,34,240,2,3,22,6472


Or leaving off the Fpix setting seems to work for some people:

Code: Select all

; 240p
video_mode=320,16,30,34,240,2,3,22

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2895
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: 240p on HDMI

Postby Sorgelig » Tue Oct 23, 2018 8:26 pm

HDMI is not supposed to work on extremely low frequencies. Some TV/Monitors wont accept it. Low resolution modes are usually based on higher resolution modes like 480p60 or 576p50 with large blanking and small active area.

paulbnl
Atarian
Atarian
Posts: 1
Joined: Wed Oct 24, 2018 9:43 am

Re: 240p on HDMI

Postby paulbnl » Wed Oct 24, 2018 10:01 am

For proper 240p/480i output through HDMI the 720x240 resolution should be output as 1440 or 2880x240 with pixel repetition set in byte 5 of AVI InfoFrame.

Pixel repetition seems to be fixed to 0 here https://github.com/MiSTer-devel/Menu_MiSTer/blob/master/sys/hdmi_config.sv#L109 so it would need to be added as a setting in mister.ini

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2895
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: 240p on HDMI

Postby Sorgelig » Wed Oct 24, 2018 6:49 pm

paulbnl wrote:For proper 240p/480i output through HDMI the 720x240 resolution should be output as 1440 or 2880x240 with pixel repetition set in byte 5 of AVI InfoFrame.

Pixel repetition seems to be fixed to 0 here https://github.com/MiSTer-devel/Menu_MiSTer/blob/master/sys/hdmi_config.sv#L109 so it would need to be added as a setting in mister.ini

just try big back porch instead of repetition.


Return to “MiSTer”

Who is online

Users browsing this forum: DrOG, hubersn, widge, Xtro and 16 guests