02 February 2010, 13:15 | #1 | |
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
DIY Compiling WinUAE 2.0.x
This is a recipe for those who want to build WinUAE 2.0.x from the ground up. Using Toni's libs&headers packs will make things a lot easier. I used the sources of a 2.0.2 beta.
The Tools I used Visual Studio 2008 Express. You'll need the DirectX SDK, WDK, and Windows 7 SDK. Last but not least go and install Nasm. Preparations Install WinPcap, OpenAL and some Wacom driver for the wintab32.dll on your system. Getting the Dependencies The dependencies didn't change very much in comparison to the last version. Enet was introduced in adddition to Quote:
Fetch the stuff and create the directories winuae_include and winuae_libs. Install/unzip all you've got. I assume that you are going to extract all the necessary headers and libs into special folders, so that you don't have to manage each and everything inside VisualStudio. Copy the following headers and directories to winuae_include Code:
${Enet}/enet/ ${PortAudio}/include/*.h ${zlib}/src/zlib/1.2.3/zlib-1.2.3/*.h ${libpng}/*.h ${WinIO}/WinIo/Source/Dll/WinIo.h ${WacomTablet}/wactab/*.h ${Catweasel}/devel/*.h ${Freetype}/include/*.h ${Freetype}/include/freetype2/freetype/ ${TVicPort}/Examples/MSVC/TVicPort.h ${UnrarDll}/unrar.h ${OpenAL SDK}/include/*.h ${WpdPack}/Include/*.h ${WpdPack}/Include/pcap ${OpenGL}/glext.h ${OpenGL}/glxext.h ${wnaspi3.dll}/wnaspi.h ${ParaPort}/ParaPort.h ${G15 LCDSDK}/LCDSDK/Src/lglcd.h EDIT: Code:
${Ghostscript}/base/*.h ${Ghostscript}/imdi/*.h ${Ghostscript}/psi/*.h ${Ghostscript}/psi/iapi.h ${Ghostscript}/psi/ierror.h
Building the Libaries Build the libraries zlib, libpng, enet and portaudio first.
winuae_libs should contain by now enet.lib, libpng.lib, portaudio_x86.lib, WINTAB32.LIB, freetype.lib, OpenAL32.lib, wpcap.lib, lglcd.lib, Packet.lib, WinIo.lib, zlibstat.lib and later will come prowizard.lib. Building WinUAE Before compilation you'll have to modify some of the files:
Now you are almost ready for building the subprojects.
Compile (in this order) build86k, gencpu, genlinetoscr, genblitter, gencomp and prowizard. gencomp will only compile as release. Copy prowizard.lib from c:\dev\lib to winuae_libs. Compile winuae and copy portaudio_x86.dll, freetype6.dll and zlib1.dll to the output directory. Run WinUAE Last edited by gilgamesh; 04 February 2010 at 21:05. Reason: see #11 |
|
02 February 2010, 22:15 | #2 | |
Zone Friend
|
Very nice work.
One basic question: Quote:
Shouldn't they be in the WinUAE source code by default? |
|
02 February 2010, 22:30 | #3 |
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
Yes, I think so. Toni probably uses an older version of Ghostscript and some of the other dependencies.
|
03 February 2010, 09:13 | #4 |
Global Moderator
Join Date: May 2001
Location: Derby, UK
Age: 46
Posts: 2,289
|
Nice guide just what I've always wanted, shame I uninstalled Visual Studio 10 when MAME switched to mingw64. I might try again if they release a 3rd beta.
|
03 February 2010, 20:03 | #5 |
Posts: n/a
|
Nice Guide... Will be giving it a go over the next few days when I have a bit of time... Will let you know how I get on.
Cheers LOGIK123 |
03 February 2010, 20:43 | #6 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
Nice guide but unfortunately I found some issues as usual
Quote:
(you are right that API has changed: parser.c gs_main_instance needs to be replaced with void) Quote:
|
||
03 February 2010, 21:33 | #7 |
Zone Friend
|
Is that bad?
Well, if we can expect some future source fixes in return that may make some of those ... uh ... kludges obsolete, it was worth it Even those freaks compiling their stuff themselves should not need to mess around in the given code too much to get things compiled... (IMHO && YMMV) |
03 February 2010, 22:37 | #8 | ||
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
Thank you all for your comments. But now to the issues
Quote:
Quote:
Yes, if you consider Turrican II a test? |
||
04 February 2010, 16:20 | #9 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
Quote:
Quote:
|
||
04 February 2010, 20:32 | #10 | |
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
Quote:
This is the dilemma: Without imain.h I get syntax and undeclared identifier errors, e.g. C2143 in line 85 parser.c, C2065 for GSAPI_NEW_INSTANCE, GSAPI_DELETE_INSTANCE, etc. (71 errors in parser.c). gmain.h depends on ghost.h. ghost.h depends on several Ghostscript headers. (My method works for me anyway, but I'd like to understand what went wrong.) |
|
04 February 2010, 20:41 | #11 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
|
04 February 2010, 21:08 | #12 |
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
Wow, now I see. Thanks. I have included this into the document. This saves more than 500 include files.
|
07 February 2010, 06:44 | #13 |
Zone Friend
|
... and makes building the thing now a walk in the park! Awesome, guys!
|
09 July 2010, 16:02 | #14 |
Registered User
Join Date: Jun 2010
Location: USA
Posts: 97
|
I can build 2100, but not 2200.
Is anyone else getting a slew of these with 2200? Error 3 error LNK2001: unresolved external symbol "void __fastcall op_c108_23_ff(unsigned int)" (?op_c108_23_ff@@YIXI@Z) winuae cpustbl.obj |
09 July 2010, 17:16 | #15 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
Are you using MSVC 2010 or older? Old MSVC project files are out of date.
|
09 July 2010, 19:49 | #16 |
Registered User
Join Date: Jun 2010
Location: USA
Posts: 97
|
I started with my VS2008 Pro, then installed vc2010 Express with the same error.
I'd rather not use 2010 (I use 2008 for work). I'm not a fan of the per project vc directories, among other things. Thanks, John |
09 July 2010, 19:53 | #17 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
Quote:
Delete all cpuemu*.c files and rebuild build68k and all gen* projects. (and as usual, I don't support old versions, whatever the program ) |
|
10 July 2010, 17:25 | #18 |
Registered User
Join Date: Jun 2010
Location: USA
Posts: 97
|
Yes, I did that repeatedly after looking at the build steps for those projects and finding the build order. I even deleted and replaced the source archive multiple times to make sure I didn't unintentionally change something.
For now I'm just going to stick with 2100, it's fine for what I'm doing at the moment. I'm mainly trying to familiarize myself with how it works, mostly turning off features to simplify the code path and stepping through it. You probably know this, but a lot of the #defines can't be turned off without adding quite a few #ifdefs. You're welcome to my changes if you want, but I thought I read somewhere that you weren't a fan of lots of #ifdefs. Thanks, it's awesome work. John |
10 July 2010, 17:43 | #19 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
Quote:
(perhaps your problem was missing #define CPUEMU_21) |
|
10 July 2010, 19:00 | #20 |
Registered User
Join Date: Jun 2010
Location: USA
Posts: 97
|
I double checked that just now and all the CPU defines are there, I wanted those.
What I've removed are just defines for emulated hardware I don't ever intend to use (Arcadia, Akiko, parallel and serial ports, SCSI hardware, etc). This also had the bonus of removing a lot of the dependencies. It's a little overwhelming with everything enabled and fixing those ifdefs actually gave me a better understanding of the code. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dr. Strangelove's guide to compiling WinUAE 1.6.1 | gilgamesh | support.WinUAE | 65 | 08 July 2010 12:49 |
Compiling WinUAE 2.1.0 | rotacak | support.WinUAE | 8 | 06 May 2010 17:09 |
Idiots guide to compiling WinUAE? | Ian | New to Emulation or Amiga scene | 1 | 28 September 2009 14:30 |
Compiling WinUAE with VS 2005 Express ? | girv | support.WinUAE | 23 | 04 December 2006 21:26 |
Compiling WinUAE 1.3.2 | rotacak | support.WinUAE | 1 | 06 October 2006 20:34 |
|
|