Compiling SSE assembler with VC++ 6.0

Started by
5 comments, last by Chadivision 19 years, 5 months ago
I just bought the book "3D Game Engine Programming". Apparently there were some problems with the code on the CD, so I followed the instructions at http://stefan.zfx.info/3dgep.html, but I'm still having some problems. Chapter 4 has some code written in SSE assembler and I couldn't get it to compile correctly. I am using VC++ 6.0 professional with Service pack 6 installed. My operating system is XP with service pack 2. As far as I know I should be able to compile the SSE code, but I'm still getting errors. Does anyone have any ideas. The sample code on the CD also includes the same math functions written in C++, so if I can't get the SSE to work I could use that, but it wouldn't be nearly as fast.
Atari 2600 Homebrew Author - Someone who is smart enough to learn 6502 assembly language but dumb enough to actually want to use it.
Advertisement
Post some code and tell us where the errors are occuring. Also make sure your CPU supports SSE, what kind of CPU do you have ?
-------------Become part of developing the specifications of a new language. Visit CodeBASIC.org
Dont have the book... so I haven't seen the code....
If its using intrinisic functions, you might need to download the processor pack for VS 6 from MS. other than that, ASM code can be placed right in your code using __asm blocks. Its pretty straightfoward.

You were a little too vague in describing the problems you were having, so thats the best I can help :(
you must have service pack 5. sp6 does not work with the processor pack (the processor pack adds the SSE stuff to VS6):

http://msdn.microsoft.com/vstudio/downloads/tools/ppack/default.aspx
You need processor pack 5. Processor pack 5 requires service pack 5. If you've installed service pack 6 you're screwed. They haven't, and have no plans to, release a processor pack that's compatible with SP6.

Uninstall VC6, reinstall, install SP5, and PP5... or grab the VS.Net 2005 beta. It's free but expires in January. You could also try the command line only VC++.Net Pro compiler, which is also a free download.
I'm sorry that I can't post the code. It's not my code. It's straight out of the book and the publisher would probably frown upon me posting it here.

Basically it checks the processor at runtime and loads different versions of the math functions from a dll, depending upon whether your processor supports SSE2, SSE, or MMX. I just checked Intel.com and apparently my processor does not support SSE, but it does support MMX. It won't be nearly as fast as SSE, but I should be able to get the MMX code working.

I just assumed that I wanted the latest service pack, but from what you're telling me I need to uninstall/reinstall, and then install service pack 5 and processor pack 5. It sounds like that should solve the problem, but for some reason I can't find processor pack 5 on microsoft.com. I searched the download sections for VC++ and Visual Studio with the keyword "processor" and I got zero matches. I tried "pp5" and I still got zero matches.

Does anyone have a link to processor pack 5? I downloaded service pack 5, but I want to make sure I have everything I need before I uninstall VC++.

Assuming I get the proper service pack and processor pack installed, am I correct in assuming that I should be able to compile SSE and SSE2 code? I realize that I won't be able to run it on my PC, but can I compile it on my PC and run it on a PC with a processor that supports SSE or SSE2?

I'm brand new to assembly language (other than very outdated 6502 assembly), so I appreciate you tolerating my ignorance on the subject.
Atari 2600 Homebrew Author - Someone who is smart enough to learn 6502 assembly language but dumb enough to actually want to use it.
Never mind the link to the processor pack. I found it. I just remembered that there is this magical thing called "Google" that helps you find things on the net. I don't know why I didn't think to check there first. Maybe I need more sleep.

I think the processor pack should fix my problems (or at least the programming related ones).
Atari 2600 Homebrew Author - Someone who is smart enough to learn 6502 assembly language but dumb enough to actually want to use it.

This topic is closed to new replies.

Advertisement