[comp.sys.cbm] Bursting C64

eravin@dasys1.UUCP (Ed Ravin) (02/07/89)

In article <7023@killer.DALLAS.TX.US> elg@killer.DALLAS.TX.US (Eric Green) writes:

>     Of course, hardware burst mode isn't cheap... I once estimated
>that it would cost at least $100 for a company to make money off the
>easiest-to-install setup (external CIA, buffers, & bank-switching ROM,
>with only two jumpers into the internals of your computer).

Hmmm.  Now I really should go home and read my 128 PRG again before putting
my electronic foot in my mouth, but the 128 doesn't have an external CIA or
any extra hardware for burst mode, does it?  The difference, as I remember
it, was that SP and CNT from each CIA (or maybe only one of them?) are
hooked into the serial bus.  Now, those pins are available on the user
port, so why couldn't you do a kludgy (but that goes without saying since
we're in Commie-land, doesn't it?) cable hack to get the hardware
functionality and then an even more kludgy software hack to get burst mode
to work?  At the very worst you might want a 4066 or some such silicon
switch to turn the hardware hack off so that you could use the normal
serial bus routines, which means you'd have to steal one of the i/o pins on
the user port to toggle the switch.

-- 
Ed Ravin                  | cucard!dasys1!eravin | "A mind is a terrible thing
(BigElectricCatPublicUNIX)| eravin@dasys1.UUCP   | to waste-- boycott TV!"
--------------------------+----------------------+-----------------------------
Reader bears responsibility for all opinions expressed in this article.

izot@f171.n221.z1.FIDONET.ORG (Geoffrey Welsh) (02/08/89)

 > From: eravin@dasys1.UUCP (Ed Ravin)
 > Message-ID: <8611@dasys1.UUCP>
 >
 > Hmmm.  Now I really should go home and read my 128 PRG again before putting
 > my electronic foot in my mouth, but the 128 doesn't have an external CIA or
 > any extra hardware for burst mode, does it?
 
   The C128's internal serial port hardware is actually very different from 
the C64's. As you say later in the message, various CIA lines are connected to 
the serial port but that meant that the C128 firmware had to do various extra 
data direction register settings to prevent conflict whenever it used the 
serial port. Since the C64 ROMs in the C128 are untouched, the MMU actually 
physically disconnects these when in C64 mode!
 
   Bottom line: even if you added the hardware connections to a C64 and did 
the software to avoid conflicts, it wouldn't work in C64 mode on a C128.
 
   Interestingly enough, there was one prototype BusCard III built by Jim Law 
& Steve Douglas (the same ones who did the BusCard II for Batteries 
Included)... it included IEEE-488 AND fast (burst) serial ports, plus most of 
BASIC 4.0 (not quite as complete as the version in the BC II, but including 
many useful disk commands). Unfortunately, by the time the prototype was done, 
there weren't any companies interested in producing the product and Steve & 
Jim didn't want to waste any time on it if it wasn't going to go anywhere.
 
   Geoff ( watmath!isishq!izot )
 


--  
 Geoffrey Welsh - via FidoNet node 1:221/162
     UUCP: ...!watmath!isishq!171!izot
 Internet: izot@f171.n221.z1.FIDONET.ORG

elg@killer.DALLAS.TX.US (Eric Green) (02/08/89)

in article <8611@dasys1.UUCP>, eravin@dasys1.UUCP (Ed Ravin) says:
> In article <7023@killer.DALLAS.TX.US> elg@killer.DALLAS.TX.US (Eric Green) writes:
>>     Of course, hardware burst mode isn't cheap... I once estimated
>>that it would cost at least $100 for a company to make money off the
>>easiest-to-install setup (external CIA, buffers, & bank-switching ROM,
>>with only two jumpers into the internals of your computer).
> Hmmm.  Now I really should go home and read my 128 PRG again before putting
> my electronic foot in my mouth, but the 128 doesn't have an external CIA or
> any extra hardware for burst mode, does it?  The difference, as I

You're correct. The 128 only has 2 CIAs. However, the 128 has some
additional hardware. There is NAND gates and buffers used for
turnaround on the serial bus. The turnaround control line comes from
the MMU, I seem to recall (the 128's MMU has a few output lines,
remember). This is logical, since all of the CIA output lines are
already defined for other things (one entire CIA is used for keyscan,
while the other is used for RS232, video bank switching, and other
misc. tasks of that nature).

One problem is that for a 64 version, you'll have to use a CIA line
for the turnaround. You cannot use SP and CNT from the other CIA and
open-collector-OR them, because the other CIA's timers are completely
used up for RS232 timing. The problem is that a bunch of modem
programs assume that they can arbitrarily set the CIA configuration
with impunity, in order to play with DTR etc., which seems to indicate
a need to get the signal from elsewhere. This is solvable, though. If
nothing else, a simple latch could be used, hooked to one of the I/O
slot's lines. This would also allow ROM banking if you want to do lots
of other fanciness, e.g. add extended BASIC commands, do
memory-capture operations, etc. You might also want to map a cheap RAM
into that 256-byte I/O slot for scratchpad purposes (no sense wasting
a whole I/O slot for a 1-byte port, & maintaining software
compatibility might be difficult if your extended BASIC commands need
some scratchpad somewhere). 

The ultra-cheap setup would require a bunch of jumpers. The first
would plug into the user port and intercept the CNT and SP lines from
one of the CIAs. The second would plug into the standard serial plug,
and head on to the third piece, the fast-serial card plugged into the
cartridge port. This would have the buffers on it and the direction
toggle, as well as the ROM-banking circuitry. The ROM-banking
circuitry would require two jumpers to the 6510 processor, to know
when to bank in its new Kernal ROM.

For a hack like this, you'd open-collector-OR your new stuff into the
datastream. If people bypass the Kernal and directly grok the
hardware, they deserve what they get -- plain old 1541 speeds (albeit
probably speeded up, since it'd be fastloaders mostly doing tricks
like this).

One problem is that folks might try to use the timer being used for
CNT/SP operations. That would really throw fast serial operations into
a tizzy. This is one reason I'm trying to figure out a way to clock
data in and out without using a CIA. A simple shift register ought to
do, but it's a bit more complicated than that. Putting a whole new CIA
out there is sort of expensive, since CIAs cost around $15 (about $30
in terms of retail pricing, i.e. eliminating the CIA means the retail
price will be that much less).

> port, so why couldn't you do a kludgy (but that goes without saying since
> we're in Commie-land, doesn't it?) cable hack to get the hardware

Kludgy ain't the word! Actually, the hardware is almost ridiculously
easy. It's the software that is a pain in the %%^&$. The timing
requirements of the C-64's serial bus are magical... it works, but
it's hard to see how or why without serious cycle counting (e.g., that
famed 4 NOP delay in the serial bus transmit routine).

Hmm, since I just spent all this time describing it, I guess I might
as well build it. TTL Data Book, here I come..... maybe this time I
can come up with something affordable by mere mortals ;-).

--
|    // Eric Lee Green              P.O. Box 92191, Lafayette, LA 70509     |
|   //  ..!{ames,decwrl,mit-eddie,osu-cis}!killer!elg     (318)989-9849     |
| \X/              >> In Hell you need 4Mb to Multitask <<                  |