please help - video memory
this may be a very newbish post, but i need some help over here... two questions, first and second
i'm working on a program that needs to run totally separated from windows (utopically)... currently i'm running it from windows' dos console, but i don't know how to instruct the video card directly, no need for anything complicated, just being able to pinpoint each pixel and to draw and color that pixel, and it must be done as directly as possible...
anyone out there can give a pointer?
i've looked for this information everywhere, but found only directX and such...
now second, i need the classes' methods to be able to get any kind of data (not just to polymorph, but to be able to handle anything to drops by)... right now i'm working with inheritance, all of my objects being a subobject of a control class called ZS and is working fine as far as methods are concerned (they are able to receive any type) but what i'm aiming at is an alghorithm to make methods able to recognize their 'incoming' by interaction afterwards, this is that the class' method first receives a subtype of ZS but then internally analyses the type to determine what it is exactly...
Not such a simple thing...
There are good reasons why you can't find the info you're looking for. There are two issues -
- Windows (except Win98 or older) will not allow a user mode program to directly access memory. You have to write a kernel mode (driver) program. Writing drivers is an advanced topic.
- In general, Windows hardware is not exactly standardized... Each video chip/card has a specialized driver written for the specific hardware.
The manufacturer's driver is the key. The driver knows how translate/communicate with the both the OS and the hardware. The idea is that the Windows programmer doesn't have to know anything about the hardware. He/she can use standard Windows API functions to display video or to query the video capabilities.
The hardware design and the driver are proprietary. I doubt that you can get any memory-map or driver/firmware information from the video card manufacturer. For example, printer manufacturer's no longer publish the "escape codes" that set font size, etc.
There is a standard start-up mode that allows the video card to display low resolution graphics before the OS and driver are loaded. There may be other standard or psudo-standard modes... I don't know the details about video cards... So, it may not be as quite as bad as I think.
The Windows driver model looks something like this:
OPERATING SYSTEM> <WINDOWS STANDARD DRIVER> <MANUFACTURER'S DRIVER> <FIRMWARE/HARDWARE
Maybe you don't need to write directly to video memory. There are simple WinAPI functions that you can use to set pixels at an X,Y location on the screen (or in a window). I don't know the functions off the top of my head, and of course you need to use them within a Windows program.
I don't quite understand your 2nd question, and I probably couldn't answer it anyway. :(