vga mem on xp

Started by
8 comments, last by Erik Rufelt 20 years, 9 months ago
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
Advertisement
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.
Disclaimer: "I am in no way qualified to present advice on any topic concerning anything and can not be held responsible for any damages that my advice may incurr (due to neither my negligence nor yours)"
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
why do u want to use mode 13h?

DOS IS DEAD!!!

Cause I like it =)
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...
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.
3D Side-Scroller game demo Project-X2 "playable"Lashkar: A 3D Game & Simulation Project demo @ lashkar.berlios.de
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.
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.
JRA GameDev Website//Bad Maniac
Thanks a lot!
I will try Turbo C

/Erik

This topic is closed to new replies.

Advertisement