DOS wedge can now display directories
This commit is contained in:
1 parent
9ea1c04da3
commit
ccb78c10b4
5 files changed
+48
-22
No files matched your search
@@ -5,10 +5,14 @@ Here are the features of the Open ROMs not found in the original ROMs from the 8
|
||||
|
||||
* improved keyboard scanning, supports multi-key roll-over and rejection of spurious joystick input
|
||||
* joystick (port 1) can be used to move text cursor
|
||||
* banking in the BASIC interpreter: 61436 bytes free
|
||||
* LOAD start/end addresses are displayed, in the Final cartridge style
|
||||
* LOAD command with just the file name tries to use the last device if it's number seems sane; otherwise uses 8
|
||||
* LOAD secondary address over 255 is considered a start address; NOTE: syntax will most likely change here in the future!
|
||||
* uses RAM under ROM and I/O: 61436 bytes free
|
||||
* extended `LOAD` command
|
||||
* start/end addresses are displayed, in the Final cartridge style
|
||||
* command with just the file name tries to use the last device if it's number seems sane; otherwise uses 8
|
||||
* secondary address over 255 is considered a start address
|
||||
* DOS wedge (direct mode only) - `@<drive_number>`, `@<command>`, `@$`, `@$<params>`, `@`
|
||||
|
||||
NOTE: extra features and their syntax can change in the future!
|
||||
|
||||
# Features missing
|
||||
|
||||
@@ -27,7 +31,6 @@ The following ROM features are currently missing:
|
||||
Features currently being worked on:
|
||||
|
||||
* IEC support
|
||||
* DOS wedge
|
||||
|
||||
|
||||
# API status
|
||||
|
||||
+17
-5
@@ -129,8 +129,11 @@ wedge_dos_directory:
|
||||
|
||||
;; First change the secondary address to the one suitable for
|
||||
;; directory loading
|
||||
lda #$00
|
||||
sta current_secondary_address
|
||||
;; XXX
|
||||
lda #$00 ; logical device number
|
||||
ldx current_device_number
|
||||
ldy #$60
|
||||
jsr JSETFLS
|
||||
|
||||
;; Provide file name
|
||||
jsr wedge_dos_setnam
|
||||
@@ -139,8 +142,8 @@ wedge_dos_directory:
|
||||
jsr via_IOPEN
|
||||
bcs wedge_dos_basic_error
|
||||
|
||||
;; Set channel for input
|
||||
ldx #$0F
|
||||
;; Set channel for file reading
|
||||
ldx #$00
|
||||
jsr via_ICHKIN
|
||||
bcs wedge_dos_basic_error
|
||||
|
||||
@@ -162,7 +165,9 @@ wedge_dos_directory_line:
|
||||
cpy #$50
|
||||
beq + ; line too long, terminate loading file
|
||||
jsr JREADST
|
||||
beq + ; end of file
|
||||
bne + ; end of file
|
||||
cpy #$04 ; 2 bytes (pointer to next line) + 2 bytes (line number)
|
||||
bcc -
|
||||
lda BUF, y
|
||||
bne -
|
||||
;; End of line, but not end of file
|
||||
@@ -174,11 +179,18 @@ wedge_dos_directory_line:
|
||||
|
||||
wedge_dos_directory_display:
|
||||
|
||||
cpy #$05 ; protection against malformed directory
|
||||
bcc wedge_dos_clean_exit
|
||||
|
||||
lda #$00 ; extra protection agains buffer overflow
|
||||
sta BUF, y
|
||||
|
||||
;; Display line
|
||||
ldx #<BUF
|
||||
stx basic_current_line_ptr+0
|
||||
ldx #>BUF
|
||||
stx basic_current_line_ptr+1
|
||||
ldx #basic_current_line_ptr
|
||||
jsr list_single_line
|
||||
|
||||
;; Read & display next line or quit
|
||||
|
||||
@@ -7,12 +7,8 @@
|
||||
|
||||
iec_cmd_close:
|
||||
|
||||
jsr iec_tx_flush
|
||||
|
||||
;; Due to OPEN/CLOSE/TKSA/SECOND command encoding (see https://www.pagetable.com/?p=1031),
|
||||
;; allowed channels are 0-15; report error if out of range
|
||||
cmp #$10
|
||||
bcc +
|
||||
jsr iec_check_channel_openclose
|
||||
bcc +
|
||||
jmp kernalerror_FILE_NOT_INPUT
|
||||
*
|
||||
ora #$E0
|
||||
|
||||
@@ -8,10 +8,8 @@
|
||||
|
||||
iec_cmd_open: ; similar to TKSA, but without turnaround
|
||||
|
||||
;; Due to OPEN/CLOSE/TKSA/SECOND command encoding (see https://www.pagetable.com/?p=1031),
|
||||
;; allowed channels are 0-15; report error if out of range
|
||||
cmp #$10
|
||||
bcc +
|
||||
jsr iec_check_channel_openclose
|
||||
bcc +
|
||||
jmp kernalerror_FILE_NOT_INPUT
|
||||
*
|
||||
ora #$F0
|
||||
@@ -27,3 +25,18 @@ common_open_close_unlsn_second: ; common part of several commands
|
||||
*
|
||||
rts
|
||||
|
||||
iec_check_channel_openclose:
|
||||
;; Due to OPEN/CLOSE/TKSA/SECOND command encoding (see https://www.pagetable.com/?p=1031),
|
||||
;; allowed channels are 0-15; report error if out of range
|
||||
cmp #$10
|
||||
bcc +
|
||||
;; Workaround to allow reading executable files and disk directory
|
||||
;; using OPEN routine - see https://www.pagetable.com/?p=273 for
|
||||
;; example usage
|
||||
cmp #$60
|
||||
beq +
|
||||
sec ; mark unsuitable channel number
|
||||
rts
|
||||
*
|
||||
clc ; mark suitable channel number
|
||||
rts
|
||||
+4
-2
@@ -78,9 +78,11 @@ open_iec:
|
||||
bcc +
|
||||
jmp kernalerror_DEVICE_NOT_FOUND ; XXX find a better error message for wrong channel (create new one?)
|
||||
*
|
||||
|
||||
;; We need our helpers to get to filenames under ROMs or IO area
|
||||
jsr install_ram_routines
|
||||
|
||||
;; Send command ('file name')
|
||||
jsr lvs_send_file_name
|
||||
|
||||
jmp open_done_success
|
||||
|
||||
|
||||
Reference in new issue
Block a user