Workaround for IRQ support in Applewin

This commit is contained in:
Rémy GIBERT 2016-01-04 08:22:57 +01:00
parent ad3e56f067
commit 5a7604d844

View File

@ -195,7 +195,7 @@ OPEN php
lda SSC.REG.DATA,x discard any garbage byte lda SSC.REG.DATA,x discard any garbage byte
lda SSC.REG.STATUS,x clear any IRQ pending lda SSC.REG.STATUS,x clear any IRQ pending
bmi *
plp plp
clc clc
rts rts
@ -240,6 +240,7 @@ COUT php
ldx DEVSLOTn0 ldx DEVSLOTn0
lda SSC.REG.STATUS,x lda SSC.REG.STATUS,x
bit #SSC.REG.STATUS.DCD+SSC.REG.STATUS.DSR true when 0 bit #SSC.REG.STATUS.DCD+SSC.REG.STATUS.DSR true when 0
bne .9 bne .9
@ -271,7 +272,7 @@ COUT php
inc OUTBUF.CNT inc OUTBUF.CNT
ldx DEVSLOTn0 * ldx DEVSLOTn0
lda #SSC.REG.CMD.TEIRQ+SSC.REG.CMD.DTR lda #SSC.REG.CMD.TEIRQ+SSC.REG.CMD.DTR
sta SSC.REG.CMD,x sta SSC.REG.CMD,x
plp plp
@ -299,7 +300,7 @@ GETINFO >LDYA L.DEVINFO
*-------------------------------------- *--------------------------------------
IRQ ldx DEVSLOTn0 IRQ ldx DEVSLOTn0
lda SSC.REG.STATUS,x IRQ from this device ? lda SSC.REG.STATUS,x IRQ from this device ?
bpl .9 no, exit * bpl .9 no, exit !!!!Applewin bug #308!!!!
bit #SSC.REG.STATUS.RDRF incoming char? bit #SSC.REG.STATUS.RDRF incoming char?
beq .1 beq .1
@ -318,9 +319,9 @@ IRQ ldx DEVSLOTn0
tax tax
tya get back data tya get back data
sta INBUF,x sta INBUF,x
inc INBUF.CNT inc INBUF.CNT
clc bra IRQ start over if
rts
*------------ IRQ Out *------------ IRQ Out