[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Apple II Interrupt card
I'm coming into this thread in the middle.
I don't know what the kontiki thing is.
But I built my first interrupt generator and handler for the Apple II over
20 years ago.
Some comments from an old timer.
If you want this thing to work with a ][ or ][+, you have some problems.
As I recall, the ]['s interrupt vector trashes a memory byte (without
looking, I think it was ZeroPage $45) widely used by DOS 3.3 and monitor
routines. This was also well documented in Roger Wagners Interrupt
Experimenters kit (1985) which even offered a modified version of the
monitor ROM to fix it. There's no easy way around this problem when using
IRQ interrupts on a ][ or ][+.
I only wanted to make a real-time clock (without buying one).
My cheapo solution was to pick up a 60 Hz signal off the video circuitry,
gate it with a transistor controlled by one of the game port's annunciator
outputs and run it into the NMI interrupt. My interrupt handler simply
updated internal clock counters and even poked the time into the corner of
the video screen.
The one problem with using NMI is that you can't leave it on during software
timing controlled i/o operations, particularly disk access. It wasn't to
hard to patch DOS3.3 to turn it off before disk i/o and add 2 seconds or so
to the timer when turning back on after disk i/o. If memory serves, it may
have modestly affected sound generation routines.
Interrupt handling can get a lot more complicated with the //e if you access
any slot rom or routines which might be in bankswitched memory (which on the
//e is all memory). The overhead for saving and restoring system state is
heavy. You don't want to use a 1KHz interrupt source on a //e and figure
you'll just count it down in software. You'll take a noticeable performance
hit. ProDOS has (at least in later versions) intterupt handlers built-in.
Joel Buckley