moved pulse probilng to raster interrupt routine
This commit is contained in:
1 parent
753603e563
commit
023a21c3ef
3 files changed
+140
-29
No files matched your search
@@ -15,6 +15,7 @@ tape_head_align_get_pulse:
|
||||
// This routine differs from the one used to read pulse during tape reading:
|
||||
// - it is not as precise
|
||||
// - it terminates when timer reaches $FF
|
||||
// - ir returns value in .Y
|
||||
|
||||
lda #$10
|
||||
!:
|
||||
@@ -27,14 +28,18 @@ tape_head_align_get_pulse:
|
||||
cpy #$FF
|
||||
bne !-
|
||||
!:
|
||||
// FALLTROUGH
|
||||
|
||||
tape_head_align_get_pulse_start_timer:
|
||||
|
||||
// Start timer again, force latch reload, count timer A underflows
|
||||
|
||||
ldx #%01010001
|
||||
stx CIA2_CRB // $DD0F
|
||||
lda #%01010001
|
||||
sta CIA2_CRB // $DD0F
|
||||
|
||||
// Return with time elapsed
|
||||
// Return with time elapsed in .Y
|
||||
|
||||
tya
|
||||
rts
|
||||
|
||||
|
||||
#endif // CONFIG_TAPE_HEAD_ALIGN
|
||||
Reference in new issue
Block a user