The FPGA implementation of Compy has started, and it’s been a good way to confirm if the design ideas are feasible or not. One of the goals for Compy is to have a 4:3 display mode suitable for porting games from other systems using the 320×240 resolution as base as well as allowing processors like the Z80 and 6502 keeping up with handling that display.
The problem is that 4:3 displays are not available for most people on these times as 16:9 monitors are, so I started with this idea of handling the output display:
- Alternative 1: Compy -> VGA -> VGA Monitor 4:3
- Alternative 2: Compy -> VGA -> VGA Monitor 16:9
- Alternative 3: Compy -> VGA -> VGA to Composite converter -> CRT TV 4:3
To handle each connection alternative, having different output modes will allow us to have the 4:3 display on TV devices and VGA monitors, being them wide or not, CRT or LCD. But, there is a catch, because for standard compatibility you need to use standard VGA modes like 640×480, 800×600, 1280×720 or 1920×1080, so I found a way to create some display modes that will match each video requirement. There are the video output modes:
- Mode1 640×480 : Each pixel is duplicated on the screen, there are no borders. This mode is suitable for 4:3 flat panel and CRT VGA monitors, and TV devices that don’t require any kind of borders/overscan.
- Mode2 800×600 : Each pixel is duplicated (640×480) on the screen but there is a border around the display area (overscan). This mode is suitable for TV devices that may require overscan.
- Mode3 1280×720: Each pixel has triple the size on the screen (960×720). This mode is perfect to get the right aspect ratio 4:3 on modern 16:9 monitors.
It was not that simple: 80 characters mode
For some time I wanted to add an 80 columns mode, I was doing some testing using 4 pixels wide characters, but I never felt it right, so after watching some videos showing the Amiga with a real 8 pixel 80 columns mode I decided to give it a try and I loved it.
Now, this mode requires 640 individual pixels per line, and TV devices are not capable of that, you end with some color glitches around the single pixels, but as this mode is meant to be used to program or work directly on the machine and there is already a 40 columns mode for TV I thought it would be a good option for those with “high” resolution VGA monitors.
Initially it was an easy to implement mode, because it was just doubling the original 320 horizontal resolution, but a problem arose with the 1280×720 mode: If I wanted to use the screen at its full glory, the only option was to use 3 times the resolution, this is going from 320×240 to 960×720, but how do you get 80 columns with 960 pixels. You can’t.
What I finally did was to relax the design and allow to have a 120 columns mode (960/3) when using output Mode 3. This mode was something that Aldrin Martoq was proposing some weeks ago and I turned it down because of the TV resolution restrictions, but when using a wide VGA monitor is just perfect.
This is the only special mode, and programmers (me) will need to query the output mode to know if this high resolution text mode is 80 or 120 columns wide.
Following there are three shots showing each mode.