Date: Sat, 12 Apr 2008 15:04:29 -0700 (PDT)
From: David Griffith <dgriffi at cs.csubak.edu>
On Sat, 12 Apr 2008, Jeff Walther wrote:
> Now, it really shouldn't be that hard to whip
something up with an
> FPGA and either some fastish SRAM or an open core DDR2 controller and
> one DDR2 memory chip.
How far did you get with this project? I'd love to
see something that
just does greyscale. That and smaller modern parts would allow a lot more
to be crammed into that PDS slot.
I would say I'm still in the conceptual stage. I've examined the Is
and the Os in the documentation and I pretty much know what I want to
build, with a few choices still remaining (e.g. SRAM vs. DDR2).
But I'm stymied by the details and by the fact that when I started
this I was unemployed and had time, although my motivation was low
due to the associated emotional challenges. Now I am wonderfully
employed, and very happy, but have very little spare time.
I've read through "Designing Cards and Drivers for the Macintosh"
(IIRC) but I need to go through in more detail and draw a diagram of
the ROM structure. But it seems to me that some of what I need to
know is in Inside Macintosh and extracting those tidbits is difficult
(for me). Also, some of the information I want to examine is
contained in Pascal coding examples, and I don't know Pascal. It
will be easy enough to pick up, but it's another step back from the
actual project.
Of course, all of the Apple documentation assumes that the audience
is already an expert at building the component they want to build and
only needs the Apple specifics, and I've never designed a video card.
I haven't found any kind of book about it anywhere. I picked up
whatshisnames book about the video typewriter and the follow up book,
but it doesn't seem quite applicable to this application.
So I'm in one of those situations where I need bits of information in
order to truly understand other bits of information. But I don't
know in what order I really need the bits in order to make them
comprehensible. Worse, I don't actually know which piece will be in
which resource. So I need to find all the pieces of information,
fail to understand them as I find them, but identify them, then after
they've all been found, reorder them and go back, this time in
logical sequence and put it all together. Maybe if I was smarter,
one pass would be enough...
I'm somewhere late in the finding all the pieces without
understanding them yet stage, paused just before doing a quick learn
of Pascal so I can examine/understand the examples in Inside
Macintosh. But I still lack a resource on the finer points of video
card design. I understand the basic fucntion, but there are always
details which clever people have worked out, which a latecomer like
me can greatly benefit from.
For example, the various schemes to avoid drawing the top half of the
screen and then using changed data for the bottom half of the screen.
I'm familiar with the simple expedient of having two screen buffers.
But I understand that there are more elegant solutions in use,
otherwise video cards would need twice as much VRAM. Is it really
all about tracking updates as they come in and only allowing ones
which are earlier in the buffer than the current draw point, and
delaying the others until the drawing point passes? If so, one
would either hold up the host system, or need an additional buffer
for the delayed changes. Yes? No?
As far as cramming a lot more into the PDS slot with smaller
components... Yes, the thing holding folks back is the time and
skill to code, not the available technology. Taken to its logical
conclusion, we would take a moderate sized FPGA, emulate the 68030
and FPU on board, put a fast memory interface on the FPGA, add a USB2
chipset and fast ethernet I/O, plus an ATA interface and video
outputs, then just use the SE/30 board as an I/O peripheral and home
to the Apple ROM, with the built-in 9" screen as one display and a
connector for a large color display if desired.
Alternatively, use a Coldfire MCU, patch the unimplemented 68030
instructions with the exception handler (there's a library at
Freescale for this) and then copy the basic design of the Daystar CPU
upgrades which already worked out how to put a faster 68030 into the
PDS slot. With a little more work patching the firmware, one could
use a Coldfire with built in USB and ethernet, but that's a lot more
software work. One also loses the FPU functionality, and if your
code calls many of the unimplemented instructions it could be pretty
slow.
But all those projects are dauntingly large.
For now, I'd like a video card. Later, an ATA interface. Maybe
USB after that, but frankly, without a more skilled programmer's
help, I don't think I will be able/willing to write USB drivers.
Eventually, it could all go on one card.
Jeff Walther