Solved

Graphics Tutorial part 2

Posted on 2004-05-02
12
1,578 Views
Last Modified: 2009-12-16
I guess I closed that last question too fast.  [url]http://www.experts-exchange.com/Programming/Programming_Languages/Assembly/Q_20974198.html[/url]

What's the difference between CGA and VGA?  Is it just the amount of colors?  Could I use a VGA tutorial for CGA?  

If not, does anybody have a tutorial just on CGA?  For beginning assembly on the 8086.  Nothing to do with pascal.  I noticed a lot of those links involved pascal. That's way different than what we're doing I think.  We don't have for loops or if then statements.
0
Comment
Question by:chaosrage
  • 3
  • 3
  • 2
  • +1
12 Comments
 

Author Comment

by:chaosrage
ID: 10973407
0
 
LVL 2

Expert Comment

by:enkimute
ID: 10975172
are you using old hardware ? Because todays hardware has no support for CGA anymore .. And no, you can't use a VGA tutorial to
learn CGA programming. Anyway, programming the CGA is so akward and the technology and techniques behind it are outdated and
not used anymore. So unless you _need_ to make something work on CGA, I sugest learning something that can actually be of some
use to you in the future. VGA Mode $13 programming uses a linear memory setup and the techniques approach those still used for
todays graphics cards.

But if you insist ..

http://thorkildsen.no/faqsys/docs/cga.txt

0
 
LVL 14

Expert Comment

by:Hamidreza Vakilian
ID: 10977511
Hello!

Yse, As enkimute Mentioned CGA Is Very Old. I Recommend You To Use a Mode Of SuperVGA Modes (High Resolution/High Colors/Supported Under Real Mode)

Best Wishes...
Programmer-x
0
 
LVL 14

Expert Comment

by:Hamidreza Vakilian
ID: 11014884
Why Don't You Say Something !!?

I Recommended You To Use a Mode Of SuperVGA Modes (High Resolution/High Colors/Supported Under Real Mode).

So What Do You Think?

Best Regards...
Programmer-x
0
 

Author Comment

by:chaosrage
ID: 11077833
Won't work.  She says we have to use CGA.  Heh.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Expert Comment

by:enkimute
ID: 11078729
hehe bloody teachers ;)

The reference work here would be Abrash's "Zen of Graphics Programming", which you can download
an online copy of right :

http://www.dvara.net/HK/zen.asp

there ..

If I'm not mistaking there's still a chapter on the CGA that explains all you need to now ..

e.

0
 

Author Comment

by:chaosrage
ID: 11176770
I didn't see any chapter on CGA.  Oh well, the semester's over with anyway.
0
 
LVL 8

Expert Comment

by:adg080898
ID: 11365998
What? All (PC) graphics adapters are CGA compatible! VGA is backward compatible all the way back to monochrome (although most BIOS's set it to be compatible back to CGA, the monochrome registers and memory map are different than CGA onward).

Now it depends on what you mean by compatible. VGA has protection registers that make it ignore certain direct-register-access to prevent you damaging the monitor with crazy timings. You have to unlock the timing registers when you REALLY want to change the timings, and you KNOW it is a VGA.

As long as you use INT 10h for the modeset, you can access the video memory and draw just like a real CGA video card.

Don't believe me? Get Commander Keen (from ID software), it is an ancient CGA side-scroller. It will run on a VGA.
0
 
LVL 8

Accepted Solution

by:
adg080898 earned 50 total points
ID: 11366030
> What's the difference between CGA and VGA?  Is it just the amount of colors?

No. The VGA is vastly superior to CGA. VGA allows higher resolutions, and more colors. Since it allows more than 64KB of video memory, VGA is much more complex to use (the CPU only gets to "see" 64KB at address 0xa0000). The only VGA mode that is simple to access is mode 0x13 (which is 320x240 256 colors, one byte per pixel).

The VGA is incredibly compatible. It is so compatible, you can set it to emulate an ANCIENT monochrome video card (MDA). It even has extra hardware to emulate EGA color pallettes.

> Could I use a VGA tutorial for CGA?

Absolutely NOT. Almost *nothing* in a VGA tutorial will apply to CGA.
0
 
LVL 8

Expert Comment

by:adg080898
ID: 11366064
By the way, I hope you are an accomplished assembly programmer. Most people are *extremely* confused by the insane video-memory layout of CGA, EGA, and "bit-plane'd" VGA modes!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
A procedure for exporting installed hotfix details of remote computers using powershell
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now