CGA timing, request for documentation - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: July 20, 2016, 07:47:43 pm
content: hi,I got an old 1 bit amber color CGA-CRT and I am willing to "adapt" my VGA-VDU to CGAI got it for free, but life is never perfect, there's one catch: CGA's not that well documentedthe pinout and the frequencies can be found on almost every ontopic websearch result for the right keywordsalso the Wikipedia page has a pretty decent summary including colors etc etcbut most of the article deals with the PC-side hardware (video card)not the timing nor the connection between them.I am looking for the timing, an example of time relations between signals,I need it in order to adapt my VGA-VDU, written in VHDLtips and tricks are appreciated

author: MosherIV
author_rank: Super Contributor
timestamp: July 20, 2016, 08:04:07 pm
content: HiI ama little confused, is the screen just amber or full glorious 8 colours?The reason is that if it is just amber, then technically the monitor would MDA (monochrome display adapter) and the timing will be completely different because MDA is much higher resolution than CGA

author: CJay
author_rank: Super Contributor
timestamp: July 20, 2016, 08:10:29 pm
content: Quote from: MosherIV on July 20, 2016, 08:04:07 pmCould also be Hercules but I seem to remember there was a mono monitor standard with CGA type timings as well just to confuse things..

author: MosherIV
author_rank: Super Contributor
timestamp: July 20, 2016, 08:22:21 pm
content: Here are a couple of links that seem to concure on the sync freq/rate for MDAhttp://minuszerodegrees.net/mda_cga_ega/mda_cga_ega.htmhttps://en.m.wikipedia.org/wiki/IBM_Monochrome_Display_AdapterNot sure if IBM officially supported Hercules, Hercules produced a third party display adapter that became a defacto standard.

author: Ian.M
author_rank: Super Contributor
timestamp: July 20, 2016, 08:29:26 pm
content: CGA cards originally had a NTSC compatible composite video output. The timings should be near as dammit NTSC (which is well documented) in all official modes. The CGA and MDA/Hercules pinouts are totally different so it shouldn't be difficult to figure out wha you actually have. I believe you could get mono EGA monitors ('greyscale' in green or amber) which had a certain popularity in companies which differentiated the PC specs different levels of manglement were allowed to have.

author: C
author_rank: Super Contributor
timestamp: July 20, 2016, 08:51:10 pm
content: Think you should look at a 6845 display controller.https://en.wikipedia.org/wiki/Motorola_6845http://www.classiccmp.org/dunfield/r/6845.pdfand NTSCThe CGA circuit was wrapped around a 6845I have seen a better PDF then this one.Note that the graphics memory layout could be a big mess.Instead of a nice simple array, you might have all character row 1 grouped together in memory followed by the remaining rows in groups.You might have two characters displayed while 6845 thinks it is one character. The characters here could be graphic blocks in character time.An example would be the 6845 displaying characters 8 dots wide and 12 rows tall and this turning into a 2w x 3h blocks (4x4 graphic block)The 6845 was programmed to make logic simple even if the graphics memory became a mess.

author: legacy
author_rank: Super Contributor
timestamp: July 20, 2016, 08:55:34 pm
content: Quote from: MosherIV on July 20, 2016, 08:04:07 pmit's amber CRT, used in a transportable computerunfortunately I don't have a graphic card to check which is right, MDA? CGA?and to solve my doubts about timing and signals through a DSO

author: legacy
author_rank: Super Contributor
timestamp: July 20, 2016, 09:04:08 pm
content: Quote from: C on July 20, 2016, 08:51:10 pmmy VGA-VDU is text-only, it allows you to put 80x30 chars on the screen through a serial (RS232) connection, you can also have an hardware cursor, with 3Hz blinkingI am willing to port this VHDL project to the amber CRT, which requires 12V, and it's 9 inches size, very small and cool.I will have to adapt the text screen size, from 640x480 pixel -> 80x30 chars, to 320x200 pixel -> 40x25 char, I also need to redesign my font-rom, from 8x16 to 8x8 pixel

author: legacy
author_rank: Super Contributor
timestamp: July 20, 2016, 09:13:20 pm
content: Code:-- VGA 640x480process (in_clk, in_reset, counter_h, counter_v)beginif in_reset = '1' thencounter_h <= (others => '0');counter_v <= (others => '0');elsif rising_edge(in_clk) then-- Pulse width: Tpw = 96 cycles @ 25 MHz-- Back porch: Tbp = 48 cycles-- Display time: Tdisp = 640 cycles-- Front porch: Tfp = 16 cycles-- Sync pulse time (total cycles) Ts = 800 cycles =640+96+48+16if counter_h >= (639+16) and counter_h <= (639+16+96) thenout_sync_h <= '0';elseout_sync_h <= '1';end if;-- Pulse width: Tpw = 2 lines @ 25 MHz-- Back porch: Tbp = 33 lines-- Display lines: 480 lines-- Front porch: Tfp = 8000 cycles (10 lines)-- Sync pulse time (total cycles) (525 lines= 480+33+2+10if counter_v > (479+10) and counter_v < (479+10+2) thenout_sync_v <= '0';elseout_sync_v <= '1';end if;-- horizontal counts from 0 to 799counter_h <= counter_h+1;if counter_h = 799 thencounter_v <= counter_v+1;counter_h <= (others => '0');end if;-- vertical counts from 0 to 524if counter_v = 524 thencounter_v <= (others => '0');end if;end if;end process;I have to *adapt* something like the above

author: helius
author_rank: Super Contributor
timestamp: July 20, 2016, 09:23:55 pm
content: Hercules was the same display format as MDA, just with bitmap graphics capability. Not all monochrome monitors are MDA/Hercules: for example, many laptop computers had CGA graphics but only monochrome internal panels.Not MDA.Docs on CGA (and other hardware that uses the CRTC chip) timing can be found here.http://www.6502.org/users/andre/hwinfo/crtc/crtc.html

author: CJay
author_rank: Super Contributor
timestamp: July 20, 2016, 09:27:10 pm
content: Quote from: legacy on July 20, 2016, 08:55:34 pmOhhhh, which transportable?Any pics?

author: legacy
author_rank: Super Contributor
timestamp: July 20, 2016, 09:38:23 pm
content: Quote from: CJay on July 20, 2016, 09:27:10 pmUnfortunately I don't know, I got only the glass CRT, unmounted, with its electronicsQuote from: CJay on July 20, 2016, 09:27:10 pm

author: legacy
author_rank: Super Contributor
timestamp: July 20, 2016, 10:26:49 pm
content: maxlogic mx675 rev B, combo, 9pin connector(CGA?MDA?Hercules?) and VGA connectortseng et4000, combo, 9pin connector(CGA?MDA?Hercules?) and VGA connectorI have just called the guy who gave me the CRT for free, he said that the above video cards were working with his CRT, unfortunately they are ISA16 cards, while my PC is ePCI

author: C
author_rank: Super Contributor
timestamp: July 20, 2016, 10:33:55 pm
content: Think of thisChange your font-rom to ram and keep it 8x16 pixel in size just do not use full size all the time. Large fast static ram's are cheap these days,When you program the controller to 8x8 you just load new font in ram or select a different address range. No problem to not use half of the ram to make logic easer.You might make your VHDL project look like a fancy 6845. The problem is getting the settings correct.If you divide Hsync with a programmable divider and phase lock it to 1 Hz and control the Dot clock VCO, setup to a new display should be very easy.When the programmable divider above is correct horizontal on display shows.Adjusting the settings in fancy 6845 for vertical then gets vertical working.Think you will see that the 6845 is your VHDL using ram locations in-place of your constants.

author: Unknown
author_rank: Unknown
timestamp: July 20, 2016, 10:43:32 pm
content: Quote from: legacy on July 20, 2016, 10:26:49 pmJust to note: both those cards/chipsets were multistandard MDA/CGA/EGA/VGA (& the ET4000 at least could also do Hercules, & supported XGA), so it doesn't narrow it down as much as you'd hope.

author: legacy
author_rank: Super Contributor
timestamp: July 20, 2016, 10:43:44 pm
content: Quote from: C on July 20, 2016, 10:33:55 pmatm I am using BRAM, I have enough BRAM inside the fpga

author: legacy
author_rank: Super Contributor
timestamp: July 20, 2016, 10:46:40 pm
content: Quote from: Tac Eht Xilef on July 20, 2016, 10:43:32 pmah, goodso, I need to find a 486 PC with ISA slots, in order to plug in the video cardthis way I can observe signals going to the CRT through my DSO

author: legacy
author_rank: Super Contributor
timestamp: July 20, 2016, 10:53:16 pm
content: p.s. guyslook atthistransportableQuotethe display is 9-inch amber display, CGA graphics, 80 X 25 text, so, it seems the video card was connected to an internal monochrome monitor

author: Ian.M
author_rank: Super Contributor
timestamp: July 21, 2016, 12:00:03 am
content: Trace the input signals from the plug to the monitor PCB. I'm assuming its got a 9 pin plug. The H and V syncs are on known pins, so that leaves you with either MDA/Hercules video on pin 7, and intensity on pin 6 or CGA RGBI on pins 3,4,5 & 6 respectively, or just possibly EGA which also uses pins 2 and 7. If its CGA or EGA there will be a resistor network (or some sort of DAC chip) to combine the colour signals to get a 'greyscale' before it goes to the CRT cathode driver.Seehttp://www.repairfaq.org/REPAIR/F_Pinouts1.html#PINOUTS_016

author: helius
author_rank: Super Contributor
timestamp: July 21, 2016, 12:28:53 am
content: I can't think of any portables that actually used MDA. Generally multistandard super-vga cards didn't support it either. Some had BIOS-level MDA emulation so that software that expected MDA attributes (like underline) would work, but they didn't actually support MDA monitors.

author: Ian.M
author_rank: Super Contributor
timestamp: July 21, 2016, 12:44:07 am
content: I've got a Kangaroo 'portable' (luggable) PC here that had MDA on a built in amber CRT monitor originally. I upgraded it to a Cyrix Cx486SLC2-50 board and a Hercules graphics card so I could run Windows for Workgroups v3.11 on it.Also some EGA cards could be configured for a MDA monitor, so its not unreasonable to suppose that might still have been possible on some multistandard EGA/VGA cards.However the monitor's pinout will tell all, even if its something weird like Mono VGA on a 9 pin connector as that uses the Green pin for the mono signal which would be pin 2. Analog input pins will have 75R to ground and digital ones of that era will typically look like a TTL input i.e 2.5V or higher if floating with the monitor powered up.

author: legacy
author_rank: Super Contributor
timestamp: July 21, 2016, 11:07:09 pm
content: on this weekend I will try to understand betterguys, the fpga(1) is 3.3V while the CRT input is TTL/5Vassuming the bandwidth won't be greater than 20Mhzwhat do you suggest in order to interface the fpga with the CRT ?(1) Spartan3E-500, Xilinx

author: helius
author_rank: Super Contributor
timestamp: July 22, 2016, 01:04:26 am
content: You can use a jellybean octal buffer like 74hct244 to raise 3.3v levels to TTL. If you are doing more stuff in the same domain, the Silego parts are very cool and can save a lot of space while also doing level translation, comparators, PLD, reset, etc.

author: ale500
author_rank: Frequent Contributor
timestamp: July 24, 2016, 02:01:27 pm
content: I used to have a Smasung Snycmaster CRT (14"), the monitor had an input connector with only 9 pins. It came with a 15 to 9 pin cable....

author: wblock
author_rank: Regular Contributor
timestamp: July 24, 2016, 04:48:39 pm
content: Quote from: ale500 on July 24, 2016, 02:01:27 pmEarly VGA monitors had 9-pin connectors. Bad things happened when those monitors were connected to non-VGA cards or vice versa, so they went to the HDD15 connector.