Skip to content

Commit 16b021e

Browse files
FIFO Flush fix
1 parent b5e1901 commit 16b021e

File tree

4 files changed

+37
-5
lines changed

4 files changed

+37
-5
lines changed

drvs/MIDIBox.a65

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
jmp driver.flush
1212
jmp driver.stop
1313

14-
DESC dta c'MIDIBox Driver 2.0 by GSD',$9B
14+
DESC dta c'MIDIBox Driver 2.0a by GSD',$9B
1515

1616
.endl
1717

@@ -176,6 +176,13 @@ flush_timeout:
176176
sta fifo_tail
177177

178178
flush_done:
179+
180+
waitFrame:
181+
bit VCOUNT
182+
bmi *-3
183+
bit VCOUNT
184+
bpl *-3
185+
179186
pla:tax
180187

181188
rts

drvs/MIDICar.a65

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
jmp driver.flush
1212
jmp driver.stop
1313

14-
DESC dta c'MIDICar Driver 2.1 by GSD',$9B
14+
DESC dta c'MIDICar Driver 2.1a by GSD',$9B
1515

1616
.endl
1717

@@ -37,7 +37,7 @@ DESC dta c'MIDICar Driver 2.1 by GSD',$9B
3737
; Start serial port service
3838

3939
.local Start
40-
bit isMCInit
40+
lda isMCInit
4141
bne exitStart
4242

4343
lda #1
@@ -116,6 +116,13 @@ waitOnMC:
116116
jmp flushLoop
117117

118118
endFlush:
119+
120+
waitFrame:
121+
bit VCOUNT
122+
bmi *-3
123+
bit VCOUNT
124+
bpl *-3
125+
119126
sty FIFO_Tail
120127

121128
cli
@@ -128,7 +135,7 @@ endFlush:
128135

129136
.local Stop
130137

131-
bit isMCInit
138+
lda isMCInit
132139
beq exitUnInit
133140

134141
bcc noFlush

drvs/MIDIMate.a65

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
jmp driver.flush
1212
jmp driver.stop
1313

14-
DESC dta c'MIDIMate Driver 2.0 by GSD',$9B
14+
DESC dta c'MIDIMate Driver 2.0a by GSD',$9B
1515

1616
.endl
1717

@@ -48,6 +48,10 @@ DESC dta c'MIDIMate Driver 2.0 by GSD',$9B
4848
lda pactl
4949
and #$f7
5050
sta pactl
51+
; set COMMAND LINE active
52+
lda pbctl
53+
and #$f7
54+
sta pbctl
5155

5256
; set serial
5357
LDA #%00000111 ; $07
@@ -159,6 +163,13 @@ flush_timeout:
159163
sta fifo_tail
160164

161165
flush_done:
166+
167+
waitFrame:
168+
bit VCOUNT
169+
bmi *-3
170+
bit VCOUNT
171+
bpl *-3
172+
162173
pla:tax
163174

164175
rts
@@ -189,6 +200,10 @@ noFlush:
189200
lda pactl
190201
ora #$08
191202
sta pactl
203+
; clear COMMAND LINE
204+
lda pbctl
205+
ora #$08
206+
sta pbctl
192207

193208
; Clear interrupts
194209
; (5) serial input data ready

drvs/atari.hea

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ SEROUT = $D20D
2323
IRQEN = $D20E
2424

2525
PACTL = $d302
26+
PBCTL = $d303
27+
28+
VCOUNT = $D40B

0 commit comments

Comments
 (0)