Merge pull request #37 from FeralChild64/master
Screen editor update and others
This commit is contained in:
437 files changed
+4455
-1939
No files matched your search
@@ -74,6 +74,18 @@ Choose if your CPU supports the Commodore Semiconductor Group 65CE02 instruction
|
||||
|
||||
It enables some speed/size code optimizations.
|
||||
|
||||
### `CONFIG_CPU_CSG_4510`
|
||||
|
||||
Choose if your CPU supports the Commodore Semiconductor Group 4510 instruction set, like:
|
||||
|
||||
* CSG 4510 - microcontroller used in the Commodore 65 prototypes
|
||||
|
||||
It enables some speed/size code optimizations and allows C65 memory mapping to work.
|
||||
|
||||
### `CONFIG_CPU_M65_45GS02`
|
||||
|
||||
Choose if you have a Mega65 FPGA board. It enables some speed/size code optimizations and allows Mega65 memory mapping to work.
|
||||
|
||||
### `CONFIG_CPU_WDC_65816`
|
||||
|
||||
Choose if your CPU supports the 16-bit Western Design Center 65816 instruction set, like:
|
||||
@@ -109,10 +121,6 @@ Adds support for the IEEC bus - for serial printers, disk drives, etc.
|
||||
|
||||
Needs over 1000 bytes in KERNAL segment. If unsure - enable.
|
||||
|
||||
### `CONFIG_IEC_BLANK_SCREEN`
|
||||
|
||||
Causes screen blanking during some IEC operations (currently only JiffyDOS file loading) to increase the data transfer performance.
|
||||
|
||||
### `CONFIG_IEC_DOLPHINDOS`
|
||||
|
||||
Adds support for DolphinDOS fast protocol to the IEC bus, using UserPort cable.
|
||||
@@ -131,6 +139,10 @@ Adds support for JiffyDOS fast protocol to the IEC bus.
|
||||
|
||||
Needs about 430 bytes in KERNAL segment. If unsure - enable.
|
||||
|
||||
### `CONFIG_IEC_JIFFYDOS_BLANK`
|
||||
|
||||
Causes screen blanking during JiffyDOS file loading to increase performance.
|
||||
|
||||
### `CONFIG_TAPE_NORMAL`
|
||||
|
||||
Adds a minimal normal (standard Commodore format) tape support - just LOAD command.
|
||||
@@ -139,9 +151,17 @@ Needs about 700 bytes in KERNAL segment (if both normal and turbo are enabled, a
|
||||
|
||||
### `CONFIG_TAPE_TURBO`
|
||||
|
||||
Adds a minimal turbo tape support - just LOAD command (device 7, like on _Action Replay_ and _Final_ cartridges)
|
||||
Adds a minimal turbo tape support - just LOAD command (device 7, like on _Action Replay_ and _Final_ cartridges), up to 250 blocks
|
||||
|
||||
Needs about 650 bytes in KERNAL segment (if both normal and turbo are enabled, about 950 bytes are needed, as they share some code). If unsure - enable.
|
||||
Needs about 700 bytes in KERNAL segment (if both normal and turbo are enabled, about 950 bytes are needed, as they share some code). If unsure - enable.
|
||||
|
||||
### `CONFIG_TAPE_NO_KEY_SENSE`
|
||||
|
||||
Enable this option if you are using a tape interface adapter with some audio signal source connected. These adapters lack key sense functionality, so the computer is unable to tell whether Play got pressed or not - with this option ROM will assume Play got pressed after imppulses start arriving from the tape.
|
||||
|
||||
### `CONFIG_TAPE_NO_MOTOR_CONTROL`
|
||||
|
||||
Enable this option if you are using a tape interface adapter lacking tape motor control (most likely every adapter currently being sold) - this will eliminate the need to quickly press space when the program header information gets displayed. Note: if you are using a cassette player with REM port, and your adapter is connected to this port too, than you do not need this option.
|
||||
|
||||
## Multiple SID support
|
||||
|
||||
|
||||
@@ -2,36 +2,38 @@
|
||||
# Test files
|
||||
|
||||
TESTDISK = testsuite/testdisk.d64
|
||||
TESTTAPE = testsuite/testtape-c64-pal-normal.tap
|
||||
TESTTAPE = testsuite/testtape-c64-pal-turbo.tap
|
||||
|
||||
# Source files
|
||||
|
||||
SRCDIR_COMMON = c64/aliases
|
||||
|
||||
SRCDIR_BASIC = $(SRCDIR_COMMON) \
|
||||
c64/basic \
|
||||
c64/basic/commands \
|
||||
c64/basic/init \
|
||||
c64/basic/rom_revision
|
||||
c64/basic \
|
||||
c64/basic/,stubs \
|
||||
c64/basic/commands \
|
||||
c64/basic/init \
|
||||
c64/basic/rom_revision
|
||||
|
||||
SRCDIR_KERNAL = $(SRCDIR_COMMON) \
|
||||
c64/kernal \
|
||||
c64/kernal/,stubs \
|
||||
c64/kernal/assets \
|
||||
c64/kernal/iec \
|
||||
c64/kernal/iec_fast \
|
||||
c64/kernal/init \
|
||||
c64/kernal/interrupts \
|
||||
c64/kernal/iostack \
|
||||
c64/kernal/jumptable \
|
||||
c64/kernal/keyboard \
|
||||
c64/kernal/memory \
|
||||
c64/kernal/print \
|
||||
c64/kernal/rom_revision \
|
||||
c64/kernal/rs232 \
|
||||
c64/kernal/screen \
|
||||
c64/kernal/tape \
|
||||
c64/kernal/time
|
||||
c64/kernal \
|
||||
c64/kernal/,stubs \
|
||||
c64/kernal/assets \
|
||||
c64/kernal/banking \
|
||||
c64/kernal/iec \
|
||||
c64/kernal/iec_fast \
|
||||
c64/kernal/init \
|
||||
c64/kernal/interrupts \
|
||||
c64/kernal/iostack \
|
||||
c64/kernal/jumptable \
|
||||
c64/kernal/keyboard \
|
||||
c64/kernal/memory \
|
||||
c64/kernal/print \
|
||||
c64/kernal/rom_revision \
|
||||
c64/kernal/rs232 \
|
||||
c64/kernal/screen \
|
||||
c64/kernal/tape \
|
||||
c64/kernal/time
|
||||
|
||||
|
||||
SRC_TOOLS = $(wildcard src/tools/*.c,src/tools/*.cc)
|
||||
@@ -55,12 +57,18 @@ 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 \
|
||||
build/chargen.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/mega65.rom
|
||||
|
||||
STD_TARGET_LIST = build/chargen.rom \
|
||||
$(STD_TARGET_LIST_CUSTOM) \
|
||||
$(STD_TARGET_LIST_GENERIC) \
|
||||
$(STD_TARGET_LIST_TESTING) \
|
||||
$(STD_TARGET_LIST_MEGA65) \
|
||||
$(STD_TARGET_LIST_ULTIMATE64)
|
||||
|
||||
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,7 +155,7 @@ 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))
|
||||
@@ -156,28 +164,28 @@ build/target_ultimate64/OUTK.BIN build/target_ultimate64/KERNAL_combined.vs bu
|
||||
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 +198,28 @@ 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/target_mega65/kernal.seg_1 build/target_mega65/KERNAL_1_combined.vs build/target_mega65/KERNAL_1_combined.sym: $(TOOL_BUILD_SEGMENT)
|
||||
@mkdir -p build/target_mega65
|
||||
@rm -f $@* build/target_mega65/kernal.seg_1 build/target_mega65/KERNAL_1*
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s KERNAL_1 -i KERNAL_1-mega65 -o kernal.seg_1 -d build/target_mega65 -l 4000 -h 5fff c64/,,config_mega65.s $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||
|
||||
.PRECIOUS: build/target_%/newrom
|
||||
build/target_%/newrom:
|
||||
@@ -214,6 +237,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 +260,19 @@ 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_mega65.rom_0 build/target_mega65/kernal.seg_1 build/basic_mega65.rom_0 build/chargen.rom
|
||||
dd if=/dev/zero bs=8192 count=1 of=build/padding_8k
|
||||
dd if=/dev/zero bs=8192 count=8 of=build/padding_64k
|
||||
cat build/padding_8k > build/mega65.rom
|
||||
cat build/padding_8k >> build/mega65.rom
|
||||
cat build/target_mega65/kernal.seg_1 >> build/mega65.rom
|
||||
cat build/padding_8k >> build/mega65.rom
|
||||
cat build/padding_8k >> build/mega65.rom
|
||||
cat build/basic_mega65.rom_0 >> build/mega65.rom
|
||||
cat build/chargen.rom build/chargen.rom >> build/mega65.rom
|
||||
cat build/kernal_mega65.rom_0 >> build/mega65.rom
|
||||
cat build/padding_64k >> 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
|
||||
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
A project to create unencumbered open-source ROMs for use on selected retro computers. Besides this manifest, the following documents are available:
|
||||
|
||||
* [implementation status](STATUS.md) of various APIs and functionalities
|
||||
* [configuration options](CONFIG.md) for those willing to compile their own, customized build
|
||||
* [implementation status](./STATUS.md) of various APIs and functionalities
|
||||
* [configuration options](./CONFIG.md) for those willing to compile their own, customized ROM set
|
||||
* [development guide](./doc/Development.md) for those interested in OpenROMs technical aspects
|
||||
|
||||
# Problem Statement and Motivation
|
||||
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
Here are the features of the Open ROMs not found in the original ROMs from the 80s (many of them are [configurable](CONFIG.md) during compilation):
|
||||
|
||||
|
||||
* improved keyboard scanning, resistant to ghosting and joystick interference (one variant even supports multi-keyy rollover), supports additional C128 keys
|
||||
* improved keyboard scanning, resistant to ghosting and joystick interference (one variant even supports multi-key rollover), supports additional C128 keys
|
||||
* joystick can be used to move text cursor
|
||||
* pre-defined function keys
|
||||
|
||||
* JiffyDOS protocol support
|
||||
* partial DolphinDOS protocol support
|
||||
* JiffyDOS and DolphinDOS protocols support
|
||||
* DOS wedge (direct mode only) - `@<drive_number>`, `@<command>`, `@$`, `@$<params>`, `@`
|
||||
|
||||
* turbo tape load support (as device 7, or using `←L`), up to 250 blocks (can store bytes under I/O)
|
||||
* turbo tape load support (as device 7, or using `←L`), quite sophisticated: up to 250 blocks (can store bytes under I/O), automatically adjusts for tape speed differences
|
||||
* improved support for tape adapters (for using regular casette players and other audio devices instead of Datasette)
|
||||
|
||||
* extended `LOAD` command
|
||||
* start/end addresses are displayed, in the Final cartridge style
|
||||
@@ -48,28 +48,29 @@ The following ROM features are currently missing:
|
||||
|
||||
## Keyboard
|
||||
|
||||
| Driver | Status | Remarks |
|
||||
| :-----------: | :------: | :------------------------------------------------: |
|
||||
| C64 | DONE | |
|
||||
| C128 | DONE | |
|
||||
| Mega65 | NOT DONE | code should be complete, but is not tested yet |
|
||||
| Driver | Status | Remarks |
|
||||
| :----------------: | :------: | :------------------------------------------------: |
|
||||
| C64 | DONE | |
|
||||
| C128 | DONE | |
|
||||
| Mega65 | NOT DONE | code should be complete, but is not tested yet |
|
||||
|
||||
## Screen
|
||||
|
||||
| Driver | Status | Remarks |
|
||||
| :-----------: | :------: | :------------------------------------------------: |
|
||||
| VIC-II | PARTIAL | 80 chars in logical line support is very buggy |
|
||||
| VDC 80 col. | NOT DONE | |
|
||||
| Driver | Status | Remarks |
|
||||
| :----------------: | :------: | :------------------------------------------------: |
|
||||
| VIC-II | DONE | |
|
||||
| 80 columns, VDC | NOT DONE | |
|
||||
| 80 columns, Mega65 | NOT DONE | |
|
||||
|
||||
## Tape port (LOAD only!)
|
||||
|
||||
* Tapuino
|
||||
* Datasette
|
||||
|
||||
| Driver | Status | Remarks |
|
||||
| :-----------: | :------: | :------------------------------------------------: |
|
||||
| normal | PARTIAL | no error correction, no tape speed calibratrion |
|
||||
| turbo | PARTIAL | up to 250 blocks, no tape speed calibratrion yet |
|
||||
| Driver | Status | Remarks |
|
||||
| :----------------: | :------: | :------------------------------------------------: |
|
||||
| normal | PARTIAL | no tape speed calibratrion, no error correction |
|
||||
| turbo (250 blocks) | DONE | |
|
||||
|
||||
## IEC bus
|
||||
|
||||
@@ -78,13 +79,13 @@ The following ROM features are currently missing:
|
||||
* most disk drives and printers
|
||||
* some hard drives
|
||||
|
||||
| Driver | Status | Remarks |
|
||||
| :-----------: | :------: | :------------------------------------------------: |
|
||||
| standard | DONE | |
|
||||
| JiffyDOS | DONE | |
|
||||
| DolphinDOS | DONE | |
|
||||
| CIA burst mod | NOT DONE | |
|
||||
| Mega65 burst | NOT DONE | pure software implementation should be feasible |
|
||||
| Driver | Status | Remarks |
|
||||
| :----------------: | :------: | :------------------------------------------------: |
|
||||
| standard | DONE | |
|
||||
| JiffyDOS | DONE | |
|
||||
| DolphinDOS | DONE | |
|
||||
| CIA burst mod | NOT DONE | |
|
||||
| Mega65 burst | NOT DONE | |
|
||||
|
||||
## IEEE-488 bus
|
||||
|
||||
@@ -92,20 +93,20 @@ The following ROM features are currently missing:
|
||||
* PET era disk drives and printers
|
||||
* various scientific equipment
|
||||
|
||||
| Driver | Status | Remarks |
|
||||
| :-----------: | :------: | :------------------------------------------------: |
|
||||
| CBM cartridge | NOT DONE | |
|
||||
| Driver | Status | Remarks |
|
||||
| :----------------: | :------: | :------------------------------------------------: |
|
||||
| CBM cartridge | NOT DONE | |
|
||||
|
||||
## RS-232
|
||||
|
||||
* modems (telephone, WiFi)
|
||||
* parallel port printers
|
||||
|
||||
| Driver | Status | Remarks |
|
||||
| :-----------: | :------: | :------------------------------------------------: |
|
||||
| UP2400 | NOT DONE | |
|
||||
| UP9600 | NOT DONE | work started, not functional yet |
|
||||
| ACIA 6551 | NOT DONE | |
|
||||
| Driver | Status | Remarks |
|
||||
| :----------------: | :------: | :------------------------------------------------: |
|
||||
| UP2400 | NOT DONE | |
|
||||
| UP9600 | NOT DONE | work started, not functional yet |
|
||||
| ACIA 6551 | NOT DONE | |
|
||||
|
||||
|
||||
# API status
|
||||
@@ -178,7 +179,7 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on
|
||||
| :-------: | :--------: | :---------- | :------: | :--------------------------------------------------: |
|
||||
| `($028F)` | | `KEYLOG` | DONE | |
|
||||
| `$FF81` | `$FF5B` | `CINT` | DONE | |
|
||||
| `$FF84` | `$FDA3` | `IOINIT` | PARTIAL | CIA initialization incomplete |
|
||||
| `$FF84` | `$FDA3` | `IOINIT` | DONE | |
|
||||
| `$FF87` | `$FD50` | `RAMTAS` | DONE | |
|
||||
| `$FF8A` | `$FD15` | `RESTOR` | DONE | |
|
||||
| `$FF8D` | `$FD1A` | `VECTOR` | DONE | |
|
||||
@@ -219,7 +220,7 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on
|
||||
| `$FFF0` | `$E50A` | `PLOT` | DONE | |
|
||||
| `$FFF3` | | `IOBASE` | DONE | |
|
||||
| `($FFFA)` | | NMI vec | PARTIAL | |
|
||||
| `($FFFC)` | `$FCE2` | RESET vec | PARTIAL | see IOINIT status |
|
||||
| `($FFFC)` | `$FCE2` | RESET vec | DONE | |
|
||||
| `($FFFE)` | | IRQ/BRK vec | DONE | |
|
||||
|
||||
<br />
|
||||
@@ -235,20 +236,22 @@ Not all of them - only these we want to have implemented.
|
||||
| `$E518` | legacy part of CINT | DONE | |
|
||||
| `$E51B` | init screen keyboard, no VIC | DONE | |
|
||||
| `$E544` | clear screen | DONE | |
|
||||
| `$E50C` | set cursor position | PARTIAL | |
|
||||
| `$E566` | home cursor | NOT DONE | |
|
||||
| `$E50C` | set cursor position | DONE | |
|
||||
| `$E566` | home cursor | DONE | |
|
||||
| `$E56C` | set PNT and USER values | DONE | |
|
||||
| `$E5A0` | setup VIC II & I/O | DONE | |
|
||||
| `$E6B6` | advance cursor | NOT DONE | |
|
||||
| `$E701` | previous line | NOT DONE | |
|
||||
| `$E716` | screen CHROUT | NOT DONE | |
|
||||
| `$E8DA` | color code table | DONE | |
|
||||
| `$E8EA` | scroll line | NOT DONE | |
|
||||
| `$E8EA` | scroll logical line up | DONE | |
|
||||
| `$E96C` | insert line on top | NOT DONE | |
|
||||
| `$E9FF` | clear line | NOT DONE | |
|
||||
| `$E9FF` | clear line | DONE | |
|
||||
| `$EA31` | default IRQ | PARTIAL | |
|
||||
| `$EA7E` | ack CIA1 + below | DONE | |
|
||||
| `$EA81` | ret from IRQ/NMI | DONE | |
|
||||
| `$F142` | get key from buffer | DONE | |
|
||||
| `$F3F6` | (unknown) | NOT DONE | |
|
||||
| `$F646` | IEC close | NOT DONE | |
|
||||
| `$FD30` | default vectors | DONE | |
|
||||
| `$FD90` | (unknown) | NOT DONE | |
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+11
-4
@@ -33,6 +33,7 @@
|
||||
#define CONFIG_CPU_MOS_6502
|
||||
// #define CONFIG_CPU_WDC_65C02
|
||||
// #define CONFIG_CPU_CSG_65CE02
|
||||
// #define CONFIG_CPU_M65_45GS02
|
||||
// #define CONFIG_CPU_WDC_65816
|
||||
|
||||
|
||||
@@ -45,16 +46,22 @@
|
||||
// I/O devices
|
||||
|
||||
#define CONFIG_IEC
|
||||
#define CONFIG_IEC_BLANK_SCREEN
|
||||
#define CONFIG_IEC_DOLPHINDOS // not finished yet, but LOAD works
|
||||
#define CONFIG_IEC_DOLPHINDOS
|
||||
#define CONFIG_IEC_DOLPHINDOS_FAST
|
||||
#define CONFIG_IEC_JIFFYDOS
|
||||
#define CONFIG_IEC_JIFFYDOS_BLANK
|
||||
// #define CONFIG_IEC_BURST_CIA1 // please keep disabled for now
|
||||
// #define CONFIG_IEC_BURST_CIA2 // please keep disabled for now
|
||||
// #define CONFIG_IEC_BURST_SOFT // please keep disabled for now
|
||||
|
||||
#define CONFIG_TAPE_NORMAL
|
||||
#define CONFIG_TAPE_TURBO
|
||||
#define CONFIG_TAPE_AUTODETECT // mostly works, but not fullyy done yet!
|
||||
// #define CONFIG_TAPE_NO_KEY_SENSE
|
||||
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
|
||||
|
||||
// #define CONFIG_RS232_UP2400 // please keep disabled for now
|
||||
// #define CONFIG_RS232_UP9600 // please keep disabled for now
|
||||
// #define CONFIG_RS232_UP2400 // please keep disabled for now
|
||||
// #define CONFIG_RS232_UP9600 // please keep disabled for now
|
||||
|
||||
|
||||
// Multiple SID support
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#define CONFIG_CPU_MOS_6502
|
||||
// #define CONFIG_CPU_WDC_65C02
|
||||
// #define CONFIG_CPU_CSG_65CE02
|
||||
// #define CONFIG_CPU_M65_45GS02
|
||||
// #define CONFIG_CPU_WDC_65816
|
||||
|
||||
|
||||
@@ -42,13 +43,15 @@
|
||||
// I/O devices
|
||||
|
||||
#define CONFIG_IEC
|
||||
#define CONFIG_IEC_BLANK_SCREEN
|
||||
#define CONFIG_IEC_DOLPHINDOS
|
||||
#define CONFIG_IEC_DOLPHINDOS_FAST
|
||||
#define CONFIG_IEC_JIFFYDOS
|
||||
#define CONFIG_IEC_JIFFYDOS_BLANK
|
||||
|
||||
#define CONFIG_TAPE_NORMAL
|
||||
#define CONFIG_TAPE_TURBO
|
||||
// #define CONFIG_TAPE_NO_KEY_SENSE
|
||||
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
|
||||
|
||||
|
||||
// Multiple SID support
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
|
||||
// #define CONFIG_CPU_MOS_6502
|
||||
// #define CONFIG_CPU_WDC_65C02
|
||||
#define CONFIG_CPU_CSG_65CE02
|
||||
// #define CONFIG_CPU_CSG_65CE02
|
||||
#define CONFIG_CPU_M65_45GS02
|
||||
// #define CONFIG_CPU_WDC_65816
|
||||
|
||||
|
||||
@@ -42,13 +43,15 @@
|
||||
// I/O devices
|
||||
|
||||
#define CONFIG_IEC
|
||||
#define CONFIG_IEC_BLANK_SCREEN
|
||||
// #define CONFIG_IEC_DOLPHINDOS
|
||||
// #define CONFIG_IEC_DOLPHINDOS_FAST
|
||||
#define CONFIG_IEC_JIFFYDOS
|
||||
#define CONFIG_IEC_JIFFYDOS_BLANK
|
||||
|
||||
// #define CONFIG_TAPE_NORMAL
|
||||
// #define CONFIG_TAPE_TURBO
|
||||
// #define CONFIG_TAPE_NO_KEY_SENSE
|
||||
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
|
||||
|
||||
|
||||
// Multiple SID support
|
||||
@@ -119,7 +122,7 @@
|
||||
// #define CONFIG_BANNER_SIMPLE
|
||||
// #define CONFIG_BANNER_FANCY
|
||||
#define CONFIG_BANNER_BRAND
|
||||
#define CONFIG_SHOW_FEATURES
|
||||
// #define CONFIG_SHOW_FEATURES
|
||||
// #define CONFIG_SHOW_PAL_NTSC
|
||||
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#define CONFIG_CPU_MOS_6502
|
||||
// #define CONFIG_CPU_WDC_65C02
|
||||
// #define CONFIG_CPU_CSG_65CE02
|
||||
// #define CONFIG_CPU_M65_45GS02
|
||||
// #define CONFIG_CPU_WDC_65816
|
||||
|
||||
|
||||
@@ -42,13 +43,15 @@
|
||||
// I/O devices
|
||||
|
||||
#define CONFIG_IEC
|
||||
// #define CONFIG_IEC_BLANK_SCREEN
|
||||
#define CONFIG_IEC_DOLPHINDOS
|
||||
// #define CONFIG_IEC_DOLPHINDOS_FAST
|
||||
#define CONFIG_IEC_JIFFYDOS
|
||||
// #define CONFIG_IEC_JIFFYDOS_BLANK
|
||||
|
||||
// #define CONFIG_TAPE_NORMAL
|
||||
#define CONFIG_TAPE_TURBO
|
||||
// #define CONFIG_TAPE_NO_KEY_SENSE
|
||||
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
|
||||
|
||||
|
||||
// Multiple SID support
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#define CONFIG_CPU_MOS_6502
|
||||
// #define CONFIG_CPU_WDC_65C02
|
||||
// #define CONFIG_CPU_CSG_65CE02
|
||||
// #define CONFIG_CPU_M65_45GS02
|
||||
// #define CONFIG_CPU_WDC_65816
|
||||
|
||||
|
||||
@@ -42,13 +43,15 @@
|
||||
// I/O devices
|
||||
|
||||
#define CONFIG_IEC
|
||||
#define CONFIG_IEC_BLANK_SCREEN
|
||||
#define CONFIG_IEC_DOLPHINDOS
|
||||
#define CONFIG_IEC_DOLPHINDOS_FAST
|
||||
#define CONFIG_IEC_JIFFYDOS
|
||||
#define CONFIG_IEC_JIFFYDOS_BLANK
|
||||
|
||||
#define CONFIG_TAPE_NORMAL
|
||||
#define CONFIG_TAPE_TURBO
|
||||
// #define CONFIG_TAPE_NO_KEY_SENSE
|
||||
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
|
||||
|
||||
|
||||
// Multiple SID support
|
||||
|
||||
@@ -88,6 +88,9 @@
|
||||
#if CONFIG_CPU_CSG_65CE02
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_CPU_M65_45GS02
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_CPU_WDC_65816
|
||||
.eval selected++
|
||||
#endif
|
||||
@@ -97,8 +100,15 @@
|
||||
|
||||
|
||||
|
||||
// Check that memory model configuration is correct
|
||||
// Check that memory model and ROM layout configurations is correct
|
||||
{
|
||||
#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
|
||||
|
||||
.var selected = 0;
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_38K
|
||||
@@ -112,10 +122,15 @@
|
||||
}
|
||||
|
||||
|
||||
// Check that I/O configuration is correct
|
||||
|
||||
// Check that IEC configuration is correct
|
||||
{
|
||||
#if CONFIG_RS232_UP9600 && (CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO)
|
||||
.error "CONFIG_RS232_UP9600 is not compatible with CONFIG_TAPE_*"
|
||||
#if CONFIG_IEC_JIFFYDOS && !CONFIG_IEC
|
||||
.error "CONFIG_IEC_JIFFYDOS requires CONFIG_IEC"
|
||||
#endif
|
||||
|
||||
#if CONFIG_IEC_JIFFYDOS_BLANK && !CONFIG_IEC_JIFFYDOS
|
||||
.error "CONFIG_IEC_JIFFYDOS_BLANK requires CONFIG_IEC_JIFFYDOS"
|
||||
#endif
|
||||
|
||||
#if CONFIG_IEC_DOLPHINDOS && !CONFIG_IEC
|
||||
@@ -126,8 +141,44 @@
|
||||
.error "CONFIG_IEC_DOLPHINDOS_FAST requires CONFIG_IEC_DOLPHINDOS"
|
||||
#endif
|
||||
|
||||
#if CONFIG_IEC_JIFFYDOS && !CONFIG_IEC
|
||||
.error "CONFIG_IEC_JIFFYDOS requires CONFIG_IEC"
|
||||
#if (CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_SOFT) && !CONFIG_IEC
|
||||
.error "CONFIG_IEC_BURST_* requires CONFIG_IEC"
|
||||
#endif
|
||||
|
||||
#if CONFIG_IEC_BURST_SOFT && !CONFIG_MB_MEGA_65
|
||||
.error "CONFIG_IEC_BURST_SOFT requires CONFIG_MB_MEGA_65"
|
||||
#endif
|
||||
|
||||
.var selected_iec_burst = 0;
|
||||
|
||||
#if CONFIG_IEC_BURST_CIA1
|
||||
.eval selected_iec_burst++
|
||||
#endif
|
||||
#if CONFIG_IEC_BURST_CIA2
|
||||
.eval selected_iec_burst++
|
||||
#endif
|
||||
#if CONFIG_IEC_BURST_SOFT
|
||||
.eval selected_iec_burst++
|
||||
#endif
|
||||
|
||||
.if (selected_iec_burst > 1) .error "Please select at most one CONFIG_IEC_BURST_* option"
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check that tape configuration is correct
|
||||
{
|
||||
#if (!CONFIG_TAPE_NORMAL || !CONFIG_TAPE_TURBO) && CONFIG_TAPE_AUTODETECT
|
||||
.error "CONFIG_TAPE_AUTODETECT requires both CONFIG_TAPE_NORMAL and CONFIG_TAPE_TURBO"
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check that RS-232 configuration is correct
|
||||
{
|
||||
#if CONFIG_RS232_UP9600 && (CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO)
|
||||
.error "CONFIG_RS232_UP9600 is not compatible with CONFIG_TAPE_*"
|
||||
#endif
|
||||
|
||||
.var selected_rs232 = 0;
|
||||
@@ -143,6 +194,7 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check that startup banner configuration is correct
|
||||
{
|
||||
.var selected = 0;
|
||||
@@ -322,13 +374,22 @@
|
||||
|
||||
#if CONFIG_IEC
|
||||
.var iec_features_str = "IEC"
|
||||
#if CONFIG_IEC_BURST_CIA1
|
||||
.eval iec_features_str = iec_features_str + " BURST1"
|
||||
#endif
|
||||
#if CONFIG_IEC_BURST_CIA2
|
||||
.eval iec_features_str = iec_features_str + " BURST2"
|
||||
#endif
|
||||
#if CONFIG_IEC_BURST_SOFT
|
||||
.eval iec_features_str = iec_features_str + " BURST"
|
||||
#endif
|
||||
#if CONFIG_IEC_DOLPHINDOS
|
||||
.eval iec_features_str = iec_features_str + " DOLPHIN"
|
||||
#endif
|
||||
#if CONFIG_IEC_JIFFYDOS
|
||||
.eval iec_features_str = iec_features_str + " JIFFY"
|
||||
#endif
|
||||
#if !CONFIG_IEC_DOLPHINDOS && !CONFIG_IEC_JIFFYDOS
|
||||
#if !CONFIG_IEC_BURST_CIA1 && !CONFIG_IEC_BURST_CIA2 && !CONFIG_IEC_BURST_SOFT && !CONFIG_IEC_DOLPHINDOS && !CONFIG_IEC_JIFFYDOS
|
||||
.eval iec_features_str = iec_features_str + " NORMAL"
|
||||
#endif
|
||||
.eval features_str = ADD_FEATURE(features_str, iec_features_str)
|
||||
|
||||
+62
-31
@@ -1,26 +1,31 @@
|
||||
|
||||
//
|
||||
// Provide pseudocommands (and other goodies) to make CPU optimizations easier
|
||||
//
|
||||
|
||||
|
||||
#if CONFIG_CPU_WDC_65C02 || CONFIG_CPU_CSG_65CE02 || CONFIG_CPU_WDC_65816
|
||||
#if CONFIG_CPU_WDC_65C02 || CONFIG_CPU_CSG_65CE02 || CONFIG_CPU_CSG_4510 || CONFIG_CPU_M65_45GS02 || CONFIG_CPU_WDC_65816
|
||||
.cpu _65c02
|
||||
#define HAS_OPCODES_65C02
|
||||
#define HAS_BCD_SAFE_INTERRUPTS
|
||||
#endif
|
||||
|
||||
#if CONFIG_CPU_CSG_65CE02
|
||||
#if CONFIG_CPU_CSG_65CE02 || CONFIG_CPU_CSG_4510 || CONFIG_CPU_M65_45GS02
|
||||
#define HAS_OPCODES_65CE02
|
||||
#endif
|
||||
|
||||
#if CONFIG_CPU_CSG_4510 || CONFIG_CPU_M65_45GS02
|
||||
#define HAS_OPCODES_4510
|
||||
#endif
|
||||
|
||||
#if CONFIG_CPU_M65_45GS02
|
||||
#define HAS_OPCODES_45GS02
|
||||
#endif
|
||||
|
||||
#if CONFIG_CPU_WDC_65816
|
||||
#define HAS_OPCODES_65816
|
||||
#endif
|
||||
|
||||
|
||||
#if CONFIG_CPU_WDC_65C02 || CONFIG_CPU_CSG_65CE02 || CONFIG_CPU_WDC_65816
|
||||
#define HAS_BCD_SAFE_INTERRUPTS
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// These are not exactly for optimization - but to encourage proper usage of panic screen
|
||||
@@ -36,24 +41,50 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Trick to skip a 2-byte instruction
|
||||
//
|
||||
|
||||
.pseudocommand skip_2_bytes_trash_nvz { .byte $2C }
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Memory mapping for C65 and Mega65
|
||||
//
|
||||
|
||||
#if HAS_OPCODES_4510
|
||||
|
||||
.pseudocommand map { .byte $5C }
|
||||
.pseudocommand eom { .byte $EA }
|
||||
|
||||
#endif
|
||||
|
||||
.pseudocommand skip_2_bytes_trash_nvz
|
||||
{
|
||||
.byte $2C
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Some additional 65CE02 instructions
|
||||
//
|
||||
|
||||
|
||||
#if HAS_OPCODES_65CE02
|
||||
|
||||
// .B register support
|
||||
|
||||
.pseudocommand tab { .byte $5B }
|
||||
.pseudocommand tba { .byte $7B }
|
||||
|
||||
// .Z register support
|
||||
|
||||
.pseudocommand inz { .byte $1B }
|
||||
.pseudocommand dez { .byte $3B }
|
||||
.pseudocommand phz { .byte $DB }
|
||||
.pseudocommand plz { .byte $FB }
|
||||
.pseudocommand taz { .byte $4B }
|
||||
.pseudocommand tza { .byte $6B }
|
||||
|
||||
// 16-bit data processing
|
||||
|
||||
.pseudocommand dew addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
@@ -71,11 +102,11 @@
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Stack manipulation - some CPUs will leave .A unchanged, some will use it as temporary storage, so consider .A trashed
|
||||
//
|
||||
|
||||
|
||||
.pseudocommand phx_trash_a
|
||||
{
|
||||
#if HAS_OPCODES_65C02
|
||||
@@ -117,15 +148,15 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Branches with far offsets, substitutes by Bxx + JMP for CPUs not supporting the instruction
|
||||
//
|
||||
|
||||
|
||||
.pseudocommand bcs_far dst
|
||||
.pseudocommand bcs_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000)
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $B3, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
bcc __l
|
||||
@@ -134,10 +165,10 @@ __l:
|
||||
#endif
|
||||
}
|
||||
|
||||
.pseudocommand bcc_far dst
|
||||
.pseudocommand bcc_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000)
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $93, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
bcs __l
|
||||
@@ -146,10 +177,10 @@ __l:
|
||||
#endif
|
||||
}
|
||||
|
||||
.pseudocommand beq_far dst
|
||||
.pseudocommand beq_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02 && XXX_DISABLED // XXX causes problems with XEMU, investigate why
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000)
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $F3, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
bne __l
|
||||
@@ -158,10 +189,10 @@ __l:
|
||||
#endif
|
||||
}
|
||||
|
||||
.pseudocommand bne_far dst
|
||||
.pseudocommand bne_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000)
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $D3, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
beq __l
|
||||
@@ -170,10 +201,10 @@ __l:
|
||||
#endif
|
||||
}
|
||||
|
||||
.pseudocommand bmi_far dst
|
||||
.pseudocommand bmi_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000)
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $33, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
bpl __l
|
||||
@@ -182,10 +213,10 @@ __l:
|
||||
#endif
|
||||
}
|
||||
|
||||
.pseudocommand bpl_far dst
|
||||
.pseudocommand bpl_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000)
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $13, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
bmi __l
|
||||
@@ -194,10 +225,10 @@ __l:
|
||||
#endif
|
||||
}
|
||||
|
||||
.pseudocommand bvc_far dst
|
||||
.pseudocommand bvc_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000)
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $53, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
bvs __l
|
||||
@@ -206,10 +237,10 @@ __l:
|
||||
#endif
|
||||
}
|
||||
|
||||
.pseudocommand bvs_far dst
|
||||
.pseudocommand bvs_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000)
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $73, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
bvc __l
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
.label VERCKK = $93 // 0 = LOAD, 1 = VERIFY
|
||||
.label C3PO = $94 // flag - is BSOUR content valid
|
||||
.label BSOUR = $95 // serial bus buffered output byte
|
||||
.label SYNO = $96 // -- NOT IMPLEMENTED --
|
||||
.label SYNO = $96 // temporary tape routines storage, [!] our usage differs
|
||||
.label XSAV = $97 // temporary register storage for ASCII/tape related routines [!] usage details might differ
|
||||
.label LDTND = $98 // number of entries in LAT / FAT / SAT tables
|
||||
.label DFLTN = $99 // default input device
|
||||
@@ -103,7 +103,7 @@
|
||||
.label PTR1 = $9E // -- NOT IMPLEMENTED --
|
||||
.label PTR2 = $9F // -- NOT IMPLEMENTED --
|
||||
.label TIME = $A0 // $A0-$A2 jiffy clock
|
||||
#if !CONFIG_IEC_JIFFYDOS && !CONFIG_IEC_DOLPHINDOS
|
||||
#if !CONFIG_IEC_JIFFYDOS && !CONFIG_IEC_DOLPHINDOS && !CONFIG_IEC_BURST_CIA1 && !CONFIG_IEC_BURST_CIA2 && !CONFIG_IEC_BURST_SOFT
|
||||
.label TSFCNT = $A3 // temporary variable for tape and IEC, [!] our usage differs
|
||||
#else
|
||||
.label IECPROTO = $A3 // -- WIP -- [!] 0 = normal, 1 = JiffyDOS, >= $80 for unknown
|
||||
@@ -153,10 +153,10 @@
|
||||
.label BLNON = $CF // cursor visibility flag
|
||||
.label CRSW = $D0 // whether to input from screen or keyboard
|
||||
.label PNT = $D1 // $D1-$D2 pointer to the current screen line
|
||||
.label PNTR = $D3 // current screen X position
|
||||
.label PNTR = $D3 // current screen X position (logical column), 0-79
|
||||
.label QTSW = $D4 // quote mode flag
|
||||
.label LNMX = $D5 // logical line length, [!] our usage probably differs in details
|
||||
.label TBLX = $D6 // current screen Y position
|
||||
.label LNMX = $D5 // logical line length, 39 or 79
|
||||
.label TBLX = $D6 // current screen Y position (row), 0-24
|
||||
.label SCHAR = $D7 // ASCII value of the last printed character
|
||||
.label INSRT = $D8 // insert mode flag/counter
|
||||
.label LDTBL = $D9 // $D9-$F2 screen line link table, [!] our usage is different XXX give more details
|
||||
@@ -214,7 +214,7 @@
|
||||
.label RIDBS = $29C // -- WIP -- read pointer into RS-232 receive buffer
|
||||
.label RODBS = $29D // -- WIP -- read pointer into RS-232 send buffer
|
||||
.label RODBE = $29E // -- WIP -- write pointer into RS-232 send buffer
|
||||
.label IRQTMP = $29F // $29F-$2A0 -- NOT IMPLEMENTED --
|
||||
.label IRQTMP = $29F // $29F-$2A0 temporary IRQ vector storage [!] we use it for tape speed calibration instead
|
||||
.label ENABL = $2A1 // -- NOT IMPLEMENTED --
|
||||
.label TODSNS = $2A2 // -- NOT IMPLEMENTED --
|
||||
.label TRDTMP = $2A3 // -- NOT IMPLEMENTED --
|
||||
|
||||
@@ -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
|
||||
File renamed without changes.
@@ -0,0 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
REASON:
|
||||
STUB_IMPLEMENTATION()
|
||||
File renamed without changes.
@@ -0,0 +1,8 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,17 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [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
|
||||
//
|
||||
|
||||
|
||||
MAIN:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -0,0 +1,16 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [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
|
||||
//
|
||||
|
||||
|
||||
CHRNCH:
|
||||
STUB_IMPLEMENTATION()
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and real implementation
|
||||
|
||||
new:
|
||||
STUB_IMPLEMENTATION()
|
||||
File renamed without changes.
@@ -1,3 +1,7 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
// see: https://www.lemon64.com/forum/viewtopic.php?t=64721&sid=bc400a5a6d404f8f092e4d32a92f5de7
|
||||
File renamed without changes.
@@ -0,0 +1,16 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [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
|
||||
//
|
||||
|
||||
|
||||
QPLOP:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,16 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [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
|
||||
//
|
||||
|
||||
|
||||
GONE:
|
||||
STUB_IMPLEMENTATION()
|
||||
File renamed without changes.
@@ -0,0 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
FRMEVL:
|
||||
STUB_IMPLEMENTATION()
|
||||
File renamed without changes.
@@ -0,0 +1,16 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [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
|
||||
//
|
||||
|
||||
|
||||
EVAL:
|
||||
STUB_IMPLEMENTATION()
|
||||
File renamed without changes.
@@ -0,0 +1,16 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [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
|
||||
//
|
||||
|
||||
|
||||
ERROR:
|
||||
STUB_IMPLEMENTATION()
|
||||
File renamed without changes.
@@ -0,0 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
INIT:
|
||||
STUB_IMPLEMENTATION()
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
RVECT:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
REASON:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - XXX
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
|
||||
|
||||
MAIN:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -1,8 +1,11 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - XXX
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
|
||||
|
||||
CHRNCH:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
// XXX provide documentation and real implementation
|
||||
|
||||
new:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -1,7 +1,10 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// 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 +16,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
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - XXX
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
|
||||
|
||||
QPLOP:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -1,18 +1,21 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// 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
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - XXX
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 70, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
|
||||
|
||||
GONE:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -1,5 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Print string at $YYAA
|
||||
// Compute's Mapping the 64 p101
|
||||
// Computes Mapping the 64 p101
|
||||
|
||||
// print string routine
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
FRMEVL:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - XXX
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 70, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
|
||||
|
||||
EVAL:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -1,3 +1,7 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Delete the current BASIC line, which is assumed to have already
|
||||
// been found with basic_find_line.
|
||||
// Really only consists of copying memory down.
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
// Compute's Mapping the 64 p93
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Computes Mapping the 64 p93
|
||||
|
||||
basic_do_error:
|
||||
// Save error number
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Jump back into the BASIC execute line loop
|
||||
// after first checking that we have a colon
|
||||
// or $00 char
|
||||
@@ -87,7 +91,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 +116,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:
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Find the BASIC line with number LINNUM
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Advance OLDTXT by following the
|
||||
// link to the next line
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
basic_follow_link_to_next_line:
|
||||
ldy #0
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// 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
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
basic_main_loop:
|
||||
|
||||
// XXX - Check if direct or program mode, and get next line of input
|
||||
@@ -24,7 +29,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
|
||||
!:
|
||||
@@ -73,11 +78,11 @@ rsl_l1:
|
||||
|
||||
#if CONFIG_DOS_WEDGE
|
||||
cmp #$40 // '@'
|
||||
beq_far wedge_dos
|
||||
beq_16 wedge_dos
|
||||
#endif
|
||||
#if CONFIG_TAPE_WEDGE
|
||||
cmp #$1F // left arrow
|
||||
beq_far wedge_tape
|
||||
beq_16 wedge_tape
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -168,7 +173,7 @@ 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
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
basic_parse_line_number:
|
||||
|
||||
jsr injest_number
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
basic_shift_mem_down_and_relink:
|
||||
// Shift memory down to basic_current_line_pointer
|
||||
// from X bytes further along.
|
||||
@@ -168,4 +173,3 @@ relink_down_loop:
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
basic_shift_mem_up_and_relink:
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// 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:
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Skip the gap between $C000-$DFFF
|
||||
|
||||
.fill $2000, $00
|
||||
@@ -1,3 +1,8 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
cmd_stop:
|
||||
ldx #30 // "BREAK"
|
||||
jsr print_packed_message
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// LIST basic text.
|
||||
// XXX - Doesn't currently support line number ranges
|
||||
// XXX - Does not currently support line number ranges
|
||||
|
||||
cmd_list:
|
||||
|
||||
@@ -125,7 +130,6 @@ list_not_quote:
|
||||
bne list_not_rem
|
||||
// REM command locks quote flag on until the end of the line, allowing
|
||||
// funny characters in REM statements without problem.
|
||||
inc $0427
|
||||
sta QTSW // Any value other than $00 or $FF will lock quote mode on, so the token value of REM is fine here
|
||||
// FALL THROUGH
|
||||
list_not_rem:
|
||||
@@ -146,5 +150,3 @@ list_is_literal:
|
||||
list_end_of_line:
|
||||
// Print end of line
|
||||
jmp print_return
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
cmd_load:
|
||||
|
||||
// Parse filename
|
||||
@@ -7,7 +12,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 +82,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'
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
cmd_new:
|
||||
jsr basic_do_new
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// REM statement just skips to the next line
|
||||
|
||||
cmd_rem:
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
cmd_run:
|
||||
// RUN clears all variables
|
||||
jsr basic_do_clr
|
||||
@@ -15,7 +20,7 @@ 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!
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
cmd_sys:
|
||||
|
||||
jsr basic_end_of_statement_check
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Default handler for all not-yet-implemented commands
|
||||
//
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
// As many errors are triggered from many places in the BASIC
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// As many errors are triggered from many places in the BASIC
|
||||
// interprettor, it is important to have an efficicent means of
|
||||
// calling them.
|
||||
// LDX #$nn / jmp do_basic_error
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmer's Reference Guide - XXX
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
|
||||
|
||||
ERROR:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
INIT:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
RVECT:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -1,3 +1,7 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Multiply Floating Point Accumulator by 10
|
||||
// = 8x + 2x
|
||||
// Implement by shifting MAC left one bit,
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
// Compute's Mapping the C64 p88
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Computes Mapping the C64 p88
|
||||
|
||||
.word basic_cold_start
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// Compute's Mapping the C64 p88
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Computes Mapping the C64 p88
|
||||
|
||||
.word basic_warm_start
|
||||
@@ -1,8 +1,12 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Continuation of the BASIC cold start routine
|
||||
//
|
||||
|
||||
|
||||
basic_cold_start_internal:
|
||||
|
||||
// Setup vectors at $300
|
||||
@@ -29,6 +33,11 @@ basic_cold_start_internal:
|
||||
lda #>do_ILLEGAL_QUANTITY_error
|
||||
sta USRADD+1
|
||||
|
||||
// Clear the BRK location address
|
||||
lda #$00
|
||||
sta CMP0+0
|
||||
sta CMP0+1
|
||||
|
||||
// Print startup messages
|
||||
jsr INITMSG
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Continuation of the BASIC cold start routine
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// BASIC Cold start entry point
|
||||
// Compute's Mapping the 64 p211
|
||||
// Computes Mapping the 64 p211
|
||||
|
||||
basic_cold_start:
|
||||
|
||||
@@ -17,6 +22,6 @@ basic_cold_start:
|
||||
dey
|
||||
bpl !--
|
||||
|
||||
// Remaining part wouldn't fit here
|
||||
// Remaining part would not fit here
|
||||
|
||||
jmp basic_cold_start_internal
|
||||
@@ -1,3 +1,8 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Clear screen etc, show READY prompt.
|
||||
|
||||
basic_warm_start:
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Print out the amount of free bytes - for the startup banner
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Routine is too long to fit in the original location
|
||||
|
||||
|
||||
initmsg_real:
|
||||
|
||||
// Clear the screen first, some cartridges (like IEEE-488) leeave a mess on the screen
|
||||
lda #147
|
||||
jsr JCHROUT
|
||||
|
||||
#if CONFIG_BANNER_SIMPLE
|
||||
|
||||
lda #<startup_banner
|
||||
@@ -118,7 +126,7 @@ initmsg_real:
|
||||
ldy #>startup_banner
|
||||
jsr STROUT
|
||||
|
||||
ldx #$04
|
||||
ldx #$05
|
||||
ldy #$00
|
||||
jsr plot_set
|
||||
|
||||
@@ -126,20 +134,20 @@ initmsg_real:
|
||||
ldy #>rom_revision_basic_string
|
||||
jsr STROUT
|
||||
|
||||
ldx #$04
|
||||
ldx #$05
|
||||
ldy #$12
|
||||
jsr plot_set
|
||||
|
||||
jsr initmsg_bytes_free
|
||||
|
||||
#if CONFIG_SHOW_FEATURES
|
||||
ldx #$05
|
||||
ldx #$08
|
||||
ldy #$00
|
||||
jsr plot_set
|
||||
jsr print_features
|
||||
jmp print_return
|
||||
#else
|
||||
ldx #$05
|
||||
ldx #$08
|
||||
ldy #$00
|
||||
jmp plot_set
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Startup banner, to be displayed during cold start
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
init_oldtxt:
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Consummes a comma in a BASIC code, C set for no coma found
|
||||
|
||||
|
||||
Loaded 100 of 437 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user