Solved

Graphics Tutorial part 2

Posted on 2004-05-02
12
1,590 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASM problem 2 31 346
Recommended programming language 7 385
Buffer Bomb Level 0 23 7,832
programming/ use of multiple cores - theoretical optimization of threads/cores 7 580
If you are looking at this article, you have most likely been hit by some version of ransomware and are trying to find out if there is anything you can do, or what way you should react - READ ON!
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 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