Custom Video Modes Test Thread

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

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

SuperBabyHix
Atari nerd
Atari nerd
Posts: 44
Joined: Sun Jan 24, 2016 10:36 pm

Custom Video Modes Test Thread

Postby SuperBabyHix » Fri Jan 25, 2019 6:18 am

I didn't want to post this in the scaler thread since that is supposed to be for the devs, but some people in there were asking about 1440p video modes.
I personally had success making a 4:3 1440p (1920x1440) custom video mode. The settings are:

Code: Select all

video_mode=1920,48,32,112,1440,3,4,39,184828


I tested this with both PAL and NTSC cores using vsync_adjust=1. Maybe this could be a thread for people to post other custom video modes that work for them.

jft
Atari nerd
Atari nerd
Posts: 47
Joined: Sun Oct 28, 2018 12:07 pm

Re: Custom Video Modes Test Thread

Postby jft » Fri Jan 25, 2019 7:17 pm

SuperBabyHix wrote:I didn't want to post this in the scaler thread since that is supposed to be for the devs, but some people in there were asking about 1440p video modes.
I personally had success making a 4:3 1440p (1920x1440) custom video mode. The settings are:

Code: Select all

video_mode=1920,48,32,112,1440,3,4,39,184828


I tested this with both PAL and NTSC cores using vsync_adjust=1. Maybe this could be a thread for people to post other custom video modes that work for them.


Nice. I will try this on my 1440p monitor :)

jft
Atari nerd
Atari nerd
Posts: 47
Joined: Sun Oct 28, 2018 12:07 pm

Re: Custom Video Modes Test Thread

Postby jft » Sat Jan 26, 2019 1:01 pm

SuperBabyHix wrote:The settings are:

Code: Select all

video_mode=1920,48,32,112,1440,3,4,39,184828



This seems to work well on my 1440p monitor, which fortunately has a 1:1 pixel mode. You get a nice 7x6 integer scale on the SNES core.
IMG_20190126_075745.jpg


Though it is interesting to see where the scanline filters draw their edges with this high a res.
IMG_20190126_075940.jpg
You do not have the required permissions to view the files attached to this post.

bitfan2011
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 111
Joined: Sat Dec 29, 2018 5:46 pm

Re: Custom Video Modes Test Thread

Postby bitfan2011 » Sat Jan 26, 2019 1:25 pm

what settings do people use for 1600x1200 and 1920x1200?
thanks

BlockABoots
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 138
Joined: Sat Oct 20, 2018 3:20 pm

Re: Custom Video Modes Test Thread

Postby BlockABoots » Sat Jan 26, 2019 1:52 pm

Is there a 4K working mode line?

SuperBabyHix
Atari nerd
Atari nerd
Posts: 44
Joined: Sun Jan 24, 2016 10:36 pm

Re: Custom Video Modes Test Thread

Postby SuperBabyHix » Sat Jan 26, 2019 5:18 pm

bitfan2011 wrote:what settings do people use for 1600x1200 and 1920x1200?
thanks


Try these.

Code: Select all

video_mode=1920,48,32,112,1200,3,6,32,154000
video_mode=1600,48,32,112,1200,3,4,32,130250


One thing I noticed with my 1440p settings is that the ao486 core cant run at 72hz, it drops down to 59. I checked and 72hz does put it way about a 200Mhz pixel clock, which I believe is the limit. Something to keep in mind. I tried both the 1200p resolutions and they had no problem.

A problem I did notice with all of these was with the Amstrad core. It seems to get squashed vertically. I'll have to spend some time checking all the other cores to see if there are any issues.

edit:
BlockABoots wrote:Is there a 4K working mode line?

Forgot to say, no and I'm pretty sure it just wont work. I believe it was Grabulosaure that mentioned in another thread that the pixel clock limit is 200Mhz. 4k has a pixel clock of something like 650Mhz. That's why 1440p needs to be a 4:3 aspect ratio instead of 16:9, to get it under the 200Mhz. At least that is my understanding.

Grabulosaure
Atari maniac
Atari maniac
Posts: 89
Joined: Tue Sep 05, 2017 9:35 pm
Contact:

Re: Custom Video Modes Test Thread

Postby Grabulosaure » Sat Jan 26, 2019 5:36 pm

-Modelines
The popular Xorg "Modeline" format can be converted to MiSTer video_mode strings :

Modeline "Name" Pixel_Clock HDISP HSYNCSTART HSYNCEND HTOTAL VDISP VSYNCSTART VSYNCEND VTOTAL
Becomes:
video_mode=HDISP,HSYNCSTART-HDISP,HSYNCEND-HSYNCSTART,HTOTAL-HSYNCEND,VDISP,VSYNCSTART-VDISP,VSYNCEND-VSYNCSTART,VTOTAL-VSYNCEND,Pixel_Clock*1000

Hence :

Code: Select all

ModeLine "1920x1200@60" 154.0 1920 1968 2000 2080 1200 1203 1209 1235 +hsync -vsync

Becomes :

Code: Select all

video_mode=1920,48,32,80,1200,3,6,26,154000


The vertical frequency is Pixel_Clock / HTOTAL/ VTOTAL

[BTW it would be great to autodetect and support the Modeline numbers format (raising H/V numbers). Any volunteer for a patch?]

-Frequencies
* 20MHz : Minimal frequency set by the MiSTer software
* 150MHz : This is the designed frequency target for the scaler, to support 1920x1080. The scaler was optimised to get [almost] no timing errors at that frequency.
* 165MHz : This is the maximum frequency supported by the ADV7513 HDMI encoder.
* 200MHz : This is the limit set by the MiSTer software.

Frequencies far beyond 150MHz are not guaranteed to work, may not work on all cores, or when the FPGA or HDMI encoder is too warm.
It is sometimes possible to lower pixel frequency by reducing blanking and synchro times.

-Resolutions
The VIP Scaler supports 1920x1080, or 1600x1200, [but not 1920x1200, TBC]
ASCAL supports up to around 2048x2048.

It is possible to get higher resolutions with custom builds, but the pixel frequency is the main limit.

4K : According to Wikipedia, some 4K TVs support 24Hz refresh, which could be almost doable with MiSTer. But useless.
The only real use of very high resolutions would be for future cores re-using the scaler as a framebuffer for Amiga ou IBM PC.

The best I could achieve is 2560x1600@48Hz : video_mode=2560,35,20,50,1600,2,4,3,200000.

SuperBabyHix
Atari nerd
Atari nerd
Posts: 44
Joined: Sun Jan 24, 2016 10:36 pm

Re: Custom Video Modes Test Thread

Postby SuperBabyHix » Sat Jan 26, 2019 5:49 pm

Thta's really helpful information, thanks Grabulosaure.

JamesF
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 146
Joined: Sat Dec 15, 2018 6:46 am

Re: Custom Video Modes Test Thread

Postby JamesF » Sat Jan 26, 2019 5:56 pm

Are 4k tv's doing poor job upscaling 1080p to 2160p, so much so that we need true 4k output from the mister?
Upscaling 240p to 1080 with the right filter will be very sharp already imo.

hyperterminal
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 135
Joined: Sun Jul 09, 2017 1:43 pm

Re: Custom Video Modes Test Thread

Postby hyperterminal » Sat Jan 26, 2019 6:02 pm

Anybody got working modes for 240p and 480i?

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5090
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Custom Video Modes Test Thread

Postby Sorgelig » Sat Jan 26, 2019 6:41 pm

JamesF wrote:Are 4k tv's doing poor job upscaling 1080p to 2160p, so much so that we need true 4k output from the mister?
Upscaling 240p to 1080 with the right filter will be very sharp already imo.

1920x1080 to 3840x2160 should be nicely scaled by monitor. May be need to check monitor settings to make sure it doesn't add any blurring. Otherwise it's integer scaling without artifacts.

ghogan42
Atari maniac
Atari maniac
Posts: 90
Joined: Wed Oct 17, 2018 7:27 pm

Re: Custom Video Modes Test Thread

Postby ghogan42 » Sat Jan 26, 2019 9:21 pm

[OffTopic]
jft wrote:Though it is interesting to see where the scanline filters draw their edges with this high a res.
IMG_20190126_075940.jpg


What's this? That doesn't look like on of the scanline filters done through the scaler. Is it a "Scandoubler FX" scanline option?

The lines would be in the correct position if you used the filters available here: https://github.com/MiSTer-devel/Filters ... r/Releases

More explanation https://github.com/MiSTer-devel/Main_Mi ... efficients

You may want to also enable "vscale_mode=1" or "vscale_mode=2" if the scanlines look uneven to you. Those options lock the vertical scaling to integer or to 0.5x increments
[/OffTopic]

With a custom core and mister build I got my 4k TV to show a picture at 4k around 24hz. But the image wasn't correct. I had to use a pixel clock around 205-210mhz to get the blanking times high enough to show a picture at all. Obviously this is useless but still neat to see :)

hyperterminal wrote:Anybody got working modes for 240p and 480i?


240p requires a custom build of the mister binary because they have pixel clocks around 6mhz and mister doesn't allow pizel clocks under 20mhz by default. With a custom mister build, 240p modes work fine. I use one for gameboy on my crt tv.

I haven't made an interlaced modeline for mister before. Can interlaced modes be given through mister.ini?

Grabulosaure
Atari maniac
Atari maniac
Posts: 89
Joined: Tue Sep 05, 2017 9:35 pm
Contact:

Re: Custom Video Modes Test Thread

Postby Grabulosaure » Sat Jan 26, 2019 9:48 pm

ghogan42 wrote:What's this? That doesn't look like on of the scanline filters done through the scaler. Is it a "Scandoubler FX" scanline option?

ASCAL isn't as good as the VIP scaler for image quality.
I have tried several things, such as rounding, but it is not quite right.
ghogan42 wrote:With a custom core and mister build I got my 4k TV to show a picture at 4k around 24hz. But the image wasn't correct. I had to use a pixel clock around 205-210mhz to get the blanking times high enough to show a picture at all. Obviously this is useless but still neat to see :)

Cool! I see it as "aggravated tests". Going beyond certified operational range, up to malfunctioning, to get an idea of the margins under normal operation.
ghogan42 wrote:I haven't made an interlaced modeline for mister before. Can interlaced modes be given through mister.ini?

ASCAL doesn't support interlaced output. It could be added, if needed. Didn't look into details. May also need some tuning of the I2C HDMI encoder configuration. Boring.

ghogan42
Atari maniac
Atari maniac
Posts: 90
Joined: Wed Oct 17, 2018 7:27 pm

Re: Custom Video Modes Test Thread

Postby ghogan42 » Sat Jan 26, 2019 10:24 pm

Grabulosaure wrote:
ghogan42 wrote:What's this? That doesn't look like on of the scanline filters done through the scaler. Is it a "Scandoubler FX" scanline option?

ASCAL isn't as good as the VIP scaler for image quality.
I have tried several things, such as rounding, but it is not quite right.


Maybe but that looks like the old scanline effects and not a filter coefficient effect. Scanlines couldn't be misaligned with the filter txt files like that because the coefficient row that you pull out dictates the darkness + which pixels to blend with the same exact set of numbers. There would be no way to accidentally put a dark line in the middle of a pixel because a "dark row" like [0 24 48 0] for example also dictates that you blend two source pixels. Even if you pull out incorrect coefficients sometimes it doesn't change that 'Dark Part of Scanline' == 'At the border between pixels'

Also, I didn't post in the scaler thread because I thought it was not a great idea. But the only thing I thought of to improve the image quality over the "Phase Accumulator" mode (which is already good to me) is to have a "subpixel precision" by: let's say you have 6bits of fractional pixel position (you have more I'm pretty sure)

  • Suppose fraction is 101001
  • Top 4 bits are 1010 so you would normally take coefficient row 10. Instead why not take row 10 and row 11 and then
  • Mix the coefficient rows 10 and 11 according to "subpixel bits" 01

If you only used one extra "subpixel bit" then you need only two "bit shifts" and one "add" extra per coefficient. Two or more extra bits mean a little more math that maybe you can't afford for speed. idk.

Of course this is nearly the same as having more rows in the coefficient table and doesn't solve any rounding problem and that's why I didn't suggest it before. Also this is where you tell me you did this already :)

Grabulosaure wrote:ASCAL doesn't support interlaced output. It could be added, if needed. Didn't look into details. May also need some tuning of the I2C HDMI encoder configuration. Boring.

The only use case I would have is to force the gameboy core to run through the scaler for output to a 15khz TV at 3x scaling. So it's boring and also dumb. :D

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5090
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Custom Video Modes Test Thread

Postby Sorgelig » Sun Jan 27, 2019 3:32 am

ghogan42 wrote:240p requires a custom build of the mister binary because they have pixel clocks around 6mhz and mister doesn't allow pizel clocks under 20mhz by default. With a custom mister build, 240p modes work fine. I use one for gameboy on my crt tv.

I can lower the bottom limit of pixel clock. Current limit is for HDMI output. With pixel clock like 6MHz you can create video compatible with VGA, but HDMI definitely won't work as it'a far beyond the lower HDMI limit.

ghogan42 wrote:I haven't made an interlaced modeline for mister before. Can interlaced modes be given through mister.ini?

Interlaced video output is not supported and i'm not going to support it, sorry. 240p/288p are fine - i can just remove the pixel clock limit. No for Interlace.

User avatar
DrOG
Atari Super Hero
Atari Super Hero
Posts: 651
Joined: Sun Jul 31, 2016 8:23 pm
Location: Gyula, Hungary

Re: Custom Video Modes Test Thread

Postby DrOG » Sun Jan 27, 2019 5:01 am

Sorgelig wrote:Interlaced video output is not supported and i'm not going to support it, sorry. 240p/288p are fine - i can just remove the pixel clock limit. No for Interlace.

AFAIK old computers/consoles produced 240p/288p videos instead of 480i/576i anyway, don't think it would be a problem even on older CRTs...

jft
Atari nerd
Atari nerd
Posts: 47
Joined: Sun Oct 28, 2018 12:07 pm

Re: Custom Video Modes Test Thread

Postby jft » Sun Jan 27, 2019 5:15 am

ghogan42 wrote:Maybe but that looks like the old scanline effects and not a filter coefficient effect.


Correct this is the Scandoubler FX option. I mostly use MiSTer through a CRT without the scaler so I'm not used to using the scaler options for scanlines. I did however set the scaler to Nearest Neighbor to get the sharp pixels.The comment was in the spirit of "hey, that's interesting..."


Also, to add, I had been using this website to convert from Xorg modelines to something that can directly go into the custom mode line in the ini.
http://www.epanorama.net/faq/vga2rgb/calc_v15.html

Basically it just does the math for you, but you have to remove any extraneous info in the name of the modeline. In other words you must only have the resolution in the name. It is parsing the text so anything extra will confuse it.
For example this will not work:

Code: Select all

Modeline "NTSC 720x480 (60Hz)" 13.846 720 744 809 880 480 488 494 525 interlace -hsync -vsync

But this will: (notice I removed NTSC and (60hz))

Code: Select all

Modeline "720x480" 13.846 720 744 809 880 480 488 494 525 interlace -hsync -vsync


The only other thing to note is interlace resolutions [do not appear to be] supported by the scaler.
(Which, for most typical uses of the scaler, this is OK, as you are outputting to a progressive scan HDMI monitor/TV anyway)

esmith13
Atariator
Atariator
Posts: 28
Joined: Tue Oct 30, 2018 8:06 pm
Contact:

Re: Custom Video Modes Test Thread

Postby esmith13 » Fri Feb 01, 2019 3:43 pm

I wish I could understand what's going on in this thread... Makes my head hurt...

Could anyone possibly tell me what the custom mode setting would be for a 1280x800 HDMI monitor please?

I'm using a 10.1" panel and matching HDMI/VGA driver board that doesn't have an option in the menu to use black bars with a 720p signal. It vertically stretches it to the 800 native pixels and it's killing my OCD.

Thank you in advance for any answers/help/suggestions...

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5090
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Custom Video Modes Test Thread

Postby Sorgelig » Fri Feb 01, 2019 5:15 pm

esmith13 wrote:I wish I could understand what's going on in this thread... Makes my head hurt...

Could anyone possibly tell me what the custom mode setting would be for a 1280x800 HDMI monitor please?

I'm using a 10.1" panel and matching HDMI/VGA driver board that doesn't have an option in the menu to use black bars with a 720p signal. It vertically stretches it to the 800 native pixels and it's killing my OCD.

Thank you in advance for any answers/help/suggestions...

video_mode=1280,64,136,200,800,1,3,24,83460

esmith13
Atariator
Atariator
Posts: 28
Joined: Tue Oct 30, 2018 8:06 pm
Contact:

Re: Custom Video Modes Test Thread

Postby esmith13 » Fri Feb 01, 2019 6:27 pm

Sorgelig wrote:video_mode=1280,64,136,200,800,1,3,24,83460


Thanks so much!

kikusui
Retro freak
Retro freak
Posts: 10
Joined: Sat Oct 13, 2018 8:45 pm

Re: Custom Video Modes Test Thread

Postby kikusui » Thu Mar 21, 2019 11:33 pm

I'm yet another one who is trying to make sense of this thread and it's going over my head. It's given me a headache. (At times like this I think that I should stick to music and the piano!).

Anyway, I have an old HP monitor with a weird resolution that I would like to put to use with MiSTer (otherwise the monitor goes on the scrap heap). It's a HP W2207H that has a resolution of 1680 x 1050. (I think it might even be a 16x10 aspect ratio). Currently, using the MiSTer gives a a picture that I would describe as being "too tall" and streched vertically.

Would someone be able to tell me what the custom mode setting would be for this 1680x1050 hdmi monitor?

Thank you in advance for your help.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5090
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Custom Video Modes Test Thread

Postby Sorgelig » Fri Mar 22, 2019 8:56 am

kikusui wrote:Would someone be able to tell me what the custom mode setting would be for this 1680x1050 hdmi monitor?

http://tinyvga.com/vga-timing/1680x1050@60Hz

kikusui
Retro freak
Retro freak
Posts: 10
Joined: Sat Oct 13, 2018 8:45 pm

Re: Custom Video Modes Test Thread

Postby kikusui » Fri Mar 22, 2019 11:08 pm

Sorgelig wrote:
kikusui wrote:Would someone be able to tell me what the custom mode setting would be for this 1680x1050 hdmi monitor?
:D
http://tinyvga.com/vga-timing/1680x1050@60Hz

That's worked a treat. Thank you so much Sorgelig.

jemismyname
Atari freak
Atari freak
Posts: 71
Joined: Wed Feb 27, 2019 8:25 pm

Re: Custom Video Modes Test Thread

Postby jemismyname » Mon Apr 08, 2019 9:28 pm

JamesF wrote:Are 4k tv's doing poor job upscaling 1080p to 2160p, so much so that we need true 4k output from the mister?
Upscaling 240p to 1080 with the right filter will be very sharp already imo.


I would say that 4k tv's are doing a great job upscaling content... imho, upscaling content is one of the best reasons to get a 4k display... if you think about it, almost every single common display resolution from the past is an integer scale away from 2160p...

I actually noticed this phenomenon while playing retro games on my brother's 4k hisense teevee when i was on christmas holiday last year... i couldn't believe how accurate and beautiful and responsive was every game i played, past to present... then i started doing the math.

240x9 = 2160
480(+33%scanlines)x3 = 2160
540x4 = 2160
720*3 = 2160
1080x2 = 2160

the only "common" format which doesn't scale cleanly is 1440 (but you can still use 33% scanlines), and it's not really that common

By comparison, 1080p, is way worse for upscaling... only 540 really scales cleanly. That's why many common retro gaming platforms (snes/nes mini, etc) only upscale to 720p... it's just easier to do, cleanly.

but, next time you upgrade, just get a 4k screen... it's definitely the sweet spot for gaming and retro content.

happycube
Atarian
Atarian
Posts: 3
Joined: Thu Aug 08, 2019 4:43 am

Re: Custom Video Modes Test Thread

Postby happycube » Thu Aug 08, 2019 5:57 am

Another option for 2160p60/59.97/50 would be to decrease the horizontal clock rate to bring the pixel clock down... if the scaler can be convinced it's still outputting to 16:9!

For NTSC I think 1008 (edit: was 752) would be good, it is pretty close to 4x the colorburst frequency with horizontal padding:

4 * 52.65 (visible) / 63.5555555 (total horizontal line time) * 227.5 (color clocks per line * 16 / 12 (horizontal 4:3->16:9 adjustment) = 1005.24...

Since 1005 cannot be output by the display system (at least with my Dell P2715Q), 1008 will have to do. I used https://arachnoid.com/modelines/ to come up with a modeline, then I converted it for MiSTer.

Code: Select all

# 3x: 752x2160 @ 60.00 Hz (GTF) hsync: 134.10 kHz; pclk: 139.46 MHz
# Modeline "752x2160_60.00" 139.46 752 816 896 1040 2160 2161 2164 2235 -HSync +Vsync
# video_mode=752,64,80,144,2160,1,3,71,139460

# 1008x2160 @ 59.98 Hz (GTF) hsync: 134.05 kHz; pclk: 186.59 MHz
#Modeline "1008x2160_59.98" 186.59 1008 1088 1200 1392 2160 2161 2164 2235 -HSync +Vsync
video_mode = 1008, 80, 112, 192, 2160, 1, 3, 71, 186590


The problem is the scaler thinks the aspect ratio is very funny and does not scale correctly. If it could be told it should be 16:9 anyway, I think this (and a PAL variant) would do a very nice job on 4K monitors.


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 6 guests