Archived

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

io

djgpp: writing video buffer in WIN NT?

Recommended Posts

io    122
i''m using WIN NT and had a question about writing a secondary buffer to the video buffer. i want to do something along the lines of: memcpy((unsigned char *)videoBuffer, (unsigned char *)secondaryBuffer, 64000) how can i do this in NT?? or if there''s a better way, that too.

Share this post


Link to post
Share on other sites
Shannon Barber    1681
I''m fairly certain you need to use DirectDraw, unless you what to write a dos app with an old compiler (I can''t remember if Doom ran under NT or not).

And unless you''re in full screen mode and the secondary buffer is the same size as the primary frame buffer, you need to do multiple copies. You''d probably just want to use the built-in DD5 blitter.

I assume you mean NT4, in which case DirectX5 (or maybe 6) is the highest version available.

Magmai Kai Holmlor
- The disgruntled & disillusioned

Share this post


Link to post
Share on other sites
Great Milenko    122
hummm well direct x is all nice and well... but two things... he''s using djgpp... thats a dos compiler.... can''t use direct x... second direct x is a little more complicated than simple dos graphics... its probably better that you experiment with 2d dos first then move into direct x later... expecialy now with dx8... no 2-d so you hafta jump into 3-d right off... depending on your experience level in programming and math this could be a realy big chunk to bite off right now... yes direct x is better than dos graphics but its like saying your going to write quake4 when the only "programming" experience you''ve had it writing batch files... =)

anyways your question... yes and no... there''s a trick to doing it in NT... cmd.exe the dos virutal machine under NT has problems with graphics apps among others... so when you run your game you need to specify command.com as the dos box shell... start -> run -> command.com ...

I''m assuming that you know about switching graphics modes in dos... if not then do a search for "dos graphics" or "mode 13h" I think theres some tutorials on dos graphics on here... dun''t know if they''ve taken them out or not...

but with that info you should now be set to start doing graphics apps/games

have fun

Share this post


Link to post
Share on other sites
MindFlayer    262
I have heard that it is possible to do WIN-32 progs with DJGPP (if you install several components to it), but I think you get rid of lots of problems if you just buy a MS VC++ or other compiler.

If you are using WIN-NT just to do 32bit DOS-programs with DJGPP then forget it. I tried it but I couldn''t get a single program to work with NT. On any other Windows''s it seemed to work (really strange???). Or maybe I just hadn''t installed DJGPP correctly. I really don''t know .

Share this post


Link to post
Share on other sites
Great Milenko    122
yes and no... DJGPP is the native 32-bit dos port of GNU''s GCC... and yes you can write win32 programs with gcc... use one of the win-32 ports of it crygen or something like that and there''s one other... but the DJGPP version can only do 32-bit dos programs...

as far as writing dos programs on NT... yes it is a pain in the ass... but the problem is not the compiler... its the dos virtual machine aka the dos box... the reason that your programs would work on 9x and not on NT is the diffrences in the virtual machine... 9x uses command.com for its virtual machien... NT uses cmd.exe.. cmd exe dosn''t have near the suport for dos programs that command.com has... but this isn''t realy a huge deal because NT also has the command.com virtual machine from 9x... its just that NT defaults to the cmd.exe virtual machine... so by specifiying that you want to run the command.com version(like I explain in my last post) it will use that version and your programs will run fine...

Share this post


Link to post
Share on other sites
Martee    476
Just one little note: cmd.exe isn''t a virtual machine, it''s a command prompt. Same with command.com. The actual virtual machine (although it''s not a ''real'' virtual machine) is ntvdm.

~~~~~~~~~~
Martee

Share this post


Link to post
Share on other sites
Kwizatz    1392
People People!
djgpp is gcc for dos, it can make windows programs if you install some api for it (RSXNT?), however it doesnt have COM support, it wont compile directx apps.
Get the real thing MingW thats Gcc for windows, supports COM (enought to compile Directx apps). dos is dead is not in windows me and is not in windows 2000, I doubt Djgpp will last much again .

Can you run Directx on NT 4 at all? I dont think so, you might develop and compile, but not run in it, directx 8 was the first one to run in 2000 (NT 5) and I am not sure if it works in NT 4.

see ya

Share this post


Link to post
Share on other sites
Martee    476
Actually, DOS is in WinME. It''s just hidden a bit better.

IIRC, NT4 supports up to DirectX 3, and a later SP adds support for DirectPlay 6.

~~~~~~~~~~
Martee

Share this post


Link to post
Share on other sites
io    122
i got a response from the djgpp mailing list. they suggested that i use dosmemput instead. i was having no problems plotting single pixels to the screen, but having a problem displaying the ENTIRE screen in one go. there's not a lot of documentation for NT use that i could find

Edited by - io on July 2, 2001 5:49:00 PM

Share this post


Link to post
Share on other sites