This is a firmware project for a digital DVI/HDMI video card for Apple II. It directly produces a digital video stream from the Apple II's memory content. The signal is output via an HDMI connector, connecting the Apple II to modern displays with HDMI (or DVI) inputs. No more analog signal conversion required.
The project is a collaboration with Ralle Palaveev. His related hardware project is here:
The hardware is based on the PICO controller board. Both, original PICO (RP2040) and newer PICO2 (RP2350) modules are supported. Separate firmware is provided for the two PICO variants.
Currently, there is no difference in A2DVI functionality when using PICO or PICO2. PICO2 is pin-compatible but has a more powerful CPU, more memory, more flash and improved I/O. However, the original PICO is capable enough for A2DVI - and still has resources available for future extensions.
The firmware is based on a combination of the Apple II VGA firmware projects by Mark Aikens and David Kuder. The DVI signal generation is based on the PicoDVI library by Luke Wren. However, A2DVI uses custom rendering code, to convert the Apple II memory content to a "TMDS" bit stream directly - skipping the intermediate step of generating a VGA buffer for PicoDVI first.
Here's a brief look at the architecture:
+-------------------------------------------------------------------------+ | PICO Microcontroller (RP2040 or RP2350) | | | +------+ | +---------+ +-----------------+ +-----------------+ | | 6502 |_________|_____| PIO #1 |_________| ARM Core #1 |________| ARM Core #2 | | | CPU | Apple |GPIO |I/O State| 32bit |6502 bus snooping| Shared |PICO DVI + custom| | +------+ Bus |Pins | Machine | FIFO |memory shadowing | Memory | TMDS rendering | | | +---------+ +-----------------+ +-------+---------+ | | DMA|1.2GByte/s | | +----+----+ | | | PIO #2 | | | |I/O State| | | | Machine | | | +---+++---+ | | GPIO|||3x252mbit/s| +-----------------------------------------------------------|||-----------+ +-----+++------+ |HDMI connector| | 640x480@60Hz | +--------------+
The firmware supports various configuration properties. There are configuration utility disks for ProDOS and DOS3.3.
You can also manually type and save the configuration program. It takes just 15 lines of BASIC. See here for more.
The A2DVI firmware tries to auto-detect your machine type - and adjusts various features and register sets accordingly.
This also automatically adjusts the character set, if the current selection does not match the machine (with firmware >= v1.1):
If you do not want the automatic font switching (i.e. you want to use an Apple II font on the IIe), then disable the auto-detection by setting a fixed machine type.
If your A2DVI is installed in a specific/fixed machine, it's recommended to set "machine type" to the matching fixed type.
Choose between 640x480@60Hz or 720x480@60Hz video output:
The following screenshots show a comparison of double-HIRES with analog effects disabled (plain rendering) and with the effects enabled:
The plain rendering shows perfect pixels: each pixel has exactly the color as the program dictates. However, there were no perfect digital displays in the 1980s and this is not how it would have looked. Note how, though the pixels are perfect, you can barely read the copyright text.
Note how you can now read the copyright text more easily, with "analog effect rendering" enabled.
The config option offers an option to chose between PAL and NTSC. This currently only has marginal effects, e.g. changes the flashing frequency for Apple //e (differed between NTSC and PAL).
The firmware has built-in support for various fonts. Additional custom fonts can be uploaded using normal Apple II/IIe video ROM binaries.
Included fonts for Apple IIe:
US, UK, French, German, Italian, Spanish, Swedish/Finnish, Hebrew, Pravetz/Cyrillic
For the Apple IIe the "enhanced" or "unenhanced" variant of the IIe font is used - according to the machine type ("Apple IIe" vs "Apple //e enhanced"). The machine is either auto-detected, or can be set manually. (The difference between the "enhanced" and "unenhanced" fonts are the graphical "mouse text characters", which only the "Apple //e enhanced" supported.)
Included fonts for Apple II:
Custom video ROMs for Apple II and IIe are supported and can be uploaded with the ProDOS/DOS configuration utility.
Supported formats:
The configuration utility automatically detects the correct format of the uploaded video ROM (based on the file size), since the Apple II and IIe video ROMs used different formats (bit reversed & inverted).
Advanced control options for the "language rocker switch" of your Euro-Apple IIe are configurable. For machines without this switch, you can install a custom push button or rocker switch and connect it to the "ALTCHR" input of A2DVI.
The switch normally toggles the machine's character set (local language vs US character set). You can enable advanced behavior, so quickly rocking the switch back and forth changes the display mode. So you no longer need to enter the configuration menu in order to change between color, monochrome or other display modes.
Menu options for switching behavior:
Use the ALTCHR language switch (Euro-Machines) or connect a custom switch/push-button to quickly cycle the available display modes:
The new display configuration is briefly shown below the screen area when using the rocker switch/push button to cycle the mode:
See here for more details about the installation of a custom external switch / connecting to the language rocker switch.
The A2DVI-Firmware has dual language support. If you have a "Euro-Apple IIe" with the language switch on the bottom side of your Apple II keyboard, then select "ALTCHR SWITCH: TOGGLE CHARACTER SET" (or one of the advanced modes) in the configuration utility and select, both, the primary and secondary character set (primary is any font/character set, secondary is any US character set).
If you don't know what the language switch on the Euro Apple IIs was for, see this video: https://www.youtube.com/watch?v=cvEjy_uI0gY
In order for the language switch to work, an additional wire needs to be installed. Connect the single pin on the A2DVI card to the language switch signal "ALTCHR", at J19, front pin facing towards the keyboard:
Video7 provided additional color text and video modes for the Apple IIe. Some of these modes were also available with other video cards, like the "Apple Extended 80 column Text/AppleColor Card".
A2DVI supports these extended video modes - even if your Apple IIe only has a standard 80 column card (and no extended video card).
The extra video modes:
The following photo shows the difference of the default vs enhanced DHGR video mode (as supported by DazzleDraw). This video mode provides a mix of 140x192 pixels in 16 colors (just like default DHGR), but uses an unused 8th data bit to switch to a 560pixel/line monochrome resolution for a block of 7 bits:
Another example showing the Video7 16color with hires monochrome pixel mix mode:
Stock Apple IIs did not support 80 column display. A popular extension were "Videx" video cards, which provided 80 column support - and support for various character sets.
A2DVI is able to display the Videx 80 column video mode on an Apple II. Enable the Videx support by selecting the Videx character set in the menu (US, German, French, Spanish, ...).
The Videx support of A2DVI is currently "passive" only:
If your Apple //e has installed a RAMWorks-compatible memory expansion (>128KB), then enable the "RAMWorks" option in the menu. RAMWorks introduced a new register which changed the memory bank switching behavior, which A2DVI needs to know about.
The configuration menu offers a debugging feature. Enabling the "DEBUG MONITOR" shows extra lines above and below the normal Apple II screen (in red):
The first line shows the status of switches controlling Apple II's video subsystem:
The second line shows soft switches controlling Apple II(e)'s memory subsystem:
The line below the Apple II screen shows 6502 activity:
The displayed program counter and stack pointer isn't exact science. Of course, the 6502 runs to far quickly to see all addresses. And the card doesn't know the register contents of the 6502, however, it sees every bus cycle and every memory access. So it sees access to the stack area (0x100-0x1ff) and the addresses of instruction fetches. This can be helpful when debugging a program. It's also just cool (though maybe a bit nerdy :) ) to be able to see what the 6502 is currently doing.
The A2DVI firmware supports the font selection protocol of ROMX/ROMXe devices.
When the Apple II does not appear to boot, a diagnostics screen is displayed instead, showing the state of the 6502 bus. This may become helpful with certain type of Apple II mainboard defects.
Here are some photos showing A2DVI in action - using the DVI/HDMI connection.
Yes, I know you cannot tell from blurry photos whether these were from an analog or digital connection - or even from an emulator. But - trust me... :D
Firmware updates of an A2DVI card are easy and safe:
The A2DVI firmware is released under the MIT License:
A2DVI was an idea by Ralle Palaveev. His matching hardware project:
The firmware project is based on awesome work from the following Apple II Analog VGA projects:
AppleII-VGA. MIT License. Copyright (c) 2021-2022 Mark Aikens.
Analog Firmware. MIT License. Copyright (c) 2022-2023 David Kuder.
This project uses a customized variant of the PicoDVI library - and reuses many of Luke's genius ideas for the custom Apple II to DVI/TMDS encoding:
Apple II Forever!