Announcement

Collapse

Forum etiquette

Our mission ...

This forum is part of our mission to promote the preservation of vintage computers through education and outreach. (In real life we also run events and have a museum.) We encourage you to join us, participate, share your knowledge, and enjoy.

This forum has been around in this format for over 15 years. These rules and guidelines help us maintain a healthy and active community, and we moderate the forum to keep things on track. Please familiarize yourself with these rules and guidelines.


Remain civil and respectful

There are several hundred people who actively participate here. People come from all different backgrounds and will have different ways of seeing things. You will not agree with everything you read here. Back-and-forth discussions are fine but do not cross the line into rude or disrespectful behavior.

Conduct yourself as you would at any other place where people come together in person to discuss their hobby. If you wouldn't say something to somebody in person, then you probably should not be writing it here.

This should be obvious but, just in case: profanity, threats, slurs against any group (sexual, racial, gender, etc.) will not be tolerated.


Stay close to the original topic being discussed
  • If you are starting a new thread choose a reasonable sub-forum to start your thread. (If you choose incorrectly don't worry, we can fix that.)
  • If you are responding to a thread, stay on topic - the original poster was trying to achieve something. You can always start a new thread instead of potentially "hijacking" an existing thread.



Contribute something meaningful

To put things in engineering terms, we value a high signal to noise ratio. Coming here should not be a waste of time.
  • This is not a chat room. If you are taking less than 30 seconds to make a post then you are probably doing something wrong. A post should be on topic, clear, and contribute something meaningful to the discussion. If people read your posts and feel that their time as been wasted, they will stop reading your posts. Worse yet, they will stop visiting and we'll lose their experience and contributions.
  • Do not bump threads.
  • Do not "necro-post" unless you are following up to a specific person on a specific thread. And even then, that person may have moved on. Just start a new thread for your related topic.
  • Use the Private Message system for posts that are targeted at a specific person.


"PM Sent!" messages (or, how to use the Private Message system)

This forum has a private message feature that we want people to use for messages that are not of general interest to other members.

In short, if you are going to reply to a thread and that reply is targeted to a specific individual and not of interest to anybody else (either now or in the future) then send a private message instead.

Here are some obvious examples of when you should not reply to a thread and use the PM system instead:
  • "PM Sent!": Do not tell the rest of us that you sent a PM ... the forum software will tell the other person that they have a PM waiting.
  • "How much is shipping to ....": This is a very specific and directed question that is not of interest to anybody else.


Why do we have this policy? Sending a "PM Sent!" type message basically wastes everybody else's time by making them having to scroll past a post in a thread that looks to be updated, when the update is not meaningful. And the person you are sending the PM to will be notified by the forum software that they have a message waiting for them. Look up at the top near the right edge where it says 'Notifications' ... if you have a PM waiting, it will tell you there.

Copyright and other legal issues

We are here to discuss vintage computing, so discussing software, books, and other intellectual property that is on-topic is fine. We don't want people using these forums to discuss or enable copyright violations or other things that are against the law; whether you agree with the law or not is irrelevant. Do not use our resources for something that is legally or morally questionable.

Our discussions here generally fall under "fair use." Telling people how to pirate a software title is an example of something that is not allowable here.


Reporting problematic posts

If you see spam, a wildly off-topic post, or something abusive or illegal please report the thread by clicking on the "Report Post" icon. (It looks like an exclamation point in a triangle and it is available under every post.) This send a notification to all of the moderators, so somebody will see it and deal with it.

If you are unsure you may consider sending a private message to a moderator instead.


New user moderation

New users are directly moderated so that we can weed spammers out early. This means that for your first 10 posts you will have some delay before they are seen. We understand this can be disruptive to the flow of conversation and we try to keep up with our new user moderation duties to avoid undue inconvenience. Please do not make duplicate posts, extra posts to bump your post count, or ask the moderators to expedite this process; 10 moderated posts will go by quickly.

New users also have a smaller personal message inbox limit and are rate limited when sending PMs to other users.


Other suggestions
  • Use Google, books, or other definitive sources. There is a lot of information out there.
  • Don't make people guess at what you are trying to say; we are not mind readers. Be clear and concise.
  • Spelling and grammar are not rated, but they do make a post easier to read.
See more
See less

CGA mode 4, Horizontal displayed over EGA/VGA

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    CGA mode 4, Horizontal displayed over EGA/VGA

    Hi there!

    I'm now messing with the CGA registers. My goal is to achieve horizontal hardware scrolling on CGA 4 color mode without flickering. I achieved to reduce the horizontal displayed on the CGA (emulated, I have no real CGA to play with):

    Code:
    outp (0x3D4,1);
    outp (0x3D5,39);
    But this has no effect on EGA or VGA. According to the documentation, that register number has another function on the EGA/VGA.

    So my question is: is there an EGA register that sets the horizontal displayed? I looked on the documentation and on Wilton's book and I found vertical displayed but had no luck with the horizontal ones. My idea is to use a detection code to tell if we are using a CGA or an EGA/VGA, so setting the adequate ports for reducing the visible width on each adapter, as I want my code work on as many adapters as possible, not only pure CGAs.

    Thank you so much!

    #2
    I correct myself: it has effect on the EGA, albeit slightly different to the CGA. My mistake was trying it only on the VGA thinking that it would behave the same on EGA.

    On the EGA it cuts the right end but maintains the lines organization (i.e, the image does not distort, just trims). On the CGA the image distorts completely as, I guess, the number of pixels per line is changed.

    Comment


      #3
      The good news is that you're going to have a lot of fun playing around with video card registers!

      The bad news is that 3D4/3D5 are the I/O ports for the CRTC, and each of the CGA EGA and VGA cards uses a different and somewhat-incompatible CRTC register layout.

      If you use the video BIOS to set the modes using INT 10h and restrict yourself to simply read/write the video memory only, then yes the VGA is backwards compatible with the EGA which is backwards compatible with the CGA. But the moment you start poking at registers, the three cards are quite different. (Some older EGA cards had hardware emulation of the CGA registers, because many CGA games will bypass the BIOS and poke at the hardware registers.)

      Once you start departing from the standard video modes, you'll find emulators do all sorts of odd things, and your desire to get actual hardware will eventually become overwhelming.

      Good reference material for CGA, available at minuszerodegrees.net:
      - IBM PC Technical Reference Manual for the IBM BIOS source listing (for the INT 10h handler and mode setting code)
      - IBM PC Options & Adapters manual for the IBM CGA card register descriptions and schematics

      For the EGA, there's the official IBM documentation for the card, but it's not very helpful because most of the functionality is contained inside four IBM proprietary chips. But CHIPS reverse engineered the whole thing and produced the first EGA clone chipset, the CS8240 "Enhanced Graphics CHIPset". Get a copy of the datasheet for that, which documents every single I/O pin of all four chips plus every single register -- the EGA is a bit unusual because the registers are spread out amongst all four chips.

      And finally we come to VGA, which has been extensively documented. I really like the Cirrus Logic "CL-GD542X Technical Reference Manual", which again goes into great detail about all of the available registers and modes.

      Comment

      Working...
      X