no-badline tape loading for Mega65, some macro fixes

This commit is contained in:
FeralChild64 committed 2020-05-31 22:55:00 +02:00
1 parent df00cc507d
commit 1f5f43b211
13 files changed
+75 -21

No files matched your search

+3 -3
View File
@@ -112,9 +112,9 @@
#if ROM_LAYOUT_M65 && !CONFIG_CPU_M65_45GS02
.error "Mega65 ROM layout requires CONFIG_CPU_M65_45GS02"
#endif
//#if ROM_LAYOUT_M65 && !CONFIG_MB_MEGA_65
// .error "Mega65 ROM layout requires CONFIG_MB_MEGA_65"
//#endif
#if ROM_LAYOUT_M65 && !CONFIG_MB_MEGA_65
.error "Mega65 ROM layout requires CONFIG_MB_MEGA_65"
#endif
.var selected = 0;
+2
View File
@@ -186,6 +186,8 @@
.const C65_EXTKEYS_PR = $D607
.const C65_EXTKEYS_DDR = $D608
.const M65_BADL_SLI = $D710
#endif
+4 -2
View File
@@ -84,8 +84,10 @@ __msg_kernalfound:
#if CONFIG_MB_MEGA_65
__msg_kernaloksearching:
.text "OK, SEARCHING"
.byte $80 + $0D // end of string mark + return
.text "OK"
.byte $0D, $0D
.text "SEARCHIN"
.byte $80 + $47 // end of string mark + 'G'
#endif
+1 -2
View File
@@ -25,8 +25,7 @@
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
.label screen_on = KERNAL_0.screen_on
.label screen_off = KERNAL_0.screen_off
.label mega65_unhide = KERNAL_0.mega65_unhide
.label tape_motor_on = KERNAL_0.tape_motor_on
.label tape_motor_off = KERNAL_0.tape_motor_off
+24
View File
@@ -0,0 +1,24 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 * #IGNORE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Routine to unhide Mega65 extra registers
//
#if CONFIG_KEYBOARD_C65 || (CONFIG_MB_MEGA_65 && (CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO))
mega65_unhide:
lda #$A5
sta VIC_KEY
lda #$96
sta VIC_KEY
rts
#endif
+2 -2
View File
@@ -61,7 +61,7 @@ IOINIT:
lda #$00
#if !CONFIG_MB_MEGA65
#if !CONFIG_MB_MEGA_65
// First the standard chip (skip if it is covered by whole $D4XX range)
@@ -111,7 +111,7 @@ IOINIT:
sta SID_SIGVOL + __SID_L1_OFFSET
sta SID_SIGVOL + __SID_L2_OFFSET
#endif // CONFIG_MB_MEGA65
#endif // CONFIG_MB_MEGA_65
//
// Now continue the CIAs initialization
+2 -6
View File
@@ -48,14 +48,10 @@ SCNKEY:
// mode when done. This is not ideal, but as MEGA65s start C65 mode with VIC-IV IO mode
// selected anyway, it should not be a big problem in practice.
lda #$A5
sta VIC_KEY
lda #$96
sta VIC_KEY
jsr mega65_unhide
jsr scnkey_viciv_mode
sta VIC_KEY
sta VIC_KEY // hide Mega65 registers
rts
scnkey_viciv_mode:
+1 -1
View File
@@ -8,7 +8,7 @@
//
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO || (CONFIG_IEC_JIFFYDOS && !CONFIG_MEMORY_MODEL_60K)
#if ((CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO) && !CONFIG_MB_MEGA_65) || (CONFIG_IEC_JIFFYDOS && !CONFIG_MEMORY_MODEL_60K)
screen_off:
+2 -1
View File
@@ -8,7 +8,7 @@
//
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
#if (CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO) && !CONFIG_MB_MEGA_65
screen_on:
@@ -19,4 +19,5 @@ screen_on:
rts
#endif
+1 -1
View File
@@ -17,7 +17,7 @@ tape_common_autodetect:
lda #$0B
sta VIC_EXTCOL
lda #$00
#if CONFIG_MB_MEGA65
#if CONFIG_MB_MEGA_65
sta SID_SIGVOL + __SID_R1_OFFSET
sta SID_SIGVOL + __SID_L1_OFFSET
#else
+1 -1
View File
@@ -16,7 +16,7 @@ tape_clean_sid:
ldy #$1C
!:
#if CONFIG_MB_MEGA65
#if CONFIG_MB_MEGA_65
// It should be safer than cleaning whole $D400-D47C range
+30
View File
@@ -21,8 +21,23 @@ tape_screen_on_motor_off:
lda COLSTORE
sta VIC_EXTCOL
#if !CONFIG_MB_MEGA_65
jmp screen_on
#else
// On Mega65 just reenable badline emulation
lda #$FF
sta M65_BADL_SLI
sta VIC_KEY
rts
#endif
tape_screen_off_motor_on:
// We do not want interrupts and CHROUT reenables them
@@ -36,7 +51,22 @@ tape_screen_off_motor_on:
lda VIC_EXTCOL
sta COLSTORE
#if !CONFIG_MB_MEGA_65
jsr screen_off
#else
// On Mega65 we do not have to turn the screen off;
// it is enough to disable badline emulation
jsr mega65_unhide
lda #$00
sta M65_BADL_SLI
#endif
jmp tape_motor_on
#endif
+2 -2
View File
@@ -23,7 +23,7 @@ tape_turbo_get_bit:
sta __turbo_half_S // store half of the last measurement result for short pulse
lda #$01
#if CONFIG_MB_MEGA65
#if CONFIG_MB_MEGA_65
sta SID_SIGVOL + __SID_R1_OFFSET
sta SID_SIGVOL + __SID_L1_OFFSET
#else
@@ -39,7 +39,7 @@ tape_turbo_get_bit:
sta __turbo_half_L // store half of the last measurement result for long pulse
lda #$00
#if CONFIG_MB_MEGA65
#if CONFIG_MB_MEGA_65
sta SID_SIGVOL + __SID_R1_OFFSET
sta SID_SIGVOL + __SID_L1_OFFSET
#else