- Visual Studio 2010
- installed the most recent WDK (also on XP SP3)
- installed the most recent DirectX SDK
*.h
in the WDK and the DirectX SDK switch to read-only.
Let's check content of $(USERPROFILE)\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user
. Its should look like this:
The idea is to place VS2010 path$(ExecutablePath);C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin;C:\Program Files (x86)\NASM $(IncludePath);C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include;C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include;C:\DDK_7.1\inc\api $(ReferencePath) $(LibraryPath);C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib;C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Lib\x86;C:\DDK_7.1\lib\wxp\i386 $(SourcePath) $(ExcludePath);C:\Program Files\Microsoft SDKs (x86)\Windows\v7.0A\Include
$(Path*)
always at the very beginning. At this stage, you should properly set up the path to the WDK and DirectX SDK. Best to do it here, so you will not have to configure each project individually.
Download NASM, install it and add it to ExecutablePath
Grab the source of WinUAE. Create a directory winuae-base
. Extract the sources to directory winuae
.
Also grab the source of WinUAE from the GIT repository http://github.com/tonioni/WinUAE.git
(see the official site of the project, Downloads section.) I used TortoiseGIT. Requires msysgit. During the installation of msysgit
select Run Git From Windows Command Promp
. Copy the directory winuae-git/prowizard
, which is missing in official source 2.1.0.
Time to get a lot of packages needed to compile WinUAE. Here is an excellent source of knowledge on that subject. Things such as OpenAL, networking, printers, or the functionality which these packages provide, usually requires that WinUAE has access to the appropriate DLLs. They are not required at start time, instead they are loaded dynamically if necessary. WinUAE is prepare for situation when they do not exists. I am concentrating only at compiling WinUAE with minimum number of changes. There is possibility to compile WinUAE without all those packages. Basic elements such as CD, HDD, games, sound will work. However, this requires lot of work. OpenAL Download OpenAL 1.1 Core SDK. Install it. Create a directory
winuae-base/openal
and copy there al.h
, alc.h
, OpenAL32.lib
. We can uninstall OpenAL now.
zlib
Download a source package, extract to winuae-base/zlib
unrar
Download UnRAR.dll
and to directory winuae-base/unrar
extract unrar.h
.
WinPcap
Download Developer's Pack
and extract to directory winuae-base/winpcap
directories Include
and Lib
.
FreeType
Download Binaries
and exract to directory winuae-base/freetype
directories Include
and Lib
. From the directory tree eliminates freetype2.
libpng
Download source and extract to directory winuae-base/libpng
.
TVicPort
Download, install, copy to directory winuae-base/tvicport
file TVicPort.h
. And in my case, uninstall.
Catweasel
Download the latest version Catweasel ISA/MK3/MK4/MK4plus
. Extract to directory winuae-base/catweasel
file catweasl_usr.h
.
Ghostscritp
Download source and extract to directory winuae-base/ghostscript
files errors.h
, iapi.h
, ierrors.h
.
PortAudio
Download version v19
. Extract to directory winuae-base/portaudio
.
fdrawcmd
Downsload this file and save to winuae-base/fdrawcmd
.
G15 LCD monitor
Download drivers. Install them. Look for LCDSDK_3.04.143.zip
. Extract to directory winuae-base/logitechlcd
files lglcd.h
and lglcd.lib
. Drivers can be uninstalled now.
WinIO
Extract to winuae-base/winio
content of the directory Source
.
ParaPort
Save content of the header file to winuae-base/paraport/paraport.h
(preferably copy it from page's source).
wnaspi32
Writes it to winuae-base/wnaspi32/wnaspi32.h
enet
Extract to directory winuae-base/enet
.
To directory
winuae-base/winuae/od-win32/winuae_msvc10/
copy solution file from GIT repository. Open solution.
Remove the project unpackers
.
Remove files *.obj
from the project WinUAE
. In project create folder asm
and add the files *.asm
, which is obj's you generate. Select them all and open properties. Select all configurations. As Item Type
select Custom Build Tool
. Click apply. In Custom Build Tool
set:
Command Line: nasm.exe -O1 -f win32 -Xvc -o "$(IntDir)%(Filename).obj" "%(RootDir)%(Directory)\%(Filename).asm" -w-orphan-labels
Description: Compiling asm file %(Filename).asm
Outputs: $(IntDir)%(Filename).obj;%(Outputs)
For projects build68k
, genblitter
, gencpu
, gencomp
for Pre-Link Event
and Post-Build Event
unify entries for all configurations.
For build68k
change generated file cpudefs.c
to cpudefs.cpp
. Same in project genblitter
and genlinetoscr
.
Set dependencies between projects:
winuae
depends ongenblitter
,gencpu
,gencomp
,genlinetoscr
,prowizard
.gencpu
andgencomp
depends onbuild68k
.
winuaee
properties add reference for prowizard
and set Output File
to the default value for all configurations.
Select configuration Debug
for build. In the solution properties in section Configuration Properties
for all configurations check for build only build68k
, gencpu
, gencomp
genblitter
, genlinetoscr
, prowizard
, winuae
.
Build build68k
, genblitter
- should be no problems.
Build gencomp
, there are some errors. In sysdeps.h
before #include <tchar.h>
place #include <windows.h>
. Build again.
Build gencpu
- without problems. Build genlinetoscr
. There are some errors.
For projects build68k
, gencpu
, gencomp
, genlinetoscr
, genblitter
for all configurations set Output Directory
and Intermediate Directory
to $(Configuration)\
, and Output File
set to $(OutDir )\..\$(TargetName)$(TargetExt)
. Build genlinetoscr
again.
Build prowizard
. Errors. Copy value of Additional Include Directories
from Release
to Debug
. Build again.
Unifies content of all Additional Include Directories
in each project.
Because I couldn't find lib for wacom tablet so I had to disable tablet functionality. In short just comment #include <wintab.h>
, #include <pktdef.h>
and follow the errors. Instead of commenting or removing code you may add new preprocessor definition to sysconfig.h
. Remove from Linker/Additional Dependencies
entry wintab32.lib
for all configurations. Remove from Delay Loaded DLLs
entry wintab32.dll
for all configurations.
For project winuae
set the Output Directory
and Intermediate Directory
to $(Configuration)\
for all configurations. Set Output File
to the default value for all configurations.
Build project winuae
. All errors are associated with lack of headers. Add to Additional Include Directories
:
..\..\..\catweasel;..\..\..\enet\include;..\..\..\fdrawcmd;..\..\..\freetype\include;..\..\..\libpng;..\..\..\logitechlcd;..\..\..\openal;..\..\..\paraport;..\..\..\portaudio\include;..\..\..\tvicport;..\..\..\unrar;..\..\..\winio\Dll;..\..\..\winpcap\include;..\..\..\wnaspi32;..\..\..\zlib;%(AdditionalIncludeDirectories)
Two errors remained:
syntax error : identifier 'PARAPORT_INFO'
Remove:
typedef BOOL (*getPortInfo)(HANDLE, PARAPORT_INFO*);
static getPortInfo pp_getportinfo;
pp_getportinfo = (getPortInfo)GetProcAddress (para, "getPortInfo");
None of these are in use. As to the second error:
'Pa_OpenStream' : cannot convert parameter 7 from 'int (__cdecl *)(const void *,void *,unsigned long,const PaStreamCallbackTimeInfo *,PaStreamCallbackFlags,void *)' to 'PaStreamCallback (__stdcall *)'
In portaudio.h
decorate declaration of PaStreamCallback
with __cdecl
.
Build again winuae
. Now it's just linking errors left.
Unifies Linker/Additional Dependencies
and Delay Loaded DLLs
for all configuration for project winuae
. Add to Additional Library Directories
for all configurations:
..\..\..\logitechlcd;..\..\..\winpcap\Lib;..\..\..\openal;..\..\..\freetype\lib
Add to solution WinIo.vcproj
. Add to references of winuae
project WinIO
. Remove winio.lib
from Linker/Additional Dependencies
. For project WinIO
set the Output Directory
and Intermediate Directory
to $(Configuration)\
for all configurations. Make sure that for solution proper configurations were set up, it's going mess very often, specially after adding project or changing configuration (adding, removing, renaming). Build WinIO
.
Build again winuae
. Now zlib
. Do exactly as before in WinIO
. Project name is zlibstat.vcxproj
. Build zlibstat
.
Build winuae
. Now libpng
. Edit libpng.vcxproj
. Remove <import project="$(SolutionDir)\zlib.props">
. Add the project to the solution. Set Output Directory
and Intermediate Directory
to $(Configuration)\
for all configurations. And Target Name
to $(ProjectName)
for all configurations. Set Additional Include Directories
to ..\..\..\..\Zlib
for all configurations. In solution properties set proper Debug Library
and Release Library
for the corresponding solution configuration. Add to references of winuae
project libpng
. Remove libpng.lib
from Linker/Additional Dependencies
. Build libpng
.
Build winuae
. Time for portaudio
. Add to solution portaudio.vcproj
. Add to references of winuae
project portaudio
. Set Output Directory
and Intermediate Directory
to $(Configuration)\
for all configurations. Set Output File
the default value for all configurations. Remove portaudio_x86.lib
from Linker/Additional Dependencies
for all configurations. Build PortAudio
. Remove directory ASIO
from disk like from the project Build. Remove portaudio.def
from the project. Build. Clear for all configurations Module Definition File
. Add the preprocessor symbols PA_NO_ASIO
for all configurations. Change in Delay Loaded DLLs
from portaudio_x86.dll
to portaudio.dll
. Build. Note: After you changed dll's name you can't use original dll.
Build winuae
Time for enet
. Add to solution enet.dsp
. Add to references of winuae
project enet
. Set Output Directory
and Intermediate Directory
to $(Configuration)\
for all configurations. Set Output File
to the default value for all configurations. Remove enet.lib
from Linker/Additional Dependencies
for all configurations. Build enet
.
Build winuae
. Remove prowizard.lib
from Linker/AdditionalDependencies
for all configurations.
Build winuae
. Time for errors like Unresolved externals
.
For project enet
, libpng
, prowizard
change calling convention to stdcall
for all configurations.
Project portaudio
does not export any symbols. Add header files to the project portaudio
. Place at the top of portaudio.h
:
#ifdef _USRDLL
#define DELC_EXTERN __declspec(dllexport)
#else
#define DELC_EXTERN __declspec(dllimport)
#endif
Decorate with DELC_EXTERN
each function in portaudio.h
. Add __cdecl
to each function. Clear property Linker/Advanced/Import Library
for all configurations.
Open pcap.h
, packet32.h
, remote-ext.h
and every function that is reported as Unresolved external
decorate with __cdecl
(and for sure all others too).
At this point only errors like multiply symbol define
left.
For projects enet
, winuae
, portaudio
, prowizard
, libpng
, zlibstat
, winio
for all configurations set up properly Runtime Library
.
Build winuae
. And we have the executable file.
When it comes to Release
. Add to the project zlibstat
to Pre_Build Event
:
cd ..\..\masmx86
bld_ml32.bat
Brak komentarzy:
Prześlij komentarz