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 --- Bug Reports --- Site News

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

  

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

0 Members and 1 Guest are viewing this topic.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6893
  • Last login:June 02, 2020, 02:17:36 pm
  • 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 or pasting it.

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

Sledge

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 464
  • Last login:February 10, 2020, 05:31:34 pm
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: 6893
  • Last login:June 02, 2020, 02:17:36 pm
  • 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 or 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:January 29, 2019, 10:31:12 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)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:May 13, 2020, 10:41:38 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: 6893
  • Last login:June 02, 2020, 02:17:36 pm
  • 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 or pasting it.

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

ronbin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:May 13, 2020, 10:41:38 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: 6893
  • Last login:June 02, 2020, 02:17:36 pm
  • 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 or pasting it.

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

ronbin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:May 13, 2020, 10:41:38 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: 373
  • Last login:Today at 05:00:25 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>'
GroovyMAME / GroovyArcade discord: https://discord.gg/YtQ6pJh
GroovyArcade doc: https://gitlab.com/groovyarcade/support/-/wikis/home

ronbin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:May 13, 2020, 10:41:38 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: 373
  • Last login:Today at 05:00:25 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 ^^
GroovyMAME / GroovyArcade discord: https://discord.gg/YtQ6pJh
GroovyArcade doc: https://gitlab.com/groovyarcade/support/-/wikis/home

DaddyLongLegs

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 221
  • Last login:May 04, 2020, 07:20:59 am
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?