Disable IRQ if opening at 115200 bps

This commit is contained in:
Colin Leroy-Mira 2024-02-19 18:27:34 +01:00 committed by Oliver Schmidt
parent 7a12399b39
commit 3fd78208ba
3 changed files with 18 additions and 2 deletions

View File

@ -452,10 +452,15 @@ The names in the parentheses denote the symbols to be used for static linking of
(RTS/CTS) and does interrupt driven receives. Speeds faster than 9600 baud (RTS/CTS) and does interrupt driven receives. Speeds faster than 9600 baud
aren't reachable because the ROM and ProDOS IRQ handlers are too slow. aren't reachable because the ROM and ProDOS IRQ handlers are too slow.
Software flow control (XON/XOFF) is not supported. Software flow control (XON/XOFF) is not supported.
Note that because of the peculiarities of the 6551 chip transmits are not Note that because of the peculiarities of the 6551 chip transmits are not
interrupt driven, and the transceiver blocks if the receiver asserts interrupt driven, and the transceiver blocks if the receiver asserts
flow control because of a full buffer. flow control because of a full buffer.
Note that using the driver at SER_BAUD_115200 will disable IRQs. It will be up
to the users to use the serial port, either by re-enabling IRQs themselves,
or by directly poll-reading the ACIA DATA register without the help of ser_get().
The driver defaults to slot 2. Call <tt/ser_apple2_slot()/ prior to The driver defaults to slot 2. Call <tt/ser_apple2_slot()/ prior to
<tt/ser_open()/ in order to select a different slot. <tt/ser_apple2_slot()/ <tt/ser_open()/ in order to select a different slot. <tt/ser_apple2_slot()/
succeeds for all Apple&nbsp;II slots, but <tt/ser_open()/ fails with succeeds for all Apple&nbsp;II slots, but <tt/ser_open()/ fails with

View File

@ -453,10 +453,15 @@ The names in the parentheses denote the symbols to be used for static linking of
(RTS/CTS) and does interrupt driven receives. Speeds faster than 9600 baud (RTS/CTS) and does interrupt driven receives. Speeds faster than 9600 baud
aren't reachable because the ROM and ProDOS IRQ handlers are too slow. aren't reachable because the ROM and ProDOS IRQ handlers are too slow.
Software flow control (XON/XOFF) is not supported. Software flow control (XON/XOFF) is not supported.
Note that because of the peculiarities of the 6551 chip transmits are not Note that because of the peculiarities of the 6551 chip transmits are not
interrupt driven, and the transceiver blocks if the receiver asserts interrupt driven, and the transceiver blocks if the receiver asserts
flow control because of a full buffer. flow control because of a full buffer.
Note that using the driver at SER_BAUD_115200 will disable IRQs. It will be up
to the users to use the serial port, either by re-enabling IRQs themselves,
or by directly poll-reading the ACIA DATA register without the help of ser_get().
The driver defaults to slot 2. Call <tt/ser_apple2_slot()/ prior to The driver defaults to slot 2. Call <tt/ser_apple2_slot()/ prior to
<tt/ser_open()/ in order to select a different slot. <tt/ser_apple2_slot()/ <tt/ser_open()/ in order to select a different slot. <tt/ser_apple2_slot()/
succeeds for all Apple&nbsp;II slots, but <tt/ser_open()/ fails with succeeds for all Apple&nbsp;II slots, but <tt/ser_open()/ fails with

View File

@ -302,6 +302,7 @@ HandshakeOK:
lda (ptr1),y ; Baudrate index lda (ptr1),y ; Baudrate index
tay tay
lda BaudTable,y ; Get 6551 value lda BaudTable,y ; Get 6551 value
sta tmp2 ; Backup for IRQ setting
bpl BaudOK ; Check that baudrate is supported bpl BaudOK ; Check that baudrate is supported
lda #SER_ERR_BAUD_UNAVAIL lda #SER_ERR_BAUD_UNAVAIL
@ -332,8 +333,13 @@ BaudOK: sta tmp1
ora #%00000001 ; Set DTR active ora #%00000001 ; Set DTR active
sta RtsOff ; Store value to easily handle flow control later sta RtsOff ; Store value to easily handle flow control later
ora #%00001000 ; Enable receive interrupts (RTS low)
sta ACIA_CMD,x ora #%00001010 ; Disable interrupts and set RTS low
ldy tmp2 ; Don't enable IRQs if 115200bps
beq :+
and #%11111101 ; Enable receive IRQs
: sta ACIA_CMD,x
; Done ; Done
stx Index ; Mark port as open stx Index ; Mark port as open