Compare commits
25
Commits
b4b48b195d
...
81ab3b41e1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81ab3b41e1 | ||
|
|
86d6dd0916 | ||
|
|
d42102d039 | ||
|
|
e8870b4c6c | ||
|
|
ea0c8bc9ba | ||
|
|
1a6c821cfa | ||
|
|
05e4b67858 | ||
|
|
0838c4e310 | ||
|
|
9ad7e292f8 | ||
|
|
b1fbc1c693 | ||
|
|
f809b9b7ea | ||
|
|
b7fef8abe6 | ||
|
|
90b921ac5e | ||
|
|
80fb110391 | ||
|
|
9f922287c6 | ||
|
|
f1ade3b7d3 | ||
|
|
b4f334bbbf | ||
|
|
93c4932309 | ||
|
|
5fc29014f4 | ||
|
|
1aaed55bc7 | ||
|
|
aa39286d9d | ||
|
|
18520d8dc0 | ||
|
|
a45f63e34e | ||
|
|
ec4dc7df62 | ||
|
|
e9a64fb7a8 |
No files matched your search
@@ -291,9 +291,15 @@ Feature needs 2 bytes in KERNAL segmment (for CPUs needing the patch), but at th
|
||||
|
||||
### `ARNITECH_CONTROLLER`
|
||||
|
||||
For the mc64 computers of arnitech only, whose expansion port holds the Arnitech controller at `$DE80`. IOINIT puts CIA #1's TOD on 50 Hz and, if the controller's signature `"ARNI"` is at `$DE80`, sets the TOD from the controller's clock. The Arnitech jump table at `$FF00` (`src/kernal/arnitech/ff00.arnitech_jumptable.s`) wraps the controller's registers.
|
||||
For the mc64 Computers and Blades of arnitech only, the `mc64` and `mc64blade` configurations, whose expansion port holds the Arnitech controller at `$DE80`. IOINIT puts CIA #1's TOD on 50 Hz and, if the controller's signature `"ARNI"` is at `$DE80`, sets the TOD from the controller's clock. The Arnitech jump table at `$FF00` (`src/kernal/arnitech/ff00.arnitech_jumptable.s`) wraps the controller's registers, and sends and receives Ethernet frames through the CS8900A of a Network Card at the RR-Net socket, `$DE02-$DE0F`.
|
||||
|
||||
Feature needs about 120 bytes in KERNAL segment, and the page at `$FF00`. Disable on any other machine.
|
||||
Feature needs about 450 bytes in KERNAL segment, and the page at `$FF00`. Disable on any other machine.
|
||||
|
||||
### `ARNITECH_BLADE`
|
||||
|
||||
For the Blades of arnitech only, the `mc64blade` configuration: a 65816 in 6502 emulation mode with a C64's bank 0, both CIAs, the serial bus, and the Arnitech controller, but no VIC-II, SID, keyboard matrix, or tape. Requires `ARNITECH_CONTROLLER` and `IEC`. The screen editor, the keyboard matrix scan, the VIC-II set-up, and PAL detection are left out. The screen and the keyboard, devices 3 and 0, are the Terminal Card the controller finds by its type, `$04` (`src/kernal/arnitech/arnitech_terminal.s`): CHROUT writes each byte to it, as a glyph while quote or insert mode is on, CHRIN echoes the keys typed and on RETURN reads back the logical line under the cursor, the IRQ moves its keys into the keyboard buffer and its RUN/STOP into `STKEY`, `SCREEN` answers 80x25, and `PLOT` moves its cursor; without one, bytes printed go nowhere and no key comes. The serial bus waits its 1 ms on CIA #1's timer B. CINT puts handlers for the 65816's native-mode interrupts into the RAM under the KERNAL at `$FFE4-$FFEF` (`arnitech_native.s`), and BASIC's cold start loads `"*"` from device 8 and RUNs it before `READY.`, unless RUN/STOP is held (`arnitech_autoboot.s`).
|
||||
|
||||
Feature saves about 1,600 bytes in KERNAL segment, and needs about 15 in BASIC segment. Disable on any other machine.
|
||||
|
||||
## Eye candy
|
||||
|
||||
|
||||
@@ -139,6 +139,7 @@ GEN_ZMAC_H = $(DIR_ZMAC_TMP)/doc.inl
|
||||
|
||||
DIR_C64 = build/target_c64
|
||||
DIR_MC64 = build/target_mc64
|
||||
DIR_MC64BLADE = build/target_mc64blade
|
||||
DIR_CUS = build/target_custom
|
||||
DIR_GEN = build/target_generic
|
||||
DIR_GENCRT = build/target_generic_crt
|
||||
@@ -154,6 +155,7 @@ DIR_X16 = build/target_cx16
|
||||
CFG_CUS = src/,,config_custom.s
|
||||
CFG_C64 = src/,,config_c64.s
|
||||
CFG_MC64 = src/,,config_mc64.s
|
||||
CFG_MC64BLADE = src/,,config_mc64blade.s
|
||||
CFG_GEN = src/,,config_generic.s
|
||||
CFG_GENCRT = src/,,config_generic_crt.s
|
||||
CFG_TST38 = src/,,config_testing_38K.s
|
||||
@@ -168,6 +170,7 @@ CFG_U64CRT = src/,,config_ultimate64_crt.s
|
||||
GEN_STR_CUS = $(DIR_CUS)/,generated/,packed_strings.s
|
||||
GEN_STR_C64 = $(DIR_C64)/,generated/,packed_strings.s
|
||||
GEN_STR_MC64 = $(DIR_MC64)/,generated/,packed_strings.s
|
||||
GEN_STR_MC64BLADE = $(DIR_MC64BLADE)/,generated/,packed_strings.s
|
||||
GEN_STR_GEN = $(DIR_GEN)/,generated/,packed_strings.s
|
||||
GEN_STR_GENCRT = $(DIR_GENCRT)/,generated/,packed_strings.s
|
||||
GEN_STR_TST38 = $(DIR_TST38)/,generated/,packed_strings.s
|
||||
@@ -217,6 +220,7 @@ TARGET_CHR_PXL = build/chargen_pxlfont.rom
|
||||
TARGET_CUS_B = build/basic_custom.rom
|
||||
TARGET_C64_B = build/basic_c64.rom
|
||||
TARGET_MC64_B = build/basic_mc64.rom
|
||||
TARGET_MC64BLADE_B = build/basic_mc64blade.rom
|
||||
TARGET_GEN_B = build/basic_generic.rom
|
||||
TARGET_GENCRT_B = build/basic_generic_crt.rom
|
||||
TARGET_TST38_B = build/basic_testing_38K.rom
|
||||
@@ -227,6 +231,7 @@ TARGET_U64CRT_B = build/basic_ultimate64_crt.rom
|
||||
TARGET_CUS_K = build/kernal_custom.rom
|
||||
TARGET_C64_K = build/kernal_c64.rom
|
||||
TARGET_MC64_K = build/kernal_mc64.rom
|
||||
TARGET_MC64BLADE_K = build/kernal_mc64blade.rom
|
||||
TARGET_GEN_K = build/kernal_generic.rom
|
||||
TARGET_GENCRT_K = build/kernal_generic_crt.rom
|
||||
TARGET_TST38_K = build/kernal_testing_38K.rom
|
||||
@@ -244,6 +249,7 @@ TARGET_X16_x = build/cx16-dummy.rom
|
||||
TARGET_LIST_CUS = $(TARGET_CUS_B) $(TARGET_CUS_K)
|
||||
TARGET_LIST_C64 = $(TARGET_C64_B) $(TARGET_C64_K)
|
||||
TARGET_LIST_MC64 = $(TARGET_MC64_B) $(TARGET_MC64_K)
|
||||
TARGET_LIST_MC64BLADE = $(TARGET_MC64BLADE_B) $(TARGET_MC64BLADE_K)
|
||||
TARGET_LIST_GEN = $(TARGET_GEN_B) $(TARGET_GEN_K)
|
||||
TARGET_LIST_GENCRT = $(TARGET_GENCRT_B) $(TARGET_GENCRT_K) $(TARGET_GENCRT_X)
|
||||
TARGET_LIST_TST38 = $(TARGET_TST38_B) $(TARGET_TST38_K)
|
||||
@@ -257,6 +263,7 @@ TARGET_LIST = $(TARGET_CHR_ORF) \
|
||||
$(TARGET_LIST_CUS) \
|
||||
$(TARGET_LIST_C64) \
|
||||
$(TARGET_LIST_MC64) \
|
||||
$(TARGET_LIST_MC64BLADE) \
|
||||
$(TARGET_LIST_GEN) \
|
||||
$(TARGET_LIST_GENCRT) \
|
||||
$(TARGET_LIST_TST38) \
|
||||
@@ -395,6 +402,8 @@ $(DIR_C64)/OUTB_x.BIN $(DIR_C64)/BASIC_combined.vs: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_C64) $(GEN_STR_C64) $(DIR_C64)/KERNAL_combined.sym
|
||||
$(DIR_MC64)/OUTB_x.BIN $(DIR_MC64)/BASIC_combined.vs: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_MC64) $(GEN_STR_MC64) $(DIR_MC64)/KERNAL_combined.sym
|
||||
$(DIR_MC64BLADE)/OUTB_x.BIN $(DIR_MC64BLADE)/BASIC_combined.vs: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_MC64BLADE) $(GEN_STR_MC64BLADE) $(DIR_MC64BLADE)/KERNAL_combined.sym
|
||||
$(DIR_GEN)/OUTB_x.BIN $(DIR_GEN)/BASIC_combined.vs: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_GEN) $(GEN_STR_GEN) $(DIR_GEN)/KERNAL_combined.sym
|
||||
$(DIR_TST38)/OUTB_x.BIN $(DIR_TST38)/BASIC_combined.vs: \
|
||||
@@ -410,6 +419,8 @@ $(DIR_C64)/OUTK_x.BIN $(DIR_C64)/KERNAL_combined.vs $(DIR_C64)/KERNAL_combined.s
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_C64) $(GEN_STR_C64)
|
||||
$(DIR_MC64)/OUTK_x.BIN $(DIR_MC64)/KERNAL_combined.vs $(DIR_MC64)/KERNAL_combined.sym: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_MC64) $(GEN_STR_MC64)
|
||||
$(DIR_MC64BLADE)/OUTK_x.BIN $(DIR_MC64BLADE)/KERNAL_combined.vs $(DIR_MC64BLADE)/KERNAL_combined.sym: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_MC64BLADE) $(GEN_STR_MC64BLADE)
|
||||
$(DIR_GEN)/OUTK_x.BIN $(DIR_GEN)/KERNAL_combined.vs $(DIR_GEN)/KERNAL_combined.sym: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_GEN) $(GEN_STR_GEN)
|
||||
$(DIR_TST38)/OUTK_x.BIN $(DIR_TST38)/KERNAL_combined.vs $(DIR_TST38)/KERNAL_combined.sym: \
|
||||
@@ -470,6 +481,7 @@ $(DIR_X16)/kernal.seg_1 $(DIR_X16)/KERNAL_1_combined.vs $(DIR_X16)/KERNAL_1_comb
|
||||
$(DIR_CUS)/OUTx_x.BIN: $(DIR_CUS)/OUTB_x.BIN $(DIR_CUS)/OUTK_x.BIN
|
||||
$(DIR_C64)/OUTx_x.BIN: $(DIR_C64)/OUTB_x.BIN $(DIR_C64)/OUTK_x.BIN
|
||||
$(DIR_MC64)/OUTx_x.BIN: $(DIR_MC64)/OUTB_x.BIN $(DIR_MC64)/OUTK_x.BIN
|
||||
$(DIR_MC64BLADE)/OUTx_x.BIN: $(DIR_MC64BLADE)/OUTB_x.BIN $(DIR_MC64BLADE)/OUTK_x.BIN
|
||||
$(DIR_GEN)/OUTx_x.BIN: $(DIR_GEN)/OUTB_x.BIN $(DIR_GEN)/OUTK_x.BIN
|
||||
$(DIR_GENCRT)/OUTx_0.BIN: $(DIR_GENCRT)/OUTB_0.BIN $(DIR_GENCRT)/OUTK_0.BIN
|
||||
$(DIR_TST38)/OUTx_x.BIN: $(DIR_TST38)/OUTB_x.BIN $(DIR_TST38)/OUTK_x.BIN
|
||||
@@ -482,6 +494,7 @@ $(DIR_X16)/OUTx_0.BIN: $(DIR_X16)/OUTB_0.BIN $(DIR_X16)/OUTK_0.BIN
|
||||
$(TARGET_CUS_B): $(DIR_CUS)/OUTx_x.BIN
|
||||
$(TARGET_C64_B): $(DIR_C64)/OUTx_x.BIN
|
||||
$(TARGET_MC64_B): $(DIR_MC64)/OUTx_x.BIN
|
||||
$(TARGET_MC64BLADE_B): $(DIR_MC64BLADE)/OUTx_x.BIN
|
||||
$(TARGET_GEN_B): $(DIR_GEN)/OUTx_x.BIN
|
||||
$(TARGET_TST38_B): $(DIR_TST38)/OUTx_x.BIN
|
||||
$(TARGET_TST60_B): $(DIR_TST60)/OUTx_x.BIN
|
||||
@@ -490,6 +503,7 @@ $(TARGET_U64_B): $(DIR_U64)/OUTx_x.BIN
|
||||
$(TARGET_CUS_K): $(DIR_CUS)/OUTx_x.BIN
|
||||
$(TARGET_C64_K): $(DIR_C64)/OUTx_x.BIN
|
||||
$(TARGET_MC64_K): $(DIR_MC64)/OUTx_x.BIN
|
||||
$(TARGET_MC64BLADE_K): $(DIR_MC64BLADE)/OUTx_x.BIN
|
||||
$(TARGET_GEN_K): $(DIR_GEN)/OUTx_x.BIN
|
||||
$(TARGET_TST38_K): $(DIR_TST38)/OUTx_x.BIN
|
||||
$(TARGET_TST60_K): $(DIR_TST60)/OUTx_x.BIN
|
||||
@@ -498,6 +512,7 @@ $(TARGET_U64_K): $(DIR_U64)/OUTx_x.BIN
|
||||
build/symbols_custom.vs: $(DIR_CUS)/BASIC_combined.vs $(DIR_CUS)/KERNAL_combined.vs
|
||||
build/symbols_c64.vs: $(DIR_C64)/BASIC_combined.vs $(DIR_C64)/KERNAL_combined.vs
|
||||
build/symbols_mc64.vs: $(DIR_MC64)/BASIC_combined.vs $(DIR_MC64)/KERNAL_combined.vs
|
||||
build/symbols_mc64blade.vs: $(DIR_MC64BLADE)/BASIC_combined.vs $(DIR_MC64BLADE)/KERNAL_combined.vs
|
||||
build/symbols_generic.vs: $(DIR_GEN)/BASIC_combined.vs $(DIR_GEN)/KERNAL_combined.vs
|
||||
build/symbols_generic_crt.vs: $(DIR_GENCRT)/BASIC_0_combined.vs $(DIR_GENCRT)/KERNAL_0_combined.vs
|
||||
build/symbols_testing_38K.vs: $(DIR_TST38)/BASIC_combined.vs $(DIR_TST38)/KERNAL_combined.vs
|
||||
@@ -519,6 +534,10 @@ $(GEN_STR_MC64): $(TOOL_GENERATE_STRINGS) $(CFG_MC64)
|
||||
@mkdir -p $(DIR_MC64)/,generated
|
||||
$(TOOL_GENERATE_STRINGS) -o $@ -c $(CFG_MC64)
|
||||
|
||||
$(GEN_STR_MC64BLADE): $(TOOL_GENERATE_STRINGS) $(CFG_MC64BLADE)
|
||||
@mkdir -p $(DIR_MC64BLADE)/,generated
|
||||
$(TOOL_GENERATE_STRINGS) -o $@ -c $(CFG_MC64BLADE)
|
||||
|
||||
$(GEN_STR_GEN): $(TOOL_GENERATE_STRINGS) $(CFG_GEN)
|
||||
@mkdir -p $(DIR_GEN)/,generated
|
||||
$(TOOL_GENERATE_STRINGS) -o $@ -c $(CFG_GEN)
|
||||
@@ -562,6 +581,7 @@ build/,generated/,z80_tables.s: $(TOOL_GENERATE_Z80_TABLES)
|
||||
GEN_STR_custom = $(GEN_STR_CUS)
|
||||
GEN_STR_c64 = $(GEN_STR_C64)
|
||||
GEN_STR_mc64 = $(GEN_STR_MC64)
|
||||
GEN_STR_mc64blade = $(GEN_STR_MC64BLADE)
|
||||
GEN_STR_generic = $(GEN_STR_GEN)
|
||||
GEN_STR_generic_crt = $(GEN_STR_GENCRT)
|
||||
GEN_STR_testing_38K = $(GEN_STR_TST38)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
This is a modified version of MEGA65 Open ROMs (https://github.com/MEGA65/open-roms),
|
||||
forked at upstream commit ad178dbe4d48cd6a317737a8e0e7e662f7e33d32.
|
||||
|
||||
Modified by Christian Werner, 2026-10-14, 2026-10-15, and 2026-10-17, for the mc64
|
||||
Modified by Christian Werner, 2026-10-14, 2026-10-15, 2026-10-17, and 2026-10-18, for the mc64
|
||||
computers of arnitech, a set of Minecraft mods (https://git.susdog.de/chris/arnitech). The
|
||||
fork lives at https://git.susdog.de/chris/open-roms, branch mc64.
|
||||
|
||||
@@ -34,6 +34,40 @@ Changes:
|
||||
and, if the Arnitech controller's signature is at $DE80, from the controller's clock. The
|
||||
Arnitech jump table at $FF00 wraps the controller's registers: "ARNI", a version, an entry
|
||||
count, and JMPs from $FF06 to find a Card by its type and to set the TOD.
|
||||
- assets/8x8font.png (2026-10-18): the first character set draws screen code 35, '#', as the
|
||||
second does; it was blank, and its reverse (163) not its inverse.
|
||||
- src/kernal/screen/chrout_to_screen_code.s (2026-10-18): CHROUT prints PETSCII $E0-$FE as
|
||||
screen codes $60-$7E and $FF (pi) as $5E, as a C64 does; it printed $A0-$BF.
|
||||
- src/kernal/init/e5a0.vicii_init.s, vicii_init_registers.s (new),
|
||||
src/kernal/keyboard/e5b4.* (new), src/kernal/screen/ea24.*, ecf0.* (new),
|
||||
src/kernal/screen/screen_calculate_pnt_user.s (2026-10-18): routines at $E5B4 (take a key
|
||||
from the keyboard buffer) and $EA24 (USER from PNT), and the screen lines' low bytes at
|
||||
$ECF0, where cc65's runtime and ip65 call and read them; vicii_init's work moves out of
|
||||
$E5A0-$E5C8 to make room.
|
||||
- src/,,config_mc64.s (2026-10-18): DOS_WEDGE on, TRANSCENDENTAL_FUNCTIONS off.
|
||||
- src/basic/wedge/wedge_dos.s (2026-10-18): a DOS command sent with @ prints the status the
|
||||
drive gives for it; closing every file first had reset it to OK.
|
||||
- src/kernal/iec/iec_tx_byte.s, iec_tx_command.s (2026-10-18): IRQs are disabled before CLK
|
||||
is released to send a byte; an IRQ in between could hide the listener's EOI
|
||||
acknowledgement and hang the transfer.
|
||||
- src/aliases/,aliases_hardware_arnitech.s, src/kernal/arnitech/arnitech_net.s (new),
|
||||
src/kernal/arnitech/ff00.arnitech_jumptable.s, CONFIG.md (2026-10-18): version 2 of the
|
||||
Arnitech jump table, with JMPs from $FF0C that reset a Network Card's CS8900A at the
|
||||
RR-Net socket, copy its MAC address, and send and receive Ethernet frames through it.
|
||||
- src/,,config_mc64blade.s (new), Makefile (2026-10-18): a second configuration, mc64blade,
|
||||
the Firmware of arnitech's Blades: the mc64 one with its own config ID ($6E), the brand
|
||||
"MC64 BLADE", no tape, programmable keys, joystick cursor, panic screen, or feature list, and
|
||||
ARNITECH_BLADE on; targets build/kernal_mc64blade.rom and build/basic_mc64blade.rom.
|
||||
- src/aliases/,aliases_hardware_arnitech.s, src/kernal/arnitech/arnitech_terminal.s,
|
||||
arnitech_native.s, arnitech_autoboot.s (new), src/kernal/screen/*, src/kernal/keyboard/*,
|
||||
src/kernal/init/*, src/kernal/iostack/e50a.plot.s, f157.chrin.s, f1ca.chrout.s,
|
||||
src/kernal/interrupts/*, src/kernal/time/udtim.s, src/kernal/iec/iec_wait1ms.s,
|
||||
src/basic/init/basic_cold_start_internal.s, src/basic/,imports.s, CONFIG.md (2026-10-18): a
|
||||
new option, ARNITECH_BLADE, on in the mc64blade configuration only. It leaves out the screen
|
||||
editor, the keyboard matrix scan, the VIC-II set-up, PAL detection, and the Cartridge checks;
|
||||
the screen and the keyboard are an Arnitech Terminal Card, the serial bus's 1 ms wait counts
|
||||
on CIA #1's timer B, CINT puts handlers for a 65816's native-mode interrupts under the KERNAL,
|
||||
and BASIC's cold start loads and runs the first program on device 8.
|
||||
- NOTICE: this file.
|
||||
|
||||
The licence terms are unchanged; see LICENSE, COPYING, and COPYING.LESSER.
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.9 KiB |
+4
-2
@@ -12,6 +12,8 @@
|
||||
; - BCD_SAFE_INTERRUPTS is off, for IRQ entry timing closer to the original
|
||||
; - ARNITECH_CONTROLLER: IOINIT sets CIA1's TOD on 50 Hz and from the Arnitech controller's clock,
|
||||
; and the Arnitech jump table is at $FF00 (src/kernal/arnitech)
|
||||
; - DOS_WEDGE is on, so the F-keys' '@8$'-style commands work, and TRANSCENDENTAL_FUNCTIONS
|
||||
; is off to make room for it
|
||||
|
||||
|
||||
|
||||
@@ -101,7 +103,7 @@
|
||||
; --- Software features
|
||||
|
||||
;; #CONFIG# PANIC_SCREEN YES
|
||||
;; #CONFIG# DOS_WEDGE NO
|
||||
;; #CONFIG# DOS_WEDGE YES
|
||||
;; #CONFIG# TAPE_WEDGE NO
|
||||
;; #CONFIG# TAPE_HEAD_ALIGN NO
|
||||
;; #CONFIG# BCD_SAFE_INTERRUPTS NO
|
||||
@@ -111,7 +113,7 @@
|
||||
; --- BASIC features
|
||||
|
||||
;; #CONFIG# ORIGINAL_UNPATCHED_BASIC YES
|
||||
;; #CONFIG# TRANSCENDENTAL_FUNCTIONS YES
|
||||
;; #CONFIG# TRANSCENDENTAL_FUNCTIONS NO
|
||||
|
||||
|
||||
; --- Eye candy
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
|
||||
;; #CONFIG# ID $6E ; should be 1 byte, different for each config file!
|
||||
|
||||
;
|
||||
; Please read CONFIG.md before modifying this file!
|
||||
;
|
||||
|
||||
; Idea:
|
||||
; The Blade Firmware of arnitech's mc64 Blades, a Minecraft mod: the Firmware a Blade always boots
|
||||
; (arnitech's ADR 0030). A Blade is a 65816 in 6502 emulation mode with a C64's bank 0, two CIAs,
|
||||
; the serial bus, and the Arnitech controller, but no VIC-II, SID, keyboard, or tape (ADR 0029).
|
||||
; Same as the 'mc64' configuration, except:
|
||||
; - the banner names the Blade
|
||||
; - ARNITECH_BLADE: no screen editor, keyboard matrix scan, VIC-II set-up, PAL detection, or tape;
|
||||
; the screen and the keyboard, devices 3 and 0, are a Terminal Card (src/kernal/arnitech), the
|
||||
; serial bus waits on a CIA timer, and a reset autoboots LOAD"*",8
|
||||
; - no tape, programmable keys, joystick cursor, panic screen, or feature list
|
||||
|
||||
|
||||
|
||||
; --- Hardware platform and brand
|
||||
|
||||
;; #CONFIG# PLATFORM_COMMODORE_64 YES
|
||||
;; #CONFIG# BRAND_CUSTOM "MC64 BLADE"
|
||||
|
||||
|
||||
; --- Processor instruction set
|
||||
|
||||
;; #CONFIG# CPU_MOS_6502 YES
|
||||
;; #CONFIG# CPU_DTV_6502 NO
|
||||
;; #CONFIG# CPU_RCW_65C02 NO
|
||||
;; #CONFIG# CPU_WDC_65C02 NO
|
||||
;; #CONFIG# CPU_WDC_65816 NO
|
||||
;; #CONFIG# CPU_CSG_65CE02 NO
|
||||
|
||||
|
||||
; --- Memory model
|
||||
|
||||
;; #CONFIG# MEMORY_MODEL_38K YES
|
||||
;; #CONFIG# MEMORY_MODEL_46K NO
|
||||
;; #CONFIG# MEMORY_MODEL_50K NO
|
||||
;; #CONFIG# MEMORY_MODEL_60K NO
|
||||
|
||||
|
||||
; --- IEC bus configuration
|
||||
|
||||
;; #CONFIG# IEC YES
|
||||
;; #CONFIG# IEC_DOLPHINDOS NO
|
||||
;; #CONFIG# IEC_DOLPHINDOS_FAST NO
|
||||
;; #CONFIG# IEC_JIFFYDOS NO
|
||||
;; #CONFIG# IEC_JIFFYDOS_BLANK NO
|
||||
|
||||
|
||||
; --- Tape deck configuration
|
||||
|
||||
;; #CONFIG# TAPE_NORMAL NO
|
||||
;; #CONFIG# TAPE_TURBO NO
|
||||
;; #CONFIG# TAPE_AUTODETECT NO
|
||||
;; #CONFIG# TAPE_NO_KEY_SENSE NO
|
||||
;; #CONFIG# TAPE_NO_MOTOR_CONTROL NO
|
||||
|
||||
|
||||
; --- Sound support
|
||||
|
||||
;; #CONFIG# SID_2ND_ADDRESS NO
|
||||
;; #CONFIG# SID_3RD_ADDRESS NO
|
||||
;; #CONFIG# SID_D4XX NO
|
||||
;; #CONFIG# SID_D5XX NO
|
||||
;; #CONFIG# SID_D6XX NO
|
||||
;; #CONFIG# SID_D7XX NO
|
||||
|
||||
|
||||
; --- Keyboard settings
|
||||
|
||||
;; #CONFIG# KEYBOARD_C128 NO
|
||||
;; #CONFIG# KEYBOARD_C128_CAPS_LOCK NO
|
||||
;; #CONFIG# KEY_REPEAT_DEFAULT NO
|
||||
;; #CONFIG# KEY_REPEAT_ALWAYS NO
|
||||
;; #CONFIG# KEY_FAST_SCAN YES
|
||||
;; #CONFIG# JOY1_CURSOR NO
|
||||
;; #CONFIG# JOY2_CURSOR NO
|
||||
|
||||
;; #CONFIG# PROGRAMMABLE_KEYS NO
|
||||
|
||||
;; #CONFIG# KEYCMD_RUN "\5FL"
|
||||
|
||||
;; #CONFIG# KEYCMD_F1 "@8$"
|
||||
;; #CONFIG# KEYCMD_F2 "LOAD"
|
||||
;; #CONFIG# KEYCMD_F3 "@9$"
|
||||
;; #CONFIG# KEYCMD_F4 "RUN:"
|
||||
;; #CONFIG# KEYCMD_F5 "@10$"
|
||||
;; #CONFIG# KEYCMD_F6 NO
|
||||
;; #CONFIG# KEYCMD_F7 "@11$"
|
||||
;; #CONFIG# KEYCMD_F8 NO
|
||||
|
||||
;; #CONFIG# KEYCMD_HELP "LIST"
|
||||
|
||||
|
||||
; --- Screen editor
|
||||
|
||||
;; #CONFIG# EDIT_STOPQUOTE YES
|
||||
|
||||
|
||||
; --- Software features
|
||||
|
||||
;; #CONFIG# PANIC_SCREEN NO
|
||||
;; #CONFIG# DOS_WEDGE YES
|
||||
;; #CONFIG# TAPE_WEDGE NO
|
||||
;; #CONFIG# TAPE_HEAD_ALIGN NO
|
||||
;; #CONFIG# BCD_SAFE_INTERRUPTS NO
|
||||
;; #CONFIG# ARNITECH_CONTROLLER YES
|
||||
;; #CONFIG# ARNITECH_BLADE YES
|
||||
|
||||
|
||||
; --- BASIC features
|
||||
|
||||
;; #CONFIG# ORIGINAL_UNPATCHED_BASIC YES
|
||||
;; #CONFIG# TRANSCENDENTAL_FUNCTIONS NO
|
||||
|
||||
|
||||
; --- Eye candy
|
||||
|
||||
;; #CONFIG# COLORS_BRAND NO
|
||||
;; #CONFIG# BANNER_SIMPLE YES
|
||||
;; #CONFIG# BANNER_FANCY NO
|
||||
;; #CONFIG# SHOW_FEATURES NO
|
||||
|
||||
|
||||
; --- Debug options
|
||||
|
||||
;; #CONFIG# DBG_STUBS_BRK NO
|
||||
;; #CONFIG# DBG_PRINTF NO
|
||||
|
||||
|
||||
; --- Other
|
||||
|
||||
;; #CONFIG# COMPRESSION_LVL_2 NO
|
||||
@@ -23,4 +23,42 @@
|
||||
!addr ARNITECH_CLOCK_HRS = $DE94 ; hours, BCD 1-12, bit 7 PM
|
||||
|
||||
!addr ARNITECH_CARD_WINDOW = $DEA0 ; slot n's Card window at $DEA0 + 16 * n
|
||||
|
||||
; The RR-Net socket: the CS8900A of the Network Card in the lowest slot, in RR-Net order
|
||||
; (arnitech's ADR 0027; Cirrus Logic DS271F5 Table 18, each port's even byte the low one)
|
||||
|
||||
!addr RRNET_PP_POINTER = $DE02 ; PacketPage pointer
|
||||
!addr RRNET_PP_DATA = $DE04 ; PacketPage data port 0
|
||||
!addr RRNET_RX_TX_DATA = $DE08 ; receive and transmit data port 0
|
||||
!addr RRNET_TX_CMD = $DE0C ; write-only
|
||||
!addr RRNET_TX_LENGTH = $DE0E ; write-only
|
||||
}
|
||||
|
||||
!ifdef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
; The Terminal Card, a Blade's screen and keyboard (arnitech's ADR 0031): its type in the Slot
|
||||
; table, and its registers indexed by its Card window's low byte, as ARNI_FINDCARD gives it in X
|
||||
|
||||
!set TERMINAL_CARD_TYPE = $04
|
||||
|
||||
!addr TERMINAL_OUTPUT = $DE00 ; a PETSCII byte, printed as the screen editor prints it
|
||||
!addr TERMINAL_LITERAL = $DE01 ; a byte drawn as its glyph, for quote and insert mode
|
||||
!addr TERMINAL_STATUS = $DE02
|
||||
!addr TERMINAL_KEY = $DE03 ; the next key; a read takes it, $00 if none
|
||||
!addr TERMINAL_COMMAND = $DE04
|
||||
!addr TERMINAL_LINE = $DE05 ; the taken line's next byte, RETURN at its end
|
||||
!addr TERMINAL_COLUMN = $DE06
|
||||
!addr TERMINAL_ROW = $DE07
|
||||
|
||||
!set TERMINAL_KEY_WAITING = %00000001 ; status bits
|
||||
!set TERMINAL_STOP_HELD = %00000010
|
||||
!set TERMINAL_INSERTED = %00001000 ; the last byte was an INS that opened a space
|
||||
|
||||
!set TERMINAL_TAKE_LINE = $01 ; commands
|
||||
!set TERMINAL_RESET = $02
|
||||
!set TERMINAL_INPUT_START = $03
|
||||
|
||||
; The 65816's native-mode vectors, which a Blade reads from the RAM under the KERNAL (ADR 0029)
|
||||
|
||||
!addr NATIVE_VECTORS = $FFE4 ; COP, BRK, ABORT, NMI, reserved, IRQ
|
||||
}
|
||||
@@ -33,6 +33,8 @@
|
||||
|
||||
;; #ALIAS# SELDEV = KERNAL_0.SELDEV
|
||||
|
||||
;; #ALIAS# blade_autoboot = KERNAL_0.blade_autoboot
|
||||
|
||||
;
|
||||
; MEGA65 specific parts
|
||||
;
|
||||
|
||||
@@ -50,6 +50,20 @@ basic_cold_start_internal:
|
||||
; This is for maximum C64 compatibility
|
||||
jsr copy_CHRGET
|
||||
|
||||
}
|
||||
|
||||
!ifdef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
; A Blade starts its program itself: LOAD"*",8 and RUN, unless RUN/STOP is held or the
|
||||
; LOAD fails (arnitech's ADR 0030). Out of direct mode, LOAD's own end RUNs the program.
|
||||
|
||||
jsr blade_autoboot
|
||||
bcs @3
|
||||
lda #$00
|
||||
sta VERCKB
|
||||
sta CURLIN+1
|
||||
jmp cmd_load_no_error
|
||||
@3:
|
||||
}
|
||||
|
||||
; jump into warm start loop
|
||||
|
||||
@@ -152,10 +152,11 @@ wedge_dos_command_confirmed:
|
||||
jsr JOPEN
|
||||
+bcs wedge_dos_basic_error
|
||||
|
||||
; Retrieve status, print it if not OK
|
||||
; Retrieve status through the channel just opened, print it if not OK. Closing it
|
||||
; first would reset the status to OK: CLALL closes every file, and a drive's DOS
|
||||
; says OK once its command channel closes
|
||||
|
||||
jsr JCLALL
|
||||
jsr wedge_dos_status_get
|
||||
jsr wedge_dos_status_get_opened
|
||||
|
||||
lda BUF+0
|
||||
cmp #$30 ; '0'
|
||||
@@ -217,6 +218,10 @@ wedge_dos_status_get:
|
||||
jsr JOPEN
|
||||
+bcs wedge_dos_basic_error
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
wedge_dos_status_get_opened:
|
||||
|
||||
; Set channel for input
|
||||
|
||||
ldx #$0F
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;
|
||||
; Autoboot of the Blade Firmware (mc64blade only, arnitech's ADR 0030): BASIC's cold start, before
|
||||
; READY., has a Blade LOAD"*",8, the first program on its internal drive's Floppy, and RUNs it.
|
||||
;
|
||||
; Out: carry clear if the program loaded, with X/Y the address after its end; carry set if
|
||||
; RUN/STOP is held on the Terminal Card, or the LOAD failed (no Floppy, no file, no drive).
|
||||
;
|
||||
|
||||
!ifdef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
blade_autoboot:
|
||||
|
||||
jsr terminal_find
|
||||
bcs @1
|
||||
lda TERMINAL_STATUS, x
|
||||
and #TERMINAL_STOP_HELD
|
||||
beq @1
|
||||
sec
|
||||
rts
|
||||
@1:
|
||||
lda #$01
|
||||
ldx #<blade_autoboot_name
|
||||
ldy #>blade_autoboot_name
|
||||
jsr JSETNAM
|
||||
lda #$00
|
||||
ldx #$08
|
||||
ldy #$00 ; secondary address 0: to BASIC's start
|
||||
jsr JSETFLS
|
||||
lda #$00 ; LOAD, not VERIFY
|
||||
ldx TXTTAB+0
|
||||
ldy TXTTAB+1
|
||||
jmp JLOAD
|
||||
|
||||
blade_autoboot_name:
|
||||
|
||||
!byte $2A ; "*"
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;
|
||||
; The Arnitech controller (mc64 only, arnitech's ADR 0023): its signature and its Slot table
|
||||
; The Arnitech controller (mc64 and mc64blade, arnitech's ADR 0023): its signature and its Slot table
|
||||
;
|
||||
|
||||
!ifdef CONFIG_ARNITECH_CONTROLLER {
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;
|
||||
; The 65816's native-mode interrupts on a Blade (mc64blade only, arnitech's ADR 0029 and 0030)
|
||||
;
|
||||
; In native mode the 65816 fetches its vectors from $FFE4-$FFEF, where the KERNAL's jump table
|
||||
; has its JMPs, so a Blade reads them from the RAM under the KERNAL, which CINT fills. A program
|
||||
; that switches to native mode with interrupts on keeps running: the IRQ and NMI handlers save
|
||||
; the registers, the direct page, and the data bank, run the KERNAL's handlers through CINV and
|
||||
; NMINV in 8-bit native mode on direct page 0 and data bank 0, and return with RTI. BRK, COP, and
|
||||
; ABORT go to the BRK handler, which returns to emulation mode and to READY. The code here runs
|
||||
; only on a 65816, so its own opcodes are bytes.
|
||||
;
|
||||
|
||||
!ifdef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
native_vectors_init:
|
||||
|
||||
ldx #(__native_vector_table_end - native_vector_table - 1)
|
||||
@1:
|
||||
lda native_vector_table, x
|
||||
sta NATIVE_VECTORS, x ; with the KERNAL banked in, the write reaches the RAM under it
|
||||
dex
|
||||
bpl @1
|
||||
rts
|
||||
|
||||
native_vector_table:
|
||||
|
||||
!word default_brk_handler ; COP
|
||||
!word default_brk_handler ; BRK
|
||||
!word default_brk_handler ; ABORT
|
||||
!word native_nmi ; NMI
|
||||
!word default_brk_handler ; reserved
|
||||
!word native_irq ; IRQ
|
||||
|
||||
__native_vector_table_end:
|
||||
|
||||
;
|
||||
; IRQ and NMI in native mode, with any register widths: the registers go on the stack whole,
|
||||
; then a frame as an IRQ or NMI makes it in emulation mode, whose RTI comes back to native_return.
|
||||
;
|
||||
|
||||
native_irq:
|
||||
|
||||
!byte $C2, $30 ; REP #$30: 16-bit A, X, and Y
|
||||
pha
|
||||
!byte $A9 ; LDA #: the handler's address, less one, for RTS
|
||||
!word native_irq_kernal - 1
|
||||
!byte $80 ; BRA native_save
|
||||
!byte native_save - (* + 1)
|
||||
|
||||
native_nmi:
|
||||
|
||||
!byte $C2, $30 ; REP #$30
|
||||
pha
|
||||
!byte $A9 ; LDA #
|
||||
!word hw_entry_nmi - 1
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
native_save:
|
||||
|
||||
!byte $DA ; PHX
|
||||
!byte $5A ; PHY
|
||||
!byte $8B ; PHB
|
||||
!byte $0B ; PHD
|
||||
tax ; the handler's address, 16 bits
|
||||
!byte $F4, $00, $00 ; PEA $0000
|
||||
!byte $2B ; PLD: direct page 0
|
||||
!byte $E2, $20 ; SEP #$20: 8-bit A
|
||||
lda #$00
|
||||
pha
|
||||
!byte $AB ; PLB: data bank 0
|
||||
|
||||
; The frame the KERNAL's handler returns through: program bank, address, status (8-bit A,
|
||||
; X, and Y, interrupts off)
|
||||
|
||||
pha
|
||||
!byte $F4 ; PEA native_return
|
||||
!word native_return
|
||||
lda #$34
|
||||
pha
|
||||
!byte $DA ; PHX: the handler's address, for RTS
|
||||
!byte $E2, $30 ; SEP #$30: 8-bit X and Y
|
||||
rts
|
||||
|
||||
native_irq_kernal:
|
||||
|
||||
; The KERNAL's IRQ handlers end by pulling Y, X, and A, as hw_entry_irq pushes them
|
||||
|
||||
pha
|
||||
pha
|
||||
pha
|
||||
jmp (CINV)
|
||||
|
||||
native_return:
|
||||
|
||||
!byte $C2, $30 ; REP #$30
|
||||
!byte $2B ; PLD
|
||||
!byte $AB ; PLB
|
||||
!byte $7A ; PLY
|
||||
!byte $FA ; PLX
|
||||
pla
|
||||
rti
|
||||
}
|
||||
@@ -0,0 +1,308 @@
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;
|
||||
; The network entries of the Arnitech jump table (mc64 and mc64blade, arnitech's ADR 0027):
|
||||
; whole Ethernet frames through the CS8900A at the RR-Net socket, polled, from the Destination
|
||||
; Address to the end of the data, without the CRC. The chip is found by its PacketPage Pointer
|
||||
; and Product ID, so the routines find an RR-Net on any C64 that has one. Register semantics are
|
||||
; the CS8900A datasheet's (Cirrus Logic DS271F5) and its 8-bit mode's (AN181).
|
||||
;
|
||||
; SAL holds the pointer to the frame or buffer, EAL the bytes left, as LOAD and SAVE use them.
|
||||
;
|
||||
|
||||
!ifdef CONFIG_ARNITECH_CONTROLLER {
|
||||
|
||||
; PacketPage addresses, all but the Product ID's in page $01
|
||||
CS_PRODUCT_ID = $630E ; at $0000, low byte first
|
||||
CS_RX_CFG = $02 ; bit 6 Skip_1
|
||||
CS_RX_CTL = $04
|
||||
CS_LINE_CTL = $12
|
||||
CS_SELF_CTL = $14 ; bit 6 RESET
|
||||
CS_RX_EVENT = $24 ; bit 8 RxOK
|
||||
CS_SELF_ST = $36 ; bit 7 INITD
|
||||
CS_BUS_ST = $38 ; bit 7 TxBidErr, bit 8 Rdy4TxNOW
|
||||
CS_IA = $58 ; Individual Address, $0158-$015D
|
||||
|
||||
CS_RX_CTL_VALUE = $0D05 ; RxOKA, IndividualA, BroadcastA
|
||||
CS_LINE_VALUE = $00D3 ; SerRxON, SerTxON
|
||||
CS_TX_AFTER_ALL = $C0 ; TxCMD: start once the whole frame is in the chip
|
||||
|
||||
NET_NONE_WAITING = $00
|
||||
NET_NO_CARD = $01
|
||||
NET_NO_ROOM = $02
|
||||
NET_LENGTH_REFUSED = $03
|
||||
NET_TOO_LONG = $04
|
||||
|
||||
;
|
||||
; NET_INIT, $FF0C: see ff00.arnitech_jumptable.s
|
||||
;
|
||||
|
||||
arnitech_net_init:
|
||||
|
||||
jsr arnitech_net_probe
|
||||
bcs @2
|
||||
|
||||
lda #CS_SELF_CTL
|
||||
jsr arnitech_net_point
|
||||
lda #$40 ; RESET, which points the PacketPage pointer at $0000
|
||||
sta RRNET_PP_DATA
|
||||
|
||||
lda #CS_SELF_ST
|
||||
jsr arnitech_net_point
|
||||
@1:
|
||||
lda RRNET_PP_DATA
|
||||
bpl @1 ; until INITD
|
||||
|
||||
+phy_trash_a
|
||||
lda #CS_RX_CTL
|
||||
ldx #<CS_RX_CTL_VALUE
|
||||
ldy #>CS_RX_CTL_VALUE
|
||||
jsr arnitech_net_write
|
||||
lda #CS_LINE_CTL
|
||||
ldx #<CS_LINE_VALUE
|
||||
ldy #>CS_LINE_VALUE
|
||||
jsr arnitech_net_write
|
||||
+ply_trash_a
|
||||
|
||||
clc
|
||||
@2:
|
||||
rts
|
||||
|
||||
;
|
||||
; NET_MAC, $FF0F: see ff00.arnitech_jumptable.s
|
||||
;
|
||||
|
||||
arnitech_net_mac:
|
||||
|
||||
stx SAL+0
|
||||
sty SAL+1
|
||||
jsr arnitech_net_probe
|
||||
bcs @2
|
||||
|
||||
ldy #$00
|
||||
@1:
|
||||
tya
|
||||
ora #CS_IA ; $58, $5A, $5C
|
||||
jsr arnitech_net_point
|
||||
lda RRNET_PP_DATA+0
|
||||
sta (SAL), y
|
||||
iny
|
||||
lda RRNET_PP_DATA+1
|
||||
sta (SAL), y
|
||||
iny
|
||||
cpy #$06
|
||||
bne @1
|
||||
|
||||
clc
|
||||
@2:
|
||||
rts
|
||||
|
||||
;
|
||||
; NET_SEND, $FF12: see ff00.arnitech_jumptable.s
|
||||
;
|
||||
|
||||
arnitech_net_send:
|
||||
|
||||
jsr arnitech_net_args
|
||||
lda #NET_NO_CARD
|
||||
bcs arnitech_net_done
|
||||
|
||||
lda #CS_TX_AFTER_ALL ; TxCMD, which the high byte's write gives the chip
|
||||
sta RRNET_TX_CMD+0
|
||||
lda #$00
|
||||
sta RRNET_TX_CMD+1
|
||||
lda EAL+0 ; TxLength: the bid, at the high byte's write
|
||||
sta RRNET_TX_LENGTH+0
|
||||
lda EAL+1
|
||||
sta RRNET_TX_LENGTH+1
|
||||
|
||||
lda #CS_BUS_ST
|
||||
jsr arnitech_net_point
|
||||
lda RRNET_PP_DATA+0
|
||||
bmi @1 ; TxBidErr
|
||||
lda RRNET_PP_DATA+1
|
||||
lsr ; Rdy4TxNOW into carry
|
||||
lda #NET_NO_ROOM
|
||||
bcc arnitech_net_fail
|
||||
|
||||
clv ; memory to chip
|
||||
jmp arnitech_net_copy ; carry clear
|
||||
@1:
|
||||
lda #NET_LENGTH_REFUSED
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
arnitech_net_fail:
|
||||
|
||||
sec
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
arnitech_net_done:
|
||||
|
||||
rts
|
||||
|
||||
;
|
||||
; NET_RECV, $FF15: see ff00.arnitech_jumptable.s
|
||||
;
|
||||
|
||||
arnitech_net_recv:
|
||||
|
||||
jsr arnitech_net_args
|
||||
lda #NET_NO_CARD
|
||||
bcs arnitech_net_done
|
||||
|
||||
lda #CS_RX_EVENT
|
||||
jsr arnitech_net_point
|
||||
lda RRNET_PP_DATA+1 ; reading the event clears it
|
||||
lsr ; RxOK into carry
|
||||
lda #NET_NONE_WAITING
|
||||
bcc arnitech_net_fail
|
||||
|
||||
lda RRNET_RX_TX_DATA+1 ; RxStatus, high byte first, not needed
|
||||
lda RRNET_RX_TX_DATA+0
|
||||
ldx RRNET_RX_TX_DATA+1 ; RxLength, high byte first
|
||||
lda RRNET_RX_TX_DATA+0
|
||||
|
||||
cpx EAL+1
|
||||
bne @1
|
||||
cmp EAL+0
|
||||
beq @2
|
||||
@1:
|
||||
bcs @3 ; longer than the buffer
|
||||
@2:
|
||||
sta EAL+0
|
||||
stx EAL+1
|
||||
pha
|
||||
txa
|
||||
pha
|
||||
bit arnitech_net_copy_end ; an RTS, $60: sets V, chip to memory
|
||||
jsr arnitech_net_copy
|
||||
pla
|
||||
tay
|
||||
pla
|
||||
tax
|
||||
clc
|
||||
rts
|
||||
@3:
|
||||
lda #CS_RX_CFG
|
||||
jsr arnitech_net_point
|
||||
lda RRNET_PP_DATA+0
|
||||
ora #$40 ; Skip_1: the frame is dropped
|
||||
sta RRNET_PP_DATA+0
|
||||
lda #NET_TOO_LONG
|
||||
bne arnitech_net_fail ; branch always
|
||||
|
||||
;
|
||||
; The pointer from the zero page address in A into SAL, the length in X/Y into EAL, and the
|
||||
; chip probed. Out: carry clear if it answers.
|
||||
;
|
||||
|
||||
arnitech_net_args:
|
||||
|
||||
stx EAL+0
|
||||
sty EAL+1
|
||||
tax
|
||||
lda $00, x
|
||||
sta SAL+0
|
||||
lda $01, x
|
||||
sta SAL+1
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
;
|
||||
; Whether the chip answers: the PacketPage Pointer, set to $0000, reads back $3000, as its
|
||||
; bits C-E always read 011b (DS271F5 4.10.5), and the Product ID is at PacketPage $0000, so a
|
||||
; floating bus that reads like the Product ID by chance is no chip. Out: carry clear if it
|
||||
; answers. X and Y are kept.
|
||||
;
|
||||
|
||||
arnitech_net_probe:
|
||||
|
||||
lda #$00
|
||||
sta RRNET_PP_POINTER+0
|
||||
sta RRNET_PP_POINTER+1
|
||||
lda RRNET_PP_POINTER+1
|
||||
cmp #$30
|
||||
bne @1
|
||||
lda RRNET_PP_DATA+0
|
||||
cmp #<CS_PRODUCT_ID
|
||||
bne @1
|
||||
lda RRNET_PP_DATA+1
|
||||
cmp #>CS_PRODUCT_ID
|
||||
bne @1
|
||||
clc
|
||||
rts
|
||||
@1:
|
||||
sec
|
||||
rts
|
||||
|
||||
;
|
||||
; PacketPage register $01xx, xx in A, written with X (low byte) and Y (high byte)
|
||||
;
|
||||
|
||||
arnitech_net_write:
|
||||
|
||||
jsr arnitech_net_point
|
||||
stx RRNET_PP_DATA+0
|
||||
sty RRNET_PP_DATA+1
|
||||
rts
|
||||
|
||||
;
|
||||
; The PacketPage pointer at $01xx, xx in A. X and Y are kept.
|
||||
;
|
||||
|
||||
arnitech_net_point:
|
||||
|
||||
sta RRNET_PP_POINTER+0
|
||||
lda #$01
|
||||
sta RRNET_PP_POINTER+1
|
||||
rts
|
||||
|
||||
;
|
||||
; EAL bytes between the chip's receive and transmit data port and SAL: from the chip with V
|
||||
; set, to it with V clear. Even bytes go through the port's low byte, odd ones through its
|
||||
; high byte. Out: carry clear.
|
||||
;
|
||||
|
||||
arnitech_net_copy:
|
||||
|
||||
ldy #$00
|
||||
@1:
|
||||
lda EAL+0
|
||||
ora EAL+1
|
||||
beq @4
|
||||
tya
|
||||
and #$01
|
||||
tax
|
||||
bvs @2
|
||||
lda (SAL), y
|
||||
cpx #$01 ; plain stores: an indexed one reads the port
|
||||
beq @7 ; first, which takes a byte of a received frame
|
||||
sta RRNET_RX_TX_DATA+0
|
||||
bvc @3 ; branch always
|
||||
@7:
|
||||
sta RRNET_RX_TX_DATA+1
|
||||
bvc @3 ; branch always
|
||||
@2:
|
||||
lda RRNET_RX_TX_DATA, x
|
||||
sta (SAL), y
|
||||
@3:
|
||||
iny
|
||||
bne @5
|
||||
inc SAL+1
|
||||
@5:
|
||||
lda EAL+0
|
||||
bne @6
|
||||
dec EAL+1
|
||||
@6:
|
||||
dec EAL+0
|
||||
jmp @1
|
||||
@4:
|
||||
clc
|
||||
|
||||
arnitech_net_copy_end:
|
||||
|
||||
rts
|
||||
}
|
||||
@@ -0,0 +1,261 @@
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;
|
||||
; The Terminal Card driver of the Blade Firmware (mc64blade only, arnitech's ADR 0030 and 0031)
|
||||
;
|
||||
; A Blade has no VIC-II and no keyboard: its screen and keyboard, devices 3 and 0, are the
|
||||
; Terminal Card, which holds the 80x25 screen and the screen editor itself. CHROUT writes each
|
||||
; byte to it, as a glyph while quote or insert mode is on; CHRIN echoes the keys typed and, on
|
||||
; RETURN, reads back the logical line under the cursor; the IRQ moves its keys into the keyboard
|
||||
; buffer and its RUN/STOP into STKEY. Quote and insert mode stay the KERNAL's, in QTSW and INSRT,
|
||||
; as the Card cannot see them. With no Terminal Card, bytes printed go nowhere and no key comes.
|
||||
;
|
||||
|
||||
!ifdef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Finds the Terminal Card. Out: carry clear and X = its Card window's low byte, carry set if
|
||||
; there is none. A is not kept, Y is.
|
||||
;
|
||||
|
||||
terminal_find:
|
||||
|
||||
lda #TERMINAL_CARD_TYPE
|
||||
jmp arnitech_find_card
|
||||
|
||||
;
|
||||
; CHROUT for device 3. SCHAR holds the byte; CHROUT has saved X, Y, and P.
|
||||
;
|
||||
; Outside quote and insert mode the byte goes to Output. While either is on, every control code
|
||||
; but RETURN, SHIFT+RETURN, and STOP goes to Literal, which draws it as a glyph; so does DEL
|
||||
; while INSRT is not 0, which a DEL between quotes leaves to delete, but INS then opens another
|
||||
; space, as on a C64 (Programmer's Reference Guide, p. 96). RETURN, SHIFT+RETURN, and STOP end
|
||||
; both modes. A glyph drawn counts INSRT down, a quote toggles QTSW, and an INS that
|
||||
; opened a space (status bit 3) counts INSRT up.
|
||||
;
|
||||
|
||||
chrout_terminal:
|
||||
|
||||
jsr terminal_find
|
||||
bcs chrout_terminal_done ; no Terminal Card: the byte goes nowhere
|
||||
|
||||
lda SCHAR
|
||||
and #$60
|
||||
beq chrout_terminal_control ; $00-$1F and $80-$9F are control codes
|
||||
|
||||
lda SCHAR
|
||||
sta TERMINAL_OUTPUT, x
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
chrout_terminal_glyph:
|
||||
|
||||
lda INSRT
|
||||
beq @1
|
||||
dec INSRT
|
||||
@1:
|
||||
lda SCHAR
|
||||
cmp #$22
|
||||
bne chrout_terminal_done
|
||||
lda QTSW
|
||||
eor #$80
|
||||
sta QTSW
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
chrout_terminal_done:
|
||||
|
||||
jmp chrout_done_success
|
||||
|
||||
chrout_terminal_control:
|
||||
|
||||
lda SCHAR
|
||||
cmp #KEY_RETURN
|
||||
beq chrout_terminal_end_modes
|
||||
cmp #KEY_SHIFT_RETURN
|
||||
beq chrout_terminal_end_modes
|
||||
cmp #KEY_STOP
|
||||
beq chrout_terminal_end_modes
|
||||
|
||||
ldy INSRT
|
||||
beq @1
|
||||
cmp #KEY_INS
|
||||
beq chrout_terminal_code ; in the spaces INS opened, INS opens another
|
||||
bne chrout_terminal_literal ; ... and DEL too is a glyph
|
||||
@1:
|
||||
ldy QTSW
|
||||
beq chrout_terminal_code
|
||||
cmp #KEY_DEL
|
||||
beq chrout_terminal_code ; between quotes DEL still deletes
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
chrout_terminal_literal:
|
||||
|
||||
sta TERMINAL_LITERAL, x
|
||||
jmp chrout_terminal_glyph
|
||||
|
||||
chrout_terminal_code:
|
||||
|
||||
sta TERMINAL_OUTPUT, x
|
||||
cmp #KEY_INS
|
||||
bne chrout_terminal_done
|
||||
lda TERMINAL_STATUS, x
|
||||
and #TERMINAL_INSERTED
|
||||
beq chrout_terminal_done
|
||||
inc INSRT
|
||||
bne chrout_terminal_done ; branch always
|
||||
|
||||
chrout_terminal_end_modes:
|
||||
|
||||
sta TERMINAL_OUTPUT, x
|
||||
lda #$00
|
||||
sta QTSW
|
||||
sta INSRT
|
||||
beq chrout_terminal_done ; branch always
|
||||
|
||||
;
|
||||
; CHRIN for device 0, the keyboard. X and Y are kept.
|
||||
;
|
||||
; The first call marks where input starts on the Terminal, echoes each key typed through CHROUT,
|
||||
; and on RETURN has the Card take the logical line under the cursor; it and the calls after
|
||||
; return the line's bytes, then RETURN, which ends it.
|
||||
;
|
||||
|
||||
chrin_terminal:
|
||||
|
||||
stx XSAV
|
||||
+phy_trash_a
|
||||
|
||||
lda CRSW
|
||||
bne chrin_terminal_next ; a line is being returned
|
||||
|
||||
jsr terminal_find
|
||||
bcs chrin_terminal_wait
|
||||
lda #TERMINAL_INPUT_START
|
||||
sta TERMINAL_COMMAND, x
|
||||
|
||||
chrin_terminal_wait:
|
||||
|
||||
lda NDX
|
||||
beq chrin_terminal_wait
|
||||
jsr get_from_keyboard_buffer
|
||||
cmp #KEY_RETURN
|
||||
beq chrin_terminal_take
|
||||
jsr JCHROUT ; the Terminal Card edits
|
||||
jmp chrin_terminal_wait
|
||||
|
||||
chrin_terminal_take:
|
||||
|
||||
jsr terminal_find
|
||||
bcs chrin_terminal_end ; the Card is gone: an empty line
|
||||
lda #TERMINAL_TAKE_LINE
|
||||
sta TERMINAL_COMMAND, x
|
||||
inc CRSW
|
||||
|
||||
chrin_terminal_next:
|
||||
|
||||
jsr terminal_find
|
||||
bcs chrin_terminal_end
|
||||
lda TERMINAL_LINE, x
|
||||
cmp #KEY_RETURN
|
||||
bne chrin_terminal_return
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
chrin_terminal_end:
|
||||
|
||||
lda #$00
|
||||
sta CRSW
|
||||
sta QTSW
|
||||
sta INSRT
|
||||
lda #KEY_RETURN
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
chrin_terminal_return:
|
||||
|
||||
tax
|
||||
+ply_trash_a
|
||||
txa
|
||||
ldx XSAV
|
||||
clc
|
||||
rts
|
||||
|
||||
;
|
||||
; SCNKEY: moves the Terminal Card's keys into the keyboard buffer, while it has room; the rest
|
||||
; wait in the Card.
|
||||
;
|
||||
|
||||
SCNKEY:
|
||||
|
||||
jsr terminal_find
|
||||
bcs @2
|
||||
@1:
|
||||
lda TERMINAL_STATUS, x
|
||||
lsr ; bit 0, a key waiting, into carry
|
||||
bcc @2
|
||||
ldy NDX
|
||||
cpy XMAX
|
||||
bcs @2
|
||||
lda TERMINAL_KEY, x
|
||||
sta KEYD, y
|
||||
inc NDX
|
||||
bne @1 ; branch always
|
||||
@2:
|
||||
rts
|
||||
|
||||
;
|
||||
; The part of UDTIM that reads the STOP key: STKEY is $7F while the Terminal Card's RUN/STOP is
|
||||
; held, $FF otherwise. Y is kept.
|
||||
;
|
||||
|
||||
udtim_terminal_stop:
|
||||
|
||||
jsr terminal_find
|
||||
lda #$00 ; no Terminal Card, no RUN/STOP
|
||||
bcs @1
|
||||
lda TERMINAL_STATUS, x
|
||||
@1:
|
||||
and #TERMINAL_STOP_HELD
|
||||
lsr
|
||||
lsr ; held into carry
|
||||
ror ; ... and into bit 7
|
||||
eor #$FF
|
||||
sta STKEY
|
||||
rts
|
||||
|
||||
;
|
||||
; SCREEN: the Terminal's 80 columns in X and 25 rows in Y.
|
||||
;
|
||||
|
||||
SCREEN:
|
||||
|
||||
ldx #80
|
||||
ldy #25
|
||||
rts
|
||||
|
||||
;
|
||||
; CINT's work on a Blade: the keyboard and the screen as the input and output devices (as
|
||||
; vicii_init does on a C64), the keyboard buffer's size, a reset of the Terminal and of quote and
|
||||
; insert mode, the native-mode vectors, and CIA1's timer A for the jiffy IRQ.
|
||||
;
|
||||
|
||||
cint_terminal:
|
||||
|
||||
jsr clrchn_reset
|
||||
ldx #10
|
||||
stx XMAX
|
||||
lda #$00
|
||||
sta CRSW
|
||||
sta QTSW
|
||||
sta INSRT
|
||||
jsr terminal_find
|
||||
bcs @1
|
||||
lda #TERMINAL_RESET
|
||||
sta TERMINAL_COMMAND, x
|
||||
@1:
|
||||
jsr native_vectors_init
|
||||
jmp setup_pal_ntsc
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;
|
||||
; CIA1's TOD from the Arnitech controller's real time (mc64 only, arnitech's ADR 0023)
|
||||
; CIA1's TOD from the Arnitech controller's real time (mc64 and mc64blade, arnitech's ADR 0023)
|
||||
;
|
||||
; The controller lays its time out as the TOD reads it, so the copy goes hours first, which stops
|
||||
; the TOD, and tenths last, which starts it. The CIA flips the PM bit when an hour of 12 is
|
||||
|
||||
@@ -2,18 +2,20 @@
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;
|
||||
; The Arnitech jump table (mc64 only): thin wrappers over the Arnitech controller's registers
|
||||
; (arnitech's ADR 0023), at fixed addresses. Software finds it by reading "ARNI" at $FF00 with
|
||||
; the KERNAL banked in; on any other KERNAL it uses the registers themselves, which work the same.
|
||||
; The Arnitech jump table (mc64 and mc64blade): thin wrappers over the Arnitech controller's
|
||||
; registers (arnitech's ADR 0023), at fixed addresses. Software finds it by reading "ARNI" at
|
||||
; $FF00 with the KERNAL banked in; on any other KERNAL it uses the registers themselves, which
|
||||
; work the same.
|
||||
; Entries are only ever added, after the last, with the version and count raised; $FF48-$FF80
|
||||
; stay clear, for the stock IRQ entry, CINT, and the KERNAL revision byte.
|
||||
;
|
||||
; $FF00-$FF03 "ARNI"
|
||||
; $FF04 version of the table, $01
|
||||
; $FF04 version of the table, $02
|
||||
; $FF05 number of entries
|
||||
;
|
||||
; $FF06 ARNI_FINDCARD - finds the first Card slot holding a Card of a given type
|
||||
; In: A = the Card's type ($01 Redstone Card, $02 Internet Card; $00 finds an empty slot)
|
||||
; In: A = the Card's type ($01 Redstone Card, $02 Internet Card, $03 Network Card,
|
||||
; $04 Terminal Card; $00 finds an empty slot)
|
||||
; Out: carry clear if found: A = the slot (0-5), X = the low byte of its Card window
|
||||
; ($DEA0 + 16 * slot, so LDA $DE00,X reads the window's first byte);
|
||||
; carry set if no slot holds one, or no controller answers (a Cartridge switched it off)
|
||||
@@ -26,15 +28,50 @@
|
||||
; untouched but on 50 Hz all the same
|
||||
; A and X are not kept, Y is
|
||||
;
|
||||
; Version 2 adds the network: whole Ethernet frames, from the Destination Address to the end of
|
||||
; the data without the CRC, through the CS8900A at the RR-Net socket (arnitech's ADR 0027),
|
||||
; found by its PacketPage Pointer and Product ID. Software polls; ARP and IP are its own.
|
||||
;
|
||||
; $FF0C NET_INIT - resets the chip and sets it to receive frames for its own address and
|
||||
; broadcasts, and to send
|
||||
; In: nothing
|
||||
; Out: carry clear if done; carry set if there is no Network Card
|
||||
; A and X are not kept, Y is
|
||||
;
|
||||
; $FF0F NET_MAC - copies the MAC address: the chip's Individual Address, which a reset sets to
|
||||
; the Network Card's
|
||||
; In: X/Y = the address of 6 bytes for it, low byte in X
|
||||
; Out: carry clear if copied; carry set if there is no Network Card
|
||||
; A, X, and Y are not kept
|
||||
;
|
||||
; $FF12 NET_SEND - sends a frame
|
||||
; In: A = a zero page address holding a pointer to the frame,
|
||||
; X/Y = its length, 14-1514, low byte in X; the chip pads one under 60 bytes
|
||||
; Out: carry clear if sent; carry set if not, with A = 1 no Network Card, 2 no room in
|
||||
; the chip while it holds frames received, 3 the chip refuses the length
|
||||
; A, X, and Y are not kept
|
||||
;
|
||||
; $FF15 NET_RECV - takes the oldest frame received
|
||||
; In: A = a zero page address holding a pointer to a buffer,
|
||||
; X/Y = its length, low byte in X
|
||||
; Out: carry clear if a frame was copied into the buffer, with X/Y = its length, low byte
|
||||
; in X; carry set if not, with A = 0 none waiting, 1 no Network Card, 4 the frame is
|
||||
; longer than the buffer, and is dropped
|
||||
; A is not kept when a frame is copied
|
||||
;
|
||||
|
||||
!ifdef CONFIG_ARNITECH_CONTROLLER {
|
||||
|
||||
arnitech_jumptable:
|
||||
|
||||
!byte $41, $52, $4E, $49 ; "ARNI"
|
||||
!byte $01 ; version
|
||||
!byte $02 ; entries
|
||||
!byte $02 ; version
|
||||
!byte $06 ; entries
|
||||
|
||||
jmp arnitech_find_card ; $FF06
|
||||
jmp arnitech_set_tod ; $FF09
|
||||
jmp arnitech_net_init ; $FF0C
|
||||
jmp arnitech_net_mac ; $FF0F
|
||||
jmp arnitech_net_send ; $FF12
|
||||
jmp arnitech_net_recv ; $FF15
|
||||
}
|
||||
@@ -62,6 +62,14 @@ iec_tx_byte:
|
||||
jsr kernalstatus_DEVICE_NOT_FOUND
|
||||
jmp iec_return_DEVICE_NOT_FOUND
|
||||
@1:
|
||||
; Timing is critical from here on - execute on disabled IRQs, from before
|
||||
; CLK is released: an IRQ between the release and the EOI wait would hide
|
||||
; the listener's EOI acknowledgement, and the transfer would hang
|
||||
; The best practice would be to do PHP first, but it seems this is not
|
||||
; what the original ROM does; furthermore, pushing additional bytes to
|
||||
; stack can wreck autostart software loading at $0100
|
||||
sei
|
||||
|
||||
; Notify all devices that we are going to send a byte
|
||||
; and it is going to be a data byte (released ATN)
|
||||
jsr iec_release_atn_clk_data
|
||||
@@ -72,11 +80,7 @@ iec_tx_byte:
|
||||
|
||||
iec_tx_common:
|
||||
|
||||
; Timing is critical here - execute on disabled IRQs
|
||||
; The best practice would be to do PHP first, but it seems this is not
|
||||
; what the original ROM does; furthermore, pushing additional bytes to
|
||||
; stack can wreck autostart software loading at $0100
|
||||
sei
|
||||
; Entered with IRQs disabled, by iec_tx_byte and iec_tx_command
|
||||
|
||||
; Wait till all receivers are ready, they should all release DATA
|
||||
jsr iec_wait_for_data_release
|
||||
|
||||
@@ -32,7 +32,10 @@ iec_tx_command:
|
||||
; (can be busy processing something), we have to wait till they are all
|
||||
; ready (or bored with DOS attack...)
|
||||
; Release back CLK, keep DATA released - to ask devices for status.
|
||||
; From here on IRQs are disabled, as in iec_tx_byte: a listener takes a
|
||||
; talker that waits too long after the release for EOI
|
||||
|
||||
sei
|
||||
jsr iec_release_clk_data
|
||||
|
||||
; Common part of iec_txbyte and iec_tx_common - waits for devices
|
||||
|
||||
@@ -12,6 +12,28 @@
|
||||
; 63 cycles, we need at least 17 full rasters to be 100% sure we wait enough
|
||||
|
||||
|
||||
!ifdef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
; A Blade has no VIC-II: CIA #1's timer B, which only the tape used, counts 1024 cycles once
|
||||
; (a little over 1 ms at the PAL clock of a Blade). Its START bit clears when it runs out;
|
||||
; its ICR flag would not do, as the IRQ handler's read of the ICR clears it
|
||||
|
||||
iec_wait1ms:
|
||||
|
||||
lda #$00
|
||||
sta CIA1_TIMBLO
|
||||
lda #$04
|
||||
sta CIA1_TIMBHI
|
||||
lda #%00011001 ; one-shot, load the latch, start
|
||||
sta CIA1_CRB
|
||||
@2:
|
||||
lda CIA1_CRB
|
||||
lsr
|
||||
bcs @2
|
||||
rts
|
||||
|
||||
} else {
|
||||
|
||||
!ifdef CONFIG_IEC {
|
||||
|
||||
|
||||
@@ -55,3 +77,5 @@ wait_x_bars: ; additional entry point for delay in screen and tape support
|
||||
iec_wait_rts: ; dummy RTS, for very short waits
|
||||
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -2,6 +2,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; This is a part CINT which initializes screen and keyboard
|
||||
;
|
||||
@@ -49,3 +52,5 @@ cint_screen_keyboard:
|
||||
; Fallthrough/jump to screen clear routine (Computes Mapping the 64 p215)
|
||||
|
||||
jmp clear_screen
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -2,6 +2,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Part of the official Kernal routine, described in:
|
||||
;
|
||||
@@ -37,3 +40,5 @@ cint_legacy_end:
|
||||
; Game 'Operacja Proboszcz' is one example.
|
||||
|
||||
jmp cint_screen_keyboard ; XXX try to fit the code here
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -5,6 +5,9 @@
|
||||
;; #LAYOUT# X16 * #IGNORE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no VIC-II
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Well-known Kernal routine, described in:
|
||||
;
|
||||
@@ -22,43 +25,11 @@ vicii_init:
|
||||
|
||||
} else {
|
||||
|
||||
; Clear everything - turn off sprites (observed hanging around after
|
||||
; running programs and resetting), etc.
|
||||
; The work is elsewhere: $E5B4, inside the 41 bytes it takes, is the
|
||||
; keyboard buffer's well-known entry (e5b4.get_from_keyboard_buffer.s)
|
||||
|
||||
lda #$00
|
||||
ldx #$2E
|
||||
@1:
|
||||
sta __VIC_BASE, x
|
||||
dex
|
||||
bpl @1
|
||||
|
||||
; Set up default IO values
|
||||
; - [CM64] page 129 - VIC_SCROLY
|
||||
; - [CM64] pages 140-144 - VIC_SCROLX
|
||||
; - [CM64] pages 145-146 - VIC_YMCSB
|
||||
|
||||
lda #$1B ; according to [CM64] page 137 some software assumes oldest bit is 0
|
||||
sta VIC_SCROLY
|
||||
lda #$C8
|
||||
sta VIC_SCROLX ; 40 column, etc.
|
||||
lda #$14
|
||||
sta VIC_YMCSB
|
||||
lda #$0F
|
||||
sta VIC_IRQ ; clear all interrupts
|
||||
|
||||
; We use a different colour scheme of white text on all blue by default,
|
||||
; but brand-specific color scheme can also be enabled
|
||||
|
||||
lda #CONFIG_COLOR_BG
|
||||
sta VIC_EXTCOL
|
||||
sta VIC_BGCOL0
|
||||
|
||||
; Setup default I/O devices
|
||||
|
||||
!ifdef CONFIG_IEC {
|
||||
jmp clrchn_reset
|
||||
} else {
|
||||
jmp CLRCHN
|
||||
}
|
||||
jmp vicii_init_registers
|
||||
|
||||
} ; ROM layout
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -45,6 +45,8 @@ hw_entry_reset:
|
||||
; Also, https://codebase64.org/doku.php?id=base:assembling_your_own_cart_rom_image was used
|
||||
; as it shows example startup sequence, to be followe by cartridge creators
|
||||
|
||||
!ifndef CONFIG_ARNITECH_BLADE { ; a Blade has no Cartridges and no VIC-II
|
||||
|
||||
!ifndef ROM_LAYOUT_CRT {
|
||||
|
||||
; C64 PRG p269
|
||||
@@ -57,6 +59,7 @@ hw_entry_reset:
|
||||
ldx #$28
|
||||
stx VIC_SCROLX
|
||||
}
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
; Initialising IO is obviously required. Also indicated by c64 prg p269.
|
||||
jsr JIOINIT
|
||||
|
||||
|
||||
@@ -13,5 +13,9 @@
|
||||
|
||||
CINT:
|
||||
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
jsr cint_legacy
|
||||
jmp setup_pal_ntsc
|
||||
} else {
|
||||
jmp cint_terminal
|
||||
}
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
setup_pal_ntsc:
|
||||
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
lda VIC_RASTER
|
||||
@1:
|
||||
cmp VIC_RASTER
|
||||
@@ -23,6 +25,8 @@ setup_pal_ntsc:
|
||||
cmp #$07
|
||||
bcc setup_ntsc
|
||||
|
||||
} ; a Blade runs at the PAL C64's clock (arnitech's ADR 0029)
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
setup_pal:
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# CRT KERNAL_0 #TAKE
|
||||
;; #LAYOUT# M65 KERNAL_1 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no VIC-II
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; The VIC-II set-up of vicii_init (e5a0.vicii_init.s), moved out of $E5A0-$E5C8
|
||||
; so that $E5B4 is free
|
||||
;
|
||||
|
||||
|
||||
vicii_init_registers:
|
||||
|
||||
; Clear everything - turn off sprites (observed hanging around after
|
||||
; running programs and resetting), etc.
|
||||
|
||||
lda #$00
|
||||
ldx #$2E
|
||||
@1:
|
||||
sta __VIC_BASE, x
|
||||
dex
|
||||
bpl @1
|
||||
|
||||
; Set up default IO values
|
||||
; - [CM64] page 129 - VIC_SCROLY
|
||||
; - [CM64] pages 140-144 - VIC_SCROLX
|
||||
; - [CM64] pages 145-146 - VIC_YMCSB
|
||||
|
||||
lda #$1B ; according to [CM64] page 137 some software assumes oldest bit is 0
|
||||
sta VIC_SCROLY
|
||||
lda #$C8
|
||||
sta VIC_SCROLX ; 40 column, etc.
|
||||
lda #$14
|
||||
sta VIC_YMCSB
|
||||
lda #$0F
|
||||
sta VIC_IRQ ; clear all interrupts
|
||||
|
||||
; We use a different colour scheme of white text on all blue by default,
|
||||
; but brand-specific color scheme can also be enabled
|
||||
|
||||
lda #CONFIG_COLOR_BG
|
||||
sta VIC_EXTCOL
|
||||
sta VIC_BGCOL0
|
||||
|
||||
; Setup default I/O devices
|
||||
|
||||
!ifdef CONFIG_IEC {
|
||||
jmp clrchn_reset
|
||||
} else {
|
||||
jmp CLRCHN
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -47,7 +47,9 @@ default_irq_handler_common:
|
||||
|
||||
} else {
|
||||
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
jsr cursor_blink
|
||||
}
|
||||
jsr JSCNKEY
|
||||
jsr JUDTIM ; update jiffy clock
|
||||
}
|
||||
|
||||
@@ -17,13 +17,13 @@ default_nmi_handler:
|
||||
|
||||
; XXX confirm NMIs from CIA, or no other NMI will arrive!
|
||||
|
||||
!ifdef CONFIG_PLATFORM_COMMODORE_64 {
|
||||
!ifdef CONFIG_PLATFORM_COMMODORE_64 { !ifndef CONFIG_ARNITECH_BLADE { ; a Blade has no Cartridges
|
||||
|
||||
jsr cartridge_check
|
||||
bne @1
|
||||
jmp (ICART_WARM_START)
|
||||
@1:
|
||||
}
|
||||
} }
|
||||
|
||||
; According to C64 Wiki, if STOP key is pressed, the routine assumes warm start request
|
||||
|
||||
|
||||
@@ -9,7 +9,19 @@ default_brk_handler:
|
||||
|
||||
sei ; disable IRQs, to be sure they wont interfere
|
||||
|
||||
!ifdef CONFIG_PLATFORM_COMMODORE_64 {
|
||||
!ifdef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
; A Blade's 65816 comes here from BRK, COP, and ABORT in native mode too (arnitech_native.s):
|
||||
; direct page 0, data bank 0, and back to emulation mode
|
||||
|
||||
!byte $F4, $00, $00 ; PEA $0000
|
||||
!byte $2B ; PLD
|
||||
!byte $4B ; PHK
|
||||
!byte $AB ; PLB
|
||||
sec
|
||||
!byte $FB ; XCE
|
||||
|
||||
} else ifdef CONFIG_PLATFORM_COMMODORE_64 {
|
||||
|
||||
ldx #$00
|
||||
sta VIC_SCROLX ; turn the display off - we want as little screen artifacts as possible
|
||||
|
||||
@@ -26,12 +26,39 @@ plot_set:
|
||||
sty PNTR
|
||||
stx TBLX
|
||||
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
jsr screen_calculate_pointers
|
||||
|
||||
} else {
|
||||
|
||||
; On a Blade the cursor is the Terminal Card's, which clamps it to the 80x25 screen;
|
||||
; PNTR and TBLX keep the last place set or read, which is all there is without a Card
|
||||
|
||||
jsr terminal_find
|
||||
bcs plot_get_kept
|
||||
lda PNTR
|
||||
sta TERMINAL_COLUMN, x
|
||||
lda TBLX
|
||||
sta TERMINAL_ROW, x
|
||||
}
|
||||
|
||||
; FALLTROUGH to save one byte on RTS
|
||||
|
||||
plot_get:
|
||||
|
||||
!ifdef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
jsr terminal_find
|
||||
bcs plot_get_kept
|
||||
lda TERMINAL_COLUMN, x
|
||||
sta PNTR
|
||||
lda TERMINAL_ROW, x
|
||||
sta TBLX
|
||||
|
||||
plot_get_kept:
|
||||
}
|
||||
|
||||
ldy PNTR
|
||||
ldx TBLX
|
||||
rts
|
||||
@@ -22,7 +22,11 @@ CHRIN:
|
||||
lda DFLTN
|
||||
|
||||
; Try $00 - keyboard
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
+beq chrin_keyboard
|
||||
} else {
|
||||
+beq chrin_terminal
|
||||
}
|
||||
|
||||
; XXX Try $03 - screen
|
||||
; cmp #$03
|
||||
|
||||
@@ -30,7 +30,11 @@ CHROUT:
|
||||
lda DFLTO
|
||||
|
||||
cmp #$03 ; screen
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
+beq chrout_screen
|
||||
} else {
|
||||
+beq chrout_terminal
|
||||
}
|
||||
|
||||
!ifdef HAS_RS232 {
|
||||
cmp #$02
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;
|
||||
; Well-known Kernal routine, described in:
|
||||
;
|
||||
; - [CM64] Computes Mapping the Commodore 64 - $E5B4, LP2
|
||||
;
|
||||
; Takes the first key from the keyboard buffer, which must not be empty, and moves the
|
||||
; others up. Out: the key in A. X is kept.
|
||||
;
|
||||
|
||||
|
||||
get_from_keyboard_buffer:
|
||||
|
||||
lda KEYD
|
||||
pha
|
||||
jsr pop_keyboard_buffer
|
||||
pla
|
||||
|
||||
rts
|
||||
@@ -0,0 +1,3 @@
|
||||
cc65's C64 runtime calls $E5B4 (KBDREAD in its cbm_kernal.inc) from cgetc, once the keyboard
|
||||
buffer holds a key, and takes the key from A; so does every cc65 program that reads a key,
|
||||
Contiki's among them.
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no keyboard matrix: its keys come from the Terminal Card (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Well-known Kernal routine, described in:
|
||||
;
|
||||
@@ -96,4 +99,6 @@ scnkey_toggle_if_needed: ; entry for SCNKEY (TWW/CTR version)
|
||||
sta VIC_YMCSB
|
||||
@1:
|
||||
rts
|
||||
}
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -4,6 +4,9 @@
|
||||
;; #LAYOUT# M65 KERNAL_C #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no keyboard matrix: its keys come from the Terminal Card (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Keyboard matrix, based on
|
||||
;
|
||||
@@ -93,3 +96,5 @@ __kb_matrix_ctrl:
|
||||
!byte $90,$06,$00,$05,$00,$00,$11,$00
|
||||
!byte $00,$00,$00,$84,$00,$00,$00,$1B
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no keyboard matrix: its keys come from the Terminal Card (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Extended keyboard matrix for Commodore 128 keyboards, based on
|
||||
;
|
||||
@@ -29,3 +32,5 @@ kb_matrix_128_bucky_filter:
|
||||
!byte %00000000
|
||||
!byte %10000001 ; ALT, NO_SCRL
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no keyboard matrix: its keys come from the Terminal Card (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Matrix ids of keys which should be repeated regardless of RPTFLG
|
||||
;
|
||||
@@ -25,3 +28,5 @@ __kb_matrix_alwaysrepeat_end:
|
||||
|
||||
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no keyboard matrix: its keys come from the Terminal Card (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Matrix for retrieving bucky key status on the C64 keyboard
|
||||
;
|
||||
@@ -63,3 +66,5 @@ kb_matrix_bucky_shflag: ; mask to be ORed to SHFLAG to mark key status
|
||||
!byte KEY_FLAG_ALT
|
||||
!byte KEY_FLAG_NO_SCRL
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no keyboard matrix: its keys come from the Terminal Card (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Matrix for filtering out bucky keys while scanning the C64 keyboard
|
||||
;
|
||||
@@ -23,3 +26,5 @@ kb_matrix_bucky_filter:
|
||||
!byte %00000000
|
||||
!byte %00010000 ; SHIFT (right)
|
||||
!byte %00100100 ; VENDOR + CONTROL
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no keyboard matrix: its keys come from the Terminal Card (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Matrix for retrieving C64 joystick status and inject is as keyboard event
|
||||
;
|
||||
@@ -40,3 +43,5 @@ kb_matrix_joy_keytab_hi:
|
||||
!byte >__kb_matrix_normal ; right
|
||||
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -4,6 +4,9 @@
|
||||
;; #LAYOUT# M65 KERNAL_C #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no keyboard matrix: its keys come from the Terminal Card (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Helper table for determining keyboard matrix decoding table on the C64 keyboard
|
||||
;
|
||||
@@ -49,3 +52,5 @@ kb_matrix_lookup:
|
||||
!word $0000 ; %1.110 VENDOR+CTRL
|
||||
!word $0000 ; %1.111 SHIFT+VENDOR+CTRL
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no keyboard matrix: its keys come from the Terminal Card (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Single row key codes for scanning the C64 keyboard
|
||||
;
|
||||
@@ -25,3 +28,5 @@ kb_matrix_row_keys:
|
||||
!byte %11011111
|
||||
!byte %10111111
|
||||
!byte %01111111
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no keyboard matrix: its keys come from the Terminal Card (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Helper values to quickly determine row offset from the start of keyboard matrix
|
||||
;
|
||||
@@ -20,3 +23,5 @@ kb_matrix_row_offsets:
|
||||
!byte 5*8
|
||||
!byte 6*8
|
||||
!byte 7*8
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no keyboard matrix: its keys come from the Terminal Card (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Helper routine - disconnects the keyboard from CIA1_PRB,
|
||||
; leaves $FF in .X (behavior needed in some places)
|
||||
@@ -18,3 +21,5 @@ keyboard_disconnect:
|
||||
}
|
||||
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no keyboard matrix: its keys come from the Terminal Card (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Official Kernal routine, described in:
|
||||
;
|
||||
@@ -431,3 +434,5 @@ scnkey_buffer_full:
|
||||
sta KOUNT
|
||||
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no keyboard matrix: its keys come from the Terminal Card (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Keyboard scanning routine extension for C128 keyboards
|
||||
;
|
||||
@@ -67,3 +70,5 @@ scnkey_128_no_keys:
|
||||
|
||||
jmp scnkey_no_keys ; pass controll to original routine
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, which has no keyboard matrix: its keys come from the Terminal Card (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
; Short helper jump-via-vector routine, to set the keyboard matrix
|
||||
|
||||
!ifndef HAS_OPCODES_65CE02 {
|
||||
@@ -11,3 +14,5 @@ scnkey_via_keylog:
|
||||
|
||||
jmp (KEYLOG)
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Keyboard part of the CHRIN routine
|
||||
;
|
||||
@@ -167,3 +170,5 @@ chrkn_keyboard_not_enter:
|
||||
jsr CHROUT
|
||||
jsr pop_keyboard_buffer
|
||||
+bra chrin_keyboard_read
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Keyboard part of the CHRIN routine - programmable keys support
|
||||
; Output: if Carry clear, programmable key was handled
|
||||
@@ -50,3 +53,5 @@ chrin_programmable_keys:
|
||||
rts
|
||||
|
||||
} ; CONFIG_PROGRAMMABLE_KEYS
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; CHROUT routine - screen support (character output)
|
||||
;
|
||||
@@ -99,3 +102,5 @@ chrout_screen_done:
|
||||
|
||||
jsr cursor_show_if_enabled
|
||||
jmp chrout_done_success
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; CLR key handling within CHROUT
|
||||
;
|
||||
@@ -12,3 +15,5 @@ chrout_screen_CLR:
|
||||
|
||||
jsr clear_screen
|
||||
jmp chrout_screen_calc_lptr_done
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; CHROUT routine - screen support, control codes
|
||||
;
|
||||
@@ -70,3 +73,5 @@ chrout_try_color_loop:
|
||||
|
||||
; Unknown code, or key not requiring any handling
|
||||
jmp chrout_screen_done
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Cursor keys handling within CHROUT
|
||||
;
|
||||
@@ -61,3 +64,5 @@ chrout_screen_CRSR_LEFT:
|
||||
lda #39
|
||||
sta PNTR
|
||||
bne chrout_screen_CRSR_done ; branch always
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; CHROUT routine - screen support, DEL key handling
|
||||
;
|
||||
@@ -120,3 +123,5 @@ chrout_screen_del_column_0:
|
||||
|
||||
; Finish with recalculating all the variables
|
||||
bne chrout_screen_del_done
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; GFX/TXT mode switch handling within CHROUT
|
||||
;
|
||||
@@ -25,3 +28,5 @@ chrout_screen_TXT:
|
||||
lda VIC_YMCSB
|
||||
ora #$02 ; to lower case
|
||||
bne chrout_screen_GFX_TXT_end ; branch always
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; HOME key handling within CHROUT
|
||||
;
|
||||
@@ -12,3 +15,5 @@ chrout_screen_HOME:
|
||||
|
||||
jsr cursor_home
|
||||
jmp chrout_screen_calc_lptr_done
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; CHROUT routine - screen support, INS key handling
|
||||
;
|
||||
@@ -95,3 +98,5 @@ chrout_screen_ins_copy_loop:
|
||||
|
||||
; Return from loop
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Jumptable for screen control codes support. To improve performance, should be sorted
|
||||
; starting from the least probable routine.
|
||||
@@ -111,3 +114,5 @@ chrout_screen_jumptable:
|
||||
!word chrout_screen_RETURN
|
||||
!word chrout_screen_RETURN
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; CHROUT routine - screen support, control codes in quote mode
|
||||
;
|
||||
@@ -22,3 +25,5 @@ chrout_screen_quote:
|
||||
adc #$BF ; C=1, so adding $BF + C = add $C0
|
||||
@1:
|
||||
jmp chrout_screen_literal
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; RETURN key handling within CHROUT
|
||||
;
|
||||
@@ -31,3 +34,5 @@ chrout_screen_RETURN:
|
||||
jsr screen_calculate_PNT_USER
|
||||
@1:
|
||||
jmp screen_advance_to_next_line
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; RVS ON/OFF handling within CHROUT
|
||||
;
|
||||
@@ -21,3 +24,5 @@ chrout_screen_RVS_OFF:
|
||||
|
||||
sta RVS
|
||||
jmp chrout_screen_done
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; SHIFT ON/OFF handling within CHROUT
|
||||
;
|
||||
@@ -21,3 +24,5 @@ chrout_screen_SHIFT_OFF:
|
||||
|
||||
sta MODE
|
||||
jmp chrout_screen_done
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; STOP key handling within CHROUT
|
||||
;
|
||||
@@ -18,3 +21,5 @@ chrout_screen_STOP:
|
||||
sta INSRT
|
||||
jmp chrout_screen_done
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -2,6 +2,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; CHROUT routine - convert PETSCII to screen code
|
||||
;
|
||||
@@ -9,14 +12,18 @@
|
||||
|
||||
chrout_to_screen_code:
|
||||
|
||||
; Codes $C0-$DF become $40-$5F
|
||||
cmp #$E0
|
||||
bcs @1
|
||||
; Codes $C0-$FE become $40-$7E, and $FF (pi) becomes $5E, as $DE does
|
||||
; (C64 PRG p380-381)
|
||||
cmp #$FF
|
||||
beq @pi
|
||||
cmp #$C0
|
||||
bcc @1
|
||||
|
||||
and #$7F
|
||||
rts ; not high char
|
||||
@pi:
|
||||
lda #$5E
|
||||
rts
|
||||
@1:
|
||||
; Range $20-$3F is unchanged
|
||||
cmp #$40
|
||||
@@ -46,3 +53,5 @@ chrout_to_screen_code:
|
||||
@done:
|
||||
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Variables used:
|
||||
; - BLNSW (cursor blink switch)
|
||||
@@ -101,3 +104,5 @@ cursor_timer_reset:
|
||||
cursor_blink_end:
|
||||
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Variables used:
|
||||
; - BLNSW (cursor blink switch)
|
||||
@@ -15,3 +18,5 @@ cursor_enable:
|
||||
sta BLNSW
|
||||
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Variables used:
|
||||
; - BLNSW (cursor blink switch)
|
||||
@@ -35,3 +38,5 @@ cursor_show:
|
||||
cursor_show_done:
|
||||
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Init screen at reset
|
||||
;
|
||||
@@ -19,3 +22,5 @@ init_screen:
|
||||
|
||||
sta $0286
|
||||
jmp clear_screen
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Clear screen and initialise line link table, described in:
|
||||
;
|
||||
@@ -39,3 +42,5 @@ clear_screen:
|
||||
|
||||
; Fall to cursor home routine
|
||||
jmp cursor_home
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Home the cursor, described in:
|
||||
;
|
||||
@@ -17,3 +20,5 @@ cursor_home:
|
||||
sta TBLX ; current row
|
||||
|
||||
; FALLTROUGH to the next routine
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Set pointer (PNT) to current screen line , described in:
|
||||
;
|
||||
@@ -23,3 +26,5 @@ screen_calculate_pointers:
|
||||
|
||||
jsr screen_calculate_PNT_USER
|
||||
jmp screen_calculate_PNTR_LNMX
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Scroll the whole screen up by 1 logical line, described in:
|
||||
;
|
||||
@@ -130,3 +133,5 @@ screen_scroll_up_loop_done:
|
||||
; Recalculate PNT and USER
|
||||
|
||||
jmp screen_calculate_PNT_USER
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Well-known routine, described in:
|
||||
;
|
||||
@@ -36,3 +39,5 @@ screen_clear_line:
|
||||
|
||||
; Done
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -0,0 +1,2 @@
|
||||
cc65's C64 runtime calls $EA24 (UPDCRAMPTR in its cbm_kernal.inc) after PLOT has set the cursor,
|
||||
for USER to follow PNT, before it stores a character's colour through USER.
|
||||
@@ -0,0 +1,29 @@
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Well-known Kernal routine, described in:
|
||||
;
|
||||
; - [CM64] Computes Mapping the Commodore 64 - $EA24
|
||||
;
|
||||
; Sets USER to the colour RAM location of PNT's screen line. Screen RAM starts on a
|
||||
; kilobyte boundary, as the VIC-II fetches it, so the line's place within its kilobyte
|
||||
; is its place in the colour RAM.
|
||||
;
|
||||
|
||||
|
||||
screen_calculate_USER:
|
||||
|
||||
lda PNT+0
|
||||
sta USER+0
|
||||
lda PNT+1
|
||||
and #$03
|
||||
ora #>COLOR_RAM
|
||||
sta USER+1
|
||||
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -0,0 +1,2 @@
|
||||
ip65's VT100 emulation (drivers/c64vt100.s) reads the low byte of a screen line's address from
|
||||
$ECF0, indexed by the line number.
|
||||
@@ -0,0 +1,22 @@
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Well-known Kernal table, described in:
|
||||
;
|
||||
; - [CM64] Computes Mapping the Commodore 64 - $ECF0
|
||||
;
|
||||
; The low bytes of the 25 screen lines' addresses, 40 bytes apart
|
||||
;
|
||||
|
||||
|
||||
screen_line_lo_bytes:
|
||||
|
||||
!for line, 0, 24 {
|
||||
!byte <(line * 40)
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Official Kernal routine, described in:
|
||||
;
|
||||
@@ -50,4 +53,6 @@ SCREEN:
|
||||
|
||||
pla
|
||||
rts
|
||||
}
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
|
||||
screen_advance_to_next_line:
|
||||
|
||||
@@ -21,3 +24,5 @@ screen_advance_to_next_line:
|
||||
sta PNTR
|
||||
|
||||
jmp chrout_screen_calc_lptr_done
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Set pointers PNT and USER to current screen line
|
||||
;
|
||||
@@ -26,7 +29,7 @@ screen_calculate_PNT_USER_from_X: ; entry point for screen_clear_line
|
||||
; Add 40 to PNT for every line
|
||||
|
||||
cpx #$00
|
||||
beq screen_calculate_USER
|
||||
beq @3
|
||||
@1:
|
||||
lda #40
|
||||
clc
|
||||
@@ -37,8 +40,13 @@ screen_calculate_PNT_USER_from_X: ; entry point for screen_clear_line
|
||||
@2:
|
||||
dex
|
||||
bne @1
|
||||
@3:
|
||||
|
||||
; FALLTROUGH
|
||||
!ifdef ROM_LAYOUT_STD {
|
||||
|
||||
jmp screen_calculate_USER ; at its well-known address, $EA24
|
||||
|
||||
} else {
|
||||
|
||||
screen_calculate_USER:
|
||||
|
||||
@@ -54,3 +62,6 @@ screen_calculate_USER:
|
||||
sta USER+1
|
||||
|
||||
rts
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Sets PNTR in a proper range (0-39 or 40-79)
|
||||
; Sets LNMX to 39 or 79
|
||||
@@ -62,3 +65,5 @@ screen_calculate_lnmx_79:
|
||||
lda #79
|
||||
sta LNMX
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
|
||||
screen_check_space_ends_line:
|
||||
|
||||
@@ -12,3 +15,5 @@ screen_check_space_ends_line:
|
||||
cmp #$20
|
||||
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Helper routine - check character in .A, toggles quote flag if needed
|
||||
;
|
||||
@@ -19,3 +22,5 @@ screen_check_toggle_quote:
|
||||
lda #$22 ; restore previous .A valuee
|
||||
@1:
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Screen code to PETSCII conversion - see:
|
||||
;
|
||||
@@ -70,3 +73,5 @@ s2p_adc_C0:
|
||||
|
||||
adc #$C0 ; Carry already clear
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Get PNTR value clipped to 0-39 range in .Y, sets flags to compare with 0, can trash .A
|
||||
;
|
||||
@@ -18,3 +21,5 @@ screen_get_clipped_PNTR:
|
||||
@1:
|
||||
cpy #$00
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
|
||||
screen_get_logical_line_end_ptr:
|
||||
|
||||
@@ -27,3 +30,5 @@ screen_get_logical_line_end_39:
|
||||
|
||||
ldy #39
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
|
||||
screen_grow_logical_line_done_scroll:
|
||||
|
||||
@@ -142,3 +145,5 @@ screen_grow_logical_line_copy_done:
|
||||
inx
|
||||
jsr screen_clear_line
|
||||
jmp screen_calculate_PNTR_LNMX
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Helper routine to blank screen
|
||||
;
|
||||
@@ -31,3 +34,5 @@ screen_off:
|
||||
|
||||
rts
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
;
|
||||
; Helper routine to show screen
|
||||
;
|
||||
@@ -22,3 +25,5 @@ screen_on:
|
||||
|
||||
rts
|
||||
}
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
|
||||
screen_preserve_sal_eal:
|
||||
|
||||
@@ -33,3 +36,5 @@ screen_common_sal_eal:
|
||||
+phy_trash_a
|
||||
+phx_trash_a
|
||||
rts
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -3,6 +3,9 @@
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
; Not on a Blade, whose Terminal Card holds the screen editor (src/kernal/arnitech)
|
||||
!ifndef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
|
||||
screen_restore_sal_eal:
|
||||
|
||||
@@ -27,4 +30,6 @@ screen_restore_sal_eal:
|
||||
sta SAL+0
|
||||
|
||||
jmp screen_common_sal_eal
|
||||
|
||||
|
||||
|
||||
} ; CONFIG_ARNITECH_BLADE
|
||||
@@ -63,6 +63,10 @@ udtim_keyboard:
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
|
||||
} else ifdef CONFIG_ARNITECH_BLADE {
|
||||
|
||||
jmp udtim_terminal_stop
|
||||
|
||||
} else {
|
||||
|
||||
; According to [CM64], page 27, the action we have to perform is to copy
|
||||
|
||||
Reference in new issue
Block a user