tape wedge can now invoke MERGE, documentation update
This commit is contained in:
1 parent
c9c45622d7
commit
4f4e7d63fd
7 files changed
+1423
-1352
No files matched your search
@@ -285,7 +285,7 @@ Feature needs about 330 bytes in BASIC segment. If unsure - enable.
|
||||
|
||||
### `CONFIG_TAPE_WEDGE`
|
||||
|
||||
If enabled, a simple DOS wedge is available from the direct mode for tape loading - supports `←L` only, optionally with a file name.
|
||||
If enabled, a simple DOS wedge is available from the direct mode for tape loading - supports `←L` (for `LOAD`) and `←M` (for `MERGE`), optionally with a file name.
|
||||
|
||||
Feature needs several bytes in BASIC segment. If unsure - enable.
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Here are the features of the Open ROMs not found in the original ROMs from the 8
|
||||
* DOS wedge (direct mode only) - `@<drive_number>`, `@<command>`, `@$`, `@$<params>`, `@`
|
||||
* BASIC extensions, see the [documentation](doc/Extended-BASIC.md)
|
||||
|
||||
* turbo tape load support (as device 7, or using `←L`, optionallly with a file name), quite sophisticated: up to 250 blocks (can store bytes under I/O), automatically adjusts for tape speed differences
|
||||
* turbo tape load support (as device 7, or using `←L` / `←M`, optionally with a file name), quite sophisticated: up to 250 blocks (can store bytes under I/O), automatically adjusts for tape speed differences
|
||||
* normal tape load error log is limited by free stack space only (no artificial limitation like in original ROMs)
|
||||
* tape format autodetection; normal vs turbo is mostly transparent to user
|
||||
* improved support for tape adapters (for using regular casette players and other audio devices instead of Datasette) and emulators
|
||||
|
||||
+39
-3
@@ -1,9 +1,45 @@
|
||||
|
||||
# Extended BASIC
|
||||
|
||||
NOTE: Command syntax, behaviour details, and tokens are still subject to change! In the future most (if not all) extended commands will be available only on machines with extended ROM, like the Mega65.
|
||||
NOTE: Command syntax, behaviour details, and tokens are still subject to change! Currently the availability of some depends on the build configuration, in the future most (if not all) extended commands will be available only on machines with extended ROM, like the Mega65 or Ultimate 64.
|
||||
|
||||
## Additional commands
|
||||
## DOS Wedge
|
||||
|
||||
The DOS Wedge commands are only available in direct mode, and they have to start from the first character of the line.
|
||||
|
||||
### `@`
|
||||
|
||||
Displays the error/status read from the current drive. Current drive is either the last device used by any I/O command, the one set by DOS Wedge command, or 8 as a fallback.
|
||||
|
||||
### `@$`
|
||||
|
||||
Displays the directory of the current drive. Does not destroy BASIC program in memory.
|
||||
|
||||
### `@device_number`
|
||||
|
||||
Changes the current drive number.
|
||||
|
||||
### `@command`
|
||||
|
||||
Sends the DOS command to the current drive.
|
||||
|
||||
## Tape Wedge
|
||||
|
||||
The Tape Wedge commands are only available in direct mode, and they have to start from the first character of the line.
|
||||
|
||||
### `←L ["file_name"]`
|
||||
|
||||
Loads the file from tape. Depending on the configuration, it tries to load the file in TurboTape 64 format, in the standard CBM format, or autodetects the file format.
|
||||
|
||||
### `←M ["file_name"]`
|
||||
|
||||
Like above, but merges a BASIC program to the one already stored in memory.
|
||||
|
||||
### `←H`
|
||||
|
||||
Launches a built-in tape head alignment tool. Destorys program in memory. Press `RUN/STOP` to terminate the tool.
|
||||
|
||||
## Additional BASIC commands
|
||||
|
||||
### `FAST`
|
||||
|
||||
@@ -15,7 +51,7 @@ Tries to switch the machine back to 1 MHz operation mode.
|
||||
|
||||
### `OLD`
|
||||
|
||||
Tries to restore program destroyed by NEW or a reset.
|
||||
Tries to restore program destroyed by `NEW` or a reset.
|
||||
|
||||
### `MERGE "file_name" [, device_number]`
|
||||
|
||||
|
||||
@@ -16,6 +16,10 @@ cmd_merge:
|
||||
|
||||
jsr helper_load_fetch_devnum
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
cmd_merge_got_params:
|
||||
|
||||
// Make sure VARTAB is correctly set
|
||||
|
||||
jsr calculate_VARTAB
|
||||
|
||||
@@ -19,6 +19,8 @@ wedge_tape:
|
||||
|
||||
cmp #$4C // 'L'
|
||||
beq wedge_arrow_L
|
||||
cmp #$4D // 'M'
|
||||
beq wedge_arrow_M
|
||||
|
||||
#if CONFIG_TAPE_HEAD_ALIGN
|
||||
|
||||
@@ -50,62 +52,21 @@ wedge_arrow_H:
|
||||
|
||||
wedge_arrow_L:
|
||||
|
||||
// Make sure the syntax is correct
|
||||
|
||||
jsr injest_spaces
|
||||
jsr fetch_character
|
||||
|
||||
cmp #$00
|
||||
beq wedge_arrow_L_no_filename // branch if no file name given
|
||||
cmp #$22
|
||||
bne_16 do_SYNTAX_error // branch if no opening quote
|
||||
|
||||
// Fetch the file name
|
||||
|
||||
lda TXTPTR+0
|
||||
sta FNADDR+0
|
||||
lda TXTPTR+1
|
||||
sta FNADDR+1
|
||||
|
||||
ldx #$00
|
||||
!:
|
||||
jsr fetch_character
|
||||
|
||||
cmp #$00
|
||||
beq !+
|
||||
cmp #$22
|
||||
beq !+
|
||||
|
||||
inx
|
||||
bne !-
|
||||
!:
|
||||
stx FNLEN
|
||||
|
||||
lda #$00
|
||||
beq wedge_arrow_L_got_filename
|
||||
|
||||
wedge_arrow_L_no_filename:
|
||||
|
||||
sta FNLEN // .A is 0 here, default file name is empty
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
wedge_arrow_L_got_filename: // .A has to be 0
|
||||
|
||||
sta VERCKB // operation is LOAD, not VERIFY
|
||||
|
||||
ldy #$01
|
||||
#if CONFIG_TAPE_TURBO
|
||||
ldx #$07 // turbo tape device
|
||||
#else
|
||||
ldx #$01 // normal tape device
|
||||
#endif
|
||||
|
||||
jsr JSETFLS
|
||||
jsr wedge_tape_prepare_load
|
||||
|
||||
// Perform loading
|
||||
|
||||
jmp cmd_load_got_params
|
||||
|
||||
wedge_arrow_M:
|
||||
|
||||
jsr wedge_tape_prepare_load
|
||||
ldy #$00
|
||||
sty SA // for MERGE secondary address has to be 0!
|
||||
|
||||
// Perform merging
|
||||
|
||||
jmp cmd_merge_got_params
|
||||
|
||||
|
||||
#endif // CONFIG_TAPE_WEDGE
|
||||
@@ -0,0 +1,68 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
#if CONFIG_TAPE_WEDGE
|
||||
|
||||
//
|
||||
// Common part for LOAD and MERGE operations via tape wedge
|
||||
//
|
||||
|
||||
wedge_tape_prepare_load:
|
||||
|
||||
// Make sure the syntax is correct
|
||||
|
||||
jsr injest_spaces
|
||||
jsr fetch_character
|
||||
|
||||
cmp #$00
|
||||
beq wedge_tape_prepare_load_no_filename // branch if no file name given
|
||||
cmp #$22
|
||||
bne_16 do_SYNTAX_error // branch if no opening quote
|
||||
|
||||
// Fetch the file name
|
||||
|
||||
lda TXTPTR+0
|
||||
sta FNADDR+0
|
||||
lda TXTPTR+1
|
||||
sta FNADDR+1
|
||||
|
||||
ldx #$00
|
||||
!:
|
||||
jsr fetch_character
|
||||
|
||||
cmp #$00
|
||||
beq !+
|
||||
cmp #$22
|
||||
beq !+
|
||||
|
||||
inx
|
||||
bne !-
|
||||
!:
|
||||
stx FNLEN
|
||||
|
||||
lda #$00
|
||||
beq wedge_tape_prepare_load_got_filename
|
||||
|
||||
wedge_tape_prepare_load_no_filename:
|
||||
|
||||
sta FNLEN // .A is 0 here, default file name is empty
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
wedge_tape_prepare_load_got_filename: // .A has to be 0
|
||||
|
||||
sta VERCKB // operation is LOAD, not VERIFY
|
||||
|
||||
ldy #$01
|
||||
#if CONFIG_TAPE_TURBO
|
||||
ldx #$07 // turbo tape device
|
||||
#else
|
||||
ldx #$01 // normal tape device
|
||||
#endif
|
||||
|
||||
jmp JSETFLS
|
||||
|
||||
|
||||
#endif // CONFIG_TAPE_WEDGE
|
||||
+1297
-1295
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user