djgpp: writing video buffer in WIN NT?

Started by
8 comments, last by io 22 years, 9 months ago
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.
Advertisement
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
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
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
The Great Milenko"Don't stick a pretzel up your ass, it might get stuck in there.""Computer Programming is findding the right wrench to hammer in the correct screw."
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 .
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...
The Great Milenko"Don't stick a pretzel up your ass, it might get stuck in there.""Computer Programming is findding the right wrench to hammer in the correct screw."
Sorry I missed the djgpp prefix...

The biggest problem you''ll have is switching the video mode, in all likely hood NT will generate an exception when that code executes, maybe not though.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
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
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
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
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
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
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

This topic is closed to new replies.

Advertisement