adapted BASIC to CRT memory layout, updated binaries

This commit is contained in:
FeralChild64 committed 2020-10-23 14:38:14 +02:00
1 parent 222b72cf7e
commit 732ba36d87
54 files changed
+461 -91

No files matched your search

@@ -0,0 +1,54 @@
;; #LAYOUT# CRT BASIC_0 #TAKE-FLOAT
;; #LAYOUT# CRT BASIC_1 #TAKE
;; #LAYOUT# * * #IGNORE
;
; Definitions for communication with cartridge segment BASIC_1 from BASIC_0
;
!ifdef SEGMENT_BASIC_0 {
; Label definitions
!addr JB1__INITMSG = $8000 + 3 * 0
!addr JB1__LINKPRG = $8000 + 3 * 1
!addr JB1__tokenise_line = $8000 + 3 * 2
!addr JB1__list_single_line = $8000 + 3 * 3
!addr JB1__print_packed_error = $8000 + 3 * 4
!addr JB1__print_packed_misc_str = $8000 + 3 * 5
!addr JB1__do_new = $8000 + 3 * 6
!addr JB1__do_clr = $8000 + 3 * 7
!addr JB1__do_restore = $8000 + 3 * 8
!addr JB1__cmd_mem_cont = $8000 + 3 * 9
!addr JB1__prepare_direct_execution = $8000 + 3 * 10
!addr JB1__helper_ask_if_sure = $8000 + 3 * 11
!ifdef CONFIG_DOS_WEDGE {
!addr JB1__wedge_dos = $8000 + 3 * 12
}
} else {
; Jump table (Open ROMs private!)
jmp INITMSG
jmp LINKPRG
jmp tokenise_line
jmp list_single_line
jmp print_packed_error
jmp print_packed_misc_str
jmp do_new
jmp do_clr
jmp do_restore
jmp cmd_mem_cont
jmp prepare_direct_execution
jmp helper_ask_if_sure
!ifdef CONFIG_DOS_WEDGE {
jmp wedge_dos
}
}
+1
View File
@@ -0,0 +1 @@
This particular address is not for interoperability - we had to choose some fixed location for the extended ROM jumptable, beginning of the mapped memory block is just sane.
+41
View File
@@ -0,0 +1,41 @@
;; #LAYOUT# CRT BASIC_1 #TAKE
;; #LAYOUT# * * #IGNORE
;; #IMPORT# BASIC_0 = BASIC_0_combined.sym
;; #IMPORT# KERNAL_0 = KERNAL_0_combined.sym
;
; Definitions for calling segments BASIC_0 and KERNAL_0 routines from BASIC_1
;
;; #ALIAS# peek_via_OLDTXT = BASIC_0.proxy_B1_peek_via_OLDTXT
;; #ALIAS# poke_via_OLDTXT = BASIC_0.proxy_B1_poke_via_OLDTXT
;; #ALIAS# JCHROUT = BASIC_0.proxy_B1_JCHROUT
;; #ALIAS# JCLALL = BASIC_0.proxy_B1_JCLALL
;; #ALIAS# plot_set = BASIC_0.proxy_B1_plot_set
;; #ALIAS# JCLOSE = BASIC_0.proxy_B1_JCLOSE
;; #ALIAS# JOPEN = BASIC_0.proxy_B1_JOPEN
;; #ALIAS# JMEMTOP = KERNAL_0.JMEMTOP
;; #ALIAS# JSETFLS = KERNAL_0.JSETFLS
;; #ALIAS# JSETNAM = KERNAL_0.JSETNAM
;; #ALIAS# JGETIN = KERNAL_0.JGETIN
;; #ALIAS# JCHKIN = BASIC_0.proxy_B1_JCHKIN
;; #ALIAS# JCHRIN = BASIC_0.proxy_B1_JCHRIN
;; #ALIAS# JREADST = KERNAL_0.JREADST
;; #ALIAS# JSCREEN = KERNAL_0.JSCREEN
;; #ALIAS# SELDEV = KERNAL_0.SELDEV
;; #ALIAS# init_oldtxt = BASIC_0.init_oldtxt
;; #ALIAS# tmpstr_free_all_reset = BASIC_0.tmpstr_free_all_reset
;; #ALIAS# print_hex_byte = BASIC_0.proxy_B1_print_hex_byte
;; #ALIAS# print_integer = BASIC_0.proxy_B1_print_integer
;; #ALIAS# print_return = BASIC_0.proxy_B1_print_return
;; #ALIAS# print_space = BASIC_0.proxy_B1_print_space
;; #ALIAS# print_features = BASIC_0.proxy_B1_print_features
;; #ALIAS# do_error_fetch = BASIC_0.do_error_fetch
;; #ALIAS# do_basic_error = BASIC_0.do_basic_error
;; #ALIAS# str_rev_question = BASIC_0.str_rev_question
;; #ALIAS# fetch_character = BASIC_0.proxy_B1_fetch_character
;; #ALIAS# fetch_character_skip_spaces = BASIC_0.proxy_B1_fetch_character_skip_spaces
;; #ALIAS# fetch_uint8 = BASIC_0.proxy_B1_fetch_uint8
;; #ALIAS# shell_main_loop = BASIC_0.proxy_B1_shell_main_loop
+130
View File
@@ -0,0 +1,130 @@
;; #LAYOUT# CRT BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
;
; Proxies for calling segment BASIC_0 and KERNAL_0 routines from BASIC_1
;
proxy_B1_peek_via_OLDTXT:
jsr map_NORMAL
!ifdef CONFIG_MEMORY_MODEL_60K {
!error "not implemented"
} else ifdef CONFIG_MEMORY_MODEL_46K_OR_50K {
jsr peek_under_roms_via_OLDTXT
cmp #$00
} else { ; CONFIG_MEMORY_MODEL_38K
lda (OLDTXT),y
}
jmp map_BASIC_1 ; do not do 'bra' - we want this one as fast as possible
proxy_B1_poke_via_OLDTXT:
jsr map_NORMAL
!ifdef CONFIG_MEMORY_MODEL_60K {
!error "not implemented"
} else { ; CONFIG_MEMORY_MODEL_38K || CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
sta (OLDTXT),y
}
jmp map_BASIC_1
proxy_B1_JCLALL:
jsr map_NORMAL
jsr JCLALL
jmp map_BASIC_1
!ifdef CONFIG_DOS_WEDGE {
proxy_B1_JCLOSE:
jsr map_NORMAL
jsr JCLOSE
jmp map_BASIC_1
proxy_B1_JOPEN:
jsr map_NORMAL
jsr JOPEN
jmp map_BASIC_1
}
proxy_B1_JCHKIN:
jsr map_NORMAL
jsr JCHKIN
jmp map_BASIC_1
proxy_B1_JCHRIN:
jsr map_NORMAL
jsr JCHRIN
jmp map_BASIC_1
proxy_B1_JCHROUT:
jsr map_NORMAL
jsr JCHROUT
jmp map_BASIC_1
proxy_B1_print_hex_byte:
jsr map_NORMAL
jsr print_hex_byte
jmp map_BASIC_1
proxy_B1_print_integer:
jsr map_NORMAL
jsr print_integer
jmp map_BASIC_1
proxy_B1_print_return:
jsr map_NORMAL
jsr print_return
jmp map_BASIC_1
proxy_B1_print_space:
jsr map_NORMAL
jsr print_space
jmp map_BASIC_1
proxy_B1_plot_set:
jsr map_NORMAL
jsr plot_set
jmp map_BASIC_1
!ifdef CONFIG_DOS_WEDGE {
proxy_B1_fetch_character:
jsr map_NORMAL
jsr fetch_character
jmp map_BASIC_1
proxy_B1_fetch_character_skip_spaces:
jsr map_NORMAL
jsr fetch_character_skip_spaces
jmp map_BASIC_1
proxy_B1_fetch_uint8:
jsr map_NORMAL
jsr fetch_uint8
jmp map_BASIC_1
proxy_B1_shell_main_loop:
jsr map_NORMAL
jmp shell_main_loop
}
-4
View File
@@ -1,4 +0,0 @@
;; #LAYOUT# CRT BASIC_1 #TAKE
;; #LAYOUT# * * #IGNORE
+nop