Skip to content

Commit

Permalink
osi: add definitions for ACIA dividers, set serial divider to /16
Browse files Browse the repository at this point in the history
  • Loading branch information
ivop committed Sep 6, 2024
1 parent ca41070 commit 24cb780
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/arch/osi/floppy.S
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ STATUS_PE_MASK = 0x40 ; Rx Parity Error
STATUS_IRQ_MASK = 0x80 ; /IRQ, if pin output is low, bit is 1
; clear by read of RDR

CONTROL_DIV_1 = 0
CONTROL_DIV_16 = 1
CONTROL_DIV_64 = 2

WS_SHIFT = 2

WS_7E2 = 0x00
Expand Down
2 changes: 1 addition & 1 deletion src/arch/osi/serial.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SERIAL_ACIA_TDR = $fc01
zproc init_serial
lda #CONTROL_RESET
sta SERIAL_ACIA_CONTROL
lda #(TCB_nRTS_HIGH_IRQ_DIS << TCB_SHIFT) | (WS_8N2 << WS_SHIFT)
lda #(TCB_nRTS_HIGH_IRQ_DIS << TCB_SHIFT) | (WS_8N2 << WS_SHIFT) | CONTROL_DIV_16
sta SERIAL_ACIA_CONTROL
rts
zendproc
Expand Down

0 comments on commit 24cb780

Please sign in to comment.