peterk@cbmger.UUCP (Peter Kittel GERMANY) (09/14/90)
There was a discussion in c.s.a about the DCTV or HAM-E devices.
Incidentally I had similar thoughts at the same time.
Perhaps this is not a really serious project for Commodore,
but usefull for some hardware hacker.
So here comes my idea:
How about 24-bit colors by a truely simple hack?
I'm going to describe a little project here that exists until now
only as an idea, and I myself have no time to put it into reality,
but perhaps someone will feel to do this.
Concept:
Replace or enhance the Video Hybrid chip at the video output of the
Amiga. Make it take two adjacent pixels to gather enough information
bits. With the resulting resolution of 320x200 and 256 colors you
are at the same level with simple VGA cards (though the palette is
more limited, see below).
Parts needed:
An Amiga, some bus buffers, some inverters, some latches, a flip-flop,
three 8-bit DACs (should be cheap now with all the VGA cards out).
Before:
Inputs to the Video Hybrid are 12 bits color values (4 for RGB each)
and a sync. Output is analog RGB and monochrome video.
Additional inputs needed:
The dot clock (14 MHz clock for hires, should be available somewhere)
A mode status bit (Well, for first attempt you may put a simple
toggle switch here. But to make it system consistent, we would
need a bit output by one of the custom chips and controllable
by one of the custom chip registers. Only this way you will be
allowed to drag this screen down, and the Copper can switch this
mode bit somewhere during the scan. As we can't simply change
the custom chips and I don't know of any unused bit or pin,
this is the nastiest caveat, nearly unsolvable. Any ideas?)
The circuitry (only words here):
Let's consider only one color component (say R) and keep in mind to
make the two others identically.
1. The analog output of the Video Hybrid is disconnected, connect
the 8-bit DAC output instead.
2. Signal path for normal mode: the four input bits are fed to a
buffer that connects them to the upper 4 bits of the DAC.
The lower 4 bits are set to zero by use of another enabled
buffer with inputs tied to ground. You may use this 4-bit buffer
once for all three color components. Buffers are output-enabled
by the mode bit.
3. Signal path for new mode: The 4 input bits are fed to two parallel,
edge-triggered latches. One is triggered by the dot clock, the
other by the inverted dot clock. After the latter, a second latch
is triggered by the opposite signal. Thus you ensure that you get
stable 8 bits during a 2-pixel period at the output of the latches.
If you use latches with output enable, you can use them as buffers,
enabled by the mode bit, and feed them directly to the DAC.
To achieve a maximum variance of resulting 24-bit color values, it
might be of advantage to feed the 4 bits of the first pixel to the
even DAC bits (0,2,4,6) and the 4 bits of the second pixel to the
odd DAC bits (1,3,5,7).
If there arise problems with syncing the dot clock with the beginning
of the scan line, there must be added some circuitry (flip-flop,
latch, perhaps an EXOR to invert the dot clock) to solve this.
Done.
Software issues:
It seems not very simple to construct an algorithm that makes up a
palette (remember: we are in hires and have only 16 colors!) to fit
best for a given image. No ideas from me until now :-(
As said above, to achieve most variation, you must also consider the
bit mixing of the adjacent pixels.
General:
This was thought as a mode starting from conventional hires mode with
640 pixels wide. But there shouldn't be made a limitation to this mode
only. But then you would have to provide the real pixel clock signal
and not the 14 MHz clock, because in one mode you need 14 MHz (hires),
in lores you need 7 MHz, in superhires 28 MHz.
When talking about such hacks: There is even a more simpler possibility,
needing about the same effort. This one would create a medium value of
every two adjacent pixels, thus increasing the color resolution to
15 bits, needing three 5-bit DACs. This would enhance output of dithered
colors, but again reduce the horizontal resolution. But you can make
this medium-computing such a way that it is performed on every pixel
(and its predecessor) and not on pairs that start on even pixel numbers.
Have fun, please comment.
--
Best regards, Dr. Peter Kittel // E-Mail to \\ Only my personal opinions...
Commodore Frankfurt, Germany \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk