interrupt mode 2
5 messages · 2005-12-07 → 2005-12-08 · Yahoo Group era · View archive on archive.org
Participants: Paolo Ferraris, Jarek Adamski, alvin albrecht, William McBrine
Preserved from the Timex/Sinclair 2068 Yahoo Group (2001–2019), which is no longer online. Text reproduced from the archive.org archive; email addresses masked.
Messages
1. interrupt mode 2
Paolo Ferraris · Wed, 07 Dec 2005 18:27
Hello,
I am wondering how interrupt mode 2 works on the TS2068. On the
spectrum, I set register i with some value x, and put the address of
interrupt routine in memory location 256*x+255. The 255 comes from the
value that is read on the bus when interrupt occurs. Is this value the
same for the 2068?
Yhanks,
Paolo
2. Re: [ts2068] interrupt mode 2
Jarek Adamski · Thu, 8 Dec 2005 01:36
Hello!
Cytowanie Paolo Ferraris <[email]>:
> The 255 comes from the value that is read on the
> bus when interrupt occurs. Is this value the
> same for the 2068?
Yes. As no device generates the IM 2 vector, the
only one address is enough. Anyway, with the 2068
ROM you cannot set I to values #39, #3A, #3B, as
in ZX Spectrum (so the vector points to #FFFF,
where you place #18 or #C3 opcode to make a jump).
The IM2 vector can be generated by Z80SIO, Z80CTC,
Z80PIO (AMX mouse) and Z80DMA. Also, I've made
IM 2 vectors range #40..#7E in my ZXISA project.
Regards,
--
Jarek Adamski
ul.Sobieskiego 10A/5
99-200 Poddębice
Poland
tel. +48603445345, +48436782892
mailto:[email]
gg:1895433
Do you wish to upgrade an 8bit computer?
See http://8bit.yarek.pl and contact me.
3. Re: [ts2068] interrupt mode 2
alvin albrecht · Thu, 08 Dec 2005 15:13
> > The 255 comes from the value that is read on the
> > bus when interrupt occurs. Is this value the
> > same for the 2068?
>Yes. As no device generates the IM 2 vector, the
>only one address is enough. Anyway, with the 2068
>ROM you cannot set I to values #39, #3A, #3B, as
>in ZX Spectrum (so the vector points to #FFFF,
>where you place #18 or #C3 opcode to make a jump).
Not quite true -- the early spectrum models had pullups
on all data lines so the 255 vector was guaranteed to
be read (unless a naughty peripheral was attached) but
the ts2068 only has a pullup on D2 (from memory), which
means you are only guaranteed to get XXXXX1XX as
vector where X = who knows what.
In TTL you have to actively sink current to generate a 0
so those floating Xs will probably be read as 1s but there is
no guarantee, especially if peripherals are attached that
add capacitance to the bus.
I'd use the full 257 byte IM2 table to make sure things
work all the time. Even if it seems to work without the
big table, it might not on occasion, and I'm sure I've had
a few spectrum games not work on the 2068 for this
specific reason. But then Jarek has probably been doing
this all along so it may work on a bare machine with nothing
attached (most of the time :-D )
_________________________________________________________________
Take advantage of powerful junk e-mail filters built on patented Microsoft�
SmartScreen Technology.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN� Premium right now and get the
first two months FREE*.
4. Re: [ts2068] interrupt mode 2
William McBrine · Thu, 8 Dec 2005 18:45:
On Thu, 8 Dec 2005, alvin albrecht wrote:
> the ts2068 only has a pullup on D2 (from memory), which means you are
> only guaranteed to get XXXXX1XX as vector where X = who knows what.
Certain peripherals, like the Zebra Disk Interface (at least the three-box
+ flat board version), provided pullups for all lines, IIRC. Otherwise I
had to use the table.
--
William McBrine <[email]>
5. Re: [ts2068] interrupt mode 2
Paolo Ferraris · Thu, 08 Dec 2005 22:35
alvin albrecht wrote:
> Not quite true -- the early spectrum models had pullups
> on all data lines so the 255 vector was guaranteed to
> be read (unless a naughty peripheral was attached) but
> the ts2068 only has a pullup on D2 (from memory), which
> means you are only guaranteed to get XXXXX1XX as
> vector where X = who knows what.
This looks like quite a bad design choice. That may explain why my
programs that use IM2 work on emulators and not on the real machine.
-p