Pixel Perfect Output on VGA CRT 31khz

AmintaMister
Posts: 313
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 841 times
Been thanked: 51 times

Pixel Perfect Output on VGA CRT 31khz

Unread post by AmintaMister »

Hi there!

First of all, still THANKS for this MARVELLOUS core, one of the best core created for MiSTer!

I have a question.

When I'm using Ao486 core on my 17" LG Studioworks 700S (max resolution 1280 x 1024 / 60Hz) I use the "dynamic resolutions" like this:

Code: Select all

[ao486]
; Set it to "Variable" in the video settings in the menu of the core
; video_mode=1; This is the "catch-all" resolution that will be used if an undefined video mode is detected. This example may be too high of a resolution for your monitor. You can use video_mode=1 instead for example.
; video_mode=hact,hfp,hs,hbp,vact,vfp,vs,vbp,fpix
; hact and vact defines the active (visible) size of the video mode in horizontal and vertical pixels, respectively. hfp, hs and hbp defines the duration of horizontal front porch, sync and back porch in pixels. vfp, vs abd vbp define the same properties, but for the vertical timing. Finally, the fpix value is the frequency of the pixel clock in KHz (pixels clocks are usually specified in MHz, so multiply the Mhz value by a 1000 to get the value in KHz).
; video_mode=720,15,108,46,400,13,2,34,27983,0,1
video_mode=720,32,96,32,400,8,5,8,25970,0,0
direct_video=0 ; use the scaler: NB: THIS CORE OVERRIDES forced_scandoubler and automatically uses the scaler so you have to define manually the various resolutions and vertical refresh...
vsync_adjust=2 ; minimal lag
vscale_mode=1 ; integer scaling
video_info=0 ; show resolution information for X seconds
hdmi_limited=2 ; 1 - use limited (16..235) color range over HDMI ; 2 - use limited (16..255) color range over HDMI, for VGA converters.

[video=320x200@70.1]
video_mode=320,24,49,38,200,2,2,20,13535,0,1 ; 320x200@140.2Hz@31.4kHz DOS CGA/EGA/Adventure games with scanlines
video_mode=640,7,108,30,400,13,2,34,24708,0,1 ; 640x400@70.1Hz@31.48kHz VGA era games including 320x200, 320x400, 640x400 @70.1Hz

[video=320x400@70.1]
video_mode=640,7,108,30,400,13,2,34,24708,0,1 ; 640x400@70.1Hz@31.48kHz VGA Games including 320x200, 320x400, 640x400 @70.1Hz

[video=720x400@70.1]
video_mode=720,32,96,32,400,8,5,8,25970,0,0
;video_mode=720,15,108,46,400,13,2,34,27983,0,1 ; 720x400@70.1Hz@31.48kHz DOS Text

;experimental modes
[video=320x199@59.7]
video_mode=640,25,130,75,398,50,29,50,27370,0,1 ; 640x398@59.7Hz@31.46kHz Jazz Jackrabbit

[video=320x240@59.7]
video_mode=640,40,96,64,480,14,2,31,26430,0,1 ; 640x480@59.7Hz Epic Pinball (temp modeline, still under development)

[video=640x480@59.7]
video_mode=640,40,96,64,480,14,2,31,26430,0,1 ; 640x480@59.7Hz (temp modeline, still under development)

[video=640x350@70.1]
video_mode=640,16,96,48,350,37,2,60,25175; Lemmings, Crisis in the Kremlin

[video=800x600@59.7]
video_mode=800,32,80,112,600,1,3,17,37960

[video=800x600@60.0]
video_mode=800,32,80,112,600,1,3,18,38220

Is it possible to use theme on PC/XT core? Or, in alternative, is it possible to make that PC/XT core change resolution if it passed i.e. from 640x200 text mode to 320x200 graphics mode?

About the 640x200 text mode, I've tried this in the .ini, but the monitor goes "out of synch"...

Code: Select all

[PCXT]
forced_scandoubler=0 ; set to 1 to run scandoubler on VGA output always (depends on core).
vga_scaler=1 ; set to 1 to connect VGA to scaler output.
video_mode=640,55,90,131,200,34,0,40,15058
vsync_adjust=2 ; minimal lag
vscale_mode=3 ; integer scaling
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by thorr »

Try just using forced_scandoubler =1 and vga_scaler=0 with no video_mode, vscale or vsync settings. I haven't tested this yet but it might work.
Mills
Posts: 90
Joined: Mon Jun 08, 2020 2:52 pm
Has thanked: 15 times
Been thanked: 32 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by Mills »

AmintaMister wrote: Sun Nov 27, 2022 1:59 pm
Is it possible to use theme on PC/XT core? Or, in alternative, is it possible to make that PC/XT core change resolution if it passed i.e. from 640x200 text mode to 320x200 graphics mode?
You should try 640x400 (not 640x200), the actual size of the final image on the crt should be 640x400 because scanlines are doubled. I suppose forced_scandoubler =1 does just that.

Could you test demos like 8088mph and area5150 on CRT? I think they require crts for some wave effects at the end, but I don't really know.
AmintaMister
Posts: 313
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 841 times
Been thanked: 51 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by AmintaMister »

thorr wrote: Tue Nov 29, 2022 9:46 am Try just using forced_scandoubler =1 and vga_scaler=0 with no video_mode, vscale or vsync settings. I haven't tested this yet but it might work.
Hi! Unfortunately, setting forced_scandoubler =1 (with or without vga_scaler=0) make the VGA Cat get out of sync: I'm sure the forced_scandoubler is not supported for this core...
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by thorr »

AmintaMister wrote: Tue Nov 29, 2022 8:45 pm Hi! Unfortunately, setting forced_scandoubler =1 (with or without vga_scaler=0) make the VGA Cat get out of sync: I'm sure the forced_scandoubler is not supported for this core...
You can try creating your own modelines. I wrote a how-to: https://github.com/MiSTer-devel/Main_Mi ... TION-GUIDE

You need to turn on the display of the video information when a new resolution is detected by the core. This will tell you what the resolution and vertical frequency is from the source. Then you need to create a modeline that the VGA monitor will support and be around 31Khz and the same exact vertical frequency. Doubling the vertical resolution is one option. Another option is doubling the vertical frequency and keeping the resolution the same. I did this for ao486 here: https://github.com/MiSTer-devel/Main_Mi ... -CRT-Guide
video_mode=320,24,49,38,200,2,2,20,13535,0,1 ; 320x200@140.2Hz@31.4kHz DOS CGA/EGA/Adventure games with scanlines

That modeline is based on a 70.1Hz vertical frequency being doubled. The PCXT core is going to be closer to 60Hz most likely, so you wouldn't want to use that modeline. Try to use my guide and try to create your own. Good luck! You could use that modeline, but there could be some tearing during fast motion.
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by Malor »

The XT doesn't create a 70Hz signal? I thought all PCs did that in text mode, or am I just way off base?

dmckean
Posts: 310
Joined: Sat Jan 16, 2021 7:03 am
Has thanked: 396 times
Been thanked: 95 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by dmckean »

Malor wrote: Wed Nov 30, 2022 8:24 pm

The XT doesn't create a 70Hz signal? I thought all PCs did that in text mode, or am I just way off base?

CGA and EGA text mode is 640x200 @60hz

AmintaMister
Posts: 313
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 841 times
Been thanked: 51 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by AmintaMister »

thorr wrote: Tue Nov 29, 2022 11:22 pm
AmintaMister wrote: Tue Nov 29, 2022 8:45 pm

Hi! Unfortunately, setting forced_scandoubler =1 (with or without vga_scaler=0) make the VGA Cat get out of sync: I'm sure the forced_scandoubler is not supported for this core...

You can try creating your own modelines. I wrote a how-to: https://github.com/MiSTer-devel/Main_Mi ... TION-GUIDE

You need to turn on the display of the video information when a new resolution is detected by the core. This will tell you what the resolution and vertical frequency is from the source. Then you need to create a modeline that the VGA monitor will support and be around 31Khz and the same exact vertical frequency. Doubling the vertical resolution is one option. Another option is doubling the vertical frequency and keeping the resolution the same. I did this for ao486 here: https://github.com/MiSTer-devel/Main_Mi ... -CRT-Guide
video_mode=320,24,49,38,200,2,2,20,13535,0,1 ; 320x200@140.2Hz@31.4kHz DOS CGA/EGA/Adventure games with scanlines

That modeline is based on a 70.1Hz vertical frequency being doubled. The PCXT core is going to be closer to 60Hz most likely, so you wouldn't want to use that modeline. Try to use my guide and try to create your own. Good luck! You could use that modeline, but there could be some tearing during fast motion.

Thanks Thorr! I've carefully read your guide and I've tried to create a modeling starting from 600x200@59.8Hz, problem is that - even doubling the resolution - I can't get an horizontal refresh above the minimum of 30 Khz on My Via Crt...

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by thorr »

AmintaMister wrote: Wed Nov 30, 2022 8:59 pm

Thanks Thorr! I've carefully read your guide and I've tried to create a modeling starting from 600x200@59.8Hz, problem is that - even doubling the resolution - I can't get an horizontal refresh above the minimum of 30 Khz on My Via Crt...

Thanks for trying. It is helpful to know if my guide is any good or not, and if I need to explain things better. You need to double the vertical resolution to 400 or double the refresh rate to close to 120Hz. You mentioned 600x200. Is the horizontal source resolution showing up as 600? That is a strange resolution.

AmintaMister
Posts: 313
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 841 times
Been thanked: 51 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by AmintaMister »

thorr wrote: Wed Nov 30, 2022 10:11 pm
AmintaMister wrote: Wed Nov 30, 2022 8:59 pm

Thanks Thorr! I've carefully read your guide and I've tried to create a modeling starting from 600x200@59.8Hz, problem is that - even doubling the resolution - I can't get an horizontal refresh above the minimum of 30 Khz on My Via Crt...

Thanks for trying. It is helpful to know if my guide is any good or not, and if I need to explain things better. You need to double the vertical resolution to 400 or double the refresh rate to close to 120Hz. You mentioned 600x200. Is the horizontal source resolution showing up as 600? That is a strange resolution.

Sorry, my fault! I meant: 640x200!

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by thorr »

AmintaMister wrote: Wed Nov 30, 2022 10:16 pm

Sorry, my fault! I meant: 640x200!

So, you can do 640x200@59.8x2=119.6Hz (assuming it is exactly 59.8 in the source). This will have black scanlines between the pixels. If you want the smooth look, then do 640x400@59.8.

AmintaMister
Posts: 313
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 841 times
Been thanked: 51 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by AmintaMister »

thorr wrote: Wed Nov 30, 2022 10:18 pm
AmintaMister wrote: Wed Nov 30, 2022 10:16 pm

Sorry, my fault! I meant: 640x200!

So, you can do 640x200@59.8x2=119.6Hz (assuming it is exactly 59.8 in the source). This will have black scanlines between the pixels. If you want the smooth look, then do 640x400@59.8.

Unfortunately, this setting gives me a final horizontal frequency of 25.34Khz....

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by thorr »

AmintaMister wrote: Wed Nov 30, 2022 10:23 pm

Unfortunately, this setting gives me a final horizontal frequency of 25.34Khz....

You can do other multiples: 640x600@59.8Hz, 1280x600@59.8Hz, 640x200@179.4Hz (although this one may be too much stress on it)

AmintaMister
Posts: 313
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 841 times
Been thanked: 51 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by AmintaMister »

thorr wrote: Wed Nov 30, 2022 10:29 pm
AmintaMister wrote: Wed Nov 30, 2022 10:23 pm

Unfortunately, this setting gives me a final horizontal frequency of 25.34Khz....

You can do other multiples: 640x600@59.8Hz, 1280x600@59.8Hz, 640x200@179.4Hz (although this one may be too much stress on it)

Thanks! I've tried 640x600@59.8Hz, it works but obviously when the resolution changes because a game starts, it keeps this "text mode" resolution; in A0486 you can set the "dynamic video modes" instead...

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by thorr »

AmintaMister wrote: Wed Nov 30, 2022 10:58 pm
thorr wrote: Wed Nov 30, 2022 10:29 pm
AmintaMister wrote: Wed Nov 30, 2022 10:23 pm

Unfortunately, this setting gives me a final horizontal frequency of 25.34Khz....

You can do other multiples: 640x600@59.8Hz, 1280x600@59.8Hz, 640x200@179.4Hz (although this one may be too much stress on it)

Thanks! I've tried 640x600@59.8Hz, it works but obviously when the resolution changes because a game starts, it keeps this "text mode" resolution; in A0486 you can set the "dynamic video modes" instead...

Great! Glad you got it to work. In theory, you should be able to make the sections in the MiSTer.ini with each resolution like in ao486. You need to set up different custom resolutions for all the screen modes. 640x200 is just one of them. When the game starts and it switches resolution, it will tell you on the display what the new resolution and refresh rate is if you have that enabled in the .ini to show it. Also, when you get these all figured out, you should post them here for others to enjoy. :-)

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by thorr »

After thinking about it, there should be an option to triple the scan and not just double it with forced_scandoubler=1. Like if it =2, then it adds two scanlines. This might be worth a request on the MiSTer github. I am not sure if it is easy and therefore worth the effort or not. Not many cores would need this.

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by thorr »

Keep in mind that you can re-use some of the resolutions. For example, if one of the modes is 320x200@59.8Hz, you can use the same 640x600@59.8Hz mode. You just need to specify it in the .ini file.

AmintaMister
Posts: 313
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 841 times
Been thanked: 51 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by AmintaMister »

thorr wrote: Thu Dec 01, 2022 12:47 am

Keep in mind that you can re-use some of the resolutions. For example, if one of the modes is 320x200@59.8Hz, you can use the same 640x600@59.8Hz mode. You just need to specify it in the .ini file.

How?

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by thorr »

AmintaMister wrote: Thu Dec 01, 2022 8:32 pm

How?

Copying and pasting from the code section in your first post:

[video=320x240@59.7]
video_mode=640,40,96,64,480,14,2,31,26430,0,1 ; 640x480@59.7Hz Epic Pinball (temp modeline, still under development)

[video=640x480@59.7]
video_mode=640,40,96,64,480,14,2,31,26430,0,1 ; 640x480@59.7Hz (temp modeline, still under development)

You specify the source in the [ ] part, and the modeline below it. You need to create [video=XxY@Z] sections for all the video modes. The video_mode= underneath these define what you want your monitor to do when that source resolution is used. The above example shows the same modeline for two video modes.

I will be traveling now and won't be able to answer anymore questions for a bit.

You also need the [pcxt] header before those lines, and turn on the scaler, etc. like with ao486.

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by thorr »

By the way, I provided newer versions of those temp modelines in that thread in the ao486 section. Good luck. Feel free to ask more questions and I will respond when I can.

ygdx1986
Posts: 2
Joined: Fri Dec 31, 2021 9:10 am
Has thanked: 2 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by ygdx1986 »

thorr wrote: Tue Nov 29, 2022 11:22 pm
AmintaMister wrote: Tue Nov 29, 2022 8:45 pm

Hi! Unfortunately, setting forced_scandoubler =1 (with or without vga_scaler=0) make the VGA Cat get out of sync: I'm sure the forced_scandoubler is not supported for this core...

You can try creating your own modelines. I wrote a how-to: https://github.com/MiSTer-devel/Main_Mi ... TION-GUIDE

You need to turn on the display of the video information when a new resolution is detected by the core. This will tell you what the resolution and vertical frequency is from the source. Then you need to create a modeline that the VGA monitor will support and be around 31Khz and the same exact vertical frequency. Doubling the vertical resolution is one option. Another option is doubling the vertical frequency and keeping the resolution the same. I did this for ao486 here: https://github.com/MiSTer-devel/Main_Mi ... -CRT-Guide
video_mode=320,24,49,38,200,2,2,20,13535,0,1 ; 320x200@140.2Hz@31.4kHz DOS CGA/EGA/Adventure games with scanlines

That modeline is based on a 70.1Hz vertical frequency being doubled. The PCXT core is going to be closer to 60Hz most likely, so you wouldn't want to use that modeline. Try to use my guide and try to create your own. Good luck! You could use that modeline, but there could be some tearing during fast motion.

I can't visit https://github.com/MiSTer-devel/Main_Mi ... TION-GUIDE, the link is invalid.

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by Malor »

I can't directly navigate to that link either, but if you click through to the main Wiki from there, you can then drill back down to the modeline creation guide. (you can just search for that keyword.) You will end up at the exact same link, the one you couldn't visit directly.

Very strange behavior.

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by thorr »

ygdx1986 wrote: Sat Dec 24, 2022 3:18 am

I can't visit https://github.com/MiSTer-devel/Main_Mi ... TION-GUIDE, the link is invalid.

It looks like some things have been updated. The new link is: https://github.com/MiSTer-devel/Wiki_Mi ... TION-GUIDE

There is a link to it in the "Using CRT TV's and Monitors" page that doesn't work currently.

bigern77
Posts: 11
Joined: Sun Jul 12, 2020 8:50 pm
Has thanked: 3 times
Been thanked: 4 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by bigern77 »

AmintaMister wrote: Wed Nov 30, 2022 10:58 pm
thorr wrote: Wed Nov 30, 2022 10:29 pm
AmintaMister wrote: Wed Nov 30, 2022 10:23 pm

Unfortunately, this setting gives me a final horizontal frequency of 25.34Khz....

You can do other multiples: 640x600@59.8Hz, 1280x600@59.8Hz, 640x200@179.4Hz (although this one may be too much stress on it)

Thanks! I've tried 640x600@59.8Hz, it works but obviously when the resolution changes because a game starts, it keeps this "text mode" resolution; in A0486 you can set the "dynamic video modes" instead...

Could you please post your [PCXT] section? Nothing is working for me.

AmintaMister
Posts: 313
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 841 times
Been thanked: 51 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by AmintaMister »

bigern77 wrote: Sun Jun 18, 2023 7:32 pm
AmintaMister wrote: Wed Nov 30, 2022 10:58 pm
thorr wrote: Wed Nov 30, 2022 10:29 pm

You can do other multiples: 640x600@59.8Hz, 1280x600@59.8Hz, 640x200@179.4Hz (although this one may be too much stress on it)

Thanks! I've tried 640x600@59.8Hz, it works but obviously when the resolution changes because a game starts, it keeps this "text mode" resolution; in A0486 you can set the "dynamic video modes" instead...

Could you please post your [PCXT] section? Nothing is working for me.

Hi!

This is my complete .ini for VGA:

Code: Select all

[MiSTer]
key_menu_as_rgui=0     ; set to 1 to make the MENU key map to RGUI in Minimig (e.g. for Right Amiga)
forced_scandoubler=1   ; set to 1 to run scandoubler on VGA output always (depends on core).
ypbpr=0                ; set to 1 for YPbPr on VGA output.
composite_sync=0       ; set to 1 for composite sync on HSync signal of VGA output.
vga_scaler=0           ; set to 1 to connect VGA to scaler output.
hdmi_audio_96k=1       ; set to 1 for 96khz/16bit HDMI audio (48khz/16bit otherwise)
keyrah_mode=0x18d80002 ; VIDPID of keyrah for special code translation (0x23418037 for Arduino Micro)
vscale_mode=0          ; 0 - scale to fit the screen height.
                       ; 1 - use integer scale only.
                       ; 2 - use 0.5 steps of scale.
                       ; 3 - use 0.25 steps of scale.
vscale_border=0        ; set vertical border for TVs cutting the upper/bottom parts of screen (1-399)
;bootscreen=0          ; uncomment to disable boot screen of some cores like Minimig.
;mouse_throttle=10     ; 1-100 mouse speed divider. Useful for very sensitive mice
rbf_hide_datecode=0    ; 1 - hides datecodes from rbf file names. Press F2 for quick temporary toggle
menu_pal=0             ; 1 - PAL mode for menu core
hdmi_limited=0         ; 1 - use limited (16..235) color range over HDMI
                       ; 2 - use limited (16..255) color range over HDMI, for VGA converters.
direct_video=0         ; 1 - enable core video timing over HDMI, use only with VGA converters.
fb_size=0              ; 0 - automatic, 1 - full size, 2 - 1/2 of resolution, 4 - 1/4 of resolution.
fb_terminal=0          ; 1 - enabled (default), 0 - disabled
osd_timeout=30         ; 5-3600 timeout (in seconds) for OSD to disappear in Menu core. 30 seconds if not set.
                       ; Background picture will get darker after double timeout
osd_rotate=0           ; Display OSD menu rotated,  0 - no rotation, 1 - rotate right (+90°), 2 - rotate left (-90°)

; 1 - enables the recent file loaded/mounted.
; WARNING: This option will enable write to SD card on every load/mount which may wear the SD card after many writes to the same place
;          There is also higher chance to corrupt the File System if MiSTer will be reset or powered off while writing.
recents=0

; lastcore - Autoboot the last loaded core (corename autosaved in CONFIG/lastcore.dat) first found on the SD/USB
; lastexactcore - Autoboot the last loaded exact core (corename_yyyymmdd.rbf autosaved in CONFIG/lastcore.dat) first found on the SD/USB
; corename - Autoboot first corename_*.rbf found on the SD/USB
; corename_yyyymmdd.rbf - Autoboot first corename_yyyymmdd.rbf found on the SD/USB
;bootcore=lastcore    ; uncomment to autoboot a core, as the last loaded core.

; 10-30 timeout before autoboot, comment for autoboot without timeout.
bootcore_timeout=10

; Option to load the custom font. Format is plain bitmap 8x8.
; Supported sizes of font:
;   768 bytes - chars 32-127 (only alpha + numeric)
;  1024 bytes - chars 0-127
;  1136 bytes - chars 0-141
;  up to 2048 - only chars 0-141 will be used.
; if first 32 chars are empty (for sizes 1024 bytes and more) then they are skipped.
font=font/myfont.pf

; USER button emulation by keybaord. Usually it's reset button.
; 0 - lctrl+lalt+ralt (lctrl+lgui+rgui on keyrah)
; 1 - lctrl+lgui+rgui
; 2 - lctrl+lalt+del
; 3 - same as 0 (lctrl+lalt+ralt on keyrah)
reset_combo=0

; set to 1 for DVI mode. Audio won't be transmitted through HDMI in DVI mode.
dvi_mode=0

; 0 - 1280x720@60
; 1 - 1024x768@60
; 2 - 720x480@60
; 3 - 720x576@50
; 4 - 1280x1024@60
; 5 - 800x600@60
; 6 - 640x480@60
; 7 - 1280x720@50
; 8 - 1920x1080@60
; 9 - 1920x1080@50
;10 - 1366x768@60
;11 - 1024x600@60
;12 - 1920x1440@60
;13 - 2048x1536@60
;
; custom mode: hact,hfp,hs,hbp,vact,vfp,vs,vbp,Fpix_in_KHz
;   video_mode=1280,110,40,220,720,5,5,20,74250
video_mode=0

; set to 1-10 (seconds) to display video info on startup/change
video_info=0

; Set to 1 for automatic HDMI VSync rate adjust to match original VSync.
; Set to 2 for low latency mode (single buffer).
; This option makes video butter smooth like on original emulated system.
; Adjusting is done by changing pixel clock. Not every display supports variable pixel clock.
; For proper adjusting and to reduce possible out of range pixel clock, use 60Hz HDMI video
; modes as a base even for 50Hz systems.
; vsync_adjust=1

; If you monitor doesn't support either very low (NTSC monitors may not support PAL) or
; very high (PAL monitors may not support NTSC) then you can set refresh_min and/or refresh_max
; parameters, so vsync_adjust won't be applied for refreshes outside specified.
; These parameters are valid only when vsync_adjust is non-zero.
refresh_min=0
refresh_max=0

; These parameters have the same format as video_mode.
; You need to supply both PAL and NTSC modes if you want vsync_adjust to switch between
; predefined modes as a base. This will reduce the range of pixel clock.
;video_mode_ntsc=0
;video_mode_pal=7

; 1-10 (seconds) to display controller's button map upon first time key press
; 0 - disable
controller_info=6

; JammaSD/J-PAC/I-PAC keys to joysticks translation
; You have to provide correct VID and PID of your input device
; Examples: Legacy J-PAC with Mini-USB or USB capable I-PAC with PS/2 connectors VID=0xD209/PID=0x0301
; USB Capable J-PAC with only PS/2 connectors VID=0x04B4/PID=0x0101
; JammaSD: VID=0x04D8/PID=0xF3AD
jamma_vid=0x04D8
jamma_pid=0xF3AD

; Disable merging input devices. Use if only player 1 works.
; Leave no_merge_pid empty to apply this to all devices with the same VID.
;no_merge_vid=0x045E
;no_merge_pid=0x028E

; Same as above but can add multiple devices (one entry per VIDPID). Format is VIDPID in hex number
;no_merge_vidpid=0x12345678
;no_merge_vidpid=0x11112222

; Speeds in sniper/non-sniper modes of mouse emulation by joystick
; 0 - (default) - faster move in non-sniper mode, slower move in sniper mode.
; 1 - movement speeds are swapped.
sniper_mode=0

; Uncomment following option if you don't want to see a second line for long file names in listing.
;browse_expand=0

; 0 - disable MiSTer logo in Menu core
logo=1

; Custom shared folder for core supporting this feature (currently minimig and ao486 only)
; Can be relative to core's home dir or absolute path.
; Path must exist before core start to use it, or it will fail.
; Make sure USB device is mounted before use shared folder on USB!
shared_folder=

; Custom aspect ratio
;custom_aspect_ratio_1=16:10
;custom_aspect_ratio_2=1:1

; use specific (VID/PID) mouse X movement as a spinner and paddle. Use VID=0xFFFF/PID=0xFFFF to use all mice as spinners.
;spinner_vid=0x1BCF
;spinner_pid=0x0005

; spinner_throttle with base value 100 gives one spinner step per one tick. Higher value makes spinner slower.
; Lower than 100 makes spinner faster. Negative value gives opposite direction.
;spinner_throttle=-50

; 0 - X axis, 1 - Y axis.
;spinner_axis=1

; Default filters for video scaler and audio. Paths must be relative to scaler/audio filter folder without leading slash.
;vfilter_default=LCD Effects/LCD_Effect_07.txt
;afilter_default=LPF2000_3tap.txt

; Defines internal joypad mapping from virtual SNES mapping in main to core mapping
; Set to 0 for name mapping (jn) (e.g. A button in SNES core = A button on controller regardless of position on pad)
; Set to 1 for positional mapping (jp) (e.g. A button in SNES core = East button on controller regardless of button name)
gamepad_defaults=0

; Write out file name under the cursor in browser for external integration
; External application or script may parse the info and do some additional actions and/or send info to 3rd party server.
; Warning: it may slowdown the system or add lag while browsing the files in OSD depending on external app/script.
log_file_entry=0

; Automatically disconnect (and shutdown) Bluetooth input device if not use specified amount of time.
; Some controllers have no automatic shutdown built in and will keep connection till battery dry out.
; 0 - don't disconnect automatically, otherwise it's amount of minutes.
bt_auto_disconnect=0

; Reset Bluetooth dongle before pair dialog.
; Some dongles may have problem to pair if not explicitly reset.
; Some dongles (mostly CSR) have problem to pair with BLE if not reset in advance.
; Consequence of reset: some input devices get shutdown after reset.
bt_reset_before_pair=0


[C64]
forced_scandoubler=1 ; set to 1 to run scandoubler on VGA output always (depends on core).
vga_scaler=0 ; set to 1 to connect VGA to scaler output.
vscale_mode=2
video_mode=4

[PCXT]
forced_scandoubler=0 ; set to 1 to run scandoubler on VGA output always (depends on core).
vga_scaler=1 ; set to 1 to connect VGA to scaler output.
vsync_adjust=2 ; minimal lag
vscale_mode=1 ; integer scaling
; video_mode=640,32,112,32,600,12,6,13,30790,0,0
direct_video=0

[ao486]
; Set it to "Variable" in the video settings in the menu of the core
; video_mode=1; This is the "catch-all" resolution that will be used if an undefined video mode is detected. This example may be too high of a resolution for your monitor. You can use video_mode=1 instead for example.
; video_mode=hact,hfp,hs,hbp,vact,vfp,vs,vbp,fpix
; hact and vact defines the active (visible) size of the video mode in horizontal and vertical pixels, respectively. hfp, hs and hbp defines the duration of horizontal front porch, sync and back porch in pixels. vfp, vs abd vbp define the same properties, but for the vertical timing. Finally, the fpix value is the frequency of the pixel clock in KHz (pixels clocks are usually specified in MHz, so multiply the Mhz value by a 1000 to get the value in KHz).
; video_mode=720,15,108,46,400,13,2,34,27983,0,1
video_mode=720,32,96,32,400,8,5,8,25970,0,0
direct_video=0 ; use the scaler: NB: THIS CORE OVERRIDES forced_scandoubler and automatically uses the scaler so you have to define manually the various resolutions and vertical refresh...
vsync_adjust=2 ; minimal lag
vscale_mode=1 ; integer scaling
video_info=0 ; show resolution information for X seconds
hdmi_limited=2 ; 1 - use limited (16..235) color range over HDMI ; 2 - use limited (16..255) color range over HDMI, for VGA converters.


[video=320x200@70.1]
video_mode=320,24,49,38,200,2,2,20,13535,0,1 ; 320x200@140.2Hz@31.4kHz DOS CGA/EGA/Adventure games with scanlines
video_mode=640,7,108,30,400,13,2,34,24708,0,1 ; 640x400@70.1Hz@31.48kHz VGA era games including 320x200, 320x400, 640x400 @70.1Hz

[video=320x400@70.1]
video_mode=640,7,108,30,400,13,2,34,24708,0,1 ; 640x400@70.1Hz@31.48kHz VGA Games including 320x200, 320x400, 640x400 @70.1Hz

[video=720x400@70.1]
video_mode=720,32,96,32,400,8,5,8,25970,0,0
;video_mode=720,15,108,46,400,13,2,34,27983,0,1 ; 720x400@70.1Hz@31.48kHz DOS Text

;experimental modes
[video=320x199@59.7]
video_mode=640,25,130,75,398,50,29,50,27370,0,1 ; 640x398@59.7Hz@31.46kHz Jazz Jackrabbit
[video=320x240@59.7]
video_mode=640,40,96,64,480,14,2,31,26430,0,1 ; 640x480@59.7Hz Epic Pinball (temp modeline, still under development)

[video=640x480@59.7]
video_mode=640,40,96,64,480,14,2,31,26430,0,1 ; 640x480@59.7Hz (temp modeline, still under development)

[video=640x350@70.1]
video_mode=640,16,96,48,350,37,2,60,25175; Lemmings, Crisis in the Kremlin

[video=800x600@59.7]
video_mode=800,32,80,112,600,1,3,17,37960

[video=800x600@60.0]
video_mode=800,32,80,112,600,1,3,18,38220

[video=640x480@60.0]
video_mode=640,16,64,80,480,1,3,13,23860

; [video=640x200@59.8]
; video_mode=640,-40,56,16,200,1,3,4,8360

; [ao486]
; forced_scandoubler=0
; direct_video=0

; [video=720x400]
; video_mode=720,400,70,cvt

; [video=320x200]
; video_mode=640,400,70,cvt

; [video=640x400]
; video_mode=640,400,70,cvt

; [video=640x480]
; video_mode=640,480,60,cvt

; [video=640x350]
; video_mode=640,350,70,cvt


[video=640x225]
video_mode=1280,675,60,cvt

[video=640x200]
video_mode=640,600,60,cvt


; [video=640x200@59.8]
; video_mode=640,32,112,32,600,12,6,13,30790,0,0 ; PC XT text mode

[X68000]
forced_scandoubler=0 ; set to 1 to run scandoubler on VGA output always (depends on core).
vga_scaler=0 ; set to 1 to connect VGA to scaler output.
vscale_mode=0 ; 0 - scale to fit the screen height.
direct_video=0 ; 1 - enable core video timing over HDMI, use only with VGA converters.
video_mode=1
vsync_adjust=1

[Amiga]
+[Amiga500]
+[Amiga500HD]
+[Amiga600HD]
video_mode_ntsc=8
video_mode_pal=9
vscale_mode=0
vsync_adjust=1 ; You can set this to 2 if your display can handle it
custom_aspect_ratio_1=40:27
bootscreen=0
AmintaMister
Posts: 313
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 841 times
Been thanked: 51 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by AmintaMister »

bigern77 wrote: Sun Jun 18, 2023 7:32 pm
AmintaMister wrote: Wed Nov 30, 2022 10:58 pm
thorr wrote: Wed Nov 30, 2022 10:29 pm

You can do other multiples: 640x600@59.8Hz, 1280x600@59.8Hz, 640x200@179.4Hz (although this one may be too much stress on it)

Thanks! I've tried 640x600@59.8Hz, it works but obviously when the resolution changes because a game starts, it keeps this "text mode" resolution; in A0486 you can set the "dynamic video modes" instead...

Could you please post your [PCXT] section? Nothing is working for me.

Sorry, my mistake, this is the correct and working .ini for PCXT on Vga monitor:

Code: Select all

[PCXT]
forced_scandoubler=1 ; set to 1 to run scandoubler on VGA output always (depends on core).
vga_scaler=1 ; set to 1 to connect VGA to scaler output.
vsync_adjust=2 ; minimal lag
vscale_mode=1 ; integer scaling
video_mode=640,32,112,32,600,12,6,13,30790,0,0
direct_video=0

[video=160×100@59.8]
video_mode=160,100,60,cvt; CGA graphics mode

[video=640x200@59.8]
video_mode=640,32,112,32,600,12,6,13,30790,0,0 ; PC XT text mode on CGA/EGA monitor; tested

[video=640x225@59.8]
video_mode=640,900,60,cvt; tested

[video=320x200@59.8]
video_mode=640,800,60,cvt; EGA on CGA/EGA monitor

[video=720×350@59.8]
video_mode=720,350,120,cvt ; EGA on MDA monitor

[video=640×350@59.8]
video_mode=640,700,60,cvt ; EGA on MDA/EGA monitor

[video=320×350@59.8]
video_mode=640,700,60,cvt ; EGA on EGA monitor

bigern77
Posts: 11
Joined: Sun Jul 12, 2020 8:50 pm
Has thanked: 3 times
Been thanked: 4 times

Re: Pixel Perfect Output on VGA CRT 31khz

Unread post by bigern77 »

Thank you sir

Post Reply