Solved

Graphics Tutorial part 2

Posted on 2004-05-02
12
1,582 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Assembly Language program in MIPS 4 540
Buffer Overflow Bomb Assignment - Final Phase 3 1,562
Assembly doubt on logical or operations 3 314
Dialog Button Color 3 108
What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
There are many Password Managers (PM) out there to choose from. PM's can help with your password habits and routines, but they should not be a crutch you rely on too heavily. I also have an article for company/enterprise PM's.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

910 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

18 Experts available now in Live!

Get 1:1 Help Now