saved few bytes in KERNAL segment

This commit is contained in:
FeralChild64 committed 2020-06-06 14:47:27 +02:00
1 parent 2f2dda54c0
commit c9b0f7cea1
2 files changed
+44 -66

No files matched your search

+44 -4
View File
@@ -24,9 +24,9 @@
.label __ha_scroll = $1300;
// Flag for GFX effects
// Flag for GFX effects - reuse BASIC numeric work area on zero page
.label __ha_gfxflag = $1200; // 1 byte
.label __ha_gfxflag = TEMPF2; // 1 byte
tape_head_align:
@@ -194,10 +194,50 @@ tape_head_align_loop_1:
tax
bne !-
// Draw helpers and decorators
// Draw decorations
jsr tape_head_align_apply_gfx
lda __ha_gfxflag
inc __ha_gfxflag
clc
adc #$08
and #%00001100
bne !+
ldy #%11110001
lda #%10001111
bne !++
!:
ldy #%00000001
lda #%10000000
!:
ora __ha_chart + 7 + 8 * 0
sta __ha_chart + 7 + 8 * 0
tya
ora __ha_chart + 7 + 8 * 31
sta __ha_chart + 7 + 8 * 31
// Draw helper lines
lda __ha_gfxflag
and #%00000010
beq !+
// For 'normal'
lda #%00000001
ora __ha_chart + 7 + 8 * 6
sta __ha_chart + 7 + 8 * 6
lda #%00000001
ora __ha_chart + 7 + 8 * 13
sta __ha_chart + 7 + 8 * 13
// For 'turbo'
lda #%00010000
ora __ha_chart + 7 + 8 * 21
sta __ha_chart + 7 + 8 * 21
!:
// FALLTROUGH
tape_head_align_loop_2:
@@ -1,62 +0,0 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
// Tape head alignemnt tool - draw helper symbols
//
#if CONFIG_TAPE_HEAD_ALIGN
tape_head_align_apply_gfx:
// Apply GFX effects
lda __ha_gfxflag
inc __ha_gfxflag
clc
adc #$08
and #%00001100
bne !+
ldy #%11110001
lda #%10001111
bne !++
!:
ldy #%00000001
lda #%10000000
!:
ora __ha_chart + 7 + 8 * 0
sta __ha_chart + 7 + 8 * 0
tya
ora __ha_chart + 7 + 8 * 31
sta __ha_chart + 7 + 8 * 31
// Draw helper lines
lda __ha_gfxflag
and #%00000010
beq !+
// For 'normal'
lda #%00000001
ora __ha_chart + 7 + 8 * 6
sta __ha_chart + 7 + 8 * 6
lda #%00000001
ora __ha_chart + 7 + 8 * 13
sta __ha_chart + 7 + 8 * 13
// For 'turbo'
lda #%00010000
ora __ha_chart + 7 + 8 * 21
sta __ha_chart + 7 + 8 * 21
!:
rts
#endif