Making a microcontroller speak to a VGA monitor has been a consistent project in our sphere for years, doing the job for which an IBM PC of yore required a plug-in ISA card. Couldn’t a microcontroller talk to a VGA card too? Of course it can, and [0xmarcin] is here to show how it can be done with an Arduino Mega.
The project builds on the work of another similar one which couldn’t be made to work, and the Trident card used couldn’t be driven in 8-bit ISA mode. The web of PC backwards compatibility saves the day though, because many 16-bit ISA cards also supported the original 8-bit slots from the earliest PCs. The Arduino is fast enough to support the ISA bus speed, but the card also needs the PC’s clock line to operate, and it only supports three modes: 80 x 25, 16 colour text, 320 x 200, 256 colour graphics, and 640 x 480, 16 colour graphics.
Looking at this project, it serves as a reminder of the march of technology. Perhaps fifteen years or more ago we’d have been able to lay our hands on any number of ISA cards to try it for ourselves, but now eight years after we called the end of the standard, we’d be hard placed to find one even at our hackerspace. Perhaps your best bet if you want one is a piece of over-the-top emulation.
“The Arduino is fast enough to support the ISA bus speed, but the card also needs the PC’s clock line to operate, and it only supports three modes: 80 x 25, 16 colour text, 320 x 200, 256 colour graphics, and 640 x 480, 16 colour graphics.”
Hi, that’s right, but there’s more.
320×200 256c is VGA BIOS mode 13h (aka MCGA)
640×480 16c is VGA BIOS mode 12h
640×480 mono is VGA BIOS mode 11h.
These are the three most common VGA graphics modes, perhaps.
In addition, virtually all VGA cards made from 1988 onwards do support Super VGA in 800×600 16c.
By loading a VBE TSR it’s available as VGA BIOS mode 6Ah and VBE mode 102h.
Other modes such as 640×400 256c were also possible with as little as 256 KB of VGA RAM.
VBE mode would be 100h, if a TSR is loaded.
What’s interesting, though: Many Super EGA cards did support 800×600 16c as an extended resolution years before Super VGA.
They also quickly added support for VGA BIOS modes 11h and 12h in 1987.
Merely 320×200 256c, mode 13h, wasn’t being supported by EGA cards due to lack of a RAM DAC.
Early VGA cards such as ATI VIP did have a max. of 256KB Video RAM and were limited to the official IBM VGA modes, as far as VGA was concerned.
PS: The VGA controller is very programmable.
In early 90s, many graphics demos of demoscene showed what VGA could do on hardware level.
It wasn’t as much of a dumb framebuffer as some make it look like.
EGA and VGA were quite capable in the right hands.
The chips of the ISA bus versions also had emulation modes to switch to CGA, Hercules or AT&T modes.
Here they simulated registers of the Motorola 6845, along with the proper text fonts.
Unfortunately, many VGA card owners didn’t have or keep the DOS driver diskette with the mode utilities.
If they had them at hand, they could have switched to 132×50 text mode and other nice things.
In practice, though, they had no idea what their cards could do, sadly.
They got their VGA card without box and software, rather.
These hi-res text mode were a must have to write proper letters in text-mode without scrolling, for example.
80×25 (last line us status line) was terminal standard since the 1970s, but word processing was more demanding.
With about 132×25 or more it’s possible to have a more faithful typewriter experience.
Alternatively, Hercules graphics mode and a graphical wordprocessing software were close in terms of experience.
Had an Tseng ET4000, dozens of extended modes.
Curious about how many of such cards have ended up in the waste or got “recycled” over the years. With a very coarse assumption of half a billion PC’s in use at any time and them getting replaced every 5 years several billions of such cards must have been made in total.
Many lcd and oled displays for embedded systems have 1 bit per pixel, or 16-24 bits per pixel.
1 bpp is good for monochrome displays, eg. SH110x.
18-24 bpp is good for color, but needs a lot of memory. e.g. ST7789.
What I’d like to see is a 4 bit per pixel mode. Specifically:
4 bit per pixel
two register banks, each register bank 16 registers of 18 bits each.
at any moment, one register bank is used as color lookup table by the video hardware, the other register bank can be written from the microcontroller.
swap the two register banks for fast display changes
Compare: a 240×280 smartwatch display costs 196 kbytes at 18 bpp, but only 32 kbytes at 4bpp. Not only less ram is needed, but also the SPI to the display can be slower. A cheaper microcontroller can be used.
We are buying lots of~< $20 sbc nanocomputer platforms with as many different
instruction sets as possible to test if 64 bit fixed and floating point arithmetic will work on them.
The majority of these sbc platforms used the Arduino IDE.
11/30/2 post
The fixed point a[] = 01000000:00000000 has exponent of(a) = 0000, in twos complement binary.
sizeof(a) = 8 gcc compiler informed. :).
If expoenent of a is 1, then a = 2.
Than a x a = 4 sunce 1 + 1 = 2 expoient.
If the expoent of a is -1 decimal, 1111 binary, then a .5 decial.
a x a = .25 decimal.
Add exponent in binar 1111 + 1111 is easily computer by taking
the ones complemnt of 1111 which is 0000 then adding 1 to get 0001.
0001 + 0001 = 0010 which is 2 decimal.
But since two complement used for the exponent this is 1101 + 0001 = 1110
which is -2 into two complement.
Therefore, floating point integer and fraction arithmetic handled with ease and intelligence.
Creating the appearance of 1 poor education 2 incompetence 3 unintelligence avoided?
Huh???
add this to arduboy and more, sprite system, colot wave, 2d GUI etc.
A brainfart of mine lead to the possibility of using something similar for ISA sound cards for a “tracker” music player that’s flexible since it’s got a socket for period correct soundcards
You dont need any specific ISA sound card to play tracker music. Basic D/A with software mixing is all you need.