Pushing Pixels To A Display With VGA Without A PC

[Ben Eater] is back with the second part of his video series on building a simple video card that can output 200×600 pixels to a display with nothing but a VGA connection, a handful of 74-logic chips and a 10 MHz crystal. In this installment we see how he uses nothing but an EEPROM and a handful of resistors to get an image onto the screen.

The interesting part is in how the image data is encoded into the EEPROM, since it has to be addressable by the same timing circuit as what is being used for the horizontal and vertical timing. By selecting the relevant inputs that’d make a valid address, and by doubling the size of each pixel a few times, a 100 x 75 pixel image can be encoded into the EEPROM and directly addressed using this timing circuit.

The output from the EEPROM itself not fed directly into the monitor, as the VGA interface expects a 0 V to 0.7 V signal on each RGB pin, indicating the brightness. To get more than three colors out of this setup, [Ben] builds up a simple 2-bit DAC that allows for two bits per channel, meaning four brightness levels per color channel or 64 colors effectively.

See the video after the link for the full details. While pretty close to perfect, a small issue remains at the end in the forms of black vertical lines. These are caused by a timing issue in the circuit, with comments on the YouTube video suggesting various other potential fixes. Have you breadboarded your own version yet to debug this issue before [Ben]’s next video comes out?
Continue reading “Pushing Pixels To A Display With VGA Without A PC”

ESP32 Gets Advance Windowed Apps Using This VGA GUI Library

We featured [Fabrizio Di Vittorio]’s FabGL library for the ESP32 back in April of this year. This library allows VGA output using a simple resistor based DAC (3 resistors for 8 colors; 6 resistors for 64 colors), and includes functions for PS/2 mouse and keyboard input, a graphics library, and many of the miscellaneous functions you might need to develop games on the ESP32. Now, a GUI interface library has been added to ease application development.

The GUI, of course, runs on the VGA output. The library includes what you’d expect from a minimal windowing GUI, like keyboard and mouse support, windows with the usual minimize/maximize/close controls, and modal and message dialog boxes. For input controls, there are labels, text boxes, buttons, radio buttons, checkboxes, normal and editable combo boxes, and listboxes — you know, pretty much everything you need to develop a modern GUI application. All the code is open-source (GPL 3.0) and in the GitHub repo.

While the original FabGL had a game-development orientation, the addition of this new GUI functionality opens up a new range of applications. If you want to find out more about using the FabGL library, you can check out our previous coverage of the mostly game-oriented functions.

You can get a look at the new GUI functions in action in the video, after the break.

Continue reading “ESP32 Gets Advance Windowed Apps Using This VGA GUI Library”

Low Res Video Card Is Still Amazing Since It’s Made Out Of Logic Chips

[Ben Eater] has been working on building computers on breadboards for a while now, alongside doing a few tutorials and guides as YouTube videos. A few enterprising hackers have already duplicated [Ben]’s efforts, but so far all of these builds are just a bunch of LEDs and switches. The next frontier is a video card, but one only capable of displaying thousands of pixels from circuitry built entirely on a breadboard.

This review begins with a review of VGA standards, eventually settling on an 800×600 resolution display with 60 MHz timing. The pixel clock of this video card is being clocked down from 40 MHz to 10 MHz, and the resulting display will have a resolution of 200×150. That’s good enough to display an image, but first [Ben] needs to get the horizontal timing right. This means a circuit to count pixels, and inject the front porch, sync pulse, and back porch at the end of each horizontal line.

To generate a single horizontal line, [Ben]’s circuit first has to count out 200 pixels, send a blanking interval, then set the sync low, and finally another blanking interval before rolling down to the next line. This is done with a series of 74LS161 binary counters set up to simply count from 0 to 264. To generate the front porch, sync, and back porch, a trio of 8-input NAND gates are set up to send a low signal at the relevant point in a horizontal scan line.

The entire build takes up four solderless breadboards and uses twenty logic chips, but this isn’t done yet: all this confabulation of chips and wires does is step through the pixel data for the horizontal and vertical lines. A VGA monitor detects it’s in the right mode, but there’s no actual data — that’ll be the focus of the next part of this build where [Ben] starts pushing pixels to a monitor.

Continue reading “Low Res Video Card Is Still Amazing Since It’s Made Out Of Logic Chips”

Logic And EEPROMs Bring VGA To Life, Sans Microcontroller

For whatever reason, the Video Graphics Array standard seems to attract a lot of hardware hacks. Most of them tend to center around tricking a microcontroller into generating the signals needed to send images to a VGA monitor. We love those hacks, but this one takes a different tack – a microcontroller-free VGA display that uses only simple logic chips and EEPROMs.

When we first spied this project, [PH4Nz] had not yet shared his schematics and code, but has since posted everything on GitHub. His original description was enough to whet our appetite, though. He starts with a 27.175-MHz clock and divides that by 4 with a 74HCT163, which has the effect of expanding the 160×240 pixels image stored in one of the EEPROMs to 640×480. Two 8-bit counters keep track of horizontal and vertical positions, while the other EEPROM takes care of generating the Hsync and Vsync signals. It’s all quite hackish, but it works. [PH4Nz] tells us that the whole thing is in support of a larger project: an 8-bit computer made from logic chips. We’re looking forward to seeing that one too.

This isn’t the first microcontroller-less VGA project we’ve seen, of course. Here’s a similar one also based on EEPROMs, and one with TTL logic chips. And we still love VGA on a microcontroller such as the ESP32; after all, there’s more than one way to hack.

Thanks to [John U] for the tip.

A Full-Stack Web Browser

Interviewing to be a full-stack engineer is hard. It’s a lot harder than applying for a junior dev job where you’re asked to traverse a red-black tree on a whiteboard. For the full-stack job, they just give you a pile of 2N2222 transistors. (The first company wasn’t a great fit, and I eventually found a place that gave me some 2N2907s for the interview.) That said, there’s a certain challenge in seeing how far you can push some doped silicon. Case in point, [Alastair Hewitt]. He’s building a computer to browse the world wide web from the gate level up.

The goal of this project is to browse the web using only TTL logic. This presents problems that aren’t readily apparent at first glance. First up is being able to display text on a screen. The easiest way to do this now is to get a whole bunch of modern memories that are astonishingly fast for a 1970s vintage computer. This allows for VGA output, and yes, we’ve seen plenty of builds that output VGA using some big honkin’ memories. It turns out these RAM and ROM chips are a little better than the specs say they are, and this computer is overclocked from the very beginning.

A bigger problem is how to interface with a network. This is a problem for very old computers, but PPP still exists and if you have the software stack you can read something from a server over a serial connection. [Alistar] actually found the UART frequency was more important than the dot clock frequency of VGA, and the system clock must therefore be built around the serial port, not the display interface. This means the text mode interface is actually 96 columns instead of the usual 80 columns.

It’s very easy to say that you’re building a computer on a bread board. It’s another thing entirely to actually do it. This is actually a surprisingly well-though out sketch of a computer system that will, theoretically, be able to connect to the Internet. Of course, the reality of the situation is that this computer will be connecting over serial to a computer that’s connected to the Internet, but there’s no shame in that. You can check out the progress on the GitHub for this project.

FabGL Has Everything You Need To Write Games For The ESP32

Typically, when one considers writing a video game, the platform is among the first decisions to be made. The PC can be an easy one to start with, and mobile development is fairly accessible too. Of course, you could always develop for a microcontroller platform instead. [Fabrizio Di Vittorio] has built the perfect set of tools to do just that with the ESP32, by the name of FabGL.

The library contains a laundry list of features that are perfect for developing games. There’s VGA output with up to 64 colors, PS/2 mouse and keyboard inputs, as well as a capable graphics library and game engine. It can even act as an ANSI/VT terminal if necessary.

[Fabrizio] has put the hardware through its paces, with a variety of benchmarks displaying impressive performance with simple balls, polygons and sprites. You could easily produce a 2D game in an early 90s style without running into any hardware limitations — though given the ESP32 clocks in at up to 240MHz, that’s somewhat to be expected.

It’s an impressive project (video after the break), and we’d love to see more games developed on the platform. Once you have a VGA connector wired in you should try out some ESP32 VGA hacks. And for those ESP8266 die hards there’s a game engine for that chip too!

Continue reading “FabGL Has Everything You Need To Write Games For The ESP32”

ESP32 Video Tricks Hack Chat With Bitluni

Join us Wednesday at noon Pacific time for the ESP32 Video Tricks Hack Chat!

The projects that bitluni works on have made quite a few appearances on these pages over the last couple of years. Aside from what may or may not have been a street legal electric scooter, most of them have centered around making ESP32s do interesting tricks in the analog world. He’s leveraged the DACs on the chip to create an AM radio transmitter, turned an oscilloscope into a video monitor, and output composite video. That last one was handy for turning a Sony Watchman into a retro game console. He’s also found ways for the ESP32 to output VGA signals. Looks like there’s no end to what he can make the versatile microcontroller do.

Although the conversation could (and probably will) go anywhere, we’ll start with video tricks for the ESP32 and see where it goes from there. Possible topics include:

  • Tricks for pushing the ESP32 DACs to their limits;
  • When to use an external DAC;
  • Optimizing ESP32 code by running on separate cores; and
  • What about HDMI on the ESP32?

You are, of course, encouraged to add your own questions to the discussion. You can do that by leaving a comment on the ESP32 Video Tricks Hack Chat and we’ll put that in the queue for the Hack Chat discussion.

join-hack-chatOur Hack Chats are live community events on the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, March 27, at noon, Pacific time. If time zones have got you down, we have a handy time zone converter.

Click that speech bubble to the right, and you’ll be taken directly to the Hack Chat group on Hackaday.io. You don’t have to wait until Wednesday; join whenever you want and you can see what the community is talking about.