EPM240 development board is an inexpensive (<$10) CPLD board with 50MHz oscillator. It has four 2x20 headers to breakout all CPLD I/O that also serve as connectors for mezzanine board. EPM240 is a 3.3V CPLD, but input to the board is 5V which is regulated down to 3.3V. EPM240 has 240 logic elements or equivalent to roughly 192 macrocells; it also has 8Kbit of internal flash that can serve as the bootstrap ROM. All my designs in EPM7xxx can easily port to EPM240; this is a significant step up in capability from my 64 or 128-macrocell EPM7xxx CPLD.
I've purchased a number of EPM240 dev boards to experiment with retro computers. I have made pc boards for Z80, 6502, and 68SEC000 and plan for Z180 and 68EZ328. Z80 mezzanine development is successful and completed; I have done a cursory test of 68SEC000; and I'm currently focusing on 6502 which is the topic of this post.
The project is called 3V6502. The design is based on
"6502 as VGA controller". The hardware is a mezzanine board plug on top of EPM240 dev board. The mezzanine board has W65C02 operating at 25MHz and 128K RAM in two banks. On paper W65C02 is rated at 14MHz at 3.3V. While it is likely capable of higher clock operation at 3.3V but to help with 25MHz operation, there is a local regulator with its voltage output adjusted to 3.5V. The slightly higher voltage is not a problem with 3.3V CPLD which requires the input voltage to be within 0.3V of the 3.3V. The design goal is a standalone computer with PS2 keyboard, 640x480 monochrome VGA display, serial port, and SD card for mass storage. Optional features are I2C interface and realtime clock.
Operationally, the 6502 boots out of CPLD's internal flash which initializes SD card and loads system code into RAM. The 25MHz 6502 spend 90% of its throughput driving the 640x480 display; it is the well-known beam-racing algorithm where it services the 31.5KHz interrupt from the horizontal sync and output 80 bytes of video data (640 pixels) to an 8-bit shift register that drives the display at 25MHz pixel clock. During the horizontal retrace period, it also looks for PS2 keyboard input and serial port input. The processor is fully utilized during the active video phase, but every 16.7mS video frame, it has 1.4mS of vertical retrace period where it can do real work. It is not much time; it is effectively a 2MHz 6502 when it is not busily doing video and keyboard processing.
The VGA beam racing is an old concept; what is new-ish is operating 25MHz 6502 at 3.3V which can directly interface to more capable CPLD/FPGA and allow more advanced features.
to be continued
Bill
Attachment:
EPM240_dev_board_F.jpg [ 743.26 KiB | Viewed 1015 times ]