diff --git a/c64/aliases/,aliases_rom_kernal.s b/c64/aliases/,aliases_rom_kernal.s index 35e89d07..2f568ce2 100644 --- a/c64/aliases/,aliases_rom_kernal.s +++ b/c64/aliases/,aliases_rom_kernal.s @@ -1,5 +1,8 @@ +// #LAYOUT# * BASIC_1 #IGNORE +// #LAYOUT# * * #TAKE // Kernal jump table + .label JCINT = $FF81 .label JIOINIT = $FF84 .label JRAMTAS = $FF87 diff --git a/c64/basic/,imports.s b/c64/basic/,imports.s index b45fc2ab..8c7b7643 100644 --- a/c64/basic/,imports.s +++ b/c64/basic/,imports.s @@ -1,3 +1,8 @@ +// #LAYOUT# STD * #TAKE +// #LAYOUT# M65 BASIC_0 #TAKE +// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000 +// #LAYOUT# * * #IGNORE + // Routines imported from Kernal - our private API diff --git a/c64/basic/ab1e.strout.s b/c64/basic/ab1e.strout.s index d067e9e1..0c2e99b7 100644 --- a/c64/basic/ab1e.strout.s +++ b/c64/basic/ab1e.strout.s @@ -1,6 +1,7 @@ // #LAYOUT# STD * #TAKE // #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000 // #LAYOUT# * BASIC_0 #TAKE +// #LAYOUT# M65 BASIC_1 #TAKE-FLOAT // #LAYOUT# * * #IGNORE // Print string at $YYAA diff --git a/c64/basic/board_m65/4000.mega65_vectable_basic_1.s b/c64/basic/board_m65/4000.mega65_vectable_basic_1.s index 18b1e0cc..6914ef45 100644 --- a/c64/basic/board_m65/4000.mega65_vectable_basic_1.s +++ b/c64/basic/board_m65/4000.mega65_vectable_basic_1.s @@ -11,25 +11,12 @@ // Label definitions - .label VB1__TEST = $4000 + 2 * 0 - -TEST: - - jsr map_BASIC_1 - jmp (VB1__TEST) + .label VB1__INITMSG = $4000 + 2 * 0 #else // Vector table (OpenROMs private!) - .word TEST - - -TEST: - - inc 53280 - inc 53281 - - jmp map_NORMAL + .word INITMSG #endif diff --git a/c64/basic/board_m65/mega65_dummy.s b/c64/basic/board_m65/mega65_dummy.s deleted file mode 100644 index 338a1c16..00000000 --- a/c64/basic/board_m65/mega65_dummy.s +++ /dev/null @@ -1,7 +0,0 @@ -// #LAYOUT# M65 BASIC_1 #TAKE -// #LAYOUT# * * #IGNORE - - -// Dummy, just to have anything in segment 1 - - brk diff --git a/c64/basic/board_m65/mega65_imports.s b/c64/basic/board_m65/mega65_imports.s new file mode 100644 index 00000000..4a82834f --- /dev/null +++ b/c64/basic/board_m65/mega65_imports.s @@ -0,0 +1,23 @@ +// #LAYOUT# M65 BASIC_1 #TAKE +// #LAYOUT# * * #IGNORE + +// +// Definitions for calling Mega65 segments BASIC_0 and KERNAL_0 routines from BASIC_1 +// + +#import "BASIC_0_combined.sym" + + +.label JCHROUT = BASIC_0.proxy_B1_JCHROUT +.label plot_set = KERNAL_0.plot_set + +.label basic_do_new = BASIC_0.proxy_B1_basic_do_new +.label rom_revision_basic_string = BASIC_0.rom_revision_basic_string +.label print_integer = BASIC_0.proxy_B1_print_integer +.label print_packed_message = BASIC_0.proxy_B1_print_packed_message +#if CONFIG_SHOW_PAL_NTSC +.label print_pal_ntsc = BASIC_0.proxy_B1_print_pal_ntsc +#endif +#if CONFIG_SHOW_FEATURES +.label print_features = BASIC_0.proxy_B1_print_features +#endif diff --git a/c64/basic/board_m65/mega65_proxies.s b/c64/basic/board_m65/mega65_proxies.s new file mode 100644 index 00000000..f78b47b9 --- /dev/null +++ b/c64/basic/board_m65/mega65_proxies.s @@ -0,0 +1,54 @@ +// #LAYOUT# M65 BASIC_0 #TAKE +// #LAYOUT# * * #IGNORE + +// +// Proxies for calling Mega65 segment BASIC_0 and KERNAL_0 routines from BASIC_1 +// + + +proxy_B1_JCHROUT: + + jsr map_NORMAL + jsr JCHROUT + jmp map_BASIC_1 + + +proxy_B1_basic_do_new: + + jsr map_NORMAL + jsr basic_do_new + jmp map_BASIC_1 + + +proxy_B1_print_integer: + + jsr map_NORMAL + jsr print_integer + jmp map_BASIC_1 + + +proxy_B1_print_packed_message: + + jsr map_NORMAL + jsr print_packed_message + jmp map_BASIC_1 + +#if CONFIG_SHOW_PAL_NTSC + +proxy_B1_print_pal_ntsc: + + jsr map_NORMAL + jsr print_pal_ntsc + jmp map_BASIC_1 + +#endif + +#if CONFIG_SHOW_FEATURES + +proxy_B1_print_features: + + jsr map_NORMAL + jsr print_features + jmp map_BASIC_1 + +#endif diff --git a/c64/basic/init/e422.initmsg.jmp.s b/c64/basic/init/e422.initmsg.jmp.s index 9d69690f..591ed9ac 100644 --- a/c64/basic/init/e422.initmsg.jmp.s +++ b/c64/basic/init/e422.initmsg.jmp.s @@ -11,4 +11,15 @@ // INITMSG: + +#if ROM_LAYOUT_M65 + + jsr map_BASIC_1 + jsr_ind VB1__INITMSG + jmp map_NORMAL + +#else + jmp initmsg_real + +#endif diff --git a/c64/basic/init/initmsg_bytes_free.s b/c64/basic/init/initmsg_bytes_free.s index ee2c4fa5..0093c12a 100644 --- a/c64/basic/init/initmsg_bytes_free.s +++ b/c64/basic/init/initmsg_bytes_free.s @@ -1,5 +1,6 @@ // #LAYOUT# STD * #TAKE -// #LAYOUT# * BASIC_0 #TAKE +// #LAYOUT# M65 BASIC_1 #TAKE +// #LAYOUT# X16 BASIC_0 #TAKE // #LAYOUT# * * #IGNORE // diff --git a/c64/basic/init/initmsg_real.s b/c64/basic/init/initmsg_real.s index 15ca951c..10aedb76 100644 --- a/c64/basic/init/initmsg_real.s +++ b/c64/basic/init/initmsg_real.s @@ -1,13 +1,22 @@ // #LAYOUT# STD * #TAKE -// #LAYOUT# * BASIC_0 #TAKE +// #LAYOUT# M65 BASIC_1 #TAKE +// #LAYOUT# X16 BASIC_0 #TAKE // #LAYOUT# * * #IGNORE // Routine is too long to fit in the original location +#if ROM_LAYOUT_M65 + +INITMSG: + +#else + initmsg_real: +#endif + // Clear the screen first, some cartridges (like IEEE-488) leeave a mess on the screen lda #147 jsr JCHROUT diff --git a/c64/basic/init/startup_banner.s b/c64/basic/init/startup_banner.s index faedc2c3..bf828819 100644 --- a/c64/basic/init/startup_banner.s +++ b/c64/basic/init/startup_banner.s @@ -1,5 +1,6 @@ // #LAYOUT# STD * #TAKE -// #LAYOUT# * BASIC_0 #TAKE +// #LAYOUT# M65 BASIC_1 #TAKE +// #LAYOUT# X16 BASIC_0 #TAKE // #LAYOUT# * * #IGNORE // diff --git a/c64/kernal/board_m65/mega65_tape_normal_byte_store.s b/c64/kernal/board_m65/mega65_tape_normal_byte_store.s index 4c8cc13f..ae641f34 100644 --- a/c64/kernal/board_m65/mega65_tape_normal_byte_store.s +++ b/c64/kernal/board_m65/mega65_tape_normal_byte_store.s @@ -2,7 +2,7 @@ // #LAYOUT# * * #IGNORE // -// Tape (normal) helper routine - byte storage when ban changing is needed +// Tape (normal) helper routine - byte storage when banking change is needed //