/AppleII-VGA

VGA card for Apple II+/IIe computer

Primary LanguageCMIT LicenseMIT

Apple II VGA Card

This project is a VGA card for Apple II computers to ouput a crisp RGB signal to a VGA monitor instead of having to rely on the composite output. This is accomplished by snooping the 6502 bus and creating a shadow copy of the video memory within a Raspberry Pi Pico, then processing the raw video memory contents to output a "perfect" signal.

+------+                +-----+      +-----------+
| 6502 |________________| RAM |______| Composite | 
| CPU  |  System   \    +-----+      | Video Gen |
+------+   Bus     |                 +-----------+
                   |    +-----------+
                   \____| Raspberry |_________________\
                        |  Pi Pico  |   640x480 VGA   /
                        +-----------+

These features are currently supported:

  • Generates a 640x480@60 VGA signal with 3 bits per color channel using resistor DACs
  • Text mode (monochrome)
  • Lo-res mode with no color fringing between the chunky pixels
  • Hi-res mode with simulated NTSC artifact color
  • Mixed lo-res and hi-res modes with monochrome text and no color fringing
  • Apple IIe video modes: 80-column text, double-lores, & double-hires (thanks to @dkgrizzly and @Paco1979)
  • Soft-monochrome mode to force display as if on a monochrome monitor
  • Some Video-7 RGB card extended graphical modes are implemented

I had these goals in mind during design:

  • Generate video out to a more modern display - I don't have any old CRTs for displaying composite signals any more and composite to HDMI adapters don't work well.
  • Generate crisp video - I wanted "perfect" video output, the way that it should have been barring technical difficulties of displays in 1980. So like, no NTSC artifact coloring where it's not supposed to be.
  • Non-invasive - I didn't want to have to solder or modify my logic board.
  • Common parts - The parts to build should be cheap and easy to get anywhere, just like the original Apple II
  • Open-source - If this helps anyone else make their Apple II better then that's a bonus.

I also wanted to see if a Pi Pico could actually work on an 8-bit CPU bus, since the docs say it should work but there were no code examples.

Project Status

This is currently a DIY project that several folks have built on their own, ranging from hand-wired prototype boards to custom PCBs and run in their Apple II+'s and IIe's. I consider it to be pretty stable at this point.

Included in this repo are:

If you're going to build a card then check the assembly guide and hardware changelog for important notes.

Many thanks go to the folks in the Discussion area to help push this project forward with bug fixes & reports, and design ideas!

Main board Main board

Connector board thanks to @swetland for this idea

Connector board

In the wild Live action shot

80 Columns support for AppleII+

This code implements a videx card virtually mapped to slot 3. The Apple2Vga can be used in slot 7 and let slot 3 empty.

I found out that the videx card is not compatible to grappler+ (printer interface) 'cos they share the same banking rom solution using I/O STB address. I had to remove my printer interface to have the videx running :D.

I decided to virtally map slot 3 directly from the memory in order to leave the devsel signal to change the character rom fonts. So the card can be used in slot 7 but it always maps videx card to slot 3.

AppleII+ running 80 Columms Videos

AppleII Videx Videoterm 80 Columns card Demo running at AppleIIVga by Markadev

AppleII Accessing BBS using Videx Videoterm 80 Columns card running at AppleIIVga by Markadev

AppleII+ running 80 Columms Examples

AppleII 80 Columms Mode 1 AppleII 80 Columms Mode 2 AppleII 80 Columms Mode 3

Comparisons

Here are a few comparisons of the VGA card output vs composite video through a cheap composite -> HDMI adapter

Text Text Mode

Lores Lores Mode

Hires Hires Mode

DHires DHires Mode

80 Columms 80 Columms Mode

Future work

With the Rev B hardware design, the firmware has access to the Apple bus' SYNC signal when installed in slot 7. Theoretically the firmware could synchronize the VGA display scans with the video hardware in the Apple II.

Though possible, it looks like it would be a large overhaul to implement this synchronization and I've found no real-world use for it so I don't plan on completing this functionality.