tape code cleanup, added impulse detection for normal mode

This commit is contained in:
FeralChild64 committed 2019-12-18 17:45:20 +01:00
1 parent d5d3a1c3b2
commit f1e5a4cb3e
6 files changed
+219 -91

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
//
// Tape (turbo) helper routine - byte 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_byte:
lda #$01
sta ROPRTY // init the to-be-read byte with 1 (canary bit to mark loop end)
!:
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
#endif // CONFIG_TAPE_TURBO