The NEW Build Your Own Arcade Controls

Software Support => GroovyMAME => Topic started by: Monkee on March 02, 2014, 06:55:38 am

Title: CRT_Emudriver + Retroarch
Post by: Monkee on March 02, 2014, 06:55:38 am
Hi guys, I was looking into Retroarch and it seems that it accepts custom resolution and refresh. This will induce that we can use bsnes, mednafen or Nestopia in Pixel Perfect!
They are the best emulators for the Snes, PCE and Nes so far and it could be really amazing to finally have them with the proper resolutions!

Does anyone tried to use Retroarch in combination with CRT_emudriver and succeeded in doing so?

Thanks a lot.
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on March 07, 2014, 07:12:12 am
I got some infos from the Retroarch team and they don't have any CRT so they are not interested in multi-modelines per system.
So the best you can do so far is to choose one custom modeline/resolution per system...  :'(

What a pity, all the best console emulators packed inside one and we cannot profit from it in pixel perfect. :cry:
Title: Re: CRT_Emudriver + Retroarch
Post by: tisurame on March 07, 2014, 01:36:56 pm
Which Retroarch version are you using? The last version crashes on startup on Windows XP 64-bits.
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on March 07, 2014, 01:46:29 pm
Which Retroarch version are you using? The last version crashes on startup on Windows XP 64-bits.
I'm using the version 20131013.
Title: Re: CRT_Emudriver + Retroarch
Post by: Calamity on March 08, 2014, 05:33:01 am
Hi Monkee,

I got some infos from the Retroarch team and they don't have any CRT so they are not interested in multi-modelines per system.
So the best you can do so far is to choose one custom modeline/resolution per system...  :'(

What a pity, all the best console emulators packed inside one and we cannot profit from it in pixel perfect. :cry:

It is not the end of the world.

Not only they're not interested in CRT users, it's worse than that. One of the RetroArch devs is well known in 4chan /vr/ for referring to the CRT enthusiasts as a "bunch of retards". I'm sure I will regret bringing that sh*t here, but just for the record, you can check this: http://archive.foolz.us/vr/thread/1091384/ (http://archive.foolz.us/vr/thread/1091384/)

(before you ask, I swear I was never involved in that thread, just found it weeks later in one of my "google sessions").
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on March 08, 2014, 06:39:53 am
Hi Calamity,

I see.  ;)
Does someone maybe know where to get infos or a list of console emulators that support automatic resolution switching? Because Groovyume is awesome but the mess cores are still not up to the best "single console emulators".
For example, I only succeeded in getting the automatic resolution switching with Zsnes or Mess for the Snes and it's clearly not as accurate and compatible compared to Snes9x or Bsnes...
Title: Re: CRT_Emudriver + Retroarch
Post by: ID4 on March 20, 2014, 03:06:08 pm
Hi Monkee,

I got some infos from the Retroarch team and they don't have any CRT so they are not interested in multi-modelines per system.
So the best you can do so far is to choose one custom modeline/resolution per system...  :'(

What a pity, all the best console emulators packed inside one and we cannot profit from it in pixel perfect. :cry:

It is not the end of the world.

Not only they're not interested in CRT users, it's worse than that. One of the RetroArch devs is well known in 4chan /vr/ for referring to the CRT enthusiasts as a "bunch of retards". I'm sure I will regret bringing that sh*t here, but just for the record, you can check this: http://archive.foolz.us/vr/thread/1091384/ (http://archive.foolz.us/vr/thread/1091384/)

(before you ask, I swear I was never involved in that thread, just found it weeks later in one of my "google sessions").

Lo siento Calamity pero no puedo aguantarme ... "bunch of retards"? ese tio es un jilipollas de PRO, ni me molesto en probar su emulador.

Para SNES yo uso snes9x, y para nes el vnes y con ambos puedo usar los modelines correctos, asi que ...
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on March 20, 2014, 03:18:54 pm
How do you get proper modelines with snes9x ID4? I'm seriously interested.  :D
Title: Re: CRT_Emudriver + Retroarch
Post by: cyb on March 21, 2014, 02:59:30 am
I just used 1280x240 resolution in retroarch and adjust the aspect ratio accordingly. It works surprisingly well for most systems.

don't believe me? here's a (bad) pic of castlevania chronicles on mednafenpsx in retroarch.

http://imgur.com/2XsBfpI (http://imgur.com/2XsBfpI)
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on March 21, 2014, 07:32:22 am
I just used 1280x240 resolution in retroarch and adjust the aspect ratio accordingly. It works surprisingly well for most systems.
I do believe you Cyb, as long as the vertical resolution is 240 it's fine (works like the magic modelines it seems to me) but some games are in another vertical resolution and then it's screwed (and it's the same with the different refresh).

For example the Super Famicom can output 256x224@60; 256x239@50; 512x478@25 and 512x448@30 depending on the game...
Title: Re: CRT_Emudriver + Retroarch
Post by: Calamity on March 21, 2014, 09:08:30 am
Magic modelines are a different thing, the 1234x value is actually a dummy number, the modeline is updated with a genuine resolution like 320x224 or 512x224 or whatever. So in general this is meant for integer scaling.

On the other hand, using an ultrawide resolution is a different approach. What you do is to apply fractional scaling on the x-axis and integer scaling on the y-axis. With GroovyMAME you can do this by using -cleanstretch 2. We call this "super" resolutions to differentiate from "magic" resolutions. But the idea is that: using an ultrawide resolution so you can't notice the horizontal fractional scaling, relying on the intrinsic blurriness of CRTs. We use this approach for Mednafen in Groovy Arcade too.

As long as the y-axis is kept with integer scaling, there's no problem to use 240p for all lower modes (224, 239p). Of course if a game decides to switch from 224p to 448i you're screwed.
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on March 21, 2014, 09:26:35 am
Thanks for the clarification Calamity.

Is there any visual difference between magic and super resolutions on high-quality CRTs?

So then it seems that we can use emulators with only-one-custom-modeline-possibility (like mednafen and retroarch) as long as the game doesn't change it's resolution in-game, right?

What about the refresh rate though? Do you set it at 60 for all games under Mednafen (whereas it seems that some games runs at 59.922743)?

Also how do you handle systems with low (240p) and higher modes (480i or p) games?

Sorry I'm a bit lost with this thing...
Title: Re: CRT_Emudriver + Retroarch
Post by: cools on March 21, 2014, 11:40:07 am
Even on high end CRTs super resolutions will work. When I was messing around with Groovy and originally requested the new cleanstretch ability I was inadvertently using super resolutions and couldn't see the difference. I've tried subsequently on non-arcade CRTs and they work flawlessly.

Best method is to bug the emulator authors to add resolution switching in.
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on March 21, 2014, 12:45:32 pm
Best method is to bug the emulator authors to add resolution switching in.
I tried for both Retroarch et Mednafen but they doesn't seem that interested... I need your support! Let's all bug them together!  ;D
Title: Re: CRT_Emudriver + Retroarch
Post by: cools on March 22, 2014, 06:21:06 am
Then use MESS/UME and bug report issues :)

I'm hardly surprised that those who repackage existing code aren't interested in its accuracy.
Title: Re: CRT_Emudriver + Retroarch
Post by: sean_sk on March 22, 2014, 10:26:27 am
My sincere apologies for going off topic here:

But I had a look at that thread linked in Calamity's post and that Retroarch dev is one scary dude.

All I can say is YIKES!! And that I am super glad to be following Groovymame. That other thread well contrasted how awesomely helpful and an all-round genuinely nice guy Calamity is.
Title: Re: CRT_Emudriver + Retroarch
Post by: cools on April 09, 2014, 08:52:59 am
It gets better. http://mamedev.emulab.it/haze/2014/04/07/ume-0-153/#comments (http://mamedev.emulab.it/haze/2014/04/07/ume-0-153/#comments)
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on April 09, 2014, 04:22:04 pm
It gets better! (http://www.libretro.com/index.php/retroarch-and-240p/#disqus_thread)
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on April 11, 2014, 07:04:45 pm
Calamity, which modeline are you using for Mednafen under Groovy Arcade? I'd like to try under Windows.

Also I guess, when using ultrawide resolutions, I have to deactivate the full screen, right?
Title: Re: CRT_Emudriver + Retroarch
Post by: Calamity on April 13, 2014, 12:29:59 pm
I'd say it was 1280x224. I don't remember exactly but you this resolution allowed integer scaling on full screen, for Megadrive at least.

Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on April 13, 2014, 12:32:33 pm
Thanks Calamity.
I thought 240p was good for all the sub 240p modes though? Why using 224p with this one?
Title: Re: CRT_Emudriver + Retroarch
Post by: Calamity on April 13, 2014, 01:10:08 pm
Thanks Calamity.
I thought 240p was good for all the sub 240p modes though? Why using 224p with this one?

Because you need to have stretch-to-full-screen or whatever its name to mimic resolution switching for these console (256x, 320x, 640x -> 1280 (integer multiple). But as the height is 224p, if you use 240p then you'll get fractional stretching on the y axis and will look horrible.
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on April 13, 2014, 02:55:47 pm
Ok I get it.
What do you do though for systems who uses both 224 and 240p like the Snes, N64 or PSX?
Title: Re: CRT_Emudriver + Retroarch
Post by: Calamity on April 13, 2014, 03:48:25 pm
You need to use 240p and find a way to enable integer scaling in the vertical and fractional on the horizontal. As far as I remember Mednafen had not such a setting. Retroarch should have it.

With GroovyUME this is done by -cleastretch 2.



Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on April 13, 2014, 03:56:12 pm
Thanks again Calamity.

One last question concerning Groovymame, in a standard 15khz setup it seems that if I use 240p minimum for the YresMin_XML value (to follow your recommendation), I don't have the right resolution with 224p games... Do you know what could have gone wrong?

Here are the Mamemain et VMmaker.ini I'm using (I decided to not use the magic modelines but to create a list of the modelines I needed with Romcenter)
https://mega.co.nz/#!7lQFHYrR!PuiZqNFs3dZCADAN0rZHJYVyMH049SGGlFqU6m0dTQo (https://mega.co.nz/#!7lQFHYrR!PuiZqNFs3dZCADAN0rZHJYVyMH049SGGlFqU6m0dTQo)
Title: Re: CRT_Emudriver + Retroarch
Post by: Calamity on April 13, 2014, 04:57:12 pm
GroovyMAME will pick 240p but will use 224 lines, leaving black borders up and down as required, so although you see 240p being reported in the ui it's actually rendering the native resolution, as it becomes obvious when you see the picture.
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on April 14, 2014, 12:17:31 pm
Thanks Calamity, I'll try again, play and see the result.  ;)
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on April 16, 2014, 02:46:53 pm
Then use MESS/UME and bug report issues :)
I'd love to but the PSX and N64 core of MESS (just to take an example) are just not working at all with commercial games!

We cannot deny that Retroarch has incorporated all the best of the consoles emulators up to the 64bit era (so until the end of the 15khz)!

Now one of the devs has a PC CRT so things are getting really better but due to the fact it's a 31khz CRT, there is no chance for resolution switching on the fly because he doesn't need it and that's the only thing missing that we need for it to be perfect for us...

The result is that if today you want to use the most accurate consoles emulators of the 15khz era, you cannot get a perfect result on a 15khz screen!

So the question is: When we'll we have a GroovyArch?  ;D ;D ;D
Title: Re: CRT_Emudriver + Retroarch
Post by: cools on April 16, 2014, 04:44:25 pm
Accurate != working.

RetroArch is an abomination IMO, but let's avoid that discussion. The code for SwitchRes is available, get the devs to incorporate it into their frontend if you can.
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on April 16, 2014, 06:48:27 pm
Accurate != working.
That's what I'm also talking about. I'm all about accuracy and so far those cores: Bsnes, Nestopia, GenesisPlusGX, Mednafen PC-engine and Mednafen PSX are the most accurate ones available for those systems (way above Mess for most of them, see here (http://nonmess.retrogames.com/)). Where can you get them all packaged? RetroArch.

I'm not here to promote anything and I share your desire for a Mess-rule-them-all, but for the moment it's not the case at all and I'm sad that the most accurate emulators out there for those systems are not entirely compatibles with 15khz screens.

If I'm talking about RetroArch, it's mainly because it has all of them packaged so it should be easier to get the all package CRT-friendly done once and for all.

The code for SwitchRes is available, get the devs to incorporate it into their frontend if you can.
Great idea. I'm doing that.
Title: Re: CRT_Emudriver + Retroarch
Post by: sean_sk on April 16, 2014, 11:40:35 pm
RetroArch is an abomination IMO, but let's avoid that discussion.

Shhh quiet dude. You'll bring the wrath of a certain abusive Retroarch dev upon us all if you're not careful. :)
Title: Re: CRT_Emudriver + Retroarch
Post by: Yeltsew7 on April 17, 2014, 06:25:49 pm
No, he won't come here.  He's too busy yelling at people on /vr/.
Title: Re: CRT_Emudriver + Retroarch
Post by: Haze on April 18, 2014, 11:42:14 am
No, he won't come here.  He's too busy yelling at people on /vr/.

If you say Driverman enough times....

(different lunatic, but lunatic all the same, and fans/developers of the project seem to like resorting to multiple names in the same conversation just to make it look like there are more of them)

Title: Re: CRT_Emudriver + Retroarch
Post by: Yeltsew7 on April 18, 2014, 12:44:07 pm
Driverman VROOM VROOM

(http://static6.depositphotos.com/1070259/646/v/950/depositphotos_6463209-Driver-man-in-silver-car.jpg)
Title: Re: CRT_Emudriver + Retroarch
Post by: sean_sk on April 18, 2014, 07:47:15 pm
Haze.

I read the thread posted by Cools here and I have to say mate, I admired your restraint. It wouldn't have been easy.
You were provoked, pushed and abused and I liked the way you explained your stance on certain issues and why you do things. You came out of it looking like the more rational individual here.
Keep up the good work on your projects dude.
Title: Re: CRT_Emudriver + Retroarch
Post by: SyrianJoe on April 27, 2014, 01:24:15 am
To answer the question, no RA does not work with CRT_emudriver.

RA does have several options for CRT monitor users. For instance try this:

http://emulation.gametechwiki.com/index.php/Display_FAQ#240p.2F480i_Emulation_on_a_CRT_Monitor (http://emulation.gametechwiki.com/index.php/Display_FAQ#240p.2F480i_Emulation_on_a_CRT_Monitor)
Title: Re: CRT_Emudriver + Retroarch
Post by: bulbousbeard on April 27, 2014, 09:43:35 am
Doesn't RetroArch force everything to 60hz? That right there kind of makes it useless, because almost no hardware actually ran at 60hz. You're starting off inaccurate. The SNES, for example, runs at like 60.0984hz. The RetroArch developers don't really care about running games properly.

Personally, I'd rather stick with GroovyUME and just wait it out. It's true that MESS's SNES emulation isn't as good as BSNES's, and it's true that its Genesis emulation isn't the best (although it does run a lot of games just as well as any emulator), but it's improving basically every week. It won't be long before MESS emulates all these systems just as well as any of the standalones. Also, the sacrifices you have to make to basic emulator quality to use a standalone emulator just aren't worth it. Any standalone emulator you use is going to have more input lag than GroovyMAME with framedelay, and there's a high likelihood that it'll run like crap on a CRT (if it works at all).

Standalone emulators don't have any real staying power, because they tend to be developed by only one person, and they eventually get abandoned/outdated, and MAME/MESS will just keep plugging along.

In 2014, who uses Callus instead of MAME? I remember in 1999 when people on IRC told me that MAME was garbage for playing Neo Geo games and that we'd always be using NeoRageX. See what I mean?

Title: Re: CRT_Emudriver + Retroarch
Post by: Calamity on April 27, 2014, 11:55:32 am
To answer the question, no RA does not work with CRT_emudriver.

Well, sure it works.

RA does have several options for CRT monitor users. For instance try this:

http://emulation.gametechwiki.com/index.php/Display_FAQ#240p.2F480i_Emulation_on_a_CRT_Monitor (http://emulation.gametechwiki.com/index.php/Display_FAQ#240p.2F480i_Emulation_on_a_CRT_Monitor)

That solution is specific for 31 kHz CRTs. Superwide modes do work for 15 kHz too, but here you need genuine video mode switching in order to change from progressive to interlaced scan.

I gather that you need to create many variants of these resolutions at different refresh rates, to cover the spectrum of vertical refresh rates required for emulation, and assign them manually to each game target.

BTW how do you guys get smooth scrolling with RA? I'm trying here on my laptop with gpu hard sync, either d3d9 or gl, and I can't seem to get even Capcom games (59.63 vs 60 Hz) to scroll smoothly, using Street Fighter Alpha 3 scrolling text for testing.

Title: Re: CRT_Emudriver + Retroarch
Post by: SyrianJoe on April 29, 2014, 06:13:31 am
Doesn't RetroArch force everything to 60hz? That right there kind of makes it useless, because almost no hardware actually ran at 60hz. You're starting off inaccurate. The SNES, for example, runs at like 60.0984hz. The RetroArch developers don't really care about running games properly.

RA runs at whatever Hz your display does. You can set a custom resolution and refresh rate, so you can put whatever you want. Also, I'm not sure if the difference between 60hz and 60.0984hz is noticeable by humans. It is only a 0.164 % difference. I would like to see double blind tests to determine if humans can see the difference.

Quote
Also, the sacrifices you have to make to basic emulator quality to use a standalone emulator just aren't worth it. Any standalone emulator you use is going to have more input lag than GroovyMAME with framedelay, and there's a high likelihood that it'll run like crap on a CRT (if it works at all).

http://emulation.gametechwiki.com/index.php/Input_lag (http://emulation.gametechwiki.com/index.php/Input_lag)

Well, there's KMS mode in Linux. Combined with a wired controller, CRT monitor it should give about as low input lag as you can get with an emulation setup. I do not know how it compares to GroovyMame, but it may be equivalent without having to use special equipment and setup that GroovyMame requires. I have not tried any of this myself mind you, as I'm just a lazy Win7 user. I'm just posting what I've read elsewhere.

Quote
BTW how do you guys get smooth scrolling with RA? I'm trying here on my laptop with gpu hard sync, either d3d9 or gl, and I can't seem to get even Capcom games (59.63 vs 60 Hz) to scroll smoothly, using Street Fighter Alpha 3 scrolling text for testing.

Are you using the LCD screen of your laptop or something else? If your laptop display, then welcome to LCDs. Motion and smooth scrolling should be mostly upto your display. You should connect it to a CRT monitor. There is also the option of a 120hz monitor with blackframe insertion. RA has that option in video options I believe. Have not tried it.

My scrolling test btw is Super Mario All-Stars game selection screen.
Title: Re: CRT_Emudriver + Retroarch
Post by: Yeltsew7 on April 29, 2014, 07:47:02 am
I think the smooth scrolling deal is kind of a matter of your monitor.  On my laptop, I get screen splitting all the time.  I plugged it into my friends Samsung monitor and it didn't look as bad.  I don't have a working 31Khz monitor, so I can't test anything on that.
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on May 22, 2014, 05:19:54 pm
I got an answer from the RetroArch devs about the idea of making RA Switchres-friendly and they seem interested!
They'd like to know more so I sent you a PM Calamity (and of course one to bitbytebit too) but in case your message box is full and you don't receive it, let me know.  ;)
Title: Re: CRT_Emudriver + Retroarch
Post by: Calamity on May 24, 2014, 10:04:25 am
Hi Monkee,

I'll bring the post here:

Quote
Postby hunterk » Wed May 21, 2014 7:33 pm

Just an update and some questions about switchres. I've been talking with maister about this and while I don't think it's feasible to incorporate SwitchRes' code and functionality directly, we might be able to smooth using it with RetroArch.

SwitchRes has a standalone utility that can be used to generate modelines that are native to a game yet safe for your monitor, correct? Can this utility be used in a batch mode? That would allow users to set up all of their modelines ahead of time (in xorg.conf and/or EDID, for example) and then RetroArch could set fullscreen resolution based on those modes (particularly when running in KMS mode).

Approaching from another angle, I see that SwitchRes standalone has a commandline option for --emulator where you can specify emulators other than MAME for it to work with. What other emulators are supported by this? What would RetroArch need to expose to be supported in this way?

I think that for the specific task you're requesting this feature (basically being able to perform resolution switching within a game for PSX and such platforms) there's really no point in incorporating SwitchRes into RetroArch. As Hunterk is explaining it is a better idea to just assume that the modelines are already available to RetroArch in the first place.

So let's consider the scenario where you have properly configured a system with two modelines such as 2560x240@60 and 2560x480i@60 (which is trivial to achieve in both Windows & Linux).

What you want the emulator to do is to be able to dynamically switch between both modelines, depending on the vertical resolution requested by the emulated hardware.

Without having the minimal knowledge of the internal details of RA, dynamic resolution switching may involve some refactoring of the DirectX full screen implementation. Basically you need to destroy the current device and create it again with the new resolution, with all the additional caution required if you're running several threads for the video.

You also need to implement some logic for best mode picking, in case it's not already included. This logic could operate on the whole mode list returned by the OS, or simply on an user defined mode list. I believe that like most emulators, RA only allows to specify a single resolution for full screen mode, by using the video_fullscreen_x & video_fullscreen_y options, so specifying an user mode list would involve implementing an array of these options.

A solution for not implementing that array would be using "resolution masks", like this:

video_fullscreen_x = 2560
video_fullscreen_y = 0

Here "0" would be used like a wildcard. If "0" is already used to indicate the desktop resolution, another value could be used ("1", or whatever).

Then, when the emulator detects a resolution switch request, it would decide which from the list of 2560x resolutions better fits the requested height.

As a note: a proper full screen configuration for any emulator should contain 3 values, not 2:

video_fullscreen_x = ?
video_fullscreen_y = ?
video_fullscreen_refresh = ?

That's the only way to unambiguously target a certain video mode in the Windows OS.

Finally, answering Hunterk's question, SwitchRes supports any emulator provided it takes command line options, it just launches the emulator with the specified options and performs a mode switch previously if specified, this is useful for emulators that are only capable of running at the desktop resolution. My understanding is that if the above or something similar was implemented then launching the games with SwitchRes wouldn't be necessary.




Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on May 24, 2014, 01:56:12 pm
Thanks a lot Calamity, I transferred your recommendations to Hunterk, they are working on it now! :)
Title: Re: CRT_Emudriver + Retroarch
Post by: Monkee on September 13, 2014, 10:10:18 am
Hi guys, I have a bad news for those who like Retroarch but play on 15khz CRT.

hunterk, the dev who wanted to help us said that implementing resolution masks support (or something similar) is out of his skillset.  :'(
BUT he's still willing to make it happen and if anyone has skills in this matter and would like to get involved, he would point them in the right direction and give his help.

Here is the thread in question: HERE (http://www.libretro.com/forums/viewtopic.php?f=25&t=1536&start=25).
Who wants to be our hero?  ;)
Title: Re: CRT_Emudriver + Retroarch
Post by: webodan on November 29, 2015, 11:55:13 am
Sorry for necroposting, but I'd like to give an update on this topic;

As of now, I'd say that RetroArch, with a cfg for each of its emulated systems, is pixel perfect in 15Khz, since you can set a custom resolution and aspect ratio in each cfg using video_fullscreen_x and video_fullscreen_y with your desired resolution and the emulator will switch upon loading that cfg, then you go to Settings - Video - Aspect ratio and you set the resolution there as well.

I have tested with Master System and Genesis games with a cfg for each system, using Genesis Plus GX, and one cfg with 320x224 for Genesis, then one in 256x192 for Master System, and for what I see it's perfectly smooth, pixel perfect, syncs better to my screens than Kega, FreezeSMS or Meka due to RetroArch syncing to the exact refresh rate of the modeline.

Using RetroArch 1.2.2 with nightly cores, in Windows 7 x64. Try it! I wouldn't go back, honestly.
Title: Re: CRT_Emudriver + Retroarch
Post by: kortina on December 09, 2015, 07:11:34 am
I am new to RetroArch

I have just got my 15kHz setup working.

I have the 1.2.2 Stable release, and the Nightly core "genesis_plus_gx_libretro.dll"

I have modified the cfg file, but I cant get it to switch...

I am using the CRT Emu drivers and have Groovymame running perfect.

Could you put together the super simple steps?

Would it matter if I am attempting the changes from a 1024x768 display? I figured it should just say out of range, then plugin the 15kHz.
Title: Re: CRT_Emudriver + Retroarch
Post by: kortina on December 09, 2015, 06:02:30 pm
I found this: https://gist.github.com/Monroe88/dbd3e01252afa5c50690

I will test out the following later tonight (for Sega Genesis/Megadrive):

video_fullscreen_x = "2560" (because I am using 'Super resolutions')
video_fullscreen_y = "224"   (because the Genesis is 320x224)
video_refresh_rate = "60.0"  (because Genesis was 60hz NTSC)
video_aspect_ratio = "8.0"   (because video_fullscreen_x is 2560 and we want to divide it by 8 to get to 320... either that or try 11.42 to get it to divide by 224)

video_windowed_fullscreen = false   (this is what I was doing wrong... # Must be set to false for video_fullscreen_x and video_fullscreen_y to be used. )

video_black_frame_insertion = "false"   (this is false because I am using a 15kHz setup @60, this would be for the 31kHz guys running @120Hz)

Will let you all know how it goes.

Code: [Select]
# Fullscreen resolution. Resolution of 0 uses the resolution of the desktop.
6 # Note, you must create the modeline in your OS video driver settings for this to work.
7 video_fullscreen_x = "3840"
8 video_fullscreen_y = "480"
9
 
10 # Refresh rate of the resolution mode.
11 # As of git revision 4afbd068, this is used to set the video mode refresh rate on Windows.
12 # If using black frame insertion, set this to 1/2 of the actual display refresh rate.
13 video_refresh_rate = "60.0"
14
 
15 # A floating point value for video aspect ratio (width / height) used when aspect_ratio_index is 19 (Config)
16 # If this is not set, aspect ratio is assumed to be automatic.
17 # If using a superwide CRT resolution, set this to (video_fullscreen_x / video_fullscreen_y)
18 video_aspect_ratio = "8.0"
19
 
20 # Index of the aspect ratio selection in the menu.
21 # 19 = Config, 20 = 1:1 PAR, 21 = Core Provided, 22 = Custom Viewport
22 aspect_ratio_index = "19"
23
 
24 # Which monitor to prefer. 0 (default) means no particular monitor is preferred, 1 and up (1 being first monitor),
25 # suggests RetroArch to use that particular monitor.
26 video_monitor_index = "0"
27
 
28 # Start in fullscreen. Can be changed at runtime.
29 video_fullscreen = "true"
30
 
31 # If fullscreen, prefer using a windowed fullscreen mode.
32 # Must be set to false for video_fullscreen_x and video_fullscreen_y to be used.
33 video_windowed_fullscreen = false
34
 
35 # Inserts a black frame in between frames.
36 # Useful for 120 Hz monitors who want to play 60 Hz material with eliminated ghosting.
37 # video_refresh_rate should still be configured as if it is a 60 Hz monitor (divide refresh rate by 2).
38 # The video mode selected will have a refresh rate of twice the value of video_refresh_rate when this is set to true.
39 video_black_frame_insertion = "false"
40
 
41 # Interval at which a Vsync swap is performed.
42 # 1 is normal, 2 is doubled frames, 3 is tripled frames, etc.
43 video_swap_interval = "1"
44
 
45 # Custom viewport dimensions that are used if aspect_ratio_index is 22 (Custom Viewport)
46 custom_viewport_width = "3840"
47 custom_viewport_height = "448"
48
 
49 # Custom viewport offsets used for defining the position of the viewport.
50 # These are ignored if video_scale_integer is true, it will automatically be centered.
51 custom_viewport_x = "0"
52 custom_viewport_y = "0"
53
 
54 # Only scales video in integer steps.
55 # The base size depends on system-reported geometry and aspect ratio.
56 # Automatically centers custom viewports as well
57 video_scale_integer = "true"
58
 
59 # Allows libretro cores to set rotation modes.
60 # Setting this to false will honor, but ignore this request.
61 # This is useful for vertically oriented content where one manually rotates the monitor.
62 video_allow_rotate = "true"
63
 
64 # Forces a certain rotation of the screen.
65 # The rotation is added to rotations which the libretro core sets (see video_allow_rotate).
66 # The angle is <value> * 90 degrees counter-clockwise.
67 video_rotation = "0"
68
 
69 # Path to shader. Shader can be either Cg, CGP (Cg preset) or GLSL, GLSLP (GLSL preset)
70 # Recommended to set this to point to [config_filename].cgp, so it will simply load your working shader preset for this config so you can easily save changes to your shader even if config_save_on_exit is false.
71 #video_shader = ":\shaders\cgp\tvout+interlacing\tvout+interlacing.cgp"
72 video_shader = ":\shaders\480p.cgp"
73
 
74 # CPU-based video filter. Path to a dynamic library.
75 video_filter = ""
76
 
77 # Load video_shader on startup.
78 # Other shaders can still be loaded later in runtime.
79 video_shader_enable = "true"
80
 
81 # Video vsync.
82 video_vsync = "true"


Title: Re: CRT_Emudriver + Retroarch
Post by: kortina on December 15, 2015, 05:05:17 am
I ended up with these key settings:

video_aspect_ratio = "11.420000"
video_aspect_ratio_auto = "false"
video_windowed_fullscreen = "false"
video_fullscreen = "true"
video_refresh_rate = "60.000000"
video_monitor_index = "0"
video_fullscreen_x = "2560"
video_fullscreen_y = "224"
video_vsync = "true"
aspect_ratio_index = "19"


The result is a great smooth scrolling system. I am fairly sure that I have hit the perfect 1:1 pixel map!
Title: Re: CRT_Emudriver + Retroarch
Post by: emubastard on December 23, 2015, 01:10:29 am
I added

video_smooth = "false"

This disabled bilinear filtering.  This made the image MUCH sharper.
Title: Re: CRT_Emudriver + Retroarch
Post by: R-Typer on December 31, 2015, 03:06:32 am
Please, can you post settings for NES and SNES as well?

Thank you very much.
Title: Re: CRT_Emudriver + Retroarch
Post by: R-Typer on January 10, 2016, 09:48:31 am
Hi!

I have problems with Retroarch switching to fullscreen. I used settings Kortina posted in combination with Monroe88's fullscreen CRT template.cfg.

When I start the Retroarch I get the problem shown in picture screenshot, which is attached to this message.

But, when I go to ArcadeOSD and select my desktop resolution to 2560x224 and then start Retroarch, then everything is working fine and picture is filling the screen. But this is impossible task to do since the image is heavily distorted and difficult to navigate.

I have win7 x64, HD 4850, CRT Emudriver 1.2b (Catalyst 13.1) for Windows 7-64 + VMMaker + Arcade_OSD 1.4b and I have 2560x224@60 video mode created by Vmmaker as static video mode. I use static video modes because I have few other emulators like c64, amiga, ps1, ps2 etc.

Did anyone had similar issues?
Title: Re: CRT_Emudriver + Retroarch
Post by: R-Typer on January 10, 2016, 10:42:38 am
I figured out what was the issue. I was running the latest Retroarch 1.3.0 instead 1.2.2. Now everything works fine.

The bad thing is, we have again Retroarch that doesnt want to work with CRTEmu drivers...

Title: Re: CRT_Emudriver + Retroarch
Post by: R-Typer on January 10, 2016, 11:55:25 am
I ended up with these key settings:

video_aspect_ratio = "11.420000"
video_aspect_ratio_auto = "false"
video_windowed_fullscreen = "false"
video_fullscreen = "true"
video_refresh_rate = "60.000000"
video_monitor_index = "0"
video_fullscreen_x = "2560"
video_fullscreen_y = "224"
video_vsync = "true"
aspect_ratio_index = "19"


The result is a great smooth scrolling system. I am fairly sure that I have hit the perfect 1:1 pixel map!


I used these settings for Retroarch to emulate megadrive and it work perfectly. Smooth scrolling and no stretching! Thanks!

I tried to setup Retroarch display resolution to work with SNES, but I'm getting image stretching artifacts. What would be the settings for SNES? It has a 256x224 resolution and 60hz refresh rate.

Many thanks in advance!
Title: Re: CRT_Emudriver + Retroarch
Post by: tom5151 on January 10, 2016, 04:02:09 pm
Hi @R-Typer,
Could you post an archive with all ini / cfg files you use for Genesis.
I've tried to make it work in 15k, but retroarch looks so much complicated to me!
Thanks,
Title: Re: CRT_Emudriver + Retroarch
Post by: R-Typer on January 10, 2016, 04:25:19 pm
Hi tom5151,

Here is the .txt file. Rename it to .cfg and place it to retroarch folder.

You have make 2560x224@60hz video mode in VMMaker for this to work as intended.

Also if you have x64 OS, you will need x64 Retroarch and x64 cores.

Title: Re: CRT_Emudriver + Retroarch
Post by: tom5151 on January 10, 2016, 04:28:23 pm
Thanks a lot, I will give it a try tmrw.
Title: Re: CRT_Emudriver + Retroarch
Post by: cyb on January 10, 2016, 05:53:28 pm

I used these settings for Retroarch to emulate megadrive and it work perfectly. Smooth scrolling and no stretching! Thanks!

I tried to setup Retroarch display resolution to work with SNES, but I'm getting image stretching artifacts. What would be the settings for SNES? It has a 256x224 resolution and 60hz refresh rate.

Many thanks in advance!

Try 2560 x 240, this displays snes perfectly on my system, (after aspect ratio adjustments of course)

Title: Re: CRT_Emudriver + Retroarch
Post by: R-Typer on January 11, 2016, 06:30:25 am

Try 2560 x 240, this displays snes perfectly on my system, (after aspect ratio adjustments of course)

Hi cyb,

I can't get the proper image to display at all: its all stretched and badly centered (around 15% of picture is missing from the right side).

Would you share your working SNES retroarch.cfg file with us?

Thanks so much!
Title: Re: CRT_Emudriver + Retroarch
Post by: R-Typer on January 11, 2016, 03:53:18 pm
Does anyone have a halved refresh rate (29hz) when Retroarch resolution is set to interlaced resolutions? For example 720x480@60? It works fine in 224p and 240p. Is this the dreaded halved refresh rate bug that windows 7 has?

I thought Retroarch shouldn't have this bug as it uses OpenGL or Direct3D?
Title: Re: CRT_Emudriver + Retroarch
Post by: Calamity on January 11, 2016, 04:02:33 pm
It works fine in 224p and 240p. Is this the dreaded halved refresh rate bug that windows 7 has?

Indeed.

Quote
I thought Retroarch shouldn't have this bug as it uses OpenGL or Direct3D?

??

Title: Re: CRT_Emudriver + Retroarch
Post by: tom5151 on January 11, 2016, 04:17:58 pm
Hi @R-Typer,
Thanks for your yesterday retroarch config, it's just perfect :)
I've tried to change resolution and aspect ratio for snes, and it works fine as well:
Code: [Select]
video_fullscreen_x = "2560"
video_fullscreen_y = "240"
video_aspect_ratio = "10.666667"
custom_viewport_width = "2560"
custom_viewport_height = "240"
Title: Re: CRT_Emudriver + Retroarch
Post by: R-Typer on January 11, 2016, 04:58:41 pm
It works fine in 224p and 240p. Is this the dreaded halved refresh rate bug that windows 7 has?

Indeed.

Quote
I thought Retroarch shouldn't have this bug as it uses OpenGL or Direct3D?

??


I tried to change retroarch video driver to OpenGL and D3D and they both produce halved refresh rate issue. I thought this bug is only with windows 7 DDraw?

Is this retroarch related? As other D3D and OpenGL emulators dont have this problem.

Title: Re: CRT_Emudriver + Retroarch
Post by: cyb on January 12, 2016, 12:32:13 am

Hi cyb,

I can't get the proper image to display at all: its all stretched and badly centered (around 15% of picture is missing from the right side).

Would you share your working SNES retroarch.cfg file with us?

Thanks so much!


My apologies, I forgot that I had to switch to 2560x224 The resolution is 2560x240, but I had to change the viewport from 240 to 224 when I upgraded to a newer version of retroarch. I also had to turn integer scaling OFF and adjust the aspect ratio until there were no artifacts. I have attached my config. It's setup for a 19" sony pvm so you may need to make further adjustments for your particular display.

Title: Re: CRT_Emudriver + Retroarch
Post by: Calamity on January 12, 2016, 07:03:16 am
I tried to change retroarch video driver to OpenGL and D3D and they both produce halved refresh rate issue. I thought this bug is only with windows 7 DDraw?

It is a "feature" of Windows 7 drivers (probably imposed by W7 design), and affects all APIs, but with DDraw we can force a workaround by doing vsync "manually". Indeed GM forced DDraw with interlaced modes because of this.

Quote
Is this retroarch related? As other D3D and OpenGL emulators dont have this problem.

If you don't see this problem it's because vsync is not being enabled.
Title: Re: CRT_Emudriver + Retroarch
Post by: R-Typer on January 12, 2016, 01:41:45 pm
Thank you Calamity for the explanation. I really appreciate it!!!

@cyb
Thanks!!! SNES is working now flawlessy. Looking beautifull!
Title: Re: CRT_Emudriver + Retroarch
Post by: cyb on January 13, 2016, 11:57:57 pm
Thank you Calamity for the explanation. I really appreciate it!!!

@cyb
Thanks!!! SNES is working now flawlessy. Looking beautifull!

glad you got it working!  :cheers: 
Title: Re: CRT_Emudriver + Retroarch
Post by: tom5151 on January 29, 2016, 11:48:24 am
I figured out what was the issue. I was running the latest Retroarch 1.3.0 instead 1.2.2. Now everything works fine.

The bad thing is, we have again Retroarch that doesnt want to work with CRTEmu drivers...
Did you find any workaround with Retroarch 1.3.0 ?
I was trying this version because I have some tearings with 1.2.2 (mednafen pace fast core).
Title: Re: CRT_Emudriver + Retroarch
Post by: emubastard on January 29, 2016, 12:08:08 pm
Speaking of RetroArch 1.3.  The www.libretro.com (http://www.libretro.com) site seems to be dead.  Does anyone know where I can get it?
Title: Re: CRT_Emudriver + Retroarch
Post by: tom5151 on January 29, 2016, 12:19:47 pm
Speaking of RetroArch 1.3.  The www.libretro.com (http://www.libretro.com) site seems to be dead.  Does anyone know where I can get it?
The site is not down from my place.
Try this : http://buildbot.libretro.com/stable/1.3.0/windows/x86_64/ (http://buildbot.libretro.com/stable/1.3.0/windows/x86_64/)
Title: Re: CRT_Emudriver + Retroarch
Post by: Foxhole on January 29, 2016, 02:54:19 pm
As far as i know, you have to set the desktop resolution to a progressive resolution for retroarch 1.3 to work, doesn't happen with 1.2.
Title: Re: CRT_Emudriver + Retroarch
Post by: tom5151 on January 30, 2016, 11:44:58 am
As far as i know, you have to set the desktop resolution to a progressive resolution for retroarch 1.3 to work, doesn't happen with 1.2.
You're right, it's working if I switch resolution to progressive mode before launching retroarch.
Bu I don't understand, @Calamity explained there was a bug since win 7 for switching from progressive to non a progressive mode in ddraw.
But, in this case, my retroarch configuration is "gl" so we shouldn't be impacted by this bug !
Title: Re: CRT_Emudriver + Retroarch
Post by: Foxhole on January 30, 2016, 03:41:17 pm
That's true. By the way, The problem isn't exclusive to crt emudriver.
Just tried starting retroarch while the desktop is set to 1080i on my main pc, Nvidia Geforce gtx 660, and it still doesn't work.
Title: Re: CRT_Emudriver + Retroarch
Post by: Elbaid on April 01, 2016, 08:01:28 am
Just tried these exact settings with genesis games and modified the resolution/aspect for PSX and SNES.
I get perfect syncing/scrolling overall, but the performance suffers a lot, that's with an Intel i7 @ 4.4! MAME runs perfectly, but I'd like the extra games support provided in Retroarch.

My card is HD 4350, would upgrading this help or is it CPU specific? Thanks

*EDIT* I'm using 2.0 drivers with Windows 7 x64
Title: Re: CRT_Emudriver + Retroarch
Post by: Calamity on April 01, 2016, 11:05:58 am
but I'd like the extra games support provided in Retroarch.

What exactly? Do you mean things that use interlaced modes? Is that where you get bad performance?
Title: Re: CRT_Emudriver + Retroarch
Post by: Elbaid on April 01, 2016, 12:25:55 pm
No not interlaced. It's mainly megadrive and snes. When starting a game there's a lot of stuttering for a few seconds, then regular stutters during gameplay, especially when there's a lot going on onscreen, but it's very inconsistent. I set rewind to false in the .cfg and that seems to improve performance greatly, but thought this was off by default.

I'm mainly experimenting. I see no reason to run snes and megadrive games via retroarch when they run without a hitch in mame, but I want retroarch set up for the games I can't play in mame such as psx games and certain incompatible snes games (only clock tower so far)

A video card upgrade is still tempting now that crtemu supports newer cards, but I'm not sure what difference it'll make for 240p gaming
Title: Re: CRT_Emudriver + Retroarch
Post by: retrorepair on March 02, 2018, 01:22:20 pm
Sorry to resurrect such an old thread but in the scenario you propose above Calamity, how would video_fullscreen_refresh generate a refresh suitable (or closest to) the correct refresh without using SwitchRes?

Also, where is the "standalone" version references here as I can't find it anywhere. Assuming we are talking about Windows here?
Title: Re: CRT_Emudriver + Retroarch
Post by: Alphanu on March 18, 2018, 01:11:36 pm
Hi All.

Let me introduce myself, I am a games programmer and have started looking into emulation. I have started work acuratly representing Retroarch emulator on a CRT. To be honest I am very close now and it is looking very good.

I've come here to share my project with you and to pick @calamity's brain.

Firstly I have created a version of Retroarch that;

A. Swithes to the correct resolutions for the core / game on the fly.

B. Switches the games FPS/ refresh on the fly to match the refresh of the original hardware.

This means the games look and run at the same speed as the original hardware did.

In order for this to work you need Calamity's CRTemudriver ( thanks for the awsome work on this Calamity). I've had to create a bunch of native resolutions such as 320 x 244 @59.940 for example. As well as many others.

I would say it's almost perfect  ;) Moving on I would like to start using super resolutions and hoping to incorporate dynamic hz!?

Calamity I am generating in realtime actual resolutions and actual hz. Is there a way for me to utilise the dynamic hz that can be setup with vmmaker. A function for changing it to what is requested and then setting it back?

This would be the final hurdle for acuralty emulating consoles for CRT. Yes the way I have it now does work really well but I will eventually run out of mode lines lol

Any pointer here would be an awesome help.

Here is a video of my progress. https://youtu.be/4ZLUyIyQQ4c

Thanks in advance.
Title: Re: CRT_Emudriver + Retroarch
Post by: Calamity on March 22, 2018, 11:29:27 am
Hi Alphanu,

I've been following your work. It's great.

Quote
Calamity I am generating in realtime actual resolutions and actual hz. Is there a way for me to utilise the dynamic hz that can be setup with vmmaker. A function for changing it to what is requested and then setting it back?

This is what the standalone Switchres was used for. However it hasn't been updated in years and won't even work with new cards. I'm planning to restart the standalone Switchres project based on current development. Your project and probably emu4crt could be a good excuse for it.

The other easier/faster possibility is to add this functionality to existing VMMaker. However this would make it Windows-only, while Switchres should work for both Windows and Linux.

The idea is to untangle and extract current Switchres from GroovyMAME, then create a library that can be either merged with other emulators, and a command-line frontend that serves as Switchres standalone, so you have the option to do either a static-link it or just a simple shell.

Unfortunately I can't say when would this be ready, but I'll give it higher priority.
Title: Re: CRT_Emudriver + Retroarch
Post by: Alphanu on March 24, 2018, 09:46:52 am
That's sounds great. Having a library for swithres would help with porting other emulators to CRT a lot easier. If the need is there.

Would it create modelines on the fly to switch too? I assume we'd still need to use windows or linux APIs to swith the resolutions!?

If you could port it to Vmmaker quickly it would be a good test bench for us to test with emu4crt or RA.

If you need any help, let me know. I'll be happy to help out.
Title: Re: CRT_Emudriver + Retroarch
Post by: veggav on April 20, 2018, 05:43:50 pm
That's sounds great. Having a library for swithres would help with porting other emulators to CRT a lot easier. If the need is there.

Would it create modelines on the fly to switch too? I assume we'd still need to use windows or linux APIs to swith the resolutions!?

If you could port it to Vmmaker quickly it would be a good test bench for us to test with emu4crt or RA.

If you need any help, let me know. I'll be happy to help out.

Alphanu are you Ben Templeman on Facebook?
It would be a huge coincidence two people working at the same goal at the same time on this.
Title: Re: CRT_Emudriver + Retroarch
Post by: Alphanu on April 21, 2018, 05:28:53 am
Yes I am.

Why do you ask?
Title: Re: CRT_Emudriver + Retroarch
Post by: veggav on April 21, 2018, 07:26:16 am
Yes I am.

Why do you ask?

Vitor, here we spoke on facebook.

Just downloaded the new nightly as you said and crt super resolution is present.
I'm testing it with a pc crt usint super resolution and 120hz.
I didn't got much time yet but I'll let you know how it goes.
Title: Re: CRT_Emudriver + Retroarch
Post by: Alphanu on April 21, 2018, 07:05:23 pm
Oh OK, cool. Does you PC CRT support 15khz as this will be needed.
Title: Re: CRT_Emudriver + Retroarch
Post by: veggav on April 21, 2018, 11:24:22 pm
No it does not.
I've installed crt emudriver but didn't add the vmm because this would screw up my monitor's 2048x1536 resolution.

So I've added all 2560 resolutions to amd control center and I was about to test it but I had other things to do.
Hopefully I'll post here with a positive answer to this.
Title: Re: CRT_Emudriver + Retroarch
Post by: Calamity on April 26, 2018, 07:05:04 am
Hi Alphanu,

If possible, please ask the Libretro guys to fix their link to CRT Emudriver on their 1.7.2 release post to this one: https://geedorah.com/eiusdemmodi/forum/viewtopic.php?id=295

The link they're posted is to Krick's mirror, which is outdated (still old version 1.2x).

This is to prevent new uninformed users from buying HD 4xxx cards. We still see new users every week coming to the hobby with those bloody old cards. This makes the experience much more frustrating for them that it could be if they just started with one of the newer supported cards.

Thanks!
Title: Re: CRT_Emudriver + Retroarch
Post by: Alphanu on April 27, 2018, 12:30:05 pm
Hi Calamity

Ah that's no good. I understand the frustration as I was using a 4850.

I'll pass this in for on today. There pretty quick at Worthing things.

Cheers
Title: Re: CRT_Emudriver + Retroarch
Post by: Calamity on April 29, 2018, 03:57:12 pm
Hi Calamity

Ah that's no good. I understand the frustration as I was using a 4850.

I'll pass this in for on today. There pretty quick at Worthing things.

Cheers

Thanks! They've updated it.