imported CHRIN from UP9600 driver

This commit is contained in:
FeralChild64 committed 2019-11-01 22:08:06 +01:00
1 parent bc8da8c07e
commit b076e3ccd0
3 files changed
+58 -12

No files matched your search

+12 -9
View File
@@ -104,9 +104,9 @@
.label PTR2 = $9F // -- NOT IMPLEMENTED --
.label TIME = $A0 // $A0-$A2 jiffy clock
#if !CONFIG_IEC_JIFFYDOS
.label TSFCNT = $A3 // temporary variable for tape and IEC, [!] our usage probably differs in details
.label TSFCNT = $A3 // temporary variable for tape and IEC, [!] our usage differs
#else
.label IECPROTO = $A3 // [!] 0 = normal, 1 = JiffyDOS, >= $80 for unknown
.label IECPROTO = $A3 // -- WIP -- [!] 0 = normal, 1 = JiffyDOS, >= $80 for unknown
#endif
.label TBTCNT = $A4 // temporary variable for tape and IEC, [!] our usage probably differs in details
.label CNTDN = $A5 // -- NOT IMPLEMENTED --
@@ -162,8 +162,8 @@
.label LDTBL = $D9 // $D9-$F2 screen line link table, [!] our usage is different XXX give more details
.label USER = $F3 // $F3-$F4 pointer to current color RAM location
.label KEYTAB = $F5 // $F5-$F6 pointer to keyboard lookup table
.label RIBUF = $F7 // $F7-$F8 -- NOT IMPLEMENTED -- (WIP)
.label ROBUF = $F9 // $F9-$FA -- NOT IMPLEMENTED -- (WIP)
.label RIBUF = $F7 // $F7-$F8 -- WIP -- RS-232 receive buffer pointer
.label ROBUF = $F9 // $F9-$FA -- WIP -- RS-232 send buffer pointer
// $FB $FB-$FE -- UNUSED -- free for user software
.label BASZPT = $FF // -- NOT IMPLEMENTED --
@@ -206,14 +206,14 @@
.label M51CRT = $293 // -- NOT IMPLEMENTED -- mock 6551
.label M51CDR = $294 // -- NOT IMPLEMENTED -- mock 6551
.label M51AJB = $295 // $295-$296 -- NOT IMPLEMENTED -- mock 6551
.label RSSTAT = $297 // -- NOT IMPLEMENTED -- mock 6551, RS-232 status
.label RSSTAT = $297 // -- WIP -- mock 6551, RS-232 status
.label BITNUM = $298 // -- NOT IMPLEMENTED --
.label BAUDOF = $299 // $299-$29A -- NOT IMPLEMENTED --
#endif
.label RIDBE = $29B // -- NOT IMPLEMENTED -- (WIP)
.label RIDBS = $29C // -- NOT IMPLEMENTED -- (WIP)
.label RODBS = $29D // -- NOT IMPLEMENTED -- (WIP)
.label RODBE = $29E // -- NOT IMPLEMENTED -- (WIP)
.label RIDBE = $29B // -- WIP -- write pointer into RS-232 receive buffer
.label RIDBS = $29C // -- WIP -- read pointer into RS-232 receive buffer
.label RODBS = $29D // -- WIP -- read pointer into RS-232 send buffer
.label RODBE = $29E // -- WIP -- write pointer into RS-232 send buffer
.label IRQTMP = $29F // $29F-$2A0 -- NOT IMPLEMENTED --
.label ENABL = $2A1 // -- NOT IMPLEMENTED --
.label TODSNS = $2A2 // -- NOT IMPLEMENTED --
@@ -282,5 +282,8 @@
// $314 $334-$33B -- UNUSED -- free for user software
.label TBUFFR = $33C // $33C-$3FB [!] tape buffer, our usage details differ
#if CONFIG_RS232_UP9600
.label REVTAB = $37C // $37C-$3FB -- WIP -- [!] RS-232 precalculated data
#endif
// $3FC $3FC-$3FF -- UNUSED -- free for user software
@@ -1,14 +1,14 @@
//
// RS-232 part of the CHKRIN routine
// RS-232 part of the CHRIN routine
//
#if HAS_RS232
#if CONFIG_RS232_UP2400
chrin_rs232:
STUB_IMPLEMENTATION() // XXX provide implementation for both UP2400 and UP9600
#endif // HAS_RS232
#endif // CONFIG_RS232_UP2400
+43
View File
@@ -0,0 +1,43 @@
//
// RS-232 part of the CHRIN routine
//
// Based on UP9600 code by Daniel Dallman with Bo Zimmerman adaptations
#if CONFIG_RS232_UP9600
chrin_rs232:
phy_trash_a
phx_trash_a
lda #$00
sta XXX_SAVBYTE
sta RSSTAT
jsr XXX_RSIN
bcc !+
plx_trash_a
ply_trash_a
lda #$08 // XXX don't we have some routine for this?
sta RSSTAT
lda #$00
clc
rts
!:
sta XXX_SAVBYTE
XXX_DOGET4:
plx_trash_a
ply_trash_a
lda XXX_SAVBYTE
clc
rts
#endif // CONFIG_RS232_UP9600