support for LOAD command without parameters, some cleanup
This commit is contained in:
1 parent
1f5f43b211
commit
5d45c166e7
5 files changed
+37
-84
No files matched your search
@@ -19,6 +19,7 @@
|
||||
* Jochen Adler - for the JiffyDOS protocol reverse engineering
|
||||
* H2Obsession - for the JiffyDOS protocol description on [his page](https://sites.google.com/site/h2obsession/CBM/C128/JiffySoft128)
|
||||
* SD2IEC team - the project [source code](https://github.com/rkrajnc/sd2iec) helped a lot when adding IEC and JiffyDOS support
|
||||
* Luigi Di Fraia - for his tape formats [description](https://www.luigidifraia.com/c64/docs/tapeloaders.html)
|
||||
* slark - for his screen codes / PETSCII description at [slark.me](https://slark.me)
|
||||
* silverdr - for the floating point routines [description](https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics)
|
||||
* the [C64 Wiki](https://www.c64-wiki.com) contributors
|
||||
|
||||
@@ -140,11 +140,14 @@ HYBRID_WARNING = "*** WARNING *** Distributing kernal_hybrid.rom violates both o
|
||||
|
||||
GIT_COMMIT:= $(shell git log -1 --pretty='%h' | tr '[:lower:]' '[:upper:]')
|
||||
|
||||
# Rules - main
|
||||
# Rules - main XXX fast build does not always succeed, not yet clear, why
|
||||
|
||||
.PHONY: all clean updatebin
|
||||
.PHONY: all fast clean updatebin
|
||||
|
||||
all:
|
||||
$(MAKE) $(TARGET_LIST) $(EXT_TARGET_LIST)
|
||||
|
||||
fast:
|
||||
$(MAKE) -j64 --output-sync=target $(TARGET_LIST) $(EXT_TARGET_LIST)
|
||||
|
||||
clean:
|
||||
@@ -223,7 +226,7 @@ $(DIR_M65)/kernal.seg_1 $(DIR_M65)/KERNAL_1_combined.vs $(DIR_M65)/KERNAL_1_comb
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_M65) $(DIR_M65)/KERNAL_0_combined.sym
|
||||
|
||||
$(DIR_X16)/basic.seg_1 $(DIR_X16)/BASIC_1_combined.vs $(DIR_X16)/BASIC_1_combined.sym: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_X16) $(DIR_M65)/KERNAL_0_combined.sym $(DIR_X16)/BASIC_0_combined.sym
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_X16) $(DIR_X16)/KERNAL_0_combined.sym $(DIR_X16)/BASIC_0_combined.sym
|
||||
$(DIR_X16)/kernal.seg_1 $(DIR_X16)/KERNAL_1_combined.vs $(DIR_X16)/KERNAL_1_combined.sym: \
|
||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_X16) $(DIR_X16)/KERNAL_0_combined.sym
|
||||
|
||||
@@ -298,22 +301,22 @@ $(DIR_M65)/kernal.seg_1 $(DIR_M65)/KERNAL_1_combined.vs $(DIR_M65)/KERNAL_1_comb
|
||||
$(DIR_X16)/OUTB_0.BIN $(DIR_X16)/BASIC_0_combined.vs $(DIR_X16)/BASIC_0_combined.sym:
|
||||
@mkdir -p $(DIR_X16)
|
||||
@rm -f $@* $(DIR_X16)/BASIC_0*
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s BASIC_0 -i BASIC_0-mega65 -o OUTB_0.BIN -d $(DIR_X16) -l c000 -h e4d2 $(CFG_X16) $(SRCDIR_BASIC) $(GEN_BASIC)
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s BASIC_0 -i BASIC_0-x16 -o OUTB_0.BIN -d $(DIR_X16) -l c000 -h e4d2 $(CFG_X16) $(SRCDIR_BASIC) $(GEN_BASIC)
|
||||
|
||||
$(DIR_X16)/OUTK_0.BIN $(DIR_X16)/KERNAL_0_combined.vs $(DIR_X16)/KERNAL_0_combined.sym:
|
||||
@mkdir -p $(DIR_X16)
|
||||
@rm -f $@* $(DIR_X16)/KERNAL_0*
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s KERNAL_0 -i KERNAL_0-mega65 -o OUTK_0.BIN -d $(DIR_X16) -l e4d3 -h ffff $(CFG_X16) $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s KERNAL_0 -i KERNAL_0-x16 -o OUTK_0.BIN -d $(DIR_X16) -l e4d3 -h ffff $(CFG_X16) $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||
|
||||
$(DIR_X16)/basic.seg_1 $(DIR_X16)/BASIC_1_combined.vs $(DIR_X16)/BASIC_1_combined.sym:
|
||||
@mkdir -p $(DIR_X16)
|
||||
@rm -f $@* $(DIR_X16)/basic.seg_1 $(DIR_X16)/BASIC_1*
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s BASIC_1 -i BASIC_1-mega65 -o basic.seg_1 -d $(DIR_X16) -l a000 -h bfff $(CFG_X16) $(SRCDIR_BASIC) $(GEN_BASIC)
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s BASIC_1 -i BASIC_1-x16 -o basic.seg_1 -d $(DIR_X16) -l a000 -h bfff $(CFG_X16) $(SRCDIR_BASIC) $(GEN_BASIC)
|
||||
|
||||
$(DIR_X16)/kernal.seg_1 $(DIR_X16)/KERNAL_1_combined.vs $(DIR_X16)/KERNAL_1_combined.sym:
|
||||
@mkdir -p $(DIR_X16)
|
||||
@rm -f $@* $(DIR_X16)/kernal.seg_1 $(DIR_X16)/KERNAL_1*
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s KERNAL_1 -i KERNAL_1-mega65 -o kernal.seg_1 -d $(DIR_X16) -l a000 -h bfff $(CFG_X16) $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s KERNAL_1 -i KERNAL_1-x16 -o kernal.seg_1 -d $(DIR_X16) -l a000 -h bfff $(CFG_X16) $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||
|
||||
# Rules - BASIC and KERNAL
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ The following ROM features are currently missing:
|
||||
| Driver | Status | Remarks |
|
||||
| :----------------: | :------: | :------------------------------------------------: |
|
||||
| standard | DONE | |
|
||||
| JiffyDOS | DONE | |
|
||||
| JiffyDOS | PARTIAL | LOAD needs improvement for better performance |
|
||||
| DolphinDOS | DONE | |
|
||||
| CIA burst mod | NOT DONE | |
|
||||
| Mega65 burst | NOT DONE | |
|
||||
|
||||
@@ -20,11 +20,33 @@ cmd_load:
|
||||
lda #$00
|
||||
sta FNLEN
|
||||
|
||||
// Without tape support, LOAD must have a filename
|
||||
// (This also skips any leading spaces)
|
||||
// Check for the file name
|
||||
jsr basic_end_of_statement_check
|
||||
bcc !+
|
||||
|
||||
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
|
||||
|
||||
// No file name given, just load the first file from tape
|
||||
|
||||
ldx #$00
|
||||
stx SA // secondary address
|
||||
#if CONFIG_TAPE_NORMAL
|
||||
inx // 1 - for normal tape format
|
||||
#else
|
||||
ldx #$07 // 7 - for turbo tape format
|
||||
#endif
|
||||
stx FA // device number
|
||||
bne cmd_load_got_secondaryaddress // branch always
|
||||
|
||||
#else
|
||||
|
||||
// Without tape support, LOAD must have a filename
|
||||
// (This also skips any leading spaces)
|
||||
|
||||
jmp do_MISSING_FILENAME_error
|
||||
|
||||
#endif
|
||||
|
||||
!:
|
||||
jsr basic_fetch_and_consume_character
|
||||
cmp #$22
|
||||
|
||||
@@ -19,80 +19,7 @@
|
||||
|
||||
jiffydos_load:
|
||||
|
||||
/* XXX NEW version, not yet finished
|
||||
|
||||
//
|
||||
// JiffyDOS protocol support for IEC - optimized load loop
|
||||
//
|
||||
// Based on description from https://github.com/mist64/cbmbus_doc
|
||||
//
|
||||
|
||||
// First we need to switch the device to optimized LOAD protocol,
|
||||
// by making it talk on channel 1 instead of 0
|
||||
|
||||
jsr UNTLK
|
||||
|
||||
lda FA
|
||||
jsr TALK
|
||||
// XXX bcs load_iec_err
|
||||
|
||||
lda #$61 // ask to talk on channel 1
|
||||
sta TBTCNT
|
||||
jsr iec_tx_command
|
||||
// XXX bcs load_iec_error
|
||||
// XXX if not on JiffyDOS protoccol, report error
|
||||
|
||||
// Timing is critical, do not allow interrupts
|
||||
sei
|
||||
|
||||
#if CONFIG_IEC_JIFFYDOS_BLANK
|
||||
|
||||
// Preserve register with screen status (blank/visible)
|
||||
lda VIC_SCROLY
|
||||
sta TBTCNT
|
||||
|
||||
// Blank screen to make sure no sprite/badline will interrupt
|
||||
jsr screen_off
|
||||
|
||||
#else
|
||||
|
||||
// Store previous sprite status in temporary variable
|
||||
jsr jiffydos_prepare
|
||||
sta TBTCNT
|
||||
|
||||
#endif
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
jiffydos_load_mode_escape:
|
||||
|
||||
// We are now in escape mode - release DATA so that we can read it
|
||||
jsr iec_release_clk_data // XXX maybe release just data?
|
||||
|
||||
// Wait till device tells us whether this is EOI/error
|
||||
jsr iec_wait_for_clk_release
|
||||
|
||||
// Check DATA line - if pulled, there is more data
|
||||
bit CIA2_PRA
|
||||
bpl jiffydos_load_mode_receive
|
||||
|
||||
// XXX check for error
|
||||
|
||||
|
||||
|
||||
jiffydos_load_mode_receive:
|
||||
|
||||
|
||||
// Preserve 3 lowest bits of CIA2_PRA XXX deduplicate this
|
||||
|
||||
lda CIA2_PRA
|
||||
and #%00000111
|
||||
sta C3PO
|
||||
|
||||
// XXX read data
|
||||
|
||||
*/
|
||||
|
||||
// XXX implement JiffyDOS optimized LOAD protocol, this one is ineffective
|
||||
|
||||
|
||||
// Timing is critical, do not allow interrupts
|
||||
|
||||
Reference in new issue
Block a user