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
@@ -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