Building Supermodel on Windows with Visual Studio 2008

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 Windows with Visual Studio 2008

Postby nikdd » Sat Nov 05, 2011 2:47 pm

Building the SVN version of Supermodel with Visual Studio 2008

The following are instructions on how to build with Visual Studio 2008 the latest development version of Supermodel 32-bit or 64-bit from the SVN repository.

These steps have been tested with Visual Studio 2008 Professional on Windows 7. I have no idea whether they will work with Visual Studio 2008 Express Edition or Visual Studio 2010 or even with other versions of Windows.

[Update: daytona has reported that these steps work fine with Vistual Studio 2010 and Vista]

Steps

1. Check out the latest development version of Supermodel from the main trunk in the SourceForge SVN repository with a suitable SVN client, eg:

Code: Select all
svn co https://model3emu.svn.sourceforge.net/svnroot/model3emu/trunk trunk


2. Download the SDL v1.2.14 source (http://www.libsdl.org/release/SDL-1.2.14.zip) and unpack into trunk\Libraries.

3. Download the ZLib v1.2.4 source (http://sourceforge.net/projects/libpng/files/zlib/1.2.4/zlib124.zip/download) and unpack into trunk\Libraries.

4. Download and install the Microsoft DirectX SDK (June 2010) (http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=6812).

5. a) Open the Visual Studio solution Supermodel.sln held in trunk\VS2008,

5. b) Choose whether to build a Debug or Release version of Supermodel (the Debug version builds quicker but runs slower) and whether to target Win32 or x64 architecture,

5. c) Start the build! It will take a while to compile everything but if all goes well you should end up with the following files and directories (amongst many others) in the output directory:

Code: Select all
README.txt
LICENSE.txt
Supermodel.exe
SDL.dll
Config\Supermodel.ini
Saves\
NVRAM\


These files are all that are needed for Supermodel to run (you can ignore the others that are in there).

5. d) If you want to run supermodel from within Visual Studio then before you do so you should go to the property pages of the Supermodel project and set the command arguments as required (ie to point to a ROM) and change the working directory to $(OutDir) (otherwise Supermodel won't be able to locate its Supermodel.ini config file).

Enjoy!
nikdd
 
Posts: 180
Joined: Fri Sep 02, 2011 10:39 am
Location: London

Re: Building SVN version of Supermodel with Visual Studio 20

Postby Outrunner » Sun Nov 06, 2011 3:48 am

Good nice and all but it still doesn't compile.

Zlib and SDLmain build successfully
Mushashi68K gives me 1 error:
1>Project : error PRJ0019: A tool returned an error code from "Performing Post-Build Event..."

EDIT: The M68K does not build if there is a space in the path (i.e "Project Source") if i change to ProjectSource it works ===> EPIC FAIL
I fell like in the era of Turbo Pascal.

SDL whines about:
1>i:\development\project source\supermodel\libraries\sdl-1.2.14\src\audio\windx5\directx.h(81) : fatal error C1083: Cannot open include file: 'dsound.h': No such file or directory

Then supermodel whines about its missing M68K files.
Still needs more work but at least you are getting there :) .
User avatar
Outrunner
 
Posts: 38
Joined: Sat Sep 24, 2011 7:51 pm
Location: Romania - Bucharest

Re: Building SVN version of Supermodel with Visual Studio 20

Postby nikdd » Sun Nov 06, 2011 5:12 am

Outrunner wrote:Zlib and SDLmain build successfully
Mushashi68K gives me 1 error:
1>Project : error PRJ0019: A tool returned an error code from "Performing Post-Build Event..."


The post-build events need quotes added to handle spaces in directory names. I've updated SVN with this change.

Outrunner wrote:SDL whines about:
1>i:\development\project source\supermodel\libraries\sdl-1.2.14\src\audio\windx5\directx.h(81) : fatal error C1083: Cannot open include file: 'dsound.h': No such file or directory


Ah, apologies - the SDL project was assuming that the DirectX directories had been added to the global VC++ directories - I missed noticing that. I've added the DirectX directories as additional include and library paths of the SDL project instead and have updated SVN with this fix.

Please update your local copy with these SVN changes and try again.
nikdd
 
Posts: 180
Joined: Fri Sep 02, 2011 10:39 am
Location: London

Re: Building SVN version of Supermodel with Visual Studio 20

Postby Outrunner » Sun Nov 06, 2011 8:59 am

Built successfully with latest svn.

Good Job !!!
User avatar
Outrunner
 
Posts: 38
Joined: Sat Sep 24, 2011 7:51 pm
Location: Romania - Bucharest

Re: Building SVN version of Supermodel with Visual Studio 20

Postby nikdd » Mon Nov 07, 2011 3:35 am

Outrunner wrote:Built successfully with latest svn.

Good Job !!!


Great - glad it's working :-) !
nikdd
 
Posts: 180
Joined: Fri Sep 02, 2011 10:39 am
Location: London

Re: Building Supermodel on Windows with Visual Studio 2008

Postby j4m3s » Sat Jan 21, 2012 1:34 pm

build error latest rev.
Error 182 error LNK2001: unresolved external symbol _IID_IWbemLocator DirectInputSystem.obj Supermodel
Error 183 error LNK2001: unresolved external symbol _CLSID_WbemLocator DirectInputSystem.obj Supermodel
Error 184 fatal error LNK1120: 2 unresolved externals c:\Users\JAMES\Documents\supermodel\trunk\VS2008\Win32\Release\Supermodel.exe Supermodel
j4m3s
 
Posts: 9
Joined: Fri Sep 30, 2011 10:35 am

Re: Building Supermodel on Windows with Visual Studio 2008

Postby Bart » Sat Jan 21, 2012 3:28 pm

j4m3s wrote:build error latest rev.
Error 182 error LNK2001: unresolved external symbol _IID_IWbemLocator DirectInputSystem.obj Supermodel
Error 183 error LNK2001: unresolved external symbol _CLSID_WbemLocator DirectInputSystem.obj Supermodel
Error 184 fatal error LNK1120: 2 unresolved externals c:\Users\JAMES\Documents\supermodel\trunk\VS2008\Win32\Release\Supermodel.exe Supermodel


I changed DirectInputSystem.cpp to be compatible with GCC on Windows. You will need to add WbemUuid.lib to the list of libraries. Unfortunately, I don't have MSVC on my new computer (I've switched to using GCC) so I'll have to wait until either Nik updates it or someone submits a new project file. If you're building from the Makefile, I can fix it for you.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Building Supermodel on Windows with Visual Studio 2008

Postby nikdd » Sun Jan 22, 2012 9:34 am

Bart wrote:
j4m3s wrote:build error latest rev.
Error 182 error LNK2001: unresolved external symbol _IID_IWbemLocator DirectInputSystem.obj Supermodel
Error 183 error LNK2001: unresolved external symbol _CLSID_WbemLocator DirectInputSystem.obj Supermodel
Error 184 fatal error LNK1120: 2 unresolved externals c:\Users\JAMES\Documents\supermodel\trunk\VS2008\Win32\Release\Supermodel.exe Supermodel


I changed DirectInputSystem.cpp to be compatible with GCC on Windows. You will need to add WbemUuid.lib to the list of libraries. Unfortunately, I don't have MSVC on my new computer (I've switched to using GCC) so I'll have to wait until either Nik updates it or someone submits a new project file. If you're building from the Makefile, I can fix it for you.


I've updated the VS project with the missing library so hopefully it should compile for everyone now. Please let me know if there are any further problems.

Thanks, Nik.
nikdd
 
Posts: 180
Joined: Fri Sep 02, 2011 10:39 am
Location: London

Re: Building Supermodel on Windows with Visual Studio 2008

Postby j4m3s » Sun Jan 22, 2012 10:10 am

working again.. THX!
j4m3s
 
Posts: 9
Joined: Fri Sep 30, 2011 10:35 am

Re: Building Supermodel on Windows with Visual Studio 2008

Postby Daytona » Wed Feb 01, 2012 9:58 pm

Just to confirm this is working for me.

Windows Vista and Visual Studio 2010 enterprise edition.

Thank you for the detailed instructions and thankyou Bart and other contributors for a fantastic emulator.
Daytona
 
Posts: 3
Joined: Wed Feb 01, 2012 9:54 pm

Next

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest

cron