reenigne
Veteran Member
I've spent a long time (probably way too long) staring at the schematics for the IBM CGA cards for one reason or another, and doing so has given me an idea for a sort of game. I'm not sure if there's anybody out there other than me who would be interested in playing it but if there is I'm sure this is the best place to find them.
The game is this: you have time travelled back to 1980 and find yourself working on Don Estridge's team at IBM, and your job is to design the CGA card. Knowing what you know now, how would you design it differently to make it more versatile for the games programmers who will write software targetting it? You still have the same constraints:
I haven't been able to find a 1980-era price list for 74xx/74Sxx/74LSxx logic chips, but for the purposes of the game the absolute prices aren't really important, only the ratios between them. I'm sure the chips used to be more expensive back then but the price ratios probably haven't changed too much so here's the modern prices for large quantities of the nearest available equivalents.
Here are some possible changes, roughly in order of least to most difficult:
Steve Wozniak was famous for being able to do amazing things with very small amounts of discrete logic - I wonder what the CGA would be able to do if he had designed it.
Any suggestions for good ways to achieve any of these changes? Or other changes that you'd want to make to the card?
The game is this: you have time travelled back to 1980 and find yourself working on Don Estridge's team at IBM, and your job is to design the CGA card. Knowing what you know now, how would you design it differently to make it more versatile for the games programmers who will write software targetting it? You still have the same constraints:
- It has to support the same RGBI and composite monitors.
- It has to have a 320x200 4 colour all-points addressable mode.
- It has to have a 640x200 2 colour all-points addressable mode.
- It has to have 40x25 and 80x25 text modes with the same colours, font and attributes.
- The flashing text and cursor have to flash at the same rates.
- Text must not blink when the cursor is on.
- It has to have 16KB of DRAM.
- It has to be based around a 6845 CRTC.
- It has to fit on a standard full-length ISA card.
- It has to include light pen support.
- You can't increase the cost.
- You have to continue to use the same TTL discrete logic chips used in the original card - no ULA/PAL or anything like that (74-series TTL chips that were available in 1980 but weren't actually used on the CGA are also allowed).
- It can't conflict with any of the other memory addresses or IO ports used by the original PC.
I haven't been able to find a 1980-era price list for 74xx/74Sxx/74LSxx logic chips, but for the purposes of the game the absolute prices aren't really important, only the ratios between them. I'm sure the chips used to be more expensive back then but the price ratios probably haven't changed too much so here's the modern prices for large quantities of the nearest available equivalents.
Here are some possible changes, roughly in order of least to most difficult:
- Modify the wait state so it's between 0 and 6 CPU cycles instead of between 3 and 8 CPU cycles as it currently is.
- Change the CGA character ROM from this to this, replacing the third quarter (the unused "thin font") with some patterns which are useful for "graphics in text mode", and make it selectable from software (perhaps repurposing the palette register bits that have no effect in text mode). This would make the 160x100x16 mode much more flexible, becoming a pseudo-640x100x16 mode and a pseudo-320x200x16 mode depending on whether the top or bottom half of the characters are being used. These modes aren't all-points-addressable (there isn't enough RAM for that) - each 8-pixel by 2-scanline block can only have 2 different colours in it, so they would suffer from "attribute clash" like a Commodore 64 or ZX Spectrum. This change would also make many thousands of extra colours possible with a composite monitor.
- Add an option (perhaps reusing the +BLINK mode bit) to not ignore the CRTC's MA12 line in graphics modes. In combination with some CRTC tricks, this makes it possible to implement a linear memory layout instead of the normal interlaced layout.
- Add an option to ignore the RA0 bit in graphics modes, making possible modes like 640x100x2 and 320x100x4 with 2 memory pages.
- Fix the color burst in 80-column text mode - just requires making the color burst pulse a fixed length instead of being gated by the HSYNC pulse from the CRTC.
- Allow interlaced modes to work by starting the vsync pulse start when the CRTC says it starts instead of waiting for the next hsync pulse. This means we have to count for 171 lclk periods instead of 3 scanline periods to determine where the vsync pulse ends (since we need a 3-scanline sync pulse and the CRTC generates a 16-scanline one) so we'd probably need an 8-bit counter.
- Get rid of the wait state on CGA writes altogether by caching writes until CGA RAM is available.
- Allow combining graphics modes with +HRES (160 bytes per line) yielding 1280 column 2 colour and 640 column 4 colour modes (albeit with a reduced viewport or splitscreen since there isn't enough RAM for these modes at full screen). This is *almost* possible with current CGA, but the bytes are not latched at the correct times due to the circuitry that eliminates snow in graphics modes. Also to get 1280 columns you'd need to get rid of the 14.318MHz pixel latch, which might destabilize the image too much (1280 columns isn't terribly useful to start with because of the dot pitches of the available monitors).
- Make the palette fully adjustable in 640x200x2 and 320x200x4 modes (i.e. have 16 bits of palette registers instead of 6) so CGA games don't all have the same ugly green/red/yellow or cyan/magenta/white palettes. In the alternate universe where this change had been made, most CGA games would look dramatically better!
- Allow a 160x200x16 all-points addressable mode (i.e. add a 4-bit pixel sequencer). Combined with some of the other changes this could also yield a 320x100x16 mode and reduced-viewport or splitscreen 320-column 16-colour modes.
- Make the palette fully adjustable in 16-colour modes (i.e. have 64 bits of palette registers) allowing for all sorts of fun palette animation tricks. Probably not possible with existing CGA parts but maybe with a 7489 or similar?
- Eliminate snow altogether during writes. This is actually very hard because there just isn't the memory bandwidth in +HRES mode to retrieve bytes fast enough for the screen and also allow the CPU access. One way might be to store up all the writes and then perform them during the horizontal blanking period. Eliminating snow during reads would require making the CPU wait until the end of the scanline, and probably isn't worth it.
Steve Wozniak was famous for being able to do amazing things with very small amounts of discrete logic - I wonder what the CGA would be able to do if he had designed it.
Any suggestions for good ways to achieve any of these changes? Or other changes that you'd want to make to the card?