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: GM 0.280 alternating bad~84% good~100% CRT tv  (Read 442 times)

0 Members and 2 Guests are viewing this topic.

nix999

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:Yesterday at 02:47:51 pm
  • I want to build my own arcade controls!
GM 0.280 alternating bad~84% good~100% CRT tv
« on: November 22, 2025, 03:09:21 pm »
Hi,

I have an issue I cannot solve. I am on a custom build Arch with KMSDRM attached to PAL scart television.
I am currently running a custom kernel 6.17.7-arch1-15khz-1.
The TV set can sync to PAL and NTSC ( at least, I have a stable image at 60Hz).
The shell is PAL 768x576i@50Hz when the system boots so that I have somewhat decent visibility when accessing it directly though I mostly use ssh.
I have all graphics and sound working but ...
When using GM 0280 I get alternating bad and good runs.
I defined these two in mame.ini ( the latter two make no difference )
crt_range0                15625.00-15625.00, 50.00-50.00, 1.500, 4.700, 5.800, 0.064, 0.160, 1.056, 0, 0, 192, 288, 448, 576
crt_range1                15734.26-15734.26, 59.94-59.94, 1.500, 4.700, 4.700, 0.191, 0.191, 0.953, 0, 0, 192, 240, 448, 480
#crt_range0                15600-15700, 49.5-50.5, 1.5, 4.7, 5.8, 0.064, 0.160, 1.056, 0, 0, 192, 288, 448, 576 # PAL-like 'wider' range
#crt_range1                15700-15800, 59.0-60.5, 1.5, 4.7, 4.7, 0.191, 0.191, 0.953, 0, 0, 192, 240, 448, 480 # NTSC-like 'wider' range

When launching for example sf2 I have this:

(The game is being identified as
Switchres: get_mode(0) 384 224 59.637405 1.333333
Switchres: Calculating best video mode for 384x224@59.637405 orientation: normal)

- system boot and then

BAD:

Switchres: Modeline "384x224_59 15.704280KHz 59.940000Hz" 7.271081 384 395 429 463 224 235 238 262   -hsync -vsync
DRM/KMS: <1> (add_mode) [DEBUG] Adding a mode to the kernel: 384x224 SR-1_384x224@59.94
DRM/KMS: <1> (add_mode) Mode added
Switchres: added DRMKMS timing "384x224_59 15.704280KHz 59.940000Hz" 7.271081 384 395 429 463 224 235 238 262   -hsync -vsync

Average speed: 83.85% (26 seconds)
Enter sdlwindow_exit
Switchres: success deleting mode DRMKMS timing "384x224_59 15.704280KHz 59.940000Hz" 7.271081 384 395 429 463 224 235 238 262   -hsync -vsync

GOOD:

Switchres: Modeline "384x224_59 15.704280KHz 59.940000Hz" 7.271081 384 395 429 463 224 235 238 262   -hsync -vsync
DRM/KMS: <1> (add_mode) [DEBUG] Adding a mode to the kernel: 384x224 SR-1_384x224@59.94
DRM/KMS: <1> (add_mode) Mode added
Switchres: added DRMKMS timing "384x224_59 15.704280KHz 59.940000Hz" 7.271081 384 395 429 463 224 235 238 262   -hsync -vsync

Average speed: 100.70% (17 seconds)
Enter sdlwindow_exit
Switchres: success deleting mode DRMKMS timing "384x224_59 15.704280KHz 59.940000Hz" 7.271081 384 395 429 463 224 235 238 262   -hsync -vsync

BAD, GOOD, BAD, GOOD ....

There is no difference but the Average speed.

I already tried to add a one second sleep after the mode has been added in function 'bool drmkms_timing::add_mode(modeline *mode)' in 'custom_video_drmkms.cpp' to no avail...
It kicks in but no change.

I also tried
   parsing switchres.ini
   Invalid option mode_delay   
Because I read that somewhere but that does not or no longer exist ... it is not easy to find spot on information.

I do not really understand what is happening but I think it has to be some timing issue but it is 100% consistent in behavior.
How can I solve this please?

Thanks for any help.

GM log attached.

nix999

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:Yesterday at 02:47:51 pm
  • I want to build my own arcade controls!
Re: GM 0.280 alternating bad~84% good~100% CRT tv
« Reply #1 on: Yesterday at 08:54:43 am »
I experimented some more and started afresh with a new mame.ini created with -cc.
So I now have a pristine config. As fresh as it can be.
I made sure it finds the roms.
Next to that the only option I modify is: monitor
I tried pal, ntsc, generic_15 and arcade_15 with the wboy rom.
Whichever one I choose I always have the BAD, GOOD, BAD, GOOD ... speed-wise.
There is of course a difference between the four. ntsc and arcade_15 performed best while pal was jerky even thought the emulation speed was 100% in GOOD runs.
Where does that alternating BAD GOOD come from?
Anyone?

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 852
  • Last login:Yesterday at 01:16:00 pm
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: GM 0.280 alternating bad~84% good~100% CRT tv
« Reply #2 on: Yesterday at 01:15:15 pm »
what is your GPU ?

nix999

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:Yesterday at 02:47:51 pm
  • I want to build my own arcade controls!
Re: GM 0.280 alternating bad~84% good~100% CRT tv
« Reply #3 on: Yesterday at 01:55:13 pm »
       description: VGA compatible controller
       product: RV610 [Radeon HD 2400 PRO/XT] [1002:94C1]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI] [1002]
       configuration: depth=32 driver=radeon latency=0 resolution=768,576

Edit: Seems I also have a HD 7570 according to the PCB number - I'll give it a go.

Edit2: Just gave it a go. Exactly the same issue.

       description: VGA compatible controller
       product: Turks PRO [Radeon HD 7570] [1002:675D]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI] [1002]
       configuration: depth=32 driver=radeon latency=0 resolution=768,576
« Last Edit: Yesterday at 02:35:47 pm by nix999 »

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7478
  • Last login:Today at 03:44:38 pm
  • Quote me with care
Re: GM 0.280 alternating bad~84% good~100% CRT tv
« Reply #4 on: Today at 02:08:16 pm »
Hi nix999,

I think I know what is happening but I'm not 100% sure of the cause.

Simply, your console is configured at 50 Hz.

- First time you run groovymame, it fails to set 224@59.94. It just stays at the desktop refresh of 50 Hz. 50/59.94 = 0.8342 (more or less your 83%)
- Next time you run groovymame, it finds the mode in the connector added in the previous version, it succeeds at swiching and all is good. On exit, it deletes the mode in the connector and the cycle repeats.

If you had debug logging enabled in switchres.ini, you'd be seeing some errors.

Anyway, I think the problem is you don't have the patched sdl2 library that in combination with the patched kernel is needed for having user modes in kms. So although Switchres adds the mode in the connector, vanilla sdl2 doesn't update the connector modes later.



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