Table of Contents
VGA65 Prototype, W65C02 as a VGA Controller
Because of the small component count and simplicity of design, W65C02 on CRC65 can be overclocked to 25.175MHz which is the pixel clock associated with 60Hz VGA display. So instead of relying on specialized video hardware, the 6502 can actively accessing memory to display it on VGA monitor. Discussion of this idea can be found on 6502.org forum here.
- W65C02 overclocked to 25.175MHz
- 60K RAM
- Bootstrap ROM
- Serial port at 115200
- Decoding logic for RAM and I/O
- Modulo-800 horizontal sync generator
- Parallel-to-serial shift register for video signal
- 640×480 monochrome graphic mode
Redesign of CRC65
A significant redesign of the CPLD is required to free up hardware resources to support the video capability. CF interface signals are reassigned to video out, horizontal sync, and vertical sync. The I2C signals are removed and the bootstrap ROM is reduced to 32 bytes supporting the serial bootstrap function only. The following functions are added to the CPLD:
- VGA's horizontal sync (Hsync) is generated in hardware with a 10-bit modulo-800 counter such that Hsync is asserted for 100 clocks for every 800 clocks. Hsync signal is also connected to 6502 interrupt to signal the beginning of a horizontal line.
- A 8-bit parallel-to-serial shift register capture data in the address range of 0x4000-0xEFFF. The captured data is loaded in the shift register and shifted out at 25.175MHz rate. The memory from 0x4000-0xEFFF are effectively the graphic memory. Memory below 0x4000 is program memory and memory above 0xF000 is I/O and bootstrap ROM space.
- Vertical sync is a writable register in memory location 0xF000. It is asserted and negated under software control.
Theory of Operation
VGA65 can only be booted via serial port. After reset, it waits for 256 bytes of instructions from serial port and load it into memory to execute once the 256th data is received. The 256-byte program is an Intel Hex loader that loads and runs a monitor in low memory of VGA65. This monitor is responsible for loading graphical program and data and providing debugging capabilities.