initial support for Mega65 extra ROM
This commit is contained in:
1 parent
7539c6b072
commit
4d56864327
333 files changed
+1747
-289
No files matched your search
@@ -55,11 +55,19 @@ TOOLS_LIST = $(pathsubst src/tools/%,build/tools/%,$(basename $(SRC_TOOLS)))
|
||||
|
||||
# List of targets
|
||||
|
||||
STD_TARGET_LIST = build/kernal_custom.rom build/basic_custom.rom \
|
||||
build/kernal_generic.rom build/basic_generic.rom \
|
||||
build/kernal_testing.rom build/basic_testing.rom \
|
||||
build/kernal_mega65.rom build/basic_mega65.rom \
|
||||
build/kernal_ultimate64.rom build/basic_ultimate64.rom \
|
||||
STD_TARGET_LIST_CUSTOM = build/kernal_custom.rom build/basic_custom.rom
|
||||
STD_TARGET_LIST_GENERIC = build/kernal_generic.rom build/basic_generic.rom
|
||||
STD_TARGET_LIST_TESTING = build/kernal_testing.rom build/basic_testing.rom
|
||||
STD_TARGET_LIST_ULTIMATE64 = build/kernal_ultimate64.rom build/basic_ultimate64.rom
|
||||
STD_TARGET_LIST_MEGA65 = build/kernal_mega65.rom_0 \
|
||||
build/kernal_mega65.rom_1 \
|
||||
build/basic_mega65.rom_0
|
||||
|
||||
STD_TARGET_LIST = $(STD_TARGET_LIST_CUSTOM) \
|
||||
$(STD_TARGET_LIST_GENERIC) \
|
||||
$(STD_TARGET_LIST_TESTING) \
|
||||
$(STD_TARGET_LIST_MEGA65) \
|
||||
$(STD_TARGET_LIST_ULTIMATE64) \
|
||||
build/chargen.rom
|
||||
|
||||
EXT_TARGET_LIST = build/mega65.rom
|
||||
@@ -126,9 +134,9 @@ build/target_testing/OUTB.BIN build/target_testing/BASIC_combined.vs: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(GEN_BASIC) $(SRCDIR_BASIC) \
|
||||
c64/,,config_testing.s build/target_testing/KERNAL_combined.sym \
|
||||
$(foreach dir,$(SRCDIR_BASIC),$(wildcard $(dir)/*.s))
|
||||
build/target_mega65/OUTB.BIN build/target_mega65/BASIC_combined.vs: \
|
||||
build/target_mega65/OUTB_0.BIN build/target_mega65/BASIC_0_combined.vs: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(GEN_BASIC) $(SRCDIR_BASIC) \
|
||||
c64/,,config_mega65.s build/target_mega65/KERNAL_combined.sym \
|
||||
c64/,,config_mega65.s build/target_mega65/KERNAL_0_combined.sym \
|
||||
$(foreach dir,$(SRCDIR_BASIC),$(wildcard $(dir)/*.s))
|
||||
build/target_ultimate64/OUTB.BIN build/target_ultimate64/BASIC_combined.vs: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(GEN_BASIC) $(SRCDIR_BASIC) \
|
||||
@@ -147,37 +155,41 @@ build/target_testing/OUTK.BIN build/target_testing/KERNAL_combined.vs bu
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(GEN_KERNAL) $(SRCDIR_KERNAL) \
|
||||
c64/,,config_testing.s \
|
||||
$(foreach dir,$(SRCDIR_KERNAL),$(wildcard $(dir)/*.s))
|
||||
build/target_mega65/OUTK.BIN build/target_mega65/KERNAL_combined.vs build/target_mega65/KERNAL_combined.sym: \
|
||||
build/target_mega65/OUTK_0.BIN build/target_mega65/KERNAL_0_combined.vs build/target_mega65/KERNAL_0_combined.sym: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(GEN_KERNAL) $(SRCDIR_KERNAL) \
|
||||
c64/,,config_mega65.s \
|
||||
$(foreach dir,$(SRCDIR_KERNAL),$(wildcard $(dir)/*.s))
|
||||
build/target_mega65/OUTK_1.BIN build/target_mega65/KERNAL_1_combined.vs build/target_mega65/KERNAL_1_combined.sym: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(GEN_KERNAL) $(SRCDIR_KERNAL) \
|
||||
c64/,,config_mega65.s \
|
||||
$(foreach dir,$(SRCDIR_KERNAL),$(wildcard $(dir)/*.s))
|
||||
build/target_ultimate64/OUTK.BIN build/target_ultimate64/KERNAL_combined.vs build/target_ultimate64/KERNAL_combined.sym: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(GEN_KERNAL) $(SRCDIR_KERNAL) \
|
||||
c64/,,config_ultimate64.s \
|
||||
$(foreach dir,$(SRCDIR_KERNAL),$(wildcard $(dir)/*.s))
|
||||
|
||||
build/target_custom/newrom: build/target_custom/OUTB.BIN build/target_custom/OUTK.BIN
|
||||
build/target_generic/newrom: build/target_generic/OUTB.BIN build/target_generic/OUTK.BIN
|
||||
build/target_testing/newrom: build/target_testing/OUTB.BIN build/target_testing/OUTK.BIN
|
||||
build/target_mega65/newrom: build/target_mega65/OUTB.BIN build/target_mega65/OUTK.BIN
|
||||
build/target_ultimate64/newrom: build/target_ultimate64/OUTB.BIN build/target_ultimate64/OUTK.BIN
|
||||
build/target_custom/newrom: build/target_custom/OUTB.BIN build/target_custom/OUTK.BIN
|
||||
build/target_generic/newrom: build/target_generic/OUTB.BIN build/target_generic/OUTK.BIN
|
||||
build/target_testing/newrom: build/target_testing/OUTB.BIN build/target_testing/OUTK.BIN
|
||||
build/target_mega65/newrom_0: build/target_mega65/OUTB_0.BIN build/target_mega65/OUTK_0.BIN
|
||||
build/target_ultimate64/newrom: build/target_ultimate64/OUTB.BIN build/target_ultimate64/OUTK.BIN
|
||||
|
||||
build/kernal_custom.rom: build/target_custom/newrom
|
||||
build/kernal_generic.rom: build/target_generic/newrom
|
||||
build/kernal_testing.rom: build/target_testing/newrom
|
||||
build/kernal_mega65.rom: build/target_mega65/newrom
|
||||
build/kernal_mega65.rom_0: build/target_mega65/newrom_0
|
||||
build/kernal_ultimate64.rom: build/target_ultimate64/newrom
|
||||
|
||||
build/basic_custom.rom: build/target_custom/newrom
|
||||
build/basic_generic.rom: build/target_generic/newrom
|
||||
build/basic_testing.rom: build/target_testing/newrom
|
||||
build/basic_mega65.rom: build/target_mega65/newrom
|
||||
build/basic_mega65.rom_0: build/target_mega65/newrom_0
|
||||
build/basic_ultimate64.rom: build/target_ultimate64/newrom
|
||||
|
||||
build/symbols_custom.vs: build/target_custom/BASIC_combined.vs build/target_custom/KERNAL_combined.vs
|
||||
build/symbols_generic.vs: build/target_generic/BASIC_combined.vs build/target_generic/KERNAL_combined.vs
|
||||
build/symbols_testing.vs: build/target_testing/BASIC_combined.vs build/target_testing/KERNAL_combined.vs
|
||||
build/symbols_mega65.vs: build/target_mega65/BASIC_combined.vs build/target_mega65/KERNAL_combined.vs
|
||||
build/symbols_mega65_0.vs: build/target_mega65/BASIC_0_combined.vs build/target_mega65/KERNAL_0_combined.vs
|
||||
build/symbols_ultimate64.vs: build/target_ultimate64/BASIC_combined.vs build/target_ultimate64/KERNAL_combined.vs
|
||||
|
||||
# Rules - BASIC and KERNAL
|
||||
@@ -190,13 +202,29 @@ build/,generated/packed_messages.s: $(TOOL_COMPRESS_TEXT)
|
||||
build/target_%/OUTB.BIN build/target_%/BASIC_combined.vs:
|
||||
@mkdir -p build/target_$*
|
||||
@rm -f $@* build/target_$*/BASIC*
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -s BASIC -i BASIC-$* -o OUTB.BIN -d build/target_$* -l a000 -h e4d2 c64/,,config_$*.s $(SRCDIR_BASIC) $(GEN_BASIC)
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r STD -s BASIC -i BASIC-$* -o OUTB.BIN -d build/target_$* -l a000 -h e4d2 c64/,,config_$*.s $(SRCDIR_BASIC) $(GEN_BASIC)
|
||||
|
||||
.PRECIOUS: build/target_%/OUTK.BIN build/target_%/KERNAL_combined.vs build/target_%/KERNAL_combined.sym
|
||||
build/target_%/OUTK.BIN build/target_%/KERNAL_combined.vs build/target_%/KERNAL_combined.sym:
|
||||
@mkdir -p build/target_$*
|
||||
@rm -f $@* build/target_$*/KERNAL*
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -s KERNAL -i KERNAL-$* -o OUTK.BIN -d build/target_$* -l e4d3 -h ffff c64/,,config_$*.s $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r STD -s KERNAL -i KERNAL-$* -o OUTK.BIN -d build/target_$* -l e4d3 -h ffff c64/,,config_$*.s $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||
|
||||
build/target_mega65/OUTB_0.BIN build/target_mega65/BASIC_0_combined.vs:
|
||||
@mkdir -p build/target_mega65
|
||||
@rm -f $@* build/target_mega65/BASIC_0*
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s BASIC_0 -i BASIC_0-mega65 -o OUTB_0.BIN -d build/target_mega65 -l a000 -h e4d2 c64/,,config_mega65.s $(SRCDIR_BASIC) $(GEN_BASIC)
|
||||
|
||||
build/target_mega65/OUTK_0.BIN build/target_mega65/KERNAL_0_combined.vs build/target_mega65/KERNAL_0_combined.sym:
|
||||
@mkdir -p build/target_mega65
|
||||
@rm -f $@* build/target_mega65/KERNAL_0*
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s KERNAL_0 -i KERNAL_0-mega65 -o OUTK_0.BIN -d build/target_mega65 -l e4d3 -h ffff c64/,,config_mega65.s $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||
|
||||
build/kernal_mega65.rom_1 build/target_mega65/OUTK_1.BIN build/target_mega65/KERNAL_1_combined.vs build/target_mega65/KERNAL_1_combined.sym:
|
||||
@mkdir -p build/target_mega65
|
||||
@rm -f $@* build/kernal_mega65.rom_1 build/target_mega65/KERNAL_1*
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s KERNAL_1 -i KERNAL_1-mega65 -o OUTK_1.BIN -d build/target_mega65 -l 4000 -h 7fff c64/,,config_mega65.s $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||
@cp build/target_mega65/OUTK_1.BIN build/kernal_mega65.rom_1
|
||||
|
||||
.PRECIOUS: build/target_%/newrom
|
||||
build/target_%/newrom:
|
||||
@@ -214,6 +242,15 @@ build/basic_%.rom:
|
||||
build/symbols_%.vs:
|
||||
sort build/target_$*/BASIC_combined.vs build/target_$*/KERNAL_combined.vs | uniq | grep -v "__" > $@
|
||||
|
||||
build/target_mega65/newrom_0:
|
||||
cat build/target_mega65/OUTB_0.BIN build/target_mega65/OUTK_0.BIN > $@
|
||||
|
||||
build/kernal_mega65.rom_0:
|
||||
dd if=build/target_mega65/newrom_0 bs=8192 count=1 skip=2 of=$@
|
||||
|
||||
build/basic_mega65.rom_0:
|
||||
dd if=build/target_mega65/newrom_0 bs=8192 count=1 skip=0 of=$@
|
||||
|
||||
build/kernal_hybrid.rom: kernal build/target_generic/OUTK.BIN
|
||||
@echo
|
||||
@echo $(HYBRID_WARNING)
|
||||
@@ -228,12 +265,14 @@ build/symbols_hybrid.vs: build/target_generic/KERNAL_combined.vs
|
||||
|
||||
# Rules - platform 'Mega 65' specific
|
||||
|
||||
build/mega65.rom: build/kernal_mega65.rom build/basic_mega65.rom build/chargen.rom
|
||||
dd if=/dev/zero bs=4096 count=10 of=build/mega65.rom
|
||||
cat build/basic_mega65.rom build/chargen.rom build/chargen.rom build/kernal_mega65.rom >> build/mega65.rom
|
||||
dd if=/dev/zero bs=65536 count=1 of=build/padding
|
||||
cat build/padding >> build/mega65.rom
|
||||
rm -f build/padding
|
||||
build/mega65.rom: build/kernal_0_mega65.rom build/target_mega65/OUTK_1.BIN build/basic_mega65.rom build/chargen.rom
|
||||
cat build/target_mega65/OUTK_1.BIN > build/mega65.rom
|
||||
dd if=/dev/zero bs=4096 count=6 of=build/padding1
|
||||
cat build/padding1 >> build/mega65.rom
|
||||
cat build/basic_mega65.rom build/chargen.rom build/chargen.rom build/kernal_0_mega65.rom >> build/mega65.rom
|
||||
dd if=/dev/zero bs=4096 count=16 of=build/padding2
|
||||
cat build/padding2 >> build/mega65.rom
|
||||
rm -f build/padding*
|
||||
|
||||
# Rules - tests
|
||||
|
||||
@@ -256,9 +295,6 @@ test_generic_x128: build/kernal_generic.rom build/basic_generic.rom build/symbol
|
||||
test_testing: build/kernal_testing.rom build/basic_testing.rom build/symbols_testing.vs
|
||||
x64 -kernal build/kernal_testing.rom -basic build/basic_testing.rom -moncommands build/symbols_testing.vs -1 $(TESTTAPE) -8 $(TESTDISK)
|
||||
|
||||
test_mega65_vice: build/kernal_mega65.rom build/basic_mega65.rom build/symbols_mega65.vs
|
||||
x64 -kernal build/kernal_mega65.rom -basic build/basic_mega65.rom -moncommands build/symbols_mega65.vs -1 $(TESTTAPE) -8 $(TESTDISK)
|
||||
|
||||
test_mega65: build/mega65.rom
|
||||
../xemu/build/bin/xmega65.native -dmarev 2 -forcerom -loadrom build/mega65.rom
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
//
|
||||
// Helper aliases to make the code more readable
|
||||
// Always use double underscore in label names
|
||||
|
||||
+24
-10
@@ -1,28 +1,42 @@
|
||||
|
||||
// Routines imported from Kernal - our private API
|
||||
|
||||
#import "KERNAL_combined.sym"
|
||||
#if ROM_LAYOUT_STD
|
||||
#import "KERNAL_combined.sym"
|
||||
#else
|
||||
#import "KERNAL_0_combined.sym"
|
||||
#endif
|
||||
|
||||
|
||||
.function KERNAL()
|
||||
{
|
||||
#if ROM_LAYOUT_STD
|
||||
.return KERNAL
|
||||
#else
|
||||
.return KERNAL_0
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#if CONFIG_PANIC_SCREEN
|
||||
.label panic = KERNAL.panic
|
||||
.label panic = KERNAL().panic
|
||||
#endif
|
||||
|
||||
.label hw_entry_reset = KERNAL.hw_entry_reset
|
||||
.label hw_entry_reset = KERNAL().hw_entry_reset
|
||||
|
||||
#if CONFIG_DBG_PRINTF
|
||||
.label printf = KERNAL.printf
|
||||
.label printf = KERNAL().printf
|
||||
#endif
|
||||
|
||||
.label plot_set = KERNAL.plot_set
|
||||
.label print_hex_byte = KERNAL.print_hex_byte
|
||||
.label print_return = KERNAL.print_return
|
||||
.label print_space = KERNAL.print_space
|
||||
.label plot_set = KERNAL().plot_set
|
||||
.label print_hex_byte = KERNAL().print_hex_byte
|
||||
.label print_return = KERNAL().print_return
|
||||
.label print_space = KERNAL().print_space
|
||||
|
||||
#if CONFIG_SHOW_FEATURES
|
||||
.label print_features = KERNAL.print_features
|
||||
.label print_features = KERNAL().print_features
|
||||
#endif
|
||||
|
||||
#if CONFIG_SHOW_PAL_NTSC
|
||||
.label print_pal_ntsc = KERNAL.print_pal_ntsc
|
||||
.label print_pal_ntsc = KERNAL().print_pal_ntsc
|
||||
#endif
|
||||
@@ -1,5 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
REASON:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - XXX
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 69, XXX
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
@@ -11,3 +12,6 @@
|
||||
|
||||
MAIN:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Well-known BASIC routine, described in:
|
||||
//
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 95
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 95
|
||||
// - https://www.lemon64.com/forum/viewtopic.php?t=64721&sid=bc400a5a6d404f8f092e4d32a92f5de7
|
||||
//
|
||||
|
||||
@@ -89,3 +90,6 @@ linkprg_end_of_line_search:
|
||||
sta OLDTXT+0
|
||||
|
||||
jmp linkprg_loop
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - XXX
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 69, XXX
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
@@ -11,3 +12,6 @@
|
||||
|
||||
CHRNCH:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// XXX provide documentation and real implementation
|
||||
|
||||
new:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
// see: https://www.lemon64.com/forum/viewtopic.php?t=64721&sid=bc400a5a6d404f8f092e4d32a92f5de7
|
||||
@@ -5,3 +6,6 @@
|
||||
|
||||
setcharptr:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,7 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Well-known BASIC routine, described in:
|
||||
//
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 97
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 97
|
||||
// - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
// - https://csdb.dk/forums/?roomid=11&topicid=137233
|
||||
//
|
||||
@@ -13,7 +14,7 @@ RUNC:
|
||||
// But CSDB claims, that it should 'set current character pointer to start of basic - 1' - this
|
||||
// looks sane, also checked that the original BASIC routine does this (short test program)
|
||||
|
||||
// Let's initialize TXTPTR using TXTTAB
|
||||
// Lets initialize TXTPTR using TXTTAB
|
||||
|
||||
lda TXTTAB+0
|
||||
sec
|
||||
@@ -25,3 +26,6 @@ RUNC:
|
||||
sta TXTPTR+1
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - XXX
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 69, XXX
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
@@ -11,3 +12,6 @@
|
||||
|
||||
QPLOP:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,18 +1,22 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Well-known BASIC routine, described in:
|
||||
//
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 97
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 97
|
||||
// - https://www.lemon64.com/forum/viewtopic.php?t=64721&sid=bc400a5a6d404f8f092e4d32a92f5de7
|
||||
// - https://www.lemon64.com/forum/viewtopic.php?t=70680&sid=3ff66caf7f5fdf2a3c2ff2ee31fc3fd8
|
||||
// - https://codebase64.org/doku.php?id=base:assembling_your_own_cart_rom_image
|
||||
|
||||
NEWSTT:
|
||||
|
||||
// XXX Real implementation is more complicated, it's actually a part
|
||||
// XXX Real implementation is more complicated, it iss actually a part
|
||||
// of the BASIC main loop. It is, however, often called by various
|
||||
// utilities to simply run the software which was just loaded or
|
||||
// uncompressed.
|
||||
|
||||
// For now, let's cheat a little - this should provide some compatibility:
|
||||
// For now, lets cheat a little - this should provide some compatibility:
|
||||
|
||||
jmp cmd_run
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - XXX
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 70, XXX
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 70, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
@@ -11,3 +12,6 @@
|
||||
|
||||
GONE:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,7 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Print string at $YYAA
|
||||
// Compute's Mapping the 64 p101
|
||||
// Computes Mapping the 64 p101
|
||||
|
||||
// print string routine
|
||||
|
||||
@@ -31,3 +33,6 @@ STROUT:
|
||||
pla // XXX can we use plx_trash_a here?
|
||||
tax
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
FRMEVL:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - XXX
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 70, XXX
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 70, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
@@ -11,3 +12,6 @@
|
||||
|
||||
EVAL:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
basic_adray1:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
basic_adray2:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Delete the current BASIC line, which is assumed to have already
|
||||
// been found with basic_find_line.
|
||||
// Really only consists of copying memory down.
|
||||
@@ -80,3 +82,6 @@ basic_delete_line:
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
// Compute's Mapping the 64 p93
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Computes Mapping the 64 p93
|
||||
|
||||
basic_do_error:
|
||||
// Save error number
|
||||
@@ -29,3 +31,6 @@ basic_do_error:
|
||||
ldx #$FE
|
||||
txs
|
||||
jmp basic_main_loop
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Jump back into the BASIC execute line loop
|
||||
// after first checking that we have a colon
|
||||
// or $00 char
|
||||
@@ -87,7 +89,7 @@ basic_execute_statement:
|
||||
|
||||
cmp #$7f
|
||||
bcc not_a_token
|
||||
// It's a token: So get the jump table entry for it, push it on the stack
|
||||
// It is a token: So get the jump table entry for it, push it on the stack
|
||||
// and then RTS to start it.
|
||||
asl
|
||||
tax
|
||||
@@ -112,7 +114,7 @@ not_a_token:
|
||||
cmp #$3a
|
||||
beq basic_skip_char
|
||||
|
||||
// If all else fails, it's a syntax error
|
||||
// If all else fails, it is a syntax error
|
||||
jmp do_SYNTAX_error
|
||||
|
||||
basic_skip_char:
|
||||
@@ -365,3 +367,6 @@ basic_command_jump_table:
|
||||
.word cmd_unimplemented-1
|
||||
.word cmd_unimplemented-1
|
||||
.word cmd_unimplemented-1
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Find the BASIC line with number LINNUM
|
||||
|
||||
|
||||
@@ -79,3 +81,6 @@ more_lines_exist:
|
||||
sta OLDTXT+0
|
||||
|
||||
jmp basic_find_line_loop
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Advance OLDTXT by following the
|
||||
// link to the next line
|
||||
|
||||
@@ -25,3 +27,6 @@ basic_find_next_line:
|
||||
pla
|
||||
sta OLDTXT+0
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
basic_follow_link_to_next_line:
|
||||
ldy #0
|
||||
|
||||
@@ -21,3 +24,6 @@ basic_follow_link_to_next_line:
|
||||
pla
|
||||
sta OLDTXT+0
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Insert the tokenised line stored at $0200.
|
||||
// First work out where in the list to put it
|
||||
// (basic_find_line with the line number can be used to work
|
||||
@@ -98,3 +100,6 @@ line_store_loop:
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
basic_main_loop:
|
||||
|
||||
// XXX - Check if direct or program mode, and get next line of input
|
||||
@@ -24,7 +27,7 @@ read_line_loop:
|
||||
// Not carriage return, so try to append to line so far
|
||||
cpx #80
|
||||
bcc !+
|
||||
// Report STRING TOO LONG error (Compute's Mapping the 64 p93)
|
||||
// Report STRING TOO LONG error (Computes Mapping the 64 p93)
|
||||
ldx #22
|
||||
jmp basic_do_error
|
||||
!:
|
||||
@@ -168,8 +171,11 @@ not_a_line:
|
||||
|
||||
// Put invalid line number in current line number value,
|
||||
// so that we know we are in direct mode
|
||||
// (Compute's Mapping the 64 p19)
|
||||
// (Computes Mapping the 64 p19)
|
||||
lda #$FF
|
||||
sta CURLIN+1
|
||||
|
||||
jmp basic_execute_statement
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
basic_parse_line_number:
|
||||
|
||||
jsr injest_number
|
||||
@@ -25,3 +27,6 @@ ml_bad_line_number:
|
||||
sta LINNUM+1
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
basic_shift_mem_down_and_relink:
|
||||
// Shift memory down to basic_current_line_pointer
|
||||
// from X bytes further along.
|
||||
@@ -169,3 +172,5 @@ relink_down_loop:
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
basic_shift_mem_up_and_relink:
|
||||
@@ -202,3 +203,6 @@ relink_up_loop:
|
||||
bcs relink_up_next_line
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Default values for BASIC vectors - described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - pages 68-70
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 318
|
||||
// - [RG64] C64 Programmers Reference Guide - pages 68-70
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 318
|
||||
//
|
||||
|
||||
basic_vector_defaults_1:
|
||||
@@ -19,3 +20,6 @@ basic_vector_defaults_2:
|
||||
|
||||
.word basic_adray1 // ADRAY1
|
||||
.word basic_adray2 // ADRAY2
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Well-known BASIC routine, described in:
|
||||
//
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 116, XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 116, XXX
|
||||
//
|
||||
|
||||
|
||||
@@ -10,3 +11,6 @@ LINPRT:
|
||||
// XXX This is temporary, to allow some software to work!
|
||||
// To be replaced by real impleementation.
|
||||
jmp print_integer
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Skip the gap between $C000-$DFFF
|
||||
|
||||
.fill $2000, $00
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
cmd_stop:
|
||||
ldx #30 // "BREAK"
|
||||
jsr print_packed_message
|
||||
@@ -20,3 +23,6 @@ cmd_stop:
|
||||
|
||||
cmd_end:
|
||||
jmp basic_main_loop
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,7 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// LIST basic text.
|
||||
// XXX - Doesn't currently support line number ranges
|
||||
// XXX - Does not currently support line number ranges
|
||||
|
||||
cmd_list:
|
||||
|
||||
@@ -148,3 +150,4 @@ list_end_of_line:
|
||||
jmp print_return
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
cmd_load:
|
||||
|
||||
// Parse filename
|
||||
@@ -7,7 +10,7 @@ cmd_load:
|
||||
// Parse optional device #
|
||||
// Parse optional secondary address
|
||||
|
||||
// XXX - C64 BASIC apparently doesn't clear variables after a LOAD in the
|
||||
// XXX - C64 BASIC apparently does not clear variables after a LOAD in the
|
||||
// middle of a program. For safety, we do.
|
||||
jsr basic_do_clr
|
||||
|
||||
@@ -77,7 +80,7 @@ got_devicenumber:
|
||||
sta SA
|
||||
jmp cmd_load_got_secondaryaddress
|
||||
!:
|
||||
// Second parameter is above 255, this can't be a secondary address
|
||||
// Second parameter is above 255, this can not be a secondary address
|
||||
// Use it as load address instead
|
||||
// XXX temporary syntax, it would be better to use something
|
||||
// XXX like 'LOAD"FILE",8 TO 49152'
|
||||
@@ -126,3 +129,6 @@ load_no_error:
|
||||
|
||||
// XXX - should run program if LOAD was used in program mode
|
||||
jmp basic_main_loop
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
cmd_new:
|
||||
jsr basic_do_new
|
||||
@@ -78,3 +80,6 @@ basic_do_clr:
|
||||
sta STREND+1
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// REM statement just skips to the next line
|
||||
|
||||
cmd_rem:
|
||||
jmp basic_end_of_line
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
cmd_run:
|
||||
// RUN clears all variables
|
||||
jsr basic_do_clr
|
||||
@@ -15,8 +18,11 @@ cmd_goto:
|
||||
jsr basic_parse_line_number
|
||||
jsr basic_find_line
|
||||
bcc !+
|
||||
// Line doesn't exist, so report error
|
||||
// Line does not exist, so report error
|
||||
jmp do_UNDEFD_STATEMENT_error
|
||||
!:
|
||||
// Run it!
|
||||
jmp basic_execute_from_current_line
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
cmd_sys:
|
||||
|
||||
jsr basic_end_of_statement_check
|
||||
@@ -66,3 +69,6 @@ cmd_sys_setup_call:
|
||||
|
||||
cmd_sys_hack_str:
|
||||
.byte $FF, $AC, $36, $35, $36, $00
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Default handler for all not-yet-implemented commands
|
||||
//
|
||||
@@ -154,3 +156,6 @@ cmd_go:
|
||||
cmd_unimplemented:
|
||||
|
||||
jmp do_NOT_IMPLEMENTED_error
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// As many errors are triggered from many places in the BASIC
|
||||
// interprettor, it is important to have an efficicent means of
|
||||
// calling them.
|
||||
@@ -165,3 +167,6 @@ do_basic_error:
|
||||
// XXX - Restore stack depth first?
|
||||
|
||||
jmp basic_main_loop
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - XXX
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 69, XXX
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
@@ -11,3 +12,6 @@
|
||||
|
||||
ERROR:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
INIT:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
RVECT:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Multiply Floating Point Accumulator by 10
|
||||
// = 8x + 2x
|
||||
// Implement by shifting MAC left one bit,
|
||||
@@ -95,3 +97,6 @@ f1md2_l1:
|
||||
dey
|
||||
bpl f1md2_l1
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,8 @@
|
||||
// Compute's Mapping the C64 p88
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Computes Mapping the C64 p88
|
||||
|
||||
.word basic_cold_start
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,8 @@
|
||||
// Compute's Mapping the C64 p88
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Computes Mapping the C64 p88
|
||||
|
||||
.word basic_warm_start
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Continuation of the BASIC cold start routine
|
||||
//
|
||||
|
||||
|
||||
basic_cold_start_internal:
|
||||
|
||||
// Setup vectors at $300
|
||||
@@ -34,3 +36,6 @@ basic_cold_start_internal:
|
||||
|
||||
// jump into warm start loop
|
||||
jmp basic_warm_start
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Continuation of the BASIC cold start routine
|
||||
@@ -27,3 +28,6 @@ basic_warm_start_real:
|
||||
|
||||
!:
|
||||
jmp basic_main_loop
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
// BASIC Cold start entry point
|
||||
// Compute's Mapping the 64 p211
|
||||
// Computes Mapping the 64 p211
|
||||
|
||||
basic_cold_start:
|
||||
|
||||
@@ -17,6 +20,9 @@ basic_cold_start:
|
||||
dey
|
||||
bpl !--
|
||||
|
||||
// Remaining part wouldn't fit here
|
||||
// Remaining part would not fit here
|
||||
|
||||
jmp basic_cold_start_internal
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Clear screen etc, show READY prompt.
|
||||
|
||||
basic_warm_start:
|
||||
|
||||
jmp basic_warm_start_real
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,11 +1,15 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Well-known BASIC routine, described in:
|
||||
//
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 212
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 212
|
||||
//
|
||||
// Prints the start-up messages
|
||||
//
|
||||
|
||||
INITMSG:
|
||||
jmp initmsg_real
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Print out the amount of free bytes - for the startup banner
|
||||
@@ -19,3 +20,6 @@ initmsg_bytes_free:
|
||||
// Print rest of the start up message
|
||||
ldx #34
|
||||
jmp print_packed_message
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Routine is too long to fit in the original location
|
||||
|
||||
@@ -146,3 +147,6 @@ initmsg_real:
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Startup banner, to be displayed during cold start
|
||||
@@ -110,3 +111,6 @@ pre_revision_string:
|
||||
// .byte $0D,$05,$92,$00
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
init_oldtxt:
|
||||
|
||||
@@ -7,3 +9,6 @@ init_oldtxt:
|
||||
sta OLDTXT+1
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
// Consummes a comma in a BASIC code, C set for no coma found
|
||||
|
||||
@@ -17,3 +19,6 @@ injest_comma:
|
||||
injest_comma_found:
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
// Parse a number from the input buffer at (TXTPTR)
|
||||
// Result is put into FAC1.
|
||||
// TXTPTR is updated with first position after the number.
|
||||
@@ -5,7 +8,7 @@
|
||||
// XXX - Remember decimal position and exponent, and apply them
|
||||
// after to produce normalised floating point number.
|
||||
|
||||
// XXX - Doesn't use routines to access memory under ROMs etc.
|
||||
// XXX - Does not use routines to access memory under ROMs etc.
|
||||
// This is important, because this routine operates on numbers in BASIC text.
|
||||
|
||||
ij_not_a_digit:
|
||||
@@ -127,7 +130,7 @@ ij_loop2:
|
||||
// Carry set, so we have overflowed.
|
||||
// We should shift everything right one digit, and increase
|
||||
// the exponent by one. The non-zero exponent tells us that we
|
||||
// can't fit any more precision in.
|
||||
// can not fit any more precision in.
|
||||
jsr fac1_mantissa_div2
|
||||
!:
|
||||
|
||||
@@ -149,5 +152,6 @@ erase_fac1:
|
||||
sta FACOV
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Pack a word using the simple compression scheme.
|
||||
// This has to be the same implementation as in compress_text.c
|
||||
// because we compress input lines of BASIC to do the tokenisation.
|
||||
@@ -253,3 +255,6 @@ not_a_match:
|
||||
// Not a char that we can pack, so return 0
|
||||
lda #$00
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Return C=1 if a pointer in BASIC memory space is NULL, else C=0
|
||||
// X = ZP pointer to check
|
||||
|
||||
@@ -32,3 +34,6 @@ peek_line_pointer_null_check:
|
||||
ptr_not_null:
|
||||
sec
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Works similar to $BDCD in original C64 BASIC
|
||||
// XXX Should eventually get replaced by a more flexible and optimal routine.
|
||||
// Temp result gets written to $0100-$0104
|
||||
@@ -142,3 +144,6 @@ number_table_hi:
|
||||
.byte 0,8,1,9,2
|
||||
.byte 1,6,3,8,4
|
||||
.byte 3,2,7,6,8
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// This routine prints messages that have been packed
|
||||
// using the make_error_tables program.
|
||||
// The general idea is to save space in the ROM.
|
||||
@@ -226,3 +228,6 @@ is_uncommon_char:
|
||||
phy_trash_a
|
||||
|
||||
jmp has_nybl
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,6 +1,11 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
ready_message:
|
||||
// See src/make_error_tables.c for packed message handling
|
||||
// information.
|
||||
ldx #29
|
||||
jmp print_packed_message
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,6 +1,10 @@
|
||||
// Compute's Mapping the 64, p89
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Computes Mapping the 64, p89
|
||||
// 8 character name
|
||||
// MEGABAS2 = "MEGA BASIC 2"
|
||||
|
||||
.byte $4D,$45,$47,$41,$42,$41,$53,$32
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// !!! PROPOSAL ONLY !!! PROPOSAL ONLY !!! NOT FOR USING EXTERNALLY YET !!!
|
||||
@@ -6,7 +7,7 @@
|
||||
// Do not change! Locations of the following data should be constant - now and forever!
|
||||
//
|
||||
// If you want to integrate Open ROMs support in your emulator, FPGA ccomputer, etc. - this
|
||||
// is the official way to recognize the ROM and it's revision.
|
||||
// is the official way to recognize the ROM and its revision.
|
||||
//
|
||||
|
||||
|
||||
@@ -30,3 +31,6 @@ rom_revision_basic_string:
|
||||
.byte $00 // marks the end of string
|
||||
|
||||
__rom_revision_basic_end:
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// !!! PROPOSAL ONLY !!! PROPOSAL ONLY !!! NOT FOR USING EXTERNALLY YET !!!
|
||||
@@ -6,14 +7,14 @@
|
||||
// Do not change! Locations of the following data should be constant - now and forever!
|
||||
//
|
||||
// If you want to integrate Open ROMs support in your emulator, FPGA ccomputer, etc. - this
|
||||
// is the official way to recognize the ROM and it's revision.
|
||||
// is the official way to recognize the ROM and its revision.
|
||||
//
|
||||
|
||||
|
||||
// $E4B7
|
||||
|
||||
// This vector is to be used by non-Kernal ROMs, if they want to
|
||||
// complain about incompatible ROM releases - don't use it directly,
|
||||
// complain about incompatible ROM releases - do not use it directly,
|
||||
// use a 'panic' pseudocommand with error code (will be passed using .A)
|
||||
// #P_ERR_ROM_MISMATCH - it should remain stable even between releases
|
||||
|
||||
@@ -44,3 +45,6 @@ rom_revision_kernal_string:
|
||||
.byte $00 // marks the end of string
|
||||
|
||||
__rom_revision_kernal_end:
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,7 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
select_device:
|
||||
|
||||
// Take last device number, make sure it's a drive - 8 or above. Above 30,
|
||||
// Take last device number, make sure it is a drive - 8 or above. Above 30,
|
||||
// although illegal for IEC we also consider a drive, as they exists
|
||||
// drivers assigning these numbers to CBM-DOS capable devices - like some
|
||||
// IEEE-488 carts.
|
||||
@@ -9,11 +11,12 @@ select_device:
|
||||
// If current device is not a drive, set device to 8 (first drive number)
|
||||
// Device number is left in X, for SETFLS Kernal routine
|
||||
|
||||
// Note: if tape support is introduced here, make sure DOS wedge won't get broken
|
||||
|
||||
ldx FA
|
||||
cpx #$08
|
||||
bcs !+
|
||||
ldx #$08
|
||||
!:
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// Tokenise a line of BASIC
|
||||
// Stored at $0200
|
||||
// Length in __tokenise_work1
|
||||
@@ -267,3 +269,5 @@ done_searching_for_token:
|
||||
lda #$00
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// IMPORTANT:
|
||||
// These routines lengths cannot be changed without changing
|
||||
// the aliases for peek_under_roms, poke_under_roms etc
|
||||
@@ -152,3 +154,6 @@ smd1:
|
||||
rts
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
#if CONFIG_DOS_WEDGE
|
||||
|
||||
@@ -256,3 +258,6 @@ wedge_dos_setnam:
|
||||
jmp JSETNAM
|
||||
|
||||
#endif // CONFIG_DOS_WEDGE
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,5 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
|
||||
#if CONFIG_TAPE_WEDGE
|
||||
|
||||
@@ -32,3 +34,6 @@ wedge_tape:
|
||||
|
||||
|
||||
#endif // CONFIG_TAPE_WEDGE
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD
|
||||
|
||||
//
|
||||
// LOAD routine hook for fast loading via UltiDOS
|
||||
@@ -129,3 +130,6 @@ u64_load_check_status_ok:
|
||||
jmp !-
|
||||
!:
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
// Screen CHROUT
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
// Insert line at top of screen
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,8 @@
|
||||
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
// IEC close
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
|
||||
cartridge_signature:
|
||||
|
||||
.byte $C3,$C2,$CD,$38,$30
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,6 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
// CHR$ codes for the 16 colours
|
||||
|
||||
colour_codes:
|
||||
.byte 144,5,28,159,156,30,31,158
|
||||
.byte 129,149,150,151,152,153,154,155
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// Default values for Kernal vectors - described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - page 293 (RESTOR), 304 (VECTOR)
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 237
|
||||
// - [RG64] C64 Programmers Reference Guide - page 293 (RESTOR), 304 (VECTOR)
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 237
|
||||
//
|
||||
|
||||
vector_defaults:
|
||||
@@ -24,3 +25,6 @@ vector_defaults:
|
||||
.word default_brk_handler // USRCMD
|
||||
.word LOAD // ILOAD
|
||||
.word SAVE // ISAVE
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// Values for IRQ generation timer - original idea was:
|
||||
@@ -21,3 +22,6 @@ irq_timing_hi: // high bytes
|
||||
|
||||
.byte >17045 // NTSC
|
||||
.byte >16421 // PAL
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// Values for IRQ generation timer - original idea was:
|
||||
@@ -21,3 +22,6 @@ irq_timing_lo: // low bytes
|
||||
|
||||
.byte <17045 // NTSC
|
||||
.byte <16421 // PAL
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// Messages to be prined out by Kernal
|
||||
@@ -110,3 +111,6 @@ __msg_kernalfeatures:
|
||||
.byte $80 + $0D // end of string mark + return
|
||||
|
||||
#endif // CONFIG_SHOW_FEATURES
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
+9
-3
@@ -1,5 +1,7 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
// Kernal error codes are described in 'Commodore 64 Programmer's Reference Guide', page 306
|
||||
|
||||
// Kernal error codes are described in 'Commodore 64 Programmers Reference Guide', page 306
|
||||
|
||||
kernalerror_ROUTINE_TERMINATED: // by a STOP key
|
||||
lda #K_ERR_ROUTINE_TERMINATED
|
||||
@@ -56,14 +58,15 @@ kernalerror_TOP_MEM_RS232:
|
||||
sec
|
||||
rts
|
||||
|
||||
// Kernal status codes are described in 'Commodore 64 Programmer's Reference Guide', page 292
|
||||
|
||||
// Kernal status codes are described in 'Commodore 64 Programmers Reference Guide', page 292
|
||||
|
||||
kernalstatus_reset:
|
||||
lda #$00
|
||||
sta IOSTATUS
|
||||
rts
|
||||
|
||||
// The following two statuses are currentl not implemented - and most likely not really needed
|
||||
// The following two statuses are currently not implemented - and most likely not really needed
|
||||
|
||||
// kernalstatus_TIMEOUT_WRITE:
|
||||
// lda IOSTATUS
|
||||
@@ -88,3 +91,6 @@ kernalstatus_DEVICE_NOT_FOUND:
|
||||
ora #K_STS_DEVICE_NOT_FOUND
|
||||
sta IOSTATUS
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - page 274
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 224/225
|
||||
// - [RG64] C64 Programmers Reference Guide - page 274
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 224/225
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): .Y
|
||||
//
|
||||
@@ -28,3 +29,6 @@ ACPTR:
|
||||
#else
|
||||
jmp kernalerror_ILLEGAL_DEVICE_NUMBER
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// IEC part of the CHKIN routine
|
||||
@@ -29,3 +30,6 @@ chkin_iec:
|
||||
jmp chkin_set_device
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// IEC part of the CHRIN routine
|
||||
@@ -8,3 +9,6 @@ chrin_iec:
|
||||
|
||||
// XXX is this really all?
|
||||
jmp JACPTR
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// IEC part of the CHROUT routine
|
||||
@@ -10,3 +11,6 @@ chrout_iec:
|
||||
jsr JCIOUT
|
||||
bcc_far chrout_done_success
|
||||
jmp chrout_done_fail
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - page 279/280
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 224
|
||||
// - [RG64] C64 Programmers Reference Guide - page 279/280
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 224
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): .X, .Y
|
||||
//
|
||||
@@ -47,3 +48,6 @@ ciout_send_byte:
|
||||
rts
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// IEC part of the CKOUT routine
|
||||
@@ -29,3 +30,6 @@ ckout_iec:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// IEC part of the CLOSE routine
|
||||
@@ -33,3 +34,6 @@ close_iec_end:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// IEC part of the CLRCHN routine
|
||||
@@ -28,3 +29,6 @@ clrchn_iec:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// Checks whether device number (in .A) is a correct IEC device number
|
||||
@@ -31,3 +32,6 @@ iec_check_devnum_failed:
|
||||
rts
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// Common part of CLOSE and LOAD/SAVE routines for IEC
|
||||
@@ -29,3 +30,6 @@ iec_close_load:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// Kernal internal IEC routine
|
||||
@@ -21,3 +22,6 @@ iec_cmd_close:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// Kernal internal IEC routine
|
||||
@@ -66,3 +67,6 @@ iec_check_channel_openclose:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// Helper IEC routines to pull/release certain lines
|
||||
@@ -83,3 +84,6 @@ iec_pull_release_end:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,3 +1,4 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// Helper routines to return with error/success
|
||||
@@ -39,3 +40,6 @@ iec_return_DEVICE_NOT_FOUND:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
Loaded 100 of 333 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user