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: groovyarcade, xrandr and modelines question  (Read 2723 times)

0 Members and 1 Guest are viewing this topic.

Jimbo

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1014
  • Last login:January 04, 2025, 12:18:10 pm
  • I have no idea what I'm doing.
    • Wood Finishes Direct
groovyarcade, xrandr and modelines question
« on: February 09, 2015, 05:08:01 pm »
I'm setting up my groovyarcade install and trying to get the C64 emulator VICE running correctly on my arcade monitor in PAL resolution.

First, after reading on another thread here what the correct PAL resolution is, to get the modeline description I typed: -

Code: [Select]
gtf 384 282 50.1
This outputs:

 # 384x282 @ 50.10 Hz (GTF) hsync: 14.58 kHz; pclk: 6.06 MHz
 Modeline "384x282_50.10"  6.06  384 368 400 416  282 283 286 291  -HSync +Vsync

After looking at the other thread on here, I saw that it was "-hsync -vsync" not +hsync as above, so then I created a new mode with xrandr: -

Code: [Select]
xrandr --newmode "384x282_50.10"  6.06  384 368 400 416  282 283 286 291  -HSync -Vsync
Then added the mode with: -

Code: [Select]
xrandr --addmode DVI-0 384x282_50.10
Then running VICE (x64), and taking off Double Size, Double Scan and any other filters, I can now see the new video mode under Full Screen Options -> XRandR Resolutions.  It shows as 384x282@50Hz.

After selecting this resolution and enabling full screen, I get what looks like an out of sync wavy/moving display (see attached pic).

I'm pretty new to xrandr, so if anyone sees what I've done wrong then I'd appreciate some help.  The version of vice was installed by typing "pacman -S vice".

Could someone else please give this a try and see if they can get it working?

Hopefully it's just something simple I've done wrong.

Cheers  :cheers:






Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7463
  • Last login:July 19, 2025, 04:03:33 am
  • Quote me with care
Re: groovyarcade, xrandr and modelines question
« Reply #1 on: February 09, 2015, 05:29:26 pm »
Hi Jimbo,

Don't use the gtf command for creating modelines, it uses the gtf timing standard that is not suitable for arcade monitors. Notice how it's calculating the modeline for 14.5 kHz when you need 15.7.

Use the modelines in the thread you posted, or...

use the switchres command to generate modelines for any monitor preset:

switchres 385 282 50.10 --monitor arcade_15

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

Jimbo

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1014
  • Last login:January 04, 2025, 12:18:10 pm
  • I have no idea what I'm doing.
    • Wood Finishes Direct
Re: groovyarcade, xrandr and modelines question
« Reply #2 on: February 09, 2015, 05:48:21 pm »
Aah, makes sense.  Thanks it's working now :)  ... silky smooth horizontal scrolling, no sound glitches, although there is a small 1-line-or-so flicker/tear on vertical scrolling games, about half way up the screen that gradually moves nearer the top of the screen, so I guess I've not got the modeline quite right.  I used your switchres 384 282 50.10 --monitor arcade_15 method.

adder

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 640
  • Last login:February 04, 2021, 10:51:51 am
  • Location: Easy St.
Re: groovyarcade, xrandr and modelines question
« Reply #3 on: February 09, 2015, 07:51:57 pm »
Quote from: Jimbo link
I used your switchres 384 282 50.10 --monitor arcade_15 method.
i dont get the 50.10 part, i would have thought that should be 50.00

Jimbo

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1014
  • Last login:January 04, 2025, 12:18:10 pm
  • I have no idea what I'm doing.
    • Wood Finishes Direct
Re: groovyarcade, xrandr and modelines question
« Reply #4 on: February 10, 2015, 02:55:44 pm »
Quote from: Jimbo link
I used your switchres 384 282 50.10 --monitor arcade_15 method.
i dont get the 50.10 part, i would have thought that should be 50.00

Yeah I didn't either, the post I got it from on here mentioned 50.1 Hz, but I've seen on this page (no idea how accurate it is) that C64 PAL is actually 50.12 Hz.

I've tried 50.0, 50.1, 50.12... the best results I get are with 50.1 Hz, at 384 x 272 (or 282) on VICE (Linux/GroovyArcade).  But even then, I get a vertical tearing line gradually coming down from the top of the screen to the bottom over a period of about 15 seconds.  It's only noticable with either horizontal or vertical scrolling graphics, but it's clearly there.

I should mention I managed to get a totally tear-free WinVICE running in XP-64bit (adding C64 resolution to reslist), but the sound was all screwy every now and then (echoes/distortion lasting a few seconds) which led me to try Linux.   Linux VICE deals with the sound just right, but there is this issue with the tearing.

I may not understand the way it works completely, but I thought that setting -vsync in the modeline was supposed to stop tearing like that, and that this may mean it's a bug in the emulator?  The above symptoms seem to me to indicate something like what happens when vsync is not enabled.  Or am I just being too picky and should expect this sort of issue unless running the original hardware?  It's so frustrating because it's sooo nearly there.

Can anyone shed any light on this?

Cheers
« Last Edit: February 10, 2015, 02:57:28 pm by Jimbo »

Jimbo

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1014
  • Last login:January 04, 2025, 12:18:10 pm
  • I have no idea what I'm doing.
    • Wood Finishes Direct
Re: groovyarcade, xrandr and modelines question
« Reply #5 on: February 10, 2015, 04:16:44 pm »
With a bit more tinkering...

It appears changing -vsync to +vsync in the modeline has changed the behaviour slightly, in that the tear line is now moving *up* the screen extremely slowly, perhaps one pixel per 5 seconds.

At first I thought this had eradicated tearing completely, as at first I didn't notice the tear line at all.  So I'm not really getting anywhere.


Jimbo

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1014
  • Last login:January 04, 2025, 12:18:10 pm
  • I have no idea what I'm doing.
    • Wood Finishes Direct
Re: groovyarcade, xrandr and modelines question
« Reply #6 on: February 10, 2015, 04:34:18 pm »
I have just spotted this in the VICE manual: -

http://vice-emu.sourceforge.net/vice_6.html#SEC49

Quote
Warning: To get full retro experience with synchronization to the vertrical raster retrace messing with X11 modelines (resolution and refresh frequencies) is necessary. This description is a suggestion - Follow this instructions at your own risk!

The following was tested under Ubuntu Linux (8.04) featuring Xorg Xserver 1:7.3+10ubuntu and mesa openGL including HW support (NVIDIA driver) supporting glx version 1.4 supplying GLX_SGI_video_sync.

It is assumed that this works also on other systems supporting the required extensions.

Preconditions:

openGL extension GLX_SGI_video_sync in your X11 setup. The availability of the extension is checked at startup.
XRandR extension to switch proper modes (50Hz for PAL, 60Hz for NTSC) is mandatory, proper modelines in your /etc/X11/xorg.conf must be present.

and then in VICE...

Quote
choose your preferred resolution/refresh XRandR Resolutions and enable XRandR as fullscreen device (50Hz/PAL or 60Hz/NTSC mode).
Activate fullscreen with `Alt-D'.
choose `OpenGL Rastersynchronization' in the video chip menu (VIC-II Settings, VIC Setting, etc.)

I'm pretty new to Arch linux and am not sure how to check the extension GLX_SGI_video_sync  is in my XLL setup - it's not listed in my xorg.conf.  I also don't have the 'OpenGL Rastersynchronization' setting in my VICE menus.

Plus I'm not even sure if this is the answer...

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7463
  • Last login:July 19, 2025, 04:03:33 am
  • Quote me with care
Re: groovyarcade, xrandr and modelines question
« Reply #7 on: February 14, 2015, 05:20:58 pm »
Obviously you need vertical synchronization to get rid of tearing, that's a law of nature. I'd say the GLX_SGI_video_sync extension must be present in Groovy Arcade. Regarding VICE I've no experience with it, sorry.
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

Jimbo

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1014
  • Last login:January 04, 2025, 12:18:10 pm
  • I have no idea what I'm doing.
    • Wood Finishes Direct
Re: groovyarcade, xrandr and modelines question
« Reply #8 on: February 18, 2015, 09:08:58 am »
OK, thanks for the reply.  I'm definitely getting tearing, so VSync must not be enabled in VICE.  No tearing in groovymame and I'm assuming that uses the opengl extension?