small size optimization in tape support code

This commit is contained in:
FeralChild64 committed 2020-01-22 20:58:06 +01:00
1 parent 0ff947ca1d
commit 136cb528f7
5 files changed
+26 -29

No files matched your search

+1 -1
View File
@@ -56,7 +56,7 @@
#define CONFIG_TAPE_NORMAL
#define CONFIG_TAPE_TURBO
#define CONFIG_TAPE_AUTODETECT // mostly works, but not fullyy done yet!
#define CONFIG_TAPE_AUTODETECT // mostly works, but not fully done yet!
// #define CONFIG_TAPE_NO_KEY_SENSE
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
+1 -1
View File
@@ -48,7 +48,7 @@
#define CONFIG_IEC_JIFFYDOS
#define CONFIG_IEC_JIFFYDOS_BLANK
#define CONFIG_TAPE_NORMAL
// #define CONFIG_TAPE_NORMAL
#define CONFIG_TAPE_TURBO
// #define CONFIG_TAPE_NO_KEY_SENSE
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
+2 -19
View File
@@ -56,18 +56,11 @@ load_tape_normal_takeover: // entry point for turbo->normal takeover
#endif
// Temporarily store MEMUSS in EAL
lda MEMUSS+1
sta EAL+1
lda MEMUSS+0
sta EAL+0
// FALLTROUGH
load_tape_normal_header:
// Try to load header into tape buffer
// Try to load header into tape buffer (we will restore MEMUSS later)
lda TAPE1+1
sta MEMUSS+1
@@ -98,7 +91,7 @@ load_tape_normal_header:
!:
// Restore MEMUSS, handle header
jsr load_tape_normal_restore_MEMUSS
jsr lvs_setup_MEMUSS
jsr tape_handle_header
bcs load_tape_normal_header // if name does not match, look for other header
@@ -119,14 +112,4 @@ load_tape_normal_payload:
jmp tape_load_success
load_tape_normal_restore_MEMUSS:
lda EAL+1
sta MEMUSS+1
lda EAL+0
sta MEMUSS+0
rts
#endif
-8
View File
@@ -138,12 +138,4 @@ tape_normal_get_data_fail:
rts
tape_normal_update_checksum:
lda INBIT
eor RIPRTY
sta RIPRTY
rts
#endif
@@ -0,0 +1,22 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Tape (normal) helper routine - checksum calculation
//
#if CONFIG_TAPE_NORMAL
tape_normal_update_checksum:
lda INBIT
eor RIPRTY
sta RIPRTY
rts
#endif