Building Supermodel on Visual Studio (UPDATED)

Technical discussion for those interested in Supermodel development and Model 3 reverse engineering. Prospective contributors welcome.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Building Supermodel on Visual Studio (UPDATED)

Postby Jiterdomer » Fri May 27, 2016 12:53 pm

This is an updated version of how to compile future Supermodel builds that Artman999999 did so that you guys can able to compile Supermodel by yourself since several builds of Supermodel uploaded online ended up with broken and jittery sounds due to the outdated instruction on this link :

Download Mingw-w64 at this link:

http://mingw-w64.org/. All you have to do is install on any directory.

Once it's fully installed, you'll also need to install VS2013 (any other versions worked). You can get it directly from Microsoft. You may need other NET framework installed when you go to compile, but the program will tell you so and will install it on a one-time-only basis. I ALSO installed VS2010, but I don't think both are needed. Just putting it out there.

Install TortoiseSVN, and use this url to check out the source: https://model3emu.svn.sourceforge.net/svnroot/model3emu/trunk. This is the url you will put into the TortoiseSVN to DL the source, and is not to get TortoiseSVN. Once that done, you will have a "src" folder in your mingw build folder - check out the Model3 source to this "src" directory. You will end up with a source folder named "model3emu".

Lastly, put these two folders into the newly-created /src/model3emu/Libraries folder: http://www.mediafire.com/download/xdd3w7s9c3y4r2h/Put_these_in_the_model3emu_Libraries_folder.zip. They provide the older SDL and Zlib needed to get Supermodel compiled.

Sounds like a PITA, and it is, but only the first time. OK - ready to actually compile?

Navigate to the model3emu/VS2008/Supermodel.sln file. Double-click and it will open in Visual Studio. Again, if something is missing, Visual Studio will tell you. Wait for it to do it's thing, then do the following:

In the Visual Studio 2013 (any other Visual Studio versions):
Go to Build/Configuration and set it to "release" and "x64" or "x86" depending on what you want.

Right click on Musashi64k and select properties, C/C++. Set the Warning Level to "0", then click apply. DON'T exit out of properties yet - just click the next folder in the Solution Explorer window (SDL) and change the warning levels there and click apply, then SDLMain, then Supermodel, then Zlib. DON'T exit out of properties yet.

Click on Supermodel. Navigate to C/C++/Optimization. Change "Whole Program Optimization" to NO. Click apply.

Click on Musashi64k and navigate to C/C++/Code Generation. Change "Runtime Library" to /MT. Click apply. Exit out of properties.

Click on Supermodel. Then select "Build" from the menu bar, and select "Build Supermodel". In 5 minutes or so, the compile will be complete.

In file explorer, go back to your "model3emu/VS2008/x64/release" folder. Scroll down and your newly-compiled SDL.dll and Supermodel.exe will be there amidst a crapload of other files (not needed). Copy those two files to your Supermodel install directory and bask in the glory of Sega Model 3 goodness that is on the cutting edge of development.

Final thoughts:
I'm sure there is a quicker way, but I delete the model3emu folder EVERY time I compile a new version. That means checking out a new version to this directory, coping in the SVN and Zlib folders, then setting the VS2013 settings EVERY TIME PRIOR to a new compile. I'm sure there is a way to preserve the compile settings, but I don't know how to do it.

This is as comprehensive as you're going to get, and this is the formula for getting the program to compile AND the sound to work properly EVERY time without issue. I see the developers rolling their eyes, because it can probably be done 10x faster and simpler in g++ or gcc. But this works for me without all of the command-line knowledge, so I'm sticking with it.

Instructions taken by Artman999999
Feel the heartbeat of my machine through this tight seat. I feel every motion of my machine
Image
User avatar
Jiterdomer
 
Posts: 528
Joined: Mon Sep 26, 2011 6:37 pm
Location: Los Angeles, CA

Re: Building Supermodel on Visual Studio (UPDATED)

Postby Bart » Fri May 27, 2016 1:42 pm

Why do you need mingw64 if you're building with MSVC?
User avatar
Bart
Site Admin
 
Posts: 2348
Joined: Thu Sep 01, 2011 2:13 pm
Location: Santa Clara, California

Re: Building Supermodel on Visual Studio (UPDATED)

Postby Jiterdomer » Fri May 27, 2016 1:45 pm

MingW was something to optimize the Emulator's speed or something and to make compilation easier.
Feel the heartbeat of my machine through this tight seat. I feel every motion of my machine
Image
User avatar
Jiterdomer
 
Posts: 528
Joined: Mon Sep 26, 2011 6:37 pm
Location: Los Angeles, CA

Re: Building Supermodel on Visual Studio (UPDATED)

Postby Bart » Fri May 27, 2016 2:10 pm

Jiterdomer wrote:MingW was something to optimize the Emulator's speed or something and to make compilation easier.


You compile either with gcc (mingw64) or with MSVC. They're separate compilers. I would guess that gcc produces faster code but I haven't verified this against the most recent version of MSVC.
User avatar
Bart
Site Admin
 
Posts: 2348
Joined: Thu Sep 01, 2011 2:13 pm
Location: Santa Clara, California

Re: Building Supermodel on Visual Studio (UPDATED)

Postby artman999999 » Tue May 31, 2016 10:52 am

I have not tried building SuperModel without the MinGW environment because I already had it in place for MAME compiling. If the devs say it works without that step, I'm sure it does.
artman999999
 
Posts: 44
Joined: Wed Apr 27, 2016 9:36 am

Re: Building Supermodel on Visual Studio (UPDATED)

Postby Shekel » Tue May 31, 2016 3:42 pm

It really does just need VS but if you could verify that compiling with something else is faster, I'd love to know and would switch.
User avatar
Shekel
 
Posts: 345
Joined: Wed Mar 16, 2016 12:45 pm


Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 3 guests