Implement SER_HS_NONE on Apple IIgs serial driver

This commit is contained in:
Colin Leroy-Mira
2023-11-06 20:05:35 +01:00
committed by Oliver Schmidt
parent fe115fb621
commit 86d498b7b3

View File

@@ -61,6 +61,7 @@ SendFreeCnt: .res 1 ; Number of bytes in send buffer
Stopped: .res 1 ; Flow-stopped flag Stopped: .res 1 ; Flow-stopped flag
RtsOff: .res 1 RtsOff: .res 1
HSType: .res 1 ; Flow-control type
RecvBuf: .res 256 ; Receive buffers: 256 bytes RecvBuf: .res 256 ; Receive buffers: 256 bytes
SendBuf: .res 256 ; Send buffers: 256 bytes SendBuf: .res 256 ; Send buffers: 256 bytes
@@ -333,8 +334,10 @@ SER_OPEN:
; Check if the handshake setting is valid ; Check if the handshake setting is valid
ldy #SER_PARAMS::HANDSHAKE ; Handshake ldy #SER_PARAMS::HANDSHAKE ; Handshake
lda (ptr1),y lda (ptr1),y
cmp #SER_HS_HW ; This is all we support cmp #SER_HS_SW ; Not supported
bne InvParam beq InvParam
sta HSType ; Store flow control type
; Initialize buffers ; Initialize buffers
ldy #$00 ldy #$00
@@ -644,13 +647,16 @@ CheckSpecial:
sec sec
rts rts
Flow: ldx Channel ; Assert flow control if buffer space too low Flow: lda HSType ; Don't touch if no flow control
beq IRQDone
ldx Channel ; Assert flow control if buffer space too low
ldy #WR_TX_CTRL ldy #WR_TX_CTRL
lda RtsOff lda RtsOff
jsr writeSCCReg jsr writeSCCReg
sta Stopped sta Stopped
sec ; Interrupt handled IRQDone:sec ; Interrupt handled
Done: rts Done: rts
Special:ldx Channel Special:ldx Channel