started work on integrated head align tool

This commit is contained in:
FeralChild64 committed 2020-06-02 15:27:16 +02:00
1 parent a87d6bd065
commit e06046e82e
20 files changed
+187 -30

No files matched your search

@@ -17,6 +17,7 @@
.label VK1__load_tape_normal = $4000 + 2 * 3
.label VK1__load_tape_turbo = $4000 + 2 * 4
.label VK1__load_tape_auto = $4000 + 2 * 5
.label VK1__tape_head_align = $4000 + 2 * 6
#else
@@ -44,5 +45,10 @@
.word $0000
#endif
#if CONFIG_TAPE_HEAD_ALIGN
.word tape_head_align
#else
.word $0000
#endif
#endif
-1
View File
@@ -55,5 +55,4 @@ proxy_K1_print_return:
jsr print_return
jmp map_KERNAL_1
#endif
@@ -2,7 +2,7 @@
// #LAYOUT# * * #IGNORE
//
// ROM routine call redirect for tape loading
// ROM routine call redirect for tape routines
//
@@ -37,3 +37,14 @@ load_tape_auto:
jmp map_NORMAL
#endif
#if CONFIG_TAPE_HEAD_ALIGN
tape_head_align:
jsr map_KERNAL_1
jsr_ind VK1__tape_head_align
jmp map_NORMAL
#endif
+1 -1
View File
@@ -68,7 +68,7 @@ screen_scroll_up_delay_done: // entry point for cursor move control codes
sta SAL+1
sta EAL+1
lda #>$D800
lda #>COLOR_RAM
sta PNT+1
sta USER+1
@@ -50,7 +50,7 @@ screen_calculate_USER:
sec
sbc HIBASE
clc
adc #>$d800
adc #>COLOR_RAM
sta USER+1
rts
+1
View File
@@ -45,6 +45,7 @@ load_tape_normal:
// Start playing
jsr tape_common_prepare_cia
jsr tape_ask_play
jsr tape_prepare_reading
// FALLTROUGH
+1
View File
@@ -32,6 +32,7 @@ load_tape_auto:
// Start playing
jsr tape_common_prepare_cia
jsr tape_ask_play
jsr tape_prepare_reading
// FALLTROUGH
+9
View File
@@ -104,6 +104,15 @@ tape_wait_first_pulse:
tape_wait_play_done:
rts
//
// Prepare screen / tape motor for reading
//
tape_prepare_reading:
#if CONFIG_MB_MEGA_65
// Display confirmation
+109
View File
@@ -0,0 +1,109 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
// Tape (normal) helper routine - reading speed calibration
//
// Needs pulse length in .A
//
#if CONFIG_TAPE_HEAD_ALIGN
tape_head_align:
#if (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
jsr map_KERNAL_1
jsr_ind VK1__tape_head_align
jmp map_NORMAL
#else
// Start by asking for tape playback
// jsr tape_ask_play
// Disable interrupts
sei
// Set IO to default values
jsr IOINIT
jsr cint_legacy
// Clear color data ($0800)
ldy #$00
!:
lda #($10 + $06) // XXX synchronize colors with setup_vicii
sta $0800, y
sta $0900, y
sta $0A00, y
sta $0B00, y
iny
bne !-
// Clear bitmap data ($2000)
lda #$20
sta SAL+1
tya // put 0 to .A
sta SAL+0
!:
sta (SAL), y
iny
bne !-
inc SAL+1
ldx SAL+1
cpx #$40
bne !-
// Set graphics mode
lda #$28 // graphic memory start at $2000, color at $0800
sta VIC_YMCSB
lda #$3B // set bit 5 to enable graphic mode
sta VIC_SCROLY
// Set tape timing
// XXX
tape_head_align_loop_1:
// XXX waste pulse
tape_head_align_loop_2:
// XXX get pulse
// XXX put pulse
// XXX check time; if not enough passed - next iteration tape_head_align_loop2
// XXX check for STOP key; if pressed, quit
// XXX scroll
jmp tape_head_align_loop_1
tape_head_align_quit:
// Clear screen, restore old display settings
jsr cint_legacy
// XXX restore COLOR, VIC_EXTCOL, VIC_BGCOL0, CIA2_PRA
cli
rts // XXX perform new after quit
#endif // ROM layout
#endif // CONFIG_TAPE_HEAD_ALIGN