[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: second processor on a II:How?
- Subject: Re: second processor on a II:How?
- From: ntt@cleese.apana.org.au (Jonathan Pratt)
- Date: 2 Oct 1994 05:09:44 +0930
- Newsgroups: comp.sys.apple2
- Organization: cleese.apana.org.au Public Access UNIX +61-8-3736006
- References: <35vs0t$81m@maxwell5.ee>
dpscholn@mtu.edu (Dan P. Scholnik) writes:
> I am thinking about making a 6809 interface card to hook up to a II+
> or IIe (basically to save me the trouble of building a whole system) and I
> was wondering how that was typically done, ala Z80 card and those 6502
> accelerators. From the manual I see that pulling DMA low is the only way
> (on a II+, anyway) to take the busses away from the 6502. How could another
> processor take over the memory and leave the video pretty much as is? I
> assume that the video can just be left alone to refresh the ram, but I don't
> think the 6809 sits idle for half a cycle like the 6502. Any suggestions
> from the many experts among you?
The SoftCard (Z80) used the DMA to pull the address & data buses away from
the 6502. It allowed the 6502 a chance to refresh the registers just
after the Z80 fetched an opcode (when its dynamic refresh control lines
were active, and it wasn't using the bus) making the refresh invisible to
the CP/M program. With a Z80 speed on average (because of the funny
timing clocks, and the difference at the end of the scan line) of 2.041
MHz this made sure that the 6502 received a refresh every 4 or 5
microseconds, and a maximum of 11 1/4 microseconds. (the data sheets
guarentee a maximum of 40 uS between refresh states before registers fade)
The onboard hardware takes care of RAM refresh and video generation.
Because of the way in which CP/M programs are designed, the actual memory
addresses are mapped to different values from the perspective of the Z80
to preserve the zero page and stack space for the 6502. This was only
because the CP/M programs wanted to use the Z80's zero page for vectors,
and all programs were designed to start at $0100.
I'm not familiar with the timing diagrams for a 6809, but I don't think it
would have regular free cycles to give the 6502 time for refresh. (this
is only important, by the way, if you ever want to go back from your 6809
to the 6502 - the Z80 dropped out for things like disk accesses, and
reading the joystick/paddle position, which the 6502 would do from
ROM/Firmware routines. If you never need (or plan) to go that way, who
cares if the 6502 resets when you leave your 6809. Anyway, your 6809
won't tell you when its not using the buses, like a Z80 does (with
individual read and write lines, and dynamic refresh lines.)
If you do consider this a necessary 'evil', then you could just prolong
one of the 6809 cycles to fit in a refresh for the 6502, then go back to
what you were doing. This would not be too hard to implement (either
buffer or HiZ the buses until you were ready for the 6809 to proceed.
Remember that you need your 'card' to be in the off state when you
reset/power up your ][+.
> I might also just make it a separate system that can communicate to
> the apple via the slot. I just want a 6809 system to play with, plus the
> fun of designing it.
Hmmm... I would have considered a 68HC11 a much more interesting play
thing, but each to his own...
cheers
ntt@cleese.apana.org.au