• Advertisement

Archived

This topic is now archived and is closed to further replies.

Direct X Port

This topic is 6515 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi folks, I''m a commercial C programmer (unix) that''s new to the windows environment. I''ve got VC++ 6 Enterprise, and I''m using it to compile my raycasting engine. Problem is, I''ve got several raycasting engine source codes, but, is it possible to compile these DOS programs under the Win32 compiler, and if so, what are the compile switches to set? Eg - union REGS not recognised. This question probably seems ridiculous, but I''m new to the windows environment, not programming. Will I need djgpp or similar in order to compile these DOS programs? Thanks, Martin

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Create a new project and select ''Win32 Console Application''.
Then add your source files to the project (Menu Project > Add to Project...). This will compile your progam as a DOS executable running in a DOS Box under Windows.

Share this post


Link to post
Share on other sites
You will have some problems.

- Union REGS is not supported, since the DOS interrupt mechanism is not really supported under Win32

- You cannot do an INT 0x13 to go to 320x200x8bit screen. You should use the Win32 GDI or DirectDraw for that.

- Direct hardware access (playing sound, displaying images on the screen) is not possible or recommended anymore.

So, porting a DOS app to Win32 can involve a lot of work when the programmers did not implement a hardware abstraction between the main engine code and the display driver, for example. You should rewrite all that stuff to use it''s Win32 counterparts. Not to mention things like 16-bit integers versus 32-bit integers etc.

You could use DJGPP for it, if you want. But then you write a plain DOS application, which I do not recommend these days.

DaBit

Share this post


Link to post
Share on other sites

  • Advertisement