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 156013 times)

0 Members and 1 Guest are viewing this topic.

newmanfamilyvlogs

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1667
  • Last login:Yesterday at 08:29:31 am
    • forum.arcadecontrols.com/index.php/topic,103584.msg1096585.html#msg1096585
    • Newman Family Vlogs
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #640 on: January 20, 2011, 04:27:47 pm »
And the config file needs to be in c:\etc\?

bitbytebit

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 896
  • Last login:August 02, 2019, 11:07:16 am
    • The Groovy Organization
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #641 on: January 20, 2011, 05:53:53 pm »
I should have a build for Windows/Linux up in a bit that will write out to a file all the information output if the config file has an file specified to write logs to.  So hopefully that can help get to the bottom of what's going on when launching from Hyperspin. 

I have a new build up, SwitchResWin-1.286-88e4632.7z, which now can log to a file.  You can put logfile=c:\logfile.txt or something in the config now, or --logfile <filename> on the command line.  Also now you can specify verbosity level at the config file like verbose=3 or something, and if you add more -v options at the command line it'll add onto that base level from the config file.

Yeah, the config file either needs to be in c:\etc\ or in the windows directory you launch switchres from (which I'm guessing might not work correctly if launched from an external app and you won't know where that is, but not sure).
SwitchRes / GroovyMame - http://arcade.groovy.org
Modeline Generator and Mame Wrapper for Windows or Linux
LiveCD of Groovy Arcade Linux for Arcade Monitors
GroovyMame - generate arcade resolutions like advancemame
--
The Groovy Organization

bitbytebit

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 896
  • Last login:August 02, 2019, 11:07:16 am
    • The Groovy Organization
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #642 on: January 20, 2011, 06:02:55 pm »
I have not used the most recent switchres. I will do that as soon as I can and report back. If it's compiling it's own .xml now then I bet that will help resolve the issue. Any chance we could get a -v -v -v -v etc log dump option?

As for Hyperlaunch, I am not using it. It's current behavior is to force-quit programs to return to the FE, doing so prevents mame from outputting nvram updates, hiscores, or configuration changes.

I am looking through Hyperlaunch, first thing I noticed was this...
Code: [Select]
/*
 Most emu's can be closed with CloseProcess when using a 2 key combo, if not set a custom
 close.
*/

CloseProcess:

WinShow, BlackScreen
Process, Exist, %Executable%

;for emus that won't close normally
if AlternateClose = true
   ControlSend, , {Esc}, %Errorlevel%
;   Process, Close, %Executable%

DetectHiddenWindows, on

WinHide, ahk_pid %Errorlevel%
WinKill, ahk_pid %Errorlevel%
Sleep 6000
Process, WaitClose, %Executable%

Loop, Addons\*.*,2 ;close running addons
   {
      addonpath = %A_LoopFileFullPath%
      Loop, %addonpath%\*.exe
         {
               Process, Exist, %A_LoopFileName%
               Winclose, ahk_pid %Errorlevel%
         }
   }
Goto ExitScript


So I suspect this shows that the behavior of forcing the emulator to close is possibly a bug in Hyperlaunch and fixable or it is on purpose and we could change it in this script at that point above.  So will be interesting to see logs of launching switchres with the new version I just posted, and looks like possibly a customized Hyperlaunch script might not kill off mame/switchres and let them exit cleanly.
SwitchRes / GroovyMame - http://arcade.groovy.org
Modeline Generator and Mame Wrapper for Windows or Linux
LiveCD of Groovy Arcade Linux for Arcade Monitors
GroovyMame - generate arcade resolutions like advancemame
--
The Groovy Organization

newmanfamilyvlogs

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1667
  • Last login:Yesterday at 08:29:31 am
    • forum.arcadecontrols.com/index.php/topic,103584.msg1096585.html#msg1096585
    • Newman Family Vlogs
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #643 on: January 21, 2011, 05:40:59 am »
Ok, testing the new swtichres at the moment (and posting from my cab)

This message appears before switchres launches mame:

      1 [main] switchres 2192 dtable::stdio_init: couldn't make stderr distinct
from stdout, Win32 error 6

I'm about to set up a config file and try and dump a verbosity level 3 log for this happening.

Edit: Now this doesn't make a damn bit of sense.. When I added --logfile <path to my log> to my hyperspin launch, it started finding the roms and generating correct mode lines. Wtf. yay?
Edit2: Is the source download up to date for your mame build? I'd like to recompile for 64bit. Several newer games won't run fullspeed at the moment that did (or at least came close) on my previous mame exe.
« Last Edit: January 21, 2011, 06:19:05 am by cotmm68030 »

bitbytebit

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 896
  • Last login:August 02, 2019, 11:07:16 am
    • The Groovy Organization
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #644 on: January 21, 2011, 06:34:07 am »
Ok, testing the new swtichres at the moment (and posting from my cab)

This message appears before switchres launches mame:

      1 [main] switchres 2192 dtable::stdio_init: couldn't make stderr distinct
from stdout, Win32 error 6

I'm about to set up a config file and try and dump a verbosity level 3 log for this happening.

Edit: Now this doesn't make a damn bit of sense.. When I added --logfile <path to my log> to my hyperspin launch, it started finding the roms and generating correct mode lines. Wtf. yay?
Edit2: Is the source download up to date for your mame build? I'd like to recompile for 64bit. Several newer games won't run fullspeed at the moment that did (or at least came close) on my previous mame exe.

That's very interesting, I'm guessing somehow stderr was the issue in however Hyperspin launches it, must be doing some input/output redirection that messes that up.  So seems the logfile fixes that indirectly by not using stderr, weird but I guess that works for now.

Yeah the patches are all here that I used on the 0141 sources...

http://groovyarcade.git.sourceforge.net/git/gitweb.cgi?p=groovyarcade/groovyarcade;a=tree;f=overlays/games-emulation/mame/files;hb=HEAD

Basically add the hiscore patch first, then the groovyarcade one, then the hilofix (not fully necessary, basically make the hiscore.dat file always checked for in the hi\ directory where the score files are kept, so it's always in the same place), then the vsync_mt_fix last (also there's the enable_nag_default.diff which makes it so you have to explicitly disable the nag/intro screens yourself in mame.  This makes it so the build doesn't disable those screens by default, so as not to go against the mame guidelines of not making builds that do that so as to avoid false bug reports for games they know are already not working.  If your distributing the build, this probably should be included, else people get unhappy as I found out on the Mame World forums :/ ).  The sdlfix patch is just for compiling SDL/Linux so not necessary, basically grab all the .patch and .diff files in that directory and apply in the order I just went through.

SwitchRes / GroovyMame - http://arcade.groovy.org
Modeline Generator and Mame Wrapper for Windows or Linux
LiveCD of Groovy Arcade Linux for Arcade Monitors
GroovyMame - generate arcade resolutions like advancemame
--
The Groovy Organization

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #645 on: January 22, 2011, 06:53:16 am »
Humm ....

 problem  ;D

 When i launch mame.exe rfjet all is ok (except resolution ^^)
 but when i use latest switchres (i didn't kept the older version to try :/) with switchres.exe rfjet --soft15khz --mo 2 (even without --mo 2) throttle is activated ....

 Do you have any idea ? tried with official mame builds / sailorsat build (thanks again) and personnal build, same result .. seems that switchres add an option to mame  ..


EDIT = i'm sure that it is throttle because if i press F10 speed go to normal ..
 
« Last Edit: January 22, 2011, 07:09:26 am by dapsaille »

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6906
  • Last login:Yesterday at 11:48:28 pm
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #646 on: January 22, 2011, 07:25:37 am »
dapsaille, make sure the throttle option is off in mame.ini, seems that ini options have priority over the others.

Edit: that game seems to use a 54 Hz refresh. So, if the proper video mode (proper vfreq) is actually used, you shouldn't see hardly any difference either using throttle or not. So try to find what video mode is actually selected (use -v).
« Last Edit: January 22, 2011, 07:41:43 am by Calamity »
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

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #647 on: January 22, 2011, 07:45:34 am »
dapsaille, make sure the throttle option is off in mame.ini, seems that ini options have priority over the others.

Edit: that game seems to use a 54 Hz refresh. So, if the proper video mode (proper vfreq) is actually used, you shouldn't see hardly any difference either using throttle or not. So try to find what video mode is actually selected (use -v).


 I've already played with throttle 0 or 1, no modifications.

Code: [Select]
Got Soft15khz registry modeline 321x240@60 - DALDTMCRTBCD321x240x0x60:
             "321x240@60" 6.640000 320 336 368 424 240 242 245 261 -HSync -VSync

# 15.250Khz -> 15.700Khz: ( | Hfreq Change | Vpad +23 lines | )
Setting registery video mode DALDTMCRTBCD321x240x0x60 with:
(62986/63001/62986) Modeline 6.470000 320 336 368 424 240 252 255 283
Opening  modes file for mode 320x240@54
Target refresh = 54.000000
Average speed: 276.27% (35 seconds)
Setting registery video mode DALDTMCRTBCD321x240x0x60 with:
(63001/63001/63001) Modeline 6.640000 320 336 368 424 240 242 245 261

D:\Mame>

 strange ^^

EDIT = it seems that i didn't used the latest version .. i'm trying it in 2 minutes.

EDIT2 = same problem .... it must be related to my mame.ini
« Last Edit: January 22, 2011, 07:55:23 am by dapsaille »

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #648 on: January 22, 2011, 07:56:46 am »
Just tried with a new mame.ini (mame -cc only modified rom path) and same problem .....

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6906
  • Last login:Yesterday at 11:48:28 pm
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #649 on: January 22, 2011, 07:59:43 am »
Quote
Average speed: 276.27% (35 seconds)

Seems no kind of throttle or triplebuffer is working. Try disabling multithreading in Mame.ini, it could be the patch we made is not working... strange.
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

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #650 on: January 22, 2011, 08:01:07 am »
Quote
Average speed: 276.27% (35 seconds)

Seems no kind of throttle or triplebuffer is working. Try disabling multithreading in Mame.ini, it could be the patch we made is not working... strange.


already disabled .....

http://pastebin.com/XaiBkHKi

FI I'm using switchres without /etc/config file

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #651 on: January 22, 2011, 08:29:13 am »
Problem solved by using

switchres.exe rfjet.zip --soft15khz --mo 2 -vv --throttle --soundsync


 But now with frameskip 0 mame sometimes rune at 99 then 100 then 101 then 100% ...

 Musics are really speed in rfjet so i can hear the differences between 99 and 100 ... sound is distorded ...

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6906
  • Last login:Yesterday at 11:48:28 pm
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #652 on: January 22, 2011, 08:45:50 am »
Good, anyway enabling throttle should not be the way to go, as you are not relying on the video card sync pulses any more but on the inner clock, that's why your fps fluctuates. When using switchres, try passing "-v -v -v" instead of "-v" so you'll get the actual mame command line being used prompted.

I'm testing the same game here, with Mame 0.141 from bitbytebit, and both new Switchres and an older one, and it's working ok here  ???
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

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #653 on: January 22, 2011, 10:05:02 am »
Mame version = http://sourceforge.net/projects/groovyarcade/files/Mame_Windows_Builds/ 0.141 windows build

Mame.ini
Code: [Select]
<UNADORNED0>              

#
# CORE CONFIGURATION OPTIONS
#
readconfig                1
writeconfig               0

#
# CORE SEARCH PATH OPTIONS
#
rompath                   d:\roms
hashpath                  hash
samplepath                samples
artpath                   artwork
ctrlrpath                 ctrlr
inipath                   .;ini
fontpath                  .
cheatpath                 cheat
crosshairpath             crosshair

#
# CORE OUTPUT DIRECTORY OPTIONS
#
cfg_directory             cfg
nvram_directory           nvram
memcard_directory         memcard
input_directory           inp
state_directory           sta
snapshot_directory        snap
diff_directory            diff
comment_directory         comments
hiscore_directory         hi

#
# CORE STATE/PLAYBACK OPTIONS
#
state                    
autosave                  0
playback                  
record                    
mngwrite                  
aviwrite                  
wavwrite                  
snapname                  %g/%i
snapsize                  auto
snapview                  internal
burnin                    0

#
# CORE PERFORMANCE OPTIONS
#
autoframeskip             0
frameskip                 0
seconds_to_run            0
throttle                  0
sleep                     1
speed                     1.0
refreshspeed              0

#
# CORE ROTATION OPTIONS
#
rotate                    1
ror                       0
rol                       0
autoror                   0
autorol                   0
flipx                     0
flipy                     0

#
# CORE ARTWORK OPTIONS
#
artwork_crop              1
use_backdrops             0
use_overlays              1
use_bezels                0

#
# CORE SCREEN OPTIONS
#
brightness                1.0
contrast                  1.0
gamma                     1.0
pause_brightness          0.65
cleanstretch              1
changeres                 0
effect                    none
redraw                    0
froggerhack               1

#
# CORE VECTOR OPTIONS
#
antialias                 1
beam                      1.0
flicker                   0

#
# CORE SOUND OPTIONS
#
sound                     1
samplerate                48000
samples                   1
volume                    0

#
# CORE INPUT OPTIONS
#
coin_lockout              1
ctrlr                    
mouse                     0
joystick                  1
lightgun                  0
multikeyboard             0
multimouse                0
steadykey                 0
offscreen_reload          0
joystick_map              auto
joystick_deadzone         0.1
joystick_saturation       0.95
natural                   0
uimodekey                 auto

#
# CORE INPUT AUTOMATIC ENABLE OPTIONS
#
paddle_device             keyboard
adstick_device            keyboard
pedal_device              keyboard
dial_device               keyboard
trackball_device          keyboard
lightgun_device           keyboard
positional_device         keyboard
mouse_device              mouse

#
# CORE DEBUGGING OPTIONS
#
log                       0
verbose                   0
update_in_pause           0
debug                     0
debugscript              
debug_internal            0

#
# CORE MISC OPTIONS
#
bios                      
cheat                     0
skip_gameinfo             1
uifont                    default

#
# CORE MKChamp OPTIONS
#
disable_hiscore_patch     0
disable_nagscreen_patch   0
disable_loading_patch     0

#
# WINDOWS DEBUGGING OPTIONS
#
oslog                     0
watchdog                  0
debugger_font             "Lucida Console"
debugger_font_size        9

#
# WINDOWS PERFORMANCE OPTIONS
#
priority                  0
multithreading            0
numprocessors             auto
profile                   0
bench                     0

#
# WINDOWS VIDEO OPTIONS
#
video                     ddraw
numscreens                1
window                    0
maximize                  0
keepaspect                1
prescale                  0
waitvsync                 1
syncrefresh               0

#
# DIRECTDRAW-SPECIFIC OPTIONS
#
hwstretch                 0

#
# DIRECT3D-SPECIFIC OPTIONS
#
d3dversion                9
filter                    0

#
# PER-WINDOW VIDEO OPTIONS
#
screen                    auto
aspect                    auto
resolution                auto
view                      auto
screen0                   auto
aspect0                   auto
resolution0               auto
view0                     auto
screen1                   auto
aspect1                   auto
resolution1               auto
view1                     auto
screen2                   auto
aspect2                   auto
resolution2               auto
view2                     auto
screen3                   auto
aspect3                   auto
resolution3               auto
view3                     auto

#
# FULL SCREEN OPTIONS
#
triplebuffer              1
switchres                 1
full_screen_brightness    1.0
full_screen_contrast      1.0
full_screen_gamma         1.0

#
# WINDOWS SOUND OPTIONS
#
audio_latency             2

#
# INPUT DEVICE OPTIONS
#
dual_lightgun             0

Switchres Version =
SwitchResWin-1.286-88e4632

Video Cards/ Drivers =
Ati radeon xpress1200 / Your drivers ^^

Output of switchres =
Code: [Select]
Got Soft15khz registry modeline 321x240@60 - DALDTMCRTBCD321x240x0x60:
             "321x240@60" 6.640000 320 336 368 424 240 242 245 261 -HSync -VSync

Setup monitor limits min=184x108 max=0x608
Starting with Horizontal freq of 13.922 and Vertical refresh of 54.00
Increased horizontal frequency from 13.922 to 15.250
Increasing 1 line from horizontal freq 15228.000 to 15282.000
Using 23 lines padding
# 15.250Khz -> 15.700Khz: ( | Hfreq Change | Vpad +23 lines | )
Setting registery video mode DALDTMCRTBCD321x240x0x60 with:
(62986/63001/62986) Modeline 6.470000 320 336 368 424 240 252 255 283
Opening  modes file for mode 320x240@54
Running Emulator: mame rfjet -resolution 321x240@60 -resolution0 321x240@60 -vid
eo ddraw -norotate -cleanstretch -nothrottle -nomt -syncrefresh -triplebuffer
Target refresh = 54.000000
Average speed: 333.93% (9 seconds)
Setting registery video mode DALDTMCRTBCD321x240x0x60 with:
(63001/63001/63001) Modeline 6.640000 320 336 368 424 240 242 245 261

D:\Mame>switchres rfjet --soft15khz --mo 2 -v -v -v -v -verbose

 It is really strange because i've already ran successfully this game with switchres ... but result was nos perfect (soundsync lag input .....)

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6906
  • Last login:Yesterday at 11:48:28 pm
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #654 on: January 22, 2011, 11:20:50 am »
Yes, it's strange as it seems vsync is not working, that can be the reason why speed goes so fast. That can happen when ddraw acceleration is failing. Run dxdiag and in screen tab, check if all DirectX features are enabled. If they're disabled, you'll probably need to reinstall the drivers, running catuninstaller before installing.

I'm thinking of another possible reason, although it's not probably that. You're using 321x labelled resolutions, that's not necessary anymore with my drivers. Maybe Soft-15Khz is doing that?
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

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #655 on: January 22, 2011, 12:10:00 pm »
Desinstalled catalyst, rebooter, reinstalled ,installed directx .. same problem  :banghead: :banghead:

 I'm downloading the gentoo livecd and will give a shot to switchres under gentoo ....

EDIT = could you please explain howto use your modified driver for a 15khz output ?

 Do i need to use soft15khz ? it is not really clear for me so the problem may come from that. ?!
« Last Edit: January 22, 2011, 12:12:47 pm by dapsaille »

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6906
  • Last login:Yesterday at 11:48:28 pm
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #656 on: January 22, 2011, 01:37:34 pm »
But did you check dxdiag for ddraw acceleration? I'm thinking it could be the key of the problem. Is vsync working at all with other games?
Unfortunately, ATI drivers are sometimes buggy when installing/reinstalling, even if everything looks fine you have to check that dxdiag app to be sure it's working ok. If ddraw acceleration is disabled, let me know and I'll try to help with that.

My hacked drivers need no extra software for 15Khz output. You only need to install them. But the built in mode table is not the best one in order to use Switchres with, as it is intended to be used as a static mode list with inis for each rom. That's why it's recommended to use a special mode table when using dynamic modelines (Switchres), like the one I posted. So Soft-15khz is only used here to store that special mode table into the registry. My drivers come with the VMMaker app that was intended for static mode lists + inis (does a great job imho) but I should update it to the new paradigm so it will create a mode list specially designed for Switchres, and I'm thinking of uploading a new version of the drivers that already has the right mode table so you don't need to do anything apart from installing the drivers and using Switchres.
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

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #657 on: January 22, 2011, 05:24:44 pm »
Well .. in dxdiag's Display panel  i've got a directdraw acceleration = unavalaible .... but i get direct3d avalaible and activated .. strange ...

 Seems that ddraw is sort of broken on my rig...

 Just for being clear= your driver specify resolution that ARE 15khz OOB, so soft15khz is only used to modify resolutions provided by your driver for made them more accurate regarding to arcade games resolution, right ?

 If this is right, i don't need soft15khz for getting a basic 15khz win xp system, i only need to install your drivers and switchres will try to use the best resolution (based on modelines provided by your driver) ?

 I'm really sorry to ask for some informations who may have already been explained but the mechanisms of switchres and your drivers is new for me and my english knowledge is not good as i wish.

 I only undrestand mechanisms of official catalyst drivers + soft15khz who add 15khz modelines (or/and 24/31khz) (again thanks sailorsat ^^)

 Regards.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6906
  • Last login:Yesterday at 11:48:28 pm
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #658 on: January 22, 2011, 06:28:29 pm »
Quote
Well .. in dxdiag's Display panel  i've got a directdraw acceleration = unavalaible .... but i get direct3d avalaible and activated .. strange ...

Don't search any more, that's the problem. The drivers are not working properly. Unfortunately this happens from time to time, have no clue of the reason but I've seen the only way to repair it is to completely clean the system from any previous Catalyst software before installing the new Catalyst. You'd better do it starting in safe mode. Then run Catalyst Uninstaller (http://downloads.guru3d.com/download.php?det=1275) or Driver Cleaner. Reboot, and reinstall my hacked drivers. You may need to do that several times (yes), until you run dxdiag and ddraw is enabled... don't know the reason, but the last time that happened to me it took me some hours to fix it, it really sucks.

I'll explain the other stuff in a while...
« Last Edit: January 22, 2011, 06:30:40 pm by Calamity »
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

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #659 on: January 23, 2011, 04:31:17 am »
Quote
Well .. in dxdiag's Display panel  i've got a directdraw acceleration = unavalaible .... but i get direct3d avalaible and activated .. strange ...

Don't search any more, that's the problem. The drivers are not working properly. Unfortunately this happens from time to time, have no clue of the reason but I've seen the only way to repair it is to completely clean the system from any previous Catalyst software before installing the new Catalyst. You'd better do it starting in safe mode. Then run Catalyst Uninstaller (http://downloads.guru3d.com/download.php?det=1275) or Driver Cleaner. Reboot, and reinstall my hacked drivers. You may need to do that several times (yes), until you run dxdiag and ddraw is enabled... don't know the reason, but the last time that happened to me it took me some hours to fix it, it really sucks.

I'll explain the other stuff in a while...

 You're right, the problem was related to the fact that i didn't have directdraw acceleration,  :applaud: :applaud: :applaud:
 i've uninstalled/cleaned/reinstalled (at least 3 times) and now ddraw acceleration is here ^^

 Hummmm "real" vsync is much stable than "fake" vsync/throttle .. not perfect but really better.

 I've re-read  your previous posts and now i understand better the mechanisms of your drivers and soft15khz switchres chain...

 Thanks again for your support, and your patience  ;D

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6906
  • Last login:Yesterday at 11:48:28 pm
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #660 on: January 23, 2011, 06:57:00 am »
It's good it was that! Thanks for testing. I'm preparing a new version of my drivers with a mode table specially designed for Switchres, hopefully I'll have it ready soon.
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

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #661 on: January 23, 2011, 09:36:58 am »
humm .. i've read that triple buffer may involve some "input lag"

http://shmups.system11.org/viewtopic.php?t=19516

 So i've tried with --args -notriplebuffer and ... 245% speed for mame ...

 Does the triplebuffer is mandatory for getting the right resolutions or can it be desactivated ?


bitbytebit

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 896
  • Last login:August 02, 2019, 11:07:16 am
    • The Groovy Organization
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #662 on: January 23, 2011, 10:13:56 am »
humm .. i've read that triple buffer may involve some "input lag"

http://shmups.system11.org/viewtopic.php?t=19516

 So i've tried with --args -notriplebuffer and ... 245% speed for mame ...

 Does the triplebuffer is mandatory for getting the right resolutions or can it be desactivated ?



You should be able to run switchres without triple buffer actually, and not need to send it that option.  It needs to know your turning off triple buffer basically, so doing this...

switchres <game> --soft15khz --notriplebuffer --threads

Should do it without triple buffer, seeing if taking away --threads above also may be tried if that still doesn't fix it.   I'm thinking possibly running it using --args is probably causing it to fail to work, so see if the above method works better.
« Last Edit: January 23, 2011, 10:17:32 am by bitbytebit »
SwitchRes / GroovyMame - http://arcade.groovy.org
Modeline Generator and Mame Wrapper for Windows or Linux
LiveCD of Groovy Arcade Linux for Arcade Monitors
GroovyMame - generate arcade resolutions like advancemame
--
The Groovy Organization

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #663 on: January 23, 2011, 10:17:04 am »
switchres --mo 2 rfjet -v -v  -v -v -v -v -v --notriplebuffer

Opening  modes file for mode 320x240@54
Running Emulator: mame rfjet -resolution 320x240@54 -resolution0 320x240@54 -vid
eo ddraw -norotate -cleanstretch -nothrottle -nomt -waitvsync
Target refresh = 54.000000
Average speed: 365.00% (8 seconds)


Tried with --threads too and same bad result

EDIT = tried switchres <game> --soft15khz --notriplebuffer --threads   with no success , same problem....
« Last Edit: January 23, 2011, 10:27:53 am by dapsaille »

bitbytebit

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 896
  • Last login:August 02, 2019, 11:07:16 am
    • The Groovy Organization
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #664 on: January 23, 2011, 10:27:21 am »
switchres --mo 2 rfjet -v -v  -v -v -v -v -v --notriplebuffer

Opening  modes file for mode 320x240@54
Running Emulator: mame rfjet -resolution 320x240@54 -resolution0 320x240@54 -vid
eo ddraw -norotate -cleanstretch -nothrottle -nomt -waitvsync
Target refresh = 54.000000
Average speed: 365.00% (8 seconds)


Tried with --threads too and same bad result

Weird, well that's the right way to run it like that, but seems like the vblank/vsync for the video card still isn't working, is the computer still saying it's available?  Calamity probably has more ideas what to try in Windows at that point since he has it running there like this.
SwitchRes / GroovyMame - http://arcade.groovy.org
Modeline Generator and Mame Wrapper for Windows or Linux
LiveCD of Groovy Arcade Linux for Arcade Monitors
GroovyMame - generate arcade resolutions like advancemame
--
The Groovy Organization

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #665 on: January 23, 2011, 10:30:12 am »
Weird, well that's the right way to run it like that, but seems like the vblank/vsync for the video card still isn't working, is the computer still saying it's available?  Calamity probably has more ideas what to try in Windows at that point since he has it running there like this.

 Hummm .... dxdiag seems ok about ddraw acceleration ...

 Time for me to switch to Gentoo ^^

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #666 on: January 23, 2011, 11:27:29 am »
I don't know if there is a thread dedicated to your GroovyArcade iso but  ...

 It seems that dhcp is not launched at boot, is this normal ?

 Also, when i boot latest revision on my laptop with a lcd connected to vga connector (no display panel, broken and removed) the MULTI grub menu give me a OUT OF SYNC on my lcd ... tried other modes too but i cannot get a vga boot.

 Here is the output of my lspci

Code: [Select]
GroovyArcade ~ # lspci
00:00.0 Host bridge: ATI Technologies Inc RS690 Host Bridge
00:01.0 PCI bridge: ATI Technologies Inc RS690 PCI to PCI Bridge (Internal gfx)
00:04.0 PCI bridge: ATI Technologies Inc Device 7914
00:05.0 PCI bridge: ATI Technologies Inc RS690 PCI to PCI Bridge (PCI Express Port 1)
00:12.0 SATA controller: ATI Technologies Inc SB600 Non-Raid-5 SATA
00:13.0 USB Controller: ATI Technologies Inc SB600 USB (OHCI0)
00:13.1 USB Controller: ATI Technologies Inc SB600 USB (OHCI1)
00:13.2 USB Controller: ATI Technologies Inc SB600 USB (OHCI2)
00:13.3 USB Controller: ATI Technologies Inc SB600 USB (OHCI3)
00:13.4 USB Controller: ATI Technologies Inc SB600 USB (OHCI4)
00:13.5 USB Controller: ATI Technologies Inc SB600 USB Controller (EHCI)
00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 14)
00:14.1 IDE interface: ATI Technologies Inc SB600 IDE
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
00:14.3 ISA bridge: ATI Technologies Inc SB600 PCI to LPC Bridge
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:05.0 VGA compatible controller: ATI Technologies Inc RS690M [Radeon X1200 Series]
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)

 Can i specify my output at grub ? (vga connector instead internal lvd)

EDIT= GENTOO_MIRRORS may not be good for everyone ^^
« Last Edit: January 23, 2011, 11:38:53 am by dapsaille »

bitbytebit

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 896
  • Last login:August 02, 2019, 11:07:16 am
    • The Groovy Organization
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #667 on: January 23, 2011, 11:50:25 am »
I don't know if there is a thread dedicated to your GroovyArcade iso but  ...

 It seems that dhcp is not launched at boot, is this normal ?

 Also, when i boot latest revision on my laptop with a lcd connected to vga connector (no display panel, broken and removed) the MULTI grub menu give me a OUT OF SYNC on my lcd ... tried other modes too but i cannot get a vga boot.

 Here is the output of my lspci

Code: [Select]
GroovyArcade ~ # lspci
00:00.0 Host bridge: ATI Technologies Inc RS690 Host Bridge
00:01.0 PCI bridge: ATI Technologies Inc RS690 PCI to PCI Bridge (Internal gfx)
00:04.0 PCI bridge: ATI Technologies Inc Device 7914
00:05.0 PCI bridge: ATI Technologies Inc RS690 PCI to PCI Bridge (PCI Express Port 1)
00:12.0 SATA controller: ATI Technologies Inc SB600 Non-Raid-5 SATA
00:13.0 USB Controller: ATI Technologies Inc SB600 USB (OHCI0)
00:13.1 USB Controller: ATI Technologies Inc SB600 USB (OHCI1)
00:13.2 USB Controller: ATI Technologies Inc SB600 USB (OHCI2)
00:13.3 USB Controller: ATI Technologies Inc SB600 USB (OHCI3)
00:13.4 USB Controller: ATI Technologies Inc SB600 USB (OHCI4)
00:13.5 USB Controller: ATI Technologies Inc SB600 USB Controller (EHCI)
00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 14)
00:14.1 IDE interface: ATI Technologies Inc SB600 IDE
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
00:14.3 ISA bridge: ATI Technologies Inc SB600 PCI to LPC Bridge
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:05.0 VGA compatible controller: ATI Technologies Inc RS690M [Radeon X1200 Series]
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)

 Can i specify my output at grub ? (vga connector instead internal lvd)

This thread basically can cover the liveCD too, there's one in the Linux forum but since the liveCD is centered around running the switchres linux version to focus on supporting the features fully, seems like it is as good of place as any in this one.

It actually has the setup for the network when you startup, and that'll turn on dhcp at that point.  In theory it should display on both screens with the multi option or LCD/Flat panel VGA, although it will probably pick the lcd screen as the primary one.  It can be turned off at boot, the option on the grub command line is something like this...

video=LVDS-0:d

Also output to VGA/lcd monitors with the liveCD is slightly broken with anything not using good EDID monitor information currently, since it mainly focuses on arcade monitors that type of support right now is somewhat altered with the patches.  I need to eventually redo the patches to change how it works in those cases.  They currently sort of override everything for normal monitors and could be done better in working for all types. Also I'm not fully sure how X Windows will act although it might be fine after that command line is given. 

At the bottom of this page it explains how to add video= options and control monitor outputs...

http://nouveau.freedesktop.org/wiki/KernelModeSetting

You can turn different video inputs on/off and choose resolutions for them, somewhat, although again it's really limited right now with how I've basically short circuited the normal support to CGA mode in the current kernel patches. 
SwitchRes / GroovyMame - http://arcade.groovy.org
Modeline Generator and Mame Wrapper for Windows or Linux
LiveCD of Groovy Arcade Linux for Arcade Monitors
GroovyMame - generate arcade resolutions like advancemame
--
The Groovy Organization

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
A
« Reply #668 on: January 23, 2011, 12:25:07 pm »
Well ..

 i've decided to stop trying to boot livecd with a vga monitor,
 i've just tried to boot livecd on my cab (the same that i used for windows switchres, so monitor is OK at 15khz)
and i cannot get a stable picture ..

 At boot it is at 31khz for grub menu (splitted in two by my jpac) but when i select Groovy Arcade LiveCD [CGA Arcade Monitor First VGA Output] the boot process stay at 31khz then suddently the picture divide by 4 instead of 2 like in 31khz mode ... i got 4 squares containing the picture of the boot process ..

 Tried DVI boot, nothing at screen (normal)

 I will try other boot methods but it is really strange ...


bitbytebit

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 896
  • Last login:August 02, 2019, 11:07:16 am
    • The Groovy Organization
Re: A
« Reply #669 on: January 23, 2011, 12:31:22 pm »
Well ..

 i've decided to stop trying to boot livecd with a vga monitor,
 i've just tried to boot livecd on my cab (the same that i used for windows switchres, so monitor is OK at 15khz)
and i cannot get a stable picture ..

 At boot it is at 31khz for grub menu (splitted in two by my jpac) but when i select Groovy Arcade LiveCD [CGA Arcade Monitor First VGA Output] the boot process stay at 31khz then suddently the picture divide by 4 instead of 2 like in 31khz mode ... i got 4 squares containing the picture of the boot process ..

 Tried DVI boot, nothing at screen (normal)

 I will try other boot methods but it is really strange ...


Is your VGA output the first on the card or the second output?  It always chooses the first output for these, so anything else won't be 15khz.
SwitchRes / GroovyMame - http://arcade.groovy.org
Modeline Generator and Mame Wrapper for Windows or Linux
LiveCD of Groovy Arcade Linux for Arcade Monitors
GroovyMame - generate arcade resolutions like advancemame
--
The Groovy Organization

dapsaille

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 92
  • Last login:July 13, 2019, 01:31:26 am
Re: A
« Reply #670 on: January 23, 2011, 01:17:58 pm »
Well ..

 i've decided to stop trying to boot livecd with a vga monitor,
 i've just tried to boot livecd on my cab (the same that i used for windows switchres, so monitor is OK at 15khz)
and i cannot get a stable picture ..

 At boot it is at 31khz for grub menu (splitted in two by my jpac) but when i select Groovy Arcade LiveCD [CGA Arcade Monitor First VGA Output] the boot process stay at 31khz then suddently the picture divide by 4 instead of 2 like in 31khz mode ... i got 4 squares containing the picture of the boot process ..

 Tried DVI boot, nothing at screen (normal)

 I will try other boot methods but it is really strange ...


Is your VGA output the first on the card or the second output?  It always chooses the first output for these, so anything else won't be 15khz.

 It is a laptop witha  broken screen on lvds and a vga output ... i will boot up a linux distro and launch a xrandr for being sure that there is no other "logical" output

Here is a picture after the grub selection (you can see that the jpac to the left is synced)


when loading (sync ok too ... strange ^^)


 And after at X (no sync)
« Last Edit: January 23, 2011, 01:34:53 pm by dapsaille »

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6906
  • Last login:Yesterday at 11:48:28 pm
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #671 on: January 23, 2011, 01:52:56 pm »
Good news is you have video, and jpac gets sync, so it's probably your monitor not being able to sync at that hfreq, try to slightly adjust your hfreq potenciometer, could be that.

EDIT: Oh, just noticed the picture is doubled, forget what I've said.

EDIT2: Try CGA Arcade Monitor Second VGA Output (if it's a laptop, then VGA will likely be the second output).
« Last Edit: January 23, 2011, 02:00:33 pm by Calamity »
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

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6906
  • Last login:Yesterday at 11:48:28 pm
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #672 on: January 23, 2011, 02:33:17 pm »
Weird, well that's the right way to run it like that, but seems like the vblank/vsync for the video card still isn't working, is the computer still saying it's available?  Calamity probably has more ideas what to try in Windows at that point since he has it running there like this.

Well, syncrefresh/waitvsync, according to the code, only work in the context of throttle + notriplebuffer (dd->back == NULL):

/src/osd/windows/drawdd.c

Code: [Select]
// sync to VBLANK
if ((video_config.waitvsync || video_config.syncrefresh) && window->machine->video().throttled() && (!window->fullscreen || dd->back == NULL))
  {
result = IDirectDraw7_WaitForVerticalBlank(dd->ddraw, DDWAITVB_BLOCKBEGIN, NULL);
if (result != DD_OK) mame_printf_verbose("DirectDraw: Error %08X waiting for VBLANK\n", (int)result);
        }

So as we're disabling throttle, the above condition will not be true, so syncrefresh/waitvsync won't work. It will go directly to the blit without waiting.

After we do the blit, triplebuffer is checked. If it's enabled, we will wait+flip:

Code: [Select]
// page flip if triple buffered
if (window->fullscreen && dd->back != NULL)
{
result = IDirectDrawSurface7_Flip(dd->primary, NULL, DDFLIP_WAIT);
if (result != DD_OK) mame_printf_verbose("DirectDraw: Error %08X waiting for VBLANK\n", (int)result);


So syncrefresh/waitvsync wait BEFORE the blit, triplebuffer waits+flips AFTER the blit. That's the only difference. So only one of those waits should happen (as is intended on the conditions above).

Of course we can patch Mame so that syncrefresh/waitvsync are considered even without throttle, doing this (haven't tested):

Code: [Select]
- if ((video_config.waitvsync || video_config.syncrefresh) && window->machine->video().throttled() && (!window->fullscreen || dd->back == NULL))
+ if ((video_config.waitvsync || video_config.syncrefresh) && (!window->fullscreen || dd->back == NULL))

But with the current CabMame builds triplebuffer is the only possibility by now to vsync without throttle.

Have a look at this one patch I posted:

http://forum.arcadecontrols.com/index.php?topic=106405.msg1150987#msg1150987

That actually allows syncrefresh/waitvsync without throttle/triplebuffer, and at the same time performs a continuos poll of inputs while waiting, to minimize input lag. It needs multithreading enabled (--threads) otherwise will crash, so it's more of an experimental hack than anything else, though some ideas there could be useful.
« Last Edit: January 23, 2011, 02:42:24 pm by Calamity »
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

bitbytebit

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 896
  • Last login:August 02, 2019, 11:07:16 am
    • The Groovy Organization
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #673 on: January 23, 2011, 02:48:51 pm »
Weird, well that's the right way to run it like that, but seems like the vblank/vsync for the video card still isn't working, is the computer still saying it's available?  Calamity probably has more ideas what to try in Windows at that point since he has it running there like this.

Well, syncrefresh/waitvsync, according to the code, only work in the context of throttle + notriplebuffer (dd->back == NULL):

/src/osd/windows/drawdd.c

Code: [Select]
// sync to VBLANK
if ((video_config.waitvsync || video_config.syncrefresh) && window->machine->video().throttled() && (!window->fullscreen || dd->back == NULL))
  {
result = IDirectDraw7_WaitForVerticalBlank(dd->ddraw, DDWAITVB_BLOCKBEGIN, NULL);
if (result != DD_OK) mame_printf_verbose("DirectDraw: Error %08X waiting for VBLANK\n", (int)result);
        }

So as disable throttle, the above condition will not be true, so syncrefresh/waitvsync won't work. It will go directly to the blit without waiting.

After we do the blit, triplebuffer is checked. If it's enabled, we will wait+flip:

Code: [Select]
// page flip if triple buffered
if (window->fullscreen && dd->back != NULL)
{
result = IDirectDrawSurface7_Flip(dd->primary, NULL, DDFLIP_WAIT);
if (result != DD_OK) mame_printf_verbose("DirectDraw: Error %08X waiting for VBLANK\n", (int)result);


So syncrefresh/waitvsync wait BEFORE the blit, triplebuffer waits+flips AFTER the blit. That's the only difference. So only one of those waits should happen (as is intended on the conditions above).

Of course we can patch Mame so that syncrefresh/waitvsync are considered even without throttle, doing this (haven't tested):

Code: [Select]
- if ((video_config.waitvsync || video_config.syncrefresh) && window->machine->video().throttled() && (!window->fullscreen || dd->back == NULL))
+ if ((video_config.waitvsync || video_config.syncrefresh) && (!window->fullscreen || dd->back == NULL))

But with the current CabMame builds triplebuffer is the only possibility by now to vsync without throttle.

Have a look at this one patch I posted:

http://forum.arcadecontrols.com/index.php?topic=106405.msg1150987#msg1150987

That actually allows syncrefresh/waitvsync without throttle/triplebuffer, and at the same time performs a continuos poll of inputs while waiting, to minimize input lag. It needs multithreading enabled (--threads) otherwise will crash, so it's more of an experimental hack than anything else, though some ideas there could be useful.

Ah I see, interesting, so that change should make this work it sounds like.  I'll have to add that into the builds and patches, I had used the original patch in the builds, but looks like that change too is needed to be in there for this to work without triple buffer.  Is triple buffer just a software thing or is it built into direct draw/3d?  I'm guessing it's specific to windows drivers since otherwise I'd guess they'd do the same in the SDL side too.  Is that the only change outside of the input changes that made it work correctly, or are there some more parts that changed from the first patch?
SwitchRes / GroovyMame - http://arcade.groovy.org
Modeline Generator and Mame Wrapper for Windows or Linux
LiveCD of Groovy Arcade Linux for Arcade Monitors
GroovyMame - generate arcade resolutions like advancemame
--
The Groovy Organization

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6906
  • Last login:Yesterday at 11:48:28 pm
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #674 on: January 23, 2011, 02:57:27 pm »
I think the only change we should do by now is this:

Code: [Select]
- if ((video_config.waitvsync || video_config.syncrefresh) && window->machine->video().throttled() && (!window->fullscreen || dd->back == NULL))
+ if ((video_config.waitvsync || video_config.syncrefresh) && (!window->fullscreen || dd->back == NULL))

That should bring syncrefresh/waitvsync back to life.

The only thing triplebuffer does is to create a two back buffers (dd->back) so it can flip pages. If we don't use triplebuffer, then a raw blit to the visible video ram is performed instead, that's why we need syncrefresh/waitvsync to synchronize it with the vertical retrace.

I'm not fully sure if that page flip introduces any input lag because of page rotation (syncrefresh on the other hand should have the same input lag as throttle does).
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

bitbytebit

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 896
  • Last login:August 02, 2019, 11:07:16 am
    • The Groovy Organization
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #675 on: January 23, 2011, 03:33:57 pm »
Sounds great, I've recompiled and have a new build of mame0141 up now with the fix...

SwitchRes / GroovyMame - http://arcade.groovy.org
Modeline Generator and Mame Wrapper for Windows or Linux
LiveCD of Groovy Arcade Linux for Arcade Monitors
GroovyMame - generate arcade resolutions like advancemame
--
The Groovy Organization

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6906
  • Last login:Yesterday at 11:48:28 pm
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #676 on: January 23, 2011, 04:35:34 pm »
I've tested new Mame build and it works ok  ;)
Now syncrefresh/waitvsync do the job even with nothrottle + notriplebuffer.
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

Haggar

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 146
  • Last login:February 13, 2017, 05:12:32 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #677 on: January 24, 2011, 02:45:03 am »
There are differences between "Switchres arcade monitor modeline generator and mame wrapper" and this method: http://postback.geedorah.com/foros/viewtopic.php?id=1424 ?


I've tested new Mame build and it works ok  ;)
Now syncrefresh/waitvsync do the job even with nothrottle + notriplebuffer.
Can you explain me this "new feature"?

Refers to this, right?
Quote
-- CURRENT NEWS --
* Multiprocessor support for waitvsync mode with new mame patches, both Windows and Linux.
Thanks

EDIT:
Quote
That actually allows syncrefresh/waitvsync without throttle/triplebuffer, and at the same time performs a continuos poll of inputs while waiting, to minimize input lag.

In the past I've used Triple buffer with no throttle (and soundsync). Smooth scorlling, no stuttering at any resolution/Hz, but It caused heavy input lag.
Now I use only throttle+sync to monitor refresh (and always audiosync). All is fine and I have no input lag but I have to use a resolution with less Hz than the game (e.g. on 60Hz game I have to use 59.7 Hz), otherwise I get some spot accelerations.
What can I get with that new feature?
« Last Edit: January 24, 2011, 03:20:23 am by Haggar »

SailorSat

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1173
  • Last login:July 03, 2020, 06:52:32 am
    • For Amusement Only e.V.
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #678 on: January 24, 2011, 03:18:31 am »
This sure will wet someones pants :)
I do all that stuff even without a Joystick ;)
Soft-15kHz, cabMAME, For Amusement Only e.V.


Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6906
  • Last login:Yesterday at 11:48:28 pm
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #679 on: January 24, 2011, 05:02:37 am »
There are differences between "Switchres arcade monitor modeline generator and mame wrapper" and this method: http://postback.geedorah.com/foros/viewtopic.php?id=1424 ?

Both methods use similar modeline generation routines. But with VMMaker a static mode list is used, so a carefully selected mode list is needed to cover most situations, and mantaining a heavy ini folder so that each rom is assigned to the right video mode. You can modify VMMaker setup to get a different mode list + inis, but in order to see the results you need to reboot. That's why we say it's static. In a way it's the same method used by Soft-15Khz, in fact it's inspired on that program and Winmodelines, but with a built-in modeline generator that allows the automatization of the process. So with Soft-15Khz you would mantain a custom resolution list in a text file to feed the program with it, with VMMaker the list would be done for you extracting the needed info from Mame.xml. Another important feature is that VMMaker is intended to be used with my hacked Catalyst drivers (CRT_Emudriver), that allow more than a hundred video modes simultaneously, while normal Catalyst only admits 60. On the other hand VMMaker was still (is) on an experimental stage when I joined this thread, so it was limited to fixed-sync arcade monitors. And the dynamic modelines method I was testing would never be added to VMMaker, but to Switchres instead, as it is a much more ambitious project.

Switchres, under Windows, uses a dynamic mode list. That means that modelines can be recalculated on the fly right before launching Mame. So in way, you can see Switchres as the return of AdvanceMame. The method has its own limitations and we are working to get the best of it, but in practice it means you can have infinite modelines under Windows XP. Consider the variety of video modes derived from the resolution, i.e. 320x240. You have it in 50, 60, 57.55 Hz, etc. etc. Normally, you would have to store each of those video modes as a separate modeline. Now, you only have to store an instance of each resolution, say 320x240. All variety of needed vertical refreshes will be calculated out of 320x240 dummy resolution by Switchres.

I've tested new Mame build and it works ok  ;)
Now syncrefresh/waitvsync do the job even with nothrottle + notriplebuffer.
Can you explain me this "new feature"?

Refers to this, right?
Quote
-- CURRENT NEWS --
* Multiprocessor support for waitvsync mode with new mame patches, both Windows and Linux.
Thanks

EDIT:
Quote
That actually allows syncrefresh/waitvsync without throttle/triplebuffer, and at the same time performs a continuos poll of inputs while waiting, to minimize input lag.

In the past I've used Triple buffer with no throttle (and soundsync). Smooth scorlling, no stuttering at any resolution/Hz, but It caused heavy input lag.
Now I use only throttle+sync to monitor refresh (and always audiosync). All is fine and I have no input lag but I have to use a resolution with less Hz than the game (e.g. on 60Hz game I have to use 59.7 Hz), otherwise I get some spot accelerations.
What can I get with that new feature?

The input lag issue is a tricky subject. Many people are reporting input lag with triplebuffer, however I have never noticed it myself. I honestly can't see any difference even when using Shmupmame, but that could be because I'm not such a hardcore gamer and my eye is not trained on that. The joysticks on my cab are not the best ones for shmups either. I tended to believe people were having input lag because of choppyness introduced by their lousy setups when enabling triplebuffer with video modes far from correct. But this indeed deserves a deeper study.

What the new patch does is to enable vsync without page flipping (syncfresh vs triplebuffer), and still be able to turn throttle off. So you won't need to use a video mode with less Hz any more to avoid hiccups, by only enabling syncrefresh without triplebuffer/throttle. I would appreciate you tested this and tell us if you still have input lag or not, as I'm not the best one for determining that for the reasons I explained above.

« Last Edit: January 24, 2011, 05:06:05 am by Calamity »
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