[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Graphics Tutorial part 2

Posted on 2004-05-02
12
Medium Priority
?
1,621 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
12 Comments
 
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 15

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
Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

 
LVL 15

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
 
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 200 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Geo-targeting is the practice of distributing content based on a person’s location, as best as you can determine it. Let’s look at some ways you could successfully use this tactic. The following tips and case studies could lead to meaningful results.
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

649 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