Archived

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

Erik Rufelt

vga mem on xp

Recommended Posts

Hey, I''m trying to find a way to write directly to the screen in mode 13h on Windows XP. I''ve searched the net and found some ways to do this, but neither works on XP, only on 95/98/ME. I read that near pointers were disabled on XP, and __djgpp_nearptr_enable() returns 0. Is there any way I can do this on XP? I use dosmemput(image, 64000, 0xA0000); to update the whole screen, but sometimes I only want to update part of the screen, or draw every other line and things like that. Thanks, /Erik

Share this post


Link to post
Share on other sites
I''m pretty sure it''s not possible (with a newer compiler). I can still run some old dos games running in 320x200 on XP, so it''s possible. It''s just that the protected mode compilers are incapable of doing it.

Share this post


Link to post
Share on other sites
Ok, too bad.. but thanks for the reply!
Does anyone know of any non-protected mode compilers that are free to download?
Command line would be good, so I can use a dos script to compile the code, and write it in a windows text editor =)

Thanks,
/Erik

Share this post


Link to post
Share on other sites
quote:
Original post by Erik Rufelt
Ok, too bad.. but thanks for the reply!
Does anyone know of any non-protected mode compilers that are free to download?
Command line would be good, so I can use a dos script to compile the code, and write it in a windows text editor =)

Thanks,
/Erik


you can download Turbo C++ from Borland''s site. IMO, is the best real mode C/C++ compiler...

Share this post


Link to post
Share on other sites
quote:
Original post by Erik Rufelt
Cause I like it =)


i like it too.

Let me tell you am incident.

I got a tutorial on getting pointer to vga card mem. Im on XP and GForce card.

I typed it in MSVC7.0 and ran it. Suddenly a screen got black and blanked. The computer restarted.

Share this post


Link to post
Share on other sites
Real mode, and protected mode''s are completely different.

I used borland turbo C/C++ 3.0 for dos for a long time, and all my 13h stuff still runs fine under win xp, it''s a 16-bit real mode compiler. If you go to borland''s site, they have an older version available for free (2.0 I beleive), in which I used when I couldn''t find my 3.0 instalation files, and it worked fine with mode 13h.

Share this post


Link to post
Share on other sites
Direct Draw lets you have pseudo direct access to the memory, I''äd recommend looking at Trick of the Windows Game Programming Gurus by André Lamothe.
He basically shows you how to use DirectDraw to "cover up" Windows and get a DOS like environment to program graphics in.

Share this post


Link to post
Share on other sites