>Though, when you build such a device you
should make sure
that > you only have one such device in your computer. If you put a second one in > the second cartridge slot for example, you will get bus conflicts if they > generate an interrupt at the same time... Or to be more precise, if they both > generate an interrupt before the Z80 acknowledges it (the interrupt does not > get acknowledged as long as the Z80 is in DI mode...) IMO this is not completely true. I found the device at the end of this email in a book about Z80 assembler. It has 4 switches each combined with a R-S flipflop (based on 2 NAND ports). When switch s0 is pressed, input 0 of the 8to3 encoder (74148) becomes low. Outputs A, B and C become high. OE' becomes low and this triggers the J-K flipflop (74LS73). Q' becomes low and thus INT' also becomes low and a interrupt is requested. When the Z80 acknowledges it ( by lowering M1'
and IORQ' ), the busdriver (74367) puts the data on the bus (in this case FEh)
and the J-K flipflop is reset.
s0 -> interrupt FE
s1-> interrupt FC
s2-> interrupt FA
s3-> interrupt F8
Each switch can thus execute a different
interruptroutine.
A program example:
LD HL, ADRES_ROUTINE1
LD 1BFE, HL
; to int. vector FEh
LD HL, ADRES_ROUTINE2
LD 1BFC,
HL
; to int. vector FCh LD HL, ADRES_ROUTINE3
LD 1BFA,
HL
; to int. vector FAh LD HL, ADRES_ROUTINE4
LD 1BF8,
HL
; to int. vector F8h IM
2
; interrupt mode 2
LD A,
1B
; MSB of int. vector table
LD
I,A
; Put it in int. register
DISCLAIMER: I didn't test the circuit, it
neither is specificly designed for a MSX. But I think it should
work.
Greetings Richard
PS You need the font "courrier" (and your
imagination) the read the circuit below.
74148
gnd
___|______ |7 E' | 74367 7400 |6 | _________ |5 C| _________ _____|I1 | |4 | | | | | NAND O1|____________________|3 B|________|I2 O2|______D2 | __|I2 | | ________________|2 | | | . | |---------| | | ____________|1 A|________|I1 O1|______D1 s3/ \ ___________| | | __________|0 | | | gnd--/ \/ | | | | | gnd_|I0 O0|______D0 /\___________ | | | | OE' OE | | | . / _________ | | | | --|--------- | CE' | | |_|I1 | | | | | _____| __________ ---|----- | | NAND O1|_| | | | | | | | |____|I2 | | | | | +5V-|J Q | | |---------| | | | |------|> | | | | | gnd-|K Q'|--INT' | | | | | CLK | | _________ | | | |---------| | _____|I1 | | | | |______________| | | NAND O1|____| | | | 7432 | __|I2 | | | | ^ | _________ . | |---------| | | | | | | I1|_M1' s2/ \ ___________| | | 74LS73 |____|O1 OR | gnd--/ \/ | | | I2|_IORQ' /\___________ | | |-------| . / _________ | | | | |_|I1 | | | | | | NAND O1|_| | | |____|I2 | | | |---------| | | | | | | | | | | _________ | | _____|I1 | | | | | NAND O1|_______| | | __|I2 | | | . | |---------| | | s1/ \ ___________| | gnd--/ \/ | /\___________ | . / _________ | | | |_|I1 | | | | | NAND O1|_| | |____|I2 | | |---------| | | _________ | _____|I1 | | | | NAND O1|__________| | __|I2 | | . | |---------| | s0/ \ ___________| gnd--/ \/ /\___________ . / _________ | | |_|I1 | | | | NAND O1|_| |____|I2 | |---------| |
- Interrupt modes?? (coding question) d-fader
- Re: Interrupt modes?? (coding question) Laurens Holst
- RE: Interrupt modes?? (coding question) Frits Hilderink
- Re: Interrupt modes?? (coding question) Laurens Holst
- Re: Interrupt modes?? (coding question) Alex Wulms
- Re: Interrupt modes?? (coding question) Joost Klootwijk
- Re: Interrupt modes?? (coding question) David Heremans
- Re: Interrupt modes?? (coding question) Laurens Holst
- Re: Interrupt modes?? (coding question) Alex Wulms
- Re: Interrupt modes?? (coding quest... Richard Gerrits
- Re: Interrupt modes?? (coding q... Alex Wulms
- RE: Interrupt modes?? (coding quest... Frits Hilderink
- Re: Interrupt modes?? (coding q... Laurens Holst
- Re: Interrupt modes?? (coding q... Alex Wulms
- Z80 - was Interrupt modes?? (co... Jon De Schrijder
- Datasheets(was Re: Z80 - wa... David Heremans