tape code cleanup, added impulse detection for normal mode
This commit is contained in:
1 parent
d5d3a1c3b2
commit
f1e5a4cb3e
6 files changed
+219
-91
No files matched your search
@@ -98,88 +98,5 @@ load_tape_turbo_loop:
|
||||
beq_far tape_load_success
|
||||
jmp tape_load_error
|
||||
|
||||
tape_turbo_get_byte:
|
||||
|
||||
lda #$01
|
||||
sta ROPRTY // init the to-be-read byte with 1
|
||||
!:
|
||||
jsr tape_turbo_get_bit
|
||||
rol ROPRTY
|
||||
bcc !- // is the initial 1 shifted into carry already?
|
||||
lda ROPRTY // much nicer than ldx #8: dex: loop
|
||||
|
||||
rts
|
||||
|
||||
|
||||
tape_turbo_get_bit:
|
||||
|
||||
lda #$10
|
||||
!:
|
||||
bit CIA1_ICR // $DC0D
|
||||
beq !- // busy loop to detect signal
|
||||
lda CIA2_ICR // $DD0D
|
||||
pha
|
||||
lda #$19
|
||||
sta CIA2_CRA // $DD0E
|
||||
pla
|
||||
|
||||
pha // audio/video effects
|
||||
asl
|
||||
sta SID_SIGVOL
|
||||
beq !+
|
||||
#if CONFIG_COLORS_BRAND && CONFIG_BRAND_ULTIMATE_64
|
||||
lda #$0B
|
||||
#else
|
||||
lda #$06
|
||||
#endif
|
||||
!:
|
||||
sta VIC_EXTCOL
|
||||
pla
|
||||
|
||||
lsr
|
||||
rts
|
||||
|
||||
tape_turbo_sync_common:
|
||||
|
||||
jsr tape_turbo_get_bit
|
||||
rol ROPRTY
|
||||
lda ROPRTY
|
||||
cmp #$02
|
||||
bne tape_turbo_sync_common
|
||||
rts
|
||||
|
||||
tape_turbo_sync_header:
|
||||
|
||||
ldx #$FF
|
||||
!:
|
||||
ldy #$03
|
||||
!:
|
||||
jsr tape_turbo_sync_common
|
||||
dey
|
||||
bne !-
|
||||
dex
|
||||
bne !--
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
tape_turbo_sync_payload:
|
||||
|
||||
jsr tape_turbo_sync_common
|
||||
!:
|
||||
ldx #$09 // 9,8,... is real turboTape
|
||||
!: // I sometimes used 8,7,6... to avoid it being listed in vice :)
|
||||
jsr tape_turbo_get_byte
|
||||
cmp #$02
|
||||
beq !-
|
||||
ldy #$00
|
||||
!:
|
||||
cpx ROPRTY
|
||||
bne tape_turbo_sync_payload
|
||||
jsr tape_turbo_get_byte
|
||||
dex
|
||||
bne !-
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // CONFIG_TAPE_TURBO
|
||||
Reference in new issue
Block a user