STOP key now terminates loading, some cleanups

This commit is contained in:
FeralChild64 committed 2019-10-30 21:26:26 +01:00
1 parent 18dc9d9b61
commit 1065930539
5 files changed
+36 -16

No files matched your search

+1 -2
View File
@@ -29,7 +29,6 @@ The following ROM features are currently missing:
* floating point routines
* tape support
* RS-232 support
* breaking Kernal routines with RUN/STOP key
* NMI handling is incomplete
@@ -133,7 +132,7 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on
| `$FFCF` | `$F157` | `CHRIN` | PARTIAL | no screen support, keyboard does not preserve .Y |
| `$FFD2` | `$F1CA` | `CHROUT` | DONE | |
| `$FFD5` | `$F49E` | `LOAD` | DONE | |
| `($0330)` | `$F4A5` | `LOAD` | PARTIAL | no VERIFY support, no STOP key support |
| `($0330)` | `$F4A5` | `LOAD` | PARTIAL | no VERIFY support |
| `$FFD8` | `$F5DD` | `SAVE` | DONE | only this preparation routine part is done |
| `($0332)` | `$F5ED` | `SAVE` | NOT DONE | |
| `$FFDB` | | `SETTIM` | DONE | |
+6 -4
View File
@@ -97,16 +97,18 @@ got_loadaddress:
jsr print_return
pla
plp
bcc !+
bcc load_no_error
// A = KERNAL error code, which also almost match
// basic ERROR codes, so we can just copy the
// error code to X, decrement, and handle normally
// basic ERROR codes
tax
dex
bpl !+
ldx #B_ERR_BREAK
!:
jmp do_basic_error
!:
load_no_error:
// $YYXX is the last loaded address, so store it
stx VARTAB+0
sty VARTAB+1
+20 -1
View File
@@ -14,8 +14,16 @@ load_iec_file_not_found:
jmp kernalerror_FILE_NOT_FOUND
load_iec_error:
lda FA
jsr iec_close_load
jmp lvs_load_verify_error
load_break_error:
pla
lda FA
jsr iec_close_load
jmp kernalerror_ROUTINE_TERMINATED
load_iec:
@@ -85,7 +93,18 @@ iec_load_loop:
// Advance pointer to data
jsr lvs_advance_pointer
bcs_far lvs_wrap_around_error
// Handle STOP key; it is probably an overkill to do it
// with every byte, once per 32 bytes should be enough
lda STAL
and #$1F
bne !+
phx_trash_a
jsr udtim_keyboard
jsr STOP
bcs load_break_error
plx_trash_a
!:
// Check for EOI - if so, this was the last byte
lda IOSTATUS
and #K_STS_EOI
+6 -9
View File
@@ -8,10 +8,9 @@ chrout_screen_control:
txa
// Order here is not random
// 1. First handle the ones that do not depend on quoote mode
// 1. First handle the ones that do not depend on quote mode
// 2. Handle remaining control codes starting from the most commonly used
// in situations when speed might matter, we want to be
// as snappy as possible
// We want to be as snappy as possible
chrout_try_RETURN:
@@ -28,15 +27,13 @@ chrout_try_RETURN:
chrout_try_DEL:
cmp #KEY_DEL
bne !+
jmp chrout_screen_DEL
!:
beq_far chrout_screen_DEL
chrout_try_INS:
cmp #KEY_INS
bne !+
jmp chrout_screen_INS
!:
beq_far chrout_screen_INS
#if CONFIG_EDIT_STOPQUOTE
chrout_try_STOP:
@@ -4,6 +4,7 @@
// starting from the least probable routine
//
chrout_screen_jumptable_codes:
.byte KEY_CLR
@@ -21,6 +22,7 @@ chrout_screen_jumptable_codes:
__chrout_screen_jumptable_codes_end:
chrout_screen_jumptable_lo:
.byte <(chrout_screen_CLR - 1)
@@ -36,6 +38,7 @@ chrout_screen_jumptable_lo:
.byte <(chrout_screen_CRSR_DOWN - 1)
.byte <(chrout_screen_CRSR_UP - 1)
chrout_screen_jumptable_hi:
.byte >(chrout_screen_CLR - 1)