Posted: 22 Nov, 2016 19:45
Last Edit: 22 Nov, 2016 20:00
Sweet I uploaded a packages.config file on for the repo and that should ease the problem with the rapidJSON crap. I'm on the Linker error part, but should be on my way to get this thing to work. I didn't feel comfortable publishing the package file on Nuget since we're not the owners so I uploaded the binary (the .nupkg file). If we could all we'd need is a that 1 KB .config file and just do a package restore from NuGet.
I'm planning on making packages for the DXSDK and NVIDIA too because I don't think they need to be changed and would speed up cloning for other people.
Edit: Got it to build successfully. I'm also thinking of making a precompiled header for stuff we're never going to change. Building takes too long. I also suggest that everyone use a local debug symbols repository for faster symbol loading.
I'm gonna try testing your proposition before running the script
You are a genius, I got snes9x to build after this. I'm gonna try integrating the new version of snes9x.
Posted: 24 Dec, 2016 18:04
I just tried all the above and still getting the error on line 1097 for xstring. The given Snes9x in the suit has its own things wrong, but it doesn't give me the error I am looking for.
Posted: 12 Mar, 2017 14:13
Last Edit: 12 Mar, 2017 14:43
I have followed Tooray's instructions and everything finally seems to have "built".
However I have no idea where the resulting RAGens executable is or how to run it. What am I supposed to do now that the project has been "built"?
I confess to being very new to Visual Studio (2013). It was about the size of a small moon (9GB) to install and has taken about 4 hours to get running on my install. Is there a way of compiling all this on linux, or with another toolset?
Edit: I managed to build "something" by using the RAGens project file in its own folder. It put something in a "Release" folder, which appears to run, but I think it downloads the incorrect version of RA_Integration.dll and crashes afterwards. It's really not clear how this build process is supposed to work.
Posted: 12 Mar, 2017 21:18
Last Edit: 12 Mar, 2017 21:24
The build in Scott's repo is not suitable for development. It will build as a release but not as a debug. If you know to debug it should be easy for you to get to work as a debug build. I still think it's better that you work on that first though until someone can get a better implementation going. We can always just merge changes later.
He has rapidjson as a submodule but hasn't bothered to update the rapidjson code inside the suite. The one thing @dude1286 was taking about was somewhere in _httpthread (RAWeb class in RA_Integration) compared an STL string to a nullptr which is impossible. std::string is an object not a pointer. Plus it has a function called empty (it's in all C++ STL containers) to test if it's empty or not.
It's possible to compile on Linux and Mac, assuming the projects don't use Microsoft Extensions (I think RAVBA-M is the only one that uses MFC).
Well instead of me rambling on more, it would probably be more helpful if I referred you to a thread I've been maintaining:http://retroachievements.org/viewtopic.php?t=3985&c=19818
I would suggest reading the first 3 posts, I don't recommend you fork my repo because it doesn't work yet.
I respond faster to PMs if you want to ask any questions (or that thread), because I don't get notified in-site and the email notifications are very vague.
Posted: 13 Mar, 2017 02:37
>> It's possible to compile on Linux and Mac
Could you elaborate? Are you saying a working, for example, RAGens could be compiled on Linux, with memory inspector and achievement editing?
Posted: 13 Mar, 2017 04:51
Last Edit: 13 Mar, 2017 04:59
I said it was possible, not practical. Like we could do it, but can't right now.
Well I don't know about the specific emulators because I haven't been working on them at all. You'd have to figure that out yourself by tweaking the code to make it portable. As in standard code and conditionals to direct the flow according to the platform.
Conditionals in this case are preprocessor directives, if you want Linux, you will need to know the GCC Macros for C++ and Makefiles, configure, install.sh, .... Autotools helps a lot. There's also this thing called buildconv (a fork of Autogen.sh) that helps a bit.
I'm not going to go into a lot of detail, but if you want it for Linux you will need a makefile for sure. If you don't know how to do it don't bother, it's too early for me to do something like that.
The RA_Integration.dll can compile on Linux or Mac if you made a makefile for it or something as long as you don't use extensions like MFC or CLI. If you looked at the WinAPI, they have conditionals for Mac and Linux.
Posted: 18 Mar, 2017 03:07
Last Edit: 21 Mar, 2017 01:56
WARNING: Nothing in this post is fully tested. Use the solutions provided and especially the resulting emulator versions at your own risk.
EDIT: This post has issues with backslashes for some reason . I will try to fix most of these.
I believe I have finally found a method of getting at least the RAGens emulator to compile and work with the site as expected. I think this method can be adapted for the rest of the emulators. There are a few issues with the current RASuite repository which makes compilation and also the "working " state of any resulting emulators difficult. I should mention I'm on Windows 7.
Now firstly, the main RA developer Scott has been working on a new memory model for RA_Integration dll along with lots of cleanups. The model appears intended to handle things like the Mega CD and 32x additional memory modules, but the resulting RA_Integration dll is incompatible with existing emulators, needs site-side coding, and is probably still a work in progress. The newer version of the emulators in the git repository are also designed to work with the newer memory model so we can't really use those either. For these reasons, this guide will cover compiling what I believe is the closest commit to the actual emulator versions currently downloadable on the site. That is, we have to compile over 2 year old versions. We won't utilise compiled versions of RA_Integration.dll with the emulator, but instead we'll download the dll from the website.
Secondly, the older versions of the repo were very specific to Scotts own setup so we need to change some settings around to get things to compile, as well as use some files from more recent git repository versions. As a result, this will require two downloads. So, to business.
We need to get the latest version of the suite available here: https://github.com/RetroAchievements/RASuite
And also an older version, from October 2014, available here: https://github.com/RetroAchievements/RASuite/tree/874229bb062e09e74a17fdb5bc08f6e3f1df34f1
(We could arguably do this with one download and git checkouts, but I'm trying to avoid introducing any git-related compilations)
Download and extract both of these versions. We'll be working on the second but we need library files form the first.
Go into the RASuite (newest) directory, and copy the directory "DXSDK_March09_x86" into the RASuite-874229bb062e09e74a17fdb5bc08f6e3f1df34f1 (older) directory. Place the folder in the same location it was in the newest version (At the same level as the RAGens folder) (You may have to descend a bit depending on your zip program). . Now we have to tell Visual Studio to include this directory in all of its builds.
( By the way, I used Visual Studio 2013 (Update 5), though I believe any version at or higher than VS 2012 will work. You can get VS 2013 herehttps://www.visualstudio.com/en-us/news/releasenotes/vs2013-update5-vs . Note: It's the size of a small moon.)
Head into the RASuite-874229bb062e09e74a17fdb5bc08f6e3f1df34f1 directory, and into the RAGenswin32 folder. Open the RAGens.sln solution file. Visual Studio might give you some security warnings, and then will probably ask you to upgrade the compiler and libraries. Just click OK to this.
As it stands, the solution won't compile. You will get linker errors and other such problems. We have to tell it where to find the files it needs.
So, in Solution Explorer, right click RA_integration, and select Properties.
In the Property Page window which pops up, select the Configuration "Debug" from the first drop-down, then in the panel below Go to Configuration Properties -> C/C++, and in the panel on the right there is an "Additional Include Directories" property.
You should see a part of this reading "c:\sdk\DX90CSDK\include;".
Change this part to "..\DXSDK_March09_x86;", to point to the directory we copied over.
Then click "Apply"
Similarly, Go to Configuration Properties -> Linker, and in "Additional Library Directories", replace "$(DXSDK_DIR)/lib/x86;" with "..\DXSDK_March09_x86;", then click "Apply"
Now, ALSO MAKE BOTH OF THESE CHANGES THIS FOR THE "Release" AND "ReleaseWithDebug" configurations by changing the "Configuration:" using the drop down box from earlier.
Long story short:
In all of the Configurations; Debug, Release, ReleaseWithDebug Change the following
In Configuration Properties -> C/C++ -> Additional Include Directories, replace "c:sdk\DX90CSDK\include;" with "..\DXSDK_March09_x86;"
In Configuration Properties -> Linker-> Additional Library Directories, replace "$(DXSDK_DIR)/lib/x86;" with "..\DXSDK_March09_x86;"
(You may well as why not use the "All Configurations" selection to change all 3 at once. In my expierience this option is a little flaky in Visual Studio so I recommend changing the configurations on at a time)
This done, exit from the properties dialog. On the top toolbar, next to a "Debugger" button, select "Release" or "ReleaseWithDebug" in the dropdown box. Then in the Solution explorer, right click on "Solution 'RA Gens'" and select "Rebuild Solution". HOPEFULLY the solution will now compile without any failures. You should see a "Rebuild All: 2 succeeded, 0 failed, 0 skipped" at the end if everything worked.
If you've gotten this far OK, then the resulting RAGens executible should be located in
RASuite-874229bb062e09e74a17fdb5bc08f6e3f1df34f1\RAGens\win32\ release\ gensRAGens.exe
Run this executable (or the debugger button if you selected "ReleaseWithDebug").
As with the first run of the site version of RAGens, A LoadLibrary warning will popup. Press OK and you will be promted to download RA_Integration.dll from the website. Press OK and similarly for RA_Keys.dll. Enter your login details, login, and the executable will probably crash once(The site version does this as well).
Close the program, restart and... things should be fine. I hope. Really I haven't tested this but hopefully getting a working build of the emulator will be of use to some. I think the process of figuring out Visual Studio and the general issues with getting the Suit to compile will be more useful to everyone.
( If you pick the "Debug" build, the executable will be at RASuite-874229bb062e09e74a17fdb5bc08f6e3f1df34f1\ RAGens\ win32\ Debug\ gens \ RAGens.exe. But this vesion doesn't work for me for whatever reason)
I am now very tired. Any brave souls who try this can let me know if things worked. I miss make.
Posted: 18 Mar, 2017 05:07
This guide should really help those who attempt to complie RaGens! Thanks for the effort of putting this together.
Posted: 18 Mar, 2017 18:12
Last Edit: 18 Mar, 2017 19:02
I hate non-project files and binaries being in a repo so I did make a nuget package called "DXSDK_Missing" if they were using the june 2010 version. I've been using Windows 10 SDK because it has everything including DirectDraw. It should work perfectly (when done) with windows 7+. I'd have to make a totally different version for xp though (I might not even do it).
If you're curious, the memory model is the same as far as functionality goes in my version but using functors (function objects) instead of function pointers. If a pointer is absolutely required (like handles), I've been using unique_ptr.
Sorry, I got ADHD and edit posts a lot, and sometimes talk to much. I apologize in advance.
Also, I addressed the lack of exception handling and memory management. There were also several cases of implicit casting and invalid narrowing conversions that would not even compile with modern compilers. It's still pre-alpha, I can guarantee it can still attach to a Windows Desktop App, but I can't test it yet. I've made it extremely organized into folders because there's like a 100 header/source files now.
Class view and object explorer should help in situations like that, hell, when I worked on ezPaint in my Software engineering class, that program had like over 500 files.
It's pre-alpha and haven't really accomplished anything significant yet. I've have sucessfully built RASnes9x in the past but it was extremely unstable, after reviewing it more, it seemed it wasn't suitable for debugging so I made one from "scratch", but lost that too.
I didn't wanna commit to my repo since it wasn't usable at all, but to prevent that same disaster I commit whenever I make significant progress even if it can't be used. So I made a disclaimer.
Posted: 19 Mar, 2017 00:39
Last Edit: 19 Mar, 2017 00:40
Now that you achieved that, your next to do job should be compile RaGens +rewind, this one is the version needed to run the SMS roms and use the important rewind features..
Posted: 20 Mar, 2017 02:04
I'm going to have to call a halt to this. I've spent the better part of a week looking into either integrating SMS support into RAGens (Not feasible for me) or integrating RA support into another SMS emulator.
Unfortunately there are no SMS emulators which at present compile in Windows as far as I can tell. Neither Gens+ nor Gens+REWinD compile any longer (if they ever did). I've been through 3 different versions of VS, old Visual C++ version, and have attempted numerous fixes to old code, but there are simply no simple enough SMS emulators which compile on Windows anymore so far as I can tell. (I did implement a needed fix for Gens+REWinD which involed editing its gens.vcproj file to replace refereces to the nasm.exe assembler to an appropriate location. But the remaining actual C++ code simply would not compile on a modern system)
It looks like RA won't be getting SMS support unless someone is willing to either put it into a basic SMS emulator, hack it into RAGens, or until the main developer Scott writes an integration with a larger emulator Suite like Bizhawk. I recommend moving the RASuite away from Visual Studio for all future development work as this toolset is shockingly poor at pretty much everything.
Posted: 20 Mar, 2017 02:59
As much as I want TwoMBit, it's a Qt project, so we can't have it.
The nearest one I've scouted is DEGA, which has it's own problems, but may be converted to work for VS2013. DEGA's problems include only one controller, no light-phaser support, and it starts with a really bad window-ratio that you can freely resize(without the support of ratio-locking), but the moment you load a new game or reset, it resets the window-size again.
But in terms of running SMS/GG games it works fairly well. About on par for RAemus anyway. If it's known what needs to be injected and/or changed in the host-emulator and what needs to be changed with the RA-integration, it ... should be possible? I wasn't able to compile barebones DEGA myself, but it complained about MAC stuff and needed to convert the project from a Visual Studio 6 workspace, so I probably chose the wrong workspace, I dunno. That's my only suggestion at the moment. I scouted quite a bit of different emus for SMS/GG a while ago, and that was the best/nearest fit I could find.
And while I'm dreaming, it'd be nice if the window-size was fixed/given-a-ratio-lock, and light-phaser support for the controller-port it needs being added would be nice. There aren't that many games for it, and quite a few light-gun games are favorites of mine(well, mostly Rescue Mission).
Posted: 20 Mar, 2017 03:56
You could do it if you knew how. I know you need to use IPC (interprocess communication) to interface winapi with qt but it's complicated. I don't know how to IPC w/ different APIs.
Posted: 20 Mar, 2017 12:42
Unfortunately, Dega also no longer compiles. I'm not enough of a Windows programming expert to pronounce it impossible, but I couldn't get it to work either. It's a universal problem with all these emulators.
Posted: 24 Mar, 2017 19:39
I really should have stopped.... but I didn't.
Turns out of all things, Meka compiles under Visual Studio. A saint named maxim-zhao made a fork of Meka and tweaked it to compile. It even auto downloads the project dependencies using "NuGet":https://github.com/maxim-zhao/meka/tree/vs2015
I'm looking into whether it's possible to shoehorn the RA_Integration dll into the framework of this Emulator. It might be worth the additional hassle as Meka also supports Game Gear, SG-1000 (an earlier Sega console) and apparently the Colecovision as well. I'll see about just Master System games for now since anything more will probably kill me.
login to retroachievements.org:
or create a new account
or create a new account