36 lines
752 B
ArmAsm
36 lines
752 B
ArmAsm
// #LAYOUT# STD * #TAKE
|
|
// #LAYOUT# * KERNAL_0 #TAKE
|
|
// #LAYOUT# * * #IGNORE
|
|
|
|
//
|
|
// Tape (turbo) helper routine - bit reading
|
|
//
|
|
|
|
// Based on routine by enthusi/Onslaught, found here:
|
|
// - https://codebase64.pokefinder.org/doku.php?id=base:turbotape_loader_source
|
|
|
|
|
|
#if CONFIG_TAPE_TURBO
|
|
|
|
|
|
tape_turbo_get_bit:
|
|
|
|
#if CONFIG_TAPE_NORMAL
|
|
|
|
jsr tape_normal_get_pulse // reuse routine from NORMAL system
|
|
|
|
#else
|
|
|
|
lda #$10
|
|
!:
|
|
bit CIA1_ICR // $DC0D
|
|
beq !- // busy loop to detect signal, restart timer afterwards
|
|
lda CIA2_TIMBLO // $DD06
|
|
ldx #%01010001 // start timer, force latch reload, count timer A underflows
|
|
stx CIA2_CRB // $DD0F
|
|
|
|
#endif
|
|
|
|
|
|
#endif // CONFIG_TAPE_TURBO
|