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

0 Members and 2 Guests 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 arcade monitor modeline generator and mame wrapper
« Reply #840 on: February 05, 2011, 01:31:04 pm »
I'm testing again and this really rocks. All games running smooth like silk, and this cd finally being so close to a plug and play thing.

I'm surprised to see that you've implemented some kind of soundsync also in Linux? For instance, Contra runs at 92% of its speed, which is normal as my monitor can't do any better having that game 280 lines of height, but... sound should be choppy because of that but it's perfect, what have you done? I remind from previous versions that in these cases when vfreq was unable to catch the original you were not using vsync and activating throttle instead, so I'm happy to see it's not necessary any more ?!?

There's a weak point however with stretched vertical games, for some reason opengl unevenstretch does not achieve such good results as ddraw hwstretch, so virtualized resolutions have a lot of flicker. It seems the method they're using for stretching is different, don't know the reason, but stretching with ddraw looks smoother, maybe it could be benefiting there from some hardware feature not available from Linux?

Twincobra runs at 98% of it's speed, the same thing happens in Windows. I thought it was a flaw of the modeline generator but not, it's again a badly reported vfreq by mame.xml, so it's reported as 54.000 Hz but then when during the game you go to game information it says it's actually 54.87 Hz. So they're misleading Switchres with that.

Also when pressing f11 to check the game speed, the screen gets full of rubbish for some reason, not important anyway. On the wish list side it could be great to figure out a way of having pixel perfect menu fonts and not the filtered crap they do since recent versions of Mame, I've been making some tests on that and does not look easy to fix however.

I've seen that changing the monitor orientation from your menu does not have any effect once you've been playing for a while.

Snes and Megadrive also work fine at full screen but they're using an interlaced resolution, have you achieved anything better on your system or are we limited to 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 of 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 #841 on: February 05, 2011, 02:28:09 pm »
Good to hear, hopefully I can get some things tied up in the next day with trimming out some of the extra stuff and some issues with the 32bit gens on the 64bit cd.  I realized these last ISO's were bigger, because of a dependency issue of the nvidia driver version and the older opengl, but have fixed that, so it should allow the trimming down of the extra packages again (it refused to remove anything when the dependencies were not all fully met). 

I'm not sure how the sound is being nicer in Linux, but good to hear that too, and also the stretching is interesting and I've always wondered why they have different things in Linux and Windows for that.  In fact you would think if it's possible in Windows it is too in Linux, it's the same hardware, just maybe either not implemented in Mame or the Linux drivers *yet*.  I will look at that more, also I suspect in Linux the interlacing might be different perhaps, but not sure why, although I do know they don't do the page flip vertical blank timestamping yet for interlacing or doublescan.  So maybe that's it, they have comments in the kernel that they haven't tackled that issue yet.

Yeah I've seen that certain games run at 98.9% and stuff like that, or even more off, and it doesn't seem to be any factor besides us not knowing the original resolution.  I wonder if there's a lot of games where things haven't been really calculated accurately and it makes sense because they aren't fully targeting playing them like we are on arcade monitors at the original resolution.  It seems if true, that's pretty sad, things aren't being documented, but I suspect it's more of an issue with the difficulty of measuring the original PCB and finding one working at original speed as it is.  I never actually notice though anything wrong with those games, like virtua racer, that just can't get that 100% perfection like pacman can.

What do you mean about the orientation, technically it's just setting mo=1 or mo=2 in /home/arcade/switchres.conf to do that, of course also one needs to edit advmenu config too but not as important for now (I probably need to get more into making configuration interfaces for these things).  It should hold, but suspect maybe it's something todo actually with mame then?  Sounds strange, not sure.

I haven't looked into the other emulators much yet, did that awhile back but mostly just let them go at what mess said.  Some of them are tricky because they weren't programmed to actually run at the original resolution or the configuration has to be really setup just right to do that.   So they need some going through, maybe even some changing internally I suspect to get them to easily do things right.  Of course on this d9800 it never needs to do interlaced resolutions, so maybe that's the main issue, and it might go back to the interlacing needing improvements in Linux still and also possibly the need to look at what those emulators want in resolution and reducing it to the original which an arcade monitor should be able to do.

I'm uploading a new 32bit ISO today, but won't have it in place to download till later tonight.  Mainly just a smaller more trimmed down ISO without extra packages, and all the fixes we've had lately.  There is one up right now, but it had the extra stuff in it so should be good too but this one has a cleaner build I like more.
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: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #842 on: February 05, 2011, 03:31:21 pm »
I've figured up the virtualize (interlaced) issue, it was only needed to set 'filter' on in mame.ini, OpenGL-specific options. Now it looks exactly as in Windows when hwstretch is on. At the cost of loosing some sharpness you have a much more bearable flicker. So interlace is working great with Linux it seems.

With orientation I mean that if I run switchres --mo 0|1|2 it works as intended but when I try to preset that from the gasetup menu then when launching the games from advmenu it always assumes the --mo 0 option it seems.
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

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 #843 on: February 05, 2011, 03:41:42 pm »
I've figured up the virtualize (interlaced) issue, it was only needed to set 'filter' on in mame.ini, OpenGL-specific options. Now it looks exactly as in Windows when hwstretch is on. At the cost of loosing some sharpness you have a much more bearable flicker. So interlace is working great with Linux it seems.

With orientation I mean that if I run switchres --mo 0|1|2 it works as intended but when I try to preset that from the gasetup menu then when launching the games from advmenu it always assumes the --mo 0 option it seems.


Ah interesting, so when interlaced I should have switchres turn on filtering then.  It sounds like possibly either there's a bug in switchres for the mo option or the setup in setting that option.  I'll have to look at that closer.
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: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #844 on: February 05, 2011, 03:49:22 pm »
Ah interesting, so when interlaced I should have switchres turn on filtering then.  It sounds like possibly either there's a bug in switchres for the mo option or the setup in setting that option.  I'll have to look at that closer.

Well actually when stretching occurs is when we should enable 'filter', as interlacing is more bearable when the picture is not stretched, for instance if the native resolution of a game is 640x480 then you'd interlace but not stretch, flicker would be noticeable but free of artifacts. However I've been testing and it seems that filter only affects stretching so you might keep it activated by default (not sure).
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

ves

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 225
  • Last login:April 11, 2020, 02:57:49 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #845 on: February 06, 2011, 11:42:25 am »
Hi bitbytebit, I've noticed missing mame remove this warning, that of coinklock disable

Code: [Select]
"inptport.c" delete:

ui_popup_time(3, "Coinlock disabled %­s.", input_field_name(field));
return FALSE;

I do not remember what was the last live version of that probe is that it was a 1.4 ... but not if you're wearing on your website 1404 or not, since I see that you have the 64bit version on a 1,408 more, and if it still has flaws that I hope.

I wanted to know if you had ever thought of updating procedure for the distribution, without resintalar all, or else it would be better resinstalar, because if you have to update the kernel, xorg etc. .. resintalar is much faster to update as gentoo does, unless you already ready to leave the packages installed, I do not think this can be done in gentoo, no? there is always that compile to install, right?


Thank

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 #846 on: February 06, 2011, 12:48:05 pm »
Hi bitbytebit, I've noticed missing mame remove this warning, that of coinklock disable

Code: [Select]
"inptport.c" delete:

ui_popup_time(3, "Coinlock disabled %­s.", input_field_name(field));
return FALSE;

I do not remember what was the last live version of that probe is that it was a 1.4 ... but not if you're wearing on your website 1404 or not, since I see that you have the 64bit version on a 1,408 more, and if it still has flaws that I hope.

I wanted to know if you had ever thought of updating procedure for the distribution, without resintalar all, or else it would be better resinstalar, because if you have to update the kernel, xorg etc. .. resintalar is much faster to update as gentoo does, unless you already ready to leave the packages installed, I do not think this can be done in gentoo, no? there is always that compile to install, right?


Thank

I just updated the ISO images, there's 1.413 up now, and hopefully have fixed just about all the *known* flaws :).  Also it again is stripped down of extra packages, so about 100 meg smaller ISO images.

What is the coinlock disable thing, I've seen that but never know what it means.

With Gentoo updates will always be by source + compile, they explain that somewhere on the gentoo website how they will never have binary packages besides things like firefox or openoffice.  The only way to do updates I can see, is to fully use ebuild packages.  Right now you can update mame/mess builds that I have customized by my ebuild package, although so much else is changing it's probably better to just get a new ISO.  So currently it's more of a complete package, but would be nice to eventually do updates but after more subtle things are changing or just things like mame change and everything else works so wouldn't need to update everything and only mame. 

Usually in Gentoo an upgrade is just...

emerge --sync # (only do this one a day at most, it's a very large download of the /usr/portage files)
emerge -aDuv world
revdep-rebuild

I wouldn't recommend doing that now unless you want to spend a lot of time/bandwidth and possibly chasing some broken stuff :)  It usually is quite clean on a normal build but of course there's a few things different we've done so currently I'm tailoring the build carefully and some things could be overwritten with the generic gentoo update procedures.



So try the 1.413 ISO, it contains these fixes and more...


05022011 - Fixed monitor orientation setup in gasetup
         - filter when stretching for mame
    - fixes in mame0141u1 for mario/dkongjr/asteroids/galaxian sounds
    - gens works again in 64 bit build even when stripped down

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 #847 on: February 06, 2011, 04:11:46 pm »
I've gotten the ATI Radeon 5450 working perfectly now, interlaced 15khz 640x480 on the console, 15khz modes, page flipping/vblank.  This required a kernel patch, mame patch, and a change to xorg.conf too. 

So these cards can work just fine at 15khz, it's just the Windows drivers, and basically all the 5xxx cards are the same so that means they all should be able to work fine in my next ISO image. 

Mame needed to clear the frame before every draw with glClear(), I suspect that's just something mame should always be doing and I've submitted a patch for it.  The Linux kernel needed a patch that is new and not in the -rc tree yet for 2.6.38 to fix interlacing on the 5xxx cards, and xorg.conf seemed to need an option pointing VGA-0 to the right monitor section (this was odd, not sure why it's different than the other cards, but now all should work fine with that difference).

I don't think the 6xxx cards work with Linux yet, they are just now getting close though with those so they should in theory work in the future also.  I suspect they'll just work since probably the mame/xorg config parts are fixed and the interlace bug was a fluke it seems since the support is quite new for them.
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: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #848 on: February 06, 2011, 06:18:54 pm »
Those are great news, very important indeed, if Linux is able to deal with the newer ATIs then there's still hope for the 'crt scene' at least for some years.
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

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 #849 on: February 06, 2011, 06:34:56 pm »
Those are great news, very important indeed, if Linux is able to deal with the newer ATIs then there's still hope for the 'crt scene' at least for some years.

Yeah I'm glad it works, because I bought this card for my desktop actually and yet it now is in my arcade cabinet because the n64 emulator likes it, mario cart is nice now :).  Swapped the 4350 with my desktop system, so figure the 5450 is my base card now I am using to test, it's quite wonderful with all the little issues worked out.  It's as cheap as a 4350 and modern, so sounds like a good base in the future and the ATI official cheap card now days.

Also I figured out what is necessary to support the Arcade VGA 3000 cards in Linux, it's actually really simple.  The method to take a video bios of the official Radeon HD2600 card and load it into the kernel mapping it to the kernels vbios structure.  It's really just loading the file and mapping it out to memory, easy actually, then we should be able to treat it like an HD2600 and the user doesn't even need to flash the bios of the card.  Of course it's also going to allow people to change the vbios of their radeon cards dynamically like some like to do, hack any radeon card to any vbios too.  Not supported or suggested/recommended but possible. I'll have to try to code it up and see how it works, probably the only way we'll support an Arcade VGA 3000 in Linux though.
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

ves

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 225
  • Last login:April 11, 2020, 02:57:49 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #850 on: February 07, 2011, 06:00:32 am »
Hi bit, this distribution is working properly with avga9250.

In the installation does not create or copy the file bash_profile.

I think that when you choose the partition /data format should not ask for, since more than a certain format is wrong and all your roms.

By not format the partition /data folder does not copy the cat, and the symlinks in /home/arcade/emulator/mame are orphaned, but here there are many like flyers cabinets etc. .. I have never been created in /data

With respect to alsa, I could not make me recognize the sound card is installed, I need to prove from the livecd, and make an installation by selecting alsa.

One more thing, switchres have or could have any parameter for vertical games fill the screen?
Because there are games that if you stop to stretch and fill the screen and not others?

The files are in /home/arcade/ini are for something special or because you forgot to delete them?

Thank

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 arcade monitor modeline generator and mame wrapper
« Reply #851 on: February 07, 2011, 06:20:49 am »
One more thing, switchres have or could have any parameter for vertical games fill the screen?
Because there are games that if you stop to stretch and fill the screen and not others?

Hi VeS, regarding the vertical games thing, yesterday I was doing some tests with that in my VMMaker app, and figured out a general method for adding a "vertical aspect" param that works the same both for stretched and non-stretched cases. I'll write out the details later so the --vcalc param in Switchres may be extended for this feature if bitbytebit thinks it's a good idea.
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

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 #852 on: February 07, 2011, 10:04:12 am »
Hi bit, this distribution is working properly with avga9250.

In the installation does not create or copy the file bash_profile.

I think that when you choose the partition /data format should not ask for, since more than a certain format is wrong and all your roms.

By not format the partition /data folder does not copy the cat, and the symlinks in /home/arcade/emulator/mame are orphaned, but here there are many like flyers cabinets etc. .. I have never been created in /data

With respect to alsa, I could not make me recognize the sound card is installed, I need to prove from the livecd, and make an installation by selecting alsa.

One more thing, switchres have or could have any parameter for vertical games fill the screen?
Because there are games that if you stop to stretch and fill the screen and not others?

The files are in /home/arcade/ini are for something special or because you forgot to delete them?

Thank

It should create /home/arcade/.bash_profile actually, are you sure it's not, it should be there.

I still need to figure out how to handle /data/ I guess, although it's tricky because there are many different options possible.  Right now I ask if it should be formatted for the case where someone just created a new partition to store roms on.  If the partition already exists then they can say no there and it should mount it no matter what type it is.  If they don't choose /data/ at all, then the directory will just be the one from the liveCD and they can populate it with the samba share after that.  I'm sure it could be simplified, I haven't looked at it more yet, but seems to work for my case where I mount a directory under /data/  with the roms/snaps and it seems to deal with  that, and when I don't it works fine too with the default roms and just a directory under / as /data/.   

Alsa might not work for your card I'm guessing, OSS4 is the better choice in most cases, it actually is preferred by a lot of people so makes some sense we are seeing it working better and why I made it the default.

That sounds interesting about vertical games, interested in seeing what Calamity has come up with, not totally understanding what the issue is but will be good to make them better and suspect it's another tricky vertical game aspect issue.

The /home/arcade/ini/ files are good ones that are necessary, because those few games in there like zookeeper have the wrong refresh rate in mame and the vector.ini does that thing where the vector  games look better.  The dbz is because they have the size wrong in mame, so helps it fit onto the screen properly, and the a2600 and genesis are actually for the emulators for them else they don't like the resolution mess chooses for them and wont run.  So they are purposefully there to help things run.
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

ves

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 225
  • Last login:April 11, 2020, 02:57:49 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #853 on: February 07, 2011, 10:21:19 am »
Quote
It should create /home/arcade/.bash_profile actually, are you sure it's not, it should be there.

If I am sure, when you first boot the console dry without running startx, and if I look there I have to create the file.

Quote
Alsa might not work for your card I'm guessing, OSS4 is the better choice in most cases, it actually is preferred by a lot of people so makes some sense we are seeing it working better and why I made it the default.

Alsa I have always worked well, but not because it does not work here, it may be of any conflict, or lack of modules, or the kernel you are using to be RC




Thank

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 #854 on: February 07, 2011, 10:27:11 am »
Quote
It should create /home/arcade/.bash_profile actually, are you sure it's not, it should be there.

If I am sure, when you first boot the console dry without running startx, and if I look there I have to create the file.

Quote
Alsa might not work for your card I'm guessing, OSS4 is the better choice in most cases, it actually is preferred by a lot of people so makes some sense we are seeing it working better and why I made it the default.

Alsa I have always worked well, but not because it does not work here, it may be of any conflict, or lack of modules, or the kernel you are using to be RC




Thank

Oh I see what is going on, yeah it's not writing it to the right place if you aren't using a /home/ partition separately, I'll fix that :).

I wonder about Alsa, it in theory should be the same build as Ubuntu but definitely strange, might be the rc kernel but I suspect it's possibly some other way it should be setup better.  It's odd because the aplay -l output said it saw the soundcard, and are alsa mixer levels all up and unmuted?
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 #855 on: February 07, 2011, 10:49:26 am »

I think that when you choose the partition /data format should not ask for, since more than a certain format is wrong and all your roms.

By not format the partition /data folder does not copy the cat, and the symlinks in /home/arcade/emulator/mame are orphaned, but here there are many like flyers cabinets etc. .. I have never been created in /data

Thank

Actually that emulator directory is the part of wahcade I didn't like, since it is a  pain to create that and might as well consider it 'depreciated' and I even might remove any wahcade pre-config all together.  Since we have advmenu  now, it takes care of all that, but will have wahcade if the user wants to go through the trouble of setting it up.
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: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #856 on: February 07, 2011, 12:27:04 pm »
That sounds interesting about vertical games, interested in seeing what Calamity has come up with, not totally understanding what the issue is but will be good to make them better and suspect it's another tricky vertical game aspect issue.

I'm using the 'screen_aspect' option to tweak some things and it works well in Windows, but I still need to test today if that option works also for the Linux part.
BTW testing this I noticed the 'changeres' option and maybe the 'cleanstretch' one are preventing 'hwstretch' to work in Windows, maybe related to what you observed in Linux, so I had to disable them. I definitely need to look deeper at this changeres thing as it's going to be a must have to properly deal with games like the sega ones (dbz) that are trying to dynamically change resolutions during the game.
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

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 #857 on: February 07, 2011, 12:33:22 pm »
That sounds interesting about vertical games, interested in seeing what Calamity has come up with, not totally understanding what the issue is but will be good to make them better and suspect it's another tricky vertical game aspect issue.

I'm using the 'screen_aspect' option to tweak some things and it works well in Windows, but I still need to test today if that option works also for the Linux part.
BTW testing this I noticed the 'changeres' option and maybe the 'cleanstretch' one are preventing 'hwstretch' to work in Windows, maybe related to what you observed in Linux, so I had to disable them. I definitely need to look deeper at this changeres thing as it's going to be a must have to properly deal with games like the sega ones (dbz) that are trying to dynamically change resolutions during the game.

Yeah I disable both changeres and cleanstretch now in switchres.  Changeres will not scale, it forces the pixel aspect ratio to be 1:1.  The Cleanstretch one seems alright a lot of the time, but for a few games it'll just make them way off, like Gorf. 

Changeres is tricky of course because how are we going to know ahead of time which modeline is needed, and mame would have to signal switchres to tell it what is necessary.  I guess that is one reason to try and modify mame to have the logic of modeline calculation within it.  Although the problem then gets really complicated with all the different possible ways to insert modelines so we'd be chasing that in mame instead of a separate switchres program.  Definitely interesting, hopefully we can come up with some innovative amazing way to figure it out :).  I have wanted to look into putting switchres into mame but everytime it starts seeming like a big pain and probably just wasted time, eventually I might get brave enough to try it if I can think of a clean way that really would avoid creating a hard to maintain mame like advancemame was.
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: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #858 on: February 07, 2011, 01:03:46 pm »
Yeah I disable both changeres and cleanstretch now in switchres.  Changeres will not scale, it forces the pixel aspect ratio to be 1:1.  The Cleanstretch one seems alright a lot of the time, but for a few games it'll just make them way off, like Gorf.  

Yes Switchres is doing it already, actually I was getting crazy yesterday seeing this problem when launching mame alone so I figured out from Switchres command line that it was 'changeres' the problematic option.

Changeres is tricky of course because how are we going to know ahead of time which modeline is needed, and mame would have to signal switchres to tell it what is necessary.  I guess that is one reason to try and modify mame to have the logic of modeline calculation within it.  Although the problem then gets really complicated with all the different possible ways to insert modelines so we'd be chasing that in mame instead of a separate switchres program.  Definitely interesting, hopefully we can come up with some innovative amazing way to figure it out :).  I have wanted to look into putting switchres into mame but everytime it starts seeming like a big pain and probably just wasted time, eventually I might get brave enough to try it if I can think of a clean way that really would avoid creating a hard to maintain mame like advancemame was.

Yes, putting Switchres into Mame is too tempting :). By now, it could be done by making Switchres enable 2 or more modelines instead of one before launching Mame. Of course we'd need an ugly external file to patch xml values for the Mame drivers involved, unless it was possible to educate Mame itself by patching it to return the right values and various display resolutions without breaking it. Also some emulators expect to have more than one video mode available, and the information in Mess is certainly not enough. Either way seems there's a lot of work involved.

EDIT: Well, there would be an interesting way to do it I'm thinking, at least from the Windows point of view, that would even avoid the need of dealing with xml at all. We could patch Mame so that when it is about to request a given video mode, it'll send a message to the Switchres process with the needed data as a parameter, in the same way that Powerstrip api can be  controlled remotely. So from Mame side it would be enough with a little patch that can be easily ported between versions. However that would require a big amount of os specific bloat in your code. This could even work for MameUI builds. It's not something definitely needed by now, but just wanted to write it down in case I forget  :D

« Last Edit: February 07, 2011, 02:30:41 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 of pasting it.

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

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 arcade monitor modeline generator and mame wrapper
« Reply #859 on: February 07, 2011, 05:36:18 pm »
Fortunately the screen_aspect option works exactly the same for both Linux and Windows. The idea with this is to do the same vertical aspect calculations for the stretched and not stretched case. So one can use the --vcalc 0 option to have all vertical games looking 3:4, --valc 1 to make them 3:3, etc. until 4:3, that means the game covers the full screen wide (with the wrong proportions of course).

First, the stretched case. All we need to do is use hwstretch/unevenstretch as we do, + nokeepaspect, then use 'screen_aspect <num:den>', using the inverse of the actual ratio we want, so:

normal aspect (3:4) -> use 4:3
square aspect (3:3) -> use 3:3
stretch to full screen (4:3) -> use 3:4

So for --vcalc 0 (default) we would use screen_aspect 4:3
EDIT: For the resolution we still use the same virtualized one, we just add the screen_aspect option

Now, for the non-stretched case we would use this formula:

  SWAP xres, yres
  xres = Normalize ( xres * ( 4 / 3 ) / VerticalAspect, 8 )

where VerticalAspect = (the actual aspect we want, num/den)

... so for the default case it would be 3/4 -> (4/3)/(3/4) =(16/9)
... for the square case it would be 3/3 -> (4/3)/(3/3)=(4/3)
... and for the full screen case 4/3 -> (4/3)/(4/3)=1

Of course some intermediate values are possible, so we can fit one similar to your method that was somewhere between default and square.

----

I've been testing the new ISO, the 64 bits one now, it works perfect, even seems faster. Just noticed that now P2 button from AdvMenu turns the power off instead of exiting, is it intended to be like that or a bug instead?
« Last Edit: February 07, 2011, 05:53:26 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 of 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 #860 on: February 07, 2011, 05:58:39 pm »
Fortunately the screen_aspect option works exactly the same for both Linux and Windows. The idea with this is to do the same vertical aspect calculations for the stretched and not stretched case. So one can use the --vcalc 0 option to have all vertical games looking 3:4, --valc 1 to make them 3:3, etc. until 4:3, that means the game covers the full screen wide (with the wrong proportions of course).

First, the stretched case. All we need to do is use hwstretch/unevenstretch as we do, + nokeepaspect, then use 'screen_aspect <num:den>', using the inverse of the actual ratio we want, so:

normal aspect (3:4) -> use 4:3
square aspect (3:3) -> use 3:3
stretch to full screen (4:3) -> use 3:4

So for --vcalc 0 (default) we would use screen_aspect 4:3

Now, for the non-stretched case we would use this formula:

  SWAP xres, yres
  xres = Normalize ( xres * ( 4 / 3 ) / VerticalAspect, 8 )

where VerticalAspect = (the actual aspect we want, num/den)

... so for the default case it would be 3/4 -> (4/3)/(3/4) =(16/9)
... for the square case it would be 3/3 -> (4/3)/(3/3)=(4/3)
... and for the full screen case 4/3 -> (4/3)/(4/3)=1

Of course some intermediate values are possible, so we can fit one similar to your method that was somewhere between default and square.

----

I've been testing the new ISO, the 64 bits one now, it works perfect, even seems faster. Just noticed that now P2 button from AdvMenu turns the power off instead of exiting, is it intended to be like that or a bug instead?


It's from the config Ves has, but I sort of want to change it to possibly exit/esc instead.

I've been getting wahcade so it'll somewhat be easy to setup/use and defaults fit switchres setup, so when wanted that option as an alternative will be decent.  I also removed all the pre-config setup of it and the links Ves saw that are dead basically, updated to the newer version from the dev repository too since it looks like there has been a few improvements. 

Also the xorg.conf setup has been done a bit differently now and more simple from a single shell script instead of Perl, I discovered some connection between the Monitor and Device outputs being wrong which showed up when switching to VGA and DVI interfaces for output.

I might have found your font/OSD issue, try removing the /home/arcade/fonts/ directory, I no longer have the font specified in that directory anymore and I suspect that might have been using a bad font for you (or there might be better ones in that folder too, not sure, try them and see which works best).

I will absorb that aspect ration information, sounds cool, I always was confused by the aspect option in mame and haven't ever had luck with it so sounds like the way your explaining it will help a lot.  Any good examples of games this affects, and how I can test it with them?  So basically we need to use the -screen_aspect argument, and how do we know if it's the default/square/full screen case?  Or is this basically altering the vcalc decision of the user for their desired way to display, to have them choose which one of those to display (or are certain games needing certain values there?).
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

Gray_Area

  • -Banned-
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3363
  • Last login:June 23, 2013, 06:52:30 pm
  • -Banned-
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #861 on: February 07, 2011, 07:37:18 pm »
I will absorb that aspect ration information, sounds cool, I always was confused by the aspect option in mame and haven't ever had luck with it so sounds like the way your explaining it will help a lot.  Any good examples of games this affects, and how I can test it with them?  So basically we need to use the -screen_aspect argument, and how do we know if it's the default/square/full screen case?  Or is this basically altering the vcalc decision of the user for their desired way to display, to have them choose which one of those to display (or are certain games needing certain values there?).

This is pretty basic, but may be helpful if not already familiar: with games in MAME, 4:3 is the desired setting for horizontal games run horizontally; vertical games run vertically (monitor is turned); and either combination of those run at the same time: H+V on H display; V+H on V display.

I have only used it (with hardware stretch) was when I felt a vertical game displayed on horizontally oriented monitor was wider than I thought it was back in the day. A common setting would be 7:5 .  I have long discontinued this practice, though.
-Banned-

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 #862 on: February 08, 2011, 03:25:52 am »
Here's the code and my commented out parts I was testing with the screen_aspect option...

Code: [Select]
        if (gameInfo.stretch) {
                if (cs->cleanstretch)
                        mamearg[mameargc++] = "-nocleanstretch";

                if (IS_WIN)
                        mamearg[mameargc++] = "-hwstretch";
                else
                        mamearg[mameargc++] = "-unevenstretch";
                mamearg[mameargc++] = "-filter";

                if (cs->changeres && !gameInfo.changeres)
                        mamearg[mameargc++] = "-nochangeres";

                //mamearg[mameargc++] = "-screen_aspect";
                //mamearg[mameargc++] = "4:3";
        } else {
                if (cs->cleanstretch)
                        mamearg[mameargc++] = "-nocleanstretch";

                //mamearg[mameargc++] = "-screen_aspect";
                //mamearg[mameargc++] = "16:9";
        }

        if (gameInfo.keepaspect)
                mamearg[mameargc++] = "-keepaspect";

For some reason, and like before when I played with it, it never seems to really make things correct or help them.  I'm not sure what needs to be done above, but would be interested in seeing it.   From what I can tell, some games adhere to aspect ration with or without keepaspect, others don't and usually look nasty too (like tron).  What would be the case for Tron on a CGA monitor, how could I make it look good with the screen_aspect setting and avoiding keep aspect, or is is possible?

Definitely looks interesting, something I've wondered about, on the d9800 I never really have to worry about this but for a 15khz monitor it definitely is a big issue from what I can see.  So would be good to get this right, because I suspect a game like Tron should be able to show up properly virtualized and not look terrible like it does right now.
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: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #863 on: February 08, 2011, 03:49:55 am »
Yesterday I didn't have much time so I just sketched that, sorry if it wasn't clear. The games I usually choose for testing are 1942 for the normal non-stretched case, and twincobr for the stretched virtualized case. Of course you'll need to use my monitor setup in order to see the same results.

So, now when you select from the --vcalc options, you only get a difference in the 1942 case, but twincobr will still look 3:4 whatever you select. What I'm trying to do is to extend the way --vcalc works for the stretched case also. That involves using the screen_aspect option when in the stretched case, to explicitely tell Mame the aspect we want. When in the non-stretched case, that's not necessary as the resulting aspect is already implicit in the pixel aspect of the resolution we select.

Now, I assume that all games that were designed for a 4:3 crt screen have a native aspect ratio of 4:3 (or 3:4 if vertical), as they were expected to fill the screen, regardless their pixel aspect (xres/yres). So what I mean by "default/square/full screen" is the way the user prefers these games to look when shown in a horizontal monitor, being the default ideal case 3:4, which respects the proportions, while the square 3:3 means that the resulting picture will be square, same width than height, altering the proportions but covering a bigger area on the screen, which some people get used to and like, and then the extreme case of 4:3 full screen mode, where the whole thing is stretched to fill the screen, ruinning the proportions while maximizing the use of our phosphorus area.

The only way I've figured out to get this in the stretched case is by indirectly using the screen_aspect option. The aim of this option is to tell Mame the actual aspect ratio of our screen. So, if we want to have the extreme 4:3 full screen aspect, we cheat Mame to think our screen is actually 3:4, so it will stretch the picture right to the side borders thinking it's doing it right.

Edit: In your code above, you should not use 16:9. You should use screen_aspect 4:3 | 3:3 | 3:4 depending of the --vcalc option. For the non stretched case, you would use 3:4 | 3:3 | 4:3 as VerticalAspect value in the above formula (notice that these quotients are the inverse of the others for the same cases).

* 1942 (256x224)

--vcalc 0; VerticalAspect = 3/4
  yres = 256
  xres = Normalize ( 224 * ( 4 / 3 ) / VerticalAspect, 8 ) = 400
  resolution0 400x256

--vcalc 1; VerticalAspect = 3/3
  yres = 256
  xres = Normalize ( 224 * ( 4 / 3 ) / VerticalAspect, 8 ) = 304
  resolution0 304x256

--vcalc 2; VerticalAspect = 4/3
  yres = 256
  xres = Normalize ( 224 * ( 4 / 3 ) / VerticalAspect, 8 ) = 224
  resolution0 224x256

* twincobr (320x240)

--vcalc 0; VerticalAspect = 3/4;  1 / Vertical Aspect => 4:3
  resolution0 752x560 (virtualized)
  screen_aspect 4:3
  hwstretch
 
--vcalc 1; VerticalAspect = 3/3;  1 / Vertical Aspect => 3:3
  resolution0 752x560 (virtualized)
  screen_aspect 3:3
  hwstretch

--vcalc 2; VerticalAspect = 4/3;  1 / Vertical Aspect => 3:4
  resolution0 752x560 (virtualized)
  screen_aspect 3:4
  hwstretch
« Last Edit: February 08, 2011, 11:21:54 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 of 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 #864 on: February 08, 2011, 12:00:09 pm »
This change seems to do the multiple types of vertical game aspect ratio setups.  Now have vcalc able to do the 0, 1, 2 for the 3 cases mentioned of normal square and stretched, also there's options 3 and 4 for the old normal and older normal which makes it slightly wider (probably pretty much are 0 and 1, but slightly different perhaps).  Then if the value is a double, like 1.777 it uses that to multiply the width for the vertical games.  So basically sticking to 0 is good for most, maybe 1 if a person likes a wider game, and 3 if they want the screen full.  This works for both vertical games on horizontal monitors and horizontal games on vertical monitors.  So you can play Mario on a vertical monitor stretched to fit up/down or with it correctly aspect ratio'd.

Also this patch fixes rotation of the screen so it's always the same direction, it seemed that some vertical games wanted to go one direction, and others the other way, and horizontal games on a vertical screen now also go the same way as the vertical games.   Seemed like a good thing :).

Code: [Select]
diff --git a/src/SwitchResC/switchres.c b/src/SwitchResC/switchres.c
index b3293b7..8377c47 100644
--- a/src/SwitchResC/switchres.c
+++ b/src/SwitchResC/switchres.c
@@ -681,9 +681,10 @@ int main(int argc, char **argv) {
 
                // Vertical oriented monitor
                if (cs->morientation == 1) {
-                       if (gameInfo.orientation == 1)
-                               mamearg[mameargc++] = "-norotate";
-                       else {
+                       if (gameInfo.orientation == 1) {
+                               mamearg[mameargc++] = "-rotate";
+                               mamearg[mameargc++] = "-autorol";
+                       } else {
                                mamearg[mameargc++] = "-rotate";
                                mamearg[mameargc++] = "-rol";
                        }
@@ -691,13 +692,44 @@ int main(int argc, char **argv) {
 
                // Vertical and Horizontal rotating monitor
                if (cs->morientation == 2) {
-                       if (gameInfo.orientation == 1)
-                               mamearg[mameargc++] = "-norotate";
-                       else
+                       if (gameInfo.orientation == 1) {
+                               mamearg[mameargc++] = "-rotate";
+                               mamearg[mameargc++] = "-autorol";
+                       } else {
                                mamearg[mameargc++] = "-rotate";
+                       }
+               }
+       }
+
+       if ((gameInfo.orientation && !cs->morientation) || (!gameInfo.orientation && (cs->morientation == 1))) {
+               if (monitorMode->ModeLine->result & RESULT_VIRTUALIZE) {
+                       if (cs->vcalc == 0) {
+                               mamearg[mameargc++] = "-screen_aspect";
+                               mamearg[mameargc++] = "4:3";
+                       } else if (cs->vcalc == 1) {
+                               mamearg[mameargc++] = "-screen_aspect";
+                               mamearg[mameargc++] = "3:3";
+                       } else if (cs->vcalc == 2) {
+                               mamearg[mameargc++] = "-screen_aspect";
+                               mamearg[mameargc++] = "3:4";
+                       }
+               } else {
+                       if (cs->vcalc == 0) {
+                               mamearg[mameargc++] = "-screen_aspect";
+                               mamearg[mameargc++] = "3:4";
+                       } else if (cs->vcalc == 1) {
+                               mamearg[mameargc++] = "-screen_aspect";
+                               mamearg[mameargc++] = "3:3";
+                       } else if (cs->vcalc == 2) {
+                               mamearg[mameargc++] = "-screen_aspect";
+                               mamearg[mameargc++] = "4:3";
+                       }
                }
        }
 
+       if (gameInfo.keepaspect)
+               mamearg[mameargc++] = "-keepaspect";
+
        if (gameInfo.stretch) {
                if (cs->cleanstretch)
                        mamearg[mameargc++] = "-nocleanstretch";
@@ -710,20 +742,11 @@ int main(int argc, char **argv) {
 
                if (cs->changeres && !gameInfo.changeres)
                        mamearg[mameargc++] = "-nochangeres";
-
-               //mamearg[mameargc++] = "-screen_aspect";
-               //mamearg[mameargc++] = "4:3";
        } else {
                if (cs->cleanstretch)
                        mamearg[mameargc++] = "-nocleanstretch";
-
-               //mamearg[mameargc++] = "-screen_aspect";
-               //mamearg[mameargc++] = "16:9";
        }
 
-       if (gameInfo.keepaspect)
-               mamearg[mameargc++] = "-keepaspect";
-
        if (gameInfo.redraw) {
                mamearg[mameargc++] = "-redraw";
                mamearg[mameargc++] = "auto";
@@ -861,7 +884,7 @@ int usage(void) {
        fprintf(stderr, "  --novsync               Weight for x/y instead of vertical refresh\n");
        fprintf(stderr, "  --noswitchres           Don't switch resolutions, just use as wrapper to mame, best for LCD's\n");
        fprintf(stderr, "  --notriplebuffer        Use Mame option waitvsync instead of triple buffer (Windows)\n");
-       fprintf(stderr, "  --vcalc [0|1]           Method of calculating width on vertical games (0=16/9, 1=3/4)\n");
+       fprintf(stderr, "  --vcalc [0|1|2|3|4]     Method of calculating width on vertical games (0=4:3 1=1:1 2=3:4 3=4:3 4=4:3)\n");
        fprintf(stderr, "  --mo [0|1|2]            Monitor Orientation, 0=horizontal, 1=vertical, 2=both/rotateable\n");
        fprintf(stderr, "  --dcalign <HZ>          Align dotclock to Hz (Windows 10000 Linux 1000)\n");
        fprintf(stderr, "  --ff                    Frogger/Galaxian Hack is in mame executable\n");
diff --git a/src/SwitchResC/xml.c b/src/SwitchResC/xml.c
index 7f7fb72..2886bab 100644
--- a/src/SwitchResC/xml.c
+++ b/src/SwitchResC/xml.c
@@ -223,12 +223,6 @@ int ParseXML(xmlDocPtr xmlbuffer, GameInfo *game, ConfigSettings *cs) {
                                                        if (cs->morientation == 0) {
                                                                game->width = h;
                                                                game->height = w;
-                                                               if (cs->vcalc == 0) // New calculation using 16:9
-                                                                       game->width = (4.0/3.0) * ((double)game->width * (4.0/3.0));
-                                                               else if (cs->vcalc == 1) // Older calculation 4:3 makes things wider
-                                                                       game->width = (4.0/3.0) * game->height;
-                                                               else // Custom calculation
-                                                                       game->width = cs->vcalc * ((double)game->width * (cs->vcalc));
                                                        }
                                                        } else { // horizontal
                                                        game->orientation = 0;
@@ -237,13 +231,21 @@ int ParseXML(xmlDocPtr xmlbuffer, GameInfo *game, ConfigSettings *cs) {
                                                                        int h = game->height;
                                                                game->width = h;
                                                                game->height = w;
-                                                               if (cs->vcalc == 0) // New calculation using 16:9
-                                                                       game->width = (4.0/3.0) * ((double)game->width * (4.0/3.0));
-                                                               else if (cs->vcalc == 1) // Older calculation 4:3 makes things wider
-                                                                       game->width = (4.0/3.0) * game->height;
-                                                               else // Custom calculation
-                                                                       game->width = cs->vcalc * ((double)game->width * (cs->vcalc));
-                                                               //game->keepaspect = 1;
+                                                       }
+                                               }
+                                               if ((game->orientation && !cs->morientation) || (!game->orientation &&  (cs->morientation == 1))) {
+                                                       if (cs->vcalc == 0.0) { // 3:4 Normal
+                                                               game->width = Normalize((double)game->width * (4.0/3.0) / (3.0/4.0), 8);
+                                                       } else if (cs->vcalc == 1.0) { // 3:3 Square
+                                                               game->width = Normalize((double)game->width * (4.0/3.0) / (3.0/3.0), 8);
+                                                       } else if (cs->vcalc == 2.0) { // 4:3 Stretch
+                                                               game->width = Normalize((double)game->width * (4.0/3.0) / (4.0/3.0), 8);
+                                                       } else if (cs->vcalc == 3.0) { // Old 3/4
+                                                               game->width = (4.0/3.0) * ((double)game->width * (4.0/3.0));
+                                                       } else if (cs->vcalc == 4.0) { // Older 3/4
+                                                               game->width = (4.0/3.0) * game->height;
+                                                       } else { // Custom
+                                                               game->width = cs->vcalc * ((double)game->width * (cs->vcalc));
                                                        }
                                                }
                                        } else {



When my connection speeds up, I will get new ISO images uploaded, with a lot of changes, my upload speed has been crap the last day, but guess it's fine since these changes that way can get into the ISO too.

I've uploaded new versions of switchres to test with this change, version 1.436-b901bb2.  Let me know if this works the way it's expected to, then can get new ISO's with all the changes recently made and this one.

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: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #865 on: February 08, 2011, 12:56:21 pm »
Oh thanks for doing that, that was the only missing feature I can imagine, I'll test it tonight.

Actually -screen_aspect should only be applied when virtualizing, so this could be removed, unless I'm wrong:

Code: [Select]
+               } else {
+                       if (cs->vcalc == 0) {
+                               mamearg[mameargc++] = "-screen_aspect";
+                               mamearg[mameargc++] = "3:4";
+                       } else if (cs->vcalc == 1) {
+                               mamearg[mameargc++] = "-screen_aspect";
+                               mamearg[mameargc++] = "3:3";
+                       } else if (cs->vcalc == 2) {
+                               mamearg[mameargc++] = "-screen_aspect";
+                               mamearg[mameargc++] = "4:3";
+                       }
                }

... as in the non-stretched mode the proper aspect is already achieved by the way we calculate the resolution (it was working ok already).

You can use a general formula instead of doing particular cases, by using vcalc at the beginning to define the quotient to apply. I like your idea of being able to pass a double, but you should treat it in the same way as the other quotients to keep coherence, so if one wants to pass an intermediate value between option 0 (3/4) and option 1 (3/3), say 5/6, you can pass it as the VerticalAspectRatio value:

Code: [Select]
game->width = Normalize((double)game->width * (4.0/3.0) / VerticalAspectRatio, 8);
The problem with passing a double is that you can't easily specify it as text <num:den> for the stretched case unless you write a function to do so.

In a way, your 3 and 4 options could be particular cases between the basic default/square/full options.

BTW, the (4.0/3.0) of the formula above accounts for the actual screen aspect of our monitor, so eventually that could also be modified to 16:9, 16:10, or other available aspect ratios (although the target of this is not to support flat screens it can be an option), and at least in theory the calculations should provide the proper proportions.

I think it's clearer to specify the ratios as the actual ones the game will show:
 --vcalc [0|1|2|3|4]     Method of calculating width on vertical games (0=3:4 1=3:3 2=4:3 ...)

« Last Edit: February 08, 2011, 01:02:08 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 of 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 #866 on: February 08, 2011, 01:52:09 pm »
Oh thanks for doing that, that was the only missing feature I can imagine, I'll test it tonight.

Actually -screen_aspect should only be applied when virtualizing, so this could be removed, unless I'm wrong:

Code: [Select]
+               } else {
+                       if (cs->vcalc == 0) {
+                               mamearg[mameargc++] = "-screen_aspect";
+                               mamearg[mameargc++] = "3:4";
+                       } else if (cs->vcalc == 1) {
+                               mamearg[mameargc++] = "-screen_aspect";
+                               mamearg[mameargc++] = "3:3";
+                       } else if (cs->vcalc == 2) {
+                               mamearg[mameargc++] = "-screen_aspect";
+                               mamearg[mameargc++] = "4:3";
+                       }
                }

... as in the non-stretched mode the proper aspect is already achieved by the way we calculate the resolution (it was working ok already).

You can use a general formula instead of doing particular cases, by using vcalc at the beginning to define the quotient to apply. I like your idea of being able to pass a double, but you should treat it in the same way as the other quotients to keep coherence, so if one wants to pass an intermediate value between option 0 (3/4) and option 1 (3/3), say 5/6, you can pass it as the VerticalAspectRatio value:

Code: [Select]
game->width = Normalize((double)game->width * (4.0/3.0) / VerticalAspectRatio, 8);
The problem with passing a double is that you can't easily specify it as text <num:den> for the stretched case unless you write a function to do so.

In a way, your 3 and 4 options could be particular cases between the basic default/square/full options.

BTW, the (4.0/3.0) of the formula above accounts for the actual screen aspect of our monitor, so eventually that could also be modified to 16:9, 16:10, or other available aspect ratios (although the target of this is not to support flat screens it can be an option), and at least in theory the calculations should provide the proper proportions.

I think it's clearer to specify the ratios as the actual ones the game will show:
 --vcalc [0|1|2|3|4]     Method of calculating width on vertical games (0=3:4 1=3:3 2=4:3 ...)



Ah cool, well that makes it easy :) and I think this makes the most sense:

  --aspect num:den        Method of calculating width on vertical games, default 4:3

Just throw away the --vcalc option and make it an easy aspect ratio value, so this patch instead.  I'll have to get new versions with this uploaded soon.  The old methods really aren't necessary from what I can tell because they are either wrong in calculations sometimes or the same as the new possible ones.  Also I think your right, don't need the extra aspect ratio for non-virtualized since the resolution itself should indicate that I am thinking.

Code: [Select]
diff --git a/src/SwitchResC/config.c b/src/SwitchResC/config.c
index 17df9ed..1c6fddb 100644
--- a/src/SwitchResC/config.c
+++ b/src/SwitchResC/config.c
@@ -96,8 +96,8 @@ int readConfig(ConfigSettings *cs, char *filename) {
                        sprintf(cs->emulator, "%s", tmp2);
                } else if (!strcmp(tmp, "vsync")) {
                        cs->vsync = atoi(tmp2);
-               } else if (!strcmp(tmp, "vcalc")) {
-                       cs->vcalc = atof(tmp2);
+               } else if (!strcmp(tmp, "aspect")) {
+                       sprintf(cs->aspect, "%s", tmp2);
                } else if (!strcmp(tmp, "mo")) {
                        cs->morientation = atoi(tmp2);
                } else if (!strcmp(tmp, "dcalign")) {
diff --git a/src/SwitchResC/switchres.c b/src/SwitchResC/switchres.c
index b3293b7..d76900a 100644
--- a/src/SwitchResC/switchres.c
+++ b/src/SwitchResC/switchres.c
@@ -84,6 +84,7 @@ int main(int argc, char **argv) {
        cs->vectorwidth  = 640;
        cs->vectorheight = 480;
        sprintf(cs->emulator, "%s", "mame");
+       sprintf(cs->aspect, "%s", "4:3");
        cs->is_mame = 1;
        cs->is_mess = 0;
        cs->version = 105;
@@ -222,14 +223,14 @@ int main(int argc, char **argv) {
                                                                "Error with -mo\n");
                                                        goto Game_Over;
                                                }
-                                       } else if (!strcmp(s, "vcalc")) {
+                                       } else if (!strcmp(s, "aspect")) {
                                                if ((i+1) < argc && *(s = argv[i+1]) != '-') {
-                                                       cs->vcalc = atof(s);
+                                                       sprintf(cs->aspect, "%s", s);
                                                        i++;
                                                } else {
                                                        usage();
                                                        sr_fprintf(stderr,
-                                                               "Error with -vcalc\n");
+                                                               "Error with -aspect\n");
                                                        goto Game_Over;
                                                }
                                        } else if (!strcmp(s, "dcalign")) {
@@ -681,9 +682,10 @@ int main(int argc, char **argv) {
 
                // Vertical oriented monitor
                if (cs->morientation == 1) {
-                       if (gameInfo.orientation == 1)
-                               mamearg[mameargc++] = "-norotate";
-                       else {
+                       if (gameInfo.orientation == 1) {
+                               mamearg[mameargc++] = "-rotate";
+                               mamearg[mameargc++] = "-autorol";
+                       } else {
                                mamearg[mameargc++] = "-rotate";
                                mamearg[mameargc++] = "-rol";
                        }
@@ -691,13 +693,26 @@ int main(int argc, char **argv) {
 
                // Vertical and Horizontal rotating monitor
                if (cs->morientation == 2) {
-                       if (gameInfo.orientation == 1)
-                               mamearg[mameargc++] = "-norotate";
-                       else
+                       if (gameInfo.orientation == 1) {
                                mamearg[mameargc++] = "-rotate";
+                               mamearg[mameargc++] = "-autorol";
+                       } else {
+                               mamearg[mameargc++] = "-rotate";
+                       }
                }
        }
 
+       if ((gameInfo.orientation && !cs->morientation) || (!gameInfo.orientation && (cs->morientation == 1))) {
+               if (monitorMode->ModeLine->result & RESULT_VIRTUALIZE)
+                       mamearg[mameargc++] = cs->aspect;
+               /*else
+                       mamearg[mameargc++] = cs->aspect;
+               */
+       }
+
+       if (gameInfo.keepaspect)
+               mamearg[mameargc++] = "-keepaspect";
+
        if (gameInfo.stretch) {
                if (cs->cleanstretch)
                        mamearg[mameargc++] = "-nocleanstretch";
@@ -710,20 +725,11 @@ int main(int argc, char **argv) {
 
                if (cs->changeres && !gameInfo.changeres)
                        mamearg[mameargc++] = "-nochangeres";
-
-               //mamearg[mameargc++] = "-screen_aspect";
-               //mamearg[mameargc++] = "4:3";
        } else {
                if (cs->cleanstretch)
                        mamearg[mameargc++] = "-nocleanstretch";
-
-               //mamearg[mameargc++] = "-screen_aspect";
-               //mamearg[mameargc++] = "16:9";
        }
 
-       if (gameInfo.keepaspect)
-               mamearg[mameargc++] = "-keepaspect";
-
        if (gameInfo.redraw) {
                mamearg[mameargc++] = "-redraw";
                mamearg[mameargc++] = "auto";
@@ -861,7 +867,7 @@ int usage(void) {
        fprintf(stderr, "  --novsync               Weight for x/y instead of vertical refresh\n");
        fprintf(stderr, "  --noswitchres           Don't switch resolutions, just use as wrapper to mame, best for LCD's\n");
        fprintf(stderr, "  --notriplebuffer        Use Mame option waitvsync instead of triple buffer (Windows)\n");
-       fprintf(stderr, "  --vcalc [0|1]           Method of calculating width on vertical games (0=16/9, 1=3/4)\n");
+       fprintf(stderr, "  --aspect num:den        Method of calculating width on vertical games, default 4:3\n");
        fprintf(stderr, "  --mo [0|1|2]            Monitor Orientation, 0=horizontal, 1=vertical, 2=both/rotateable\n");
        fprintf(stderr, "  --dcalign <HZ>          Align dotclock to Hz (Windows 10000 Linux 1000)\n");
        fprintf(stderr, "  --ff                    Frogger/Galaxian Hack is in mame executable\n");
diff --git a/src/SwitchResC/switchres.h b/src/SwitchResC/switchres.h
index efd6231..ebb769e 100644
--- a/src/SwitchResC/switchres.h
+++ b/src/SwitchResC/switchres.h
@@ -69,8 +69,8 @@ typedef struct ConfigSettings {
        int    always_throttle;
        int    xrandr;
        char   ROM[256];
-       double vcalc;
        int    morientation;
+       char   aspect[32];
        int    dcalign;
        int    threads;
        int    triplebuffer;
diff --git a/src/SwitchResC/xml.c b/src/SwitchResC/xml.c
index 7f7fb72..08d83ab 100644
--- a/src/SwitchResC/xml.c
+++ b/src/SwitchResC/xml.c
@@ -223,12 +223,6 @@ int ParseXML(xmlDocPtr xmlbuffer, GameInfo *game, ConfigSettings *cs) {
                                                        if (cs->morientation == 0) {
                                                                game->width = h;
                                                                game->height = w;
-                                                               if (cs->vcalc == 0) // New calculation using 16:9
-                                                                       game->width = (4.0/3.0) * ((double)game->width * (4.0/3.0));
-                                                               else if (cs->vcalc == 1) // Older calculation 4:3 makes things wider
-                                                                       game->width = (4.0/3.0) * game->height;
-                                                               else // Custom calculation
-                                                                       game->width = cs->vcalc * ((double)game->width * (cs->vcalc));
                                                        }
                                                        } else { // horizontal
                                                        game->orientation = 0;
@@ -237,15 +231,14 @@ int ParseXML(xmlDocPtr xmlbuffer, GameInfo *game, ConfigSettings *cs) {
                                                                        int h = game->height;
                                                                game->width = h;
                                                                game->height = w;
-                                                               if (cs->vcalc == 0) // New calculation using 16:9
-                                                                       game->width = (4.0/3.0) * ((double)game->width * (4.0/3.0));
-                                                               else if (cs->vcalc == 1) // Older calculation 4:3 makes things wider
-                                                                       game->width = (4.0/3.0) * game->height;
-                                                               else // Custom calculation
-                                                                       game->width = cs->vcalc * ((double)game->width * (cs->vcalc));
-                                                               //game->keepaspect = 1;
                                                        }
                                                }
+                                               if ((game->orientation && !cs->morientation) || (!game->orientation &&  (cs->morientation == 1))) {
+                                                       double num, den;
+                                                       sscanf(cs->aspect, "%lf:%lf", &den, &num);
+
+                                                       game->width = Normalize((double)game->width * (4.0/3.0) / (num/den), 8);
+                                               }
                                        } else {
                                                game->orientation = 0;
                                        }

Hopefully that all works as I suspect, and should hopefully allow anything to be done in regards to aspect and how a monitor is setup and a user wants to see things.
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: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #867 on: February 08, 2011, 02:04:28 pm »
Oh definitely that's the perfect way, so you can actually use the aspect you like as a <num:den> from the command line and actually use it for both virtualized and non stretched cases, great.
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

ves

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 225
  • Last login:April 11, 2020, 02:57:49 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #868 on: February 08, 2011, 05:27:00 pm »
Hi, I've tried the option - with options vcalc 0 1 2 3 4, but I really have worked well are 1 and 2, we lose the pixel perfect, but I prefer to play without pixel perfect in vertical games Since many of them as esprade, etc. .. mazinger to be so small and not very comfortable this way and whether, many thank you very much.

On the contrary I did not understand the other option (I have not tested this) is that of - aspect, it is not done automatically? Or is it to customize more? which is better?

Regarding the number of resolutions have the same game as is the issue?

Bithebity, you create something really awesome thanks for all this effort, but of course I could go without asking for anything else,) you could put your website on the date of creation links? so I find it easier to see if you have upgraded any link.


Thanks ..

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 #869 on: February 08, 2011, 05:47:14 pm »
Hi, I've tried the option - with options vcalc 0 1 2 3 4, but I really have worked well are 1 and 2, we lose the pixel perfect, but I prefer to play without pixel perfect in vertical games Since many of them as esprade, etc. .. mazinger to be so small and not very comfortable this way and whether, many thank you very much.

On the contrary I did not understand the other option (I have not tested this) is that of - aspect, it is not done automatically? Or is it to customize more? which is better?

Regarding the number of resolutions have the same game as is the issue?

Bithebity, you create something really awesome thanks for all this effort, but of course I could go without asking for anything else,) you could put your website on the date of creation links? so I find it easier to see if you have upgraded any link.


Thanks ..

Basically it's the same thing now but you have full control.  The old option '--vcalc 0' is now '--aspect 4:3', the old option --vcalc 1 is now --aspect 5:4 essentially, you can use --aspect 7:5, or --aspect 3:3.  This controls how the resolution is calculated for games which are vertical on a horizontal monitor or horizontal on a vertical monitor.  Then it also passes the switched around value like 3:4 in the first case (--vcalc 0) to the mame aspect parameter when things are virtualized. 

I just made the change in my php script to show the dates, sounds good :)

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 #870 on: February 08, 2011, 05:51:50 pm »
The new 32bit ISO is uploaded LiveCD32-Full-1.439-4a6ebaa.iso and the 64 bit one will be there in a few hours.

The changes are:
Quote
         - volume saved with OSS4 properly during install and for liveCD
         - Switchres uses --aspect num:den now for vertical game calculations
         - Fixed issues with switchres and vertical monitors, direction of rotation
           is now consistant.
         - Setup blanking for normal X Windows
         - Setup terminal not to blank, since it doesn't work on an arcade monitor
         - New xorg.sh script to create xorg.conf
         - Radeon 5xxx card support
         - Fixed bug with .bash_profile not getting created for arcade user
           if home directory wasn't separately mounted
         - Don't ask about formatting /data/ since figure it's an existing partition
         - Require all menu items to be entered before install is done
         - Better label for home partition as arcade users home
         - Remove wahcade config, user must create this on their own
         - Default font no longer forced from /home/arcade/fonts/, up to user to choose
         - Fvwm config changed to only have advmenu/wahcade/setup and xterm buttons
         - Updated Wahcade to 1.0pre and added default setup with switchres

So 5450 radeon cards work perfectly now, new wahcade version and setup easier for it if chosen, lots of bugs fixed

Also soon, in the next ISO, I should have AVGA 3000 card support so those will work perfectly in Linux (which now they do not if you actually try to use the Atom bios on them like KMS DRM does).
« Last Edit: February 08, 2011, 05:54:18 pm 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

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 arcade monitor modeline generator and mame wrapper
« Reply #871 on: February 09, 2011, 03:53:27 pm »
I'm testing LiveCD32-Full-1.439-4a6ebaa.iso, seems there's a problem with the new aspect option in Switchres, it's passing "-rotate 4:3", the "screen_aspect" option is missing, so Mame complains about unknown command "4:3".
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

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 #872 on: February 09, 2011, 04:00:50 pm »
I'm testing LiveCD32-Full-1.439-4a6ebaa.iso, seems there's a problem with the new aspect option in Switchres, it's passing "-rotate 4:3", the "screen_aspect" option is missing, so Mame complains about unknown command "4:3".

Yep, here's my bug:
Code: [Select]
diff --git a/src/SwitchResC/switchres.c b/src/SwitchResC/switchres.c
index d76900a..97023f5 100644
--- a/src/SwitchResC/switchres.c
+++ b/src/SwitchResC/switchres.c
@@ -703,8 +703,10 @@ int main(int argc, char **argv) {
        }
 
        if ((gameInfo.orientation && !cs->morientation) || (!gameInfo.orientation && (cs->morientation == 1))) {
-               if (monitorMode->ModeLine->result & RESULT_VIRTUALIZE)
+               if (monitorMode->ModeLine->result & RESULT_VIRTUALIZE) {
+                       mamearg[mameargc++] = "-screen_aspect";
                        mamearg[mameargc++] = cs->aspect;
+               }
                /*else
                        mamearg[mameargc++] = cs->aspect;
                */

I'll have to fix that, in editing I totally messed that up :)
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 #873 on: February 09, 2011, 04:39:31 pm »
I'll have some new ISO's up by later tonight that fix that aspect ratio command line bug.

Also the next ISO will work with the ArcadeVGA 3000 finally, I figured it mostly out and so now it'll be able to do the mode switching properly and users of that card will be able to enjoy Linux and Switchres on them too.  There's some issues with trying to run horizontal frequencies between 18khz -> 22 or something on a d9800 though, but any normal arcade monitor in fixed ranges should be just fine.  It only affects a few games on my d9800, I'm still trying to figure it out, something to do with PLL dividers probably being a bit off.
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: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #874 on: February 09, 2011, 04:57:06 pm »
That's great, the ArcadeVGA 3000 support will make a lot of people decide to test this Linux livecd probably.
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

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 #875 on: February 09, 2011, 05:01:42 pm »
That's great, the ArcadeVGA 3000 support will make a lot of people decide to test this Linux livecd probably.

Yeah it's cool to be able to boot up and see the grub menu at 15khz and yet it'll go into Linux and run fine with 15khz there too now.  Also can use either interface at 15khz now too, but of course only the VGA one boots right at 15khz.

One oddity though, this card thinks it has two DVI ports, it calls the VGA one a DVI one actually.  Plus the DVI/VGA port is actually interface DVI-2, kinda odd, opposite of what it's saying in Windows.  So the grub boot line will need to use DVI-2 and the xorg.conf will need to reference that DVI-2 port to connect it up to the right Monitor.  I'll have to work out the config setup to adjust for that.
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 #876 on: February 09, 2011, 11:59:57 pm »
The 32bit ISO for version 1.443-ced8096 has uploaded, 64 bit one should be there by tomorrow.


09022011 - Fix bug in switchres command line with aspect option in stretched modes
         - Added fixes for ArcadeVGA 3000 cards so they work in Linux now
         - Grub menu improved, now first menu option should work in most cases
         - Improved xorg.conf creater script xorg.sh

This version has a new grub menu list, first option most likely will work with most setups now for any VGA/DVI interface.  Might need to pick specific ones if you have J-Pac or NTSC/PAL outputs. 
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

ves

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 225
  • Last login:April 11, 2020, 02:57:49 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #877 on: February 10, 2011, 04:35:23 pm »
Hi bitbytebit, I tried the new version but I have to say 15Hz cga monitor options do not work, I tried to AVGA 9250 and an ATI x1300 PCI Express and no way in ati driver loaded into the kernel at principle of image display everything stops, but with the ati x1300 I've tried the option to SVGA and LCD monitor and if it looks when all the boot.


Thanks. :lol
« Last Edit: February 10, 2011, 04:40:17 pm by ves »

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 #878 on: February 10, 2011, 04:40:42 pm »
Hi bit, I tried the new version but I have to say 15Hz cga monitor options do not work, I tried to AVGA 9250 and an ATI x1300 PCI Express (I recorcar) and no way in ati driver loaded into the kernel at principle of image display everything stops, but with the ati x1300 I've tried the option to SVGA and LCD monitor and if it looks when all the boot.


Thanks.

Did you try the J-Pac option and the first generic option?  The first option probably won't work for J-Pac I am guessing, it doesn't force the output enabled, but the J-Pac option for DVI or VGA should do that and is still just like the old first one was before.
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

ves

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 225
  • Last login:April 11, 2020, 02:57:49 am
Re: Switchres arcade monitor modeline generator and mame wrapper
« Reply #879 on: February 10, 2011, 04:44:17 pm »
Hi I have no j-pac, but may be worth anyway?