marxb@yvax.byu.edu (02/07/90)
I have recently written a program on my PC at home that has some graphics in it. They look nice on my EGA machine at home but when the program is used on the target PC, the graphics are different because it uses VGA. My question to the Net gurus is how to initialize the VGA computer to run my pro- gram in EGA mode so I don't have to do a lot of code modification. I understand that it can be done but I am not sure how to do it based on the information provided in the manuals. I know it may seem silly to only want EGA graphics but that is all I have and for the application is sufficient. I would greatly appreciate any help on this. Thanks in advance. Brad Marx marxb@byuvax bradm@byuvax
ts@uwasa.fi (Timo Salmi LASK) (02/07/90)
In article <1085marxb@yvax.byu.edu> marxb@yvax.byu.edu writes: > > I have recently written a program on my PC at home that has some >graphics in it. They look nice on my EGA machine at home but when the program >is used on the target PC, the graphics are different because it uses VGA. My >question to the Net gurus is how to initialize the VGA computer to run my pro- >gram in EGA mode so I don't have to do a lot of code modification. I understand If you look at it closely, you will notice that the BGI driver is the same for both EGA and VGA. The difference comes when you set your graphips with InitGraph (or whatever it was; manual not at hand). There you can select EGA and among its modes. See the appropriate keyword in the manual. I can assure you that it works, since I have written programs which have to deal with this. No special steps (except the normal graphics initialization) is necessary. If you init for EGA the VGA system will emulate EGA. But do not use the detect option, because then it will emulate VGA! ................................................................... Prof. Timo Salmi (Moderating at anon. ftp site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun
roberts@wrangell.scl.cwru.edu (Brian Roberts) (02/07/90)
In article <1085marxb@yvax.byu.edu> marxb@yvax.byu.edu writes: > > I have recently written a program on my PC at home that has some >graphics in it. They look nice on my EGA machine at home but when the program >is used on the target PC, the graphics are different because it uses VGA. My >question to the Net gurus is how to initialize the VGA computer to run my pro- >gram in EGA mode so I don't have to do a lot of code modification. I understand >that it can be done but I am not sure how to do it based on the information >provided in the manuals. I know it may seem silly to only want EGA graphics >but that is all I have and for the application is sufficient. I would greatly >appreciate any help on this. Thanks in advance. > >Brad Marx marxb@byuvax > bradm@byuvax I assume you used: InitGraph ( GrDriver, GrMode, '<path>' ); ( Declare GrDriver and GrMode to be of type INTEGER ) Insert the following two lines before InitGraph: GrDriver := <driver>; GrMode := <mode>; <driver> and <mode> can be found on the table below: <driver> <mode> resolution colors pages -------- ------ ---------- ------ ----- EGA EGALo 640 x 200 1 - 16 4 EGAHi 642 x 350 1 - 16 2 EGA64 EGA64Lo 640 x 200 1 - 16 1 EGA64Hi 640 x 350 1 - 4 1 EGAMonoHi 642 x 350 1 on 64K card 2 on 256K card You can also press CTRL-F1 when the cursor is on InitGraph for more help. Brian