Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Switchres: modeline generator engine  (Read 344215 times)

0 Members and 1 Guest are viewing this topic.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres: modeline generator engine
« Reply #1280 on: May 10, 2014, 11:35:13 am »
===============================
Update 5-10-2014 - Version 1.52
===============================

- Added new option --edid. This option creates an EDID binary file (edid.bin)
  based on the calculated modeline and the monitor ranges used in its
  calculation. This file can be passed to the Linux kernel on boot in order to
  enable the same user defined timings for both KMS and Xorg.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

Sledge

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:September 25, 2022, 05:22:55 am
Re: Switchres: modeline generator engine
« Reply #1281 on: July 14, 2014, 06:24:39 am »
So i'm just trying to understand some of this resolution/modeline/Hz/etc stuff
I have a question though..
Galaga natively runs at: 288 x 224 (V) 60.606061 Hz
But Switchres chooses: 2560 x 288p 51.774 Hz 16.050 KHz

But if i press F11 during gameplay it says it's running at 100%

How does this work if it's running at 51.774Hz instead of 60 Hz ? Is it running at it's correct speed or not?

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres: modeline generator engine
« Reply #1282 on: July 14, 2014, 06:47:45 am »
How does this work if it's running at 51.774Hz instead of 60 Hz ? Is it running at it's correct speed or not?

Obviously the refresh is not correct (it can't be on a standard arcade monitor). But the speed is, because we detach the emulation from the refresh. This is achieved by triple buffering (multithreading must be enabled for this). GM enables triple buffering automatically when it judges the target refresh is going to be too off, being the default threshold 2.0 Hz. You can modify this value through the -syncrefresh_tolerance option in mame.ini.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

Ansa89

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 377
  • Last login:December 09, 2016, 10:40:11 am
Re: Switchres: modeline generator engine
« Reply #1283 on: July 27, 2016, 09:31:34 am »
I fixed some bad bugs (related to memory allocation).
You can find the updated version here.
Earth could be the hell of another world

bopaul

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:April 05, 2021, 05:58:17 am
  • I want to build my own arcade controls!
Re: Switchres: modeline generator engine
« Reply #1284 on: October 13, 2016, 06:19:17 am »
Hello,
I am new to this forum and I hope to write in the right section.

I have some problem with Groovymame and Switchres.

I state that I disabled in MAME.INI interlaced resolutions because they do not love them.

With the desktop resolution to 640x480, and Groovymame Swithchres working properly.

If instead you imposed the desktop resolution to 640x240 and Groovymame Swithchres only work for a few games.

Rampage games by type, Paperboy, 19xx, Twincobra, maintains it in exchange for a resolution.

For other types Metalslug, Rolling Thunder, Pacman (Midway) work perfectly.
Some idea?

Use CRTEmudriver 6.5, ATI x300, Groovymame 0148u5.014b and WindowsXP.

Thank you.

ronbin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:January 10, 2024, 10:54:27 am
  • I want to build my own arcade controls!
Re: Switchres: modeline generator engine
« Reply #1285 on: April 26, 2020, 01:14:03 pm »
Hi

Coming from here. Groovymame creates a good modeline for sega genesis but standalone switchres doesn't. I gues groovyarcade's switchres comes from this 4 year old git repository, so it may be the problem.
https://github.com/Ansa89/switchres

I've found a newer repository here.
https://github.com/antonioginer/switchres

So cloned it and tried to compile for testing, but I get dependency errors... (SDL_syswm.h). That's strange because I've compiled MAME with groovymame patch in this machine with no problem. Any help for compiling? I'm using debian, but can try from arch.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres: modeline generator engine
« Reply #1286 on: April 26, 2020, 01:23:54 pm »
Are compiling the branch named "standalone" right? Make sure you checkout this one instead of master.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

ronbin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:January 10, 2024, 10:54:27 am
  • I want to build my own arcade controls!
Re: Switchres: modeline generator engine
« Reply #1287 on: April 26, 2020, 03:19:46 pm »
I was compiling master... ;D

Cloned standalone branch but now I have another error
Code: [Select]
g++ -c -O3 -Wall -Wextra -I/usr/include/libdrm -fPIC monitor.cpp -o monitor.o
g++ -c -O3 -Wall -Wextra -I/usr/include/libdrm -fPIC modeline.cpp -o modeline.o
g++ -c -O3 -Wall -Wextra -I/usr/include/libdrm -fPIC switchres.cpp -o switchres.o
g++ -c -O3 -Wall -Wextra -I/usr/include/libdrm -fPIC display.cpp -o display.o
g++ -c -O3 -Wall -Wextra -I/usr/include/libdrm -fPIC custom_video.cpp -o custom_video.o
In file included from custom_video.cpp:27:
custom_video_drmkms.h:76:14: error: ‘drmIsMaster’ was not declared in this scope
   __typeof__(drmIsMaster) *p_drmIsMaster;
              ^~~~~~~~~~~
custom_video_drmkms.h:76:14: note: suggested alternative: ‘drmSetMaster’
   __typeof__(drmIsMaster) *p_drmIsMaster;
              ^~~~~~~~~~~
              drmSetMaster
make: *** [makefile:41: custom_video.o] Error 1
:-\

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres: modeline generator engine
« Reply #1288 on: April 26, 2020, 04:24:26 pm »
If you're having troubles, you can try the automatic builds here: https://github.com/antonioginer/switchres/actions/runs/88479738
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

ronbin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:January 10, 2024, 10:54:27 am
  • I want to build my own arcade controls!
Re: Switchres: modeline generator engine
« Reply #1289 on: April 27, 2020, 02:51:08 am »
Thanks Calamity. I could compile it from groovyarcade, there must be something wrong with my debian setup...
It seems new switchres has different options, I will do some tests tonight.

Thanks again!

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 816
  • Last login:March 15, 2024, 06:37:57 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: Switchres: modeline generator engine
« Reply #1290 on: April 27, 2020, 04:40:10 am »
This new switchres version doesn't support the --emulator and --rom switches. You should use -l '<full command>'

ronbin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:January 10, 2024, 10:54:27 am
  • I want to build my own arcade controls!
Re: Switchres: modeline generator engine
« Reply #1291 on: April 27, 2020, 11:09:45 am »
This worked perfectly.
Code: [Select]
switchres_main -s 352 240 60 -i mame.ini -l "mednafen /home/roms/Saturn_roms/romname.cue"
switchres_main -s 320 240 60 -i mame.ini -l "mednafen /home/roms/Saturn_roms/romname.cue"
Now I can run saturn games at 704x480 or 640x480 resolution with scanlines. It's a shame I can't know game's resolution before loading it... but that's not switchres' fault.

Thank you for your GREAT work Calamity.

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 816
  • Last login:March 15, 2024, 06:37:57 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: Switchres: modeline generator engine
« Reply #1292 on: April 27, 2020, 12:54:51 pm »
It's a shame I can't know game's resolution before loading it...
That's why I've removed consoles. Whe you play on a CRT, you want some serious business, NTSC vs PAL refresh rates, not some "let's set 230x240 once for all, emulators will adapt".

But things may change ^^

DaddyLongLegs

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 257
  • Last login:October 11, 2021, 02:23:36 pm
Re: Switchres: modeline generator engine
« Reply #1293 on: May 01, 2020, 04:14:10 pm »
Should switchres be doing anything to 640x480 images on my standard def Wells Gardner?

I know with lower-res stuff I'm used to seeing a huge horizontal number and the same vertical number but my 640x480 games look like this:



Should the horizontal number be different? Or is that only for lower resolutions?

Also is switchres changing the Hz from 54.124000 Hz to 57.000 hz the reason this particular game runs way too fast? If so, is there any way to fix it?

Vantier

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:March 22, 2021, 03:49:31 am
  • I want to build my own arcade controls!
Re: Switchres: modeline generator engine
« Reply #1294 on: February 11, 2021, 10:44:33 am »
Hi. I'd like to test the latest standalone build for win32 x86_64 but the automatic builds are all expired and I had no luck compiling it. Anyone can post it, please?
Thank you. 

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres: modeline generator engine
« Reply #1295 on: February 11, 2021, 01:25:47 pm »
Hi. I'd like to test the latest standalone build for win32 x86_64 but the automatic builds are all expired and I had no luck compiling it. Anyone can post it, please?
Thank you. 

Here you go.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

Vantier

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:March 22, 2021, 03:49:31 am
  • I want to build my own arcade controls!
Re: Switchres: modeline generator engine
« Reply #1296 on: February 11, 2021, 04:37:38 pm »
Very Thank you, Calamity!

fred92

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:November 10, 2023, 01:07:28 pm
Re: Switchres: modeline generator engine
« Reply #1297 on: October 22, 2021, 09:08:48 am »
Hello all,

I'm wondering why when i use super resolutions and mame xml's resolutions the screen shows the right resolution of the game and switchres do the same

but when i only use super resolutions (like the guide of geedorah)

 "The value 2560x0 denotes that the super resolutions method is being used. Here, a width of 2560 pixels is forced for all games, while the 0 acts as a wildcard for the vertical resolution (that is, the number of lines), so Groovy MAME will be free to pick the most convenient height from the ones available, applying integer scaling whenever possible. "

so, for me, like the picture shows,  384x224 is not the same as 2560x 240
it's more reassuring to see the same resolutions...

Calamity wrote on a youtube video :
"The whole point of super resolutions is to avoid using long mode lists."
but the game's real resolution is not the same as the one written on switchres...

thank you explaing me.
Fred.

« Last Edit: October 22, 2021, 09:35:00 am by fred92 »

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres: modeline generator engine
« Reply #1298 on: October 23, 2021, 07:15:54 am »
@fred92, this is a recurrent question. 224p is basically 240p with black borders. So 224p is redundant. Switchres is doing the right thing.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi