IO latch behaviour
This commit is contained in:
@@ -664,7 +664,7 @@ NEWSYM SDD1BankD, db 3
|
|||||||
NEWSYM vramread2, db 0 ; previous character for vram read
|
NEWSYM vramread2, db 0 ; previous character for vram read
|
||||||
NEWSYM nosprincr, db 0
|
NEWSYM nosprincr, db 0
|
||||||
NEWSYM poamaddrs, dw 0
|
NEWSYM poamaddrs, dw 0
|
||||||
NEWSYM rdioval, db 0
|
NEWSYM ioportval, db 0
|
||||||
|
|
||||||
|
|
||||||
NEWSYM tempdat, times 479 db 0 ; expandable area
|
NEWSYM tempdat, times 479 db 0 ; expandable area
|
||||||
@@ -767,6 +767,11 @@ reg2137r:
|
|||||||
; mov byte[debstop3],1
|
; mov byte[debstop3],1
|
||||||
cmp byte[debuggeron],1
|
cmp byte[debuggeron],1
|
||||||
je .debugger
|
je .debugger
|
||||||
|
cmp byte[iocounteren],1
|
||||||
|
je .dolatch
|
||||||
|
test byte[ioportval],80h
|
||||||
|
jnz .nolatch
|
||||||
|
.dolatch
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov bl,[cycpl]
|
mov bl,[cycpl]
|
||||||
sub bl,dh
|
sub bl,dh
|
||||||
@@ -786,11 +791,14 @@ reg2137r:
|
|||||||
inc word[latchy]
|
inc word[latchy]
|
||||||
.novhirq
|
.novhirq
|
||||||
.noincly
|
.noincly
|
||||||
|
.nolatch
|
||||||
xor al,al
|
xor al,al
|
||||||
mov byte[extlatch],0
|
mov byte[extlatch],0
|
||||||
ret
|
ret
|
||||||
.debugger
|
.debugger
|
||||||
debblah:
|
debblah:
|
||||||
|
test byte[ioportval],80h
|
||||||
|
jnz .nolatch2
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov bl,[cycpl]
|
mov bl,[cycpl]
|
||||||
sub bl,[pdh]
|
sub bl,[pdh]
|
||||||
@@ -842,6 +850,7 @@ debblah:
|
|||||||
inc word[latchy]
|
inc word[latchy]
|
||||||
.novhirq2
|
.novhirq2
|
||||||
.noincly2
|
.noincly2
|
||||||
|
.nolatch2
|
||||||
xor al,al
|
xor al,al
|
||||||
mov byte[extlatch],0
|
mov byte[extlatch],0
|
||||||
ret
|
ret
|
||||||
@@ -1372,7 +1381,7 @@ debblah2:
|
|||||||
|
|
||||||
; Programmable I/O port
|
; Programmable I/O port
|
||||||
reg4213r:
|
reg4213r:
|
||||||
mov al,[rdioval]
|
mov al,[ioportval]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; Quotent of Divide Result (Low)
|
; Quotent of Divide Result (Low)
|
||||||
|
|||||||
@@ -1504,7 +1504,7 @@ reg4200w:
|
|||||||
|
|
||||||
; Programmable I/O port (out-port)
|
; Programmable I/O port (out-port)
|
||||||
reg4201w:
|
reg4201w:
|
||||||
mov byte[rdioval],al
|
mov byte[ioportval],al
|
||||||
mov bl,al
|
mov bl,al
|
||||||
and bl,80h
|
and bl,80h
|
||||||
and byte[MultiTapStat],07Fh
|
and byte[MultiTapStat],07Fh
|
||||||
|
|||||||
Reference in New Issue
Block a user